From 921274e366d56ab0d6cf5cd59f77e3cbeaf0bc4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yusuf=20=C3=96zdemir?= Date: Tue, 30 Jan 2024 14:27:49 +0300 Subject: [PATCH] update dist / version --- dist/fr-c1251c6e.cjs | 1 + dist/fr-d570774a.js | 241 ++ dist/style.css | 2 +- dist/vuefinder.cjs | 3 +- dist/vuefinder.js | 3307 +++++++++-------- dist/{zhCN-9b524820.js => zhCN-040643d9.js} | 2 +- dist/{zhCN-e25e65b3.cjs => zhCN-44a2ca81.cjs} | 2 +- dist/{zhTW-a803434e.js => zhTW-4aa25a91.js} | 2 +- dist/{zhTW-6a024d5e.cjs => zhTW-73ae00d7.cjs} | 2 +- package.json | 2 +- 10 files changed, 2020 insertions(+), 1544 deletions(-) create mode 100644 dist/fr-c1251c6e.cjs create mode 100644 dist/fr-d570774a.js rename dist/{zhCN-9b524820.js => zhCN-040643d9.js} (99%) rename dist/{zhCN-e25e65b3.cjs => zhCN-44a2ca81.cjs} (99%) rename dist/{zhTW-a803434e.js => zhTW-4aa25a91.js} (99%) rename dist/{zhTW-6a024d5e.cjs => zhTW-73ae00d7.cjs} (99%) diff --git a/dist/fr-c1251c6e.cjs b/dist/fr-c1251c6e.cjs new file mode 100644 index 00000000..7da79900 --- /dev/null +++ b/dist/fr-c1251c6e.cjs @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={strings:{},pluralize(r){return r<=1?0:1}};e.strings={addBulkFilesFailed:{0:"L’ajout de %{smart_count} fichier a échoué",1:"L’ajout de %{smart_count} fichiers a échoué"},addedNumFiles:"%{numFiles} fichier(s) ajouté(s)",addingMoreFiles:"Ajout de fichiers",addMore:"Ajouter d’autres",addMoreFiles:"Ajouter d’autres fichiers",allFilesFromFolderNamed:"Tous les fichiers du dossier %{name}",allowAccessDescription:"Pour prendre des photos ou enregistrer une vidéo, veuillez autoriser l’accès à votre caméra pour ce site.",allowAccessTitle:"Veuillez autoriser l’accès à votre caméra",authAborted:"Authentification interrompue",authenticateWith:"Se connecter à %{pluginName}",authenticateWithTitle:"Veuillez vous authentifier avec %{pluginName} pour sélectionner les fichiers",back:"Retour",browse:"naviguer",browseFiles:"naviguer",cancel:"Annuler",cancelUpload:"Annuler le téléversement",chooseFiles:"Choisir des fichiers",closeModal:"Fermer la fenêtre",companionError:"Connexion à Companion a échoué",companionUnauthorizeHint:"Pour vous déconnecter de votre compte %{provider}, veuillez aller à %{url}",complete:"Terminé",compressedX:"%{size} économisé(s) par la compression",compressingImages:"Compression des images…",connectedToInternet:"Connecté à Internet",copyLink:"Copier le lien",copyLinkToClipboardFallback:"Copier le lien ci-dessous",copyLinkToClipboardSuccess:"Lien copié",creatingAssembly:"Préparation du téléversement…",creatingAssemblyFailed:"Transloadit: Impossible de créer Assembly",dashboardTitle:"Téléverseur de fichiers",dashboardWindowTitle:"Fenêtre de téléversement de fichiers (Appuyez sur Échap pour fermer)",dataUploadedOfTotal:"%{complete} sur %{total}",done:"Terminé",dropHereOr:"Déposer les fichiers ici ou %{browse}",dropHint:"Déposez vos fichiers ici",dropPasteBoth:"Déposer les fichiers ici, coller ou %{browse}",dropPasteFiles:"Déposer les fichiers ici, coller ou %{browse}",dropPasteFolders:"Déposer les fichiers ici, coller ou %{browse}",dropPasteImportBoth:"Déposer les fichiers ici, coller, %{browse} ou importer de",dropPasteImportFiles:"Déposer les fichiers ici, coller, %{browse} ou importer de",dropPasteImportFolders:"Déposer les fichiers ici, coller, %{browse} ou importer de",editFile:"Modifier le fichier",editFileWithFilename:"Modifier le fichier %{file}",editing:"Modification en cours de %{file}",emptyFolderAdded:"Aucun fichier n’a été ajouté depuis un dossier vide",encoding:"Traitement…",enterCorrectUrl:"Lien incorrect: Assurez-vous que vous entrez un lien direct vers le fichier",enterUrlToImport:"Entrez le lien pour importer un fichier",exceedsSize:"Ce fichier dépasse la taille maximale autorisée de %{size}",failedToFetch:"Companion a échoué à récupérer ce lien, assurez-vous qu’il est correct",failedToUpload:"Le téléversement de %{file} a échoué",fileSource:"Fichier source: %{name}",filesUploadedOfTotal:{0:"%{complete} sur %{smart_count} fichier téléversé",1:"%{complete} sur %{smart_count} fichiers téléversés"},filter:"Filtrer",finishEditingFile:"Terminer l’édition du fichier",folderAdded:{0:"%{smart_count} fichier ajouté de %{folder}",1:"%{smart_count} fichiers ajoutés de %{folder}"},generatingThumbnails:"Génération des vignettes…",import:"Importer",importFrom:"Importer de %{name}",loading:"Chargement…",logOut:"Déconnexion",micDisabled:"Accès au micro refusé par l’utilisateur",myDevice:"Mon Appareil",noDuplicates:'Impossible d’ajouter le fichier "%{fileName}", il existe déjà',noFilesFound:"Vous n’avez aucun fichier ou dossier ici",noInternetConnection:"Pas de connexion à Internet",noMoreFilesAllowed:"Impossible d’ajouter de nouveaux fichiers: en cours de chargement ",openFolderNamed:"Ouvrir %{name}",pause:"Pause",pauseUpload:"Mettre en pause le téléversement",paused:"En pause",poweredBy:"Propulsé par %{uppy}",processingXFiles:{0:"Traitement de %{smart_count} fichier",1:"Traitement de %{smart_count} fichiers"},recording:"Enregistrement",recordingLength:"Durée d’enregistrement %{recording_length}",recordingStoppedMaxSize:"L’enregistrement s’est arrété car la taille du fichier dépasse la limite",removeFile:"Effacer le fichier %{file}",resetFilter:"Réinitialiser filtre",resume:"Reprendre",resumeUpload:"Reprendre le téléversement",retry:"Réessayer",retryUpload:"Réessayer le téléversement",save:"Sauvegarder",saveChanges:"Sauvegarder les modifications",selectFileNamed:"Sélectionner le fichier %{name}",selectX:{0:"Sélectionner %{smart_count}",1:"Sélectionner %{smart_count}"},smile:"Souriez !",startRecording:"Commencer l’enregistrement vidéo",stopRecording:"Arrêter l’enregistrement vidéo",streamActive:"Stream actif",streamPassive:"Stream passif",submitRecordedFile:"Envoyer la vidéo enregistrée",takePicture:"Prendre une photo",timedOut:"Téléversement bloqué durant %{seconds} secondes, annulation.",unselectFileNamed:"Désélectionner le fichier %{name}",upload:"Téléverser",uploadComplete:"Téléversement terminé",uploadFailed:"Le téléversement a échoué",uploadPaused:"Téléversement mis en pause",uploadStalled:"Téléversement bloqué depuis %{seconds} secondes. Il est peut-être nécessaire de recommencer l’opération.",uploadXFiles:{0:"Téléverser %{smart_count} fichier",1:"Téléverser %{smart_count} fichiers"},uploadXNewFiles:{0:"Téléverser +%{smart_count} fichier",1:"Téléverser +%{smart_count} fichiers"},uploading:"Téléversement en cours",uploadingXFiles:{0:"Téléversement de %{smart_count} fichier",1:"Téléversement de %{smart_count} fichiers"},xFilesSelected:{0:"%{smart_count} fichier sélectionné",1:"%{smart_count} fichiers sélectionnés"},xMoreFilesAdded:{0:"%{smart_count} autre fichier ajouté",1:"%{smart_count} autres fichiers ajoutés"},xTimeLeft:"%{time} restantes",youCanOnlyUploadFileTypes:"Vous pouvez seulement téléverser: %{types}",youCanOnlyUploadX:{0:"Vous pouvez seulement téléverser %{smart_count} fichier",1:"Vous pouvez seulement téléverser %{smart_count} fichiers"},youHaveToAtLeastSelectX:{0:"Vous devez sélectionner au moins %{smart_count} fichier",1:"Vous devez sélectionner au moins %{smart_count} fichiers"}};typeof Uppy<"u"&&(globalThis.Uppy.locales.fr_FR=e);const i=e,s={Language:"Langue",Create:"Créer",Close:"Fermer",Cancel:"Annuler",Save:"Enregistrer",Edit:"Modifier",Crop:"Recadrer","New Folder":"Nouveau dossier","New File":"Nouveau fichier",Rename:"Renommer",Delete:"Supprimer",Upload:"Télécharger",Download:"Télécharger",Archive:"Archiver",Unarchive:"Désarchiver",Open:"Ouvrir","Open containing folder":"Ouvrir le dossier contenant",Refresh:"Rafraîchir",Preview:"Aperçu","Dark Mode":"Mode sombre","Toggle Full Screen":"Basculer en plein écran","Change View":"Changer de vue",Storage:"Stockage","Go up a directory":"Remonter d'un répertoire","Search anything..":"Rechercher...",Name:"Nom",Size:"Taille",Date:"Date",Filepath:"Chemin du fichier",About:"À propos","Folder Name":"Nom du dossier","File Name":"Nom du fichier","Move files":"Déplacer les fichiers","Are you sure you want to move these files to?":"Êtes-vous sûr de vouloir déplacer ces fichiers vers?","Yes, Move!":"Oui, déplacer!","Delete files":"Supprimer les fichiers","Yes, Delete!":"Oui, supprimer!","Upload Files":"Télécharger des fichiers","No files selected!":"Aucun fichier sélectionné!","Select Files":"Sélectionner des fichiers","Archive the files":"Archiver les fichiers","Unarchive the files":"Désarchiver les fichiers","The archive will be unarchived at":"L'archive sera désarchivée à","Archive name. (.zip file will be created)":"Nom de l'archive. (un fichier .zip sera créé)","Vuefinder is a file manager component for vue 3.":"Vuefinder est un composant de gestionnaire de fichiers pour vue 3.","Create a new folder":"Créer un nouveau dossier","Create a new file":"Créer un nouveau fichier","Are you sure you want to delete these files?":"Êtes-vous sûr de vouloir supprimer ces fichiers?","This action cannot be undone.":"Cette action ne peut pas être annulée.","Search results for":"Résultats de recherche pour","item(s) selected.":"élément(s) sélectionné(s).","%s is renamed.":"%s est renommé.","This is a readonly storage.":"C'est un stockage en lecture seule.","%s is created.":"%s est créé.","Files moved.":"Fichiers déplacés.","Files deleted.":"Fichiers supprimés.","The file unarchived.":"Le fichier désarchivé.","The file(s) archived.":"Le(s) fichier(s) archivé(s).","Updated.":"Mis à jour.","No search result found.":"Aucun résultat de recherche trouvé.","Are you sure you want to move these files?":"Êtes-vous sûr de vouloir déplacer ces fichiers?","File Size":"Taille du fichier","Last Modified":"Dernière modification","Drag&Drop: on":"Drag&Drop: on","Drag&Drop: off":"Drag&Drop: off","Select Folders":"Sélectionner des dossiers","Clear all":"Tout effacer","Clear only successful":"Effacer uniquement les réussites","Drag and drop the files/folders to here or click here.":"Faites glisser les fichiers/dossiers ici ou cliquez ici.","Release to drop these files.":"Relâchez pour déposer ces fichiers.",Canceled:"Annulé",Done:"Terminé","Network Error, Unable establish connection to the server or interrupted.":"Erreur réseau, impossible d'établir une connexion avec le serveur ou interrompue.","Pending upload":"Téléchargement en attente","Please select file to upload first.":"Veuillez d'abord sélectionner le fichier à télécharger.","About %s":"À propos de %s",Settings:"Paramètres","Use Metric Units":"Utiliser les unités métriques","Saved.":"Enregistré.","Clear Local Storage":"Effacer le stockage local",uppy:i};exports.default=s; diff --git a/dist/fr-d570774a.js b/dist/fr-d570774a.js new file mode 100644 index 00000000..bfd7c2dd --- /dev/null +++ b/dist/fr-d570774a.js @@ -0,0 +1,241 @@ +const e = { + strings: {}, + pluralize(r) { + return r <= 1 ? 0 : 1; + } +}; +e.strings = { + addBulkFilesFailed: { + 0: "L’ajout de %{smart_count} fichier a échoué", + 1: "L’ajout de %{smart_count} fichiers a échoué" + }, + addedNumFiles: "%{numFiles} fichier(s) ajouté(s)", + addingMoreFiles: "Ajout de fichiers", + addMore: "Ajouter d’autres", + addMoreFiles: "Ajouter d’autres fichiers", + allFilesFromFolderNamed: "Tous les fichiers du dossier %{name}", + allowAccessDescription: "Pour prendre des photos ou enregistrer une vidéo, veuillez autoriser l’accès à votre caméra pour ce site.", + allowAccessTitle: "Veuillez autoriser l’accès à votre caméra", + authAborted: "Authentification interrompue", + authenticateWith: "Se connecter à %{pluginName}", + authenticateWithTitle: "Veuillez vous authentifier avec %{pluginName} pour sélectionner les fichiers", + back: "Retour", + browse: "naviguer", + browseFiles: "naviguer", + cancel: "Annuler", + cancelUpload: "Annuler le téléversement", + chooseFiles: "Choisir des fichiers", + closeModal: "Fermer la fenêtre", + companionError: "Connexion à Companion a échoué", + companionUnauthorizeHint: "Pour vous déconnecter de votre compte %{provider}, veuillez aller à %{url}", + complete: "Terminé", + compressedX: "%{size} économisé(s) par la compression", + compressingImages: "Compression des images…", + connectedToInternet: "Connecté à Internet", + copyLink: "Copier le lien", + copyLinkToClipboardFallback: "Copier le lien ci-dessous", + copyLinkToClipboardSuccess: "Lien copié", + creatingAssembly: "Préparation du téléversement…", + creatingAssemblyFailed: "Transloadit: Impossible de créer Assembly", + dashboardTitle: "Téléverseur de fichiers", + dashboardWindowTitle: "Fenêtre de téléversement de fichiers (Appuyez sur Échap pour fermer)", + dataUploadedOfTotal: "%{complete} sur %{total}", + done: "Terminé", + dropHereOr: "Déposer les fichiers ici ou %{browse}", + dropHint: "Déposez vos fichiers ici", + dropPasteBoth: "Déposer les fichiers ici, coller ou %{browse}", + dropPasteFiles: "Déposer les fichiers ici, coller ou %{browse}", + dropPasteFolders: "Déposer les fichiers ici, coller ou %{browse}", + dropPasteImportBoth: "Déposer les fichiers ici, coller, %{browse} ou importer de", + dropPasteImportFiles: "Déposer les fichiers ici, coller, %{browse} ou importer de", + dropPasteImportFolders: "Déposer les fichiers ici, coller, %{browse} ou importer de", + editFile: "Modifier le fichier", + editFileWithFilename: "Modifier le fichier %{file}", + editing: "Modification en cours de %{file}", + emptyFolderAdded: "Aucun fichier n’a été ajouté depuis un dossier vide", + encoding: "Traitement…", + enterCorrectUrl: "Lien incorrect: Assurez-vous que vous entrez un lien direct vers le fichier", + enterUrlToImport: "Entrez le lien pour importer un fichier", + exceedsSize: "Ce fichier dépasse la taille maximale autorisée de %{size}", + failedToFetch: "Companion a échoué à récupérer ce lien, assurez-vous qu’il est correct", + failedToUpload: "Le téléversement de %{file} a échoué", + fileSource: "Fichier source: %{name}", + filesUploadedOfTotal: { + 0: "%{complete} sur %{smart_count} fichier téléversé", + 1: "%{complete} sur %{smart_count} fichiers téléversés" + }, + filter: "Filtrer", + finishEditingFile: "Terminer l’édition du fichier", + folderAdded: { + 0: "%{smart_count} fichier ajouté de %{folder}", + 1: "%{smart_count} fichiers ajoutés de %{folder}" + }, + generatingThumbnails: "Génération des vignettes…", + import: "Importer", + importFrom: "Importer de %{name}", + loading: "Chargement…", + logOut: "Déconnexion", + micDisabled: "Accès au micro refusé par l’utilisateur", + myDevice: "Mon Appareil", + noDuplicates: 'Impossible d’ajouter le fichier "%{fileName}", il existe déjà', + noFilesFound: "Vous n’avez aucun fichier ou dossier ici", + noInternetConnection: "Pas de connexion à Internet", + noMoreFilesAllowed: "Impossible d’ajouter de nouveaux fichiers: en cours de chargement ", + openFolderNamed: "Ouvrir %{name}", + pause: "Pause", + pauseUpload: "Mettre en pause le téléversement", + paused: "En pause", + poweredBy: "Propulsé par %{uppy}", + processingXFiles: { + 0: "Traitement de %{smart_count} fichier", + 1: "Traitement de %{smart_count} fichiers" + }, + recording: "Enregistrement", + recordingLength: "Durée d’enregistrement %{recording_length}", + recordingStoppedMaxSize: "L’enregistrement s’est arrété car la taille du fichier dépasse la limite", + removeFile: "Effacer le fichier %{file}", + resetFilter: "Réinitialiser filtre", + resume: "Reprendre", + resumeUpload: "Reprendre le téléversement", + retry: "Réessayer", + retryUpload: "Réessayer le téléversement", + save: "Sauvegarder", + saveChanges: "Sauvegarder les modifications", + selectFileNamed: "Sélectionner le fichier %{name}", + selectX: { + 0: "Sélectionner %{smart_count}", + 1: "Sélectionner %{smart_count}" + }, + smile: "Souriez !", + startRecording: "Commencer l’enregistrement vidéo", + stopRecording: "Arrêter l’enregistrement vidéo", + streamActive: "Stream actif", + streamPassive: "Stream passif", + submitRecordedFile: "Envoyer la vidéo enregistrée", + takePicture: "Prendre une photo", + timedOut: "Téléversement bloqué durant %{seconds} secondes, annulation.", + unselectFileNamed: "Désélectionner le fichier %{name}", + upload: "Téléverser", + uploadComplete: "Téléversement terminé", + uploadFailed: "Le téléversement a échoué", + uploadPaused: "Téléversement mis en pause", + uploadStalled: "Téléversement bloqué depuis %{seconds} secondes. Il est peut-être nécessaire de recommencer l’opération.", + uploadXFiles: { + 0: "Téléverser %{smart_count} fichier", + 1: "Téléverser %{smart_count} fichiers" + }, + uploadXNewFiles: { + 0: "Téléverser +%{smart_count} fichier", + 1: "Téléverser +%{smart_count} fichiers" + }, + uploading: "Téléversement en cours", + uploadingXFiles: { + 0: "Téléversement de %{smart_count} fichier", + 1: "Téléversement de %{smart_count} fichiers" + }, + xFilesSelected: { + 0: "%{smart_count} fichier sélectionné", + 1: "%{smart_count} fichiers sélectionnés" + }, + xMoreFilesAdded: { + 0: "%{smart_count} autre fichier ajouté", + 1: "%{smart_count} autres fichiers ajoutés" + }, + xTimeLeft: "%{time} restantes", + youCanOnlyUploadFileTypes: "Vous pouvez seulement téléverser: %{types}", + youCanOnlyUploadX: { + 0: "Vous pouvez seulement téléverser %{smart_count} fichier", + 1: "Vous pouvez seulement téléverser %{smart_count} fichiers" + }, + youHaveToAtLeastSelectX: { + 0: "Vous devez sélectionner au moins %{smart_count} fichier", + 1: "Vous devez sélectionner au moins %{smart_count} fichiers" + } +}; +typeof Uppy < "u" && (globalThis.Uppy.locales.fr_FR = e); +const i = e, s = { + Language: "Langue", + Create: "Créer", + Close: "Fermer", + Cancel: "Annuler", + Save: "Enregistrer", + Edit: "Modifier", + Crop: "Recadrer", + "New Folder": "Nouveau dossier", + "New File": "Nouveau fichier", + Rename: "Renommer", + Delete: "Supprimer", + Upload: "Télécharger", + Download: "Télécharger", + Archive: "Archiver", + Unarchive: "Désarchiver", + Open: "Ouvrir", + "Open containing folder": "Ouvrir le dossier contenant", + Refresh: "Rafraîchir", + Preview: "Aperçu", + "Dark Mode": "Mode sombre", + "Toggle Full Screen": "Basculer en plein écran", + "Change View": "Changer de vue", + Storage: "Stockage", + "Go up a directory": "Remonter d'un répertoire", + "Search anything..": "Rechercher...", + Name: "Nom", + Size: "Taille", + Date: "Date", + Filepath: "Chemin du fichier", + About: "À propos", + "Folder Name": "Nom du dossier", + "File Name": "Nom du fichier", + "Move files": "Déplacer les fichiers", + "Are you sure you want to move these files to?": "Êtes-vous sûr de vouloir déplacer ces fichiers vers?", + "Yes, Move!": "Oui, déplacer!", + "Delete files": "Supprimer les fichiers", + "Yes, Delete!": "Oui, supprimer!", + "Upload Files": "Télécharger des fichiers", + "No files selected!": "Aucun fichier sélectionné!", + "Select Files": "Sélectionner des fichiers", + "Archive the files": "Archiver les fichiers", + "Unarchive the files": "Désarchiver les fichiers", + "The archive will be unarchived at": "L'archive sera désarchivée à", + "Archive name. (.zip file will be created)": "Nom de l'archive. (un fichier .zip sera créé)", + "Vuefinder is a file manager component for vue 3.": "Vuefinder est un composant de gestionnaire de fichiers pour vue 3.", + "Create a new folder": "Créer un nouveau dossier", + "Create a new file": "Créer un nouveau fichier", + "Are you sure you want to delete these files?": "Êtes-vous sûr de vouloir supprimer ces fichiers?", + "This action cannot be undone.": "Cette action ne peut pas être annulée.", + "Search results for": "Résultats de recherche pour", + "item(s) selected.": "élément(s) sélectionné(s).", + "%s is renamed.": "%s est renommé.", + "This is a readonly storage.": "C'est un stockage en lecture seule.", + "%s is created.": "%s est créé.", + "Files moved.": "Fichiers déplacés.", + "Files deleted.": "Fichiers supprimés.", + "The file unarchived.": "Le fichier désarchivé.", + "The file(s) archived.": "Le(s) fichier(s) archivé(s).", + "Updated.": "Mis à jour.", + "No search result found.": "Aucun résultat de recherche trouvé.", + "Are you sure you want to move these files?": "Êtes-vous sûr de vouloir déplacer ces fichiers?", + "File Size": "Taille du fichier", + "Last Modified": "Dernière modification", + "Drag&Drop: on": "Drag&Drop: on", + "Drag&Drop: off": "Drag&Drop: off", + "Select Folders": "Sélectionner des dossiers", + "Clear all": "Tout effacer", + "Clear only successful": "Effacer uniquement les réussites", + "Drag and drop the files/folders to here or click here.": "Faites glisser les fichiers/dossiers ici ou cliquez ici.", + "Release to drop these files.": "Relâchez pour déposer ces fichiers.", + Canceled: "Annulé", + Done: "Terminé", + "Network Error, Unable establish connection to the server or interrupted.": "Erreur réseau, impossible d'établir une connexion avec le serveur ou interrompue.", + "Pending upload": "Téléchargement en attente", + "Please select file to upload first.": "Veuillez d'abord sélectionner le fichier à télécharger.", + "About %s": "À propos de %s", + Settings: "Paramètres", + "Use Metric Units": "Utiliser les unités métriques", + "Saved.": "Enregistré.", + "Clear Local Storage": "Effacer le stockage local", + uppy: i +}; +export { + s as default +}; diff --git a/dist/style.css b/dist/style.css index a10414a3..8610c6da 100644 --- a/dist/style.css +++ b/dist/style.css @@ -1 +1 @@ -.vuefinder *,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}.vuefinder :before,:after{--tw-content: ""}.vuefinder hr{height:0;color:inherit;border-top-width:1px}.vuefinder abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.vuefinder h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}.vuefinder a{color:inherit;text-decoration:inherit}.vuefinder b,strong{font-weight:bolder}.vuefinder code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}.vuefinder small{font-size:80%}.vuefinder sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.vuefinder sub{bottom:-.25em}.vuefinder sup{top:-.5em}.vuefinder table{text-indent:0;border-color:inherit;border-collapse:collapse}.vuefinder button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}.vuefinder button,select{text-transform:none}.vuefinder button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}.vuefinder :-moz-focusring{outline:auto}.vuefinder :-moz-ui-invalid{box-shadow:none}.vuefinder progress{vertical-align:baseline}.vuefinder ::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}.vuefinder [type=search]{-webkit-appearance:textfield;outline-offset:-2px}.vuefinder ::-webkit-search-decoration{-webkit-appearance:none}.vuefinder ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}.vuefinder summary{display:list-item}.vuefinder blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}.vuefinder fieldset{margin:0;padding:0}.vuefinder legend{padding:0}.vuefinder ol,ul,menu{list-style:none;margin:0;padding:0}.vuefinder dialog{padding:0}.vuefinder textarea{resize:vertical}.vuefinder input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}.vuefinder input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}.vuefinder button,[role=button]{cursor:pointer}.vuefinder :disabled{cursor:default}.vuefinder img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}.vuefinder img,video{max-width:100%;height:auto}.vuefinder [hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.vuefinder{position:relative}.vuefinder *{touch-action:manipulation}.vuefinder :is(.vf-btn){margin-top:.125rem;display:inline-flex;width:100%;justify-content:center;border-radius:.375rem;border-width:1px;padding:.5rem 1rem;font-size:1rem;line-height:1.5rem;font-weight:500;letter-spacing:.025em;--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.vuefinder :is(.vf-btn:focus){outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-offset-width: 2px}@media (min-width: 640px){.vuefinder :is(.vf-btn){margin-left:.25rem;margin-right:.25rem;width:auto;font-size:.875rem;line-height:1.25rem}}.vuefinder :is(.vf-btn-primary){border-color:transparent;--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.vuefinder :is(.vf-btn-primary:hover){--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity))}.vuefinder :is(.vf-btn-primary:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.vuefinder :is(.dark .vf-btn-primary){--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(249 250 251 / var(--tw-text-opacity))}.vuefinder :is(.dark .vf-btn-primary:hover){--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.vuefinder :is(.vf-btn-secondary){--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.vuefinder :is(.vf-btn-secondary:hover){--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.vuefinder :is(.vf-btn-secondary:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity))}.vuefinder :is(.dark .vf-btn-secondary){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.vuefinder :is(.dark .vf-btn-secondary:hover){--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.vuefinder :is(.vf-btn-danger){border-color:transparent;--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.vuefinder :is(.vf-btn-danger:hover){--tw-bg-opacity: 1;background-color:rgb(185 28 28 / var(--tw-bg-opacity))}.vuefinder :is(.vf-btn-danger:focus){--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity: 1;--tw-ring-color: rgb(254 202 202 / var(--tw-ring-opacity));--tw-ring-offset-width: 1px}.vuefinder :is(.dark .vf-btn-danger){--tw-border-opacity: 1;border-color:rgb(153 27 27 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(185 28 28 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(249 250 251 / var(--tw-text-opacity))}.vuefinder :is(.dark .vf-btn-danger:hover){--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.vuefinder :is(.disabled){cursor:not-allowed;opacity:.5}.vf-explorer-selected{border-width:1px!important;--tw-border-opacity: 1 !important;border-color:rgb(212 212 212 / var(--tw-border-opacity))!important;--tw-bg-opacity: 1 !important;background-color:rgb(245 245 245 / var(--tw-bg-opacity))!important}:is(.dark .vf-explorer-selected){border-color:rgb(17 24 39 / var(--tw-border-opacity))!important;--tw-border-opacity: 1 !important;border-color:rgb(30 41 59 / var(--tw-border-opacity))!important;--tw-bg-opacity: 1 !important;background-color:rgb(51 65 85 / var(--tw-bg-opacity))!important}.vf-explorer-selector{border-width:1px!important;--tw-border-opacity: 1 !important;border-color:rgb(100 116 139 / var(--tw-border-opacity))!important;--tw-bg-opacity: 1 !important;background-color:rgb(203 213 225 / var(--tw-bg-opacity))!important;opacity:.5!important}.vuefinder.dark{color-scheme:dark}.vf-scrollbar::-webkit-scrollbar{width:12px}.vf-scrollbar::-webkit-scrollbar-track-piece{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}:is(.dark .vf-scrollbar)::-webkit-scrollbar-track-piece{background-color:#0f172a80}.vf-scrollbar::-webkit-scrollbar-thumb{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}:is(.dark .vf-scrollbar)::-webkit-scrollbar-thumb{--tw-bg-opacity: 1;background-color:rgb(51 65 85 / var(--tw-bg-opacity))}.vf-scrollbar::-webkit-scrollbar-thumb:hover{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}:is(.dark .vf-scrollbar)::-webkit-scrollbar-thumb:hover{--tw-bg-opacity: 1;background-color:rgb(71 85 105 / var(--tw-bg-opacity))}.vf-scrollbar::-webkit-scrollbar-corner{background-color:transparent}.vuefinder :is(.pointer-events-none){pointer-events:none}.vuefinder :is(.fixed){position:fixed}.vuefinder :is(.absolute){position:absolute}.vuefinder :is(.relative){position:relative}.vuefinder :is(.inset-0){top:0;right:0;bottom:0;left:0}.vuefinder :is(.-top-96){top:-24rem}.vuefinder :is(.bottom-0){bottom:0}.vuefinder :is(.left-1\/2){left:50%}.vuefinder :is(.right-\[-2rem\]){right:-2rem}.vuefinder :is(.top-1\/2){top:50%}.vuefinder :is(.top-4){top:1rem}.vuefinder :is(.-z-50){z-index:-50}.vuefinder :is(.z-0){z-index:0}.vuefinder :is(.z-10){z-index:10}.vuefinder :is(.z-20){z-index:20}.vuefinder :is(.z-30){z-index:30}.vuefinder :is(.col-span-2){grid-column:span 2 / span 2}.vuefinder :is(.col-span-3){grid-column:span 3 / span 3}.vuefinder :is(.col-span-5){grid-column:span 5 / span 5}.vuefinder :is(.col-span-7){grid-column:span 7 / span 7}.vuefinder :is(.m-1){margin:.25rem}.vuefinder :is(.m-auto){margin:auto}.vuefinder :is(.mx-0){margin-left:0;margin-right:0}.vuefinder :is(.mx-0\.5){margin-left:.125rem;margin-right:.125rem}.vuefinder :is(.mx-1){margin-left:.25rem;margin-right:.25rem}.vuefinder :is(.mx-1\.5){margin-left:.375rem;margin-right:.375rem}.vuefinder :is(.mx-2){margin-left:.5rem;margin-right:.5rem}.vuefinder :is(.mx-auto){margin-left:auto;margin-right:auto}.vuefinder :is(.my-0){margin-top:0;margin-bottom:0}.vuefinder :is(.my-0\.5){margin-top:.125rem;margin-bottom:.125rem}.vuefinder :is(.my-1){margin-top:.25rem;margin-bottom:.25rem}.vuefinder :is(.-ml-1){margin-left:-.25rem}.vuefinder :is(.mb-1){margin-bottom:.25rem}.vuefinder :is(.mb-2){margin-bottom:.5rem}.vuefinder :is(.mb-4){margin-bottom:1rem}.vuefinder :is(.ml-1){margin-left:.25rem}.vuefinder :is(.ml-1\.5){margin-left:.375rem}.vuefinder :is(.ml-2){margin-left:.5rem}.vuefinder :is(.ml-3){margin-left:.75rem}.vuefinder :is(.ml-auto){margin-left:auto}.vuefinder :is(.mr-1){margin-right:.25rem}.vuefinder :is(.mr-3){margin-right:.75rem}.vuefinder :is(.ms-3){margin-inline-start:.75rem}.vuefinder :is(.mt-2){margin-top:.5rem}.vuefinder :is(.mt-3){margin-top:.75rem}.vuefinder :is(.mt-5){margin-top:1.25rem}.vuefinder :is(.block){display:block}.vuefinder :is(.inline-block){display:inline-block}.vuefinder :is(.flex){display:flex}.vuefinder :is(.inline-flex){display:inline-flex}.vuefinder :is(.grid){display:grid}.vuefinder :is(.\!hidden){display:none!important}.vuefinder :is(.hidden){display:none}.vuefinder :is(.h-10){height:2.5rem}.vuefinder :is(.h-12){height:3rem}.vuefinder :is(.h-20){height:5rem}.vuefinder :is(.h-4){height:1rem}.vuefinder :is(.h-5){height:1.25rem}.vuefinder :is(.h-6){height:1.5rem}.vuefinder :is(.h-\[120px\]){height:120px}.vuefinder :is(.h-\[60vh\]){height:60vh}.vuefinder :is(.h-fit){height:-moz-fit-content;height:fit-content}.vuefinder :is(.h-full){height:100%}.vuefinder :is(.max-h-\[200px\]){max-height:200px}.vuefinder :is(.max-h-\[50vh\]){max-height:50vh}.vuefinder :is(.max-h-\[60vh\]){max-height:60vh}.vuefinder :is(.min-h-\[150px\]){min-height:150px}.vuefinder :is(.min-h-\[200px\]){min-height:200px}.vuefinder :is(.min-h-full){min-height:100%}.vuefinder :is(.w-10){width:2.5rem}.vuefinder :is(.w-12){width:3rem}.vuefinder :is(.w-4){width:1rem}.vuefinder :is(.w-5){width:1.25rem}.vuefinder :is(.w-6){width:1.5rem}.vuefinder :is(.w-\[120px\]){width:120px}.vuefinder :is(.w-\[5\.5rem\]){width:5.5rem}.vuefinder :is(.w-full){width:100%}.vuefinder :is(.w-screen){width:100vw}.vuefinder :is(.min-w-max){min-width:-moz-max-content;min-width:max-content}.vuefinder :is(.min-w-min){min-width:-moz-min-content;min-width:min-content}.vuefinder :is(.max-w-\[50vh\]){max-width:50vh}.vuefinder :is(.max-w-fit){max-width:-moz-fit-content;max-width:fit-content}.vuefinder :is(.flex-1){flex:1 1 0%}.vuefinder :is(.flex-auto){flex:1 1 auto}.vuefinder :is(.flex-shrink-0){flex-shrink:0}.vuefinder :is(.-translate-x-1\/2){--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.vuefinder :is(.transform){transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.vuefinder :is(.animate-spin){animation:spin 1s linear infinite}.vuefinder :is(.cursor-default){cursor:default}.vuefinder :is(.cursor-pointer){cursor:pointer}.vuefinder :is(.select-none){-webkit-user-select:none;-moz-user-select:none;user-select:none}.vuefinder :is(.resize-y){resize:vertical}.vuefinder :is(.grid-cols-1){grid-template-columns:repeat(1,minmax(0,1fr))}.vuefinder :is(.grid-cols-12){grid-template-columns:repeat(12,minmax(0,1fr))}.vuefinder :is(.flex-col){flex-direction:column}.vuefinder :is(.items-end){align-items:flex-end}.vuefinder :is(.items-center){align-items:center}.vuefinder :is(.justify-end){justify-content:flex-end}.vuefinder :is(.justify-center){justify-content:center}.vuefinder :is(.justify-between){justify-content:space-between}.vuefinder :is(.gap-x-3){-moz-column-gap:.75rem;column-gap:.75rem}.vuefinder :is(.space-y-2>:not([hidden])~:not([hidden])){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.vuefinder :is(.overflow-auto){overflow:auto}.vuefinder :is(.overflow-hidden){overflow:hidden}.vuefinder :is(.overflow-y-auto){overflow-y:auto}.vuefinder :is(.overflow-ellipsis){text-overflow:ellipsis}.vuefinder :is(.whitespace-nowrap){white-space:nowrap}.vuefinder :is(.whitespace-pre-wrap){white-space:pre-wrap}.vuefinder :is(.break-all){word-break:break-all}.vuefinder :is(.rounded){border-radius:.25rem}.vuefinder :is(.rounded-full){border-radius:9999px}.vuefinder :is(.rounded-lg){border-radius:.5rem}.vuefinder :is(.rounded-md){border-radius:.375rem}.vuefinder :is(.border){border-width:1px}.vuefinder :is(.border-0){border-width:0px}.vuefinder :is(.border-2){border-width:2px}.vuefinder :is(.border-b){border-bottom-width:1px}.vuefinder :is(.border-l){border-left-width:1px}.vuefinder :is(.border-r){border-right-width:1px}.vuefinder :is(.border-t){border-top-width:1px}.vuefinder :is(.border-dashed){border-style:dashed}.vuefinder :is(.border-gray-200){--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.vuefinder :is(.border-gray-300){--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.vuefinder :is(.border-lime-600){--tw-border-opacity: 1;border-color:rgb(101 163 13 / var(--tw-border-opacity))}.vuefinder :is(.border-neutral-300){--tw-border-opacity: 1;border-color:rgb(212 212 212 / var(--tw-border-opacity))}.vuefinder :is(.border-red-400){--tw-border-opacity: 1;border-color:rgb(248 113 113 / var(--tw-border-opacity))}.vuefinder :is(.border-transparent){border-color:transparent}.vuefinder :is(.bg-blue-200){--tw-bg-opacity: 1;background-color:rgb(191 219 254 / var(--tw-bg-opacity))}.vuefinder :is(.bg-blue-50){--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity))}.vuefinder :is(.bg-blue-600){--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.vuefinder :is(.bg-blue-700\/75){background-color:#1d4ed8bf}.vuefinder :is(.bg-emerald-100){--tw-bg-opacity: 1;background-color:rgb(209 250 229 / var(--tw-bg-opacity))}.vuefinder :is(.bg-gray-100){--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.vuefinder :is(.bg-gray-200){--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.vuefinder :is(.bg-gray-50){--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.vuefinder :is(.bg-gray-500){--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.vuefinder :is(.bg-neutral-100){--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity))}.vuefinder :is(.bg-neutral-50){--tw-bg-opacity: 1;background-color:rgb(250 250 250 / var(--tw-bg-opacity))}.vuefinder :is(.bg-red-100){--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity))}.vuefinder :is(.bg-transparent){background-color:transparent}.vuefinder :is(.bg-white){--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.vuefinder :is(.bg-opacity-75){--tw-bg-opacity: .75}.vuefinder :is(.fill-gray-100){fill:#f3f4f6}.vuefinder :is(.fill-sky-100){fill:#e0f2fe}.vuefinder :is(.fill-sky-500){fill:#0ea5e9}.vuefinder :is(.fill-white){fill:#fff}.vuefinder :is(.stroke-blue-600){stroke:#2563eb}.vuefinder :is(.stroke-blue-900){stroke:#1e3a8a}.vuefinder :is(.stroke-gray-200){stroke:#e5e7eb}.vuefinder :is(.stroke-gray-400){stroke:#9ca3af}.vuefinder :is(.stroke-gray-500){stroke:#6b7280}.vuefinder :is(.stroke-neutral-500){stroke:#737373}.vuefinder :is(.stroke-red-600){stroke:#dc2626}.vuefinder :is(.stroke-sky-500){stroke:#0ea5e9}.vuefinder :is(.stroke-slate-500){stroke:#64748b}.vuefinder :is(.p-0){padding:0}.vuefinder :is(.p-0\.5){padding:.125rem}.vuefinder :is(.p-1){padding:.25rem}.vuefinder :is(.p-1\.5){padding:.375rem}.vuefinder :is(.p-2){padding:.5rem}.vuefinder :is(.p-4){padding:1rem}.vuefinder :is(.px-1){padding-left:.25rem;padding-right:.25rem}.vuefinder :is(.px-1\.5){padding-left:.375rem;padding-right:.375rem}.vuefinder :is(.px-2){padding-left:.5rem;padding-right:.5rem}.vuefinder :is(.px-4){padding-left:1rem;padding-right:1rem}.vuefinder :is(.py-0){padding-top:0;padding-bottom:0}.vuefinder :is(.py-0\.5){padding-top:.125rem;padding-bottom:.125rem}.vuefinder :is(.py-1){padding-top:.25rem;padding-bottom:.25rem}.vuefinder :is(.py-1\.5){padding-top:.375rem;padding-bottom:.375rem}.vuefinder :is(.py-2){padding-top:.5rem;padding-bottom:.5rem}.vuefinder :is(.py-3){padding-top:.75rem;padding-bottom:.75rem}.vuefinder :is(.pb-0){padding-bottom:0}.vuefinder :is(.pb-1){padding-bottom:.25rem}.vuefinder :is(.pb-4){padding-bottom:1rem}.vuefinder :is(.pl-1){padding-left:.25rem}.vuefinder :is(.pl-2){padding-left:.5rem}.vuefinder :is(.pr-1){padding-right:.25rem}.vuefinder :is(.pr-8){padding-right:2rem}.vuefinder :is(.pt-1){padding-top:.25rem}.vuefinder :is(.pt-3){padding-top:.75rem}.vuefinder :is(.pt-5){padding-top:1.25rem}.vuefinder :is(.text-left){text-align:left}.vuefinder :is(.text-center){text-align:center}.vuefinder :is(.text-base){font-size:1rem;line-height:1.5rem}.vuefinder :is(.text-lg){font-size:1.125rem;line-height:1.75rem}.vuefinder :is(.text-sm){font-size:.875rem;line-height:1.25rem}.vuefinder :is(.text-xs){font-size:.75rem;line-height:1rem}.vuefinder :is(.font-bold){font-weight:700}.vuefinder :is(.font-medium){font-weight:500}.vuefinder :is(.font-normal){font-weight:400}.vuefinder :is(.font-semibold){font-weight:600}.vuefinder :is(.leading-5){line-height:1.25rem}.vuefinder :is(.leading-6){line-height:1.5rem}.vuefinder :is(.leading-none){line-height:1}.vuefinder :is(.tracking-wider){letter-spacing:.05em}.vuefinder :is(.text-blue-500){--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.vuefinder :is(.text-emerald-600){--tw-text-opacity: 1;color:rgb(5 150 105 / var(--tw-text-opacity))}.vuefinder :is(.text-gray-400){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.vuefinder :is(.text-gray-500){--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.vuefinder :is(.text-gray-600){--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.vuefinder :is(.text-gray-700){--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.vuefinder :is(.text-gray-800){--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.vuefinder :is(.text-gray-900){--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.vuefinder :is(.text-green-600){--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.vuefinder :is(.text-indigo-600){--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity))}.vuefinder :is(.text-lime-600){--tw-text-opacity: 1;color:rgb(101 163 13 / var(--tw-text-opacity))}.vuefinder :is(.text-neutral-300){--tw-text-opacity: 1;color:rgb(212 212 212 / var(--tw-text-opacity))}.vuefinder :is(.text-neutral-500){--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity))}.vuefinder :is(.text-neutral-700){--tw-text-opacity: 1;color:rgb(64 64 64 / var(--tw-text-opacity))}.vuefinder :is(.text-red-400){--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}.vuefinder :is(.text-red-500){--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.vuefinder :is(.text-red-600){--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.vuefinder :is(.text-slate-500){--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity))}.vuefinder :is(.text-slate-700){--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity))}.vuefinder :is(.text-white){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.vuefinder :is(.text-opacity-50){--tw-text-opacity: .5}.vuefinder :is(.opacity-0){opacity:0}.vuefinder :is(.opacity-25){opacity:.25}.vuefinder :is(.opacity-75){opacity:.75}.vuefinder :is(.shadow){--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.vuefinder :is(.shadow-sm){--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.vuefinder :is(.shadow-xl){--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.vuefinder :is(.outline-0){outline-width:0px}.vuefinder :is(.ring-0){--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.vuefinder :is(.filter){filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.vuefinder :is(.transition-\[width\]){transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.vuefinder :is(.transition-all){transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.vuefinder :is(.transition-opacity){transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.vuefinder :is(.delay-200){transition-delay:.2s}.vuefinder :is(.duration-1000){transition-duration:1s}.vuefinder :is(.duration-300){transition-duration:.3s}.vuefinder :is(.duration-500){transition-duration:.5s}.vuefinder :is(.ease-out){transition-timing-function:cubic-bezier(0,0,.2,1)}.vuefinder :is(.hover\:w-full:hover){width:100%}.vuefinder :is(.hover\:bg-blue-200:hover){--tw-bg-opacity: 1;background-color:rgb(191 219 254 / var(--tw-bg-opacity))}.vuefinder :is(.hover\:bg-blue-700:hover){--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity))}.vuefinder :is(.hover\:bg-gray-100:hover){--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.vuefinder :is(.hover\:bg-neutral-100:hover){--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity))}.vuefinder :is(.hover\:bg-neutral-200:hover){--tw-bg-opacity: 1;background-color:rgb(229 229 229 / var(--tw-bg-opacity))}.vuefinder :is(.hover\:bg-neutral-300:hover){--tw-bg-opacity: 1;background-color:rgb(212 212 212 / var(--tw-bg-opacity))}.vuefinder :is(.hover\:bg-neutral-50:hover){--tw-bg-opacity: 1;background-color:rgb(250 250 250 / var(--tw-bg-opacity))}.vuefinder :is(.hover\:stroke-cyan-700:hover){stroke:#0e7490}.vuefinder :is(.hover\:stroke-sky-600:hover){stroke:#0284c7}.vuefinder :is(.hover\:text-red-600:hover){--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.vuefinder :is(.focus\:border-transparent:focus){border-color:transparent}.vuefinder :is(.focus\:outline-none:focus){outline:2px solid transparent;outline-offset:2px}.vuefinder :is(.focus\:ring-indigo-600:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(79 70 229 / var(--tw-ring-opacity))}.vuefinder :is(.focus\:ring-transparent:focus){--tw-ring-color: transparent}.vuefinder :is(.disabled\:bg-gray-100:disabled){--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.vuefinder :is(.dark .dark\:border-t){border-top-width:1px}.vuefinder :is(.dark .dark\:border-gray-200){--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.vuefinder :is(.dark .dark\:border-gray-600){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.vuefinder :is(.dark .dark\:border-gray-700){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.vuefinder :is(.dark .dark\:border-gray-700\/50){border-color:#37415180}.vuefinder :is(.dark .dark\:border-gray-900){--tw-border-opacity: 1;border-color:rgb(17 24 39 / var(--tw-border-opacity))}.vuefinder :is(.dark .dark\:border-red-300){--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity))}.vuefinder :is(.dark .dark\:bg-emerald-950){--tw-bg-opacity: 1;background-color:rgb(2 44 34 / var(--tw-bg-opacity))}.vuefinder :is(.dark .dark\:bg-gray-500){--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.vuefinder :is(.dark .dark\:bg-gray-600){--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.vuefinder :is(.dark .dark\:bg-gray-700){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.vuefinder :is(.dark .dark\:bg-gray-700\/25){background-color:#37415140}.vuefinder :is(.dark .dark\:bg-gray-700\/50){background-color:#37415180}.vuefinder :is(.dark .dark\:bg-gray-800){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.vuefinder :is(.dark .dark\:bg-red-950){--tw-bg-opacity: 1;background-color:rgb(69 10 10 / var(--tw-bg-opacity))}.vuefinder :is(.dark .dark\:bg-opacity-75){--tw-bg-opacity: .75}.vuefinder :is(.dark .dark\:fill-gray-400\/20){fill:#9ca3af33}.vuefinder :is(.dark .dark\:fill-gray-700){fill:#374151}.vuefinder :is(.dark .dark\:fill-slate-500){fill:#64748b}.vuefinder :is(.dark .dark\:stroke-blue-100){stroke:#dbeafe}.vuefinder :is(.dark .dark\:stroke-gray-400){stroke:#9ca3af}.vuefinder :is(.dark .dark\:stroke-gray-600){stroke:#4b5563}.vuefinder :is(.dark .dark\:stroke-gray-700){stroke:#374151}.vuefinder :is(.dark .dark\:stroke-red-200){stroke:#fecaca}.vuefinder :is(.dark .dark\:stroke-slate-500){stroke:#64748b}.vuefinder :is(.dark .dark\:text-gray-100){--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity))}.vuefinder :is(.dark .dark\:text-gray-200){--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.vuefinder :is(.dark .dark\:text-gray-300){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.vuefinder :is(.dark .dark\:text-gray-400){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.vuefinder :is(.dark .dark\:text-gray-50){--tw-text-opacity: 1;color:rgb(249 250 251 / var(--tw-text-opacity))}.vuefinder :is(.dark .dark\:text-gray-500){--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.vuefinder :is(.dark .dark\:text-gray-600){--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.vuefinder :is(.dark .dark\:text-green-600){--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.vuefinder :is(.dark .dark\:text-lime-300){--tw-text-opacity: 1;color:rgb(190 242 100 / var(--tw-text-opacity))}.vuefinder :is(.dark .dark\:text-neutral-200){--tw-text-opacity: 1;color:rgb(229 229 229 / var(--tw-text-opacity))}.vuefinder :is(.dark .dark\:text-neutral-300){--tw-text-opacity: 1;color:rgb(212 212 212 / var(--tw-text-opacity))}.vuefinder :is(.dark .dark\:text-neutral-400){--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity))}.vuefinder :is(.dark .dark\:text-neutral-50){--tw-text-opacity: 1;color:rgb(250 250 250 / var(--tw-text-opacity))}.vuefinder :is(.dark .dark\:text-neutral-500){--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity))}.vuefinder :is(.dark .dark\:text-red-200){--tw-text-opacity: 1;color:rgb(254 202 202 / var(--tw-text-opacity))}.vuefinder :is(.dark .dark\:text-red-300){--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity))}.vuefinder :is(.dark .dark\:text-slate-200){--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity))}.vuefinder :is(.dark .dark\:accent-slate-400){accent-color:#94a3b8}.vuefinder :is(.dark .dark\:opacity-75){opacity:.75}.vuefinder :is(.dark .dark\:selection\:bg-gray-500 *)::-moz-selection{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.vuefinder :is(.dark .dark\:selection\:bg-gray-500 *)::selection{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.vuefinder :is(.dark .dark\:selection\:bg-gray-500)::-moz-selection{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.vuefinder :is(.dark .dark\:selection\:bg-gray-500)::selection{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.vuefinder :is(.dark .dark\:hover\:bg-gray-500:hover){--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.vuefinder :is(.dark .dark\:hover\:bg-gray-700:hover){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.vuefinder :is(.dark .dark\:hover\:bg-gray-700\/10:hover){background-color:#3741511a}.vuefinder :is(.dark .dark\:hover\:bg-gray-700\/50:hover){background-color:#37415180}.vuefinder :is(.dark .dark\:hover\:bg-gray-800:hover){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.vuefinder :is(.dark .dark\:hover\:stroke-gray-300:hover){stroke:#d1d5db}.vuefinder :is(.dark .dark\:hover\:text-gray-200:hover){--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.vuefinder :is(.dark .dark\:hover\:text-gray-300:hover){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.vuefinder :is(.dark .dark\:focus\:border-gray-600:focus){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.vuefinder :is(.dark .dark\:focus\:border-transparent:focus){border-color:transparent}.vuefinder :is(.dark .dark\:focus\:ring-gray-600:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(75 85 99 / var(--tw-ring-opacity))}.vuefinder :is(.dark .dark\:focus\:ring-transparent:focus){--tw-ring-color: transparent}@media (min-width: 640px){.vuefinder :is(.sm\:mx-0){margin-left:0;margin-right:0}.vuefinder :is(.sm\:my-8){margin-top:2rem;margin-bottom:2rem}.vuefinder :is(.sm\:ml-3){margin-left:.75rem}.vuefinder :is(.sm\:ml-4){margin-left:1rem}.vuefinder :is(.sm\:mt-0){margin-top:0}.vuefinder :is(.sm\:flex){display:flex}.vuefinder :is(.sm\:h-10){height:2.5rem}.vuefinder :is(.sm\:w-10){width:2.5rem}.vuefinder :is(.sm\:w-auto){width:auto}.vuefinder :is(.sm\:max-w-4xl){max-width:56rem}.vuefinder :is(.sm\:flex-row-reverse){flex-direction:row-reverse}.vuefinder :is(.sm\:items-start){align-items:flex-start}.vuefinder :is(.sm\:items-center){align-items:center}.vuefinder :is(.sm\:p-0){padding:0}.vuefinder :is(.sm\:p-6){padding:1.5rem}.vuefinder :is(.sm\:px-6){padding-left:1.5rem;padding-right:1.5rem}.vuefinder :is(.sm\:pb-4){padding-bottom:1rem}.vuefinder :is(.sm\:text-left){text-align:left}.vuefinder :is(.sm\:text-sm){font-size:.875rem;line-height:1.25rem}.vuefinder :is(.sm\:text-xs){font-size:.75rem;line-height:1rem}}@media (min-width: 768px){.vuefinder :is(.md\:right-\[-2\.4rem\]){right:-2.4rem}.vuefinder :is(.md\:top-5){top:1.25rem}.vuefinder :is(.md\:block){display:block}.vuefinder :is(.md\:hidden){display:none}.vuefinder :is(.md\:h-12){height:3rem}.vuefinder :is(.md\:h-8){height:2rem}.vuefinder :is(.md\:w-12){width:3rem}.vuefinder :is(.md\:w-24){width:6rem}.vuefinder :is(.md\:w-8){width:2rem}.vuefinder :is(.md\:max-w-2xl){max-width:42rem}}@media (min-width: 1024px){.vuefinder :is(.lg\:max-w-3xl){max-width:48rem}}@media (min-width: 1280px){.vuefinder :is(.xl\:max-w-5xl){max-width:64rem}} +.vuefinder *,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}.vuefinder :before,:after{--tw-content: ""}.vuefinder hr{height:0;color:inherit;border-top-width:1px}.vuefinder abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.vuefinder h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}.vuefinder a{color:inherit;text-decoration:inherit}.vuefinder b,strong{font-weight:bolder}.vuefinder code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}.vuefinder small{font-size:80%}.vuefinder sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.vuefinder sub{bottom:-.25em}.vuefinder sup{top:-.5em}.vuefinder table{text-indent:0;border-color:inherit;border-collapse:collapse}.vuefinder button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}.vuefinder button,select{text-transform:none}.vuefinder button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}.vuefinder :-moz-focusring{outline:auto}.vuefinder :-moz-ui-invalid{box-shadow:none}.vuefinder progress{vertical-align:baseline}.vuefinder ::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}.vuefinder [type=search]{-webkit-appearance:textfield;outline-offset:-2px}.vuefinder ::-webkit-search-decoration{-webkit-appearance:none}.vuefinder ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}.vuefinder summary{display:list-item}.vuefinder blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}.vuefinder fieldset{margin:0;padding:0}.vuefinder legend{padding:0}.vuefinder ol,ul,menu{list-style:none;margin:0;padding:0}.vuefinder dialog{padding:0}.vuefinder textarea{resize:vertical}.vuefinder input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}.vuefinder input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}.vuefinder button,[role=button]{cursor:pointer}.vuefinder :disabled{cursor:default}.vuefinder img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}.vuefinder img,video{max-width:100%;height:auto}.vuefinder [hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.vuefinder{position:relative}.vuefinder *{touch-action:manipulation}.vuefinder :is(.vf-btn){margin-top:.125rem;display:inline-flex;width:100%;justify-content:center;border-radius:.375rem;border-width:1px;padding:.5rem 1rem;font-size:1rem;line-height:1.5rem;font-weight:500;letter-spacing:.025em;--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.vuefinder :is(.vf-btn:focus){outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-offset-width: 2px}@media (min-width: 640px){.vuefinder :is(.vf-btn){margin-left:.25rem;margin-right:.25rem;width:auto;font-size:.875rem;line-height:1.25rem}}.vuefinder :is(.vf-btn-primary){border-color:transparent;--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.vuefinder :is(.vf-btn-primary:hover){--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity))}.vuefinder :is(.vf-btn-primary:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.vuefinder :is(.dark .vf-btn-primary){--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(249 250 251 / var(--tw-text-opacity))}.vuefinder :is(.dark .vf-btn-primary:hover){--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.vuefinder :is(.vf-btn-secondary){--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.vuefinder :is(.vf-btn-secondary:hover){--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.vuefinder :is(.vf-btn-secondary:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity))}.vuefinder :is(.dark .vf-btn-secondary){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.vuefinder :is(.dark .vf-btn-secondary:hover){--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.vuefinder :is(.vf-btn-danger){border-color:transparent;--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.vuefinder :is(.vf-btn-danger:hover){--tw-bg-opacity: 1;background-color:rgb(185 28 28 / var(--tw-bg-opacity))}.vuefinder :is(.vf-btn-danger:focus){--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity: 1;--tw-ring-color: rgb(254 202 202 / var(--tw-ring-opacity));--tw-ring-offset-width: 1px}.vuefinder :is(.dark .vf-btn-danger){--tw-border-opacity: 1;border-color:rgb(153 27 27 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(185 28 28 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(249 250 251 / var(--tw-text-opacity))}.vuefinder :is(.dark .vf-btn-danger:hover){--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.vuefinder :is(.disabled){cursor:not-allowed;opacity:.5}.vf-explorer-selected{border-width:1px!important;--tw-border-opacity: 1 !important;border-color:rgb(212 212 212 / var(--tw-border-opacity))!important;--tw-bg-opacity: 1 !important;background-color:rgb(245 245 245 / var(--tw-bg-opacity))!important}:is(.dark .vf-explorer-selected){border-color:rgb(17 24 39 / var(--tw-border-opacity))!important;--tw-border-opacity: 1 !important;border-color:rgb(30 41 59 / var(--tw-border-opacity))!important;--tw-bg-opacity: 1 !important;background-color:rgb(51 65 85 / var(--tw-bg-opacity))!important}.vf-explorer-selector{border-width:1px!important;--tw-border-opacity: 1 !important;border-color:rgb(100 116 139 / var(--tw-border-opacity))!important;--tw-bg-opacity: 1 !important;background-color:rgb(203 213 225 / var(--tw-bg-opacity))!important;opacity:.5!important}.vuefinder.dark{color-scheme:dark}.vf-scrollbar::-webkit-scrollbar{width:12px}.vf-scrollbar::-webkit-scrollbar-track-piece{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}:is(.dark .vf-scrollbar)::-webkit-scrollbar-track-piece{background-color:#0f172a80}.vf-scrollbar::-webkit-scrollbar-thumb{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}:is(.dark .vf-scrollbar)::-webkit-scrollbar-thumb{--tw-bg-opacity: 1;background-color:rgb(51 65 85 / var(--tw-bg-opacity))}.vf-scrollbar::-webkit-scrollbar-thumb:hover{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}:is(.dark .vf-scrollbar)::-webkit-scrollbar-thumb:hover{--tw-bg-opacity: 1;background-color:rgb(71 85 105 / var(--tw-bg-opacity))}.vf-scrollbar::-webkit-scrollbar-corner{background-color:transparent}.vuefinder .fade-enter-active,.vuefinder .fade-leave-active{transition:opacity .2s ease}.vuefinder .fade-enter-from,.vuefinder .fade-leave-to{opacity:0}.vuefinder :is(.pointer-events-none){pointer-events:none}.vuefinder :is(.fixed){position:fixed}.vuefinder :is(.absolute){position:absolute}.vuefinder :is(.relative){position:relative}.vuefinder :is(.inset-0){top:0;right:0;bottom:0;left:0}.vuefinder :is(.-top-96){top:-24rem}.vuefinder :is(.bottom-0){bottom:0}.vuefinder :is(.left-1\/2){left:50%}.vuefinder :is(.right-\[-2rem\]){right:-2rem}.vuefinder :is(.top-1\/2){top:50%}.vuefinder :is(.top-4){top:1rem}.vuefinder :is(.-z-50){z-index:-50}.vuefinder :is(.z-0){z-index:0}.vuefinder :is(.z-10){z-index:10}.vuefinder :is(.z-20){z-index:20}.vuefinder :is(.z-30){z-index:30}.vuefinder :is(.col-span-2){grid-column:span 2 / span 2}.vuefinder :is(.col-span-3){grid-column:span 3 / span 3}.vuefinder :is(.col-span-5){grid-column:span 5 / span 5}.vuefinder :is(.col-span-7){grid-column:span 7 / span 7}.vuefinder :is(.m-1){margin:.25rem}.vuefinder :is(.m-auto){margin:auto}.vuefinder :is(.mx-0){margin-left:0;margin-right:0}.vuefinder :is(.mx-0\.5){margin-left:.125rem;margin-right:.125rem}.vuefinder :is(.mx-1){margin-left:.25rem;margin-right:.25rem}.vuefinder :is(.mx-1\.5){margin-left:.375rem;margin-right:.375rem}.vuefinder :is(.mx-2){margin-left:.5rem;margin-right:.5rem}.vuefinder :is(.mx-auto){margin-left:auto;margin-right:auto}.vuefinder :is(.my-0){margin-top:0;margin-bottom:0}.vuefinder :is(.my-0\.5){margin-top:.125rem;margin-bottom:.125rem}.vuefinder :is(.my-1){margin-top:.25rem;margin-bottom:.25rem}.vuefinder :is(.-ml-1){margin-left:-.25rem}.vuefinder :is(.mb-1){margin-bottom:.25rem}.vuefinder :is(.mb-2){margin-bottom:.5rem}.vuefinder :is(.mb-4){margin-bottom:1rem}.vuefinder :is(.ml-1){margin-left:.25rem}.vuefinder :is(.ml-1\.5){margin-left:.375rem}.vuefinder :is(.ml-2){margin-left:.5rem}.vuefinder :is(.ml-3){margin-left:.75rem}.vuefinder :is(.ml-auto){margin-left:auto}.vuefinder :is(.mr-1){margin-right:.25rem}.vuefinder :is(.mr-3){margin-right:.75rem}.vuefinder :is(.ms-3){margin-inline-start:.75rem}.vuefinder :is(.mt-2){margin-top:.5rem}.vuefinder :is(.mt-3){margin-top:.75rem}.vuefinder :is(.mt-5){margin-top:1.25rem}.vuefinder :is(.block){display:block}.vuefinder :is(.inline-block){display:inline-block}.vuefinder :is(.flex){display:flex}.vuefinder :is(.inline-flex){display:inline-flex}.vuefinder :is(.grid){display:grid}.vuefinder :is(.\!hidden){display:none!important}.vuefinder :is(.hidden){display:none}.vuefinder :is(.h-10){height:2.5rem}.vuefinder :is(.h-12){height:3rem}.vuefinder :is(.h-20){height:5rem}.vuefinder :is(.h-4){height:1rem}.vuefinder :is(.h-5){height:1.25rem}.vuefinder :is(.h-6){height:1.5rem}.vuefinder :is(.h-\[120px\]){height:120px}.vuefinder :is(.h-\[60vh\]){height:60vh}.vuefinder :is(.h-fit){height:-moz-fit-content;height:fit-content}.vuefinder :is(.h-full){height:100%}.vuefinder :is(.max-h-\[200px\]){max-height:200px}.vuefinder :is(.max-h-\[50vh\]){max-height:50vh}.vuefinder :is(.max-h-\[60vh\]){max-height:60vh}.vuefinder :is(.min-h-\[150px\]){min-height:150px}.vuefinder :is(.min-h-\[200px\]){min-height:200px}.vuefinder :is(.min-h-full){min-height:100%}.vuefinder :is(.w-10){width:2.5rem}.vuefinder :is(.w-12){width:3rem}.vuefinder :is(.w-4){width:1rem}.vuefinder :is(.w-5){width:1.25rem}.vuefinder :is(.w-6){width:1.5rem}.vuefinder :is(.w-\[5\.5rem\]){width:5.5rem}.vuefinder :is(.w-full){width:100%}.vuefinder :is(.w-screen){width:100vw}.vuefinder :is(.min-w-max){min-width:-moz-max-content;min-width:max-content}.vuefinder :is(.min-w-min){min-width:-moz-min-content;min-width:min-content}.vuefinder :is(.max-w-\[50vh\]){max-width:50vh}.vuefinder :is(.max-w-fit){max-width:-moz-fit-content;max-width:fit-content}.vuefinder :is(.flex-1){flex:1 1 0%}.vuefinder :is(.flex-auto){flex:1 1 auto}.vuefinder :is(.flex-shrink-0){flex-shrink:0}.vuefinder :is(.-translate-x-1\/2){--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.vuefinder :is(.transform){transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.vuefinder :is(.animate-spin){animation:spin 1s linear infinite}.vuefinder :is(.cursor-default){cursor:default}.vuefinder :is(.cursor-pointer){cursor:pointer}.vuefinder :is(.select-none){-webkit-user-select:none;-moz-user-select:none;user-select:none}.vuefinder :is(.resize-y){resize:vertical}.vuefinder :is(.grid-cols-1){grid-template-columns:repeat(1,minmax(0,1fr))}.vuefinder :is(.grid-cols-12){grid-template-columns:repeat(12,minmax(0,1fr))}.vuefinder :is(.flex-col){flex-direction:column}.vuefinder :is(.items-end){align-items:flex-end}.vuefinder :is(.items-center){align-items:center}.vuefinder :is(.justify-end){justify-content:flex-end}.vuefinder :is(.justify-center){justify-content:center}.vuefinder :is(.justify-between){justify-content:space-between}.vuefinder :is(.gap-x-3){-moz-column-gap:.75rem;column-gap:.75rem}.vuefinder :is(.space-y-2>:not([hidden])~:not([hidden])){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.vuefinder :is(.overflow-auto){overflow:auto}.vuefinder :is(.overflow-hidden){overflow:hidden}.vuefinder :is(.overflow-y-auto){overflow-y:auto}.vuefinder :is(.overflow-ellipsis){text-overflow:ellipsis}.vuefinder :is(.whitespace-nowrap){white-space:nowrap}.vuefinder :is(.whitespace-pre-wrap){white-space:pre-wrap}.vuefinder :is(.break-all){word-break:break-all}.vuefinder :is(.rounded){border-radius:.25rem}.vuefinder :is(.rounded-full){border-radius:9999px}.vuefinder :is(.rounded-lg){border-radius:.5rem}.vuefinder :is(.rounded-md){border-radius:.375rem}.vuefinder :is(.border){border-width:1px}.vuefinder :is(.border-0){border-width:0px}.vuefinder :is(.border-2){border-width:2px}.vuefinder :is(.border-b){border-bottom-width:1px}.vuefinder :is(.border-l){border-left-width:1px}.vuefinder :is(.border-r){border-right-width:1px}.vuefinder :is(.border-t){border-top-width:1px}.vuefinder :is(.border-dashed){border-style:dashed}.vuefinder :is(.border-gray-200){--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.vuefinder :is(.border-gray-300){--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.vuefinder :is(.border-lime-600){--tw-border-opacity: 1;border-color:rgb(101 163 13 / var(--tw-border-opacity))}.vuefinder :is(.border-neutral-300){--tw-border-opacity: 1;border-color:rgb(212 212 212 / var(--tw-border-opacity))}.vuefinder :is(.border-red-400){--tw-border-opacity: 1;border-color:rgb(248 113 113 / var(--tw-border-opacity))}.vuefinder :is(.border-transparent){border-color:transparent}.vuefinder :is(.bg-blue-200){--tw-bg-opacity: 1;background-color:rgb(191 219 254 / var(--tw-bg-opacity))}.vuefinder :is(.bg-blue-50){--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity))}.vuefinder :is(.bg-blue-600){--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.vuefinder :is(.bg-blue-700\/75){background-color:#1d4ed8bf}.vuefinder :is(.bg-emerald-100){--tw-bg-opacity: 1;background-color:rgb(209 250 229 / var(--tw-bg-opacity))}.vuefinder :is(.bg-gray-100){--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.vuefinder :is(.bg-gray-200){--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.vuefinder :is(.bg-gray-50){--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.vuefinder :is(.bg-gray-500){--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.vuefinder :is(.bg-neutral-100){--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity))}.vuefinder :is(.bg-neutral-50){--tw-bg-opacity: 1;background-color:rgb(250 250 250 / var(--tw-bg-opacity))}.vuefinder :is(.bg-red-100){--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity))}.vuefinder :is(.bg-transparent){background-color:transparent}.vuefinder :is(.bg-white){--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.vuefinder :is(.bg-opacity-75){--tw-bg-opacity: .75}.vuefinder :is(.fill-gray-100){fill:#f3f4f6}.vuefinder :is(.fill-sky-100){fill:#e0f2fe}.vuefinder :is(.fill-sky-500){fill:#0ea5e9}.vuefinder :is(.fill-white){fill:#fff}.vuefinder :is(.stroke-blue-600){stroke:#2563eb}.vuefinder :is(.stroke-blue-900){stroke:#1e3a8a}.vuefinder :is(.stroke-gray-200){stroke:#e5e7eb}.vuefinder :is(.stroke-gray-400){stroke:#9ca3af}.vuefinder :is(.stroke-gray-500){stroke:#6b7280}.vuefinder :is(.stroke-neutral-500){stroke:#737373}.vuefinder :is(.stroke-red-600){stroke:#dc2626}.vuefinder :is(.stroke-sky-500){stroke:#0ea5e9}.vuefinder :is(.stroke-slate-500){stroke:#64748b}.vuefinder :is(.p-0){padding:0}.vuefinder :is(.p-0\.5){padding:.125rem}.vuefinder :is(.p-1){padding:.25rem}.vuefinder :is(.p-1\.5){padding:.375rem}.vuefinder :is(.p-2){padding:.5rem}.vuefinder :is(.p-4){padding:1rem}.vuefinder :is(.px-1){padding-left:.25rem;padding-right:.25rem}.vuefinder :is(.px-1\.5){padding-left:.375rem;padding-right:.375rem}.vuefinder :is(.px-2){padding-left:.5rem;padding-right:.5rem}.vuefinder :is(.px-4){padding-left:1rem;padding-right:1rem}.vuefinder :is(.py-0){padding-top:0;padding-bottom:0}.vuefinder :is(.py-0\.5){padding-top:.125rem;padding-bottom:.125rem}.vuefinder :is(.py-1){padding-top:.25rem;padding-bottom:.25rem}.vuefinder :is(.py-1\.5){padding-top:.375rem;padding-bottom:.375rem}.vuefinder :is(.py-2){padding-top:.5rem;padding-bottom:.5rem}.vuefinder :is(.py-3){padding-top:.75rem;padding-bottom:.75rem}.vuefinder :is(.pb-0){padding-bottom:0}.vuefinder :is(.pb-1){padding-bottom:.25rem}.vuefinder :is(.pb-4){padding-bottom:1rem}.vuefinder :is(.pl-1){padding-left:.25rem}.vuefinder :is(.pl-2){padding-left:.5rem}.vuefinder :is(.pr-1){padding-right:.25rem}.vuefinder :is(.pr-8){padding-right:2rem}.vuefinder :is(.pt-1){padding-top:.25rem}.vuefinder :is(.pt-3){padding-top:.75rem}.vuefinder :is(.pt-5){padding-top:1.25rem}.vuefinder :is(.text-left){text-align:left}.vuefinder :is(.text-center){text-align:center}.vuefinder :is(.text-base){font-size:1rem;line-height:1.5rem}.vuefinder :is(.text-lg){font-size:1.125rem;line-height:1.75rem}.vuefinder :is(.text-sm){font-size:.875rem;line-height:1.25rem}.vuefinder :is(.text-xs){font-size:.75rem;line-height:1rem}.vuefinder :is(.font-bold){font-weight:700}.vuefinder :is(.font-medium){font-weight:500}.vuefinder :is(.font-normal){font-weight:400}.vuefinder :is(.font-semibold){font-weight:600}.vuefinder :is(.leading-5){line-height:1.25rem}.vuefinder :is(.leading-6){line-height:1.5rem}.vuefinder :is(.leading-none){line-height:1}.vuefinder :is(.tracking-wider){letter-spacing:.05em}.vuefinder :is(.text-blue-500){--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.vuefinder :is(.text-emerald-600){--tw-text-opacity: 1;color:rgb(5 150 105 / var(--tw-text-opacity))}.vuefinder :is(.text-gray-400){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.vuefinder :is(.text-gray-500){--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.vuefinder :is(.text-gray-600){--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.vuefinder :is(.text-gray-700){--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.vuefinder :is(.text-gray-800){--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.vuefinder :is(.text-gray-900){--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.vuefinder :is(.text-green-600){--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.vuefinder :is(.text-indigo-600){--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity))}.vuefinder :is(.text-lime-600){--tw-text-opacity: 1;color:rgb(101 163 13 / var(--tw-text-opacity))}.vuefinder :is(.text-neutral-300){--tw-text-opacity: 1;color:rgb(212 212 212 / var(--tw-text-opacity))}.vuefinder :is(.text-neutral-500){--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity))}.vuefinder :is(.text-neutral-700){--tw-text-opacity: 1;color:rgb(64 64 64 / var(--tw-text-opacity))}.vuefinder :is(.text-red-400){--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}.vuefinder :is(.text-red-500){--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.vuefinder :is(.text-red-600){--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.vuefinder :is(.text-slate-500){--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity))}.vuefinder :is(.text-slate-700){--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity))}.vuefinder :is(.text-white){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.vuefinder :is(.text-opacity-50){--tw-text-opacity: .5}.vuefinder :is(.opacity-0){opacity:0}.vuefinder :is(.opacity-25){opacity:.25}.vuefinder :is(.opacity-75){opacity:.75}.vuefinder :is(.shadow){--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.vuefinder :is(.shadow-sm){--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.vuefinder :is(.shadow-xl){--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.vuefinder :is(.outline){outline-style:solid}.vuefinder :is(.outline-0){outline-width:0px}.vuefinder :is(.ring-0){--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.vuefinder :is(.filter){filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.vuefinder :is(.transition-all){transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.vuefinder :is(.transition-opacity){transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.vuefinder :is(.duration-1000){transition-duration:1s}.vuefinder :is(.duration-500){transition-duration:.5s}.vuefinder :is(.ease-out){transition-timing-function:cubic-bezier(0,0,.2,1)}.vuefinder :is(.hover\:bg-blue-200:hover){--tw-bg-opacity: 1;background-color:rgb(191 219 254 / var(--tw-bg-opacity))}.vuefinder :is(.hover\:bg-blue-700:hover){--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity))}.vuefinder :is(.hover\:bg-gray-100:hover){--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.vuefinder :is(.hover\:bg-neutral-100:hover){--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity))}.vuefinder :is(.hover\:bg-neutral-200:hover){--tw-bg-opacity: 1;background-color:rgb(229 229 229 / var(--tw-bg-opacity))}.vuefinder :is(.hover\:bg-neutral-300:hover){--tw-bg-opacity: 1;background-color:rgb(212 212 212 / var(--tw-bg-opacity))}.vuefinder :is(.hover\:bg-neutral-50:hover){--tw-bg-opacity: 1;background-color:rgb(250 250 250 / var(--tw-bg-opacity))}.vuefinder :is(.hover\:stroke-cyan-700:hover){stroke:#0e7490}.vuefinder :is(.hover\:stroke-sky-600:hover){stroke:#0284c7}.vuefinder :is(.hover\:text-red-600:hover){--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.vuefinder :is(.focus\:border-transparent:focus){border-color:transparent}.vuefinder :is(.focus\:outline-none:focus){outline:2px solid transparent;outline-offset:2px}.vuefinder :is(.focus\:ring-indigo-600:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(79 70 229 / var(--tw-ring-opacity))}.vuefinder :is(.focus\:ring-transparent:focus){--tw-ring-color: transparent}.vuefinder :is(.disabled\:bg-gray-100:disabled){--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.vuefinder :is(.dark .dark\:border-t){border-top-width:1px}.vuefinder :is(.dark .dark\:border-gray-200){--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.vuefinder :is(.dark .dark\:border-gray-600){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.vuefinder :is(.dark .dark\:border-gray-700){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.vuefinder :is(.dark .dark\:border-gray-700\/50){border-color:#37415180}.vuefinder :is(.dark .dark\:border-gray-900){--tw-border-opacity: 1;border-color:rgb(17 24 39 / var(--tw-border-opacity))}.vuefinder :is(.dark .dark\:border-red-300){--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity))}.vuefinder :is(.dark .dark\:bg-emerald-950){--tw-bg-opacity: 1;background-color:rgb(2 44 34 / var(--tw-bg-opacity))}.vuefinder :is(.dark .dark\:bg-gray-500){--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.vuefinder :is(.dark .dark\:bg-gray-600){--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.vuefinder :is(.dark .dark\:bg-gray-700){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.vuefinder :is(.dark .dark\:bg-gray-700\/25){background-color:#37415140}.vuefinder :is(.dark .dark\:bg-gray-700\/50){background-color:#37415180}.vuefinder :is(.dark .dark\:bg-gray-800){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.vuefinder :is(.dark .dark\:bg-red-950){--tw-bg-opacity: 1;background-color:rgb(69 10 10 / var(--tw-bg-opacity))}.vuefinder :is(.dark .dark\:bg-opacity-75){--tw-bg-opacity: .75}.vuefinder :is(.dark .dark\:fill-gray-400\/20){fill:#9ca3af33}.vuefinder :is(.dark .dark\:fill-gray-700){fill:#374151}.vuefinder :is(.dark .dark\:fill-slate-500){fill:#64748b}.vuefinder :is(.dark .dark\:stroke-blue-100){stroke:#dbeafe}.vuefinder :is(.dark .dark\:stroke-gray-400){stroke:#9ca3af}.vuefinder :is(.dark .dark\:stroke-gray-600){stroke:#4b5563}.vuefinder :is(.dark .dark\:stroke-gray-700){stroke:#374151}.vuefinder :is(.dark .dark\:stroke-red-200){stroke:#fecaca}.vuefinder :is(.dark .dark\:stroke-slate-500){stroke:#64748b}.vuefinder :is(.dark .dark\:text-gray-100){--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity))}.vuefinder :is(.dark .dark\:text-gray-200){--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.vuefinder :is(.dark .dark\:text-gray-300){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.vuefinder :is(.dark .dark\:text-gray-400){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.vuefinder :is(.dark .dark\:text-gray-50){--tw-text-opacity: 1;color:rgb(249 250 251 / var(--tw-text-opacity))}.vuefinder :is(.dark .dark\:text-gray-500){--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.vuefinder :is(.dark .dark\:text-gray-600){--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.vuefinder :is(.dark .dark\:text-green-600){--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.vuefinder :is(.dark .dark\:text-lime-300){--tw-text-opacity: 1;color:rgb(190 242 100 / var(--tw-text-opacity))}.vuefinder :is(.dark .dark\:text-neutral-200){--tw-text-opacity: 1;color:rgb(229 229 229 / var(--tw-text-opacity))}.vuefinder :is(.dark .dark\:text-neutral-300){--tw-text-opacity: 1;color:rgb(212 212 212 / var(--tw-text-opacity))}.vuefinder :is(.dark .dark\:text-neutral-400){--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity))}.vuefinder :is(.dark .dark\:text-neutral-50){--tw-text-opacity: 1;color:rgb(250 250 250 / var(--tw-text-opacity))}.vuefinder :is(.dark .dark\:text-neutral-500){--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity))}.vuefinder :is(.dark .dark\:text-red-200){--tw-text-opacity: 1;color:rgb(254 202 202 / var(--tw-text-opacity))}.vuefinder :is(.dark .dark\:text-red-300){--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity))}.vuefinder :is(.dark .dark\:text-slate-200){--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity))}.vuefinder :is(.dark .dark\:accent-slate-400){accent-color:#94a3b8}.vuefinder :is(.dark .dark\:opacity-75){opacity:.75}.vuefinder :is(.dark .dark\:selection\:bg-gray-500 *)::-moz-selection{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.vuefinder :is(.dark .dark\:selection\:bg-gray-500 *)::selection{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.vuefinder :is(.dark .dark\:selection\:bg-gray-500)::-moz-selection{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.vuefinder :is(.dark .dark\:selection\:bg-gray-500)::selection{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.vuefinder :is(.dark .dark\:hover\:bg-gray-500:hover){--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.vuefinder :is(.dark .dark\:hover\:bg-gray-700:hover){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.vuefinder :is(.dark .dark\:hover\:bg-gray-700\/10:hover){background-color:#3741511a}.vuefinder :is(.dark .dark\:hover\:bg-gray-700\/50:hover){background-color:#37415180}.vuefinder :is(.dark .dark\:hover\:bg-gray-800:hover){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.vuefinder :is(.dark .dark\:hover\:stroke-gray-300:hover){stroke:#d1d5db}.vuefinder :is(.dark .dark\:hover\:text-gray-200:hover){--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.vuefinder :is(.dark .dark\:hover\:text-gray-300:hover){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.vuefinder :is(.dark .dark\:focus\:border-gray-600:focus){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.vuefinder :is(.dark .dark\:focus\:border-transparent:focus){border-color:transparent}.vuefinder :is(.dark .dark\:focus\:ring-gray-600:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(75 85 99 / var(--tw-ring-opacity))}.vuefinder :is(.dark .dark\:focus\:ring-transparent:focus){--tw-ring-color: transparent}@media (min-width: 640px){.vuefinder :is(.sm\:mx-0){margin-left:0;margin-right:0}.vuefinder :is(.sm\:my-8){margin-top:2rem;margin-bottom:2rem}.vuefinder :is(.sm\:ml-3){margin-left:.75rem}.vuefinder :is(.sm\:ml-4){margin-left:1rem}.vuefinder :is(.sm\:mt-0){margin-top:0}.vuefinder :is(.sm\:flex){display:flex}.vuefinder :is(.sm\:h-10){height:2.5rem}.vuefinder :is(.sm\:w-10){width:2.5rem}.vuefinder :is(.sm\:w-auto){width:auto}.vuefinder :is(.sm\:max-w-4xl){max-width:56rem}.vuefinder :is(.sm\:flex-row-reverse){flex-direction:row-reverse}.vuefinder :is(.sm\:items-start){align-items:flex-start}.vuefinder :is(.sm\:items-center){align-items:center}.vuefinder :is(.sm\:p-0){padding:0}.vuefinder :is(.sm\:p-6){padding:1.5rem}.vuefinder :is(.sm\:px-6){padding-left:1.5rem;padding-right:1.5rem}.vuefinder :is(.sm\:pb-4){padding-bottom:1rem}.vuefinder :is(.sm\:text-left){text-align:left}.vuefinder :is(.sm\:text-sm){font-size:.875rem;line-height:1.25rem}.vuefinder :is(.sm\:text-xs){font-size:.75rem;line-height:1rem}}@media (min-width: 768px){.vuefinder :is(.md\:right-\[-2\.4rem\]){right:-2.4rem}.vuefinder :is(.md\:top-5){top:1.25rem}.vuefinder :is(.md\:block){display:block}.vuefinder :is(.md\:hidden){display:none}.vuefinder :is(.md\:h-12){height:3rem}.vuefinder :is(.md\:h-8){height:2rem}.vuefinder :is(.md\:w-12){width:3rem}.vuefinder :is(.md\:w-24){width:6rem}.vuefinder :is(.md\:w-8){width:2rem}.vuefinder :is(.md\:max-w-2xl){max-width:42rem}}@media (min-width: 1024px){.vuefinder :is(.lg\:max-w-3xl){max-width:48rem}}@media (min-width: 1280px){.vuefinder :is(.xl\:max-w-5xl){max-width:64rem}} diff --git a/dist/vuefinder.cjs b/dist/vuefinder.cjs index e27efea3..5ffe511a 100644 --- a/dist/vuefinder.cjs +++ b/dist/vuefinder.cjs @@ -1 +1,2 @@ -"use strict";const e=require("vue"),re=require("mitt"),ae=require("dragselect"),le=require("vanilla-lazyload");require("cropperjs/dist/cropper.css");const se=require("cropperjs"),ie=require("@uppy/core"),ce=require("@uppy/xhr-upload");require("microtip/microtip.css");var te;const P=(te=document.querySelector('meta[name="csrf-token"]'))==null?void 0:te.getAttribute("content"),R=(a,{method:t="get",params:n={},json:o=!0,signal:l=null})=>{const c={method:t};if(c.signal=l,t=="get")a+="?"+new URLSearchParams(n);else{c.headers={},P&&(c.headers["X-CSRF-Token"]=P);let r=new FormData;for(const[u,d]of Object.entries(n))r.append(u,d);c.body=r}return fetch(a,c).then(r=>r.ok?o?r.json():r.text():r.json().then(Promise.reject.bind(Promise)))};function Y(a){let t=localStorage.getItem(a+"_storage");const n=e.ref(JSON.parse(t));e.watch(n,o);function o(){n.value===null||n.value===""?localStorage.removeItem(a+"_storage"):localStorage.setItem(a+"_storage",JSON.stringify(n.value))}function l(u,d){n.value=Object.assign({...n.value},{[u]:d})}function c(){n.value=null}return{getStore:(u,d=null)=>n.value===null||n.value===""?d:n.value.hasOwnProperty(u)?n.value[u]:d,setStore:l,clearStore:c}}const X=e.ref("");function z(){function a(t){X.value=t}return{apiUrl:X,setApiUrl:a}}const de={class:"border-neutral-300 flex justify-between items-center py-1 text-sm"},ue={key:0,class:"flex text-center"},me=["aria-label"],pe=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 md:h-8 md:w-8 m-auto cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300",fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 10.5v6m3-3H9m4.06-7.19l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"})],-1),ve=[pe],fe=["aria-label"],he=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 md:h-8 md:w-8 m-auto cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300",fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-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 00-9-9z"})],-1),ge=[he],ke=["aria-label"],ye=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10"},null,-1),xe=[ye],we=["aria-label"],_e=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0"},null,-1),be=[_e],Ee=["aria-label"],Ve=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 md:h-8 md:w-8 m-auto cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300",fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5m-13.5-9L12 3m0 0l4.5 4.5M12 3v13.5"})],-1),Ne=[Ve],$e=["aria-label"],Be=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M20.25 7.5l-.625 10.632a2.25 2.25 0 01-2.247 2.118H6.622a2.25 2.25 0 01-2.247-2.118L3.75 7.5m6 4.125l2.25 2.25m0 0l2.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.125z"},null,-1),Ce=[Be],Se=["aria-label"],De=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M20.25 7.5l-.625 10.632a2.25 2.25 0 01-2.247 2.118H6.622a2.25 2.25 0 01-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.125z"},null,-1),je=[De],Me={key:1,class:"flex text-center"},ze={class:"pl-2"},Oe={class:"dark:bg-gray-700 bg-gray-200 text-xs px-2 py-1 rounded"},Te={key:0,class:"animate-spin p-0.5 h-5 w-5 text-white ml-auto",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},Fe=e.createElementVNode("circle",{class:"opacity-25 stroke-blue-900 dark:stroke-blue-100",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),Le=e.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1),Ae=[Fe,Le],Ue={class:"flex text-center items-center justify-end"},He=["aria-label"],qe={xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 md:h-8 md:w-8 m-auto cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300",fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},Ie={key:0,"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 9V4.5M9 9H4.5M9 9L3.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.5l5.25 5.25"},Pe={key:1,"stroke-linecap":"round","stroke-linejoin":"round",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"},Re=["aria-label"],Ke={key:0,"stroke-linecap":"round","stroke-linejoin":"round",d:"M3.75 6A2.25 2.25 0 016 3.75h2.25A2.25 2.25 0 0110.5 6v2.25a2.25 2.25 0 01-2.25 2.25H6a2.25 2.25 0 01-2.25-2.25V6zM3.75 15.75A2.25 2.25 0 016 13.5h2.25a2.25 2.25 0 012.25 2.25V18a2.25 2.25 0 01-2.25 2.25H6A2.25 2.25 0 013.75 18v-2.25zM13.5 6a2.25 2.25 0 012.25-2.25H18A2.25 2.25 0 0120.25 6v2.25A2.25 2.25 0 0118 10.5h-2.25a2.25 2.25 0 01-2.25-2.25V6zM13.5 15.75a2.25 2.25 0 012.25-2.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-2.25A2.25 2.25 0 0113.5 18v-2.25z"},Ge={key:1,"stroke-linecap":"round","stroke-linejoin":"round",d:"M3.75 12h16.5m-16.5 3.75h16.5M3.75 19.5h16.5M5.625 4.5h12.75a1.875 1.875 0 010 3.75H5.625a1.875 1.875 0 010-3.75z"},Ye={name:"VFToolbar"},Je=Object.assign(Ye,{props:{data:Object},setup(a){const t=e.inject("emitter");e.inject("usePropDarkMode");const{getStore:n,setStore:o}=e.inject("storage"),{t:l}=e.inject("i18n"),c=e.ref(n("viewport","grid")),r=e.ref([]),u=e.ref(n("full-screen",!1)),d=e.ref("");t.on("vf-search-query",({newQuery:g})=>{d.value=g});const i=e.inject("loadingState"),s=()=>i.value,m=()=>{u.value=!u.value,t.emit("vf-fullscreen-toggle")};return t.on("vf-nodes-selected",g=>{r.value=g}),t.on("vf-view-toggle",g=>{o("viewport",g),c.value=g}),(g,h)=>(e.openBlock(),e.createElementBlock("div",de,[d.value.length?(e.openBlock(),e.createElementBlock("div",Me,[e.createElementVNode("div",ze,[e.createTextVNode(e.toDisplayString(e.unref(l)("Search results for"))+" ",1),e.createElementVNode("span",Oe,e.toDisplayString(d.value),1)]),s()?(e.openBlock(),e.createElementBlock("svg",Te,Ae)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",ue,[e.createElementVNode("div",{class:"mx-1.5","aria-label":e.unref(l)("New Folder"),"data-microtip-position":"bottom-right",role:"tooltip",onClick:h[0]||(h[0]=$=>e.unref(t).emit("vf-modal-show",{type:"new-folder",items:r.value}))},ve,8,me),e.createElementVNode("div",{class:"mx-1.5","aria-label":e.unref(l)("New File"),"data-microtip-position":"bottom",role:"tooltip",onClick:h[1]||(h[1]=$=>e.unref(t).emit("vf-modal-show",{type:"new-file",items:r.value}))},ge,8,fe),e.createElementVNode("div",{class:"mx-1.5","aria-label":e.unref(l)("Rename"),"data-microtip-position":"bottom",role:"tooltip",onClick:h[2]||(h[2]=$=>r.value.length!=1||e.unref(t).emit("vf-modal-show",{type:"rename",items:r.value}))},[(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",class:e.normalizeClass([r.value.length==1?"cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300":"stroke-gray-200 dark:stroke-gray-700","h-6 w-6 md:h-8 md:w-8 m-auto"]),fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},xe,2))],8,ke),e.createElementVNode("div",{class:"mx-1.5","aria-label":e.unref(l)("Delete"),"data-microtip-position":"bottom",role:"tooltip",onClick:h[3]||(h[3]=$=>!r.value.length||e.unref(t).emit("vf-modal-show",{type:"delete",items:r.value}))},[(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",class:e.normalizeClass([r.value.length?"cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300":"stroke-gray-200 dark:stroke-gray-700","h-6 w-6 md:h-8 md:w-8 m-auto"]),fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},be,2))],8,we),e.createElementVNode("div",{class:"mx-1.5","aria-label":e.unref(l)("Upload"),"data-microtip-position":"bottom",role:"tooltip",onClick:h[4]||(h[4]=$=>e.unref(t).emit("vf-modal-show",{type:"upload",items:r.value}))},Ne,8,Ee),r.value.length==1&&r.value[0].mime_type=="application/zip"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"mx-1.5","aria-label":e.unref(l)("Unarchive"),"data-microtip-position":"bottom",role:"tooltip",onClick:h[5]||(h[5]=$=>!r.value.length||e.unref(t).emit("vf-modal-show",{type:"unarchive",items:r.value}))},[(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",class:e.normalizeClass([r.value.length?"cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300":"stroke-gray-200 dark:stroke-gray-700","h-6 w-6 md:h-8 md:w-8 m-auto"]),fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},Ce,2))],8,$e)):(e.openBlock(),e.createElementBlock("div",{key:1,class:"mx-1.5","aria-label":e.unref(l)("Archive"),"data-microtip-position":"bottom",role:"tooltip",onClick:h[6]||(h[6]=$=>!r.value.length||e.unref(t).emit("vf-modal-show",{type:"archive",items:r.value}))},[(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",class:e.normalizeClass([r.value.length?"cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300":"stroke-gray-200 dark:stroke-gray-700","h-6 w-6 md:h-8 md:w-8 m-auto"]),fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},je,2))],8,Se))])),e.createElementVNode("div",Ue,[e.createElementVNode("div",{class:"mx-1.5","aria-label":e.unref(l)("Toggle Full Screen"),"data-microtip-position":"bottom-left",role:"tooltip",onClick:m},[(e.openBlock(),e.createElementBlock("svg",qe,[u.value?(e.openBlock(),e.createElementBlock("path",Ie)):(e.openBlock(),e.createElementBlock("path",Pe))]))],8,He),e.createElementVNode("div",{class:"mx-1.5","aria-label":e.unref(l)("Change View"),"data-microtip-position":"bottom-left",role:"tooltip",onClick:h[7]||(h[7]=$=>d.value.length||e.unref(t).emit("vf-view-toggle",c.value=="list"?"grid":"list"))},[(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",class:e.normalizeClass([d.value.length?"stroke-gray-200 dark:stroke-gray-700":"cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300","h-6 w-6 md:h-8 md:w-8 m-auto"]),fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},[c.value=="grid"?(e.openBlock(),e.createElementBlock("path",Ke)):e.createCommentVNode("",!0),c.value=="list"?(e.openBlock(),e.createElementBlock("path",Ge)):e.createCommentVNode("",!0)],2))],8,Re)])]))}}),oe=(a,t=null)=>new Date(a*1e3).toLocaleString(t??navigator.language??"en-US"),We={key:0,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor"},Xe=e.createElementVNode("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z","clip-rule":"evenodd"},null,-1),Qe=[Xe],Ze={key:1,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor"},et=e.createElementVNode("path",{"fill-rule":"evenodd",d:"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z","clip-rule":"evenodd"},null,-1),tt=[et],ot={name:"VFSortIcon"},I=Object.assign(ot,{props:{direction:String},setup(a){return(t,n)=>(e.openBlock(),e.createElementBlock("div",null,[a.direction=="down"?(e.openBlock(),e.createElementBlock("svg",We,Qe)):e.createCommentVNode("",!0),a.direction=="up"?(e.openBlock(),e.createElementBlock("svg",Ze,tt)):e.createCommentVNode("",!0)]))}}),nt=["onClick"],rt={name:"VFToast.vue"},at=Object.assign(rt,{setup(a){const t=e.inject("emitter"),{getStore:n}=e.inject("storage"),o=e.ref(n("full-screen",!1)),l=d=>d=="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=e.ref([]),r=d=>{c.value.splice(d,1)},u=d=>{let i=c.value.findIndex(s=>s.id===d);i!==-1&&r(i)};return t.on("vf-toast-clear",()=>{c.value=[]}),t.on("vf-toast-push",d=>{let i=new Date().getTime().toString(36).concat(performance.now().toString(),Math.random().toString()).replace(/\./g,"");d.id=i,c.value.push(d),setTimeout(()=>{u(i)},5e3)}),(d,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([o.value.value?"fixed":"absolute","bottom-0 max-w-fit flex flex-col bottom-0 left-1/2 -translate-x-1/2"])},[e.createVNode(e.TransitionGroup,{name:"vf-toast-item","leave-active-class":"transition-all duration-1000","leave-to-class":"opacity-0"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(s,m)=>(e.openBlock(),e.createElementBlock("div",{onClick:g=>r(m),key:s,class:e.normalizeClass([l(s.type),"inline-block mx-auto my-0.5 py-0.5 px-2 min-w-max bg-gray-50 dark:bg-gray-600 border text-xs sm:text-sm rounded cursor-pointer"])},e.toDisplayString(s.label),11,nt))),128))]),_:1})],2))}}),L=a=>Object.entries(a).map(t=>t.map(encodeURIComponent).join("=")).join("&"),{apiUrl:lt}=z(),J=(a,t)=>lt.value+"?"+L({q:"preview",adapter:a,path:t});function W(a,t=14){let n=`((?=([\\w\\W]{0,${t}}))([\\w\\W]{8,})([\\w\\W]{8,}))`;return a.replace(new RegExp(n),"$2..$4")}const st={class:"relative flex-auto flex flex-col overflow-hidden"},it={key:0,class:"grid grid-cols-12 border-b border-neutral-300 border-gray-200 dark:border-gray-700 text-xs select-none"},ct={class:"absolute"},dt=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",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",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},[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"})],-1),ut={class:"text-neutral-700 dark:text-neutral-300 p-1 absolute text-center top-4 right-[-2rem] md:top-5 md:right-[-2.4rem] z-20 text-xs"},mt=["onDblclick","onContextmenu","data-type","data-item","data-index"],pt={class:"grid grid-cols-12 items-center"},vt={class:"flex col-span-7 items-center"},ft={key:0,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},ht=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),gt=[ht],kt={key:1,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},yt=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),xt=[yt],wt={class:"overflow-ellipsis overflow-hidden whitespace-nowrap"},_t={class:"col-span-5 overflow-ellipsis overflow-hidden whitespace-nowrap"},bt=["onDblclick","onContextmenu","onDragstart","onDragover","onDrop","data-type","data-item","data-index"],Et={class:"grid grid-cols-12 items-center"},Vt={class:"flex col-span-7 items-center"},Nt={key:0,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},$t=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),Bt=[$t],Ct={key:1,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},St=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),Dt=[St],jt={class:"overflow-ellipsis overflow-hidden whitespace-nowrap"},Mt={class:"col-span-2 text-center"},zt={class:"col-span-3 overflow-ellipsis overflow-hidden whitespace-nowrap"},Ot=["onDblclick","onContextmenu","onDragstart","onDragover","onDrop","data-type","data-item","data-index"],Tt={class:"relative"},Ft={key:0,xmlns:"http://www.w3.org/2000/svg",class:"h-10 w-10 md:h-12 md:w-12 m-auto fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Lt=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),At=[Lt],Ut=["data-src","alt"],Ht={key:2,xmlns:"http://www.w3.org/2000/svg",class:"h-10 w-10 md:h-12 md:w-12 m-auto text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},qt=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),It=[qt],Pt={key:3,class:"absolute hidden md:block top-1/2 w-full text-center text-neutral-500"},Rt={class:"break-all"},Kt={name:"VFExplorer"},Gt=Object.assign(Kt,{props:{view:String,data:Object,search:Object},setup(a){const t=a,n=e.inject("emitter"),{setStore:o,getStore:l}=e.inject("storage"),c=e.inject("adapter"),r=y=>y==null?void 0:y.substring(0,3),u=e.ref(null),d=e.ref(null),i=e.ref(0),s=e.ref(null),{t:m}=e.inject("i18n"),g=Math.floor(Math.random()*2**32),h=e.ref(l("full-screen",!1)),$=e.inject("filesize");let E;n.on("vf-fullscreen-toggle",()=>{u.value.style.height=null,h.value=!h.value,o("full-screen",h.value)});const b=e.ref("");n.on("vf-search-query",({newQuery:y})=>{b.value=y,y?n.emit("vf-fetch",{params:{q:"search",adapter:t.data.adapter,path:t.data.dirname,filter:y},onSuccess:f=>{f.files.length||n.emit("vf-toast-push",{label:m("No search result found.")})}}):n.emit("vf-fetch",{params:{q:"index",adapter:t.data.adapter,path:t.data.dirname}})});let _=null;const N=()=>{_&&clearTimeout(_)},x=e.ref(!0),w=y=>{y.touches.length>1&&(x.value?(s.value.stop(),n.emit("vf-toast-push",{label:m("Drag&Drop: off")})):(s.value.start(),n.emit("vf-toast-push",{label:m("Drag&Drop: on")}),n.emit("vf-explorer-update")),x.value=!x.value)},V=y=>{_=setTimeout(()=>{const f=new MouseEvent("contextmenu",{bubbles:!0,cancelable:!1,view:window,button:2,buttons:0,clientX:y.target.getBoundingClientRect().x,clientY:y.target.getBoundingClientRect().y});y.target.dispatchEvent(f)},500)},S=y=>{y.type=="dir"?(n.emit("vf-search-exit"),n.emit("vf-fetch",{params:{q:"index",adapter:t.data.adapter,path:y.path}})):n.emit("vf-modal-show",{type:"preview",adapter:t.data.adapter,item:y})},B=e.reactive({active:!1,column:"",order:""}),T=(y=!0)=>{let f=[...t.data.files],p=B.column,v=B.order=="asc"?1:-1;if(!y)return f;const k=(C,D)=>typeof C=="string"&&typeof D=="string"?C.toLowerCase().localeCompare(D.toLowerCase()):CD?1:0;return B.active&&(f=f.slice().sort((C,D)=>k(C[p],D[p])*v)),f},j=y=>{B.active&&B.column==y?(B.active=B.order=="asc",B.column=y,B.order="desc"):(B.active=!0,B.column=y,B.order="asc")},F=()=>s.value.getSelection().map(y=>JSON.parse(y.dataset.item)),U=(y,f)=>{if(y.altKey||y.ctrlKey||y.metaKey)return y.preventDefault(),!1;y.dataTransfer.setDragImage(d.value,0,15),y.dataTransfer.effectAllowed="all",y.dataTransfer.dropEffect="copy",y.dataTransfer.setData("items",JSON.stringify(F()))},H=(y,f)=>{y.preventDefault();let p=JSON.parse(y.dataTransfer.getData("items"));if(p.find(v=>v.storage!=c.value)){alert("Moving items between different storages is not supported yet.");return}n.emit("vf-modal-show",{type:"move",items:{from:p,to:f}})},A=(y,f)=>{y.preventDefault(),!f||f.type!=="dir"||s.value.getSelection().find(p=>p==y.currentTarget)?(y.dataTransfer.dropEffect="none",y.dataTransfer.effectAllowed="none"):y.dataTransfer.dropEffect="copy"},q=()=>{s.value=new ae({area:u.value,keyboardDrag:!1,selectedClass:"vf-explorer-selected",selectorClass:"vf-explorer-selector"}),n.on("vf-explorer-update",()=>e.nextTick(()=>{s.value.clearSelection(),s.value.setSettings({selectables:document.getElementsByClassName("vf-item-"+g)})})),s.value.subscribe("predragstart",({event:y,isDragging:f})=>{if(f)i.value=s.value.getSelection().length,s.value.break();else{const p=y.target.offsetWidth-y.offsetX,v=y.target.offsetHeight-y.offsetY;p<15&&v<15&&(s.value.clearSelection(),s.value.break())}}),s.value.subscribe("predragmove",({isDragging:y})=>{y&&s.value.break()}),s.value.subscribe("callback",({items:y,event:f,isDragging:p})=>{n.emit("vf-nodes-selected",F()),i.value=s.value.getSelection().length})};return e.onMounted(()=>{E=new le(u.value),q()}),e.onUpdated(()=>{s.value.Area.reset(),s.value.SelectorArea.updatePos(),E.update()}),e.onMounted(()=>{e.watch(()=>t.view,()=>n.emit("vf-explorer-update"))}),e.onBeforeUnmount(()=>{E.destroy()}),(y,f)=>(e.openBlock(),e.createElementBlock("div",st,[a.view=="list"||b.value.length?(e.openBlock(),e.createElementBlock("div",it,[e.createElementVNode("div",{onClick:f[0]||(f[0]=p=>j("basename")),class:"col-span-7 py-1 leading-6 hover:bg-neutral-100 bg-neutral-50 dark:bg-gray-800 dark:hover:bg-gray-700/10 flex items-center pl-1"},[e.createTextVNode(e.toDisplayString(e.unref(m)("Name"))+" ",1),e.withDirectives(e.createVNode(I,{direction:B.order=="asc"?"down":"up"},null,8,["direction"]),[[e.vShow,B.active&&B.column=="basename"]])]),b.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:f[1]||(f[1]=p=>j("file_size")),class:"col-span-2 py-1 leading-6 hover:bg-neutral-100 bg-neutral-50 dark:bg-gray-800 dark:hover:bg-gray-700/10 flex items-center justify-center border-l border-r dark:border-gray-700"},[e.createTextVNode(e.toDisplayString(e.unref(m)("Size"))+" ",1),e.withDirectives(e.createVNode(I,{direction:B.order=="asc"?"down":"up"},null,8,["direction"]),[[e.vShow,B.active&&B.column=="file_size"]])])),b.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:f[2]||(f[2]=p=>j("last_modified")),class:"col-span-3 py-1 leading-6 hover:bg-neutral-100 bg-neutral-50 dark:bg-gray-800 dark:hover:bg-gray-700/10 flex items-center justify-center"},[e.createTextVNode(e.toDisplayString(e.unref(m)("Date"))+" ",1),e.withDirectives(e.createVNode(I,{direction:B.order=="asc"?"down":"up"},null,8,["direction"]),[[e.vShow,B.active&&B.column=="last_modified"]])])),b.value.length?(e.openBlock(),e.createElementBlock("div",{key:2,onClick:f[3]||(f[3]=p=>j("path")),class:"col-span-5 py-1 leading-6 hover:bg-neutral-100 bg-neutral-50 dark:bg-gray-800 dark:hover:bg-gray-700/10 flex items-center justify-center border-l dark:border-gray-700"},[e.createTextVNode(e.toDisplayString(e.unref(m)("Filepath"))+" ",1),e.withDirectives(e.createVNode(I,{direction:B.order=="asc"?"down":"up"},null,8,["direction"]),[[e.vShow,B.active&&B.column=="path"]])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",ct,[e.createElementVNode("div",{ref_key:"dragImage",ref:d,class:"absolute -z-50 -top-96"},[dt,e.createElementVNode("div",ut,e.toDisplayString(i.value),1)],512)]),e.createElementVNode("div",{onTouchstart:w,onContextmenu:f[10]||(f[10]=e.withModifiers(p=>e.unref(n).emit("vf-contextmenu-show",{event:p,area:u.value,items:F()}),["self","prevent"])),class:e.normalizeClass([h.value?"":"resize-y","h-full w-full text-xs vf-selector-area vf-scrollbar min-h-[150px] overflow-auto p-1 z-0"]),ref_key:"selectorArea",ref:u},[b.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(T(),(p,v)=>(e.openBlock(),e.createElementBlock("div",{onDblclick:k=>S(p),onTouchstart:f[4]||(f[4]=k=>V(k)),onTouchend:f[5]||(f[5]=k=>N()),onContextmenu:e.withModifiers(k=>e.unref(n).emit("vf-contextmenu-show",{event:k,area:u.value,items:F(),target:p}),["prevent"]),class:e.normalizeClass(["vf-item-"+e.unref(g),"grid grid-cols-1 border hover:bg-neutral-50 dark:hover:bg-gray-700 border-transparent my-0.5 w-full select-none"]),"data-type":p.type,"data-item":JSON.stringify(p),"data-index":v},[e.createElementVNode("div",pt,[e.createElementVNode("div",vt,[p.type=="dir"?(e.openBlock(),e.createElementBlock("svg",ft,gt)):(e.openBlock(),e.createElementBlock("svg",kt,xt)),e.createElementVNode("span",wt,e.toDisplayString(p.basename),1)]),e.createElementVNode("div",_t,e.toDisplayString(p.path),1)])],42,mt))),256)):e.createCommentVNode("",!0),a.view=="list"&&!b.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(T(),(p,v)=>(e.openBlock(),e.createElementBlock("div",{draggable:"true",onDblclick:k=>S(p),onTouchstart:f[6]||(f[6]=k=>V(k)),onTouchend:f[7]||(f[7]=k=>N()),onContextmenu:e.withModifiers(k=>e.unref(n).emit("vf-contextmenu-show",{event:k,area:u.value,items:F(),target:p}),["prevent"]),onDragstart:k=>U(k),onDragover:k=>A(k,p),onDrop:k=>H(k,p),class:e.normalizeClass(["vf-item-"+e.unref(g),"grid grid-cols-1 border hover:bg-neutral-50 dark:hover:bg-gray-700 border-transparent my-0.5 w-full select-none"]),"data-type":p.type,"data-item":JSON.stringify(p),"data-index":v},[e.createElementVNode("div",Et,[e.createElementVNode("div",Vt,[p.type=="dir"?(e.openBlock(),e.createElementBlock("svg",Nt,Bt)):(e.openBlock(),e.createElementBlock("svg",Ct,Dt)),e.createElementVNode("span",jt,e.toDisplayString(p.basename),1)]),e.createElementVNode("div",Mt,e.toDisplayString(p.file_size?e.unref($)(p.file_size):""),1),e.createElementVNode("div",zt,e.toDisplayString(e.unref(oe)(p.last_modified)),1)])],42,bt))),256)):e.createCommentVNode("",!0),a.view=="grid"&&!b.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(T(!1),(p,v)=>(e.openBlock(),e.createElementBlock("div",{draggable:"true",onDblclick:k=>S(p),onTouchstart:f[8]||(f[8]=k=>V(k)),onTouchend:f[9]||(f[9]=k=>N()),onContextmenu:e.withModifiers(k=>e.unref(n).emit("vf-contextmenu-show",{event:k,area:u.value,items:F(),target:p}),["prevent"]),onDragstart:k=>U(k),onDragover:k=>A(k,p),onDrop:k=>H(k,p),class:e.normalizeClass(["vf-item-"+e.unref(g),"border border-transparent hover:bg-neutral-50 m-1 dark:hover:bg-gray-700 inline-flex w-[5.5rem] h-20 md:w-24 text-center justify-center select-none"]),"data-type":p.type,"data-item":JSON.stringify(p),"data-index":v},[e.createElementVNode("div",null,[e.createElementVNode("div",Tt,[p.type=="dir"?(e.openBlock(),e.createElementBlock("svg",Ft,At)):(p.mime_type??"").startsWith("image")?(e.openBlock(),e.createElementBlock("img",{key:1,class:"lazy h-10 md:h-12 m-auto","data-src":e.unref(J)(e.unref(c).value,p.path),alt:p.basename},null,8,Ut)):(e.openBlock(),e.createElementBlock("svg",Ht,It)),!(p.mime_type??"").startsWith("image")&&p.type!="dir"?(e.openBlock(),e.createElementBlock("div",Pt,e.toDisplayString(r(p.extension)),1)):e.createCommentVNode("",!0)]),e.createElementVNode("span",Rt,e.toDisplayString(e.unref(W)(p.basename)),1)])],42,Ot))),256)):e.createCommentVNode("",!0)],34),e.createVNode(at)]))}}),Yt={class:"p-1 text-xs border-t border-neutral-300 dark:border-gray-700/50 flex justify-between select-none"},Jt={class:"flex leading-5 items-center"},Wt=["aria-label"],Xt=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},[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"})],-1),Qt=[Xt],Zt=["value"],eo={class:"ml-3"},to={key:0},oo={class:"ml-1"},no={class:"flex leading-5 items-center justify-end"},ro={value:"",disabled:""},ao=e.createStaticVNode('',11),lo=["aria-label"],so=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 stroke-slate-500 cursor-pointer",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[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 11-18 0 9 9 0 0118 0z"})],-1),io=[so],co={name:"VFStatusbar"},uo=Object.assign(co,{props:{data:Object},setup(a){const t=e.inject("emitter"),{getStore:n,setStore:o}=e.inject("storage"),l=e.ref(0),c=e.inject("adapter"),{t:r,changeLocale:u,locale:d}=e.inject("i18n"),i=()=>{t.emit("vf-search-exit"),t.emit("vf-fetch",{params:{q:"index",adapter:c.value}}),o("adapter",c.value)};t.on("vf-nodes-selected",m=>{l.value=m.length});const s=e.ref("");return t.on("vf-search-query",({newQuery:m})=>{s.value=m}),(m,g)=>(e.openBlock(),e.createElementBlock("div",Yt,[e.createElementVNode("div",Jt,[e.createElementVNode("div",{class:"mx-2","aria-label":e.unref(r)("Storage"),"data-microtip-position":"top-right",role:"tooltip"},Qt,8,Wt),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":g[0]||(g[0]=h=>e.isRef(c)?c.value=h:null),onChange:i,class:"py-0.5 text-sm text-slate-500 border dark:border-gray-600 dark:text-neutral-50 dark:bg-gray-700 rounded pl-2 pr-8"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.data.storages,h=>(e.openBlock(),e.createElementBlock("option",{value:h},e.toDisplayString(h),9,Zt))),256))],544),[[e.vModelSelect,e.unref(c)]]),e.createElementVNode("div",eo,[s.value.length?(e.openBlock(),e.createElementBlock("span",to,e.toDisplayString(a.data.files.length)+" items found. ",1)):e.createCommentVNode("",!0),e.createElementVNode("span",oo,e.toDisplayString(l.value>0?l.value+" "+e.unref(r)("item(s) selected."):""),1)])]),e.createElementVNode("div",no,[e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":g[1]||(g[1]=h=>e.isRef(d)?d.value=h:null),onChange:g[2]||(g[2]=h=>e.unref(u)(h.target.value)),class:"w-[120px] delay-200 duration-300 hover:w-full transition-[width] py-0.5 text-sm text-slate-500 border dark:border-gray-600 dark:text-neutral-50 dark:bg-gray-700 rounded pl-2 pr-8 mr-3"},[e.createElementVNode("option",ro,e.toDisplayString(e.unref(r)("Language")),1),ao],544),[[e.vModelSelect,e.unref(d)]]),e.createElementVNode("span",{class:"mr-1","aria-label":e.unref(r)("About"),"data-microtip-position":"top-left",role:"tooltip",onClick:g[3]||(g[3]=h=>e.unref(t).emit("vf-modal-show",{type:"about"}))},io,8,lo)])]))}}),mo=(a,t=0,n=!1)=>{let o;return(...l)=>{n&&!o&&a(...l),clearTimeout(o),o=setTimeout(()=>{a(...l)},t)}},po=(a,t,n)=>{const o=e.ref(a);return e.customRef((c,r)=>({get(){return c(),o.value},set:mo(u=>{o.value=u,r()},t,n)}))},vo={class:"flex p-1.5 bg-neutral-100 dark:bg-gray-800 border-t border-b border-neutral-300 dark:border-gray-700/50 items-center select-none text-xs"},fo=["aria-label"],ho=e.createElementVNode("path",{"fill-rule":"evenodd",d:"M5.293 9.707a1 1 0 010-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 01-1.414 1.414L11 7.414V15a1 1 0 11-2 0V7.414L6.707 9.707a1 1 0 01-1.414 0z","clip-rule":"evenodd"},null,-1),go=[ho],ko=["aria-label"],yo=e.createElementVNode("path",{d:"M463.5 224H472c13.3 0 24-10.7 24-24V72c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2L413.4 96.6c-87.6-86.5-228.7-86.2-315.8 1c-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.2s12.5 14.8 22.2 14.8H463.5z"},null,-1),xo=[yo],wo=["aria-label"],_o=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"},null,-1),bo=[_o],Eo=e.createElementVNode("path",{d:"M10.707 2.293a1 1 0 00-1.414 0l-7 7a1 1 0 001.414 1.414L4 10.414V17a1 1 0 001 1h2a1 1 0 001-1v-2a1 1 0 011-1h2a1 1 0 011 1v2a1 1 0 001 1h2a1 1 0 001-1v-6.586l.293.293a1 1 0 001.414-1.414l-7-7z"},null,-1),Vo=[Eo],No={class:"flex leading-5"},$o=e.createElementVNode("span",{class:"text-neutral-300 dark:text-gray-600 mx-0.5"},"/",-1),Bo=["title","onClick"],Co={key:0,class:"animate-spin p-1 h-6 w-6 text-white ml-auto",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},So=e.createElementVNode("circle",{class:"opacity-25 stroke-blue-900 dark:stroke-blue-100",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),Do=e.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1),jo=[So,Do],Mo={key:3,class:"relative flex bg-white dark:bg-gray-700 justify-between items-center rounded p-1 ml-2 w-full"},zo=e.createElementVNode("div",null,[e.createElementVNode("svg",{class:"h-6 w-6 p-1 m-auto stroke-gray-400 fill-gray-100 dark:stroke-gray-400 dark:fill-gray-400/20",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"})])],-1),Oo=["placeholder"],To=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"},null,-1),Fo=[To],Lo={name:"VFBreadcrumb"},Ao=Object.assign(Lo,{props:{data:Object},setup(a){const t=e.inject("emitter");e.inject("storage");const n=e.inject("adapter"),o=e.ref(null),l=e.ref([]),c=e.ref(!1),r=e.ref(null),u=a,{t:d}=e.inject("i18n"),i=e.inject("loadingState");t.on("vf-explorer-update",()=>{let N=[],x=[];o.value=u.data.dirname??n.value+"://",o.value.length==0&&(l.value=[]),o.value.replace(n.value+"://","").split("/").forEach(function(w){N.push(w),N.join("/")!=""&&x.push({basename:w,name:w,path:n.value+"://"+N.join("/"),type:"dir"})}),x.length>4&&(x=x.slice(-5),x[0].name=".."),l.value=x});const s=()=>{c.value=!1,g.value=""};t.on("vf-search-exit",()=>{s()});const m=()=>{c.value=!0,e.nextTick(()=>r.value.focus())},g=po("",400),h=()=>i.value;e.watch(g,N=>{t.emit("vf-toast-clear"),t.emit("vf-search-query",{newQuery:N})});const $=()=>l.value.length&&!c.value,E=N=>{N.preventDefault();let x=JSON.parse(N.dataTransfer.getData("items"));if(x.find(w=>w.storage!=n.value)){alert("Moving items between different storages is not supported yet.");return}t.emit("vf-modal-show",{type:"move",items:{from:x,to:l.value[l.value.length-2]??{path:n.value+"://"}}})},b=N=>{N.preventDefault(),$()?N.dataTransfer.dropEffect="copy":(N.dataTransfer.dropEffect="none",N.dataTransfer.effectAllowed="none")},_=()=>{g.value==""&&s()};return(N,x)=>(e.openBlock(),e.createElementBlock("div",vo,[e.createElementVNode("span",{"aria-label":e.unref(d)("Go up a directory"),"data-microtip-position":"bottom-right",role:"tooltip"},[(e.openBlock(),e.createElementBlock("svg",{onDragover:x[0]||(x[0]=w=>b(w)),onDrop:x[1]||(x[1]=w=>E(w)),onClick:x[2]||(x[2]=w=>{var V;return!$()||e.unref(t).emit("vf-fetch",{params:{q:"index",adapter:a.data.adapter,path:((V=l.value[l.value.length-2])==null?void 0:V.path)??e.unref(n)+"://"}})}),class:e.normalizeClass(["h-6 w-6 p-0.5 rounded",$()?"text-slate-700 hover:bg-neutral-300 dark:text-neutral-200 dark:hover:bg-gray-700 cursor-pointer":"text-gray-400 dark:text-neutral-500"]),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},go,34))],8,fo),h()?(e.openBlock(),e.createElementBlock("span",{key:1,"aria-label":e.unref(d)("Cancel"),"data-microtip-position":"bottom-right",role:"tooltip"},[(e.openBlock(),e.createElementBlock("svg",{onClick:x[4]||(x[4]=w=>e.unref(t).emit("vf-fetch-abort")),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"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"},bo))],8,wo)):(e.openBlock(),e.createElementBlock("span",{key:0,"aria-label":e.unref(d)("Refresh"),"data-microtip-position":"bottom-right",role:"tooltip"},[(e.openBlock(),e.createElementBlock("svg",{onClick:x[3]||(x[3]=w=>{e.unref(t).emit("vf-fetch",{params:{q:"index",adapter:a.data.adapter,path:a.data.dirname}})}),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",xmlns:"http://www.w3.org/2000/svg",viewBox:"-40 -40 580 580",fill:"currentColor"},xo))],8,ko)),c.value?(e.openBlock(),e.createElementBlock("div",Mo,[zo,e.withDirectives(e.createElementVNode("input",{ref_key:"searchInput",ref:r,onKeydown:e.withKeys(s,["esc"]),onBlur:_,"onUpdate:modelValue":x[6]||(x[6]=w=>e.isRef(g)?g.value=w:null),placeholder:e.unref(d)("Search anything.."),class:"w-full pt-1 pb-0 px-2 border-0 text-sm ring-0 outline-0 text-gray-600 focus:ring-transparent focus:border-transparent dark:focus:ring-transparent dark:focus:border-transparent dark:text-gray-300 bg-transparent",type:"text"},null,40,Oo),[[e.vModelText,e.unref(g)]]),(e.openBlock(),e.createElementBlock("svg",{class:"w-6 h-6 cursor-pointer",onClick:s,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},Fo))])):(e.openBlock(),e.createElementBlock("div",{key:2,class:"group flex bg-white dark:bg-gray-700 items-center rounded p-1 ml-2 w-full",onClick:e.withModifiers(m,["self"])},[(e.openBlock(),e.createElementBlock("svg",{onClick:x[5]||(x[5]=w=>e.unref(t).emit("vf-fetch",{params:{q:"index",adapter:a.data.adapter}})),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",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},Vo)),e.createElementVNode("div",No,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(w,V)=>(e.openBlock(),e.createElementBlock("div",{key:V},[$o,e.createElementVNode("span",{class:"px-1.5 py-1 text-slate-700 dark:text-slate-200 hover:bg-neutral-100 dark:hover:bg-gray-800 rounded cursor-pointer",title:w.basename,onClick:S=>e.unref(t).emit("vf-fetch",{params:{q:"index",adapter:a.data.adapter,path:w.path}})},e.toDisplayString(w.name),9,Bo)]))),128))]),h()?(e.openBlock(),e.createElementBlock("svg",Co,jo)):e.createCommentVNode("",!0)]))]))}}),Uo=["onClick"],Ho=e.createElementVNode("span",{class:"px-1"},null,-1),qo={name:"VFContextMenu"},Io=Object.assign(qo,{props:{current:Object},setup(a){const t=e.inject("emitter"),n=e.ref(null),{apiUrl:o}=z(),l=e.inject("root"),c=a,r=e.reactive({active:!1,items:[],positions:{left:0,top:0}}),u=e.ref([]);t.on("vf-context-selected",h=>{u.value=h});const{t:d}=e.inject("i18n"),i={newfolder:{title:()=>d("New Folder"),action:()=>{t.emit("vf-modal-show",{type:"new-folder"})}},delete:{title:()=>d("Delete"),action:()=>{t.emit("vf-modal-show",{type:"delete",items:u})}},refresh:{title:()=>d("Refresh"),action:()=>{t.emit("vf-fetch",{params:{q:"index",adapter:c.current.adapter,path:c.current.dirname}})}},preview:{title:()=>d("Preview"),action:()=>{t.emit("vf-modal-show",{type:"preview",adapter:c.current.adapter,item:u.value[0]})}},open:{title:()=>d("Open"),action:()=>{t.emit("vf-search-exit"),t.emit("vf-fetch",{params:{q:"index",adapter:c.current.adapter,path:u.value[0].path}})}},openDir:{title:()=>d("Open containing folder"),action:()=>{t.emit("vf-search-exit"),t.emit("vf-fetch",{params:{q:"index",adapter:c.current.adapter,path:u.value[0].dir}})}},download:{title:()=>d("Download"),action:()=>{const h=o.value+"?"+L({q:"download",adapter:c.current.adapter,path:u.value[0].path});t.emit("vf-download",h)}},archive:{title:()=>d("Archive"),action:()=>{t.emit("vf-modal-show",{type:"archive",items:u})}},unarchive:{title:()=>d("Unarchive"),action:()=>{t.emit("vf-modal-show",{type:"unarchive",items:u})}},rename:{title:()=>d("Rename"),action:()=>{t.emit("vf-modal-show",{type:"rename",items:u})}}},s=h=>{t.emit("vf-contextmenu-hide"),h.action()},m=e.ref("");t.on("vf-search-query",({newQuery:h})=>{m.value=h}),t.on("vf-contextmenu-show",({event:h,area:$,items:E,target:b=null})=>{if(r.items=[],m.value)if(b)r.items.push(i.openDir),t.emit("vf-context-selected",[b]);else return;else!b&&!m.value?(r.items.push(i.refresh),r.items.push(i.newfolder),t.emit("vf-context-selected",[])):E.length>1&&E.some(_=>_.path===b.path)?(r.items.push(i.refresh),r.items.push(i.archive),r.items.push(i.delete),t.emit("vf-context-selected",E)):(b.type=="dir"?r.items.push(i.open):(r.items.push(i.preview),r.items.push(i.download)),r.items.push(i.rename),b.mime_type=="application/zip"?r.items.push(i.unarchive):r.items.push(i.archive),r.items.push(i.delete),t.emit("vf-context-selected",[b]));g(h,$)}),t.on("vf-contextmenu-hide",()=>{r.active=!1});const g=(h,$)=>{r.active=!0,e.nextTick(()=>{const E=l.value.getBoundingClientRect(),b=$.getBoundingClientRect();let _=h.pageX-E.left,N=h.pageY-E.top,x=n.value.offsetHeight,w=n.value.offsetWidth;_=b.right-h.pageX+window.scrollXr.active?(e.openBlock(),e.createElementBlock("ul",{key:0,class:"z-30 absolute text-xs bg-neutral-50 dark:bg-gray-800 text-gray-700 dark:text-gray-200 border border-neutral-300 dark:border-gray-600 shadow rounded select-none",ref_key:"contextmenu",ref:n,style:e.normalizeStyle(r.positions)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.items,E=>(e.openBlock(),e.createElementBlock("li",{class:"px-2 py-1.5 cursor-pointer hover:bg-neutral-200 dark:hover:bg-gray-700",key:E.title,onClick:b=>s(E)},[Ho,e.createElementVNode("span",null,e.toDisplayString(E.title()),1)],8,Uo))),128))],4)):e.createCommentVNode("",!0)}}),Po=(a,t)=>{const n=a[t];return n?typeof n=="function"?n():Promise.resolve(n):new Promise((o,l)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(l.bind(null,new Error("Unknown variable dynamic import: "+t)))})};async function Ro(a){return(await Po(Object.assign({"../locales/de.js":()=>Promise.resolve().then(()=>require("./de-e4938207.cjs")),"../locales/en.js":()=>Promise.resolve().then(()=>require("./en-39d37375.cjs")),"../locales/fa.js":()=>Promise.resolve().then(()=>require("./fa-64c35e1a.cjs")),"../locales/he.js":()=>Promise.resolve().then(()=>require("./he-6b2ea6a2.cjs")),"../locales/hi.js":()=>Promise.resolve().then(()=>require("./hi-7d3118ac.cjs")),"../locales/ru.js":()=>Promise.resolve().then(()=>require("./ru-f208af8a.cjs")),"../locales/sv.js":()=>Promise.resolve().then(()=>require("./sv-acbe2c28.cjs")),"../locales/tr.js":()=>Promise.resolve().then(()=>require("./tr-2fed3777.cjs")),"../locales/zhCN.js":()=>Promise.resolve().then(()=>require("./zhCN-e25e65b3.cjs")),"../locales/zhTW.js":()=>Promise.resolve().then(()=>require("./zhTW-6a024d5e.cjs"))}),`../locales/${a}.js`)).default}function Ko(a,t,n){const{getStore:o,setStore:l}=Y(a),c=e.ref({}),r=e.ref(o("locale",t)),u=(s,m="en")=>{Ro(s).then(g=>{c.value=g,l("locale",s),r.value=s,l("translations",g),n.emit("vf-toast-push",{label:"The language is set to "+s})}).catch(g=>{m?(n.emit("vf-toast-push",{label:"The selected locale is not yet supported!",type:"error"}),u(m,null)):n.emit("vf-toast-push",{label:"Locale cannot be loaded!",type:"error"})})};o("locale")?c.value=o("translations"):u(t);const d=(s,...m)=>m.length?d(s=s.replace("%s",m.shift()),...m):s;function i(s,...m){return c.value.hasOwnProperty(s)?d(c.value[s],...m):d(s,...m)}return{t:i,changeLocale:u,locale:r}}function Q(a,t,n,o,l){return(t=Math,n=t.log,o=1024,l=n(a)/n(o)|0,a/t.pow(o,l)).toFixed(0)+" "+(l?"KMGTPEZY"[--l]+"iB":"B")}function Z(a,t,n,o,l){return(t=Math,n=t.log,o=1e3,l=n(a)/n(o)|0,a/t.pow(o,l)).toFixed(0)+" "+(l?"KMGTPEZY"[--l]+"B":"B")}function Go(a){const t={k:1,m:2,g:3,t:4},o=/(\d+(?:\.\d+)?)\s?(k|m|g|t)?b?/i.exec(a);return o[1]*Math.pow(1024,t[o[2].toLowerCase()])}const Yo=e.createElementVNode("iframe",{id:"download_frame",style:{display:"none"}},null,-1),Jo={name:"VueFinder"},Wo=Object.assign(Jo,{props:{url:{type:[String]},id:{type:String,default:"vf"},dark:{type:Boolean,default:!1},usePropDarkMode:{type:Boolean,default:!1},locale:{type:String,default:"en"},maxHeight:{type:String,default:"600px"},maxFileSize:{type:String,default:"10mb"},postData:{type:Object,default:{}}},setup(a){const t=a,n=re(),{setStore:o,getStore:l}=Y(t.id),c=e.ref(l("adapter")),r=e.ref(null);e.provide("root",r),e.provide("emitter",n),e.provide("storage",Y(t.id)),e.provide("postData",t.postData),e.provide("adapter",c),e.provide("maxFileSize",t.maxFileSize),e.provide("usePropDarkMode",t.usePropDarkMode);const u=Ko(t.id,t.locale,n);e.provide("i18n",u);const{apiUrl:d,setApiUrl:i}=z();i(t.url);const s=e.reactive({adapter:c.value,storages:[],dirname:".",files:[]}),m=e.ref(l("viewport","grid")),g=t.usePropDarkMode?e.computed(()=>t.dark):e.ref(l("darkMode",t.dark));e.provide("darkMode",g),n.on("vf-darkMode-toggle",()=>{g.value=!g.value,o("darkMode",g.value)});const h=e.ref(l("metricUnits",!1));e.provide("metricUnits",h);const $=e.ref(h.value?Z:Q);e.watch(h,w=>{$.value=w?Z:Q}),e.provide("filesize",$),n.on("vf-metric-units-saved",w=>{h.value=w,o("metricUnits",w)});const E=e.ref(!1);e.provide("loadingState",E);const b=e.ref(l("full-screen",!1));n.on("vf-fullscreen-toggle",()=>{b.value=!b.value,o("full-screen",b.value)}),n.on("vf-view-toggle",w=>{m.value=w});const _=e.reactive({active:!1,type:"delete",data:{}});n.on("vf-modal-close",()=>{_.active=!1}),n.on("vf-modal-show",w=>{_.active=!0,_.type=w.type,_.data=w});const N=w=>{Object.assign(s,w),n.emit("vf-nodes-selected",{}),n.emit("vf-explorer-update")};let x;return n.on("vf-fetch-abort",()=>{x.abort(),E.value=!1}),n.on("vf-fetch",({params:w,onSuccess:V=null,onError:S=null,noCloseModal:B=!1})=>{["index","search"].includes(w.q)&&(x&&x.abort(),E.value=!0),x=new AbortController;const T=x.signal;R(d.value,{params:w,signal:T}).then(j=>{c.value=j.adapter,["index","search"].includes(w.q)&&(E.value=!1),B||n.emit("vf-modal-close"),N(j),V(j)}).catch(j=>{S&&S(j)}).finally(()=>{})}),n.on("vf-download",w=>{document.getElementById("download_frame").src=w,n.emit("vf-modal-close")}),e.onMounted(()=>{n.emit("vf-fetch",{params:{q:"index",adapter:c.value}})}),(w,V)=>(e.openBlock(),e.createElementBlock("div",{class:"vuefinder",ref_key:"root",ref:r},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(g)?"dark":"")},[e.createElementVNode("div",{class:e.normalizeClass([b.value?"fixed w-screen inset-0 z-20":"relative rounded-md","border flex flex-col bg-white dark:bg-gray-800 text-gray-700 dark:text-neutral-400 border-neutral-300 dark:border-gray-900 min-w-min select-none"]),style:e.normalizeStyle(b.value?"":"max-height: "+a.maxHeight),onMousedown:V[0]||(V[0]=S=>e.unref(n).emit("vf-contextmenu-hide")),onTouchstart:V[1]||(V[1]=S=>e.unref(n).emit("vf-contextmenu-hide"))},[e.createVNode(Je,{data:s},null,8,["data"]),e.createVNode(Ao,{data:s},null,8,["data"]),e.createVNode(Gt,{view:m.value,data:s},null,8,["view","data"]),e.createVNode(uo,{data:s},null,8,["data"])],38),_.active?(e.openBlock(),e.createBlock(e.resolveDynamicComponent("v-f-modal-"+_.type),{key:0,selection:_.data,current:s},null,8,["selection","current"])):e.createCommentVNode("",!0),e.createVNode(Io,{current:s},null,8,["current"]),Yo],2)],512))}}),Xo=e.createElementVNode("div",{class:"fixed inset-0 bg-gray-500 dark:bg-gray-600 dark:bg-opacity-75 bg-opacity-75 transition-opacity"},null,-1),Qo={class:"fixed z-10 inset-0 overflow-hidden"},Zo={class:"relative bg-white dark:bg-gray-800 rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:max-w-4xl md:max-w-2xl lg:max-w-3xl xl:max-w-5xl w-full"},en={class:"bg-white dark:bg-gray-800 px-4 pt-5 pb-4 sm:p-6 sm:pb-4"},tn={class:"bg-gray-50 dark:bg-gray-800 dark:border-t dark:border-gray-700 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse"},M={__name:"ModalLayout",setup(a){const t=e.inject("emitter");return e.onMounted(()=>{const n=document.querySelector(".v-f-modal input");n&&n.focus()}),(n,o)=>(e.openBlock(),e.createElementBlock("div",{class:"v-f-modal relative z-30","aria-labelledby":"modal-title",role:"dialog","aria-modal":"true",onKeyup:o[1]||(o[1]=e.withKeys(l=>e.unref(t).emit("vf-modal-close"),["esc"])),tabindex:"0"},[Xo,e.createElementVNode("div",Qo,[e.createElementVNode("div",{class:"flex items-end sm:items-center justify-center min-h-full p-4 text-center sm:p-0",onMousedown:o[0]||(o[0]=e.withModifiers(l=>e.unref(t).emit("vf-modal-close"),["self"]))},[e.createElementVNode("div",Zo,[e.createElementVNode("div",en,[e.renderSlot(n.$slots,"default")]),e.createElementVNode("div",tn,[e.renderSlot(n.$slots,"buttons")])])],32)])],32))}},on=["aria-label"],nn=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-5 h-5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1),rn=[nn],an={name:"Message"},O=Object.assign(an,{props:{error:{type:Boolean,default:!1}},emits:["hidden"],setup(a,{emit:t}){var d;const{t:n}=e.inject("i18n"),o=e.ref(!1),l=e.ref(null),c=e.ref((d=l.value)==null?void 0:d.strMessage),r=t;e.watch(c,()=>o.value=!1);const u=()=>{r("hidden"),o.value=!0};return(i,s)=>(e.openBlock(),e.createElementBlock("div",null,[o.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"strMessage",ref:l,class:e.normalizeClass(["flex mt-2 p-1 px-2 rounded text-sm break-all dark:opacity-75",a.error?"bg-red-100 text-red-600 ":"bg-emerald-100 text-emerald-600"])},[e.renderSlot(i.$slots,"default"),e.createElementVNode("div",{class:"ml-auto cursor-pointer",onClick:u,"aria-label":e.unref(n)("Close"),"data-microtip-position":"top-left",role:"tooltip"},rn,8,on)],2))]))}}),ln={class:"sm:flex sm:items-start"},sn=e.createElementVNode("div",{class:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 stroke-red-600 dark:stroke-red-200",fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})])],-1),cn={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},dn={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},un={class:"mt-2"},mn={class:"text-sm text-gray-500"},pn={class:"text-gray-500 text-sm mb-1 overflow-auto vf-scrollbar",style:{"max-height":"200px"}},vn={class:"flex text-sm text-gray-800 dark:text-gray-400"},fn={key:0,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},hn=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),gn=[hn],kn={key:1,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},yn=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),xn=[yn],wn={class:"ml-1.5"},_n={class:"m-auto font-bold text-red-500 text-sm dark:text-red-200 text-center"},bn={name:"VFModalDelete"},En=Object.assign(bn,{props:{selection:Object,current:Object},setup(a){const t=e.inject("emitter");e.inject("storage");const n=e.inject("adapter"),{t:o}=e.inject("i18n"),l=a,c=e.ref(l.selection.items),r=e.ref(""),u=()=>{c.value.length&&t.emit("vf-fetch",{params:{q:"delete",adapter:n.value,path:l.current.dirname,items:JSON.stringify(c.value.map(({path:d,type:i})=>({path:d,type:i})))},onSuccess:()=>{t.emit("vf-toast-push",{label:o("Files deleted.")})},onError:d=>{r.value=o(d.message)}})};return(d,i)=>(e.openBlock(),e.createBlock(M,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:u,class:"vf-btn vf-btn-danger"},e.toDisplayString(e.unref(o)("Yes, Delete!")),1),e.createElementVNode("button",{type:"button",onClick:i[1]||(i[1]=s=>e.unref(t).emit("vf-modal-close")),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Cancel")),1),e.createElementVNode("div",_n,e.toDisplayString(e.unref(o)("This action cannot be undone.")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",ln,[sn,e.createElementVNode("div",cn,[e.createElementVNode("h3",dn,e.toDisplayString(e.unref(o)("Delete files")),1),e.createElementVNode("div",un,[e.createElementVNode("p",mn,e.toDisplayString(e.unref(o)("Are you sure you want to delete these files?")),1),e.createElementVNode("div",pn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,s=>(e.openBlock(),e.createElementBlock("p",vn,[s.type==="dir"?(e.openBlock(),e.createElementBlock("svg",fn,gn)):(e.openBlock(),e.createElementBlock("svg",kn,xn)),e.createElementVNode("span",wn,e.toDisplayString(s.basename),1)]))),256))]),r.value.length?(e.openBlock(),e.createBlock(O,{key:0,onHidden:i[0]||(i[0]=s=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}}),Vn={class:"sm:flex sm:items-start"},Nn=e.createElementVNode("div",{class:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 stroke-blue-600 dark:stroke-blue-100",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})])],-1),$n={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},Bn={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},Cn={class:"mt-2"},Sn={class:"text-sm text-gray-500"},Dn={name:"VFModalMessage"},jn=Object.assign(Dn,{props:{selection:Object},setup(a){const t=e.inject("emitter"),{t:n}=e.inject("i18n");return(o,l)=>(e.openBlock(),e.createBlock(M,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:l[0]||(l[0]=c=>e.unref(t).emit("vf-modal-close")),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(n)("Close")),1)]),default:e.withCtx(()=>{var c,r;return[e.createElementVNode("div",Vn,[Nn,e.createElementVNode("div",$n,[e.createElementVNode("h3",Bn,e.toDisplayString(((c=a.selection)==null?void 0:c.title)??"Title"),1),e.createElementVNode("div",Cn,[e.createElementVNode("p",Sn,e.toDisplayString(((r=a.selection)==null?void 0:r.message)??"Message"),1)])])])]}),_:1}))}}),Mn={class:"sm:flex sm:items-start"},zn=e.createElementVNode("div",{class:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 stroke-blue-600 dark:stroke-blue-100",fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 13h6m-3-3v6m-9 1V7a2 2 0 012-2h6l2 2h6a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2z"})])],-1),On={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},Tn={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},Fn={class:"mt-2"},Ln={class:"text-sm text-gray-500"},An=["placeholder"],Un={name:"VFModalNewFolder"},Hn=Object.assign(Un,{props:{selection:Object,current:Object},setup(a){const t=e.inject("emitter");e.inject("storage");const n=e.inject("adapter"),{t:o}=e.inject("i18n"),l=a,c=e.ref(""),r=e.ref(""),u=()=>{c.value!=""&&t.emit("vf-fetch",{params:{q:"newfolder",adapter:n.value,path:l.current.dirname,name:c.value},onSuccess:()=>{t.emit("vf-toast-push",{label:o("%s is created.",c.value)})},onError:d=>{r.value=o(d.message)}})};return(d,i)=>(e.openBlock(),e.createBlock(M,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:u,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(o)("Create")),1),e.createElementVNode("button",{type:"button",onClick:i[2]||(i[2]=s=>e.unref(t).emit("vf-modal-close")),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",Mn,[zn,e.createElementVNode("div",On,[e.createElementVNode("h3",Tn,e.toDisplayString(e.unref(o)("New Folder")),1),e.createElementVNode("div",Fn,[e.createElementVNode("p",Ln,e.toDisplayString(e.unref(o)("Create a new folder")),1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":i[0]||(i[0]=s=>c.value=s),onKeyup:e.withKeys(u,["enter"]),class:"px-2 py-1 border rounded dark:bg-gray-700/25 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:text-gray-100 w-full",placeholder:e.unref(o)("Folder Name"),type:"text"},null,40,An),[[e.vModelText,c.value]]),r.value.length?(e.openBlock(),e.createBlock(O,{key:0,onHidden:i[1]||(i[1]=s=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}}),qn={class:"sm:flex sm:items-start"},In=e.createElementVNode("div",{class:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 stroke-blue-600 dark:stroke-blue-100",fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 13h6m-3-3v6m5 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})])],-1),Pn={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},Rn={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},Kn={class:"mt-2"},Gn={class:"text-sm text-gray-500"},Yn=["placeholder"],Jn={name:"VFModalNewFile"},Wn=Object.assign(Jn,{props:{selection:Object,current:Object},setup(a){const t=e.inject("emitter");e.inject("storage");const n=e.inject("adapter"),{t:o}=e.inject("i18n"),l=a,c=e.ref(""),r=e.ref(""),u=()=>{c.value!=""&&t.emit("vf-fetch",{params:{q:"newfile",adapter:n.value,path:l.current.dirname,name:c.value},onSuccess:()=>{t.emit("vf-toast-push",{label:o("%s is created.",c.value)})},onError:d=>{r.value=o(d.message)}})};return(d,i)=>(e.openBlock(),e.createBlock(M,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:u,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(o)("Create")),1),e.createElementVNode("button",{type:"button",onClick:i[2]||(i[2]=s=>e.unref(t).emit("vf-modal-close")),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",qn,[In,e.createElementVNode("div",Pn,[e.createElementVNode("h3",Rn,e.toDisplayString(e.unref(o)("New File")),1),e.createElementVNode("div",Kn,[e.createElementVNode("p",Gn,e.toDisplayString(e.unref(o)("Create a new file")),1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":i[0]||(i[0]=s=>c.value=s),onKeyup:e.withKeys(u,["enter"]),class:"px-2 py-1 border rounded dark:bg-gray-700/25 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:text-gray-100 w-full",placeholder:e.unref(o)("File Name"),type:"text"},null,40,Yn),[[e.vModelText,c.value]]),r.value.length?(e.openBlock(),e.createBlock(O,{key:0,onHidden:i[1]||(i[1]=s=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}}),Xn={class:"flex"},Qn=["aria-label"],Zn={class:"ml-auto mb-2"},er={key:0,class:"p-2 border font-normal whitespace-pre-wrap border-gray-200 dark:border-gray-700/50 dark:text-gray-200 rounded min-h-[200px] max-h-[60vh] text-xs overflow-auto"},tr={key:1},or={__name:"Text",props:{selection:Object},emits:["load"],setup(a,{emit:t}){const n=t,o=e.ref(""),l=e.ref(""),c=e.ref(null),r=e.ref(!1),{apiUrl:u}=z(),d=a,i=e.ref(""),s=e.ref(!1),{t:m}=e.inject("i18n");e.onMounted(()=>{R(u.value,{params:{q:"preview",adapter:d.selection.adapter,path:d.selection.item.path},json:!1}).then(E=>{o.value=E,n("load")})});const g=()=>{r.value=!r.value,l.value=o.value,r.value==!0&&e.nextTick(()=>{c.value.focus()})},h=e.inject("postData"),$=()=>{i.value="",s.value=!1,R(u.value,{method:"POST",params:Object.assign(h,{q:"save",adapter:d.selection.adapter,path:d.selection.item.path,content:l.value}),json:!1}).then(E=>{i.value=m("Updated."),o.value=E,n("load"),r.value=!r.value}).catch(E=>{i.value=m(E.message),s.value=!0})};return(E,b)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Xn,[e.createElementVNode("div",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title","aria-label":a.selection.item.path,"data-microtip-position":"bottom-right",role:"tooltip"},e.toDisplayString(a.selection.item.basename),9,Qn),e.createElementVNode("div",Zn,[r.value?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:$,class:"ml-1 px-2 py-1 rounded border border-transparent shadow-sm bg-blue-700/75 hover:bg-blue-700 dark:bg-gray-700 dark:hover:bg-gray-700/50 text-base font-medium text-white sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(m)("Save")),1)):e.createCommentVNode("",!0),e.createElementVNode("button",{class:"ml-1 px-2 py-1 text-blue-500",onClick:b[0]||(b[0]=_=>g())},e.toDisplayString(r.value?e.unref(m)("Cancel"):e.unref(m)("Edit")),1)])]),e.createElementVNode("div",null,[r.value?(e.openBlock(),e.createElementBlock("div",tr,[e.withDirectives(e.createElementVNode("textarea",{ref_key:"editInput",ref:c,"onUpdate:modelValue":b[1]||(b[1]=_=>l.value=_),class:"w-full p-2 rounded dark:bg-gray-700 dark:text-gray-200 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:selection:bg-gray-500 min-h-[200px] max-h-[60vh] text-xs",name:"text",id:"",cols:"30",rows:"10"},null,512),[[e.vModelText,l.value]])])):(e.openBlock(),e.createElementBlock("pre",er,e.toDisplayString(o.value),1)),i.value.length?(e.openBlock(),e.createBlock(O,{key:2,onHidden:b[2]||(b[2]=_=>i.value=""),error:s.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value),1)]),_:1},8,["error"])):e.createCommentVNode("",!0)])],64))}},nr={class:"flex"},rr=["aria-label"],ar={class:"ml-auto mb-2"},lr={class:"w-full flex justify-center"},sr=["src"],ir={__name:"Image",props:{selection:Object},emits:["load"],setup(a,{emit:t}){const n=t,o=a,{t:l}=e.inject("i18n"),{apiUrl:c}=z(),r=e.ref(null),u=e.ref(null),d=e.ref(!1),i=e.ref(""),s=e.ref(!1),m=()=>{d.value=!d.value,d.value?u.value=new se(r.value,{crop($){}}):u.value.destroy()},g=e.inject("postData"),h=()=>{u.value.getCroppedCanvas({width:795,height:341}).toBlob($=>{i.value="",s.value=!1,R(c.value,{method:"POST",params:Object.assign(g,{q:"upload",adapter:o.selection.adapter,path:o.selection.item.path,file:$}),name:o.selection.item.basename,json:!1}).then(E=>{i.value=l("Updated."),r.value.src=J(o.selection.adapter,o.selection.item.path),m(),n("load")}).catch(E=>{i.value=l(E.message),s.value=!0})})};return e.onMounted(()=>{n("load")}),($,E)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",nr,[e.createElementVNode("h3",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title","aria-label":a.selection.item.path,"data-microtip-position":"bottom-right",role:"tooltip"},e.toDisplayString(a.selection.item.basename),9,rr),e.createElementVNode("div",ar,[d.value?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:h,class:"ml-1 px-2 py-1 rounded border border-transparent shadow-sm bg-blue-700/75 hover:bg-blue-700 dark:bg-gray-700 dark:hover:bg-gray-700/50 text-base font-medium text-white sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(l)("Crop")),1)):e.createCommentVNode("",!0),e.createElementVNode("button",{class:"ml-1 px-2 py-1 text-blue-500",onClick:E[0]||(E[0]=b=>m())},e.toDisplayString(d.value?e.unref(l)("Cancel"):e.unref(l)("Edit")),1)])]),e.createElementVNode("div",lr,[e.createElementVNode("img",{ref_key:"image",ref:r,class:"max-w-[50vh] max-h-[50vh]",src:e.unref(J)(o.selection.adapter,o.selection.item.path),alt:""},null,8,sr)]),i.value.length?(e.openBlock(),e.createBlock(O,{key:0,onHidden:E[1]||(E[1]=b=>i.value=""),error:s.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value),1)]),_:1},8,["error"])):e.createCommentVNode("",!0)],64))}},cr={class:"flex"},dr=["aria-label"],ur=e.createElementVNode("div",null,null,-1),mr={__name:"Default",props:{selection:Object},emits:["load"],setup(a,{emit:t}){const n=t;return e.onMounted(()=>{n("load")}),(o,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",cr,[e.createElementVNode("h3",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title","aria-label":a.selection.item.path,"data-microtip-position":"bottom-right",role:"tooltip"},e.toDisplayString(a.selection.item.basename),9,dr)]),ur],64))}},pr=["aria-label"],vr={class:"w-full",preload:"",controls:""},fr=["src"],hr={__name:"Video",props:{selection:Object},emits:["load"],setup(a,{emit:t}){const{apiUrl:n}=z(),o=a,l=t,c=()=>n.value+"?"+L({q:"preview",adapter:o.selection.adapter,path:o.selection.item.path});return e.onMounted(()=>{l("load")}),(r,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("h3",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title","aria-label":a.selection.item.path,"data-microtip-position":"bottom-right",role:"tooltip"},e.toDisplayString(a.selection.item.basename),9,pr),e.createElementVNode("div",null,[e.createElementVNode("video",vr,[e.createElementVNode("source",{src:c(),type:"video/mp4"},null,8,fr),e.createTextVNode(" Your browser does not support the video tag. ")])])],64))}},gr=["aria-label"],kr={class:"w-full",controls:""},yr=["src"],xr={__name:"Audio",props:{selection:Object},emits:["load"],setup(a,{emit:t}){const{apiUrl:n}=z(),o=a,l=t,c=()=>n.value+"?"+L({q:"preview",adapter:o.selection.adapter,path:o.selection.item.path});return e.onMounted(()=>{l("load")}),(r,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("h3",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title","aria-label":a.selection.item.path,"data-microtip-position":"bottom-right",role:"tooltip"},e.toDisplayString(a.selection.item.basename),9,gr),e.createElementVNode("div",null,[e.createElementVNode("audio",kr,[e.createElementVNode("source",{src:c(),type:"audio/mpeg"},null,8,yr),e.createTextVNode(" Your browser does not support the audio element. ")])])],64))}},wr=["aria-label"],_r=["data"],br=["src"],Er=e.createElementVNode("p",null,[e.createTextVNode(" Your browser does not support PDFs. "),e.createElementVNode("a",{href:"https://example.com/test.pdf"},"Download the PDF"),e.createTextVNode(" . ")],-1),Vr=[Er],Nr={__name:"Pdf",props:{selection:Object},emits:["load"],setup(a,{emit:t}){const{apiUrl:n}=z(),o=a,l=t,c=()=>n.value+"?"+L({q:"preview",adapter:o.selection.adapter,path:o.selection.item.path});return e.onMounted(()=>{l("load")}),(r,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("h3",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title","aria-label":a.selection.item.path,"data-microtip-position":"bottom-right",role:"tooltip"},e.toDisplayString(a.selection.item.basename),9,wr),e.createElementVNode("div",null,[e.createElementVNode("object",{class:"h-[60vh]",data:c(),type:"application/pdf",width:"100%",height:"100%"},[e.createElementVNode("iframe",{class:"border-0",src:c(),width:"100%",height:"100%"},Vr,8,br)],8,_r)])],64))}},$r={class:"sm:flex sm:items-start"},Br={class:"mt-3 text-center sm:mt-0 sm:text-left w-full"},Cr={class:"text-gray-700 dark:text-gray-200 text-sm"},Sr={key:0,class:"flex leading-5"},Dr=e.createElementVNode("svg",{class:"animate-spin -ml-1 mr-3 h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[e.createElementVNode("circle",{class:"opacity-25 stroke-blue-900 dark:stroke-blue-100",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1),jr={class:"py-2 flex font-normal break-all dark:text-gray-200 rounded text-xs"},Mr={class:"font-bold pl-2"},zr={class:"font-bold pl-2"},Or={name:"VFModalPreview"},Tr=Object.assign(Or,{props:{selection:Object},setup(a){const{apiUrl:t}=z(),n=e.inject("emitter"),{t:o}=e.inject("i18n"),l=e.ref(!1),c=e.inject("filesize"),r=s=>l.value=s,u=a,d=s=>(u.selection.item.mime_type??"").startsWith(s),i=()=>{const s=t.value+"?"+L({q:"download",adapter:u.selection.adapter,path:u.selection.item.path});n.emit("vf-download",s)};return(s,m)=>(e.openBlock(),e.createBlock(M,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:m[6]||(m[6]=g=>e.unref(n).emit("vf-modal-close")),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Close")),1),e.createElementVNode("button",{type:"button",onClick:m[7]||(m[7]=g=>i()),class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(o)("Download")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",$r,[e.createElementVNode("div",Br,[e.createElementVNode("div",null,[d("text")?(e.openBlock(),e.createBlock(or,{key:0,selection:a.selection,onLoad:m[0]||(m[0]=g=>r(!0))},null,8,["selection"])):d("image")?(e.openBlock(),e.createBlock(ir,{key:1,selection:a.selection,onLoad:m[1]||(m[1]=g=>r(!0))},null,8,["selection"])):d("video")?(e.openBlock(),e.createBlock(hr,{key:2,selection:a.selection,onLoad:m[2]||(m[2]=g=>r(!0))},null,8,["selection"])):d("audio")?(e.openBlock(),e.createBlock(xr,{key:3,selection:a.selection,onLoad:m[3]||(m[3]=g=>r(!0))},null,8,["selection"])):d("application/pdf")?(e.openBlock(),e.createBlock(Nr,{key:4,selection:a.selection,onLoad:m[4]||(m[4]=g=>r(!0))},null,8,["selection"])):(e.openBlock(),e.createBlock(mr,{key:5,selection:a.selection,onLoad:m[5]||(m[5]=g=>r(!0))},null,8,["selection"]))]),e.createElementVNode("div",Cr,[l.value==!1?(e.openBlock(),e.createElementBlock("div",Sr,[Dr,e.createElementVNode("span",null,e.toDisplayString(e.unref(o)("Loading")),1)])):e.createCommentVNode("",!0)])])]),e.createElementVNode("div",jr,[e.createElementVNode("div",null,[e.createElementVNode("span",Mr,e.toDisplayString(e.unref(o)("File Size"))+": ",1),e.createTextVNode(e.toDisplayString(e.unref(c)(a.selection.item.file_size)),1)]),e.createElementVNode("div",null,[e.createElementVNode("span",zr,e.toDisplayString(e.unref(o)("Last Modified"))+": ",1),e.createTextVNode(" "+e.toDisplayString(e.unref(oe)(a.selection.item.last_modified)),1)])])]),_:1}))}}),Fr={class:"sm:flex sm:items-start"},Lr=e.createElementVNode("div",{class:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 stroke-blue-600 dark:stroke-blue-100",fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})])],-1),Ar={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},Ur={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},Hr={class:"mt-2"},qr={class:"flex text-sm text-gray-800 dark:text-gray-400 py-2"},Ir={key:0,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Pr=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),Rr=[Pr],Kr={key:1,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Gr=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),Yr=[Gr],Jr={class:"ml-1.5"},Wr={name:"VFModalRename"},Xr=Object.assign(Wr,{props:{selection:Object,current:Object},setup(a){const t=e.inject("emitter");e.inject("storage");const n=e.inject("adapter"),{t:o}=e.inject("i18n"),l=a,c=e.ref(l.selection.items[0]),r=e.ref(l.selection.items[0].basename),u=e.ref(""),d=()=>{r.value!=""&&t.emit("vf-fetch",{params:{q:"rename",adapter:n.value,path:l.current.dirname,item:c.value.path,name:r.value},onSuccess:()=>{t.emit("vf-toast-push",{label:o("%s is renamed.",r.value)})},onError:i=>{u.value=o(i.message)}})};return(i,s)=>(e.openBlock(),e.createBlock(M,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:d,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(o)("Rename")),1),e.createElementVNode("button",{type:"button",onClick:s[2]||(s[2]=m=>e.unref(t).emit("vf-modal-close")),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",Fr,[Lr,e.createElementVNode("div",Ar,[e.createElementVNode("h3",Ur,e.toDisplayString(e.unref(o)("Rename")),1),e.createElementVNode("div",Hr,[e.createElementVNode("p",qr,[c.value.type=="dir"?(e.openBlock(),e.createElementBlock("svg",Ir,Rr)):(e.openBlock(),e.createElementBlock("svg",Kr,Yr)),e.createElementVNode("span",Jr,e.toDisplayString(c.value.basename),1)]),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":s[0]||(s[0]=m=>r.value=m),onKeyup:e.withKeys(d,["enter"]),class:"px-2 py-1 border rounded dark:bg-gray-700/25 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:text-gray-100 w-full",placeholder:"Name",type:"text"},null,544),[[e.vModelText,r.value]]),u.value.length?(e.openBlock(),e.createBlock(O,{key:0,onHidden:s[1]||(s[1]=m=>u.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}}),Qr={class:"sm:flex sm:items-start"},Zr=e.createElementVNode("div",{class:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 stroke-blue-600 dark:stroke-blue-100",fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})])],-1),ea={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},ta={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},oa={class:"mt-2"},na={key:0,class:"pointer-events-none"},ra={key:1,class:"pointer-events-none"},aa=["disabled"],la=["disabled"],sa={class:"text-gray-500 text-sm mb-1 pr-1 max-h-[200px] overflow-y-auto vf-scrollbar"},ia={class:"rounded flex flex-shrink-0 w-6 h-6 border bg-gray-50 text-xs cursor-default dark:border-gray-700 dark:bg-gray-800 dark:text-gray-50"},ca=["textContent"],da={class:"ml-1 w-full h-fit"},ua={class:"text-left hidden md:block"},ma={class:"text-left md:hidden"},pa={key:0,class:"ml-auto"},va=["title","disabled","onClick"],fa=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-5 h-5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1),ha=[fa],ga={key:0,class:"py-2"},ka=["disabled"],ya={name:"VFModalUpload"},xa=Object.assign(ya,{props:{current:Object},setup(a){const{apiUrl:t}=z(),n=e.inject("emitter"),{t:o}=e.inject("i18n"),l=e.inject("maxFileSize"),c=e.inject("postData"),r=e.inject("filesize"),u=a,d=o("uppy"),i={PENDING:0,CANCELED:1,UPLOADING:2,ERROR:3,DONE:10},s=e.ref({QUEUE_ENTRY_STATUS:i}),m=e.ref(null),g=e.ref(null),h=e.ref(null),$=e.ref(null),E=e.ref(null),b=e.ref(null),_=e.ref([]),N=e.ref(""),x=e.ref(!1),w=e.ref(!1);let V;function S(f){return _.value.findIndex(p=>p.id===f)}function B(f,p=null){p=p??(f.webkitRelativePath||f.name),V.addFile({name:p,type:f.type,data:f,source:"Local"})}function T(f){switch(f.status){case i.DONE:return"text-green-600";case i.ERROR:return"text-red-600";case i.CANCELED:return"text-red-600";case i.PENDING:default:return""}}const j=f=>{switch(f.status){case i.DONE:return"✓";case i.ERROR:case i.CANCELED:return"!";case i.PENDING:default:return"..."}};function F(){$.value.click()}function U(){if(!x.value){if(!_.value.filter(f=>f.status!==i.DONE).length){N.value=o("Please select file to upload first.");return}N.value="",V.retryAll(),V.upload()}}function H(){V.cancelAll({reason:"user"}),_.value.forEach(f=>{f.status!==i.DONE&&(f.status=i.CANCELED,f.statusName=o("Canceled"))}),x.value=!1}function A(f){x.value||(V.removeFile(f.id,"removed-by-user"),_.value.splice(S(f.id),1))}function q(f){if(!x.value){if(V.cancelAll({reason:"user"}),f){const p=[];_.value.forEach(v=>{v.status!==i.DONE&&p.push(v)}),_.value=[],p.forEach(v=>{B(v.originalFile,v.name)});return}_.value.splice(0)}}function y(){n.emit("vf-modal-close")}return e.onMounted(async()=>{V=new ie({debug:process.env.NODE_ENV==="development",restrictions:{maxFileSize:Go(l)},locale:d,onBeforeFileAdded(v,k){if(k[v.id]!=null){const D=S(v.id);_.value[D].status===i.PENDING&&(N.value=V.i18n("noDuplicates",{fileName:v.name})),_.value=_.value.filter(K=>K.id!==v.id)}return _.value.push({id:v.id,name:v.name,size:r.value(v.size),status:i.PENDING,statusName:o("Pending upload"),percent:null,originalFile:v.data}),!0}}),V.use(ce,{method:"post",endpoint:t.value+"?"+L(Object.assign(c,{q:"upload",adapter:u.current.adapter,path:u.current.dirname})),headers:{...P&&{"X-CSRF-Token":P}},limit:5,timeout:0,getResponseError(v,k){let C;try{C=JSON.parse(v).message}catch{C=o("Cannot parse server response.")}return new Error(C)}}),V.on("restriction-failed",(v,k)=>{const C=_.value[S(v.id)];A(C),N.value=k.message}),V.on("upload",()=>{x.value=!0,_.value.forEach(v=>{v.status!==i.DONE&&(v.percent=null,v.status=i.UPLOADING,v.statusName=o("Pending upload"))})}),V.on("upload-progress",(v,k)=>{const C=Math.floor(k.bytesUploaded/k.bytesTotal*100);_.value[S(v.id)].percent=`${C}%`}),V.on("upload-success",v=>{const k=_.value[S(v.id)];k.status=i.DONE,k.statusName=o("Done")}),V.on("upload-error",(v,k)=>{const C=_.value[S(v.id)];C.percent=null,C.status=i.ERROR,k.isNetworkError?C.statusName=o("Network Error, Unable establish connection to the server or interrupted."):C.statusName=k?k.message:o("Unknown Error")}),V.on("error",v=>{N.value=v.message,x.value=!1,n.emit("vf-fetch",{params:{q:"index",adapter:u.current.adapter,path:u.current.dirname},noCloseModal:!0})}),V.on("complete",()=>{x.value=!1,n.emit("vf-fetch",{params:{q:"index",adapter:u.current.adapter,path:u.current.dirname},noCloseModal:!0})}),$.value.addEventListener("click",()=>{g.value.click()}),E.value.addEventListener("click",()=>{h.value.click()}),b.value.addEventListener("dragover",v=>{v.preventDefault(),w.value=!0}),b.value.addEventListener("dragleave",v=>{v.preventDefault(),w.value=!1});function f(v,k){k.isFile&&k.file(C=>v(k,C)),k.isDirectory&&k.createReader().readEntries(C=>{C.forEach(D=>{f(v,D)})})}b.value.addEventListener("drop",v=>{v.preventDefault(),w.value=!1;const k=/^[/\\](.+)/;[...v.dataTransfer.items].forEach(C=>{C.kind==="file"&&f((D,K)=>{const ne=k.exec(D.fullPath);B(K,ne[1])},C.webkitGetAsEntry())})});const p=({target:v})=>{const k=v.files;for(const C of k)B(C)};g.value.addEventListener("change",p),h.value.addEventListener("change",p)}),e.onBeforeUnmount(()=>{V==null||V.close({reason:"unmount"})}),(f,p)=>(e.openBlock(),e.createBlock(M,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["vf-btn vf-btn-primary",x.value?"bg-blue-200 hover:bg-blue-200 dark:bg-gray-700/50 dark:hover:bg-gray-700/50 dark:text-gray-500":"bg-blue-600 hover:bg-blue-700 dark:bg-gray-700 dark:hover:bg-gray-500"]),disabled:x.value,onClick:e.withModifiers(U,["prevent"])},e.toDisplayString(e.unref(o)("Upload")),11,ka),x.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"vf-btn vf-btn-secondary",onClick:e.withModifiers(H,["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(y,["prevent"])},e.toDisplayString(e.unref(o)("Close")),1))]),default:e.withCtx(()=>[e.createElementVNode("div",Qr,[Zr,e.createElementVNode("div",ea,[e.createElementVNode("h3",ta,e.toDisplayString(e.unref(o)("Upload Files")),1),e.createElementVNode("div",oa,[e.createElementVNode("div",{ref_key:"dropArea",ref:b,class:"flex items-center justify-center text-lg mb-4 text-gray-500 border-2 border-gray-300 rounded border-dashed select-none cursor-pointer dark:border-gray-600 h-[120px]",onClick:F},[w.value?(e.openBlock(),e.createElementBlock("div",na,e.toDisplayString(e.unref(o)("Release to drop these files.")),1)):(e.openBlock(),e.createElementBlock("div",ra,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:m,class:"text-gray-500 mb-1"},[e.createElementVNode("button",{ref_key:"pickFiles",ref:$,type:"button",class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Select Files")),513),e.createElementVNode("button",{ref_key:"pickFolders",ref:E,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:x.value,onClick:p[0]||(p[0]=v=>q(!1))},e.toDisplayString(e.unref(o)("Clear all")),9,aa),e.createElementVNode("button",{type:"button",class:"vf-btn vf-btn-secondary",disabled:x.value,onClick:p[1]||(p[1]=v=>q(!0))},e.toDisplayString(e.unref(o)("Clear only successful")),9,la)],512),e.createElementVNode("div",sa,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,v=>(e.openBlock(),e.createElementBlock("div",{class:"flex hover:bg-gray-100 dark:hover:bg-gray-800 dark:hover:text-gray-300",key:v.id},[e.createElementVNode("span",ia,[e.createElementVNode("span",{class:e.normalizeClass(["text-base m-auto",T(v)]),textContent:e.toDisplayString(j(v))},null,10,ca)]),e.createElementVNode("div",da,[e.createElementVNode("div",ua,e.toDisplayString(e.unref(W)(v.name,40))+" ("+e.toDisplayString(v.size)+")",1),e.createElementVNode("div",ma,e.toDisplayString(e.unref(W)(v.name,16))+" ("+e.toDisplayString(v.size)+")",1),e.createElementVNode("div",{class:e.normalizeClass(["flex break-all text-left",T(v)])},[e.createTextVNode(e.toDisplayString(v.statusName)+" ",1),v.status===s.value.QUEUE_ENTRY_STATUS.UPLOADING?(e.openBlock(),e.createElementBlock("b",pa,e.toDisplayString(v.percent),1)):e.createCommentVNode("",!0)],2)]),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["rounded w-5 h-5 border-1 text-base leading-none font-medium focus:outline-none dark:border-gray-200 dark:text-gray-400 dark:hover:text-gray-200 dark:bg-gray-600 ml-auto sm:text-xs hover:text-red-600",x.value?"disabled:bg-gray-100 text-white text-opacity-50":"bg-gray-100"]),title:e.unref(o)("Delete"),disabled:x.value,onClick:k=>A(v)},ha,10,va)]))),128)),_.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ga,e.toDisplayString(e.unref(o)("No files selected!")),1))]),N.value.length?(e.openBlock(),e.createBlock(O,{key:0,onHidden:p[2]||(p[2]=v=>N.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(N.value),1)]),_:1})):e.createCommentVNode("",!0)])])]),e.createElementVNode("input",{ref_key:"internalFileInput",ref:g,type:"file",multiple:"",class:"hidden"},null,512),e.createElementVNode("input",{ref_key:"internalFolderInput",ref:h,type:"file",multiple:"",webkitdirectory:"",class:"hidden"},null,512)]),_:1}))}}),wa={class:"sm:flex sm:items-start"},_a=e.createElementVNode("div",{class:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 stroke-blue-600 dark:stroke-blue-100",fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M20.25 7.5l-.625 10.632a2.25 2.25 0 01-2.247 2.118H6.622a2.25 2.25 0 01-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.125z"})])],-1),ba={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},Ea={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},Va={class:"mt-2"},Na={class:"text-gray-500 text-sm mb-1 overflow-auto vf-scrollbar",style:{"max-height":"200px"}},$a={class:"flex text-sm text-gray-800 dark:text-gray-400"},Ba={key:0,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Ca=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),Sa=[Ca],Da={key:1,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},ja=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),Ma=[ja],za={class:"ml-1.5"},Oa=["placeholder"],Ta={name:"VFModalArchive"},Fa=Object.assign(Ta,{props:{selection:Object,current:Object},setup(a){const t=e.inject("emitter");e.inject("storage");const n=e.inject("adapter"),{t:o}=e.inject("i18n"),l=a,c=e.ref(""),r=e.ref(""),u=e.ref(l.selection.items),d=()=>{u.value.length&&t.emit("vf-fetch",{params:{q:"archive",adapter:n.value,path:l.current.dirname,items:JSON.stringify(u.value.map(({path:i,type:s})=>({path:i,type:s}))),name:c.value},onSuccess:()=>{t.emit("vf-toast-push",{label:o("The file(s) archived.")})},onError:i=>{r.value=o(i.message)}})};return(i,s)=>(e.openBlock(),e.createBlock(M,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:d,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(o)("Archive")),1),e.createElementVNode("button",{type:"button",onClick:s[2]||(s[2]=m=>e.unref(t).emit("vf-modal-close")),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",wa,[_a,e.createElementVNode("div",ba,[e.createElementVNode("h3",Ea,e.toDisplayString(e.unref(o)("Archive the files")),1),e.createElementVNode("div",Va,[e.createElementVNode("div",Na,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,m=>(e.openBlock(),e.createElementBlock("p",$a,[m.type=="dir"?(e.openBlock(),e.createElementBlock("svg",Ba,Sa)):(e.openBlock(),e.createElementBlock("svg",Da,Ma)),e.createElementVNode("span",za,e.toDisplayString(m.basename),1)]))),256))]),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":s[0]||(s[0]=m=>c.value=m),onKeyup:e.withKeys(d,["enter"]),class:"my-1 px-2 py-1 border rounded dark:bg-gray-700/25 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:text-gray-100 w-full",placeholder:e.unref(o)("Archive name. (.zip file will be created)"),type:"text"},null,40,Oa),[[e.vModelText,c.value]]),r.value.length?(e.openBlock(),e.createBlock(O,{key:0,onHidden:s[1]||(s[1]=m=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}}),La={class:"sm:flex sm:items-start"},Aa=e.createElementVNode("div",{class:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 stroke-blue-600 dark:stroke-blue-100",fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M20.25 7.5l-.625 10.632a2.25 2.25 0 01-2.247 2.118H6.622a2.25 2.25 0 01-2.247-2.118L3.75 7.5m6 4.125l2.25 2.25m0 0l2.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.125z"})])],-1),Ua={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},Ha={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},qa={class:"mt-2"},Ia={class:"flex text-sm text-gray-800 dark:text-gray-400"},Pa={key:0,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Ra=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),Ka=[Ra],Ga={key:1,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Ya=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),Ja=[Ya],Wa={class:"ml-1.5"},Xa={class:"my-1 text-sm text-gray-500"},Qa={name:"VFModalUnarchive"},Za=Object.assign(Qa,{props:{selection:Object,current:Object},setup(a){const t=e.inject("emitter");e.inject("storage");const n=e.inject("adapter"),{t:o}=e.inject("i18n"),l=a;e.ref("");const c=e.ref(l.selection.items[0]),r=e.ref(""),u=e.ref([]),d=()=>{t.emit("vf-fetch",{params:{q:"unarchive",adapter:n.value,path:l.current.dirname,item:c.value.path},onSuccess:()=>{t.emit("vf-toast-push",{label:o("The file unarchived.")})},onError:i=>{r.value=o(i.message)}})};return(i,s)=>(e.openBlock(),e.createBlock(M,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:d,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(o)("Unarchive")),1),e.createElementVNode("button",{type:"button",onClick:s[1]||(s[1]=m=>e.unref(t).emit("vf-modal-close")),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(o)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",La,[Aa,e.createElementVNode("div",Ua,[e.createElementVNode("h3",Ha,e.toDisplayString(e.unref(o)("Unarchive")),1),e.createElementVNode("div",qa,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,m=>(e.openBlock(),e.createElementBlock("p",Ia,[m.type=="dir"?(e.openBlock(),e.createElementBlock("svg",Pa,Ka)):(e.openBlock(),e.createElementBlock("svg",Ga,Ja)),e.createElementVNode("span",Wa,e.toDisplayString(m.basename),1)]))),256)),e.createElementVNode("p",Xa,e.toDisplayString(e.unref(o)("The archive will be unarchived at"))+" ("+e.toDisplayString(a.current.dirname)+")",1),r.value.length?(e.openBlock(),e.createBlock(O,{key:0,onHidden:s[0]||(s[0]=m=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}}),el={class:"sm:flex sm:items-start"},tl=e.createElementVNode("div",{class:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10"},[e.createElementVNode("svg",{class:"h-6 w-6 stroke-red-600 dark:stroke-red-200",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor","aria-hidden":"true"},[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 3z"})])],-1),ol={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},nl={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},rl={class:"mt-2"},al={class:"flex text-sm text-gray-800 dark:text-gray-400"},ll={key:0,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},sl=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),il=[sl],cl={key:1,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},dl=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),ul=[dl],ml={class:"ml-1.5"},pl={class:"text-sm text-gray-500 pb-1 pt-3"},vl={class:"flex text-sm text-gray-800 dark:text-gray-400"},fl=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})],-1),hl={class:"ml-1.5 overflow-auto"},gl={name:"VFModalMove"},kl=Object.assign(gl,{props:{selection:Object,current:Object},setup(a){const t=e.inject("emitter"),{t:n}=e.inject("i18n");e.inject("storage");const o=e.inject("adapter"),l=a,c=e.ref(l.selection.items.from),r=e.ref(""),u=()=>{c.value.length&&t.emit("vf-fetch",{params:{q:"move",adapter:o.value,path:l.current.dirname,items:JSON.stringify(c.value.map(({path:d,type:i})=>({path:d,type:i}))),item:l.selection.items.to.path},onSuccess:()=>{t.emit("vf-toast-push",{label:n("Files moved.",l.selection.items.to.name)})},onError:d=>{r.value=n(d.message)}})};return(d,i)=>(e.openBlock(),e.createBlock(M,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:u,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(n)("Yes, Move!")),1),e.createElementVNode("button",{type:"button",onClick:i[1]||(i[1]=s=>e.unref(t).emit("vf-modal-close")),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(n)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",el,[tl,e.createElementVNode("div",ol,[e.createElementVNode("h3",nl,e.toDisplayString(e.unref(n)("Move files")),1),e.createElementVNode("div",rl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,s=>(e.openBlock(),e.createElementBlock("p",al,[s.type=="dir"?(e.openBlock(),e.createElementBlock("svg",ll,il)):(e.openBlock(),e.createElementBlock("svg",cl,ul)),e.createElementVNode("span",ml,e.toDisplayString(s.path),1)]))),256)),e.createElementVNode("p",pl,e.toDisplayString(e.unref(n)("Are you sure you want to move these files?")),1),e.createElementVNode("p",vl,[fl,e.createElementVNode("span",hl,e.toDisplayString(a.selection.items.to.path),1)]),r.value.length?(e.openBlock(),e.createBlock(O,{key:0,onHidden:i[0]||(i[0]=s=>r.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}}),yl=(a,t)=>{const n=a.__vccOpts||a;for(const[o,l]of t)n[o]=l;return n},xl={props:{on:{type:String,required:!0}},setup(a,{emit:t,slots:n}){const o=e.inject("emitter"),l=e.ref(!1);let c=null;const r=()=>{clearTimeout(c),l.value=!0,c=setTimeout(()=>{l.value=!1},2e3)};return e.onMounted(()=>{o.on(a.on,r)}),e.onUnmounted(()=>{clearTimeout(c)}),{shown:l}}},wl={key:1};function _l(a,t,n,o,l,c){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["text-sm text-green-600 dark:text-green-600 transition-opacity duration-500 ease-out",[{"opacity-0":!o.shown}]])},[a.$slots.default?e.renderSlot(a.$slots,"default",{key:0}):(e.openBlock(),e.createElementBlock("span",wl,"Saved."))],2)}const ee=yl(xl,[["render",_l]]),bl="1.3.3",El={class:"sm:flex sm:items-start"},Vl=e.createElementVNode("div",{class:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 stroke-blue-600 dark:stroke-blue-100",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},[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.87.074.04.147.083.22.127.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.992a7.723 7.723 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.124a6.47 6.47 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-.87a6.52 6.52 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-.991a6.932 6.932 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-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z"}),e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"})])],-1),Nl={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},$l={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},Bl={class:"mt-2"},Cl={class:"text-sm text-gray-500"},Sl={class:"text-sm font-semibold mt-5 text-gray-900 dark:text-gray-400 tracking-wider"},Dl={class:"mt-3 text-left"},jl={class:"space-y-2"},Ml={class:"flex relative gap-x-3"},zl={class:"h-6 items-center"},Ol={class:"flex-1 block text-sm"},Tl={for:"dark_mode",class:"flex w-full font-medium text-gray-900 dark:text-gray-400"},Fl={class:"flex relative gap-x-3"},Ll={class:"h-6 items-center"},Al={class:"flex-1 block text-sm"},Ul={for:"metric_unit",class:"flex w-full font-medium text-gray-900 dark:text-gray-400"},Hl={name:"VFModalAbout"},ql=Object.assign(Hl,{props:{selection:Object,current:Object},setup(a){const t=e.inject("emitter"),{getStore:n,clearStore:o}=e.inject("storage");e.inject("adapter");const{t:l}=e.inject("i18n");e.ref(""),e.ref("");const c=e.inject("darkMode"),r=async()=>{o(),location.reload()},u=()=>{t.emit("vf-darkMode-toggle"),t.emit("vf-darkMode-saved")},d=e.inject("metricUnits"),i=()=>{t.emit("vf-metric-units-saved",!d.value)};return(s,m)=>(e.openBlock(),e.createBlock(M,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:m[2]||(m[2]=g=>e.unref(t).emit("vf-modal-close")),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(l)("Close")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",El,[Vl,e.createElementVNode("div",Nl,[e.createElementVNode("h3",$l,e.toDisplayString(e.unref(l)("About %s","Vuefinder "+e.unref(bl))),1),e.createElementVNode("div",Bl,[e.createElementVNode("p",Cl,e.toDisplayString(e.unref(l)("Vuefinder is a file manager component for vue 3.")),1),e.createElementVNode("div",null,[e.createElementVNode("h3",Sl,e.toDisplayString(e.unref(l)("Settings")),1)]),e.createElementVNode("div",Dl,[e.createElementVNode("fieldset",null,[e.createElementVNode("div",jl,[e.createElementVNode("div",Ml,[e.createElementVNode("div",zl,[e.withDirectives(e.createElementVNode("input",{id:"dark_mode",name:"dark_mode","onUpdate:modelValue":m[0]||(m[0]=g=>e.isRef(c)?c.value=g:null),type:"checkbox",onClick:u,class:"h-4 w-4 rounded border-gray-300 text-indigo-600 dark:accent-slate-400 focus:ring-indigo-600"},null,512),[[e.vModelCheckbox,e.unref(c)]])]),e.createElementVNode("div",Ol,[e.createElementVNode("label",Tl,[e.createTextVNode(e.toDisplayString(e.unref(l)("Dark Mode"))+" ",1),e.createVNode(ee,{class:"ms-3",on:"vf-darkMode-saved"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("Saved.")),1)]),_:1})])])]),e.createElementVNode("div",Fl,[e.createElementVNode("div",Ll,[e.withDirectives(e.createElementVNode("input",{id:"metric_unit",name:"metric_unit",type:"checkbox","onUpdate:modelValue":m[1]||(m[1]=g=>e.isRef(d)?d.value=g:null),onClick:i,class:"h-4 w-4 rounded border-gray-300 text-indigo-600 dark:accent-slate-400 focus:ring-indigo-600"},null,512),[[e.vModelCheckbox,e.unref(d)]])]),e.createElementVNode("div",Al,[e.createElementVNode("label",Ul,[e.createTextVNode(e.toDisplayString(e.unref(l)("Use Metric Units"))+" ",1),e.createVNode(ee,{class:"ms-3",on:"vf-metric-units-saved"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("Saved.")),1)]),_:1})])])]),e.createElementVNode("button",{onClick:r,type:"button",class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(l)("Clear Local Storage")),1)])])])])])])]),_:1}))}}),Il=Object.freeze(Object.defineProperty({__proto__:null,ModalAbout:ql,ModalArchive:Fa,ModalDelete:En,ModalMessage:jn,ModalMove:kl,ModalNewFile:Wn,ModalNewFolder:Hn,ModalPreview:Tr,ModalRename:Xr,ModalUnarchive:Za,ModalUpload:xa},Symbol.toStringTag,{value:"Module"})),G={VueFinder:Wo,...Il};const Pl={install(a){for(const t in G)if(G.hasOwnProperty(t)){const n=G[t];a.component(n.name,n)}}};module.exports=Pl; +"use strict";var Q=(n,o,r)=>{if(!o.has(n))throw TypeError("Cannot "+r)};var W=(n,o,r)=>(Q(n,o,"read from private field"),r?r.call(n):o.get(n)),Z=(n,o,r)=>{if(o.has(n))throw TypeError("Cannot add the same private member more than once");o instanceof WeakSet?o.add(n):o.set(n,r)},ee=(n,o,r,t)=>(Q(n,o,"write to private field"),t?t.call(n,r):o.set(n,r),r);const e=require("vue"),le=require("mitt"),se=require("dragselect"),ie=require("vanilla-lazyload");require("cropperjs/dist/cropper.css");const ce=require("cropperjs"),de=require("@uppy/core"),ue=require("@uppy/xhr-upload");require("microtip/microtip.css");var re;const G=(re=document.querySelector('meta[name="csrf-token"]'))==null?void 0:re.getAttribute("content");var H;class me{constructor(o){Z(this,H,void 0);ee(this,H,o)}get config(){return W(this,H)}transformRequestParams(o){const r=W(this,H),t={};G!=null&&G!==""&&(t[r.xsrfHeaderName]=G);const a=Object.assign({},r.headers,t,o.headers),d=Object.assign({},r.params,o.params),s=o.body,c=r.baseUrl+o.url,m=o.method;let l;m!=="get"&&(s instanceof FormData?(l=s,r.body!=null&&Object.entries(this.config.body).forEach(([u,b])=>{l.append(u,b)})):(l={...s},r.body!=null&&Object.assign(l,this.config.body)));const i={url:c,method:m,headers:a,params:d,body:l};if(r.transformRequest!=null){const u=r.transformRequest({url:c,method:m,headers:a,params:d,body:l});u.url!=null&&(i.url=u.url),u.method!=null&&(i.method=u.method),u.params!=null&&(i.params=u.params??{}),u.headers!=null&&(i.headers=u.headers??{}),u.body!=null&&(i.body=u.body)}return i}getDownloadUrl(o,r){if(r.url!=null)return r.url;const t=this.transformRequestParams({url:"",method:"get",params:{q:"download",adapter:o,path:r.path}});return t.url+"?"+new URLSearchParams(t.params).toString()}getPreviewUrl(o,r){if(r.url!=null)return r.url;const t=this.transformRequestParams({url:"",method:"get",params:{q:"preview",adapter:o,path:r.path}});return t.url+"?"+new URLSearchParams(t.params).toString()}async send(o){const r=this.transformRequestParams(o),t=o.responseType||"json",a={method:o.method,headers:r.headers,signal:o.abortSignal},d=r.url+"?"+new URLSearchParams(r.params);if(r.method!=="get"&&r.body!=null){let c;r.body instanceof FormData?c=o.body:(c=JSON.stringify(r.body),a.headers["Content-Type"]="application/json"),a.body=c}const s=await fetch(d,a);if(s.ok)return await s[t]();throw await s.json()}}H=new WeakMap;function pe(n){const o={baseUrl:"",headers:{},params:{},body:{},xsrfHeaderName:"X-CSRF-Token"};return typeof n=="string"?Object.assign(o,{baseUrl:n}):Object.assign(o,n),new me(o)}function J(n){let o=localStorage.getItem(n+"_storage");const r=e.ref(JSON.parse(o));e.watch(r,t);function t(){r.value===null||r.value===""?localStorage.removeItem(n+"_storage"):localStorage.setItem(n+"_storage",JSON.stringify(r.value))}function a(c,m){r.value=Object.assign({...r.value},{[c]:m})}function d(){r.value=null}return{getStore:(c,m=null)=>r.value===null||r.value===""?m:r.value.hasOwnProperty(c)?r.value[c]:m,setStore:a,clearStore:d}}const j={EDIT:"edit",NEW_FILE:"newfile",NEW_FOLDER:"newfolder",PREVIEW:"preview",ARCHIVE:"archive",UNARCHIVE:"unarchive",SEARCH:"search",RENAME:"rename",UPLOAD:"upload",DELETE:"delete",DOWNLOAD:"download",LANGUAGE:"language"},fe=Object.values(j),ve={class:"border-neutral-300 flex justify-between items-center py-1 text-sm"},he={key:0,class:"flex text-center"},ge=["aria-label"],ke=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 md:h-8 md:w-8 m-auto cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300",fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 10.5v6m3-3H9m4.06-7.19l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"})],-1),ye=[ke],xe=["aria-label"],we=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 md:h-8 md:w-8 m-auto cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300",fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-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 00-9-9z"})],-1),be=[we],_e=["aria-label"],Ee=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10"},null,-1),Ne=[Ee],Ve=["aria-label"],$e=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0"},null,-1),Be=[$e],Ce=["aria-label"],Se=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 md:h-8 md:w-8 m-auto cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300",fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5m-13.5-9L12 3m0 0l4.5 4.5M12 3v13.5"})],-1),De=[Se],je=["aria-label"],Me=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M20.25 7.5l-.625 10.632a2.25 2.25 0 01-2.247 2.118H6.622a2.25 2.25 0 01-2.247-2.118L3.75 7.5m6 4.125l2.25 2.25m0 0l2.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.125z"},null,-1),Te=[Me],ze=["aria-label"],Oe=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M20.25 7.5l-.625 10.632a2.25 2.25 0 01-2.247 2.118H6.622a2.25 2.25 0 01-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.125z"},null,-1),Fe=[Oe],Le={key:1,class:"flex text-center"},Ae={class:"pl-2"},qe={class:"dark:bg-gray-700 bg-gray-200 text-xs px-2 py-1 rounded"},He={key:0,class:"animate-spin p-0.5 h-5 w-5 text-white ml-auto",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},Ue=e.createElementVNode("circle",{class:"opacity-25 stroke-blue-900 dark:stroke-blue-100",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),Re=e.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1),Pe=[Ue,Re],Ie={class:"flex text-center items-center justify-end"},We=["aria-label"],Ge={xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 md:h-8 md:w-8 m-auto cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300",fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},Ke={key:0,"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 9V4.5M9 9H4.5M9 9L3.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.5l5.25 5.25"},Ye={key:1,"stroke-linecap":"round","stroke-linejoin":"round",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"},Je=["aria-label"],Xe={key:0,"stroke-linecap":"round","stroke-linejoin":"round",d:"M3.75 6A2.25 2.25 0 016 3.75h2.25A2.25 2.25 0 0110.5 6v2.25a2.25 2.25 0 01-2.25 2.25H6a2.25 2.25 0 01-2.25-2.25V6zM3.75 15.75A2.25 2.25 0 016 13.5h2.25a2.25 2.25 0 012.25 2.25V18a2.25 2.25 0 01-2.25 2.25H6A2.25 2.25 0 013.75 18v-2.25zM13.5 6a2.25 2.25 0 012.25-2.25H18A2.25 2.25 0 0120.25 6v2.25A2.25 2.25 0 0118 10.5h-2.25a2.25 2.25 0 01-2.25-2.25V6zM13.5 15.75a2.25 2.25 0 012.25-2.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-2.25A2.25 2.25 0 0113.5 18v-2.25z"},Qe={key:1,"stroke-linecap":"round","stroke-linejoin":"round",d:"M3.75 12h16.5m-16.5 3.75h16.5M3.75 19.5h16.5M5.625 4.5h12.75a1.875 1.875 0 010 3.75H5.625a1.875 1.875 0 010-3.75z"},Ze={name:"VFToolbar"},et=Object.assign(Ze,{props:{data:Object},setup(n){const o=e.inject("emitter");e.inject("usePropDarkMode");const{getStore:r,setStore:t}=e.inject("storage"),{t:a}=e.inject("i18n"),d=e.ref(r("viewport","grid")),s=e.ref([]),c=e.ref(r("full-screen",!1)),m=e.inject("features"),l=e.ref("");o.on("vf-search-query",({newQuery:k})=>{l.value=k});const i=e.inject("loadingState"),u=()=>i.value,b=()=>{c.value=!c.value,o.emit("vf-fullscreen-toggle")};return o.on("vf-nodes-selected",k=>{s.value=k}),o.on("vf-view-toggle",k=>{t("viewport",k),d.value=k}),(k,y)=>(e.openBlock(),e.createElementBlock("div",ve,[l.value.length?(e.openBlock(),e.createElementBlock("div",Le,[e.createElementVNode("div",Ae,[e.createTextVNode(e.toDisplayString(e.unref(a)("Search results for"))+" ",1),e.createElementVNode("span",qe,e.toDisplayString(l.value),1)]),u()?(e.openBlock(),e.createElementBlock("svg",He,Pe)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",he,[e.unref(m).includes(e.unref(j).NEW_FOLDER)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"mx-1.5","aria-label":e.unref(a)("New Folder"),"data-microtip-position":"bottom-right",role:"tooltip",onClick:y[0]||(y[0]=v=>e.unref(o).emit("vf-modal-show",{type:"new-folder",items:s.value}))},ye,8,ge)):e.createCommentVNode("",!0),e.unref(m).includes(e.unref(j).NEW_FILE)?(e.openBlock(),e.createElementBlock("div",{key:1,class:"mx-1.5","aria-label":e.unref(a)("New File"),"data-microtip-position":"bottom",role:"tooltip",onClick:y[1]||(y[1]=v=>e.unref(o).emit("vf-modal-show",{type:"new-file",items:s.value}))},be,8,xe)):e.createCommentVNode("",!0),e.unref(m).includes(e.unref(j).RENAME)?(e.openBlock(),e.createElementBlock("div",{key:2,class:"mx-1.5","aria-label":e.unref(a)("Rename"),"data-microtip-position":"bottom",role:"tooltip",onClick:y[2]||(y[2]=v=>s.value.length!=1||e.unref(o).emit("vf-modal-show",{type:"rename",items:s.value}))},[(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",class:e.normalizeClass([s.value.length==1?"cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300":"stroke-gray-200 dark:stroke-gray-700","h-6 w-6 md:h-8 md:w-8 m-auto"]),fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},Ne,2))],8,_e)):e.createCommentVNode("",!0),e.unref(m).includes(e.unref(j).DELETE)?(e.openBlock(),e.createElementBlock("div",{key:3,class:"mx-1.5","aria-label":e.unref(a)("Delete"),"data-microtip-position":"bottom",role:"tooltip",onClick:y[3]||(y[3]=v=>!s.value.length||e.unref(o).emit("vf-modal-show",{type:"delete",items:s.value}))},[(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",class:e.normalizeClass([s.value.length?"cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300":"stroke-gray-200 dark:stroke-gray-700","h-6 w-6 md:h-8 md:w-8 m-auto"]),fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},Be,2))],8,Ve)):e.createCommentVNode("",!0),e.unref(m).includes(e.unref(j).UPLOAD)?(e.openBlock(),e.createElementBlock("div",{key:4,class:"mx-1.5","aria-label":e.unref(a)("Upload"),"data-microtip-position":"bottom",role:"tooltip",onClick:y[4]||(y[4]=v=>e.unref(o).emit("vf-modal-show",{type:"upload",items:s.value}))},De,8,Ce)):e.createCommentVNode("",!0),e.unref(m).includes(e.unref(j).UNARCHIVE)&&s.value.length==1&&s.value[0].mime_type=="application/zip"?(e.openBlock(),e.createElementBlock("div",{key:5,class:"mx-1.5","aria-label":e.unref(a)("Unarchive"),"data-microtip-position":"bottom",role:"tooltip",onClick:y[5]||(y[5]=v=>!s.value.length||e.unref(o).emit("vf-modal-show",{type:"unarchive",items:s.value}))},[(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",class:e.normalizeClass([s.value.length?"cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300":"stroke-gray-200 dark:stroke-gray-700","h-6 w-6 md:h-8 md:w-8 m-auto"]),fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},Te,2))],8,je)):e.createCommentVNode("",!0),e.unref(m).includes(e.unref(j).ARCHIVE)?(e.openBlock(),e.createElementBlock("div",{key:6,class:"mx-1.5","aria-label":e.unref(a)("Archive"),"data-microtip-position":"bottom",role:"tooltip",onClick:y[6]||(y[6]=v=>!s.value.length||e.unref(o).emit("vf-modal-show",{type:"archive",items:s.value}))},[(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",class:e.normalizeClass([s.value.length?"cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300":"stroke-gray-200 dark:stroke-gray-700","h-6 w-6 md:h-8 md:w-8 m-auto"]),fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},Fe,2))],8,ze)):e.createCommentVNode("",!0)])),e.createElementVNode("div",Ie,[e.createElementVNode("div",{class:"mx-1.5","aria-label":e.unref(a)("Toggle Full Screen"),"data-microtip-position":"bottom-left",role:"tooltip",onClick:b},[(e.openBlock(),e.createElementBlock("svg",Ge,[c.value?(e.openBlock(),e.createElementBlock("path",Ke)):(e.openBlock(),e.createElementBlock("path",Ye))]))],8,We),e.createElementVNode("div",{class:"mx-1.5","aria-label":e.unref(a)("Change View"),"data-microtip-position":"bottom-left",role:"tooltip",onClick:y[7]||(y[7]=v=>l.value.length||e.unref(o).emit("vf-view-toggle",d.value=="list"?"grid":"list"))},[(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",class:e.normalizeClass([l.value.length?"stroke-gray-200 dark:stroke-gray-700":"cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300","h-6 w-6 md:h-8 md:w-8 m-auto"]),fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},[d.value=="grid"?(e.openBlock(),e.createElementBlock("path",Xe)):e.createCommentVNode("",!0),d.value=="list"?(e.openBlock(),e.createElementBlock("path",Qe)):e.createCommentVNode("",!0)],2))],8,Je)])]))}}),ne=(n,o=null)=>new Date(n*1e3).toLocaleString(o??navigator.language??"en-US"),tt={key:0,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor"},ot=e.createElementVNode("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z","clip-rule":"evenodd"},null,-1),rt=[ot],nt={key:1,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor"},at=e.createElementVNode("path",{"fill-rule":"evenodd",d:"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z","clip-rule":"evenodd"},null,-1),lt=[at],st={name:"VFSortIcon"},R=Object.assign(st,{props:{direction:String},setup(n){return(o,r)=>(e.openBlock(),e.createElementBlock("div",null,[n.direction=="down"?(e.openBlock(),e.createElementBlock("svg",tt,rt)):e.createCommentVNode("",!0),n.direction=="up"?(e.openBlock(),e.createElementBlock("svg",nt,lt)):e.createCommentVNode("",!0)]))}}),it=["onClick"],ct={name:"VFToast.vue"},dt=Object.assign(ct,{setup(n){const o=e.inject("emitter"),{getStore:r}=e.inject("storage"),t=e.ref(r("full-screen",!1)),a=m=>m=="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",d=e.ref([]),s=m=>{d.value.splice(m,1)},c=m=>{let l=d.value.findIndex(i=>i.id===m);l!==-1&&s(l)};return o.on("vf-toast-clear",()=>{d.value=[]}),o.on("vf-toast-push",m=>{let l=new Date().getTime().toString(36).concat(performance.now().toString(),Math.random().toString()).replace(/\./g,"");m.id=l,d.value.push(m),setTimeout(()=>{c(l)},5e3)}),(m,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([t.value.value?"fixed":"absolute","bottom-0 max-w-fit flex flex-col bottom-0 left-1/2 -translate-x-1/2"])},[e.createVNode(e.TransitionGroup,{name:"vf-toast-item","leave-active-class":"transition-all duration-1000","leave-to-class":"opacity-0"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(i,u)=>(e.openBlock(),e.createElementBlock("div",{onClick:b=>s(u),key:i,class:e.normalizeClass([a(i.type),"inline-block mx-auto my-0.5 py-0.5 px-2 min-w-max bg-gray-50 dark:bg-gray-600 border text-xs sm:text-sm rounded cursor-pointer"])},e.toDisplayString(i.label),11,it))),128))]),_:1})],2))}});function X(n,o=14){let r=`((?=([\\w\\W]{0,${o}}))([\\w\\W]{8,})([\\w\\W]{8,}))`;return n.replace(new RegExp(r),"$2..$4")}const ut={class:"relative flex-auto flex flex-col overflow-hidden"},mt={key:0,class:"grid grid-cols-12 border-b border-neutral-300 border-gray-200 dark:border-gray-700 text-xs select-none"},pt={class:"absolute"},ft=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",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",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},[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"})],-1),vt={class:"text-neutral-700 dark:text-neutral-300 p-1 absolute text-center top-4 right-[-2rem] md:top-5 md:right-[-2.4rem] z-20 text-xs"},ht=["onDblclick","onContextmenu","data-type","data-item","data-index"],gt={class:"grid grid-cols-12 items-center"},kt={class:"flex col-span-7 items-center"},yt={key:0,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},xt=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),wt=[xt],bt={key:1,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},_t=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),Et=[_t],Nt={class:"overflow-ellipsis overflow-hidden whitespace-nowrap"},Vt={class:"col-span-5 overflow-ellipsis overflow-hidden whitespace-nowrap"},$t=["onDblclick","onContextmenu","onDragstart","onDragover","onDrop","data-type","data-item","data-index"],Bt={class:"grid grid-cols-12 items-center"},Ct={class:"flex col-span-7 items-center"},St={key:0,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Dt=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),jt=[Dt],Mt={key:1,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Tt=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),zt=[Tt],Ot={class:"overflow-ellipsis overflow-hidden whitespace-nowrap"},Ft={class:"col-span-2 text-center"},Lt={class:"col-span-3 overflow-ellipsis overflow-hidden whitespace-nowrap"},At=["onDblclick","onContextmenu","onDragstart","onDragover","onDrop","data-type","data-item","data-index"],qt={class:"relative"},Ht={key:0,xmlns:"http://www.w3.org/2000/svg",class:"h-10 w-10 md:h-12 md:w-12 m-auto fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Ut=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),Rt=[Ut],Pt=["data-src","alt"],It={key:2,xmlns:"http://www.w3.org/2000/svg",class:"h-10 w-10 md:h-12 md:w-12 m-auto text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Wt=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),Gt=[Wt],Kt={key:3,class:"absolute hidden md:block top-1/2 w-full text-center text-neutral-500"},Yt={class:"break-all"},Jt={name:"VFExplorer"},Xt=Object.assign(Jt,{props:{view:String,data:Object,search:Object},setup(n){const o=n,r=e.inject("requester"),t=e.inject("emitter"),{setStore:a,getStore:d}=e.inject("storage"),s=e.inject("adapter"),c=p=>p==null?void 0:p.substring(0,3),m=e.ref(null),l=e.ref(null),i=e.ref(0),u=e.ref(null),{t:b}=e.inject("i18n"),k=Math.floor(Math.random()*2**32),y=e.ref(d("full-screen",!1)),v=e.inject("filesize");let N;t.on("vf-fullscreen-toggle",()=>{m.value.style.height=null,y.value=!y.value,a("full-screen",y.value)});const x=e.ref("");t.on("vf-search-query",({newQuery:p})=>{x.value=p,p?t.emit("vf-fetch",{params:{q:"search",adapter:o.data.adapter,path:o.data.dirname,filter:p},onSuccess:h=>{h.files.length||t.emit("vf-toast-push",{label:b("No search result found.")})}}):t.emit("vf-fetch",{params:{q:"index",adapter:o.data.adapter,path:o.data.dirname}})});let B=null;const E=()=>{B&&clearTimeout(B)},V=e.ref(!0),_=p=>{p.touches.length>1&&(V.value?(u.value.stop(),t.emit("vf-toast-push",{label:b("Drag&Drop: off")})):(u.value.start(),t.emit("vf-toast-push",{label:b("Drag&Drop: on")}),t.emit("vf-explorer-update")),V.value=!V.value)},D=p=>{B=setTimeout(()=>{const h=new MouseEvent("contextmenu",{bubbles:!0,cancelable:!1,view:window,button:2,buttons:0,clientX:p.target.getBoundingClientRect().x,clientY:p.target.getBoundingClientRect().y});p.target.dispatchEvent(h)},500)},C=p=>{p.type=="dir"?(t.emit("vf-search-exit"),t.emit("vf-fetch",{params:{q:"index",adapter:o.data.adapter,path:p.path}})):t.emit("vf-modal-show",{type:"preview",adapter:o.data.adapter,item:p})},$=e.reactive({active:!1,column:"",order:""}),O=(p=!0)=>{let h=[...o.data.files],f=$.column,w=$.order=="asc"?1:-1;if(!p)return h;const g=(S,M)=>typeof S=="string"&&typeof M=="string"?S.toLowerCase().localeCompare(M.toLowerCase()):SM?1:0;return $.active&&(h=h.slice().sort((S,M)=>g(S[f],M[f])*w)),h},A=p=>{$.active&&$.column==p?($.active=$.order=="asc",$.column=p,$.order="desc"):($.active=!0,$.column=p,$.order="asc")},F=()=>u.value.getSelection().map(p=>JSON.parse(p.dataset.item)),q=(p,h)=>{if(p.altKey||p.ctrlKey||p.metaKey)return p.preventDefault(),!1;p.dataTransfer.setDragImage(l.value,0,15),p.dataTransfer.effectAllowed="all",p.dataTransfer.dropEffect="copy",p.dataTransfer.setData("items",JSON.stringify(F()))},T=(p,h)=>{p.preventDefault();let f=JSON.parse(p.dataTransfer.getData("items"));if(f.find(w=>w.storage!=s.value)){alert("Moving items between different storages is not supported yet.");return}t.emit("vf-modal-show",{type:"move",items:{from:f,to:h}})},U=(p,h)=>{p.preventDefault(),!h||h.type!=="dir"||u.value.getSelection().find(f=>f==p.currentTarget)?(p.dataTransfer.dropEffect="none",p.dataTransfer.effectAllowed="none"):p.dataTransfer.dropEffect="copy"},P=()=>{u.value=new se({area:m.value,keyboardDrag:!1,selectedClass:"vf-explorer-selected",selectorClass:"vf-explorer-selector"}),t.on("vf-explorer-update",()=>e.nextTick(()=>{u.value.clearSelection(),u.value.setSettings({selectables:document.getElementsByClassName("vf-item-"+k)})})),u.value.subscribe("predragstart",({event:p,isDragging:h})=>{if(h)i.value=u.value.getSelection().length,u.value.break();else{const f=p.target.offsetWidth-p.offsetX,w=p.target.offsetHeight-p.offsetY;f<15&&w<15&&(u.value.clearSelection(),u.value.break())}}),u.value.subscribe("predragmove",({isDragging:p})=>{p&&u.value.break()}),u.value.subscribe("callback",({items:p,event:h,isDragging:f})=>{t.emit("vf-nodes-selected",F()),i.value=u.value.getSelection().length})};return e.onMounted(()=>{N=new ie(m.value),P()}),e.onUpdated(()=>{u.value.Area.reset(),u.value.SelectorArea.updatePos(),N.update()}),e.onMounted(()=>{e.watch(()=>o.view,()=>t.emit("vf-explorer-update"))}),e.onBeforeUnmount(()=>{N.destroy()}),(p,h)=>(e.openBlock(),e.createElementBlock("div",ut,[n.view=="list"||x.value.length?(e.openBlock(),e.createElementBlock("div",mt,[e.createElementVNode("div",{onClick:h[0]||(h[0]=f=>A("basename")),class:"col-span-7 py-1 leading-6 hover:bg-neutral-100 bg-neutral-50 dark:bg-gray-800 dark:hover:bg-gray-700/10 flex items-center pl-1"},[e.createTextVNode(e.toDisplayString(e.unref(b)("Name"))+" ",1),e.withDirectives(e.createVNode(R,{direction:$.order=="asc"?"down":"up"},null,8,["direction"]),[[e.vShow,$.active&&$.column=="basename"]])]),x.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:h[1]||(h[1]=f=>A("file_size")),class:"col-span-2 py-1 leading-6 hover:bg-neutral-100 bg-neutral-50 dark:bg-gray-800 dark:hover:bg-gray-700/10 flex items-center justify-center border-l border-r dark:border-gray-700"},[e.createTextVNode(e.toDisplayString(e.unref(b)("Size"))+" ",1),e.withDirectives(e.createVNode(R,{direction:$.order=="asc"?"down":"up"},null,8,["direction"]),[[e.vShow,$.active&&$.column=="file_size"]])])),x.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:h[2]||(h[2]=f=>A("last_modified")),class:"col-span-3 py-1 leading-6 hover:bg-neutral-100 bg-neutral-50 dark:bg-gray-800 dark:hover:bg-gray-700/10 flex items-center justify-center"},[e.createTextVNode(e.toDisplayString(e.unref(b)("Date"))+" ",1),e.withDirectives(e.createVNode(R,{direction:$.order=="asc"?"down":"up"},null,8,["direction"]),[[e.vShow,$.active&&$.column=="last_modified"]])])),x.value.length?(e.openBlock(),e.createElementBlock("div",{key:2,onClick:h[3]||(h[3]=f=>A("path")),class:"col-span-5 py-1 leading-6 hover:bg-neutral-100 bg-neutral-50 dark:bg-gray-800 dark:hover:bg-gray-700/10 flex items-center justify-center border-l dark:border-gray-700"},[e.createTextVNode(e.toDisplayString(e.unref(b)("Filepath"))+" ",1),e.withDirectives(e.createVNode(R,{direction:$.order=="asc"?"down":"up"},null,8,["direction"]),[[e.vShow,$.active&&$.column=="path"]])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",pt,[e.createElementVNode("div",{ref_key:"dragImage",ref:l,class:"absolute -z-50 -top-96"},[ft,e.createElementVNode("div",vt,e.toDisplayString(i.value),1)],512)]),e.createElementVNode("div",{onTouchstart:_,onContextmenu:h[10]||(h[10]=e.withModifiers(f=>e.unref(t).emit("vf-contextmenu-show",{event:f,area:m.value,items:F()}),["self","prevent"])),class:e.normalizeClass([y.value?"":"resize-y","h-full w-full text-xs vf-selector-area vf-scrollbar min-h-[150px] overflow-auto p-1 z-0"]),ref_key:"selectorArea",ref:m},[x.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(O(),(f,w)=>(e.openBlock(),e.createElementBlock("div",{onDblclick:g=>C(f),onTouchstart:h[4]||(h[4]=g=>D(g)),onTouchend:h[5]||(h[5]=g=>E()),onContextmenu:e.withModifiers(g=>e.unref(t).emit("vf-contextmenu-show",{event:g,area:m.value,items:F(),target:f}),["prevent"]),class:e.normalizeClass(["vf-item-"+e.unref(k),"grid grid-cols-1 border hover:bg-neutral-50 dark:hover:bg-gray-700 border-transparent my-0.5 w-full select-none"]),"data-type":f.type,"data-item":JSON.stringify(f),"data-index":w},[e.createElementVNode("div",gt,[e.createElementVNode("div",kt,[f.type=="dir"?(e.openBlock(),e.createElementBlock("svg",yt,wt)):(e.openBlock(),e.createElementBlock("svg",bt,Et)),e.createElementVNode("span",Nt,e.toDisplayString(f.basename),1)]),e.createElementVNode("div",Vt,e.toDisplayString(f.path),1)])],42,ht))),256)):e.createCommentVNode("",!0),n.view=="list"&&!x.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(O(),(f,w)=>(e.openBlock(),e.createElementBlock("div",{draggable:"true",onDblclick:g=>C(f),onTouchstart:h[6]||(h[6]=g=>D(g)),onTouchend:h[7]||(h[7]=g=>E()),onContextmenu:e.withModifiers(g=>e.unref(t).emit("vf-contextmenu-show",{event:g,area:m.value,items:F(),target:f}),["prevent"]),onDragstart:g=>q(g),onDragover:g=>U(g,f),onDrop:g=>T(g,f),class:e.normalizeClass(["vf-item-"+e.unref(k),"grid grid-cols-1 border hover:bg-neutral-50 dark:hover:bg-gray-700 border-transparent my-0.5 w-full select-none"]),"data-type":f.type,"data-item":JSON.stringify(f),"data-index":w},[e.createElementVNode("div",Bt,[e.createElementVNode("div",Ct,[f.type=="dir"?(e.openBlock(),e.createElementBlock("svg",St,jt)):(e.openBlock(),e.createElementBlock("svg",Mt,zt)),e.createElementVNode("span",Ot,e.toDisplayString(f.basename),1)]),e.createElementVNode("div",Ft,e.toDisplayString(f.file_size?e.unref(v)(f.file_size):""),1),e.createElementVNode("div",Lt,e.toDisplayString(e.unref(ne)(f.last_modified)),1)])],42,$t))),256)):e.createCommentVNode("",!0),n.view=="grid"&&!x.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(O(!1),(f,w)=>(e.openBlock(),e.createElementBlock("div",{draggable:"true",onDblclick:g=>C(f),onTouchstart:h[8]||(h[8]=g=>D(g)),onTouchend:h[9]||(h[9]=g=>E()),onContextmenu:e.withModifiers(g=>e.unref(t).emit("vf-contextmenu-show",{event:g,area:m.value,items:F(),target:f}),["prevent"]),onDragstart:g=>q(g),onDragover:g=>U(g,f),onDrop:g=>T(g,f),class:e.normalizeClass(["vf-item-"+e.unref(k),"border border-transparent hover:bg-neutral-50 m-1 dark:hover:bg-gray-700 inline-flex w-[5.5rem] h-20 md:w-24 text-center justify-center select-none"]),"data-type":f.type,"data-item":JSON.stringify(f),"data-index":w},[e.createElementVNode("div",null,[e.createElementVNode("div",qt,[f.type=="dir"?(e.openBlock(),e.createElementBlock("svg",Ht,Rt)):(f.mime_type??"").startsWith("image")?(e.openBlock(),e.createElementBlock("img",{key:1,class:"lazy h-10 md:h-12 m-auto","data-src":e.unref(r).getPreviewUrl(e.unref(s).value,f),alt:f.basename},null,8,Pt)):(e.openBlock(),e.createElementBlock("svg",It,Gt)),!(f.mime_type??"").startsWith("image")&&f.type!="dir"?(e.openBlock(),e.createElementBlock("div",Kt,e.toDisplayString(c(f.extension)),1)):e.createCommentVNode("",!0)]),e.createElementVNode("span",Yt,e.toDisplayString(e.unref(X)(f.basename)),1)])],42,At))),256)):e.createCommentVNode("",!0)],34),e.createVNode(dt)]))}}),Qt={class:"p-1 text-xs border-t border-neutral-300 dark:border-gray-700/50 flex justify-between select-none"},Zt={class:"flex leading-5 items-center"},eo=["aria-label"],to=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},[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"})],-1),oo=[to],ro=["value"],no={class:"ml-3"},ao={key:0},lo={class:"ml-1"},so={class:"flex leading-5 items-center justify-end"},io=["aria-label"],co=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 stroke-slate-500 cursor-pointer",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[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 11-18 0 9 9 0 0118 0z"})],-1),uo=[co],mo={name:"VFStatusbar"},po=Object.assign(mo,{props:{data:Object},setup(n){const o=e.inject("emitter"),{getStore:r,setStore:t}=e.inject("storage"),a=e.ref(0),d=e.inject("adapter"),{t:s}=e.inject("i18n"),c=()=>{o.emit("vf-search-exit"),o.emit("vf-fetch",{params:{q:"index",adapter:d.value}}),t("adapter",d.value)};o.on("vf-nodes-selected",l=>{a.value=l.length});const m=e.ref("");return o.on("vf-search-query",({newQuery:l})=>{m.value=l}),(l,i)=>(e.openBlock(),e.createElementBlock("div",Qt,[e.createElementVNode("div",Zt,[e.createElementVNode("div",{class:"mx-2","aria-label":e.unref(s)("Storage"),"data-microtip-position":"top-right",role:"tooltip"},oo,8,eo),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":i[0]||(i[0]=u=>e.isRef(d)?d.value=u:null),onChange:c,class:"py-0.5 text-sm text-slate-500 border dark:border-gray-600 dark:text-neutral-50 dark:bg-gray-700 rounded pl-2 pr-8"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.data.storages,u=>(e.openBlock(),e.createElementBlock("option",{value:u},e.toDisplayString(u),9,ro))),256))],544),[[e.vModelSelect,e.unref(d)]]),e.createElementVNode("div",no,[m.value.length?(e.openBlock(),e.createElementBlock("span",ao,e.toDisplayString(n.data.files.length)+" items found. ",1)):e.createCommentVNode("",!0),e.createElementVNode("span",lo,e.toDisplayString(a.value>0?a.value+" "+e.unref(s)("item(s) selected."):""),1)])]),e.createElementVNode("div",so,[e.createElementVNode("span",{class:"mr-1","aria-label":e.unref(s)("About"),"data-microtip-position":"top-left",role:"tooltip",onClick:i[1]||(i[1]=u=>e.unref(o).emit("vf-modal-show",{type:"about"}))},uo,8,io)])]))}}),fo=(n,o=0,r=!1)=>{let t;return(...a)=>{r&&!t&&n(...a),clearTimeout(t),t=setTimeout(()=>{n(...a)},o)}},vo=(n,o,r)=>{const t=e.ref(n);return e.customRef((d,s)=>({get(){return d(),t.value},set:fo(c=>{t.value=c,s()},o,r)}))},ho={class:"flex p-1.5 bg-neutral-100 dark:bg-gray-800 border-t border-b border-neutral-300 dark:border-gray-700/50 items-center select-none text-xs"},go=["aria-label"],ko=e.createElementVNode("path",{"fill-rule":"evenodd",d:"M5.293 9.707a1 1 0 010-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 01-1.414 1.414L11 7.414V15a1 1 0 11-2 0V7.414L6.707 9.707a1 1 0 01-1.414 0z","clip-rule":"evenodd"},null,-1),yo=[ko],xo=["aria-label"],wo=e.createElementVNode("path",{d:"M463.5 224H472c13.3 0 24-10.7 24-24V72c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2L413.4 96.6c-87.6-86.5-228.7-86.2-315.8 1c-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.2s12.5 14.8 22.2 14.8H463.5z"},null,-1),bo=[wo],_o=["aria-label"],Eo=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"},null,-1),No=[Eo],Vo=e.createElementVNode("path",{d:"M10.707 2.293a1 1 0 00-1.414 0l-7 7a1 1 0 001.414 1.414L4 10.414V17a1 1 0 001 1h2a1 1 0 001-1v-2a1 1 0 011-1h2a1 1 0 011 1v2a1 1 0 001 1h2a1 1 0 001-1v-6.586l.293.293a1 1 0 001.414-1.414l-7-7z"},null,-1),$o=[Vo],Bo={class:"flex leading-5"},Co=e.createElementVNode("span",{class:"text-neutral-300 dark:text-gray-600 mx-0.5"},"/",-1),So=["title","onClick"],Do={key:0,class:"animate-spin p-1 h-6 w-6 text-white ml-auto",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},jo=e.createElementVNode("circle",{class:"opacity-25 stroke-blue-900 dark:stroke-blue-100",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),Mo=e.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1),To=[jo,Mo],zo={key:3,class:"relative flex bg-white dark:bg-gray-700 justify-between items-center rounded p-1 ml-2 w-full"},Oo=e.createElementVNode("div",null,[e.createElementVNode("svg",{class:"h-6 w-6 p-1 m-auto stroke-gray-400 fill-gray-100 dark:stroke-gray-400 dark:fill-gray-400/20",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"})])],-1),Fo=["placeholder"],Lo=e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"},null,-1),Ao=[Lo],qo={name:"VFBreadcrumb"},Ho=Object.assign(qo,{props:{data:Object},setup(n){const o=e.inject("emitter"),r=e.inject("adapter"),t=e.ref(null),a=e.ref([]),d=e.ref(!1),s=e.ref(null),c=e.inject("features"),m=n,{t:l}=e.inject("i18n"),i=e.inject("loadingState");o.on("vf-explorer-update",()=>{let E=[],V=[];t.value=m.data.dirname??r.value+"://",t.value.length==0&&(a.value=[]),t.value.replace(r.value+"://","").split("/").forEach(function(_){E.push(_),E.join("/")!=""&&V.push({basename:_,name:_,path:r.value+"://"+E.join("/"),type:"dir"})}),V.length>4&&(V=V.slice(-5),V[0].name=".."),a.value=V});const u=()=>{d.value=!1,k.value=""};o.on("vf-search-exit",()=>{u()});const b=()=>{c.value.includes(j.SEARCH)&&(d.value=!0,e.nextTick(()=>s.value.focus()))},k=vo("",400),y=()=>i.value;e.watch(k,E=>{o.emit("vf-toast-clear"),o.emit("vf-search-query",{newQuery:E})});const v=()=>a.value.length&&!d.value,N=E=>{E.preventDefault();let V=JSON.parse(E.dataTransfer.getData("items"));if(V.find(_=>_.storage!=r.value)){alert("Moving items between different storages is not supported yet.");return}o.emit("vf-modal-show",{type:"move",items:{from:V,to:a.value[a.value.length-2]??{path:r.value+"://"}}})},x=E=>{E.preventDefault(),v()?E.dataTransfer.dropEffect="copy":(E.dataTransfer.dropEffect="none",E.dataTransfer.effectAllowed="none")},B=()=>{k.value==""&&u()};return(E,V)=>(e.openBlock(),e.createElementBlock("div",ho,[e.createElementVNode("span",{"aria-label":e.unref(l)("Go up a directory"),"data-microtip-position":"bottom-right",role:"tooltip"},[(e.openBlock(),e.createElementBlock("svg",{onDragover:V[0]||(V[0]=_=>x(_)),onDrop:V[1]||(V[1]=_=>N(_)),onClick:V[2]||(V[2]=_=>{var D;return!v()||e.unref(o).emit("vf-fetch",{params:{q:"index",adapter:n.data.adapter,path:((D=a.value[a.value.length-2])==null?void 0:D.path)??e.unref(r)+"://"}})}),class:e.normalizeClass(["h-6 w-6 p-0.5 rounded",v()?"text-slate-700 hover:bg-neutral-300 dark:text-neutral-200 dark:hover:bg-gray-700 cursor-pointer":"text-gray-400 dark:text-neutral-500"]),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},yo,34))],8,go),y()?(e.openBlock(),e.createElementBlock("span",{key:1,"aria-label":e.unref(l)("Cancel"),"data-microtip-position":"bottom-right",role:"tooltip"},[(e.openBlock(),e.createElementBlock("svg",{onClick:V[4]||(V[4]=_=>e.unref(o).emit("vf-fetch-abort")),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"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"},No))],8,_o)):(e.openBlock(),e.createElementBlock("span",{key:0,"aria-label":e.unref(l)("Refresh"),"data-microtip-position":"bottom-right",role:"tooltip"},[(e.openBlock(),e.createElementBlock("svg",{onClick:V[3]||(V[3]=_=>{e.unref(o).emit("vf-fetch",{params:{q:"index",adapter:n.data.adapter,path:n.data.dirname}})}),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",xmlns:"http://www.w3.org/2000/svg",viewBox:"-40 -40 580 580",fill:"currentColor"},bo))],8,xo)),d.value?(e.openBlock(),e.createElementBlock("div",zo,[Oo,e.withDirectives(e.createElementVNode("input",{ref_key:"searchInput",ref:s,onKeydown:e.withKeys(u,["esc"]),onBlur:B,"onUpdate:modelValue":V[6]||(V[6]=_=>e.isRef(k)?k.value=_:null),placeholder:e.unref(l)("Search anything.."),class:"w-full pt-1 pb-0 px-2 border-0 text-sm ring-0 outline-0 text-gray-600 focus:ring-transparent focus:border-transparent dark:focus:ring-transparent dark:focus:border-transparent dark:text-gray-300 bg-transparent",type:"text"},null,40,Fo),[[e.vModelText,e.unref(k)]]),(e.openBlock(),e.createElementBlock("svg",{class:"w-6 h-6 cursor-pointer",onClick:u,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},Ao))])):(e.openBlock(),e.createElementBlock("div",{key:2,class:"group flex bg-white dark:bg-gray-700 items-center rounded p-1 ml-2 w-full",onClick:e.withModifiers(b,["self"])},[(e.openBlock(),e.createElementBlock("svg",{onClick:V[5]||(V[5]=_=>e.unref(o).emit("vf-fetch",{params:{q:"index",adapter:n.data.adapter}})),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",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},$o)),e.createElementVNode("div",Bo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(_,D)=>(e.openBlock(),e.createElementBlock("div",{key:D},[Co,e.createElementVNode("span",{class:"px-1.5 py-1 text-slate-700 dark:text-slate-200 hover:bg-neutral-100 dark:hover:bg-gray-800 rounded cursor-pointer",title:_.basename,onClick:C=>e.unref(o).emit("vf-fetch",{params:{q:"index",adapter:n.data.adapter,path:_.path}})},e.toDisplayString(_.name),9,So)]))),128))]),y()?(e.openBlock(),e.createElementBlock("svg",Do,To)):e.createCommentVNode("",!0)]))]))}}),Uo=["onClick"],Ro=e.createElementVNode("span",{class:"px-1"},null,-1),Po={name:"VFContextMenu"},Io=Object.assign(Po,{props:{current:Object},setup(n){const o=e.inject("emitter"),r=e.ref(null),t=e.inject("root"),a=e.inject("requester"),d=e.inject("features"),s=n,c=e.reactive({active:!1,items:[],positions:{left:0,top:0}}),m=e.computed(()=>c.items.filter(v=>v.key==null||d.value.includes(v.key))),l=e.ref([]);o.on("vf-context-selected",v=>{l.value=v});const{t:i}=e.inject("i18n"),u={newfolder:{key:j.NEW_FOLDER,title:()=>i("New Folder"),action:()=>{o.emit("vf-modal-show",{type:"new-folder"})}},delete:{key:j.DELETE,title:()=>i("Delete"),action:()=>{o.emit("vf-modal-show",{type:"delete",items:l})}},refresh:{title:()=>i("Refresh"),action:()=>{o.emit("vf-fetch",{params:{q:"index",adapter:s.current.adapter,path:s.current.dirname}})}},preview:{key:j.PREVIEW,title:()=>i("Preview"),action:()=>{o.emit("vf-modal-show",{type:"preview",adapter:s.current.adapter,item:l.value[0]})}},open:{title:()=>i("Open"),action:()=>{o.emit("vf-search-exit"),o.emit("vf-fetch",{params:{q:"index",adapter:s.current.adapter,path:l.value[0].path}})}},openDir:{title:()=>i("Open containing folder"),action:()=>{o.emit("vf-search-exit"),o.emit("vf-fetch",{params:{q:"index",adapter:s.current.adapter,path:l.value[0].dir}})}},download:{key:j.DOWNLOAD,title:()=>i("Download"),action:()=>{const v=a.getDownloadUrl(s.current.adapter,l.value[0]);o.emit("vf-download",v)}},archive:{key:j.ARCHIVE,title:()=>i("Archive"),action:()=>{o.emit("vf-modal-show",{type:"archive",items:l})}},unarchive:{key:j.UNARCHIVE,title:()=>i("Unarchive"),action:()=>{o.emit("vf-modal-show",{type:"unarchive",items:l})}},rename:{key:j.RENAME,title:()=>i("Rename"),action:()=>{o.emit("vf-modal-show",{type:"rename",items:l})}}},b=v=>{o.emit("vf-contextmenu-hide"),v.action()},k=e.ref("");o.on("vf-search-query",({newQuery:v})=>{k.value=v}),o.on("vf-contextmenu-show",({event:v,area:N,items:x,target:B=null})=>{if(c.items=[],k.value)if(B)c.items.push(u.openDir),o.emit("vf-context-selected",[B]);else return;else!B&&!k.value?(c.items.push(u.refresh),c.items.push(u.newfolder),o.emit("vf-context-selected",[])):x.length>1&&x.some(E=>E.path===B.path)?(c.items.push(u.refresh),c.items.push(u.archive),c.items.push(u.delete),o.emit("vf-context-selected",x)):(B.type=="dir"?c.items.push(u.open):(c.items.push(u.preview),c.items.push(u.download)),c.items.push(u.rename),B.mime_type=="application/zip"?c.items.push(u.unarchive):c.items.push(u.archive),c.items.push(u.delete),o.emit("vf-context-selected",[B]));y(v,N)}),o.on("vf-contextmenu-hide",()=>{c.active=!1});const y=(v,N)=>{c.active=!0,e.nextTick(()=>{const x=t.value.getBoundingClientRect(),B=N.getBoundingClientRect();let E=v.pageX-x.left,V=v.pageY-x.top,_=r.value.offsetHeight,D=r.value.offsetWidth;E=B.right-v.pageX+window.scrollXc.active?(e.openBlock(),e.createElementBlock("ul",{key:0,class:"z-30 absolute text-xs bg-neutral-50 dark:bg-gray-800 text-gray-700 dark:text-gray-200 border border-neutral-300 dark:border-gray-600 shadow rounded select-none",ref_key:"contextmenu",ref:r,style:e.normalizeStyle(c.positions)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,x=>(e.openBlock(),e.createElementBlock("li",{class:"px-2 py-1.5 cursor-pointer hover:bg-neutral-200 dark:hover:bg-gray-700",key:x.title,onClick:B=>b(x)},[Ro,e.createElementVNode("span",null,e.toDisplayString(x.title()),1)],8,Uo))),128))],4)):e.createCommentVNode("",!0)}}),Wo=(n,o)=>{const r=n[o];return r?typeof r=="function"?r():Promise.resolve(r):new Promise((t,a)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(a.bind(null,new Error("Unknown variable dynamic import: "+o)))})};async function Go(n){return(await Wo(Object.assign({"../locales/de.js":()=>Promise.resolve().then(()=>require("./de-e4938207.cjs")),"../locales/en.js":()=>Promise.resolve().then(()=>require("./en-39d37375.cjs")),"../locales/fa.js":()=>Promise.resolve().then(()=>require("./fa-64c35e1a.cjs")),"../locales/fr.js":()=>Promise.resolve().then(()=>require("./fr-c1251c6e.cjs")),"../locales/he.js":()=>Promise.resolve().then(()=>require("./he-6b2ea6a2.cjs")),"../locales/hi.js":()=>Promise.resolve().then(()=>require("./hi-7d3118ac.cjs")),"../locales/ru.js":()=>Promise.resolve().then(()=>require("./ru-f208af8a.cjs")),"../locales/sv.js":()=>Promise.resolve().then(()=>require("./sv-acbe2c28.cjs")),"../locales/tr.js":()=>Promise.resolve().then(()=>require("./tr-2fed3777.cjs")),"../locales/zhCN.js":()=>Promise.resolve().then(()=>require("./zhCN-44a2ca81.cjs")),"../locales/zhTW.js":()=>Promise.resolve().then(()=>require("./zhTW-73ae00d7.cjs"))}),`../locales/${n}.js`)).default}function Ko(n,o,r){const{getStore:t,setStore:a}=J(n),d=e.ref({}),s=e.ref(t("locale",o)),c=(i,u="en")=>{Go(i).then(b=>{d.value=b,a("locale",i),s.value=i,a("translations",b),r.emit("vf-toast-push",{label:"The language is set to "+i}),r.emit("vf-language-saved")}).catch(b=>{u?(r.emit("vf-toast-push",{label:"The selected locale is not yet supported!",type:"error"}),c(u,null)):r.emit("vf-toast-push",{label:"Locale cannot be loaded!",type:"error"})})};t("locale")?d.value=t("translations"):c(o);const m=(i,...u)=>u.length?m(i=i.replace("%s",u.shift()),...u):i;function l(i,...u){return d.value.hasOwnProperty(i)?m(d.value[i],...u):m(i,...u)}return{t:l,changeLocale:c,locale:s}}function te(n,o,r,t,a){return(o=Math,r=o.log,t=1024,a=r(n)/r(t)|0,n/o.pow(t,a)).toFixed(0)+" "+(a?"KMGTPEZY"[--a]+"iB":"B")}function oe(n,o,r,t,a){return(o=Math,r=o.log,t=1e3,a=r(n)/r(t)|0,n/o.pow(t,a)).toFixed(0)+" "+(a?"KMGTPEZY"[--a]+"B":"B")}function Yo(n){const o={k:1,m:2,g:3,t:4},t=/(\d+(?:\.\d+)?)\s?(k|m|g|t)?b?/i.exec(n);return t[1]*Math.pow(1024,o[t[2].toLowerCase()])}const Jo={name:"VueFinder"},Xo=Object.assign(Jo,{props:{request:{type:[String,Object],required:!0},features:{type:[Array,Boolean],default:!0},debug:{type:Boolean,default:!1},id:{type:String,default:"vf"},dark:{type:Boolean,default:!1},usePropDarkMode:{type:Boolean,default:!1},locale:{type:String,default:"en"},maxHeight:{type:String,default:"600px"},maxFileSize:{type:String,default:"10mb"}},emits:["select"],setup(n,{emit:o}){const r=n,t=le(),{setStore:a,getStore:d}=J(r.id),s=e.ref(d("adapter")),c=o,m=e.ref(null);e.provide("root",m),e.provide("emitter",t),e.provide("storage",J(r.id)),e.provide("adapter",s),e.provide("maxFileSize",r.maxFileSize),e.provide("usePropDarkMode",r.usePropDarkMode),e.provide("debug",r.debug);const l=pe(r.request);e.provide("requester",l);const i=e.ref([]);Array.isArray(r.features)?i.value.push(...r.features):r.features===!0&&i.value.push(...fe),e.provide("features",i);const u=Ko(r.id,r.locale,t);e.provide("i18n",u);const b=e.reactive({adapter:s.value,storages:[],dirname:".",files:[]}),k=e.ref(d("viewport","grid")),y=r.usePropDarkMode?e.computed(()=>r.dark):e.ref(d("darkMode",r.dark));e.provide("darkMode",y),t.on("vf-darkMode-toggle",()=>{y.value=!y.value,a("darkMode",y.value)});const v=e.ref(d("metricUnits",!1));e.provide("metricUnits",v);const N=e.ref(v.value?oe:te);e.watch(v,C=>{N.value=C?oe:te}),e.provide("filesize",N),t.on("vf-metric-units-saved",C=>{v.value=C,a("metricUnits",C)});const x=e.ref(!1);e.provide("loadingState",x);const B=e.ref(d("full-screen",!1));t.on("vf-fullscreen-toggle",()=>{B.value=!B.value,a("full-screen",B.value)}),t.on("vf-view-toggle",C=>{k.value=C});const E=e.reactive({active:!1,type:"delete",data:{}});t.on("vf-modal-close",()=>{E.active=!1}),t.on("vf-modal-show",C=>{E.active=!0,E.type=C.type,E.data=C});const V=C=>{Object.assign(b,C),t.emit("vf-nodes-selected",{}),t.emit("vf-explorer-update")};t.on("vf-nodes-selected",C=>{c("select",C)});let _;t.on("vf-fetch-abort",()=>{_.abort(),x.value=!1}),t.on("vf-fetch",({params:C,body:$=null,onSuccess:O=null,onError:A=null,noCloseModal:F=!1})=>{["index","search"].includes(C.q)&&(_&&_.abort(),x.value=!0),_=new AbortController;const q=_.signal;l.send({url:"",method:C.m||"get",params:C,body:$,abortSignal:q}).then(T=>{s.value=T.adapter,["index","search"].includes(C.q)&&(x.value=!1),F||t.emit("vf-modal-close"),V(T),O&&O(T)}).catch(T=>{console.error(T),A&&A(T)})});const D=e.ref(null);return t.on("vf-download",C=>{D.value.src=C,t.emit("vf-modal-close")}),e.onMounted(()=>{t.emit("vf-fetch",{params:{q:"index",adapter:s.value}})}),(C,$)=>(e.openBlock(),e.createElementBlock("div",{class:"vuefinder",ref_key:"root",ref:m},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(y)?"dark":"")},[e.createElementVNode("div",{class:e.normalizeClass([B.value?"fixed w-screen inset-0 z-20":"relative rounded-md","border flex flex-col bg-white dark:bg-gray-800 text-gray-700 dark:text-neutral-400 border-neutral-300 dark:border-gray-900 min-w-min select-none"]),style:e.normalizeStyle(B.value?"":"max-height: "+n.maxHeight),onMousedown:$[0]||($[0]=O=>e.unref(t).emit("vf-contextmenu-hide")),onTouchstart:$[1]||($[1]=O=>e.unref(t).emit("vf-contextmenu-hide"))},[e.createVNode(et,{data:b},null,8,["data"]),e.createVNode(Ho,{data:b},null,8,["data"]),e.createVNode(Xt,{view:k.value,data:b},null,8,["view","data"]),e.createVNode(po,{data:b},null,8,["data"])],38),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[E.active?(e.openBlock(),e.createBlock(e.resolveDynamicComponent("v-f-modal-"+E.type),{key:0,selection:E.data,current:b},null,8,["selection","current"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(Io,{current:b},null,8,["current"]),e.createElementVNode("iframe",{ref_key:"downloadFrame",ref:D,style:{display:"none"}},null,512)],2)],512))}}),Qo=e.createElementVNode("div",{class:"fixed inset-0 bg-gray-500 dark:bg-gray-600 dark:bg-opacity-75 bg-opacity-75 transition-opacity"},null,-1),Zo={class:"fixed z-10 inset-0 overflow-hidden"},er={class:"relative bg-white dark:bg-gray-800 rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:max-w-4xl md:max-w-2xl lg:max-w-3xl xl:max-w-5xl w-full"},tr={class:"bg-white dark:bg-gray-800 px-4 pt-5 pb-4 sm:p-6 sm:pb-4"},or={class:"bg-gray-50 dark:bg-gray-800 dark:border-t dark:border-gray-700 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse"},z={__name:"ModalLayout",setup(n){const o=e.inject("emitter");return e.onMounted(()=>{const r=document.querySelector(".v-f-modal input");r&&r.focus()}),(r,t)=>(e.openBlock(),e.createElementBlock("div",{class:"v-f-modal relative z-30","aria-labelledby":"modal-title",role:"dialog","aria-modal":"true",onKeyup:t[1]||(t[1]=e.withKeys(a=>e.unref(o).emit("vf-modal-close"),["esc"])),tabindex:"0"},[Qo,e.createElementVNode("div",Zo,[e.createElementVNode("div",{class:"flex items-end sm:items-center justify-center min-h-full p-4 text-center sm:p-0",onMousedown:t[0]||(t[0]=e.withModifiers(a=>e.unref(o).emit("vf-modal-close"),["self"]))},[e.createElementVNode("div",er,[e.createElementVNode("div",tr,[e.renderSlot(r.$slots,"default")]),e.createElementVNode("div",or,[e.renderSlot(r.$slots,"buttons")])])],32)])],32))}},rr=["aria-label"],nr=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-5 h-5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1),ar=[nr],lr={name:"Message"},L=Object.assign(lr,{props:{error:{type:Boolean,default:!1}},emits:["hidden"],setup(n,{emit:o}){var m;const{t:r}=e.inject("i18n"),t=e.ref(!1),a=e.ref(null),d=e.ref((m=a.value)==null?void 0:m.strMessage),s=o;e.watch(d,()=>t.value=!1);const c=()=>{s("hidden"),t.value=!0};return(l,i)=>(e.openBlock(),e.createElementBlock("div",null,[t.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"strMessage",ref:a,class:e.normalizeClass(["flex mt-2 p-1 px-2 rounded text-sm break-all dark:opacity-75",n.error?"bg-red-100 text-red-600 ":"bg-emerald-100 text-emerald-600"])},[e.renderSlot(l.$slots,"default"),e.createElementVNode("div",{class:"ml-auto cursor-pointer",onClick:c,"aria-label":e.unref(r)("Close"),"data-microtip-position":"top-left",role:"tooltip"},ar,8,rr)],2))]))}}),sr={class:"sm:flex sm:items-start"},ir=e.createElementVNode("div",{class:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 stroke-red-600 dark:stroke-red-200",fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})])],-1),cr={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},dr={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},ur={class:"mt-2"},mr={class:"text-sm text-gray-500"},pr={class:"text-gray-500 text-sm mb-1 overflow-auto vf-scrollbar",style:{"max-height":"200px"}},fr={class:"flex text-sm text-gray-800 dark:text-gray-400"},vr={key:0,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},hr=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),gr=[hr],kr={key:1,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},yr=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),xr=[yr],wr={class:"ml-1.5"},br={class:"m-auto font-bold text-red-500 text-sm dark:text-red-200 text-center"},_r={name:"VFModalDelete"},Er=Object.assign(_r,{props:{selection:Object,current:Object},setup(n){const o=e.inject("emitter");e.inject("storage");const r=e.inject("adapter"),{t}=e.inject("i18n"),a=n,d=e.ref(a.selection.items),s=e.ref(""),c=()=>{d.value.length&&o.emit("vf-fetch",{params:{q:"delete",m:"post",adapter:r.value,path:a.current.dirname},body:{items:d.value.map(({path:m,type:l})=>({path:m,type:l}))},onSuccess:()=>{o.emit("vf-toast-push",{label:t("Files deleted.")})},onError:m=>{s.value=t(m.message)}})};return(m,l)=>(e.openBlock(),e.createBlock(z,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:c,class:"vf-btn vf-btn-danger"},e.toDisplayString(e.unref(t)("Yes, Delete!")),1),e.createElementVNode("button",{type:"button",onClick:l[1]||(l[1]=i=>e.unref(o).emit("vf-modal-close")),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(t)("Cancel")),1),e.createElementVNode("div",br,e.toDisplayString(e.unref(t)("This action cannot be undone.")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",sr,[ir,e.createElementVNode("div",cr,[e.createElementVNode("h3",dr,e.toDisplayString(e.unref(t)("Delete files")),1),e.createElementVNode("div",ur,[e.createElementVNode("p",mr,e.toDisplayString(e.unref(t)("Are you sure you want to delete these files?")),1),e.createElementVNode("div",pr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,i=>(e.openBlock(),e.createElementBlock("p",fr,[i.type==="dir"?(e.openBlock(),e.createElementBlock("svg",vr,gr)):(e.openBlock(),e.createElementBlock("svg",kr,xr)),e.createElementVNode("span",wr,e.toDisplayString(i.basename),1)]))),256))]),s.value.length?(e.openBlock(),e.createBlock(L,{key:0,onHidden:l[0]||(l[0]=i=>s.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}}),Nr={class:"sm:flex sm:items-start"},Vr=e.createElementVNode("div",{class:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 stroke-blue-600 dark:stroke-blue-100",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})])],-1),$r={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},Br={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},Cr={class:"mt-2"},Sr={class:"text-sm text-gray-500"},Dr={name:"VFModalMessage"},jr=Object.assign(Dr,{props:{selection:Object},setup(n){const o=e.inject("emitter"),{t:r}=e.inject("i18n");return(t,a)=>(e.openBlock(),e.createBlock(z,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:a[0]||(a[0]=d=>e.unref(o).emit("vf-modal-close")),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(r)("Close")),1)]),default:e.withCtx(()=>{var d,s;return[e.createElementVNode("div",Nr,[Vr,e.createElementVNode("div",$r,[e.createElementVNode("h3",Br,e.toDisplayString(((d=n.selection)==null?void 0:d.title)??"Title"),1),e.createElementVNode("div",Cr,[e.createElementVNode("p",Sr,e.toDisplayString(((s=n.selection)==null?void 0:s.message)??"Message"),1)])])])]}),_:1}))}}),Mr={class:"sm:flex sm:items-start"},Tr=e.createElementVNode("div",{class:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 stroke-blue-600 dark:stroke-blue-100",fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 13h6m-3-3v6m-9 1V7a2 2 0 012-2h6l2 2h6a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2z"})])],-1),zr={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},Or={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},Fr={class:"mt-2"},Lr={class:"text-sm text-gray-500"},Ar=["placeholder"],qr={name:"VFModalNewFolder"},Hr=Object.assign(qr,{props:{selection:Object,current:Object},setup(n){const o=e.inject("emitter");e.inject("storage");const r=e.inject("adapter"),{t}=e.inject("i18n"),a=n,d=e.ref(""),s=e.ref(""),c=()=>{d.value!=""&&o.emit("vf-fetch",{params:{q:"newfolder",m:"post",adapter:r.value,path:a.current.dirname},body:{name:d.value},onSuccess:()=>{o.emit("vf-toast-push",{label:t("%s is created.",d.value)})},onError:m=>{s.value=t(m.message)}})};return(m,l)=>(e.openBlock(),e.createBlock(z,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:c,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(t)("Create")),1),e.createElementVNode("button",{type:"button",onClick:l[2]||(l[2]=i=>e.unref(o).emit("vf-modal-close")),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(t)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",Mr,[Tr,e.createElementVNode("div",zr,[e.createElementVNode("h3",Or,e.toDisplayString(e.unref(t)("New Folder")),1),e.createElementVNode("div",Fr,[e.createElementVNode("p",Lr,e.toDisplayString(e.unref(t)("Create a new folder")),1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":l[0]||(l[0]=i=>d.value=i),onKeyup:e.withKeys(c,["enter"]),class:"px-2 py-1 border rounded dark:bg-gray-700/25 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:text-gray-100 w-full",placeholder:e.unref(t)("Folder Name"),type:"text"},null,40,Ar),[[e.vModelText,d.value]]),s.value.length?(e.openBlock(),e.createBlock(L,{key:0,onHidden:l[1]||(l[1]=i=>s.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}}),Ur={class:"sm:flex sm:items-start"},Rr=e.createElementVNode("div",{class:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 stroke-blue-600 dark:stroke-blue-100",fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 13h6m-3-3v6m5 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})])],-1),Pr={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},Ir={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},Wr={class:"mt-2"},Gr={class:"text-sm text-gray-500"},Kr=["placeholder"],Yr={name:"VFModalNewFile"},Jr=Object.assign(Yr,{props:{selection:Object,current:Object},setup(n){const o=e.inject("emitter");e.inject("storage");const r=e.inject("adapter"),{t}=e.inject("i18n"),a=n,d=e.ref(""),s=e.ref(""),c=()=>{d.value!=""&&o.emit("vf-fetch",{params:{q:"newfile",m:"post",adapter:r.value,path:a.current.dirname},body:{name:d.value},onSuccess:()=>{o.emit("vf-toast-push",{label:t("%s is created.",d.value)})},onError:m=>{s.value=t(m.message)}})};return(m,l)=>(e.openBlock(),e.createBlock(z,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:c,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(t)("Create")),1),e.createElementVNode("button",{type:"button",onClick:l[2]||(l[2]=i=>e.unref(o).emit("vf-modal-close")),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(t)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",Ur,[Rr,e.createElementVNode("div",Pr,[e.createElementVNode("h3",Ir,e.toDisplayString(e.unref(t)("New File")),1),e.createElementVNode("div",Wr,[e.createElementVNode("p",Gr,e.toDisplayString(e.unref(t)("Create a new file")),1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":l[0]||(l[0]=i=>d.value=i),onKeyup:e.withKeys(c,["enter"]),class:"px-2 py-1 border rounded dark:bg-gray-700/25 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:text-gray-100 w-full",placeholder:e.unref(t)("File Name"),type:"text"},null,40,Kr),[[e.vModelText,d.value]]),s.value.length?(e.openBlock(),e.createBlock(L,{key:0,onHidden:l[1]||(l[1]=i=>s.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}}),Xr={class:"flex"},Qr=["aria-label"],Zr={class:"ml-auto mb-2"},en={key:0,class:"p-2 border font-normal whitespace-pre-wrap border-gray-200 dark:border-gray-700/50 dark:text-gray-200 rounded min-h-[200px] max-h-[60vh] text-xs overflow-auto"},tn={key:1},on={__name:"Text",props:{selection:Object},emits:["load"],setup(n,{emit:o}){const r=o,t=e.ref(""),a=e.ref(""),d=e.ref(null),s=e.ref(!1),c=n,m=e.ref(""),l=e.ref(!1),i=e.inject("requester"),u=e.inject("features"),{t:b}=e.inject("i18n");e.onMounted(()=>{i.send({url:"",method:"get",params:{q:"preview",adapter:c.selection.adapter,path:c.selection.item.path},responseType:"text"}).then(v=>{t.value=v,r("load")})});const k=()=>{s.value=!s.value,a.value=t.value,s.value==!0&&e.nextTick(()=>{d.value.focus()})},y=()=>{m.value="",l.value=!1,i.send({url:"",method:"post",params:{q:"save",adapter:c.selection.adapter,path:c.selection.item.path},body:{content:a.value},responseType:"text"}).then(v=>{m.value=b("Updated."),t.value=v,r("load"),s.value=!s.value}).catch(v=>{m.value=b(v.message),l.value=!0})};return(v,N)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Xr,[e.createElementVNode("div",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title","aria-label":n.selection.item.path,"data-microtip-position":"bottom-right",role:"tooltip"},e.toDisplayString(n.selection.item.basename),9,Qr),e.createElementVNode("div",Zr,[s.value?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:y,class:"ml-1 px-2 py-1 rounded border border-transparent shadow-sm bg-blue-700/75 hover:bg-blue-700 dark:bg-gray-700 dark:hover:bg-gray-700/50 text-base font-medium text-white sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(b)("Save")),1)):e.createCommentVNode("",!0),e.unref(u).includes(e.unref(j).EDIT)?(e.openBlock(),e.createElementBlock("button",{key:1,class:"ml-1 px-2 py-1 text-blue-500",onClick:N[0]||(N[0]=x=>k())},e.toDisplayString(s.value?e.unref(b)("Cancel"):e.unref(b)("Edit")),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",null,[s.value?(e.openBlock(),e.createElementBlock("div",tn,[e.withDirectives(e.createElementVNode("textarea",{ref_key:"editInput",ref:d,"onUpdate:modelValue":N[1]||(N[1]=x=>a.value=x),class:"w-full p-2 rounded dark:bg-gray-700 dark:text-gray-200 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:selection:bg-gray-500 min-h-[200px] max-h-[60vh] text-xs",name:"text",id:"",cols:"30",rows:"10"},null,512),[[e.vModelText,a.value]])])):(e.openBlock(),e.createElementBlock("pre",en,e.toDisplayString(t.value),1)),m.value.length?(e.openBlock(),e.createBlock(L,{key:2,onHidden:N[2]||(N[2]=x=>m.value=""),error:l.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.value),1)]),_:1},8,["error"])):e.createCommentVNode("",!0)])],64))}},rn={class:"flex"},nn=["aria-label"],an={class:"ml-auto mb-2"},ln={class:"w-full flex justify-center"},sn=["src"],cn={__name:"Image",props:{selection:Object},emits:["load"],setup(n,{emit:o}){const r=o,t=n,{t:a}=e.inject("i18n"),d=e.inject("requester"),s=e.inject("features"),c=e.ref(null),m=e.ref(null),l=e.ref(!1),i=e.ref(""),u=e.ref(!1),b=()=>{l.value=!l.value,l.value?m.value=new ce(c.value,{crop(y){}}):m.value.destroy()},k=()=>{m.value.getCroppedCanvas({width:795,height:341}).toBlob(y=>{i.value="",u.value=!1;const v=new FormData;v.set("file",y),d.send({url:"",method:"post",params:{q:"upload",adapter:t.selection.adapter,path:t.selection.item.path},body:v}).then(N=>{i.value=a("Updated."),c.value.src=d.getPreviewUrl(t.selection.adapter,t.selection.item),b(),r("load")}).catch(N=>{i.value=a(N.message),u.value=!0})})};return e.onMounted(()=>{r("load")}),(y,v)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",rn,[e.createElementVNode("h3",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title","aria-label":n.selection.item.path,"data-microtip-position":"bottom-right",role:"tooltip"},e.toDisplayString(n.selection.item.basename),9,nn),e.createElementVNode("div",an,[l.value?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:k,class:"ml-1 px-2 py-1 rounded border border-transparent shadow-sm bg-blue-700/75 hover:bg-blue-700 dark:bg-gray-700 dark:hover:bg-gray-700/50 text-base font-medium text-white sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(a)("Crop")),1)):e.createCommentVNode("",!0),e.unref(s).includes(e.unref(j).EDIT)?(e.openBlock(),e.createElementBlock("button",{key:1,class:"ml-1 px-2 py-1 text-blue-500",onClick:v[0]||(v[0]=N=>b())},e.toDisplayString(l.value?e.unref(a)("Cancel"):e.unref(a)("Edit")),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",ln,[e.createElementVNode("img",{ref_key:"image",ref:c,class:"max-w-[50vh] max-h-[50vh]",src:e.unref(d).getPreviewUrl(t.selection.adapter,t.selection.item),alt:""},null,8,sn)]),i.value.length?(e.openBlock(),e.createBlock(L,{key:0,onHidden:v[1]||(v[1]=N=>i.value=""),error:u.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value),1)]),_:1},8,["error"])):e.createCommentVNode("",!0)],64))}},dn={class:"flex"},un=["aria-label"],mn=e.createElementVNode("div",null,null,-1),pn={__name:"Default",props:{selection:Object},emits:["load"],setup(n,{emit:o}){const r=o;return e.onMounted(()=>{r("load")}),(t,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",dn,[e.createElementVNode("h3",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title","aria-label":n.selection.item.path,"data-microtip-position":"bottom-right",role:"tooltip"},e.toDisplayString(n.selection.item.basename),9,un)]),mn],64))}},fn=["aria-label"],vn={class:"w-full",preload:"",controls:""},hn=["src"],gn={__name:"Video",props:{selection:Object},emits:["load"],setup(n,{emit:o}){const r=n,t=o,a=e.inject("requester"),d=()=>a.getPreviewUrl(r.selection.adapter,r.selection.item);return e.onMounted(()=>{t("load")}),(s,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("h3",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title","aria-label":n.selection.item.path,"data-microtip-position":"bottom-right",role:"tooltip"},e.toDisplayString(n.selection.item.basename),9,fn),e.createElementVNode("div",null,[e.createElementVNode("video",vn,[e.createElementVNode("source",{src:d(),type:"video/mp4"},null,8,hn),e.createTextVNode(" Your browser does not support the video tag. ")])])],64))}},kn=["aria-label"],yn={class:"w-full",controls:""},xn=["src"],wn={__name:"Audio",props:{selection:Object},emits:["load"],setup(n,{emit:o}){const r=n,t=e.inject("requester"),a=o,d=()=>t.getPreviewUrl(r.selection.adapter,r.selection.item);return e.onMounted(()=>{a("load")}),(s,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("h3",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title","aria-label":n.selection.item.path,"data-microtip-position":"bottom-right",role:"tooltip"},e.toDisplayString(n.selection.item.basename),9,kn),e.createElementVNode("div",null,[e.createElementVNode("audio",yn,[e.createElementVNode("source",{src:d(),type:"audio/mpeg"},null,8,xn),e.createTextVNode(" Your browser does not support the audio element. ")])])],64))}},bn=["aria-label"],_n=["data"],En=["src"],Nn=e.createElementVNode("p",null,[e.createTextVNode(" Your browser does not support PDFs. "),e.createElementVNode("a",{href:"https://example.com/test.pdf"},"Download the PDF"),e.createTextVNode(" . ")],-1),Vn=[Nn],$n={__name:"Pdf",props:{selection:Object},emits:["load"],setup(n,{emit:o}){const r=n,t=o,a=e.inject("requester"),d=()=>a.getPreviewUrl(r.selection.adapter,r.selection.item);return e.onMounted(()=>{t("load")}),(s,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("h3",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title","aria-label":n.selection.item.path,"data-microtip-position":"bottom-right",role:"tooltip"},e.toDisplayString(n.selection.item.basename),9,bn),e.createElementVNode("div",null,[e.createElementVNode("object",{class:"h-[60vh]",data:d(),type:"application/pdf",width:"100%",height:"100%"},[e.createElementVNode("iframe",{class:"border-0",src:d(),width:"100%",height:"100%"},Vn,8,En)],8,_n)])],64))}},Bn={class:"sm:flex sm:items-start"},Cn={class:"mt-3 text-center sm:mt-0 sm:text-left w-full"},Sn={key:0},Dn={class:"text-gray-700 dark:text-gray-200 text-sm"},jn={key:0,class:"flex leading-5"},Mn=e.createElementVNode("svg",{class:"animate-spin -ml-1 mr-3 h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[e.createElementVNode("circle",{class:"opacity-25 stroke-blue-900 dark:stroke-blue-100",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1),Tn={class:"py-2 flex font-normal break-all dark:text-gray-200 rounded text-xs"},zn={class:"font-bold pl-2"},On={class:"font-bold pl-2"},Fn={name:"VFModalPreview"},Ln=Object.assign(Fn,{props:{selection:Object},setup(n){const o=e.inject("emitter"),{t:r}=e.inject("i18n"),t=e.ref(!1),a=e.inject("filesize"),d=e.inject("requester"),s=e.inject("features"),c=b=>t.value=b,m=n,l=b=>(m.selection.item.mime_type??"").startsWith(b),i=()=>{const b=d.getDownloadUrl(m.selection.adapter,m.selection.item);o.emit("vf-download",b)},u=s.value.includes(j.PREVIEW);return u||c(!0),(b,k)=>(e.openBlock(),e.createBlock(z,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:k[6]||(k[6]=y=>e.unref(o).emit("vf-modal-close")),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(r)("Close")),1),e.unref(s).includes(e.unref(j).DOWNLOAD)?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",onClick:k[7]||(k[7]=y=>i()),class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(r)("Download")),1)):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createElementVNode("div",Bn,[e.createElementVNode("div",Cn,[e.unref(u)?(e.openBlock(),e.createElementBlock("div",Sn,[l("text")?(e.openBlock(),e.createBlock(on,{key:0,selection:n.selection,onLoad:k[0]||(k[0]=y=>c(!0))},null,8,["selection"])):l("image")?(e.openBlock(),e.createBlock(cn,{key:1,selection:n.selection,onLoad:k[1]||(k[1]=y=>c(!0))},null,8,["selection"])):l("video")?(e.openBlock(),e.createBlock(gn,{key:2,selection:n.selection,onLoad:k[2]||(k[2]=y=>c(!0))},null,8,["selection"])):l("audio")?(e.openBlock(),e.createBlock(wn,{key:3,selection:n.selection,onLoad:k[3]||(k[3]=y=>c(!0))},null,8,["selection"])):l("application/pdf")?(e.openBlock(),e.createBlock($n,{key:4,selection:n.selection,onLoad:k[4]||(k[4]=y=>c(!0))},null,8,["selection"])):(e.openBlock(),e.createBlock(pn,{key:5,selection:n.selection,onLoad:k[5]||(k[5]=y=>c(!0))},null,8,["selection"]))])):e.createCommentVNode("",!0),e.createElementVNode("div",Dn,[t.value==!1?(e.openBlock(),e.createElementBlock("div",jn,[Mn,e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("Loading")),1)])):e.createCommentVNode("",!0)])])]),e.createElementVNode("div",Tn,[e.createElementVNode("div",null,[e.createElementVNode("span",zn,e.toDisplayString(e.unref(r)("File Size"))+": ",1),e.createTextVNode(e.toDisplayString(e.unref(a)(n.selection.item.file_size)),1)]),e.createElementVNode("div",null,[e.createElementVNode("span",On,e.toDisplayString(e.unref(r)("Last Modified"))+": ",1),e.createTextVNode(" "+e.toDisplayString(e.unref(ne)(n.selection.item.last_modified)),1)])])]),_:1}))}}),An={class:"sm:flex sm:items-start"},qn=e.createElementVNode("div",{class:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 stroke-blue-600 dark:stroke-blue-100",fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})])],-1),Hn={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},Un={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},Rn={class:"mt-2"},Pn={class:"flex text-sm text-gray-800 dark:text-gray-400 py-2"},In={key:0,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Wn=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),Gn=[Wn],Kn={key:1,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Yn=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),Jn=[Yn],Xn={class:"ml-1.5"},Qn={name:"VFModalRename"},Zn=Object.assign(Qn,{props:{selection:Object,current:Object},setup(n){const o=e.inject("emitter");e.inject("storage");const r=e.inject("adapter"),{t}=e.inject("i18n"),a=n,d=e.ref(a.selection.items[0]),s=e.ref(a.selection.items[0].basename),c=e.ref(""),m=()=>{s.value!=""&&o.emit("vf-fetch",{params:{q:"rename",m:"post",adapter:r.value,path:a.current.dirname},body:{item:d.value.path,name:s.value},onSuccess:()=>{o.emit("vf-toast-push",{label:t("%s is renamed.",s.value)})},onError:l=>{c.value=t(l.message)}})};return(l,i)=>(e.openBlock(),e.createBlock(z,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:m,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(t)("Rename")),1),e.createElementVNode("button",{type:"button",onClick:i[2]||(i[2]=u=>e.unref(o).emit("vf-modal-close")),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(t)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",An,[qn,e.createElementVNode("div",Hn,[e.createElementVNode("h3",Un,e.toDisplayString(e.unref(t)("Rename")),1),e.createElementVNode("div",Rn,[e.createElementVNode("p",Pn,[d.value.type=="dir"?(e.openBlock(),e.createElementBlock("svg",In,Gn)):(e.openBlock(),e.createElementBlock("svg",Kn,Jn)),e.createElementVNode("span",Xn,e.toDisplayString(d.value.basename),1)]),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":i[0]||(i[0]=u=>s.value=u),onKeyup:e.withKeys(m,["enter"]),class:"px-2 py-1 border rounded dark:bg-gray-700/25 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:text-gray-100 w-full",placeholder:"Name",type:"text"},null,544),[[e.vModelText,s.value]]),c.value.length?(e.openBlock(),e.createBlock(L,{key:0,onHidden:i[1]||(i[1]=u=>c.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}}),ea={class:"sm:flex sm:items-start"},ta=e.createElementVNode("div",{class:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 stroke-blue-600 dark:stroke-blue-100",fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})])],-1),oa={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},ra={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},na={class:"mt-2"},aa={key:0,class:"pointer-events-none"},la={key:1,class:"pointer-events-none"},sa=["disabled"],ia=["disabled"],ca={class:"text-gray-500 text-sm mb-1 pr-1 max-h-[200px] overflow-y-auto vf-scrollbar"},da={class:"rounded flex flex-shrink-0 w-6 h-6 border bg-gray-50 text-xs cursor-default dark:border-gray-700 dark:bg-gray-800 dark:text-gray-50"},ua=["textContent"],ma={class:"ml-1 w-full h-fit"},pa={class:"text-left hidden md:block"},fa={class:"text-left md:hidden"},va={key:0,class:"ml-auto"},ha=["title","disabled","onClick"],ga=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-5 h-5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1),ka=[ga],ya={key:0,class:"py-2"},xa=["disabled"],wa={name:"VFModalUpload"},ba=Object.assign(wa,{props:{current:Object},setup(n){const o=e.inject("debug"),r=e.inject("emitter"),{t}=e.inject("i18n"),a=e.inject("maxFileSize"),d=e.inject("filesize"),s=e.inject("requester"),c=n,m=t("uppy"),l={PENDING:0,CANCELED:1,UPLOADING:2,ERROR:3,DONE:10},i=e.ref({QUEUE_ENTRY_STATUS:l}),u=e.ref(null),b=e.ref(null),k=e.ref(null),y=e.ref(null),v=e.ref(null),N=e.ref(null),x=e.ref([]),B=e.ref(""),E=e.ref(!1),V=e.ref(!1);let _;function D(p){return x.value.findIndex(h=>h.id===p)}function C(p,h=null){h=h??(p.webkitRelativePath||p.name),_.addFile({name:h,type:p.type,data:p,source:"Local"})}function $(p){switch(p.status){case l.DONE:return"text-green-600";case l.ERROR:return"text-red-600";case l.CANCELED:return"text-red-600";case l.PENDING:default:return""}}const O=p=>{switch(p.status){case l.DONE:return"✓";case l.ERROR:case l.CANCELED:return"!";case l.PENDING:default:return"..."}};function A(){y.value.click()}function F(){if(!E.value){if(!x.value.filter(p=>p.status!==l.DONE).length){B.value=t("Please select file to upload first.");return}B.value="",_.retryAll(),_.upload()}}function q(){_.cancelAll({reason:"user"}),x.value.forEach(p=>{p.status!==l.DONE&&(p.status=l.CANCELED,p.statusName=t("Canceled"))}),E.value=!1}function T(p){E.value||(_.removeFile(p.id,"removed-by-user"),x.value.splice(D(p.id),1))}function U(p){if(!E.value){if(_.cancelAll({reason:"user"}),p){const h=[];x.value.forEach(f=>{f.status!==l.DONE&&h.push(f)}),x.value=[],h.forEach(f=>{C(f.originalFile,f.name)});return}x.value.splice(0)}}function P(){r.emit("vf-modal-close")}return e.onMounted(async()=>{_=new de({debug:o,restrictions:{maxFileSize:Yo(a)},locale:m,onBeforeFileAdded(w,g){if(g[w.id]!=null){const M=D(w.id);x.value[M].status===l.PENDING&&(B.value=_.i18n("noDuplicates",{fileName:w.name})),x.value=x.value.filter(I=>I.id!==w.id)}return x.value.push({id:w.id,name:w.name,size:d.value(w.size),status:l.PENDING,statusName:t("Pending upload"),percent:null,originalFile:w.data}),!0}});const p=s.transformRequestParams({url:"",method:"post",params:{q:"upload",adapter:c.current.adapter,path:c.current.dirname}});o&&p.body!=null&&(p.body instanceof FormData||Object.keys(p.body).length>0)&&console.warn(`Cannot set body on upload, make sure request.transformRequest didn't set body when upload. +Will ignore for now.`),_.use(ue,{method:p.method,endpoint:p.url+"?"+new URLSearchParams(p.params),headers:p.headers,limit:5,timeout:0,getResponseError(w,g){let S;try{S=JSON.parse(w).message}catch{S=t("Cannot parse server response.")}return new Error(S)}}),_.on("restriction-failed",(w,g)=>{const S=x.value[D(w.id)];T(S),B.value=g.message}),_.on("upload",()=>{E.value=!0,x.value.forEach(w=>{w.status!==l.DONE&&(w.percent=null,w.status=l.UPLOADING,w.statusName=t("Pending upload"))})}),_.on("upload-progress",(w,g)=>{const S=Math.floor(g.bytesUploaded/g.bytesTotal*100);x.value[D(w.id)].percent=`${S}%`}),_.on("upload-success",w=>{const g=x.value[D(w.id)];g.status=l.DONE,g.statusName=t("Done")}),_.on("upload-error",(w,g)=>{const S=x.value[D(w.id)];S.percent=null,S.status=l.ERROR,g.isNetworkError?S.statusName=t("Network Error, Unable establish connection to the server or interrupted."):S.statusName=g?g.message:t("Unknown Error")}),_.on("error",w=>{B.value=w.message,E.value=!1,r.emit("vf-fetch",{params:{q:"index",adapter:c.current.adapter,path:c.current.dirname},noCloseModal:!0})}),_.on("complete",()=>{E.value=!1,r.emit("vf-fetch",{params:{q:"index",adapter:c.current.adapter,path:c.current.dirname},noCloseModal:!0})}),y.value.addEventListener("click",()=>{b.value.click()}),v.value.addEventListener("click",()=>{k.value.click()}),N.value.addEventListener("dragover",w=>{w.preventDefault(),V.value=!0}),N.value.addEventListener("dragleave",w=>{w.preventDefault(),V.value=!1});function h(w,g){g.isFile&&g.file(S=>w(g,S)),g.isDirectory&&g.createReader().readEntries(S=>{S.forEach(M=>{h(w,M)})})}N.value.addEventListener("drop",w=>{w.preventDefault(),V.value=!1;const g=/^[/\\](.+)/;[...w.dataTransfer.items].forEach(S=>{S.kind==="file"&&h((M,I)=>{const ae=g.exec(M.fullPath);C(I,ae[1])},S.webkitGetAsEntry())})});const f=({target:w})=>{const g=w.files;for(const S of g)C(S);w.value=""};b.value.addEventListener("change",f),k.value.addEventListener("change",f)}),e.onBeforeUnmount(()=>{_==null||_.close({reason:"unmount"})}),(p,h)=>(e.openBlock(),e.createBlock(z,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["vf-btn vf-btn-primary",E.value?"bg-blue-200 hover:bg-blue-200 dark:bg-gray-700/50 dark:hover:bg-gray-700/50 dark:text-gray-500":"bg-blue-600 hover:bg-blue-700 dark:bg-gray-700 dark:hover:bg-gray-500"]),disabled:E.value,onClick:e.withModifiers(F,["prevent"])},e.toDisplayString(e.unref(t)("Upload")),11,xa),E.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"vf-btn vf-btn-secondary",onClick:e.withModifiers(q,["prevent"])},e.toDisplayString(e.unref(t)("Cancel")),1)):(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"vf-btn vf-btn-secondary",onClick:e.withModifiers(P,["prevent"])},e.toDisplayString(e.unref(t)("Close")),1))]),default:e.withCtx(()=>[e.createElementVNode("div",ea,[ta,e.createElementVNode("div",oa,[e.createElementVNode("h3",ra,e.toDisplayString(e.unref(t)("Upload Files")),1),e.createElementVNode("div",na,[e.createElementVNode("div",{ref_key:"dropArea",ref:N,class:"flex items-center justify-center text-lg mb-4 text-gray-500 border-2 border-gray-300 rounded border-dashed select-none cursor-pointer dark:border-gray-600 h-[120px]",onClick:A},[V.value?(e.openBlock(),e.createElementBlock("div",aa,e.toDisplayString(e.unref(t)("Release to drop these files.")),1)):(e.openBlock(),e.createElementBlock("div",la,e.toDisplayString(e.unref(t)("Drag and drop the files/folders to here or click here.")),1))],512),e.createElementVNode("div",{ref_key:"container",ref:u,class:"text-gray-500 mb-1"},[e.createElementVNode("button",{ref_key:"pickFiles",ref:y,type:"button",class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(t)("Select Files")),513),e.createElementVNode("button",{ref_key:"pickFolders",ref:v,type:"button",class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(t)("Select Folders")),513),e.createElementVNode("button",{type:"button",class:"vf-btn vf-btn-secondary",disabled:E.value,onClick:h[0]||(h[0]=f=>U(!1))},e.toDisplayString(e.unref(t)("Clear all")),9,sa),e.createElementVNode("button",{type:"button",class:"vf-btn vf-btn-secondary",disabled:E.value,onClick:h[1]||(h[1]=f=>U(!0))},e.toDisplayString(e.unref(t)("Clear only successful")),9,ia)],512),e.createElementVNode("div",ca,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,f=>(e.openBlock(),e.createElementBlock("div",{class:"flex hover:bg-gray-100 dark:hover:bg-gray-800 dark:hover:text-gray-300",key:f.id},[e.createElementVNode("span",da,[e.createElementVNode("span",{class:e.normalizeClass(["text-base m-auto",$(f)]),textContent:e.toDisplayString(O(f))},null,10,ua)]),e.createElementVNode("div",ma,[e.createElementVNode("div",pa,e.toDisplayString(e.unref(X)(f.name,40))+" ("+e.toDisplayString(f.size)+")",1),e.createElementVNode("div",fa,e.toDisplayString(e.unref(X)(f.name,16))+" ("+e.toDisplayString(f.size)+")",1),e.createElementVNode("div",{class:e.normalizeClass(["flex break-all text-left",$(f)])},[e.createTextVNode(e.toDisplayString(f.statusName)+" ",1),f.status===i.value.QUEUE_ENTRY_STATUS.UPLOADING?(e.openBlock(),e.createElementBlock("b",va,e.toDisplayString(f.percent),1)):e.createCommentVNode("",!0)],2)]),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["rounded w-5 h-5 border-1 text-base leading-none font-medium focus:outline-none dark:border-gray-200 dark:text-gray-400 dark:hover:text-gray-200 dark:bg-gray-600 ml-auto sm:text-xs hover:text-red-600",E.value?"disabled:bg-gray-100 text-white text-opacity-50":"bg-gray-100"]),title:e.unref(t)("Delete"),disabled:E.value,onClick:w=>T(f)},ka,10,ha)]))),128)),x.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ya,e.toDisplayString(e.unref(t)("No files selected!")),1))]),B.value.length?(e.openBlock(),e.createBlock(L,{key:0,onHidden:h[2]||(h[2]=f=>B.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B.value),1)]),_:1})):e.createCommentVNode("",!0)])])]),e.createElementVNode("input",{ref_key:"internalFileInput",ref:b,type:"file",multiple:"",class:"hidden"},null,512),e.createElementVNode("input",{ref_key:"internalFolderInput",ref:k,type:"file",multiple:"",webkitdirectory:"",class:"hidden"},null,512)]),_:1}))}}),_a={class:"sm:flex sm:items-start"},Ea=e.createElementVNode("div",{class:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 stroke-blue-600 dark:stroke-blue-100",fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M20.25 7.5l-.625 10.632a2.25 2.25 0 01-2.247 2.118H6.622a2.25 2.25 0 01-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.125z"})])],-1),Na={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},Va={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},$a={class:"mt-2"},Ba={class:"text-gray-500 text-sm mb-1 overflow-auto vf-scrollbar",style:{"max-height":"200px"}},Ca={class:"flex text-sm text-gray-800 dark:text-gray-400"},Sa={key:0,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Da=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),ja=[Da],Ma={key:1,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Ta=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),za=[Ta],Oa={class:"ml-1.5"},Fa=["placeholder"],La={name:"VFModalArchive"},Aa=Object.assign(La,{props:{selection:Object,current:Object},setup(n){const o=e.inject("emitter");e.inject("storage");const r=e.inject("adapter"),{t}=e.inject("i18n"),a=n,d=e.ref(""),s=e.ref(""),c=e.ref(a.selection.items),m=()=>{c.value.length&&o.emit("vf-fetch",{params:{q:"archive",m:"post",adapter:r.value,path:a.current.dirname},body:{items:c.value.map(({path:l,type:i})=>({path:l,type:i})),name:d.value},onSuccess:()=>{o.emit("vf-toast-push",{label:t("The file(s) archived.")})},onError:l=>{s.value=t(l.message)}})};return(l,i)=>(e.openBlock(),e.createBlock(z,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:m,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(t)("Archive")),1),e.createElementVNode("button",{type:"button",onClick:i[2]||(i[2]=u=>e.unref(o).emit("vf-modal-close")),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(t)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",_a,[Ea,e.createElementVNode("div",Na,[e.createElementVNode("h3",Va,e.toDisplayString(e.unref(t)("Archive the files")),1),e.createElementVNode("div",$a,[e.createElementVNode("div",Ba,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,u=>(e.openBlock(),e.createElementBlock("p",Ca,[u.type=="dir"?(e.openBlock(),e.createElementBlock("svg",Sa,ja)):(e.openBlock(),e.createElementBlock("svg",Ma,za)),e.createElementVNode("span",Oa,e.toDisplayString(u.basename),1)]))),256))]),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":i[0]||(i[0]=u=>d.value=u),onKeyup:e.withKeys(m,["enter"]),class:"my-1 px-2 py-1 border rounded dark:bg-gray-700/25 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:text-gray-100 w-full",placeholder:e.unref(t)("Archive name. (.zip file will be created)"),type:"text"},null,40,Fa),[[e.vModelText,d.value]]),s.value.length?(e.openBlock(),e.createBlock(L,{key:0,onHidden:i[1]||(i[1]=u=>s.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}}),qa={class:"sm:flex sm:items-start"},Ha=e.createElementVNode("div",{class:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 stroke-blue-600 dark:stroke-blue-100",fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M20.25 7.5l-.625 10.632a2.25 2.25 0 01-2.247 2.118H6.622a2.25 2.25 0 01-2.247-2.118L3.75 7.5m6 4.125l2.25 2.25m0 0l2.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.125z"})])],-1),Ua={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},Ra={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},Pa={class:"mt-2"},Ia={class:"flex text-sm text-gray-800 dark:text-gray-400"},Wa={key:0,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Ga=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),Ka=[Ga],Ya={key:1,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Ja=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),Xa=[Ja],Qa={class:"ml-1.5"},Za={class:"my-1 text-sm text-gray-500"},el={name:"VFModalUnarchive"},tl=Object.assign(el,{props:{selection:Object,current:Object},setup(n){const o=e.inject("emitter");e.inject("storage");const r=e.inject("adapter"),{t}=e.inject("i18n"),a=n;e.ref("");const d=e.ref(a.selection.items[0]),s=e.ref(""),c=e.ref([]),m=()=>{o.emit("vf-fetch",{params:{q:"unarchive",m:"post",adapter:r.value,path:a.current.dirname},body:{item:d.value.path},onSuccess:()=>{o.emit("vf-toast-push",{label:t("The file unarchived.")})},onError:l=>{s.value=t(l.message)}})};return(l,i)=>(e.openBlock(),e.createBlock(z,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:m,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(t)("Unarchive")),1),e.createElementVNode("button",{type:"button",onClick:i[1]||(i[1]=u=>e.unref(o).emit("vf-modal-close")),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(t)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",qa,[Ha,e.createElementVNode("div",Ua,[e.createElementVNode("h3",Ra,e.toDisplayString(e.unref(t)("Unarchive")),1),e.createElementVNode("div",Pa,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,u=>(e.openBlock(),e.createElementBlock("p",Ia,[u.type=="dir"?(e.openBlock(),e.createElementBlock("svg",Wa,Ka)):(e.openBlock(),e.createElementBlock("svg",Ya,Xa)),e.createElementVNode("span",Qa,e.toDisplayString(u.basename),1)]))),256)),e.createElementVNode("p",Za,e.toDisplayString(e.unref(t)("The archive will be unarchived at"))+" ("+e.toDisplayString(n.current.dirname)+")",1),s.value.length?(e.openBlock(),e.createBlock(L,{key:0,onHidden:i[0]||(i[0]=u=>s.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}}),ol={class:"sm:flex sm:items-start"},rl=e.createElementVNode("div",{class:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10"},[e.createElementVNode("svg",{class:"h-6 w-6 stroke-red-600 dark:stroke-red-200",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor","aria-hidden":"true"},[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 3z"})])],-1),nl={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},al={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},ll={class:"mt-2"},sl={class:"flex text-sm text-gray-800 dark:text-gray-400"},il={key:0,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},cl=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),dl=[cl],ul={key:1,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},ml=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),pl=[ml],fl={class:"ml-1.5"},vl={class:"text-sm text-gray-500 pb-1 pt-3"},hl={class:"flex text-sm text-gray-800 dark:text-gray-400"},gl=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})],-1),kl={class:"ml-1.5 overflow-auto"},yl={name:"VFModalMove"},xl=Object.assign(yl,{props:{selection:Object,current:Object},setup(n){const o=e.inject("emitter"),{t:r}=e.inject("i18n");e.inject("storage");const t=e.inject("adapter"),a=n,d=e.ref(a.selection.items.from),s=e.ref(""),c=()=>{d.value.length&&o.emit("vf-fetch",{params:{q:"move",m:"post",adapter:t.value,path:a.current.dirname},body:{items:d.value.map(({path:m,type:l})=>({path:m,type:l})),item:a.selection.items.to.path},onSuccess:()=>{o.emit("vf-toast-push",{label:r("Files moved.",a.selection.items.to.name)})},onError:m=>{s.value=r(m.message)}})};return(m,l)=>(e.openBlock(),e.createBlock(z,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:c,class:"vf-btn vf-btn-primary"},e.toDisplayString(e.unref(r)("Yes, Move!")),1),e.createElementVNode("button",{type:"button",onClick:l[1]||(l[1]=i=>e.unref(o).emit("vf-modal-close")),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(r)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",ol,[rl,e.createElementVNode("div",nl,[e.createElementVNode("h3",al,e.toDisplayString(e.unref(r)("Move files")),1),e.createElementVNode("div",ll,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,i=>(e.openBlock(),e.createElementBlock("p",sl,[i.type=="dir"?(e.openBlock(),e.createElementBlock("svg",il,dl)):(e.openBlock(),e.createElementBlock("svg",ul,pl)),e.createElementVNode("span",fl,e.toDisplayString(i.path),1)]))),256)),e.createElementVNode("p",vl,e.toDisplayString(e.unref(r)("Are you sure you want to move these files?")),1),e.createElementVNode("p",hl,[gl,e.createElementVNode("span",kl,e.toDisplayString(n.selection.items.to.path),1)]),s.value.length?(e.openBlock(),e.createBlock(L,{key:0,onHidden:l[0]||(l[0]=i=>s.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}}),wl=(n,o)=>{const r=n.__vccOpts||n;for(const[t,a]of o)r[t]=a;return r},bl={props:{on:{type:String,required:!0}},setup(n,{emit:o,slots:r}){const t=e.inject("emitter"),a=e.ref(!1),{t:d}=e.inject("i18n");let s=null;const c=()=>{clearTimeout(s),a.value=!0,s=setTimeout(()=>{a.value=!1},2e3)};return e.onMounted(()=>{t.on(n.on,c)}),e.onUnmounted(()=>{clearTimeout(s)}),{shown:a,t:d}}},_l={key:1};function El(n,o,r,t,a,d){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["text-sm text-green-600 dark:text-green-600 transition-opacity duration-500 ease-out",[{"opacity-0":!t.shown}]])},[n.$slots.default?e.renderSlot(n.$slots,"default",{key:0}):(e.openBlock(),e.createElementBlock("span",_l,e.toDisplayString(t.t("Saved.")),1))],2)}const K=wl(bl,[["render",El]]),Nl="2.0.0",Vl={class:"sm:flex sm:items-start"},$l=e.createElementVNode("div",{class:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6 stroke-blue-600 dark:stroke-blue-100",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},[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.87.074.04.147.083.22.127.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.992a7.723 7.723 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.124a6.47 6.47 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-.87a6.52 6.52 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-.991a6.932 6.932 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-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z"}),e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"})])],-1),Bl={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},Cl={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},Sl={class:"mt-2"},Dl={class:"text-sm text-gray-500"},jl={class:"text-sm font-semibold mt-5 text-gray-900 dark:text-gray-400 tracking-wider"},Ml={class:"mt-3 text-left"},Tl={class:"space-y-2"},zl={class:"flex relative gap-x-3"},Ol={class:"h-6 items-center"},Fl={class:"flex-1 block text-sm"},Ll={for:"dark_mode",class:"flex w-full font-medium text-gray-900 dark:text-gray-400"},Al={class:"flex relative gap-x-3"},ql={class:"h-6 items-center"},Hl={class:"flex-1 block text-sm"},Ul={for:"metric_unit",class:"flex w-full font-medium text-gray-900 dark:text-gray-400"},Rl={key:0,class:"flex relative gap-x-3"},Pl={class:"h-6 items-center"},Il={class:"flex w-full font-medium text-gray-900 dark:text-gray-400 text-sm"},Wl={class:"flex text-sm"},Gl=["label"],Kl=["value"],Yl={name:"VFModalAbout"},Jl=Object.assign(Yl,{props:{selection:Object,current:Object},setup(n){const o=e.inject("emitter"),{getStore:r,clearStore:t}=e.inject("storage");e.inject("adapter");const{t:a,changeLocale:d,locale:s}=e.inject("i18n"),c=e.inject("features");e.ref(""),e.ref("");const m=e.inject("darkMode"),l=async()=>{t(),location.reload()},i=()=>{o.emit("vf-darkMode-toggle"),o.emit("vf-darkMode-saved")},u=e.inject("metricUnits"),b=()=>{o.emit("vf-metric-units-saved",!u.value)},k={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 (繁體中文)"};return(y,v)=>(e.openBlock(),e.createBlock(z,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:v[4]||(v[4]=N=>e.unref(o).emit("vf-modal-close")),class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(a)("Close")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",Vl,[$l,e.createElementVNode("div",Bl,[e.createElementVNode("h3",Cl,e.toDisplayString(e.unref(a)("About %s","Vuefinder "+e.unref(Nl))),1),e.createElementVNode("div",Sl,[e.createElementVNode("p",Dl,e.toDisplayString(e.unref(a)("Vuefinder is a file manager component for vue 3.")),1),e.createElementVNode("div",null,[e.createElementVNode("h3",jl,e.toDisplayString(e.unref(a)("Settings")),1)]),e.createElementVNode("div",Ml,[e.createElementVNode("fieldset",null,[e.createElementVNode("div",Tl,[e.createElementVNode("div",zl,[e.createElementVNode("div",Ol,[e.withDirectives(e.createElementVNode("input",{id:"dark_mode",name:"dark_mode","onUpdate:modelValue":v[0]||(v[0]=N=>e.isRef(m)?m.value=N:null),type:"checkbox",onClick:i,class:"h-4 w-4 rounded border-gray-300 text-indigo-600 dark:accent-slate-400 focus:ring-indigo-600"},null,512),[[e.vModelCheckbox,e.unref(m)]])]),e.createElementVNode("div",Fl,[e.createElementVNode("label",Ll,[e.createTextVNode(e.toDisplayString(e.unref(a)("Dark Mode"))+" ",1),e.createVNode(K,{class:"ms-3",on:"vf-darkMode-saved"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("Saved.")),1)]),_:1})])])]),e.createElementVNode("div",Al,[e.createElementVNode("div",ql,[e.withDirectives(e.createElementVNode("input",{id:"metric_unit",name:"metric_unit",type:"checkbox","onUpdate:modelValue":v[1]||(v[1]=N=>e.isRef(u)?u.value=N:null),onClick:b,class:"h-4 w-4 rounded border-gray-300 text-indigo-600 dark:accent-slate-400 focus:ring-indigo-600"},null,512),[[e.vModelCheckbox,e.unref(u)]])]),e.createElementVNode("div",Hl,[e.createElementVNode("label",Ul,[e.createTextVNode(e.toDisplayString(e.unref(a)("Use Metric Units"))+" ",1),e.createVNode(K,{class:"ms-3",on:"vf-metric-units-saved"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("Saved.")),1)]),_:1})])])]),e.unref(c).includes(e.unref(j).LANGUAGE)?(e.openBlock(),e.createElementBlock("div",Rl,[e.createElementVNode("div",Pl,[e.createElementVNode("div",Il,e.toDisplayString(e.unref(a)("Language")),1)]),e.createElementVNode("div",Wl,[e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":v[2]||(v[2]=N=>e.isRef(s)?s.value=N:null),onChange:v[3]||(v[3]=N=>e.unref(d)(N.target.value)),class:"w-full text-sm text-slate-500 border dark:border-gray-600 dark:text-neutral-50 dark:bg-gray-700 rounded"},[e.createElementVNode("optgroup",{label:e.unref(a)("Language")},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(k,(N,x)=>e.createElementVNode("option",{value:x},e.toDisplayString(N),9,Kl)),64))],8,Gl)],544),[[e.vModelSelect,e.unref(s)]]),e.createTextVNode(),e.createVNode(K,{class:"ms-3",on:"vf-language-saved"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("Saved.")),1)]),_:1})])])):e.createCommentVNode("",!0),e.createElementVNode("button",{onClick:l,type:"button",class:"vf-btn vf-btn-secondary"},e.toDisplayString(e.unref(a)("Clear Local Storage")),1)])])])])])])]),_:1}))}}),Xl=Object.freeze(Object.defineProperty({__proto__:null,ModalAbout:Jl,ModalArchive:Aa,ModalDelete:Er,ModalMessage:jr,ModalMove:xl,ModalNewFile:Jr,ModalNewFolder:Hr,ModalPreview:Ln,ModalRename:Zn,ModalUnarchive:tl,ModalUpload:ba},Symbol.toStringTag,{value:"Module"})),Y={VueFinder:Xo,...Xl};const Ql={install(n){for(const o in Y)if(Y.hasOwnProperty(o)){const r=Y[o];n.component(r.name,r)}}};module.exports=Ql; diff --git a/dist/vuefinder.js b/dist/vuefinder.js index cc0b7af6..095f4a1a 100644 --- a/dist/vuefinder.js +++ b/dist/vuefinder.js @@ -1,52 +1,180 @@ -import { ref as g, watch as le, inject as k, openBlock as r, createElementBlock as v, createElementVNode as e, unref as a, normalizeClass as T, createTextVNode as U, toDisplayString as u, createCommentVNode as V, createVNode as P, TransitionGroup as Ve, withCtx as E, Fragment as H, renderList as J, reactive as ve, onMounted as K, onUpdated as Be, onBeforeUnmount as Oe, withDirectives as R, vShow as ue, withModifiers as Z, nextTick as ge, isRef as re, vModelSelect as ye, createStaticVNode as Ae, customRef as Le, withKeys as se, vModelText as ae, normalizeStyle as ze, provide as Y, computed as Ne, createBlock as N, resolveDynamicComponent as Ue, renderSlot as pe, onUnmounted as Te, vModelCheckbox as $e } from "vue"; -import He from "mitt"; +var $e = (n, s, o) => { + if (!s.has(n)) + throw TypeError("Cannot " + o); +}; +var ke = (n, s, o) => ($e(n, s, "read from private field"), o ? o.call(n) : s.get(n)), Ce = (n, s, o) => { + if (s.has(n)) + throw TypeError("Cannot add the same private member more than once"); + s instanceof WeakSet ? s.add(n) : s.set(n, o); +}, Me = (n, s, o, t) => ($e(n, s, "write to private field"), t ? t.call(n, o) : s.set(n, o), o); +import { ref as b, watch as ce, inject as g, openBlock as r, createElementBlock as u, unref as a, createCommentVNode as O, normalizeClass as R, createElementVNode as e, createTextVNode as H, toDisplayString as c, createVNode as P, TransitionGroup as Ve, withCtx as z, Fragment as I, renderList as K, reactive as ve, onMounted as X, onUpdated as Te, onBeforeUnmount as Oe, withDirectives as Y, vShow as ue, withModifiers as oe, nextTick as he, isRef as de, vModelSelect as Ae, customRef as Be, withKeys as ne, vModelText as le, computed as Le, normalizeStyle as ze, provide as G, Transition as He, createBlock as B, resolveDynamicComponent as Ue, renderSlot as pe, onUnmounted as qe, vModelCheckbox as je } from "vue"; +import Re from "mitt"; import Ie from "dragselect"; -import qe from "vanilla-lazyload"; +import Pe from "vanilla-lazyload"; import "cropperjs/dist/cropper.css"; -import Re from "cropperjs"; -import Pe from "@uppy/core"; -import Ge from "@uppy/xhr-upload"; +import We from "cropperjs"; +import Ge from "@uppy/core"; +import Ye from "@uppy/xhr-upload"; import "microtip/microtip.css"; var De; -const he = (De = document.querySelector('meta[name="csrf-token"]')) == null ? void 0 : De.getAttribute("content"), fe = (l, { method: t = "get", params: s = {}, json: o = !0, signal: i = null }) => { - const m = { method: t }; - if (m.signal = i, t == "get") - l += "?" + new URLSearchParams(s); - else { - m.headers = {}, he && (m.headers["X-CSRF-Token"] = he); - let n = new FormData(); - for (const [h, p] of Object.entries(s)) - n.append(h, p); - m.body = n; +const be = (De = document.querySelector('meta[name="csrf-token"]')) == null ? void 0 : De.getAttribute("content"); +var re; +class Ke { + /** @param {RequestConfig} config */ + constructor(s) { + /** @type {RequestConfig} */ + Ce(this, re, void 0); + Me(this, re, s); } - return fetch(l, m).then((n) => n.ok ? o ? n.json() : n.text() : n.json().then(Promise.reject.bind(Promise))); -}; -function xe(l) { - let t = localStorage.getItem(l + "_storage"); - const s = g(JSON.parse(t)); - le(s, o); - function o() { - s.value === null || s.value === "" ? localStorage.removeItem(l + "_storage") : localStorage.setItem(l + "_storage", JSON.stringify(s.value)); + /** @type {RequestConfig} */ + get config() { + return ke(this, re); + } + /** + * Transform request params + * @param {Object} input + * @param {String} input.url + * @param {'get'|'post'|'put'|'patch'|'delete'} input.method + * @param {Record=} input.headers + * @param {Record=} input.params + * @param {Record|FormData=} input.body + * @return {RequestTransformResultInternal} + */ + transformRequestParams(s) { + const o = ke(this, re), t = {}; + be != null && be !== "" && (t[o.xsrfHeaderName] = be); + const l = Object.assign({}, o.headers, t, s.headers), p = Object.assign({}, o.params, s.params), d = s.body, v = o.baseUrl + s.url, f = s.method; + let i; + f !== "get" && (d instanceof FormData ? (i = d, o.body != null && Object.entries(this.config.body).forEach(([h, E]) => { + i.append(h, E); + })) : (i = { ...d }, o.body != null && Object.assign(i, this.config.body))); + const m = { + url: v, + method: f, + headers: l, + params: p, + body: i + }; + if (o.transformRequest != null) { + const h = o.transformRequest({ + url: v, + method: f, + headers: l, + params: p, + body: i + }); + h.url != null && (m.url = h.url), h.method != null && (m.method = h.method), h.params != null && (m.params = h.params ?? {}), h.headers != null && (m.headers = h.headers ?? {}), h.body != null && (m.body = h.body); + } + return m; } - function i(h, p) { - s.value = Object.assign({ ...s.value }, { [h]: p }); + /** + * Get download url + * @param {String} adapter + * @param {String} node + * @param {String} node.path + * @param {String=} node.url + * @return {String} + */ + getDownloadUrl(s, o) { + if (o.url != null) + return o.url; + const t = this.transformRequestParams({ + url: "", + method: "get", + params: { q: "download", adapter: s, path: o.path } + }); + return t.url + "?" + new URLSearchParams(t.params).toString(); } - function m() { - s.value = null; + /** + * Get preview url + * @param {String} adapter + * @param {String} node + * @param {String} node.path + * @param {String=} node.url + * @return {String} + */ + getPreviewUrl(s, o) { + if (o.url != null) + return o.url; + const t = this.transformRequestParams({ + url: "", + method: "get", + params: { q: "preview", adapter: s, path: o.path } + }); + return t.url + "?" + new URLSearchParams(t.params).toString(); } - return { getStore: (h, p = null) => s.value === null || s.value === "" ? p : s.value.hasOwnProperty(h) ? s.value[h] : p, setStore: i, clearStore: m }; + /** + * Send request + * @param {Object} input + * @param {String} input.url + * @param {'get'|'post'|'put'|'patch'|'delete'} input.method + * @param {Record=} input.headers + * @param {Record=} input.params + * @param {(Record|FormData|null)=} input.body + * @param {'arrayBuffer'|'blob'|'json'|'text'=} input.responseType + * @param {AbortSignal=} input.abortSignal + * @returns {Promise<(ArrayBuffer|Blob|Record|String|null)>} + * @throws {Record|null} resp json error + */ + async send(s) { + const o = this.transformRequestParams(s), t = s.responseType || "json", l = { + method: s.method, + headers: o.headers, + signal: s.abortSignal + }, p = o.url + "?" + new URLSearchParams(o.params); + if (o.method !== "get" && o.body != null) { + let v; + o.body instanceof FormData ? v = s.body : (v = JSON.stringify(o.body), l.headers["Content-Type"] = "application/json"), l.body = v; + } + const d = await fetch(p, l); + if (d.ok) + return await d[t](); + throw await d.json(); + } +} +re = new WeakMap(); +function Je(n) { + const s = { + baseUrl: "", + headers: {}, + params: {}, + body: {}, + xsrfHeaderName: "X-CSRF-Token" + }; + return typeof n == "string" ? Object.assign(s, { baseUrl: n }) : Object.assign(s, n), new Ke(s); } -const Ce = g(""); -function X() { - function l(t) { - Ce.value = t; +function xe(n) { + let s = localStorage.getItem(n + "_storage"); + const o = b(JSON.parse(s)); + ce(o, t); + function t() { + o.value === null || o.value === "" ? localStorage.removeItem(n + "_storage") : localStorage.setItem(n + "_storage", JSON.stringify(o.value)); } - return { apiUrl: Ce, setApiUrl: l }; + function l(v, f) { + o.value = Object.assign({ ...o.value }, { [v]: f }); + } + function p() { + o.value = null; + } + return { getStore: (v, f = null) => o.value === null || o.value === "" ? f : o.value.hasOwnProperty(v) ? o.value[v] : f, setStore: l, clearStore: p }; } -const Ye = { class: "border-neutral-300 flex justify-between items-center py-1 text-sm" }, Je = { +const q = { + EDIT: "edit", + NEW_FILE: "newfile", + NEW_FOLDER: "newfolder", + PREVIEW: "preview", + ARCHIVE: "archive", + UNARCHIVE: "unarchive", + SEARCH: "search", + RENAME: "rename", + UPLOAD: "upload", + DELETE: "delete", + DOWNLOAD: "download", + LANGUAGE: "language" +}, Xe = Object.values(q), Qe = { class: "border-neutral-300 flex justify-between items-center py-1 text-sm" }, Ze = { key: 0, class: "flex text-center" -}, Ke = ["aria-label"], We = /* @__PURE__ */ e("svg", { +}, et = ["aria-label"], tt = /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", class: "h-6 w-6 md:h-8 md:w-8 m-auto cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300", fill: "none", @@ -59,9 +187,9 @@ const Ye = { class: "border-neutral-300 flex justify-between items-center py-1 t "stroke-linejoin": "round", d: "M12 10.5v6m3-3H9m4.06-7.19l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z" }) -], -1), Xe = [ - We -], Qe = ["aria-label"], Ze = /* @__PURE__ */ e("svg", { +], -1), st = [ + tt +], ot = ["aria-label"], at = /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", class: "h-6 w-6 md:h-8 md:w-8 m-auto cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300", fill: "none", @@ -74,21 +202,21 @@ const Ye = { class: "border-neutral-300 flex justify-between items-center py-1 t "stroke-linejoin": "round", d: "M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-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 00-9-9z" }) -], -1), et = [ - Ze -], tt = ["aria-label"], ot = /* @__PURE__ */ e("path", { +], -1), rt = [ + at +], nt = ["aria-label"], lt = /* @__PURE__ */ e("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10" -}, null, -1), st = [ - ot -], at = ["aria-label"], nt = /* @__PURE__ */ e("path", { +}, null, -1), it = [ + lt +], dt = ["aria-label"], ct = /* @__PURE__ */ e("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" -}, null, -1), rt = [ - nt -], lt = ["aria-label"], it = /* @__PURE__ */ e("svg", { +}, null, -1), ut = [ + ct +], mt = ["aria-label"], vt = /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", class: "h-6 w-6 md:h-8 md:w-8 m-auto cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300", fill: "none", @@ -101,298 +229,304 @@ const Ye = { class: "border-neutral-300 flex justify-between items-center py-1 t "stroke-linejoin": "round", d: "M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5m-13.5-9L12 3m0 0l4.5 4.5M12 3v13.5" }) -], -1), dt = [ - it -], ct = ["aria-label"], ut = /* @__PURE__ */ e("path", { +], -1), pt = [ + vt +], ht = ["aria-label"], ft = /* @__PURE__ */ e("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M20.25 7.5l-.625 10.632a2.25 2.25 0 01-2.247 2.118H6.622a2.25 2.25 0 01-2.247-2.118L3.75 7.5m6 4.125l2.25 2.25m0 0l2.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.125z" -}, null, -1), mt = [ - ut -], vt = ["aria-label"], pt = /* @__PURE__ */ e("path", { +}, null, -1), gt = [ + ft +], kt = ["aria-label"], bt = /* @__PURE__ */ e("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M20.25 7.5l-.625 10.632a2.25 2.25 0 01-2.247 2.118H6.622a2.25 2.25 0 01-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.125z" -}, null, -1), ht = [ - pt -], ft = { +}, null, -1), _t = [ + bt +], yt = { key: 1, class: "flex text-center" -}, gt = { class: "pl-2" }, kt = { class: "dark:bg-gray-700 bg-gray-200 text-xs px-2 py-1 rounded" }, _t = { +}, xt = { class: "pl-2" }, wt = { class: "dark:bg-gray-700 bg-gray-200 text-xs px-2 py-1 rounded" }, $t = { key: 0, class: "animate-spin p-0.5 h-5 w-5 text-white ml-auto", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24" -}, xt = /* @__PURE__ */ e("circle", { +}, Ct = /* @__PURE__ */ e("circle", { class: "opacity-25 stroke-blue-900 dark:stroke-blue-100", cx: "12", cy: "12", r: "10", stroke: "currentColor", "stroke-width": "4" -}, null, -1), bt = /* @__PURE__ */ e("path", { +}, null, -1), Mt = /* @__PURE__ */ e("path", { class: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" -}, null, -1), wt = [ - xt, - bt -], yt = { class: "flex text-center items-center justify-end" }, $t = ["aria-label"], Ct = { +}, null, -1), jt = [ + Ct, + Mt +], Et = { class: "flex text-center items-center justify-end" }, St = ["aria-label"], Dt = { xmlns: "http://www.w3.org/2000/svg", class: "h-6 w-6 md:h-8 md:w-8 m-auto cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300", fill: "none", viewBox: "0 0 24 24", stroke: "none", "stroke-width": "1.5" -}, Mt = { +}, Ot = { key: 0, "stroke-linecap": "round", "stroke-linejoin": "round", d: "M9 9V4.5M9 9H4.5M9 9L3.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.5l5.25 5.25" -}, jt = { +}, At = { key: 1, "stroke-linecap": "round", "stroke-linejoin": "round", 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" -}, St = ["aria-label"], Dt = { +}, Lt = ["aria-label"], zt = { key: 0, "stroke-linecap": "round", "stroke-linejoin": "round", d: "M3.75 6A2.25 2.25 0 016 3.75h2.25A2.25 2.25 0 0110.5 6v2.25a2.25 2.25 0 01-2.25 2.25H6a2.25 2.25 0 01-2.25-2.25V6zM3.75 15.75A2.25 2.25 0 016 13.5h2.25a2.25 2.25 0 012.25 2.25V18a2.25 2.25 0 01-2.25 2.25H6A2.25 2.25 0 013.75 18v-2.25zM13.5 6a2.25 2.25 0 012.25-2.25H18A2.25 2.25 0 0120.25 6v2.25A2.25 2.25 0 0118 10.5h-2.25a2.25 2.25 0 01-2.25-2.25V6zM13.5 15.75a2.25 2.25 0 012.25-2.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-2.25A2.25 2.25 0 0113.5 18v-2.25z" -}, Ot = { +}, Ft = { key: 1, "stroke-linecap": "round", "stroke-linejoin": "round", d: "M3.75 12h16.5m-16.5 3.75h16.5M3.75 19.5h16.5M5.625 4.5h12.75a1.875 1.875 0 010 3.75H5.625a1.875 1.875 0 010-3.75z" -}, zt = { +}, Nt = { name: "VFToolbar" -}, Et = /* @__PURE__ */ Object.assign(zt, { +}, Vt = /* @__PURE__ */ Object.assign(Nt, { props: { data: Object }, - setup(l) { - const t = k("emitter"); - k("usePropDarkMode"); - const { getStore: s, setStore: o } = k("storage"), { t: i } = k("i18n"), m = g(s("viewport", "grid")), n = g([]), h = g(s("full-screen", !1)), p = g(""); - t.on("vf-search-query", ({ newQuery: y }) => { - p.value = y; + setup(n) { + const s = g("emitter"); + g("usePropDarkMode"); + const { getStore: o, setStore: t } = g("storage"), { t: l } = g("i18n"), p = b(o("viewport", "grid")), d = b([]), v = b(o("full-screen", !1)), f = g("features"), i = b(""); + s.on("vf-search-query", ({ newQuery: $ }) => { + i.value = $; }); - const c = k("loadingState"), d = () => c.value, f = () => { - h.value = !h.value, t.emit("vf-fullscreen-toggle"); + const m = g("loadingState"), h = () => m.value, E = () => { + v.value = !v.value, s.emit("vf-fullscreen-toggle"); }; - return t.on("vf-nodes-selected", (y) => { - n.value = y; - }), t.on("vf-view-toggle", (y) => { - o("viewport", y), m.value = y; - }), (y, w) => (r(), v("div", Ye, [ - p.value.length ? (r(), v("div", ft, [ - e("div", gt, [ - U(u(a(i)("Search results for")) + " ", 1), - e("span", kt, u(p.value), 1) + return s.on("vf-nodes-selected", ($) => { + d.value = $; + }), s.on("vf-view-toggle", ($) => { + t("viewport", $), p.value = $; + }), ($, C) => (r(), u("div", Qe, [ + i.value.length ? (r(), u("div", yt, [ + e("div", xt, [ + H(c(a(l)("Search results for")) + " ", 1), + e("span", wt, c(i.value), 1) ]), - d() ? (r(), v("svg", _t, wt)) : V("", !0) - ])) : (r(), v("div", Je, [ - e("div", { + h() ? (r(), u("svg", $t, jt)) : O("", !0) + ])) : (r(), u("div", Ze, [ + a(f).includes(a(q).NEW_FOLDER) ? (r(), u("div", { + key: 0, class: "mx-1.5", - "aria-label": a(i)("New Folder"), + "aria-label": a(l)("New Folder"), "data-microtip-position": "bottom-right", role: "tooltip", - onClick: w[0] || (w[0] = (B) => a(t).emit("vf-modal-show", { type: "new-folder", items: n.value })) - }, Xe, 8, Ke), - e("div", { + onClick: C[0] || (C[0] = (y) => a(s).emit("vf-modal-show", { type: "new-folder", items: d.value })) + }, st, 8, et)) : O("", !0), + a(f).includes(a(q).NEW_FILE) ? (r(), u("div", { + key: 1, class: "mx-1.5", - "aria-label": a(i)("New File"), + "aria-label": a(l)("New File"), "data-microtip-position": "bottom", role: "tooltip", - onClick: w[1] || (w[1] = (B) => a(t).emit("vf-modal-show", { type: "new-file", items: n.value })) - }, et, 8, Qe), - e("div", { + onClick: C[1] || (C[1] = (y) => a(s).emit("vf-modal-show", { type: "new-file", items: d.value })) + }, rt, 8, ot)) : O("", !0), + a(f).includes(a(q).RENAME) ? (r(), u("div", { + key: 2, class: "mx-1.5", - "aria-label": a(i)("Rename"), + "aria-label": a(l)("Rename"), "data-microtip-position": "bottom", role: "tooltip", - onClick: w[2] || (w[2] = (B) => n.value.length != 1 || a(t).emit("vf-modal-show", { type: "rename", items: n.value })) + onClick: C[2] || (C[2] = (y) => d.value.length != 1 || a(s).emit("vf-modal-show", { type: "rename", items: d.value })) }, [ - (r(), v("svg", { + (r(), u("svg", { xmlns: "http://www.w3.org/2000/svg", - class: T([n.value.length == 1 ? "cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300" : "stroke-gray-200 dark:stroke-gray-700", "h-6 w-6 md:h-8 md:w-8 m-auto"]), + class: R([d.value.length == 1 ? "cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300" : "stroke-gray-200 dark:stroke-gray-700", "h-6 w-6 md:h-8 md:w-8 m-auto"]), fill: "none", viewBox: "0 0 24 24", stroke: "none", "stroke-width": "1.5" - }, st, 2)) - ], 8, tt), - e("div", { + }, it, 2)) + ], 8, nt)) : O("", !0), + a(f).includes(a(q).DELETE) ? (r(), u("div", { + key: 3, class: "mx-1.5", - "aria-label": a(i)("Delete"), + "aria-label": a(l)("Delete"), "data-microtip-position": "bottom", role: "tooltip", - onClick: w[3] || (w[3] = (B) => !n.value.length || a(t).emit("vf-modal-show", { type: "delete", items: n.value })) + onClick: C[3] || (C[3] = (y) => !d.value.length || a(s).emit("vf-modal-show", { type: "delete", items: d.value })) }, [ - (r(), v("svg", { + (r(), u("svg", { xmlns: "http://www.w3.org/2000/svg", - class: T([n.value.length ? "cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300" : "stroke-gray-200 dark:stroke-gray-700", "h-6 w-6 md:h-8 md:w-8 m-auto"]), + class: R([d.value.length ? "cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300" : "stroke-gray-200 dark:stroke-gray-700", "h-6 w-6 md:h-8 md:w-8 m-auto"]), fill: "none", viewBox: "0 0 24 24", stroke: "none", "stroke-width": "1.5" - }, rt, 2)) - ], 8, at), - e("div", { + }, ut, 2)) + ], 8, dt)) : O("", !0), + a(f).includes(a(q).UPLOAD) ? (r(), u("div", { + key: 4, class: "mx-1.5", - "aria-label": a(i)("Upload"), + "aria-label": a(l)("Upload"), "data-microtip-position": "bottom", role: "tooltip", - onClick: w[4] || (w[4] = (B) => a(t).emit("vf-modal-show", { type: "upload", items: n.value })) - }, dt, 8, lt), - n.value.length == 1 && n.value[0].mime_type == "application/zip" ? (r(), v("div", { - key: 0, + onClick: C[4] || (C[4] = (y) => a(s).emit("vf-modal-show", { type: "upload", items: d.value })) + }, pt, 8, mt)) : O("", !0), + a(f).includes(a(q).UNARCHIVE) && d.value.length == 1 && d.value[0].mime_type == "application/zip" ? (r(), u("div", { + key: 5, class: "mx-1.5", - "aria-label": a(i)("Unarchive"), + "aria-label": a(l)("Unarchive"), "data-microtip-position": "bottom", role: "tooltip", - onClick: w[5] || (w[5] = (B) => !n.value.length || a(t).emit("vf-modal-show", { type: "unarchive", items: n.value })) + onClick: C[5] || (C[5] = (y) => !d.value.length || a(s).emit("vf-modal-show", { type: "unarchive", items: d.value })) }, [ - (r(), v("svg", { + (r(), u("svg", { xmlns: "http://www.w3.org/2000/svg", - class: T([n.value.length ? "cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300" : "stroke-gray-200 dark:stroke-gray-700", "h-6 w-6 md:h-8 md:w-8 m-auto"]), + class: R([d.value.length ? "cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300" : "stroke-gray-200 dark:stroke-gray-700", "h-6 w-6 md:h-8 md:w-8 m-auto"]), fill: "none", viewBox: "0 0 24 24", stroke: "none", "stroke-width": "1.5" - }, mt, 2)) - ], 8, ct)) : (r(), v("div", { - key: 1, + }, gt, 2)) + ], 8, ht)) : O("", !0), + a(f).includes(a(q).ARCHIVE) ? (r(), u("div", { + key: 6, class: "mx-1.5", - "aria-label": a(i)("Archive"), + "aria-label": a(l)("Archive"), "data-microtip-position": "bottom", role: "tooltip", - onClick: w[6] || (w[6] = (B) => !n.value.length || a(t).emit("vf-modal-show", { type: "archive", items: n.value })) + onClick: C[6] || (C[6] = (y) => !d.value.length || a(s).emit("vf-modal-show", { type: "archive", items: d.value })) }, [ - (r(), v("svg", { + (r(), u("svg", { xmlns: "http://www.w3.org/2000/svg", - class: T([n.value.length ? "cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300" : "stroke-gray-200 dark:stroke-gray-700", "h-6 w-6 md:h-8 md:w-8 m-auto"]), + class: R([d.value.length ? "cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300" : "stroke-gray-200 dark:stroke-gray-700", "h-6 w-6 md:h-8 md:w-8 m-auto"]), fill: "none", viewBox: "0 0 24 24", stroke: "none", "stroke-width": "1.5" - }, ht, 2)) - ], 8, vt)) + }, _t, 2)) + ], 8, kt)) : O("", !0) ])), - e("div", yt, [ + e("div", Et, [ e("div", { class: "mx-1.5", - "aria-label": a(i)("Toggle Full Screen"), + "aria-label": a(l)("Toggle Full Screen"), "data-microtip-position": "bottom-left", role: "tooltip", - onClick: f + onClick: E }, [ - (r(), v("svg", Ct, [ - h.value ? (r(), v("path", Mt)) : (r(), v("path", jt)) + (r(), u("svg", Dt, [ + v.value ? (r(), u("path", Ot)) : (r(), u("path", At)) ])) - ], 8, $t), + ], 8, St), e("div", { class: "mx-1.5", - "aria-label": a(i)("Change View"), + "aria-label": a(l)("Change View"), "data-microtip-position": "bottom-left", role: "tooltip", - onClick: w[7] || (w[7] = (B) => p.value.length || a(t).emit("vf-view-toggle", m.value == "list" ? "grid" : "list")) + onClick: C[7] || (C[7] = (y) => i.value.length || a(s).emit("vf-view-toggle", p.value == "list" ? "grid" : "list")) }, [ - (r(), v("svg", { + (r(), u("svg", { xmlns: "http://www.w3.org/2000/svg", - class: T([p.value.length ? "stroke-gray-200 dark:stroke-gray-700" : "cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300", "h-6 w-6 md:h-8 md:w-8 m-auto"]), + class: R([i.value.length ? "stroke-gray-200 dark:stroke-gray-700" : "cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300", "h-6 w-6 md:h-8 md:w-8 m-auto"]), fill: "none", viewBox: "0 0 24 24", stroke: "none", "stroke-width": "1.5" }, [ - m.value == "grid" ? (r(), v("path", Dt)) : V("", !0), - m.value == "list" ? (r(), v("path", Ot)) : V("", !0) + p.value == "grid" ? (r(), u("path", zt)) : O("", !0), + p.value == "list" ? (r(), u("path", Ft)) : O("", !0) ], 2)) - ], 8, St) + ], 8, Lt) ]) ])); } -}), Ee = (l, t = null) => new Date(l * 1e3).toLocaleString(t ?? navigator.language ?? "en-US"), Ft = { +}), Fe = (n, s = null) => new Date(n * 1e3).toLocaleString(s ?? navigator.language ?? "en-US"), Tt = { key: 0, xmlns: "http://www.w3.org/2000/svg", class: "h-5 w-5", viewBox: "0 0 20 20", fill: "currentColor" -}, Vt = /* @__PURE__ */ e("path", { +}, Bt = /* @__PURE__ */ e("path", { "fill-rule": "evenodd", d: "M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z", "clip-rule": "evenodd" -}, null, -1), Bt = [ - Vt -], At = { +}, null, -1), Ht = [ + Bt +], Ut = { key: 1, xmlns: "http://www.w3.org/2000/svg", class: "h-5 w-5", viewBox: "0 0 20 20", fill: "currentColor" -}, Lt = /* @__PURE__ */ e("path", { +}, qt = /* @__PURE__ */ e("path", { "fill-rule": "evenodd", d: "M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z", "clip-rule": "evenodd" -}, null, -1), Nt = [ - Lt -], Ut = { +}, null, -1), Rt = [ + qt +], It = { name: "VFSortIcon" -}, me = /* @__PURE__ */ Object.assign(Ut, { +}, me = /* @__PURE__ */ Object.assign(It, { props: { direction: String }, - setup(l) { - return (t, s) => (r(), v("div", null, [ - l.direction == "down" ? (r(), v("svg", Ft, Bt)) : V("", !0), - l.direction == "up" ? (r(), v("svg", At, Nt)) : V("", !0) + setup(n) { + return (s, o) => (r(), u("div", null, [ + n.direction == "down" ? (r(), u("svg", Tt, Ht)) : O("", !0), + n.direction == "up" ? (r(), u("svg", Ut, Rt)) : O("", !0) ])); } -}), Tt = ["onClick"], Ht = { +}), Pt = ["onClick"], Wt = { name: "VFToast.vue" -}, It = /* @__PURE__ */ Object.assign(Ht, { - setup(l) { - const t = k("emitter"), { getStore: s } = k("storage"), o = g(s("full-screen", !1)), i = (p) => p == "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", m = g([]), n = (p) => { - m.value.splice(p, 1); - }, h = (p) => { - let c = m.value.findIndex((d) => d.id === p); - c !== -1 && n(c); +}, Gt = /* @__PURE__ */ Object.assign(Wt, { + setup(n) { + const s = g("emitter"), { getStore: o } = g("storage"), t = b(o("full-screen", !1)), l = (f) => f == "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", p = b([]), d = (f) => { + p.value.splice(f, 1); + }, v = (f) => { + let i = p.value.findIndex((m) => m.id === f); + i !== -1 && d(i); }; - return t.on("vf-toast-clear", () => { - m.value = []; - }), t.on("vf-toast-push", (p) => { - let c = (/* @__PURE__ */ new Date()).getTime().toString(36).concat(performance.now().toString(), Math.random().toString()).replace(/\./g, ""); - p.id = c, m.value.push(p), setTimeout(() => { - h(c); + return s.on("vf-toast-clear", () => { + p.value = []; + }), s.on("vf-toast-push", (f) => { + let i = (/* @__PURE__ */ new Date()).getTime().toString(36).concat(performance.now().toString(), Math.random().toString()).replace(/\./g, ""); + f.id = i, p.value.push(f), setTimeout(() => { + v(i); }, 5e3); - }), (p, c) => (r(), v("div", { - class: T([o.value.value ? "fixed" : "absolute", "bottom-0 max-w-fit flex flex-col bottom-0 left-1/2 -translate-x-1/2"]) + }), (f, i) => (r(), u("div", { + class: R([t.value.value ? "fixed" : "absolute", "bottom-0 max-w-fit flex flex-col bottom-0 left-1/2 -translate-x-1/2"]) }, [ P(Ve, { name: "vf-toast-item", "leave-active-class": "transition-all duration-1000", "leave-to-class": "opacity-0" }, { - default: E(() => [ - (r(!0), v(H, null, J(m.value, (d, f) => (r(), v("div", { - onClick: (y) => n(f), - key: d, - class: T([i(d.type), "inline-block mx-auto my-0.5 py-0.5 px-2 min-w-max bg-gray-50 dark:bg-gray-600 border text-xs sm:text-sm rounded cursor-pointer"]) - }, u(d.label), 11, Tt))), 128)) + default: z(() => [ + (r(!0), u(I, null, K(p.value, (m, h) => (r(), u("div", { + onClick: (E) => d(h), + key: m, + class: R([l(m.type), "inline-block mx-auto my-0.5 py-0.5 px-2 min-w-max bg-gray-50 dark:bg-gray-600 border text-xs sm:text-sm rounded cursor-pointer"]) + }, c(m.label), 11, Pt))), 128)) ]), _: 1 }) ], 2)); } -}), oe = (l) => Object.entries(l).map((t) => t.map(encodeURIComponent).join("=")).join("&"), { apiUrl: qt } = X(), be = (l, t) => qt.value + "?" + oe({ q: "preview", adapter: l, path: t }); -function we(l, t = 14) { - let s = `((?=([\\w\\W]{0,${t}}))([\\w\\W]{8,})([\\w\\W]{8,}))`; - return l.replace(new RegExp(s), "$2..$4"); +}); +function we(n, s = 14) { + let o = `((?=([\\w\\W]{0,${s}}))([\\w\\W]{8,})([\\w\\W]{8,}))`; + return n.replace(new RegExp(o), "$2..$4"); } -const Rt = { class: "relative flex-auto flex flex-col overflow-hidden" }, Pt = { +const Yt = { class: "relative flex-auto flex flex-col overflow-hidden" }, Kt = { key: 0, class: "grid grid-cols-12 border-b border-neutral-300 border-gray-200 dark:border-gray-700 text-xs select-none" -}, Gt = { class: "absolute" }, Yt = /* @__PURE__ */ e("svg", { +}, Jt = { class: "absolute" }, Xt = /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", 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", fill: "none", @@ -405,7 +539,7 @@ const Rt = { class: "relative flex-auto flex flex-col overflow-hidden" }, Pt = { "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" }) -], -1), Jt = { class: "text-neutral-700 dark:text-neutral-300 p-1 absolute text-center top-4 right-[-2rem] md:top-5 md:right-[-2.4rem] z-20 text-xs" }, Kt = ["onDblclick", "onContextmenu", "data-type", "data-item", "data-index"], Wt = { class: "grid grid-cols-12 items-center" }, Xt = { class: "flex col-span-7 items-center" }, Qt = { +], -1), Qt = { class: "text-neutral-700 dark:text-neutral-300 p-1 absolute text-center top-4 right-[-2rem] md:top-5 md:right-[-2.4rem] z-20 text-xs" }, Zt = ["onDblclick", "onContextmenu", "data-type", "data-item", "data-index"], es = { class: "grid grid-cols-12 items-center" }, ts = { class: "flex col-span-7 items-center" }, ss = { key: 0, xmlns: "http://www.w3.org/2000/svg", class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500", @@ -413,13 +547,13 @@ const Rt = { class: "relative flex-auto flex flex-col overflow-hidden" }, Pt = { viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, Zt = /* @__PURE__ */ e("path", { +}, os = /* @__PURE__ */ e("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), eo = [ - Zt -], to = { +}, null, -1), as = [ + os +], rs = { key: 1, xmlns: "http://www.w3.org/2000/svg", class: "h-5 w-5 text-neutral-500", @@ -427,13 +561,13 @@ const Rt = { class: "relative flex-auto flex flex-col overflow-hidden" }, Pt = { viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, oo = /* @__PURE__ */ e("path", { +}, ns = /* @__PURE__ */ e("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), so = [ - oo -], ao = { class: "overflow-ellipsis overflow-hidden whitespace-nowrap" }, no = { class: "col-span-5 overflow-ellipsis overflow-hidden whitespace-nowrap" }, ro = ["onDblclick", "onContextmenu", "onDragstart", "onDragover", "onDrop", "data-type", "data-item", "data-index"], lo = { class: "grid grid-cols-12 items-center" }, io = { class: "flex col-span-7 items-center" }, co = { +}, null, -1), ls = [ + ns +], is = { class: "overflow-ellipsis overflow-hidden whitespace-nowrap" }, ds = { class: "col-span-5 overflow-ellipsis overflow-hidden whitespace-nowrap" }, cs = ["onDblclick", "onContextmenu", "onDragstart", "onDragover", "onDrop", "data-type", "data-item", "data-index"], us = { class: "grid grid-cols-12 items-center" }, ms = { class: "flex col-span-7 items-center" }, vs = { key: 0, xmlns: "http://www.w3.org/2000/svg", class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500", @@ -441,13 +575,13 @@ const Rt = { class: "relative flex-auto flex flex-col overflow-hidden" }, Pt = { viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, uo = /* @__PURE__ */ e("path", { +}, ps = /* @__PURE__ */ e("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), mo = [ - uo -], vo = { +}, null, -1), hs = [ + ps +], fs = { key: 1, xmlns: "http://www.w3.org/2000/svg", class: "h-5 w-5 text-neutral-500", @@ -455,13 +589,13 @@ const Rt = { class: "relative flex-auto flex flex-col overflow-hidden" }, Pt = { viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, po = /* @__PURE__ */ e("path", { +}, gs = /* @__PURE__ */ e("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), ho = [ - po -], fo = { class: "overflow-ellipsis overflow-hidden whitespace-nowrap" }, go = { class: "col-span-2 text-center" }, ko = { class: "col-span-3 overflow-ellipsis overflow-hidden whitespace-nowrap" }, _o = ["onDblclick", "onContextmenu", "onDragstart", "onDragover", "onDrop", "data-type", "data-item", "data-index"], xo = { class: "relative" }, bo = { +}, null, -1), ks = [ + gs +], bs = { class: "overflow-ellipsis overflow-hidden whitespace-nowrap" }, _s = { class: "col-span-2 text-center" }, ys = { class: "col-span-3 overflow-ellipsis overflow-hidden whitespace-nowrap" }, xs = ["onDblclick", "onContextmenu", "onDragstart", "onDragover", "onDrop", "data-type", "data-item", "data-index"], ws = { class: "relative" }, $s = { key: 0, xmlns: "http://www.w3.org/2000/svg", class: "h-10 w-10 md:h-12 md:w-12 m-auto fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500", @@ -469,13 +603,13 @@ const Rt = { class: "relative flex-auto flex flex-col overflow-hidden" }, Pt = { viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, wo = /* @__PURE__ */ e("path", { +}, Cs = /* @__PURE__ */ e("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), yo = [ - wo -], $o = ["data-src", "alt"], Co = { +}, null, -1), Ms = [ + Cs +], js = ["data-src", "alt"], Es = { key: 2, xmlns: "http://www.w3.org/2000/svg", class: "h-10 w-10 md:h-12 md:w-12 m-auto text-neutral-500", @@ -483,256 +617,256 @@ const Rt = { class: "relative flex-auto flex flex-col overflow-hidden" }, Pt = { viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, Mo = /* @__PURE__ */ e("path", { +}, Ss = /* @__PURE__ */ e("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), jo = [ - Mo -], So = { +}, null, -1), Ds = [ + Ss +], Os = { key: 3, class: "absolute hidden md:block top-1/2 w-full text-center text-neutral-500" -}, Do = { class: "break-all" }, Oo = { +}, As = { class: "break-all" }, Ls = { name: "VFExplorer" -}, zo = /* @__PURE__ */ Object.assign(Oo, { +}, zs = /* @__PURE__ */ Object.assign(Ls, { props: { view: String, data: Object, search: Object }, - setup(l) { - const t = l, s = k("emitter"), { setStore: o, getStore: i } = k("storage"), m = k("adapter"), n = (C) => C == null ? void 0 : C.substring(0, 3), h = g(null), p = g(null), c = g(0), d = g(null), { t: f } = k("i18n"), y = Math.floor(Math.random() * 2 ** 32), w = g(i("full-screen", !1)), B = k("filesize"); - let O; - s.on("vf-fullscreen-toggle", () => { - h.value.style.height = null, w.value = !w.value, o("full-screen", w.value); + setup(n) { + const s = n, o = g("requester"), t = g("emitter"), { setStore: l, getStore: p } = g("storage"), d = g("adapter"), v = (k) => k == null ? void 0 : k.substring(0, 3), f = b(null), i = b(null), m = b(0), h = b(null), { t: E } = g("i18n"), $ = Math.floor(Math.random() * 2 ** 32), C = b(p("full-screen", !1)), y = g("filesize"); + let A; + t.on("vf-fullscreen-toggle", () => { + f.value.style.height = null, C.value = !C.value, l("full-screen", C.value); }); - const D = g(""); - s.on("vf-search-query", ({ newQuery: C }) => { - D.value = C, C ? s.emit("vf-fetch", { + const M = b(""); + t.on("vf-search-query", ({ newQuery: k }) => { + M.value = k, k ? t.emit("vf-fetch", { params: { q: "search", - adapter: t.data.adapter, - path: t.data.dirname, - filter: C + adapter: s.data.adapter, + path: s.data.dirname, + filter: k }, - onSuccess: (b) => { - b.files.length || s.emit("vf-toast-push", { label: f("No search result found.") }); + onSuccess: (x) => { + x.files.length || t.emit("vf-toast-push", { label: E("No search result found.") }); } - }) : s.emit("vf-fetch", { params: { q: "index", adapter: t.data.adapter, path: t.data.dirname } }); + }) : t.emit("vf-fetch", { params: { q: "index", adapter: s.data.adapter, path: s.data.dirname } }); }); - let S = null; - const F = () => { - S && clearTimeout(S); - }, M = g(!0), j = (C) => { - C.touches.length > 1 && (M.value ? (d.value.stop(), s.emit("vf-toast-push", { label: f("Drag&Drop: off") })) : (d.value.start(), s.emit("vf-toast-push", { label: f("Drag&Drop: on") }), s.emit("vf-explorer-update")), M.value = !M.value); - }, z = (C) => { - S = setTimeout(() => { - const b = new MouseEvent("contextmenu", { + let N = null; + const D = () => { + N && clearTimeout(N); + }, L = b(!0), S = (k) => { + k.touches.length > 1 && (L.value ? (h.value.stop(), t.emit("vf-toast-push", { label: E("Drag&Drop: off") })) : (h.value.start(), t.emit("vf-toast-push", { label: E("Drag&Drop: on") }), t.emit("vf-explorer-update")), L.value = !L.value); + }, U = (k) => { + N = setTimeout(() => { + const x = new MouseEvent("contextmenu", { bubbles: !0, cancelable: !1, view: window, button: 2, buttons: 0, - clientX: C.target.getBoundingClientRect().x, - clientY: C.target.getBoundingClientRect().y + clientX: k.target.getBoundingClientRect().x, + clientY: k.target.getBoundingClientRect().y }); - C.target.dispatchEvent(b); + k.target.dispatchEvent(x); }, 500); - }, I = (C) => { - C.type == "dir" ? (s.emit("vf-search-exit"), s.emit("vf-fetch", { params: { q: "index", adapter: t.data.adapter, path: C.path } })) : s.emit("vf-modal-show", { type: "preview", adapter: t.data.adapter, item: C }); - }, A = ve({ active: !1, column: "", order: "" }), ee = (C = !0) => { - let b = [...t.data.files], _ = A.column, x = A.order == "asc" ? 1 : -1; - if (!C) - return b; - const $ = (L, q) => typeof L == "string" && typeof q == "string" ? L.toLowerCase().localeCompare(q.toLowerCase()) : L < q ? -1 : L > q ? 1 : 0; - return A.active && (b = b.slice().sort((L, q) => $(L[_], q[_]) * x)), b; - }, G = (C) => { - A.active && A.column == C ? (A.active = A.order == "asc", A.column = C, A.order = "desc") : (A.active = !0, A.column = C, A.order = "asc"); - }, te = () => d.value.getSelection().map((C) => JSON.parse(C.dataset.item)), ie = (C, b) => { - if (C.altKey || C.ctrlKey || C.metaKey) - return C.preventDefault(), !1; - C.dataTransfer.setDragImage(p.value, 0, 15), C.dataTransfer.effectAllowed = "all", C.dataTransfer.dropEffect = "copy", C.dataTransfer.setData("items", JSON.stringify(te())); - }, de = (C, b) => { - C.preventDefault(); - let _ = JSON.parse(C.dataTransfer.getData("items")); - if (_.find((x) => x.storage != m.value)) { + }, V = (k) => { + k.type == "dir" ? (t.emit("vf-search-exit"), t.emit("vf-fetch", { params: { q: "index", adapter: s.data.adapter, path: k.path } })) : t.emit("vf-modal-show", { type: "preview", adapter: s.data.adapter, item: k }); + }, F = ve({ active: !1, column: "", order: "" }), Z = (k = !0) => { + let x = [...s.data.files], _ = F.column, j = F.order == "asc" ? 1 : -1; + if (!k) + return x; + const w = (T, W) => typeof T == "string" && typeof W == "string" ? T.toLowerCase().localeCompare(W.toLowerCase()) : T < W ? -1 : T > W ? 1 : 0; + return F.active && (x = x.slice().sort((T, W) => w(T[_], W[_]) * j)), x; + }, se = (k) => { + F.active && F.column == k ? (F.active = F.order == "asc", F.column = k, F.order = "desc") : (F.active = !0, F.column = k, F.order = "asc"); + }, ee = () => h.value.getSelection().map((k) => JSON.parse(k.dataset.item)), ae = (k, x) => { + if (k.altKey || k.ctrlKey || k.metaKey) + return k.preventDefault(), !1; + k.dataTransfer.setDragImage(i.value, 0, 15), k.dataTransfer.effectAllowed = "all", k.dataTransfer.dropEffect = "copy", k.dataTransfer.setData("items", JSON.stringify(ee())); + }, J = (k, x) => { + k.preventDefault(); + let _ = JSON.parse(k.dataTransfer.getData("items")); + if (_.find((j) => j.storage != d.value)) { alert("Moving items between different storages is not supported yet."); return; } - s.emit("vf-modal-show", { type: "move", items: { from: _, to: b } }); - }, ne = (C, b) => { - C.preventDefault(), !b || b.type !== "dir" || d.value.getSelection().find((_) => _ == C.currentTarget) ? (C.dataTransfer.dropEffect = "none", C.dataTransfer.effectAllowed = "none") : C.dataTransfer.dropEffect = "copy"; - }, ce = () => { - d.value = new Ie({ - area: h.value, + t.emit("vf-modal-show", { type: "move", items: { from: _, to: x } }); + }, ie = (k, x) => { + k.preventDefault(), !x || x.type !== "dir" || h.value.getSelection().find((_) => _ == k.currentTarget) ? (k.dataTransfer.dropEffect = "none", k.dataTransfer.effectAllowed = "none") : k.dataTransfer.dropEffect = "copy"; + }, fe = () => { + h.value = new Ie({ + area: f.value, keyboardDrag: !1, selectedClass: "vf-explorer-selected", selectorClass: "vf-explorer-selector" - }), s.on("vf-explorer-update", () => ge(() => { - d.value.clearSelection(), d.value.setSettings({ - selectables: document.getElementsByClassName("vf-item-" + y) + }), t.on("vf-explorer-update", () => he(() => { + h.value.clearSelection(), h.value.setSettings({ + selectables: document.getElementsByClassName("vf-item-" + $) }); - })), d.value.subscribe("predragstart", ({ event: C, isDragging: b }) => { - if (b) - c.value = d.value.getSelection().length, d.value.break(); + })), h.value.subscribe("predragstart", ({ event: k, isDragging: x }) => { + if (x) + m.value = h.value.getSelection().length, h.value.break(); else { - const _ = C.target.offsetWidth - C.offsetX, x = C.target.offsetHeight - C.offsetY; - _ < 15 && x < 15 && (d.value.clearSelection(), d.value.break()); + const _ = k.target.offsetWidth - k.offsetX, j = k.target.offsetHeight - k.offsetY; + _ < 15 && j < 15 && (h.value.clearSelection(), h.value.break()); } - }), d.value.subscribe("predragmove", ({ isDragging: C }) => { - C && d.value.break(); - }), d.value.subscribe("callback", ({ items: C, event: b, isDragging: _ }) => { - s.emit("vf-nodes-selected", te()), c.value = d.value.getSelection().length; + }), h.value.subscribe("predragmove", ({ isDragging: k }) => { + k && h.value.break(); + }), h.value.subscribe("callback", ({ items: k, event: x, isDragging: _ }) => { + t.emit("vf-nodes-selected", ee()), m.value = h.value.getSelection().length; }); }; - return K(() => { - O = new qe(h.value), ce(); - }), Be(() => { - d.value.Area.reset(), d.value.SelectorArea.updatePos(), O.update(); - }), K(() => { - le(() => t.view, () => s.emit("vf-explorer-update")); + return X(() => { + A = new Pe(f.value), fe(); + }), Te(() => { + h.value.Area.reset(), h.value.SelectorArea.updatePos(), A.update(); + }), X(() => { + ce(() => s.view, () => t.emit("vf-explorer-update")); }), Oe(() => { - O.destroy(); - }), (C, b) => (r(), v("div", Rt, [ - l.view == "list" || D.value.length ? (r(), v("div", Pt, [ + A.destroy(); + }), (k, x) => (r(), u("div", Yt, [ + n.view == "list" || M.value.length ? (r(), u("div", Kt, [ e("div", { - onClick: b[0] || (b[0] = (_) => G("basename")), + onClick: x[0] || (x[0] = (_) => se("basename")), class: "col-span-7 py-1 leading-6 hover:bg-neutral-100 bg-neutral-50 dark:bg-gray-800 dark:hover:bg-gray-700/10 flex items-center pl-1" }, [ - U(u(a(f)("Name")) + " ", 1), - R(P(me, { - direction: A.order == "asc" ? "down" : "up" + H(c(a(E)("Name")) + " ", 1), + Y(P(me, { + direction: F.order == "asc" ? "down" : "up" }, null, 8, ["direction"]), [ - [ue, A.active && A.column == "basename"] + [ue, F.active && F.column == "basename"] ]) ]), - D.value.length ? V("", !0) : (r(), v("div", { + M.value.length ? O("", !0) : (r(), u("div", { key: 0, - onClick: b[1] || (b[1] = (_) => G("file_size")), + onClick: x[1] || (x[1] = (_) => se("file_size")), class: "col-span-2 py-1 leading-6 hover:bg-neutral-100 bg-neutral-50 dark:bg-gray-800 dark:hover:bg-gray-700/10 flex items-center justify-center border-l border-r dark:border-gray-700" }, [ - U(u(a(f)("Size")) + " ", 1), - R(P(me, { - direction: A.order == "asc" ? "down" : "up" + H(c(a(E)("Size")) + " ", 1), + Y(P(me, { + direction: F.order == "asc" ? "down" : "up" }, null, 8, ["direction"]), [ - [ue, A.active && A.column == "file_size"] + [ue, F.active && F.column == "file_size"] ]) ])), - D.value.length ? V("", !0) : (r(), v("div", { + M.value.length ? O("", !0) : (r(), u("div", { key: 1, - onClick: b[2] || (b[2] = (_) => G("last_modified")), + onClick: x[2] || (x[2] = (_) => se("last_modified")), class: "col-span-3 py-1 leading-6 hover:bg-neutral-100 bg-neutral-50 dark:bg-gray-800 dark:hover:bg-gray-700/10 flex items-center justify-center" }, [ - U(u(a(f)("Date")) + " ", 1), - R(P(me, { - direction: A.order == "asc" ? "down" : "up" + H(c(a(E)("Date")) + " ", 1), + Y(P(me, { + direction: F.order == "asc" ? "down" : "up" }, null, 8, ["direction"]), [ - [ue, A.active && A.column == "last_modified"] + [ue, F.active && F.column == "last_modified"] ]) ])), - D.value.length ? (r(), v("div", { + M.value.length ? (r(), u("div", { key: 2, - onClick: b[3] || (b[3] = (_) => G("path")), + onClick: x[3] || (x[3] = (_) => se("path")), class: "col-span-5 py-1 leading-6 hover:bg-neutral-100 bg-neutral-50 dark:bg-gray-800 dark:hover:bg-gray-700/10 flex items-center justify-center border-l dark:border-gray-700" }, [ - U(u(a(f)("Filepath")) + " ", 1), - R(P(me, { - direction: A.order == "asc" ? "down" : "up" + H(c(a(E)("Filepath")) + " ", 1), + Y(P(me, { + direction: F.order == "asc" ? "down" : "up" }, null, 8, ["direction"]), [ - [ue, A.active && A.column == "path"] + [ue, F.active && F.column == "path"] ]) - ])) : V("", !0) - ])) : V("", !0), - e("div", Gt, [ + ])) : O("", !0) + ])) : O("", !0), + e("div", Jt, [ e("div", { ref_key: "dragImage", - ref: p, + ref: i, class: "absolute -z-50 -top-96" }, [ - Yt, - e("div", Jt, u(c.value), 1) + Xt, + e("div", Qt, c(m.value), 1) ], 512) ]), e("div", { - onTouchstart: j, - onContextmenu: b[10] || (b[10] = Z((_) => a(s).emit("vf-contextmenu-show", { event: _, area: h.value, items: te() }), ["self", "prevent"])), - class: T([w.value ? "" : "resize-y", "h-full w-full text-xs vf-selector-area vf-scrollbar min-h-[150px] overflow-auto p-1 z-0"]), + onTouchstart: S, + onContextmenu: x[10] || (x[10] = oe((_) => a(t).emit("vf-contextmenu-show", { event: _, area: f.value, items: ee() }), ["self", "prevent"])), + class: R([C.value ? "" : "resize-y", "h-full w-full text-xs vf-selector-area vf-scrollbar min-h-[150px] overflow-auto p-1 z-0"]), ref_key: "selectorArea", - ref: h + ref: f }, [ - D.value.length ? (r(!0), v(H, { key: 0 }, J(ee(), (_, x) => (r(), v("div", { - onDblclick: ($) => I(_), - onTouchstart: b[4] || (b[4] = ($) => z($)), - onTouchend: b[5] || (b[5] = ($) => F()), - onContextmenu: Z(($) => a(s).emit("vf-contextmenu-show", { event: $, area: h.value, items: te(), target: _ }), ["prevent"]), - class: T(["vf-item-" + a(y), "grid grid-cols-1 border hover:bg-neutral-50 dark:hover:bg-gray-700 border-transparent my-0.5 w-full select-none"]), + M.value.length ? (r(!0), u(I, { key: 0 }, K(Z(), (_, j) => (r(), u("div", { + onDblclick: (w) => V(_), + onTouchstart: x[4] || (x[4] = (w) => U(w)), + onTouchend: x[5] || (x[5] = (w) => D()), + onContextmenu: oe((w) => a(t).emit("vf-contextmenu-show", { event: w, area: f.value, items: ee(), target: _ }), ["prevent"]), + class: R(["vf-item-" + a($), "grid grid-cols-1 border hover:bg-neutral-50 dark:hover:bg-gray-700 border-transparent my-0.5 w-full select-none"]), "data-type": _.type, "data-item": JSON.stringify(_), - "data-index": x + "data-index": j }, [ - e("div", Wt, [ - e("div", Xt, [ - _.type == "dir" ? (r(), v("svg", Qt, eo)) : (r(), v("svg", to, so)), - e("span", ao, u(_.basename), 1) + e("div", es, [ + e("div", ts, [ + _.type == "dir" ? (r(), u("svg", ss, as)) : (r(), u("svg", rs, ls)), + e("span", is, c(_.basename), 1) ]), - e("div", no, u(_.path), 1) + e("div", ds, c(_.path), 1) ]) - ], 42, Kt))), 256)) : V("", !0), - l.view == "list" && !D.value.length ? (r(!0), v(H, { key: 1 }, J(ee(), (_, x) => (r(), v("div", { + ], 42, Zt))), 256)) : O("", !0), + n.view == "list" && !M.value.length ? (r(!0), u(I, { key: 1 }, K(Z(), (_, j) => (r(), u("div", { draggable: "true", - onDblclick: ($) => I(_), - onTouchstart: b[6] || (b[6] = ($) => z($)), - onTouchend: b[7] || (b[7] = ($) => F()), - onContextmenu: Z(($) => a(s).emit("vf-contextmenu-show", { event: $, area: h.value, items: te(), target: _ }), ["prevent"]), - onDragstart: ($) => ie($), - onDragover: ($) => ne($, _), - onDrop: ($) => de($, _), - class: T(["vf-item-" + a(y), "grid grid-cols-1 border hover:bg-neutral-50 dark:hover:bg-gray-700 border-transparent my-0.5 w-full select-none"]), + onDblclick: (w) => V(_), + onTouchstart: x[6] || (x[6] = (w) => U(w)), + onTouchend: x[7] || (x[7] = (w) => D()), + onContextmenu: oe((w) => a(t).emit("vf-contextmenu-show", { event: w, area: f.value, items: ee(), target: _ }), ["prevent"]), + onDragstart: (w) => ae(w), + onDragover: (w) => ie(w, _), + onDrop: (w) => J(w, _), + class: R(["vf-item-" + a($), "grid grid-cols-1 border hover:bg-neutral-50 dark:hover:bg-gray-700 border-transparent my-0.5 w-full select-none"]), "data-type": _.type, "data-item": JSON.stringify(_), - "data-index": x + "data-index": j }, [ - e("div", lo, [ - e("div", io, [ - _.type == "dir" ? (r(), v("svg", co, mo)) : (r(), v("svg", vo, ho)), - e("span", fo, u(_.basename), 1) + e("div", us, [ + e("div", ms, [ + _.type == "dir" ? (r(), u("svg", vs, hs)) : (r(), u("svg", fs, ks)), + e("span", bs, c(_.basename), 1) ]), - e("div", go, u(_.file_size ? a(B)(_.file_size) : ""), 1), - e("div", ko, u(a(Ee)(_.last_modified)), 1) + e("div", _s, c(_.file_size ? a(y)(_.file_size) : ""), 1), + e("div", ys, c(a(Fe)(_.last_modified)), 1) ]) - ], 42, ro))), 256)) : V("", !0), - l.view == "grid" && !D.value.length ? (r(!0), v(H, { key: 2 }, J(ee(!1), (_, x) => (r(), v("div", { + ], 42, cs))), 256)) : O("", !0), + n.view == "grid" && !M.value.length ? (r(!0), u(I, { key: 2 }, K(Z(!1), (_, j) => (r(), u("div", { draggable: "true", - onDblclick: ($) => I(_), - onTouchstart: b[8] || (b[8] = ($) => z($)), - onTouchend: b[9] || (b[9] = ($) => F()), - onContextmenu: Z(($) => a(s).emit("vf-contextmenu-show", { event: $, area: h.value, items: te(), target: _ }), ["prevent"]), - onDragstart: ($) => ie($), - onDragover: ($) => ne($, _), - onDrop: ($) => de($, _), - class: T(["vf-item-" + a(y), "border border-transparent hover:bg-neutral-50 m-1 dark:hover:bg-gray-700 inline-flex w-[5.5rem] h-20 md:w-24 text-center justify-center select-none"]), + onDblclick: (w) => V(_), + onTouchstart: x[8] || (x[8] = (w) => U(w)), + onTouchend: x[9] || (x[9] = (w) => D()), + onContextmenu: oe((w) => a(t).emit("vf-contextmenu-show", { event: w, area: f.value, items: ee(), target: _ }), ["prevent"]), + onDragstart: (w) => ae(w), + onDragover: (w) => ie(w, _), + onDrop: (w) => J(w, _), + class: R(["vf-item-" + a($), "border border-transparent hover:bg-neutral-50 m-1 dark:hover:bg-gray-700 inline-flex w-[5.5rem] h-20 md:w-24 text-center justify-center select-none"]), "data-type": _.type, "data-item": JSON.stringify(_), - "data-index": x + "data-index": j }, [ e("div", null, [ - e("div", xo, [ - _.type == "dir" ? (r(), v("svg", bo, yo)) : (_.mime_type ?? "").startsWith("image") ? (r(), v("img", { + e("div", ws, [ + _.type == "dir" ? (r(), u("svg", $s, Ms)) : (_.mime_type ?? "").startsWith("image") ? (r(), u("img", { key: 1, class: "lazy h-10 md:h-12 m-auto", - "data-src": a(be)(a(m).value, _.path), + "data-src": a(o).getPreviewUrl(a(d).value, _), alt: _.basename - }, null, 8, $o)) : (r(), v("svg", Co, jo)), - !(_.mime_type ?? "").startsWith("image") && _.type != "dir" ? (r(), v("div", So, u(n(_.extension)), 1)) : V("", !0) + }, null, 8, js)) : (r(), u("svg", Es, Ds)), + !(_.mime_type ?? "").startsWith("image") && _.type != "dir" ? (r(), u("div", Os, c(v(_.extension)), 1)) : O("", !0) ]), - e("span", Do, u(a(we)(_.basename)), 1) + e("span", As, c(a(we)(_.basename)), 1) ]) - ], 42, _o))), 256)) : V("", !0) + ], 42, xs))), 256)) : O("", !0) ], 34), - P(It) + P(Gt) ])); } -}), Eo = { class: "p-1 text-xs border-t border-neutral-300 dark:border-gray-700/50 flex justify-between select-none" }, Fo = { class: "flex leading-5 items-center" }, Vo = ["aria-label"], Bo = /* @__PURE__ */ e("svg", { +}), Fs = { class: "p-1 text-xs border-t border-neutral-300 dark:border-gray-700/50 flex justify-between select-none" }, Ns = { class: "flex leading-5 items-center" }, Vs = ["aria-label"], Ts = /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", class: "h-5 w-5", fill: "none", @@ -745,12 +879,9 @@ const Rt = { class: "relative flex-auto flex flex-col overflow-hidden" }, Pt = { "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" }) -], -1), Ao = [ - Bo -], Lo = ["value"], No = { class: "ml-3" }, Uo = { key: 0 }, To = { class: "ml-1" }, Ho = { class: "flex leading-5 items-center justify-end" }, Io = { - value: "", - disabled: "" -}, qo = /* @__PURE__ */ Ae('', 11), Ro = ["aria-label"], Po = /* @__PURE__ */ e("svg", { +], -1), Bs = [ + Ts +], Hs = ["value"], Us = { class: "ml-3" }, qs = { key: 0 }, Rs = { class: "ml-1" }, Is = { class: "flex leading-5 items-center justify-end" }, Ps = ["aria-label"], Ws = /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", class: "h-5 w-5 stroke-slate-500 cursor-pointer", fill: "none", @@ -763,128 +894,118 @@ const Rt = { class: "relative flex-auto flex flex-col overflow-hidden" }, Pt = { "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 11-18 0 9 9 0 0118 0z" }) -], -1), Go = [ - Po -], Yo = { +], -1), Gs = [ + Ws +], Ys = { name: "VFStatusbar" -}, Jo = /* @__PURE__ */ Object.assign(Yo, { +}, Ks = /* @__PURE__ */ Object.assign(Ys, { props: { data: Object }, - setup(l) { - const t = k("emitter"), { getStore: s, setStore: o } = k("storage"), i = g(0), m = k("adapter"), { t: n, changeLocale: h, locale: p } = k("i18n"), c = () => { - t.emit("vf-search-exit"), t.emit("vf-fetch", { params: { q: "index", adapter: m.value } }), o("adapter", m.value); + setup(n) { + const s = g("emitter"), { getStore: o, setStore: t } = g("storage"), l = b(0), p = g("adapter"), { t: d } = g("i18n"), v = () => { + s.emit("vf-search-exit"), s.emit("vf-fetch", { params: { q: "index", adapter: p.value } }), t("adapter", p.value); }; - t.on("vf-nodes-selected", (f) => { - i.value = f.length; + s.on("vf-nodes-selected", (i) => { + l.value = i.length; }); - const d = g(""); - return t.on("vf-search-query", ({ newQuery: f }) => { - d.value = f; - }), (f, y) => (r(), v("div", Eo, [ - e("div", Fo, [ + const f = b(""); + return s.on("vf-search-query", ({ newQuery: i }) => { + f.value = i; + }), (i, m) => (r(), u("div", Fs, [ + e("div", Ns, [ e("div", { class: "mx-2", - "aria-label": a(n)("Storage"), + "aria-label": a(d)("Storage"), "data-microtip-position": "top-right", role: "tooltip" - }, Ao, 8, Vo), - R(e("select", { - "onUpdate:modelValue": y[0] || (y[0] = (w) => re(m) ? m.value = w : null), - onChange: c, + }, Bs, 8, Vs), + Y(e("select", { + "onUpdate:modelValue": m[0] || (m[0] = (h) => de(p) ? p.value = h : null), + onChange: v, class: "py-0.5 text-sm text-slate-500 border dark:border-gray-600 dark:text-neutral-50 dark:bg-gray-700 rounded pl-2 pr-8" }, [ - (r(!0), v(H, null, J(l.data.storages, (w) => (r(), v("option", { value: w }, u(w), 9, Lo))), 256)) + (r(!0), u(I, null, K(n.data.storages, (h) => (r(), u("option", { value: h }, c(h), 9, Hs))), 256)) ], 544), [ - [ye, a(m)] + [Ae, a(p)] ]), - e("div", No, [ - d.value.length ? (r(), v("span", Uo, u(l.data.files.length) + " items found. ", 1)) : V("", !0), - e("span", To, u(i.value > 0 ? i.value + " " + a(n)("item(s) selected.") : ""), 1) + e("div", Us, [ + f.value.length ? (r(), u("span", qs, c(n.data.files.length) + " items found. ", 1)) : O("", !0), + e("span", Rs, c(l.value > 0 ? l.value + " " + a(d)("item(s) selected.") : ""), 1) ]) ]), - e("div", Ho, [ - R(e("select", { - "onUpdate:modelValue": y[1] || (y[1] = (w) => re(p) ? p.value = w : null), - onChange: y[2] || (y[2] = (w) => a(h)(w.target.value)), - class: "w-[120px] delay-200 duration-300 hover:w-full transition-[width] py-0.5 text-sm text-slate-500 border dark:border-gray-600 dark:text-neutral-50 dark:bg-gray-700 rounded pl-2 pr-8 mr-3" - }, [ - e("option", Io, u(a(n)("Language")), 1), - qo - ], 544), [ - [ye, a(p)] - ]), + e("div", Is, [ e("span", { class: "mr-1", - "aria-label": a(n)("About"), + "aria-label": a(d)("About"), "data-microtip-position": "top-left", role: "tooltip", - onClick: y[3] || (y[3] = (w) => a(t).emit("vf-modal-show", { type: "about" })) - }, Go, 8, Ro) + onClick: m[1] || (m[1] = (h) => a(s).emit("vf-modal-show", { type: "about" })) + }, Gs, 8, Ps) ]) ])); } -}), Ko = (l, t = 0, s = !1) => { - let o; - return (...i) => { - s && !o && l(...i), clearTimeout(o), o = setTimeout(() => { - l(...i); - }, t); +}), Js = (n, s = 0, o = !1) => { + let t; + return (...l) => { + o && !t && n(...l), clearTimeout(t), t = setTimeout(() => { + n(...l); + }, s); }; -}, Wo = (l, t, s) => { - const o = g(l); - return Le((m, n) => ({ +}, Xs = (n, s, o) => { + const t = b(n); + return Be((p, d) => ({ get() { - return m(), o.value; + return p(), t.value; }, - set: Ko( - (h) => { - o.value = h, n(); + set: Js( + (v) => { + t.value = v, d(); }, - t, - s + s, + o ) })); -}, Xo = { class: "flex p-1.5 bg-neutral-100 dark:bg-gray-800 border-t border-b border-neutral-300 dark:border-gray-700/50 items-center select-none text-xs" }, Qo = ["aria-label"], Zo = /* @__PURE__ */ e("path", { +}, Qs = { class: "flex p-1.5 bg-neutral-100 dark:bg-gray-800 border-t border-b border-neutral-300 dark:border-gray-700/50 items-center select-none text-xs" }, Zs = ["aria-label"], eo = /* @__PURE__ */ e("path", { "fill-rule": "evenodd", d: "M5.293 9.707a1 1 0 010-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 01-1.414 1.414L11 7.414V15a1 1 0 11-2 0V7.414L6.707 9.707a1 1 0 01-1.414 0z", "clip-rule": "evenodd" -}, null, -1), es = [ - Zo -], ts = ["aria-label"], os = /* @__PURE__ */ e("path", { d: "M463.5 224H472c13.3 0 24-10.7 24-24V72c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2L413.4 96.6c-87.6-86.5-228.7-86.2-315.8 1c-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.2s12.5 14.8 22.2 14.8H463.5z" }, null, -1), ss = [ - os -], as = ["aria-label"], ns = /* @__PURE__ */ e("path", { +}, null, -1), to = [ + eo +], so = ["aria-label"], oo = /* @__PURE__ */ e("path", { d: "M463.5 224H472c13.3 0 24-10.7 24-24V72c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2L413.4 96.6c-87.6-86.5-228.7-86.2-315.8 1c-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.2s12.5 14.8 22.2 14.8H463.5z" }, null, -1), ao = [ + oo +], ro = ["aria-label"], no = /* @__PURE__ */ e("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M6 18L18 6M6 6l12 12" -}, null, -1), rs = [ - ns -], ls = /* @__PURE__ */ e("path", { d: "M10.707 2.293a1 1 0 00-1.414 0l-7 7a1 1 0 001.414 1.414L4 10.414V17a1 1 0 001 1h2a1 1 0 001-1v-2a1 1 0 011-1h2a1 1 0 011 1v2a1 1 0 001 1h2a1 1 0 001-1v-6.586l.293.293a1 1 0 001.414-1.414l-7-7z" }, null, -1), is = [ - ls -], ds = { class: "flex leading-5" }, cs = /* @__PURE__ */ e("span", { class: "text-neutral-300 dark:text-gray-600 mx-0.5" }, "/", -1), us = ["title", "onClick"], ms = { +}, null, -1), lo = [ + no +], io = /* @__PURE__ */ e("path", { d: "M10.707 2.293a1 1 0 00-1.414 0l-7 7a1 1 0 001.414 1.414L4 10.414V17a1 1 0 001 1h2a1 1 0 001-1v-2a1 1 0 011-1h2a1 1 0 011 1v2a1 1 0 001 1h2a1 1 0 001-1v-6.586l.293.293a1 1 0 001.414-1.414l-7-7z" }, null, -1), co = [ + io +], uo = { class: "flex leading-5" }, mo = /* @__PURE__ */ e("span", { class: "text-neutral-300 dark:text-gray-600 mx-0.5" }, "/", -1), vo = ["title", "onClick"], po = { key: 0, class: "animate-spin p-1 h-6 w-6 text-white ml-auto", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24" -}, vs = /* @__PURE__ */ e("circle", { +}, ho = /* @__PURE__ */ e("circle", { class: "opacity-25 stroke-blue-900 dark:stroke-blue-100", cx: "12", cy: "12", r: "10", stroke: "currentColor", "stroke-width": "4" -}, null, -1), ps = /* @__PURE__ */ e("path", { +}, null, -1), fo = /* @__PURE__ */ e("path", { class: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" -}, null, -1), hs = [ - vs, - ps -], fs = { +}, null, -1), go = [ + ho, + fo +], ko = { key: 3, class: "relative flex bg-white dark:bg-gray-700 justify-between items-center rounded p-1 ml-2 w-full" -}, gs = /* @__PURE__ */ e("div", null, [ +}, bo = /* @__PURE__ */ e("div", null, [ /* @__PURE__ */ e("svg", { class: "h-6 w-6 p-1 m-auto stroke-gray-400 fill-gray-100 dark:stroke-gray-400 dark:fill-gray-400/20", xmlns: "http://www.w3.org/2000/svg", @@ -897,327 +1018,338 @@ const Rt = { class: "relative flex-auto flex flex-col overflow-hidden" }, Pt = { d: "M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z" }) ]) -], -1), ks = ["placeholder"], _s = /* @__PURE__ */ e("path", { +], -1), _o = ["placeholder"], yo = /* @__PURE__ */ e("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M6 18L18 6M6 6l12 12" -}, null, -1), xs = [ - _s -], bs = { +}, null, -1), xo = [ + yo +], wo = { name: "VFBreadcrumb" -}, ws = /* @__PURE__ */ Object.assign(bs, { +}, $o = /* @__PURE__ */ Object.assign(wo, { props: { data: Object }, - setup(l) { - const t = k("emitter"); - k("storage"); - const s = k("adapter"), o = g(null), i = g([]), m = g(!1), n = g(null), h = l, { t: p } = k("i18n"), c = k("loadingState"); - t.on("vf-explorer-update", () => { - let F = [], M = []; - o.value = h.data.dirname ?? s.value + "://", o.value.length == 0 && (i.value = []), o.value.replace(s.value + "://", "").split("/").forEach(function(j) { - F.push(j), F.join("/") != "" && M.push({ - basename: j, - name: j, - path: s.value + "://" + F.join("/"), + setup(n) { + const s = g("emitter"), o = g("adapter"), t = b(null), l = b([]), p = b(!1), d = b(null), v = g("features"), f = n, { t: i } = g("i18n"), m = g("loadingState"); + s.on("vf-explorer-update", () => { + let D = [], L = []; + t.value = f.data.dirname ?? o.value + "://", t.value.length == 0 && (l.value = []), t.value.replace(o.value + "://", "").split("/").forEach(function(S) { + D.push(S), D.join("/") != "" && L.push({ + basename: S, + name: S, + path: o.value + "://" + D.join("/"), type: "dir" }); - }), M.length > 4 && (M = M.slice(-5), M[0].name = ".."), i.value = M; + }), L.length > 4 && (L = L.slice(-5), L[0].name = ".."), l.value = L; }); - const d = () => { - m.value = !1, y.value = ""; + const h = () => { + p.value = !1, $.value = ""; }; - t.on("vf-search-exit", () => { - d(); + s.on("vf-search-exit", () => { + h(); }); - const f = () => { - m.value = !0, ge(() => n.value.focus()); - }, y = Wo("", 400), w = () => c.value; - le(y, (F) => { - t.emit("vf-toast-clear"), t.emit("vf-search-query", { newQuery: F }); + const E = () => { + v.value.includes(q.SEARCH) && (p.value = !0, he(() => d.value.focus())); + }, $ = Xs("", 400), C = () => m.value; + ce($, (D) => { + s.emit("vf-toast-clear"), s.emit("vf-search-query", { newQuery: D }); }); - const B = () => i.value.length && !m.value, O = (F) => { - F.preventDefault(); - let M = JSON.parse(F.dataTransfer.getData("items")); - if (M.find((j) => j.storage != s.value)) { + const y = () => l.value.length && !p.value, A = (D) => { + D.preventDefault(); + let L = JSON.parse(D.dataTransfer.getData("items")); + if (L.find((S) => S.storage != o.value)) { alert("Moving items between different storages is not supported yet."); return; } - t.emit("vf-modal-show", { + s.emit("vf-modal-show", { type: "move", - items: { from: M, to: i.value[i.value.length - 2] ?? { path: s.value + "://" } } + items: { from: L, to: l.value[l.value.length - 2] ?? { path: o.value + "://" } } }); - }, D = (F) => { - F.preventDefault(), B() ? F.dataTransfer.dropEffect = "copy" : (F.dataTransfer.dropEffect = "none", F.dataTransfer.effectAllowed = "none"); - }, S = () => { - y.value == "" && d(); + }, M = (D) => { + D.preventDefault(), y() ? D.dataTransfer.dropEffect = "copy" : (D.dataTransfer.dropEffect = "none", D.dataTransfer.effectAllowed = "none"); + }, N = () => { + $.value == "" && h(); }; - return (F, M) => (r(), v("div", Xo, [ + return (D, L) => (r(), u("div", Qs, [ e("span", { - "aria-label": a(p)("Go up a directory"), + "aria-label": a(i)("Go up a directory"), "data-microtip-position": "bottom-right", role: "tooltip" }, [ - (r(), v("svg", { - onDragover: M[0] || (M[0] = (j) => D(j)), - onDrop: M[1] || (M[1] = (j) => O(j)), - onClick: M[2] || (M[2] = (j) => { - var z; - return !B() || a(t).emit("vf-fetch", { params: { q: "index", adapter: l.data.adapter, path: ((z = i.value[i.value.length - 2]) == null ? void 0 : z.path) ?? a(s) + "://" } }); + (r(), u("svg", { + onDragover: L[0] || (L[0] = (S) => M(S)), + onDrop: L[1] || (L[1] = (S) => A(S)), + onClick: L[2] || (L[2] = (S) => { + var U; + return !y() || a(s).emit("vf-fetch", { params: { q: "index", adapter: n.data.adapter, path: ((U = l.value[l.value.length - 2]) == null ? void 0 : U.path) ?? a(o) + "://" } }); }), - class: T(["h-6 w-6 p-0.5 rounded", B() ? "text-slate-700 hover:bg-neutral-300 dark:text-neutral-200 dark:hover:bg-gray-700 cursor-pointer" : "text-gray-400 dark:text-neutral-500"]), + class: R(["h-6 w-6 p-0.5 rounded", y() ? "text-slate-700 hover:bg-neutral-300 dark:text-neutral-200 dark:hover:bg-gray-700 cursor-pointer" : "text-gray-400 dark:text-neutral-500"]), xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor" - }, es, 34)) - ], 8, Qo), - w() ? (r(), v("span", { + }, to, 34)) + ], 8, Zs), + C() ? (r(), u("span", { key: 1, - "aria-label": a(p)("Cancel"), + "aria-label": a(i)("Cancel"), "data-microtip-position": "bottom-right", role: "tooltip" }, [ - (r(), v("svg", { - onClick: M[4] || (M[4] = (j) => a(t).emit("vf-fetch-abort")), + (r(), u("svg", { + onClick: L[4] || (L[4] = (S) => a(s).emit("vf-fetch-abort")), xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "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" - }, rs)) - ], 8, as)) : (r(), v("span", { + }, lo)) + ], 8, ro)) : (r(), u("span", { key: 0, - "aria-label": a(p)("Refresh"), + "aria-label": a(i)("Refresh"), "data-microtip-position": "bottom-right", role: "tooltip" }, [ - (r(), v("svg", { - onClick: M[3] || (M[3] = (j) => { - a(t).emit("vf-fetch", { params: { q: "index", adapter: l.data.adapter, path: l.data.dirname } }); + (r(), u("svg", { + onClick: L[3] || (L[3] = (S) => { + a(s).emit("vf-fetch", { params: { q: "index", adapter: n.data.adapter, path: n.data.dirname } }); }), 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", xmlns: "http://www.w3.org/2000/svg", viewBox: "-40 -40 580 580", fill: "currentColor" - }, ss)) - ], 8, ts)), - m.value ? (r(), v("div", fs, [ - gs, - R(e("input", { + }, ao)) + ], 8, so)), + p.value ? (r(), u("div", ko, [ + bo, + Y(e("input", { ref_key: "searchInput", - ref: n, - onKeydown: se(d, ["esc"]), - onBlur: S, - "onUpdate:modelValue": M[6] || (M[6] = (j) => re(y) ? y.value = j : null), - placeholder: a(p)("Search anything.."), + ref: d, + onKeydown: ne(h, ["esc"]), + onBlur: N, + "onUpdate:modelValue": L[6] || (L[6] = (S) => de($) ? $.value = S : null), + placeholder: a(i)("Search anything.."), class: "w-full pt-1 pb-0 px-2 border-0 text-sm ring-0 outline-0 text-gray-600 focus:ring-transparent focus:border-transparent dark:focus:ring-transparent dark:focus:border-transparent dark:text-gray-300 bg-transparent", type: "text" - }, null, 40, ks), [ - [ae, a(y)] + }, null, 40, _o), [ + [le, a($)] ]), - (r(), v("svg", { + (r(), u("svg", { class: "w-6 h-6 cursor-pointer", - onClick: d, + onClick: h, xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor" - }, xs)) - ])) : (r(), v("div", { + }, xo)) + ])) : (r(), u("div", { key: 2, class: "group flex bg-white dark:bg-gray-700 items-center rounded p-1 ml-2 w-full", - onClick: Z(f, ["self"]) + onClick: oe(E, ["self"]) }, [ - (r(), v("svg", { - onClick: M[5] || (M[5] = (j) => a(t).emit("vf-fetch", { params: { q: "index", adapter: l.data.adapter } })), + (r(), u("svg", { + onClick: L[5] || (L[5] = (S) => a(s).emit("vf-fetch", { params: { q: "index", adapter: n.data.adapter } })), 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", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor" - }, is)), - e("div", ds, [ - (r(!0), v(H, null, J(i.value, (j, z) => (r(), v("div", { key: z }, [ - cs, + }, co)), + e("div", uo, [ + (r(!0), u(I, null, K(l.value, (S, U) => (r(), u("div", { key: U }, [ + mo, e("span", { class: "px-1.5 py-1 text-slate-700 dark:text-slate-200 hover:bg-neutral-100 dark:hover:bg-gray-800 rounded cursor-pointer", - title: j.basename, - onClick: (I) => a(t).emit("vf-fetch", { params: { q: "index", adapter: l.data.adapter, path: j.path } }) - }, u(j.name), 9, us) + title: S.basename, + onClick: (V) => a(s).emit("vf-fetch", { params: { q: "index", adapter: n.data.adapter, path: S.path } }) + }, c(S.name), 9, vo) ]))), 128)) ]), - w() ? (r(), v("svg", ms, hs)) : V("", !0) + C() ? (r(), u("svg", po, go)) : O("", !0) ])) ])); } -}), ys = ["onClick"], $s = /* @__PURE__ */ e("span", { class: "px-1" }, null, -1), Cs = { +}), Co = ["onClick"], Mo = /* @__PURE__ */ e("span", { class: "px-1" }, null, -1), jo = { name: "VFContextMenu" -}, Ms = /* @__PURE__ */ Object.assign(Cs, { +}, Eo = /* @__PURE__ */ Object.assign(jo, { props: { current: Object }, - setup(l) { - const t = k("emitter"), s = g(null), { apiUrl: o } = X(), i = k("root"), m = l, n = ve({ + setup(n) { + const s = g("emitter"), o = b(null), t = g("root"), l = g("requester"), p = g("features"), d = n, v = ve({ active: !1, items: [], positions: { left: 0, top: 0 } - }), h = g([]); - t.on("vf-context-selected", (w) => { - h.value = w; + }), f = Le(() => v.items.filter((y) => y.key == null || p.value.includes(y.key))), i = b([]); + s.on("vf-context-selected", (y) => { + i.value = y; }); - const { t: p } = k("i18n"), c = { + const { t: m } = g("i18n"), h = { newfolder: { - title: () => p("New Folder"), + key: q.NEW_FOLDER, + title: () => m("New Folder"), action: () => { - t.emit("vf-modal-show", { type: "new-folder" }); + s.emit("vf-modal-show", { type: "new-folder" }); } }, delete: { - title: () => p("Delete"), + key: q.DELETE, + title: () => m("Delete"), action: () => { - t.emit("vf-modal-show", { type: "delete", items: h }); + s.emit("vf-modal-show", { type: "delete", items: i }); } }, refresh: { - title: () => p("Refresh"), + title: () => m("Refresh"), action: () => { - t.emit("vf-fetch", { params: { q: "index", adapter: m.current.adapter, path: m.current.dirname } }); + s.emit("vf-fetch", { params: { q: "index", adapter: d.current.adapter, path: d.current.dirname } }); } }, preview: { - title: () => p("Preview"), + key: q.PREVIEW, + title: () => m("Preview"), action: () => { - t.emit("vf-modal-show", { type: "preview", adapter: m.current.adapter, item: h.value[0] }); + s.emit("vf-modal-show", { type: "preview", adapter: d.current.adapter, item: i.value[0] }); } }, open: { - title: () => p("Open"), + title: () => m("Open"), action: () => { - t.emit("vf-search-exit"), t.emit("vf-fetch", { params: { q: "index", adapter: m.current.adapter, path: h.value[0].path } }); + s.emit("vf-search-exit"), s.emit("vf-fetch", { params: { q: "index", adapter: d.current.adapter, path: i.value[0].path } }); } }, openDir: { - title: () => p("Open containing folder"), + title: () => m("Open containing folder"), action: () => { - t.emit("vf-search-exit"), t.emit("vf-fetch", { params: { q: "index", adapter: m.current.adapter, path: h.value[0].dir } }); + s.emit("vf-search-exit"), s.emit("vf-fetch", { params: { q: "index", adapter: d.current.adapter, path: i.value[0].dir } }); } }, download: { - title: () => p("Download"), + key: q.DOWNLOAD, + title: () => m("Download"), action: () => { - const w = o.value + "?" + oe({ q: "download", adapter: m.current.adapter, path: h.value[0].path }); - t.emit("vf-download", w); + const y = l.getDownloadUrl(d.current.adapter, i.value[0]); + s.emit("vf-download", y); } }, archive: { - title: () => p("Archive"), + key: q.ARCHIVE, + title: () => m("Archive"), action: () => { - t.emit("vf-modal-show", { type: "archive", items: h }); + s.emit("vf-modal-show", { type: "archive", items: i }); } }, unarchive: { - title: () => p("Unarchive"), + key: q.UNARCHIVE, + title: () => m("Unarchive"), action: () => { - t.emit("vf-modal-show", { type: "unarchive", items: h }); + s.emit("vf-modal-show", { type: "unarchive", items: i }); } }, rename: { - title: () => p("Rename"), + key: q.RENAME, + title: () => m("Rename"), action: () => { - t.emit("vf-modal-show", { type: "rename", items: h }); + s.emit("vf-modal-show", { type: "rename", items: i }); } } - }, d = (w) => { - t.emit("vf-contextmenu-hide"), w.action(); - }, f = g(""); - t.on("vf-search-query", ({ newQuery: w }) => { - f.value = w; - }), t.on("vf-contextmenu-show", ({ event: w, area: B, items: O, target: D = null }) => { - if (n.items = [], f.value) - if (D) - n.items.push(c.openDir), t.emit("vf-context-selected", [D]); + }, E = (y) => { + s.emit("vf-contextmenu-hide"), y.action(); + }, $ = b(""); + s.on("vf-search-query", ({ newQuery: y }) => { + $.value = y; + }), s.on("vf-contextmenu-show", ({ event: y, area: A, items: M, target: N = null }) => { + if (v.items = [], $.value) + if (N) + v.items.push(h.openDir), s.emit("vf-context-selected", [N]); else return; else - !D && !f.value ? (n.items.push(c.refresh), n.items.push(c.newfolder), t.emit("vf-context-selected", [])) : O.length > 1 && O.some((S) => S.path === D.path) ? (n.items.push(c.refresh), n.items.push(c.archive), n.items.push(c.delete), t.emit("vf-context-selected", O)) : (D.type == "dir" ? n.items.push(c.open) : (n.items.push(c.preview), n.items.push(c.download)), n.items.push(c.rename), D.mime_type == "application/zip" ? n.items.push(c.unarchive) : n.items.push(c.archive), n.items.push(c.delete), t.emit("vf-context-selected", [D])); - y(w, B); - }), t.on("vf-contextmenu-hide", () => { - n.active = !1; + !N && !$.value ? (v.items.push(h.refresh), v.items.push(h.newfolder), s.emit("vf-context-selected", [])) : M.length > 1 && M.some((D) => D.path === N.path) ? (v.items.push(h.refresh), v.items.push(h.archive), v.items.push(h.delete), s.emit("vf-context-selected", M)) : (N.type == "dir" ? v.items.push(h.open) : (v.items.push(h.preview), v.items.push(h.download)), v.items.push(h.rename), N.mime_type == "application/zip" ? v.items.push(h.unarchive) : v.items.push(h.archive), v.items.push(h.delete), s.emit("vf-context-selected", [N])); + C(y, A); + }), s.on("vf-contextmenu-hide", () => { + v.active = !1; }); - const y = (w, B) => { - n.active = !0, ge(() => { - const O = i.value.getBoundingClientRect(), D = B.getBoundingClientRect(); - let S = w.pageX - O.left, F = w.pageY - O.top, M = s.value.offsetHeight, j = s.value.offsetWidth; - S = D.right - w.pageX + window.scrollX < j ? S - j : S, F = D.bottom - w.pageY + window.scrollY < M ? F - M : F, n.positions = { - left: S + "px", - top: F + "px" + const C = (y, A) => { + v.active = !0, he(() => { + const M = t.value.getBoundingClientRect(), N = A.getBoundingClientRect(); + let D = y.pageX - M.left, L = y.pageY - M.top, S = o.value.offsetHeight, U = o.value.offsetWidth; + D = N.right - y.pageX + window.scrollX < U ? D - U : D, L = N.bottom - y.pageY + window.scrollY < S ? L - S : L, v.positions = { + left: D + "px", + top: L + "px" }; }); }; - return (w, B) => n.active ? (r(), v("ul", { + return (y, A) => v.active ? (r(), u("ul", { key: 0, class: "z-30 absolute text-xs bg-neutral-50 dark:bg-gray-800 text-gray-700 dark:text-gray-200 border border-neutral-300 dark:border-gray-600 shadow rounded select-none", ref_key: "contextmenu", - ref: s, - style: ze(n.positions) + ref: o, + style: ze(v.positions) }, [ - (r(!0), v(H, null, J(n.items, (O) => (r(), v("li", { + (r(!0), u(I, null, K(f.value, (M) => (r(), u("li", { class: "px-2 py-1.5 cursor-pointer hover:bg-neutral-200 dark:hover:bg-gray-700", - key: O.title, - onClick: (D) => d(O) + key: M.title, + onClick: (N) => E(M) }, [ - $s, - e("span", null, u(O.title()), 1) - ], 8, ys))), 128)) - ], 4)) : V("", !0); + Mo, + e("span", null, c(M.title()), 1) + ], 8, Co))), 128)) + ], 4)) : O("", !0); } -}), js = (l, t) => { - const s = l[t]; - return s ? typeof s == "function" ? s() : Promise.resolve(s) : new Promise((o, i) => { - (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(i.bind(null, new Error("Unknown variable dynamic import: " + t))); +}), So = (n, s) => { + const o = n[s]; + return o ? typeof o == "function" ? o() : Promise.resolve(o) : new Promise((t, l) => { + (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(l.bind(null, new Error("Unknown variable dynamic import: " + s))); }); }; -async function Ss(l) { - return (await js(/* @__PURE__ */ Object.assign({ "../locales/de.js": () => import("./de-3f6147f5.js"), "../locales/en.js": () => import("./en-ffed8966.js"), "../locales/fa.js": () => import("./fa-7534f880.js"), "../locales/he.js": () => import("./he-1978fb6e.js"), "../locales/hi.js": () => import("./hi-ffd5a2ba.js"), "../locales/ru.js": () => import("./ru-9f317caf.js"), "../locales/sv.js": () => import("./sv-07e3c393.js"), "../locales/tr.js": () => import("./tr-ce32e2ae.js"), "../locales/zhCN.js": () => import("./zhCN-9b524820.js"), "../locales/zhTW.js": () => import("./zhTW-a803434e.js") }), `../locales/${l}.js`)).default; +async function Do(n) { + return (await So(/* @__PURE__ */ Object.assign({ "../locales/de.js": () => import("./de-3f6147f5.js"), "../locales/en.js": () => import("./en-ffed8966.js"), "../locales/fa.js": () => import("./fa-7534f880.js"), "../locales/fr.js": () => import("./fr-d570774a.js"), "../locales/he.js": () => import("./he-1978fb6e.js"), "../locales/hi.js": () => import("./hi-ffd5a2ba.js"), "../locales/ru.js": () => import("./ru-9f317caf.js"), "../locales/sv.js": () => import("./sv-07e3c393.js"), "../locales/tr.js": () => import("./tr-ce32e2ae.js"), "../locales/zhCN.js": () => import("./zhCN-040643d9.js"), "../locales/zhTW.js": () => import("./zhTW-4aa25a91.js") }), `../locales/${n}.js`)).default; } -function Ds(l, t, s) { - const { getStore: o, setStore: i } = xe(l), m = g({}), n = g(o("locale", t)), h = (d, f = "en") => { - Ss(d).then((y) => { - m.value = y, i("locale", d), n.value = d, i("translations", y), s.emit("vf-toast-push", { label: "The language is set to " + d }); - }).catch((y) => { - f ? (s.emit("vf-toast-push", { label: "The selected locale is not yet supported!", type: "error" }), h(f, null)) : s.emit("vf-toast-push", { label: "Locale cannot be loaded!", type: "error" }); +function Oo(n, s, o) { + const { getStore: t, setStore: l } = xe(n), p = b({}), d = b(t("locale", s)), v = (m, h = "en") => { + Do(m).then((E) => { + p.value = E, l("locale", m), d.value = m, l("translations", E), o.emit("vf-toast-push", { label: "The language is set to " + m }), o.emit("vf-language-saved"); + }).catch((E) => { + h ? (o.emit("vf-toast-push", { label: "The selected locale is not yet supported!", type: "error" }), v(h, null)) : o.emit("vf-toast-push", { label: "Locale cannot be loaded!", type: "error" }); }); }; - o("locale") ? m.value = o("translations") : h(t); - const p = (d, ...f) => f.length ? p(d = d.replace("%s", f.shift()), ...f) : d; - function c(d, ...f) { - return m.value.hasOwnProperty(d) ? p(m.value[d], ...f) : p(d, ...f); + t("locale") ? p.value = t("translations") : v(s); + const f = (m, ...h) => h.length ? f(m = m.replace("%s", h.shift()), ...h) : m; + function i(m, ...h) { + return p.value.hasOwnProperty(m) ? f(p.value[m], ...h) : f(m, ...h); } - return { t: c, changeLocale: h, locale: n }; + return { t: i, changeLocale: v, locale: d }; } -function Me(l, t, s, o, i) { - return (t = Math, s = t.log, o = 1024, i = s(l) / s(o) | 0, l / t.pow(o, i)).toFixed(0) + " " + (i ? "KMGTPEZY"[--i] + "iB" : "B"); +function Ee(n, s, o, t, l) { + return (s = Math, o = s.log, t = 1024, l = o(n) / o(t) | 0, n / s.pow(t, l)).toFixed(0) + " " + (l ? "KMGTPEZY"[--l] + "iB" : "B"); } -function je(l, t, s, o, i) { - return (t = Math, s = t.log, o = 1e3, i = s(l) / s(o) | 0, l / t.pow(o, i)).toFixed(0) + " " + (i ? "KMGTPEZY"[--i] + "B" : "B"); +function Se(n, s, o, t, l) { + return (s = Math, o = s.log, t = 1e3, l = o(n) / o(t) | 0, n / s.pow(t, l)).toFixed(0) + " " + (l ? "KMGTPEZY"[--l] + "B" : "B"); } -function Os(l) { - const t = { k: 1, m: 2, g: 3, t: 4 }, o = /(\d+(?:\.\d+)?)\s?(k|m|g|t)?b?/i.exec(l); - return o[1] * Math.pow(1024, t[o[2].toLowerCase()]); +function Ao(n) { + const s = { k: 1, m: 2, g: 3, t: 4 }, t = /(\d+(?:\.\d+)?)\s?(k|m|g|t)?b?/i.exec(n); + return t[1] * Math.pow(1024, s[t[2].toLowerCase()]); } -const zs = /* @__PURE__ */ e("iframe", { - id: "download_frame", - style: { display: "none" } -}, null, -1), Es = { +const Lo = { name: "VueFinder" -}, Fs = /* @__PURE__ */ Object.assign(Es, { +}, zo = /* @__PURE__ */ Object.assign(Lo, { props: { - url: { - type: [String] + request: { + type: [String, Object], + required: !0 + }, + features: { + type: [Array, Boolean], + default: !0 + }, + debug: { + type: Boolean, + default: !1 }, id: { type: String, @@ -1242,134 +1374,152 @@ const zs = /* @__PURE__ */ e("iframe", { maxFileSize: { type: String, default: "10mb" - }, - postData: { - type: Object, - default: {} } }, - setup(l) { - const t = l, s = He(), { setStore: o, getStore: i } = xe(t.id), m = g(i("adapter")), n = g(null); - Y("root", n), Y("emitter", s), Y("storage", xe(t.id)), Y("postData", t.postData), Y("adapter", m), Y("maxFileSize", t.maxFileSize), Y("usePropDarkMode", t.usePropDarkMode); - const h = Ds(t.id, t.locale, s); - Y("i18n", h); - const { apiUrl: p, setApiUrl: c } = X(); - c(t.url); - const d = ve({ adapter: m.value, storages: [], dirname: ".", files: [] }), f = g(i("viewport", "grid")), y = t.usePropDarkMode ? Ne(() => t.dark) : g(i("darkMode", t.dark)); - Y("darkMode", y), s.on("vf-darkMode-toggle", () => { - y.value = !y.value, o("darkMode", y.value); + emits: ["select"], + setup(n, { emit: s }) { + const o = n, t = Re(), { setStore: l, getStore: p } = xe(o.id), d = b(p("adapter")), v = s, f = b(null); + G("root", f), G("emitter", t), G("storage", xe(o.id)), G("adapter", d), G("maxFileSize", o.maxFileSize), G("usePropDarkMode", o.usePropDarkMode), G("debug", o.debug); + const i = Je(o.request); + G("requester", i); + const m = b([]); + Array.isArray(o.features) ? m.value.push(...o.features) : o.features === !0 && m.value.push(...Xe), G("features", m); + const h = Oo(o.id, o.locale, t); + G("i18n", h); + const E = ve({ adapter: d.value, storages: [], dirname: ".", files: [] }), $ = b(p("viewport", "grid")), C = o.usePropDarkMode ? Le(() => o.dark) : b(p("darkMode", o.dark)); + G("darkMode", C), t.on("vf-darkMode-toggle", () => { + C.value = !C.value, l("darkMode", C.value); }); - const w = g(i("metricUnits", !1)); - Y("metricUnits", w); - const B = g(w.value ? je : Me); - le(w, (j) => { - B.value = j ? je : Me; - }), Y("filesize", B), s.on("vf-metric-units-saved", (j) => { - w.value = j, o("metricUnits", j); + const y = b(p("metricUnits", !1)); + G("metricUnits", y); + const A = b(y.value ? Se : Ee); + ce(y, (V) => { + A.value = V ? Se : Ee; + }), G("filesize", A), t.on("vf-metric-units-saved", (V) => { + y.value = V, l("metricUnits", V); }); - const O = g(!1); - Y("loadingState", O); - const D = g(i("full-screen", !1)); - s.on("vf-fullscreen-toggle", () => { - D.value = !D.value, o("full-screen", D.value); - }), s.on("vf-view-toggle", (j) => { - f.value = j; + const M = b(!1); + G("loadingState", M); + const N = b(p("full-screen", !1)); + t.on("vf-fullscreen-toggle", () => { + N.value = !N.value, l("full-screen", N.value); + }), t.on("vf-view-toggle", (V) => { + $.value = V; }); - const S = ve({ + const D = ve({ active: !1, type: "delete", data: {} }); - s.on("vf-modal-close", () => { - S.active = !1; - }), s.on("vf-modal-show", (j) => { - S.active = !0, S.type = j.type, S.data = j; + t.on("vf-modal-close", () => { + D.active = !1; + }), t.on("vf-modal-show", (V) => { + D.active = !0, D.type = V.type, D.data = V; }); - const F = (j) => { - Object.assign(d, j), s.emit("vf-nodes-selected", {}), s.emit("vf-explorer-update"); + const L = (V) => { + Object.assign(E, V), t.emit("vf-nodes-selected", {}), t.emit("vf-explorer-update"); }; - let M; - return s.on("vf-fetch-abort", () => { - M.abort(), O.value = !1; - }), s.on("vf-fetch", ({ params: j, onSuccess: z = null, onError: I = null, noCloseModal: A = !1 }) => { - ["index", "search"].includes(j.q) && (M && M.abort(), O.value = !0), M = new AbortController(); - const ee = M.signal; - fe(p.value, { params: j, signal: ee }).then((G) => { - m.value = G.adapter, ["index", "search"].includes(j.q) && (O.value = !1), A || s.emit("vf-modal-close"), F(G), z(G); - }).catch((G) => { - I && I(G); - }).finally(() => { + t.on("vf-nodes-selected", (V) => { + v("select", V); + }); + let S; + t.on("vf-fetch-abort", () => { + S.abort(), M.value = !1; + }), t.on("vf-fetch", ({ params: V, body: F = null, onSuccess: Z = null, onError: se = null, noCloseModal: ee = !1 }) => { + ["index", "search"].includes(V.q) && (S && S.abort(), M.value = !0), S = new AbortController(); + const ae = S.signal; + i.send({ + url: "", + method: V.m || "get", + params: V, + body: F, + abortSignal: ae + }).then((J) => { + d.value = J.adapter, ["index", "search"].includes(V.q) && (M.value = !1), ee || t.emit("vf-modal-close"), L(J), Z && Z(J); + }).catch((J) => { + console.error(J), se && se(J); }); - }), s.on("vf-download", (j) => { - document.getElementById("download_frame").src = j, s.emit("vf-modal-close"); - }), K(() => { - s.emit("vf-fetch", { params: { q: "index", adapter: m.value } }); - }), (j, z) => (r(), v("div", { + }); + const U = b(null); + return t.on("vf-download", (V) => { + U.value.src = V, t.emit("vf-modal-close"); + }), X(() => { + t.emit("vf-fetch", { params: { q: "index", adapter: d.value } }); + }), (V, F) => (r(), u("div", { class: "vuefinder", ref_key: "root", - ref: n + ref: f }, [ e("div", { - class: T(a(y) ? "dark" : "") + class: R(a(C) ? "dark" : "") }, [ e("div", { - class: T([D.value ? "fixed w-screen inset-0 z-20" : "relative rounded-md", "border flex flex-col bg-white dark:bg-gray-800 text-gray-700 dark:text-neutral-400 border-neutral-300 dark:border-gray-900 min-w-min select-none"]), - style: ze(D.value ? "" : "max-height: " + l.maxHeight), - onMousedown: z[0] || (z[0] = (I) => a(s).emit("vf-contextmenu-hide")), - onTouchstart: z[1] || (z[1] = (I) => a(s).emit("vf-contextmenu-hide")) + class: R([N.value ? "fixed w-screen inset-0 z-20" : "relative rounded-md", "border flex flex-col bg-white dark:bg-gray-800 text-gray-700 dark:text-neutral-400 border-neutral-300 dark:border-gray-900 min-w-min select-none"]), + style: ze(N.value ? "" : "max-height: " + n.maxHeight), + onMousedown: F[0] || (F[0] = (Z) => a(t).emit("vf-contextmenu-hide")), + onTouchstart: F[1] || (F[1] = (Z) => a(t).emit("vf-contextmenu-hide")) }, [ - P(Et, { data: d }, null, 8, ["data"]), - P(ws, { data: d }, null, 8, ["data"]), - P(zo, { - view: f.value, - data: d + P(Vt, { data: E }, null, 8, ["data"]), + P($o, { data: E }, null, 8, ["data"]), + P(zs, { + view: $.value, + data: E }, null, 8, ["view", "data"]), - P(Jo, { data: d }, null, 8, ["data"]) + P(Ks, { data: E }, null, 8, ["data"]) ], 38), - S.active ? (r(), N(Ue("v-f-modal-" + S.type), { - key: 0, - selection: S.data, - current: d - }, null, 8, ["selection", "current"])) : V("", !0), - P(Ms, { current: d }, null, 8, ["current"]), - zs + P(He, { name: "fade" }, { + default: z(() => [ + D.active ? (r(), B(Ue("v-f-modal-" + D.type), { + key: 0, + selection: D.data, + current: E + }, null, 8, ["selection", "current"])) : O("", !0) + ]), + _: 1 + }), + P(Eo, { current: E }, null, 8, ["current"]), + e("iframe", { + ref_key: "downloadFrame", + ref: U, + style: { display: "none" } + }, null, 512) ], 2) ], 512)); } -}), Vs = /* @__PURE__ */ e("div", { class: "fixed inset-0 bg-gray-500 dark:bg-gray-600 dark:bg-opacity-75 bg-opacity-75 transition-opacity" }, null, -1), Bs = { class: "fixed z-10 inset-0 overflow-hidden" }, As = { class: "relative bg-white dark:bg-gray-800 rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:max-w-4xl md:max-w-2xl lg:max-w-3xl xl:max-w-5xl w-full" }, Ls = { class: "bg-white dark:bg-gray-800 px-4 pt-5 pb-4 sm:p-6 sm:pb-4" }, Ns = { class: "bg-gray-50 dark:bg-gray-800 dark:border-t dark:border-gray-700 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse" }, W = { +}), Fo = /* @__PURE__ */ e("div", { class: "fixed inset-0 bg-gray-500 dark:bg-gray-600 dark:bg-opacity-75 bg-opacity-75 transition-opacity" }, null, -1), No = { class: "fixed z-10 inset-0 overflow-hidden" }, Vo = { class: "relative bg-white dark:bg-gray-800 rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:max-w-4xl md:max-w-2xl lg:max-w-3xl xl:max-w-5xl w-full" }, To = { class: "bg-white dark:bg-gray-800 px-4 pt-5 pb-4 sm:p-6 sm:pb-4" }, Bo = { class: "bg-gray-50 dark:bg-gray-800 dark:border-t dark:border-gray-700 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse" }, Q = { __name: "ModalLayout", - setup(l) { - const t = k("emitter"); - return K(() => { - const s = document.querySelector(".v-f-modal input"); - s && s.focus(); - }), (s, o) => (r(), v("div", { + setup(n) { + const s = g("emitter"); + return X(() => { + const o = document.querySelector(".v-f-modal input"); + o && o.focus(); + }), (o, t) => (r(), u("div", { class: "v-f-modal relative z-30", "aria-labelledby": "modal-title", role: "dialog", "aria-modal": "true", - onKeyup: o[1] || (o[1] = se((i) => a(t).emit("vf-modal-close"), ["esc"])), + onKeyup: t[1] || (t[1] = ne((l) => a(s).emit("vf-modal-close"), ["esc"])), tabindex: "0" }, [ - Vs, - e("div", Bs, [ + Fo, + e("div", No, [ e("div", { class: "flex items-end sm:items-center justify-center min-h-full p-4 text-center sm:p-0", - onMousedown: o[0] || (o[0] = Z((i) => a(t).emit("vf-modal-close"), ["self"])) + onMousedown: t[0] || (t[0] = oe((l) => a(s).emit("vf-modal-close"), ["self"])) }, [ - e("div", As, [ - e("div", Ls, [ - pe(s.$slots, "default") + e("div", Vo, [ + e("div", To, [ + pe(o.$slots, "default") ]), - e("div", Ns, [ - pe(s.$slots, "buttons") + e("div", Bo, [ + pe(o.$slots, "buttons") ]) ]) ], 32) ]) ], 32)); } -}, Us = ["aria-label"], Ts = /* @__PURE__ */ e("svg", { +}, Ho = ["aria-label"], Uo = /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", @@ -1382,11 +1532,11 @@ const zs = /* @__PURE__ */ e("iframe", { "stroke-linejoin": "round", d: "M6 18L18 6M6 6l12 12" }) -], -1), Hs = [ - Ts -], Is = { +], -1), qo = [ + Uo +], Ro = { name: "Message" -}, Q = /* @__PURE__ */ Object.assign(Is, { +}, te = /* @__PURE__ */ Object.assign(Ro, { props: { error: { type: Boolean, @@ -1394,32 +1544,32 @@ const zs = /* @__PURE__ */ e("iframe", { } }, emits: ["hidden"], - setup(l, { emit: t }) { - var p; - const { t: s } = k("i18n"), o = g(!1), i = g(null), m = g((p = i.value) == null ? void 0 : p.strMessage), n = t; - le(m, () => o.value = !1); - const h = () => { - n("hidden"), o.value = !0; + setup(n, { emit: s }) { + var f; + const { t: o } = g("i18n"), t = b(!1), l = b(null), p = b((f = l.value) == null ? void 0 : f.strMessage), d = s; + ce(p, () => t.value = !1); + const v = () => { + d("hidden"), t.value = !0; }; - return (c, d) => (r(), v("div", null, [ - o.value ? V("", !0) : (r(), v("div", { + return (i, m) => (r(), u("div", null, [ + t.value ? O("", !0) : (r(), u("div", { key: 0, ref_key: "strMessage", - ref: i, - class: T(["flex mt-2 p-1 px-2 rounded text-sm break-all dark:opacity-75", l.error ? "bg-red-100 text-red-600 " : "bg-emerald-100 text-emerald-600"]) + ref: l, + class: R(["flex mt-2 p-1 px-2 rounded text-sm break-all dark:opacity-75", n.error ? "bg-red-100 text-red-600 " : "bg-emerald-100 text-emerald-600"]) }, [ - pe(c.$slots, "default"), + pe(i.$slots, "default"), e("div", { class: "ml-auto cursor-pointer", - onClick: h, - "aria-label": a(s)("Close"), + onClick: v, + "aria-label": a(o)("Close"), "data-microtip-position": "top-left", role: "tooltip" - }, Hs, 8, Us) + }, qo, 8, Ho) ], 2)) ])); } -}), qs = { class: "sm:flex sm:items-start" }, Rs = /* @__PURE__ */ e("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [ +}), Io = { class: "sm:flex sm:items-start" }, Po = /* @__PURE__ */ e("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [ /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", class: "h-6 w-6 stroke-red-600 dark:stroke-red-200", @@ -1434,13 +1584,13 @@ const zs = /* @__PURE__ */ e("iframe", { d: "M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" }) ]) -], -1), Ps = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Gs = { +], -1), Wo = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Go = { class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400", id: "modal-title" -}, Ys = { class: "mt-2" }, Js = { class: "text-sm text-gray-500" }, Ks = { +}, Yo = { class: "mt-2" }, Ko = { class: "text-sm text-gray-500" }, Jo = { class: "text-gray-500 text-sm mb-1 overflow-auto vf-scrollbar", style: { "max-height": "200px" } -}, Ws = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, Xs = { +}, Xo = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, Qo = { key: 0, xmlns: "http://www.w3.org/2000/svg", class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500", @@ -1448,13 +1598,13 @@ const zs = /* @__PURE__ */ e("iframe", { viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, Qs = /* @__PURE__ */ e("path", { +}, Zo = /* @__PURE__ */ e("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), Zs = [ - Qs -], ea = { +}, null, -1), ea = [ + Zo +], ta = { key: 1, xmlns: "http://www.w3.org/2000/svg", class: "h-5 w-5 text-neutral-500", @@ -1462,75 +1612,78 @@ const zs = /* @__PURE__ */ e("iframe", { viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, ta = /* @__PURE__ */ e("path", { +}, sa = /* @__PURE__ */ e("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), oa = [ - ta -], sa = { class: "ml-1.5" }, aa = { class: "m-auto font-bold text-red-500 text-sm dark:text-red-200 text-center" }, na = { + sa +], aa = { class: "ml-1.5" }, ra = { class: "m-auto font-bold text-red-500 text-sm dark:text-red-200 text-center" }, na = { name: "VFModalDelete" -}, ra = /* @__PURE__ */ Object.assign(na, { +}, la = /* @__PURE__ */ Object.assign(na, { props: { selection: Object, current: Object }, - setup(l) { - const t = k("emitter"); - k("storage"); - const s = k("adapter"), { t: o } = k("i18n"), i = l, m = g(i.selection.items), n = g(""), h = () => { - m.value.length && t.emit("vf-fetch", { + setup(n) { + const s = g("emitter"); + g("storage"); + const o = g("adapter"), { t } = g("i18n"), l = n, p = b(l.selection.items), d = b(""), v = () => { + p.value.length && s.emit("vf-fetch", { params: { q: "delete", - adapter: s.value, - path: i.current.dirname, - items: JSON.stringify(m.value.map(({ path: p, type: c }) => ({ path: p, type: c }))) + m: "post", + adapter: o.value, + path: l.current.dirname + }, + body: { + items: p.value.map(({ path: f, type: i }) => ({ path: f, type: i })) }, onSuccess: () => { - t.emit("vf-toast-push", { label: o("Files deleted.") }); + s.emit("vf-toast-push", { label: t("Files deleted.") }); }, - onError: (p) => { - n.value = o(p.message); + onError: (f) => { + d.value = t(f.message); } }); }; - return (p, c) => (r(), N(W, null, { - buttons: E(() => [ + return (f, i) => (r(), B(Q, null, { + buttons: z(() => [ e("button", { type: "button", - onClick: h, + onClick: v, class: "vf-btn vf-btn-danger" - }, u(a(o)("Yes, Delete!")), 1), + }, c(a(t)("Yes, Delete!")), 1), e("button", { type: "button", - onClick: c[1] || (c[1] = (d) => a(t).emit("vf-modal-close")), + onClick: i[1] || (i[1] = (m) => a(s).emit("vf-modal-close")), class: "vf-btn vf-btn-secondary" - }, u(a(o)("Cancel")), 1), - e("div", aa, u(a(o)("This action cannot be undone.")), 1) + }, c(a(t)("Cancel")), 1), + e("div", ra, c(a(t)("This action cannot be undone.")), 1) ]), - default: E(() => [ - e("div", qs, [ - Rs, - e("div", Ps, [ - e("h3", Gs, u(a(o)("Delete files")), 1), - e("div", Ys, [ - e("p", Js, u(a(o)("Are you sure you want to delete these files?")), 1), - e("div", Ks, [ - (r(!0), v(H, null, J(m.value, (d) => (r(), v("p", Ws, [ - d.type === "dir" ? (r(), v("svg", Xs, Zs)) : (r(), v("svg", ea, oa)), - e("span", sa, u(d.basename), 1) + default: z(() => [ + e("div", Io, [ + Po, + e("div", Wo, [ + e("h3", Go, c(a(t)("Delete files")), 1), + e("div", Yo, [ + e("p", Ko, c(a(t)("Are you sure you want to delete these files?")), 1), + e("div", Jo, [ + (r(!0), u(I, null, K(p.value, (m) => (r(), u("p", Xo, [ + m.type === "dir" ? (r(), u("svg", Qo, ea)) : (r(), u("svg", ta, oa)), + e("span", aa, c(m.basename), 1) ]))), 256)) ]), - n.value.length ? (r(), N(Q, { + d.value.length ? (r(), B(te, { key: 0, - onHidden: c[0] || (c[0] = (d) => n.value = ""), + onHidden: i[0] || (i[0] = (m) => d.value = ""), error: "" }, { - default: E(() => [ - U(u(n.value), 1) + default: z(() => [ + H(c(d.value), 1) ]), _: 1 - })) : V("", !0) + })) : O("", !0) ]) ]) ]) @@ -1538,7 +1691,7 @@ const zs = /* @__PURE__ */ e("iframe", { _: 1 })); } -}), la = { class: "sm:flex sm:items-start" }, ia = /* @__PURE__ */ e("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [ +}), ia = { class: "sm:flex sm:items-start" }, da = /* @__PURE__ */ e("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [ /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100", @@ -1553,34 +1706,34 @@ const zs = /* @__PURE__ */ e("iframe", { d: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }) ]) -], -1), da = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, ca = { +], -1), ca = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, ua = { class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400", id: "modal-title" -}, ua = { class: "mt-2" }, ma = { class: "text-sm text-gray-500" }, va = { +}, ma = { class: "mt-2" }, va = { class: "text-sm text-gray-500" }, pa = { name: "VFModalMessage" -}, pa = /* @__PURE__ */ Object.assign(va, { +}, ha = /* @__PURE__ */ Object.assign(pa, { props: { selection: Object }, - setup(l) { - const t = k("emitter"), { t: s } = k("i18n"); - return (o, i) => (r(), N(W, null, { - buttons: E(() => [ + setup(n) { + const s = g("emitter"), { t: o } = g("i18n"); + return (t, l) => (r(), B(Q, null, { + buttons: z(() => [ e("button", { type: "button", - onClick: i[0] || (i[0] = (m) => a(t).emit("vf-modal-close")), + onClick: l[0] || (l[0] = (p) => a(s).emit("vf-modal-close")), class: "vf-btn vf-btn-secondary" - }, u(a(s)("Close")), 1) + }, c(a(o)("Close")), 1) ]), - default: E(() => { - var m, n; + default: z(() => { + var p, d; return [ - e("div", la, [ - ia, - e("div", da, [ - e("h3", ca, u(((m = l.selection) == null ? void 0 : m.title) ?? "Title"), 1), - e("div", ua, [ - e("p", ma, u(((n = l.selection) == null ? void 0 : n.message) ?? "Message"), 1) + e("div", ia, [ + da, + e("div", ca, [ + e("h3", ua, c(((p = n.selection) == null ? void 0 : p.title) ?? "Title"), 1), + e("div", ma, [ + e("p", va, c(((d = n.selection) == null ? void 0 : d.message) ?? "Message"), 1) ]) ]) ]) @@ -1589,7 +1742,7 @@ const zs = /* @__PURE__ */ e("iframe", { _: 1 })); } -}), ha = { class: "sm:flex sm:items-start" }, fa = /* @__PURE__ */ e("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [ +}), fa = { class: "sm:flex sm:items-start" }, ga = /* @__PURE__ */ e("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [ /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100", @@ -1604,74 +1757,77 @@ const zs = /* @__PURE__ */ e("iframe", { d: "M9 13h6m-3-3v6m-9 1V7a2 2 0 012-2h6l2 2h6a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2z" }) ]) -], -1), ga = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, ka = { +], -1), ka = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, ba = { class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400", id: "modal-title" -}, _a = { class: "mt-2" }, xa = { class: "text-sm text-gray-500" }, ba = ["placeholder"], wa = { +}, _a = { class: "mt-2" }, ya = { class: "text-sm text-gray-500" }, xa = ["placeholder"], wa = { name: "VFModalNewFolder" -}, ya = /* @__PURE__ */ Object.assign(wa, { +}, $a = /* @__PURE__ */ Object.assign(wa, { props: { selection: Object, current: Object }, - setup(l) { - const t = k("emitter"); - k("storage"); - const s = k("adapter"), { t: o } = k("i18n"), i = l, m = g(""), n = g(""), h = () => { - m.value != "" && t.emit("vf-fetch", { + setup(n) { + const s = g("emitter"); + g("storage"); + const o = g("adapter"), { t } = g("i18n"), l = n, p = b(""), d = b(""), v = () => { + p.value != "" && s.emit("vf-fetch", { params: { q: "newfolder", - adapter: s.value, - path: i.current.dirname, - name: m.value + m: "post", + adapter: o.value, + path: l.current.dirname + }, + body: { + name: p.value }, onSuccess: () => { - t.emit("vf-toast-push", { label: o("%s is created.", m.value) }); + s.emit("vf-toast-push", { label: t("%s is created.", p.value) }); }, - onError: (p) => { - n.value = o(p.message); + onError: (f) => { + d.value = t(f.message); } }); }; - return (p, c) => (r(), N(W, null, { - buttons: E(() => [ + return (f, i) => (r(), B(Q, null, { + buttons: z(() => [ e("button", { type: "button", - onClick: h, + onClick: v, class: "vf-btn vf-btn-primary" - }, u(a(o)("Create")), 1), + }, c(a(t)("Create")), 1), e("button", { type: "button", - onClick: c[2] || (c[2] = (d) => a(t).emit("vf-modal-close")), + onClick: i[2] || (i[2] = (m) => a(s).emit("vf-modal-close")), class: "vf-btn vf-btn-secondary" - }, u(a(o)("Cancel")), 1) + }, c(a(t)("Cancel")), 1) ]), - default: E(() => [ - e("div", ha, [ - fa, - e("div", ga, [ - e("h3", ka, u(a(o)("New Folder")), 1), + default: z(() => [ + e("div", fa, [ + ga, + e("div", ka, [ + e("h3", ba, c(a(t)("New Folder")), 1), e("div", _a, [ - e("p", xa, u(a(o)("Create a new folder")), 1), - R(e("input", { - "onUpdate:modelValue": c[0] || (c[0] = (d) => m.value = d), - onKeyup: se(h, ["enter"]), + e("p", ya, c(a(t)("Create a new folder")), 1), + Y(e("input", { + "onUpdate:modelValue": i[0] || (i[0] = (m) => p.value = m), + onKeyup: ne(v, ["enter"]), class: "px-2 py-1 border rounded dark:bg-gray-700/25 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:text-gray-100 w-full", - placeholder: a(o)("Folder Name"), + placeholder: a(t)("Folder Name"), type: "text" - }, null, 40, ba), [ - [ae, m.value] + }, null, 40, xa), [ + [le, p.value] ]), - n.value.length ? (r(), N(Q, { + d.value.length ? (r(), B(te, { key: 0, - onHidden: c[1] || (c[1] = (d) => n.value = ""), + onHidden: i[1] || (i[1] = (m) => d.value = ""), error: "" }, { - default: E(() => [ - U(u(n.value), 1) + default: z(() => [ + H(c(d.value), 1) ]), _: 1 - })) : V("", !0) + })) : O("", !0) ]) ]) ]) @@ -1679,7 +1835,7 @@ const zs = /* @__PURE__ */ e("iframe", { _: 1 })); } -}), $a = { class: "sm:flex sm:items-start" }, Ca = /* @__PURE__ */ e("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [ +}), Ca = { class: "sm:flex sm:items-start" }, Ma = /* @__PURE__ */ e("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [ /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100", @@ -1694,74 +1850,77 @@ const zs = /* @__PURE__ */ e("iframe", { d: "M9 13h6m-3-3v6m5 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" }) ]) -], -1), Ma = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, ja = { +], -1), ja = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Ea = { class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400", id: "modal-title" -}, Sa = { class: "mt-2" }, Da = { class: "text-sm text-gray-500" }, Oa = ["placeholder"], za = { +}, Sa = { class: "mt-2" }, Da = { class: "text-sm text-gray-500" }, Oa = ["placeholder"], Aa = { name: "VFModalNewFile" -}, Ea = /* @__PURE__ */ Object.assign(za, { +}, La = /* @__PURE__ */ Object.assign(Aa, { props: { selection: Object, current: Object }, - setup(l) { - const t = k("emitter"); - k("storage"); - const s = k("adapter"), { t: o } = k("i18n"), i = l, m = g(""), n = g(""), h = () => { - m.value != "" && t.emit("vf-fetch", { + setup(n) { + const s = g("emitter"); + g("storage"); + const o = g("adapter"), { t } = g("i18n"), l = n, p = b(""), d = b(""), v = () => { + p.value != "" && s.emit("vf-fetch", { params: { q: "newfile", - adapter: s.value, - path: i.current.dirname, - name: m.value + m: "post", + adapter: o.value, + path: l.current.dirname + }, + body: { + name: p.value }, onSuccess: () => { - t.emit("vf-toast-push", { label: o("%s is created.", m.value) }); + s.emit("vf-toast-push", { label: t("%s is created.", p.value) }); }, - onError: (p) => { - n.value = o(p.message); + onError: (f) => { + d.value = t(f.message); } }); }; - return (p, c) => (r(), N(W, null, { - buttons: E(() => [ + return (f, i) => (r(), B(Q, null, { + buttons: z(() => [ e("button", { type: "button", - onClick: h, + onClick: v, class: "vf-btn vf-btn-primary" - }, u(a(o)("Create")), 1), + }, c(a(t)("Create")), 1), e("button", { type: "button", - onClick: c[2] || (c[2] = (d) => a(t).emit("vf-modal-close")), + onClick: i[2] || (i[2] = (m) => a(s).emit("vf-modal-close")), class: "vf-btn vf-btn-secondary" - }, u(a(o)("Cancel")), 1) + }, c(a(t)("Cancel")), 1) ]), - default: E(() => [ - e("div", $a, [ - Ca, - e("div", Ma, [ - e("h3", ja, u(a(o)("New File")), 1), + default: z(() => [ + e("div", Ca, [ + Ma, + e("div", ja, [ + e("h3", Ea, c(a(t)("New File")), 1), e("div", Sa, [ - e("p", Da, u(a(o)("Create a new file")), 1), - R(e("input", { - "onUpdate:modelValue": c[0] || (c[0] = (d) => m.value = d), - onKeyup: se(h, ["enter"]), + e("p", Da, c(a(t)("Create a new file")), 1), + Y(e("input", { + "onUpdate:modelValue": i[0] || (i[0] = (m) => p.value = m), + onKeyup: ne(v, ["enter"]), class: "px-2 py-1 border rounded dark:bg-gray-700/25 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:text-gray-100 w-full", - placeholder: a(o)("File Name"), + placeholder: a(t)("File Name"), type: "text" }, null, 40, Oa), [ - [ae, m.value] + [le, p.value] ]), - n.value.length ? (r(), N(Q, { + d.value.length ? (r(), B(te, { key: 0, - onHidden: c[1] || (c[1] = (d) => n.value = ""), + onHidden: i[1] || (i[1] = (m) => d.value = ""), error: "" }, { - default: E(() => [ - U(u(n.value), 1) + default: z(() => [ + H(c(d.value), 1) ]), _: 1 - })) : V("", !0) + })) : O("", !0) ]) ]) ]) @@ -1769,308 +1928,316 @@ const zs = /* @__PURE__ */ e("iframe", { _: 1 })); } -}), Fa = { class: "flex" }, Va = ["aria-label"], Ba = { class: "ml-auto mb-2" }, Aa = { +}), za = { class: "flex" }, Fa = ["aria-label"], Na = { class: "ml-auto mb-2" }, Va = { key: 0, class: "p-2 border font-normal whitespace-pre-wrap border-gray-200 dark:border-gray-700/50 dark:text-gray-200 rounded min-h-[200px] max-h-[60vh] text-xs overflow-auto" -}, La = { key: 1 }, Na = { +}, Ta = { key: 1 }, Ba = { __name: "Text", props: { selection: Object }, emits: ["load"], - setup(l, { emit: t }) { - const s = t, o = g(""), i = g(""), m = g(null), n = g(!1), { apiUrl: h } = X(), p = l, c = g(""), d = g(!1), { t: f } = k("i18n"); - K(() => { - fe(h.value, { - params: { q: "preview", adapter: p.selection.adapter, path: p.selection.item.path }, - json: !1 - }).then((O) => { - o.value = O, s("load"); + setup(n, { emit: s }) { + const o = s, t = b(""), l = b(""), p = b(null), d = b(!1), v = n, f = b(""), i = b(!1), m = g("requester"), h = g("features"), { t: E } = g("i18n"); + X(() => { + m.send({ + url: "", + method: "get", + params: { q: "preview", adapter: v.selection.adapter, path: v.selection.item.path }, + responseType: "text" + }).then((y) => { + t.value = y, o("load"); }); }); - const y = () => { - n.value = !n.value, i.value = o.value, n.value == !0 && ge(() => { - m.value.focus(); + const $ = () => { + d.value = !d.value, l.value = t.value, d.value == !0 && he(() => { + p.value.focus(); }); - }, w = k("postData"), B = () => { - c.value = "", d.value = !1, fe(h.value, { - method: "POST", - params: Object.assign(w, { + }, C = () => { + f.value = "", i.value = !1, m.send({ + url: "", + method: "post", + params: { q: "save", - adapter: p.selection.adapter, - path: p.selection.item.path, - content: i.value - }), - json: !1 - }).then((O) => { - c.value = f("Updated."), o.value = O, s("load"), n.value = !n.value; - }).catch((O) => { - c.value = f(O.message), d.value = !0; + adapter: v.selection.adapter, + path: v.selection.item.path + }, + body: { + content: l.value + }, + responseType: "text" + }).then((y) => { + f.value = E("Updated."), t.value = y, o("load"), d.value = !d.value; + }).catch((y) => { + f.value = E(y.message), i.value = !0; }); }; - return (O, D) => (r(), v(H, null, [ - e("div", Fa, [ + return (y, A) => (r(), u(I, null, [ + e("div", za, [ e("div", { class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400", id: "modal-title", - "aria-label": l.selection.item.path, + "aria-label": n.selection.item.path, "data-microtip-position": "bottom-right", role: "tooltip" - }, u(l.selection.item.basename), 9, Va), - e("div", Ba, [ - n.value ? (r(), v("button", { + }, c(n.selection.item.basename), 9, Fa), + e("div", Na, [ + d.value ? (r(), u("button", { key: 0, - onClick: B, + onClick: C, class: "ml-1 px-2 py-1 rounded border border-transparent shadow-sm bg-blue-700/75 hover:bg-blue-700 dark:bg-gray-700 dark:hover:bg-gray-700/50 text-base font-medium text-white sm:ml-3 sm:w-auto sm:text-sm" - }, u(a(f)("Save")), 1)) : V("", !0), - e("button", { + }, c(a(E)("Save")), 1)) : O("", !0), + a(h).includes(a(q).EDIT) ? (r(), u("button", { + key: 1, class: "ml-1 px-2 py-1 text-blue-500", - onClick: D[0] || (D[0] = (S) => y()) - }, u(n.value ? a(f)("Cancel") : a(f)("Edit")), 1) + onClick: A[0] || (A[0] = (M) => $()) + }, c(d.value ? a(E)("Cancel") : a(E)("Edit")), 1)) : O("", !0) ]) ]), e("div", null, [ - n.value ? (r(), v("div", La, [ - R(e("textarea", { + d.value ? (r(), u("div", Ta, [ + Y(e("textarea", { ref_key: "editInput", - ref: m, - "onUpdate:modelValue": D[1] || (D[1] = (S) => i.value = S), + ref: p, + "onUpdate:modelValue": A[1] || (A[1] = (M) => l.value = M), class: "w-full p-2 rounded dark:bg-gray-700 dark:text-gray-200 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:selection:bg-gray-500 min-h-[200px] max-h-[60vh] text-xs", name: "text", id: "", cols: "30", rows: "10" }, null, 512), [ - [ae, i.value] + [le, l.value] ]) - ])) : (r(), v("pre", Aa, u(o.value), 1)), - c.value.length ? (r(), N(Q, { + ])) : (r(), u("pre", Va, c(t.value), 1)), + f.value.length ? (r(), B(te, { key: 2, - onHidden: D[2] || (D[2] = (S) => c.value = ""), - error: d.value + onHidden: A[2] || (A[2] = (M) => f.value = ""), + error: i.value }, { - default: E(() => [ - U(u(c.value), 1) + default: z(() => [ + H(c(f.value), 1) ]), _: 1 - }, 8, ["error"])) : V("", !0) + }, 8, ["error"])) : O("", !0) ]) ], 64)); } -}, Ua = { class: "flex" }, Ta = ["aria-label"], Ha = { class: "ml-auto mb-2" }, Ia = { class: "w-full flex justify-center" }, qa = ["src"], Ra = { +}, Ha = { class: "flex" }, Ua = ["aria-label"], qa = { class: "ml-auto mb-2" }, Ra = { class: "w-full flex justify-center" }, Ia = ["src"], Pa = { __name: "Image", props: { selection: Object }, emits: ["load"], - setup(l, { emit: t }) { - const s = t, o = l, { t: i } = k("i18n"), { apiUrl: m } = X(), n = g(null), h = g(null), p = g(!1), c = g(""), d = g(!1), f = () => { - p.value = !p.value, p.value ? h.value = new Re(n.value, { - crop(B) { + setup(n, { emit: s }) { + const o = s, t = n, { t: l } = g("i18n"), p = g("requester"), d = g("features"), v = b(null), f = b(null), i = b(!1), m = b(""), h = b(!1), E = () => { + i.value = !i.value, i.value ? f.value = new We(v.value, { + crop(C) { } - }) : h.value.destroy(); - }, y = k("postData"), w = () => { - h.value.getCroppedCanvas({ + }) : f.value.destroy(); + }, $ = () => { + f.value.getCroppedCanvas({ width: 795, height: 341 }).toBlob( - (B) => { - c.value = "", d.value = !1, fe(m.value, { - method: "POST", - params: Object.assign(y, { + (C) => { + m.value = "", h.value = !1; + const y = new FormData(); + y.set("file", C), p.send({ + url: "", + method: "post", + params: { q: "upload", - adapter: o.selection.adapter, - path: o.selection.item.path, - file: B - }), - name: o.selection.item.basename, - json: !1 - }).then((O) => { - c.value = i("Updated."), n.value.src = be(o.selection.adapter, o.selection.item.path), f(), s("load"); - }).catch((O) => { - c.value = i(O.message), d.value = !0; + adapter: t.selection.adapter, + path: t.selection.item.path + }, + body: y + }).then((A) => { + m.value = l("Updated."), v.value.src = p.getPreviewUrl(t.selection.adapter, t.selection.item), E(), o("load"); + }).catch((A) => { + m.value = l(A.message), h.value = !0; }); } ); }; - return K(() => { - s("load"); - }), (B, O) => (r(), v(H, null, [ - e("div", Ua, [ + return X(() => { + o("load"); + }), (C, y) => (r(), u(I, null, [ + e("div", Ha, [ e("h3", { class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400", id: "modal-title", - "aria-label": l.selection.item.path, + "aria-label": n.selection.item.path, "data-microtip-position": "bottom-right", role: "tooltip" - }, u(l.selection.item.basename), 9, Ta), - e("div", Ha, [ - p.value ? (r(), v("button", { + }, c(n.selection.item.basename), 9, Ua), + e("div", qa, [ + i.value ? (r(), u("button", { key: 0, - onClick: w, + onClick: $, class: "ml-1 px-2 py-1 rounded border border-transparent shadow-sm bg-blue-700/75 hover:bg-blue-700 dark:bg-gray-700 dark:hover:bg-gray-700/50 text-base font-medium text-white sm:ml-3 sm:w-auto sm:text-sm" - }, u(a(i)("Crop")), 1)) : V("", !0), - e("button", { + }, c(a(l)("Crop")), 1)) : O("", !0), + a(d).includes(a(q).EDIT) ? (r(), u("button", { + key: 1, class: "ml-1 px-2 py-1 text-blue-500", - onClick: O[0] || (O[0] = (D) => f()) - }, u(p.value ? a(i)("Cancel") : a(i)("Edit")), 1) + onClick: y[0] || (y[0] = (A) => E()) + }, c(i.value ? a(l)("Cancel") : a(l)("Edit")), 1)) : O("", !0) ]) ]), - e("div", Ia, [ + e("div", Ra, [ e("img", { ref_key: "image", - ref: n, + ref: v, class: "max-w-[50vh] max-h-[50vh]", - src: a(be)(o.selection.adapter, o.selection.item.path), + src: a(p).getPreviewUrl(t.selection.adapter, t.selection.item), alt: "" - }, null, 8, qa) + }, null, 8, Ia) ]), - c.value.length ? (r(), N(Q, { + m.value.length ? (r(), B(te, { key: 0, - onHidden: O[1] || (O[1] = (D) => c.value = ""), - error: d.value + onHidden: y[1] || (y[1] = (A) => m.value = ""), + error: h.value }, { - default: E(() => [ - U(u(c.value), 1) + default: z(() => [ + H(c(m.value), 1) ]), _: 1 - }, 8, ["error"])) : V("", !0) + }, 8, ["error"])) : O("", !0) ], 64)); } -}, Pa = { class: "flex" }, Ga = ["aria-label"], Ya = /* @__PURE__ */ e("div", null, null, -1), Ja = { +}, Wa = { class: "flex" }, Ga = ["aria-label"], Ya = /* @__PURE__ */ e("div", null, null, -1), Ka = { __name: "Default", props: { selection: Object }, emits: ["load"], - setup(l, { emit: t }) { - const s = t; - return K(() => { - s("load"); - }), (o, i) => (r(), v(H, null, [ - e("div", Pa, [ + setup(n, { emit: s }) { + const o = s; + return X(() => { + o("load"); + }), (t, l) => (r(), u(I, null, [ + e("div", Wa, [ e("h3", { class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400", id: "modal-title", - "aria-label": l.selection.item.path, + "aria-label": n.selection.item.path, "data-microtip-position": "bottom-right", role: "tooltip" - }, u(l.selection.item.basename), 9, Ga) + }, c(n.selection.item.basename), 9, Ga) ]), Ya ], 64)); } -}, Ka = ["aria-label"], Wa = { +}, Ja = ["aria-label"], Xa = { class: "w-full", preload: "", controls: "" -}, Xa = ["src"], Qa = { +}, Qa = ["src"], Za = { __name: "Video", props: { selection: Object }, emits: ["load"], - setup(l, { emit: t }) { - const { apiUrl: s } = X(), o = l, i = t, m = () => s.value + "?" + oe({ q: "preview", adapter: o.selection.adapter, path: o.selection.item.path }); - return K(() => { - i("load"); - }), (n, h) => (r(), v(H, null, [ + setup(n, { emit: s }) { + const o = n, t = s, l = g("requester"), p = () => l.getPreviewUrl(o.selection.adapter, o.selection.item); + return X(() => { + t("load"); + }), (d, v) => (r(), u(I, null, [ e("h3", { class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400", id: "modal-title", - "aria-label": l.selection.item.path, + "aria-label": n.selection.item.path, "data-microtip-position": "bottom-right", role: "tooltip" - }, u(l.selection.item.basename), 9, Ka), + }, c(n.selection.item.basename), 9, Ja), e("div", null, [ - e("video", Wa, [ + e("video", Xa, [ e("source", { - src: m(), + src: p(), type: "video/mp4" - }, null, 8, Xa), - U(" Your browser does not support the video tag. ") + }, null, 8, Qa), + H(" Your browser does not support the video tag. ") ]) ]) ], 64)); } -}, Za = ["aria-label"], en = { +}, er = ["aria-label"], tr = { class: "w-full", controls: "" -}, tn = ["src"], on = { +}, sr = ["src"], or = { __name: "Audio", props: { selection: Object }, emits: ["load"], - setup(l, { emit: t }) { - const { apiUrl: s } = X(), o = l, i = t, m = () => s.value + "?" + oe({ q: "preview", adapter: o.selection.adapter, path: o.selection.item.path }); - return K(() => { - i("load"); - }), (n, h) => (r(), v(H, null, [ + setup(n, { emit: s }) { + const o = n, t = g("requester"), l = s, p = () => t.getPreviewUrl(o.selection.adapter, o.selection.item); + return X(() => { + l("load"); + }), (d, v) => (r(), u(I, null, [ e("h3", { class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400", id: "modal-title", - "aria-label": l.selection.item.path, + "aria-label": n.selection.item.path, "data-microtip-position": "bottom-right", role: "tooltip" - }, u(l.selection.item.basename), 9, Za), + }, c(n.selection.item.basename), 9, er), e("div", null, [ - e("audio", en, [ + e("audio", tr, [ e("source", { - src: m(), + src: p(), type: "audio/mpeg" - }, null, 8, tn), - U(" Your browser does not support the audio element. ") + }, null, 8, sr), + H(" Your browser does not support the audio element. ") ]) ]) ], 64)); } -}, sn = ["aria-label"], an = ["data"], nn = ["src"], rn = /* @__PURE__ */ e("p", null, [ - /* @__PURE__ */ U(" Your browser does not support PDFs. "), +}, ar = ["aria-label"], rr = ["data"], nr = ["src"], lr = /* @__PURE__ */ e("p", null, [ + /* @__PURE__ */ H(" Your browser does not support PDFs. "), /* @__PURE__ */ e("a", { href: "https://example.com/test.pdf" }, "Download the PDF"), - /* @__PURE__ */ U(" . ") -], -1), ln = [ - rn -], dn = { + /* @__PURE__ */ H(" . ") +], -1), ir = [ + lr +], dr = { __name: "Pdf", props: { selection: Object }, emits: ["load"], - setup(l, { emit: t }) { - const { apiUrl: s } = X(), o = l, i = t, m = () => s.value + "?" + oe({ q: "preview", adapter: o.selection.adapter, path: o.selection.item.path }); - return K(() => { - i("load"); - }), (n, h) => (r(), v(H, null, [ + setup(n, { emit: s }) { + const o = n, t = s, l = g("requester"), p = () => l.getPreviewUrl(o.selection.adapter, o.selection.item); + return X(() => { + t("load"); + }), (d, v) => (r(), u(I, null, [ e("h3", { class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400", id: "modal-title", - "aria-label": l.selection.item.path, + "aria-label": n.selection.item.path, "data-microtip-position": "bottom-right", role: "tooltip" - }, u(l.selection.item.basename), 9, sn), + }, c(n.selection.item.basename), 9, ar), e("div", null, [ e("object", { class: "h-[60vh]", - data: m(), + data: p(), type: "application/pdf", width: "100%", height: "100%" }, [ e("iframe", { class: "border-0", - src: m(), + src: p(), width: "100%", height: "100%" - }, ln, 8, nn) - ], 8, an) + }, ir, 8, nr) + ], 8, rr) ]) ], 64)); } -}, cn = { class: "sm:flex sm:items-start" }, un = { class: "mt-3 text-center sm:mt-0 sm:text-left w-full" }, mn = { class: "text-gray-700 dark:text-gray-200 text-sm" }, vn = { +}, cr = { class: "sm:flex sm:items-start" }, ur = { class: "mt-3 text-center sm:mt-0 sm:text-left w-full" }, mr = { key: 0 }, vr = { class: "text-gray-700 dark:text-gray-200 text-sm" }, pr = { key: 0, class: "flex leading-5" -}, pn = /* @__PURE__ */ e("svg", { +}, hr = /* @__PURE__ */ e("svg", { class: "animate-spin -ml-1 mr-3 h-5 w-5 text-white", xmlns: "http://www.w3.org/2000/svg", fill: "none", @@ -2089,83 +2256,84 @@ const zs = /* @__PURE__ */ e("iframe", { 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), hn = { class: "py-2 flex font-normal break-all dark:text-gray-200 rounded text-xs" }, fn = { class: "font-bold pl-2" }, gn = { class: "font-bold pl-2" }, kn = { +], -1), fr = { class: "py-2 flex font-normal break-all dark:text-gray-200 rounded text-xs" }, gr = { class: "font-bold pl-2" }, kr = { class: "font-bold pl-2" }, br = { name: "VFModalPreview" -}, _n = /* @__PURE__ */ Object.assign(kn, { +}, _r = /* @__PURE__ */ Object.assign(br, { props: { selection: Object }, - setup(l) { - const { apiUrl: t } = X(), s = k("emitter"), { t: o } = k("i18n"), i = g(!1), m = k("filesize"), n = (d) => i.value = d, h = l, p = (d) => (h.selection.item.mime_type ?? "").startsWith(d), c = () => { - const d = t.value + "?" + oe({ q: "download", adapter: h.selection.adapter, path: h.selection.item.path }); - s.emit("vf-download", d); - }; - return (d, f) => (r(), N(W, null, { - buttons: E(() => [ + setup(n) { + const s = g("emitter"), { t: o } = g("i18n"), t = b(!1), l = g("filesize"), p = g("requester"), d = g("features"), v = (E) => t.value = E, f = n, i = (E) => (f.selection.item.mime_type ?? "").startsWith(E), m = () => { + const E = p.getDownloadUrl(f.selection.adapter, f.selection.item); + s.emit("vf-download", E); + }, h = d.value.includes(q.PREVIEW); + return h || v(!0), (E, $) => (r(), B(Q, null, { + buttons: z(() => [ e("button", { type: "button", - onClick: f[6] || (f[6] = (y) => a(s).emit("vf-modal-close")), + onClick: $[6] || ($[6] = (C) => a(s).emit("vf-modal-close")), class: "vf-btn vf-btn-secondary" - }, u(a(o)("Close")), 1), - e("button", { + }, c(a(o)("Close")), 1), + a(d).includes(a(q).DOWNLOAD) ? (r(), u("button", { + key: 0, type: "button", - onClick: f[7] || (f[7] = (y) => c()), + onClick: $[7] || ($[7] = (C) => m()), class: "vf-btn vf-btn-primary" - }, u(a(o)("Download")), 1) + }, c(a(o)("Download")), 1)) : O("", !0) ]), - default: E(() => [ - e("div", cn, [ - e("div", un, [ - e("div", null, [ - p("text") ? (r(), N(Na, { + default: z(() => [ + e("div", cr, [ + e("div", ur, [ + a(h) ? (r(), u("div", mr, [ + i("text") ? (r(), B(Ba, { key: 0, - selection: l.selection, - onLoad: f[0] || (f[0] = (y) => n(!0)) - }, null, 8, ["selection"])) : p("image") ? (r(), N(Ra, { + selection: n.selection, + onLoad: $[0] || ($[0] = (C) => v(!0)) + }, null, 8, ["selection"])) : i("image") ? (r(), B(Pa, { key: 1, - selection: l.selection, - onLoad: f[1] || (f[1] = (y) => n(!0)) - }, null, 8, ["selection"])) : p("video") ? (r(), N(Qa, { + selection: n.selection, + onLoad: $[1] || ($[1] = (C) => v(!0)) + }, null, 8, ["selection"])) : i("video") ? (r(), B(Za, { key: 2, - selection: l.selection, - onLoad: f[2] || (f[2] = (y) => n(!0)) - }, null, 8, ["selection"])) : p("audio") ? (r(), N(on, { + selection: n.selection, + onLoad: $[2] || ($[2] = (C) => v(!0)) + }, null, 8, ["selection"])) : i("audio") ? (r(), B(or, { key: 3, - selection: l.selection, - onLoad: f[3] || (f[3] = (y) => n(!0)) - }, null, 8, ["selection"])) : p("application/pdf") ? (r(), N(dn, { + selection: n.selection, + onLoad: $[3] || ($[3] = (C) => v(!0)) + }, null, 8, ["selection"])) : i("application/pdf") ? (r(), B(dr, { key: 4, - selection: l.selection, - onLoad: f[4] || (f[4] = (y) => n(!0)) - }, null, 8, ["selection"])) : (r(), N(Ja, { + selection: n.selection, + onLoad: $[4] || ($[4] = (C) => v(!0)) + }, null, 8, ["selection"])) : (r(), B(Ka, { key: 5, - selection: l.selection, - onLoad: f[5] || (f[5] = (y) => n(!0)) + selection: n.selection, + onLoad: $[5] || ($[5] = (C) => v(!0)) }, null, 8, ["selection"])) - ]), - e("div", mn, [ - i.value == !1 ? (r(), v("div", vn, [ - pn, - e("span", null, u(a(o)("Loading")), 1) - ])) : V("", !0) + ])) : O("", !0), + e("div", vr, [ + t.value == !1 ? (r(), u("div", pr, [ + hr, + e("span", null, c(a(o)("Loading")), 1) + ])) : O("", !0) ]) ]) ]), - e("div", hn, [ + e("div", fr, [ e("div", null, [ - e("span", fn, u(a(o)("File Size")) + ": ", 1), - U(u(a(m)(l.selection.item.file_size)), 1) + e("span", gr, c(a(o)("File Size")) + ": ", 1), + H(c(a(l)(n.selection.item.file_size)), 1) ]), e("div", null, [ - e("span", gn, u(a(o)("Last Modified")) + ": ", 1), - U(" " + u(a(Ee)(l.selection.item.last_modified)), 1) + e("span", kr, c(a(o)("Last Modified")) + ": ", 1), + H(" " + c(a(Fe)(n.selection.item.last_modified)), 1) ]) ]) ]), _: 1 })); } -}), xn = { class: "sm:flex sm:items-start" }, bn = /* @__PURE__ */ e("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [ +}), yr = { class: "sm:flex sm:items-start" }, xr = /* @__PURE__ */ e("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [ /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100", @@ -2180,10 +2348,10 @@ const zs = /* @__PURE__ */ e("iframe", { d: "M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" }) ]) -], -1), wn = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, yn = { +], -1), wr = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, $r = { class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400", id: "modal-title" -}, $n = { class: "mt-2" }, Cn = { class: "flex text-sm text-gray-800 dark:text-gray-400 py-2" }, Mn = { +}, Cr = { class: "mt-2" }, Mr = { class: "flex text-sm text-gray-800 dark:text-gray-400 py-2" }, jr = { key: 0, xmlns: "http://www.w3.org/2000/svg", class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500", @@ -2191,13 +2359,13 @@ const zs = /* @__PURE__ */ e("iframe", { viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, jn = /* @__PURE__ */ e("path", { +}, Er = /* @__PURE__ */ e("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), Sn = [ - jn -], Dn = { +}, null, -1), Sr = [ + Er +], Dr = { key: 1, xmlns: "http://www.w3.org/2000/svg", class: "h-5 w-5 text-neutral-500", @@ -2205,81 +2373,84 @@ const zs = /* @__PURE__ */ e("iframe", { viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, On = /* @__PURE__ */ e("path", { +}, Or = /* @__PURE__ */ e("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), zn = [ - On -], En = { class: "ml-1.5" }, Fn = { +}, null, -1), Ar = [ + Or +], Lr = { class: "ml-1.5" }, zr = { name: "VFModalRename" -}, Vn = /* @__PURE__ */ Object.assign(Fn, { +}, Fr = /* @__PURE__ */ Object.assign(zr, { props: { selection: Object, current: Object }, - setup(l) { - const t = k("emitter"); - k("storage"); - const s = k("adapter"), { t: o } = k("i18n"), i = l, m = g(i.selection.items[0]), n = g(i.selection.items[0].basename), h = g(""), p = () => { - n.value != "" && t.emit("vf-fetch", { + setup(n) { + const s = g("emitter"); + g("storage"); + const o = g("adapter"), { t } = g("i18n"), l = n, p = b(l.selection.items[0]), d = b(l.selection.items[0].basename), v = b(""), f = () => { + d.value != "" && s.emit("vf-fetch", { params: { q: "rename", - adapter: s.value, - path: i.current.dirname, - item: m.value.path, - name: n.value + m: "post", + adapter: o.value, + path: l.current.dirname + }, + body: { + item: p.value.path, + name: d.value }, onSuccess: () => { - t.emit("vf-toast-push", { label: o("%s is renamed.", n.value) }); + s.emit("vf-toast-push", { label: t("%s is renamed.", d.value) }); }, - onError: (c) => { - h.value = o(c.message); + onError: (i) => { + v.value = t(i.message); } }); }; - return (c, d) => (r(), N(W, null, { - buttons: E(() => [ + return (i, m) => (r(), B(Q, null, { + buttons: z(() => [ e("button", { type: "button", - onClick: p, + onClick: f, class: "vf-btn vf-btn-primary" - }, u(a(o)("Rename")), 1), + }, c(a(t)("Rename")), 1), e("button", { type: "button", - onClick: d[2] || (d[2] = (f) => a(t).emit("vf-modal-close")), + onClick: m[2] || (m[2] = (h) => a(s).emit("vf-modal-close")), class: "vf-btn vf-btn-secondary" - }, u(a(o)("Cancel")), 1) + }, c(a(t)("Cancel")), 1) ]), - default: E(() => [ - e("div", xn, [ - bn, - e("div", wn, [ - e("h3", yn, u(a(o)("Rename")), 1), - e("div", $n, [ - e("p", Cn, [ - m.value.type == "dir" ? (r(), v("svg", Mn, Sn)) : (r(), v("svg", Dn, zn)), - e("span", En, u(m.value.basename), 1) + default: z(() => [ + e("div", yr, [ + xr, + e("div", wr, [ + e("h3", $r, c(a(t)("Rename")), 1), + e("div", Cr, [ + e("p", Mr, [ + p.value.type == "dir" ? (r(), u("svg", jr, Sr)) : (r(), u("svg", Dr, Ar)), + e("span", Lr, c(p.value.basename), 1) ]), - R(e("input", { - "onUpdate:modelValue": d[0] || (d[0] = (f) => n.value = f), - onKeyup: se(p, ["enter"]), + Y(e("input", { + "onUpdate:modelValue": m[0] || (m[0] = (h) => d.value = h), + onKeyup: ne(f, ["enter"]), class: "px-2 py-1 border rounded dark:bg-gray-700/25 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:text-gray-100 w-full", placeholder: "Name", type: "text" }, null, 544), [ - [ae, n.value] + [le, d.value] ]), - h.value.length ? (r(), N(Q, { + v.value.length ? (r(), B(te, { key: 0, - onHidden: d[1] || (d[1] = (f) => h.value = ""), + onHidden: m[1] || (m[1] = (h) => v.value = ""), error: "" }, { - default: E(() => [ - U(u(h.value), 1) + default: z(() => [ + H(c(v.value), 1) ]), _: 1 - })) : V("", !0) + })) : O("", !0) ]) ]) ]) @@ -2287,7 +2458,7 @@ const zs = /* @__PURE__ */ e("iframe", { _: 1 })); } -}), Bn = { class: "sm:flex sm:items-start" }, An = /* @__PURE__ */ e("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [ +}), Nr = { class: "sm:flex sm:items-start" }, Vr = /* @__PURE__ */ e("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [ /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100", @@ -2302,19 +2473,19 @@ const zs = /* @__PURE__ */ e("iframe", { d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12" }) ]) -], -1), Ln = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Nn = { +], -1), Tr = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Br = { class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400", id: "modal-title" -}, Un = { class: "mt-2" }, Tn = { +}, Hr = { class: "mt-2" }, Ur = { key: 0, class: "pointer-events-none" -}, Hn = { +}, qr = { key: 1, class: "pointer-events-none" -}, In = ["disabled"], qn = ["disabled"], Rn = { class: "text-gray-500 text-sm mb-1 pr-1 max-h-[200px] overflow-y-auto vf-scrollbar" }, Pn = { class: "rounded flex flex-shrink-0 w-6 h-6 border bg-gray-50 text-xs cursor-default dark:border-gray-700 dark:bg-gray-800 dark:text-gray-50" }, Gn = ["textContent"], Yn = { class: "ml-1 w-full h-fit" }, Jn = { class: "text-left hidden md:block" }, Kn = { class: "text-left md:hidden" }, Wn = { +}, Rr = ["disabled"], Ir = ["disabled"], Pr = { class: "text-gray-500 text-sm mb-1 pr-1 max-h-[200px] overflow-y-auto vf-scrollbar" }, Wr = { class: "rounded flex flex-shrink-0 w-6 h-6 border bg-gray-50 text-xs cursor-default dark:border-gray-700 dark:bg-gray-800 dark:text-gray-50" }, Gr = ["textContent"], Yr = { class: "ml-1 w-full h-fit" }, Kr = { class: "text-left hidden md:block" }, Jr = { class: "text-left md:hidden" }, Xr = { key: 0, class: "ml-auto" -}, Xn = ["title", "disabled", "onClick"], Qn = /* @__PURE__ */ e("svg", { +}, Qr = ["title", "disabled", "onClick"], Zr = /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", @@ -2327,318 +2498,324 @@ const zs = /* @__PURE__ */ e("iframe", { "stroke-linejoin": "round", d: "M6 18L18 6M6 6l12 12" }) -], -1), Zn = [ - Qn -], er = { +], -1), en = [ + Zr +], tn = { key: 0, class: "py-2" -}, tr = ["disabled"], or = { +}, sn = ["disabled"], on = { name: "VFModalUpload" -}, sr = /* @__PURE__ */ Object.assign(or, { +}, an = /* @__PURE__ */ Object.assign(on, { props: { current: Object }, - setup(l) { - const { apiUrl: t } = X(), s = k("emitter"), { t: o } = k("i18n"), i = k("maxFileSize"), m = k("postData"), n = k("filesize"), h = l, p = o("uppy"), c = { + setup(n) { + const s = g("debug"), o = g("emitter"), { t } = g("i18n"), l = g("maxFileSize"), p = g("filesize"), d = g("requester"), v = n, f = t("uppy"), i = { PENDING: 0, CANCELED: 1, UPLOADING: 2, ERROR: 3, DONE: 10 - }, d = g({ QUEUE_ENTRY_STATUS: c }), f = g(null), y = g(null), w = g(null), B = g(null), O = g(null), D = g(null), S = g([]), F = g(""), M = g(!1), j = g(!1); - let z; - function I(b) { - return S.value.findIndex((_) => _.id === b); + }, m = b({ QUEUE_ENTRY_STATUS: i }), h = b(null), E = b(null), $ = b(null), C = b(null), y = b(null), A = b(null), M = b([]), N = b(""), D = b(!1), L = b(!1); + let S; + function U(k) { + return M.value.findIndex((x) => x.id === k); } - function A(b, _ = null) { - _ = _ ?? (b.webkitRelativePath || b.name), z.addFile({ - name: _, - type: b.type, - data: b, + function V(k, x = null) { + x = x ?? (k.webkitRelativePath || k.name), S.addFile({ + name: x, + type: k.type, + data: k, source: "Local" }); } - function ee(b) { - switch (b.status) { - case c.DONE: + function F(k) { + switch (k.status) { + case i.DONE: return "text-green-600"; - case c.ERROR: + case i.ERROR: return "text-red-600"; - case c.CANCELED: + case i.CANCELED: return "text-red-600"; - case c.PENDING: + case i.PENDING: default: return ""; } } - const G = (b) => { - switch (b.status) { - case c.DONE: + const Z = (k) => { + switch (k.status) { + case i.DONE: return "✓"; - case c.ERROR: - case c.CANCELED: + case i.ERROR: + case i.CANCELED: return "!"; - case c.PENDING: + case i.PENDING: default: return "..."; } }; - function te() { - B.value.click(); + function se() { + C.value.click(); } - function ie() { - if (!M.value) { - if (!S.value.filter((b) => b.status !== c.DONE).length) { - F.value = o("Please select file to upload first."); + function ee() { + if (!D.value) { + if (!M.value.filter((k) => k.status !== i.DONE).length) { + N.value = t("Please select file to upload first."); return; } - F.value = "", z.retryAll(), z.upload(); + N.value = "", S.retryAll(), S.upload(); } } - function de() { - z.cancelAll({ reason: "user" }), S.value.forEach((b) => { - b.status !== c.DONE && (b.status = c.CANCELED, b.statusName = o("Canceled")); - }), M.value = !1; + function ae() { + S.cancelAll({ reason: "user" }), M.value.forEach((k) => { + k.status !== i.DONE && (k.status = i.CANCELED, k.statusName = t("Canceled")); + }), D.value = !1; } - function ne(b) { - M.value || (z.removeFile(b.id, "removed-by-user"), S.value.splice(I(b.id), 1)); + function J(k) { + D.value || (S.removeFile(k.id, "removed-by-user"), M.value.splice(U(k.id), 1)); } - function ce(b) { - if (!M.value) { - if (z.cancelAll({ reason: "user" }), b) { - const _ = []; - S.value.forEach((x) => { - x.status !== c.DONE && _.push(x); - }), S.value = [], _.forEach((x) => { - A(x.originalFile, x.name); + function ie(k) { + if (!D.value) { + if (S.cancelAll({ reason: "user" }), k) { + const x = []; + M.value.forEach((_) => { + _.status !== i.DONE && x.push(_); + }), M.value = [], x.forEach((_) => { + V(_.originalFile, _.name); }); return; } - S.value.splice(0); + M.value.splice(0); } } - function C() { - s.emit("vf-modal-close"); + function fe() { + o.emit("vf-modal-close"); } - return K(async () => { - z = new Pe({ - debug: process.env.NODE_ENV === "development", + return X(async () => { + S = new Ge({ + debug: s, restrictions: { - maxFileSize: Os(i) + maxFileSize: Ao(l) //maxNumberOfFiles //allowedFileTypes }, - locale: p, - onBeforeFileAdded(x, $) { - if ($[x.id] != null) { - const q = I(x.id); - S.value[q].status === c.PENDING && (F.value = z.i18n("noDuplicates", { fileName: x.name })), S.value = S.value.filter((ke) => ke.id !== x.id); + locale: f, + onBeforeFileAdded(j, w) { + if (w[j.id] != null) { + const W = U(j.id); + M.value[W].status === i.PENDING && (N.value = S.i18n("noDuplicates", { fileName: j.name })), M.value = M.value.filter((ge) => ge.id !== j.id); } - return S.value.push({ - id: x.id, - name: x.name, - size: n.value(x.size), - status: c.PENDING, - statusName: o("Pending upload"), + return M.value.push({ + id: j.id, + name: j.name, + size: p.value(j.size), + status: i.PENDING, + statusName: t("Pending upload"), percent: null, - originalFile: x.data + originalFile: j.data }), !0; } - }), z.use(Ge, { + }); + const k = d.transformRequestParams({ + url: "", method: "post", - endpoint: t.value + "?" + oe(Object.assign(m, { q: "upload", adapter: h.current.adapter, path: h.current.dirname })), - headers: { - ...he && { "X-CSRF-Token": he } - }, + params: { q: "upload", adapter: v.current.adapter, path: v.current.dirname } + }); + s && k.body != null && (k.body instanceof FormData || Object.keys(k.body).length > 0) && console.warn(`Cannot set body on upload, make sure request.transformRequest didn't set body when upload. +Will ignore for now.`), S.use(Ye, { + method: k.method, + endpoint: k.url + "?" + new URLSearchParams(k.params), + headers: k.headers, limit: 5, timeout: 0, - getResponseError(x, $) { - let L; + getResponseError(j, w) { + let T; try { - L = JSON.parse(x).message; + T = JSON.parse(j).message; } catch { - L = o("Cannot parse server response."); + T = t("Cannot parse server response."); } - return new Error(L); + return new Error(T); } - }), z.on("restriction-failed", (x, $) => { - const L = S.value[I(x.id)]; - ne(L), F.value = $.message; - }), z.on("upload", () => { - M.value = !0, S.value.forEach((x) => { - x.status !== c.DONE && (x.percent = null, x.status = c.UPLOADING, x.statusName = o("Pending upload")); + }), S.on("restriction-failed", (j, w) => { + const T = M.value[U(j.id)]; + J(T), N.value = w.message; + }), S.on("upload", () => { + D.value = !0, M.value.forEach((j) => { + j.status !== i.DONE && (j.percent = null, j.status = i.UPLOADING, j.statusName = t("Pending upload")); }); - }), z.on("upload-progress", (x, $) => { - const L = Math.floor($.bytesUploaded / $.bytesTotal * 100); - S.value[I(x.id)].percent = `${L}%`; - }), z.on("upload-success", (x) => { - const $ = S.value[I(x.id)]; - $.status = c.DONE, $.statusName = o("Done"); - }), z.on("upload-error", (x, $) => { - const L = S.value[I(x.id)]; - L.percent = null, L.status = c.ERROR, $.isNetworkError ? L.statusName = o("Network Error, Unable establish connection to the server or interrupted.") : L.statusName = $ ? $.message : o("Unknown Error"); - }), z.on("error", (x) => { - F.value = x.message, M.value = !1, s.emit("vf-fetch", { - params: { q: "index", adapter: h.current.adapter, path: h.current.dirname }, + }), S.on("upload-progress", (j, w) => { + const T = Math.floor(w.bytesUploaded / w.bytesTotal * 100); + M.value[U(j.id)].percent = `${T}%`; + }), S.on("upload-success", (j) => { + const w = M.value[U(j.id)]; + w.status = i.DONE, w.statusName = t("Done"); + }), S.on("upload-error", (j, w) => { + const T = M.value[U(j.id)]; + T.percent = null, T.status = i.ERROR, w.isNetworkError ? T.statusName = t("Network Error, Unable establish connection to the server or interrupted.") : T.statusName = w ? w.message : t("Unknown Error"); + }), S.on("error", (j) => { + N.value = j.message, D.value = !1, o.emit("vf-fetch", { + params: { q: "index", adapter: v.current.adapter, path: v.current.dirname }, noCloseModal: !0 }); - }), z.on("complete", () => { - M.value = !1, s.emit("vf-fetch", { - params: { q: "index", adapter: h.current.adapter, path: h.current.dirname }, + }), S.on("complete", () => { + D.value = !1, o.emit("vf-fetch", { + params: { q: "index", adapter: v.current.adapter, path: v.current.dirname }, noCloseModal: !0 }); - }), B.value.addEventListener("click", () => { - y.value.click(); - }), O.value.addEventListener("click", () => { - w.value.click(); - }), D.value.addEventListener("dragover", (x) => { - x.preventDefault(), j.value = !0; - }), D.value.addEventListener("dragleave", (x) => { - x.preventDefault(), j.value = !1; + }), C.value.addEventListener("click", () => { + E.value.click(); + }), y.value.addEventListener("click", () => { + $.value.click(); + }), A.value.addEventListener("dragover", (j) => { + j.preventDefault(), L.value = !0; + }), A.value.addEventListener("dragleave", (j) => { + j.preventDefault(), L.value = !1; }); - function b(x, $) { - $.isFile && $.file((L) => x($, L)), $.isDirectory && $.createReader().readEntries((L) => { - L.forEach((q) => { - b(x, q); + function x(j, w) { + w.isFile && w.file((T) => j(w, T)), w.isDirectory && w.createReader().readEntries((T) => { + T.forEach((W) => { + x(j, W); }); }); } - D.value.addEventListener("drop", (x) => { - x.preventDefault(), j.value = !1; - const $ = /^[/\\](.+)/; - [...x.dataTransfer.items].forEach((L) => { - L.kind === "file" && b((q, ke) => { - const Fe = $.exec(q.fullPath); - A(ke, Fe[1]); - }, L.webkitGetAsEntry()); + A.value.addEventListener("drop", (j) => { + j.preventDefault(), L.value = !1; + const w = /^[/\\](.+)/; + [...j.dataTransfer.items].forEach((T) => { + T.kind === "file" && x((W, ge) => { + const Ne = w.exec(W.fullPath); + V(ge, Ne[1]); + }, T.webkitGetAsEntry()); }); }); - const _ = ({ target: x }) => { - const $ = x.files; - for (const L of $) - A(L); + const _ = ({ target: j }) => { + const w = j.files; + for (const T of w) + V(T); + j.value = ""; }; - y.value.addEventListener("change", _), w.value.addEventListener("change", _); + E.value.addEventListener("change", _), $.value.addEventListener("change", _); }), Oe(() => { - z == null || z.close({ reason: "unmount" }); - }), (b, _) => (r(), N(W, null, { - buttons: E(() => [ + S == null || S.close({ reason: "unmount" }); + }), (k, x) => (r(), B(Q, null, { + buttons: z(() => [ e("button", { type: "button", - class: T(["vf-btn vf-btn-primary", M.value ? "bg-blue-200 hover:bg-blue-200 dark:bg-gray-700/50 dark:hover:bg-gray-700/50 dark:text-gray-500" : "bg-blue-600 hover:bg-blue-700 dark:bg-gray-700 dark:hover:bg-gray-500"]), - disabled: M.value, - onClick: Z(ie, ["prevent"]) - }, u(a(o)("Upload")), 11, tr), - M.value ? (r(), v("button", { + class: R(["vf-btn vf-btn-primary", D.value ? "bg-blue-200 hover:bg-blue-200 dark:bg-gray-700/50 dark:hover:bg-gray-700/50 dark:text-gray-500" : "bg-blue-600 hover:bg-blue-700 dark:bg-gray-700 dark:hover:bg-gray-500"]), + disabled: D.value, + onClick: oe(ee, ["prevent"]) + }, c(a(t)("Upload")), 11, sn), + D.value ? (r(), u("button", { key: 0, type: "button", class: "vf-btn vf-btn-secondary", - onClick: Z(de, ["prevent"]) - }, u(a(o)("Cancel")), 1)) : (r(), v("button", { + onClick: oe(ae, ["prevent"]) + }, c(a(t)("Cancel")), 1)) : (r(), u("button", { key: 1, type: "button", class: "vf-btn vf-btn-secondary", - onClick: Z(C, ["prevent"]) - }, u(a(o)("Close")), 1)) + onClick: oe(fe, ["prevent"]) + }, c(a(t)("Close")), 1)) ]), - default: E(() => [ - e("div", Bn, [ - An, - e("div", Ln, [ - e("h3", Nn, u(a(o)("Upload Files")), 1), - e("div", Un, [ + default: z(() => [ + e("div", Nr, [ + Vr, + e("div", Tr, [ + e("h3", Br, c(a(t)("Upload Files")), 1), + e("div", Hr, [ e("div", { ref_key: "dropArea", - ref: D, + ref: A, class: "flex items-center justify-center text-lg mb-4 text-gray-500 border-2 border-gray-300 rounded border-dashed select-none cursor-pointer dark:border-gray-600 h-[120px]", - onClick: te + onClick: se }, [ - j.value ? (r(), v("div", Tn, u(a(o)("Release to drop these files.")), 1)) : (r(), v("div", Hn, u(a(o)("Drag and drop the files/folders to here or click here.")), 1)) + L.value ? (r(), u("div", Ur, c(a(t)("Release to drop these files.")), 1)) : (r(), u("div", qr, c(a(t)("Drag and drop the files/folders to here or click here.")), 1)) ], 512), e("div", { ref_key: "container", - ref: f, + ref: h, class: "text-gray-500 mb-1" }, [ e("button", { ref_key: "pickFiles", - ref: B, + ref: C, type: "button", class: "vf-btn vf-btn-secondary" - }, u(a(o)("Select Files")), 513), + }, c(a(t)("Select Files")), 513), e("button", { ref_key: "pickFolders", - ref: O, + ref: y, type: "button", class: "vf-btn vf-btn-secondary" - }, u(a(o)("Select Folders")), 513), + }, c(a(t)("Select Folders")), 513), e("button", { type: "button", class: "vf-btn vf-btn-secondary", - disabled: M.value, - onClick: _[0] || (_[0] = (x) => ce(!1)) - }, u(a(o)("Clear all")), 9, In), + disabled: D.value, + onClick: x[0] || (x[0] = (_) => ie(!1)) + }, c(a(t)("Clear all")), 9, Rr), e("button", { type: "button", class: "vf-btn vf-btn-secondary", - disabled: M.value, - onClick: _[1] || (_[1] = (x) => ce(!0)) - }, u(a(o)("Clear only successful")), 9, qn) + disabled: D.value, + onClick: x[1] || (x[1] = (_) => ie(!0)) + }, c(a(t)("Clear only successful")), 9, Ir) ], 512), - e("div", Rn, [ - (r(!0), v(H, null, J(S.value, (x) => (r(), v("div", { + e("div", Pr, [ + (r(!0), u(I, null, K(M.value, (_) => (r(), u("div", { class: "flex hover:bg-gray-100 dark:hover:bg-gray-800 dark:hover:text-gray-300", - key: x.id + key: _.id }, [ - e("span", Pn, [ + e("span", Wr, [ e("span", { - class: T(["text-base m-auto", ee(x)]), - textContent: u(G(x)) - }, null, 10, Gn) + class: R(["text-base m-auto", F(_)]), + textContent: c(Z(_)) + }, null, 10, Gr) ]), - e("div", Yn, [ - e("div", Jn, u(a(we)(x.name, 40)) + " (" + u(x.size) + ")", 1), - e("div", Kn, u(a(we)(x.name, 16)) + " (" + u(x.size) + ")", 1), + e("div", Yr, [ + e("div", Kr, c(a(we)(_.name, 40)) + " (" + c(_.size) + ")", 1), + e("div", Jr, c(a(we)(_.name, 16)) + " (" + c(_.size) + ")", 1), e("div", { - class: T(["flex break-all text-left", ee(x)]) + class: R(["flex break-all text-left", F(_)]) }, [ - U(u(x.statusName) + " ", 1), - x.status === d.value.QUEUE_ENTRY_STATUS.UPLOADING ? (r(), v("b", Wn, u(x.percent), 1)) : V("", !0) + H(c(_.statusName) + " ", 1), + _.status === m.value.QUEUE_ENTRY_STATUS.UPLOADING ? (r(), u("b", Xr, c(_.percent), 1)) : O("", !0) ], 2) ]), e("button", { type: "button", - class: T(["rounded w-5 h-5 border-1 text-base leading-none font-medium focus:outline-none dark:border-gray-200 dark:text-gray-400 dark:hover:text-gray-200 dark:bg-gray-600 ml-auto sm:text-xs hover:text-red-600", M.value ? "disabled:bg-gray-100 text-white text-opacity-50" : "bg-gray-100"]), - title: a(o)("Delete"), - disabled: M.value, - onClick: ($) => ne(x) - }, Zn, 10, Xn) + class: R(["rounded w-5 h-5 border-1 text-base leading-none font-medium focus:outline-none dark:border-gray-200 dark:text-gray-400 dark:hover:text-gray-200 dark:bg-gray-600 ml-auto sm:text-xs hover:text-red-600", D.value ? "disabled:bg-gray-100 text-white text-opacity-50" : "bg-gray-100"]), + title: a(t)("Delete"), + disabled: D.value, + onClick: (j) => J(_) + }, en, 10, Qr) ]))), 128)), - S.value.length ? V("", !0) : (r(), v("div", er, u(a(o)("No files selected!")), 1)) + M.value.length ? O("", !0) : (r(), u("div", tn, c(a(t)("No files selected!")), 1)) ]), - F.value.length ? (r(), N(Q, { + N.value.length ? (r(), B(te, { key: 0, - onHidden: _[2] || (_[2] = (x) => F.value = ""), + onHidden: x[2] || (x[2] = (_) => N.value = ""), error: "" }, { - default: E(() => [ - U(u(F.value), 1) + default: z(() => [ + H(c(N.value), 1) ]), _: 1 - })) : V("", !0) + })) : O("", !0) ]) ]) ]), e("input", { ref_key: "internalFileInput", - ref: y, + ref: E, type: "file", multiple: "", class: "hidden" }, null, 512), e("input", { ref_key: "internalFolderInput", - ref: w, + ref: $, type: "file", multiple: "", webkitdirectory: "", @@ -2648,7 +2825,7 @@ const zs = /* @__PURE__ */ e("iframe", { _: 1 })); } -}), ar = { class: "sm:flex sm:items-start" }, nr = /* @__PURE__ */ e("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [ +}), rn = { class: "sm:flex sm:items-start" }, nn = /* @__PURE__ */ e("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [ /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100", @@ -2663,13 +2840,13 @@ const zs = /* @__PURE__ */ e("iframe", { d: "M20.25 7.5l-.625 10.632a2.25 2.25 0 01-2.247 2.118H6.622a2.25 2.25 0 01-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.125z" }) ]) -], -1), rr = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, lr = { +], -1), ln = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, dn = { class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400", id: "modal-title" -}, ir = { class: "mt-2" }, dr = { +}, cn = { class: "mt-2" }, un = { class: "text-gray-500 text-sm mb-1 overflow-auto vf-scrollbar", style: { "max-height": "200px" } -}, cr = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, ur = { +}, mn = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, vn = { key: 0, xmlns: "http://www.w3.org/2000/svg", class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500", @@ -2677,13 +2854,13 @@ const zs = /* @__PURE__ */ e("iframe", { viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, mr = /* @__PURE__ */ e("path", { +}, pn = /* @__PURE__ */ e("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), vr = [ - mr -], pr = { +}, null, -1), hn = [ + pn +], fn = { key: 1, xmlns: "http://www.w3.org/2000/svg", class: "h-5 w-5 text-neutral-500", @@ -2691,83 +2868,86 @@ const zs = /* @__PURE__ */ e("iframe", { viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, hr = /* @__PURE__ */ e("path", { +}, gn = /* @__PURE__ */ e("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), fr = [ - hr -], gr = { class: "ml-1.5" }, kr = ["placeholder"], _r = { +}, null, -1), kn = [ + gn +], bn = { class: "ml-1.5" }, _n = ["placeholder"], yn = { name: "VFModalArchive" -}, xr = /* @__PURE__ */ Object.assign(_r, { +}, xn = /* @__PURE__ */ Object.assign(yn, { props: { selection: Object, current: Object }, - setup(l) { - const t = k("emitter"); - k("storage"); - const s = k("adapter"), { t: o } = k("i18n"), i = l, m = g(""), n = g(""), h = g(i.selection.items), p = () => { - h.value.length && t.emit("vf-fetch", { + setup(n) { + const s = g("emitter"); + g("storage"); + const o = g("adapter"), { t } = g("i18n"), l = n, p = b(""), d = b(""), v = b(l.selection.items), f = () => { + v.value.length && s.emit("vf-fetch", { params: { q: "archive", - adapter: s.value, - path: i.current.dirname, - items: JSON.stringify(h.value.map(({ path: c, type: d }) => ({ path: c, type: d }))), - name: m.value + m: "post", + adapter: o.value, + path: l.current.dirname + }, + body: { + items: v.value.map(({ path: i, type: m }) => ({ path: i, type: m })), + name: p.value }, onSuccess: () => { - t.emit("vf-toast-push", { label: o("The file(s) archived.") }); + s.emit("vf-toast-push", { label: t("The file(s) archived.") }); }, - onError: (c) => { - n.value = o(c.message); + onError: (i) => { + d.value = t(i.message); } }); }; - return (c, d) => (r(), N(W, null, { - buttons: E(() => [ + return (i, m) => (r(), B(Q, null, { + buttons: z(() => [ e("button", { type: "button", - onClick: p, + onClick: f, class: "vf-btn vf-btn-primary" - }, u(a(o)("Archive")), 1), + }, c(a(t)("Archive")), 1), e("button", { type: "button", - onClick: d[2] || (d[2] = (f) => a(t).emit("vf-modal-close")), + onClick: m[2] || (m[2] = (h) => a(s).emit("vf-modal-close")), class: "vf-btn vf-btn-secondary" - }, u(a(o)("Cancel")), 1) + }, c(a(t)("Cancel")), 1) ]), - default: E(() => [ - e("div", ar, [ - nr, - e("div", rr, [ - e("h3", lr, u(a(o)("Archive the files")), 1), - e("div", ir, [ - e("div", dr, [ - (r(!0), v(H, null, J(h.value, (f) => (r(), v("p", cr, [ - f.type == "dir" ? (r(), v("svg", ur, vr)) : (r(), v("svg", pr, fr)), - e("span", gr, u(f.basename), 1) + default: z(() => [ + e("div", rn, [ + nn, + e("div", ln, [ + e("h3", dn, c(a(t)("Archive the files")), 1), + e("div", cn, [ + e("div", un, [ + (r(!0), u(I, null, K(v.value, (h) => (r(), u("p", mn, [ + h.type == "dir" ? (r(), u("svg", vn, hn)) : (r(), u("svg", fn, kn)), + e("span", bn, c(h.basename), 1) ]))), 256)) ]), - R(e("input", { - "onUpdate:modelValue": d[0] || (d[0] = (f) => m.value = f), - onKeyup: se(p, ["enter"]), + Y(e("input", { + "onUpdate:modelValue": m[0] || (m[0] = (h) => p.value = h), + onKeyup: ne(f, ["enter"]), class: "my-1 px-2 py-1 border rounded dark:bg-gray-700/25 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:text-gray-100 w-full", - placeholder: a(o)("Archive name. (.zip file will be created)"), + placeholder: a(t)("Archive name. (.zip file will be created)"), type: "text" - }, null, 40, kr), [ - [ae, m.value] + }, null, 40, _n), [ + [le, p.value] ]), - n.value.length ? (r(), N(Q, { + d.value.length ? (r(), B(te, { key: 0, - onHidden: d[1] || (d[1] = (f) => n.value = ""), + onHidden: m[1] || (m[1] = (h) => d.value = ""), error: "" }, { - default: E(() => [ - U(u(n.value), 1) + default: z(() => [ + H(c(d.value), 1) ]), _: 1 - })) : V("", !0) + })) : O("", !0) ]) ]) ]) @@ -2775,7 +2955,7 @@ const zs = /* @__PURE__ */ e("iframe", { _: 1 })); } -}), br = { class: "sm:flex sm:items-start" }, wr = /* @__PURE__ */ e("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [ +}), wn = { class: "sm:flex sm:items-start" }, $n = /* @__PURE__ */ e("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [ /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100", @@ -2790,10 +2970,10 @@ const zs = /* @__PURE__ */ e("iframe", { d: "M20.25 7.5l-.625 10.632a2.25 2.25 0 01-2.247 2.118H6.622a2.25 2.25 0 01-2.247-2.118L3.75 7.5m6 4.125l2.25 2.25m0 0l2.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.125z" }) ]) -], -1), yr = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, $r = { +], -1), Cn = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Mn = { class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400", id: "modal-title" -}, Cr = { class: "mt-2" }, Mr = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, jr = { +}, jn = { class: "mt-2" }, En = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, Sn = { key: 0, xmlns: "http://www.w3.org/2000/svg", class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500", @@ -2801,13 +2981,13 @@ const zs = /* @__PURE__ */ e("iframe", { viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, Sr = /* @__PURE__ */ e("path", { +}, Dn = /* @__PURE__ */ e("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), Dr = [ - Sr -], Or = { +}, null, -1), On = [ + Dn +], An = { key: 1, xmlns: "http://www.w3.org/2000/svg", class: "h-5 w-5 text-neutral-500", @@ -2815,74 +2995,77 @@ const zs = /* @__PURE__ */ e("iframe", { viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, zr = /* @__PURE__ */ e("path", { +}, Ln = /* @__PURE__ */ e("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), Er = [ - zr -], Fr = { class: "ml-1.5" }, Vr = { class: "my-1 text-sm text-gray-500" }, Br = { +}, null, -1), zn = [ + Ln +], Fn = { class: "ml-1.5" }, Nn = { class: "my-1 text-sm text-gray-500" }, Vn = { name: "VFModalUnarchive" -}, Ar = /* @__PURE__ */ Object.assign(Br, { +}, Tn = /* @__PURE__ */ Object.assign(Vn, { props: { selection: Object, current: Object }, - setup(l) { - const t = k("emitter"); - k("storage"); - const s = k("adapter"), { t: o } = k("i18n"), i = l; - g(""); - const m = g(i.selection.items[0]), n = g(""), h = g([]), p = () => { - t.emit("vf-fetch", { + setup(n) { + const s = g("emitter"); + g("storage"); + const o = g("adapter"), { t } = g("i18n"), l = n; + b(""); + const p = b(l.selection.items[0]), d = b(""), v = b([]), f = () => { + s.emit("vf-fetch", { params: { q: "unarchive", - adapter: s.value, - path: i.current.dirname, - item: m.value.path + m: "post", + adapter: o.value, + path: l.current.dirname + }, + body: { + item: p.value.path }, onSuccess: () => { - t.emit("vf-toast-push", { label: o("The file unarchived.") }); + s.emit("vf-toast-push", { label: t("The file unarchived.") }); }, - onError: (c) => { - n.value = o(c.message); + onError: (i) => { + d.value = t(i.message); } }); }; - return (c, d) => (r(), N(W, null, { - buttons: E(() => [ + return (i, m) => (r(), B(Q, null, { + buttons: z(() => [ e("button", { type: "button", - onClick: p, + onClick: f, class: "vf-btn vf-btn-primary" - }, u(a(o)("Unarchive")), 1), + }, c(a(t)("Unarchive")), 1), e("button", { type: "button", - onClick: d[1] || (d[1] = (f) => a(t).emit("vf-modal-close")), + onClick: m[1] || (m[1] = (h) => a(s).emit("vf-modal-close")), class: "vf-btn vf-btn-secondary" - }, u(a(o)("Cancel")), 1) + }, c(a(t)("Cancel")), 1) ]), - default: E(() => [ - e("div", br, [ - wr, - e("div", yr, [ - e("h3", $r, u(a(o)("Unarchive")), 1), - e("div", Cr, [ - (r(!0), v(H, null, J(h.value, (f) => (r(), v("p", Mr, [ - f.type == "dir" ? (r(), v("svg", jr, Dr)) : (r(), v("svg", Or, Er)), - e("span", Fr, u(f.basename), 1) + default: z(() => [ + e("div", wn, [ + $n, + e("div", Cn, [ + e("h3", Mn, c(a(t)("Unarchive")), 1), + e("div", jn, [ + (r(!0), u(I, null, K(v.value, (h) => (r(), u("p", En, [ + h.type == "dir" ? (r(), u("svg", Sn, On)) : (r(), u("svg", An, zn)), + e("span", Fn, c(h.basename), 1) ]))), 256)), - e("p", Vr, u(a(o)("The archive will be unarchived at")) + " (" + u(l.current.dirname) + ")", 1), - n.value.length ? (r(), N(Q, { + e("p", Nn, c(a(t)("The archive will be unarchived at")) + " (" + c(n.current.dirname) + ")", 1), + d.value.length ? (r(), B(te, { key: 0, - onHidden: d[0] || (d[0] = (f) => n.value = ""), + onHidden: m[0] || (m[0] = (h) => d.value = ""), error: "" }, { - default: E(() => [ - U(u(n.value), 1) + default: z(() => [ + H(c(d.value), 1) ]), _: 1 - })) : V("", !0) + })) : O("", !0) ]) ]) ]) @@ -2890,7 +3073,7 @@ const zs = /* @__PURE__ */ e("iframe", { _: 1 })); } -}), Lr = { class: "sm:flex sm:items-start" }, Nr = /* @__PURE__ */ e("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [ +}), Bn = { class: "sm:flex sm:items-start" }, Hn = /* @__PURE__ */ e("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [ /* @__PURE__ */ e("svg", { class: "h-6 w-6 stroke-red-600 dark:stroke-red-200", xmlns: "http://www.w3.org/2000/svg", @@ -2906,10 +3089,10 @@ const zs = /* @__PURE__ */ e("iframe", { 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 3z" }) ]) -], -1), Ur = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Tr = { +], -1), Un = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, qn = { class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400", id: "modal-title" -}, Hr = { class: "mt-2" }, Ir = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, qr = { +}, Rn = { class: "mt-2" }, In = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, Pn = { key: 0, xmlns: "http://www.w3.org/2000/svg", class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500", @@ -2917,13 +3100,13 @@ const zs = /* @__PURE__ */ e("iframe", { viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, Rr = /* @__PURE__ */ e("path", { +}, Wn = /* @__PURE__ */ e("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), Pr = [ - Rr -], Gr = { +}, null, -1), Gn = [ + Wn +], Yn = { key: 1, xmlns: "http://www.w3.org/2000/svg", class: "h-5 w-5 text-neutral-500", @@ -2931,13 +3114,13 @@ const zs = /* @__PURE__ */ e("iframe", { viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, Yr = /* @__PURE__ */ e("path", { +}, Kn = /* @__PURE__ */ e("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), Jr = [ - Yr -], Kr = { class: "ml-1.5" }, Wr = { class: "text-sm text-gray-500 pb-1 pt-3" }, Xr = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, Qr = /* @__PURE__ */ e("svg", { +}, null, -1), Jn = [ + Kn +], Xn = { class: "ml-1.5" }, Qn = { class: "text-sm text-gray-500 pb-1 pt-3" }, Zn = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, el = /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500", fill: "none", @@ -2950,71 +3133,74 @@ const zs = /* @__PURE__ */ e("iframe", { "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), Zr = { class: "ml-1.5 overflow-auto" }, el = { +], -1), tl = { class: "ml-1.5 overflow-auto" }, sl = { name: "VFModalMove" -}, tl = /* @__PURE__ */ Object.assign(el, { +}, ol = /* @__PURE__ */ Object.assign(sl, { props: { selection: Object, current: Object }, - setup(l) { - const t = k("emitter"), { t: s } = k("i18n"); - k("storage"); - const o = k("adapter"), i = l, m = g(i.selection.items.from), n = g(""), h = () => { - m.value.length && t.emit("vf-fetch", { + setup(n) { + const s = g("emitter"), { t: o } = g("i18n"); + g("storage"); + const t = g("adapter"), l = n, p = b(l.selection.items.from), d = b(""), v = () => { + p.value.length && s.emit("vf-fetch", { params: { q: "move", - adapter: o.value, - path: i.current.dirname, - items: JSON.stringify(m.value.map(({ path: p, type: c }) => ({ path: p, type: c }))), - item: i.selection.items.to.path + m: "post", + adapter: t.value, + path: l.current.dirname + }, + body: { + items: p.value.map(({ path: f, type: i }) => ({ path: f, type: i })), + item: l.selection.items.to.path }, onSuccess: () => { - t.emit("vf-toast-push", { label: s("Files moved.", i.selection.items.to.name) }); + s.emit("vf-toast-push", { label: o("Files moved.", l.selection.items.to.name) }); }, - onError: (p) => { - n.value = s(p.message); + onError: (f) => { + d.value = o(f.message); } }); }; - return (p, c) => (r(), N(W, null, { - buttons: E(() => [ + return (f, i) => (r(), B(Q, null, { + buttons: z(() => [ e("button", { type: "button", - onClick: h, + onClick: v, class: "vf-btn vf-btn-primary" - }, u(a(s)("Yes, Move!")), 1), + }, c(a(o)("Yes, Move!")), 1), e("button", { type: "button", - onClick: c[1] || (c[1] = (d) => a(t).emit("vf-modal-close")), + onClick: i[1] || (i[1] = (m) => a(s).emit("vf-modal-close")), class: "vf-btn vf-btn-secondary" - }, u(a(s)("Cancel")), 1) + }, c(a(o)("Cancel")), 1) ]), - default: E(() => [ - e("div", Lr, [ - Nr, - e("div", Ur, [ - e("h3", Tr, u(a(s)("Move files")), 1), - e("div", Hr, [ - (r(!0), v(H, null, J(m.value, (d) => (r(), v("p", Ir, [ - d.type == "dir" ? (r(), v("svg", qr, Pr)) : (r(), v("svg", Gr, Jr)), - e("span", Kr, u(d.path), 1) + default: z(() => [ + e("div", Bn, [ + Hn, + e("div", Un, [ + e("h3", qn, c(a(o)("Move files")), 1), + e("div", Rn, [ + (r(!0), u(I, null, K(p.value, (m) => (r(), u("p", In, [ + m.type == "dir" ? (r(), u("svg", Pn, Gn)) : (r(), u("svg", Yn, Jn)), + e("span", Xn, c(m.path), 1) ]))), 256)), - e("p", Wr, u(a(s)("Are you sure you want to move these files?")), 1), - e("p", Xr, [ - Qr, - e("span", Zr, u(l.selection.items.to.path), 1) + e("p", Qn, c(a(o)("Are you sure you want to move these files?")), 1), + e("p", Zn, [ + el, + e("span", tl, c(n.selection.items.to.path), 1) ]), - n.value.length ? (r(), N(Q, { + d.value.length ? (r(), B(te, { key: 0, - onHidden: c[0] || (c[0] = (d) => n.value = ""), + onHidden: i[0] || (i[0] = (m) => d.value = ""), error: "" }, { - default: E(() => [ - U(u(n.value), 1) + default: z(() => [ + H(c(d.value), 1) ]), _: 1 - })) : V("", !0) + })) : O("", !0) ]) ]) ]) @@ -3022,40 +3208,41 @@ const zs = /* @__PURE__ */ e("iframe", { _: 1 })); } -}), ol = (l, t) => { - const s = l.__vccOpts || l; - for (const [o, i] of t) - s[o] = i; - return s; -}, sl = { +}), al = (n, s) => { + const o = n.__vccOpts || n; + for (const [t, l] of s) + o[t] = l; + return o; +}, rl = { props: { on: { type: String, required: !0 } }, - setup(l, { emit: t, slots: s }) { - const o = k("emitter"), i = g(!1); - let m = null; - const n = () => { - clearTimeout(m), i.value = !0, m = setTimeout(() => { - i.value = !1; + setup(n, { emit: s, slots: o }) { + const t = g("emitter"), l = b(!1), { t: p } = g("i18n"); + let d = null; + const v = () => { + clearTimeout(d), l.value = !0, d = setTimeout(() => { + l.value = !1; }, 2e3); }; - return K(() => { - o.on(l.on, n); - }), Te(() => { - clearTimeout(m); + return X(() => { + t.on(n.on, v); + }), qe(() => { + clearTimeout(d); }), { - shown: i + shown: l, + t: p }; } -}, al = { key: 1 }; -function nl(l, t, s, o, i, m) { - return r(), v("div", { - class: T(["text-sm text-green-600 dark:text-green-600 transition-opacity duration-500 ease-out", [{ "opacity-0": !o.shown }]]) +}, nl = { key: 1 }; +function ll(n, s, o, t, l, p) { + return r(), u("div", { + class: R(["text-sm text-green-600 dark:text-green-600 transition-opacity duration-500 ease-out", [{ "opacity-0": !t.shown }]]) }, [ - l.$slots.default ? pe(l.$slots, "default", { key: 0 }) : (r(), v("span", al, "Saved.")) + n.$slots.default ? pe(n.$slots, "default", { key: 0 }) : (r(), u("span", nl, c(t.t("Saved.")), 1)) ], 2); } -const Se = /* @__PURE__ */ ol(sl, [["render", nl]]), rl = "1.3.3", ll = { class: "sm:flex sm:items-start" }, il = /* @__PURE__ */ e("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [ +const _e = /* @__PURE__ */ al(rl, [["render", ll]]), il = "2.0.0", dl = { class: "sm:flex sm:items-start" }, cl = /* @__PURE__ */ e("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [ /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100", @@ -3075,77 +3262,92 @@ const Se = /* @__PURE__ */ ol(sl, [["render", nl]]), rl = "1.3.3", ll = { class: d: "M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" }) ]) -], -1), dl = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, cl = { +], -1), ul = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, ml = { class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400", id: "modal-title" -}, ul = { class: "mt-2" }, ml = { class: "text-sm text-gray-500" }, vl = { class: "text-sm font-semibold mt-5 text-gray-900 dark:text-gray-400 tracking-wider" }, pl = { class: "mt-3 text-left" }, hl = { class: "space-y-2" }, fl = { class: "flex relative gap-x-3" }, gl = { class: "h-6 items-center" }, kl = { class: "flex-1 block text-sm" }, _l = { +}, vl = { class: "mt-2" }, pl = { class: "text-sm text-gray-500" }, hl = { class: "text-sm font-semibold mt-5 text-gray-900 dark:text-gray-400 tracking-wider" }, fl = { class: "mt-3 text-left" }, gl = { class: "space-y-2" }, kl = { class: "flex relative gap-x-3" }, bl = { class: "h-6 items-center" }, _l = { class: "flex-1 block text-sm" }, yl = { for: "dark_mode", class: "flex w-full font-medium text-gray-900 dark:text-gray-400" -}, xl = { class: "flex relative gap-x-3" }, bl = { class: "h-6 items-center" }, wl = { class: "flex-1 block text-sm" }, yl = { +}, xl = { class: "flex relative gap-x-3" }, wl = { class: "h-6 items-center" }, $l = { class: "flex-1 block text-sm" }, Cl = { for: "metric_unit", class: "flex w-full font-medium text-gray-900 dark:text-gray-400" -}, $l = { +}, Ml = { + key: 0, + class: "flex relative gap-x-3" +}, jl = { class: "h-6 items-center" }, El = { class: "flex w-full font-medium text-gray-900 dark:text-gray-400 text-sm" }, Sl = { class: "flex text-sm" }, Dl = ["label"], Ol = ["value"], Al = { name: "VFModalAbout" -}, Cl = /* @__PURE__ */ Object.assign($l, { +}, Ll = /* @__PURE__ */ Object.assign(Al, { props: { selection: Object, current: Object }, - setup(l) { - const t = k("emitter"), { getStore: s, clearStore: o } = k("storage"); - k("adapter"); - const { t: i } = k("i18n"); - g(""), g(""); - const m = k("darkMode"), n = async () => { - o(), location.reload(); - }, h = () => { - t.emit("vf-darkMode-toggle"), t.emit("vf-darkMode-saved"); - }, p = k("metricUnits"), c = () => { - t.emit("vf-metric-units-saved", !p.value); + setup(n) { + const s = g("emitter"), { getStore: o, clearStore: t } = g("storage"); + g("adapter"); + const { t: l, changeLocale: p, locale: d } = g("i18n"), v = g("features"); + b(""), b(""); + const f = g("darkMode"), i = async () => { + t(), location.reload(); + }, m = () => { + s.emit("vf-darkMode-toggle"), s.emit("vf-darkMode-saved"); + }, h = g("metricUnits"), E = () => { + s.emit("vf-metric-units-saved", !h.value); + }, $ = { + 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 (繁體中文)" }; - return (d, f) => (r(), N(W, null, { - buttons: E(() => [ + return (C, y) => (r(), B(Q, null, { + buttons: z(() => [ e("button", { type: "button", - onClick: f[2] || (f[2] = (y) => a(t).emit("vf-modal-close")), + onClick: y[4] || (y[4] = (A) => a(s).emit("vf-modal-close")), class: "vf-btn vf-btn-secondary" - }, u(a(i)("Close")), 1) + }, c(a(l)("Close")), 1) ]), - default: E(() => [ - e("div", ll, [ - il, - e("div", dl, [ - e("h3", cl, u(a(i)("About %s", "Vuefinder " + a(rl))), 1), - e("div", ul, [ - e("p", ml, u(a(i)("Vuefinder is a file manager component for vue 3.")), 1), + default: z(() => [ + e("div", dl, [ + cl, + e("div", ul, [ + e("h3", ml, c(a(l)("About %s", "Vuefinder " + a(il))), 1), + e("div", vl, [ + e("p", pl, c(a(l)("Vuefinder is a file manager component for vue 3.")), 1), e("div", null, [ - e("h3", vl, u(a(i)("Settings")), 1) + e("h3", hl, c(a(l)("Settings")), 1) ]), - e("div", pl, [ + e("div", fl, [ e("fieldset", null, [ - e("div", hl, [ - e("div", fl, [ - e("div", gl, [ - R(e("input", { + e("div", gl, [ + e("div", kl, [ + e("div", bl, [ + Y(e("input", { id: "dark_mode", name: "dark_mode", - "onUpdate:modelValue": f[0] || (f[0] = (y) => re(m) ? m.value = y : null), + "onUpdate:modelValue": y[0] || (y[0] = (A) => de(f) ? f.value = A : null), type: "checkbox", - onClick: h, + onClick: m, class: "h-4 w-4 rounded border-gray-300 text-indigo-600 dark:accent-slate-400 focus:ring-indigo-600" }, null, 512), [ - [$e, a(m)] + [je, a(f)] ]) ]), - e("div", kl, [ - e("label", _l, [ - U(u(a(i)("Dark Mode")) + " ", 1), - P(Se, { + e("div", _l, [ + e("label", yl, [ + H(c(a(l)("Dark Mode")) + " ", 1), + P(_e, { class: "ms-3", on: "vf-darkMode-saved" }, { - default: E(() => [ - U(u(a(i)("Saved.")), 1) + default: z(() => [ + H(c(a(l)("Saved.")), 1) ]), _: 1 }) @@ -3153,38 +3355,68 @@ const Se = /* @__PURE__ */ ol(sl, [["render", nl]]), rl = "1.3.3", ll = { class: ]) ]), e("div", xl, [ - e("div", bl, [ - R(e("input", { + e("div", wl, [ + Y(e("input", { id: "metric_unit", name: "metric_unit", type: "checkbox", - "onUpdate:modelValue": f[1] || (f[1] = (y) => re(p) ? p.value = y : null), - onClick: c, + "onUpdate:modelValue": y[1] || (y[1] = (A) => de(h) ? h.value = A : null), + onClick: E, class: "h-4 w-4 rounded border-gray-300 text-indigo-600 dark:accent-slate-400 focus:ring-indigo-600" }, null, 512), [ - [$e, a(p)] + [je, a(h)] ]) ]), - e("div", wl, [ - e("label", yl, [ - U(u(a(i)("Use Metric Units")) + " ", 1), - P(Se, { + e("div", $l, [ + e("label", Cl, [ + H(c(a(l)("Use Metric Units")) + " ", 1), + P(_e, { class: "ms-3", on: "vf-metric-units-saved" }, { - default: E(() => [ - U(u(a(i)("Saved.")), 1) + default: z(() => [ + H(c(a(l)("Saved.")), 1) ]), _: 1 }) ]) ]) ]), + a(v).includes(a(q).LANGUAGE) ? (r(), u("div", Ml, [ + e("div", jl, [ + e("div", El, c(a(l)("Language")), 1) + ]), + e("div", Sl, [ + Y(e("select", { + "onUpdate:modelValue": y[2] || (y[2] = (A) => de(d) ? d.value = A : null), + onChange: y[3] || (y[3] = (A) => a(p)(A.target.value)), + class: "w-full text-sm text-slate-500 border dark:border-gray-600 dark:text-neutral-50 dark:bg-gray-700 rounded" + }, [ + e("optgroup", { + label: a(l)("Language") + }, [ + (r(), u(I, null, K($, (A, M) => e("option", { value: M }, c(A), 9, Ol)), 64)) + ], 8, Dl) + ], 544), [ + [Ae, a(d)] + ]), + H(), + P(_e, { + class: "ms-3", + on: "vf-language-saved" + }, { + default: z(() => [ + H(c(a(l)("Saved.")), 1) + ]), + _: 1 + }) + ]) + ])) : O("", !0), e("button", { - onClick: n, + onClick: i, type: "button", class: "vf-btn vf-btn-secondary" - }, u(a(i)("Clear Local Storage")), 1) + }, c(a(l)("Clear Local Storage")), 1) ]) ]) ]) @@ -3195,32 +3427,33 @@ const Se = /* @__PURE__ */ ol(sl, [["render", nl]]), rl = "1.3.3", ll = { class: _: 1 })); } -}), Ml = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ +}), zl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, - ModalAbout: Cl, - ModalArchive: xr, - ModalDelete: ra, - ModalMessage: pa, - ModalMove: tl, - ModalNewFile: Ea, - ModalNewFolder: ya, - ModalPreview: _n, - ModalRename: Vn, - ModalUnarchive: Ar, - ModalUpload: sr -}, Symbol.toStringTag, { value: "Module" })), _e = { - VueFinder: Fs, - ...Ml + ModalAbout: Ll, + ModalArchive: xn, + ModalDelete: la, + ModalMessage: ha, + ModalMove: ol, + ModalNewFile: La, + ModalNewFolder: $a, + ModalPreview: _r, + ModalRename: Fr, + ModalUnarchive: Tn, + ModalUpload: an +}, Symbol.toStringTag, { value: "Module" })), ye = { + VueFinder: zo, + ...zl }; -const Al = { - install(l) { - for (const t in _e) - if (_e.hasOwnProperty(t)) { - const s = _e[t]; - l.component(s.name, s); +const Pl = { + /** @param {import('vue').App} app */ + install(n) { + for (const s in ye) + if (ye.hasOwnProperty(s)) { + const o = ye[s]; + n.component(o.name, o); } } }; export { - Al as default + Pl as default }; diff --git a/dist/zhCN-9b524820.js b/dist/zhCN-040643d9.js similarity index 99% rename from dist/zhCN-9b524820.js rename to dist/zhCN-040643d9.js index 0e6215d8..ad886bbf 100644 --- a/dist/zhCN-9b524820.js +++ b/dist/zhCN-040643d9.js @@ -149,7 +149,7 @@ const o = e, t = { "File Name": "文件名称", "Move files": "移动文件", "Are you sure you want to move these files to?": "您确定要移动这些文件吗?", - "Yes, Move!": "确定,复制!", + "Yes, Move!": "确定,移动!", "Delete files": "删除文件", "Yes, Delete!": "确定,删除!", "Upload Files": "上传文件", diff --git a/dist/zhCN-e25e65b3.cjs b/dist/zhCN-44a2ca81.cjs similarity index 99% rename from dist/zhCN-e25e65b3.cjs rename to dist/zhCN-44a2ca81.cjs index e8d4b354..11dd699a 100644 --- a/dist/zhCN-e25e65b3.cjs +++ b/dist/zhCN-44a2ca81.cjs @@ -1 +1 @@ -"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={strings:{},pluralize(){return 0}};e.strings={addBulkFilesFailed:"内部错误导致添加 %{smart_count} 个文件失败",addMore:"添加更多文件",addMoreFiles:"添加更多文件",addingMoreFiles:"添加更多文件",allowAccessDescription:"为了通过您的相机进行拍照或录像,请给网站相机的访问权限",allowAccessTitle:"请允许对相机的访问权限",authenticateWith:"连接到 %{pluginName}",authenticateWithTitle:"请使用 %{pluginName} 进行认证以选择文件",back:"返回",browse:"浏览",browseFiles:"浏览",cancel:"取消",cancelUpload:"取消上传",chooseFiles:"选择文件",closeModal:"关闭窗口",companionError:"和 Companion 连接失败了",companionUnauthorizeHint:"请访问 %{url} 以认证您的 %{provider} 账户",complete:"上传完毕",connectedToInternet:"连接至网络",copyLink:"复制链接",copyLinkToClipboardFallback:"复制以下网址",copyLinkToClipboardSuccess:"链接已复制到剪贴板",creatingAssembly:"正在准备上传…",creatingAssemblyFailed:"Transloadit:无法创建程序集",dashboardTitle:"文件上传工具",dashboardWindowTitle:"文件上传工具窗口(点击离开以关闭)",dataUploadedOfTotal:"%{total} / %{complete}",done:"完成",dropHereOr:"拖拽文件到这里,或%{browse}",dropHint:"拖拽文件到这里",dropPasteBoth:"拖拽文件到这里,或者%{browse}文件",dropPasteFiles:"拖拽文件到这里,或者%{browse}文件",dropPasteFolders:"拖拽文件到这里,或者%{browse}文件",dropPasteImportBoth:"拖拽文件到这里,粘贴、%{browse}或者导入",dropPasteImportFiles:"拖拽文件到这里,粘贴、%{browse}或者导入",dropPasteImportFolders:"拖拽文件到这里,粘贴、%{browse}或者导入",editFile:"编辑文件",editing:"正在编辑 %{file}",emptyFolderAdded:"无法从空文件夹添加文件",encoding:"正在编码…",enterCorrectUrl:"错误链接: 请确认您输入的是文件的链接",enterUrlToImport:"输入链接或者导入文件",exceedsSize:"文件超过了最大尺寸限制 %{size}",failedToFetch:"Companion 无法抓取此链接,请确保它是正确的",failedToUpload:"上传 %{file} 失败",fileSource:"文件源:%{name}",filesUploadedOfTotal:"已上传 %{smart_count} 个文件中的 %{complete} 个",filter:"筛选器",finishEditingFile:"完成文件编辑",folderAdded:"从 %{folder} 添加了 %{smart_count} 个文件",generatingThumbnails:"正在生成缩略图…",import:"导入",importFrom:"从 %{name} 导入",inferiorSize:"文件大小必须超过 %{size}",loading:"正在载入…",logOut:"登出",micDisabled:"麦克风的权限访问被用户拒绝",myDevice:"我的设备",noCameraDescription:"为了拍摄照片或录制视频,请连接一个摄像设备",noCameraTitle:"摄像头不可用",noDuplicates:"无法添加重复文件 %{fileName},该文件已存在",noFilesFound:"这里空空如也",noInternetConnection:"无法连接到网络",noMoreFilesAllowed:"无法添加新文件:已正在上传文件",openFolderNamed:"打开文件夹 %{name}",pause:"暂停",pauseUpload:"暂停上传",paused:"已暂停",poweredBy:"强力驱动于 %{uppy}",processingXFiles:"正在处理 %{smart_count} 个文件",recording:"正在录制",recordingLength:"录制长度 %{recording_length}",recordingStoppedMaxSize:"录像已停止,文件大小即将超过限制",removeFile:"删除文件",resetFilter:"重置筛选器",resume:"恢复",resumeUpload:"恢复上传",retry:"重试",retryUpload:"重试",saveChanges:"保存变更",selectFileNamed:"选择文件 %{name}",selectX:"选择 %{smart_count}",smile:"笑一笑!",startCapturing:"开始屏幕录制",startRecording:"开始视频录制",stopCapturing:"停止屏幕录制",stopRecording:"停止视频录制",streamActive:"视频流已激活",streamPassive:"视频流未激活",submitRecordedFile:"提交已录制视频",takePicture:"拍照",timedOut:"上传已超时 %{seconds} 秒,中止上传",unselectFileNamed:"取消选择文件 %{name}",upload:"上传",uploadComplete:"上传完成",uploadFailed:"上传失败",uploadPaused:"上传暂停",uploadXFiles:"上传 %{smart_count} 个文件",uploadXNewFiles:"新上传了 %{smart_count} 个文件",uploading:"正在上传",uploadingXFiles:"正在上传 %{smart_count} 个文件",xFilesSelected:"%{smart_count} 个文件待上传",xMoreFilesAdded:"又有 %{smart_count} 个文件被添加",xTimeLeft:"剩余 %{time}",youCanOnlyUploadFileTypes:"您只能上传这些文件类型:%{types}",youCanOnlyUploadX:"您只能上传 %{smart_count} 个文件",youHaveToAtLeastSelectX:"您至少要选择 %{smart_count} 个文件"};typeof Uppy<"u"&&(globalThis.Uppy.locales.zh_CN=e);const o=e,t={Language:"语言",Create:"创建",Close:"关闭",Cancel:"取消",Save:"保存",Edit:"编辑",Crop:"裁切","New Folder":"新文件夹","New File":"新文件",Rename:"重命名",Delete:"删除",Upload:"上传",Download:"下载",Archive:"压缩",Unarchive:"解压缩",Open:"打开","Open containing folder":"打开对应的文件夹",Refresh:"刷新",Preview:"预览","Dark Mode":"暗黑模式","Toggle Full Screen":"切换到全屏","Change View":"切换视图",Storage:"存储","Go up a directory":"上一级目录","Search anything..":"搜索..",Name:"名称",Size:"大小",Date:"日期",Filepath:"文件路径",About:"关于","Folder Name":"文件夹名称","File Name":"文件名称","Move files":"移动文件","Are you sure you want to move these files to?":"您确定要移动这些文件吗?","Yes, Move!":"确定,复制!","Delete files":"删除文件","Yes, Delete!":"确定,删除!","Upload Files":"上传文件","No files selected!":"未选择文件!","Select Files":"选择文件","Archive the files":"压缩文件","Unarchive the files":"解压缩文件","The archive will be unarchived at":"此压缩文件将解压到","Archive name. (.zip file will be created)":"压缩包名称。(将创建 .zip 文件)","Vuefinder is a file manager component for vue 3.":"Vuefinder 是 Vue 3 的一个文件管理组件。","Create a new folder":"创建一个新文件夹","Create a new file":"创建一个新文件","Are you sure you want to delete these files?":"您确定要删除这些文件吗?","This action cannot be undone.":"此操作不能撤销。","Search results for":"搜索结果为","item(s) selected.":"个文件 已选择。","%s is renamed.":"%s 已重命名。","This is a readonly storage.":"这是只读存储。","%s is created.":"%s 已创建。","Files moved.":"文件已移动。","Files deleted.":"文件已删除。","The file unarchived.":"文件已解压。","The file(s) archived.":"文件已压缩。","Updated.":"已更新。","No search result found.":"未找到搜索结果。","Are you sure you want to move these files?":"您确定要移动这些文件吗?","File Size":"文件大小","Last Modified":"文件修改时间","Drag&Drop: on":"拖拽: 开","Drag&Drop: off":"拖拽: 关","Select Folders":"选择文件夹","Clear all":"清除全部","Clear only successful":"清除已成功上传的","Drag and drop the files/folders to here or click here.":"拖拽或点击此处上传文件/文件夹。","Release to drop these files.":"放开后添加这些文件。",Canceled:"已取消",Done:"已完成","Network Error, Unable establish connection to the server or interrupted.":"网络错误,无法连接到服务器或连接被意外中断。","Pending upload":"待上传","Please select file to upload first.":"请先选择要上传的文件。","About %s":"关于 %s",Settings:"设置","Use Metric Units":"使用公制单位","Saved.":"已保存。","Clear Local Storage":"清除本地存储",uppy:o};exports.default=t; +"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={strings:{},pluralize(){return 0}};e.strings={addBulkFilesFailed:"内部错误导致添加 %{smart_count} 个文件失败",addMore:"添加更多文件",addMoreFiles:"添加更多文件",addingMoreFiles:"添加更多文件",allowAccessDescription:"为了通过您的相机进行拍照或录像,请给网站相机的访问权限",allowAccessTitle:"请允许对相机的访问权限",authenticateWith:"连接到 %{pluginName}",authenticateWithTitle:"请使用 %{pluginName} 进行认证以选择文件",back:"返回",browse:"浏览",browseFiles:"浏览",cancel:"取消",cancelUpload:"取消上传",chooseFiles:"选择文件",closeModal:"关闭窗口",companionError:"和 Companion 连接失败了",companionUnauthorizeHint:"请访问 %{url} 以认证您的 %{provider} 账户",complete:"上传完毕",connectedToInternet:"连接至网络",copyLink:"复制链接",copyLinkToClipboardFallback:"复制以下网址",copyLinkToClipboardSuccess:"链接已复制到剪贴板",creatingAssembly:"正在准备上传…",creatingAssemblyFailed:"Transloadit:无法创建程序集",dashboardTitle:"文件上传工具",dashboardWindowTitle:"文件上传工具窗口(点击离开以关闭)",dataUploadedOfTotal:"%{total} / %{complete}",done:"完成",dropHereOr:"拖拽文件到这里,或%{browse}",dropHint:"拖拽文件到这里",dropPasteBoth:"拖拽文件到这里,或者%{browse}文件",dropPasteFiles:"拖拽文件到这里,或者%{browse}文件",dropPasteFolders:"拖拽文件到这里,或者%{browse}文件",dropPasteImportBoth:"拖拽文件到这里,粘贴、%{browse}或者导入",dropPasteImportFiles:"拖拽文件到这里,粘贴、%{browse}或者导入",dropPasteImportFolders:"拖拽文件到这里,粘贴、%{browse}或者导入",editFile:"编辑文件",editing:"正在编辑 %{file}",emptyFolderAdded:"无法从空文件夹添加文件",encoding:"正在编码…",enterCorrectUrl:"错误链接: 请确认您输入的是文件的链接",enterUrlToImport:"输入链接或者导入文件",exceedsSize:"文件超过了最大尺寸限制 %{size}",failedToFetch:"Companion 无法抓取此链接,请确保它是正确的",failedToUpload:"上传 %{file} 失败",fileSource:"文件源:%{name}",filesUploadedOfTotal:"已上传 %{smart_count} 个文件中的 %{complete} 个",filter:"筛选器",finishEditingFile:"完成文件编辑",folderAdded:"从 %{folder} 添加了 %{smart_count} 个文件",generatingThumbnails:"正在生成缩略图…",import:"导入",importFrom:"从 %{name} 导入",inferiorSize:"文件大小必须超过 %{size}",loading:"正在载入…",logOut:"登出",micDisabled:"麦克风的权限访问被用户拒绝",myDevice:"我的设备",noCameraDescription:"为了拍摄照片或录制视频,请连接一个摄像设备",noCameraTitle:"摄像头不可用",noDuplicates:"无法添加重复文件 %{fileName},该文件已存在",noFilesFound:"这里空空如也",noInternetConnection:"无法连接到网络",noMoreFilesAllowed:"无法添加新文件:已正在上传文件",openFolderNamed:"打开文件夹 %{name}",pause:"暂停",pauseUpload:"暂停上传",paused:"已暂停",poweredBy:"强力驱动于 %{uppy}",processingXFiles:"正在处理 %{smart_count} 个文件",recording:"正在录制",recordingLength:"录制长度 %{recording_length}",recordingStoppedMaxSize:"录像已停止,文件大小即将超过限制",removeFile:"删除文件",resetFilter:"重置筛选器",resume:"恢复",resumeUpload:"恢复上传",retry:"重试",retryUpload:"重试",saveChanges:"保存变更",selectFileNamed:"选择文件 %{name}",selectX:"选择 %{smart_count}",smile:"笑一笑!",startCapturing:"开始屏幕录制",startRecording:"开始视频录制",stopCapturing:"停止屏幕录制",stopRecording:"停止视频录制",streamActive:"视频流已激活",streamPassive:"视频流未激活",submitRecordedFile:"提交已录制视频",takePicture:"拍照",timedOut:"上传已超时 %{seconds} 秒,中止上传",unselectFileNamed:"取消选择文件 %{name}",upload:"上传",uploadComplete:"上传完成",uploadFailed:"上传失败",uploadPaused:"上传暂停",uploadXFiles:"上传 %{smart_count} 个文件",uploadXNewFiles:"新上传了 %{smart_count} 个文件",uploading:"正在上传",uploadingXFiles:"正在上传 %{smart_count} 个文件",xFilesSelected:"%{smart_count} 个文件待上传",xMoreFilesAdded:"又有 %{smart_count} 个文件被添加",xTimeLeft:"剩余 %{time}",youCanOnlyUploadFileTypes:"您只能上传这些文件类型:%{types}",youCanOnlyUploadX:"您只能上传 %{smart_count} 个文件",youHaveToAtLeastSelectX:"您至少要选择 %{smart_count} 个文件"};typeof Uppy<"u"&&(globalThis.Uppy.locales.zh_CN=e);const o=e,t={Language:"语言",Create:"创建",Close:"关闭",Cancel:"取消",Save:"保存",Edit:"编辑",Crop:"裁切","New Folder":"新文件夹","New File":"新文件",Rename:"重命名",Delete:"删除",Upload:"上传",Download:"下载",Archive:"压缩",Unarchive:"解压缩",Open:"打开","Open containing folder":"打开对应的文件夹",Refresh:"刷新",Preview:"预览","Dark Mode":"暗黑模式","Toggle Full Screen":"切换到全屏","Change View":"切换视图",Storage:"存储","Go up a directory":"上一级目录","Search anything..":"搜索..",Name:"名称",Size:"大小",Date:"日期",Filepath:"文件路径",About:"关于","Folder Name":"文件夹名称","File Name":"文件名称","Move files":"移动文件","Are you sure you want to move these files to?":"您确定要移动这些文件吗?","Yes, Move!":"确定,移动!","Delete files":"删除文件","Yes, Delete!":"确定,删除!","Upload Files":"上传文件","No files selected!":"未选择文件!","Select Files":"选择文件","Archive the files":"压缩文件","Unarchive the files":"解压缩文件","The archive will be unarchived at":"此压缩文件将解压到","Archive name. (.zip file will be created)":"压缩包名称。(将创建 .zip 文件)","Vuefinder is a file manager component for vue 3.":"Vuefinder 是 Vue 3 的一个文件管理组件。","Create a new folder":"创建一个新文件夹","Create a new file":"创建一个新文件","Are you sure you want to delete these files?":"您确定要删除这些文件吗?","This action cannot be undone.":"此操作不能撤销。","Search results for":"搜索结果为","item(s) selected.":"个文件 已选择。","%s is renamed.":"%s 已重命名。","This is a readonly storage.":"这是只读存储。","%s is created.":"%s 已创建。","Files moved.":"文件已移动。","Files deleted.":"文件已删除。","The file unarchived.":"文件已解压。","The file(s) archived.":"文件已压缩。","Updated.":"已更新。","No search result found.":"未找到搜索结果。","Are you sure you want to move these files?":"您确定要移动这些文件吗?","File Size":"文件大小","Last Modified":"文件修改时间","Drag&Drop: on":"拖拽: 开","Drag&Drop: off":"拖拽: 关","Select Folders":"选择文件夹","Clear all":"清除全部","Clear only successful":"清除已成功上传的","Drag and drop the files/folders to here or click here.":"拖拽或点击此处上传文件/文件夹。","Release to drop these files.":"放开后添加这些文件。",Canceled:"已取消",Done:"已完成","Network Error, Unable establish connection to the server or interrupted.":"网络错误,无法连接到服务器或连接被意外中断。","Pending upload":"待上传","Please select file to upload first.":"请先选择要上传的文件。","About %s":"关于 %s",Settings:"设置","Use Metric Units":"使用公制单位","Saved.":"已保存。","Clear Local Storage":"清除本地存储",uppy:o};exports.default=t; diff --git a/dist/zhTW-a803434e.js b/dist/zhTW-4aa25a91.js similarity index 99% rename from dist/zhTW-a803434e.js rename to dist/zhTW-4aa25a91.js index a8cd5b48..58a0fb9e 100644 --- a/dist/zhTW-a803434e.js +++ b/dist/zhTW-4aa25a91.js @@ -199,7 +199,7 @@ const o = e, i = { "File Name": "檔案名称", "Move files": "移動檔案", "Are you sure you want to move these files to?": "您確定要移動這些檔案嗎?", - "Yes, Move!": "確定,複製!", + "Yes, Move!": "確定,移動!", "Delete files": "刪除檔案", "Yes, Delete!": "確定,刪除!", "Upload Files": "上傳檔案", diff --git a/dist/zhTW-6a024d5e.cjs b/dist/zhTW-73ae00d7.cjs similarity index 99% rename from dist/zhTW-6a024d5e.cjs rename to dist/zhTW-73ae00d7.cjs index 149230ff..a509bbab 100644 --- a/dist/zhTW-6a024d5e.cjs +++ b/dist/zhTW-73ae00d7.cjs @@ -1 +1 @@ -"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={strings:{},pluralize(){return 0}};e.strings={addBulkFilesFailed:"因伺服器錯誤,無法新增 %{smart_count} 個檔案",addedNumFiles:"已新增 %{numFiles} 個檔案",addingMoreFiles:"正在新增更多檔案",additionalRestrictionsFailed:"尚未滿足 %{count} 個額外限制",addMore:"新增更多",addMoreFiles:"新增更多檔案",allFilesFromFolderNamed:"資料夾 %{name} 中的所有檔案",allowAccessDescription:"請允許本網站存取相機以拍照或錄影。",allowAccessTitle:"請允許對相機的存取權限",allowAudioAccessDescription:"請允許本網站存取麥克風以錄製音訊。",allowAudioAccessTitle:"請允許對麥克風的存取權限",aspectRatioLandscape:"裁切成橫向 (16:9)",aspectRatioPortrait:"裁切成直向 (9:16)",aspectRatioSquare:"裁切成方形",authAborted:"驗證已中止",authenticateWith:"連接到 %{pluginName}",authenticateWithTitle:"請使用 %{pluginName} 進行身份驗證以選擇檔案",back:"返回",browse:"瀏覽",browseFiles:"瀏覽檔案",browseFolders:"瀏覽資料夾",cancel:"取消",cancelUpload:"取消上傳",chooseFiles:"選擇檔案",closeModal:"關閉視窗",companionError:"與 Companion 的連接失敗",companionUnauthorizeHint:"若要取消 %{provider} 帳號認證,請前往 %{url}",complete:"完成",compressedX:"圖片壓縮後,省下了 %{size}",compressingImages:"正在壓縮圖片...",connectedToInternet:"連線至網路",copyLink:"複製連結",copyLinkToClipboardFallback:"複製以下網址",copyLinkToClipboardSuccess:"連結已複製到剪貼簿",creatingAssembly:"正在準備上傳...",creatingAssemblyFailed:"Transloadit:無法建立程序集",dashboardTitle:"Uppy 儀表板",dashboardWindowTitle:"Uppy 儀表板視窗(按下 Esc 以關閉)",dataUploadedOfTotal:"%{complete}/%{total}",discardRecordedFile:"捨棄錄影檔",done:"完成",dropHereOr:"拖曳至此處,或%{browse}",dropHint:"將檔案拖曳至此處",dropPasteBoth:"將檔案拖曳至此處、%{browseFiles},或%{browseFolders}",dropPasteFiles:"將檔案拖曳至此處,或%{browseFiles}",dropPasteFolders:"將檔案拖曳至此處,或%{browseFolders}",dropPasteImportBoth:"將檔案拖曳至此處、%{browseFiles},或匯入",dropPasteImportFiles:"將檔案拖曳至此處、%{browseFiles},或匯入",dropPasteImportFolders:"將檔案拖曳至此處、%{browseFolders},或匯入",editFile:"編輯檔案",editFileWithFilename:"編輯檔案 %{file}",editing:"編輯 %{file}",emptyFolderAdded:"未從空資料夾新增任何檔案",encoding:"編碼中...",enterCorrectUrl:"錯誤連結:請確認您輸入的是檔案連結",enterTextToSearch:"輸入文字以搜尋圖片",enterUrlToImport:"輸入連結以匯入檔案",error:"錯誤",exceedsSize:"此檔案大小超出允許的最大值 %{size}",failedToFetch:"Companion 無法抓取此連結,請確認它是正確的",failedToUpload:"%{file} 上傳失敗",filesUploadedOfTotal:"已上傳 %{complete} 個檔案中的 %{smart_count} 個檔案",filter:"篩選器",finishEditingFile:"完成檔案編輯",flipHorizontal:"水平翻轉",folderAdded:"從 %{folder} 新增了 %{smart_count} 個檔案",folderAlreadyAdded:'資料夾 "%{folder}" 已新增',generatingThumbnails:"正在產生縮圖...",import:"匯入",importFiles:"檔案匯入來源:",importFrom:"從 %{name} 匯入",inferiorSize:"此檔案小於允許的大小:%{size}",loading:"正在載入...",logOut:"登出",micDisabled:"使用者拒絕麥克風存取權限",missingRequiredMetaField:"遺漏中繼資料必要欄位",missingRequiredMetaFieldOnFile:"%{fileName} 遺漏中繼資料必要欄位",missingRequiredMetaFields:"遺漏中繼資料必要欄位:%{fields}。",myDevice:"我的裝置",noAudioDescription:"請連接麥克風或其他音訊輸入裝置以錄製音訊",noAudioTitle:"無法使用麥克風",noCameraDescription:"請連接相機以拍照或錄影",noCameraTitle:"無法使用相機",noDuplicates:"無法新增重複檔案,'%{fileName}' 已存在",noFilesFound:"這裡空空如也",noInternetConnection:"無網路連線",noMoreFilesAllowed:"無法新增更多檔案",noSearchResults:"抱歉,找不到符合此搜尋條件的結果",openFolderNamed:"開啟資料夾 %{name}",pause:"暫停",paused:"已暫停",pauseUpload:"暫停上傳",pluginNameAudio:"音訊",pluginNameBox:"Box",pluginNameCamera:"相機",pluginNameDropbox:"Dropbox",pluginNameFacebook:"Facebook",pluginNameGoogleDrive:"Google 雲端硬碟",pluginNameInstagram:"Instagram",pluginNameOneDrive:"OneDrive",pluginNameZoom:"Zoom",poweredBy:"技術提供者 %{uppy}",processingXFiles:"正在處理 %{smart_count} 個檔案",recording:"正在錄製",recordingLength:"錄製時長 %{recording_length}",recordingStoppedMaxSize:"因檔案大小即將超出限制而停止錄製",recordVideoBtn:"錄影",recoveredAllFiles:"我們還原了所有檔案。您現在可以繼續上傳了。",recoveredXFiles:"我們無法完全復原 %{smart_count} 個檔案。請重新選擇檔案並繼續上傳。",removeFile:"移除檔案",reSelect:"重新選擇",resetFilter:"重設篩選器",resetSearch:"重設搜尋",resume:"繼續",resumeUpload:"繼續上傳",retry:"重試",retryUpload:"重試上傳",revert:"還原",rotate:"旋轉",save:"儲存",saveChanges:"儲存變更",search:"搜尋",searchImages:"搜尋圖片",selectX:"選擇 %{smart_count}",sessionRestored:"已復原工作階段",showErrorDetails:"顯示錯誤詳細資訊",signInWithGoogle:"透過 Google 登入",smile:"請微笑!",startAudioRecording:"開始錄音",startCapturing:"開始畫面擷取",startRecording:"開始錄影",stopAudioRecording:"停止錄音",stopCapturing:"停止畫面擷取",stopRecording:"停止錄影",streamActive:"主動串流",streamPassive:"被動串流",submitRecordedFile:"提交錄影檔",takePicture:"拍照",takePictureBtn:"拍照",timedOut:"上傳已停滯 %{seconds} 秒,正在中止上傳。",upload:"上傳",uploadComplete:"上傳完成",uploadFailed:"上傳失敗",uploading:"正在上傳",uploadingXFiles:"正在上傳 %{smart_count} 個檔案",uploadPaused:"暫停上傳",uploadStalled:"上傳已停滯 %{seconds} 秒。請考慮重試。",uploadXFiles:"上傳 %{smart_count} 個檔案",uploadXNewFiles:"上傳 +%{smart_count} 個檔案",xFilesSelected:"已選擇 %{smart_count} 個檔案",xMoreFilesAdded:"又新增 %{smart_count} 個檔案",xTimeLeft:"還剩下 %{time}",youCanOnlyUploadFileTypes:"您只能上傳這些檔案類型:%{types}",youCanOnlyUploadX:"您只能上傳 %{smart_count} 個檔案",youHaveToAtLeastSelectX:"您至少要選擇 %{smart_count} 個檔案",zoomIn:"放大",zoomOut:"縮小"};typeof Uppy<"u"&&(globalThis.Uppy.locales.zh_TW=e);const o=e,i={Language:"語言",Create:"建立",Close:"關閉",Cancel:"取消",Save:"储存",Edit:"編輯",Crop:"裁切","New Folder":"新資料夾","New File":"新檔案",Rename:"改名",Delete:"刪除",Upload:"上傳",Download:"下載",Archive:"壓縮",Unarchive:"解壓縮",Open:"打開","Open containing folder":"打開對應的資料夾",Refresh:"重新整理",Preview:"預覽","Dark Mode":"黑暗模式","Toggle Full Screen":"切換全螢幕","Change View":"變更視圖",Storage:"儲存","Go up a directory":"上一個目錄","Search anything..":"搜尋..",Name:"名稱",Size:"大小",Date:"日期",Filepath:"檔案路徑",About:"關於","Folder Name":"資料夾名稱","File Name":"檔案名称","Move files":"移動檔案","Are you sure you want to move these files to?":"您確定要移動這些檔案嗎?","Yes, Move!":"確定,複製!","Delete files":"刪除檔案","Yes, Delete!":"確定,刪除!","Upload Files":"上傳檔案","No files selected!":"未選取檔案!","Select Files":"選擇檔案","Archive the files":"壓縮檔案","Unarchive the files":"解壓縮檔案","The archive will be unarchived at":"此壓縮檔案將解壓到","Archive name. (.zip file will be created)":"壓縮檔案名稱。(將創建 .zip 檔案)","Vuefinder is a file manager component for vue 3.":"Vuefinder 是 Vue 3 的一個檔案管理員組件。","Create a new folder":"創建一個新資料夾","Create a new file":"創建一個新檔案","Are you sure you want to delete these files?":"您確定要刪除這些檔案嗎?","This action cannot be undone.":"此操作不能撤銷。","Search results for":"搜尋結果為","item(s) selected.":"個檔案 已選取。","%s is renamed.":"%s 已重新命名。","This is a readonly storage.":"這是只讀存儲器。","%s is created.":"%s 已創建。","Files moved.":"檔案已移動。","Files deleted.":"檔案已刪除。","The file unarchived.":"檔案已解壓。","The file(s) archived.":"檔案已壓縮。","Updated.":"已更新。","No search result found.":"未能搜尋到結果。","Are you sure you want to move these files?":"您確定要移動這些檔案嗎?","File Size":"檔案大小","Last Modified":"檔案修改時間","Drag&Drop: on":"拖拽:開啟","Drag&Drop: off":"拖拽:關閉","Select Folders":"選擇資料夾","Clear all":"全部清除","Clear only successful":"僅清除成功上傳的","Drag and drop the files/folders to here or click here.":"拖曳或點擊此處上傳檔案/資料夾。","Release to drop these files.":"放開後添加這些文件。",Canceled:"已取消",Done:"已完成","Network Error, Unable establish connection to the server or interrupted.":"網路錯誤,無法連線到伺服器或連線被意外中斷。","Pending upload":"待上傳","Please select file to upload first.":"請先選擇要上傳的檔案。","About %s":"關於 %s",Settings:"設定","Use Metric Units":"使用公制單位","Saved.":"已儲存。","Clear Local Storage":"清除本地儲存",uppy:o};exports.default=i; +"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={strings:{},pluralize(){return 0}};e.strings={addBulkFilesFailed:"因伺服器錯誤,無法新增 %{smart_count} 個檔案",addedNumFiles:"已新增 %{numFiles} 個檔案",addingMoreFiles:"正在新增更多檔案",additionalRestrictionsFailed:"尚未滿足 %{count} 個額外限制",addMore:"新增更多",addMoreFiles:"新增更多檔案",allFilesFromFolderNamed:"資料夾 %{name} 中的所有檔案",allowAccessDescription:"請允許本網站存取相機以拍照或錄影。",allowAccessTitle:"請允許對相機的存取權限",allowAudioAccessDescription:"請允許本網站存取麥克風以錄製音訊。",allowAudioAccessTitle:"請允許對麥克風的存取權限",aspectRatioLandscape:"裁切成橫向 (16:9)",aspectRatioPortrait:"裁切成直向 (9:16)",aspectRatioSquare:"裁切成方形",authAborted:"驗證已中止",authenticateWith:"連接到 %{pluginName}",authenticateWithTitle:"請使用 %{pluginName} 進行身份驗證以選擇檔案",back:"返回",browse:"瀏覽",browseFiles:"瀏覽檔案",browseFolders:"瀏覽資料夾",cancel:"取消",cancelUpload:"取消上傳",chooseFiles:"選擇檔案",closeModal:"關閉視窗",companionError:"與 Companion 的連接失敗",companionUnauthorizeHint:"若要取消 %{provider} 帳號認證,請前往 %{url}",complete:"完成",compressedX:"圖片壓縮後,省下了 %{size}",compressingImages:"正在壓縮圖片...",connectedToInternet:"連線至網路",copyLink:"複製連結",copyLinkToClipboardFallback:"複製以下網址",copyLinkToClipboardSuccess:"連結已複製到剪貼簿",creatingAssembly:"正在準備上傳...",creatingAssemblyFailed:"Transloadit:無法建立程序集",dashboardTitle:"Uppy 儀表板",dashboardWindowTitle:"Uppy 儀表板視窗(按下 Esc 以關閉)",dataUploadedOfTotal:"%{complete}/%{total}",discardRecordedFile:"捨棄錄影檔",done:"完成",dropHereOr:"拖曳至此處,或%{browse}",dropHint:"將檔案拖曳至此處",dropPasteBoth:"將檔案拖曳至此處、%{browseFiles},或%{browseFolders}",dropPasteFiles:"將檔案拖曳至此處,或%{browseFiles}",dropPasteFolders:"將檔案拖曳至此處,或%{browseFolders}",dropPasteImportBoth:"將檔案拖曳至此處、%{browseFiles},或匯入",dropPasteImportFiles:"將檔案拖曳至此處、%{browseFiles},或匯入",dropPasteImportFolders:"將檔案拖曳至此處、%{browseFolders},或匯入",editFile:"編輯檔案",editFileWithFilename:"編輯檔案 %{file}",editing:"編輯 %{file}",emptyFolderAdded:"未從空資料夾新增任何檔案",encoding:"編碼中...",enterCorrectUrl:"錯誤連結:請確認您輸入的是檔案連結",enterTextToSearch:"輸入文字以搜尋圖片",enterUrlToImport:"輸入連結以匯入檔案",error:"錯誤",exceedsSize:"此檔案大小超出允許的最大值 %{size}",failedToFetch:"Companion 無法抓取此連結,請確認它是正確的",failedToUpload:"%{file} 上傳失敗",filesUploadedOfTotal:"已上傳 %{complete} 個檔案中的 %{smart_count} 個檔案",filter:"篩選器",finishEditingFile:"完成檔案編輯",flipHorizontal:"水平翻轉",folderAdded:"從 %{folder} 新增了 %{smart_count} 個檔案",folderAlreadyAdded:'資料夾 "%{folder}" 已新增',generatingThumbnails:"正在產生縮圖...",import:"匯入",importFiles:"檔案匯入來源:",importFrom:"從 %{name} 匯入",inferiorSize:"此檔案小於允許的大小:%{size}",loading:"正在載入...",logOut:"登出",micDisabled:"使用者拒絕麥克風存取權限",missingRequiredMetaField:"遺漏中繼資料必要欄位",missingRequiredMetaFieldOnFile:"%{fileName} 遺漏中繼資料必要欄位",missingRequiredMetaFields:"遺漏中繼資料必要欄位:%{fields}。",myDevice:"我的裝置",noAudioDescription:"請連接麥克風或其他音訊輸入裝置以錄製音訊",noAudioTitle:"無法使用麥克風",noCameraDescription:"請連接相機以拍照或錄影",noCameraTitle:"無法使用相機",noDuplicates:"無法新增重複檔案,'%{fileName}' 已存在",noFilesFound:"這裡空空如也",noInternetConnection:"無網路連線",noMoreFilesAllowed:"無法新增更多檔案",noSearchResults:"抱歉,找不到符合此搜尋條件的結果",openFolderNamed:"開啟資料夾 %{name}",pause:"暫停",paused:"已暫停",pauseUpload:"暫停上傳",pluginNameAudio:"音訊",pluginNameBox:"Box",pluginNameCamera:"相機",pluginNameDropbox:"Dropbox",pluginNameFacebook:"Facebook",pluginNameGoogleDrive:"Google 雲端硬碟",pluginNameInstagram:"Instagram",pluginNameOneDrive:"OneDrive",pluginNameZoom:"Zoom",poweredBy:"技術提供者 %{uppy}",processingXFiles:"正在處理 %{smart_count} 個檔案",recording:"正在錄製",recordingLength:"錄製時長 %{recording_length}",recordingStoppedMaxSize:"因檔案大小即將超出限制而停止錄製",recordVideoBtn:"錄影",recoveredAllFiles:"我們還原了所有檔案。您現在可以繼續上傳了。",recoveredXFiles:"我們無法完全復原 %{smart_count} 個檔案。請重新選擇檔案並繼續上傳。",removeFile:"移除檔案",reSelect:"重新選擇",resetFilter:"重設篩選器",resetSearch:"重設搜尋",resume:"繼續",resumeUpload:"繼續上傳",retry:"重試",retryUpload:"重試上傳",revert:"還原",rotate:"旋轉",save:"儲存",saveChanges:"儲存變更",search:"搜尋",searchImages:"搜尋圖片",selectX:"選擇 %{smart_count}",sessionRestored:"已復原工作階段",showErrorDetails:"顯示錯誤詳細資訊",signInWithGoogle:"透過 Google 登入",smile:"請微笑!",startAudioRecording:"開始錄音",startCapturing:"開始畫面擷取",startRecording:"開始錄影",stopAudioRecording:"停止錄音",stopCapturing:"停止畫面擷取",stopRecording:"停止錄影",streamActive:"主動串流",streamPassive:"被動串流",submitRecordedFile:"提交錄影檔",takePicture:"拍照",takePictureBtn:"拍照",timedOut:"上傳已停滯 %{seconds} 秒,正在中止上傳。",upload:"上傳",uploadComplete:"上傳完成",uploadFailed:"上傳失敗",uploading:"正在上傳",uploadingXFiles:"正在上傳 %{smart_count} 個檔案",uploadPaused:"暫停上傳",uploadStalled:"上傳已停滯 %{seconds} 秒。請考慮重試。",uploadXFiles:"上傳 %{smart_count} 個檔案",uploadXNewFiles:"上傳 +%{smart_count} 個檔案",xFilesSelected:"已選擇 %{smart_count} 個檔案",xMoreFilesAdded:"又新增 %{smart_count} 個檔案",xTimeLeft:"還剩下 %{time}",youCanOnlyUploadFileTypes:"您只能上傳這些檔案類型:%{types}",youCanOnlyUploadX:"您只能上傳 %{smart_count} 個檔案",youHaveToAtLeastSelectX:"您至少要選擇 %{smart_count} 個檔案",zoomIn:"放大",zoomOut:"縮小"};typeof Uppy<"u"&&(globalThis.Uppy.locales.zh_TW=e);const o=e,i={Language:"語言",Create:"建立",Close:"關閉",Cancel:"取消",Save:"储存",Edit:"編輯",Crop:"裁切","New Folder":"新資料夾","New File":"新檔案",Rename:"改名",Delete:"刪除",Upload:"上傳",Download:"下載",Archive:"壓縮",Unarchive:"解壓縮",Open:"打開","Open containing folder":"打開對應的資料夾",Refresh:"重新整理",Preview:"預覽","Dark Mode":"黑暗模式","Toggle Full Screen":"切換全螢幕","Change View":"變更視圖",Storage:"儲存","Go up a directory":"上一個目錄","Search anything..":"搜尋..",Name:"名稱",Size:"大小",Date:"日期",Filepath:"檔案路徑",About:"關於","Folder Name":"資料夾名稱","File Name":"檔案名称","Move files":"移動檔案","Are you sure you want to move these files to?":"您確定要移動這些檔案嗎?","Yes, Move!":"確定,移動!","Delete files":"刪除檔案","Yes, Delete!":"確定,刪除!","Upload Files":"上傳檔案","No files selected!":"未選取檔案!","Select Files":"選擇檔案","Archive the files":"壓縮檔案","Unarchive the files":"解壓縮檔案","The archive will be unarchived at":"此壓縮檔案將解壓到","Archive name. (.zip file will be created)":"壓縮檔案名稱。(將創建 .zip 檔案)","Vuefinder is a file manager component for vue 3.":"Vuefinder 是 Vue 3 的一個檔案管理員組件。","Create a new folder":"創建一個新資料夾","Create a new file":"創建一個新檔案","Are you sure you want to delete these files?":"您確定要刪除這些檔案嗎?","This action cannot be undone.":"此操作不能撤銷。","Search results for":"搜尋結果為","item(s) selected.":"個檔案 已選取。","%s is renamed.":"%s 已重新命名。","This is a readonly storage.":"這是只讀存儲器。","%s is created.":"%s 已創建。","Files moved.":"檔案已移動。","Files deleted.":"檔案已刪除。","The file unarchived.":"檔案已解壓。","The file(s) archived.":"檔案已壓縮。","Updated.":"已更新。","No search result found.":"未能搜尋到結果。","Are you sure you want to move these files?":"您確定要移動這些檔案嗎?","File Size":"檔案大小","Last Modified":"檔案修改時間","Drag&Drop: on":"拖拽:開啟","Drag&Drop: off":"拖拽:關閉","Select Folders":"選擇資料夾","Clear all":"全部清除","Clear only successful":"僅清除成功上傳的","Drag and drop the files/folders to here or click here.":"拖曳或點擊此處上傳檔案/資料夾。","Release to drop these files.":"放開後添加這些文件。",Canceled:"已取消",Done:"已完成","Network Error, Unable establish connection to the server or interrupted.":"網路錯誤,無法連線到伺服器或連線被意外中斷。","Pending upload":"待上傳","Please select file to upload first.":"請先選擇要上傳的檔案。","About %s":"關於 %s",Settings:"設定","Use Metric Units":"使用公制單位","Saved.":"已儲存。","Clear Local Storage":"清除本地儲存",uppy:o};exports.default=i; diff --git a/package.json b/package.json index 76c88933..dae49e7a 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vuefinder", - "version": "1.3.3", + "version": "2.0.1", "description": "Vuefinder is a file manager component for vuejs.", "type": "module", "files": [