From be8e5e49714d0eb1c7707b0ef657b87ea87b1991 Mon Sep 17 00:00:00 2001 From: Yusuf Date: Thu, 22 Dec 2022 19:52:07 +0300 Subject: [PATCH] vite 4 --- dist/{en.70efd54a.js => en-ed1f1848.js} | 0 dist/fa-49628944.js | 72 + dist/fa.1da73475.js | 72 - dist/ru-d8535e72.js | 71 + dist/ru.8dbff4f2.js | 71 - dist/style.css | 6 +- dist/tr-6f9ffcfe.js | 72 + dist/tr.78307c97.js | 72 - dist/vuefinder.js | 5725 ++++++++++++----------- dist/vuefinder.umd.cjs | 383 +- package.json | 6 +- 11 files changed, 3416 insertions(+), 3134 deletions(-) rename dist/{en.70efd54a.js => en-ed1f1848.js} (100%) create mode 100644 dist/fa-49628944.js delete mode 100644 dist/fa.1da73475.js create mode 100644 dist/ru-d8535e72.js delete mode 100644 dist/ru.8dbff4f2.js create mode 100644 dist/tr-6f9ffcfe.js delete mode 100644 dist/tr.78307c97.js diff --git a/dist/en.70efd54a.js b/dist/en-ed1f1848.js similarity index 100% rename from dist/en.70efd54a.js rename to dist/en-ed1f1848.js diff --git a/dist/fa-49628944.js b/dist/fa-49628944.js new file mode 100644 index 00000000..71895c09 --- /dev/null +++ b/dist/fa-49628944.js @@ -0,0 +1,72 @@ +const e = `{ + "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)": "نام فایل فشرده", + "Vuefinder is a file manager component for vue 3.": "Vuefinder یک کتابخانه مدیریت فایل ها برای Vue3 میباشد.", + "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: روشن", + "Drag&Drop: off": "Drag&Drop: خاموش", + "The selected file exceeds the maximum file size. You cannot upload files greater than %s": "حداکثر ظرفیت مجاز فایل %s میباشد! فایل شما بزرگتر از این مقدار میباشد." +} +`; +export { + e as default +}; diff --git a/dist/fa.1da73475.js b/dist/fa.1da73475.js deleted file mode 100644 index 4a0c68d8..00000000 --- a/dist/fa.1da73475.js +++ /dev/null @@ -1,72 +0,0 @@ -const e = `{ - "Language": "\u0632\u0628\u0627\u0646", - "Create": "\u0627\u06CC\u062C\u0627\u062F", - "Close": "\u0628\u0633\u062A\u0646", - "Cancel": "\u0627\u0646\u0635\u0631\u0627\u0641", - "Save": "\u0630\u062E\u06CC\u0631\u0647", - "Edit": "\u0648\u06CC\u0631\u0627\u06CC\u0634", - "Crop": "\u0628\u0631\u0634 \u062A\u0635\u0648\u06CC\u0631", - "New Folder": "\u067E\u0648\u0634\u0647 \u062C\u062F\u06CC\u062F", - "New File": "\u0641\u0627\u06CC\u0644 \u062C\u062F\u06CC\u062F", - "Rename": "\u062A\u063A\u06CC\u06CC\u0631 \u0646\u0627\u0645", - "Delete": "\u062D\u0630\u0641", - "Upload": "\u0622\u067E\u0644\u0648\u062F", - "Download": "\u062F\u0627\u0646\u0644\u0648\u062F", - "Archive": "\u0641\u0634\u0631\u062F\u0647 \u0633\u0627\u0632\u06CC", - "Unarchive": "\u0628\u0627\u0632 \u06A9\u0631\u062F\u0646 \u0641\u0627\u06CC\u0644 \u0641\u0634\u0631\u062F\u0647", - "Open": "\u0628\u0627\u0632 \u06A9\u0631\u062F\u0646", - "Open containing folder": "\u0645\u062D\u062A\u0648\u0627\u06CC \u067E\u0648\u0634\u0647 \u0631\u0627 \u0628\u0627\u0632 \u06A9\u0646!", - "Refresh": "\u0628\u0627\u0631\u06A9\u0630\u0627\u0631\u06CC \u0645\u062C\u062F\u062F", - "Preview": "\u067E\u06CC\u0634\u0646\u0645\u0627\u06CC\u0634", - "Dark Mode": "\u062D\u0627\u0644\u062A \u0634\u0628", - "Toggle Full Screen": "\u062A\u0645\u0627\u0645 \u062A\u0635\u0648\u06CC\u0631 \u06A9\u0631\u062F\u0646", - "Change View": "\u062A\u063A\u06CC\u06CC\u0631 \u0646\u0648\u0639 \u0646\u0645\u0627\u06CC\u0634", - "Storage" : "\u0641\u0636\u0627", - "Go up a directory": "\u0628\u0631\u0648 \u0628\u0647 \u067E\u0648\u0634\u0647", - "Search anything..": "\u0628\u0647 \u062F\u0646\u0628\u0627\u0644 \u0686\u0647 \u0686\u06CC\u0632\u06CC \u0647\u0633\u062A\u06CC\u062F \u061F \u062C\u0633\u062A\u062C\u0648 \u06A9\u0646\u06CC\u062F ...", - "Name": "\u0646\u0627\u0645", - "Size": "\u0633\u0627\u06CC\u0632", - "Date": "\u062A\u0627\u0631\u06CC\u062E \u0627\u0646\u062A\u0634\u0627\u0631", - "Filepath": "\u0645\u0633\u06CC\u0631 \u0641\u0627\u06CC\u0644", - "About": "\u062F\u0631\u0628\u0627\u0631\u0647", - "Folder Name": "\u0646\u0627\u0645 \u067E\u0648\u0634\u0647", - "File Name": "\u0646\u0627\u0645 \u0641\u0627\u06CC\u0644", - "Move files": "\u0627\u0646\u062A\u0642\u0627\u0644 \u0641\u0627\u06CC\u0644 \u0647\u0627", - "Are you sure you want to move these files to?": "\u0622\u06CC\u0627 \u0628\u0631\u0627\u06CC \u0627\u0646\u062A\u0642\u0627\u0644 \u0641\u0627\u06CC\u0644 \u0647\u0627 \u0645\u0637\u0645\u0626\u0646 \u0647\u0633\u062A\u06CC\u062F \u061F", - "Yes, Move!": "\u0628\u0644\u0647\u060C \u0627\u0646\u062A\u0642\u0627\u0644 \u0628\u062F\u0647!", - "Delete files": "\u067E\u0627\u06A9 \u06A9\u0631\u062F\u0646 \u0641\u0627\u06CC\u0644 \u0647\u0627", - "Yes, Delete!": "\u0628\u0644\u0647\u060C \u067E\u0627\u06A9 \u06A9\u0646!", - "Upload Files" : "\u0622\u067E\u0644\u0648\u062F \u06A9\u0631\u062F\u0646 \u0641\u0627\u06CC\u0644 \u0647\u0627", - "No files selected!": "\u0647\u06CC\u0686 \u0641\u0627\u06CC\u0644\u06CC \u0627\u0646\u062A\u062E\u0627\u0628 \u0646\u0634\u062F\u0647 \u0627\u0633\u062A.", - "Select Files": "\u0627\u0646\u062A\u062E\u0627\u0628 \u0641\u0627\u06CC\u0644 \u0647\u0627", - "Archive the files": "\u0641\u0634\u0631\u062F\u0647 \u0633\u0627\u0632\u06CC \u0641\u0627\u06CC\u0644 \u0647\u0627", - "Unarchive the files": "\u0628\u0627\u0632 \u06A9\u0631\u062F\u0646 \u0641\u0627\u06CC\u0644 \u0647\u0627\u06CC \u0641\u0634\u0631\u062F\u0647", - "The archive will be unarchived at": "\u0641\u0627\u06CC\u0644 \u0641\u0634\u0631\u062F\u0647 \u0633\u0627\u0632\u0647 \u062F\u0631 \u0627\u06CC\u0646 \u0645\u0633\u06CC\u0631 \u0628\u0627\u0632 \u0645\u06CC\u0634\u0648\u062F: ", - "Archive name. (.zip file will be created)": "\u0646\u0627\u0645 \u0641\u0627\u06CC\u0644 \u0641\u0634\u0631\u062F\u0647", - "Vuefinder is a file manager component for vue 3.": "Vuefinder \u06CC\u06A9 \u06A9\u062A\u0627\u0628\u062E\u0627\u0646\u0647 \u0645\u062F\u06CC\u0631\u06CC\u062A \u0641\u0627\u06CC\u0644 \u0647\u0627 \u0628\u0631\u0627\u06CC Vue3 \u0645\u06CC\u0628\u0627\u0634\u062F.", - "Create a new folder": "\u0627\u06CC\u062C\u0627\u062F \u067E\u0648\u0634\u0647 \u062C\u062F\u06CC\u062F", - "Create a new file": "\u0627\u06CC\u062C\u0627\u062F \u0641\u0627\u06CC\u0644 \u062C\u062F\u06CC\u062F", - "Are you sure you want to delete these files?": "\u0622\u06CC\u0627 \u0627\u0632 \u062D\u0630\u0641 \u0641\u0627\u06CC\u0644 \u0647\u0627 \u0645\u0637\u0645\u0626\u0646 \u0647\u0633\u062A\u06CC\u062F \u061F", - "This action cannot be undone.": "\u0627\u06CC\u0646 \u062A\u063A\u06CC\u06CC\u0631\u0627\u062A \u0642\u0627\u0628\u0644 \u0628\u0627\u0632\u06AF\u0634\u062A \u0646\u06CC\u0633\u062A!", - "Search results for" : "\u0646\u062A\u06CC\u062C\u0647 \u062C\u0633\u062A\u062C\u0648 \u0628\u0631\u0627\u06CC", - "item(s) selected.": "\u0622\u06CC\u062A\u0645(\u0647\u0627\u06CC) \u0627\u0646\u062A\u062E\u0627\u0628 \u0634\u062F\u0647", - "%s is renamed." : "\u062A\u063A\u06CC\u06CC\u0631 \u0646\u0627\u0645 \u0628\u0631\u0627\u06CC %s \u0635\u0648\u0631\u062A \u06AF\u0631\u0641\u062A.", - "This is a readonly storage." : "\u0627\u06CC\u0646 \u0641\u0636\u0627 \u0641\u0642\u0637 \u0642\u0627\u0628\u0644 \u062E\u0648\u0627\u0646\u062F\u0646 \u0627\u0633\u062A!", - "%s is created." : "%s \u0633\u0627\u062E\u062A\u0647 \u0634\u062F!", - "Files moved." : "\u0641\u0627\u06CC\u0644(\u0647\u0627) \u0627\u0646\u0642\u0627\u0644 \u06CC\u0627\u0641\u062A\u0646\u062F.", - "Files deleted." : "\u0641\u0627\u06CC\u0644(\u0647\u0627) \u062D\u0630\u0641 \u0634\u062F\u0646\u062F.", - "The file unarchived." : "\u0641\u0627\u06CC\u0644 \u0641\u0634\u0631\u062F\u0647 \u0634\u062F\u0647 \u0628\u0627\u0632 \u0634\u062F.", - "The file(s) archived." : "\u0641\u0627\u06CC\u0644(\u0647\u0627) \u0641\u0634\u0631\u062F\u0647 \u0633\u0627\u0632\u06CC \u0634\u062F\u0646\u062F.", - "Updated." : "\u0622\u067E\u062F\u06CC\u062A \u0634\u062F.", - "No search result found." : "\u0647\u06CC\u0686 \u0646\u062A\u06CC\u062C\u0647 \u0627\u06CC \u06CC\u0627\u0641\u062A \u0646\u0634\u062F.", - "Are you sure you want to move these files?" : "\u0622\u06CC\u0627 \u0628\u0631\u0627\u06CC \u0627\u0646\u062A\u0642\u0627\u0644 \u0641\u0627\u06CC\u0644 \u0647\u0627 \u0645\u0637\u0645\u0626\u0646 \u0647\u0633\u062A\u06CC\u062F \u061F", - "File Size": "\u0633\u0627\u06CC\u0632 \u0641\u0627\u06CC\u0644", - "Last Modified": "\u0622\u062E\u0631\u06CC\u0646 \u0648\u06CC\u0631\u0627\u06CC\u0634", - "Drag&Drop: on": "Drag&Drop: \u0631\u0648\u0634\u0646", - "Drag&Drop: off": "Drag&Drop: \u062E\u0627\u0645\u0648\u0634", - "The selected file exceeds the maximum file size. You cannot upload files greater than %s": "\u062D\u062F\u0627\u06A9\u062B\u0631 \u0638\u0631\u0641\u06CC\u062A \u0645\u062C\u0627\u0632 \u0641\u0627\u06CC\u0644 %s \u0645\u06CC\u0628\u0627\u0634\u062F! \u0641\u0627\u06CC\u0644 \u0634\u0645\u0627 \u0628\u0632\u0631\u06AF\u062A\u0631 \u0627\u0632 \u0627\u06CC\u0646 \u0645\u0642\u062F\u0627\u0631 \u0645\u06CC\u0628\u0627\u0634\u062F." -} -`; -export { - e as default -}; diff --git a/dist/ru-d8535e72.js b/dist/ru-d8535e72.js new file mode 100644 index 00000000..6575b0f3 --- /dev/null +++ b/dist/ru-d8535e72.js @@ -0,0 +1,71 @@ +const e = `{ + "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: on", + "Drag&Drop: off": "Drag&Drop: off" +} +`; +export { + e as default +}; diff --git a/dist/ru.8dbff4f2.js b/dist/ru.8dbff4f2.js deleted file mode 100644 index 8bf362c1..00000000 --- a/dist/ru.8dbff4f2.js +++ /dev/null @@ -1,71 +0,0 @@ -const e = `{ - "Language": "\u042F\u0437\u044B\u043A", - "Create": "\u0421\u043E\u0437\u0434\u0430\u0442\u044C", - "Close": "\u0417\u0430\u043A\u0440\u044B\u0442\u044C", - "Cancel": "\u041E\u0442\u043C\u0435\u043D\u0430", - "Save": "\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C", - "Edit": "\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C", - "Crop": "\u041E\u0431\u0440\u0435\u0437\u0430\u0442\u044C", - "New Folder": "\u041D\u043E\u0432\u0430\u044F \u043F\u0430\u043F\u043A\u0430", - "New File": "\u041D\u043E\u0432\u044B\u0439 \u0444\u0430\u0439\u043B", - "Rename": "\u041F\u0435\u0440\u0435\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u0442\u044C", - "Delete": "\u0423\u0434\u0430\u043B\u0438\u0442\u044C", - "Upload": "\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C", - "Download": "\u0421\u043A\u0430\u0447\u0430\u0442\u044C", - "Archive": "\u0410\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C", - "Unarchive": "\u0420\u0430\u0437\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C", - "Open": "\u041E\u0442\u043A\u0440\u044B\u0442\u044C", - "Open containing folder": "\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435", - "Refresh": "\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C", - "Preview": "\u041F\u0440\u0435\u0434\u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440", - "Dark Mode": "\u0422\u0451\u043C\u043D\u044B\u0439 \u0440\u0435\u0436\u0438\u043C", - "Toggle Full Screen": "\u041F\u043E\u043B\u043D\u044B\u0439 \u044D\u043A\u0440\u0430\u043D", - "Change View": "\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u0432\u0438\u0434", - "Storage" : "\u0425\u0440\u0430\u043D\u0438\u043B\u0438\u0449\u0435", - "Go up a directory": "\u0412\u0432\u0435\u0440\u0445", - "Search anything..": "\u041F\u043E\u0438\u0441\u043A...", - "Name": "\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435", - "Size": "\u0420\u0430\u0437\u043C\u0435\u0440", - "Date": "\u0414\u0430\u0442\u0430", - "Filepath": "\u041F\u0443\u0442\u044C \u0434\u043E \u0444\u0430\u0439\u043B\u0430", - "About": "\u041E \u043A\u043E\u043C\u043F\u043E\u043D\u0435\u043D\u0442\u0435", - "Folder Name": "\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043F\u0430\u043F\u043A\u0438", - "File Name": "\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u0444\u0430\u0439\u043B\u0430", - "Move files": "\u041F\u0435\u0440\u0435\u043C\u0435\u0441\u0442\u0438\u0442\u044C \u0444\u0430\u0439\u043B\u044B", - "Are you sure you want to move these files to?": "\u0412\u044B \u0443\u0432\u0435\u0440\u0435\u043D\u044B, \u0447\u0442\u043E \u0445\u043E\u0442\u0438\u0442\u0435 \u043F\u0435\u0440\u0435\u043C\u0435\u0441\u0442\u0438\u0442\u044C \u044D\u0442\u0438 \u0444\u0430\u0439\u043B\u044B \u0432?", - "Yes, Move!": "\u041F\u0435\u0440\u0435\u043C\u0435\u0441\u0442\u0438\u0442\u044C", - "Delete files": "\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0444\u0430\u0439\u043B\u044B", - "Yes, Delete!": "\u0423\u0434\u0430\u043B\u0438\u0442\u044C", - "Upload Files": "\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0444\u0430\u0439\u043B\u044B", - "No files selected!": "\u0424\u0430\u0439\u043B\u044B \u043D\u0435 \u0432\u044B\u0431\u0440\u0430\u043D\u044B!", - "Select Files": "\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0444\u0430\u0439\u043B\u044B", - "Archive the files": "\u0410\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0444\u0430\u0439\u043B\u044B", - "Unarchive the files": "\u0420\u0430\u0437\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0444\u0430\u0439\u043B\u044B", - "The archive will be unarchived at": "\u0410\u0440\u0445\u0438\u0432 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D \u0432", - "Archive name. (.zip file will be created)": "\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u0430\u0440\u0445\u0438\u0432\u0430. (\u0431\u0443\u0434\u0435\u0442 \u0441\u043E\u0437\u0434\u0430\u043D .zip \u0444\u0430\u0439\u043B)", - "Vuefinder is a file manager component for vue 3.": "Vuefinder - \u0444\u0430\u0439\u043B\u043E\u0432\u044B\u0439 \u043C\u0435\u043D\u0435\u0434\u0436\u0435\u0440, \u043A\u043E\u043C\u043F\u043E\u043D\u0435\u043D\u0442 \u0434\u043B\u044F vue 3.", - "Create a new folder": "\u0421\u043E\u0437\u0434\u0430\u0442\u044C \u043D\u043E\u0432\u0443\u044E \u043F\u0430\u043F\u043A\u0443", - "Create a new file": "\u0421\u043E\u0437\u0434\u0430\u0442\u044C \u043D\u043E\u0432\u044B\u0439 \u0444\u0430\u0439\u043B", - "Are you sure you want to delete these files?": "\u0412\u044B \u0443\u0432\u0435\u0440\u0435\u043D\u044B, \u0447\u0442\u043E \u0445\u043E\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043B\u0438\u0442\u044C \u044D\u0442\u0438 \u0444\u0430\u0439\u043B\u044B?", - "This action cannot be undone.": "\u042D\u0442\u043E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u043D\u0435\u043B\u044C\u0437\u044F \u043E\u0442\u043C\u0435\u043D\u0438\u0442\u044C.", - "Search results for": "\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u043F\u043E\u0438\u0441\u043A\u0430 \u043F\u043E", - "item(s) selected.": "\u0432\u044B\u0431\u0440\u0430\u043D\u044B.", - "%s is renamed.": "%s \u043F\u0435\u0440\u0435\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D.", - "This is a readonly storage.": "\u0414\u0430\u043D\u043D\u043E\u0435 \u0445\u0440\u0430\u043D\u0438\u043B\u0438\u0449\u0435 \u0442\u043E\u043B\u044C\u043A\u043E \u0434\u043B\u044F \u0447\u0442\u0435\u043D\u0438\u044F.", - "%s is created.": "%s \u0441\u043E\u0437\u0434\u0430\u043D.", - "Files moved.": "\u0424\u0430\u0439\u043B\u044B \u043F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D\u044B.", - "Files deleted.": "\u0424\u0430\u0439\u043B\u044B \u0443\u0434\u0430\u043B\u0435\u043D\u044B.", - "The file unarchived.": "\u0424\u0430\u0439\u043B \u0440\u0430\u0437\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D", - "The file(s) archived.": "\u0424\u0430\u0439\u043B(-\u044B) \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u044B", - "Updated.": "\u041E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u043E.", - "No search result found.": "\u041D\u0438\u0447\u0435\u0433\u043E \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E", - "Are you sure you want to move these files?": "\u0412\u044B \u0443\u0432\u0435\u0440\u0435\u043D\u044B, \u0447\u0442\u043E \u0445\u043E\u0442\u0438\u0442\u0435 \u043F\u0435\u0440\u0435\u043C\u0435\u0441\u0442\u0438\u0442\u044C \u044D\u0442\u0438 \u0444\u0430\u0439\u043B\u044B?", - "File Size": "\u0420\u0430\u0437\u043C\u0435\u0440 \u0444\u0430\u0439\u043B\u0430", - "Last Modified": "\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0435 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0435", - "Drag&Drop: on": "Drag&Drop: on", - "Drag&Drop: off": "Drag&Drop: off" -} -`; -export { - e as default -}; diff --git a/dist/style.css b/dist/style.css index 6ddcc2d2..00f815af 100644 --- a/dist/style.css +++ b/dist/style.css @@ -1,9 +1,9 @@ /*! - * Cropper.js v1.5.12 + * Cropper.js v1.5.13 * https://fengyuanchen.github.io/cropperjs * * Copyright 2015-present Chen Fengyuan * Released under the MIT license * - * Date: 2021-06-12T08:00:11.623Z - */.cropper-container{direction:ltr;font-size:0;line-height:0;position:relative;-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.cropper-container img{display:block;height:100%;image-orientation:0deg;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}.cropper-wrap-box,.cropper-canvas,.cropper-drag-box,.cropper-crop-box,.cropper-modal{bottom:0;left:0;position:absolute;right:0;top:0}.cropper-wrap-box,.cropper-canvas{overflow:hidden}.cropper-drag-box{background-color:#fff;opacity:0}.cropper-modal{background-color:#000;opacity:.5}.cropper-view-box{display:block;height:100%;outline:1px solid #39f;outline-color:#3399ffbf;overflow:hidden;width:100%}.cropper-dashed{border:0 dashed #eee;display:block;opacity:.5;position:absolute}.cropper-dashed.dashed-h{border-bottom-width:1px;border-top-width:1px;height:calc(100% / 3);left:0;top:calc(100% / 3);width:100%}.cropper-dashed.dashed-v{border-left-width:1px;border-right-width:1px;height:100%;left:calc(100% / 3);top:0;width:calc(100% / 3)}.cropper-center{display:block;height:0;left:50%;opacity:.75;position:absolute;top:50%;width:0}.cropper-center:before,.cropper-center:after{background-color:#eee;content:" ";display:block;position:absolute}.cropper-center:before{height:1px;left:-3px;top:0;width:7px}.cropper-center:after{height:7px;left:0;top:-3px;width:1px}.cropper-face,.cropper-line,.cropper-point{display:block;height:100%;opacity:.1;position:absolute;width:100%}.cropper-face{background-color:#fff;left:0;top:0}.cropper-line{background-color:#39f}.cropper-line.line-e{cursor:ew-resize;right:-3px;top:0;width:5px}.cropper-line.line-n{cursor:ns-resize;height:5px;left:0;top:-3px}.cropper-line.line-w{cursor:ew-resize;left:-3px;top:0;width:5px}.cropper-line.line-s{bottom:-3px;cursor:ns-resize;height:5px;left:0}.cropper-point{background-color:#39f;height:5px;opacity:.75;width:5px}.cropper-point.point-e{cursor:ew-resize;margin-top:-3px;right:-3px;top:50%}.cropper-point.point-n{cursor:ns-resize;left:50%;margin-left:-3px;top:-3px}.cropper-point.point-w{cursor:ew-resize;left:-3px;margin-top:-3px;top:50%}.cropper-point.point-s{bottom:-3px;cursor:s-resize;left:50%;margin-left:-3px}.cropper-point.point-ne{cursor:nesw-resize;right:-3px;top:-3px}.cropper-point.point-nw{cursor:nwse-resize;left:-3px;top:-3px}.cropper-point.point-sw{bottom:-3px;cursor:nesw-resize;left:-3px}.cropper-point.point-se{bottom:-3px;cursor:nwse-resize;height:20px;opacity:1;right:-3px;width:20px}@media (min-width: 768px){.cropper-point.point-se{height:15px;width:15px}}@media (min-width: 992px){.cropper-point.point-se{height:10px;width:10px}}@media (min-width: 1200px){.cropper-point.point-se{height:5px;opacity:.75;width:5px}}.cropper-point.point-se:before{background-color:#39f;bottom:-50%;content:" ";display:block;height:200%;opacity:0;position:absolute;right:-50%;width:200%}.cropper-invisible{opacity:0}.cropper-bg{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC)}.cropper-hide{display:block;height:0;position:absolute;width:0}.cropper-hidden{display:none!important}.cropper-move{cursor:move}.cropper-crop{cursor:crosshair}.cropper-disabled .cropper-drag-box,.cropper-disabled .cropper-face,.cropper-disabled .cropper-line,.cropper-disabled .cropper-point{cursor:not-allowed}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}*,: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-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-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 *{touch-action:manipulation}.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}.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-selector-area::-webkit-scrollbar{width:12px}.vf-selector-area::-webkit-scrollbar-track-piece{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.dark .vf-selector-area::-webkit-scrollbar-track-piece{background-color:#0f172a80}.vf-selector-area::-webkit-scrollbar-thumb{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.dark .vf-selector-area::-webkit-scrollbar-thumb{--tw-bg-opacity: 1;background-color:rgb(51 65 85 / var(--tw-bg-opacity))}.vf-selector-area::-webkit-scrollbar-thumb:hover{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.dark .vf-selector-area::-webkit-scrollbar-thumb:hover{--tw-bg-opacity: 1;background-color:rgb(71 85 105 / var(--tw-bg-opacity))}.vf-selector-area::-webkit-scrollbar-corner{background-color:transparent}.vuefinder .fixed{position:fixed}.vuefinder .absolute{position:absolute}.vuefinder .relative{position:relative}.vuefinder .inset-0{top:0px;right:0px;bottom:0px;left:0px}.vuefinder .-top-96{top:-24rem}.vuefinder .top-4{top:1rem}.vuefinder .right-\[-2rem\]{right:-2rem}.vuefinder .top-1\/2{top:50%}.vuefinder .bottom-0{bottom:0px}.vuefinder .left-1\/2{left:50%}.vuefinder .z-30{z-index:30}.vuefinder .-z-50{z-index:-50}.vuefinder .z-10{z-index:10}.vuefinder .z-20{z-index:20}.vuefinder .z-0{z-index:0}.vuefinder .col-span-7{grid-column:span 7 / span 7}.vuefinder .col-span-2{grid-column:span 2 / span 2}.vuefinder .col-span-3{grid-column:span 3 / span 3}.vuefinder .col-span-5{grid-column:span 5 / span 5}.vuefinder .m-auto{margin:auto}.vuefinder .m-1{margin:.25rem}.vuefinder .mx-0\.5{margin-left:.125rem;margin-right:.125rem}.vuefinder .mx-0{margin-left:0;margin-right:0}.vuefinder .my-0\.5{margin-top:.125rem;margin-bottom:.125rem}.vuefinder .my-0{margin-top:0;margin-bottom:0}.vuefinder .mx-2{margin-left:.5rem;margin-right:.5rem}.vuefinder .mx-auto{margin-left:auto;margin-right:auto}.vuefinder .mx-1\.5{margin-left:.375rem;margin-right:.375rem}.vuefinder .mx-1{margin-left:.25rem;margin-right:.25rem}.vuefinder .my-1{margin-top:.25rem;margin-bottom:.25rem}.vuefinder .ml-2{margin-left:.5rem}.vuefinder .ml-auto{margin-left:auto}.vuefinder .ml-4{margin-left:1rem}.vuefinder .mt-1{margin-top:.25rem}.vuefinder .ml-3{margin-left:.75rem}.vuefinder .ml-1{margin-left:.25rem}.vuefinder .mr-3{margin-right:.75rem}.vuefinder .mr-1{margin-right:.25rem}.vuefinder .mt-3{margin-top:.75rem}.vuefinder .mt-2{margin-top:.5rem}.vuefinder .ml-1\.5{margin-left:.375rem}.vuefinder .-ml-1{margin-left:-.25rem}.vuefinder .mb-1{margin-bottom:.25rem}.vuefinder .mb-2{margin-bottom:.5rem}.vuefinder .inline-block{display:inline-block}.vuefinder .flex{display:flex}.vuefinder .inline-flex{display:inline-flex}.vuefinder .grid{display:grid}.vuefinder .hidden{display:none}.vuefinder .\!hidden{display:none!important}.vuefinder .h-6{height:1.5rem}.vuefinder .h-full{height:100%}.vuefinder .h-5{height:1.25rem}.vuefinder .h-20{height:5rem}.vuefinder .h-10{height:2.5rem}.vuefinder .h-12{height:3rem}.vuefinder .h-\[60vh\]{height:60vh}.vuefinder .max-h-\[50vh\]{max-height:50vh}.vuefinder .max-h-\[60vh\]{max-height:60vh}.vuefinder .min-h-\[150px\]{min-height:150px}.vuefinder .min-h-full{min-height:100%}.vuefinder .min-h-\[200px\]{min-height:200px}.vuefinder .w-6{width:1.5rem}.vuefinder .w-full{width:100%}.vuefinder .w-5{width:1.25rem}.vuefinder .w-\[5\.5rem\]{width:5.5rem}.vuefinder .w-10{width:2.5rem}.vuefinder .w-screen{width:100vw}.vuefinder .w-12{width:3rem}.vuefinder .min-w-max{min-width:-moz-max-content;min-width:max-content}.vuefinder .min-w-min{min-width:-moz-min-content;min-width:min-content}.vuefinder .max-w-fit{max-width:-moz-fit-content;max-width:fit-content}.vuefinder .max-w-\[50vh\]{max-width:50vh}.vuefinder .flex-auto{flex:1 1 auto}.vuefinder .flex-shrink-0{flex-shrink:0}.vuefinder .-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 .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 .animate-spin{animation:spin 1s linear infinite}.vuefinder .cursor-pointer{cursor:pointer}.vuefinder .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.vuefinder .resize-y{resize:vertical}.vuefinder .grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.vuefinder .grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.vuefinder .flex-col{flex-direction:column}.vuefinder .items-end{align-items:flex-end}.vuefinder .items-center{align-items:center}.vuefinder .justify-end{justify-content:flex-end}.vuefinder .justify-center{justify-content:center}.vuefinder .justify-between{justify-content:space-between}.vuefinder .overflow-auto{overflow:auto}.vuefinder .overflow-hidden{overflow:hidden}.vuefinder .overflow-ellipsis{text-overflow:ellipsis}.vuefinder .whitespace-nowrap{white-space:nowrap}.vuefinder .whitespace-pre-wrap{white-space:pre-wrap}.vuefinder .break-all{word-break:break-all}.vuefinder .rounded{border-radius:.25rem}.vuefinder .rounded-md{border-radius:.375rem}.vuefinder .rounded-full{border-radius:9999px}.vuefinder .rounded-lg{border-radius:.5rem}.vuefinder .border-0{border-width:0px}.vuefinder .border{border-width:1px}.vuefinder .border-t{border-top-width:1px}.vuefinder .border-b{border-bottom-width:1px}.vuefinder .border-l{border-left-width:1px}.vuefinder .border-r{border-right-width:1px}.vuefinder .border-neutral-300{--tw-border-opacity: 1;border-color:rgb(212 212 212 / var(--tw-border-opacity))}.vuefinder .border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.vuefinder .border-transparent{border-color:transparent}.vuefinder .border-red-400{--tw-border-opacity: 1;border-color:rgb(248 113 113 / var(--tw-border-opacity))}.vuefinder .border-lime-600{--tw-border-opacity: 1;border-color:rgb(101 163 13 / var(--tw-border-opacity))}.vuefinder .border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.vuefinder .bg-neutral-100{--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity))}.vuefinder .bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.vuefinder .bg-transparent{background-color:transparent}.vuefinder .bg-neutral-50{--tw-bg-opacity: 1;background-color:rgb(250 250 250 / var(--tw-bg-opacity))}.vuefinder .bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity))}.vuefinder .bg-emerald-100{--tw-bg-opacity: 1;background-color:rgb(209 250 229 / var(--tw-bg-opacity))}.vuefinder .bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.vuefinder .bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.vuefinder .bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity))}.vuefinder .bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.vuefinder .bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))}.vuefinder .bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.vuefinder .bg-blue-200{--tw-bg-opacity: 1;background-color:rgb(191 219 254 / var(--tw-bg-opacity))}.vuefinder .bg-blue-700\/75{background-color:#1d4ed8bf}.vuefinder .bg-opacity-75{--tw-bg-opacity: .75}.vuefinder .fill-gray-100{fill:#f3f4f6}.vuefinder .fill-white{fill:#fff}.vuefinder .fill-sky-500{fill:#0ea5e9}.vuefinder .fill-sky-100{fill:#e0f2fe}.vuefinder .stroke-blue-900{stroke:#1e3a8a}.vuefinder .stroke-gray-400{stroke:#9ca3af}.vuefinder .stroke-neutral-500{stroke:#737373}.vuefinder .stroke-sky-500{stroke:#0ea5e9}.vuefinder .stroke-slate-500{stroke:#64748b}.vuefinder .stroke-gray-500{stroke:#6b7280}.vuefinder .stroke-gray-200{stroke:#e5e7eb}.vuefinder .stroke-blue-600{stroke:#2563eb}.vuefinder .stroke-red-600{stroke:#dc2626}.vuefinder .p-1\.5{padding:.375rem}.vuefinder .p-1{padding:.25rem}.vuefinder .p-0\.5{padding:.125rem}.vuefinder .p-0{padding:0}.vuefinder .p-4{padding:1rem}.vuefinder .p-2{padding:.5rem}.vuefinder .px-1\.5{padding-left:.375rem;padding-right:.375rem}.vuefinder .py-1{padding-top:.25rem;padding-bottom:.25rem}.vuefinder .px-1{padding-left:.25rem;padding-right:.25rem}.vuefinder .px-2{padding-left:.5rem;padding-right:.5rem}.vuefinder .py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.vuefinder .py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.vuefinder .py-0{padding-top:0;padding-bottom:0}.vuefinder .px-4{padding-left:1rem;padding-right:1rem}.vuefinder .py-2{padding-top:.5rem;padding-bottom:.5rem}.vuefinder .py-3{padding-top:.75rem;padding-bottom:.75rem}.vuefinder .pt-1{padding-top:.25rem}.vuefinder .pb-0{padding-bottom:0}.vuefinder .pl-1{padding-left:.25rem}.vuefinder .pl-2{padding-left:.5rem}.vuefinder .pr-8{padding-right:2rem}.vuefinder .pt-5{padding-top:1.25rem}.vuefinder .pb-4{padding-bottom:1rem}.vuefinder .pb-1{padding-bottom:.25rem}.vuefinder .pt-3{padding-top:.75rem}.vuefinder .text-left{text-align:left}.vuefinder .text-center{text-align:center}.vuefinder .text-xs{font-size:.75rem;line-height:1rem}.vuefinder .text-sm{font-size:.875rem;line-height:1.25rem}.vuefinder .text-lg{font-size:1.125rem;line-height:1.75rem}.vuefinder .text-base{font-size:1rem;line-height:1.5rem}.vuefinder .font-medium{font-weight:500}.vuefinder .font-bold{font-weight:700}.vuefinder .font-normal{font-weight:400}.vuefinder .leading-5{line-height:1.25rem}.vuefinder .leading-6{line-height:1.5rem}.vuefinder .text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity))}.vuefinder .text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.vuefinder .text-neutral-300{--tw-text-opacity: 1;color:rgb(212 212 212 / var(--tw-text-opacity))}.vuefinder .text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.vuefinder .text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.vuefinder .text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.vuefinder .text-neutral-700{--tw-text-opacity: 1;color:rgb(64 64 64 / var(--tw-text-opacity))}.vuefinder .text-neutral-500{--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity))}.vuefinder .text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.vuefinder .text-emerald-600{--tw-text-opacity: 1;color:rgb(5 150 105 / var(--tw-text-opacity))}.vuefinder .text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity))}.vuefinder .text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}.vuefinder .text-lime-600{--tw-text-opacity: 1;color:rgb(101 163 13 / var(--tw-text-opacity))}.vuefinder .text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.vuefinder .text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.vuefinder .text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.vuefinder .text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.vuefinder .text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.vuefinder .opacity-25{opacity:.25}.vuefinder .opacity-75{opacity:.75}.vuefinder .opacity-0{opacity:0}.vuefinder .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 .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 .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 .outline-0{outline-width:0px}.vuefinder .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 .blur{--tw-blur: blur(8px);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 .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 .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.vuefinder .transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.vuefinder .duration-1000{transition-duration:1s}.vuefinder .hover\:bg-neutral-300:hover{--tw-bg-opacity: 1;background-color:rgb(212 212 212 / var(--tw-bg-opacity))}.vuefinder .hover\:bg-neutral-100:hover{--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity))}.vuefinder .hover\:bg-neutral-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 229 229 / var(--tw-bg-opacity))}.vuefinder .hover\:bg-neutral-50:hover{--tw-bg-opacity: 1;background-color:rgb(250 250 250 / var(--tw-bg-opacity))}.vuefinder .hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity))}.vuefinder .hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.vuefinder .hover\:bg-red-700:hover{--tw-bg-opacity: 1;background-color:rgb(185 28 28 / var(--tw-bg-opacity))}.vuefinder .hover\:bg-blue-200:hover{--tw-bg-opacity: 1;background-color:rgb(191 219 254 / var(--tw-bg-opacity))}.vuefinder .hover\:stroke-cyan-700:hover{stroke:#0e7490}.vuefinder .hover\:stroke-sky-600:hover{stroke:#0284c7}.vuefinder .focus\:border-transparent:focus{border-color:transparent}.vuefinder .focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.vuefinder .focus\:ring-2: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(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)}.vuefinder .focus\:ring-transparent:focus{--tw-ring-color: transparent}.vuefinder .focus\:ring-red-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity))}.vuefinder .focus\:ring-indigo-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.vuefinder .focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.vuefinder .dark .dark\:border-t{border-top-width:1px}.vuefinder .dark .dark\:border-gray-700\/50{border-color:#37415180}.vuefinder .dark .dark\:border-gray-600{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.vuefinder .dark .dark\:border-gray-700{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.vuefinder .dark .dark\:border-red-300{--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity))}.vuefinder .dark .dark\:border-gray-900{--tw-border-opacity: 1;border-color:rgb(17 24 39 / var(--tw-border-opacity))}.vuefinder .dark .dark\:bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.vuefinder .dark .dark\:bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.vuefinder .dark .dark\:bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.vuefinder .dark .dark\:bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.vuefinder .dark .dark\:bg-gray-700\/25{background-color:#37415140}.vuefinder .dark .dark\:bg-gray-700\/50{background-color:#37415180}.vuefinder .dark .dark\:bg-opacity-75{--tw-bg-opacity: .75}.vuefinder .dark .dark\:fill-gray-400\/20{fill:#9ca3af33}.vuefinder .dark .dark\:fill-gray-700{fill:#374151}.vuefinder .dark .dark\:fill-slate-500{fill:#64748b}.vuefinder .dark .dark\:stroke-blue-100{stroke:#dbeafe}.vuefinder .dark .dark\:stroke-gray-400{stroke:#9ca3af}.vuefinder .dark .dark\:stroke-gray-600{stroke:#4b5563}.vuefinder .dark .dark\:stroke-slate-500{stroke:#64748b}.vuefinder .dark .dark\:stroke-gray-700{stroke:#374151}.vuefinder .dark .dark\:stroke-red-200{stroke:#fecaca}.vuefinder .dark .dark\:text-neutral-200{--tw-text-opacity: 1;color:rgb(229 229 229 / var(--tw-text-opacity))}.vuefinder .dark .dark\:text-neutral-500{--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity))}.vuefinder .dark .dark\:text-neutral-300{--tw-text-opacity: 1;color:rgb(212 212 212 / var(--tw-text-opacity))}.vuefinder .dark .dark\:text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.vuefinder .dark .dark\:text-slate-200{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity))}.vuefinder .dark .dark\:text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.vuefinder .dark .dark\:text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.vuefinder .dark .dark\:text-neutral-50{--tw-text-opacity: 1;color:rgb(250 250 250 / var(--tw-text-opacity))}.vuefinder .dark .dark\:text-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity))}.vuefinder .dark .dark\:text-lime-300{--tw-text-opacity: 1;color:rgb(190 242 100 / var(--tw-text-opacity))}.vuefinder .dark .dark\:text-neutral-400{--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity))}.vuefinder .dark .dark\:text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.vuefinder .dark .dark\:text-gray-100{--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity))}.vuefinder .dark .dark\:text-red-200{--tw-text-opacity: 1;color:rgb(254 202 202 / var(--tw-text-opacity))}.vuefinder .dark .dark\:text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.vuefinder .dark .dark\:selection\:bg-gray-500 *::-moz-selection{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.vuefinder .dark .dark\:selection\:bg-gray-500 *::selection{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.vuefinder .dark .dark\:selection\:bg-gray-500::-moz-selection{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.vuefinder .dark .dark\:selection\:bg-gray-500::selection{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.vuefinder .dark .dark\:hover\:bg-gray-700:hover{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.vuefinder .dark .dark\:hover\:bg-gray-800:hover{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.vuefinder .dark .dark\:hover\:bg-gray-700\/10:hover{background-color:#3741511a}.vuefinder .dark .dark\:hover\:bg-gray-600\/75:hover{background-color:#4b5563bf}.vuefinder .dark .dark\:hover\:bg-gray-700\/50:hover{background-color:#37415180}.vuefinder .dark .dark\:hover\:bg-gray-500:hover{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.vuefinder .dark .dark\:hover\:stroke-gray-300:hover{stroke:#d1d5db}.vuefinder .dark .dark\:focus\:border-transparent:focus{border-color:transparent}.vuefinder .dark .dark\:focus\:border-gray-600:focus{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.vuefinder .dark .dark\:focus\:ring-transparent:focus{--tw-ring-color: transparent}.vuefinder .dark .dark\:focus\:ring-gray-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(75 85 99 / var(--tw-ring-opacity))}.vuefinder .dark .dark\:focus\:ring-gray-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(156 163 175 / var(--tw-ring-opacity))}@media (min-width: 640px){.vuefinder .sm\:mx-0{margin-left:0;margin-right:0}.vuefinder .sm\:my-8{margin-top:2rem;margin-bottom:2rem}.vuefinder .sm\:mt-0{margin-top:0}.vuefinder .sm\:ml-4{margin-left:1rem}.vuefinder .sm\:ml-3{margin-left:.75rem}.vuefinder .sm\:flex{display:flex}.vuefinder .sm\:h-10{height:2.5rem}.vuefinder .sm\:w-10{width:2.5rem}.vuefinder .sm\:w-auto{width:auto}.vuefinder .sm\:max-w-4xl{max-width:56rem}.vuefinder .sm\:flex-row-reverse{flex-direction:row-reverse}.vuefinder .sm\:items-start{align-items:flex-start}.vuefinder .sm\:items-center{align-items:center}.vuefinder .sm\:p-0{padding:0}.vuefinder .sm\:p-6{padding:1.5rem}.vuefinder .sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.vuefinder .sm\:pb-4{padding-bottom:1rem}.vuefinder .sm\:text-left{text-align:left}.vuefinder .sm\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 768px){.vuefinder .md\:top-5{top:1.25rem}.vuefinder .md\:right-\[-2\.4rem\]{right:-2.4rem}.vuefinder .md\:block{display:block}.vuefinder .md\:h-12{height:3rem}.vuefinder .md\:h-8{height:2rem}.vuefinder .md\:w-12{width:3rem}.vuefinder .md\:w-24{width:6rem}.vuefinder .md\:w-8{width:2rem}.vuefinder .md\:max-w-2xl{max-width:42rem}}@media (min-width: 1024px){.vuefinder .lg\:max-w-3xl{max-width:48rem}}@media (min-width: 1280px){.vuefinder .xl\:max-w-5xl{max-width:64rem}}[aria-label][role~=tooltip]{position:relative}[aria-label][role~=tooltip]:before,[aria-label][role~=tooltip]:after{transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden;will-change:transform;opacity:0;pointer-events:none;transition:all var(--microtip-transition-duration, .18s) var(--microtip-transition-easing, ease-in-out) var(--microtip-transition-delay, 0s);position:absolute;box-sizing:border-box;z-index:10;transform-origin:top}[aria-label][role~=tooltip]:before{background-size:100% auto!important;content:""}[aria-label][role~=tooltip]:after{background:rgba(17,17,17,.9);border-radius:4px;color:#fff;content:attr(aria-label);font-size:var(--microtip-font-size, 13px);font-weight:var(--microtip-font-weight, normal);text-transform:var(--microtip-text-transform, none);padding:.5em 1em;white-space:nowrap;box-sizing:content-box}[aria-label][role~=tooltip]:hover:before,[aria-label][role~=tooltip]:hover:after,[aria-label][role~=tooltip]:focus:before,[aria-label][role~=tooltip]:focus:after{opacity:1;pointer-events:auto}[role~=tooltip][data-microtip-position|=top]:before{background:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2236px%22%20height%3D%2212px%22%3E%3Cpath%20fill%3D%22rgba%2817,%2017,%2017,%200.9%29%22%20transform%3D%22rotate%280%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E) no-repeat;height:6px;width:18px;margin-bottom:5px}[role~=tooltip][data-microtip-position|=top]:after{margin-bottom:11px}[role~=tooltip][data-microtip-position|=top]:before{transform:translate3d(-50%,0,0);bottom:100%;left:50%}[role~=tooltip][data-microtip-position|=top]:hover:before{transform:translate3d(-50%,-5px,0)}[role~=tooltip][data-microtip-position|=top]:after{transform:translate3d(-50%,0,0);bottom:100%;left:50%}[role~=tooltip][data-microtip-position=top]:hover:after{transform:translate3d(-50%,-5px,0)}[role~=tooltip][data-microtip-position=top-left]:after{transform:translate3d(calc(-100% + 16px),0,0);bottom:100%}[role~=tooltip][data-microtip-position=top-left]:hover:after{transform:translate3d(calc(-100% + 16px),-5px,0)}[role~=tooltip][data-microtip-position=top-right]:after{transform:translate3d(calc(0% - 16px),0,0);bottom:100%}[role~=tooltip][data-microtip-position=top-right]:hover:after{transform:translate3d(calc(0% - 16px),-5px,0)}[role~=tooltip][data-microtip-position|=bottom]:before{background:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2236px%22%20height%3D%2212px%22%3E%3Cpath%20fill%3D%22rgba%2817,%2017,%2017,%200.9%29%22%20transform%3D%22rotate%28180%2018%206%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E) no-repeat;height:6px;width:18px;margin-top:5px;margin-bottom:0}[role~=tooltip][data-microtip-position|=bottom]:after{margin-top:11px}[role~=tooltip][data-microtip-position|=bottom]:before{transform:translate3d(-50%,-10px,0);bottom:auto;left:50%;top:100%}[role~=tooltip][data-microtip-position|=bottom]:hover:before{transform:translate3d(-50%,0,0)}[role~=tooltip][data-microtip-position|=bottom]:after{transform:translate3d(-50%,-10px,0);top:100%;left:50%}[role~=tooltip][data-microtip-position=bottom]:hover:after{transform:translate3d(-50%,0,0)}[role~=tooltip][data-microtip-position=bottom-left]:after{transform:translate3d(calc(-100% + 16px),-10px,0);top:100%}[role~=tooltip][data-microtip-position=bottom-left]:hover:after{transform:translate3d(calc(-100% + 16px),0,0)}[role~=tooltip][data-microtip-position=bottom-right]:after{transform:translate3d(calc(0% - 16px),-10px,0);top:100%}[role~=tooltip][data-microtip-position=bottom-right]:hover:after{transform:translate3d(calc(0% - 16px),0,0)}[role~=tooltip][data-microtip-position=left]:before,[role~=tooltip][data-microtip-position=left]:after{bottom:auto;left:auto;right:100%;top:50%;transform:translate3d(10px,-50%,0)}[role~=tooltip][data-microtip-position=left]:before{background:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2212px%22%20height%3D%2236px%22%3E%3Cpath%20fill%3D%22rgba%2817,%2017,%2017,%200.9%29%22%20transform%3D%22rotate%28-90%2018%2018%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E) no-repeat;height:18px;width:6px;margin-right:5px;margin-bottom:0}[role~=tooltip][data-microtip-position=left]:after{margin-right:11px}[role~=tooltip][data-microtip-position=left]:hover:before,[role~=tooltip][data-microtip-position=left]:hover:after{transform:translate3d(0,-50%,0)}[role~=tooltip][data-microtip-position=right]:before,[role~=tooltip][data-microtip-position=right]:after{bottom:auto;left:100%;top:50%;transform:translate3d(-10px,-50%,0)}[role~=tooltip][data-microtip-position=right]:before{background:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2212px%22%20height%3D%2236px%22%3E%3Cpath%20fill%3D%22rgba%2817,%2017,%2017,%200.9%29%22%20transform%3D%22rotate%2890%206%206%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E) no-repeat;height:18px;width:6px;margin-bottom:0;margin-left:5px}[role~=tooltip][data-microtip-position=right]:after{margin-left:11px}[role~=tooltip][data-microtip-position=right]:hover:before,[role~=tooltip][data-microtip-position=right]:hover:after{transform:translate3d(0,-50%,0)}[role~=tooltip][data-microtip-size=small]:after{white-space:initial;width:80px}[role~=tooltip][data-microtip-size=medium]:after{white-space:initial;width:150px}[role~=tooltip][data-microtip-size=large]:after{white-space:initial;width:260px} + * Date: 2022-11-20T05:30:43.444Z + */.cropper-container{direction:ltr;font-size:0;line-height:0;position:relative;touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.cropper-container img{-webkit-backface-visibility:hidden;backface-visibility:hidden;display:block;height:100%;image-orientation:0deg;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}.cropper-wrap-box,.cropper-canvas,.cropper-drag-box,.cropper-crop-box,.cropper-modal{bottom:0;left:0;position:absolute;right:0;top:0}.cropper-wrap-box,.cropper-canvas{overflow:hidden}.cropper-drag-box{background-color:#fff;opacity:0}.cropper-modal{background-color:#000;opacity:.5}.cropper-view-box{display:block;height:100%;outline:1px solid #39f;outline-color:#3399ffbf;overflow:hidden;width:100%}.cropper-dashed{border:0 dashed #eee;display:block;opacity:.5;position:absolute}.cropper-dashed.dashed-h{border-bottom-width:1px;border-top-width:1px;height:calc(100% / 3);left:0;top:calc(100% / 3);width:100%}.cropper-dashed.dashed-v{border-left-width:1px;border-right-width:1px;height:100%;left:calc(100% / 3);top:0;width:calc(100% / 3)}.cropper-center{display:block;height:0;left:50%;opacity:.75;position:absolute;top:50%;width:0}.cropper-center:before,.cropper-center:after{background-color:#eee;content:" ";display:block;position:absolute}.cropper-center:before{height:1px;left:-3px;top:0;width:7px}.cropper-center:after{height:7px;left:0;top:-3px;width:1px}.cropper-face,.cropper-line,.cropper-point{display:block;height:100%;opacity:.1;position:absolute;width:100%}.cropper-face{background-color:#fff;left:0;top:0}.cropper-line{background-color:#39f}.cropper-line.line-e{cursor:ew-resize;right:-3px;top:0;width:5px}.cropper-line.line-n{cursor:ns-resize;height:5px;left:0;top:-3px}.cropper-line.line-w{cursor:ew-resize;left:-3px;top:0;width:5px}.cropper-line.line-s{bottom:-3px;cursor:ns-resize;height:5px;left:0}.cropper-point{background-color:#39f;height:5px;opacity:.75;width:5px}.cropper-point.point-e{cursor:ew-resize;margin-top:-3px;right:-3px;top:50%}.cropper-point.point-n{cursor:ns-resize;left:50%;margin-left:-3px;top:-3px}.cropper-point.point-w{cursor:ew-resize;left:-3px;margin-top:-3px;top:50%}.cropper-point.point-s{bottom:-3px;cursor:s-resize;left:50%;margin-left:-3px}.cropper-point.point-ne{cursor:nesw-resize;right:-3px;top:-3px}.cropper-point.point-nw{cursor:nwse-resize;left:-3px;top:-3px}.cropper-point.point-sw{bottom:-3px;cursor:nesw-resize;left:-3px}.cropper-point.point-se{bottom:-3px;cursor:nwse-resize;height:20px;opacity:1;right:-3px;width:20px}@media (min-width: 768px){.cropper-point.point-se{height:15px;width:15px}}@media (min-width: 992px){.cropper-point.point-se{height:10px;width:10px}}@media (min-width: 1200px){.cropper-point.point-se{height:5px;opacity:.75;width:5px}}.cropper-point.point-se:before{background-color:#39f;bottom:-50%;content:" ";display:block;height:200%;opacity:0;position:absolute;right:-50%;width:200%}.cropper-invisible{opacity:0}.cropper-bg{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC)}.cropper-hide{display:block;height:0;position:absolute;width:0}.cropper-hidden{display:none!important}.cropper-move{cursor:move}.cropper-crop{cursor:crosshair}.cropper-disabled .cropper-drag-box,.cropper-disabled .cropper-face,.cropper-disabled .cropper-line,.cropper-disabled .cropper-point{cursor:not-allowed}.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 *{touch-action:manipulation}.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}.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-selector-area::-webkit-scrollbar{width:12px}.vf-selector-area::-webkit-scrollbar-track-piece{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.dark .vf-selector-area::-webkit-scrollbar-track-piece{background-color:#0f172a80}.vf-selector-area::-webkit-scrollbar-thumb{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.dark .vf-selector-area::-webkit-scrollbar-thumb{--tw-bg-opacity: 1;background-color:rgb(51 65 85 / var(--tw-bg-opacity))}.vf-selector-area::-webkit-scrollbar-thumb:hover{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.dark .vf-selector-area::-webkit-scrollbar-thumb:hover{--tw-bg-opacity: 1;background-color:rgb(71 85 105 / var(--tw-bg-opacity))}.vf-selector-area::-webkit-scrollbar-corner{background-color:transparent}.vuefinder .fixed{position:fixed}.vuefinder .absolute{position:absolute}.vuefinder .relative{position:relative}.vuefinder .inset-0{top:0px;right:0px;bottom:0px;left:0px}.vuefinder .-top-96{top:-24rem}.vuefinder .top-4{top:1rem}.vuefinder .right-\[-2rem\]{right:-2rem}.vuefinder .top-1\/2{top:50%}.vuefinder .bottom-0{bottom:0px}.vuefinder .left-1\/2{left:50%}.vuefinder .z-30{z-index:30}.vuefinder .-z-50{z-index:-50}.vuefinder .z-10{z-index:10}.vuefinder .z-20{z-index:20}.vuefinder .z-0{z-index:0}.vuefinder .col-span-7{grid-column:span 7 / span 7}.vuefinder .col-span-2{grid-column:span 2 / span 2}.vuefinder .col-span-3{grid-column:span 3 / span 3}.vuefinder .col-span-5{grid-column:span 5 / span 5}.vuefinder .m-auto{margin:auto}.vuefinder .m-1{margin:.25rem}.vuefinder .mx-0\.5{margin-left:.125rem;margin-right:.125rem}.vuefinder .mx-0{margin-left:0;margin-right:0}.vuefinder .my-0\.5{margin-top:.125rem;margin-bottom:.125rem}.vuefinder .my-0{margin-top:0;margin-bottom:0}.vuefinder .mx-2{margin-left:.5rem;margin-right:.5rem}.vuefinder .mx-auto{margin-left:auto;margin-right:auto}.vuefinder .mx-1\.5{margin-left:.375rem;margin-right:.375rem}.vuefinder .mx-1{margin-left:.25rem;margin-right:.25rem}.vuefinder .my-1{margin-top:.25rem;margin-bottom:.25rem}.vuefinder .ml-2{margin-left:.5rem}.vuefinder .ml-auto{margin-left:auto}.vuefinder .ml-4{margin-left:1rem}.vuefinder .mt-1{margin-top:.25rem}.vuefinder .ml-3{margin-left:.75rem}.vuefinder .ml-1{margin-left:.25rem}.vuefinder .mr-3{margin-right:.75rem}.vuefinder .mr-1{margin-right:.25rem}.vuefinder .mt-3{margin-top:.75rem}.vuefinder .mt-2{margin-top:.5rem}.vuefinder .ml-1\.5{margin-left:.375rem}.vuefinder .-ml-1{margin-left:-.25rem}.vuefinder .mb-1{margin-bottom:.25rem}.vuefinder .mb-2{margin-bottom:.5rem}.vuefinder .inline-block{display:inline-block}.vuefinder .flex{display:flex}.vuefinder .inline-flex{display:inline-flex}.vuefinder .grid{display:grid}.vuefinder .hidden{display:none}.vuefinder .\!hidden{display:none!important}.vuefinder .h-6{height:1.5rem}.vuefinder .h-full{height:100%}.vuefinder .h-5{height:1.25rem}.vuefinder .h-20{height:5rem}.vuefinder .h-10{height:2.5rem}.vuefinder .h-12{height:3rem}.vuefinder .h-\[60vh\]{height:60vh}.vuefinder .max-h-\[50vh\]{max-height:50vh}.vuefinder .max-h-\[60vh\]{max-height:60vh}.vuefinder .min-h-\[150px\]{min-height:150px}.vuefinder .min-h-full{min-height:100%}.vuefinder .min-h-\[200px\]{min-height:200px}.vuefinder .w-6{width:1.5rem}.vuefinder .w-full{width:100%}.vuefinder .w-5{width:1.25rem}.vuefinder .w-\[5\.5rem\]{width:5.5rem}.vuefinder .w-10{width:2.5rem}.vuefinder .w-screen{width:100vw}.vuefinder .w-12{width:3rem}.vuefinder .min-w-max{min-width:-moz-max-content;min-width:max-content}.vuefinder .min-w-min{min-width:-moz-min-content;min-width:min-content}.vuefinder .max-w-fit{max-width:-moz-fit-content;max-width:fit-content}.vuefinder .max-w-\[50vh\]{max-width:50vh}.vuefinder .flex-auto{flex:1 1 auto}.vuefinder .flex-shrink-0{flex-shrink:0}.vuefinder .-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 .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 .animate-spin{animation:spin 1s linear infinite}.vuefinder .cursor-pointer{cursor:pointer}.vuefinder .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.vuefinder .resize-y{resize:vertical}.vuefinder .grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.vuefinder .grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.vuefinder .flex-col{flex-direction:column}.vuefinder .items-end{align-items:flex-end}.vuefinder .items-center{align-items:center}.vuefinder .justify-end{justify-content:flex-end}.vuefinder .justify-center{justify-content:center}.vuefinder .justify-between{justify-content:space-between}.vuefinder .overflow-auto{overflow:auto}.vuefinder .overflow-hidden{overflow:hidden}.vuefinder .overflow-ellipsis{text-overflow:ellipsis}.vuefinder .whitespace-nowrap{white-space:nowrap}.vuefinder .whitespace-pre-wrap{white-space:pre-wrap}.vuefinder .break-all{word-break:break-all}.vuefinder .rounded{border-radius:.25rem}.vuefinder .rounded-md{border-radius:.375rem}.vuefinder .rounded-full{border-radius:9999px}.vuefinder .rounded-lg{border-radius:.5rem}.vuefinder .border-0{border-width:0px}.vuefinder .border{border-width:1px}.vuefinder .border-t{border-top-width:1px}.vuefinder .border-b{border-bottom-width:1px}.vuefinder .border-l{border-left-width:1px}.vuefinder .border-r{border-right-width:1px}.vuefinder .border-neutral-300{--tw-border-opacity: 1;border-color:rgb(212 212 212 / var(--tw-border-opacity))}.vuefinder .border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.vuefinder .border-transparent{border-color:transparent}.vuefinder .border-red-400{--tw-border-opacity: 1;border-color:rgb(248 113 113 / var(--tw-border-opacity))}.vuefinder .border-lime-600{--tw-border-opacity: 1;border-color:rgb(101 163 13 / var(--tw-border-opacity))}.vuefinder .border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.vuefinder .bg-neutral-100{--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity))}.vuefinder .bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.vuefinder .bg-transparent{background-color:transparent}.vuefinder .bg-neutral-50{--tw-bg-opacity: 1;background-color:rgb(250 250 250 / var(--tw-bg-opacity))}.vuefinder .bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity))}.vuefinder .bg-emerald-100{--tw-bg-opacity: 1;background-color:rgb(209 250 229 / var(--tw-bg-opacity))}.vuefinder .bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.vuefinder .bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.vuefinder .bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity))}.vuefinder .bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.vuefinder .bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))}.vuefinder .bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.vuefinder .bg-blue-200{--tw-bg-opacity: 1;background-color:rgb(191 219 254 / var(--tw-bg-opacity))}.vuefinder .bg-blue-700\/75{background-color:#1d4ed8bf}.vuefinder .bg-opacity-75{--tw-bg-opacity: .75}.vuefinder .fill-gray-100{fill:#f3f4f6}.vuefinder .fill-white{fill:#fff}.vuefinder .fill-sky-500{fill:#0ea5e9}.vuefinder .fill-sky-100{fill:#e0f2fe}.vuefinder .stroke-blue-900{stroke:#1e3a8a}.vuefinder .stroke-gray-400{stroke:#9ca3af}.vuefinder .stroke-neutral-500{stroke:#737373}.vuefinder .stroke-sky-500{stroke:#0ea5e9}.vuefinder .stroke-slate-500{stroke:#64748b}.vuefinder .stroke-gray-500{stroke:#6b7280}.vuefinder .stroke-gray-200{stroke:#e5e7eb}.vuefinder .stroke-blue-600{stroke:#2563eb}.vuefinder .stroke-red-600{stroke:#dc2626}.vuefinder .p-1\.5{padding:.375rem}.vuefinder .p-1{padding:.25rem}.vuefinder .p-0\.5{padding:.125rem}.vuefinder .p-0{padding:0}.vuefinder .p-4{padding:1rem}.vuefinder .p-2{padding:.5rem}.vuefinder .px-1\.5{padding-left:.375rem;padding-right:.375rem}.vuefinder .py-1{padding-top:.25rem;padding-bottom:.25rem}.vuefinder .px-1{padding-left:.25rem;padding-right:.25rem}.vuefinder .px-2{padding-left:.5rem;padding-right:.5rem}.vuefinder .py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.vuefinder .py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.vuefinder .py-0{padding-top:0;padding-bottom:0}.vuefinder .px-4{padding-left:1rem;padding-right:1rem}.vuefinder .py-2{padding-top:.5rem;padding-bottom:.5rem}.vuefinder .py-3{padding-top:.75rem;padding-bottom:.75rem}.vuefinder .pt-1{padding-top:.25rem}.vuefinder .pb-0{padding-bottom:0}.vuefinder .pl-1{padding-left:.25rem}.vuefinder .pl-2{padding-left:.5rem}.vuefinder .pr-8{padding-right:2rem}.vuefinder .pt-5{padding-top:1.25rem}.vuefinder .pb-4{padding-bottom:1rem}.vuefinder .pb-1{padding-bottom:.25rem}.vuefinder .pt-3{padding-top:.75rem}.vuefinder .text-left{text-align:left}.vuefinder .text-center{text-align:center}.vuefinder .text-xs{font-size:.75rem;line-height:1rem}.vuefinder .text-sm{font-size:.875rem;line-height:1.25rem}.vuefinder .text-lg{font-size:1.125rem;line-height:1.75rem}.vuefinder .text-base{font-size:1rem;line-height:1.5rem}.vuefinder .font-medium{font-weight:500}.vuefinder .font-bold{font-weight:700}.vuefinder .font-normal{font-weight:400}.vuefinder .leading-5{line-height:1.25rem}.vuefinder .leading-6{line-height:1.5rem}.vuefinder .text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity))}.vuefinder .text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.vuefinder .text-neutral-300{--tw-text-opacity: 1;color:rgb(212 212 212 / var(--tw-text-opacity))}.vuefinder .text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.vuefinder .text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.vuefinder .text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.vuefinder .text-neutral-700{--tw-text-opacity: 1;color:rgb(64 64 64 / var(--tw-text-opacity))}.vuefinder .text-neutral-500{--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity))}.vuefinder .text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.vuefinder .text-emerald-600{--tw-text-opacity: 1;color:rgb(5 150 105 / var(--tw-text-opacity))}.vuefinder .text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity))}.vuefinder .text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}.vuefinder .text-lime-600{--tw-text-opacity: 1;color:rgb(101 163 13 / var(--tw-text-opacity))}.vuefinder .text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.vuefinder .text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.vuefinder .text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.vuefinder .text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.vuefinder .text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.vuefinder .opacity-25{opacity:.25}.vuefinder .opacity-75{opacity:.75}.vuefinder .opacity-0{opacity:0}.vuefinder .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 .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 .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 .outline-0{outline-width:0px}.vuefinder .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 .blur{--tw-blur: blur(8px);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 .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 .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.vuefinder .transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.vuefinder .duration-1000{transition-duration:1s}.vuefinder .hover\:bg-neutral-300:hover{--tw-bg-opacity: 1;background-color:rgb(212 212 212 / var(--tw-bg-opacity))}.vuefinder .hover\:bg-neutral-100:hover{--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity))}.vuefinder .hover\:bg-neutral-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 229 229 / var(--tw-bg-opacity))}.vuefinder .hover\:bg-neutral-50:hover{--tw-bg-opacity: 1;background-color:rgb(250 250 250 / var(--tw-bg-opacity))}.vuefinder .hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity))}.vuefinder .hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.vuefinder .hover\:bg-red-700:hover{--tw-bg-opacity: 1;background-color:rgb(185 28 28 / var(--tw-bg-opacity))}.vuefinder .hover\:bg-blue-200:hover{--tw-bg-opacity: 1;background-color:rgb(191 219 254 / var(--tw-bg-opacity))}.vuefinder .hover\:stroke-cyan-700:hover{stroke:#0e7490}.vuefinder .hover\:stroke-sky-600:hover{stroke:#0284c7}.vuefinder .focus\:border-transparent:focus{border-color:transparent}.vuefinder .focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.vuefinder .focus\:ring-2: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(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)}.vuefinder .focus\:ring-transparent:focus{--tw-ring-color: transparent}.vuefinder .focus\:ring-red-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity))}.vuefinder .focus\:ring-indigo-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.vuefinder .focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.vuefinder .dark .dark\:border-t{border-top-width:1px}.vuefinder .dark .dark\:border-gray-700\/50{border-color:#37415180}.vuefinder .dark .dark\:border-gray-600{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.vuefinder .dark .dark\:border-gray-700{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.vuefinder .dark .dark\:border-red-300{--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity))}.vuefinder .dark .dark\:border-gray-900{--tw-border-opacity: 1;border-color:rgb(17 24 39 / var(--tw-border-opacity))}.vuefinder .dark .dark\:bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.vuefinder .dark .dark\:bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.vuefinder .dark .dark\:bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.vuefinder .dark .dark\:bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.vuefinder .dark .dark\:bg-gray-700\/25{background-color:#37415140}.vuefinder .dark .dark\:bg-gray-700\/50{background-color:#37415180}.vuefinder .dark .dark\:bg-opacity-75{--tw-bg-opacity: .75}.vuefinder .dark .dark\:fill-gray-400\/20{fill:#9ca3af33}.vuefinder .dark .dark\:fill-gray-700{fill:#374151}.vuefinder .dark .dark\:fill-slate-500{fill:#64748b}.vuefinder .dark .dark\:stroke-blue-100{stroke:#dbeafe}.vuefinder .dark .dark\:stroke-gray-400{stroke:#9ca3af}.vuefinder .dark .dark\:stroke-gray-600{stroke:#4b5563}.vuefinder .dark .dark\:stroke-slate-500{stroke:#64748b}.vuefinder .dark .dark\:stroke-gray-700{stroke:#374151}.vuefinder .dark .dark\:stroke-red-200{stroke:#fecaca}.vuefinder .dark .dark\:text-neutral-200{--tw-text-opacity: 1;color:rgb(229 229 229 / var(--tw-text-opacity))}.vuefinder .dark .dark\:text-neutral-500{--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity))}.vuefinder .dark .dark\:text-neutral-300{--tw-text-opacity: 1;color:rgb(212 212 212 / var(--tw-text-opacity))}.vuefinder .dark .dark\:text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.vuefinder .dark .dark\:text-slate-200{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity))}.vuefinder .dark .dark\:text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.vuefinder .dark .dark\:text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.vuefinder .dark .dark\:text-neutral-50{--tw-text-opacity: 1;color:rgb(250 250 250 / var(--tw-text-opacity))}.vuefinder .dark .dark\:text-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity))}.vuefinder .dark .dark\:text-lime-300{--tw-text-opacity: 1;color:rgb(190 242 100 / var(--tw-text-opacity))}.vuefinder .dark .dark\:text-neutral-400{--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity))}.vuefinder .dark .dark\:text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.vuefinder .dark .dark\:text-gray-100{--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity))}.vuefinder .dark .dark\:text-red-200{--tw-text-opacity: 1;color:rgb(254 202 202 / var(--tw-text-opacity))}.vuefinder .dark .dark\:text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.vuefinder .dark .dark\:selection\:bg-gray-500 *::-moz-selection{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.vuefinder .dark .dark\:selection\:bg-gray-500 *::selection{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.vuefinder .dark .dark\:selection\:bg-gray-500::-moz-selection{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.vuefinder .dark .dark\:selection\:bg-gray-500::selection{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.vuefinder .dark .dark\:hover\:bg-gray-700:hover{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.vuefinder .dark .dark\:hover\:bg-gray-800:hover{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.vuefinder .dark .dark\:hover\:bg-gray-700\/10:hover{background-color:#3741511a}.vuefinder .dark .dark\:hover\:bg-gray-600\/75:hover{background-color:#4b5563bf}.vuefinder .dark .dark\:hover\:bg-gray-700\/50:hover{background-color:#37415180}.vuefinder .dark .dark\:hover\:bg-gray-500:hover{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.vuefinder .dark .dark\:hover\:stroke-gray-300:hover{stroke:#d1d5db}.vuefinder .dark .dark\:focus\:border-transparent:focus{border-color:transparent}.vuefinder .dark .dark\:focus\:border-gray-600:focus{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.vuefinder .dark .dark\:focus\:ring-transparent:focus{--tw-ring-color: transparent}.vuefinder .dark .dark\:focus\:ring-gray-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(75 85 99 / var(--tw-ring-opacity))}.vuefinder .dark .dark\:focus\:ring-gray-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(156 163 175 / var(--tw-ring-opacity))}@media (min-width: 640px){.vuefinder .sm\:mx-0{margin-left:0;margin-right:0}.vuefinder .sm\:my-8{margin-top:2rem;margin-bottom:2rem}.vuefinder .sm\:mt-0{margin-top:0}.vuefinder .sm\:ml-4{margin-left:1rem}.vuefinder .sm\:ml-3{margin-left:.75rem}.vuefinder .sm\:flex{display:flex}.vuefinder .sm\:h-10{height:2.5rem}.vuefinder .sm\:w-10{width:2.5rem}.vuefinder .sm\:w-auto{width:auto}.vuefinder .sm\:max-w-4xl{max-width:56rem}.vuefinder .sm\:flex-row-reverse{flex-direction:row-reverse}.vuefinder .sm\:items-start{align-items:flex-start}.vuefinder .sm\:items-center{align-items:center}.vuefinder .sm\:p-0{padding:0}.vuefinder .sm\:p-6{padding:1.5rem}.vuefinder .sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.vuefinder .sm\:pb-4{padding-bottom:1rem}.vuefinder .sm\:text-left{text-align:left}.vuefinder .sm\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 768px){.vuefinder .md\:top-5{top:1.25rem}.vuefinder .md\:right-\[-2\.4rem\]{right:-2.4rem}.vuefinder .md\:block{display:block}.vuefinder .md\:h-12{height:3rem}.vuefinder .md\:h-8{height:2rem}.vuefinder .md\:w-12{width:3rem}.vuefinder .md\:w-24{width:6rem}.vuefinder .md\:w-8{width:2rem}.vuefinder .md\:max-w-2xl{max-width:42rem}}@media (min-width: 1024px){.vuefinder .lg\:max-w-3xl{max-width:48rem}}@media (min-width: 1280px){.vuefinder .xl\:max-w-5xl{max-width:64rem}}[aria-label][role~=tooltip]{position:relative}[aria-label][role~=tooltip]:before,[aria-label][role~=tooltip]:after{transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden;will-change:transform;opacity:0;pointer-events:none;transition:all var(--microtip-transition-duration, .18s) var(--microtip-transition-easing, ease-in-out) var(--microtip-transition-delay, 0s);position:absolute;box-sizing:border-box;z-index:10;transform-origin:top}[aria-label][role~=tooltip]:before{background-size:100% auto!important;content:""}[aria-label][role~=tooltip]:after{background:rgba(17,17,17,.9);border-radius:4px;color:#fff;content:attr(aria-label);font-size:var(--microtip-font-size, 13px);font-weight:var(--microtip-font-weight, normal);text-transform:var(--microtip-text-transform, none);padding:.5em 1em;white-space:nowrap;box-sizing:content-box}[aria-label][role~=tooltip]:hover:before,[aria-label][role~=tooltip]:hover:after,[aria-label][role~=tooltip]:focus:before,[aria-label][role~=tooltip]:focus:after{opacity:1;pointer-events:auto}[role~=tooltip][data-microtip-position|=top]:before{background:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2236px%22%20height%3D%2212px%22%3E%3Cpath%20fill%3D%22rgba%2817,%2017,%2017,%200.9%29%22%20transform%3D%22rotate%280%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E) no-repeat;height:6px;width:18px;margin-bottom:5px}[role~=tooltip][data-microtip-position|=top]:after{margin-bottom:11px}[role~=tooltip][data-microtip-position|=top]:before{transform:translate3d(-50%,0,0);bottom:100%;left:50%}[role~=tooltip][data-microtip-position|=top]:hover:before{transform:translate3d(-50%,-5px,0)}[role~=tooltip][data-microtip-position|=top]:after{transform:translate3d(-50%,0,0);bottom:100%;left:50%}[role~=tooltip][data-microtip-position=top]:hover:after{transform:translate3d(-50%,-5px,0)}[role~=tooltip][data-microtip-position=top-left]:after{transform:translate3d(calc(-100% + 16px),0,0);bottom:100%}[role~=tooltip][data-microtip-position=top-left]:hover:after{transform:translate3d(calc(-100% + 16px),-5px,0)}[role~=tooltip][data-microtip-position=top-right]:after{transform:translate3d(calc(0% - 16px),0,0);bottom:100%}[role~=tooltip][data-microtip-position=top-right]:hover:after{transform:translate3d(calc(0% - 16px),-5px,0)}[role~=tooltip][data-microtip-position|=bottom]:before{background:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2236px%22%20height%3D%2212px%22%3E%3Cpath%20fill%3D%22rgba%2817,%2017,%2017,%200.9%29%22%20transform%3D%22rotate%28180%2018%206%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E) no-repeat;height:6px;width:18px;margin-top:5px;margin-bottom:0}[role~=tooltip][data-microtip-position|=bottom]:after{margin-top:11px}[role~=tooltip][data-microtip-position|=bottom]:before{transform:translate3d(-50%,-10px,0);bottom:auto;left:50%;top:100%}[role~=tooltip][data-microtip-position|=bottom]:hover:before{transform:translate3d(-50%,0,0)}[role~=tooltip][data-microtip-position|=bottom]:after{transform:translate3d(-50%,-10px,0);top:100%;left:50%}[role~=tooltip][data-microtip-position=bottom]:hover:after{transform:translate3d(-50%,0,0)}[role~=tooltip][data-microtip-position=bottom-left]:after{transform:translate3d(calc(-100% + 16px),-10px,0);top:100%}[role~=tooltip][data-microtip-position=bottom-left]:hover:after{transform:translate3d(calc(-100% + 16px),0,0)}[role~=tooltip][data-microtip-position=bottom-right]:after{transform:translate3d(calc(0% - 16px),-10px,0);top:100%}[role~=tooltip][data-microtip-position=bottom-right]:hover:after{transform:translate3d(calc(0% - 16px),0,0)}[role~=tooltip][data-microtip-position=left]:before,[role~=tooltip][data-microtip-position=left]:after{bottom:auto;left:auto;right:100%;top:50%;transform:translate3d(10px,-50%,0)}[role~=tooltip][data-microtip-position=left]:before{background:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2212px%22%20height%3D%2236px%22%3E%3Cpath%20fill%3D%22rgba%2817,%2017,%2017,%200.9%29%22%20transform%3D%22rotate%28-90%2018%2018%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E) no-repeat;height:18px;width:6px;margin-right:5px;margin-bottom:0}[role~=tooltip][data-microtip-position=left]:after{margin-right:11px}[role~=tooltip][data-microtip-position=left]:hover:before,[role~=tooltip][data-microtip-position=left]:hover:after{transform:translate3d(0,-50%,0)}[role~=tooltip][data-microtip-position=right]:before,[role~=tooltip][data-microtip-position=right]:after{bottom:auto;left:100%;top:50%;transform:translate3d(-10px,-50%,0)}[role~=tooltip][data-microtip-position=right]:before{background:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2212px%22%20height%3D%2236px%22%3E%3Cpath%20fill%3D%22rgba%2817,%2017,%2017,%200.9%29%22%20transform%3D%22rotate%2890%206%206%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E) no-repeat;height:18px;width:6px;margin-bottom:0;margin-left:5px}[role~=tooltip][data-microtip-position=right]:after{margin-left:11px}[role~=tooltip][data-microtip-position=right]:hover:before,[role~=tooltip][data-microtip-position=right]:hover:after{transform:translate3d(0,-50%,0)}[role~=tooltip][data-microtip-size=small]:after{white-space:initial;width:80px}[role~=tooltip][data-microtip-size=medium]:after{white-space:initial;width:150px}[role~=tooltip][data-microtip-size=large]:after{white-space:initial;width:260px} diff --git a/dist/tr-6f9ffcfe.js b/dist/tr-6f9ffcfe.js new file mode 100644 index 00000000..3785343c --- /dev/null +++ b/dist/tr-6f9ffcfe.js @@ -0,0 +1,72 @@ +const e = `{ + "Language": "Dil", + "Create": "Oluştur", + "Close": "Kapat", + "Cancel": "İptal", + "Save": "Kaydet", + "Edit": "Düzenle", + "Crop": "Kes", + "New Folder": "Yeni Klasör", + "New File": "Yeni Dosya", + "Rename": "Yeniden Adlandır", + "Delete": "Sil", + "Upload": "Karşıya Yükle", + "Download": "İndir", + "Archive": "Arşivle", + "Unarchive": "Arşivden çıkar", + "Open": "Aç", + "Open containing folder": "İçeren klasörü aç", + "Refresh": "Yenile", + "Preview": "Önizleme", + "Dark Mode": "Karanlık Mod", + "Toggle Full Screen": "Tam ekran", + "Change View": "Görünümü değiştir", + "Storage": "Depo", + "Go up a directory": "Yukarı git", + "Search anything..": "Herhangi bir şey ara..", + "Name": "Ad", + "Size": "Boyut", + "Date": "Tarih", + "Filepath": "Dosya yolu", + "About": "Hakkında", + "Folder Name": "Klasör Adı", + "File Name": "Dosya Adı", + "Move files": "Dosyaları taşı", + "Are you sure you want to move these files to?": "Bu dosyaları taşımak istediğinizden emin misiniz?", + "Yes, Move!": "Evet, Taşı!", + "Delete files": "Dosyaları Sil", + "Yes, Delete!": "Evet, Sil!", + "Upload files": "Dosyaları Yükle", + "No files selected!": "Dosya Seçilmedi!", + "Select Files": "Dosyaları Seç", + "Archive the files": "Dosyaları arşivleyin", + "Unarchive the files": "Dosyaları arşivden çıkarın", + "The archive will be unarchived at": "Arşiv buraya çıkarılacak: ", + "Archive name. (.zip file will be created)": "Archive adı. (.zip dosyası oluşturulacak)", + "Vuefinder is a file manager component for vue 3.": "Vuefinder, vue 3 için bir web dosya yönetim bileşenidir.", + "Create a new folder": "Yeni bir klasör oluşturun", + "Create a new file": "Yeni bir dosya oluşturun", + "Are you sure you want to delete these files?": "Bu dosyaları silmek istediğinize emin misiniz?", + "This action cannot be undone.": "Bu işlem geri alınamaz.", + "Search results for": "Arama sonuçları:", + "item(s) selected.": "dosya seçildi.", + "%s is renamed." : "%s yeniden adlandırılmıştır.", + "This is a readonly storage." : "Bu salt okunur bir depolama alanıdır.", + "%s is created." : "%s başarıyla oluşturulmuştur.", + "Files moved." : "Dosyalar taşındı.", + "Files deleted." : "Dosyalar silindi.", + "The file is unarchived." : "Dosya arşivden çıkarıldı.", + "The file(s) is archived." : "Dosyalar arşivlendi.", + "Updated." : "Güncellendi.", + "No search result found." : "Arama sonucu bulunamadı.", + "Are you sure you want to move these files?" : "Bu dosyaları taşımak istediğinize emin misiniz?", + "File Size": "Dosya Boyutu", + "Last Modified": "Son Değişiklik", + "Drag&Drop: on": "Sürükle&Bırak: etkin", + "Drag&Drop: off": "Sürükle&Bırak: devre dışı", + "The selected file exceeds the maximum file size. You cannot upload files greater than %s": "Seçilen dosya maksimum dosya boyutunu aşıyor. %s'den büyük dosyaları yükleyemezsiniz." +} +`; +export { + e as default +}; diff --git a/dist/tr.78307c97.js b/dist/tr.78307c97.js deleted file mode 100644 index ccf06c15..00000000 --- a/dist/tr.78307c97.js +++ /dev/null @@ -1,72 +0,0 @@ -const e = `{ - "Language": "Dil", - "Create": "Olu\u015Ftur", - "Close": "Kapat", - "Cancel": "\u0130ptal", - "Save": "Kaydet", - "Edit": "D\xFCzenle", - "Crop": "Kes", - "New Folder": "Yeni Klas\xF6r", - "New File": "Yeni Dosya", - "Rename": "Yeniden Adland\u0131r", - "Delete": "Sil", - "Upload": "Kar\u015F\u0131ya Y\xFCkle", - "Download": "\u0130ndir", - "Archive": "Ar\u015Fivle", - "Unarchive": "Ar\u015Fivden \xE7\u0131kar", - "Open": "A\xE7", - "Open containing folder": "\u0130\xE7eren klas\xF6r\xFC a\xE7", - "Refresh": "Yenile", - "Preview": "\xD6nizleme", - "Dark Mode": "Karanl\u0131k Mod", - "Toggle Full Screen": "Tam ekran", - "Change View": "G\xF6r\xFCn\xFCm\xFC de\u011Fi\u015Ftir", - "Storage": "Depo", - "Go up a directory": "Yukar\u0131 git", - "Search anything..": "Herhangi bir \u015Fey ara..", - "Name": "Ad", - "Size": "Boyut", - "Date": "Tarih", - "Filepath": "Dosya yolu", - "About": "Hakk\u0131nda", - "Folder Name": "Klas\xF6r Ad\u0131", - "File Name": "Dosya Ad\u0131", - "Move files": "Dosyalar\u0131 ta\u015F\u0131", - "Are you sure you want to move these files to?": "Bu dosyalar\u0131 ta\u015F\u0131mak istedi\u011Finizden emin misiniz?", - "Yes, Move!": "Evet, Ta\u015F\u0131!", - "Delete files": "Dosyalar\u0131 Sil", - "Yes, Delete!": "Evet, Sil!", - "Upload files": "Dosyalar\u0131 Y\xFCkle", - "No files selected!": "Dosya Se\xE7ilmedi!", - "Select Files": "Dosyalar\u0131 Se\xE7", - "Archive the files": "Dosyalar\u0131 ar\u015Fivleyin", - "Unarchive the files": "Dosyalar\u0131 ar\u015Fivden \xE7\u0131kar\u0131n", - "The archive will be unarchived at": "Ar\u015Fiv buraya \xE7\u0131kar\u0131lacak: ", - "Archive name. (.zip file will be created)": "Archive ad\u0131. (.zip dosyas\u0131 olu\u015Fturulacak)", - "Vuefinder is a file manager component for vue 3.": "Vuefinder, vue 3 i\xE7in bir web dosya y\xF6netim bile\u015Fenidir.", - "Create a new folder": "Yeni bir klas\xF6r olu\u015Fturun", - "Create a new file": "Yeni bir dosya olu\u015Fturun", - "Are you sure you want to delete these files?": "Bu dosyalar\u0131 silmek istedi\u011Finize emin misiniz?", - "This action cannot be undone.": "Bu i\u015Flem geri al\u0131namaz.", - "Search results for": "Arama sonu\xE7lar\u0131:", - "item(s) selected.": "dosya se\xE7ildi.", - "%s is renamed." : "%s yeniden adland\u0131r\u0131lm\u0131\u015Ft\u0131r.", - "This is a readonly storage." : "Bu salt okunur bir depolama alan\u0131d\u0131r.", - "%s is created." : "%s ba\u015Far\u0131yla olu\u015Fturulmu\u015Ftur.", - "Files moved." : "Dosyalar ta\u015F\u0131nd\u0131.", - "Files deleted." : "Dosyalar silindi.", - "The file is unarchived." : "Dosya ar\u015Fivden \xE7\u0131kar\u0131ld\u0131.", - "The file(s) is archived." : "Dosyalar ar\u015Fivlendi.", - "Updated." : "G\xFCncellendi.", - "No search result found." : "Arama sonucu bulunamad\u0131.", - "Are you sure you want to move these files?" : "Bu dosyalar\u0131 ta\u015F\u0131mak istedi\u011Finize emin misiniz?", - "File Size": "Dosya Boyutu", - "Last Modified": "Son De\u011Fi\u015Fiklik", - "Drag&Drop: on": "S\xFCr\xFCkle&B\u0131rak: etkin", - "Drag&Drop: off": "S\xFCr\xFCkle&B\u0131rak: devre d\u0131\u015F\u0131", - "The selected file exceeds the maximum file size. You cannot upload files greater than %s": "Se\xE7ilen dosya maksimum dosya boyutunu a\u015F\u0131yor. %s'den b\xFCy\xFCk dosyalar\u0131 y\xFCkleyemezsiniz." -} -`; -export { - e as default -}; diff --git a/dist/vuefinder.js b/dist/vuefinder.js index 0e642ecb..7c663627 100644 --- a/dist/vuefinder.js +++ b/dist/vuefinder.js @@ -1,20 +1,20 @@ -import { ref as L, watch as It, inject as j, openBlock as y, createElementBlock as S, createElementVNode as u, unref as x, normalizeClass as he, createTextVNode as ie, toDisplayString as $, createCommentVNode as X, createVNode as De, TransitionGroup as Wa, withCtx as q, Fragment as ue, renderList as ke, reactive as $t, onMounted as Ce, onUpdated as Xa, withDirectives as _e, vShow as kt, withModifiers as Ke, nextTick as Lt, isRef as ho, vModelSelect as Br, createStaticVNode as qa, customRef as Ga, withKeys as st, vModelText as it, normalizeStyle as fo, provide as Be, createBlock as J, resolveDynamicComponent as Ja, renderSlot as Yt } from "vue"; -import ct from "plupload"; -var uo; -const Et = (uo = document.querySelector('meta[name="csrf-token"]')) == null ? void 0 : uo.getAttribute("content"), Tt = (t, { method: e = "get", params: r = {}, json: o = !0, signal: i = null }) => { - const a = { method: e }; - if (a.signal = i, e == "get") +import { ref as L, watch as jt, inject as P, openBlock as S, createElementBlock as D, createElementVNode as u, unref as _, normalizeClass as ce, createTextVNode as re, toDisplayString as M, createCommentVNode as Z, createVNode as Ce, TransitionGroup as ko, withCtx as q, Fragment as ae, renderList as _e, reactive as It, onMounted as Me, onUpdated as Do, withDirectives as Se, vShow as Et, withModifiers as Xe, nextTick as zt, isRef as Qr, vModelSelect as $r, createStaticVNode as Co, customRef as Mo, withKeys as ot, vModelText as nt, normalizeStyle as es, provide as Ke, createBlock as F, resolveDynamicComponent as Eo, renderSlot as Zt } from "vue"; +import ft from "plupload"; +var Jr; +const Lt = (Jr = document.querySelector('meta[name="csrf-token"]')) == null ? void 0 : Jr.getAttribute("content"), Ot = (t, { method: e = "get", params: r = {}, json: o = !0, signal: a = null }) => { + const n = { method: e }; + if (n.signal = a, e == "get") t += "?" + new URLSearchParams(r); else { - a.headers = {}, Et && (a.headers["X-CSRF-Token"] = Et); - let n = new FormData(); - for (const [m, g] of Object.entries(r)) - n.append(m, g); - a.body = n; + n.headers = {}, Lt && (n.headers["X-CSRF-Token"] = Lt); + let l = new FormData(); + for (const [h, v] of Object.entries(r)) + l.append(h, v); + n.body = l; } - return fetch(t, a).then((n) => n.ok ? o ? n.json() : n.text() : n.json().then(Promise.reject.bind(Promise))); + return fetch(t, n).then((l) => l.ok ? o ? l.json() : l.text() : l.json().then(Promise.reject.bind(Promise))); }; -function Za(t) { +function $o(t) { return { all: t = t || /* @__PURE__ */ new Map(), on: function(e, r) { var o = t.get(e); o ? o.push(r) : t.set(e, [r]); @@ -23,39 +23,39 @@ function Za(t) { o && (r ? o.splice(o.indexOf(r) >>> 0, 1) : t.set(e, [])); }, emit: function(e, r) { var o = t.get(e); - o && o.slice().map(function(i) { - i(r); - }), (o = t.get("*")) && o.slice().map(function(i) { - i(e, r); + o && o.slice().map(function(a) { + a(r); + }), (o = t.get("*")) && o.slice().map(function(a) { + a(e, r); }); } }; } -function Wt(t) { +function qt(t) { let e = localStorage.getItem(t + "_storage"); const r = L(JSON.parse(e)); - It(r, o); + jt(r, o); function o() { r.value === null || r.value === "" ? localStorage.removeItem(t + "_storage") : localStorage.setItem(t + "_storage", JSON.stringify(r.value)); } - function i(m, g) { - r.value = Object.assign({ ...r.value }, { [m]: g }); + function a(h, v) { + r.value = Object.assign({ ...r.value }, { [h]: v }); } - function a() { + function n() { r.value = null; } - return { getStore: (m, g = null) => r.value === null || r.value === "" ? g : r.value.hasOwnProperty(m) ? r.value[m] : g, setStore: i, clearStore: a }; + return { getStore: (h, v = null) => r.value === null || r.value === "" ? v : r.value.hasOwnProperty(h) ? r.value[h] : v, setStore: a, clearStore: n }; } -const Hr = L(""); -function Te() { +const Tr = L(""); +function Ie() { function t(e) { - Hr.value = e; + Tr.value = e; } - return { apiUrl: Hr, setApiUrl: t }; + return { apiUrl: Tr, setApiUrl: t }; } -const Qa = { class: "border-neutral-300 flex justify-between items-center py-1 text-sm" }, es = { +const To = { class: "border-neutral-300 flex justify-between items-center py-1 text-sm" }, Ao = { key: 0, class: "flex text-center" -}, ts = ["aria-label"], rs = /* @__PURE__ */ u("svg", { +}, Io = ["aria-label"], Lo = /* @__PURE__ */ u("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", @@ -68,9 +68,9 @@ const Qa = { 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), os = [ - rs -], as = ["aria-label"], ss = /* @__PURE__ */ u("svg", { +], -1), Oo = [ + Lo +], Po = ["aria-label"], No = /* @__PURE__ */ u("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", @@ -83,21 +83,21 @@ const Qa = { 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), is = [ - ss -], ns = ["aria-label"], ls = /* @__PURE__ */ u("path", { +], -1), jo = [ + No +], zo = ["aria-label"], Vo = /* @__PURE__ */ u("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), cs = [ - ls -], us = ["aria-label"], ds = /* @__PURE__ */ u("path", { +}, null, -1), Ro = [ + Vo +], Ho = ["aria-label"], Bo = /* @__PURE__ */ u("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), hs = [ - ds -], fs = ["aria-label"], ms = /* @__PURE__ */ u("svg", { +}, null, -1), Uo = [ + Bo +], Ko = ["aria-label"], Yo = /* @__PURE__ */ u("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", @@ -110,308 +110,308 @@ const Qa = { 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), gs = [ - ms -], ps = ["aria-label"], vs = /* @__PURE__ */ u("path", { +], -1), Wo = [ + Yo +], Xo = ["aria-label"], Zo = /* @__PURE__ */ u("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), bs = [ - vs -], ys = ["aria-label"], ws = /* @__PURE__ */ u("path", { +}, null, -1), qo = [ + Zo +], Fo = ["aria-label"], Go = /* @__PURE__ */ u("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), xs = [ - ws -], _s = { +}, null, -1), Jo = [ + Go +], Qo = { key: 1, class: "flex text-center" -}, ks = { class: "pl-2" }, Ss = { class: "dark:bg-gray-700 bg-gray-200 text-xs px-2 py-1 rounded" }, Ds = { +}, en = { class: "pl-2" }, tn = { class: "dark:bg-gray-700 bg-gray-200 text-xs px-2 py-1 rounded" }, rn = { 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" -}, Cs = /* @__PURE__ */ u("circle", { +}, sn = /* @__PURE__ */ u("circle", { class: "opacity-25 stroke-blue-900 dark:stroke-blue-100", cx: "12", cy: "12", r: "10", stroke: "currentColor", "stroke-width": "4" -}, null, -1), Ms = /* @__PURE__ */ u("path", { +}, null, -1), on = /* @__PURE__ */ u("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), $s = [ - Cs, - Ms -], Es = { class: "flex text-center items-center justify-end" }, Ts = ["aria-label"], As = /* @__PURE__ */ u("path", { +}, null, -1), nn = [ + sn, + on +], an = { class: "flex text-center items-center justify-end" }, ln = ["aria-label"], cn = /* @__PURE__ */ u("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M12 3v2.25m6.364.386l-1.591 1.591M21 12h-2.25m-.386 6.364l-1.591-1.591M12 18.75V21m-4.773-4.227l-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0z" -}, null, -1), Os = [ - As -], Is = ["aria-label"], Ls = { +}, null, -1), dn = [ + cn +], un = ["aria-label"], hn = { 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" -}, Ps = { +}, fn = { 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" -}, Ns = { +}, pn = { 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" -}, js = ["aria-label"], zs = { +}, gn = ["aria-label"], mn = { 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" -}, Vs = { +}, vn = { 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" -}, Rs = { +}, bn = { name: "VFToolbar" -}, Bs = /* @__PURE__ */ Object.assign(Rs, { +}, yn = /* @__PURE__ */ Object.assign(bn, { props: { data: Object }, setup(t) { - const e = j("emitter"), { getStore: r, setStore: o } = j("storage"), { t: i } = j("i18n"), a = L(r("viewport", "grid")), n = L([]), m = L(r("full-screen", !1)), g = L(""); - e.on("vf-search-query", ({ newQuery: b }) => { - g.value = b; + const e = P("emitter"), { getStore: r, setStore: o } = P("storage"), { t: a } = P("i18n"), n = L(r("viewport", "grid")), l = L([]), h = L(r("full-screen", !1)), v = L(""); + e.on("vf-search-query", ({ newQuery: w }) => { + v.value = w; }); - const f = j("loadingState"), h = () => f.value, p = () => { - m.value = !m.value, e.emit("vf-fullscreen-toggle"); + const m = P("loadingState"), p = () => m.value, b = () => { + h.value = !h.value, e.emit("vf-fullscreen-toggle"); }; - return e.on("vf-nodes-selected", (b) => { - n.value = b; - }), e.on("vf-view-toggle", (b) => { - o("viewport", b), a.value = b; - }), (b, E) => (y(), S("div", Qa, [ - g.value.length ? (y(), S("div", _s, [ - u("div", ks, [ - ie($(x(i)("Search results for")) + " ", 1), - u("span", Ss, $(g.value), 1) + return e.on("vf-nodes-selected", (w) => { + l.value = w; + }), e.on("vf-view-toggle", (w) => { + o("viewport", w), n.value = w; + }), (w, E) => (S(), D("div", To, [ + v.value.length ? (S(), D("div", Qo, [ + u("div", en, [ + re(M(_(a)("Search results for")) + " ", 1), + u("span", tn, M(v.value), 1) ]), - h() ? (y(), S("svg", Ds, $s)) : X("", !0) - ])) : (y(), S("div", es, [ + p() ? (S(), D("svg", rn, nn)) : Z("", !0) + ])) : (S(), D("div", Ao, [ u("div", { class: "mx-1.5", - "aria-label": x(i)("New Folder"), + "aria-label": _(a)("New Folder"), "data-microtip-position": "bottom-right", role: "tooltip", - onClick: E[0] || (E[0] = (D) => x(e).emit("vf-modal-show", { type: "new-folder", items: n.value })) - }, os, 8, ts), + onClick: E[0] || (E[0] = (C) => _(e).emit("vf-modal-show", { type: "new-folder", items: l.value })) + }, Oo, 8, Io), u("div", { class: "mx-1.5", - "aria-label": x(i)("New File"), + "aria-label": _(a)("New File"), "data-microtip-position": "bottom", role: "tooltip", - onClick: E[1] || (E[1] = (D) => x(e).emit("vf-modal-show", { type: "new-file", items: n.value })) - }, is, 8, as), + onClick: E[1] || (E[1] = (C) => _(e).emit("vf-modal-show", { type: "new-file", items: l.value })) + }, jo, 8, Po), u("div", { class: "mx-1.5", - "aria-label": x(i)("Rename"), + "aria-label": _(a)("Rename"), "data-microtip-position": "bottom", role: "tooltip", - onClick: E[2] || (E[2] = (D) => n.value.length != 1 || x(e).emit("vf-modal-show", { type: "rename", items: n.value })) + onClick: E[2] || (E[2] = (C) => l.value.length != 1 || _(e).emit("vf-modal-show", { type: "rename", items: l.value })) }, [ - (y(), S("svg", { + (S(), D("svg", { xmlns: "http://www.w3.org/2000/svg", - class: he([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: ce([l.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" - }, cs, 2)) - ], 8, ns), + }, Ro, 2)) + ], 8, zo), u("div", { class: "mx-1.5", - "aria-label": x(i)("Delete"), + "aria-label": _(a)("Delete"), "data-microtip-position": "bottom", role: "tooltip", - onClick: E[3] || (E[3] = (D) => !n.value.length || x(e).emit("vf-modal-show", { type: "delete", items: n.value })) + onClick: E[3] || (E[3] = (C) => !l.value.length || _(e).emit("vf-modal-show", { type: "delete", items: l.value })) }, [ - (y(), S("svg", { + (S(), D("svg", { xmlns: "http://www.w3.org/2000/svg", - class: he([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: ce([l.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" - }, hs, 2)) - ], 8, us), + }, Uo, 2)) + ], 8, Ho), u("div", { class: "mx-1.5", - "aria-label": x(i)("Upload"), + "aria-label": _(a)("Upload"), "data-microtip-position": "bottom", role: "tooltip", - onClick: E[4] || (E[4] = (D) => x(e).emit("vf-modal-show", { type: "upload", items: n.value })) - }, gs, 8, fs), - n.value.length == 1 && n.value[0].mime_type == "application/zip" ? (y(), S("div", { + onClick: E[4] || (E[4] = (C) => _(e).emit("vf-modal-show", { type: "upload", items: l.value })) + }, Wo, 8, Ko), + l.value.length == 1 && l.value[0].mime_type == "application/zip" ? (S(), D("div", { key: 0, class: "mx-1.5", - "aria-label": x(i)("Unrchive"), + "aria-label": _(a)("Unrchive"), "data-microtip-position": "bottom", role: "tooltip", - onClick: E[5] || (E[5] = (D) => !n.value.length || x(e).emit("vf-modal-show", { type: "unarchive", items: n.value })) + onClick: E[5] || (E[5] = (C) => !l.value.length || _(e).emit("vf-modal-show", { type: "unarchive", items: l.value })) }, [ - (y(), S("svg", { + (S(), D("svg", { xmlns: "http://www.w3.org/2000/svg", - class: he([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: ce([l.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" - }, bs, 2)) - ], 8, ps)) : (y(), S("div", { + }, qo, 2)) + ], 8, Xo)) : (S(), D("div", { key: 1, class: "mx-1.5", - "aria-label": x(i)("Archive"), + "aria-label": _(a)("Archive"), "data-microtip-position": "bottom", role: "tooltip", - onClick: E[6] || (E[6] = (D) => !n.value.length || x(e).emit("vf-modal-show", { type: "archive", items: n.value })) + onClick: E[6] || (E[6] = (C) => !l.value.length || _(e).emit("vf-modal-show", { type: "archive", items: l.value })) }, [ - (y(), S("svg", { + (S(), D("svg", { xmlns: "http://www.w3.org/2000/svg", - class: he([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: ce([l.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" - }, xs, 2)) - ], 8, ys)) + }, Jo, 2)) + ], 8, Fo)) ])), - u("div", Es, [ + u("div", an, [ u("div", { class: "mx-1.5", - "aria-label": x(i)("Dark Mode"), + "aria-label": _(a)("Dark Mode"), "data-microtip-position": "bottom", role: "tooltip" }, [ - (y(), S("svg", { - onClick: E[7] || (E[7] = (D) => x(e).emit("vf-darkMode-toggle")), + (S(), D("svg", { + onClick: E[7] || (E[7] = (C) => _(e).emit("vf-darkMode-toggle")), viewBox: "0 0 24 24", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "h-6 w-6 m-auto cursor-pointer stroke-sky-500 fill-sky-100 hover:stroke-sky-600 dark:stroke-gray-400 dark:fill-gray-400/20 dark:hover:stroke-gray-300" - }, Os)) - ], 8, Ts), + }, dn)) + ], 8, ln), u("div", { class: "mx-1.5", - "aria-label": x(i)("Toggle Full Screen"), + "aria-label": _(a)("Toggle Full Screen"), "data-microtip-position": "bottom-left", role: "tooltip", - onClick: p + onClick: b }, [ - (y(), S("svg", Ls, [ - m.value ? (y(), S("path", Ps)) : (y(), S("path", Ns)) + (S(), D("svg", hn, [ + h.value ? (S(), D("path", fn)) : (S(), D("path", pn)) ])) - ], 8, Is), + ], 8, un), u("div", { class: "mx-1.5", - "aria-label": x(i)("Change View"), + "aria-label": _(a)("Change View"), "data-microtip-position": "bottom-left", role: "tooltip", - onClick: E[8] || (E[8] = (D) => g.value.length || x(e).emit("vf-view-toggle", a.value == "list" ? "grid" : "list")) + onClick: E[8] || (E[8] = (C) => v.value.length || _(e).emit("vf-view-toggle", n.value == "list" ? "grid" : "list")) }, [ - (y(), S("svg", { + (S(), D("svg", { xmlns: "http://www.w3.org/2000/svg", - class: he([g.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: ce([v.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" }, [ - a.value == "grid" ? (y(), S("path", zs)) : X("", !0), - a.value == "list" ? (y(), S("path", Vs)) : X("", !0) + n.value == "grid" ? (S(), D("path", mn)) : Z("", !0), + n.value == "list" ? (S(), D("path", vn)) : Z("", !0) ], 2)) - ], 8, js) + ], 8, gn) ]) ])); } }); -var Hs = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, mo = { exports: {} }; +var wn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, ts = { exports: {} }; (function(t, e) { (function(r, o) { t.exports = o(); - })(Hs, function() { - function r(d, l) { - if (!(d instanceof l)) + })(wn, function() { + function r(d, c) { + if (!(d instanceof c)) throw new TypeError("Cannot call a class as a function"); } - function o(d, l) { - for (var s = 0; s < l.length; s++) { - var v = l[s]; - v.enumerable = v.enumerable || !1, v.configurable = !0, "value" in v && (v.writable = !0), Object.defineProperty(d, v.key, v); + function o(d, c) { + for (var s = 0; s < c.length; s++) { + var g = c[s]; + g.enumerable = g.enumerable || !1, g.configurable = !0, "value" in g && (g.writable = !0), Object.defineProperty(d, g.key, g); } } - function i(d, l, s) { - return l && o(d.prototype, l), s && o(d, s), d; + function a(d, c, s) { + return c && o(d.prototype, c), s && o(d, s), d; } - function a(d, l, s) { - return l in d ? Object.defineProperty(d, l, { + function n(d, c, s) { + return c in d ? Object.defineProperty(d, c, { value: s, enumerable: !0, configurable: !0, writable: !0 - }) : d[l] = s, d; + }) : d[c] = s, d; } - function n(d, l) { + function l(d, c) { var s = Object.keys(d); if (Object.getOwnPropertySymbols) { - var v = Object.getOwnPropertySymbols(d); - l && (v = v.filter(function(c) { - return Object.getOwnPropertyDescriptor(d, c).enumerable; - })), s.push.apply(s, v); + var g = Object.getOwnPropertySymbols(d); + c && (g = g.filter(function(i) { + return Object.getOwnPropertyDescriptor(d, i).enumerable; + })), s.push.apply(s, g); } return s; } - function m(d) { - for (var l = 1; l < arguments.length; l++) { - var s = arguments[l] != null ? arguments[l] : {}; - l % 2 ? n(Object(s), !0).forEach(function(v) { - a(d, v, s[v]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(d, Object.getOwnPropertyDescriptors(s)) : n(Object(s)).forEach(function(v) { - Object.defineProperty(d, v, Object.getOwnPropertyDescriptor(s, v)); + function h(d) { + for (var c = 1; c < arguments.length; c++) { + var s = arguments[c] != null ? arguments[c] : {}; + c % 2 ? l(Object(s), !0).forEach(function(g) { + n(d, g, s[g]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(d, Object.getOwnPropertyDescriptors(s)) : l(Object(s)).forEach(function(g) { + Object.defineProperty(d, g, Object.getOwnPropertyDescriptor(s, g)); }); } return d; } - function g(d, l) { - if (typeof l != "function" && l !== null) + function v(d, c) { + if (typeof c != "function" && c !== null) throw new TypeError("Super expression must either be null or a function"); - d.prototype = Object.create(l && l.prototype, { + d.prototype = Object.create(c && c.prototype, { constructor: { value: d, writable: !0, configurable: !0 } - }), l && h(d, l); + }), c && p(d, c); } - function f(d) { - return f = Object.setPrototypeOf ? Object.getPrototypeOf : function(s) { + function m(d) { + return m = Object.setPrototypeOf ? Object.getPrototypeOf : function(s) { return s.__proto__ || Object.getPrototypeOf(s); - }, f(d); + }, m(d); } - function h(d, l) { - return h = Object.setPrototypeOf || function(v, c) { - return v.__proto__ = c, v; - }, h(d, l); + function p(d, c) { + return p = Object.setPrototypeOf || function(g, i) { + return g.__proto__ = i, g; + }, p(d, c); } - function p() { + function b() { if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") @@ -423,211 +423,276 @@ var Hs = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t return !1; } } - function b(d, l, s) { - return p() ? b = Reflect.construct : b = function(c, w, _) { - var k = [null]; - k.push.apply(k, w); - var M = Function.bind.apply(c, k), P = new M(); - return _ && h(P, _.prototype), P; - }, b.apply(null, arguments); + function w(d, c, s) { + return b() ? w = Reflect.construct : w = function(i, f, y) { + var x = [null]; + x.push.apply(x, f); + var k = Function.bind.apply(i, x), H = new k(); + return y && p(H, y.prototype), H; + }, w.apply(null, arguments); } function E(d) { return Function.toString.call(d).indexOf("[native code]") !== -1; } - function D(d) { - var l = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0; - return D = function(v) { - if (v === null || !E(v)) - return v; - if (typeof v != "function") + function C(d) { + var c = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0; + return C = function(g) { + if (g === null || !E(g)) + return g; + if (typeof g != "function") throw new TypeError("Super expression must either be null or a function"); - if (typeof l < "u") { - if (l.has(v)) - return l.get(v); - l.set(v, c); + if (typeof c < "u") { + if (c.has(g)) + return c.get(g); + c.set(g, i); } - function c() { - return b(v, arguments, f(this).constructor); + function i() { + return w(g, arguments, m(this).constructor); } - return c.prototype = Object.create(v.prototype, { + return i.prototype = Object.create(g.prototype, { constructor: { - value: c, + value: i, enumerable: !1, writable: !0, configurable: !0 } - }), h(c, v); - }, D(d); + }), p(i, g); + }, C(d); } - function T(d) { + function A(d) { if (d === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return d; } - function I(d, l) { - return l && (typeof l == "object" || typeof l == "function") ? l : T(d); + function I(d, c) { + return c && (typeof c == "object" || typeof c == "function") ? c : A(d); } - function U(d) { - var l = p(); + function R(d) { + var c = b(); return function() { - var v = f(d), c; - if (l) { - var w = f(this).constructor; - c = Reflect.construct(v, arguments, w); + var g = m(d), i; + if (c) { + var f = m(this).constructor; + i = Reflect.construct(g, arguments, f); } else - c = v.apply(this, arguments); - return I(this, c); + i = g.apply(this, arguments); + return I(this, i); }; } - function H(d, l) { - for (; !Object.prototype.hasOwnProperty.call(d, l) && (d = f(d), d !== null); ) + function V(d, c) { + for (; !Object.prototype.hasOwnProperty.call(d, c) && (d = m(d), d !== null); ) ; return d; } - function N(d, l, s) { - return typeof Reflect < "u" && Reflect.get ? N = Reflect.get : N = function(c, w, _) { - var k = H(c, w); - if (!!k) { - var M = Object.getOwnPropertyDescriptor(k, w); - return M.get ? M.get.call(_) : M.value; + function O(d, c, s) { + return typeof Reflect < "u" && Reflect.get ? O = Reflect.get : O = function(i, f, y) { + var x = V(i, f); + if (x) { + var k = Object.getOwnPropertyDescriptor(x, f); + return k.get ? k.get.call(y) : k.value; } - }, N(d, l, s || d); + }, O(d, c, s || d); } - function W(d, l) { - return V(d) || ne(d, l) || le(d, l) || be(); + function K(d, c) { + return j(d) || se(d, c) || ee(d, c) || pe(); } - function K(d) { - return C(d) || Q(d) || le(d) || we(); + function B(d) { + return $(d) || G(d) || ee(d) || ve(); } - function C(d) { + function $(d) { if (Array.isArray(d)) - return fe(d); + return de(d); } - function V(d) { + function j(d) { if (Array.isArray(d)) return d; } - function Q(d) { + function G(d) { if (typeof Symbol < "u" && Symbol.iterator in Object(d)) return Array.from(d); } - function ne(d, l) { + function se(d, c) { if (!(typeof Symbol > "u" || !(Symbol.iterator in Object(d)))) { - var s = [], v = !0, c = !1, w = void 0; + var s = [], g = !0, i = !1, f = void 0; try { - for (var _ = d[Symbol.iterator](), k; !(v = (k = _.next()).done) && (s.push(k.value), !(l && s.length === l)); v = !0) + for (var y = d[Symbol.iterator](), x; !(g = (x = y.next()).done) && (s.push(x.value), !(c && s.length === c)); g = !0) ; - } catch (M) { - c = !0, w = M; + } catch (k) { + i = !0, f = k; } finally { try { - !v && _.return != null && _.return(); + !g && y.return != null && y.return(); } finally { - if (c) - throw w; + if (i) + throw f; } } return s; } } - function le(d, l) { - if (!!d) { + function ee(d, c) { + if (d) { if (typeof d == "string") - return fe(d, l); + return de(d, c); var s = Object.prototype.toString.call(d).slice(8, -1); if (s === "Object" && d.constructor && (s = d.constructor.name), s === "Map" || s === "Set") return Array.from(d); if (s === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)) - return fe(d, l); + return de(d, c); } } - function fe(d, l) { - (l == null || l > d.length) && (l = d.length); - for (var s = 0, v = new Array(l); s < l; s++) - v[s] = d[s]; - return v; + function de(d, c) { + (c == null || c > d.length) && (c = d.length); + for (var s = 0, g = new Array(c); s < c; s++) + g[s] = d[s]; + return g; } - function we() { + function ve() { throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); } - function be() { + function pe() { throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); } - var Z = function(l, s, v) { - var c = l.x, w = l.y, _ = v.x, k = v.y, M = { + function ge(d, c) { + var s; + if (typeof Symbol > "u" || d[Symbol.iterator] == null) { + if (Array.isArray(d) || (s = ee(d)) || c && d && typeof d.length == "number") { + s && (d = s); + var g = 0, i = function() { + }; + return { + s: i, + n: function() { + return g >= d.length ? { + done: !0 + } : { + done: !1, + value: d[g++] + }; + }, + e: function(k) { + throw k; + }, + f: i + }; + } + throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); + } + var f = !0, y = !1, x; + return { + s: function() { + s = d[Symbol.iterator](); + }, + n: function() { + var k = s.next(); + return f = k.done, k; + }, + e: function(k) { + y = !0, x = k; + }, + f: function() { + try { + !f && s.return != null && s.return(); + } finally { + if (y) + throw x; + } + } + }; + } + var T = function(c, s, g) { + var i = c.x, f = c.y, y = g.x, x = g.y, k = { "+": { - x: c + _, - y: w + k + x: i + y, + y: f + x }, "-": { - x: c - _, - y: w - k + x: i - y, + y: f - x }, "*": { - x: c * _, - y: w * k + x: i * y, + y: f * x }, "/": { - x: c / _, - y: w / k + x: i / y, + y: f / x } }; - return M[s]; - }, O = function(l) { + return k[s]; + }, z = function(c) { return { - x: l.left, - y: l.top + x: c.left, + y: c.top }; - }, B = function(l) { + }, N = function(c) { var s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; return { - left: l.x, - top: l.y, - right: l.x, - bottom: l.y, + left: c.x, + top: c.y, + right: c.x, + bottom: c.y, width: s, height: s }; - }, z = function(l) { + }, le = function(c) { return { - x: l, - y: l + x: c, + y: c }; - }, de = function(d, l, s) { - window.addEventListener("resize", l), window.addEventListener("scroll", l), d.forEach(function(v, c) { - s.observe(v, { - childList: c !== 0, + }, U = function(d, c) { + var s = c; + window.addEventListener("resize", s), window.addEventListener("scroll", s); + var g = new MutationObserver(s); + d.forEach(function(f, y) { + g.observe(f, { + childList: y !== 0, attributes: !0 }); }); - }, G = function(d) { - var l = Ge(d); - return l.x || l.y ? !0 : d instanceof HTMLDocument ? d.body ? !!(d.body.scrollTop = 1) : !!(d.documentElement.scrollTop = 1) : !!(d.scrollTop = 1); - }, me = function(d) { - var l = document.createElement("div"); - return l.style.position = "fixed", l.style.overflow = "hidden", l.style.pointerEvents = "none", l.style.zIndex = "999999999999999999", l.classList.add(d), l; - }, re = function(d) { - var l = document.createElement("div"); - return l.style.position = "absolute", d || (l.style.background = "rgba(0, 0, 255, 0.1)", l.style.border = "1px solid rgba(0, 0, 255, 0.45)", l.style.display = "none", l.style.pointerEvents = "none"), l; - }, xt = function(d, l) { + var i = function() { + return oo(g, s); + }; + return { + observer: g, + callback: s, + cleanup: i + }; + }, xe = function(d) { + var c = Mt(d); + return c.x || c.y ? !0 : d instanceof Document ? d.body ? !!(d.body.scrollTop = 1) : !!(d.documentElement.scrollTop = 1) : !!(d.scrollTop = 1); + }, ke = function() { + var d = document.createElement("div"); + return d.style.position = "fixed", d.style.overflow = "hidden", d.style.pointerEvents = "none", d.style.zIndex = "999999999999999999", d; + }, Dt = function(d) { + var c = document.createElement("div"); + return c.style.position = "absolute", d || (c.style.background = "rgba(0, 175, 255, 0.2)", c.style.border = "1px solid rgba(0, 175, 255, 0.8)", c.style.display = "none", c.style.pointerEvents = "none"), c; + }, at = function(d, c) { var s; return function() { - for (var v = arguments.length, c = new Array(v), w = 0; w < v; w++) - c[w] = arguments[w]; - var _ = function() { - s = null, d.apply(void 0, c); + for (var g = arguments.length, i = new Array(g), f = 0; f < g; f++) + i[f] = arguments[f]; + var y = function() { + s = null, d.apply(void 0, i); }; - clearTimeout(s), s = setTimeout(_, l); + clearTimeout(s), s = setTimeout(y, c); }; - }, qe = function() { - var d, l, s, v; + }, lt = function() { + var d, c, s, g; return { - y: ((d = document.body) === null || d === void 0 ? void 0 : d.scrollTop) || ((l = document.documentElement) === null || l === void 0 ? void 0 : l.scrollTop) || 0, - x: ((s = document.body) === null || s === void 0 ? void 0 : s.scrollLeft) || ((v = document.documentElement) === null || v === void 0 ? void 0 : v.scrollLeft) || 0 + y: ((d = document.body) === null || d === void 0 ? void 0 : d.scrollTop) || ((c = document.documentElement) === null || c === void 0 ? void 0 : c.scrollTop) || 0, + x: ((s = document.body) === null || s === void 0 ? void 0 : s.scrollLeft) || ((g = document.documentElement) === null || g === void 0 ? void 0 : g.scrollLeft) || 0 + }; + }, Ct = function(d) { + var c = function s(g) { + var i, f = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, y = (i = g[f]) === null || i === void 0 ? void 0 : i.parentNode; + return y ? (g.push(y), f++, s(g, f)) : g; }; - }, Rt = function(d, l) { + return c([d]); + }, Xs = function(d, c) { if (d instanceof Document) return { top: 0, @@ -643,148 +708,188 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho left: s.left, bottom: s.bottom, right: s.right, - width: (d.clientWidth || s.width) * l, - height: (d.clientHeight || s.height) * l + width: (d.clientWidth || s.width) * c, + height: (d.clientHeight || s.height) * c }; - }, Ge = function(d) { - return !d || d instanceof Document ? qe() : { - x: d.scrollLeft >= 0 ? d.scrollLeft : qe().x, - y: d.scrollTop >= 0 ? d.scrollTop : qe().y + }, Mt = function(d) { + return !d || d instanceof Document ? lt() : { + x: d.scrollLeft >= 0 ? d.scrollLeft : lt().x, + y: d.scrollTop >= 0 ? d.scrollTop : lt().y }; - }, xr = function(d) { - var l = d.elementRect, s = d.containerRect, v = d.tolerance, c = v === void 0 ? { + }, kr = function(d) { + var c = d.elementRect, s = d.containerRect, g = d.tolerance, i = g === void 0 ? { x: 0, y: 0 - } : v, w = []; - return l.top - c.y < s.top && w.push("top"), l.left - c.x < s.left && w.push("left"), l.bottom + c.y > s.bottom && w.push("bottom"), l.right + c.y > s.right && w.push("right"), w; - }, ia = function(d) { - var l = d.event; + } : g, f = []; + return c.top - i.y < s.top && f.push("top"), c.left - i.x < s.left && f.push("left"), c.bottom + i.y > s.bottom && f.push("bottom"), c.right + i.y > s.right && f.push("right"), f; + }, Zs = function(d) { + var c = d.event; return { - x: l.clientX, - y: l.clientY + x: c.clientX, + y: c.clientY }; - }, na = function(d) { - var l = d.scrollAmount, s = d.initialPointerPos, v = d.pointerPos, c = {}; - return v.x > s.x - l.x ? (c.left = s.x - l.x, c.width = v.x - s.x + l.x) : (c.left = v.x, c.width = s.x - v.x - l.x), v.y > s.y - l.y ? (c.top = s.y - l.y, c.height = v.y - s.y + l.y) : (c.top = v.y, c.height = s.y - v.y - l.y), c; - }, _r = function(l) { + }, qs = function(d) { + var c = d.scrollAmount, s = d.initialPointerPos, g = d.pointerPos, i = {}; + return g.x > s.x - c.x ? (i.left = s.x - c.x, i.width = g.x - s.x + c.x) : (i.left = g.x, i.width = s.x - g.x - c.x), g.y > s.y - c.y ? (i.top = s.y - c.y, i.height = g.y - s.y + c.y) : (i.top = g.y, i.height = s.y - g.y - c.y), i; + }, Dr = function(c) { var s = { x: 0, y: 0 - }, v = window.getComputedStyle(l); - if (!v.transform || v.transform === "none") - return s; - if (v.transform.indexOf("3d") >= 0) { - var c = v.transform.trim().match(/matrix3d\((.*?)\)/); - if (c && c.length) { - var w, _ = (w = c[1]) === null || w === void 0 ? void 0 : w.split(","); - s.x = parseInt(_[12]) || 0, s.y = parseInt(_[13]) || 0; - } + }, g = window.getComputedStyle(c); + if (!g.transform || g.transform === "none") return s; - } else { - var k = v.transform.trim().match(/matrix\((.*?)\)/); - if (k && k.length) { - var M, P = (M = k[1]) === null || M === void 0 ? void 0 : M.split(","); - s.x = parseInt(P[4]) || 0, s.y = parseInt(P[5]) || 0; + if (g.transform.indexOf("3d") >= 0) { + var i = g.transform.trim().match(/matrix3d\((.*?)\)/); + if (i && i.length) { + var f, y = (f = i[1]) === null || f === void 0 ? void 0 : f.split(","); + s.x = parseInt(y[12]) || 0, s.y = parseInt(y[13]) || 0; } return s; } - }, la = function(l) { - var s = l.style.transform; + var x = g.transform.trim().match(/matrix\((.*?)\)/); + if (x && x.length) { + var k, H = (k = x[1]) === null || k === void 0 ? void 0 : k.split(","); + s.x = parseInt(H[4]) || 0, s.y = parseInt(H[5]) || 0; + } + return s; + }, Fs = function(c) { + var s = c.style.transform; if (!s || s.indexOf("translate") < 0) - return _r(l); - var v = { + return Dr(c); + var g = { x: 0, y: 0 - }, c = s.trim().match(/translate[3dD]*?\(.*?\)/); - if (c) { - var w, _ = (w = c[0]) === null || w === void 0 ? void 0 : w.split("("); - if (_) { - var k, M = (k = _[1]) === null || k === void 0 ? void 0 : k.split(","); - v.x = parseInt(M[0]) || 0, v.y = parseInt(M[1]) || 0; + }, i = s.trim().match(/translate[3dD]*?\(.*?\)/); + if (i) { + var f, y = (f = i[0]) === null || f === void 0 ? void 0 : f.split("("); + if (y) { + var x, k = (x = y[1]) === null || x === void 0 ? void 0 : x.split(","); + g.x = parseInt(k[0]) || 0, g.y = parseInt(k[1]) || 0; } } - return !v.x && !v.x ? _r(l) : v; - }, ca = function(l) { - var s = l.style, v = { + return !g.x && !g.x ? Dr(c) : g; + }, Gs = function(c) { + var s = c.style, g = { x: parseInt(s.left) || 0, y: parseInt(s.top) || 0 }; - if (!v.x && !v.x) { - var c = window.getComputedStyle(l); + if (!g.x && !g.x) { + var i = window.getComputedStyle(c); return { - x: parseInt(c.left) || 0, - y: parseInt(c.top) || 0 + x: parseInt(i.left) || 0, + y: parseInt(i.top) || 0 }; } - return v; - }, ua = function(d, l) { - return l ? la(d) : ca(d); - }, da = function(d) { - var l = d.element, s = d.edges, v = d.elementRect, c = d.containerRect, w = d.elementPos, _ = d.useTransform; - s.includes("top") && lt(l, { - y: w.y + c.top - v.top, - x: w.x - }, _), s.includes("left") && lt(l, { - y: w.y, - x: w.x + c.left - v.left - }, _), s.includes("bottom") && lt(l, { - y: w.y + c.bottom - v.bottom, - x: w.x - }, _), s.includes("right") && lt(l, { - y: w.y, - x: w.x + c.right - v.right - }, _); - }, kr = function(d) { - var l = d.computedStyle, s = d.node, v = l.position, c = v === "absolute" || v === "relative" || v === "fixed"; - !(s instanceof HTMLDocument) && !c && (s.style.position = "relative"); - }, ha = function(d) { - var l = d.shiftKey, s = d.keyboardDragSpeed, v = d.zoom, c = d.key, w = d.dragKeys, _ = d.scrollDiff, k = d.canScroll, M = d.scrollCallback, P = { + return g; + }, Js = function(d, c) { + return c ? Fs(d) : Gs(d); + }, Qs = function(d) { + var c = d.element, s = d.edges, g = d.elementRect, i = d.containerRect, f = d.elementPos, y = d.useTransform; + s.includes("top") && ut(c, { + y: f.y + i.top - g.top, + x: f.x + }, y), s.includes("left") && ut(c, { + y: f.y, + x: f.x + i.left - g.left + }, y), s.includes("bottom") && ut(c, { + y: f.y + i.bottom - g.bottom, + x: f.x + }, y), s.includes("right") && ut(c, { + y: f.y, + x: f.x + i.right - g.right + }, y); + }, Cr = function(d) { + var c = d.computedStyle, s = d.node, g = c.position, i = g === "absolute" || g === "relative" || g === "fixed"; + !(s instanceof Document) && !i && (s.style.position = "relative"); + }, eo = function(d) { + var c = d.shiftKey, s = d.keyboardDragSpeed, g = d.zoom, i = d.key, f = d.dragKeys, y = d.scrollDiff, x = d.canScroll, k = d.scrollCallback, H = { x: 0, y: 0 - }, A = l ? s * 4 * v : s * v; - return w.left.includes(c) && (P.x = _.x || -A, !l && !_.x && k && M(["left"], s)), w.right.includes(c) && (P.x = _.x || A, !l && !_.x && k && M(["right"], s)), w.up.includes(c) && (P.y = _.y || -A, !l && !_.y && k && M(["top"], s)), w.down.includes(c) && (P.y = _.y || A, !l && !_.y && k && M(["bottom"], s)), P; - }, fa = function(d) { - var l = d.element, s = d.force, v = d.multiSelectionToggle, c = d.SelectedSet, w = d.hoverClassName; - l.classList.contains(w) && !s || (c.has(l) ? v && c.delete(l) : c.add(l), l.classList.add(w)); - }, ma = function(d) { - var l = d.element, s = d.force, v = d.SelectedSet, c = d.PrevSelectedSet, w = d.hoverClassName; - if (!l.classList.contains(w) && !s) + }, X = c ? s * 4 * g : s * g; + return f.left.includes(i) && (H.x = y.x || -X, !c && !y.x && x && k(["left"], s)), f.right.includes(i) && (H.x = y.x || X, !c && !y.x && x && k(["right"], s)), f.up.includes(i) && (H.y = y.y || -X, !c && !y.y && x && k(["top"], s)), f.down.includes(i) && (H.y = y.y || X, !c && !y.y && x && k(["bottom"], s)), H; + }, to = function(d) { + var c = d.element, s = d.force, g = d.multiSelectionToggle, i = d.SelectedSet, f = d.hoverClassName; + c.classList.contains(f) && !s || (i.has(c) ? g && i.delete(c) : i.add(c), c.classList.add(f)); + }, ro = function(d) { + var c = d.element, s = d.force, g = d.SelectedSet, i = d.PrevSelectedSet, f = d.hoverClassName; + if (!c.classList.contains(f) && !s) return !1; - var _ = v.has(l), k = c.has(l); - _ && !k ? v.delete(l) : !_ && k && v.add(l), l.classList.remove(w); - }, Bt = function(d, l) { - return d.left < l.right && d.right > l.left && d.top < l.bottom && d.bottom > l.top; - }, Sr = function(d) { - var l = d.element, s = d.posDirection, v = d.containerRect, c = d.useTransform, w = ua(l, c), _ = Z(w, "+", s); - lt(l, _, c); - var k = l.getBoundingClientRect(), M = xr({ - elementRect: k, - containerRect: v + var y = g.has(c), x = i.has(c); + y && !x ? g.delete(c) : !y && x && g.add(c), c.classList.remove(f); + }, ct = function(c, s, g) { + return console.warn('[DragSelect] TypeIssue: setting "'.concat(c, '" is not of type "').concat(s, '".')); + }, W = function(c, s, g, i) { + if (s === void 0) + return g ? n({}, c, i) : {}; + if (s === null) + return n({}, c, null); + var f = !0, y = !1, x = typeof i == "string"; + x && (f = typeof s == "string" || s instanceof String), x && !f && (y = !0, ct(c, "string")); + var k = !Number.isNaN(i) && typeof i == "number"; + k && (f = !Number.isNaN(s) && typeof s == "number"), k && !f && (y = !0, ct(c, "number")); + var H = Object.prototype.toString.call(i) === "[object Object]"; + H && (f = Object.prototype.toString.call(s) === "[object Object]"), H && !f && (y = !0, ct(c, "object")); + var X = typeof i == "boolean"; + X && (f = typeof s == "boolean"), X && !f && (y = !0, ct(c, "boolean")); + var oe = Array.isArray(i); + oe && (f = Array.isArray(s)), oe && !f && (y = !0, ct(c, "array")); + var be = y || g; + return c === "dragKeys" && f ? n({}, c, Object.assign(i, s)) : c === "dragKeys" && !f ? be ? n({}, c, i) : {} : (c === "dropZones" && f && new Set(s.map(function(me) { + return me.id; + })).size !== s.length && console.warn('[DragSelect] UniqueConstraintsIssue: setting "dropZones" contains duplicate ids.'), f ? n({}, c, s) : be ? n({}, c, i) : {}); + }, so = function(d, c) { + return h(h(h(h(h(h(h(h(h(h(h(h(h(h(h(h(h(h(h(h(h(h(h(h(h(h(h(h(h(h(h(h(h(h({}, W("area", d.area, c, document)), W("selectables", d.selectables, c, null)), W("autoScrollSpeed", d.autoScrollSpeed, c, 5)), W("overflowTolerance", d.overflowTolerance, c, { + x: 25, + y: 25 + })), W("zoom", d.zoom, c, 1)), W("customStyles", d.customStyles, c, !1)), W("multiSelectMode", d.multiSelectMode, c, !1)), W("multiSelectToggling", d.multiSelectToggling, c, !0)), W("multiSelectKeys", d.multiSelectKeys, c, ["Control", "Shift", "Meta"])), W("selector", d.selector, c, null)), W("selectionThreshold", d.selectionThreshold, c, 0)), W("draggability", d.draggability, c, !0)), W("immediateDrag", d.immediateDrag, c, !0)), W("keyboardDrag", d.keyboardDrag, c, !0)), W("dragKeys", d.dragKeys, c, { + up: ["ArrowUp"], + down: ["ArrowDown"], + left: ["ArrowLeft"], + right: ["ArrowRight"] + })), W("keyboardDragSpeed", d.keyboardDragSpeed, c, 10)), W("useTransform", d.useTransform, c, !0)), W("refreshMemoryRate", d.refreshMemoryRate, c, 80)), W("dropZones", d.dropZones, c, [])), W("dropInsideThreshold", d.dropInsideThreshold, c, 1)), W("dropTargetThreshold", d.dropTargetThreshold, c, 0)), W("usePointerEvents", d.usePointerEvents, c, !1)), W("hoverClass", d.hoverClass, c, "ds-hover")), W("selectableClass", d.selectableClass, c, "ds-selectable")), W("selectedClass", d.selectedClass, c, "ds-selected")), W("selectorClass", d.selectorClass, c, "ds-selector")), W("selectorAreaClass", d.selectorAreaClass, c, "ds-selector-area")), W("droppedTargetClass", d.droppedTargetClass, c, "ds-dropped-target")), W("droppedInsideClass", d.droppedInsideClass, c, "ds-dropped-inside")), W("droppableClass", d.droppableClass, c, "ds-droppable")), W("dropZoneClass", d.dropZoneClass, c, "ds-dropzone")), W("dropZoneReadyClass", d.dropZoneReadyClass, c, "ds-dropzone-ready")), W("dropZoneTargetClass", d.dropZoneTargetClass, c, "ds-dropzone-target")), W("dropZoneInsideClass", d.dropZoneInsideClass, c, "ds-dropzone-inside")); + }, dt = function(d, c) { + var s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, g = d; + if (s > 0) { + var i = (d.right - d.left) * s, f = (d.bottom - d.top) * s; + g = { + left: d.left + i, + right: d.right - i, + top: d.top + f, + bottom: d.bottom - f + }; + } + return g.left < c.right && g.right > c.left && g.top < c.bottom && g.bottom > c.top; + }, Mr = function(d) { + var c = d.element, s = d.posDirection, g = d.containerRect, i = d.useTransform, f = Js(c, i), y = T(f, "+", s); + ut(c, y, i); + var x = c.getBoundingClientRect(), k = kr({ + elementRect: x, + containerRect: g }); - da({ - element: l, - edges: M, - elementRect: k, - containerRect: v, - elementPos: _, - useTransform: c + Qs({ + element: c, + edges: k, + elementRect: x, + containerRect: g, + elementPos: y, + useTransform: i }); - }, ga = function(d, l) { - window.removeEventListener("resize", l), window.removeEventListener("scroll", l), d.disconnect(); - }, pa = function(d, l, s) { - if (!!l.length) { - var v = document && document.documentElement && document.documentElement.scrollTop && document.documentElement, c = d instanceof HTMLDocument ? v || document.body : d, w = l.includes("top") && c.scrollTop > 0, _ = l.includes("bottom") && c.scrollTop < c.scrollHeight, k = l.includes("left") && c.scrollLeft > 0, M = l.includes("right") && c.scrollLeft < c.scrollWidth; - w && (c.scrollTop -= 1 * s), _ && (c.scrollTop += 1 * s), k && (c.scrollLeft -= 1 * s), M && (c.scrollLeft += 1 * s); + }, oo = function(d, c) { + window.removeEventListener("resize", c), window.removeEventListener("scroll", c), d.disconnect(); + }, no = function(d, c, s) { + if (c.length) { + var g = document && document.documentElement && document.documentElement.scrollTop && document.documentElement, i = d instanceof Document ? g || document.body : d, f = c.includes("top") && i.scrollTop > 0, y = c.includes("bottom") && i.scrollTop < i.scrollHeight, x = c.includes("left") && i.scrollLeft > 0, k = c.includes("right") && i.scrollLeft < i.scrollWidth; + f && (i.scrollTop -= 1 * s), y && (i.scrollTop += 1 * s), x && (i.scrollLeft -= 1 * s), k && (i.scrollLeft += 1 * s); } - }, lt = function(d, l, s) { + }, ut = function(d, c, s) { if (s) { - var v = d.style.transform; - d.style.transform = "translate3d(".concat(l.x, "px,").concat(l.y, "px,1px) ").concat(v.replace(/translate.*?\)/g, "")); + var g = d.style.transform; + d.style.transform = "translate3d(".concat(c.x, "px,").concat(c.y, "px,1px) ").concat(g.replace(/translate.*?\)/g, "")); } else - d.style.left = "".concat(l.x, "px"), d.style.top = "".concat(l.y, "px"); + d.style.left = "".concat(c.x, "px"), d.style.top = "".concat(c.y, "px"); return d; - }, va = function(d) { - for (var l = d.subscribe, s = d.publish, v = d.Interaction, c = d.SelectedSet, w = { + }, io = function(d) { + for (var c = d.subscribe, s = d.publish, g = d.Interaction, i = d.SelectedSet, f = d.DropZones, y = { "Selected:added": [{ name: "elementselect" }], @@ -797,70 +902,83 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho "Interaction:start": [{ name: "dragstart" }], - "Interaction:update": [{ - name: "dragmove", - condition: function(A) { - return A.event; + "Interaction:update": [ + { + name: "dragmove", + condition: function(oe) { + return oe.event; + } } - }], - "Interaction:end": [{ - name: "callback" - }] - }, _ = function() { - var A = W(M[k], 2), R = A[0], F = A[1]; - ["pre", !1].forEach(function(oe) { - return l(oe ? "".concat(R, ":").concat(oe) : R, function(ye) { - return F.forEach(function(ae) { - return (!ae.condition || ae.condition(ye)) && s(oe ? "".concat(oe).concat(ae.name) : ae.name, m({ - items: c.elements, - isDragging: v.isDragging - }, ye)); + ], + "Interaction:end": [ + { + name: "callback", + extraData: function() { + var oe = f.getTarget(); + return h({}, oe ? { + dropTarget: oe.toObject() + } : {}); + } + } + ] + }, x = function() { + var oe = K(H[k], 2), be = oe[0], me = oe[1]; + ["pre", !1].forEach(function(Ee) { + return c(Ee ? "".concat(be, ":").concat(Ee) : be, function(ne) { + return me.forEach(function(ye) { + return (!ye.condition || ye.condition(ne)) && s(Ee ? "".concat(Ee).concat(ye.name) : ye.name, h(h({ + items: i.elements, + isDragging: g.isDragging + }, ne), ye.extraData ? ye.extraData(ne) : {})); }); }); }); - }, k = 0, M = Object.entries(w); k < M.length; k++) - _(); - }, Je = function(d) { - return d ? !Array.isArray(d) && (d instanceof HTMLElement || d instanceof SVGElement) ? [d] : K(d) : []; - }, Dr = function(d, l) { - d.style.left = "".concat(l.left, "px"), d.style.top = "".concat(l.top, "px"), d.style.width = "".concat(l.width, "px"), d.style.height = "".concat(l.height, "px"); - }, ba = /* @__PURE__ */ function() { - function d(l) { - var s = this, v = l.area, c = l.PS, w = l.zoom; - r(this, d), a(this, "_modificationCallback", void 0), a(this, "_modificationObserver", void 0), a(this, "_zoom", void 0), a(this, "_node", void 0), a(this, "_parentNodes", void 0), a(this, "_computedStyle", void 0), a(this, "_computedBorder", void 0), a(this, "_rect", void 0), a(this, "setArea", function(_) { - s._node = _, kr({ + }, k = 0, H = Object.entries(y); k < H.length; k++) + x(); + }, Be = function(d) { + return d ? !Array.isArray(d) && (d instanceof HTMLElement || d instanceof SVGElement) ? [d] : B(new Set(B(d))) : []; + }, Er = function(d, c) { + d.style.left = "".concat(c.left, "px"), d.style.top = "".concat(c.top, "px"), d.style.width = "".concat(c.width, "px"), d.style.height = "".concat(c.height, "px"); + }, ao = /* @__PURE__ */ function() { + function d(c) { + var s = this, g = c.DS; + r(this, d), n(this, "DS", void 0), n(this, "_observers", void 0), n(this, "_node", void 0), n(this, "_parentNodes", void 0), n(this, "_computedStyle", void 0), n(this, "_computedBorder", void 0), n(this, "_rect", void 0), n(this, "setArea", function(i) { + s.reset(), s._node = i, Cr({ computedStyle: s.computedStyle, node: s._node }), setTimeout(function() { - s.PubSub.publish("Area:modified:pre", { + s.DS.PubSub.publish("Area:modified:pre", { item: s - }), s.reset(), s.PubSub.publish("Area:modified", { + }), s.reset(), s.DS.PubSub.publish("Area:modified", { item: s }); }); - }), a(this, "start", function() { - de(s.parentNodes, s._modificationCallback, s._modificationObserver); - }), a(this, "reset", function() { + }), n(this, "start", function() { + s._observers = U(s.parentNodes, at(function(i) { + s.DS.PubSub.publish("Area:modified:pre", { + event: i, + item: s + }), s.reset(), s.DS.PubSub.publish("Area:modified", { + event: i, + item: s + }); + }, 60)); + }), n(this, "reset", function() { s._computedStyle = void 0, s._rect = void 0, s._computedBorder = void 0, s._parentNodes = void 0; - }), a(this, "stop", function() { - ga(s._modificationObserver, s._modificationCallback), s.reset(); - }), a(this, "scroll", function(_, k) { - var M = { - scroll_directions: _, - scroll_multiplier: k + }), n(this, "stop", function() { + s._observers.cleanup(), s.reset(); + }), n(this, "scroll", function(i, f) { + var y = { + scroll_directions: i, + scroll_multiplier: f }; - s.PubSub.publish("Area:scroll:pre", M), pa(s._node, _, k), s.PubSub.publish("Area:scroll", M); - }), this._zoom = w, this.PubSub = c, this.setArea(v), this._modificationCallback = xt(function(_) { - s.PubSub.publish("Area:modified:pre", { - event: _, - item: s - }), s.reset(), s.PubSub.publish("Area:modified", { - event: _, - item: s - }); - }, 60), this._modificationObserver = new MutationObserver(this._modificationCallback), this.PubSub.subscribe("Interaction:init", this.start), this.PubSub.subscribe("Interaction:end", this.reset); + s.DS.PubSub.publish("Area:scroll:pre", y), no(s._node, i, f), s.DS.PubSub.publish("Area:scroll", y); + }), this.DS = g, this.setArea(this.DS.stores.SettingsStore.s.area), this.DS.PubSub.subscribe("Settings:updated:area", function(i) { + var f = i.settings; + s.setArea(f.area); + }), this.DS.PubSub.subscribe("Interaction:init", this.start), this.DS.PubSub.subscribe("Interaction:end", this.reset); } - return i(d, [{ + return a(d, [{ key: "HTMLNode", get: function() { return this._node; @@ -878,328 +996,516 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho }, { key: "computedStyle", get: function() { - return this._computedStyle ? this._computedStyle : this.HTMLNode instanceof HTMLDocument ? this._computedStyle = window.getComputedStyle(this.HTMLNode.body || this.HTMLNode.documentElement) : this._computedStyle = window.getComputedStyle(this.HTMLNode); + return this._computedStyle ? this._computedStyle : this.HTMLNode instanceof Document ? this._computedStyle = window.getComputedStyle(this.HTMLNode.body || this.HTMLNode.documentElement) : this._computedStyle = window.getComputedStyle(this.HTMLNode); } }, { key: "rect", get: function() { - return this._rect ? this._rect : this._rect = Rt(this.HTMLNode, this._zoom); + return this._rect ? this._rect : this._rect = Xs(this.HTMLNode, this.DS.stores.SettingsStore.s.zoom); } }, { key: "parentNodes", get: function() { - if (this._parentNodes) - return this._parentNodes; - var s = function v(c) { - var w, _ = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, k = (w = c[_]) === null || w === void 0 ? void 0 : w.parentNode; - return k ? (c.push(k), _++, v(c, _)) : c; - }; - return this._parentNodes = s([this.HTMLNode]), this._parentNodes; + return this._parentNodes ? this._parentNodes : this._parentNodes = Ct(this.HTMLNode); } }]), d; - }(), ya = /* @__PURE__ */ function() { - function d(l) { - var s = this, v = l.DS, c = l.dragKeys, w = l.draggability, _ = l.keyboardDrag, k = l.keyboardDragSpeed, M = l.useTransform, P = l.zoom; - r(this, d), a(this, "_useTransform", void 0), a(this, "_prevCursorPos", void 0), a(this, "_prevScrollPos", void 0), a(this, "_elements", []), a(this, "_draggability", void 0), a(this, "_dragKeys", void 0), a(this, "_dragKeysFlat", void 0), a(this, "_keyboardDrag", void 0), a(this, "_keyboardDragSpeed", void 0), a(this, "_zoom", void 0), a(this, "keyboardDrag", function(A) { - var R = A.event, F = A.key; - if (!(!s._keyboardDrag || !s._dragKeysFlat.includes(F) || !s.DS.SelectedSet.size || !s._draggability || s.DS.continue)) { - var oe = { - event: R, + }(), lo = /* @__PURE__ */ function() { + function d(c) { + var s = this, g = c.DS; + r(this, d), n(this, "_prevCursorPos", void 0), n(this, "_prevScrollPos", void 0), n(this, "_elements", []), n(this, "_dragKeys", void 0), n(this, "_dragKeysFlat", []), n(this, "assignDragkeys", function() { + s._dragKeys = { + up: s.DS.stores.SettingsStore.s.dragKeys.up.map(function(i) { + return i.toLowerCase(); + }), + down: s.DS.stores.SettingsStore.s.dragKeys.down.map(function(i) { + return i.toLowerCase(); + }), + left: s.DS.stores.SettingsStore.s.dragKeys.left.map(function(i) { + return i.toLowerCase(); + }), + right: s.DS.stores.SettingsStore.s.dragKeys.right.map(function(i) { + return i.toLowerCase(); + }) + }, s._dragKeysFlat = [].concat(B(s._dragKeys.up), B(s._dragKeys.down), B(s._dragKeys.left), B(s._dragKeys.right)); + }), n(this, "keyboardDrag", function(i) { + var f = i.event, y = i.key, x = y.toLowerCase(); + if (!(!s.DS.stores.SettingsStore.s.keyboardDrag || !s._dragKeysFlat.includes(x) || !s.DS.SelectedSet.size || !s.DS.stores.SettingsStore.s.draggability || s.DS.continue)) { + var k = { + event: f, isDragging: !0, isDraggingKeyboard: !0 }; - s.DS.publish(["Interaction:start:pre", "Interaction:start"], oe), s._elements = s.DS.getSelection(), s.handleZIndex(!0); - var ye = ha({ + s.DS.publish(["Interaction:start:pre", "Interaction:start"], k), s._elements = s.DS.getSelection(), s.handleZIndex(!0); + var H = eo({ shiftKey: s.DS.stores.KeyStore.currentValues.includes("shift"), - keyboardDragSpeed: s._keyboardDragSpeed, - zoom: s._zoom, - key: F, + keyboardDragSpeed: s.DS.stores.SettingsStore.s.keyboardDragSpeed, + zoom: s.DS.stores.SettingsStore.s.zoom, + key: x, scrollCallback: s.DS.Area.scroll, scrollDiff: s._scrollDiff, canScroll: s.DS.stores.ScrollStore.canScroll, dragKeys: s._dragKeys }); - s._elements.forEach(function(ae) { - return Sr({ - element: ae, - posDirection: ye, + s._elements.forEach(function(X) { + return Mr({ + element: X, + posDirection: H, containerRect: s.DS.SelectorArea.rect, - useTransform: s._useTransform + useTransform: s.DS.stores.SettingsStore.s.useTransform }); - }), s.DS.publish(["Interaction:update:pre", "Interaction:update"], oe); + }), s.DS.publish(["Interaction:update:pre", "Interaction:update"], k); } - }), a(this, "keyboardEnd", function(A) { - var R = A.event, F = A.key; - if (!(!s._keyboardDrag || !s._dragKeysFlat.includes(F) || !s.DS.SelectedSet.size || !s._draggability)) { - var oe = { - event: R, - isDragging: s._draggability, + }), n(this, "keyboardEnd", function(i) { + var f = i.event, y = i.key, x = y.toLowerCase(); + if (!(!s.DS.stores.SettingsStore.s.keyboardDrag || !s._dragKeysFlat.includes(x) || !s.DS.SelectedSet.size || !s.DS.stores.SettingsStore.s.draggability)) { + var k = { + event: f, + isDragging: s.DS.stores.SettingsStore.s.draggability, isDraggingKeyboard: !0 }; - s.DS.publish(["Interaction:end:pre", "Interaction:end"], oe); + s.DS.publish(["Interaction:end:pre", "Interaction:end"], k); } - }), a(this, "start", function(A) { - var R = A.isDragging, F = A.isDraggingKeyboard; - !R || F || (s._prevCursorPos = null, s._prevScrollPos = null, s._elements = s.DS.getSelection(), s.handleZIndex(!0)); - }), a(this, "stop", function(A) { - A != null && A.isKeyboard || (s._prevCursorPos = null, s._prevScrollPos = null, s.handleZIndex(!1), s._elements = []); - }), a(this, "update", function(A) { - var R = A.isDragging, F = A.isDraggingKeyboard; - if (!(!R || !s._elements.length || F || s.DS.continue)) { - var oe = Z(s._cursorDiff, "+", s._scrollDiff); - s._elements.forEach(function(ye) { - return Sr({ - element: ye, - posDirection: oe, + }), n(this, "start", function(i) { + var f = i.isDragging, y = i.isDraggingKeyboard; + !f || y || (s._prevCursorPos = null, s._prevScrollPos = null, s._elements = s.DS.getSelection(), s.handleZIndex(!0)); + }), n(this, "stop", function(i) { + i != null && i.isKeyboard || (s._prevCursorPos = null, s._prevScrollPos = null, s.handleZIndex(!1), s._elements = []); + }), n(this, "update", function(i) { + var f = i.isDragging, y = i.isDraggingKeyboard; + if (!(!f || !s._elements.length || y || s.DS.continue)) { + var x = T(s._cursorDiff, "+", s._scrollDiff); + s._elements.forEach(function(k) { + return Mr({ + element: k, + posDirection: x, containerRect: s.DS.SelectorArea.rect, - useTransform: s._useTransform + useTransform: s.DS.stores.SettingsStore.s.useTransform }); }); } - }), a(this, "handleZIndex", function(A) { - s._elements.forEach(function(R) { - return R.style.zIndex = "".concat((parseInt(R.style.zIndex) || 0) + A ? 9999 : -9998); + }), n(this, "handleZIndex", function(i) { + s._elements.forEach(function(f) { + return f.style.zIndex = "".concat((parseInt(f.style.zIndex) || 0) + i ? 9999 : -9998); }); - }), this.DS = v, this._useTransform = M, this._keyboardDragSpeed = k, this._keyboardDrag = _, this._zoom = P, this._draggability = w, this._dragKeys = { - up: c.up.map(function(A) { - return A.toLowerCase(); - }), - down: c.down.map(function(A) { - return A.toLowerCase(); - }), - left: c.left.map(function(A) { - return A.toLowerCase(); - }), - right: c.right.map(function(A) { - return A.toLowerCase(); - }) - }, this._dragKeysFlat = [].concat(K(this._dragKeys.up), K(this._dragKeys.down), K(this._dragKeys.left), K(this._dragKeys.right)), this.DS.subscribe("Interaction:start", this.start), this.DS.subscribe("Interaction:end", this.stop), this.DS.subscribe("Interaction:update", this.update), this.DS.subscribe("KeyStore:down", this.keyboardDrag), this.DS.subscribe("KeyStore:up", this.keyboardEnd); + }), this.DS = g, this.DS.subscribe("Settings:updated:dragKeys", this.assignDragkeys), this.assignDragkeys(), this.DS.subscribe("Interaction:start", this.start), this.DS.subscribe("Interaction:end", this.stop), this.DS.subscribe("Interaction:update", this.update), this.DS.subscribe("KeyStore:down", this.keyboardDrag), this.DS.subscribe("KeyStore:up", this.keyboardEnd); } - return i(d, [{ + return a(d, [{ key: "_cursorDiff", get: function() { - var s = this.DS.stores.PointerStore.currentVal, v = this._prevCursorPos ? Z(s, "-", this._prevCursorPos) : { + var s = this.DS.stores.PointerStore.currentVal, g = this._prevCursorPos ? T(s, "-", this._prevCursorPos) : { x: 0, y: 0 }; - return this._prevCursorPos = s, v; + return this._prevCursorPos = s, g; } }, { key: "_scrollDiff", get: function() { - var s = this.DS.stores.ScrollStore.currentVal, v = this._prevScrollPos ? Z(s, "-", this._prevScrollPos) : { + var s = this.DS.stores.ScrollStore.currentVal, g = this._prevScrollPos ? T(s, "-", this._prevScrollPos) : { x: 0, y: 0 }; - return this._prevScrollPos = s, v; + return this._prevScrollPos = s, g; + } + }]), d; + }(), co = /* @__PURE__ */ function() { + function d(c) { + var s = this, g = c.DS, i = c.id, f = c.element, y = c.droppables; + r(this, d), n(this, "id", void 0), n(this, "element", void 0), n(this, "_droppables", void 0), n(this, "_rect", void 0), n(this, "_observers", void 0), n(this, "_timeout", void 0), n(this, "_itemsDropped", []), n(this, "_itemsInside", void 0), n(this, "setReadyClasses", function(x) { + if (!s.isDestroyed) { + var k = s.droppables.filter(function(H) { + return s.DS.SelectedSet.has(H); + }); + k.length && (k.forEach(function(H) { + H.classList[x]("".concat(s.Settings.droppableClass)), H.classList[x]("".concat(s.Settings.droppableClass, "-").concat(s.id)); + }), s.element.classList[x]("".concat(s.Settings.dropZoneReadyClass))); + } + }), n(this, "handleNoDrop", function() { + var x; + s.isDestroyed || (s.DS.SelectedSet.forEach(function(k) { + k.classList.remove(s.Settings.droppedTargetClass), k.classList.remove("".concat(s.Settings.droppedTargetClass, "-").concat(s.id)); + }), s._itemsDropped = s._itemsDropped.filter(function(k) { + return !s.DS.SelectedSet.has(k); + }), (x = s._itemsDropped) !== null && x !== void 0 && x.length || s.element.classList.remove("".concat(s.Settings.dropZoneTargetClass))); + }), n(this, "handleDrop", function() { + var x, k, H; + s.isDestroyed || (s._itemsDropped = B(new Set([].concat(B(s._itemsDropped), B((x = s.droppables) === null || x === void 0 ? void 0 : x.filter(function(X) { + return s.DS.SelectedSet.has(X); + }))))), (k = s._itemsDropped) === null || k === void 0 || k.forEach(function(X) { + X.classList.add("".concat(s.Settings.droppedTargetClass)), X.classList.add("".concat(s.Settings.droppedTargetClass, "-").concat(s.id)); + }), (H = s._itemsDropped) !== null && H !== void 0 && H.length && s.element.classList.add("".concat(s.Settings.dropZoneTargetClass))); + }), n(this, "handleItemsInsideClasses", function() { + var x = !1; + s.droppables.forEach(function(k) { + s.itemsInside.includes(k) ? (k.classList.add("".concat(s.Settings.droppedInsideClass)), k.classList.add("".concat(s.Settings.droppedInsideClass, "-").concat(s.id)), x = !0) : (k.classList.remove("".concat(s.Settings.droppedInsideClass, "-").concat(s.id)), k.className.includes("".concat(s.Settings.droppedInsideClass, "-")) || k.classList.remove("".concat(s.Settings.droppedInsideClass))); + }), x ? s.element.classList.add("".concat(s.Settings.dropZoneInsideClass)) : s.element.classList.remove("".concat(s.Settings.dropZoneInsideClass)); + }), n(this, "start", function(x) { + var k = x.isDragging; + !k || s.isDestroyed || s.setReadyClasses("add"); + }), n(this, "stop", function(x) { + var k = x.isDragging; + !k || s.isDestroyed || (s.setReadyClasses("remove"), s.handleItemsInsideClasses()); + }), n(this, "toObject", function() { + return { + id: s.id, + element: s.element, + droppables: s.droppables, + itemsDropped: s.itemsDropped, + itemsInside: s.itemsInside + }; + }), this.DS = g, this.Settings = g.stores.SettingsStore.s, this.id = i, this.element = f, y && (this.droppables = Be(y)), this.element.classList.add("".concat(this.Settings.dropZoneClass)), this.DS.subscribe("Settings:updated:dropZoneClass", function(x) { + var k = x.settings; + s.element.classList.remove(k["dropZoneClass:pre"]), s.element.classList.add(k.dropZoneClass); + }), this._observers = U(this.parentNodes, at(function() { + return s._rect = null; + }, this.Settings.refreshMemoryRate)), this.DS.subscribe("Interaction:start", this.start), this.DS.subscribe("Interaction:end", this.stop); + } + return a(d, [{ + key: "destroy", + value: function() { + var s = this; + this._observers.cleanup(), this.element.classList.remove("".concat(this.Settings.dropZoneClass)), this.element.classList.remove("".concat(this.Settings.dropZoneTargetClass)), this.element.classList.remove("".concat(this.Settings.dropZoneReadyClass)), this.droppables.forEach(function(g) { + g.classList.remove("".concat(s.Settings.droppedTargetClass)), g.classList.remove("".concat(s.Settings.droppedTargetClass, "-").concat(s.id)), g.classList.remove("".concat(s.Settings.droppableClass)), g.classList.remove("".concat(s.Settings.droppableClass, "-").concat(s.id)); + }), this.DS.unsubscribe("Interaction:start", this.start), this.DS.unsubscribe("Interaction:end", this.stop), this.element = null, this.droppables = null, this.id = null, this._itemsDropped = null, this._itemsInside = null, this.isDestroyed = !0; + } + }, { + key: "rect", + get: function() { + return this.isDestroyed ? null : this._rect ? this._rect : this._rect = this.element.getBoundingClientRect(); + } + }, { + key: "itemsDropped", + get: function() { + return this.isDestroyed ? null : this._itemsDropped; + } + }, { + key: "itemsInside", + get: function() { + var s = this; + return this.isDestroyed ? null : this._itemsInside ? this._itemsInside : (this._itemsInside = this.droppables.flatMap(function(g) { + return dt(s.DS.SelectableSet.rects.get(g), s.rect, s.Settings.dropInsideThreshold) ? [g] : []; + }), this._timeout && clearTimeout(this._timeout), this._timeout = setTimeout(function() { + return s._itemsInside = null; + }, this.Settings.refreshMemoryRate), this._itemsInside); + } + }, { + key: "parentNodes", + get: function() { + return this._parentNodes ? this._parentNodes : this._parentNodes = Ct(this.element); + } + }, { + key: "droppables", + get: function() { + return this._droppables ? this._droppables : this.DS.SelectableSet.elements; + }, + set: function(s) { + this._droppables = s; } }]), d; - }(), wa = /* @__PURE__ */ function() { - function d(l) { - var s = this, v = l.DS, c = l.areaElement, w = l.draggability, _ = l.immediateDrag, k = l.selectableClass; - r(this, d), a(this, "_areaElement", void 0), a(this, "_draggability", void 0), a(this, "_immediateDrag", void 0), a(this, "_selectableClass", void 0), a(this, "isInteracting", void 0), a(this, "isDragging", void 0), a(this, "init", function() { + }(), uo = function d(c) { + var s = this, g = c.DS; + r(this, d), n(this, "_zoneByElement", /* @__PURE__ */ new Map()), n(this, "_zoneById", /* @__PURE__ */ new Map()), n(this, "_zonesByDroppable", /* @__PURE__ */ new Map()), n(this, "_zones", void 0), n(this, "setDropZones", function(i) { + var f = i.dropZones; + f && (s._zones && s._zones.forEach(function(y) { + return y.destroy(); + }), s._zones = f.map(function(y) { + return new co(h({ + DS: s.DS + }, y)); + }), s._zones.forEach(function(y) { + s._zoneByElement.set(y.element, y), s._zoneById.set(y.id, y), y.droppables.forEach(function(x) { + var k = s._zonesByDroppable.get(x); + if (!(k != null && k.length)) + return s._zonesByDroppable.set(x, [y]); + s._zonesByDroppable.set(x, B(new Set([].concat(B(k), [y])))); + }); + })); + }), n(this, "_handleDrop", function(i) { + s._zones.forEach(function(f) { + f !== i && f.handleNoDrop(); + }), i && i.handleDrop(); + }), n(this, "_getZoneByElementsFromPoint", function(i, f) { + for (var y = f.x, x = f.y, k = 0, H = i.length; k < H; k++) { + var X = s._zoneByElement.get(i[k]); + if (X && dt(X.rect, { + left: y, + right: y, + top: x, + bottom: x + }, Math.min(s.Settings.dropTargetThreshold, 0.5))) + return X; + } + }), n(this, "stop", function(i) { + var f = i.isDragging; + if (f) { + var y = s.getTarget(); + s._handleDrop(y); + } + }), n(this, "getItemsDroppedById", function(i) { + var f = s._zoneById.get(i); + return f ? f.itemsDropped : console.warn("[DragSelect] No zone found (id: ".concat(i, ")")); + }), n(this, "getItemsInsideById", function(i, f) { + var y = s._zoneById.get(i); + if (!y) + return console.warn("[DragSelect] No zone found (id: ".concat(i, ")")); + var x = y.itemsInside; + return f && y.handleItemsInsideClasses(), x; + }), n(this, "getTarget", function(i) { + var f; + if ((f = s._zones) !== null && f !== void 0 && f.length) { + var y = (i == null ? void 0 : i.x) || s.DS.stores.PointerStore.currentVal.x, x = (i == null ? void 0 : i.y) || s.DS.stores.PointerStore.currentVal.y, k = document.elementsFromPoint(y, x); + return s._getZoneByElementsFromPoint(k, { + x: y, + y: x + }); + } + }), this.DS = g, this.Settings = g.stores.SettingsStore.s, this.DS.subscribe("Settings:updated:dropZones", function(i) { + var f = i.settings; + return s.setDropZones(f); + }), this.setDropZones({ + dropZones: this.DS.stores.SettingsStore.s.dropZones + }), this.DS.subscribe("Interaction:end", this.stop); + }, ho = /* @__PURE__ */ function() { + function d(c) { + var s = this, g = c.DS; + r(this, d), n(this, "isInteracting", void 0), n(this, "isDragging", void 0), n(this, "init", function() { return s.DS.publish("Interaction:init:pre", {}); - }), a(this, "_init", function() { - s.stop(), s._areaElement.addEventListener("mousedown", s.start), s._areaElement.addEventListener("touchstart", s.start, { + }), n(this, "_init", function() { + s.stop(), s.Settings.usePointerEvents ? s.DS.Area.HTMLNode.addEventListener("pointerdown", s.start, { + passive: !1 + }) : s.DS.Area.HTMLNode.addEventListener("mousedown", s.start), s.DS.Area.HTMLNode.addEventListener("touchstart", s.start, { passive: !1 }), s.DS.publish("Interaction:init", {}); - }), a(this, "start", function(M) { + }), n(this, "start", function(i) { return s.DS.publish("Interaction:start:pre", { - event: M, + event: i, isDragging: s.isDragging }); - }), a(this, "_start", function(M) { - M.type === "touchstart" && M.preventDefault(), s._canInteract(M) && (s.isInteracting = !0, s.isDragging = s.isDragEvent(M), s.DS.publish("Interaction:start", { - event: M, + }), n(this, "_start", function(i) { + i.type === "touchstart" && i.preventDefault(), s._canInteract(i) && (s.isInteracting = !0, s.isDragging = s.isDragEvent(i), s.DS.publish("Interaction:start", { + event: i, isDragging: s.isDragging - }), document.addEventListener("mouseup", s.reset), document.addEventListener("touchend", s.reset)); - }), a(this, "isDragEvent", function(M) { - var P = M.target.closest(".".concat(s._selectableClass)); - return !s._draggability || s.DS.stores.KeyStore.isMultiSelectKeyPressed(M) || !P ? !1 : (s._immediateDrag && (s.DS.SelectedSet.size ? s.DS.SelectedSet.has(P) || (s.DS.SelectedSet.clear(), s.DS.SelectedSet.add( - P - )) : s.DS.SelectedSet.add( - P - )), !!s.DS.SelectedSet.has(P)); - }), a(this, "onClick", function(M) { - var P = M.event; - if (!!s._canInteract(P) && !(P.detail > 0)) { - var A = s.DS, R = A.stores, F = R.PointerStore, oe = R.KeyStore, ye = A.SelectableSet, ae = A.SelectedSet; - F.start(P); - var Ze = P.target; - !ye.has(Ze) || (oe.isMultiSelectKeyPressed(P) || ae.clear(), ae.toggle(Ze), s.reset()); + }), s.Settings.usePointerEvents ? (document.addEventListener("pointerup", s.reset), document.addEventListener("pointercancel", s.reset)) : document.addEventListener("mouseup", s.reset), document.addEventListener("touchend", s.reset)); + }), n(this, "isDragEvent", function(i) { + var f = i.target.closest(".".concat(s.Settings.selectableClass)); + return !s.Settings.draggability || s.DS.stores.KeyStore.isMultiSelectKeyPressed(i) || !f ? !1 : (s.Settings.immediateDrag && (s.DS.SelectedSet.size ? s.DS.SelectedSet.has(f) || (s.DS.SelectedSet.clear(), s.DS.SelectedSet.add(f)) : s.DS.SelectedSet.add(f)), !!s.DS.SelectedSet.has(f)); + }), n(this, "onClick", function(i) { + var f = i.event; + if (s._canInteract(f) && !(f.detail > 0)) { + var y = s.DS, x = y.stores, k = x.PointerStore, H = x.KeyStore, X = y.SelectableSet, oe = y.SelectedSet; + k.start(f); + var be = f.target; + X.has(be) && (H.isMultiSelectKeyPressed(f) || oe.clear(), oe.toggle(be), s.reset()); } - }), a(this, "stop", function() { - s.isInteracting = !1, s.isDragging = !1, s._areaElement.removeEventListener("mousedown", s.start), s._areaElement.removeEventListener("touchstart", s.start, { + }), n(this, "stop", function() { + var i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : s.DS.Area.HTMLNode; + s.isInteracting = !1, s.isDragging = !1, s.Settings.usePointerEvents ? (i.removeEventListener("pointerdown", s.start, { passive: !1 - }), document.removeEventListener("mouseup", s.reset), document.removeEventListener("touchend", s.reset); - }), a(this, "update", function(M) { - var P = M.event, A = M.scroll_directions, R = M.scroll_multiplier; + }), document.removeEventListener("pointerup", s.reset), document.removeEventListener("pointercancel", s.reset)) : (i.removeEventListener("mousedown", s.start), document.removeEventListener("mouseup", s.reset)), i.removeEventListener("touchstart", s.start, { + passive: !1 + }), document.removeEventListener("touchend", s.reset); + }), n(this, "update", function(i) { + var f = i.event, y = i.scroll_directions, x = i.scroll_multiplier; s.isInteracting && s.DS.publish(["Interaction:update:pre", "Interaction:update"], { - event: P, - scroll_directions: A, - scroll_multiplier: R, + event: f, + scroll_directions: y, + scroll_multiplier: x, isDragging: s.isDragging }); - }), a(this, "reset", function(M) { + }), n(this, "reset", function(i) { return s.DS.publish("Interaction:end:pre", { - event: M, + event: i, isDragging: s.isDragging }); - }), a(this, "_reset", function(M) { - var P = s.isDragging; + }), n(this, "_reset", function(i) { + var f = s.isDragging; s.stop(), s.init(), s.DS.publish("Interaction:end", { - event: M, - isDragging: P + event: i, + isDragging: f }); - }), this._areaElement = c, this._draggability = w, this._immediateDrag = _, this._selectableClass = k, this.DS = v, this.DS.subscribe("PointerStore:updated", this.update), this.DS.subscribe("Selectable:click", this.onClick), this.DS.subscribe("Selectable:pointer", function(M) { - var P = M.event; - return s.start(P); - }), this.DS.subscribe("Interaction:start:pre", function(M) { - var P = M.event; - return s._start(P); - }), this.DS.subscribe("Interaction:init:pre", this._init), this.DS.subscribe("Interaction:end:pre", function(M) { - var P = M.event; - return s._reset(P); + }), this.DS = g, this.Settings = g.stores.SettingsStore.s, this.DS.subscribe("Settings:updated:area", function(i) { + var f = i.settings; + s.stop(f["area:pre"]), s.init(); + }), this.DS.subscribe("PointerStore:updated", this.update), this.DS.subscribe("Selectable:click", this.onClick), this.DS.subscribe("Selectable:pointer", function(i) { + var f = i.event; + return s.start(f); + }), this.DS.subscribe("Interaction:start:pre", function(i) { + var f = i.event; + return s._start(f); + }), this.DS.subscribe("Interaction:init:pre", this._init), this.DS.subscribe("Interaction:end:pre", function(i) { + var f = i.event; + return s._reset(f); }), this.DS.subscribe("Area:scroll", this.update); } - return i(d, [{ + return a(d, [{ key: "_canInteract", value: function(s) { - var v = s.clientX === 0 && s.clientY === 0 && s.detail === 0 && s.target; - return !(s.button === 2 || this.isInteracting || s.target && !this.DS.SelectorArea.isInside( - s.target - ) || !v && !this.DS.SelectorArea.isClicked(s)); + var g = s.clientX === 0 && s.clientY === 0 && s.detail === 0 && s.target; + return !(s.button === 2 || this.isInteracting || s.target && !this.DS.SelectorArea.isInside(s.target) || !g && !this.DS.SelectorArea.isClicked(s)); } }]), d; - }(), xa = function d(l) { - var s = this, v = l.DS; - r(this, d), a(this, "subscribers", {}), a(this, "subscribe", function(c, w) { - return Array.isArray(s.subscribers[c]) || (s.subscribers[c] = []), s.subscribers[c].push(w), s.subscribers[c].length - 1; - }), a(this, "unsubscribe", function(c, w, _) { - _ >= 0 ? s.subscribers[c].splice(_, 1) : w && (s.subscribers[c] = s.subscribers[c].filter(function(k) { - return k !== w; + }(), fo = function d(c) { + var s = this, g = c.DS; + r(this, d), n(this, "subscribers", {}), n(this, "subscribe", function(i, f) { + return Array.isArray(s.subscribers[i]) || (s.subscribers[i] = []), s.subscribers[i].push(f), s.subscribers[i].length - 1; + }), n(this, "unsubscribe", function(i, f, y) { + y >= 0 ? s.subscribers[i].splice(y, 1) : f && (s.subscribers[i] = s.subscribers[i].filter(function(x) { + return x !== f; })); - }), a(this, "publish", function(c, w) { - Array.isArray(c) ? c.forEach(function(_) { - return s._publish(_, w); - }) : s._publish(c, w); - }), a(this, "_publish", function(c, w) { - var _ = s.subscribers[c]; - !Array.isArray(_) || (c.includes(":pre") ? s._handlePrePublish(_, w) : s._handlePublish(_, w)); - }), a(this, "_handlePublish", function(c, w) { - for (var _ = 0, k = c.length; _ < k; _++) { + }), n(this, "publish", function(i, f) { + Array.isArray(i) ? i.forEach(function(y) { + return s._publish(y, f); + }) : s._publish(i, f); + }), n(this, "_publish", function(i, f) { + var y = s.subscribers[i]; + Array.isArray(y) && (i.includes(":pre") ? s._handlePrePublish(y, f) : s._handlePublish(y, f)); + }), n(this, "_handlePublish", function(i, f) { + for (var y = 0, x = i.length; y < x; y++) { if (s.DS.stopped) return; - c[_](w); + i[y](f); } - }), a(this, "_handlePrePublish", function(c, w) { - for (var _ = c.length; _--; ) { + }), n(this, "_handlePrePublish", function(i, f) { + for (var y = i.length; y--; ) { if (s.DS.stopped) return; - c[_](w); + i[y](f); } - }), this.DS = v; - }, _a = /* @__PURE__ */ function(d) { - g(s, d); - var l = U(s); - function s(v) { - var c, w = v.elements, _ = v.className, k = v.hoverClassName, M = v.draggability, P = v.useTransform, A = v.DS; - return r(this, s), c = l.call(this), a(T(c), "_initElements", void 0), a(T(c), "_className", void 0), a(T(c), "_hoverClassName", void 0), a(T(c), "_useTransform", void 0), a(T(c), "_draggability", void 0), a(T(c), "init", function() { - return c._initElements.forEach(function(R) { - return c.add(R); + }), this.DS = g; + }, po = /* @__PURE__ */ function(d) { + v(s, d); + var c = R(s); + function s(g) { + var i, f = g.DS; + return r(this, s), i = c.call(this), n(A(i), "_rects", void 0), n(A(i), "_timeout", void 0), n(A(i), "init", function() { + return Be(i.Settings.selectables).forEach(function(y) { + return i.add(y); + }); + }), n(A(i), "clear", function() { + return i.forEach(function(y) { + return i.delete(y); }); - }), a(T(c), "clear", function() { - return c.forEach(function(R) { - return c.delete(R); + }), n(A(i), "_onClick", function(y) { + return i.DS.publish(["Selectable:click:pre", "Selectable:click"], { + event: y }); - }), a(T(c), "_onClick", function(R) { - return c.DS.publish(["Selectable:click:pre", "Selectable:click"], { - event: R + }), n(A(i), "_onPointer", function(y) { + return i.DS.publish(["Selectable:pointer:pre", "Selectable:pointer"], { + event: y }); - }), a(T(c), "_onPointer", function(R) { - return c.DS.publish(["Selectable:pointer:pre", "Selectable:pointer"], { - event: R + }), n(A(i), "addAll", function(y) { + return y.forEach(function(x) { + return i.add(x); }); - }), a(T(c), "addAll", function(R) { - return R.forEach(function(F) { - return c.add(F); + }), n(A(i), "deleteAll", function(y) { + return y.forEach(function(x) { + return i.delete(x); }); - }), a(T(c), "deleteAll", function(R) { - return R.forEach(function(F) { - return c.delete(F); + }), i.DS = f, i.Settings = f.stores.SettingsStore.s, i.DS.subscribe("Interaction:init", i.init), i.DS.PubSub.subscribe("Settings:updated:selectables", function() { + i.clear(), i.init(); + }), i.DS.subscribe("Settings:updated:selectableClass", function(y) { + var x = y.settings; + i.forEach(function(k) { + k.classList.remove(x["selectableClass:pre"]), k.classList.add(x.selectableClass); }); - }), c.DS = A, c._initElements = Je(w), c._className = _, c._hoverClassName = k, c._useTransform = P, c._draggability = M, c.DS.subscribe("Interaction:init", c.init), c; + }), i; } - return i(s, [{ + return a(s, [{ key: "add", - value: function(c) { - return c.classList.add(this._className), c.addEventListener("click", this._onClick), c.addEventListener("mousedown", this._onPointer), c.addEventListener("touchstart", this._onPointer, { - passive: !1 - }), this._draggability && !this._useTransform && kr({ - computedStyle: window.getComputedStyle(c), - node: c - }), N(f(s.prototype), "add", this).call(this, c); + value: function(i) { + if (!O(m(s.prototype), "has", this).call(this, i)) { + var f = { + items: this.elements, + item: i + }; + return this.DS.publish("Selectable:added:pre", f), i.classList.add(this.Settings.selectableClass), i.addEventListener("click", this._onClick), this.Settings.usePointerEvents ? i.addEventListener("pointerdown", this._onPointer, { + passive: !1 + }) : i.addEventListener("mousedown", this._onPointer), i.addEventListener("touchstart", this._onPointer, { + passive: !1 + }), this.Settings.draggability && !this.Settings.useTransform && Cr({ + computedStyle: window.getComputedStyle(i), + node: i + }), this.DS.publish("Selectable:added", f), O(m(s.prototype), "add", this).call(this, i); + } } }, { key: "delete", - value: function(c) { - return c.classList.remove(this._className), c.classList.remove(this._hoverClassName), c.removeEventListener("click", this._onClick), c.removeEventListener("mousedown", this._onPointer), c.removeEventListener("touchstart", this._onPointer, { - passive: !1 - }), N(f(s.prototype), "delete", this).call(this, c); + value: function(i) { + if (O(m(s.prototype), "has", this).call(this, i)) { + var f = { + items: this.elements, + item: i + }; + return this.DS.publish("Selectable:removed:pre", f), i.classList.remove(this.Settings.selectableClass), i.classList.remove(this.Settings.hoverClass), i.removeEventListener("click", this._onClick), this.Settings.usePointerEvents ? i.removeEventListener("pointerdown", this._onPointer, { + passive: !1 + }) : i.removeEventListener("mousedown", this._onPointer), i.removeEventListener("touchstart", this._onPointer, { + passive: !1 + }), this.DS.publish("Selectable:removed", f), O(m(s.prototype), "delete", this).call(this, i); + } } }, { key: "elements", get: function() { return Array.from(this.values()); } + }, { + key: "rects", + get: function() { + var i = this; + return this._rects ? this._rects : (this._rects = /* @__PURE__ */ new Map(), this.forEach(function(f) { + return i._rects.set(f, f.getBoundingClientRect()); + }), this._timeout && clearTimeout(this._timeout), this._timeout = setTimeout(function() { + return i._rects = null; + }, this.Settings.refreshMemoryRate), this._rects); + } }]), s; - }(/* @__PURE__ */ D(Set)), ka = /* @__PURE__ */ function(d) { - g(s, d); - var l = U(s); - function s(v) { - var c, w = v.className, _ = v.DS; - return r(this, s), c = l.call(this), a(T(c), "_className", void 0), a(T(c), "clear", function() { - return c.forEach(function(k) { - return c.delete(k); + }(/* @__PURE__ */ C(Set)), go = /* @__PURE__ */ function(d) { + v(s, d); + var c = R(s); + function s(g) { + var i, f = g.DS; + return r(this, s), i = c.call(this), n(A(i), "clear", function() { + return i.forEach(function(y) { + return i.delete(y); }); - }), a(T(c), "addAll", function(k) { - return k.forEach(function(M) { - return c.add(M); + }), n(A(i), "addAll", function(y) { + return y.forEach(function(x) { + return i.add(x); }); - }), a(T(c), "deleteAll", function(k) { - return k.forEach(function(M) { - return c.delete(M); + }), n(A(i), "deleteAll", function(y) { + return y.forEach(function(x) { + return i.delete(x); }); - }), c.DS = _, c._className = w, c; + }), i.DS = f, i; } - return i(s, [{ + return a(s, [{ key: "add", - value: function(c) { - if (!N(f(s.prototype), "has", this).call(this, c)) { - var w = { + value: function(i) { + if (!O(m(s.prototype), "has", this).call(this, i)) { + var f = { items: this.elements, - item: c + item: i }; - return this.DS.publish("Selected:added:pre", w), N(f(s.prototype), "add", this).call(this, c), c.classList.add(this._className), c.style.zIndex = "".concat((parseInt(c.style.zIndex) || 0) + 1), this.DS.publish("Selected:added", w), this; + return this.DS.publish("Selected:added:pre", f), O(m(s.prototype), "add", this).call(this, i), i.classList.add(this.DS.stores.SettingsStore.s.selectedClass), i.style.zIndex = "".concat((parseInt(i.style.zIndex) || 0) + 1), this.DS.publish("Selected:added", f), this; } } }, { key: "delete", - value: function(c) { - if (!!N(f(s.prototype), "has", this).call(this, c)) { - var w = { + value: function(i) { + if (O(m(s.prototype), "has", this).call(this, i)) { + var f = { items: this.elements, - item: c + item: i }; - this.DS.publish("Selected:removed:pre", w); - var _ = N(f(s.prototype), "delete", this).call(this, c); - return c.classList.remove(this._className), c.style.zIndex = "".concat((parseInt(c.style.zIndex) || 0) - 1), this.DS.publish("Selected:removed", w), _; + this.DS.publish("Selected:removed:pre", f); + var y = O(m(s.prototype), "delete", this).call(this, i); + return i.classList.remove(this.DS.stores.SettingsStore.s.selectedClass), i.style.zIndex = "".concat((parseInt(i.style.zIndex) || 0) - 1), this.DS.publish("Selected:removed", f), y; } } }, { key: "toggle", - value: function(c) { - return this.has(c) ? this.delete(c) : this.add(c), c; + value: function(i) { + return this.has(i) ? this.delete(i) : this.add(i), i; } }, { key: "elements", @@ -1207,120 +1513,136 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho return Array.from(this.values()); } }]), s; - }(/* @__PURE__ */ D(Set)), Sa = /* @__PURE__ */ function() { - function d(l) { - var s = this, v = l.DS, c = l.hoverClassName, w = l.multiSelectToggling; - r(this, d), a(this, "_prevSelectedSet", void 0), a(this, "_hoverClassName", void 0), a(this, "_multiSelectToggling", void 0), a(this, "start", function(_) { - var k = _.event, M = _.isDragging; - M || (s._storePrevious(k), s._handleInsideSelection(!0, k)); - }), a(this, "update", function(_) { - var k = _.isDragging; - k || s.DS.continue || s._handleInsideSelection(); - }), a(this, "_handleInsideSelection", function(_, k) { - for (var M = s.DS, P = M.SelectableSet, A = M.SelectorArea, R = M.Selector, F = P.elements.map(function(Le) { - return [Le, Le.getBoundingClientRect()]; - }), oe = [], ye = [], ae = 0, Ze = F.length; ae < Ze; ae++) - !A.isInside(F[ae][0], F[ae][1]) || (Bt(F[ae][1], R.rect) ? oe.push(F[ae][0]) : ye.push(F[ae][0])); - var _t = s.DS.stores.KeyStore.isMultiSelectKeyPressed(k) && s._multiSelectToggling; - s.DS.continue || (oe.forEach(function(Le) { - return fa({ - element: Le, - force: _, - multiSelectionToggle: _t, + }(/* @__PURE__ */ C(Set)), mo = /* @__PURE__ */ function() { + function d(c) { + var s = this, g = c.DS; + r(this, d), n(this, "_prevSelectedSet", void 0), n(this, "start", function(i) { + var f = i.event, y = i.isDragging; + y || (s._storePrevious(f), s._handleInsideSelection(!0, f)); + }), n(this, "update", function(i) { + var f = i.isDragging; + f || s.DS.continue || s._handleInsideSelection(); + }), n(this, "_handleInsideSelection", function(i, f) { + var y = s.DS, x = y.SelectableSet, k = y.SelectorArea, H = y.Selector, X = x.rects, oe = [], be = [], me = ge(X), Ee; + try { + for (me.s(); !(Ee = me.n()).done; ) { + var ne = K(Ee.value, 2), ye = ne[0], ht = ne[1]; + k.isInside(ye, ht) && (dt(ht, H.rect, s.Settings.selectionThreshold) ? oe.push(ye) : be.push(ye)); + } + } catch (Ue) { + me.e(Ue); + } finally { + me.f(); + } + var Kt = s.DS.stores.KeyStore.isMultiSelectKeyPressed(f) && s.Settings.multiSelectToggling; + s.DS.continue || (oe.forEach(function(Ue) { + return to({ + element: Ue, + force: i, + multiSelectionToggle: Kt, SelectedSet: s.DS.SelectedSet, - hoverClassName: s._hoverClassName + hoverClassName: s.Settings.hoverClass }); - }), ye.forEach(function(Le) { - return ma({ - element: Le, - force: _, + }), be.forEach(function(Ue) { + return ro({ + element: Ue, + force: i, SelectedSet: s.DS.SelectedSet, - hoverClassName: s._hoverClassName, + hoverClassName: s.Settings.hoverClass, PrevSelectedSet: s._prevSelectedSet }); })); - }), this._hoverClassName = c, this._multiSelectToggling = w, this.DS = v, this.DS.subscribe("Interaction:start", this.start), this.DS.subscribe("Interaction:update", this.update); + }), this.DS = g, this.Settings = this.DS.stores.SettingsStore.s, this.DS.subscribe("Interaction:start", this.start), this.DS.subscribe("Interaction:update", this.update); } - return i(d, [{ + return a(d, [{ key: "_storePrevious", value: function(s) { - var v = this.DS, c = v.stores.KeyStore, w = v.SelectedSet; - c.isMultiSelectKeyPressed(s) ? this._prevSelectedSet = new Set(w) : this._prevSelectedSet = /* @__PURE__ */ new Set(); + var g = this.DS, i = g.stores.KeyStore, f = g.SelectedSet; + i.isMultiSelectKeyPressed(s) ? this._prevSelectedSet = new Set(f) : this._prevSelectedSet = /* @__PURE__ */ new Set(); } }]), d; - }(), Da = /* @__PURE__ */ function() { - function d(l) { - var s = this, v = l.DS, c = l.selector, w = l.selectorClass, _ = l.customStyles; - r(this, d), a(this, "_rect", void 0), a(this, "start", function(k) { - var M = k.isDragging; - if (!M) { - var P = s.DS.stores.PointerStore, A = P.initialValArea; - Dr(s.HTMLNode, B(A, 1)), s.HTMLNode.style.display = "block", s._rect = null; + }(), vo = /* @__PURE__ */ function() { + function d(c) { + var s = this, g = c.DS; + r(this, d), n(this, "_rect", void 0), n(this, "attachSelector", function() { + var i, f; + s.HTMLNode && (i = s.DS.SelectorArea) !== null && i !== void 0 && i.HTMLNode && s.DS.SelectorArea.HTMLNode.removeChild(s.HTMLNode), s.HTMLNode = s.DS.stores.SettingsStore.s.selector || Dt(s.DS.stores.SettingsStore.s.customStyles), s.HTMLNode.classList.add(s.DS.stores.SettingsStore.s.selectorClass), s.HTMLNode && (f = s.DS.SelectorArea) !== null && f !== void 0 && f.HTMLNode && s.DS.SelectorArea.HTMLNode.appendChild(s.HTMLNode); + }), n(this, "start", function(i) { + var f = i.isDragging; + if (!f) { + var y = s.DS.stores.PointerStore, x = y.initialValArea; + Er(s.HTMLNode, N(x, 1)), s.HTMLNode.style.display = "block", s._rect = null; } - }), a(this, "stop", function() { + }), n(this, "stop", function() { s.HTMLNode.style.width = "0", s.HTMLNode.style.height = "0", s.HTMLNode.style.display = "none"; - }), a(this, "update", function(k) { - var M = k.isDragging; - if (!(M || s.DS.continue)) { - var P = s.DS.stores, A = P.ScrollStore, R = P.PointerStore, F = na({ - scrollAmount: A.scrollAmount, - initialPointerPos: R.initialValArea, - pointerPos: R.currentValArea + }), n(this, "update", function(i) { + var f = i.isDragging; + if (!(f || s.DS.continue)) { + var y = s.DS.stores, x = y.ScrollStore, k = y.PointerStore, H = qs({ + scrollAmount: x.scrollAmount, + initialPointerPos: k.initialValArea, + pointerPos: k.currentValArea }); - Dr(s.HTMLNode, F), s._rect = null; + Er(s.HTMLNode, H), s._rect = null; } - }), this.DS = v, this.HTMLNode = c || re(_), this.HTMLNode.classList.add(w), this.DS.subscribe("Interaction:start", this.start), this.DS.subscribe("Interaction:update", this.update), this.DS.subscribe("Interaction:end", this.stop); + }), this.DS = g, this.DS.subscribe("Settings:updated:selectorClass", function(i) { + var f = i.settings; + s.HTMLNode.classList.remove(f["selectorClass:pre"]), s.HTMLNode.classList.add(f.selectorClass); + }), this.DS.subscribe("Settings:updated:selector", this.attachSelector), this.DS.subscribe("Settings:updated:customStyles", this.attachSelector), this.attachSelector(), this.DS.subscribe("Interaction:start", this.start), this.DS.subscribe("Interaction:update", this.update), this.DS.subscribe("Interaction:end", this.stop); } - return i(d, [{ + return a(d, [{ key: "rect", get: function() { return this._rect ? this._rect : this._rect = this.HTMLNode.getBoundingClientRect(); } }]), d; - }(), Ca = /* @__PURE__ */ function() { - function d(l) { - var s = this, v = l.DS, c = l.selectorAreaClass, w = l.autoScrollSpeed, _ = l.overflowTolerance; - r(this, d), a(this, "_autoScrollSpeed", void 0), a(this, "_scrollInterval", void 0), a(this, "_rect", void 0), a(this, "currentEdges", []), a(this, "_overflowTolerance", void 0), a(this, "start", function() { + }(), bo = /* @__PURE__ */ function() { + function d(c) { + var s = this, g = c.DS; + r(this, d), n(this, "_scrollInterval", void 0), n(this, "_rect", void 0), n(this, "currentEdges", []), n(this, "start", function() { return s.applyElements("append"); - }), a(this, "applyElements", function() { - var k = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "append", M = document.body ? "body" : "documentElement", P = "".concat(k, "Child"); - s.HTMLNode[P](s.DS.Selector.HTMLNode), document[M][P](s.HTMLNode); - }), a(this, "updatePos", function() { + }), n(this, "applyElements", function() { + var i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "append", f = document.body ? "body" : "documentElement", y = "".concat(i, "Child"); + s.HTMLNode[y](s.DS.Selector.HTMLNode), document[f][y](s.HTMLNode); + }), n(this, "updatePos", function() { s._rect = null; - var k = s.DS.Area.rect, M = s.DS.Area.computedBorder, P = s.HTMLNode.style, A = "".concat(k.top + M.top, "px"), R = "".concat(k.left + M.left, "px"), F = "".concat(k.width, "px"), oe = "".concat(k.height, "px"); - P.top !== A && (P.top = A), P.left !== R && (P.left = R), P.width !== F && (P.width = F), P.height !== oe && (P.height = oe); - }), a(this, "stop", function(k) { - s.stopAutoScroll(), k && s.applyElements("remove"); - }), a(this, "startAutoScroll", function() { + var i = s.DS.Area.rect, f = s.DS.Area.computedBorder, y = s.HTMLNode.style, x = "".concat(i.top + f.top, "px"), k = "".concat(i.left + f.left, "px"), H = "".concat(i.width, "px"), X = "".concat(i.height, "px"); + y.top !== x && (y.top = x), y.left !== k && (y.left = k), y.width !== H && (y.width = H), y.height !== X && (y.height = X); + }), n(this, "stop", function(i) { + s.stopAutoScroll(), i && s.applyElements("remove"); + }), n(this, "startAutoScroll", function() { s.currentEdges = [], s._scrollInterval = setInterval(function() { return s.handleAutoScroll(); }, 16); - }), a(this, "handleAutoScroll", function() { + }), n(this, "handleAutoScroll", function() { if (!s.DS.continue) { - var k = s.DS, M = k.stores.PointerStore, P = k.Area; - s.currentEdges = xr({ - elementRect: B(M.currentVal), + var i = s.DS, f = i.stores.PointerStore, y = i.Area; + s.currentEdges = kr({ + elementRect: N(f.currentVal), containerRect: s.rect, - tolerance: s._overflowTolerance - }), s.currentEdges.length && P.scroll(s.currentEdges, s._autoScrollSpeed); + tolerance: s.DS.stores.SettingsStore.s.overflowTolerance + }), s.currentEdges.length && y.scroll(s.currentEdges, s.DS.stores.SettingsStore.s.autoScrollSpeed); } - }), a(this, "stopAutoScroll", function() { + }), n(this, "stopAutoScroll", function() { s.currentEdges = [], clearInterval(s._scrollInterval); - }), a(this, "isInside", function(k, M) { - return s.DS.Area.HTMLNode.contains(k) && s.DS.stores.ScrollStore.canScroll ? !0 : Bt(s.rect, M || k.getBoundingClientRect()); - }), this._autoScrollSpeed = w, this._overflowTolerance = _, this.DS = v, this.HTMLNode = me(c), this.DS.subscribe("Area:modified", this.updatePos), this.DS.subscribe("Interaction:init", this.start), this.DS.subscribe("Interaction:start", this.startAutoScroll), this.DS.subscribe("Interaction:end", function() { + }), n(this, "isInside", function(i, f) { + return s.DS.Area.HTMLNode.contains(i) && s.DS.stores.ScrollStore.canScroll ? !0 : dt(s.rect, f || i.getBoundingClientRect()); + }), this.DS = g, this.HTMLNode = ke(), this.DS.subscribe("Settings:updated:selectorAreaClass", function(i) { + var f = i.settings; + s.HTMLNode.classList.remove(f["selectorAreaClass:pre"]), s.HTMLNode.classList.add(f.selectorAreaClass); + }), this.HTMLNode.classList.add(this.DS.stores.SettingsStore.s.selectorAreaClass), this.DS.subscribe("Area:modified", this.updatePos), this.DS.subscribe("Area:modified", this.updatePos), this.DS.subscribe("Interaction:init", this.start), this.DS.subscribe("Interaction:start", this.startAutoScroll), this.DS.subscribe("Interaction:end", function() { s.updatePos(), s.stopAutoScroll(); }); } - return i(d, [{ + return a(d, [{ key: "isClicked", value: function(s) { - var v = this.DS.stores.PointerStore, c = s ? v.getPointerPosition(s) : v.initialVal; - return Bt({ - left: c.x, - top: c.y, - right: c.x, - bottom: c.y + var g = this.DS.stores.PointerStore, i = s ? g.getPointerPosition(s) : g.initialVal; + return dt({ + left: i.x, + top: i.y, + right: i.x, + bottom: i.y }, this.rect); } }, { @@ -1329,54 +1651,52 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho return this._rect ? this._rect : this._rect = this.HTMLNode.getBoundingClientRect(); } }]), d; - }(), Ma = /* @__PURE__ */ function() { - function d(l) { - var s = this, v = l.DS, c = l.multiSelectKeys, w = l.multiSelectMode; - r(this, d), a(this, "_multiSelectMode", void 0), a(this, "_multiSelectKeys", void 0), a(this, "_currentValues", /* @__PURE__ */ new Set()), a(this, "_keyMapping", { + }(), yo = /* @__PURE__ */ function() { + function d(c) { + var s = this, g = c.DS; + r(this, d), n(this, "_currentValues", /* @__PURE__ */ new Set()), n(this, "_keyMapping", { control: "ctrlKey", shift: "shiftKey", meta: "metaKey" - }), a(this, "init", function() { + }), n(this, "init", function() { document.addEventListener("keydown", s.keydown), document.addEventListener("keyup", s.keyup), window.addEventListener("blur", s.reset); - }), a(this, "keydown", function(_) { - var k = _.key.toLowerCase(); + }), n(this, "keydown", function(i) { + var f = i.key.toLowerCase(); s.DS.publish("KeyStore:down:pre", { - event: _, - key: k - }), s._currentValues.add(k), s.DS.publish("KeyStore:down", { - event: _, - key: k + event: i, + key: f + }), s._currentValues.add(f), s.DS.publish("KeyStore:down", { + event: i, + key: f }); - }), a(this, "keyup", function(_) { - var k = _.key.toLowerCase(); + }), n(this, "keyup", function(i) { + var f = i.key.toLowerCase(); s.DS.publish("KeyStore:up:pre", { - event: _, - key: k - }), s._currentValues.delete(k), s.DS.publish("KeyStore:up", { - event: _, - key: k + event: i, + key: f + }), s._currentValues.delete(f), s.DS.publish("KeyStore:up", { + event: i, + key: f }); - }), a(this, "stop", function() { + }), n(this, "stop", function() { document.removeEventListener("keydown", s.keydown), document.removeEventListener("keyup", s.reset), window.removeEventListener("blur", s.reset), s.reset(); - }), a(this, "reset", function() { + }), n(this, "reset", function() { return s._currentValues.clear(); - }), this.DS = v, this._multiSelectMode = w, this._multiSelectKeys = c.map(function(_) { - var k = { - ctrlKey: "Control", - shiftKey: "Shift", - metaKey: "Meta" - }, M = k[_]; - return M ? (console.warn("[DragSelect] ".concat(_, ' is deprecated. Use "').concat(M, '" instead. Act Now!. See docs for more info')), M.toLowerCase()) : _.toLowerCase(); - }), this.DS.subscribe("Interaction:init", this.init); + }), this.DS = g, this.DS.subscribe("Interaction:init", this.init); } - return i(d, [{ + return a(d, [{ key: "isMultiSelectKeyPressed", value: function(s) { - var v = this; - return !!(this._multiSelectMode || this.currentValues.some(function(c) { - return v._multiSelectKeys.includes(c); - }) || s && this._multiSelectKeys.some(function(c) { - return s[v._keyMapping[c]]; + var g = this; + if (this.DS.stores.SettingsStore.s.multiSelectMode) + return !0; + var i = this.DS.stores.SettingsStore.s.multiSelectKeys.map(function(f) { + return f.toLocaleLowerCase(); + }); + return !!(this.currentValues.some(function(f) { + return i.includes(f.toLocaleLowerCase()); + }) || s && i.some(function(f) { + return s[g._keyMapping[f]]; })); } }, { @@ -1385,43 +1705,47 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho return Array.from(this._currentValues.values()); } }]), d; - }(), $a = /* @__PURE__ */ function() { - function d(l) { - var s = this, v = l.DS; - r(this, d), a(this, "_isMouseInteraction", !1), a(this, "_initialValArea", void 0), a(this, "_currentValArea", void 0), a(this, "_lastValArea", void 0), a(this, "_initialVal", void 0), a(this, "_currentVal", void 0), a(this, "_lastVal", void 0), a(this, "_lastTouch", void 0), a(this, "init", function() { - document.addEventListener("mousemove", s.update), document.addEventListener("touchmove", s.update, { + }(), wo = /* @__PURE__ */ function() { + function d(c) { + var s = this, g = c.DS; + r(this, d), n(this, "_isMouseInteraction", !1), n(this, "_initialValArea", void 0), n(this, "_currentValArea", void 0), n(this, "_lastValArea", void 0), n(this, "_initialVal", void 0), n(this, "_currentVal", void 0), n(this, "_lastVal", void 0), n(this, "_lastTouch", void 0), n(this, "init", function() { + s.Settings.usePointerEvents ? document.addEventListener("pointermove", s.update, { + passive: !1 + }) : document.addEventListener("mousemove", s.update), document.addEventListener("touchmove", s.update, { passive: !1 }); - }), a(this, "getPointerPosition", function(c) { - return ia({ - event: s._normalizedEvent(c) + }), n(this, "getPointerPosition", function(i) { + return Zs({ + event: s._normalizedEvent(i) }); - }), a(this, "update", function(c) { - !c || (s.DS.publish("PointerStore:updated:pre", { - event: c - }), s.currentVal = s.getPointerPosition(c), s._isMouseInteraction && s.DS.publish("PointerStore:updated", { - event: c + }), n(this, "update", function(i) { + i && (s.DS.publish("PointerStore:updated:pre", { + event: i + }), s.currentVal = s.getPointerPosition(i), s._isMouseInteraction && s.DS.publish("PointerStore:updated", { + event: i })); - }), a(this, "stop", function() { - document.removeEventListener("mousemove", s.update), document.removeEventListener("touchmove", s.update, { + }), n(this, "stop", function() { + s.Settings.usePointerEvents ? document.removeEventListener("pointermove", s.update, { + passive: !1 + }) : document.removeEventListener("mousemove", s.update), document.removeEventListener("touchmove", s.update, { passive: !1 }), setTimeout(function() { return s._isMouseInteraction = !1; }, 100); - }), a(this, "reset", function(c) { - !c || (s.currentVal = s.lastVal = s.getPointerPosition(c), s.stop(), s.init()); - }), this.DS = v, this.DS.subscribe("Interaction:init", this.init), this.DS.subscribe("Interaction:start", function(c) { - var w = c.event; - return s.start(w); - }), this.DS.subscribe("Interaction:end", function(c) { - var w = c.event; - return s.reset(w); + }), n(this, "reset", function(i) { + i && (s.currentVal = s.lastVal = s.getPointerPosition(i), s.stop(), s.init()); + }), this.DS = g, this.Settings = g.stores.SettingsStore.s, this.DS.subscribe("Interaction:init", this.init), this.DS.subscribe("Interaction:start", function(i) { + var f = i.event; + return s.start(f); + }), this.DS.subscribe("Interaction:end", function(i) { + var f = i.event; + return s.reset(f); }); } - return i(d, [{ + return a(d, [{ key: "start", value: function(s) { - !s || (this._isMouseInteraction = !0, this.currentVal = this.initialVal = this.getPointerPosition(s)); + s && (this._isMouseInteraction = !0, this.currentVal = this.initialVal = this.getPointerPosition(s)); } }, { key: "_normalizedEvent", @@ -1461,7 +1785,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho }; }, set: function(s) { - this._initialVal = s, this._initialValArea = s && Z(s, "-", Z(O(this.DS.Area.rect), "+", O(this.DS.Area.computedBorder))); + this._initialVal = s, this._initialValArea = s && T(s, "-", T(z(this.DS.Area.rect), "+", z(this.DS.Area.computedBorder))); } }, { key: "currentVal", @@ -1472,7 +1796,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho }; }, set: function(s) { - this._currentVal = s, this._currentValArea = s && Z(s, "-", Z(O(this.DS.Area.rect), "+", O(this.DS.Area.computedBorder))); + this._currentVal = s, this._currentValArea = s && T(s, "-", T(z(this.DS.Area.rect), "+", z(this.DS.Area.computedBorder))); } }, { key: "lastVal", @@ -1483,43 +1807,43 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho }; }, set: function(s) { - this._lastVal = s, this._lastValArea = s && Z(s, "-", Z(O(this.DS.Area.rect), "+", O(this.DS.Area.computedBorder))); + this._lastVal = s, this._lastValArea = s && T(s, "-", T(z(this.DS.Area.rect), "+", z(this.DS.Area.computedBorder))); } }]), d; - }(), Ea = /* @__PURE__ */ function() { - function d(l) { - var s = this, v = l.DS, c = l.areaElement, w = l.zoom; - r(this, d), a(this, "_initialVal", void 0), a(this, "_currentVal", void 0), a(this, "_areaElement", void 0), a(this, "_canScroll", void 0), a(this, "init", function() { - return s._areaElement.addEventListener("scroll", s.update); - }), a(this, "start", function() { - s._currentVal = s._initialVal = Ge(s._areaElement), s._areaElement.addEventListener("scroll", s.update); - }), a(this, "update", function() { - return s._currentVal = Ge(s._areaElement); - }), a(this, "stop", function() { - s._areaElement.removeEventListener("scroll", s.update), s._initialVal = { + }(), So = /* @__PURE__ */ function() { + function d(c) { + var s = this, g = c.DS; + r(this, d), n(this, "_initialVal", void 0), n(this, "_currentVal", void 0), n(this, "_canScroll", void 0), n(this, "init", function() { + return s.DS.stores.SettingsStore.s.area.addEventListener("scroll", s.update); + }), n(this, "start", function() { + s._currentVal = s._initialVal = Mt(s.DS.stores.SettingsStore.s.area), s.DS.stores.SettingsStore.s.area.addEventListener("scroll", s.update); + }), n(this, "update", function() { + return s._currentVal = Mt(s.DS.stores.SettingsStore.s.area); + }), n(this, "stop", function() { + s.DS.stores.SettingsStore.s.area.removeEventListener("scroll", s.update), s._initialVal = { x: 0, y: 0 }, s._canScroll = null; - }), a(this, "reset", function() { + }), n(this, "reset", function() { s.stop(), s.start(); - }), this._areaElement = c, this.DS = v, this.zoom = w, this.DS.subscribe("Interaction:init", this.init), this.DS.subscribe("Interaction:start", function() { + }), this.DS = g, this.DS.subscribe("Interaction:init", this.init), this.DS.subscribe("Interaction:start", function() { return s.start(); }), this.DS.subscribe("Interaction:end", function() { return s.reset(); }); } - return i(d, [{ + return a(d, [{ key: "canScroll", get: function() { - return typeof this._canScroll == "boolean" ? this._canScroll : this._canScroll = G(this._areaElement); + return typeof this._canScroll == "boolean" ? this._canScroll : this._canScroll = xe(this.DS.stores.SettingsStore.s.area); } }, { key: "scrollAmount", get: function() { - var s = Z(this.currentVal, "-", this.initialVal), v = z(this.zoom), c = Z(Z(s, "*", v), "-", s); + var s = T(this.currentVal, "-", this.initialVal), g = le(this.DS.stores.SettingsStore.s.zoom), i = T(T(s, "*", g), "-", s); return { - x: s.x + c.x, - y: s.y + c.y + x: s.x + i.x, + y: s.y + i.y }; } }, { @@ -1533,190 +1857,157 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho }, { key: "currentVal", get: function() { - return this._currentVal || (this._currentVal = Ge(this._areaElement)), this._currentVal; + return this._currentVal || (this._currentVal = Mt(this.DS.stores.SettingsStore.s.area)), this._currentVal; } }]), d; - }(), Ta = /* @__PURE__ */ function() { - function d(l) { - var s = this, v = l.area, c = v === void 0 ? document : v, w = l.selectables, _ = w === void 0 ? [] : w, k = l.autoScrollSpeed, M = k === void 0 ? 5 : k, P = l.overflowTolerance, A = P === void 0 ? { - x: 25, - y: 25 - } : P, R = l.zoom, F = R === void 0 ? 1 : R, oe = l.customStyles, ye = oe === void 0 ? !1 : oe, ae = l.multiSelectMode, Ze = ae === void 0 ? !1 : ae, _t = l.multiSelectToggling, Le = _t === void 0 ? !0 : _t, Cr = l.multiSelectKeys, Aa = Cr === void 0 ? ["Control", "Shift", "Meta"] : Cr, Mr = l.selector, Oa = Mr === void 0 ? void 0 : Mr, $r = l.draggability, Ht = $r === void 0 ? !0 : $r, Er = l.immediateDrag, Ia = Er === void 0 ? !0 : Er, Tr = l.keyboardDrag, La = Tr === void 0 ? !0 : Tr, Pa = l.dragKeys, Ar = l.keyboardDragSpeed, Na = Ar === void 0 ? 10 : Ar, Or = l.useTransform, Ir = Or === void 0 ? !0 : Or, Lr = l.hoverClass, Pr = Lr === void 0 ? "ds-hover" : Lr, Nr = l.selectableClass, jr = Nr === void 0 ? "ds-selectable" : Nr, zr = l.selectedClass, ja = zr === void 0 ? "ds-selected" : zr, Vr = l.selectorClass, za = Vr === void 0 ? "ds-selector" : Vr, Rr = l.selectorAreaClass, Va = Rr === void 0 ? "ds-selector-area" : Rr, Ra = l.callback, Ba = l.onDragMove, Ha = l.onDragStartBegin, Ua = l.onDragStart, Ka = l.onElementSelect, Fa = l.onElementUnselect; - r(this, d), a(this, "continue", !1), a(this, "start", function() { + }(), _o = function d(c) { + var s = this, g = c.DS, i = c.settings; + r(this, d), n(this, "_settings", {}), n(this, "s", {}), n(this, "update", function(f) { + var y = f.settings, x = f.init; + return s.DS.publish("Settings:updated:pre", h({ + settings: y + }, x ? { + init: x + } : {})); + }), n(this, "_update", function(f) { + for (var y = f.settings, x = f.init, k = so(y, x), H = function() { + var me, Ee = K(oe[X], 2), ne = Ee[0], ye = Ee[1]; + ne in s._settings || Object.defineProperty(s.s, ne, { + get: function() { + return s._settings[ne]; + }, + set: function(Ue) { + return s.update({ + settings: n({}, ne, Ue) + }); + } + }), s._settings["".concat(ne, ":pre")] = s._settings[ne], s._settings[ne] = ye; + var ht = { + settings: (me = {}, n(me, ne, s._settings[ne]), n(me, "".concat(ne, ":pre"), s._settings["".concat(ne, ":pre")]), me) + }; + s.DS.publish("Settings:updated", ht), s.DS.publish("Settings:updated:".concat(ne), ht); + }, X = 0, oe = Object.entries(k); X < oe.length; X++) + H(); + }), this.DS = g, this.DS.subscribe("Settings:updated:pre", this._update), this.update({ + settings: i, + init: !0 + }); + }, xo = /* @__PURE__ */ function() { + function d(c) { + var s = this; + r(this, d), n(this, "continue", !1), n(this, "start", function() { s.stopped = !1, s.Interaction.init(); - }), a(this, "break", function() { + }), n(this, "break", function() { return s.continue = !0; - }), a(this, "getSelection", function() { + }), n(this, "setSettings", function(g) { + return s.stores.SettingsStore.update({ + settings: g + }); + }), n(this, "getSelection", function() { return s.SelectedSet.elements; - }), a(this, "getSelectables", function() { + }), n(this, "getSelectables", function() { return s.SelectableSet.elements; - }), a(this, "getInitialCursorPosition", function() { + }), n(this, "getInitialCursorPosition", function() { return s.stores.PointerStore.initialVal; - }), a(this, "getCurrentCursorPosition", function() { + }), n(this, "getCurrentCursorPosition", function() { return s.stores.PointerStore.currentVal; - }), a(this, "getPreviousCursorPosition", function() { + }), n(this, "getPreviousCursorPosition", function() { return s.stores.PointerStore.lastVal; - }), a(this, "getInitialCursorPositionArea", function() { + }), n(this, "getInitialCursorPositionArea", function() { return s.stores.PointerStore.initialValArea; - }), a(this, "getCurrentCursorPositionArea", function() { + }), n(this, "getCurrentCursorPositionArea", function() { return s.stores.PointerStore.currentValArea; - }), a(this, "getPreviousCursorPositionArea", function() { + }), n(this, "getPreviousCursorPositionArea", function() { return s.stores.PointerStore.lastValArea; - }), a(this, "isMultiSelect", function(Ya) { - return s.stores.KeyStore.isMultiSelectKeyPressed(Ya); - }), a(this, "isDragging", function() { + }), n(this, "isMultiSelect", function(g) { + return s.stores.KeyStore.isMultiSelectKeyPressed(g); + }), n(this, "isDragging", function() { return s.Interaction.isDragging; - }), this.PubSub = new xa({ + }), n(this, "getZoneByCoordinates", function(g) { + var i; + return (i = s.DropZones.getTarget(g)) === null || i === void 0 ? void 0 : i.toObject(); + }), n(this, "getItemsDroppedByZoneId", function(g) { + return s.DropZones.getItemsDroppedById(g); + }), n(this, "getItemsInsideByZoneId", function(g, i) { + return s.DropZones.getItemsInsideById(g, i); + }), this.PubSub = new fo({ DS: this - }), this.subscribe = this.PubSub.subscribe, this.unsubscribe = this.PubSub.unsubscribe, this.publish = this.PubSub.publish, this._callbacksTemp({ - callback: Ra, - onDragMove: Ba, - onDragStart: Ua, - onDragStartBegin: Ha, - onElementSelect: Ka, - onElementUnselect: Fa - }), this.stores = { - PointerStore: new $a({ - DS: this - }), - ScrollStore: new Ea({ - DS: this, - areaElement: c, - zoom: F - }), - KeyStore: new Ma({ - DS: this, - multiSelectKeys: Aa, - multiSelectMode: Ze - }) - }, this.Area = new ba({ - area: c, - PS: this.PubSub, - zoom: F - }), this.Selector = new Da({ - DS: this, - selector: Oa, - selectorClass: za, - customStyles: ye - }), this.SelectorArea = new Ca({ - DS: this, - selectorAreaClass: Va, - autoScrollSpeed: M, - overflowTolerance: A - }), this.SelectableSet = new _a({ - elements: _, - DS: this, - className: jr, - hoverClassName: Pr, - useTransform: Ir, - draggability: Ht - }), this.SelectedSet = new ka({ - DS: this, - className: ja - }), this.Selection = new Sa({ - DS: this, - hoverClassName: Pr, - multiSelectToggling: Le - }), this.Drag = new ya({ - DS: this, - draggability: Ht, - useTransform: Ir, - keyboardDrag: La, - dragKeys: Object.assign({ - up: ["ArrowUp"], - down: ["ArrowDown"], - left: ["ArrowLeft"], - right: ["ArrowRight"] - }, Pa), - zoom: F, - keyboardDragSpeed: Na - }), this.Interaction = new wa({ - areaElement: c, + }), this.subscribe = this.PubSub.subscribe, this.unsubscribe = this.PubSub.unsubscribe, this.publish = this.PubSub.publish, this.stores = {}, this.stores.SettingsStore = new _o({ DS: this, - draggability: Ht, - immediateDrag: Ia, - selectableClass: jr - }), va({ + settings: c + }), this.stores.PointerStore = new wo({ + DS: this + }), this.stores.ScrollStore = new So({ + DS: this + }), this.stores.KeyStore = new yo({ + DS: this + }), this.Area = new ao({ + DS: this + }), this.Selector = new vo({ + DS: this + }), this.SelectorArea = new bo({ + DS: this + }), this.SelectableSet = new po({ + DS: this + }), this.SelectedSet = new go({ + DS: this + }), this.Selection = new mo({ + DS: this + }), this.Drag = new lo({ + DS: this + }), this.DropZones = new uo({ + DS: this + }), this.Interaction = new ho({ + DS: this + }), io({ subscribe: this.subscribe, publish: this.publish, SelectedSet: this.SelectedSet, - Interaction: this.Interaction + Interaction: this.Interaction, + DropZones: this.DropZones }), this.subscribe("Interaction:end", function() { return s.continue = !1; }), this.start(); } - return i(d, [{ - key: "_callbacksTemp", - value: function(s) { - var v = s.callback, c = s.onDragMove, w = s.onDragStart, _ = s.onDragStartBegin, k = s.onElementSelect, M = s.onElementUnselect, P = function(R, F) { - return console.warn("[DragSelect] ".concat(R, ' is deprecated. Use DragSelect.subscribe("').concat(F, '", (callbackObject) => {}) instead. Act Now! See docs for more info')); - }; - v && (P("callback", "callback"), this.subscribe("callback", function(A) { - var R = A.items; - A.item; - var F = A.event; - return v(R, F); - })), c && (P("onDragMove", "dragmove"), this.subscribe("dragmove", function(A) { - A.items, A.item; - var R = A.event; - return c(R); - })), w && (P("onDragStart", "dragstart"), this.subscribe("dragstart", function(A) { - A.items, A.item; - var R = A.event; - return w(R); - })), _ && (P("onDragStartBegin", "dragstart"), this.subscribe("dragstart", function(A) { - A.items, A.item; - var R = A.event; - return _(R); - })), k && (P("onElementSelect", "elementselect"), this.subscribe("elementselect", function(A) { - A.items; - var R = A.item, F = A.event; - return k(R, F); - })), M && (P("onElementUnselect", "elementunselect"), this.subscribe("elementunselect", function(A) { - A.items; - var R = A.item, F = A.event; - return M(R, F); - })); - } - }, { + return a(d, [{ key: "stop", value: function() { - var s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0, v = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, c = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1; - c && this.publish("callback", { + var s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0, g = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1; + i && this.publish("callback", { items: this.getSelection() - }), this.Interaction.stop(), this.Area.stop(), this.Drag.stop(), this.Selector.stop(), this.SelectorArea.stop(s), this.stores.KeyStore.stop(), this.stores.PointerStore.stop(), this.stores.ScrollStore.stop(), s && this.SelectableSet.clear(), v && this.SelectedSet.clear(), this.stopped = !0; + }), this.Interaction.stop(), this.Area.stop(), this.Drag.stop(), this.Selector.stop(), this.SelectorArea.stop(s), this.stores.KeyStore.stop(), this.stores.PointerStore.stop(), this.stores.ScrollStore.stop(), s && this.SelectableSet.clear(), g && this.SelectedSet.clear(), this.stopped = !0; } }, { key: "addSelection", value: function(s) { - var v = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, c = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1; - return this.SelectedSet.addAll(Je(s)), c || this.addSelectables(s), v && this.PubSub.publish("callback", { + var g = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1; + return this.SelectedSet.addAll(Be(s)), i || this.addSelectables(s), g && this.PubSub.publish("callback", { items: this.getSelection() }), this.getSelection(); } }, { key: "removeSelection", value: function(s) { - var v = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, c = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1; - return this.SelectedSet.deleteAll(Je(s)), c && this.removeSelectables(s), v && this.PubSub.publish("callback", { + var g = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1; + return this.SelectedSet.deleteAll(Be(s)), i && this.removeSelectables(s), g && this.PubSub.publish("callback", { items: this.getSelection() }), this.getSelection(); } }, { key: "toggleSelection", value: function(s) { - var v = this, c = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, w = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1; - return Je(s).forEach(function(_) { - return v.SelectedSet.has(_) ? v.removeSelection(s, c, w) : v.addSelection(s, c, w); - }), c && this.PubSub.publish("callback", { + var g = this, i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, f = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1; + return Be(s).forEach(function(y) { + return g.SelectedSet.has(y) ? g.removeSelection(s, i, f) : g.addSelection(s, i, f); + }), i && this.PubSub.publish("callback", { items: this.getSelection() }), this.getSelection(); } }, { key: "setSelection", value: function(s) { - var v = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, c = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1; - return this.clearSelection(), this.addSelection(s, v, c), this.getSelection(); + var g = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1; + return this.clearSelection(), this.addSelection(s, g, i), this.getSelection(); } }, { key: "clearSelection", @@ -1728,111 +2019,103 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho } }, { key: "addSelectables", - value: function(s) { - var v = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, c = Je(s); - return this.SelectableSet.addAll(c), v && this.SelectedSet.addAll(c), s; + value: function(s, g, i) { + var f = Be(s); + return this.SelectableSet.addAll(f), g && this.SelectedSet.addAll(f), i && this.PubSub.publish("callback", { + items: this.getSelection() + }), s; } }, { key: "setSelectables", value: function(s) { - var v = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, c = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1; - return this.removeSelectables(s, v), this.addSelectables(s, c); + var g = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1; + return console.warn('[DragSelect] DEPRECATION ".setSelectables" is deprecated and will be removed soon. Please use "ds.setSettings({ selectables: << new dom elements >> })" instead (see docs)'), this.removeSelectables(s, g), this.addSelectables(s, i); } }, { key: "removeSelectables", - value: function(s) { - var v = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1; - return this.SelectableSet.deleteAll(Je(s)), v && this.removeSelection(s), s; - } - }, { - key: "getCursorPositionDifference", - value: function() { - var s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, v = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1; - console.warn("[DragSelect] Using .getCursorPositionDifference is deprecated. Calculate yourself instead. i.e. `.getCurrentCursorPosition().x - .getInitialCursorPosition().x`"); - var c = v ? this.getCurrentCursorPositionArea() : this.getCurrentCursorPosition(), w = s ? v ? this.getPreviousCursorPositionArea() : this.getPreviousCursorPosition() : v ? this.getInitialCursorPositionArea() : this.getInitialCursorPosition(); - return Z(c, "-", w); + value: function(s, g, i) { + return this.SelectableSet.deleteAll(Be(s)), g && this.removeSelection(s), i && this.PubSub.publish("callback", { + items: this.getSelection() + }), s; } }]), d; }(); - return Ta; + return xo; }); -})(mo); -const Us = mo.exports, go = (t, e, r, o, i) => (e = Math, r = e.log, o = 1024, i = r(t) / r(o) | 0, t / e.pow(o, i)).toFixed(0) + " " + (i ? "KMGTPEZY"[--i] + "iB" : "B"), po = (t, e = null) => { - var r; - return new Date(t * 1e3).toLocaleString((r = e != null ? e : navigator.language) != null ? r : "en-US"); -}, Ks = { +})(ts); +const Sn = ts.exports, rs = (t, e, r, o, a) => (e = Math, r = e.log, o = 1024, a = r(t) / r(o) | 0, t / e.pow(o, a)).toFixed(0) + " " + (a ? "KMGTPEZY"[--a] + "iB" : "B"), ss = (t, e = null) => new Date(t * 1e3).toLocaleString(e ?? navigator.language ?? "en-US"), _n = { key: 0, xmlns: "http://www.w3.org/2000/svg", class: "h-5 w-5", viewBox: "0 0 20 20", fill: "currentColor" -}, Fs = /* @__PURE__ */ u("path", { +}, xn = /* @__PURE__ */ u("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), Ys = [ - Fs -], Ws = { +}, null, -1), kn = [ + xn +], Dn = { key: 1, xmlns: "http://www.w3.org/2000/svg", class: "h-5 w-5", viewBox: "0 0 20 20", fill: "currentColor" -}, Xs = /* @__PURE__ */ u("path", { +}, Cn = /* @__PURE__ */ u("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), qs = [ - Xs -], Gs = { +}, null, -1), Mn = [ + Cn +], En = { name: "VFSortIcon" -}, St = /* @__PURE__ */ Object.assign(Gs, { +}, $t = /* @__PURE__ */ Object.assign(En, { props: { direction: String }, setup(t) { - return (e, r) => (y(), S("div", null, [ - t.direction == "down" ? (y(), S("svg", Ks, Ys)) : X("", !0), - t.direction == "up" ? (y(), S("svg", Ws, qs)) : X("", !0) + return (e, r) => (S(), D("div", null, [ + t.direction == "down" ? (S(), D("svg", _n, kn)) : Z("", !0), + t.direction == "up" ? (S(), D("svg", Dn, Mn)) : Z("", !0) ])); } -}), Js = ["onClick"], Zs = { +}), $n = ["onClick"], Tn = { name: "VFToast.vue" -}, Qs = /* @__PURE__ */ Object.assign(Zs, { +}, An = /* @__PURE__ */ Object.assign(Tn, { setup(t) { - const e = j("emitter"), { getStore: r } = j("storage"), o = L(r("full-screen", !1)), i = (g) => g == "error" ? "text-red-400 border-red-400 dark:text-red-300 dark:border-red-300" : "text-lime-600 border-lime-600 dark:text-lime-300 dark:border-lime-1300", a = L([]), n = (g) => { - a.value.splice(g, 1); - }, m = (g) => { - let f = a.value.findIndex((h) => h.id === g); - f !== -1 && n(f); + const e = P("emitter"), { getStore: r } = P("storage"), o = L(r("full-screen", !1)), a = (v) => v == "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", n = L([]), l = (v) => { + n.value.splice(v, 1); + }, h = (v) => { + let m = n.value.findIndex((p) => p.id === v); + m !== -1 && l(m); }; return e.on("vf-toast-clear", () => { - a.value = []; - }), e.on("vf-toast-push", (g) => { - let f = new Date().getTime().toString(36).concat(performance.now().toString(), Math.random().toString()).replace(/\./g, ""); - g.id = f, a.value.push(g), setTimeout(() => { - m(f); + n.value = []; + }), e.on("vf-toast-push", (v) => { + let m = new Date().getTime().toString(36).concat(performance.now().toString(), Math.random().toString()).replace(/\./g, ""); + v.id = m, n.value.push(v), setTimeout(() => { + h(m); }, 5e3); - }), (g, f) => (y(), S("div", { - class: he([o.value.value ? "fixed" : "absolute", "bottom-0 max-w-fit flex flex-col bottom-0 left-1/2 -translate-x-1/2"]) + }), (v, m) => (S(), D("div", { + class: ce([o.value.value ? "fixed" : "absolute", "bottom-0 max-w-fit flex flex-col bottom-0 left-1/2 -translate-x-1/2"]) }, [ - De(Wa, { + Ce(ko, { name: "vf-toast-item", "leave-active-class": "transition-all duration-1000", "leave-to-class": "opacity-0" }, { default: q(() => [ - (y(!0), S(ue, null, ke(a.value, (h, p) => (y(), S("div", { - onClick: (b) => n(p), - key: h, - class: he([i(h.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"]) - }, $(h.label), 11, Js))), 128)) + (S(!0), D(ae, null, _e(n.value, (p, b) => (S(), D("div", { + onClick: (w) => l(b), + key: p, + class: ce([a(p.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"]) + }, M(p.label), 11, $n))), 128)) ]), _: 1 }) ], 2)); } -}), We = (t) => Object.entries(t).map((e) => e.map(encodeURIComponent).join("=")).join("&"), { apiUrl: ei } = Te(), Xt = (t, e) => ei.value + "?" + We({ q: "preview", adapter: t, path: e }), Ve = typeof window < "u", vo = Ve && !("onscroll" in window) || typeof navigator < "u" && /(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent), bo = Ve && "IntersectionObserver" in window, yo = Ve && "classList" in document.createElement("p"), wo = Ve && window.devicePixelRatio > 1, ti = { +}), Fe = (t) => Object.entries(t).map((e) => e.map(encodeURIComponent).join("=")).join("&"), { apiUrl: In } = Ie(), Ft = (t, e) => In.value + "?" + Fe({ q: "preview", adapter: t, path: e }), Re = typeof window < "u", os = Re && !("onscroll" in window) || typeof navigator < "u" && /(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent), ns = Re && "IntersectionObserver" in window, is = Re && "classList" in document.createElement("p"), as = Re && window.devicePixelRatio > 1, Ln = { elements_selector: ".lazy", - container: vo || Ve ? document : null, + container: os || Re ? document : null, threshold: 300, thresholds: null, data_src: "src", @@ -1863,31 +2146,31 @@ const Us = mo.exports, go = (t, e, r, o, i) => (e = Math, r = e.log, o = 1024, i callback_cancel: null, use_native: !1, restore_on_error: !1 -}, xo = (t) => Object.assign({}, ti, t), Ur = function(t, e) { +}, ls = (t) => Object.assign({}, Ln, t), Ar = function(t, e) { let r; - const o = "LazyLoad::Initialized", i = new t(e); + const o = "LazyLoad::Initialized", a = new t(e); try { - r = new CustomEvent(o, { detail: { instance: i } }); + r = new CustomEvent(o, { detail: { instance: a } }); } catch { - r = document.createEvent("CustomEvent"), r.initCustomEvent(o, !1, !1, { instance: i }); + r = document.createEvent("CustomEvent"), r.initCustomEvent(o, !1, !1, { instance: a }); } window.dispatchEvent(r); -}, ri = (t, e) => { - if (!!e) +}, On = (t, e) => { + if (e) if (!e.length) - Ur(t, e); + Ar(t, e); else for (let r = 0, o; o = e[r]; r += 1) - Ur(t, o); -}, Ie = "src", sr = "srcset", ir = "sizes", _o = "poster", bt = "llOriginalAttrs", ko = "data", nr = "loading", So = "loaded", Do = "applied", oi = "entered", lr = "error", Co = "native", Mo = "data-", $o = "ll-status", ve = (t, e) => t.getAttribute(Mo + e), ai = (t, e, r) => { - var o = Mo + e; + Ar(t, o); +}, Pe = "src", lr = "srcset", cr = "sizes", cs = "poster", _t = "llOriginalAttrs", ds = "data", dr = "loading", us = "loaded", hs = "applied", Pn = "entered", ur = "error", fs = "native", ps = "data-", gs = "ll-status", fe = (t, e) => t.getAttribute(ps + e), Nn = (t, e, r) => { + var o = ps + e; if (r === null) { t.removeAttribute(o); return; } t.setAttribute(o, r); -}, yt = (t) => ve(t, $o), Xe = (t, e) => ai(t, $o, e), Pt = (t) => Xe(t, null), cr = (t) => yt(t) === null, si = (t) => yt(t) === nr, ii = (t) => yt(t) === lr, ur = (t) => yt(t) === Co, ni = [nr, So, Do, lr], li = (t) => ni.indexOf(yt(t)) >= 0, Re = (t, e, r, o) => { - if (!!t) { +}, xt = (t) => fe(t, gs), Ge = (t, e) => Nn(t, gs, e), Vt = (t) => Ge(t, null), hr = (t) => xt(t) === null, jn = (t) => xt(t) === dr, zn = (t) => xt(t) === ur, fr = (t) => xt(t) === fs, Vn = [dr, us, hs, ur], Rn = (t) => Vn.indexOf(xt(t)) >= 0, He = (t, e, r, o) => { + if (t) { if (o !== void 0) { t(e, r, o); return; @@ -1898,283 +2181,283 @@ const Us = mo.exports, go = (t, e, r, o, i) => (e = Math, r = e.log, o = 1024, i } t(e); } -}, nt = (t, e) => { - if (yo) { +}, it = (t, e) => { + if (is) { t.classList.add(e); return; } t.className += (t.className ? " " : "") + e; -}, Me = (t, e) => { - if (yo) { +}, $e = (t, e) => { + if (is) { t.classList.remove(e); return; } t.className = t.className.replace(new RegExp("(^|\\s+)" + e + "(\\s+|$)"), " ").replace(/^\s+/, "").replace(/\s+$/, ""); -}, ci = (t) => { +}, Hn = (t) => { t.llTempImage = document.createElement("IMG"); -}, ui = (t) => { +}, Bn = (t) => { delete t.llTempImage; -}, Eo = (t) => t.llTempImage, Nt = (t, e) => { +}, ms = (t) => t.llTempImage, Rt = (t, e) => { if (!e) return; const r = e._observer; - !r || r.unobserve(t); -}, di = (t) => { + r && r.unobserve(t); +}, Un = (t) => { t.disconnect(); -}, hi = (t, e, r) => { - e.unobserve_entered && Nt(t, r); -}, dr = (t, e) => { - !t || (t.loadingCount += e); -}, fi = (t) => { - !t || (t.toLoadCount -= 1); -}, To = (t, e) => { - !t || (t.toLoadCount = e); -}, mi = (t) => t.loadingCount > 0, gi = (t) => t.toLoadCount > 0, Ao = (t) => { +}, Kn = (t, e, r) => { + e.unobserve_entered && Rt(t, r); +}, pr = (t, e) => { + t && (t.loadingCount += e); +}, Yn = (t) => { + t && (t.toLoadCount -= 1); +}, vs = (t, e) => { + t && (t.toLoadCount = e); +}, Wn = (t) => t.loadingCount > 0, Xn = (t) => t.toLoadCount > 0, bs = (t) => { let e = []; for (let r = 0, o; o = t.children[r]; r += 1) o.tagName === "SOURCE" && e.push(o); return e; -}, hr = (t, e) => { +}, gr = (t, e) => { const r = t.parentNode; if (!r || r.tagName !== "PICTURE") return; - Ao(r).forEach(e); -}, Oo = (t, e) => { - Ao(t).forEach(e); -}, jt = [Ie], Io = [Ie, _o], gt = [Ie, sr, ir], Lo = [ko], zt = (t) => !!t[bt], Po = (t) => t[bt], No = (t) => delete t[bt], at = (t, e) => { - if (zt(t)) + bs(r).forEach(e); +}, ys = (t, e) => { + bs(t).forEach(e); +}, Ht = [Pe], ws = [Pe, cs], yt = [Pe, lr, cr], Ss = [ds], Bt = (t) => !!t[_t], _s = (t) => t[_t], xs = (t) => delete t[_t], st = (t, e) => { + if (Bt(t)) return; const r = {}; e.forEach((o) => { r[o] = t.getAttribute(o); - }), t[bt] = r; -}, pi = (t) => { - zt(t) || (t[bt] = { backgroundImage: t.style.backgroundImage }); -}, vi = (t, e, r) => { + }), t[_t] = r; +}, Zn = (t) => { + Bt(t) || (t[_t] = { backgroundImage: t.style.backgroundImage }); +}, qn = (t, e, r) => { if (!r) { t.removeAttribute(e); return; } t.setAttribute(e, r); -}, Fe = (t, e) => { - if (!zt(t)) +}, Ze = (t, e) => { + if (!Bt(t)) return; - const r = Po(t); + const r = _s(t); e.forEach((o) => { - vi(t, o, r[o]); + qn(t, o, r[o]); }); -}, bi = (t) => { - if (!zt(t)) +}, Fn = (t) => { + if (!Bt(t)) return; - const e = Po(t); + const e = _s(t); t.style.backgroundImage = e.backgroundImage; -}, jo = (t, e, r) => { - nt(t, e.class_applied), Xe(t, Do), r && (e.unobserve_completed && Nt(t, e), Re(e.callback_applied, t, r)); -}, zo = (t, e, r) => { - nt(t, e.class_loading), Xe(t, nr), r && (dr(r, 1), Re(e.callback_loading, t, r)); -}, ze = (t, e, r) => { - !r || t.setAttribute(e, r); -}, Kr = (t, e) => { - ze(t, ir, ve(t, e.data_sizes)), ze(t, sr, ve(t, e.data_srcset)), ze(t, Ie, ve(t, e.data_src)); -}, yi = (t, e) => { - hr(t, (r) => { - at(r, gt), Kr(r, e); - }), at(t, gt), Kr(t, e); -}, wi = (t, e) => { - at(t, jt), ze(t, Ie, ve(t, e.data_src)); -}, xi = (t, e) => { - Oo(t, (r) => { - at(r, jt), ze(r, Ie, ve(r, e.data_src)); - }), at(t, Io), ze(t, _o, ve(t, e.data_poster)), ze(t, Ie, ve(t, e.data_src)), t.load(); -}, _i = (t, e) => { - at(t, Lo), ze(t, ko, ve(t, e.data_src)); -}, ki = (t, e, r) => { - const o = ve(t, e.data_bg), i = ve(t, e.data_bg_hidpi), a = wo && i ? i : o; - !a || (t.style.backgroundImage = `url("${a}")`, Eo(t).setAttribute(Ie, a), zo(t, e, r)); -}, Si = (t, e, r) => { - const o = ve(t, e.data_bg_multi), i = ve(t, e.data_bg_multi_hidpi), a = wo && i ? i : o; - !a || (t.style.backgroundImage = a, jo(t, e, r)); -}, Di = (t, e, r) => { - const o = ve(t, e.data_bg_set); +}, ks = (t, e, r) => { + it(t, e.class_applied), Ge(t, hs), r && (e.unobserve_completed && Rt(t, e), He(e.callback_applied, t, r)); +}, Ds = (t, e, r) => { + it(t, e.class_loading), Ge(t, dr), r && (pr(r, 1), He(e.callback_loading, t, r)); +}, Ve = (t, e, r) => { + r && t.setAttribute(e, r); +}, Ir = (t, e) => { + Ve(t, cr, fe(t, e.data_sizes)), Ve(t, lr, fe(t, e.data_srcset)), Ve(t, Pe, fe(t, e.data_src)); +}, Gn = (t, e) => { + gr(t, (r) => { + st(r, yt), Ir(r, e); + }), st(t, yt), Ir(t, e); +}, Jn = (t, e) => { + st(t, Ht), Ve(t, Pe, fe(t, e.data_src)); +}, Qn = (t, e) => { + ys(t, (r) => { + st(r, Ht), Ve(r, Pe, fe(r, e.data_src)); + }), st(t, ws), Ve(t, cs, fe(t, e.data_poster)), Ve(t, Pe, fe(t, e.data_src)), t.load(); +}, ei = (t, e) => { + st(t, Ss), Ve(t, ds, fe(t, e.data_src)); +}, ti = (t, e, r) => { + const o = fe(t, e.data_bg), a = fe(t, e.data_bg_hidpi), n = as && a ? a : o; + n && (t.style.backgroundImage = `url("${n}")`, ms(t).setAttribute(Pe, n), Ds(t, e, r)); +}, ri = (t, e, r) => { + const o = fe(t, e.data_bg_multi), a = fe(t, e.data_bg_multi_hidpi), n = as && a ? a : o; + n && (t.style.backgroundImage = n, ks(t, e, r)); +}, si = (t, e, r) => { + const o = fe(t, e.data_bg_set); if (!o) return; - const i = o.split("|"); - let a = i.map((n) => `image-set(${n})`); - t.style.backgroundImage = a.join(), t.style.backgroundImage === "" && (a = i.map((n) => `-webkit-image-set(${n})`), t.style.backgroundImage = a.join()), jo(t, e, r); -}, Vo = { - IMG: yi, - IFRAME: wi, - VIDEO: xi, - OBJECT: _i -}, Ci = (t, e) => { - const r = Vo[t.tagName]; - !r || r(t, e); -}, Mi = (t, e, r) => { - const o = Vo[t.tagName]; - !o || (o(t, e), zo(t, e, r)); -}, $i = ["IMG", "IFRAME", "VIDEO", "OBJECT"], Ei = (t) => $i.indexOf(t.tagName) > -1, Ro = (t, e) => { - e && !mi(e) && !gi(e) && Re(t.callback_finish, e); -}, Fr = (t, e, r) => { + const a = o.split("|"); + let n = a.map((l) => `image-set(${l})`); + t.style.backgroundImage = n.join(), t.style.backgroundImage === "" && (n = a.map((l) => `-webkit-image-set(${l})`), t.style.backgroundImage = n.join()), ks(t, e, r); +}, Cs = { + IMG: Gn, + IFRAME: Jn, + VIDEO: Qn, + OBJECT: ei +}, oi = (t, e) => { + const r = Cs[t.tagName]; + r && r(t, e); +}, ni = (t, e, r) => { + const o = Cs[t.tagName]; + o && (o(t, e), Ds(t, e, r)); +}, ii = ["IMG", "IFRAME", "VIDEO", "OBJECT"], ai = (t) => ii.indexOf(t.tagName) > -1, Ms = (t, e) => { + e && !Wn(e) && !Xn(e) && He(t.callback_finish, e); +}, Lr = (t, e, r) => { t.addEventListener(e, r), t.llEvLisnrs[e] = r; -}, Ti = (t, e, r) => { +}, li = (t, e, r) => { t.removeEventListener(e, r); -}, fr = (t) => !!t.llEvLisnrs, Ai = (t, e, r) => { - fr(t) || (t.llEvLisnrs = {}); +}, mr = (t) => !!t.llEvLisnrs, ci = (t, e, r) => { + mr(t) || (t.llEvLisnrs = {}); const o = t.tagName === "VIDEO" ? "loadeddata" : "load"; - Fr(t, o, e), Fr(t, "error", r); -}, qt = (t) => { - if (!fr(t)) + Lr(t, o, e), Lr(t, "error", r); +}, Gt = (t) => { + if (!mr(t)) return; const e = t.llEvLisnrs; for (let r in e) { const o = e[r]; - Ti(t, r, o); + li(t, r, o); } delete t.llEvLisnrs; -}, Bo = (t, e, r) => { - ui(t), dr(r, -1), fi(r), Me(t, e.class_loading), e.unobserve_completed && Nt(t, r); -}, Oi = (t, e, r, o) => { - const i = ur(e); - Bo(e, r, o), nt(e, r.class_loaded), Xe(e, So), Re(r.callback_loaded, e, o), i || Ro(r, o); -}, Ii = (t, e, r, o) => { - const i = ur(e); - Bo(e, r, o), nt(e, r.class_error), Xe(e, lr), Re(r.callback_error, e, o), r.restore_on_error && Fe(e, gt), i || Ro(r, o); -}, mr = (t, e, r) => { - const o = Eo(t) || t; - if (fr(o)) +}, Es = (t, e, r) => { + Bn(t), pr(r, -1), Yn(r), $e(t, e.class_loading), e.unobserve_completed && Rt(t, r); +}, di = (t, e, r, o) => { + const a = fr(e); + Es(e, r, o), it(e, r.class_loaded), Ge(e, us), He(r.callback_loaded, e, o), a || Ms(r, o); +}, ui = (t, e, r, o) => { + const a = fr(e); + Es(e, r, o), it(e, r.class_error), Ge(e, ur), He(r.callback_error, e, o), r.restore_on_error && Ze(e, yt), a || Ms(r, o); +}, vr = (t, e, r) => { + const o = ms(t) || t; + if (mr(o)) return; - Ai(o, (n) => { - Oi(n, t, e, r), qt(o); - }, (n) => { - Ii(n, t, e, r), qt(o); + ci(o, (l) => { + di(l, t, e, r), Gt(o); + }, (l) => { + ui(l, t, e, r), Gt(o); }); -}, Li = (t, e, r) => { - ci(t), mr(t, e, r), pi(t), ki(t, e, r), Si(t, e, r), Di(t, e, r); -}, Pi = (t, e, r) => { - mr(t, e, r), Mi(t, e, r); -}, gr = (t, e, r) => { - Ei(t) ? Pi(t, e, r) : Li(t, e, r); -}, Ni = (t, e, r) => { - t.setAttribute("loading", "lazy"), mr(t, e, r), Ci(t, e), Xe(t, Co); -}, Yr = (t) => { - t.removeAttribute(Ie), t.removeAttribute(sr), t.removeAttribute(ir); -}, ji = (t) => { - hr(t, (e) => { - Yr(e); - }), Yr(t); -}, Ho = (t) => { - hr(t, (e) => { - Fe(e, gt); - }), Fe(t, gt); -}, zi = (t) => { - Oo(t, (e) => { - Fe(e, jt); - }), Fe(t, Io), t.load(); -}, Vi = (t) => { - Fe(t, jt); -}, Ri = (t) => { - Fe(t, Lo); -}, Bi = { - IMG: Ho, - IFRAME: Vi, - VIDEO: zi, - OBJECT: Ri -}, Hi = (t) => { - const e = Bi[t.tagName]; +}, hi = (t, e, r) => { + Hn(t), vr(t, e, r), Zn(t), ti(t, e, r), ri(t, e, r), si(t, e, r); +}, fi = (t, e, r) => { + vr(t, e, r), ni(t, e, r); +}, br = (t, e, r) => { + ai(t) ? fi(t, e, r) : hi(t, e, r); +}, pi = (t, e, r) => { + t.setAttribute("loading", "lazy"), vr(t, e, r), oi(t, e), Ge(t, fs); +}, Or = (t) => { + t.removeAttribute(Pe), t.removeAttribute(lr), t.removeAttribute(cr); +}, gi = (t) => { + gr(t, (e) => { + Or(e); + }), Or(t); +}, $s = (t) => { + gr(t, (e) => { + Ze(e, yt); + }), Ze(t, yt); +}, mi = (t) => { + ys(t, (e) => { + Ze(e, Ht); + }), Ze(t, ws), t.load(); +}, vi = (t) => { + Ze(t, Ht); +}, bi = (t) => { + Ze(t, Ss); +}, yi = { + IMG: $s, + IFRAME: vi, + VIDEO: mi, + OBJECT: bi +}, wi = (t) => { + const e = yi[t.tagName]; if (!e) { - bi(t); + Fn(t); return; } e(t); -}, Ui = (t, e) => { - cr(t) || ur(t) || (Me(t, e.class_entered), Me(t, e.class_exited), Me(t, e.class_applied), Me(t, e.class_loading), Me(t, e.class_loaded), Me(t, e.class_error)); -}, Ki = (t, e) => { - Hi(t), Ui(t, e), Pt(t), No(t); -}, Fi = (t, e, r, o) => { - !r.cancel_on_exit || !si(t) || t.tagName === "IMG" && (qt(t), ji(t), Ho(t), Me(t, r.class_loading), dr(o, -1), Pt(t), Re(r.callback_cancel, t, e, o)); -}, Yi = (t, e, r, o) => { - const i = li(t); - Xe(t, oi), nt(t, r.class_entered), Me(t, r.class_exited), hi(t, r, o), Re(r.callback_enter, t, e, o), !i && gr(t, r, o); -}, Wi = (t, e, r, o) => { - cr(t) || (nt(t, r.class_exited), Fi(t, e, r, o), Re(r.callback_exit, t, e, o)); -}, Xi = ["IMG", "IFRAME", "VIDEO"], Uo = (t) => t.use_native && "loading" in HTMLImageElement.prototype, qi = (t, e, r) => { +}, Si = (t, e) => { + hr(t) || fr(t) || ($e(t, e.class_entered), $e(t, e.class_exited), $e(t, e.class_applied), $e(t, e.class_loading), $e(t, e.class_loaded), $e(t, e.class_error)); +}, _i = (t, e) => { + wi(t), Si(t, e), Vt(t), xs(t); +}, xi = (t, e, r, o) => { + r.cancel_on_exit && jn(t) && t.tagName === "IMG" && (Gt(t), gi(t), $s(t), $e(t, r.class_loading), pr(o, -1), Vt(t), He(r.callback_cancel, t, e, o)); +}, ki = (t, e, r, o) => { + const a = Rn(t); + Ge(t, Pn), it(t, r.class_entered), $e(t, r.class_exited), Kn(t, r, o), He(r.callback_enter, t, e, o), !a && br(t, r, o); +}, Di = (t, e, r, o) => { + hr(t) || (it(t, r.class_exited), xi(t, e, r, o), He(r.callback_exit, t, e, o)); +}, Ci = ["IMG", "IFRAME", "VIDEO"], Ts = (t) => t.use_native && "loading" in HTMLImageElement.prototype, Mi = (t, e, r) => { t.forEach((o) => { - Xi.indexOf(o.tagName) !== -1 && Ni(o, e, r); - }), To(r, 0); -}, Gi = (t) => t.isIntersecting || t.intersectionRatio > 0, Ji = (t) => ({ + Ci.indexOf(o.tagName) !== -1 && pi(o, e, r); + }), vs(r, 0); +}, Ei = (t) => t.isIntersecting || t.intersectionRatio > 0, $i = (t) => ({ root: t.container === document ? null : t.container, rootMargin: t.thresholds || t.threshold + "px" -}), Zi = (t, e, r) => { +}), Ti = (t, e, r) => { t.forEach( - (o) => Gi(o) ? Yi(o.target, o, e, r) : Wi(o.target, o, e, r) + (o) => Ei(o) ? ki(o.target, o, e, r) : Di(o.target, o, e, r) ); -}, Qi = (t, e) => { +}, Ai = (t, e) => { e.forEach((r) => { t.observe(r); }); -}, en = (t, e) => { - di(t), Qi(t, e); -}, tn = (t, e) => { - !bo || Uo(t) || (e._observer = new IntersectionObserver((r) => { - Zi(r, t, e); - }, Ji(t))); -}, Ko = (t) => Array.prototype.slice.call(t), At = (t) => t.container.querySelectorAll(t.elements_selector), rn = (t) => Ko(t).filter(cr), on = (t) => ii(t), an = (t) => Ko(t).filter(on), Wr = (t, e) => rn(t || At(e)), sn = (t, e) => { - an(At(t)).forEach((o) => { - Me(o, t.class_error), Pt(o); +}, Ii = (t, e) => { + Un(t), Ai(t, e); +}, Li = (t, e) => { + !ns || Ts(t) || (e._observer = new IntersectionObserver((r) => { + Ti(r, t, e); + }, $i(t))); +}, As = (t) => Array.prototype.slice.call(t), Pt = (t) => t.container.querySelectorAll(t.elements_selector), Oi = (t) => As(t).filter(hr), Pi = (t) => zn(t), Ni = (t) => As(t).filter(Pi), Pr = (t, e) => Oi(t || Pt(e)), ji = (t, e) => { + Ni(Pt(t)).forEach((o) => { + $e(o, t.class_error), Vt(o); }), e.update(); -}, nn = (t, e) => { - !Ve || (e._onlineHandler = () => { - sn(t, e); +}, zi = (t, e) => { + Re && (e._onlineHandler = () => { + ji(t, e); }, window.addEventListener("online", e._onlineHandler)); -}, ln = (t) => { - !Ve || window.removeEventListener("online", t._onlineHandler); -}, wt = function(t, e) { - const r = xo(t); - this._settings = r, this.loadingCount = 0, tn(r, this), nn(r, this), this.update(e); +}, Vi = (t) => { + Re && window.removeEventListener("online", t._onlineHandler); +}, kt = function(t, e) { + const r = ls(t); + this._settings = r, this.loadingCount = 0, Li(r, this), zi(r, this), this.update(e); }; -wt.prototype = { +kt.prototype = { update: function(t) { - const e = this._settings, r = Wr(t, e); - if (To(this, r.length), vo || !bo) { + const e = this._settings, r = Pr(t, e); + if (vs(this, r.length), os || !ns) { this.loadAll(r); return; } - if (Uo(e)) { - qi(r, e, this); + if (Ts(e)) { + Mi(r, e, this); return; } - en(this._observer, r); + Ii(this._observer, r); }, destroy: function() { - this._observer && this._observer.disconnect(), ln(this), At(this._settings).forEach((t) => { - No(t); + this._observer && this._observer.disconnect(), Vi(this), Pt(this._settings).forEach((t) => { + xs(t); }), delete this._observer, delete this._settings, delete this._onlineHandler, delete this.loadingCount, delete this.toLoadCount; }, loadAll: function(t) { const e = this._settings; - Wr(t, e).forEach((o) => { - Nt(o, this), gr(o, e, this); + Pr(t, e).forEach((o) => { + Rt(o, this), br(o, e, this); }); }, restoreAll: function() { const t = this._settings; - At(t).forEach((e) => { - Ki(e, t); + Pt(t).forEach((e) => { + _i(e, t); }); } }; -wt.load = (t, e) => { - const r = xo(e); - gr(t, r); +kt.load = (t, e) => { + const r = ls(e); + br(t, r); }; -wt.resetStatus = (t) => { - Pt(t); +kt.resetStatus = (t) => { + Vt(t); }; -Ve && ri(wt, window.lazyLoadOptions); -const cn = { class: "relative flex-auto flex flex-col overflow-hidden" }, un = { +Re && On(kt, window.lazyLoadOptions); +const Ri = { class: "relative flex-auto flex flex-col overflow-hidden" }, Hi = { key: 0, class: "grid grid-cols-12 border-b border-neutral-300 border-gray-200 dark:border-gray-700 text-xs select-none" -}, dn = { class: "absolute" }, hn = /* @__PURE__ */ u("svg", { +}, Bi = { class: "absolute" }, Ui = /* @__PURE__ */ u("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", @@ -2187,7 +2470,7 @@ const cn = { class: "relative flex-auto flex flex-col overflow-hidden" }, un = { "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), fn = { 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" }, mn = ["onDblclick", "onContextmenu", "data-type", "data-item", "data-index"], gn = { class: "grid grid-cols-12 items-center" }, pn = { class: "flex col-span-7 items-center" }, vn = { +], -1), Ki = { 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" }, Yi = ["onDblclick", "onContextmenu", "data-type", "data-item", "data-index"], Wi = { class: "grid grid-cols-12 items-center" }, Xi = { class: "flex col-span-7 items-center" }, Zi = { 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", @@ -2195,13 +2478,13 @@ const cn = { class: "relative flex-auto flex flex-col overflow-hidden" }, un = { viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, bn = /* @__PURE__ */ u("path", { +}, qi = /* @__PURE__ */ u("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), yn = [ - bn -], wn = { +}, null, -1), Fi = [ + qi +], Gi = { key: 1, xmlns: "http://www.w3.org/2000/svg", class: "h-5 w-5 text-neutral-500", @@ -2209,13 +2492,13 @@ const cn = { class: "relative flex-auto flex flex-col overflow-hidden" }, un = { viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, xn = /* @__PURE__ */ u("path", { +}, Ji = /* @__PURE__ */ u("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), _n = [ - xn -], kn = { class: "overflow-ellipsis overflow-hidden whitespace-nowrap" }, Sn = { class: "col-span-5 overflow-ellipsis overflow-hidden whitespace-nowrap" }, Dn = ["onDblclick", "onContextmenu", "onDragstart", "onDragover", "onDrop", "data-type", "data-item", "data-index"], Cn = { class: "grid grid-cols-12 items-center" }, Mn = { class: "flex col-span-7 items-center" }, $n = { +}, null, -1), Qi = [ + Ji +], ea = { class: "overflow-ellipsis overflow-hidden whitespace-nowrap" }, ta = { class: "col-span-5 overflow-ellipsis overflow-hidden whitespace-nowrap" }, ra = ["onDblclick", "onContextmenu", "onDragstart", "onDragover", "onDrop", "data-type", "data-item", "data-index"], sa = { class: "grid grid-cols-12 items-center" }, oa = { class: "flex col-span-7 items-center" }, na = { key: 0, xmlns: "http://www.w3.org/2000/svg", class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500", @@ -2223,13 +2506,13 @@ const cn = { class: "relative flex-auto flex flex-col overflow-hidden" }, un = { viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, En = /* @__PURE__ */ u("path", { +}, ia = /* @__PURE__ */ u("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), Tn = [ - En -], An = { +}, null, -1), aa = [ + ia +], la = { key: 1, xmlns: "http://www.w3.org/2000/svg", class: "h-5 w-5 text-neutral-500", @@ -2237,13 +2520,13 @@ const cn = { class: "relative flex-auto flex flex-col overflow-hidden" }, un = { viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, On = /* @__PURE__ */ u("path", { +}, ca = /* @__PURE__ */ u("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), In = [ - On -], Ln = { class: "overflow-ellipsis overflow-hidden whitespace-nowrap" }, Pn = { class: "col-span-2 text-center" }, Nn = { class: "col-span-3 overflow-ellipsis overflow-hidden whitespace-nowrap" }, jn = ["onDblclick", "onContextmenu", "onDragstart", "onDragover", "onDrop", "data-type", "data-item", "data-index"], zn = { class: "relative" }, Vn = { +}, null, -1), da = [ + ca +], ua = { class: "overflow-ellipsis overflow-hidden whitespace-nowrap" }, ha = { class: "col-span-2 text-center" }, fa = { class: "col-span-3 overflow-ellipsis overflow-hidden whitespace-nowrap" }, pa = ["onDblclick", "onContextmenu", "onDragstart", "onDragover", "onDrop", "data-type", "data-item", "data-index"], ga = { class: "relative" }, ma = { 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", @@ -2251,13 +2534,13 @@ const cn = { class: "relative flex-auto flex flex-col overflow-hidden" }, un = { viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, Rn = /* @__PURE__ */ u("path", { +}, va = /* @__PURE__ */ u("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), Bn = [ - Rn -], Hn = ["data-src", "alt"], Un = { +}, null, -1), ba = [ + va +], ya = ["data-src", "alt"], wa = { 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", @@ -2265,252 +2548,249 @@ const cn = { class: "relative flex-auto flex flex-col overflow-hidden" }, un = { viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, Kn = /* @__PURE__ */ u("path", { +}, Sa = /* @__PURE__ */ u("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), Fn = [ - Kn -], Yn = { +}, null, -1), _a = [ + Sa +], xa = { key: 3, class: "absolute hidden md:block top-1/2 w-full text-center text-neutral-500" -}, Wn = { class: "break-all" }, Xn = { +}, ka = { class: "break-all" }, Da = { name: "VFExplorer" -}, qn = /* @__PURE__ */ Object.assign(Xn, { +}, Ca = /* @__PURE__ */ Object.assign(Da, { props: { view: String, data: Object, search: Object }, setup(t) { - const e = t, r = j("emitter"), { setStore: o, getStore: i } = j("storage"), a = j("adapter"), n = (O) => O == null ? void 0 : O.substring(0, 3), m = (O) => O.replace(/((?=([\w\W]{0,14}))([\w\W]{8,})([\w\W]{8,}))/, "$2..$4"), g = L(null), f = L(null), h = L(0), p = L(null), { t: b } = j("i18n"), E = Math.floor(Math.random() * 2 ** 32), D = L(i("full-screen", !1)), T = new wt(); + const e = t, r = P("emitter"), { setStore: o, getStore: a } = P("storage"), n = P("adapter"), l = (T) => T == null ? void 0 : T.substring(0, 3), h = (T) => T.replace(/((?=([\w\W]{0,14}))([\w\W]{8,})([\w\W]{8,}))/, "$2..$4"), v = L(null), m = L(null), p = L(0), b = L(null), { t: w } = P("i18n"), E = Math.floor(Math.random() * 2 ** 32), C = L(a("full-screen", !1)), A = new kt(); r.on("vf-fullscreen-toggle", () => { - g.value.style.height = null, D.value = !D.value, o("full-screen", D.value); + v.value.style.height = null, C.value = !C.value, o("full-screen", C.value); }); const I = L(""); - r.on("vf-search-query", ({ newQuery: O }) => { - I.value = O, O ? r.emit("vf-fetch", { + r.on("vf-search-query", ({ newQuery: T }) => { + I.value = T, T ? r.emit("vf-fetch", { params: { q: "search", adapter: e.data.adapter, path: e.data.dirname, - filter: O + filter: T }, - onSuccess: (B) => { - B.files.length || r.emit("vf-toast-push", { label: b("No search result found.") }); + onSuccess: (z) => { + z.files.length || r.emit("vf-toast-push", { label: w("No search result found.") }); } }) : r.emit("vf-fetch", { params: { q: "index", adapter: e.data.adapter, path: e.data.dirname } }); }); - let U = null; - const H = () => { - U && clearTimeout(U); - }, N = L(!0), W = (O) => { - O.touches.length > 1 && (N.value ? (p.value.stop(), r.emit("vf-toast-push", { label: b("Drag&Drop: off") })) : (p.value.start(), r.emit("vf-toast-push", { label: b("Drag&Drop: on") }), r.emit("vf-explorer-update")), N.value = !N.value); - }, K = (O) => { - U = setTimeout(() => { - const B = new MouseEvent("contextmenu", { + let R = null; + const V = () => { + R && clearTimeout(R); + }, O = L(!0), K = (T) => { + T.touches.length > 1 && (O.value ? (b.value.stop(), r.emit("vf-toast-push", { label: w("Drag&Drop: off") })) : (b.value.start(), r.emit("vf-toast-push", { label: w("Drag&Drop: on") }), r.emit("vf-explorer-update")), O.value = !O.value); + }, B = (T) => { + R = setTimeout(() => { + const z = new MouseEvent("contextmenu", { bubbles: !0, cancelable: !1, view: window, button: 2, buttons: 0, - clientX: O.target.getBoundingClientRect().x, - clientY: O.target.getBoundingClientRect().y + clientX: T.target.getBoundingClientRect().x, + clientY: T.target.getBoundingClientRect().y }); - O.target.dispatchEvent(B); + T.target.dispatchEvent(z); }, 500); - }, C = (O) => { - O.type == "dir" ? (r.emit("vf-search-exit"), r.emit("vf-fetch", { params: { q: "index", adapter: e.data.adapter, path: O.path } })) : r.emit("vf-modal-show", { type: "preview", adapter: e.data.adapter, item: O }); - }, V = $t({ active: !1, column: "", order: "" }), Q = (O = !0) => { - let B = [...e.data.files], z = V.column, de = V.order == "asc" ? 1 : -1; - if (!O) - return B; - const G = (me, re) => typeof me == "string" && typeof re == "string" ? me.toLowerCase().localeCompare(re.toLowerCase()) : me < re ? -1 : me > re ? 1 : 0; - return V.active && (B = B.slice().sort((me, re) => G(me[z], re[z]) * de)), B; - }, ne = (O) => { - V.active && V.column == O ? (V.active = V.order == "asc", V.column = O, V.order = "desc") : (V.active = !0, V.column = O, V.order = "asc"); - }, le = () => p.value.getSelection().map((O) => JSON.parse(O.dataset.item)), fe = (O, B) => { - if (O.altKey || O.ctrlKey || O.metaKey) - return O.preventDefault(), !1; - O.dataTransfer.setDragImage(f.value, 0, 15), O.dataTransfer.effectAllowed = "all", O.dataTransfer.dropEffect = "copy", O.dataTransfer.setData("items", JSON.stringify(le())); - }, we = (O, B) => { - O.preventDefault(); - let z = JSON.parse(O.dataTransfer.getData("items")); - if (z.find((de) => de.storage != a.value)) { + }, $ = (T) => { + T.type == "dir" ? (r.emit("vf-search-exit"), r.emit("vf-fetch", { params: { q: "index", adapter: e.data.adapter, path: T.path } })) : r.emit("vf-modal-show", { type: "preview", adapter: e.data.adapter, item: T }); + }, j = It({ active: !1, column: "", order: "" }), G = (T = !0) => { + let z = [...e.data.files], N = j.column, le = j.order == "asc" ? 1 : -1; + if (!T) + return z; + const U = (xe, ke) => typeof xe == "string" && typeof ke == "string" ? xe.toLowerCase().localeCompare(ke.toLowerCase()) : xe < ke ? -1 : xe > ke ? 1 : 0; + return j.active && (z = z.slice().sort((xe, ke) => U(xe[N], ke[N]) * le)), z; + }, se = (T) => { + j.active && j.column == T ? (j.active = j.order == "asc", j.column = T, j.order = "desc") : (j.active = !0, j.column = T, j.order = "asc"); + }, ee = () => b.value.getSelection().map((T) => JSON.parse(T.dataset.item)), de = (T, z) => { + if (T.altKey || T.ctrlKey || T.metaKey) + return T.preventDefault(), !1; + T.dataTransfer.setDragImage(m.value, 0, 15), T.dataTransfer.effectAllowed = "all", T.dataTransfer.dropEffect = "copy", T.dataTransfer.setData("items", JSON.stringify(ee())); + }, ve = (T, z) => { + T.preventDefault(); + let N = JSON.parse(T.dataTransfer.getData("items")); + if (N.find((le) => le.storage != n.value)) { alert("Moving items between different storages is not supported yet."); return; } - r.emit("vf-modal-show", { type: "move", items: { from: z, to: B } }); - }, be = (O, B) => { - O.preventDefault(), !B || B.type !== "dir" || p.value.getSelection().find((z) => z == O.currentTarget) ? (O.dataTransfer.dropEffect = "none", O.dataTransfer.effectAllowed = "none") : O.dataTransfer.dropEffect = "copy"; + r.emit("vf-modal-show", { type: "move", items: { from: N, to: z } }); + }, pe = (T, z) => { + T.preventDefault(), !z || z.type !== "dir" || b.value.getSelection().find((N) => N == T.currentTarget) ? (T.dataTransfer.dropEffect = "none", T.dataTransfer.effectAllowed = "none") : T.dataTransfer.dropEffect = "copy"; }; - return Ce(() => { - p.value = new Us({ - area: g.value, + return Me(() => { + b.value = new Sn({ + area: v.value, keyboardDrag: !1, selectedClass: "vf-explorer-selected", selectorClass: "vf-explorer-selector" - }), r.on("vf-explorer-update", () => Lt(() => { - p.value.clearSelection(), p.value.setSelectables(document.getElementsByClassName("vf-item-" + E)); - })), p.value.subscribe("predragstart", ({ event: O, isDragging: B }) => { - if (B) - h.value = p.value.getSelection().length, p.value.break(); + }), r.on("vf-explorer-update", () => zt(() => { + b.value.clearSelection(), b.value.setSelectables(document.getElementsByClassName("vf-item-" + E)); + })), b.value.subscribe("predragstart", ({ event: T, isDragging: z }) => { + if (z) + p.value = b.value.getSelection().length, b.value.break(); else { - const z = O.target.offsetWidth - O.offsetX, de = O.target.offsetHeight - O.offsetY; - z < 15 && de < 15 && (p.value.clearSelection(), p.value.break()); + const N = T.target.offsetWidth - T.offsetX, le = T.target.offsetHeight - T.offsetY; + N < 15 && le < 15 && (b.value.clearSelection(), b.value.break()); } - }), p.value.subscribe("predragmove", ({ isDragging: O }) => { - O && p.value.break(); - }), p.value.subscribe("callback", ({ items: O, event: B, isDragging: z }) => { - r.emit("vf-nodes-selected", le()), h.value = p.value.getSelection().length; + }), b.value.subscribe("predragmove", ({ isDragging: T }) => { + T && b.value.break(); + }), b.value.subscribe("callback", ({ items: T, event: z, isDragging: N }) => { + r.emit("vf-nodes-selected", ee()), p.value = b.value.getSelection().length; }); - }), Xa(() => { - p.value.Area.reset(), p.value.SelectorArea.updatePos(), T.update(); - }), Ce(() => { - It(() => e.view, () => r.emit("vf-explorer-update")); - }), (O, B) => (y(), S("div", cn, [ - t.view == "list" || I.value.length ? (y(), S("div", un, [ + }), Do(() => { + b.value.Area.reset(), b.value.SelectorArea.updatePos(), A.update(); + }), Me(() => { + jt(() => e.view, () => r.emit("vf-explorer-update")); + }), (T, z) => (S(), D("div", Ri, [ + t.view == "list" || I.value.length ? (S(), D("div", Hi, [ u("div", { - onClick: B[0] || (B[0] = (z) => ne("basename")), + onClick: z[0] || (z[0] = (N) => 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" }, [ - ie($(x(b)("Name")) + " ", 1), - _e(De(St, { - direction: V.order == "asc" ? "down" : "up" + re(M(_(w)("Name")) + " ", 1), + Se(Ce($t, { + direction: j.order == "asc" ? "down" : "up" }, null, 8, ["direction"]), [ - [kt, V.active && V.column == "basename"] + [Et, j.active && j.column == "basename"] ]) ]), - I.value.length ? X("", !0) : (y(), S("div", { + I.value.length ? Z("", !0) : (S(), D("div", { key: 0, - onClick: B[1] || (B[1] = (z) => ne("file_size")), + onClick: z[1] || (z[1] = (N) => 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" }, [ - ie($(x(b)("Size")) + " ", 1), - _e(De(St, { - direction: V.order == "asc" ? "down" : "up" + re(M(_(w)("Size")) + " ", 1), + Se(Ce($t, { + direction: j.order == "asc" ? "down" : "up" }, null, 8, ["direction"]), [ - [kt, V.active && V.column == "file_size"] + [Et, j.active && j.column == "file_size"] ]) ])), - I.value.length ? X("", !0) : (y(), S("div", { + I.value.length ? Z("", !0) : (S(), D("div", { key: 1, - onClick: B[2] || (B[2] = (z) => ne("last_modified")), + onClick: z[2] || (z[2] = (N) => 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" }, [ - ie($(x(b)("Date")) + " ", 1), - _e(De(St, { - direction: V.order == "asc" ? "down" : "up" + re(M(_(w)("Date")) + " ", 1), + Se(Ce($t, { + direction: j.order == "asc" ? "down" : "up" }, null, 8, ["direction"]), [ - [kt, V.active && V.column == "last_modified"] + [Et, j.active && j.column == "last_modified"] ]) ])), - I.value.length ? (y(), S("div", { + I.value.length ? (S(), D("div", { key: 2, - onClick: B[3] || (B[3] = (z) => ne("path")), + onClick: z[3] || (z[3] = (N) => 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" }, [ - ie($(x(b)("Filepath")) + " ", 1), - _e(De(St, { - direction: V.order == "asc" ? "down" : "up" + re(M(_(w)("Filepath")) + " ", 1), + Se(Ce($t, { + direction: j.order == "asc" ? "down" : "up" }, null, 8, ["direction"]), [ - [kt, V.active && V.column == "path"] + [Et, j.active && j.column == "path"] ]) - ])) : X("", !0) - ])) : X("", !0), - u("div", dn, [ + ])) : Z("", !0) + ])) : Z("", !0), + u("div", Bi, [ u("div", { ref_key: "dragImage", - ref: f, + ref: m, class: "absolute -z-50 -top-96" }, [ - hn, - u("div", fn, $(h.value), 1) + Ui, + u("div", Ki, M(p.value), 1) ], 512) ]), u("div", { - onTouchstart: W, - onContextmenu: B[10] || (B[10] = Ke((z) => x(r).emit("vf-contextmenu-show", { event: z, area: g.value, items: le() }), ["self", "prevent"])), - class: he([D.value ? "" : "resize-y", "h-full w-full text-xs vf-selector-area min-h-[150px] overflow-auto p-1 z-0"]), + onTouchstart: K, + onContextmenu: z[10] || (z[10] = Xe((N) => _(r).emit("vf-contextmenu-show", { event: N, area: v.value, items: ee() }), ["self", "prevent"])), + class: ce([C.value ? "" : "resize-y", "h-full w-full text-xs vf-selector-area min-h-[150px] overflow-auto p-1 z-0"]), ref_key: "selectorArea", - ref: g + ref: v }, [ - I.value.length ? (y(!0), S(ue, { key: 0 }, ke(Q(), (z, de) => (y(), S("div", { - onDblclick: (G) => C(z), - onTouchstart: B[4] || (B[4] = (G) => K(G)), - onTouchend: B[5] || (B[5] = (G) => H()), - onContextmenu: Ke((G) => x(r).emit("vf-contextmenu-show", { event: G, area: g.value, items: le(), target: z }), ["prevent"]), - class: he(["vf-item-" + x(E), "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": z.type, - "data-item": JSON.stringify(z), - "data-index": de + I.value.length ? (S(!0), D(ae, { key: 0 }, _e(G(), (N, le) => (S(), D("div", { + onDblclick: (U) => $(N), + onTouchstart: z[4] || (z[4] = (U) => B(U)), + onTouchend: z[5] || (z[5] = (U) => V()), + onContextmenu: Xe((U) => _(r).emit("vf-contextmenu-show", { event: U, area: v.value, items: ee(), target: N }), ["prevent"]), + class: ce(["vf-item-" + _(E), "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": N.type, + "data-item": JSON.stringify(N), + "data-index": le }, [ - u("div", gn, [ - u("div", pn, [ - z.type == "dir" ? (y(), S("svg", vn, yn)) : (y(), S("svg", wn, _n)), - u("span", kn, $(z.basename), 1) + u("div", Wi, [ + u("div", Xi, [ + N.type == "dir" ? (S(), D("svg", Zi, Fi)) : (S(), D("svg", Gi, Qi)), + u("span", ea, M(N.basename), 1) ]), - u("div", Sn, $(z.path), 1) + u("div", ta, M(N.path), 1) ]) - ], 42, mn))), 256)) : X("", !0), - t.view == "list" && !I.value.length ? (y(!0), S(ue, { key: 1 }, ke(Q(), (z, de) => (y(), S("div", { + ], 42, Yi))), 256)) : Z("", !0), + t.view == "list" && !I.value.length ? (S(!0), D(ae, { key: 1 }, _e(G(), (N, le) => (S(), D("div", { draggable: "true", - onDblclick: (G) => C(z), - onTouchstart: B[6] || (B[6] = (G) => K(G)), - onTouchend: B[7] || (B[7] = (G) => H()), - onContextmenu: Ke((G) => x(r).emit("vf-contextmenu-show", { event: G, area: g.value, items: le(), target: z }), ["prevent"]), - onDragstart: (G) => fe(G), - onDragover: (G) => be(G, z), - onDrop: (G) => we(G, z), - class: he(["vf-item-" + x(E), "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": z.type, - "data-item": JSON.stringify(z), - "data-index": de + onDblclick: (U) => $(N), + onTouchstart: z[6] || (z[6] = (U) => B(U)), + onTouchend: z[7] || (z[7] = (U) => V()), + onContextmenu: Xe((U) => _(r).emit("vf-contextmenu-show", { event: U, area: v.value, items: ee(), target: N }), ["prevent"]), + onDragstart: (U) => de(U), + onDragover: (U) => pe(U, N), + onDrop: (U) => ve(U, N), + class: ce(["vf-item-" + _(E), "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": N.type, + "data-item": JSON.stringify(N), + "data-index": le }, [ - u("div", Cn, [ - u("div", Mn, [ - z.type == "dir" ? (y(), S("svg", $n, Tn)) : (y(), S("svg", An, In)), - u("span", Ln, $(z.basename), 1) + u("div", sa, [ + u("div", oa, [ + N.type == "dir" ? (S(), D("svg", na, aa)) : (S(), D("svg", la, da)), + u("span", ua, M(N.basename), 1) ]), - u("div", Pn, $(z.file_size ? x(go)(z.file_size) : ""), 1), - u("div", Nn, $(x(po)(z.last_modified)), 1) + u("div", ha, M(N.file_size ? _(rs)(N.file_size) : ""), 1), + u("div", fa, M(_(ss)(N.last_modified)), 1) ]) - ], 42, Dn))), 256)) : X("", !0), - t.view == "grid" && !I.value.length ? (y(!0), S(ue, { key: 2 }, ke(Q(!1), (z, de) => { - var G, me; - return y(), S("div", { - draggable: "true", - onDblclick: (re) => C(z), - onTouchstart: B[8] || (B[8] = (re) => K(re)), - onTouchend: B[9] || (B[9] = (re) => H()), - onContextmenu: Ke((re) => x(r).emit("vf-contextmenu-show", { event: re, area: g.value, items: le(), target: z }), ["prevent"]), - onDragstart: (re) => fe(re), - onDragover: (re) => be(re, z), - onDrop: (re) => we(re, z), - class: he(["vf-item-" + x(E), "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": z.type, - "data-item": JSON.stringify(z), - "data-index": de - }, [ - u("div", null, [ - u("div", zn, [ - z.type == "dir" ? (y(), S("svg", Vn, Bn)) : ((G = z.mime_type) != null ? G : "").startsWith("image") ? (y(), S("img", { - key: 1, - class: "lazy h-10 md:h-12 m-auto", - "data-src": x(Xt)(x(a).value, z.path), - alt: z.basename - }, null, 8, Hn)) : (y(), S("svg", Un, Fn)), - !((me = z.mime_type) != null ? me : "").startsWith("image") && z.type != "dir" ? (y(), S("div", Yn, $(n(z.extension)), 1)) : X("", !0) - ]), - u("span", Wn, $(m(z.basename)), 1) - ]) - ], 42, jn); - }), 256)) : X("", !0) + ], 42, ra))), 256)) : Z("", !0), + t.view == "grid" && !I.value.length ? (S(!0), D(ae, { key: 2 }, _e(G(!1), (N, le) => (S(), D("div", { + draggable: "true", + onDblclick: (U) => $(N), + onTouchstart: z[8] || (z[8] = (U) => B(U)), + onTouchend: z[9] || (z[9] = (U) => V()), + onContextmenu: Xe((U) => _(r).emit("vf-contextmenu-show", { event: U, area: v.value, items: ee(), target: N }), ["prevent"]), + onDragstart: (U) => de(U), + onDragover: (U) => pe(U, N), + onDrop: (U) => ve(U, N), + class: ce(["vf-item-" + _(E), "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": N.type, + "data-item": JSON.stringify(N), + "data-index": le + }, [ + u("div", null, [ + u("div", ga, [ + N.type == "dir" ? (S(), D("svg", ma, ba)) : (N.mime_type ?? "").startsWith("image") ? (S(), D("img", { + key: 1, + class: "lazy h-10 md:h-12 m-auto", + "data-src": _(Ft)(_(n).value, N.path), + alt: N.basename + }, null, 8, ya)) : (S(), D("svg", wa, _a)), + !(N.mime_type ?? "").startsWith("image") && N.type != "dir" ? (S(), D("div", xa, M(l(N.extension)), 1)) : Z("", !0) + ]), + u("span", ka, M(h(N.basename)), 1) + ]) + ], 42, pa))), 256)) : Z("", !0) ], 34), - De(Qs) + Ce(An) ])); } -}), Gn = "1.1.18", Jn = { class: "p-1 text-xs border-t border-neutral-300 dark:border-gray-700/50 flex justify-between select-none" }, Zn = { class: "flex leading-5 items-center" }, Qn = ["aria-label"], el = /* @__PURE__ */ u("svg", { +}), Ma = "1.2.0", Ea = { class: "p-1 text-xs border-t border-neutral-300 dark:border-gray-700/50 flex justify-between select-none" }, $a = { class: "flex leading-5 items-center" }, Ta = ["aria-label"], Aa = /* @__PURE__ */ u("svg", { xmlns: "http://www.w3.org/2000/svg", class: "h-5 w-5", fill: "none", @@ -2523,12 +2803,12 @@ const cn = { class: "relative flex-auto flex flex-col overflow-hidden" }, un = { "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), tl = [ - el -], rl = ["value"], ol = { class: "ml-3" }, al = { key: 0 }, sl = { class: "ml-1" }, il = { class: "flex leading-5 items-center" }, nl = { +], -1), Ia = [ + Aa +], La = ["value"], Oa = { class: "ml-3" }, Pa = { key: 0 }, Na = { class: "ml-1" }, ja = { class: "flex leading-5 items-center" }, za = { value: "", disabled: "" -}, ll = /* @__PURE__ */ qa('', 5), cl = ["aria-label"], ul = /* @__PURE__ */ u("svg", { +}, Va = /* @__PURE__ */ Co('', 5), Ra = ["aria-label"], Ha = /* @__PURE__ */ u("svg", { xmlns: "http://www.w3.org/2000/svg", class: "h-5 w-5 stroke-slate-500 cursor-pointer", fill: "none", @@ -2541,133 +2821,128 @@ const cn = { class: "relative flex-auto flex flex-col overflow-hidden" }, un = { "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), dl = [ - ul -], hl = { +], -1), Ba = [ + Ha +], Ua = { name: "VFStatusbar" -}, fl = /* @__PURE__ */ Object.assign(hl, { +}, Ka = /* @__PURE__ */ Object.assign(Ua, { props: { data: Object }, setup(t) { - const e = j("emitter"), { getStore: r, setStore: o } = j("storage"), i = L(0), a = j("adapter"), { t: n, changeLocale: m } = j("i18n"), g = L(r("locale", "")), f = () => { - e.emit("vf-search-exit"), e.emit("vf-fetch", { params: { q: "index", adapter: a.value } }), o("adapter", a.value); + const e = P("emitter"), { getStore: r, setStore: o } = P("storage"), a = L(0), n = P("adapter"), { t: l, changeLocale: h } = P("i18n"), v = L(r("locale", "")), m = () => { + e.emit("vf-search-exit"), e.emit("vf-fetch", { params: { q: "index", adapter: n.value } }), o("adapter", n.value); }; - e.on("vf-nodes-selected", (p) => { - i.value = p.length; + e.on("vf-nodes-selected", (b) => { + a.value = b.length; }); - const h = L(""); - return e.on("vf-search-query", ({ newQuery: p }) => { - h.value = p; - }), (p, b) => (y(), S("div", Jn, [ - u("div", Zn, [ + const p = L(""); + return e.on("vf-search-query", ({ newQuery: b }) => { + p.value = b; + }), (b, w) => (S(), D("div", Ea, [ + u("div", $a, [ u("div", { class: "mx-2", - "aria-label": x(n)("Storage"), + "aria-label": _(l)("Storage"), "data-microtip-position": "top-right", role: "tooltip" - }, tl, 8, Qn), - _e(u("select", { - "onUpdate:modelValue": b[0] || (b[0] = (E) => ho(a) ? a.value = E : null), - onChange: f, + }, Ia, 8, Ta), + Se(u("select", { + "onUpdate:modelValue": w[0] || (w[0] = (E) => Qr(n) ? n.value = E : null), + onChange: m, class: "py-0.5 text-sm text-slate-500 dark:text-neutral-50 dark:bg-gray-700 rounded pl-2 pr-8" }, [ - (y(!0), S(ue, null, ke(t.data.storages, (E) => (y(), S("option", { value: E }, $(E), 9, rl))), 256)) + (S(!0), D(ae, null, _e(t.data.storages, (E) => (S(), D("option", { value: E }, M(E), 9, La))), 256)) ], 544), [ - [Br, x(a)] + [$r, _(n)] ]), - u("div", ol, [ - h.value.length ? (y(), S("span", al, $(t.data.files.length) + " items found. ", 1)) : X("", !0), - u("span", sl, $(i.value > 0 ? i.value + " " + x(n)("item(s) selected.") : ""), 1) + u("div", Oa, [ + p.value.length ? (S(), D("span", Pa, M(t.data.files.length) + " items found. ", 1)) : Z("", !0), + u("span", Na, M(a.value > 0 ? a.value + " " + _(l)("item(s) selected.") : ""), 1) ]) ]), - u("div", il, [ - _e(u("select", { - "onUpdate:modelValue": b[1] || (b[1] = (E) => g.value = E), - onChange: b[2] || (b[2] = (E) => x(m)(E.target.value)), + u("div", ja, [ + Se(u("select", { + "onUpdate:modelValue": w[1] || (w[1] = (E) => v.value = E), + onChange: w[2] || (w[2] = (E) => _(h)(E.target.value)), class: "py-0.5 text-sm text-slate-500 dark:text-neutral-50 dark:bg-gray-700 rounded pl-2 pr-8 mr-3" }, [ - u("option", nl, $(x(n)("Language")), 1), - ll + u("option", za, M(_(l)("Language")), 1), + Va ], 544), [ - [Br, g.value] + [$r, v.value] ]), u("span", { class: "mr-1", - "aria-label": x(n)("About"), + "aria-label": _(l)("About"), "data-microtip-position": "top-left", role: "tooltip", - onClick: b[3] || (b[3] = (E) => x(e).emit("vf-modal-show", { type: "message", title: "Vuefinder " + x(Gn), message: x(n)("Vuefinder is a file manager component for vue 3.") })) - }, dl, 8, cl) + onClick: w[3] || (w[3] = (E) => _(e).emit("vf-modal-show", { type: "message", title: "Vuefinder " + _(Ma), message: _(l)("Vuefinder is a file manager component for vue 3.") })) + }, Ba, 8, Ra) ]) ])); } -}), ml = (t, e = 0, r = !1) => { +}), Ya = (t, e = 0, r = !1) => { let o; - return (...i) => { - r && !o && t(...i), clearTimeout(o), o = setTimeout(() => { - t(...i); + return (...a) => { + r && !o && t(...a), clearTimeout(o), o = setTimeout(() => { + t(...a); }, e); }; -}, gl = (t, e, r) => { +}, Wa = (t, e, r) => { const o = L(t); - return Ga((a, n) => ({ + return Mo((n, l) => ({ get() { - return a(), o.value; + return n(), o.value; }, - set: ml( - (m) => { - o.value = m, n(); + set: Ya( + (h) => { + o.value = h, l(); }, e, r ) })); -}, pl = { 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" }, vl = ["aria-label"], bl = /* @__PURE__ */ u("path", { +}, Xa = { 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" }, Za = ["aria-label"], qa = /* @__PURE__ */ u("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), yl = [ - bl -], wl = ["aria-label"], xl = /* @__PURE__ */ u("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), _l = [ - xl -], kl = { - key: 1, - "aria-label": "Cancel", - "data-microtip-position": "bottom-right", - role: "tooltip" -}, Sl = /* @__PURE__ */ u("path", { +}, null, -1), Fa = [ + qa +], Ga = ["aria-label"], Ja = /* @__PURE__ */ u("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), Qa = [ + Ja +], el = ["aria-label"], tl = /* @__PURE__ */ u("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M6 18L18 6M6 6l12 12" -}, null, -1), Dl = [ - Sl -], Cl = ["onClick"], Ml = /* @__PURE__ */ u("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), $l = [ - Ml -], El = { class: "flex leading-5" }, Tl = /* @__PURE__ */ u("span", { class: "text-neutral-300 dark:text-gray-600 mx-0.5" }, "/", -1), Al = ["title", "onClick"], Ol = { +}, null, -1), rl = [ + tl +], sl = ["onClick"], ol = /* @__PURE__ */ u("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), nl = [ + ol +], il = { class: "flex leading-5" }, al = /* @__PURE__ */ u("span", { class: "text-neutral-300 dark:text-gray-600 mx-0.5" }, "/", -1), ll = ["title", "onClick"], cl = { 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" -}, Il = /* @__PURE__ */ u("circle", { +}, dl = /* @__PURE__ */ u("circle", { class: "opacity-25 stroke-blue-900 dark:stroke-blue-100", cx: "12", cy: "12", r: "10", stroke: "currentColor", "stroke-width": "4" -}, null, -1), Ll = /* @__PURE__ */ u("path", { +}, null, -1), ul = /* @__PURE__ */ u("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), Pl = [ - Il, - Ll -], Nl = { +}, null, -1), hl = [ + dl, + ul +], fl = { key: 3, class: "relative flex bg-white dark:bg-gray-700 items-center rounded p-1 ml-2 w-full" -}, jl = /* @__PURE__ */ u("svg", { +}, pl = /* @__PURE__ */ u("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", @@ -2678,312 +2953,315 @@ const cn = { class: "relative flex-auto flex flex-col overflow-hidden" }, un = { "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), zl = /* @__PURE__ */ u("div", { class: "w-full" }, null, -1), Vl = ["onKeydown", "placeholder"], Rl = /* @__PURE__ */ u("path", { +], -1), gl = /* @__PURE__ */ u("div", { class: "w-full" }, null, -1), ml = ["onKeydown", "placeholder"], vl = /* @__PURE__ */ u("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M6 18L18 6M6 6l12 12" -}, null, -1), Bl = [ - Rl -], Hl = { +}, null, -1), bl = [ + vl +], yl = { name: "VFBreadcrumb" -}, Ul = /* @__PURE__ */ Object.assign(Hl, { +}, wl = /* @__PURE__ */ Object.assign(yl, { props: { data: Object }, setup(t) { - const e = t, r = j("emitter"); - j("storage"); - const o = j("adapter"), i = L(null), a = L([]), n = L(!1), m = L(null), { t: g } = j("i18n"), f = j("loadingState"); + const e = t, r = P("emitter"); + P("storage"); + const o = P("adapter"), a = L(null), n = L([]), l = L(!1), h = L(null), { t: v } = P("i18n"), m = P("loadingState"); r.on("vf-explorer-update", () => { - var W; - let H = [], N = []; - i.value = (W = e.data.dirname) != null ? W : o.value + "://", i.value.length == 0 && (a.value = []), i.value.replace(o.value + "://", "").split("/").forEach(function(K) { - H.push(K), H.join("/") != "" && N.push({ + let V = [], O = []; + a.value = e.data.dirname ?? o.value + "://", a.value.length == 0 && (n.value = []), a.value.replace(o.value + "://", "").split("/").forEach(function(K) { + V.push(K), V.join("/") != "" && O.push({ basename: K, name: K, - path: o.value + "://" + H.join("/"), + path: o.value + "://" + V.join("/"), type: "dir" }); - }), N.length > 4 && (N = N.slice(-5), N[0].name = ".."), a.value = N; + }), O.length > 4 && (O = O.slice(-5), O[0].name = ".."), n.value = O; }); - const h = () => { - n.value = !1, b.value = ""; + const p = () => { + l.value = !1, w.value = ""; }; r.on("vf-search-exit", () => { - h(); + p(); }); - const p = () => { - n.value = !0, Lt(() => m.value.focus()); - }, b = gl("", 400), E = () => f.value; - It(b, (H) => { - r.emit("vf-toast-clear"), r.emit("vf-search-query", { newQuery: H }); + const b = () => { + l.value = !0, zt(() => h.value.focus()); + }, w = Wa("", 400), E = () => m.value; + jt(w, (V) => { + r.emit("vf-toast-clear"), r.emit("vf-search-query", { newQuery: V }); }); - const D = () => a.value.length && !n.value, T = (H) => { - var W; - H.preventDefault(); - let N = JSON.parse(H.dataTransfer.getData("items")); - if (N.find((K) => K.storage != o.value)) { + const C = () => n.value.length && !l.value, A = (V) => { + V.preventDefault(); + let O = JSON.parse(V.dataTransfer.getData("items")); + if (O.find((K) => K.storage != o.value)) { alert("Moving items between different storages is not supported yet."); return; } r.emit("vf-modal-show", { type: "move", - items: { from: N, to: (W = a.value[a.value.length - 2]) != null ? W : { path: o.value + "://" } } + items: { from: O, to: n.value[n.value.length - 2] ?? { path: o.value + "://" } } }); - }, I = (H) => { - H.preventDefault(), D() ? H.dataTransfer.dropEffect = "copy" : (H.dataTransfer.dropEffect = "none", H.dataTransfer.effectAllowed = "none"); - }, U = () => { - b.value == "" && h(); + }, I = (V) => { + V.preventDefault(), C() ? V.dataTransfer.dropEffect = "copy" : (V.dataTransfer.dropEffect = "none", V.dataTransfer.effectAllowed = "none"); + }, R = () => { + w.value == "" && p(); }; - return (H, N) => (y(), S("div", pl, [ + return (V, O) => (S(), D("div", Xa, [ u("span", { - "aria-label": x(g)("Go up a directory"), + "aria-label": _(v)("Go up a directory"), "data-microtip-position": "bottom-right", role: "tooltip" }, [ - (y(), S("svg", { - onDragover: N[0] || (N[0] = (W) => I(W)), - onDrop: N[1] || (N[1] = (W) => T(W)), - onClick: N[2] || (N[2] = (W) => { - var K, C; - return !D() || x(r).emit("vf-fetch", { params: { q: "index", adapter: t.data.adapter, path: (C = (K = a.value[a.value.length - 2]) == null ? void 0 : K.path) != null ? C : x(o) + "://" } }); + (S(), D("svg", { + onDragover: O[0] || (O[0] = (K) => I(K)), + onDrop: O[1] || (O[1] = (K) => A(K)), + onClick: O[2] || (O[2] = (K) => { + var B; + return !C() || _(r).emit("vf-fetch", { params: { q: "index", adapter: t.data.adapter, path: ((B = n.value[n.value.length - 2]) == null ? void 0 : B.path) ?? _(o) + "://" } }); }), - class: he(["h-6 w-6 p-0.5 rounded", D() ? "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: ce(["h-6 w-6 p-0.5 rounded", C() ? "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" - }, yl, 34)) - ], 8, vl), - E() ? (y(), S("span", kl, [ - (y(), S("svg", { - onClick: N[4] || (N[4] = (W) => x(r).emit("vf-fetch-abort")), + }, Fa, 34)) + ], 8, Za), + E() ? (S(), D("span", { + key: 1, + "aria-label": _(v)("Cancel"), + "data-microtip-position": "bottom-right", + role: "tooltip" + }, [ + (S(), D("svg", { + onClick: O[4] || (O[4] = (K) => _(r).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" - }, Dl)) - ])) : (y(), S("span", { + }, rl)) + ], 8, el)) : (S(), D("span", { key: 0, - "aria-label": x(g)("Refresh"), + "aria-label": _(v)("Refresh"), "data-microtip-position": "bottom-right", role: "tooltip" }, [ - (y(), S("svg", { - onClick: N[3] || (N[3] = (W) => { - x(r).emit("vf-fetch", { params: { q: "index", adapter: t.data.adapter, path: t.data.dirname } }); + (S(), D("svg", { + onClick: O[3] || (O[3] = (K) => { + _(r).emit("vf-fetch", { params: { q: "index", adapter: t.data.adapter, path: t.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" - }, _l)) - ], 8, wl)), - n.value ? (y(), S("div", Nl, [ - jl, - zl, - _e(u("input", { + }, Qa)) + ], 8, Ga)), + l.value ? (S(), D("div", fl, [ + pl, + gl, + Se(u("input", { ref_key: "searchInput", - ref: m, - onKeydown: st(h, ["esc"]), - onBlur: U, - "onUpdate:modelValue": N[6] || (N[6] = (W) => ho(b) ? b.value = W : null), - placeholder: x(g)("Search anything.."), + ref: h, + onKeydown: ot(p, ["esc"]), + onBlur: R, + "onUpdate:modelValue": O[6] || (O[6] = (K) => Qr(w) ? w.value = K : null), + placeholder: _(v)("Search anything.."), class: "absolute ml-4 pt-1 pb-0 px-2 border-0 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, Vl), [ - [it, x(b)] + }, null, 40, ml), [ + [nt, _(w)] ]), - (y(), S("svg", { + (S(), D("svg", { class: "w-6 h-6 cursor-pointer", - onClick: h, + onClick: p, xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor" - }, Bl)) - ])) : (y(), S("div", { + }, bl)) + ])) : (S(), D("div", { key: 2, class: "group flex bg-white dark:bg-gray-700 items-center rounded p-1 ml-2 w-full", - onClick: Ke(p, ["self"]) + onClick: Xe(b, ["self"]) }, [ - (y(), S("svg", { - onClick: N[5] || (N[5] = (W) => x(r).emit("vf-fetch", { params: { q: "index", adapter: t.data.adapter } })), + (S(), D("svg", { + onClick: O[5] || (O[5] = (K) => _(r).emit("vf-fetch", { params: { q: "index", adapter: t.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" - }, $l)), - u("div", El, [ - (y(!0), S(ue, null, ke(a.value, (W, K) => (y(), S("div", { key: K }, [ - Tl, + }, nl)), + u("div", il, [ + (S(!0), D(ae, null, _e(n.value, (K, B) => (S(), D("div", { key: B }, [ + al, u("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: (C) => x(r).emit("vf-fetch", { params: { q: "index", adapter: t.data.adapter, path: W.path } }) - }, $(W.name), 9, Al) + title: K.basename, + onClick: ($) => _(r).emit("vf-fetch", { params: { q: "index", adapter: t.data.adapter, path: K.path } }) + }, M(K.name), 9, ll) ]))), 128)) ]), - E() ? (y(), S("svg", Ol, Pl)) : X("", !0) - ], 8, Cl)) + E() ? (S(), D("svg", cl, hl)) : Z("", !0) + ], 8, sl)) ])); } -}), Kl = ["onClick"], Fl = /* @__PURE__ */ u("span", { class: "px-1" }, null, -1), Yl = { +}), Sl = ["onClick"], _l = /* @__PURE__ */ u("span", { class: "px-1" }, null, -1), xl = { name: "VFContextMenu" -}, Wl = /* @__PURE__ */ Object.assign(Yl, { +}, kl = /* @__PURE__ */ Object.assign(xl, { props: { current: Object }, setup(t) { - const e = t, r = j("emitter"), o = L(null), { apiUrl: i } = Te(), a = $t({ + const e = t, r = P("emitter"), o = L(null), { apiUrl: a } = Ie(), n = It({ active: !1, items: [], positions: { left: 0, top: 0 } - }), n = L([]); - r.on("vf-context-selected", (b) => { - n.value = b; + }), l = L([]); + r.on("vf-context-selected", (w) => { + l.value = w; }); - const { t: m } = j("i18n"), g = { + const { t: h } = P("i18n"), v = { newfolder: { - title: () => m("New Folder"), + title: () => h("New Folder"), action: () => { r.emit("vf-modal-show", { type: "new-folder" }); } }, delete: { - title: () => m("Delete"), + title: () => h("Delete"), action: () => { - r.emit("vf-modal-show", { type: "delete", items: n }); + r.emit("vf-modal-show", { type: "delete", items: l }); } }, refresh: { - title: () => m("Refresh"), + title: () => h("Refresh"), action: () => { r.emit("vf-fetch", { params: { q: "index", adapter: e.current.adapter, path: e.current.dirname } }); } }, preview: { - title: () => m("Preview"), + title: () => h("Preview"), action: () => { - r.emit("vf-modal-show", { type: "preview", adapter: e.current.adapter, item: n.value[0] }); + r.emit("vf-modal-show", { type: "preview", adapter: e.current.adapter, item: l.value[0] }); } }, open: { - title: () => m("Open"), + title: () => h("Open"), action: () => { - r.emit("vf-search-exit"), r.emit("vf-fetch", { params: { q: "index", adapter: e.current.adapter, path: n.value[0].path } }); + r.emit("vf-search-exit"), r.emit("vf-fetch", { params: { q: "index", adapter: e.current.adapter, path: l.value[0].path } }); } }, openDir: { - title: () => m("Open containing folder"), + title: () => h("Open containing folder"), action: () => { - r.emit("vf-search-exit"), r.emit("vf-fetch", { params: { q: "index", adapter: e.current.adapter, path: n.value[0].dir } }); + r.emit("vf-search-exit"), r.emit("vf-fetch", { params: { q: "index", adapter: e.current.adapter, path: l.value[0].dir } }); } }, download: { - title: () => m("Download"), + title: () => h("Download"), action: () => { - const b = i.value + "?" + We({ q: "download", adapter: e.current.adapter, path: n.value[0].path }); - r.emit("vf-download", b); + const w = a.value + "?" + Fe({ q: "download", adapter: e.current.adapter, path: l.value[0].path }); + r.emit("vf-download", w); } }, archive: { - title: () => m("Archive"), + title: () => h("Archive"), action: () => { - r.emit("vf-modal-show", { type: "archive", items: n }); + r.emit("vf-modal-show", { type: "archive", items: l }); } }, unarchive: { - title: () => m("Unarchive"), + title: () => h("Unarchive"), action: () => { - r.emit("vf-modal-show", { type: "unarchive", items: n }); + r.emit("vf-modal-show", { type: "unarchive", items: l }); } }, rename: { - title: () => m("Rename"), + title: () => h("Rename"), action: () => { - r.emit("vf-modal-show", { type: "rename", items: n }); + r.emit("vf-modal-show", { type: "rename", items: l }); } } - }, f = (b) => { - r.emit("vf-contextmenu-hide"), b.action(); - }, h = L(""); - r.on("vf-search-query", ({ newQuery: b }) => { - h.value = b; - }), r.on("vf-contextmenu-show", ({ event: b, area: E, items: D, target: T = null }) => { - if (a.items = [], h.value) - if (T) - a.items.push(g.openDir), r.emit("vf-context-selected", [T]); + }, m = (w) => { + r.emit("vf-contextmenu-hide"), w.action(); + }, p = L(""); + r.on("vf-search-query", ({ newQuery: w }) => { + p.value = w; + }), r.on("vf-contextmenu-show", ({ event: w, area: E, items: C, target: A = null }) => { + if (n.items = [], p.value) + if (A) + n.items.push(v.openDir), r.emit("vf-context-selected", [A]); else return; else - !T && !h.value ? (a.items.push(g.refresh), a.items.push(g.newfolder), r.emit("vf-context-selected", [])) : D.length > 1 && D.some((I) => I.path === T.path) ? (a.items.push(g.refresh), a.items.push(g.archive), a.items.push(g.delete), r.emit("vf-context-selected", D)) : (T.type == "dir" ? a.items.push(g.open) : (a.items.push(g.preview), a.items.push(g.download)), a.items.push(g.rename), T.mime_type == "application/zip" ? a.items.push(g.unarchive) : a.items.push(g.archive), a.items.push(g.delete), r.emit("vf-context-selected", [T])); - p(b, E); + !A && !p.value ? (n.items.push(v.refresh), n.items.push(v.newfolder), r.emit("vf-context-selected", [])) : C.length > 1 && C.some((I) => I.path === A.path) ? (n.items.push(v.refresh), n.items.push(v.archive), n.items.push(v.delete), r.emit("vf-context-selected", C)) : (A.type == "dir" ? n.items.push(v.open) : (n.items.push(v.preview), n.items.push(v.download)), n.items.push(v.rename), A.mime_type == "application/zip" ? n.items.push(v.unarchive) : n.items.push(v.archive), n.items.push(v.delete), r.emit("vf-context-selected", [A])); + b(w, E); }), r.on("vf-contextmenu-hide", () => { - a.active = !1; + n.active = !1; }); - const p = (b, E) => { - a.active = !0, Lt(() => { - let D = E.getBoundingClientRect(), T = b.pageX, I = b.pageY, U = o.value.offsetHeight, H = o.value.offsetWidth; - T = D.right - b.pageX + window.scrollX < H ? T - H : T, I = D.bottom - b.pageY + window.scrollY < U ? I - U : I, a.positions = { - left: T + "px", + const b = (w, E) => { + n.active = !0, zt(() => { + let C = E.getBoundingClientRect(), A = w.pageX, I = w.pageY, R = o.value.offsetHeight, V = o.value.offsetWidth; + A = C.right - w.pageX + window.scrollX < V ? A - V : A, I = C.bottom - w.pageY + window.scrollY < R ? I - R : I, n.positions = { + left: A + "px", top: I + "px" }; }); }; - return (b, E) => a.active ? (y(), S("ul", { + return (w, E) => n.active ? (S(), D("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: o, - style: fo(a.positions) + style: es(n.positions) }, [ - (y(!0), S(ue, null, ke(a.items, (D) => (y(), S("li", { + (S(!0), D(ae, null, _e(n.items, (C) => (S(), D("li", { class: "px-2 py-1.5 cursor-pointer hover:bg-neutral-200 dark:hover:bg-gray-700", - key: D.title, - onClick: (T) => f(D) + key: C.title, + onClick: (A) => m(C) }, [ - Fl, - u("span", null, $(D.title()), 1) - ], 8, Kl))), 128)) - ], 4)) : X("", !0); + _l, + u("span", null, M(C.title()), 1) + ], 8, Sl))), 128)) + ], 4)) : Z("", !0); } -}), Xl = (t, e) => { +}), Dl = (t, e) => { const r = t[e]; - return r ? typeof r == "function" ? r() : Promise.resolve(r) : new Promise((o, i) => { - (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(i.bind(null, new Error("Unknown variable dynamic import: " + e))); + return r ? typeof r == "function" ? r() : Promise.resolve(r) : new Promise((o, a) => { + (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(a.bind(null, new Error("Unknown variable dynamic import: " + e))); }); }; -async function ql(t) { - const e = await Xl(/* @__PURE__ */ Object.assign({ "../locales/en.json": () => import("./en.70efd54a.js"), "../locales/fa.json": () => import("./fa.1da73475.js"), "../locales/ru.json": () => import("./ru.8dbff4f2.js"), "../locales/tr.json": () => import("./tr.78307c97.js") }), `../locales/${t}.json`); +async function Cl(t) { + const e = await Dl(/* @__PURE__ */ Object.assign({ "../locales/en.json": () => import("./en-ed1f1848.js"), "../locales/fa.json": () => import("./fa-49628944.js"), "../locales/ru.json": () => import("./ru-d8535e72.js"), "../locales/tr.json": () => import("./tr-6f9ffcfe.js") }), `../locales/${t}.json`); return JSON.parse(e.default); } -function Gl(t, e, r) { - const { getStore: o, setStore: i } = Wt(t), a = L({}), n = (f) => { - ql(f).then((h) => { - a.value = h, i("locale", f), i("translations", h), r.emit("vf-toast-push", { label: "The language is set to " + f }); - }).catch((h) => { - r.emit("vf-toast-push", { label: "The selected locale is not yet supported!", type: "error" }), n("en"); +function Ml(t, e, r) { + const { getStore: o, setStore: a } = qt(t), n = L({}), l = (m) => { + Cl(m).then((p) => { + n.value = p, a("locale", m), a("translations", p), r.emit("vf-toast-push", { label: "The language is set to " + m }); + }).catch((p) => { + r.emit("vf-toast-push", { label: "The selected locale is not yet supported!", type: "error" }), l("en"); }); }; - o("locale") ? a.value = o("translations") : n(e); - const m = (f, ...h) => h.length ? m(f = f.replace("%s", h.shift()), ...h) : f; - function g(f, ...h) { - return a.value.hasOwnProperty(f) ? m(a.value[f], ...h) : m(f, ...h); + o("locale") ? n.value = o("translations") : l(e); + const h = (m, ...p) => p.length ? h(m = m.replace("%s", p.shift()), ...p) : m; + function v(m, ...p) { + return n.value.hasOwnProperty(m) ? h(n.value[m], ...p) : h(m, ...p); } - return { t: g, changeLocale: n }; + return { t: v, changeLocale: l }; } -const Jl = { class: "vuefinder" }, Zl = /* @__PURE__ */ u("iframe", { +const El = { class: "vuefinder" }, $l = /* @__PURE__ */ u("iframe", { id: "download_frame", style: { display: "none" } -}, null, -1), Ql = { +}, null, -1), Tl = { name: "VueFinder" -}, ec = /* @__PURE__ */ Object.assign(Ql, { +}, Al = /* @__PURE__ */ Object.assign(Tl, { props: { url: { type: [String] @@ -3014,115 +3292,115 @@ const Jl = { class: "vuefinder" }, Zl = /* @__PURE__ */ u("iframe", { } }, setup(t) { - const e = t, r = Za(), { setStore: o, getStore: i } = Wt(e.id), a = L(i("adapter")); - Be("emitter", r), Be("storage", Wt(e.id)), Be("postData", e.postData), Be("adapter", a), Be("maxFileSize", e.maxFileSize); - const n = Gl(e.id, e.locale, r); - Be("i18n", n); - const { apiUrl: m, setApiUrl: g } = Te(); - g(e.url); - const f = $t({ adapter: a.value, storages: [], dirname: ".", files: [] }), h = L(i("viewport", "grid")), p = L(i("darkMode", e.dark)); + const e = t, r = $o(), { setStore: o, getStore: a } = qt(e.id), n = L(a("adapter")); + Ke("emitter", r), Ke("storage", qt(e.id)), Ke("postData", e.postData), Ke("adapter", n), Ke("maxFileSize", e.maxFileSize); + const l = Ml(e.id, e.locale, r); + Ke("i18n", l); + const { apiUrl: h, setApiUrl: v } = Ie(); + v(e.url); + const m = It({ adapter: n.value, storages: [], dirname: ".", files: [] }), p = L(a("viewport", "grid")), b = L(a("darkMode", e.dark)); r.on("vf-darkMode-toggle", () => { - p.value = !p.value, o("darkMode", p.value); + b.value = !b.value, o("darkMode", b.value); }); - const b = L(!1); - Be("loadingState", b); - const E = L(i("full-screen", !1)); + const w = L(!1); + Ke("loadingState", w); + const E = L(a("full-screen", !1)); r.on("vf-fullscreen-toggle", () => { E.value = !E.value, o("full-screen", E.value); - }), r.on("vf-view-toggle", (U) => { - h.value = U; + }), r.on("vf-view-toggle", (R) => { + p.value = R; }); - const D = $t({ + const C = It({ active: !1, type: "delete", data: {} }); r.on("vf-modal-close", () => { - D.active = !1; - }), r.on("vf-modal-show", (U) => { - D.active = !0, D.type = U.type, D.data = U; + C.active = !1; + }), r.on("vf-modal-show", (R) => { + C.active = !0, C.type = R.type, C.data = R; }); - const T = (U) => { - Object.assign(f, U), r.emit("vf-nodes-selected", {}), r.emit("vf-explorer-update"); + const A = (R) => { + Object.assign(m, R), r.emit("vf-nodes-selected", {}), r.emit("vf-explorer-update"); }; let I; return r.on("vf-fetch-abort", () => { - I.abort(), b.value = !1; - }), r.on("vf-fetch", ({ params: U, onSuccess: H = null, onError: N = null }) => { - ["index", "search"].includes(U.q) && (I && I.abort(), b.value = !0), I = new AbortController(); - const W = I.signal; - Tt(m.value, { params: U, signal: W }).then((K) => { - a.value = K.adapter, ["index", "search"].includes(U.q) && (b.value = !1), r.emit("vf-modal-close"), T(K), H(K); - }).catch((K) => { - N && N(K); + I.abort(), w.value = !1; + }), r.on("vf-fetch", ({ params: R, onSuccess: V = null, onError: O = null }) => { + ["index", "search"].includes(R.q) && (I && I.abort(), w.value = !0), I = new AbortController(); + const K = I.signal; + Ot(h.value, { params: R, signal: K }).then((B) => { + n.value = B.adapter, ["index", "search"].includes(R.q) && (w.value = !1), r.emit("vf-modal-close"), A(B), V(B); + }).catch((B) => { + O && O(B); }).finally(() => { }); - }), r.on("vf-download", (U) => { - document.getElementById("download_frame").src = U, r.emit("vf-modal-close"); - }), Ce(() => { - r.emit("vf-fetch", { params: { q: "index", adapter: a.value } }); - }), (U, H) => (y(), S("div", Jl, [ + }), r.on("vf-download", (R) => { + document.getElementById("download_frame").src = R, r.emit("vf-modal-close"); + }), Me(() => { + r.emit("vf-fetch", { params: { q: "index", adapter: n.value } }); + }), (R, V) => (S(), D("div", El, [ u("div", { - class: he(p.value ? "dark" : "") + class: ce(b.value ? "dark" : "") }, [ u("div", { - class: he([E.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: fo(E.value ? "" : "max-height: " + t.maxHeight), - onMousedown: H[0] || (H[0] = (N) => x(r).emit("vf-contextmenu-hide")), - onTouchstart: H[1] || (H[1] = (N) => x(r).emit("vf-contextmenu-hide")) + class: ce([E.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: es(E.value ? "" : "max-height: " + t.maxHeight), + onMousedown: V[0] || (V[0] = (O) => _(r).emit("vf-contextmenu-hide")), + onTouchstart: V[1] || (V[1] = (O) => _(r).emit("vf-contextmenu-hide")) }, [ - De(Bs, { data: f }, null, 8, ["data"]), - De(Ul, { data: f }, null, 8, ["data"]), - De(qn, { - view: h.value, - data: f + Ce(yn, { data: m }, null, 8, ["data"]), + Ce(wl, { data: m }, null, 8, ["data"]), + Ce(Ca, { + view: p.value, + data: m }, null, 8, ["view", "data"]), - De(fl, { data: f }, null, 8, ["data"]) + Ce(Ka, { data: m }, null, 8, ["data"]) ], 38), - D.active ? (y(), J(Ja("v-f-modal-" + D.type), { + C.active ? (S(), F(Eo("v-f-modal-" + C.type), { key: 0, - selection: D.data, - current: f - }, null, 8, ["selection", "current"])) : X("", !0), - De(Wl, { current: f }, null, 8, ["current"]), - Zl + selection: C.data, + current: m + }, null, 8, ["selection", "current"])) : Z("", !0), + Ce(kl, { current: m }, null, 8, ["current"]), + $l ], 2) ])); } -}), tc = /* @__PURE__ */ u("div", { class: "fixed inset-0 bg-gray-500 dark:bg-gray-600 dark:bg-opacity-75 bg-opacity-75 transition-opacity" }, null, -1), rc = { class: "fixed z-10 inset-0 overflow-hidden" }, oc = { 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" }, ac = { class: "bg-white dark:bg-gray-800 px-4 pt-5 pb-4 sm:p-6 sm:pb-4" }, sc = { 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" }, Ae = { +}), Il = /* @__PURE__ */ u("div", { class: "fixed inset-0 bg-gray-500 dark:bg-gray-600 dark:bg-opacity-75 bg-opacity-75 transition-opacity" }, null, -1), Ll = { class: "fixed z-10 inset-0 overflow-hidden" }, Ol = { 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" }, Pl = { class: "bg-white dark:bg-gray-800 px-4 pt-5 pb-4 sm:p-6 sm:pb-4" }, Nl = { 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" }, Le = { __name: "ModalLayout", setup(t) { - const e = j("emitter"); - return Ce(() => { + const e = P("emitter"); + return Me(() => { const r = document.querySelector(".v-f-modal input"); r && r.focus(); - }), (r, o) => (y(), S("div", { + }), (r, o) => (S(), D("div", { class: "v-f-modal relative z-30", "aria-labelledby": "modal-title", role: "dialog", "aria-modal": "true", - onKeyup: o[1] || (o[1] = st((i) => x(e).emit("vf-modal-close"), ["esc"])), + onKeyup: o[1] || (o[1] = ot((a) => _(e).emit("vf-modal-close"), ["esc"])), tabindex: "0" }, [ - tc, - u("div", rc, [ + Il, + u("div", Ll, [ u("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] = Ke((i) => x(e).emit("vf-modal-close"), ["self"])) + onMousedown: o[0] || (o[0] = Xe((a) => _(e).emit("vf-modal-close"), ["self"])) }, [ - u("div", oc, [ - u("div", ac, [ - Yt(r.$slots, "default") + u("div", Ol, [ + u("div", Pl, [ + Zt(r.$slots, "default") ]), - u("div", sc, [ - Yt(r.$slots, "buttons") + u("div", Nl, [ + Zt(r.$slots, "buttons") ]) ]) ], 32) ]) ], 32)); } -}, ic = ["aria-label"], nc = /* @__PURE__ */ u("svg", { +}, jl = ["aria-label"], zl = /* @__PURE__ */ u("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", @@ -3135,11 +3413,11 @@ const Jl = { class: "vuefinder" }, Zl = /* @__PURE__ */ u("iframe", { "stroke-linejoin": "round", d: "M6 18L18 6M6 6l12 12" }) -], -1), lc = [ - nc -], cc = { +], -1), Vl = [ + zl +], Rl = { name: "Message" -}, Oe = /* @__PURE__ */ Object.assign(cc, { +}, Oe = /* @__PURE__ */ Object.assign(Rl, { props: { error: { type: Boolean, @@ -3148,31 +3426,31 @@ const Jl = { class: "vuefinder" }, Zl = /* @__PURE__ */ u("iframe", { }, emits: ["hidden"], setup(t, { emit: e }) { - var m; - const { t: r } = j("i18n"), o = L(!1), i = L(null), a = L((m = i.value) == null ? void 0 : m.strMessage); - It(a, () => o.value = !1); - const n = () => { + var h; + const { t: r } = P("i18n"), o = L(!1), a = L(null), n = L((h = a.value) == null ? void 0 : h.strMessage); + jt(n, () => o.value = !1); + const l = () => { e("hidden"), o.value = !0; }; - return (g, f) => (y(), S("div", null, [ - o.value ? X("", !0) : (y(), S("div", { + return (v, m) => (S(), D("div", null, [ + o.value ? Z("", !0) : (S(), D("div", { key: 0, ref_key: "strMessage", - ref: i, - class: he(["flex mt-1 p-1 px-2 rounded text-sm", t.error ? "bg-red-100 text-red-600" : "bg-emerald-100 text-emerald-600"]) + ref: a, + class: ce(["flex mt-1 p-1 px-2 rounded text-sm", t.error ? "bg-red-100 text-red-600" : "bg-emerald-100 text-emerald-600"]) }, [ - Yt(g.$slots, "default"), + Zt(v.$slots, "default"), u("div", { class: "ml-auto cursor-pointer", - onClick: n, - "aria-label": x(r)("Close"), + onClick: l, + "aria-label": _(r)("Close"), "data-microtip-position": "top-left", role: "tooltip" - }, lc, 8, ic) + }, Vl, 8, jl) ], 2)) ])); } -}), uc = { class: "sm:flex sm:items-start" }, dc = /* @__PURE__ */ u("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" }, [ +}), Hl = { class: "sm:flex sm:items-start" }, Bl = /* @__PURE__ */ u("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__ */ u("svg", { xmlns: "http://www.w3.org/2000/svg", class: "h-6 w-6 stroke-red-600 dark:stroke-red-200", @@ -3187,10 +3465,10 @@ const Jl = { class: "vuefinder" }, Zl = /* @__PURE__ */ u("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), hc = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, fc = { +], -1), Ul = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Kl = { class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400", id: "modal-title" -}, mc = { class: "mt-2" }, gc = { class: "text-sm text-gray-500" }, pc = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, vc = { +}, Yl = { class: "mt-2" }, Wl = { class: "text-sm text-gray-500" }, Xl = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, Zl = { 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", @@ -3198,13 +3476,13 @@ const Jl = { class: "vuefinder" }, Zl = /* @__PURE__ */ u("iframe", { viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, bc = /* @__PURE__ */ u("path", { +}, ql = /* @__PURE__ */ u("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), yc = [ - bc -], wc = { +}, null, -1), Fl = [ + ql +], Gl = { key: 1, xmlns: "http://www.w3.org/2000/svg", class: "h-5 w-5 text-neutral-500", @@ -3212,73 +3490,73 @@ const Jl = { class: "vuefinder" }, Zl = /* @__PURE__ */ u("iframe", { viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, xc = /* @__PURE__ */ u("path", { +}, Jl = /* @__PURE__ */ u("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), _c = [ - xc -], kc = { class: "ml-1.5" }, Sc = { class: "m-auto font-bold text-red-500 text-sm dark:text-red-200 text-center" }, Dc = { +}, null, -1), Ql = [ + Jl +], ec = { class: "ml-1.5" }, tc = { class: "m-auto font-bold text-red-500 text-sm dark:text-red-200 text-center" }, rc = { name: "VFModalDelete" -}, Cc = /* @__PURE__ */ Object.assign(Dc, { +}, sc = /* @__PURE__ */ Object.assign(rc, { props: { selection: Object, current: Object }, setup(t) { - const e = t, r = j("emitter"); - j("storage"); - const o = j("adapter"), { t: i } = j("i18n"), a = L(e.selection.items), n = L(""), m = () => { - a.value.length && r.emit("vf-fetch", { + const e = t, r = P("emitter"); + P("storage"); + const o = P("adapter"), { t: a } = P("i18n"), n = L(e.selection.items), l = L(""), h = () => { + n.value.length && r.emit("vf-fetch", { params: { q: "delete", adapter: o.value, path: e.current.dirname, - items: JSON.stringify(a.value.map(({ path: g, type: f }) => ({ path: g, type: f }))) + items: JSON.stringify(n.value.map(({ path: v, type: m }) => ({ path: v, type: m }))) }, onSuccess: () => { - r.emit("vf-toast-push", { label: i("Files deleted.") }); + r.emit("vf-toast-push", { label: a("Files deleted.") }); }, - onError: (g) => { - n.value = i(g.message); + onError: (v) => { + l.value = a(v.message); } }); }; - return (g, f) => (y(), J(Ae, null, { + return (v, m) => (S(), F(Le, null, { buttons: q(() => [ u("button", { type: "button", - onClick: m, + onClick: h, class: "w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm" - }, $(x(i)("Yes, Delete!")), 1), + }, M(_(a)("Yes, Delete!")), 1), u("button", { type: "button", - onClick: f[1] || (f[1] = (h) => x(r).emit("vf-modal-close")), + onClick: m[1] || (m[1] = (p) => _(r).emit("vf-modal-close")), class: "mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm" - }, $(x(i)("Cancel")), 1), - u("div", Sc, $(x(i)("This action cannot be undone.")), 1) + }, M(_(a)("Cancel")), 1), + u("div", tc, M(_(a)("This action cannot be undone.")), 1) ]), default: q(() => [ - u("div", uc, [ - dc, - u("div", hc, [ - u("h3", fc, $(x(i)("Delete files")), 1), - u("div", mc, [ - u("p", gc, $(x(i)("Are you sure you want to delete these files?")), 1), - (y(!0), S(ue, null, ke(a.value, (h) => (y(), S("p", pc, [ - h.type == "dir" ? (y(), S("svg", vc, yc)) : (y(), S("svg", wc, _c)), - u("span", kc, $(h.basename), 1) + u("div", Hl, [ + Bl, + u("div", Ul, [ + u("h3", Kl, M(_(a)("Delete files")), 1), + u("div", Yl, [ + u("p", Wl, M(_(a)("Are you sure you want to delete these files?")), 1), + (S(!0), D(ae, null, _e(n.value, (p) => (S(), D("p", Xl, [ + p.type == "dir" ? (S(), D("svg", Zl, Fl)) : (S(), D("svg", Gl, Ql)), + u("span", ec, M(p.basename), 1) ]))), 256)), - n.value.length ? (y(), J(Oe, { + l.value.length ? (S(), F(Oe, { key: 0, - onHidden: f[0] || (f[0] = (h) => n.value = ""), + onHidden: m[0] || (m[0] = (p) => l.value = ""), error: "" }, { default: q(() => [ - ie($(n.value), 1) + re(M(l.value), 1) ]), _: 1 - })) : X("", !0) + })) : Z("", !0) ]) ]) ]) @@ -3286,7 +3564,7 @@ const Jl = { class: "vuefinder" }, Zl = /* @__PURE__ */ u("iframe", { _: 1 })); } -}), Mc = { class: "sm:flex sm:items-start" }, $c = /* @__PURE__ */ u("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" }, [ +}), oc = { class: "sm:flex sm:items-start" }, nc = /* @__PURE__ */ u("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__ */ u("svg", { xmlns: "http://www.w3.org/2000/svg", class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100", @@ -3301,34 +3579,34 @@ const Jl = { class: "vuefinder" }, Zl = /* @__PURE__ */ u("iframe", { d: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }) ]) -], -1), Ec = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Tc = { +], -1), ic = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, ac = { class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400", id: "modal-title" -}, Ac = { class: "mt-2" }, Oc = { class: "text-sm text-gray-500" }, Ic = { +}, lc = { class: "mt-2" }, cc = { class: "text-sm text-gray-500" }, dc = { name: "VFModalMessage" -}, Lc = /* @__PURE__ */ Object.assign(Ic, { +}, uc = /* @__PURE__ */ Object.assign(dc, { props: { selection: Object }, setup(t) { - const e = j("emitter"), { t: r } = j("i18n"); - return (o, i) => (y(), J(Ae, null, { + const e = P("emitter"), { t: r } = P("i18n"); + return (o, a) => (S(), F(Le, null, { buttons: q(() => [ u("button", { type: "button", - onClick: i[0] || (i[0] = (a) => x(e).emit("vf-modal-close")), + onClick: a[0] || (a[0] = (n) => _(e).emit("vf-modal-close")), class: "mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm" - }, $(x(r)("Close")), 1) + }, M(_(r)("Close")), 1) ]), default: q(() => { - var a, n, m, g; + var n, l; return [ - u("div", Mc, [ - $c, - u("div", Ec, [ - u("h3", Tc, $((n = (a = t.selection) == null ? void 0 : a.title) != null ? n : "Title"), 1), - u("div", Ac, [ - u("p", Oc, $((g = (m = t.selection) == null ? void 0 : m.message) != null ? g : "Message") + ".", 1) + u("div", oc, [ + nc, + u("div", ic, [ + u("h3", ac, M(((n = t.selection) == null ? void 0 : n.title) ?? "Title"), 1), + u("div", lc, [ + u("p", cc, M(((l = t.selection) == null ? void 0 : l.message) ?? "Message") + ".", 1) ]) ]) ]) @@ -3337,7 +3615,7 @@ const Jl = { class: "vuefinder" }, Zl = /* @__PURE__ */ u("iframe", { _: 1 })); } -}), Pc = { class: "sm:flex sm:items-start" }, Nc = /* @__PURE__ */ u("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" }, [ +}), hc = { class: "sm:flex sm:items-start" }, fc = /* @__PURE__ */ u("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__ */ u("svg", { xmlns: "http://www.w3.org/2000/svg", class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100", @@ -3352,74 +3630,74 @@ const Jl = { class: "vuefinder" }, Zl = /* @__PURE__ */ u("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), jc = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, zc = { +], -1), pc = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, gc = { class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400", id: "modal-title" -}, Vc = { class: "mt-2" }, Rc = { class: "text-sm text-gray-500" }, Bc = ["onKeyup", "placeholder"], Hc = { +}, mc = { class: "mt-2" }, vc = { class: "text-sm text-gray-500" }, bc = ["onKeyup", "placeholder"], yc = { name: "VFModalNewFolder" -}, Uc = /* @__PURE__ */ Object.assign(Hc, { +}, wc = /* @__PURE__ */ Object.assign(yc, { props: { selection: Object, current: Object }, setup(t) { - const e = t, r = j("emitter"); - j("storage"); - const o = j("adapter"), { t: i } = j("i18n"), a = L(""), n = L(""), m = () => { - a.value != "" && r.emit("vf-fetch", { + const e = t, r = P("emitter"); + P("storage"); + const o = P("adapter"), { t: a } = P("i18n"), n = L(""), l = L(""), h = () => { + n.value != "" && r.emit("vf-fetch", { params: { q: "newfolder", adapter: o.value, path: e.current.dirname, - name: a.value + name: n.value }, onSuccess: () => { - r.emit("vf-toast-push", { label: i("%s is created.", a.value) }); + r.emit("vf-toast-push", { label: a("%s is created.", n.value) }); }, - onError: (g) => { - n.value = i(g.message); + onError: (v) => { + l.value = a(v.message); } }); }; - return (g, f) => (y(), J(Ae, null, { + return (v, m) => (S(), F(Le, null, { buttons: q(() => [ u("button", { type: "button", - onClick: m, + onClick: h, class: "w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 dark:bg-gray-700 dark:hover:bg-gray-600/75 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm" - }, $(x(i)("Create")), 1), + }, M(_(a)("Create")), 1), u("button", { type: "button", - onClick: f[2] || (f[2] = (h) => x(r).emit("vf-modal-close")), + onClick: m[2] || (m[2] = (p) => _(r).emit("vf-modal-close")), class: "mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm" - }, $(x(i)("Cancel")), 1) + }, M(_(a)("Cancel")), 1) ]), default: q(() => [ - u("div", Pc, [ - Nc, - u("div", jc, [ - u("h3", zc, $(x(i)("New Folder")), 1), - u("div", Vc, [ - u("p", Rc, $(x(i)("Create a new folder")), 1), - _e(u("input", { - "onUpdate:modelValue": f[0] || (f[0] = (h) => a.value = h), - onKeyup: st(m, ["enter"]), + u("div", hc, [ + fc, + u("div", pc, [ + u("h3", gc, M(_(a)("New Folder")), 1), + u("div", mc, [ + u("p", vc, M(_(a)("Create a new folder")), 1), + Se(u("input", { + "onUpdate:modelValue": m[0] || (m[0] = (p) => n.value = p), + onKeyup: ot(h, ["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: x(i)("Folder Name"), + placeholder: _(a)("Folder Name"), type: "text" - }, null, 40, Bc), [ - [it, a.value] + }, null, 40, bc), [ + [nt, n.value] ]), - n.value.length ? (y(), J(Oe, { + l.value.length ? (S(), F(Oe, { key: 0, - onHidden: f[1] || (f[1] = (h) => n.value = ""), + onHidden: m[1] || (m[1] = (p) => l.value = ""), error: "" }, { default: q(() => [ - ie($(n.value), 1) + re(M(l.value), 1) ]), _: 1 - })) : X("", !0) + })) : Z("", !0) ]) ]) ]) @@ -3427,7 +3705,7 @@ const Jl = { class: "vuefinder" }, Zl = /* @__PURE__ */ u("iframe", { _: 1 })); } -}), Kc = { class: "sm:flex sm:items-start" }, Fc = /* @__PURE__ */ u("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" }, [ +}), Sc = { class: "sm:flex sm:items-start" }, _c = /* @__PURE__ */ u("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__ */ u("svg", { xmlns: "http://www.w3.org/2000/svg", class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100", @@ -3442,74 +3720,74 @@ const Jl = { class: "vuefinder" }, Zl = /* @__PURE__ */ u("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), Yc = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Wc = { +], -1), xc = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, kc = { class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400", id: "modal-title" -}, Xc = { class: "mt-2" }, qc = { class: "text-sm text-gray-500" }, Gc = ["onKeyup", "placeholder"], Jc = { +}, Dc = { class: "mt-2" }, Cc = { class: "text-sm text-gray-500" }, Mc = ["onKeyup", "placeholder"], Ec = { name: "VFModalNewFile" -}, Zc = /* @__PURE__ */ Object.assign(Jc, { +}, $c = /* @__PURE__ */ Object.assign(Ec, { props: { selection: Object, current: Object }, setup(t) { - const e = t, r = j("emitter"); - j("storage"); - const o = j("adapter"), { t: i } = j("i18n"), a = L(""), n = L(""), m = () => { - a.value != "" && r.emit("vf-fetch", { + const e = t, r = P("emitter"); + P("storage"); + const o = P("adapter"), { t: a } = P("i18n"), n = L(""), l = L(""), h = () => { + n.value != "" && r.emit("vf-fetch", { params: { q: "newfile", adapter: o.value, path: e.current.dirname, - name: a.value + name: n.value }, onSuccess: () => { - r.emit("vf-toast-push", { label: i("%s is created.", a.value) }); + r.emit("vf-toast-push", { label: a("%s is created.", n.value) }); }, - onError: (g) => { - n.value = i(g.message); + onError: (v) => { + l.value = a(v.message); } }); }; - return (g, f) => (y(), J(Ae, null, { + return (v, m) => (S(), F(Le, null, { buttons: q(() => [ u("button", { type: "button", - onClick: m, + onClick: h, class: "w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 dark:bg-gray-700 dark:hover:bg-gray-600/75 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm" - }, $(x(i)("Create")), 1), + }, M(_(a)("Create")), 1), u("button", { type: "button", - onClick: f[2] || (f[2] = (h) => x(r).emit("vf-modal-close")), + onClick: m[2] || (m[2] = (p) => _(r).emit("vf-modal-close")), class: "mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm" - }, $(x(i)("Cancel")), 1) + }, M(_(a)("Cancel")), 1) ]), default: q(() => [ - u("div", Kc, [ - Fc, - u("div", Yc, [ - u("h3", Wc, $(x(i)("New File")), 1), - u("div", Xc, [ - u("p", qc, $(x(i)("Create a new file")), 1), - _e(u("input", { - "onUpdate:modelValue": f[0] || (f[0] = (h) => a.value = h), - onKeyup: st(m, ["enter"]), + u("div", Sc, [ + _c, + u("div", xc, [ + u("h3", kc, M(_(a)("New File")), 1), + u("div", Dc, [ + u("p", Cc, M(_(a)("Create a new file")), 1), + Se(u("input", { + "onUpdate:modelValue": m[0] || (m[0] = (p) => n.value = p), + onKeyup: ot(h, ["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: x(i)("File Name"), + placeholder: _(a)("File Name"), type: "text" - }, null, 40, Gc), [ - [it, a.value] + }, null, 40, Mc), [ + [nt, n.value] ]), - n.value.length ? (y(), J(Oe, { + l.value.length ? (S(), F(Oe, { key: 0, - onHidden: f[1] || (f[1] = (h) => n.value = ""), + onHidden: m[1] || (m[1] = (p) => l.value = ""), error: "" }, { default: q(() => [ - ie($(n.value), 1) + re(M(l.value), 1) ]), _: 1 - })) : X("", !0) + })) : Z("", !0) ]) ]) ]) @@ -3517,146 +3795,148 @@ const Jl = { class: "vuefinder" }, Zl = /* @__PURE__ */ u("iframe", { _: 1 })); } -}), Qc = { class: "flex" }, eu = ["aria-label"], tu = { class: "ml-auto mb-2" }, ru = { +}), Tc = { class: "flex" }, Ac = ["aria-label"], Ic = { class: "ml-auto mb-2" }, Lc = { 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" -}, ou = { key: 1 }, au = { +}, Oc = { key: 1 }, Pc = { __name: "Text", props: { selection: Object }, emits: ["load"], setup(t, { emit: e }) { - const r = t, o = L(""), i = L(""), a = L(null), n = L(!1), { apiUrl: m } = Te(), g = L(""), f = L(!1), { t: h } = j("i18n"); - Ce(() => { - Tt(m.value, { + const r = t, o = L(""), a = L(""), n = L(null), l = L(!1), { apiUrl: h } = Ie(), v = L(""), m = L(!1), { t: p } = P("i18n"); + Me(() => { + Ot(h.value, { params: { q: "preview", adapter: r.selection.adapter, path: r.selection.item.path }, json: !1 - }).then((D) => { - o.value = D, e("load"); + }).then((C) => { + o.value = C, e("load"); }); }); - const p = () => { - n.value = !n.value, i.value = o.value, n.value == !0 && Lt(() => { - a.value.focus(); + const b = () => { + l.value = !l.value, a.value = o.value, l.value == !0 && zt(() => { + n.value.focus(); }); - }, b = j("postData"), E = () => { - g.value = "", f.value = !1, Tt(m.value, { + }, w = P("postData"), E = () => { + v.value = "", m.value = !1, Ot(h.value, { method: "POST", - params: Object.assign(b, { + params: Object.assign(w, { q: "save", adapter: r.selection.adapter, path: r.selection.item.path, - content: i.value + content: a.value }), json: !1 - }).then((D) => { - g.value = h("Updated."), o.value = D, e("load"), n.value = !n.value; - }).catch((D) => { - g.value = h(D.message), f.value = !0; + }).then((C) => { + v.value = p("Updated."), o.value = C, e("load"), l.value = !l.value; + }).catch((C) => { + v.value = p(C.message), m.value = !0; }); }; - return (D, T) => (y(), S(ue, null, [ - u("div", Qc, [ + return (C, A) => (S(), D(ae, null, [ + u("div", Tc, [ u("div", { class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400", id: "modal-title", "aria-label": t.selection.item.path, "data-microtip-position": "bottom-right", role: "tooltip" - }, $(t.selection.item.basename), 9, eu), - u("div", tu, [ - n.value ? (y(), S("button", { + }, M(t.selection.item.basename), 9, Ac), + u("div", Ic, [ + l.value ? (S(), D("button", { key: 0, onClick: E, 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" - }, $(x(h)("Save")), 1)) : X("", !0), + }, M(_(p)("Save")), 1)) : Z("", !0), u("button", { class: "ml-1 px-2 py-1 text-blue-500", - onClick: T[0] || (T[0] = (I) => p()) - }, $(n.value ? x(h)("Cancel") : x(h)("Edit")), 1) + onClick: A[0] || (A[0] = (I) => b()) + }, M(l.value ? _(p)("Cancel") : _(p)("Edit")), 1) ]) ]), u("div", null, [ - n.value ? (y(), S("div", ou, [ - _e(u("textarea", { + l.value ? (S(), D("div", Oc, [ + Se(u("textarea", { ref_key: "editInput", - ref: a, - "onUpdate:modelValue": T[1] || (T[1] = (I) => i.value = I), + ref: n, + "onUpdate:modelValue": A[1] || (A[1] = (I) => a.value = I), 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), [ - [it, i.value] + [nt, a.value] ]) - ])) : (y(), S("pre", ru, $(o.value), 1)), - g.value.length ? (y(), J(Oe, { + ])) : (S(), D("pre", Lc, M(o.value), 1)), + v.value.length ? (S(), F(Oe, { key: 2, - onHidden: T[2] || (T[2] = (I) => g.value = ""), - error: f.value + onHidden: A[2] || (A[2] = (I) => v.value = ""), + error: m.value }, { default: q(() => [ - ie($(g.value), 1) + re(M(v.value), 1) ]), _: 1 - }, 8, ["error"])) : X("", !0) + }, 8, ["error"])) : Z("", !0) ]) ], 64)); } }; /*! - * Cropper.js v1.5.12 + * Cropper.js v1.5.13 * https://fengyuanchen.github.io/cropperjs * * Copyright 2015-present Chen Fengyuan * Released under the MIT license * - * Date: 2021-06-12T08:00:17.411Z + * Date: 2022-11-20T05:30:46.114Z */ -function Xr(t, e) { +function Nr(t, e) { var r = Object.keys(t); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(t); - e && (o = o.filter(function(i) { - return Object.getOwnPropertyDescriptor(t, i).enumerable; + e && (o = o.filter(function(a) { + return Object.getOwnPropertyDescriptor(t, a).enumerable; })), r.push.apply(r, o); } return r; } -function Fo(t) { +function Is(t) { for (var e = 1; e < arguments.length; e++) { var r = arguments[e] != null ? arguments[e] : {}; - e % 2 ? Xr(Object(r), !0).forEach(function(o) { - nu(t, o, r[o]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : Xr(Object(r)).forEach(function(o) { + e % 2 ? Nr(Object(r), !0).forEach(function(o) { + zc(t, o, r[o]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : Nr(Object(r)).forEach(function(o) { Object.defineProperty(t, o, Object.getOwnPropertyDescriptor(r, o)); }); } return t; } -function Mt(t) { - return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Mt = function(e) { +function Jt(t) { + return Jt = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) { return typeof e; - } : Mt = function(e) { + } : function(e) { return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; - }, Mt(t); + }, Jt(t); } -function su(t, e) { +function Nc(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); } -function qr(t, e) { +function jr(t, e) { for (var r = 0; r < e.length; r++) { var o = e[r]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o); } } -function iu(t, e, r) { - return e && qr(t.prototype, e), r && qr(t, r), t; +function jc(t, e, r) { + return e && jr(t.prototype, e), r && jr(t, r), Object.defineProperty(t, "prototype", { + writable: !1 + }), t; } -function nu(t, e, r) { +function zc(t, e, r) { return e in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, @@ -3664,41 +3944,41 @@ function nu(t, e, r) { writable: !0 }) : t[e] = r, t; } -function Yo(t) { - return lu(t) || cu(t) || uu(t) || du(); +function Ls(t) { + return Vc(t) || Rc(t) || Hc(t) || Bc(); } -function lu(t) { +function Vc(t) { if (Array.isArray(t)) - return Gt(t); + return Qt(t); } -function cu(t) { +function Rc(t) { if (typeof Symbol < "u" && t[Symbol.iterator] != null || t["@@iterator"] != null) return Array.from(t); } -function uu(t, e) { - if (!!t) { +function Hc(t, e) { + if (t) { if (typeof t == "string") - return Gt(t, e); + return Qt(t, e); var r = Object.prototype.toString.call(t).slice(8, -1); if (r === "Object" && t.constructor && (r = t.constructor.name), r === "Map" || r === "Set") return Array.from(t); if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) - return Gt(t, e); + return Qt(t, e); } } -function Gt(t, e) { +function Qt(t, e) { (e == null || e > t.length) && (e = t.length); for (var r = 0, o = new Array(e); r < e; r++) o[r] = t[r]; return o; } -function du() { +function Bc() { throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); } -var Vt = typeof window < "u" && typeof window.document < "u", Ee = Vt ? window : {}, pr = Vt && Ee.document.documentElement ? "ontouchstart" in Ee.document.documentElement : !1, vr = Vt ? "PointerEvent" in Ee : !1, ee = "cropper", br = "all", Wo = "crop", Xo = "move", qo = "zoom", He = "e", Ue = "w", Qe = "s", Pe = "n", ut = "ne", dt = "nw", ht = "se", ft = "sw", Jt = "".concat(ee, "-crop"), Gr = "".concat(ee, "-disabled"), pe = "".concat(ee, "-hidden"), Jr = "".concat(ee, "-hide"), hu = "".concat(ee, "-invisible"), Ot = "".concat(ee, "-modal"), Zt = "".concat(ee, "-move"), pt = "".concat(ee, "Action"), Dt = "".concat(ee, "Preview"), yr = "crop", Go = "move", Jo = "none", Qt = "crop", er = "cropend", tr = "cropmove", rr = "cropstart", Zr = "dblclick", fu = pr ? "touchstart" : "mousedown", mu = pr ? "touchmove" : "mousemove", gu = pr ? "touchend touchcancel" : "mouseup", Qr = vr ? "pointerdown" : fu, eo = vr ? "pointermove" : mu, to = vr ? "pointerup pointercancel" : gu, ro = "ready", oo = "resize", ao = "wheel", or = "zoom", so = "image/jpeg", pu = /^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/, vu = /^data:/, bu = /^data:image\/jpeg;base64,/, yu = /^img|canvas$/i, Zo = 200, Qo = 100, io = { +var Ut = typeof window < "u" && typeof window.document < "u", Ae = Ut ? window : {}, yr = Ut && Ae.document.documentElement ? "ontouchstart" in Ae.document.documentElement : !1, wr = Ut ? "PointerEvent" in Ae : !1, J = "cropper", Sr = "all", Os = "crop", Ps = "move", Ns = "zoom", Ye = "e", We = "w", Je = "s", Ne = "n", pt = "ne", gt = "nw", mt = "se", vt = "sw", er = "".concat(J, "-crop"), zr = "".concat(J, "-disabled"), he = "".concat(J, "-hidden"), Vr = "".concat(J, "-hide"), Uc = "".concat(J, "-invisible"), Nt = "".concat(J, "-modal"), tr = "".concat(J, "-move"), wt = "".concat(J, "Action"), Tt = "".concat(J, "Preview"), _r = "crop", js = "move", zs = "none", rr = "crop", sr = "cropend", or = "cropmove", nr = "cropstart", Rr = "dblclick", Kc = yr ? "touchstart" : "mousedown", Yc = yr ? "touchmove" : "mousemove", Wc = yr ? "touchend touchcancel" : "mouseup", Hr = wr ? "pointerdown" : Kc, Br = wr ? "pointermove" : Yc, Ur = wr ? "pointerup pointercancel" : Wc, Kr = "ready", Yr = "resize", Wr = "wheel", ir = "zoom", Xr = "image/jpeg", Xc = /^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/, Zc = /^data:/, qc = /^data:image\/jpeg;base64,/, Fc = /^img|canvas$/i, Vs = 200, Rs = 100, Zr = { viewMode: 0, - dragMode: yr, + dragMode: _r, initialAspectRatio: NaN, aspectRatio: NaN, data: null, @@ -3728,80 +4008,80 @@ var Vt = typeof window < "u" && typeof window.document < "u", Ee = Vt ? window : minCanvasHeight: 0, minCropBoxWidth: 0, minCropBoxHeight: 0, - minContainerWidth: Zo, - minContainerHeight: Qo, + minContainerWidth: Vs, + minContainerHeight: Rs, ready: null, cropstart: null, cropmove: null, cropend: null, crop: null, zoom: null -}, wu = '
', xu = Number.isNaN || Ee.isNaN; +}, Gc = '
', Jc = Number.isNaN || Ae.isNaN; function Y(t) { - return typeof t == "number" && !xu(t); + return typeof t == "number" && !Jc(t); } -var no = function(e) { +var qr = function(e) { return e > 0 && e < 1 / 0; }; -function Ut(t) { +function Yt(t) { return typeof t > "u"; } -function Ye(t) { - return Mt(t) === "object" && t !== null; +function qe(t) { + return Jt(t) === "object" && t !== null; } -var _u = Object.prototype.hasOwnProperty; -function et(t) { - if (!Ye(t)) +var Qc = Object.prototype.hasOwnProperty; +function Qe(t) { + if (!qe(t)) return !1; try { var e = t.constructor, r = e.prototype; - return e && r && _u.call(r, "isPrototypeOf"); + return e && r && Qc.call(r, "isPrototypeOf"); } catch { return !1; } } -function ge(t) { +function ue(t) { return typeof t == "function"; } -var ku = Array.prototype.slice; -function ea(t) { - return Array.from ? Array.from(t) : ku.call(t); +var ed = Array.prototype.slice; +function Hs(t) { + return Array.from ? Array.from(t) : ed.call(t); } -function se(t, e) { - return t && ge(e) && (Array.isArray(t) || Y(t.length) ? ea(t).forEach(function(r, o) { +function te(t, e) { + return t && ue(e) && (Array.isArray(t) || Y(t.length) ? Hs(t).forEach(function(r, o) { e.call(t, r, o, t); - }) : Ye(t) && Object.keys(t).forEach(function(r) { + }) : qe(t) && Object.keys(t).forEach(function(r) { e.call(t, t[r], r, t); })), t; } -var te = Object.assign || function(e) { - for (var r = arguments.length, o = new Array(r > 1 ? r - 1 : 0), i = 1; i < r; i++) - o[i - 1] = arguments[i]; - return Ye(e) && o.length > 0 && o.forEach(function(a) { - Ye(a) && Object.keys(a).forEach(function(n) { - e[n] = a[n]; +var Q = Object.assign || function(e) { + for (var r = arguments.length, o = new Array(r > 1 ? r - 1 : 0), a = 1; a < r; a++) + o[a - 1] = arguments[a]; + return qe(e) && o.length > 0 && o.forEach(function(n) { + qe(n) && Object.keys(n).forEach(function(l) { + e[l] = n[l]; }); }), e; -}, Su = /\.\d*(?:0|9){12}\d*$/; -function rt(t) { +}, td = /\.\d*(?:0|9){12}\d*$/; +function tt(t) { var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1e11; - return Su.test(t) ? Math.round(t * e) / e : t; + return td.test(t) ? Math.round(t * e) / e : t; } -var Du = /^width|height|left|top|marginLeft|marginTop$/; -function Ne(t, e) { +var rd = /^width|height|left|top|marginLeft|marginTop$/; +function je(t, e) { var r = t.style; - se(e, function(o, i) { - Du.test(i) && Y(o) && (o = "".concat(o, "px")), r[i] = o; + te(e, function(o, a) { + rd.test(a) && Y(o) && (o = "".concat(o, "px")), r[a] = o; }); } -function Cu(t, e) { +function sd(t, e) { return t.classList ? t.classList.contains(e) : t.className.indexOf(e) > -1; } -function ce(t, e) { - if (!!e) { +function ie(t, e) { + if (e) { if (Y(t.length)) { - se(t, function(o) { - ce(o, e); + te(t, function(o) { + ie(o, e); }); return; } @@ -3813,11 +4093,11 @@ function ce(t, e) { r ? r.indexOf(e) < 0 && (t.className = "".concat(r, " ").concat(e)) : t.className = e; } } -function $e(t, e) { - if (!!e) { +function Te(t, e) { + if (e) { if (Y(t.length)) { - se(t, function(r) { - $e(r, e); + te(t, function(r) { + Te(r, e); }); return; } @@ -3828,29 +4108,29 @@ function $e(t, e) { t.className.indexOf(e) >= 0 && (t.className = t.className.replace(e, "")); } } -function tt(t, e, r) { - if (!!e) { +function et(t, e, r) { + if (e) { if (Y(t.length)) { - se(t, function(o) { - tt(o, e, r); + te(t, function(o) { + et(o, e, r); }); return; } - r ? ce(t, e) : $e(t, e); + r ? ie(t, e) : Te(t, e); } } -var Mu = /([a-z\d])([A-Z])/g; -function wr(t) { - return t.replace(Mu, "$1-$2").toLowerCase(); +var od = /([a-z\d])([A-Z])/g; +function xr(t) { + return t.replace(od, "$1-$2").toLowerCase(); } function ar(t, e) { - return Ye(t[e]) ? t[e] : t.dataset ? t.dataset[e] : t.getAttribute("data-".concat(wr(e))); + return qe(t[e]) ? t[e] : t.dataset ? t.dataset[e] : t.getAttribute("data-".concat(xr(e))); } -function vt(t, e, r) { - Ye(r) ? t[e] = r : t.dataset ? t.dataset[e] = r : t.setAttribute("data-".concat(wr(e)), r); +function St(t, e, r) { + qe(r) ? t[e] = r : t.dataset ? t.dataset[e] = r : t.setAttribute("data-".concat(xr(e)), r); } -function $u(t, e) { - if (Ye(t[e])) +function nd(t, e) { + if (qe(t[e])) try { delete t[e]; } catch { @@ -3863,208 +4143,208 @@ function $u(t, e) { t.dataset[e] = void 0; } else - t.removeAttribute("data-".concat(wr(e))); + t.removeAttribute("data-".concat(xr(e))); } -var ta = /\s\s*/, ra = function() { +var Bs = /\s\s*/, Us = function() { var t = !1; - if (Vt) { + if (Ut) { var e = !1, r = function() { }, o = Object.defineProperty({}, "once", { get: function() { return t = !0, e; }, - set: function(a) { - e = a; + set: function(n) { + e = n; } }); - Ee.addEventListener("test", r, o), Ee.removeEventListener("test", r, o); + Ae.addEventListener("test", r, o), Ae.removeEventListener("test", r, o); } return t; }(); -function Se(t, e, r) { - var o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, i = r; - e.trim().split(ta).forEach(function(a) { - if (!ra) { - var n = t.listeners; - n && n[a] && n[a][r] && (i = n[a][r], delete n[a][r], Object.keys(n[a]).length === 0 && delete n[a], Object.keys(n).length === 0 && delete t.listeners); +function De(t, e, r) { + var o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, a = r; + e.trim().split(Bs).forEach(function(n) { + if (!Us) { + var l = t.listeners; + l && l[n] && l[n][r] && (a = l[n][r], delete l[n][r], Object.keys(l[n]).length === 0 && delete l[n], Object.keys(l).length === 0 && delete t.listeners); } - t.removeEventListener(a, i, o); + t.removeEventListener(n, a, o); }); } -function xe(t, e, r) { - var o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, i = r; - e.trim().split(ta).forEach(function(a) { - if (o.once && !ra) { - var n = t.listeners, m = n === void 0 ? {} : n; - i = function() { - delete m[a][r], t.removeEventListener(a, i, o); - for (var f = arguments.length, h = new Array(f), p = 0; p < f; p++) - h[p] = arguments[p]; - r.apply(t, h); - }, m[a] || (m[a] = {}), m[a][r] && t.removeEventListener(a, m[a][r], o), m[a][r] = i, t.listeners = m; +function we(t, e, r) { + var o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, a = r; + e.trim().split(Bs).forEach(function(n) { + if (o.once && !Us) { + var l = t.listeners, h = l === void 0 ? {} : l; + a = function() { + delete h[n][r], t.removeEventListener(n, a, o); + for (var m = arguments.length, p = new Array(m), b = 0; b < m; b++) + p[b] = arguments[b]; + r.apply(t, p); + }, h[n] || (h[n] = {}), h[n][r] && t.removeEventListener(n, h[n][r], o), h[n][r] = a, t.listeners = h; } - t.addEventListener(a, i, o); + t.addEventListener(n, a, o); }); } -function ot(t, e, r) { +function rt(t, e, r) { var o; - return ge(Event) && ge(CustomEvent) ? o = new CustomEvent(e, { + return ue(Event) && ue(CustomEvent) ? o = new CustomEvent(e, { detail: r, bubbles: !0, cancelable: !0 }) : (o = document.createEvent("CustomEvent"), o.initCustomEvent(e, !0, !0, r)), t.dispatchEvent(o); } -function oa(t) { +function Ks(t) { var e = t.getBoundingClientRect(); return { left: e.left + (window.pageXOffset - document.documentElement.clientLeft), top: e.top + (window.pageYOffset - document.documentElement.clientTop) }; } -var Kt = Ee.location, Eu = /^(\w+:)\/\/([^:/?#]*):?(\d*)/i; -function lo(t) { - var e = t.match(Eu); - return e !== null && (e[1] !== Kt.protocol || e[2] !== Kt.hostname || e[3] !== Kt.port); +var Wt = Ae.location, id = /^(\w+:)\/\/([^:/?#]*):?(\d*)/i; +function Fr(t) { + var e = t.match(id); + return e !== null && (e[1] !== Wt.protocol || e[2] !== Wt.hostname || e[3] !== Wt.port); } -function co(t) { +function Gr(t) { var e = "timestamp=".concat(new Date().getTime()); return t + (t.indexOf("?") === -1 ? "?" : "&") + e; } -function mt(t) { - var e = t.rotate, r = t.scaleX, o = t.scaleY, i = t.translateX, a = t.translateY, n = []; - Y(i) && i !== 0 && n.push("translateX(".concat(i, "px)")), Y(a) && a !== 0 && n.push("translateY(".concat(a, "px)")), Y(e) && e !== 0 && n.push("rotate(".concat(e, "deg)")), Y(r) && r !== 1 && n.push("scaleX(".concat(r, ")")), Y(o) && o !== 1 && n.push("scaleY(".concat(o, ")")); - var m = n.length ? n.join(" ") : "none"; +function bt(t) { + var e = t.rotate, r = t.scaleX, o = t.scaleY, a = t.translateX, n = t.translateY, l = []; + Y(a) && a !== 0 && l.push("translateX(".concat(a, "px)")), Y(n) && n !== 0 && l.push("translateY(".concat(n, "px)")), Y(e) && e !== 0 && l.push("rotate(".concat(e, "deg)")), Y(r) && r !== 1 && l.push("scaleX(".concat(r, ")")), Y(o) && o !== 1 && l.push("scaleY(".concat(o, ")")); + var h = l.length ? l.join(" ") : "none"; return { - WebkitTransform: m, - msTransform: m, - transform: m + WebkitTransform: h, + msTransform: h, + transform: h }; } -function Tu(t) { - var e = Fo({}, t), r = 0; - return se(t, function(o, i) { - delete e[i], se(e, function(a) { - var n = Math.abs(o.startX - a.startX), m = Math.abs(o.startY - a.startY), g = Math.abs(o.endX - a.endX), f = Math.abs(o.endY - a.endY), h = Math.sqrt(n * n + m * m), p = Math.sqrt(g * g + f * f), b = (p - h) / h; - Math.abs(b) > Math.abs(r) && (r = b); +function ad(t) { + var e = Is({}, t), r = 0; + return te(t, function(o, a) { + delete e[a], te(e, function(n) { + var l = Math.abs(o.startX - n.startX), h = Math.abs(o.startY - n.startY), v = Math.abs(o.endX - n.endX), m = Math.abs(o.endY - n.endY), p = Math.sqrt(l * l + h * h), b = Math.sqrt(v * v + m * m), w = (b - p) / p; + Math.abs(w) > Math.abs(r) && (r = w); }); }), r; } -function Ct(t, e) { - var r = t.pageX, o = t.pageY, i = { +function At(t, e) { + var r = t.pageX, o = t.pageY, a = { endX: r, endY: o }; - return e ? i : Fo({ + return e ? a : Is({ startX: r, startY: o - }, i); + }, a); } -function Au(t) { +function ld(t) { var e = 0, r = 0, o = 0; - return se(t, function(i) { - var a = i.startX, n = i.startY; - e += a, r += n, o += 1; + return te(t, function(a) { + var n = a.startX, l = a.startY; + e += n, r += l, o += 1; }), e /= o, r /= o, { pageX: e, pageY: r }; } -function je(t) { - var e = t.aspectRatio, r = t.height, o = t.width, i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "contain", a = no(o), n = no(r); - if (a && n) { - var m = r * e; - i === "contain" && m > o || i === "cover" && m < o ? r = o / e : o = r * e; +function ze(t) { + var e = t.aspectRatio, r = t.height, o = t.width, a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "contain", n = qr(o), l = qr(r); + if (n && l) { + var h = r * e; + a === "contain" && h > o || a === "cover" && h < o ? r = o / e : o = r * e; } else - a ? r = o / e : n && (o = r * e); + n ? r = o / e : l && (o = r * e); return { width: o, height: r }; } -function Ou(t) { +function cd(t) { var e = t.width, r = t.height, o = t.degree; if (o = Math.abs(o) % 180, o === 90) return { width: r, height: e }; - var i = o % 90 * Math.PI / 180, a = Math.sin(i), n = Math.cos(i), m = e * n + r * a, g = e * a + r * n; + var a = o % 90 * Math.PI / 180, n = Math.sin(a), l = Math.cos(a), h = e * l + r * n, v = e * n + r * l; return o > 90 ? { - width: g, - height: m + width: v, + height: h } : { - width: m, - height: g + width: h, + height: v }; } -function Iu(t, e, r, o) { - var i = e.aspectRatio, a = e.naturalWidth, n = e.naturalHeight, m = e.rotate, g = m === void 0 ? 0 : m, f = e.scaleX, h = f === void 0 ? 1 : f, p = e.scaleY, b = p === void 0 ? 1 : p, E = r.aspectRatio, D = r.naturalWidth, T = r.naturalHeight, I = o.fillColor, U = I === void 0 ? "transparent" : I, H = o.imageSmoothingEnabled, N = H === void 0 ? !0 : H, W = o.imageSmoothingQuality, K = W === void 0 ? "low" : W, C = o.maxWidth, V = C === void 0 ? 1 / 0 : C, Q = o.maxHeight, ne = Q === void 0 ? 1 / 0 : Q, le = o.minWidth, fe = le === void 0 ? 0 : le, we = o.minHeight, be = we === void 0 ? 0 : we, Z = document.createElement("canvas"), O = Z.getContext("2d"), B = je({ +function dd(t, e, r, o) { + var a = e.aspectRatio, n = e.naturalWidth, l = e.naturalHeight, h = e.rotate, v = h === void 0 ? 0 : h, m = e.scaleX, p = m === void 0 ? 1 : m, b = e.scaleY, w = b === void 0 ? 1 : b, E = r.aspectRatio, C = r.naturalWidth, A = r.naturalHeight, I = o.fillColor, R = I === void 0 ? "transparent" : I, V = o.imageSmoothingEnabled, O = V === void 0 ? !0 : V, K = o.imageSmoothingQuality, B = K === void 0 ? "low" : K, $ = o.maxWidth, j = $ === void 0 ? 1 / 0 : $, G = o.maxHeight, se = G === void 0 ? 1 / 0 : G, ee = o.minWidth, de = ee === void 0 ? 0 : ee, ve = o.minHeight, pe = ve === void 0 ? 0 : ve, ge = document.createElement("canvas"), T = ge.getContext("2d"), z = ze({ aspectRatio: E, - width: V, - height: ne - }), z = je({ + width: j, + height: se + }), N = ze({ aspectRatio: E, - width: fe, - height: be - }, "cover"), de = Math.min(B.width, Math.max(z.width, D)), G = Math.min(B.height, Math.max(z.height, T)), me = je({ - aspectRatio: i, - width: V, - height: ne - }), re = je({ - aspectRatio: i, - width: fe, - height: be - }, "cover"), xt = Math.min(me.width, Math.max(re.width, a)), qe = Math.min(me.height, Math.max(re.height, n)), Rt = [-xt / 2, -qe / 2, xt, qe]; - return Z.width = rt(de), Z.height = rt(G), O.fillStyle = U, O.fillRect(0, 0, de, G), O.save(), O.translate(de / 2, G / 2), O.rotate(g * Math.PI / 180), O.scale(h, b), O.imageSmoothingEnabled = N, O.imageSmoothingQuality = K, O.drawImage.apply(O, [t].concat(Yo(Rt.map(function(Ge) { - return Math.floor(rt(Ge)); - })))), O.restore(), Z; + width: de, + height: pe + }, "cover"), le = Math.min(z.width, Math.max(N.width, C)), U = Math.min(z.height, Math.max(N.height, A)), xe = ze({ + aspectRatio: a, + width: j, + height: se + }), ke = ze({ + aspectRatio: a, + width: de, + height: pe + }, "cover"), Dt = Math.min(xe.width, Math.max(ke.width, n)), at = Math.min(xe.height, Math.max(ke.height, l)), lt = [-Dt / 2, -at / 2, Dt, at]; + return ge.width = tt(le), ge.height = tt(U), T.fillStyle = R, T.fillRect(0, 0, le, U), T.save(), T.translate(le / 2, U / 2), T.rotate(v * Math.PI / 180), T.scale(p, w), T.imageSmoothingEnabled = O, T.imageSmoothingQuality = B, T.drawImage.apply(T, [t].concat(Ls(lt.map(function(Ct) { + return Math.floor(tt(Ct)); + })))), T.restore(), ge; } -var aa = String.fromCharCode; -function Lu(t, e, r) { +var Ys = String.fromCharCode; +function ud(t, e, r) { var o = ""; r += e; - for (var i = e; i < r; i += 1) - o += aa(t.getUint8(i)); + for (var a = e; a < r; a += 1) + o += Ys(t.getUint8(a)); return o; } -var Pu = /^data:.*,/; -function Nu(t) { - var e = t.replace(Pu, ""), r = atob(e), o = new ArrayBuffer(r.length), i = new Uint8Array(o); - return se(i, function(a, n) { - i[n] = r.charCodeAt(n); +var hd = /^data:.*,/; +function fd(t) { + var e = t.replace(hd, ""), r = atob(e), o = new ArrayBuffer(r.length), a = new Uint8Array(o); + return te(a, function(n, l) { + a[l] = r.charCodeAt(l); }), o; } -function ju(t, e) { - for (var r = [], o = 8192, i = new Uint8Array(t); i.length > 0; ) - r.push(aa.apply(null, ea(i.subarray(0, o)))), i = i.subarray(o); +function pd(t, e) { + for (var r = [], o = 8192, a = new Uint8Array(t); a.length > 0; ) + r.push(Ys.apply(null, Hs(a.subarray(0, o)))), a = a.subarray(o); return "data:".concat(e, ";base64,").concat(btoa(r.join(""))); } -function zu(t) { +function gd(t) { var e = new DataView(t), r; try { - var o, i, a; + var o, a, n; if (e.getUint8(0) === 255 && e.getUint8(1) === 216) - for (var n = e.byteLength, m = 2; m + 1 < n; ) { - if (e.getUint8(m) === 255 && e.getUint8(m + 1) === 225) { - i = m; + for (var l = e.byteLength, h = 2; h + 1 < l; ) { + if (e.getUint8(h) === 255 && e.getUint8(h + 1) === 225) { + a = h; break; } - m += 1; + h += 1; } - if (i) { - var g = i + 4, f = i + 10; - if (Lu(e, g, 4) === "Exif") { - var h = e.getUint16(f); - if (o = h === 18761, (o || h === 19789) && e.getUint16(f + 2, o) === 42) { - var p = e.getUint32(f + 4, o); - p >= 8 && (a = f + p); + if (a) { + var v = a + 4, m = a + 10; + if (ud(e, v, 4) === "Exif") { + var p = e.getUint16(m); + if (o = p === 18761, (o || p === 19789) && e.getUint16(m + 2, o) === 42) { + var b = e.getUint32(m + 4, o); + b >= 8 && (n = m + b); } } } - if (a) { - var b = e.getUint16(a, o), E, D; - for (D = 0; D < b; D += 1) - if (E = a + D * 12 + 2, e.getUint16(E, o) === 274) { + if (n) { + var w = e.getUint16(n, o), E, C; + for (C = 0; C < w; C += 1) + if (E = n + C * 12 + 2, e.getUint16(E, o) === 274) { E += 8, r = e.getUint16(E, o), e.setUint16(E, 1, o); break; } @@ -4074,7 +4354,7 @@ function zu(t) { } return r; } -function Vu(t) { +function md(t) { var e = 0, r = 1, o = 1; switch (t) { case 2: @@ -4105,412 +4385,412 @@ function Vu(t) { scaleY: o }; } -var Ru = { +var vd = { render: function() { this.initContainer(), this.initCanvas(), this.initCropBox(), this.renderCanvas(), this.cropped && this.renderCropBox(); }, initContainer: function() { - var e = this.element, r = this.options, o = this.container, i = this.cropper, a = Number(r.minContainerWidth), n = Number(r.minContainerHeight); - ce(i, pe), $e(e, pe); - var m = { - width: Math.max(o.offsetWidth, a >= 0 ? a : Zo), - height: Math.max(o.offsetHeight, n >= 0 ? n : Qo) + var e = this.element, r = this.options, o = this.container, a = this.cropper, n = Number(r.minContainerWidth), l = Number(r.minContainerHeight); + ie(a, he), Te(e, he); + var h = { + width: Math.max(o.offsetWidth, n >= 0 ? n : Vs), + height: Math.max(o.offsetHeight, l >= 0 ? l : Rs) }; - this.containerData = m, Ne(i, { - width: m.width, - height: m.height - }), ce(e, pe), $e(i, pe); + this.containerData = h, je(a, { + width: h.width, + height: h.height + }), ie(e, he), Te(a, he); }, initCanvas: function() { - var e = this.containerData, r = this.imageData, o = this.options.viewMode, i = Math.abs(r.rotate) % 180 === 90, a = i ? r.naturalHeight : r.naturalWidth, n = i ? r.naturalWidth : r.naturalHeight, m = a / n, g = e.width, f = e.height; - e.height * m > e.width ? o === 3 ? g = e.height * m : f = e.width / m : o === 3 ? f = e.width / m : g = e.height * m; - var h = { - aspectRatio: m, - naturalWidth: a, - naturalHeight: n, - width: g, - height: f + var e = this.containerData, r = this.imageData, o = this.options.viewMode, a = Math.abs(r.rotate) % 180 === 90, n = a ? r.naturalHeight : r.naturalWidth, l = a ? r.naturalWidth : r.naturalHeight, h = n / l, v = e.width, m = e.height; + e.height * h > e.width ? o === 3 ? v = e.height * h : m = e.width / h : o === 3 ? m = e.width / h : v = e.height * h; + var p = { + aspectRatio: h, + naturalWidth: n, + naturalHeight: l, + width: v, + height: m }; - this.canvasData = h, this.limited = o === 1 || o === 2, this.limitCanvas(!0, !0), h.width = Math.min(Math.max(h.width, h.minWidth), h.maxWidth), h.height = Math.min(Math.max(h.height, h.minHeight), h.maxHeight), h.left = (e.width - h.width) / 2, h.top = (e.height - h.height) / 2, h.oldLeft = h.left, h.oldTop = h.top, this.initialCanvasData = te({}, h); + this.canvasData = p, this.limited = o === 1 || o === 2, this.limitCanvas(!0, !0), p.width = Math.min(Math.max(p.width, p.minWidth), p.maxWidth), p.height = Math.min(Math.max(p.height, p.minHeight), p.maxHeight), p.left = (e.width - p.width) / 2, p.top = (e.height - p.height) / 2, p.oldLeft = p.left, p.oldTop = p.top, this.initialCanvasData = Q({}, p); }, limitCanvas: function(e, r) { - var o = this.options, i = this.containerData, a = this.canvasData, n = this.cropBoxData, m = o.viewMode, g = a.aspectRatio, f = this.cropped && n; + var o = this.options, a = this.containerData, n = this.canvasData, l = this.cropBoxData, h = o.viewMode, v = n.aspectRatio, m = this.cropped && l; if (e) { - var h = Number(o.minCanvasWidth) || 0, p = Number(o.minCanvasHeight) || 0; - m > 1 ? (h = Math.max(h, i.width), p = Math.max(p, i.height), m === 3 && (p * g > h ? h = p * g : p = h / g)) : m > 0 && (h ? h = Math.max(h, f ? n.width : 0) : p ? p = Math.max(p, f ? n.height : 0) : f && (h = n.width, p = n.height, p * g > h ? h = p * g : p = h / g)); - var b = je({ - aspectRatio: g, - width: h, - height: p + var p = Number(o.minCanvasWidth) || 0, b = Number(o.minCanvasHeight) || 0; + h > 1 ? (p = Math.max(p, a.width), b = Math.max(b, a.height), h === 3 && (b * v > p ? p = b * v : b = p / v)) : h > 0 && (p ? p = Math.max(p, m ? l.width : 0) : b ? b = Math.max(b, m ? l.height : 0) : m && (p = l.width, b = l.height, b * v > p ? p = b * v : b = p / v)); + var w = ze({ + aspectRatio: v, + width: p, + height: b }); - h = b.width, p = b.height, a.minWidth = h, a.minHeight = p, a.maxWidth = 1 / 0, a.maxHeight = 1 / 0; + p = w.width, b = w.height, n.minWidth = p, n.minHeight = b, n.maxWidth = 1 / 0, n.maxHeight = 1 / 0; } if (r) - if (m > (f ? 0 : 1)) { - var E = i.width - a.width, D = i.height - a.height; - a.minLeft = Math.min(0, E), a.minTop = Math.min(0, D), a.maxLeft = Math.max(0, E), a.maxTop = Math.max(0, D), f && this.limited && (a.minLeft = Math.min(n.left, n.left + (n.width - a.width)), a.minTop = Math.min(n.top, n.top + (n.height - a.height)), a.maxLeft = n.left, a.maxTop = n.top, m === 2 && (a.width >= i.width && (a.minLeft = Math.min(0, E), a.maxLeft = Math.max(0, E)), a.height >= i.height && (a.minTop = Math.min(0, D), a.maxTop = Math.max(0, D)))); + if (h > (m ? 0 : 1)) { + var E = a.width - n.width, C = a.height - n.height; + n.minLeft = Math.min(0, E), n.minTop = Math.min(0, C), n.maxLeft = Math.max(0, E), n.maxTop = Math.max(0, C), m && this.limited && (n.minLeft = Math.min(l.left, l.left + (l.width - n.width)), n.minTop = Math.min(l.top, l.top + (l.height - n.height)), n.maxLeft = l.left, n.maxTop = l.top, h === 2 && (n.width >= a.width && (n.minLeft = Math.min(0, E), n.maxLeft = Math.max(0, E)), n.height >= a.height && (n.minTop = Math.min(0, C), n.maxTop = Math.max(0, C)))); } else - a.minLeft = -a.width, a.minTop = -a.height, a.maxLeft = i.width, a.maxTop = i.height; + n.minLeft = -n.width, n.minTop = -n.height, n.maxLeft = a.width, n.maxTop = a.height; }, renderCanvas: function(e, r) { - var o = this.canvasData, i = this.imageData; + var o = this.canvasData, a = this.imageData; if (r) { - var a = Ou({ - width: i.naturalWidth * Math.abs(i.scaleX || 1), - height: i.naturalHeight * Math.abs(i.scaleY || 1), - degree: i.rotate || 0 - }), n = a.width, m = a.height, g = o.width * (n / o.naturalWidth), f = o.height * (m / o.naturalHeight); - o.left -= (g - o.width) / 2, o.top -= (f - o.height) / 2, o.width = g, o.height = f, o.aspectRatio = n / m, o.naturalWidth = n, o.naturalHeight = m, this.limitCanvas(!0, !1); + var n = cd({ + width: a.naturalWidth * Math.abs(a.scaleX || 1), + height: a.naturalHeight * Math.abs(a.scaleY || 1), + degree: a.rotate || 0 + }), l = n.width, h = n.height, v = o.width * (l / o.naturalWidth), m = o.height * (h / o.naturalHeight); + o.left -= (v - o.width) / 2, o.top -= (m - o.height) / 2, o.width = v, o.height = m, o.aspectRatio = l / h, o.naturalWidth = l, o.naturalHeight = h, this.limitCanvas(!0, !1); } - (o.width > o.maxWidth || o.width < o.minWidth) && (o.left = o.oldLeft), (o.height > o.maxHeight || o.height < o.minHeight) && (o.top = o.oldTop), o.width = Math.min(Math.max(o.width, o.minWidth), o.maxWidth), o.height = Math.min(Math.max(o.height, o.minHeight), o.maxHeight), this.limitCanvas(!1, !0), o.left = Math.min(Math.max(o.left, o.minLeft), o.maxLeft), o.top = Math.min(Math.max(o.top, o.minTop), o.maxTop), o.oldLeft = o.left, o.oldTop = o.top, Ne(this.canvas, te({ + (o.width > o.maxWidth || o.width < o.minWidth) && (o.left = o.oldLeft), (o.height > o.maxHeight || o.height < o.minHeight) && (o.top = o.oldTop), o.width = Math.min(Math.max(o.width, o.minWidth), o.maxWidth), o.height = Math.min(Math.max(o.height, o.minHeight), o.maxHeight), this.limitCanvas(!1, !0), o.left = Math.min(Math.max(o.left, o.minLeft), o.maxLeft), o.top = Math.min(Math.max(o.top, o.minTop), o.maxTop), o.oldLeft = o.left, o.oldTop = o.top, je(this.canvas, Q({ width: o.width, height: o.height - }, mt({ + }, bt({ translateX: o.left, translateY: o.top }))), this.renderImage(e), this.cropped && this.limited && this.limitCropBox(!0, !0); }, renderImage: function(e) { - var r = this.canvasData, o = this.imageData, i = o.naturalWidth * (r.width / r.naturalWidth), a = o.naturalHeight * (r.height / r.naturalHeight); - te(o, { - width: i, - height: a, - left: (r.width - i) / 2, - top: (r.height - a) / 2 - }), Ne(this.image, te({ + var r = this.canvasData, o = this.imageData, a = o.naturalWidth * (r.width / r.naturalWidth), n = o.naturalHeight * (r.height / r.naturalHeight); + Q(o, { + width: a, + height: n, + left: (r.width - a) / 2, + top: (r.height - n) / 2 + }), je(this.image, Q({ width: o.width, height: o.height - }, mt(te({ + }, bt(Q({ translateX: o.left, translateY: o.top }, o)))), e && this.output(); }, initCropBox: function() { - var e = this.options, r = this.canvasData, o = e.aspectRatio || e.initialAspectRatio, i = Number(e.autoCropArea) || 0.8, a = { + var e = this.options, r = this.canvasData, o = e.aspectRatio || e.initialAspectRatio, a = Number(e.autoCropArea) || 0.8, n = { width: r.width, height: r.height }; - o && (r.height * o > r.width ? a.height = a.width / o : a.width = a.height * o), this.cropBoxData = a, this.limitCropBox(!0, !0), a.width = Math.min(Math.max(a.width, a.minWidth), a.maxWidth), a.height = Math.min(Math.max(a.height, a.minHeight), a.maxHeight), a.width = Math.max(a.minWidth, a.width * i), a.height = Math.max(a.minHeight, a.height * i), a.left = r.left + (r.width - a.width) / 2, a.top = r.top + (r.height - a.height) / 2, a.oldLeft = a.left, a.oldTop = a.top, this.initialCropBoxData = te({}, a); + o && (r.height * o > r.width ? n.height = n.width / o : n.width = n.height * o), this.cropBoxData = n, this.limitCropBox(!0, !0), n.width = Math.min(Math.max(n.width, n.minWidth), n.maxWidth), n.height = Math.min(Math.max(n.height, n.minHeight), n.maxHeight), n.width = Math.max(n.minWidth, n.width * a), n.height = Math.max(n.minHeight, n.height * a), n.left = r.left + (r.width - n.width) / 2, n.top = r.top + (r.height - n.height) / 2, n.oldLeft = n.left, n.oldTop = n.top, this.initialCropBoxData = Q({}, n); }, limitCropBox: function(e, r) { - var o = this.options, i = this.containerData, a = this.canvasData, n = this.cropBoxData, m = this.limited, g = o.aspectRatio; + var o = this.options, a = this.containerData, n = this.canvasData, l = this.cropBoxData, h = this.limited, v = o.aspectRatio; if (e) { - var f = Number(o.minCropBoxWidth) || 0, h = Number(o.minCropBoxHeight) || 0, p = m ? Math.min(i.width, a.width, a.width + a.left, i.width - a.left) : i.width, b = m ? Math.min(i.height, a.height, a.height + a.top, i.height - a.top) : i.height; - f = Math.min(f, i.width), h = Math.min(h, i.height), g && (f && h ? h * g > f ? h = f / g : f = h * g : f ? h = f / g : h && (f = h * g), b * g > p ? b = p / g : p = b * g), n.minWidth = Math.min(f, p), n.minHeight = Math.min(h, b), n.maxWidth = p, n.maxHeight = b; + var m = Number(o.minCropBoxWidth) || 0, p = Number(o.minCropBoxHeight) || 0, b = h ? Math.min(a.width, n.width, n.width + n.left, a.width - n.left) : a.width, w = h ? Math.min(a.height, n.height, n.height + n.top, a.height - n.top) : a.height; + m = Math.min(m, a.width), p = Math.min(p, a.height), v && (m && p ? p * v > m ? p = m / v : m = p * v : m ? p = m / v : p && (m = p * v), w * v > b ? w = b / v : b = w * v), l.minWidth = Math.min(m, b), l.minHeight = Math.min(p, w), l.maxWidth = b, l.maxHeight = w; } - r && (m ? (n.minLeft = Math.max(0, a.left), n.minTop = Math.max(0, a.top), n.maxLeft = Math.min(i.width, a.left + a.width) - n.width, n.maxTop = Math.min(i.height, a.top + a.height) - n.height) : (n.minLeft = 0, n.minTop = 0, n.maxLeft = i.width - n.width, n.maxTop = i.height - n.height)); + r && (h ? (l.minLeft = Math.max(0, n.left), l.minTop = Math.max(0, n.top), l.maxLeft = Math.min(a.width, n.left + n.width) - l.width, l.maxTop = Math.min(a.height, n.top + n.height) - l.height) : (l.minLeft = 0, l.minTop = 0, l.maxLeft = a.width - l.width, l.maxTop = a.height - l.height)); }, renderCropBox: function() { var e = this.options, r = this.containerData, o = this.cropBoxData; - (o.width > o.maxWidth || o.width < o.minWidth) && (o.left = o.oldLeft), (o.height > o.maxHeight || o.height < o.minHeight) && (o.top = o.oldTop), o.width = Math.min(Math.max(o.width, o.minWidth), o.maxWidth), o.height = Math.min(Math.max(o.height, o.minHeight), o.maxHeight), this.limitCropBox(!1, !0), o.left = Math.min(Math.max(o.left, o.minLeft), o.maxLeft), o.top = Math.min(Math.max(o.top, o.minTop), o.maxTop), o.oldLeft = o.left, o.oldTop = o.top, e.movable && e.cropBoxMovable && vt(this.face, pt, o.width >= r.width && o.height >= r.height ? Xo : br), Ne(this.cropBox, te({ + (o.width > o.maxWidth || o.width < o.minWidth) && (o.left = o.oldLeft), (o.height > o.maxHeight || o.height < o.minHeight) && (o.top = o.oldTop), o.width = Math.min(Math.max(o.width, o.minWidth), o.maxWidth), o.height = Math.min(Math.max(o.height, o.minHeight), o.maxHeight), this.limitCropBox(!1, !0), o.left = Math.min(Math.max(o.left, o.minLeft), o.maxLeft), o.top = Math.min(Math.max(o.top, o.minTop), o.maxTop), o.oldLeft = o.left, o.oldTop = o.top, e.movable && e.cropBoxMovable && St(this.face, wt, o.width >= r.width && o.height >= r.height ? Ps : Sr), je(this.cropBox, Q({ width: o.width, height: o.height - }, mt({ + }, bt({ translateX: o.left, translateY: o.top }))), this.cropped && this.limited && this.limitCanvas(!0, !0), this.disabled || this.output(); }, output: function() { - this.preview(), ot(this.element, Qt, this.getData()); + this.preview(), rt(this.element, rr, this.getData()); } -}, Bu = { +}, bd = { initPreview: function() { - var e = this.element, r = this.crossOrigin, o = this.options.preview, i = r ? this.crossOriginUrl : this.url, a = e.alt || "The image to preview", n = document.createElement("img"); - if (r && (n.crossOrigin = r), n.src = i, n.alt = a, this.viewBox.appendChild(n), this.viewBoxImage = n, !!o) { - var m = o; - typeof o == "string" ? m = e.ownerDocument.querySelectorAll(o) : o.querySelector && (m = [o]), this.previews = m, se(m, function(g) { - var f = document.createElement("img"); - vt(g, Dt, { - width: g.offsetWidth, - height: g.offsetHeight, - html: g.innerHTML - }), r && (f.crossOrigin = r), f.src = i, f.alt = a, f.style.cssText = 'display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"', g.innerHTML = "", g.appendChild(f); + var e = this.element, r = this.crossOrigin, o = this.options.preview, a = r ? this.crossOriginUrl : this.url, n = e.alt || "The image to preview", l = document.createElement("img"); + if (r && (l.crossOrigin = r), l.src = a, l.alt = n, this.viewBox.appendChild(l), this.viewBoxImage = l, !!o) { + var h = o; + typeof o == "string" ? h = e.ownerDocument.querySelectorAll(o) : o.querySelector && (h = [o]), this.previews = h, te(h, function(v) { + var m = document.createElement("img"); + St(v, Tt, { + width: v.offsetWidth, + height: v.offsetHeight, + html: v.innerHTML + }), r && (m.crossOrigin = r), m.src = a, m.alt = n, m.style.cssText = 'display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"', v.innerHTML = "", v.appendChild(m); }); } }, resetPreview: function() { - se(this.previews, function(e) { - var r = ar(e, Dt); - Ne(e, { + te(this.previews, function(e) { + var r = ar(e, Tt); + je(e, { width: r.width, height: r.height - }), e.innerHTML = r.html, $u(e, Dt); + }), e.innerHTML = r.html, nd(e, Tt); }); }, preview: function() { - var e = this.imageData, r = this.canvasData, o = this.cropBoxData, i = o.width, a = o.height, n = e.width, m = e.height, g = o.left - r.left - e.left, f = o.top - r.top - e.top; - !this.cropped || this.disabled || (Ne(this.viewBoxImage, te({ - width: n, - height: m - }, mt(te({ - translateX: -g, - translateY: -f - }, e)))), se(this.previews, function(h) { - var p = ar(h, Dt), b = p.width, E = p.height, D = b, T = E, I = 1; - i && (I = b / i, T = a * I), a && T > E && (I = E / a, D = i * I, T = E), Ne(h, { - width: D, - height: T - }), Ne(h.getElementsByTagName("img")[0], te({ - width: n * I, - height: m * I - }, mt(te({ - translateX: -g * I, - translateY: -f * I + var e = this.imageData, r = this.canvasData, o = this.cropBoxData, a = o.width, n = o.height, l = e.width, h = e.height, v = o.left - r.left - e.left, m = o.top - r.top - e.top; + !this.cropped || this.disabled || (je(this.viewBoxImage, Q({ + width: l, + height: h + }, bt(Q({ + translateX: -v, + translateY: -m + }, e)))), te(this.previews, function(p) { + var b = ar(p, Tt), w = b.width, E = b.height, C = w, A = E, I = 1; + a && (I = w / a, A = n * I), n && A > E && (I = E / n, C = a * I, A = E), je(p, { + width: C, + height: A + }), je(p.getElementsByTagName("img")[0], Q({ + width: l * I, + height: h * I + }, bt(Q({ + translateX: -v * I, + translateY: -m * I }, e)))); })); } -}, Hu = { +}, yd = { bind: function() { var e = this.element, r = this.options, o = this.cropper; - ge(r.cropstart) && xe(e, rr, r.cropstart), ge(r.cropmove) && xe(e, tr, r.cropmove), ge(r.cropend) && xe(e, er, r.cropend), ge(r.crop) && xe(e, Qt, r.crop), ge(r.zoom) && xe(e, or, r.zoom), xe(o, Qr, this.onCropStart = this.cropStart.bind(this)), r.zoomable && r.zoomOnWheel && xe(o, ao, this.onWheel = this.wheel.bind(this), { + ue(r.cropstart) && we(e, nr, r.cropstart), ue(r.cropmove) && we(e, or, r.cropmove), ue(r.cropend) && we(e, sr, r.cropend), ue(r.crop) && we(e, rr, r.crop), ue(r.zoom) && we(e, ir, r.zoom), we(o, Hr, this.onCropStart = this.cropStart.bind(this)), r.zoomable && r.zoomOnWheel && we(o, Wr, this.onWheel = this.wheel.bind(this), { passive: !1, capture: !0 - }), r.toggleDragModeOnDblclick && xe(o, Zr, this.onDblclick = this.dblclick.bind(this)), xe(e.ownerDocument, eo, this.onCropMove = this.cropMove.bind(this)), xe(e.ownerDocument, to, this.onCropEnd = this.cropEnd.bind(this)), r.responsive && xe(window, oo, this.onResize = this.resize.bind(this)); + }), r.toggleDragModeOnDblclick && we(o, Rr, this.onDblclick = this.dblclick.bind(this)), we(e.ownerDocument, Br, this.onCropMove = this.cropMove.bind(this)), we(e.ownerDocument, Ur, this.onCropEnd = this.cropEnd.bind(this)), r.responsive && we(window, Yr, this.onResize = this.resize.bind(this)); }, unbind: function() { var e = this.element, r = this.options, o = this.cropper; - ge(r.cropstart) && Se(e, rr, r.cropstart), ge(r.cropmove) && Se(e, tr, r.cropmove), ge(r.cropend) && Se(e, er, r.cropend), ge(r.crop) && Se(e, Qt, r.crop), ge(r.zoom) && Se(e, or, r.zoom), Se(o, Qr, this.onCropStart), r.zoomable && r.zoomOnWheel && Se(o, ao, this.onWheel, { + ue(r.cropstart) && De(e, nr, r.cropstart), ue(r.cropmove) && De(e, or, r.cropmove), ue(r.cropend) && De(e, sr, r.cropend), ue(r.crop) && De(e, rr, r.crop), ue(r.zoom) && De(e, ir, r.zoom), De(o, Hr, this.onCropStart), r.zoomable && r.zoomOnWheel && De(o, Wr, this.onWheel, { passive: !1, capture: !0 - }), r.toggleDragModeOnDblclick && Se(o, Zr, this.onDblclick), Se(e.ownerDocument, eo, this.onCropMove), Se(e.ownerDocument, to, this.onCropEnd), r.responsive && Se(window, oo, this.onResize); + }), r.toggleDragModeOnDblclick && De(o, Rr, this.onDblclick), De(e.ownerDocument, Br, this.onCropMove), De(e.ownerDocument, Ur, this.onCropEnd), r.responsive && De(window, Yr, this.onResize); } -}, Uu = { +}, wd = { resize: function() { if (!this.disabled) { - var e = this.options, r = this.container, o = this.containerData, i = r.offsetWidth / o.width, a = r.offsetHeight / o.height, n = Math.abs(i - 1) > Math.abs(a - 1) ? i : a; - if (n !== 1) { - var m, g; - e.restore && (m = this.getCanvasData(), g = this.getCropBoxData()), this.render(), e.restore && (this.setCanvasData(se(m, function(f, h) { - m[h] = f * n; - })), this.setCropBoxData(se(g, function(f, h) { - g[h] = f * n; + var e = this.options, r = this.container, o = this.containerData, a = r.offsetWidth / o.width, n = r.offsetHeight / o.height, l = Math.abs(a - 1) > Math.abs(n - 1) ? a : n; + if (l !== 1) { + var h, v; + e.restore && (h = this.getCanvasData(), v = this.getCropBoxData()), this.render(), e.restore && (this.setCanvasData(te(h, function(m, p) { + h[p] = m * l; + })), this.setCropBoxData(te(v, function(m, p) { + v[p] = m * l; }))); } } }, dblclick: function() { - this.disabled || this.options.dragMode === Jo || this.setDragMode(Cu(this.dragBox, Jt) ? Go : yr); + this.disabled || this.options.dragMode === zs || this.setDragMode(sd(this.dragBox, er) ? js : _r); }, wheel: function(e) { - var r = this, o = Number(this.options.wheelZoomRatio) || 0.1, i = 1; + var r = this, o = Number(this.options.wheelZoomRatio) || 0.1, a = 1; this.disabled || (e.preventDefault(), !this.wheeling && (this.wheeling = !0, setTimeout(function() { r.wheeling = !1; - }, 50), e.deltaY ? i = e.deltaY > 0 ? 1 : -1 : e.wheelDelta ? i = -e.wheelDelta / 120 : e.detail && (i = e.detail > 0 ? 1 : -1), this.zoom(-i * o, e))); + }, 50), e.deltaY ? a = e.deltaY > 0 ? 1 : -1 : e.wheelDelta ? a = -e.wheelDelta / 120 : e.detail && (a = e.detail > 0 ? 1 : -1), this.zoom(-a * o, e))); }, cropStart: function(e) { var r = e.buttons, o = e.button; if (!(this.disabled || (e.type === "mousedown" || e.type === "pointerdown" && e.pointerType === "mouse") && (Y(r) && r !== 1 || Y(o) && o !== 0 || e.ctrlKey))) { - var i = this.options, a = this.pointers, n; - e.changedTouches ? se(e.changedTouches, function(m) { - a[m.identifier] = Ct(m); - }) : a[e.pointerId || 0] = Ct(e), Object.keys(a).length > 1 && i.zoomable && i.zoomOnTouch ? n = qo : n = ar(e.target, pt), !!pu.test(n) && ot(this.element, rr, { + var a = this.options, n = this.pointers, l; + e.changedTouches ? te(e.changedTouches, function(h) { + n[h.identifier] = At(h); + }) : n[e.pointerId || 0] = At(e), Object.keys(n).length > 1 && a.zoomable && a.zoomOnTouch ? l = Ns : l = ar(e.target, wt), Xc.test(l) && rt(this.element, nr, { originalEvent: e, - action: n - }) !== !1 && (e.preventDefault(), this.action = n, this.cropping = !1, n === Wo && (this.cropping = !0, ce(this.dragBox, Ot))); + action: l + }) !== !1 && (e.preventDefault(), this.action = l, this.cropping = !1, l === Os && (this.cropping = !0, ie(this.dragBox, Nt))); } }, cropMove: function(e) { var r = this.action; if (!(this.disabled || !r)) { var o = this.pointers; - e.preventDefault(), ot(this.element, tr, { + e.preventDefault(), rt(this.element, or, { originalEvent: e, action: r - }) !== !1 && (e.changedTouches ? se(e.changedTouches, function(i) { - te(o[i.identifier] || {}, Ct(i, !0)); - }) : te(o[e.pointerId || 0] || {}, Ct(e, !0)), this.change(e)); + }) !== !1 && (e.changedTouches ? te(e.changedTouches, function(a) { + Q(o[a.identifier] || {}, At(a, !0)); + }) : Q(o[e.pointerId || 0] || {}, At(e, !0)), this.change(e)); } }, cropEnd: function(e) { if (!this.disabled) { var r = this.action, o = this.pointers; - e.changedTouches ? se(e.changedTouches, function(i) { - delete o[i.identifier]; - }) : delete o[e.pointerId || 0], r && (e.preventDefault(), Object.keys(o).length || (this.action = ""), this.cropping && (this.cropping = !1, tt(this.dragBox, Ot, this.cropped && this.options.modal)), ot(this.element, er, { + e.changedTouches ? te(e.changedTouches, function(a) { + delete o[a.identifier]; + }) : delete o[e.pointerId || 0], r && (e.preventDefault(), Object.keys(o).length || (this.action = ""), this.cropping && (this.cropping = !1, et(this.dragBox, Nt, this.cropped && this.options.modal)), rt(this.element, sr, { originalEvent: e, action: r })); } } -}, Ku = { +}, Sd = { change: function(e) { - var r = this.options, o = this.canvasData, i = this.containerData, a = this.cropBoxData, n = this.pointers, m = this.action, g = r.aspectRatio, f = a.left, h = a.top, p = a.width, b = a.height, E = f + p, D = h + b, T = 0, I = 0, U = i.width, H = i.height, N = !0, W; - !g && e.shiftKey && (g = p && b ? p / b : 1), this.limited && (T = a.minLeft, I = a.minTop, U = T + Math.min(i.width, o.width, o.left + o.width), H = I + Math.min(i.height, o.height, o.top + o.height)); - var K = n[Object.keys(n)[0]], C = { - x: K.endX - K.startX, - y: K.endY - K.startY - }, V = function(ne) { - switch (ne) { - case He: - E + C.x > U && (C.x = U - E); + var r = this.options, o = this.canvasData, a = this.containerData, n = this.cropBoxData, l = this.pointers, h = this.action, v = r.aspectRatio, m = n.left, p = n.top, b = n.width, w = n.height, E = m + b, C = p + w, A = 0, I = 0, R = a.width, V = a.height, O = !0, K; + !v && e.shiftKey && (v = b && w ? b / w : 1), this.limited && (A = n.minLeft, I = n.minTop, R = A + Math.min(a.width, o.width, o.left + o.width), V = I + Math.min(a.height, o.height, o.top + o.height)); + var B = l[Object.keys(l)[0]], $ = { + x: B.endX - B.startX, + y: B.endY - B.startY + }, j = function(se) { + switch (se) { + case Ye: + E + $.x > R && ($.x = R - E); break; - case Ue: - f + C.x < T && (C.x = T - f); + case We: + m + $.x < A && ($.x = A - m); break; - case Pe: - h + C.y < I && (C.y = I - h); + case Ne: + p + $.y < I && ($.y = I - p); break; - case Qe: - D + C.y > H && (C.y = H - D); + case Je: + C + $.y > V && ($.y = V - C); break; } }; - switch (m) { - case br: - f += C.x, h += C.y; + switch (h) { + case Sr: + m += $.x, p += $.y; break; - case He: - if (C.x >= 0 && (E >= U || g && (h <= I || D >= H))) { - N = !1; + case Ye: + if ($.x >= 0 && (E >= R || v && (p <= I || C >= V))) { + O = !1; break; } - V(He), p += C.x, p < 0 && (m = Ue, p = -p, f -= p), g && (b = p / g, h += (a.height - b) / 2); + j(Ye), b += $.x, b < 0 && (h = We, b = -b, m -= b), v && (w = b / v, p += (n.height - w) / 2); break; - case Pe: - if (C.y <= 0 && (h <= I || g && (f <= T || E >= U))) { - N = !1; + case Ne: + if ($.y <= 0 && (p <= I || v && (m <= A || E >= R))) { + O = !1; break; } - V(Pe), b -= C.y, h += C.y, b < 0 && (m = Qe, b = -b, h -= b), g && (p = b * g, f += (a.width - p) / 2); + j(Ne), w -= $.y, p += $.y, w < 0 && (h = Je, w = -w, p -= w), v && (b = w * v, m += (n.width - b) / 2); break; - case Ue: - if (C.x <= 0 && (f <= T || g && (h <= I || D >= H))) { - N = !1; + case We: + if ($.x <= 0 && (m <= A || v && (p <= I || C >= V))) { + O = !1; break; } - V(Ue), p -= C.x, f += C.x, p < 0 && (m = He, p = -p, f -= p), g && (b = p / g, h += (a.height - b) / 2); + j(We), b -= $.x, m += $.x, b < 0 && (h = Ye, b = -b, m -= b), v && (w = b / v, p += (n.height - w) / 2); break; - case Qe: - if (C.y >= 0 && (D >= H || g && (f <= T || E >= U))) { - N = !1; + case Je: + if ($.y >= 0 && (C >= V || v && (m <= A || E >= R))) { + O = !1; break; } - V(Qe), b += C.y, b < 0 && (m = Pe, b = -b, h -= b), g && (p = b * g, f += (a.width - p) / 2); + j(Je), w += $.y, w < 0 && (h = Ne, w = -w, p -= w), v && (b = w * v, m += (n.width - b) / 2); break; - case ut: - if (g) { - if (C.y <= 0 && (h <= I || E >= U)) { - N = !1; + case pt: + if (v) { + if ($.y <= 0 && (p <= I || E >= R)) { + O = !1; break; } - V(Pe), b -= C.y, h += C.y, p = b * g; + j(Ne), w -= $.y, p += $.y, b = w * v; } else - V(Pe), V(He), C.x >= 0 ? E < U ? p += C.x : C.y <= 0 && h <= I && (N = !1) : p += C.x, C.y <= 0 ? h > I && (b -= C.y, h += C.y) : (b -= C.y, h += C.y); - p < 0 && b < 0 ? (m = ft, b = -b, p = -p, h -= b, f -= p) : p < 0 ? (m = dt, p = -p, f -= p) : b < 0 && (m = ht, b = -b, h -= b); + j(Ne), j(Ye), $.x >= 0 ? E < R ? b += $.x : $.y <= 0 && p <= I && (O = !1) : b += $.x, $.y <= 0 ? p > I && (w -= $.y, p += $.y) : (w -= $.y, p += $.y); + b < 0 && w < 0 ? (h = vt, w = -w, b = -b, p -= w, m -= b) : b < 0 ? (h = gt, b = -b, m -= b) : w < 0 && (h = mt, w = -w, p -= w); break; - case dt: - if (g) { - if (C.y <= 0 && (h <= I || f <= T)) { - N = !1; + case gt: + if (v) { + if ($.y <= 0 && (p <= I || m <= A)) { + O = !1; break; } - V(Pe), b -= C.y, h += C.y, p = b * g, f += a.width - p; + j(Ne), w -= $.y, p += $.y, b = w * v, m += n.width - b; } else - V(Pe), V(Ue), C.x <= 0 ? f > T ? (p -= C.x, f += C.x) : C.y <= 0 && h <= I && (N = !1) : (p -= C.x, f += C.x), C.y <= 0 ? h > I && (b -= C.y, h += C.y) : (b -= C.y, h += C.y); - p < 0 && b < 0 ? (m = ht, b = -b, p = -p, h -= b, f -= p) : p < 0 ? (m = ut, p = -p, f -= p) : b < 0 && (m = ft, b = -b, h -= b); + j(Ne), j(We), $.x <= 0 ? m > A ? (b -= $.x, m += $.x) : $.y <= 0 && p <= I && (O = !1) : (b -= $.x, m += $.x), $.y <= 0 ? p > I && (w -= $.y, p += $.y) : (w -= $.y, p += $.y); + b < 0 && w < 0 ? (h = mt, w = -w, b = -b, p -= w, m -= b) : b < 0 ? (h = pt, b = -b, m -= b) : w < 0 && (h = vt, w = -w, p -= w); break; - case ft: - if (g) { - if (C.x <= 0 && (f <= T || D >= H)) { - N = !1; + case vt: + if (v) { + if ($.x <= 0 && (m <= A || C >= V)) { + O = !1; break; } - V(Ue), p -= C.x, f += C.x, b = p / g; + j(We), b -= $.x, m += $.x, w = b / v; } else - V(Qe), V(Ue), C.x <= 0 ? f > T ? (p -= C.x, f += C.x) : C.y >= 0 && D >= H && (N = !1) : (p -= C.x, f += C.x), C.y >= 0 ? D < H && (b += C.y) : b += C.y; - p < 0 && b < 0 ? (m = ut, b = -b, p = -p, h -= b, f -= p) : p < 0 ? (m = ht, p = -p, f -= p) : b < 0 && (m = dt, b = -b, h -= b); + j(Je), j(We), $.x <= 0 ? m > A ? (b -= $.x, m += $.x) : $.y >= 0 && C >= V && (O = !1) : (b -= $.x, m += $.x), $.y >= 0 ? C < V && (w += $.y) : w += $.y; + b < 0 && w < 0 ? (h = pt, w = -w, b = -b, p -= w, m -= b) : b < 0 ? (h = mt, b = -b, m -= b) : w < 0 && (h = gt, w = -w, p -= w); break; - case ht: - if (g) { - if (C.x >= 0 && (E >= U || D >= H)) { - N = !1; + case mt: + if (v) { + if ($.x >= 0 && (E >= R || C >= V)) { + O = !1; break; } - V(He), p += C.x, b = p / g; + j(Ye), b += $.x, w = b / v; } else - V(Qe), V(He), C.x >= 0 ? E < U ? p += C.x : C.y >= 0 && D >= H && (N = !1) : p += C.x, C.y >= 0 ? D < H && (b += C.y) : b += C.y; - p < 0 && b < 0 ? (m = dt, b = -b, p = -p, h -= b, f -= p) : p < 0 ? (m = ft, p = -p, f -= p) : b < 0 && (m = ut, b = -b, h -= b); + j(Je), j(Ye), $.x >= 0 ? E < R ? b += $.x : $.y >= 0 && C >= V && (O = !1) : b += $.x, $.y >= 0 ? C < V && (w += $.y) : w += $.y; + b < 0 && w < 0 ? (h = gt, w = -w, b = -b, p -= w, m -= b) : b < 0 ? (h = vt, b = -b, m -= b) : w < 0 && (h = pt, w = -w, p -= w); break; - case Xo: - this.move(C.x, C.y), N = !1; + case Ps: + this.move($.x, $.y), O = !1; break; - case qo: - this.zoom(Tu(n), e), N = !1; + case Ns: + this.zoom(ad(l), e), O = !1; break; - case Wo: - if (!C.x || !C.y) { - N = !1; + case Os: + if (!$.x || !$.y) { + O = !1; break; } - W = oa(this.cropper), f = K.startX - W.left, h = K.startY - W.top, p = a.minWidth, b = a.minHeight, C.x > 0 ? m = C.y > 0 ? ht : ut : C.x < 0 && (f -= p, m = C.y > 0 ? ft : dt), C.y < 0 && (h -= b), this.cropped || ($e(this.cropBox, pe), this.cropped = !0, this.limited && this.limitCropBox(!0, !0)); + K = Ks(this.cropper), m = B.startX - K.left, p = B.startY - K.top, b = n.minWidth, w = n.minHeight, $.x > 0 ? h = $.y > 0 ? mt : pt : $.x < 0 && (m -= b, h = $.y > 0 ? vt : gt), $.y < 0 && (p -= w), this.cropped || (Te(this.cropBox, he), this.cropped = !0, this.limited && this.limitCropBox(!0, !0)); break; } - N && (a.width = p, a.height = b, a.left = f, a.top = h, this.action = m, this.renderCropBox()), se(n, function(Q) { - Q.startX = Q.endX, Q.startY = Q.endY; + O && (n.width = b, n.height = w, n.left = m, n.top = p, this.action = h, this.renderCropBox()), te(l, function(G) { + G.startX = G.endX, G.startY = G.endY; }); } -}, Fu = { +}, _d = { crop: function() { - return this.ready && !this.cropped && !this.disabled && (this.cropped = !0, this.limitCropBox(!0, !0), this.options.modal && ce(this.dragBox, Ot), $e(this.cropBox, pe), this.setCropBoxData(this.initialCropBoxData)), this; + return this.ready && !this.cropped && !this.disabled && (this.cropped = !0, this.limitCropBox(!0, !0), this.options.modal && ie(this.dragBox, Nt), Te(this.cropBox, he), this.setCropBoxData(this.initialCropBoxData)), this; }, reset: function() { - return this.ready && !this.disabled && (this.imageData = te({}, this.initialImageData), this.canvasData = te({}, this.initialCanvasData), this.cropBoxData = te({}, this.initialCropBoxData), this.renderCanvas(), this.cropped && this.renderCropBox()), this; + return this.ready && !this.disabled && (this.imageData = Q({}, this.initialImageData), this.canvasData = Q({}, this.initialCanvasData), this.cropBoxData = Q({}, this.initialCropBoxData), this.renderCanvas(), this.cropped && this.renderCropBox()), this; }, clear: function() { - return this.cropped && !this.disabled && (te(this.cropBoxData, { + return this.cropped && !this.disabled && (Q(this.cropBoxData, { left: 0, top: 0, width: 0, height: 0 - }), this.cropped = !1, this.renderCropBox(), this.limitCanvas(!0, !0), this.renderCanvas(), $e(this.dragBox, Ot), ce(this.cropBox, pe)), this; + }), this.cropped = !1, this.renderCropBox(), this.limitCanvas(!0, !0), this.renderCanvas(), Te(this.dragBox, Nt), ie(this.cropBox, he)), this; }, replace: function(e) { var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1; - return !this.disabled && e && (this.isImg && (this.element.src = e), r ? (this.url = e, this.image.src = e, this.ready && (this.viewBoxImage.src = e, se(this.previews, function(o) { + return !this.disabled && e && (this.isImg && (this.element.src = e), r ? (this.url = e, this.image.src = e, this.ready && (this.viewBoxImage.src = e, te(this.previews, function(o) { o.getElementsByTagName("img")[0].src = e; }))) : (this.isImg && (this.replaced = !0), this.options.data = null, this.uncreate(), this.load(e))), this; }, enable: function() { - return this.ready && this.disabled && (this.disabled = !1, $e(this.cropper, Gr)), this; + return this.ready && this.disabled && (this.disabled = !1, Te(this.cropper, zr)), this; }, disable: function() { - return this.ready && !this.disabled && (this.disabled = !0, ce(this.cropper, Gr)), this; + return this.ready && !this.disabled && (this.disabled = !0, ie(this.cropper, zr)), this; }, destroy: function() { var e = this.element; - return e[ee] ? (e[ee] = void 0, this.isImg && this.replaced && (e.src = this.originalUrl), this.uncreate(), this) : this; + return e[J] ? (e[J] = void 0, this.isImg && this.replaced && (e.src = this.originalUrl), this.uncreate(), this) : this; }, move: function(e) { - var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : e, o = this.canvasData, i = o.left, a = o.top; - return this.moveTo(Ut(e) ? e : i + Number(e), Ut(r) ? r : a + Number(r)); + var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : e, o = this.canvasData, a = o.left, n = o.top; + return this.moveTo(Yt(e) ? e : a + Number(e), Yt(r) ? r : n + Number(r)); }, moveTo: function(e) { - var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : e, o = this.canvasData, i = !1; - return e = Number(e), r = Number(r), this.ready && !this.disabled && this.options.movable && (Y(e) && (o.left = e, i = !0), Y(r) && (o.top = r, i = !0), i && this.renderCanvas(!0)), this; + var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : e, o = this.canvasData, a = !1; + return e = Number(e), r = Number(r), this.ready && !this.disabled && this.options.movable && (Y(e) && (o.left = e, a = !0), Y(r) && (o.top = r, a = !0), a && this.renderCanvas(!0)), this; }, zoom: function(e, r) { var o = this.canvasData; return e = Number(e), e < 0 ? e = 1 / (1 - e) : e = 1 + e, this.zoomTo(o.width * e / o.naturalWidth, null, r); }, zoomTo: function(e, r, o) { - var i = this.options, a = this.canvasData, n = a.width, m = a.height, g = a.naturalWidth, f = a.naturalHeight; - if (e = Number(e), e >= 0 && this.ready && !this.disabled && i.zoomable) { - var h = g * e, p = f * e; - if (ot(this.element, or, { + var a = this.options, n = this.canvasData, l = n.width, h = n.height, v = n.naturalWidth, m = n.naturalHeight; + if (e = Number(e), e >= 0 && this.ready && !this.disabled && a.zoomable) { + var p = v * e, b = m * e; + if (rt(this.element, ir, { ratio: e, - oldRatio: n / g, + oldRatio: l / v, originalEvent: o }) === !1) return this; if (o) { - var b = this.pointers, E = oa(this.cropper), D = b && Object.keys(b).length ? Au(b) : { + var w = this.pointers, E = Ks(this.cropper), C = w && Object.keys(w).length ? ld(w) : { pageX: o.pageX, pageY: o.pageY }; - a.left -= (h - n) * ((D.pageX - E.left - a.left) / n), a.top -= (p - m) * ((D.pageY - E.top - a.top) / m); + n.left -= (p - l) * ((C.pageX - E.left - n.left) / l), n.top -= (b - h) * ((C.pageY - E.top - n.top) / h); } else - et(r) && Y(r.x) && Y(r.y) ? (a.left -= (h - n) * ((r.x - a.left) / n), a.top -= (p - m) * ((r.y - a.top) / m)) : (a.left -= (h - n) / 2, a.top -= (p - m) / 2); - a.width = h, a.height = p, this.renderCanvas(!0); + Qe(r) && Y(r.x) && Y(r.y) ? (n.left -= (p - l) * ((r.x - n.left) / l), n.top -= (b - h) * ((r.y - n.top) / h)) : (n.left -= (p - l) / 2, n.top -= (b - h) / 2); + n.width = p, n.height = b, this.renderCanvas(!0); } return this; }, @@ -4529,59 +4809,59 @@ var Ru = { return this.scale(Y(r) ? r : 1, e); }, scale: function(e) { - var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : e, o = this.imageData, i = !1; - return e = Number(e), r = Number(r), this.ready && !this.disabled && this.options.scalable && (Y(e) && (o.scaleX = e, i = !0), Y(r) && (o.scaleY = r, i = !0), i && this.renderCanvas(!0, !0)), this; + var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : e, o = this.imageData, a = !1; + return e = Number(e), r = Number(r), this.ready && !this.disabled && this.options.scalable && (Y(e) && (o.scaleX = e, a = !0), Y(r) && (o.scaleY = r, a = !0), a && this.renderCanvas(!0, !0)), this; }, getData: function() { - var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, r = this.options, o = this.imageData, i = this.canvasData, a = this.cropBoxData, n; + var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, r = this.options, o = this.imageData, a = this.canvasData, n = this.cropBoxData, l; if (this.ready && this.cropped) { - n = { - x: a.left - i.left, - y: a.top - i.top, - width: a.width, - height: a.height + l = { + x: n.left - a.left, + y: n.top - a.top, + width: n.width, + height: n.height }; - var m = o.width / o.naturalWidth; - if (se(n, function(h, p) { - n[p] = h / m; + var h = o.width / o.naturalWidth; + if (te(l, function(p, b) { + l[b] = p / h; }), e) { - var g = Math.round(n.y + n.height), f = Math.round(n.x + n.width); - n.x = Math.round(n.x), n.y = Math.round(n.y), n.width = f - n.x, n.height = g - n.y; + var v = Math.round(l.y + l.height), m = Math.round(l.x + l.width); + l.x = Math.round(l.x), l.y = Math.round(l.y), l.width = m - l.x, l.height = v - l.y; } } else - n = { + l = { x: 0, y: 0, width: 0, height: 0 }; - return r.rotatable && (n.rotate = o.rotate || 0), r.scalable && (n.scaleX = o.scaleX || 1, n.scaleY = o.scaleY || 1), n; + return r.rotatable && (l.rotate = o.rotate || 0), r.scalable && (l.scaleX = o.scaleX || 1, l.scaleY = o.scaleY || 1), l; }, setData: function(e) { - var r = this.options, o = this.imageData, i = this.canvasData, a = {}; - if (this.ready && !this.disabled && et(e)) { - var n = !1; - r.rotatable && Y(e.rotate) && e.rotate !== o.rotate && (o.rotate = e.rotate, n = !0), r.scalable && (Y(e.scaleX) && e.scaleX !== o.scaleX && (o.scaleX = e.scaleX, n = !0), Y(e.scaleY) && e.scaleY !== o.scaleY && (o.scaleY = e.scaleY, n = !0)), n && this.renderCanvas(!0, !0); - var m = o.width / o.naturalWidth; - Y(e.x) && (a.left = e.x * m + i.left), Y(e.y) && (a.top = e.y * m + i.top), Y(e.width) && (a.width = e.width * m), Y(e.height) && (a.height = e.height * m), this.setCropBoxData(a); + var r = this.options, o = this.imageData, a = this.canvasData, n = {}; + if (this.ready && !this.disabled && Qe(e)) { + var l = !1; + r.rotatable && Y(e.rotate) && e.rotate !== o.rotate && (o.rotate = e.rotate, l = !0), r.scalable && (Y(e.scaleX) && e.scaleX !== o.scaleX && (o.scaleX = e.scaleX, l = !0), Y(e.scaleY) && e.scaleY !== o.scaleY && (o.scaleY = e.scaleY, l = !0)), l && this.renderCanvas(!0, !0); + var h = o.width / o.naturalWidth; + Y(e.x) && (n.left = e.x * h + a.left), Y(e.y) && (n.top = e.y * h + a.top), Y(e.width) && (n.width = e.width * h), Y(e.height) && (n.height = e.height * h), this.setCropBoxData(n); } return this; }, getContainerData: function() { - return this.ready ? te({}, this.containerData) : {}; + return this.ready ? Q({}, this.containerData) : {}; }, getImageData: function() { - return this.sized ? te({}, this.imageData) : {}; + return this.sized ? Q({}, this.imageData) : {}; }, getCanvasData: function() { var e = this.canvasData, r = {}; - return this.ready && se(["left", "top", "width", "height", "naturalWidth", "naturalHeight"], function(o) { + return this.ready && te(["left", "top", "width", "height", "naturalWidth", "naturalHeight"], function(o) { r[o] = e[o]; }), r; }, setCanvasData: function(e) { var r = this.canvasData, o = r.aspectRatio; - return this.ready && !this.disabled && et(e) && (Y(e.left) && (r.left = e.left), Y(e.top) && (r.top = e.top), Y(e.width) ? (r.width = e.width, r.height = e.width / o) : Y(e.height) && (r.height = e.height, r.width = e.height * o), this.renderCanvas(!0)), this; + return this.ready && !this.disabled && Qe(e) && (Y(e.left) && (r.left = e.left), Y(e.top) && (r.top = e.top), Y(e.width) ? (r.width = e.width, r.height = e.width / o) : Y(e.height) && (r.height = e.height, r.width = e.height * o), this.renderCanvas(!0)), this; }, getCropBoxData: function() { var e = this.cropBoxData, r; @@ -4593,144 +4873,144 @@ var Ru = { }), r || {}; }, setCropBoxData: function(e) { - var r = this.cropBoxData, o = this.options.aspectRatio, i, a; - return this.ready && this.cropped && !this.disabled && et(e) && (Y(e.left) && (r.left = e.left), Y(e.top) && (r.top = e.top), Y(e.width) && e.width !== r.width && (i = !0, r.width = e.width), Y(e.height) && e.height !== r.height && (a = !0, r.height = e.height), o && (i ? r.height = r.width / o : a && (r.width = r.height * o)), this.renderCropBox()), this; + var r = this.cropBoxData, o = this.options.aspectRatio, a, n; + return this.ready && this.cropped && !this.disabled && Qe(e) && (Y(e.left) && (r.left = e.left), Y(e.top) && (r.top = e.top), Y(e.width) && e.width !== r.width && (a = !0, r.width = e.width), Y(e.height) && e.height !== r.height && (n = !0, r.height = e.height), o && (a ? r.height = r.width / o : n && (r.width = r.height * o)), this.renderCropBox()), this; }, getCroppedCanvas: function() { var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; if (!this.ready || !window.HTMLCanvasElement) return null; - var r = this.canvasData, o = Iu(this.image, this.imageData, r, e); + var r = this.canvasData, o = dd(this.image, this.imageData, r, e); if (!this.cropped) return o; - var i = this.getData(), a = i.x, n = i.y, m = i.width, g = i.height, f = o.width / Math.floor(r.naturalWidth); - f !== 1 && (a *= f, n *= f, m *= f, g *= f); - var h = m / g, p = je({ - aspectRatio: h, + var a = this.getData(), n = a.x, l = a.y, h = a.width, v = a.height, m = o.width / Math.floor(r.naturalWidth); + m !== 1 && (n *= m, l *= m, h *= m, v *= m); + var p = h / v, b = ze({ + aspectRatio: p, width: e.maxWidth || 1 / 0, height: e.maxHeight || 1 / 0 - }), b = je({ - aspectRatio: h, + }), w = ze({ + aspectRatio: p, width: e.minWidth || 0, height: e.minHeight || 0 - }, "cover"), E = je({ - aspectRatio: h, - width: e.width || (f !== 1 ? o.width : m), - height: e.height || (f !== 1 ? o.height : g) - }), D = E.width, T = E.height; - D = Math.min(p.width, Math.max(b.width, D)), T = Math.min(p.height, Math.max(b.height, T)); - var I = document.createElement("canvas"), U = I.getContext("2d"); - I.width = rt(D), I.height = rt(T), U.fillStyle = e.fillColor || "transparent", U.fillRect(0, 0, D, T); - var H = e.imageSmoothingEnabled, N = H === void 0 ? !0 : H, W = e.imageSmoothingQuality; - U.imageSmoothingEnabled = N, W && (U.imageSmoothingQuality = W); - var K = o.width, C = o.height, V = a, Q = n, ne, le, fe, we, be, Z; - V <= -m || V > K ? (V = 0, ne = 0, fe = 0, be = 0) : V <= 0 ? (fe = -V, V = 0, ne = Math.min(K, m + V), be = ne) : V <= K && (fe = 0, ne = Math.min(m, K - V), be = ne), ne <= 0 || Q <= -g || Q > C ? (Q = 0, le = 0, we = 0, Z = 0) : Q <= 0 ? (we = -Q, Q = 0, le = Math.min(C, g + Q), Z = le) : Q <= C && (we = 0, le = Math.min(g, C - Q), Z = le); - var O = [V, Q, ne, le]; - if (be > 0 && Z > 0) { - var B = D / m; - O.push(fe * B, we * B, be * B, Z * B); + }, "cover"), E = ze({ + aspectRatio: p, + width: e.width || (m !== 1 ? o.width : h), + height: e.height || (m !== 1 ? o.height : v) + }), C = E.width, A = E.height; + C = Math.min(b.width, Math.max(w.width, C)), A = Math.min(b.height, Math.max(w.height, A)); + var I = document.createElement("canvas"), R = I.getContext("2d"); + I.width = tt(C), I.height = tt(A), R.fillStyle = e.fillColor || "transparent", R.fillRect(0, 0, C, A); + var V = e.imageSmoothingEnabled, O = V === void 0 ? !0 : V, K = e.imageSmoothingQuality; + R.imageSmoothingEnabled = O, K && (R.imageSmoothingQuality = K); + var B = o.width, $ = o.height, j = n, G = l, se, ee, de, ve, pe, ge; + j <= -h || j > B ? (j = 0, se = 0, de = 0, pe = 0) : j <= 0 ? (de = -j, j = 0, se = Math.min(B, h + j), pe = se) : j <= B && (de = 0, se = Math.min(h, B - j), pe = se), se <= 0 || G <= -v || G > $ ? (G = 0, ee = 0, ve = 0, ge = 0) : G <= 0 ? (ve = -G, G = 0, ee = Math.min($, v + G), ge = ee) : G <= $ && (ve = 0, ee = Math.min(v, $ - G), ge = ee); + var T = [j, G, se, ee]; + if (pe > 0 && ge > 0) { + var z = C / h; + T.push(de * z, ve * z, pe * z, ge * z); } - return U.drawImage.apply(U, [o].concat(Yo(O.map(function(z) { - return Math.floor(rt(z)); + return R.drawImage.apply(R, [o].concat(Ls(T.map(function(N) { + return Math.floor(tt(N)); })))), I; }, setAspectRatio: function(e) { var r = this.options; - return !this.disabled && !Ut(e) && (r.aspectRatio = Math.max(0, e) || NaN, this.ready && (this.initCropBox(), this.cropped && this.renderCropBox())), this; + return !this.disabled && !Yt(e) && (r.aspectRatio = Math.max(0, e) || NaN, this.ready && (this.initCropBox(), this.cropped && this.renderCropBox())), this; }, setDragMode: function(e) { - var r = this.options, o = this.dragBox, i = this.face; + var r = this.options, o = this.dragBox, a = this.face; if (this.ready && !this.disabled) { - var a = e === yr, n = r.movable && e === Go; - e = a || n ? e : Jo, r.dragMode = e, vt(o, pt, e), tt(o, Jt, a), tt(o, Zt, n), r.cropBoxMovable || (vt(i, pt, e), tt(i, Jt, a), tt(i, Zt, n)); + var n = e === _r, l = r.movable && e === js; + e = n || l ? e : zs, r.dragMode = e, St(o, wt, e), et(o, er, n), et(o, tr, l), r.cropBoxMovable || (St(a, wt, e), et(a, er, n), et(a, tr, l)); } return this; } -}, Yu = Ee.Cropper, sa = /* @__PURE__ */ function() { +}, xd = Ae.Cropper, Ws = /* @__PURE__ */ function() { function t(e) { var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; - if (su(this, t), !e || !yu.test(e.tagName)) + if (Nc(this, t), !e || !Fc.test(e.tagName)) throw new Error("The first argument is required and must be an or element."); - this.element = e, this.options = te({}, io, et(r) && r), this.cropped = !1, this.disabled = !1, this.pointers = {}, this.ready = !1, this.reloading = !1, this.replaced = !1, this.sized = !1, this.sizing = !1, this.init(); + this.element = e, this.options = Q({}, Zr, Qe(r) && r), this.cropped = !1, this.disabled = !1, this.pointers = {}, this.ready = !1, this.reloading = !1, this.replaced = !1, this.sized = !1, this.sizing = !1, this.init(); } - return iu(t, [{ + return jc(t, [{ key: "init", value: function() { - var r = this.element, o = r.tagName.toLowerCase(), i; - if (!r[ee]) { - if (r[ee] = this, o === "img") { - if (this.isImg = !0, i = r.getAttribute("src") || "", this.originalUrl = i, !i) + var r = this.element, o = r.tagName.toLowerCase(), a; + if (!r[J]) { + if (r[J] = this, o === "img") { + if (this.isImg = !0, a = r.getAttribute("src") || "", this.originalUrl = a, !a) return; - i = r.src; + a = r.src; } else - o === "canvas" && window.HTMLCanvasElement && (i = r.toDataURL()); - this.load(i); + o === "canvas" && window.HTMLCanvasElement && (a = r.toDataURL()); + this.load(a); } } }, { key: "load", value: function(r) { var o = this; - if (!!r) { + if (r) { this.url = r, this.imageData = {}; - var i = this.element, a = this.options; - if (!a.rotatable && !a.scalable && (a.checkOrientation = !1), !a.checkOrientation || !window.ArrayBuffer) { + var a = this.element, n = this.options; + if (!n.rotatable && !n.scalable && (n.checkOrientation = !1), !n.checkOrientation || !window.ArrayBuffer) { this.clone(); return; } - if (vu.test(r)) { - bu.test(r) ? this.read(Nu(r)) : this.clone(); + if (Zc.test(r)) { + qc.test(r) ? this.read(fd(r)) : this.clone(); return; } - var n = new XMLHttpRequest(), m = this.clone.bind(this); - this.reloading = !0, this.xhr = n, n.onabort = m, n.onerror = m, n.ontimeout = m, n.onprogress = function() { - n.getResponseHeader("content-type") !== so && n.abort(); - }, n.onload = function() { - o.read(n.response); - }, n.onloadend = function() { + var l = new XMLHttpRequest(), h = this.clone.bind(this); + this.reloading = !0, this.xhr = l, l.onabort = h, l.onerror = h, l.ontimeout = h, l.onprogress = function() { + l.getResponseHeader("content-type") !== Xr && l.abort(); + }, l.onload = function() { + o.read(l.response); + }, l.onloadend = function() { o.reloading = !1, o.xhr = null; - }, a.checkCrossOrigin && lo(r) && i.crossOrigin && (r = co(r)), n.open("GET", r, !0), n.responseType = "arraybuffer", n.withCredentials = i.crossOrigin === "use-credentials", n.send(); + }, n.checkCrossOrigin && Fr(r) && a.crossOrigin && (r = Gr(r)), l.open("GET", r, !0), l.responseType = "arraybuffer", l.withCredentials = a.crossOrigin === "use-credentials", l.send(); } } }, { key: "read", value: function(r) { - var o = this.options, i = this.imageData, a = zu(r), n = 0, m = 1, g = 1; - if (a > 1) { - this.url = ju(r, so); - var f = Vu(a); - n = f.rotate, m = f.scaleX, g = f.scaleY; + var o = this.options, a = this.imageData, n = gd(r), l = 0, h = 1, v = 1; + if (n > 1) { + this.url = pd(r, Xr); + var m = md(n); + l = m.rotate, h = m.scaleX, v = m.scaleY; } - o.rotatable && (i.rotate = n), o.scalable && (i.scaleX = m, i.scaleY = g), this.clone(); + o.rotatable && (a.rotate = l), o.scalable && (a.scaleX = h, a.scaleY = v), this.clone(); } }, { key: "clone", value: function() { - var r = this.element, o = this.url, i = r.crossOrigin, a = o; - this.options.checkCrossOrigin && lo(o) && (i || (i = "anonymous"), a = co(o)), this.crossOrigin = i, this.crossOriginUrl = a; - var n = document.createElement("img"); - i && (n.crossOrigin = i), n.src = a || o, n.alt = r.alt || "The image to crop", this.image = n, n.onload = this.start.bind(this), n.onerror = this.stop.bind(this), ce(n, Jr), r.parentNode.insertBefore(n, r.nextSibling); + var r = this.element, o = this.url, a = r.crossOrigin, n = o; + this.options.checkCrossOrigin && Fr(o) && (a || (a = "anonymous"), n = Gr(o)), this.crossOrigin = a, this.crossOriginUrl = n; + var l = document.createElement("img"); + a && (l.crossOrigin = a), l.src = n || o, l.alt = r.alt || "The image to crop", this.image = l, l.onload = this.start.bind(this), l.onerror = this.stop.bind(this), ie(l, Vr), r.parentNode.insertBefore(l, r.nextSibling); } }, { key: "start", value: function() { var r = this, o = this.image; o.onload = null, o.onerror = null, this.sizing = !0; - var i = Ee.navigator && /(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(Ee.navigator.userAgent), a = function(f, h) { - te(r.imageData, { - naturalWidth: f, - naturalHeight: h, - aspectRatio: f / h - }), r.initialImageData = te({}, r.imageData), r.sizing = !1, r.sized = !0, r.build(); + var a = Ae.navigator && /(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(Ae.navigator.userAgent), n = function(m, p) { + Q(r.imageData, { + naturalWidth: m, + naturalHeight: p, + aspectRatio: m / p + }), r.initialImageData = Q({}, r.imageData), r.sizing = !1, r.sized = !0, r.build(); }; - if (o.naturalWidth && !i) { - a(o.naturalWidth, o.naturalHeight); + if (o.naturalWidth && !a) { + n(o.naturalWidth, o.naturalHeight); return; } - var n = document.createElement("img"), m = document.body || document.documentElement; - this.sizingImage = n, n.onload = function() { - a(n.width, n.height), i || m.removeChild(n); - }, n.src = o.src, i || (n.style.cssText = "left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;", m.appendChild(n)); + var l = document.createElement("img"), h = document.body || document.documentElement; + this.sizingImage = l, l.onload = function() { + n(l.width, l.height), a || h.removeChild(l); + }, l.src = o.src, a || (l.style.cssText = "left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;", h.appendChild(l)); } }, { key: "stop", @@ -4742,18 +5022,22 @@ var Ru = { key: "build", value: function() { if (!(!this.sized || this.ready)) { - var r = this.element, o = this.options, i = this.image, a = r.parentNode, n = document.createElement("div"); - n.innerHTML = wu; - var m = n.querySelector(".".concat(ee, "-container")), g = m.querySelector(".".concat(ee, "-canvas")), f = m.querySelector(".".concat(ee, "-drag-box")), h = m.querySelector(".".concat(ee, "-crop-box")), p = h.querySelector(".".concat(ee, "-face")); - this.container = a, this.cropper = m, this.canvas = g, this.dragBox = f, this.cropBox = h, this.viewBox = m.querySelector(".".concat(ee, "-view-box")), this.face = p, g.appendChild(i), ce(r, pe), a.insertBefore(m, r.nextSibling), this.isImg || $e(i, Jr), this.initPreview(), this.bind(), o.initialAspectRatio = Math.max(0, o.initialAspectRatio) || NaN, o.aspectRatio = Math.max(0, o.aspectRatio) || NaN, o.viewMode = Math.max(0, Math.min(3, Math.round(o.viewMode))) || 0, ce(h, pe), o.guides || ce(h.getElementsByClassName("".concat(ee, "-dashed")), pe), o.center || ce(h.getElementsByClassName("".concat(ee, "-center")), pe), o.background && ce(m, "".concat(ee, "-bg")), o.highlight || ce(p, hu), o.cropBoxMovable && (ce(p, Zt), vt(p, pt, br)), o.cropBoxResizable || (ce(h.getElementsByClassName("".concat(ee, "-line")), pe), ce(h.getElementsByClassName("".concat(ee, "-point")), pe)), this.render(), this.ready = !0, this.setDragMode(o.dragMode), o.autoCrop && this.crop(), this.setData(o.data), ge(o.ready) && xe(r, ro, o.ready, { + var r = this.element, o = this.options, a = this.image, n = r.parentNode, l = document.createElement("div"); + l.innerHTML = Gc; + var h = l.querySelector(".".concat(J, "-container")), v = h.querySelector(".".concat(J, "-canvas")), m = h.querySelector(".".concat(J, "-drag-box")), p = h.querySelector(".".concat(J, "-crop-box")), b = p.querySelector(".".concat(J, "-face")); + this.container = n, this.cropper = h, this.canvas = v, this.dragBox = m, this.cropBox = p, this.viewBox = h.querySelector(".".concat(J, "-view-box")), this.face = b, v.appendChild(a), ie(r, he), n.insertBefore(h, r.nextSibling), Te(a, Vr), this.initPreview(), this.bind(), o.initialAspectRatio = Math.max(0, o.initialAspectRatio) || NaN, o.aspectRatio = Math.max(0, o.aspectRatio) || NaN, o.viewMode = Math.max(0, Math.min(3, Math.round(o.viewMode))) || 0, ie(p, he), o.guides || ie(p.getElementsByClassName("".concat(J, "-dashed")), he), o.center || ie(p.getElementsByClassName("".concat(J, "-center")), he), o.background && ie(h, "".concat(J, "-bg")), o.highlight || ie(b, Uc), o.cropBoxMovable && (ie(b, tr), St(b, wt, Sr)), o.cropBoxResizable || (ie(p.getElementsByClassName("".concat(J, "-line")), he), ie(p.getElementsByClassName("".concat(J, "-point")), he)), this.render(), this.ready = !0, this.setDragMode(o.dragMode), o.autoCrop && this.crop(), this.setData(o.data), ue(o.ready) && we(r, Kr, o.ready, { once: !0 - }), ot(r, ro); + }), rt(r, Kr); } } }, { key: "unbuild", value: function() { - !this.ready || (this.ready = !1, this.unbind(), this.resetPreview(), this.cropper.parentNode.removeChild(this.cropper), $e(this.element, pe)); + if (this.ready) { + this.ready = !1, this.unbind(), this.resetPreview(); + var r = this.cropper.parentNode; + r && r.removeChild(this.cropper), Te(this.element, he); + } } }, { key: "uncreate", @@ -4763,37 +5047,37 @@ var Ru = { }], [{ key: "noConflict", value: function() { - return window.Cropper = Yu, t; + return window.Cropper = xd, t; } }, { key: "setDefaults", value: function(r) { - te(io, et(r) && r); + Q(Zr, Qe(r) && r); } }]), t; }(); -te(sa.prototype, Ru, Bu, Hu, Uu, Ku, Fu); -const Wu = { class: "flex" }, Xu = ["aria-label"], qu = { class: "ml-auto mb-2" }, Gu = { class: "w-full flex justify-center" }, Ju = ["src"], Zu = { +Q(Ws.prototype, vd, bd, yd, wd, Sd, _d); +const kd = { class: "flex" }, Dd = ["aria-label"], Cd = { class: "ml-auto mb-2" }, Md = { class: "w-full flex justify-center" }, Ed = ["src"], $d = { __name: "Image", props: { selection: Object }, emits: ["load"], setup(t, { emit: e }) { - const r = t, { t: o } = j("i18n"), { apiUrl: i } = Te(), a = L(null), n = L(null), m = L(!1), g = L(""), f = L(!1), h = () => { - m.value = !m.value, m.value ? n.value = new sa(a.value, { + const r = t, { t: o } = P("i18n"), { apiUrl: a } = Ie(), n = L(null), l = L(null), h = L(!1), v = L(""), m = L(!1), p = () => { + h.value = !h.value, h.value ? l.value = new Ws(n.value, { crop(E) { } - }) : n.value.destroy(); - }, p = j("postData"), b = () => { - n.value.getCroppedCanvas({ + }) : l.value.destroy(); + }, b = P("postData"), w = () => { + l.value.getCroppedCanvas({ width: 795, height: 341 }).toBlob( (E) => { - g.value = "", f.value = !1, Tt(i.value, { + v.value = "", m.value = !1, Ot(a.value, { method: "POST", - params: Object.assign(p, { + params: Object.assign(b, { q: "upload", adapter: r.selection.adapter, path: r.selection.item.path, @@ -4801,174 +5085,174 @@ const Wu = { class: "flex" }, Xu = ["aria-label"], qu = { class: "ml-auto mb-2" }), name: r.selection.item.basename, json: !1 - }).then((D) => { - g.value = o("Updated."), a.value.src = Xt(r.selection.adapter, r.selection.item.path), h(), e("load"); - }).catch((D) => { - g.value = o(D.message), f.value = !0; + }).then((C) => { + v.value = o("Updated."), n.value.src = Ft(r.selection.adapter, r.selection.item.path), p(), e("load"); + }).catch((C) => { + v.value = o(C.message), m.value = !0; }); } ); }; - return Ce(() => { + return Me(() => { e("load"); - }), (E, D) => (y(), S(ue, null, [ - u("div", Wu, [ + }), (E, C) => (S(), D(ae, null, [ + u("div", kd, [ u("h3", { class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400", id: "modal-title", "aria-label": t.selection.item.path, "data-microtip-position": "bottom-right", role: "tooltip" - }, $(t.selection.item.basename), 9, Xu), - u("div", qu, [ - m.value ? (y(), S("button", { + }, M(t.selection.item.basename), 9, Dd), + u("div", Cd, [ + h.value ? (S(), D("button", { key: 0, - onClick: b, + onClick: w, 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" - }, $(x(o)("Crop")), 1)) : X("", !0), + }, M(_(o)("Crop")), 1)) : Z("", !0), u("button", { class: "ml-1 px-2 py-1 text-blue-500", - onClick: D[0] || (D[0] = (T) => h()) - }, $(m.value ? x(o)("Cancel") : x(o)("Edit")), 1) + onClick: C[0] || (C[0] = (A) => p()) + }, M(h.value ? _(o)("Cancel") : _(o)("Edit")), 1) ]) ]), - u("div", Gu, [ + u("div", Md, [ u("img", { ref_key: "image", - ref: a, + ref: n, class: "max-w-[50vh] max-h-[50vh]", - src: x(Xt)(r.selection.adapter, r.selection.item.path), + src: _(Ft)(r.selection.adapter, r.selection.item.path), alt: "" - }, null, 8, Ju) + }, null, 8, Ed) ]), - g.value.length ? (y(), J(Oe, { + v.value.length ? (S(), F(Oe, { key: 0, - onHidden: D[1] || (D[1] = (T) => g.value = ""), - error: f.value + onHidden: C[1] || (C[1] = (A) => v.value = ""), + error: m.value }, { default: q(() => [ - ie($(g.value), 1) + re(M(v.value), 1) ]), _: 1 - }, 8, ["error"])) : X("", !0) + }, 8, ["error"])) : Z("", !0) ], 64)); } -}, Qu = { class: "flex" }, ed = ["aria-label"], td = /* @__PURE__ */ u("div", null, null, -1), rd = { +}, Td = { class: "flex" }, Ad = ["aria-label"], Id = /* @__PURE__ */ u("div", null, null, -1), Ld = { __name: "Default", props: { selection: Object }, emits: ["load"], setup(t, { emit: e }) { - return Ce(() => { + return Me(() => { e("load"); - }), (r, o) => (y(), S(ue, null, [ - u("div", Qu, [ + }), (r, o) => (S(), D(ae, null, [ + u("div", Td, [ u("h3", { class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400", id: "modal-title", "aria-label": t.selection.item.path, "data-microtip-position": "bottom-right", role: "tooltip" - }, $(t.selection.item.basename), 9, ed) + }, M(t.selection.item.basename), 9, Ad) ]), - td + Id ], 64)); } -}, od = ["aria-label"], ad = { +}, Od = ["aria-label"], Pd = { class: "w-full", preload: "", controls: "" -}, sd = ["src"], id = { +}, Nd = ["src"], jd = { __name: "Video", props: { selection: Object }, emits: ["load"], setup(t, { emit: e }) { - const r = t, { apiUrl: o } = Te(), i = () => o.value + "?" + We({ q: "preview", adapter: r.selection.adapter, path: r.selection.item.path }); - return Ce(() => { + const r = t, { apiUrl: o } = Ie(), a = () => o.value + "?" + Fe({ q: "preview", adapter: r.selection.adapter, path: r.selection.item.path }); + return Me(() => { e("load"); - }), (a, n) => (y(), S(ue, null, [ + }), (n, l) => (S(), D(ae, null, [ u("h3", { class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400", id: "modal-title", "aria-label": t.selection.item.path, "data-microtip-position": "bottom-right", role: "tooltip" - }, $(t.selection.item.basename), 9, od), + }, M(t.selection.item.basename), 9, Od), u("div", null, [ - u("video", ad, [ + u("video", Pd, [ u("source", { - src: i(), + src: a(), type: "video/mp4" - }, null, 8, sd), - ie(" Your browser does not support the video tag. ") + }, null, 8, Nd), + re(" Your browser does not support the video tag. ") ]) ]) ], 64)); } -}, nd = ["aria-label"], ld = { +}, zd = ["aria-label"], Vd = { class: "w-full", controls: "" -}, cd = ["src"], ud = { +}, Rd = ["src"], Hd = { __name: "Audio", props: { selection: Object }, emits: ["load"], setup(t, { emit: e }) { - const r = t, { apiUrl: o } = Te(), i = () => o.value + "?" + We({ q: "preview", adapter: r.selection.adapter, path: r.selection.item.path }); - return Ce(() => { + const r = t, { apiUrl: o } = Ie(), a = () => o.value + "?" + Fe({ q: "preview", adapter: r.selection.adapter, path: r.selection.item.path }); + return Me(() => { e("load"); - }), (a, n) => (y(), S(ue, null, [ + }), (n, l) => (S(), D(ae, null, [ u("h3", { class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400", id: "modal-title", "aria-label": t.selection.item.path, "data-microtip-position": "bottom-right", role: "tooltip" - }, $(t.selection.item.basename), 9, nd), + }, M(t.selection.item.basename), 9, zd), u("div", null, [ - u("audio", ld, [ + u("audio", Vd, [ u("source", { - src: i(), + src: a(), type: "audio/mpeg" - }, null, 8, cd), - ie(" Your browser does not support the audio element. ") + }, null, 8, Rd), + re(" Your browser does not support the audio element. ") ]) ]) ], 64)); } -}, dd = ["aria-label"], hd = ["data"], fd = ["src"], md = { +}, Bd = ["aria-label"], Ud = ["data"], Kd = ["src"], Yd = { __name: "Pdf", props: { selection: Object }, emits: ["load"], setup(t, { emit: e }) { - const r = t, { apiUrl: o } = Te(), i = () => o.value + "?" + We({ q: "preview", adapter: r.selection.adapter, path: r.selection.item.path }); - return Ce(() => { + const r = t, { apiUrl: o } = Ie(), a = () => o.value + "?" + Fe({ q: "preview", adapter: r.selection.adapter, path: r.selection.item.path }); + return Me(() => { e("load"); - }), (a, n) => (y(), S(ue, null, [ + }), (n, l) => (S(), D(ae, null, [ u("h3", { class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400", id: "modal-title", "aria-label": t.selection.item.path, "data-microtip-position": "bottom-right", role: "tooltip" - }, $(t.selection.item.basename), 9, dd), + }, M(t.selection.item.basename), 9, Bd), u("div", null, [ u("object", { class: "h-[60vh]", - data: i(), + data: a(), type: "application/pdf", width: "100%", height: "100%" }, [ u("iframe", { class: "border-0", - src: i(), + src: a(), width: "100%", height: "100%" }, ` @@ -4977,15 +5261,15 @@ const Wu = { class: "flex" }, Xu = ["aria-label"], qu = { class: "ml-auto mb-2" Download the PDF .

- `, 8, fd) - ], 8, hd) + `, 8, Kd) + ], 8, Ud) ]) ], 64)); } -}, gd = { class: "sm:flex sm:items-start" }, pd = { class: "mt-3 text-center sm:mt-0 sm:text-left w-full" }, vd = { class: "text-gray-700 dark:text-gray-200 text-sm" }, bd = { +}, Wd = { class: "sm:flex sm:items-start" }, Xd = { class: "mt-3 text-center sm:mt-0 sm:text-left w-full" }, Zd = { class: "text-gray-700 dark:text-gray-200 text-sm" }, qd = { key: 0, class: "flex leading-5" -}, yd = /* @__PURE__ */ u("svg", { +}, Fd = /* @__PURE__ */ u("svg", { class: "animate-spin -ml-1 mr-3 h-5 w-5 text-white", xmlns: "http://www.w3.org/2000/svg", fill: "none", @@ -5004,86 +5288,83 @@ const Wu = { class: "flex" }, Xu = ["aria-label"], qu = { class: "ml-auto mb-2" 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), wd = { class: "py-2 flex font-normal break-all dark:text-gray-200 rounded text-xs" }, xd = { class: "font-bold pl-2" }, _d = { class: "font-bold pl-2" }, kd = { +], -1), Gd = { class: "py-2 flex font-normal break-all dark:text-gray-200 rounded text-xs" }, Jd = { class: "font-bold pl-2" }, Qd = { class: "font-bold pl-2" }, eu = { name: "VFModalPreview" -}, Sd = /* @__PURE__ */ Object.assign(kd, { +}, tu = /* @__PURE__ */ Object.assign(eu, { props: { selection: Object }, setup(t) { - const e = t, { apiUrl: r } = Te(), o = j("emitter"), { t: i } = j("i18n"), a = L(!1), n = (f) => a.value = f, m = (f) => { - var h; - return ((h = e.selection.item.mime_type) != null ? h : "").startsWith(f); - }, g = () => { - const f = r.value + "?" + We({ q: "download", adapter: e.selection.adapter, path: e.selection.item.path }); - o.emit("vf-download", f); + const e = t, { apiUrl: r } = Ie(), o = P("emitter"), { t: a } = P("i18n"), n = L(!1), l = (m) => n.value = m, h = (m) => (e.selection.item.mime_type ?? "").startsWith(m), v = () => { + const m = r.value + "?" + Fe({ q: "download", adapter: e.selection.adapter, path: e.selection.item.path }); + o.emit("vf-download", m); }; - return (f, h) => (y(), J(Ae, null, { + return (m, p) => (S(), F(Le, null, { buttons: q(() => [ u("button", { type: "button", - onClick: h[6] || (h[6] = (p) => x(o).emit("vf-modal-close")), + onClick: p[6] || (p[6] = (b) => _(o).emit("vf-modal-close")), class: "mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:focus:ring-gray-400 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm" - }, $(x(i)("Close")), 1), + }, M(_(a)("Close")), 1), u("button", { type: "button", - onClick: h[7] || (h[7] = (p) => g()), + onClick: p[7] || (p[7] = (b) => v()), class: "mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:focus:ring-gray-400 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm" - }, $(x(i)("Download")), 1) + }, M(_(a)("Download")), 1) ]), default: q(() => [ - u("div", gd, [ - u("div", pd, [ + u("div", Wd, [ + u("div", Xd, [ u("div", null, [ - m("text") ? (y(), J(au, { + h("text") ? (S(), F(Pc, { key: 0, selection: t.selection, - onLoad: h[0] || (h[0] = (p) => n(!0)) - }, null, 8, ["selection"])) : m("image") ? (y(), J(Zu, { + onLoad: p[0] || (p[0] = (b) => l(!0)) + }, null, 8, ["selection"])) : h("image") ? (S(), F($d, { key: 1, selection: t.selection, - onLoad: h[1] || (h[1] = (p) => n(!0)) - }, null, 8, ["selection"])) : m("video") ? (y(), J(id, { + onLoad: p[1] || (p[1] = (b) => l(!0)) + }, null, 8, ["selection"])) : h("video") ? (S(), F(jd, { key: 2, selection: t.selection, - onLoad: h[2] || (h[2] = (p) => n(!0)) - }, null, 8, ["selection"])) : m("audio") ? (y(), J(ud, { + onLoad: p[2] || (p[2] = (b) => l(!0)) + }, null, 8, ["selection"])) : h("audio") ? (S(), F(Hd, { key: 3, selection: t.selection, - onLoad: h[3] || (h[3] = (p) => n(!0)) - }, null, 8, ["selection"])) : m("application/pdf") ? (y(), J(md, { + onLoad: p[3] || (p[3] = (b) => l(!0)) + }, null, 8, ["selection"])) : h("application/pdf") ? (S(), F(Yd, { key: 4, selection: t.selection, - onLoad: h[4] || (h[4] = (p) => n(!0)) - }, null, 8, ["selection"])) : (y(), J(rd, { + onLoad: p[4] || (p[4] = (b) => l(!0)) + }, null, 8, ["selection"])) : (S(), F(Ld, { key: 5, selection: t.selection, - onLoad: h[5] || (h[5] = (p) => n(!0)) + onLoad: p[5] || (p[5] = (b) => l(!0)) }, null, 8, ["selection"])) ]), - u("div", vd, [ - a.value == !1 ? (y(), S("div", bd, [ - yd, - u("span", null, $(x(i)("Loading")), 1) - ])) : X("", !0) + u("div", Zd, [ + n.value == !1 ? (S(), D("div", qd, [ + Fd, + u("span", null, M(_(a)("Loading")), 1) + ])) : Z("", !0) ]) ]) ]), - u("div", wd, [ + u("div", Gd, [ u("div", null, [ - u("span", xd, $(x(i)("File Size")) + ": ", 1), - ie($(x(go)(t.selection.item.file_size)), 1) + u("span", Jd, M(_(a)("File Size")) + ": ", 1), + re(M(_(rs)(t.selection.item.file_size)), 1) ]), u("div", null, [ - u("span", _d, $(x(i)("Last Modified")) + ": ", 1), - ie(" " + $(x(po)(t.selection.item.last_modified)), 1) + u("span", Qd, M(_(a)("Last Modified")) + ": ", 1), + re(" " + M(_(ss)(t.selection.item.last_modified)), 1) ]) ]) ]), _: 1 })); } -}), Dd = { class: "sm:flex sm:items-start" }, Cd = /* @__PURE__ */ u("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" }, [ +}), ru = { class: "sm:flex sm:items-start" }, su = /* @__PURE__ */ u("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__ */ u("svg", { xmlns: "http://www.w3.org/2000/svg", class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100", @@ -5098,10 +5379,10 @@ const Wu = { class: "flex" }, Xu = ["aria-label"], qu = { class: "ml-auto mb-2" 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), Md = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, $d = { +], -1), ou = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, nu = { class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400", id: "modal-title" -}, Ed = { class: "mt-2" }, Td = { class: "flex text-sm text-gray-800 dark:text-gray-400 py-2" }, Ad = { +}, iu = { class: "mt-2" }, au = { class: "flex text-sm text-gray-800 dark:text-gray-400 py-2" }, lu = { 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", @@ -5109,13 +5390,13 @@ const Wu = { class: "flex" }, Xu = ["aria-label"], qu = { class: "ml-auto mb-2" viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, Od = /* @__PURE__ */ u("path", { +}, cu = /* @__PURE__ */ u("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), Id = [ - Od -], Ld = { +}, null, -1), du = [ + cu +], uu = { key: 1, xmlns: "http://www.w3.org/2000/svg", class: "h-5 w-5 text-neutral-500", @@ -5123,81 +5404,81 @@ const Wu = { class: "flex" }, Xu = ["aria-label"], qu = { class: "ml-auto mb-2" viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, Pd = /* @__PURE__ */ u("path", { +}, hu = /* @__PURE__ */ u("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), Nd = [ - Pd -], jd = { class: "ml-1.5" }, zd = ["onKeyup"], Vd = { +}, null, -1), fu = [ + hu +], pu = { class: "ml-1.5" }, gu = ["onKeyup"], mu = { name: "VFModalRename" -}, Rd = /* @__PURE__ */ Object.assign(Vd, { +}, vu = /* @__PURE__ */ Object.assign(mu, { props: { selection: Object, current: Object }, setup(t) { - const e = t, r = j("emitter"); - j("storage"); - const o = j("adapter"), { t: i } = j("i18n"), a = L(e.selection.items[0]), n = L(e.selection.items[0].basename), m = L(""), g = () => { - n.value != "" && r.emit("vf-fetch", { + const e = t, r = P("emitter"); + P("storage"); + const o = P("adapter"), { t: a } = P("i18n"), n = L(e.selection.items[0]), l = L(e.selection.items[0].basename), h = L(""), v = () => { + l.value != "" && r.emit("vf-fetch", { params: { q: "rename", adapter: o.value, path: e.current.dirname, - item: a.value.path, - name: n.value + item: n.value.path, + name: l.value }, onSuccess: () => { - r.emit("vf-toast-push", { label: i("%s is renamed.", n.value) }); + r.emit("vf-toast-push", { label: a("%s is renamed.", l.value) }); }, - onError: (f) => { - m.value = i(f.message); + onError: (m) => { + h.value = a(m.message); } }); }; - return (f, h) => (y(), J(Ae, null, { + return (m, p) => (S(), F(Le, null, { buttons: q(() => [ u("button", { type: "button", - onClick: g, + onClick: v, class: "w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 dark:bg-gray-700 dark:hover:bg-gray-600/75 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm" - }, $(x(i)("Rename")), 1), + }, M(_(a)("Rename")), 1), u("button", { type: "button", - onClick: h[2] || (h[2] = (p) => x(r).emit("vf-modal-close")), + onClick: p[2] || (p[2] = (b) => _(r).emit("vf-modal-close")), class: "mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm" - }, $(x(i)("Cancel")), 1) + }, M(_(a)("Cancel")), 1) ]), default: q(() => [ - u("div", Dd, [ - Cd, - u("div", Md, [ - u("h3", $d, $(x(i)("Rename")), 1), - u("div", Ed, [ - u("p", Td, [ - a.value.type == "dir" ? (y(), S("svg", Ad, Id)) : (y(), S("svg", Ld, Nd)), - u("span", jd, $(a.value.basename), 1) + u("div", ru, [ + su, + u("div", ou, [ + u("h3", nu, M(_(a)("Rename")), 1), + u("div", iu, [ + u("p", au, [ + n.value.type == "dir" ? (S(), D("svg", lu, du)) : (S(), D("svg", uu, fu)), + u("span", pu, M(n.value.basename), 1) ]), - _e(u("input", { - "onUpdate:modelValue": h[0] || (h[0] = (p) => n.value = p), - onKeyup: st(g, ["enter"]), + Se(u("input", { + "onUpdate:modelValue": p[0] || (p[0] = (b) => l.value = b), + onKeyup: ot(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: "Name", type: "text" - }, null, 40, zd), [ - [it, n.value] + }, null, 40, gu), [ + [nt, l.value] ]), - m.value.length ? (y(), J(Oe, { + h.value.length ? (S(), F(Oe, { key: 0, - onHidden: h[1] || (h[1] = (p) => m.value = ""), + onHidden: p[1] || (p[1] = (b) => h.value = ""), error: "" }, { default: q(() => [ - ie($(m.value), 1) + re(M(h.value), 1) ]), _: 1 - })) : X("", !0) + })) : Z("", !0) ]) ]) ]) @@ -5205,7 +5486,7 @@ const Wu = { class: "flex" }, Xu = ["aria-label"], qu = { class: "ml-auto mb-2" _: 1 })); } -}), Bd = { class: "sm:flex sm:items-start" }, Hd = /* @__PURE__ */ u("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" }, [ +}), bu = { class: "sm:flex sm:items-start" }, yu = /* @__PURE__ */ u("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__ */ u("svg", { xmlns: "http://www.w3.org/2000/svg", class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100", @@ -5220,111 +5501,111 @@ const Wu = { class: "flex" }, Xu = ["aria-label"], qu = { class: "ml-auto mb-2" d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12" }) ]) -], -1), Ud = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Kd = { +], -1), wu = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Su = { class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400", id: "modal-title" -}, Fd = { class: "mt-2" }, Yd = { class: "text-gray-500 mb-1" }, Wd = ["id"], Xd = { +}, _u = { class: "mt-2" }, xu = { class: "text-gray-500 mb-1" }, ku = ["id"], Du = { key: 0, class: "py-2" -}, qd = ["disabled", "onClick"], Gd = { +}, Cu = ["disabled", "onClick"], Mu = { name: "VFModalUpload" -}, Jd = /* @__PURE__ */ Object.assign(Gd, { +}, Eu = /* @__PURE__ */ Object.assign(Mu, { props: { current: Object }, setup(t) { - const e = t, r = j("emitter"), { apiUrl: o } = Te(), { t: i } = j("i18n"), a = j("maxFileSize"), n = L(null), m = L(null), g = L(null), f = L([]), h = L(""), p = L(!0), b = () => { - h.value = "", n.value.start(); - }, E = j("postData"); - return Ce(() => { - n.value = new ct.Uploader({ + const e = t, r = P("emitter"), { apiUrl: o } = Ie(), { t: a } = P("i18n"), n = P("maxFileSize"), l = L(null), h = L(null), v = L(null), m = L([]), p = L(""), b = L(!0), w = () => { + p.value = "", l.value.start(); + }, E = P("postData"); + return Me(() => { + l.value = new ft.Uploader({ runtimes: "html5", - browse_button: g.value, - container: m.value, - max_file_size: a, + browse_button: v.value, + container: h.value, + max_file_size: n, multiple_queues: !0, file_data_name: "file", - url: o.value + "?" + We(Object.assign(E, { q: "upload", adapter: e.current.adapter, path: e.current.dirname })), + url: o.value + "?" + Fe(Object.assign(E, { q: "upload", adapter: e.current.adapter, path: e.current.dirname })), headers: { - ...Et && { "X-CSRF-Token": Et } + ...Lt && { "X-CSRF-Token": Lt } }, init: { PostInit: function() { }, - FilesAdded: function(D, T) { - p.value = !1, ct.each(T, function(I) { - f.value.push({ + FilesAdded: function(C, A) { + b.value = !1, ft.each(A, function(I) { + m.value.push({ id: I.id, name: I.name, - size: ct.formatSize(I.size), + size: ft.formatSize(I.size), percent: "" }); }); }, - UploadProgress: function(D, T) { - f.value[f.value.findIndex((I) => I.id == T.id)].percent = T.percent + "%"; + UploadProgress: function(C, A) { + m.value[m.value.findIndex((I) => I.id == A.id)].percent = A.percent + "%"; }, UploadComplete: function() { - p.value = !0, r.emit("vf-fetch", { params: { q: "index", adapter: e.current.adapter, path: e.current.dirname } }); + b.value = !0, r.emit("vf-fetch", { params: { q: "index", adapter: e.current.adapter, path: e.current.dirname } }); }, - Error: function(D, T) { - n.value.stop(), T.code == ct.HTTP_ERROR ? h.value = i(JSON.parse(T.response).message) : T.code == ct.FILE_SIZE_ERROR ? h.value = i("The selected file exceeds the maximum file size. You cannot upload files greater than %s", [a]) : h.value = i(T.message); + Error: function(C, A) { + l.value.stop(), A.code == ft.HTTP_ERROR ? p.value = a(JSON.parse(A.response).message) : A.code == ft.FILE_SIZE_ERROR ? p.value = a("The selected file exceeds the maximum file size. You cannot upload files greater than %s", [n]) : p.value = a(A.message); } } - }), n.value.init(); - }), (D, T) => (y(), J(Ae, null, { + }), l.value.init(); + }), (C, A) => (S(), F(Le, null, { buttons: q(() => [ u("button", { - disabled: p.value, - onClick: Ke(b, ["prevent"]), + disabled: b.value, + onClick: Xe(w, ["prevent"]), type: "button", - class: he([p.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", "w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 text-base font-medium text-white focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm"]) - }, $(x(i)("Upload")), 11, qd), + class: ce([b.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", "w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 text-base font-medium text-white focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm"]) + }, M(_(a)("Upload")), 11, Cu), u("button", { type: "button", - onClick: T[1] || (T[1] = (I) => x(r).emit("vf-modal-close")), + onClick: A[1] || (A[1] = (I) => _(r).emit("vf-modal-close")), class: "mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm" - }, $(x(i)("Cancel")), 1) + }, M(_(a)("Cancel")), 1) ]), default: q(() => [ - u("div", Bd, [ - Hd, - u("div", Ud, [ - u("h3", Kd, $(x(i)("Upload files")), 1), - u("div", Fd, [ - u("div", Yd, [ - (y(!0), S(ue, null, ke(f.value, (I) => (y(), S("div", null, [ + u("div", bu, [ + yu, + u("div", wu, [ + u("h3", Su, M(_(a)("Upload files")), 1), + u("div", _u, [ + u("div", xu, [ + (S(!0), D(ae, null, _e(m.value, (I) => (S(), D("div", null, [ u("div", { id: I.id }, [ - ie($(I.name) + " ( " + $(I.size) + ") ", 1), - u("b", null, $(I.percent), 1) - ], 8, Wd) + re(M(I.name) + " ( " + M(I.size) + ") ", 1), + u("b", null, M(I.percent), 1) + ], 8, ku) ]))), 256)), - f.value.length ? X("", !0) : (y(), S("div", Xd, $(x(i)("No files selected!")), 1)) + m.value.length ? Z("", !0) : (S(), D("div", Du, M(_(a)("No files selected!")), 1)) ]), u("div", { class: "text-gray-500", ref_key: "container", - ref: m + ref: h }, [ u("button", { ref_key: "pickFiles", - ref: g, + ref: v, type: "button", class: "mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm" - }, $(x(i)("Select Files")), 513) + }, M(_(a)("Select Files")), 513) ], 512), - h.value.length ? (y(), J(Oe, { + p.value.length ? (S(), F(Oe, { key: 0, - onHidden: T[0] || (T[0] = (I) => h.value = ""), + onHidden: A[0] || (A[0] = (I) => p.value = ""), error: "" }, { default: q(() => [ - ie($(h.value), 1) + re(M(p.value), 1) ]), _: 1 - })) : X("", !0) + })) : Z("", !0) ]) ]) ]) @@ -5332,7 +5613,7 @@ const Wu = { class: "flex" }, Xu = ["aria-label"], qu = { class: "ml-auto mb-2" _: 1 })); } -}), Zd = { class: "sm:flex sm:items-start" }, Qd = /* @__PURE__ */ u("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" }, [ +}), $u = { class: "sm:flex sm:items-start" }, Tu = /* @__PURE__ */ u("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__ */ u("svg", { xmlns: "http://www.w3.org/2000/svg", class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100", @@ -5347,10 +5628,10 @@ const Wu = { class: "flex" }, Xu = ["aria-label"], qu = { class: "ml-auto mb-2" 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), eh = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, th = { +], -1), Au = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Iu = { class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400", id: "modal-title" -}, rh = { class: "mt-2" }, oh = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, ah = { +}, Lu = { class: "mt-2" }, Ou = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, Pu = { 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", @@ -5358,13 +5639,13 @@ const Wu = { class: "flex" }, Xu = ["aria-label"], qu = { class: "ml-auto mb-2" viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, sh = /* @__PURE__ */ u("path", { +}, Nu = /* @__PURE__ */ u("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), ih = [ - sh -], nh = { +}, null, -1), ju = [ + Nu +], zu = { key: 1, xmlns: "http://www.w3.org/2000/svg", class: "h-5 w-5 text-neutral-500", @@ -5372,81 +5653,81 @@ const Wu = { class: "flex" }, Xu = ["aria-label"], qu = { class: "ml-auto mb-2" viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, lh = /* @__PURE__ */ u("path", { +}, Vu = /* @__PURE__ */ u("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), ch = [ - lh -], uh = { class: "ml-1.5" }, dh = ["onKeyup", "placeholder"], hh = { +}, null, -1), Ru = [ + Vu +], Hu = { class: "ml-1.5" }, Bu = ["onKeyup", "placeholder"], Uu = { name: "VFModalArchive" -}, fh = /* @__PURE__ */ Object.assign(hh, { +}, Ku = /* @__PURE__ */ Object.assign(Uu, { props: { selection: Object, current: Object }, setup(t) { - const e = t, r = j("emitter"); - j("storage"); - const o = j("adapter"), { t: i } = j("i18n"), a = L(""), n = L(""), m = L(e.selection.items), g = () => { - m.value.length && r.emit("vf-fetch", { + const e = t, r = P("emitter"); + P("storage"); + const o = P("adapter"), { t: a } = P("i18n"), n = L(""), l = L(""), h = L(e.selection.items), v = () => { + h.value.length && r.emit("vf-fetch", { params: { q: "archive", adapter: o.value, path: e.current.dirname, - items: JSON.stringify(m.value.map(({ path: f, type: h }) => ({ path: f, type: h }))), - name: a.value + items: JSON.stringify(h.value.map(({ path: m, type: p }) => ({ path: m, type: p }))), + name: n.value }, onSuccess: () => { - r.emit("vf-toast-push", { label: i("The file(s) archived.") }); + r.emit("vf-toast-push", { label: a("The file(s) archived.") }); }, - onError: (f) => { - n.value = i(f.message); + onError: (m) => { + l.value = a(m.message); } }); }; - return (f, h) => (y(), J(Ae, null, { + return (m, p) => (S(), F(Le, null, { buttons: q(() => [ u("button", { type: "button", - onClick: g, + onClick: v, class: "w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 dark:bg-gray-700 dark:hover:bg-gray-600/75 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm" - }, $(x(i)("Archive")), 1), + }, M(_(a)("Archive")), 1), u("button", { type: "button", - onClick: h[2] || (h[2] = (p) => x(r).emit("vf-modal-close")), + onClick: p[2] || (p[2] = (b) => _(r).emit("vf-modal-close")), class: "mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm" - }, $(x(i)("Cancel")), 1) + }, M(_(a)("Cancel")), 1) ]), default: q(() => [ - u("div", Zd, [ - Qd, - u("div", eh, [ - u("h3", th, $(x(i)("Archive the files")), 1), - u("div", rh, [ - (y(!0), S(ue, null, ke(m.value, (p) => (y(), S("p", oh, [ - p.type == "dir" ? (y(), S("svg", ah, ih)) : (y(), S("svg", nh, ch)), - u("span", uh, $(p.basename), 1) + u("div", $u, [ + Tu, + u("div", Au, [ + u("h3", Iu, M(_(a)("Archive the files")), 1), + u("div", Lu, [ + (S(!0), D(ae, null, _e(h.value, (b) => (S(), D("p", Ou, [ + b.type == "dir" ? (S(), D("svg", Pu, ju)) : (S(), D("svg", zu, Ru)), + u("span", Hu, M(b.basename), 1) ]))), 256)), - _e(u("input", { - "onUpdate:modelValue": h[0] || (h[0] = (p) => a.value = p), - onKeyup: st(g, ["enter"]), + Se(u("input", { + "onUpdate:modelValue": p[0] || (p[0] = (b) => n.value = b), + onKeyup: ot(v, ["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: x(i)("Archive name. (.zip file will be created)"), + placeholder: _(a)("Archive name. (.zip file will be created)"), type: "text" - }, null, 40, dh), [ - [it, a.value] + }, null, 40, Bu), [ + [nt, n.value] ]), - n.value.length ? (y(), J(Oe, { + l.value.length ? (S(), F(Oe, { key: 0, - onHidden: h[1] || (h[1] = (p) => n.value = ""), + onHidden: p[1] || (p[1] = (b) => l.value = ""), error: "" }, { default: q(() => [ - ie($(n.value), 1) + re(M(l.value), 1) ]), _: 1 - })) : X("", !0) + })) : Z("", !0) ]) ]) ]) @@ -5454,7 +5735,7 @@ const Wu = { class: "flex" }, Xu = ["aria-label"], qu = { class: "ml-auto mb-2" _: 1 })); } -}), mh = { class: "sm:flex sm:items-start" }, gh = /* @__PURE__ */ u("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" }, [ +}), Yu = { class: "sm:flex sm:items-start" }, Wu = /* @__PURE__ */ u("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__ */ u("svg", { xmlns: "http://www.w3.org/2000/svg", class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100", @@ -5469,10 +5750,10 @@ const Wu = { class: "flex" }, Xu = ["aria-label"], qu = { class: "ml-auto mb-2" 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), ph = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, vh = { +], -1), Xu = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Zu = { class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400", id: "modal-title" -}, bh = { class: "mt-2" }, yh = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, wh = { +}, qu = { class: "mt-2" }, Fu = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, Gu = { 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", @@ -5480,13 +5761,13 @@ const Wu = { class: "flex" }, Xu = ["aria-label"], qu = { class: "ml-auto mb-2" viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, xh = /* @__PURE__ */ u("path", { +}, Ju = /* @__PURE__ */ u("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), _h = [ - xh -], kh = { +}, null, -1), Qu = [ + Ju +], eh = { key: 1, xmlns: "http://www.w3.org/2000/svg", class: "h-5 w-5 text-neutral-500", @@ -5494,74 +5775,74 @@ const Wu = { class: "flex" }, Xu = ["aria-label"], qu = { class: "ml-auto mb-2" viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, Sh = /* @__PURE__ */ u("path", { +}, th = /* @__PURE__ */ u("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), Dh = [ - Sh -], Ch = { class: "ml-1.5" }, Mh = { class: "my-1 text-sm text-gray-500" }, $h = { +}, null, -1), rh = [ + th +], sh = { class: "ml-1.5" }, oh = { class: "my-1 text-sm text-gray-500" }, nh = { name: "VFModalUnarchive" -}, Eh = /* @__PURE__ */ Object.assign($h, { +}, ih = /* @__PURE__ */ Object.assign(nh, { props: { selection: Object, current: Object }, setup(t) { - const e = t, r = j("emitter"); - j("storage"); - const o = j("adapter"), { t: i } = j("i18n"); + const e = t, r = P("emitter"); + P("storage"); + const o = P("adapter"), { t: a } = P("i18n"); L(""); - const a = L(e.selection.items[0]), n = L(""), m = L([]), g = () => { + const n = L(e.selection.items[0]), l = L(""), h = L([]), v = () => { r.emit("vf-fetch", { params: { q: "unarchive", adapter: o.value, path: e.current.dirname, - item: a.value.path + item: n.value.path }, onSuccess: () => { - r.emit("vf-toast-push", { label: i("The file unarchived.") }); + r.emit("vf-toast-push", { label: a("The file unarchived.") }); }, - onError: (f) => { - n.value = i(f.message); + onError: (m) => { + l.value = a(m.message); } }); }; - return (f, h) => (y(), J(Ae, null, { + return (m, p) => (S(), F(Le, null, { buttons: q(() => [ u("button", { type: "button", - onClick: g, + onClick: v, class: "w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 dark:bg-gray-700 dark:hover:bg-gray-600/75 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm" - }, $(x(i)("Unarchive")), 1), + }, M(_(a)("Unarchive")), 1), u("button", { type: "button", - onClick: h[1] || (h[1] = (p) => x(r).emit("vf-modal-close")), + onClick: p[1] || (p[1] = (b) => _(r).emit("vf-modal-close")), class: "mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm" - }, $(x(i)("Cancel")), 1) + }, M(_(a)("Cancel")), 1) ]), default: q(() => [ - u("div", mh, [ - gh, - u("div", ph, [ - u("h3", vh, $(x(i)("Unarchive")), 1), - u("div", bh, [ - (y(!0), S(ue, null, ke(m.value, (p) => (y(), S("p", yh, [ - p.type == "dir" ? (y(), S("svg", wh, _h)) : (y(), S("svg", kh, Dh)), - u("span", Ch, $(p.basename), 1) + u("div", Yu, [ + Wu, + u("div", Xu, [ + u("h3", Zu, M(_(a)("Unarchive")), 1), + u("div", qu, [ + (S(!0), D(ae, null, _e(h.value, (b) => (S(), D("p", Fu, [ + b.type == "dir" ? (S(), D("svg", Gu, Qu)) : (S(), D("svg", eh, rh)), + u("span", sh, M(b.basename), 1) ]))), 256)), - u("p", Mh, $(x(i)("The archive will be unarchived at")) + " (" + $(t.current.dirname) + ")", 1), - n.value.length ? (y(), J(Oe, { + u("p", oh, M(_(a)("The archive will be unarchived at")) + " (" + M(t.current.dirname) + ")", 1), + l.value.length ? (S(), F(Oe, { key: 0, - onHidden: h[0] || (h[0] = (p) => n.value = ""), + onHidden: p[0] || (p[0] = (b) => l.value = ""), error: "" }, { default: q(() => [ - ie($(n.value), 1) + re(M(l.value), 1) ]), _: 1 - })) : X("", !0) + })) : Z("", !0) ]) ]) ]) @@ -5569,7 +5850,7 @@ const Wu = { class: "flex" }, Xu = ["aria-label"], qu = { class: "ml-auto mb-2" _: 1 })); } -}), Th = { class: "sm:flex sm:items-start" }, Ah = /* @__PURE__ */ u("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" }, [ +}), ah = { class: "sm:flex sm:items-start" }, lh = /* @__PURE__ */ u("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__ */ u("svg", { class: "h-6 w-6 stroke-red-600 dark:stroke-red-200", xmlns: "http://www.w3.org/2000/svg", @@ -5585,10 +5866,10 @@ const Wu = { class: "flex" }, Xu = ["aria-label"], qu = { class: "ml-auto mb-2" 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), Oh = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Ih = { +], -1), ch = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, dh = { class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400", id: "modal-title" -}, Lh = { class: "mt-2" }, Ph = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, Nh = { +}, uh = { class: "mt-2" }, hh = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, fh = { 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", @@ -5596,13 +5877,13 @@ const Wu = { class: "flex" }, Xu = ["aria-label"], qu = { class: "ml-auto mb-2" viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, jh = /* @__PURE__ */ u("path", { +}, ph = /* @__PURE__ */ u("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), zh = [ - jh -], Vh = { +}, null, -1), gh = [ + ph +], mh = { key: 1, xmlns: "http://www.w3.org/2000/svg", class: "h-5 w-5 text-neutral-500", @@ -5610,13 +5891,13 @@ const Wu = { class: "flex" }, Xu = ["aria-label"], qu = { class: "ml-auto mb-2" viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "1" -}, Rh = /* @__PURE__ */ u("path", { +}, vh = /* @__PURE__ */ u("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), Bh = [ - Rh -], Hh = { class: "ml-1.5" }, Uh = { class: "text-sm text-gray-500 pb-1 pt-3" }, Kh = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, Fh = /* @__PURE__ */ u("svg", { +}, null, -1), bh = [ + vh +], yh = { class: "ml-1.5" }, wh = { class: "text-sm text-gray-500 pb-1 pt-3" }, Sh = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, _h = /* @__PURE__ */ u("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", @@ -5629,71 +5910,71 @@ const Wu = { class: "flex" }, Xu = ["aria-label"], qu = { class: "ml-auto mb-2" "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), Yh = { class: "ml-1.5 overflow-auto" }, Wh = { +], -1), xh = { class: "ml-1.5 overflow-auto" }, kh = { name: "VFModalMove" -}, Xh = /* @__PURE__ */ Object.assign(Wh, { +}, Dh = /* @__PURE__ */ Object.assign(kh, { props: { selection: Object, current: Object }, setup(t) { - const e = t, r = j("emitter"), { t: o } = j("i18n"); - j("storage"); - const i = j("adapter"), a = L(e.selection.items.from), n = L(""), m = () => { - a.value.length && r.emit("vf-fetch", { + const e = t, r = P("emitter"), { t: o } = P("i18n"); + P("storage"); + const a = P("adapter"), n = L(e.selection.items.from), l = L(""), h = () => { + n.value.length && r.emit("vf-fetch", { params: { q: "move", - adapter: i.value, + adapter: a.value, path: e.current.dirname, - items: JSON.stringify(a.value.map(({ path: g, type: f }) => ({ path: g, type: f }))), + items: JSON.stringify(n.value.map(({ path: v, type: m }) => ({ path: v, type: m }))), item: e.selection.items.to.path }, onSuccess: () => { r.emit("vf-toast-push", { label: o("Files moved.", e.selection.items.to.name) }); }, - onError: (g) => { - n.value = o(g.message); + onError: (v) => { + l.value = o(v.message); } }); }; - return (g, f) => (y(), J(Ae, null, { + return (v, m) => (S(), F(Le, null, { buttons: q(() => [ u("button", { type: "button", - onClick: m, + onClick: h, class: "w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 dark:bg-gray-700 dark:hover:bg-gray-600/75 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm" - }, $(x(o)("Yes, Move!")), 1), + }, M(_(o)("Yes, Move!")), 1), u("button", { type: "button", - onClick: f[1] || (f[1] = (h) => x(r).emit("vf-modal-close")), + onClick: m[1] || (m[1] = (p) => _(r).emit("vf-modal-close")), class: "mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm" - }, $(x(o)("Cancel")), 1) + }, M(_(o)("Cancel")), 1) ]), default: q(() => [ - u("div", Th, [ - Ah, - u("div", Oh, [ - u("h3", Ih, $(x(o)("Move files")), 1), - u("div", Lh, [ - (y(!0), S(ue, null, ke(a.value, (h) => (y(), S("p", Ph, [ - h.type == "dir" ? (y(), S("svg", Nh, zh)) : (y(), S("svg", Vh, Bh)), - u("span", Hh, $(h.path), 1) + u("div", ah, [ + lh, + u("div", ch, [ + u("h3", dh, M(_(o)("Move files")), 1), + u("div", uh, [ + (S(!0), D(ae, null, _e(n.value, (p) => (S(), D("p", hh, [ + p.type == "dir" ? (S(), D("svg", fh, gh)) : (S(), D("svg", mh, bh)), + u("span", yh, M(p.path), 1) ]))), 256)), - u("p", Uh, $(x(o)("Are you sure you want to move these files?")), 1), - u("p", Kh, [ - Fh, - u("span", Yh, $(t.selection.items.to.path), 1) + u("p", wh, M(_(o)("Are you sure you want to move these files?")), 1), + u("p", Sh, [ + _h, + u("span", xh, M(t.selection.items.to.path), 1) ]), - n.value.length ? (y(), J(Oe, { + l.value.length ? (S(), F(Oe, { key: 0, - onHidden: f[0] || (f[0] = (h) => n.value = ""), + onHidden: m[0] || (m[0] = (p) => l.value = ""), error: "" }, { default: q(() => [ - ie($(n.value), 1) + re(M(l.value), 1) ]), _: 1 - })) : X("", !0) + })) : Z("", !0) ]) ]) ]) @@ -5701,31 +5982,31 @@ const Wu = { class: "flex" }, Xu = ["aria-label"], qu = { class: "ml-auto mb-2" _: 1 })); } -}), qh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ +}), Ch = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, - ModalDelete: Cc, - ModalMessage: Lc, - ModalNewFolder: Uc, - ModalNewFile: Zc, - ModalPreview: Sd, - ModalRename: Rd, - ModalUpload: Jd, - ModalArchive: fh, - ModalUnarchive: Eh, - ModalMove: Xh -}, Symbol.toStringTag, { value: "Module" })), Ft = { - VueFinder: ec, - ...qh + ModalDelete: sc, + ModalMessage: uc, + ModalNewFolder: wc, + ModalNewFile: $c, + ModalPreview: tu, + ModalRename: vu, + ModalUpload: Eu, + ModalArchive: Ku, + ModalUnarchive: ih, + ModalMove: Dh +}, Symbol.toStringTag, { value: "Module" })), Xt = { + VueFinder: Al, + ...Ch }; -const Zh = { +const $h = { install(t) { - for (const e in Ft) - if (Ft.hasOwnProperty(e)) { - const r = Ft[e]; + for (const e in Xt) + if (Xt.hasOwnProperty(e)) { + const r = Xt[e]; t.component(r.name, r); } } }; export { - Zh as default + $h as default }; diff --git a/dist/vuefinder.umd.cjs b/dist/vuefinder.umd.cjs index 500084a2..93ec6c0d 100644 --- a/dist/vuefinder.umd.cjs +++ b/dist/vuefinder.umd.cjs @@ -1,21 +1,22 @@ -(function(e,He){typeof exports=="object"&&typeof module<"u"?module.exports=He(require("vue"),require("plupload")):typeof define=="function"&&define.amd?define(["vue","plupload"],He):(e=typeof globalThis<"u"?globalThis:e||self,e.VueFinder=He(e.Vue,e.plupload))})(this,function(e,He){var uo;"use strict";const Fe=(r=>r&&typeof r=="object"&&"default"in r?r:{default:r})(He),rt=(uo=document.querySelector('meta[name="csrf-token"]'))==null?void 0:uo.getAttribute("content"),ot=(r,{method:t="get",params:o={},json:n=!0,signal:s=null})=>{const a={method:t};if(a.signal=s,t=="get")r+="?"+new URLSearchParams(o);else{a.headers={},rt&&(a.headers["X-CSRF-Token"]=rt);let l=new FormData;for(const[m,p]of Object.entries(o))l.append(m,p);a.body=l}return fetch(r,a).then(l=>l.ok?n?l.json():l.text():l.json().then(Promise.reject.bind(Promise)))};function To(r){return{all:r=r||new Map,on:function(t,o){var n=r.get(t);n?n.push(o):r.set(t,[o])},off:function(t,o){var n=r.get(t);n&&(o?n.splice(n.indexOf(o)>>>0,1):r.set(t,[]))},emit:function(t,o){var n=r.get(t);n&&n.slice().map(function(s){s(o)}),(n=r.get("*"))&&n.slice().map(function(s){s(t,o)})}}}function yt(r){let t=localStorage.getItem(r+"_storage");const o=e.ref(JSON.parse(t));e.watch(o,n);function n(){o.value===null||o.value===""?localStorage.removeItem(r+"_storage"):localStorage.setItem(r+"_storage",JSON.stringify(o.value))}function s(m,p){o.value=Object.assign({...o.value},{[m]:p})}function a(){o.value=null}return{getStore:(m,p=null)=>o.value===null||o.value===""?p:o.value.hasOwnProperty(m)?o.value[m]:p,setStore:s,clearStore:a}}const Jt=e.ref("");function he(){function r(t){Jt.value=t}return{apiUrl:Jt,setApiUrl:r}}const Ao={class:"border-neutral-300 flex justify-between items-center py-1 text-sm"},Oo={key:0,class:"flex text-center"},Lo=["aria-label"],Io=[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)],jo=["aria-label"],Po=[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)],zo=["aria-label"],Ro=[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)],Ho=["aria-label"],Fo=[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)],Uo=["aria-label"],Ko=[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)],Yo=["aria-label"],Wo=[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)],Xo=["aria-label"],qo=[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)],Go={key:1,class:"flex text-center"},Jo={class:"pl-2"},Zo={class:"dark:bg-gray-700 bg-gray-200 text-xs px-2 py-1 rounded"},Qo={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"},en=[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),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)],tn={class:"flex text-center items-center justify-end"},rn=["aria-label"],on=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 3v2.25m6.364.386l-1.591 1.591M21 12h-2.25m-.386 6.364l-1.591-1.591M12 18.75V21m-4.773-4.227l-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0z"},null,-1)],nn=["aria-label"],an={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"},sn={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"},ln={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"},cn=["aria-label"],dn={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"},hn={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"},un=Object.assign({name:"VFToolbar"},{props:{data:Object},setup(r){const t=e.inject("emitter"),{getStore:o,setStore:n}=e.inject("storage"),{t:s}=e.inject("i18n"),a=e.ref(o("viewport","grid")),l=e.ref([]),m=e.ref(o("full-screen",!1)),p=e.ref("");t.on("vf-search-query",({newQuery:b})=>{p.value=b});const f=e.inject("loadingState"),u=()=>f.value,g=()=>{m.value=!m.value,t.emit("vf-fullscreen-toggle")};return t.on("vf-nodes-selected",b=>{l.value=b}),t.on("vf-view-toggle",b=>{n("viewport",b),a.value=b}),(b,D)=>(e.openBlock(),e.createElementBlock("div",Ao,[p.value.length?(e.openBlock(),e.createElementBlock("div",Go,[e.createElementVNode("div",Jo,[e.createTextVNode(e.toDisplayString(e.unref(s)("Search results for"))+" ",1),e.createElementVNode("span",Zo,e.toDisplayString(p.value),1)]),u()?(e.openBlock(),e.createElementBlock("svg",Qo,en)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",Oo,[e.createElementVNode("div",{class:"mx-1.5","aria-label":e.unref(s)("New Folder"),"data-microtip-position":"bottom-right",role:"tooltip",onClick:D[0]||(D[0]=_=>e.unref(t).emit("vf-modal-show",{type:"new-folder",items:l.value}))},Io,8,Lo),e.createElementVNode("div",{class:"mx-1.5","aria-label":e.unref(s)("New File"),"data-microtip-position":"bottom",role:"tooltip",onClick:D[1]||(D[1]=_=>e.unref(t).emit("vf-modal-show",{type:"new-file",items:l.value}))},Po,8,jo),e.createElementVNode("div",{class:"mx-1.5","aria-label":e.unref(s)("Rename"),"data-microtip-position":"bottom",role:"tooltip",onClick:D[2]||(D[2]=_=>l.value.length!=1||e.unref(t).emit("vf-modal-show",{type:"rename",items:l.value}))},[(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",class:e.normalizeClass([l.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"},Ro,2))],8,zo),e.createElementVNode("div",{class:"mx-1.5","aria-label":e.unref(s)("Delete"),"data-microtip-position":"bottom",role:"tooltip",onClick:D[3]||(D[3]=_=>!l.value.length||e.unref(t).emit("vf-modal-show",{type:"delete",items:l.value}))},[(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",class:e.normalizeClass([l.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"},Fo,2))],8,Ho),e.createElementVNode("div",{class:"mx-1.5","aria-label":e.unref(s)("Upload"),"data-microtip-position":"bottom",role:"tooltip",onClick:D[4]||(D[4]=_=>e.unref(t).emit("vf-modal-show",{type:"upload",items:l.value}))},Ko,8,Uo),l.value.length==1&&l.value[0].mime_type=="application/zip"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"mx-1.5","aria-label":e.unref(s)("Unrchive"),"data-microtip-position":"bottom",role:"tooltip",onClick:D[5]||(D[5]=_=>!l.value.length||e.unref(t).emit("vf-modal-show",{type:"unarchive",items:l.value}))},[(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",class:e.normalizeClass([l.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"},Wo,2))],8,Yo)):(e.openBlock(),e.createElementBlock("div",{key:1,class:"mx-1.5","aria-label":e.unref(s)("Archive"),"data-microtip-position":"bottom",role:"tooltip",onClick:D[6]||(D[6]=_=>!l.value.length||e.unref(t).emit("vf-modal-show",{type:"archive",items:l.value}))},[(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",class:e.normalizeClass([l.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"},qo,2))],8,Xo))])),e.createElementVNode("div",tn,[e.createElementVNode("div",{class:"mx-1.5","aria-label":e.unref(s)("Dark Mode"),"data-microtip-position":"bottom",role:"tooltip"},[(e.openBlock(),e.createElementBlock("svg",{onClick:D[7]||(D[7]=_=>e.unref(t).emit("vf-darkMode-toggle")),viewBox:"0 0 24 24","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"h-6 w-6 m-auto cursor-pointer stroke-sky-500 fill-sky-100 hover:stroke-sky-600 dark:stroke-gray-400 dark:fill-gray-400/20 dark:hover:stroke-gray-300"},on))],8,rn),e.createElementVNode("div",{class:"mx-1.5","aria-label":e.unref(s)("Toggle Full Screen"),"data-microtip-position":"bottom-left",role:"tooltip",onClick:g},[(e.openBlock(),e.createElementBlock("svg",an,[m.value?(e.openBlock(),e.createElementBlock("path",sn)):(e.openBlock(),e.createElementBlock("path",ln))]))],8,nn),e.createElementVNode("div",{class:"mx-1.5","aria-label":e.unref(s)("Change View"),"data-microtip-position":"bottom-left",role:"tooltip",onClick:D[8]||(D[8]=_=>p.value.length||e.unref(t).emit("vf-view-toggle",a.value=="list"?"grid":"list"))},[(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",class:e.normalizeClass([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"]),fill:"none",viewBox:"0 0 24 24",stroke:"none","stroke-width":"1.5"},[a.value=="grid"?(e.openBlock(),e.createElementBlock("path",dn)):e.createCommentVNode("",!0),a.value=="list"?(e.openBlock(),e.createElementBlock("path",hn)):e.createCommentVNode("",!0)],2))],8,cn)])]))}});var fn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Zt={exports:{}};(function(r,t){(function(o,n){r.exports=n()})(fn,function(){function o(h,c){if(!(h instanceof c))throw new TypeError("Cannot call a class as a function")}function n(h,c){for(var i=0;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function b(h,c,i){return g()?b=Reflect.construct:b=function(d,v,w){var k=[null];k.push.apply(k,v);var S=Function.bind.apply(d,k),$=new S;return w&&u($,w.prototype),$},b.apply(null,arguments)}function D(h){return Function.toString.call(h).indexOf("[native code]")!==-1}function _(h){var c=typeof Map=="function"?new Map:void 0;return _=function(y){if(y===null||!D(y))return y;if(typeof y!="function")throw new TypeError("Super expression must either be null or a function");if(typeof c<"u"){if(c.has(y))return c.get(y);c.set(y,d)}function d(){return b(y,arguments,f(this).constructor)}return d.prototype=Object.create(y.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),u(d,y)},_(h)}function E(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}function V(h,c){return c&&(typeof c=="object"||typeof c=="function")?c:E(h)}function I(h){var c=g();return function(){var y=f(h),d;if(c){var v=f(this).constructor;d=Reflect.construct(y,arguments,v)}else d=y.apply(this,arguments);return V(this,d)}}function L(h,c){for(;!Object.prototype.hasOwnProperty.call(h,c)&&(h=f(h),h!==null););return h}function M(h,c,i){return typeof Reflect<"u"&&Reflect.get?M=Reflect.get:M=function(d,v,w){var k=L(d,v);if(!!k){var S=Object.getOwnPropertyDescriptor(k,v);return S.get?S.get.call(w):S.value}},M(h,c,i||h)}function R(h,c){return T(h)||J(h,c)||Z(h,c)||ie()}function j(h){return x(h)||U(h)||Z(h)||ce()}function x(h){if(Array.isArray(h))return ne(h)}function T(h){if(Array.isArray(h))return h}function U(h){if(typeof Symbol<"u"&&Symbol.iterator in Object(h))return Array.from(h)}function J(h,c){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(h)))){var i=[],y=!0,d=!1,v=void 0;try{for(var w=h[Symbol.iterator](),k;!(y=(k=w.next()).done)&&(i.push(k.value),!(c&&i.length===c));y=!0);}catch(S){d=!0,v=S}finally{try{!y&&w.return!=null&&w.return()}finally{if(d)throw v}}return i}}function Z(h,c){if(!!h){if(typeof h=="string")return ne(h,c);var i=Object.prototype.toString.call(h).slice(8,-1);if(i==="Object"&&h.constructor&&(i=h.constructor.name),i==="Map"||i==="Set")return Array.from(h);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return ne(h,c)}}function ne(h,c){(c==null||c>h.length)&&(c=h.length);for(var i=0,y=new Array(c);i1&&arguments[1]!==void 0?arguments[1]:0;return{left:c.x,top:c.y,right:c.x,bottom:c.y,width:i,height:i}},B=function(c){return{x:c,y:c}},ee=function(h,c,i){window.addEventListener("resize",c),window.addEventListener("scroll",c),h.forEach(function(y,d){i.observe(y,{childList:d!==0,attributes:!0})})},H=function(h){var c=Pe(h);return c.x||c.y?!0:h instanceof HTMLDocument?h.body?!!(h.body.scrollTop=1):!!(h.documentElement.scrollTop=1):!!(h.scrollTop=1)},ae=function(h){var c=document.createElement("div");return c.style.position="fixed",c.style.overflow="hidden",c.style.pointerEvents="none",c.style.zIndex="999999999999999999",c.classList.add(h),c},W=function(h){var c=document.createElement("div");return c.style.position="absolute",h||(c.style.background="rgba(0, 0, 255, 0.1)",c.style.border="1px solid rgba(0, 0, 255, 0.45)",c.style.display="none",c.style.pointerEvents="none"),c},pt=function(h,c){var i;return function(){for(var y=arguments.length,d=new Array(y),v=0;v=0?h.scrollLeft:je().x,y:h.scrollTop>=0?h.scrollTop:je().y}},fo=function(h){var c=h.elementRect,i=h.containerRect,y=h.tolerance,d=y===void 0?{x:0,y:0}:y,v=[];return c.top-d.yi.bottom&&v.push("bottom"),c.right+d.y>i.right&&v.push("right"),v},Cd=function(h){var c=h.event;return{x:c.clientX,y:c.clientY}},Vd=function(h){var c=h.scrollAmount,i=h.initialPointerPos,y=h.pointerPos,d={};return y.x>i.x-c.x?(d.left=i.x-c.x,d.width=y.x-i.x+c.x):(d.left=y.x,d.width=i.x-y.x-c.x),y.y>i.y-c.y?(d.top=i.y-c.y,d.height=y.y-i.y+c.y):(d.top=y.y,d.height=i.y-y.y-c.y),d},mo=function(c){var i={x:0,y:0},y=window.getComputedStyle(c);if(!y.transform||y.transform==="none")return i;if(y.transform.indexOf("3d")>=0){var d=y.transform.trim().match(/matrix3d\((.*?)\)/);if(d&&d.length){var v,w=(v=d[1])===null||v===void 0?void 0:v.split(",");i.x=parseInt(w[12])||0,i.y=parseInt(w[13])||0}return i}else{var k=y.transform.trim().match(/matrix\((.*?)\)/);if(k&&k.length){var S,$=(S=k[1])===null||S===void 0?void 0:S.split(",");i.x=parseInt($[4])||0,i.y=parseInt($[5])||0}return i}},$d=function(c){var i=c.style.transform;if(!i||i.indexOf("translate")<0)return mo(c);var y={x:0,y:0},d=i.trim().match(/translate[3dD]*?\(.*?\)/);if(d){var v,w=(v=d[0])===null||v===void 0?void 0:v.split("(");if(w){var k,S=(k=w[1])===null||k===void 0?void 0:k.split(",");y.x=parseInt(S[0])||0,y.y=parseInt(S[1])||0}}return!y.x&&!y.x?mo(c):y},Md=function(c){var i=c.style,y={x:parseInt(i.left)||0,y:parseInt(i.top)||0};if(!y.x&&!y.x){var d=window.getComputedStyle(c);return{x:parseInt(d.left)||0,y:parseInt(d.top)||0}}return y},Bd=function(h,c){return c?$d(h):Md(h)},Td=function(h){var c=h.element,i=h.edges,y=h.elementRect,d=h.containerRect,v=h.elementPos,w=h.useTransform;i.includes("top")&&tt(c,{y:v.y+d.top-y.top,x:v.x},w),i.includes("left")&&tt(c,{y:v.y,x:v.x+d.left-y.left},w),i.includes("bottom")&&tt(c,{y:v.y+d.bottom-y.bottom,x:v.x},w),i.includes("right")&&tt(c,{y:v.y,x:v.x+d.right-y.right},w)},po=function(h){var c=h.computedStyle,i=h.node,y=c.position,d=y==="absolute"||y==="relative"||y==="fixed";!(i instanceof HTMLDocument)&&!d&&(i.style.position="relative")},Ad=function(h){var c=h.shiftKey,i=h.keyboardDragSpeed,y=h.zoom,d=h.key,v=h.dragKeys,w=h.scrollDiff,k=h.canScroll,S=h.scrollCallback,$={x:0,y:0},N=c?i*4*y:i*y;return v.left.includes(d)&&($.x=w.x||-N,!c&&!w.x&&k&&S(["left"],i)),v.right.includes(d)&&($.x=w.x||N,!c&&!w.x&&k&&S(["right"],i)),v.up.includes(d)&&($.y=w.y||-N,!c&&!w.y&&k&&S(["top"],i)),v.down.includes(d)&&($.y=w.y||N,!c&&!w.y&&k&&S(["bottom"],i)),$},Od=function(h){var c=h.element,i=h.force,y=h.multiSelectionToggle,d=h.SelectedSet,v=h.hoverClassName;c.classList.contains(v)&&!i||(d.has(c)?y&&d.delete(c):d.add(c),c.classList.add(v))},Ld=function(h){var c=h.element,i=h.force,y=h.SelectedSet,d=h.PrevSelectedSet,v=h.hoverClassName;if(!c.classList.contains(v)&&!i)return!1;var w=y.has(c),k=d.has(c);w&&!k?y.delete(c):!w&&k&&y.add(c),c.classList.remove(v)},qt=function(h,c){return h.leftc.left&&h.topc.top},go=function(h){var c=h.element,i=h.posDirection,y=h.containerRect,d=h.useTransform,v=Bd(c,d),w=F(v,"+",i);tt(c,w,d);var k=c.getBoundingClientRect(),S=fo({elementRect:k,containerRect:y});Td({element:c,edges:S,elementRect:k,containerRect:y,elementPos:w,useTransform:d})},Id=function(h,c){window.removeEventListener("resize",c),window.removeEventListener("scroll",c),h.disconnect()},jd=function(h,c,i){if(!!c.length){var y=document&&document.documentElement&&document.documentElement.scrollTop&&document.documentElement,d=h instanceof HTMLDocument?y||document.body:h,v=c.includes("top")&&d.scrollTop>0,w=c.includes("bottom")&&d.scrollTop0,S=c.includes("right")&&d.scrollLeft1&&arguments[1]!==void 0?arguments[1]:0,k=(v=d[w])===null||v===void 0?void 0:v.parentNode;return k?(d.push(k),w++,y(d,w)):d};return this._parentNodes=i([this.HTMLNode]),this._parentNodes}}]),h}(),Rd=function(){function h(c){var i=this,y=c.DS,d=c.dragKeys,v=c.draggability,w=c.keyboardDrag,k=c.keyboardDragSpeed,S=c.useTransform,$=c.zoom;o(this,h),a(this,"_useTransform",void 0),a(this,"_prevCursorPos",void 0),a(this,"_prevScrollPos",void 0),a(this,"_elements",[]),a(this,"_draggability",void 0),a(this,"_dragKeys",void 0),a(this,"_dragKeysFlat",void 0),a(this,"_keyboardDrag",void 0),a(this,"_keyboardDragSpeed",void 0),a(this,"_zoom",void 0),a(this,"keyboardDrag",function(N){var A=N.event,P=N.key;if(!(!i._keyboardDrag||!i._dragKeysFlat.includes(P)||!i.DS.SelectedSet.size||!i._draggability||i.DS.continue)){var X={event:A,isDragging:!0,isDraggingKeyboard:!0};i.DS.publish(["Interaction:start:pre","Interaction:start"],X),i._elements=i.DS.getSelection(),i.handleZIndex(!0);var se=Ad({shiftKey:i.DS.stores.KeyStore.currentValues.includes("shift"),keyboardDragSpeed:i._keyboardDragSpeed,zoom:i._zoom,key:P,scrollCallback:i.DS.Area.scroll,scrollDiff:i._scrollDiff,canScroll:i.DS.stores.ScrollStore.canScroll,dragKeys:i._dragKeys});i._elements.forEach(function(G){return go({element:G,posDirection:se,containerRect:i.DS.SelectorArea.rect,useTransform:i._useTransform})}),i.DS.publish(["Interaction:update:pre","Interaction:update"],X)}}),a(this,"keyboardEnd",function(N){var A=N.event,P=N.key;if(!(!i._keyboardDrag||!i._dragKeysFlat.includes(P)||!i.DS.SelectedSet.size||!i._draggability)){var X={event:A,isDragging:i._draggability,isDraggingKeyboard:!0};i.DS.publish(["Interaction:end:pre","Interaction:end"],X)}}),a(this,"start",function(N){var A=N.isDragging,P=N.isDraggingKeyboard;!A||P||(i._prevCursorPos=null,i._prevScrollPos=null,i._elements=i.DS.getSelection(),i.handleZIndex(!0))}),a(this,"stop",function(N){N!=null&&N.isKeyboard||(i._prevCursorPos=null,i._prevScrollPos=null,i.handleZIndex(!1),i._elements=[])}),a(this,"update",function(N){var A=N.isDragging,P=N.isDraggingKeyboard;if(!(!A||!i._elements.length||P||i.DS.continue)){var X=F(i._cursorDiff,"+",i._scrollDiff);i._elements.forEach(function(se){return go({element:se,posDirection:X,containerRect:i.DS.SelectorArea.rect,useTransform:i._useTransform})})}}),a(this,"handleZIndex",function(N){i._elements.forEach(function(A){return A.style.zIndex="".concat((parseInt(A.style.zIndex)||0)+N?9999:-9998)})}),this.DS=y,this._useTransform=S,this._keyboardDragSpeed=k,this._keyboardDrag=w,this._zoom=$,this._draggability=v,this._dragKeys={up:d.up.map(function(N){return N.toLowerCase()}),down:d.down.map(function(N){return N.toLowerCase()}),left:d.left.map(function(N){return N.toLowerCase()}),right:d.right.map(function(N){return N.toLowerCase()})},this._dragKeysFlat=[].concat(j(this._dragKeys.up),j(this._dragKeys.down),j(this._dragKeys.left),j(this._dragKeys.right)),this.DS.subscribe("Interaction:start",this.start),this.DS.subscribe("Interaction:end",this.stop),this.DS.subscribe("Interaction:update",this.update),this.DS.subscribe("KeyStore:down",this.keyboardDrag),this.DS.subscribe("KeyStore:up",this.keyboardEnd)}return s(h,[{key:"_cursorDiff",get:function(){var i=this.DS.stores.PointerStore.currentVal,y=this._prevCursorPos?F(i,"-",this._prevCursorPos):{x:0,y:0};return this._prevCursorPos=i,y}},{key:"_scrollDiff",get:function(){var i=this.DS.stores.ScrollStore.currentVal,y=this._prevScrollPos?F(i,"-",this._prevScrollPos):{x:0,y:0};return this._prevScrollPos=i,y}}]),h}(),Hd=function(){function h(c){var i=this,y=c.DS,d=c.areaElement,v=c.draggability,w=c.immediateDrag,k=c.selectableClass;o(this,h),a(this,"_areaElement",void 0),a(this,"_draggability",void 0),a(this,"_immediateDrag",void 0),a(this,"_selectableClass",void 0),a(this,"isInteracting",void 0),a(this,"isDragging",void 0),a(this,"init",function(){return i.DS.publish("Interaction:init:pre",{})}),a(this,"_init",function(){i.stop(),i._areaElement.addEventListener("mousedown",i.start),i._areaElement.addEventListener("touchstart",i.start,{passive:!1}),i.DS.publish("Interaction:init",{})}),a(this,"start",function(S){return i.DS.publish("Interaction:start:pre",{event:S,isDragging:i.isDragging})}),a(this,"_start",function(S){S.type==="touchstart"&&S.preventDefault(),i._canInteract(S)&&(i.isInteracting=!0,i.isDragging=i.isDragEvent(S),i.DS.publish("Interaction:start",{event:S,isDragging:i.isDragging}),document.addEventListener("mouseup",i.reset),document.addEventListener("touchend",i.reset))}),a(this,"isDragEvent",function(S){var $=S.target.closest(".".concat(i._selectableClass));return!i._draggability||i.DS.stores.KeyStore.isMultiSelectKeyPressed(S)||!$?!1:(i._immediateDrag&&(i.DS.SelectedSet.size?i.DS.SelectedSet.has($)||(i.DS.SelectedSet.clear(),i.DS.SelectedSet.add($)):i.DS.SelectedSet.add($)),!!i.DS.SelectedSet.has($))}),a(this,"onClick",function(S){var $=S.event;if(!!i._canInteract($)&&!($.detail>0)){var N=i.DS,A=N.stores,P=A.PointerStore,X=A.KeyStore,se=N.SelectableSet,G=N.SelectedSet;P.start($);var Re=$.target;!se.has(Re)||(X.isMultiSelectKeyPressed($)||G.clear(),G.toggle(Re),i.reset())}}),a(this,"stop",function(){i.isInteracting=!1,i.isDragging=!1,i._areaElement.removeEventListener("mousedown",i.start),i._areaElement.removeEventListener("touchstart",i.start,{passive:!1}),document.removeEventListener("mouseup",i.reset),document.removeEventListener("touchend",i.reset)}),a(this,"update",function(S){var $=S.event,N=S.scroll_directions,A=S.scroll_multiplier;i.isInteracting&&i.DS.publish(["Interaction:update:pre","Interaction:update"],{event:$,scroll_directions:N,scroll_multiplier:A,isDragging:i.isDragging})}),a(this,"reset",function(S){return i.DS.publish("Interaction:end:pre",{event:S,isDragging:i.isDragging})}),a(this,"_reset",function(S){var $=i.isDragging;i.stop(),i.init(),i.DS.publish("Interaction:end",{event:S,isDragging:$})}),this._areaElement=d,this._draggability=v,this._immediateDrag=w,this._selectableClass=k,this.DS=y,this.DS.subscribe("PointerStore:updated",this.update),this.DS.subscribe("Selectable:click",this.onClick),this.DS.subscribe("Selectable:pointer",function(S){var $=S.event;return i.start($)}),this.DS.subscribe("Interaction:start:pre",function(S){var $=S.event;return i._start($)}),this.DS.subscribe("Interaction:init:pre",this._init),this.DS.subscribe("Interaction:end:pre",function(S){var $=S.event;return i._reset($)}),this.DS.subscribe("Area:scroll",this.update)}return s(h,[{key:"_canInteract",value:function(i){var y=i.clientX===0&&i.clientY===0&&i.detail===0&&i.target;return!(i.button===2||this.isInteracting||i.target&&!this.DS.SelectorArea.isInside(i.target)||!y&&!this.DS.SelectorArea.isClicked(i))}}]),h}(),Fd=function h(c){var i=this,y=c.DS;o(this,h),a(this,"subscribers",{}),a(this,"subscribe",function(d,v){return Array.isArray(i.subscribers[d])||(i.subscribers[d]=[]),i.subscribers[d].push(v),i.subscribers[d].length-1}),a(this,"unsubscribe",function(d,v,w){w>=0?i.subscribers[d].splice(w,1):v&&(i.subscribers[d]=i.subscribers[d].filter(function(k){return k!==v}))}),a(this,"publish",function(d,v){Array.isArray(d)?d.forEach(function(w){return i._publish(w,v)}):i._publish(d,v)}),a(this,"_publish",function(d,v){var w=i.subscribers[d];!Array.isArray(w)||(d.includes(":pre")?i._handlePrePublish(w,v):i._handlePublish(w,v))}),a(this,"_handlePublish",function(d,v){for(var w=0,k=d.length;w0&&arguments[0]!==void 0?arguments[0]:"append",S=document.body?"body":"documentElement",$="".concat(k,"Child");i.HTMLNode[$](i.DS.Selector.HTMLNode),document[S][$](i.HTMLNode)}),a(this,"updatePos",function(){i._rect=null;var k=i.DS.Area.rect,S=i.DS.Area.computedBorder,$=i.HTMLNode.style,N="".concat(k.top+S.top,"px"),A="".concat(k.left+S.left,"px"),P="".concat(k.width,"px"),X="".concat(k.height,"px");$.top!==N&&($.top=N),$.left!==A&&($.left=A),$.width!==P&&($.width=P),$.height!==X&&($.height=X)}),a(this,"stop",function(k){i.stopAutoScroll(),k&&i.applyElements("remove")}),a(this,"startAutoScroll",function(){i.currentEdges=[],i._scrollInterval=setInterval(function(){return i.handleAutoScroll()},16)}),a(this,"handleAutoScroll",function(){if(!i.DS.continue){var k=i.DS,S=k.stores.PointerStore,$=k.Area;i.currentEdges=fo({elementRect:O(S.currentVal),containerRect:i.rect,tolerance:i._overflowTolerance}),i.currentEdges.length&&$.scroll(i.currentEdges,i._autoScrollSpeed)}}),a(this,"stopAutoScroll",function(){i.currentEdges=[],clearInterval(i._scrollInterval)}),a(this,"isInside",function(k,S){return i.DS.Area.HTMLNode.contains(k)&&i.DS.stores.ScrollStore.canScroll?!0:qt(i.rect,S||k.getBoundingClientRect())}),this._autoScrollSpeed=v,this._overflowTolerance=w,this.DS=y,this.HTMLNode=ae(d),this.DS.subscribe("Area:modified",this.updatePos),this.DS.subscribe("Interaction:init",this.start),this.DS.subscribe("Interaction:start",this.startAutoScroll),this.DS.subscribe("Interaction:end",function(){i.updatePos(),i.stopAutoScroll()})}return s(h,[{key:"isClicked",value:function(i){var y=this.DS.stores.PointerStore,d=i?y.getPointerPosition(i):y.initialVal;return qt({left:d.x,top:d.y,right:d.x,bottom:d.y},this.rect)}},{key:"rect",get:function(){return this._rect?this._rect:this._rect=this.HTMLNode.getBoundingClientRect()}}]),h}(),qd=function(){function h(c){var i=this,y=c.DS,d=c.multiSelectKeys,v=c.multiSelectMode;o(this,h),a(this,"_multiSelectMode",void 0),a(this,"_multiSelectKeys",void 0),a(this,"_currentValues",new Set),a(this,"_keyMapping",{control:"ctrlKey",shift:"shiftKey",meta:"metaKey"}),a(this,"init",function(){document.addEventListener("keydown",i.keydown),document.addEventListener("keyup",i.keyup),window.addEventListener("blur",i.reset)}),a(this,"keydown",function(w){var k=w.key.toLowerCase();i.DS.publish("KeyStore:down:pre",{event:w,key:k}),i._currentValues.add(k),i.DS.publish("KeyStore:down",{event:w,key:k})}),a(this,"keyup",function(w){var k=w.key.toLowerCase();i.DS.publish("KeyStore:up:pre",{event:w,key:k}),i._currentValues.delete(k),i.DS.publish("KeyStore:up",{event:w,key:k})}),a(this,"stop",function(){document.removeEventListener("keydown",i.keydown),document.removeEventListener("keyup",i.reset),window.removeEventListener("blur",i.reset),i.reset()}),a(this,"reset",function(){return i._currentValues.clear()}),this.DS=y,this._multiSelectMode=v,this._multiSelectKeys=d.map(function(w){var k={ctrlKey:"Control",shiftKey:"Shift",metaKey:"Meta"},S=k[w];return S?(console.warn("[DragSelect] ".concat(w,' is deprecated. Use "').concat(S,'" instead. Act Now!. See docs for more info')),S.toLowerCase()):w.toLowerCase()}),this.DS.subscribe("Interaction:init",this.init)}return s(h,[{key:"isMultiSelectKeyPressed",value:function(i){var y=this;return!!(this._multiSelectMode||this.currentValues.some(function(d){return y._multiSelectKeys.includes(d)})||i&&this._multiSelectKeys.some(function(d){return i[y._keyMapping[d]]}))}},{key:"currentValues",get:function(){return Array.from(this._currentValues.values())}}]),h}(),Gd=function(){function h(c){var i=this,y=c.DS;o(this,h),a(this,"_isMouseInteraction",!1),a(this,"_initialValArea",void 0),a(this,"_currentValArea",void 0),a(this,"_lastValArea",void 0),a(this,"_initialVal",void 0),a(this,"_currentVal",void 0),a(this,"_lastVal",void 0),a(this,"_lastTouch",void 0),a(this,"init",function(){document.addEventListener("mousemove",i.update),document.addEventListener("touchmove",i.update,{passive:!1})}),a(this,"getPointerPosition",function(d){return Cd({event:i._normalizedEvent(d)})}),a(this,"update",function(d){!d||(i.DS.publish("PointerStore:updated:pre",{event:d}),i.currentVal=i.getPointerPosition(d),i._isMouseInteraction&&i.DS.publish("PointerStore:updated",{event:d}))}),a(this,"stop",function(){document.removeEventListener("mousemove",i.update),document.removeEventListener("touchmove",i.update,{passive:!1}),setTimeout(function(){return i._isMouseInteraction=!1},100)}),a(this,"reset",function(d){!d||(i.currentVal=i.lastVal=i.getPointerPosition(d),i.stop(),i.init())}),this.DS=y,this.DS.subscribe("Interaction:init",this.init),this.DS.subscribe("Interaction:start",function(d){var v=d.event;return i.start(v)}),this.DS.subscribe("Interaction:end",function(d){var v=d.event;return i.reset(v)})}return s(h,[{key:"start",value:function(i){!i||(this._isMouseInteraction=!0,this.currentVal=this.initialVal=this.getPointerPosition(i))}},{key:"_normalizedEvent",value:function(i){return"touches"in i&&i.type!=="touchend"&&(this._lastTouch=i),"touches"in i?this._lastTouch.touches[0]:i}},{key:"initialValArea",get:function(){return this._initialValArea?this._initialValArea:{x:0,y:0}}},{key:"currentValArea",get:function(){return this._currentValArea?this._currentValArea:{x:0,y:0}}},{key:"lastValArea",get:function(){return this._lastValArea?this._lastValArea:{x:0,y:0}}},{key:"initialVal",get:function(){return this._initialVal?this._initialVal:{x:0,y:0}},set:function(i){this._initialVal=i,this._initialValArea=i&&F(i,"-",F(C(this.DS.Area.rect),"+",C(this.DS.Area.computedBorder)))}},{key:"currentVal",get:function(){return this._currentVal?this._currentVal:{x:0,y:0}},set:function(i){this._currentVal=i,this._currentValArea=i&&F(i,"-",F(C(this.DS.Area.rect),"+",C(this.DS.Area.computedBorder)))}},{key:"lastVal",get:function(){return this._lastVal?this._lastVal:{x:0,y:0}},set:function(i){this._lastVal=i,this._lastValArea=i&&F(i,"-",F(C(this.DS.Area.rect),"+",C(this.DS.Area.computedBorder)))}}]),h}(),Jd=function(){function h(c){var i=this,y=c.DS,d=c.areaElement,v=c.zoom;o(this,h),a(this,"_initialVal",void 0),a(this,"_currentVal",void 0),a(this,"_areaElement",void 0),a(this,"_canScroll",void 0),a(this,"init",function(){return i._areaElement.addEventListener("scroll",i.update)}),a(this,"start",function(){i._currentVal=i._initialVal=Pe(i._areaElement),i._areaElement.addEventListener("scroll",i.update)}),a(this,"update",function(){return i._currentVal=Pe(i._areaElement)}),a(this,"stop",function(){i._areaElement.removeEventListener("scroll",i.update),i._initialVal={x:0,y:0},i._canScroll=null}),a(this,"reset",function(){i.stop(),i.start()}),this._areaElement=d,this.DS=y,this.zoom=v,this.DS.subscribe("Interaction:init",this.init),this.DS.subscribe("Interaction:start",function(){return i.start()}),this.DS.subscribe("Interaction:end",function(){return i.reset()})}return s(h,[{key:"canScroll",get:function(){return typeof this._canScroll=="boolean"?this._canScroll:this._canScroll=H(this._areaElement)}},{key:"scrollAmount",get:function(){var i=F(this.currentVal,"-",this.initialVal),y=B(this.zoom),d=F(F(i,"*",y),"-",i);return{x:i.x+d.x,y:i.y+d.y}}},{key:"initialVal",get:function(){return this._initialVal?this._initialVal:{x:0,y:0}}},{key:"currentVal",get:function(){return this._currentVal||(this._currentVal=Pe(this._areaElement)),this._currentVal}}]),h}(),Zd=function(){function h(c){var i=this,y=c.area,d=y===void 0?document:y,v=c.selectables,w=v===void 0?[]:v,k=c.autoScrollSpeed,S=k===void 0?5:k,$=c.overflowTolerance,N=$===void 0?{x:25,y:25}:$,A=c.zoom,P=A===void 0?1:A,X=c.customStyles,se=X===void 0?!1:X,G=c.multiSelectMode,Re=G===void 0?!1:G,gt=c.multiSelectToggling,Se=gt===void 0?!0:gt,bo=c.multiSelectKeys,Qd=bo===void 0?["Control","Shift","Meta"]:bo,vo=c.selector,eh=vo===void 0?void 0:vo,wo=c.draggability,Gt=wo===void 0?!0:wo,ko=c.immediateDrag,th=ko===void 0?!0:ko,_o=c.keyboardDrag,rh=_o===void 0?!0:_o,oh=c.dragKeys,xo=c.keyboardDragSpeed,nh=xo===void 0?10:xo,So=c.useTransform,Do=So===void 0?!0:So,Eo=c.hoverClass,No=Eo===void 0?"ds-hover":Eo,Co=c.selectableClass,Vo=Co===void 0?"ds-selectable":Co,$o=c.selectedClass,ah=$o===void 0?"ds-selected":$o,Mo=c.selectorClass,ih=Mo===void 0?"ds-selector":Mo,Bo=c.selectorAreaClass,sh=Bo===void 0?"ds-selector-area":Bo,lh=c.callback,ch=c.onDragMove,dh=c.onDragStartBegin,hh=c.onDragStart,uh=c.onElementSelect,fh=c.onElementUnselect;o(this,h),a(this,"continue",!1),a(this,"start",function(){i.stopped=!1,i.Interaction.init()}),a(this,"break",function(){return i.continue=!0}),a(this,"getSelection",function(){return i.SelectedSet.elements}),a(this,"getSelectables",function(){return i.SelectableSet.elements}),a(this,"getInitialCursorPosition",function(){return i.stores.PointerStore.initialVal}),a(this,"getCurrentCursorPosition",function(){return i.stores.PointerStore.currentVal}),a(this,"getPreviousCursorPosition",function(){return i.stores.PointerStore.lastVal}),a(this,"getInitialCursorPositionArea",function(){return i.stores.PointerStore.initialValArea}),a(this,"getCurrentCursorPositionArea",function(){return i.stores.PointerStore.currentValArea}),a(this,"getPreviousCursorPositionArea",function(){return i.stores.PointerStore.lastValArea}),a(this,"isMultiSelect",function(mh){return i.stores.KeyStore.isMultiSelectKeyPressed(mh)}),a(this,"isDragging",function(){return i.Interaction.isDragging}),this.PubSub=new Fd({DS:this}),this.subscribe=this.PubSub.subscribe,this.unsubscribe=this.PubSub.unsubscribe,this.publish=this.PubSub.publish,this._callbacksTemp({callback:lh,onDragMove:ch,onDragStart:hh,onDragStartBegin:dh,onElementSelect:uh,onElementUnselect:fh}),this.stores={PointerStore:new Gd({DS:this}),ScrollStore:new Jd({DS:this,areaElement:d,zoom:P}),KeyStore:new qd({DS:this,multiSelectKeys:Qd,multiSelectMode:Re})},this.Area=new zd({area:d,PS:this.PubSub,zoom:P}),this.Selector=new Wd({DS:this,selector:eh,selectorClass:ih,customStyles:se}),this.SelectorArea=new Xd({DS:this,selectorAreaClass:sh,autoScrollSpeed:S,overflowTolerance:N}),this.SelectableSet=new Ud({elements:w,DS:this,className:Vo,hoverClassName:No,useTransform:Do,draggability:Gt}),this.SelectedSet=new Kd({DS:this,className:ah}),this.Selection=new Yd({DS:this,hoverClassName:No,multiSelectToggling:Se}),this.Drag=new Rd({DS:this,draggability:Gt,useTransform:Do,keyboardDrag:rh,dragKeys:Object.assign({up:["ArrowUp"],down:["ArrowDown"],left:["ArrowLeft"],right:["ArrowRight"]},oh),zoom:P,keyboardDragSpeed:nh}),this.Interaction=new Hd({areaElement:d,DS:this,draggability:Gt,immediateDrag:th,selectableClass:Vo}),Pd({subscribe:this.subscribe,publish:this.publish,SelectedSet:this.SelectedSet,Interaction:this.Interaction}),this.subscribe("Interaction:end",function(){return i.continue=!1}),this.start()}return s(h,[{key:"_callbacksTemp",value:function(i){var y=i.callback,d=i.onDragMove,v=i.onDragStart,w=i.onDragStartBegin,k=i.onElementSelect,S=i.onElementUnselect,$=function(A,P){return console.warn("[DragSelect] ".concat(A,' is deprecated. Use DragSelect.subscribe("').concat(P,'", (callbackObject) => {}) instead. Act Now! See docs for more info'))};y&&($("callback","callback"),this.subscribe("callback",function(N){var A=N.items;N.item;var P=N.event;return y(A,P)})),d&&($("onDragMove","dragmove"),this.subscribe("dragmove",function(N){N.items,N.item;var A=N.event;return d(A)})),v&&($("onDragStart","dragstart"),this.subscribe("dragstart",function(N){N.items,N.item;var A=N.event;return v(A)})),w&&($("onDragStartBegin","dragstart"),this.subscribe("dragstart",function(N){N.items,N.item;var A=N.event;return w(A)})),k&&($("onElementSelect","elementselect"),this.subscribe("elementselect",function(N){N.items;var A=N.item,P=N.event;return k(A,P)})),S&&($("onElementUnselect","elementunselect"),this.subscribe("elementunselect",function(N){N.items;var A=N.item,P=N.event;return S(A,P)}))}},{key:"stop",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;d&&this.publish("callback",{items:this.getSelection()}),this.Interaction.stop(),this.Area.stop(),this.Drag.stop(),this.Selector.stop(),this.SelectorArea.stop(i),this.stores.KeyStore.stop(),this.stores.PointerStore.stop(),this.stores.ScrollStore.stop(),i&&this.SelectableSet.clear(),y&&this.SelectedSet.clear(),this.stopped=!0}},{key:"addSelection",value:function(i){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return this.SelectedSet.addAll(ze(i)),d||this.addSelectables(i),y&&this.PubSub.publish("callback",{items:this.getSelection()}),this.getSelection()}},{key:"removeSelection",value:function(i){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return this.SelectedSet.deleteAll(ze(i)),d&&this.removeSelectables(i),y&&this.PubSub.publish("callback",{items:this.getSelection()}),this.getSelection()}},{key:"toggleSelection",value:function(i){var y=this,d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return ze(i).forEach(function(w){return y.SelectedSet.has(w)?y.removeSelection(i,d,v):y.addSelection(i,d,v)}),d&&this.PubSub.publish("callback",{items:this.getSelection()}),this.getSelection()}},{key:"setSelection",value:function(i){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return this.clearSelection(),this.addSelection(i,y,d),this.getSelection()}},{key:"clearSelection",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return this.SelectedSet.clear(),i&&this.PubSub.publish("callback",{items:this.getSelection()}),this.getSelection()}},{key:"addSelectables",value:function(i){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,d=ze(i);return this.SelectableSet.addAll(d),y&&this.SelectedSet.addAll(d),i}},{key:"setSelectables",value:function(i){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return this.removeSelectables(i,y),this.addSelectables(i,d)}},{key:"removeSelectables",value:function(i){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.SelectableSet.deleteAll(ze(i)),y&&this.removeSelection(i),i}},{key:"getCursorPositionDifference",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;console.warn("[DragSelect] Using .getCursorPositionDifference is deprecated. Calculate yourself instead. i.e. `.getCurrentCursorPosition().x - .getInitialCursorPosition().x`");var d=y?this.getCurrentCursorPositionArea():this.getCurrentCursorPosition(),v=i?y?this.getPreviousCursorPositionArea():this.getPreviousCursorPosition():y?this.getInitialCursorPositionArea():this.getInitialCursorPosition();return F(d,"-",v)}}]),h}();return Zd})})(Zt);const mn=Zt.exports,Qt=(r,t,o,n,s)=>(t=Math,o=t.log,n=1024,s=o(r)/o(n)|0,r/t.pow(n,s)).toFixed(0)+" "+(s?"KMGTPEZY"[--s]+"iB":"B"),er=(r,t=null)=>{var o;return new Date(r*1e3).toLocaleString((o=t!=null?t:navigator.language)!=null?o:"en-US")},pn={key:0,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor"},gn=[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)],yn={key:1,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor"},bn=[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)],nt=Object.assign({name:"VFSortIcon"},{props:{direction:String},setup(r){return(t,o)=>(e.openBlock(),e.createElementBlock("div",null,[r.direction=="down"?(e.openBlock(),e.createElementBlock("svg",pn,gn)):e.createCommentVNode("",!0),r.direction=="up"?(e.openBlock(),e.createElementBlock("svg",yn,bn)):e.createCommentVNode("",!0)]))}}),vn=["onClick"],wn=Object.assign({name:"VFToast.vue"},{setup(r){const t=e.inject("emitter"),{getStore:o}=e.inject("storage"),n=e.ref(o("full-screen",!1)),s=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",a=e.ref([]),l=p=>{a.value.splice(p,1)},m=p=>{let f=a.value.findIndex(u=>u.id===p);f!==-1&&l(f)};return t.on("vf-toast-clear",()=>{a.value=[]}),t.on("vf-toast-push",p=>{let f=new Date().getTime().toString(36).concat(performance.now().toString(),Math.random().toString()).replace(/\./g,"");p.id=f,a.value.push(p),setTimeout(()=>{m(f)},5e3)}),(p,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([n.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(a.value,(u,g)=>(e.openBlock(),e.createElementBlock("div",{onClick:b=>l(g),key:u,class:e.normalizeClass([s(u.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(u.label),11,vn))),128))]),_:1})],2))}}),De=r=>Object.entries(r).map(t=>t.map(encodeURIComponent).join("=")).join("&"),{apiUrl:kn}=he(),bt=(r,t)=>kn.value+"?"+De({q:"preview",adapter:r,path:t}),be=typeof window<"u",tr=be&&!("onscroll"in window)||typeof navigator<"u"&&/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),rr=be&&"IntersectionObserver"in window,or=be&&"classList"in document.createElement("p"),nr=be&&window.devicePixelRatio>1,_n={elements_selector:".lazy",container:tr||be?document:null,threshold:300,thresholds:null,data_src:"src",data_srcset:"srcset",data_sizes:"sizes",data_bg:"bg",data_bg_hidpi:"bg-hidpi",data_bg_multi:"bg-multi",data_bg_multi_hidpi:"bg-multi-hidpi",data_bg_set:"bg-set",data_poster:"poster",class_applied:"applied",class_loading:"loading",class_loaded:"loaded",class_error:"error",class_entered:"entered",class_exited:"exited",unobserve_completed:!0,unobserve_entered:!1,cancel_on_exit:!0,callback_enter:null,callback_exit:null,callback_applied:null,callback_loading:null,callback_loaded:null,callback_error:null,callback_finish:null,callback_cancel:null,use_native:!1,restore_on_error:!1},ar=r=>Object.assign({},_n,r),ir=function(r,t){let o;const n="LazyLoad::Initialized",s=new r(t);try{o=new CustomEvent(n,{detail:{instance:s}})}catch{o=document.createEvent("CustomEvent"),o.initCustomEvent(n,!1,!1,{instance:s})}window.dispatchEvent(o)},xn=(r,t)=>{if(!!t)if(!t.length)ir(r,t);else for(let o=0,n;n=t[o];o+=1)ir(r,n)},ye="src",vt="srcset",wt="sizes",sr="poster",Ue="llOriginalAttrs",lr="data",kt="loading",cr="loaded",dr="applied",Sn="entered",_t="error",hr="native",ur="data-",fr="ll-status",te=(r,t)=>r.getAttribute(ur+t),Dn=(r,t,o)=>{var n=ur+t;if(o===null){r.removeAttribute(n);return}r.setAttribute(n,o)},Ke=r=>te(r,fr),Ee=(r,t)=>Dn(r,fr,t),at=r=>Ee(r,null),xt=r=>Ke(r)===null,En=r=>Ke(r)===kt,Nn=r=>Ke(r)===_t,St=r=>Ke(r)===hr,Cn=[kt,cr,dr,_t],Vn=r=>Cn.indexOf(Ke(r))>=0,ve=(r,t,o,n)=>{if(!!r){if(n!==void 0){r(t,o,n);return}if(o!==void 0){r(t,o);return}r(t)}},Me=(r,t)=>{if(or){r.classList.add(t);return}r.className+=(r.className?" ":"")+t},ue=(r,t)=>{if(or){r.classList.remove(t);return}r.className=r.className.replace(new RegExp("(^|\\s+)"+t+"(\\s+|$)")," ").replace(/^\s+/,"").replace(/\s+$/,"")},$n=r=>{r.llTempImage=document.createElement("IMG")},Mn=r=>{delete r.llTempImage},mr=r=>r.llTempImage,it=(r,t)=>{if(!t)return;const o=t._observer;!o||o.unobserve(r)},Bn=r=>{r.disconnect()},Tn=(r,t,o)=>{t.unobserve_entered&&it(r,o)},Dt=(r,t)=>{!r||(r.loadingCount+=t)},An=r=>{!r||(r.toLoadCount-=1)},pr=(r,t)=>{!r||(r.toLoadCount=t)},On=r=>r.loadingCount>0,Ln=r=>r.toLoadCount>0,gr=r=>{let t=[];for(let o=0,n;n=r.children[o];o+=1)n.tagName==="SOURCE"&&t.push(n);return t},Et=(r,t)=>{const o=r.parentNode;if(!o||o.tagName!=="PICTURE")return;gr(o).forEach(t)},yr=(r,t)=>{gr(r).forEach(t)},st=[ye],br=[ye,sr],Ye=[ye,vt,wt],vr=[lr],lt=r=>!!r[Ue],wr=r=>r[Ue],kr=r=>delete r[Ue],Be=(r,t)=>{if(lt(r))return;const o={};t.forEach(n=>{o[n]=r.getAttribute(n)}),r[Ue]=o},In=r=>{lt(r)||(r[Ue]={backgroundImage:r.style.backgroundImage})},jn=(r,t,o)=>{if(!o){r.removeAttribute(t);return}r.setAttribute(t,o)},Ne=(r,t)=>{if(!lt(r))return;const o=wr(r);t.forEach(n=>{jn(r,n,o[n])})},Pn=r=>{if(!lt(r))return;const t=wr(r);r.style.backgroundImage=t.backgroundImage},_r=(r,t,o)=>{Me(r,t.class_applied),Ee(r,dr),o&&(t.unobserve_completed&&it(r,t),ve(t.callback_applied,r,o))},xr=(r,t,o)=>{Me(r,t.class_loading),Ee(r,kt),o&&(Dt(o,1),ve(t.callback_loading,r,o))},we=(r,t,o)=>{!o||r.setAttribute(t,o)},Sr=(r,t)=>{we(r,wt,te(r,t.data_sizes)),we(r,vt,te(r,t.data_srcset)),we(r,ye,te(r,t.data_src))},zn=(r,t)=>{Et(r,o=>{Be(o,Ye),Sr(o,t)}),Be(r,Ye),Sr(r,t)},Rn=(r,t)=>{Be(r,st),we(r,ye,te(r,t.data_src))},Hn=(r,t)=>{yr(r,o=>{Be(o,st),we(o,ye,te(o,t.data_src))}),Be(r,br),we(r,sr,te(r,t.data_poster)),we(r,ye,te(r,t.data_src)),r.load()},Fn=(r,t)=>{Be(r,vr),we(r,lr,te(r,t.data_src))},Un=(r,t,o)=>{const n=te(r,t.data_bg),s=te(r,t.data_bg_hidpi),a=nr&&s?s:n;!a||(r.style.backgroundImage=`url("${a}")`,mr(r).setAttribute(ye,a),xr(r,t,o))},Kn=(r,t,o)=>{const n=te(r,t.data_bg_multi),s=te(r,t.data_bg_multi_hidpi),a=nr&&s?s:n;!a||(r.style.backgroundImage=a,_r(r,t,o))},Yn=(r,t,o)=>{const n=te(r,t.data_bg_set);if(!n)return;const s=n.split("|");let a=s.map(l=>`image-set(${l})`);r.style.backgroundImage=a.join(),r.style.backgroundImage===""&&(a=s.map(l=>`-webkit-image-set(${l})`),r.style.backgroundImage=a.join()),_r(r,t,o)},Dr={IMG:zn,IFRAME:Rn,VIDEO:Hn,OBJECT:Fn},Wn=(r,t)=>{const o=Dr[r.tagName];!o||o(r,t)},Xn=(r,t,o)=>{const n=Dr[r.tagName];!n||(n(r,t),xr(r,t,o))},qn=["IMG","IFRAME","VIDEO","OBJECT"],Gn=r=>qn.indexOf(r.tagName)>-1,Er=(r,t)=>{t&&!On(t)&&!Ln(t)&&ve(r.callback_finish,t)},Nr=(r,t,o)=>{r.addEventListener(t,o),r.llEvLisnrs[t]=o},Jn=(r,t,o)=>{r.removeEventListener(t,o)},Nt=r=>!!r.llEvLisnrs,Zn=(r,t,o)=>{Nt(r)||(r.llEvLisnrs={});const n=r.tagName==="VIDEO"?"loadeddata":"load";Nr(r,n,t),Nr(r,"error",o)},Ct=r=>{if(!Nt(r))return;const t=r.llEvLisnrs;for(let o in t){const n=t[o];Jn(r,o,n)}delete r.llEvLisnrs},Cr=(r,t,o)=>{Mn(r),Dt(o,-1),An(o),ue(r,t.class_loading),t.unobserve_completed&&it(r,o)},Qn=(r,t,o,n)=>{const s=St(t);Cr(t,o,n),Me(t,o.class_loaded),Ee(t,cr),ve(o.callback_loaded,t,n),s||Er(o,n)},ea=(r,t,o,n)=>{const s=St(t);Cr(t,o,n),Me(t,o.class_error),Ee(t,_t),ve(o.callback_error,t,n),o.restore_on_error&&Ne(t,Ye),s||Er(o,n)},Vt=(r,t,o)=>{const n=mr(r)||r;if(Nt(n))return;Zn(n,l=>{Qn(l,r,t,o),Ct(n)},l=>{ea(l,r,t,o),Ct(n)})},ta=(r,t,o)=>{$n(r),Vt(r,t,o),In(r),Un(r,t,o),Kn(r,t,o),Yn(r,t,o)},ra=(r,t,o)=>{Vt(r,t,o),Xn(r,t,o)},$t=(r,t,o)=>{Gn(r)?ra(r,t,o):ta(r,t,o)},oa=(r,t,o)=>{r.setAttribute("loading","lazy"),Vt(r,t,o),Wn(r,t),Ee(r,hr)},Vr=r=>{r.removeAttribute(ye),r.removeAttribute(vt),r.removeAttribute(wt)},na=r=>{Et(r,t=>{Vr(t)}),Vr(r)},$r=r=>{Et(r,t=>{Ne(t,Ye)}),Ne(r,Ye)},aa={IMG:$r,IFRAME:r=>{Ne(r,st)},VIDEO:r=>{yr(r,t=>{Ne(t,st)}),Ne(r,br),r.load()},OBJECT:r=>{Ne(r,vr)}},ia=r=>{const t=aa[r.tagName];if(!t){Pn(r);return}t(r)},sa=(r,t)=>{xt(r)||St(r)||(ue(r,t.class_entered),ue(r,t.class_exited),ue(r,t.class_applied),ue(r,t.class_loading),ue(r,t.class_loaded),ue(r,t.class_error))},la=(r,t)=>{ia(r),sa(r,t),at(r),kr(r)},ca=(r,t,o,n)=>{!o.cancel_on_exit||!En(r)||r.tagName==="IMG"&&(Ct(r),na(r),$r(r),ue(r,o.class_loading),Dt(n,-1),at(r),ve(o.callback_cancel,r,t,n))},da=(r,t,o,n)=>{const s=Vn(r);Ee(r,Sn),Me(r,o.class_entered),ue(r,o.class_exited),Tn(r,o,n),ve(o.callback_enter,r,t,n),!s&&$t(r,o,n)},ha=(r,t,o,n)=>{xt(r)||(Me(r,o.class_exited),ca(r,t,o,n),ve(o.callback_exit,r,t,n))},ua=["IMG","IFRAME","VIDEO"],Mr=r=>r.use_native&&"loading"in HTMLImageElement.prototype,fa=(r,t,o)=>{r.forEach(n=>{ua.indexOf(n.tagName)!==-1&&oa(n,t,o)}),pr(o,0)},ma=r=>r.isIntersecting||r.intersectionRatio>0,pa=r=>({root:r.container===document?null:r.container,rootMargin:r.thresholds||r.threshold+"px"}),ga=(r,t,o)=>{r.forEach(n=>ma(n)?da(n.target,n,t,o):ha(n.target,n,t,o))},ya=(r,t)=>{t.forEach(o=>{r.observe(o)})},ba=(r,t)=>{Bn(r),ya(r,t)},va=(r,t)=>{!rr||Mr(r)||(t._observer=new IntersectionObserver(o=>{ga(o,r,t)},pa(r)))},Br=r=>Array.prototype.slice.call(r),ct=r=>r.container.querySelectorAll(r.elements_selector),wa=r=>Br(r).filter(xt),ka=r=>Nn(r),_a=r=>Br(r).filter(ka),Tr=(r,t)=>wa(r||ct(t)),xa=(r,t)=>{_a(ct(r)).forEach(n=>{ue(n,r.class_error),at(n)}),t.update()},Sa=(r,t)=>{!be||(t._onlineHandler=()=>{xa(r,t)},window.addEventListener("online",t._onlineHandler))},Da=r=>{!be||window.removeEventListener("online",r._onlineHandler)},We=function(r,t){const o=ar(r);this._settings=o,this.loadingCount=0,va(o,this),Sa(o,this),this.update(t)};We.prototype={update:function(r){const t=this._settings,o=Tr(r,t);if(pr(this,o.length),tr||!rr){this.loadAll(o);return}if(Mr(t)){fa(o,t,this);return}ba(this._observer,o)},destroy:function(){this._observer&&this._observer.disconnect(),Da(this),ct(this._settings).forEach(r=>{kr(r)}),delete this._observer,delete this._settings,delete this._onlineHandler,delete this.loadingCount,delete this.toLoadCount},loadAll:function(r){const t=this._settings;Tr(r,t).forEach(n=>{it(n,this),$t(n,t,this)})},restoreAll:function(){const r=this._settings;ct(r).forEach(t=>{la(t,r)})}},We.load=(r,t)=>{const o=ar(t);$t(r,o)},We.resetStatus=r=>{at(r)},be&&xn(We,window.lazyLoadOptions);const Ea={class:"relative flex-auto flex flex-col overflow-hidden"},Na={key:0,class:"grid grid-cols-12 border-b border-neutral-300 border-gray-200 dark:border-gray-700 text-xs select-none"},Ca={class:"absolute"},Va=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),$a={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"},Ma=["onDblclick","onContextmenu","data-type","data-item","data-index"],Ba={class:"grid grid-cols-12 items-center"},Ta={class:"flex col-span-7 items-center"},Aa={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"},Oa=[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)],La={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"},Ia=[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={class:"overflow-ellipsis overflow-hidden whitespace-nowrap"},Pa={class:"col-span-5 overflow-ellipsis overflow-hidden whitespace-nowrap"},za=["onDblclick","onContextmenu","onDragstart","onDragover","onDrop","data-type","data-item","data-index"],Ra={class:"grid grid-cols-12 items-center"},Ha={class:"flex col-span-7 items-center"},Fa={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"},Ua=[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={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)],Wa={class:"overflow-ellipsis overflow-hidden whitespace-nowrap"},Xa={class:"col-span-2 text-center"},qa={class:"col-span-3 overflow-ellipsis overflow-hidden whitespace-nowrap"},Ga=["onDblclick","onContextmenu","onDragstart","onDragover","onDrop","data-type","data-item","data-index"],Ja={class:"relative"},Za={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"},Qa=[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)],ei=["data-src","alt"],ti={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"},ri=[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)],oi={key:3,class:"absolute hidden md:block top-1/2 w-full text-center text-neutral-500"},ni={class:"break-all"},ai=Object.assign({name:"VFExplorer"},{props:{view:String,data:Object,search:Object},setup(r){const t=r,o=e.inject("emitter"),{setStore:n,getStore:s}=e.inject("storage"),a=e.inject("adapter"),l=C=>C==null?void 0:C.substring(0,3),m=C=>C.replace(/((?=([\w\W]{0,14}))([\w\W]{8,})([\w\W]{8,}))/,"$2..$4"),p=e.ref(null),f=e.ref(null),u=e.ref(0),g=e.ref(null),{t:b}=e.inject("i18n"),D=Math.floor(Math.random()*2**32),_=e.ref(s("full-screen",!1)),E=new We;o.on("vf-fullscreen-toggle",()=>{p.value.style.height=null,_.value=!_.value,n("full-screen",_.value)});const V=e.ref("");o.on("vf-search-query",({newQuery:C})=>{V.value=C,C?o.emit("vf-fetch",{params:{q:"search",adapter:t.data.adapter,path:t.data.dirname,filter:C},onSuccess:O=>{O.files.length||o.emit("vf-toast-push",{label:b("No search result found.")})}}):o.emit("vf-fetch",{params:{q:"index",adapter:t.data.adapter,path:t.data.dirname}})});let I=null;const L=()=>{I&&clearTimeout(I)},M=e.ref(!0),R=C=>{C.touches.length>1&&(M.value?(g.value.stop(),o.emit("vf-toast-push",{label:b("Drag&Drop: off")})):(g.value.start(),o.emit("vf-toast-push",{label:b("Drag&Drop: on")}),o.emit("vf-explorer-update")),M.value=!M.value)},j=C=>{I=setTimeout(()=>{const O=new MouseEvent("contextmenu",{bubbles:!0,cancelable:!1,view:window,button:2,buttons:0,clientX:C.target.getBoundingClientRect().x,clientY:C.target.getBoundingClientRect().y});C.target.dispatchEvent(O)},500)},x=C=>{C.type=="dir"?(o.emit("vf-search-exit"),o.emit("vf-fetch",{params:{q:"index",adapter:t.data.adapter,path:C.path}})):o.emit("vf-modal-show",{type:"preview",adapter:t.data.adapter,item:C})},T=e.reactive({active:!1,column:"",order:""}),U=(C=!0)=>{let O=[...t.data.files],B=T.column,ee=T.order=="asc"?1:-1;if(!C)return O;const H=(ae,W)=>typeof ae=="string"&&typeof W=="string"?ae.toLowerCase().localeCompare(W.toLowerCase()):aeW?1:0;return T.active&&(O=O.slice().sort((ae,W)=>H(ae[B],W[B])*ee)),O},J=C=>{T.active&&T.column==C?(T.active=T.order=="asc",T.column=C,T.order="desc"):(T.active=!0,T.column=C,T.order="asc")},Z=()=>g.value.getSelection().map(C=>JSON.parse(C.dataset.item)),ne=(C,O)=>{if(C.altKey||C.ctrlKey||C.metaKey)return C.preventDefault(),!1;C.dataTransfer.setDragImage(f.value,0,15),C.dataTransfer.effectAllowed="all",C.dataTransfer.dropEffect="copy",C.dataTransfer.setData("items",JSON.stringify(Z()))},ce=(C,O)=>{C.preventDefault();let B=JSON.parse(C.dataTransfer.getData("items"));if(B.find(ee=>ee.storage!=a.value)){alert("Moving items between different storages is not supported yet.");return}o.emit("vf-modal-show",{type:"move",items:{from:B,to:O}})},ie=(C,O)=>{C.preventDefault(),!O||O.type!=="dir"||g.value.getSelection().find(B=>B==C.currentTarget)?(C.dataTransfer.dropEffect="none",C.dataTransfer.effectAllowed="none"):C.dataTransfer.dropEffect="copy"},F=()=>{g.value=new mn({area:p.value,keyboardDrag:!1,selectedClass:"vf-explorer-selected",selectorClass:"vf-explorer-selector"}),o.on("vf-explorer-update",()=>e.nextTick(()=>{g.value.clearSelection(),g.value.setSelectables(document.getElementsByClassName("vf-item-"+D))})),g.value.subscribe("predragstart",({event:C,isDragging:O})=>{if(O)u.value=g.value.getSelection().length,g.value.break();else{const B=C.target.offsetWidth-C.offsetX,ee=C.target.offsetHeight-C.offsetY;B<15&&ee<15&&(g.value.clearSelection(),g.value.break())}}),g.value.subscribe("predragmove",({isDragging:C})=>{C&&g.value.break()}),g.value.subscribe("callback",({items:C,event:O,isDragging:B})=>{o.emit("vf-nodes-selected",Z()),u.value=g.value.getSelection().length})};return e.onMounted(F),e.onUpdated(()=>{g.value.Area.reset(),g.value.SelectorArea.updatePos(),E.update()}),e.onMounted(()=>{e.watch(()=>t.view,()=>o.emit("vf-explorer-update"))}),(C,O)=>(e.openBlock(),e.createElementBlock("div",Ea,[r.view=="list"||V.value.length?(e.openBlock(),e.createElementBlock("div",Na,[e.createElementVNode("div",{onClick:O[0]||(O[0]=B=>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(b)("Name"))+" ",1),e.withDirectives(e.createVNode(nt,{direction:T.order=="asc"?"down":"up"},null,8,["direction"]),[[e.vShow,T.active&&T.column=="basename"]])]),V.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:O[1]||(O[1]=B=>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(b)("Size"))+" ",1),e.withDirectives(e.createVNode(nt,{direction:T.order=="asc"?"down":"up"},null,8,["direction"]),[[e.vShow,T.active&&T.column=="file_size"]])])),V.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:O[2]||(O[2]=B=>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(b)("Date"))+" ",1),e.withDirectives(e.createVNode(nt,{direction:T.order=="asc"?"down":"up"},null,8,["direction"]),[[e.vShow,T.active&&T.column=="last_modified"]])])),V.value.length?(e.openBlock(),e.createElementBlock("div",{key:2,onClick:O[3]||(O[3]=B=>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(b)("Filepath"))+" ",1),e.withDirectives(e.createVNode(nt,{direction:T.order=="asc"?"down":"up"},null,8,["direction"]),[[e.vShow,T.active&&T.column=="path"]])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Ca,[e.createElementVNode("div",{ref_key:"dragImage",ref:f,class:"absolute -z-50 -top-96"},[Va,e.createElementVNode("div",$a,e.toDisplayString(u.value),1)],512)]),e.createElementVNode("div",{onTouchstart:R,onContextmenu:O[10]||(O[10]=e.withModifiers(B=>e.unref(o).emit("vf-contextmenu-show",{event:B,area:p.value,items:Z()}),["self","prevent"])),class:e.normalizeClass([_.value?"":"resize-y","h-full w-full text-xs vf-selector-area min-h-[150px] overflow-auto p-1 z-0"]),ref_key:"selectorArea",ref:p},[V.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(U(),(B,ee)=>(e.openBlock(),e.createElementBlock("div",{onDblclick:H=>x(B),onTouchstart:O[4]||(O[4]=H=>j(H)),onTouchend:O[5]||(O[5]=H=>L()),onContextmenu:e.withModifiers(H=>e.unref(o).emit("vf-contextmenu-show",{event:H,area:p.value,items:Z(),target:B}),["prevent"]),class:e.normalizeClass(["vf-item-"+e.unref(D),"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":B.type,"data-item":JSON.stringify(B),"data-index":ee},[e.createElementVNode("div",Ba,[e.createElementVNode("div",Ta,[B.type=="dir"?(e.openBlock(),e.createElementBlock("svg",Aa,Oa)):(e.openBlock(),e.createElementBlock("svg",La,Ia)),e.createElementVNode("span",ja,e.toDisplayString(B.basename),1)]),e.createElementVNode("div",Pa,e.toDisplayString(B.path),1)])],42,Ma))),256)):e.createCommentVNode("",!0),r.view=="list"&&!V.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(U(),(B,ee)=>(e.openBlock(),e.createElementBlock("div",{draggable:"true",onDblclick:H=>x(B),onTouchstart:O[6]||(O[6]=H=>j(H)),onTouchend:O[7]||(O[7]=H=>L()),onContextmenu:e.withModifiers(H=>e.unref(o).emit("vf-contextmenu-show",{event:H,area:p.value,items:Z(),target:B}),["prevent"]),onDragstart:H=>ne(H),onDragover:H=>ie(H,B),onDrop:H=>ce(H,B),class:e.normalizeClass(["vf-item-"+e.unref(D),"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":B.type,"data-item":JSON.stringify(B),"data-index":ee},[e.createElementVNode("div",Ra,[e.createElementVNode("div",Ha,[B.type=="dir"?(e.openBlock(),e.createElementBlock("svg",Fa,Ua)):(e.openBlock(),e.createElementBlock("svg",Ka,Ya)),e.createElementVNode("span",Wa,e.toDisplayString(B.basename),1)]),e.createElementVNode("div",Xa,e.toDisplayString(B.file_size?e.unref(Qt)(B.file_size):""),1),e.createElementVNode("div",qa,e.toDisplayString(e.unref(er)(B.last_modified)),1)])],42,za))),256)):e.createCommentVNode("",!0),r.view=="grid"&&!V.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(U(!1),(B,ee)=>{var H,ae;return e.openBlock(),e.createElementBlock("div",{draggable:"true",onDblclick:W=>x(B),onTouchstart:O[8]||(O[8]=W=>j(W)),onTouchend:O[9]||(O[9]=W=>L()),onContextmenu:e.withModifiers(W=>e.unref(o).emit("vf-contextmenu-show",{event:W,area:p.value,items:Z(),target:B}),["prevent"]),onDragstart:W=>ne(W),onDragover:W=>ie(W,B),onDrop:W=>ce(W,B),class:e.normalizeClass(["vf-item-"+e.unref(D),"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":B.type,"data-item":JSON.stringify(B),"data-index":ee},[e.createElementVNode("div",null,[e.createElementVNode("div",Ja,[B.type=="dir"?(e.openBlock(),e.createElementBlock("svg",Za,Qa)):((H=B.mime_type)!=null?H:"").startsWith("image")?(e.openBlock(),e.createElementBlock("img",{key:1,class:"lazy h-10 md:h-12 m-auto","data-src":e.unref(bt)(e.unref(a).value,B.path),alt:B.basename},null,8,ei)):(e.openBlock(),e.createElementBlock("svg",ti,ri)),!((ae=B.mime_type)!=null?ae:"").startsWith("image")&&B.type!="dir"?(e.openBlock(),e.createElementBlock("div",oi,e.toDisplayString(l(B.extension)),1)):e.createCommentVNode("",!0)]),e.createElementVNode("span",ni,e.toDisplayString(m(B.basename)),1)])],42,Ga)}),256)):e.createCommentVNode("",!0)],34),e.createVNode(wn)]))}}),ii="1.1.18",si={class:"p-1 text-xs border-t border-neutral-300 dark:border-gray-700/50 flex justify-between select-none"},li={class:"flex leading-5 items-center"},ci=["aria-label"],di=[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)],hi=["value"],ui={class:"ml-3"},fi={key:0},mi={class:"ml-1"},pi={class:"flex leading-5 items-center"},gi={value:"",disabled:""},yi=e.createStaticVNode('',5),bi=["aria-label"],vi=[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)],wi=Object.assign({name:"VFStatusbar"},{props:{data:Object},setup(r){const t=e.inject("emitter"),{getStore:o,setStore:n}=e.inject("storage"),s=e.ref(0),a=e.inject("adapter"),{t:l,changeLocale:m}=e.inject("i18n"),p=e.ref(o("locale","")),f=()=>{t.emit("vf-search-exit"),t.emit("vf-fetch",{params:{q:"index",adapter:a.value}}),n("adapter",a.value)};t.on("vf-nodes-selected",g=>{s.value=g.length});const u=e.ref("");return t.on("vf-search-query",({newQuery:g})=>{u.value=g}),(g,b)=>(e.openBlock(),e.createElementBlock("div",si,[e.createElementVNode("div",li,[e.createElementVNode("div",{class:"mx-2","aria-label":e.unref(l)("Storage"),"data-microtip-position":"top-right",role:"tooltip"},di,8,ci),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":b[0]||(b[0]=D=>e.isRef(a)?a.value=D:null),onChange:f,class:"py-0.5 text-sm text-slate-500 dark:text-neutral-50 dark:bg-gray-700 rounded pl-2 pr-8"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.data.storages,D=>(e.openBlock(),e.createElementBlock("option",{value:D},e.toDisplayString(D),9,hi))),256))],544),[[e.vModelSelect,e.unref(a)]]),e.createElementVNode("div",ui,[u.value.length?(e.openBlock(),e.createElementBlock("span",fi,e.toDisplayString(r.data.files.length)+" items found. ",1)):e.createCommentVNode("",!0),e.createElementVNode("span",mi,e.toDisplayString(s.value>0?s.value+" "+e.unref(l)("item(s) selected."):""),1)])]),e.createElementVNode("div",pi,[e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":b[1]||(b[1]=D=>p.value=D),onChange:b[2]||(b[2]=D=>e.unref(m)(D.target.value)),class:"py-0.5 text-sm text-slate-500 dark:text-neutral-50 dark:bg-gray-700 rounded pl-2 pr-8 mr-3"},[e.createElementVNode("option",gi,e.toDisplayString(e.unref(l)("Language")),1),yi],544),[[e.vModelSelect,p.value]]),e.createElementVNode("span",{class:"mr-1","aria-label":e.unref(l)("About"),"data-microtip-position":"top-left",role:"tooltip",onClick:b[3]||(b[3]=D=>e.unref(t).emit("vf-modal-show",{type:"message",title:"Vuefinder "+e.unref(ii),message:e.unref(l)("Vuefinder is a file manager component for vue 3.")}))},vi,8,bi)])]))}}),ki=(r,t=0,o=!1)=>{let n;return(...s)=>{o&&!n&&r(...s),clearTimeout(n),n=setTimeout(()=>{r(...s)},t)}},_i=(r,t,o)=>{const n=e.ref(r);return e.customRef((a,l)=>({get(){return a(),n.value},set:ki(m=>{n.value=m,l()},t,o)}))},xi={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"},Si=["aria-label"],Di=[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)],Ei=["aria-label"],Ni=[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)],Ci={key:1,"aria-label":"Cancel","data-microtip-position":"bottom-right",role:"tooltip"},Vi=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"},null,-1)],$i=["onClick"],Mi=[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)],Bi={class:"flex leading-5"},Ti=e.createElementVNode("span",{class:"text-neutral-300 dark:text-gray-600 mx-0.5"},"/",-1),Ai=["title","onClick"],Oi={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"},Li=[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),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)],Ii={key:3,class:"relative flex bg-white dark:bg-gray-700 items-center rounded p-1 ml-2 w-full"},ji=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),Pi=e.createElementVNode("div",{class:"w-full"},null,-1),zi=["onKeydown","placeholder"],Ri=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"},null,-1)],Hi=Object.assign({name:"VFBreadcrumb"},{props:{data:Object},setup(r){const t=r,o=e.inject("emitter");e.inject("storage");const n=e.inject("adapter"),s=e.ref(null),a=e.ref([]),l=e.ref(!1),m=e.ref(null),{t:p}=e.inject("i18n"),f=e.inject("loadingState");o.on("vf-explorer-update",()=>{var R;let L=[],M=[];s.value=(R=t.data.dirname)!=null?R:n.value+"://",s.value.length==0&&(a.value=[]),s.value.replace(n.value+"://","").split("/").forEach(function(j){L.push(j),L.join("/")!=""&&M.push({basename:j,name:j,path:n.value+"://"+L.join("/"),type:"dir"})}),M.length>4&&(M=M.slice(-5),M[0].name=".."),a.value=M});const u=()=>{l.value=!1,b.value=""};o.on("vf-search-exit",()=>{u()});const g=()=>{l.value=!0,e.nextTick(()=>m.value.focus())},b=_i("",400),D=()=>f.value;e.watch(b,L=>{o.emit("vf-toast-clear"),o.emit("vf-search-query",{newQuery:L})});const _=()=>a.value.length&&!l.value,E=L=>{var R;L.preventDefault();let M=JSON.parse(L.dataTransfer.getData("items"));if(M.find(j=>j.storage!=n.value)){alert("Moving items between different storages is not supported yet.");return}o.emit("vf-modal-show",{type:"move",items:{from:M,to:(R=a.value[a.value.length-2])!=null?R:{path:n.value+"://"}}})},V=L=>{L.preventDefault(),_()?L.dataTransfer.dropEffect="copy":(L.dataTransfer.dropEffect="none",L.dataTransfer.effectAllowed="none")},I=()=>{b.value==""&&u()};return(L,M)=>(e.openBlock(),e.createElementBlock("div",xi,[e.createElementVNode("span",{"aria-label":e.unref(p)("Go up a directory"),"data-microtip-position":"bottom-right",role:"tooltip"},[(e.openBlock(),e.createElementBlock("svg",{onDragover:M[0]||(M[0]=R=>V(R)),onDrop:M[1]||(M[1]=R=>E(R)),onClick:M[2]||(M[2]=R=>{var j,x;return!_()||e.unref(o).emit("vf-fetch",{params:{q:"index",adapter:r.data.adapter,path:(x=(j=a.value[a.value.length-2])==null?void 0:j.path)!=null?x: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"},Di,34))],8,Si),D()?(e.openBlock(),e.createElementBlock("span",Ci,[(e.openBlock(),e.createElementBlock("svg",{onClick:M[4]||(M[4]=R=>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"},Vi))])):(e.openBlock(),e.createElementBlock("span",{key:0,"aria-label":e.unref(p)("Refresh"),"data-microtip-position":"bottom-right",role:"tooltip"},[(e.openBlock(),e.createElementBlock("svg",{onClick:M[3]||(M[3]=R=>{e.unref(o).emit("vf-fetch",{params:{q:"index",adapter:r.data.adapter,path:r.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"},Ni))],8,Ei)),l.value?(e.openBlock(),e.createElementBlock("div",Ii,[ji,Pi,e.withDirectives(e.createElementVNode("input",{ref_key:"searchInput",ref:m,onKeydown:e.withKeys(u,["esc"]),onBlur:I,"onUpdate:modelValue":M[6]||(M[6]=R=>e.isRef(b)?b.value=R:null),placeholder:e.unref(p)("Search anything.."),class:"absolute ml-4 pt-1 pb-0 px-2 border-0 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,zi),[[e.vModelText,e.unref(b)]]),(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"},Ri))])):(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(g,["self"])},[(e.openBlock(),e.createElementBlock("svg",{onClick:M[5]||(M[5]=R=>e.unref(o).emit("vf-fetch",{params:{q:"index",adapter:r.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"},Mi)),e.createElementVNode("div",Bi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(R,j)=>(e.openBlock(),e.createElementBlock("div",{key:j},[Ti,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:R.basename,onClick:x=>e.unref(o).emit("vf-fetch",{params:{q:"index",adapter:r.data.adapter,path:R.path}})},e.toDisplayString(R.name),9,Ai)]))),128))]),D()?(e.openBlock(),e.createElementBlock("svg",Oi,Li)):e.createCommentVNode("",!0)],8,$i))]))}}),Fi=["onClick"],Ui=e.createElementVNode("span",{class:"px-1"},null,-1),Ki=Object.assign({name:"VFContextMenu"},{props:{current:Object},setup(r){const t=r,o=e.inject("emitter"),n=e.ref(null),{apiUrl:s}=he(),a=e.reactive({active:!1,items:[],positions:{left:0,top:0}}),l=e.ref([]);o.on("vf-context-selected",b=>{l.value=b});const{t:m}=e.inject("i18n"),p={newfolder:{title:()=>m("New Folder"),action:()=>{o.emit("vf-modal-show",{type:"new-folder"})}},delete:{title:()=>m("Delete"),action:()=>{o.emit("vf-modal-show",{type:"delete",items:l})}},refresh:{title:()=>m("Refresh"),action:()=>{o.emit("vf-fetch",{params:{q:"index",adapter:t.current.adapter,path:t.current.dirname}})}},preview:{title:()=>m("Preview"),action:()=>{o.emit("vf-modal-show",{type:"preview",adapter:t.current.adapter,item:l.value[0]})}},open:{title:()=>m("Open"),action:()=>{o.emit("vf-search-exit"),o.emit("vf-fetch",{params:{q:"index",adapter:t.current.adapter,path:l.value[0].path}})}},openDir:{title:()=>m("Open containing folder"),action:()=>{o.emit("vf-search-exit"),o.emit("vf-fetch",{params:{q:"index",adapter:t.current.adapter,path:l.value[0].dir}})}},download:{title:()=>m("Download"),action:()=>{const b=s.value+"?"+De({q:"download",adapter:t.current.adapter,path:l.value[0].path});o.emit("vf-download",b)}},archive:{title:()=>m("Archive"),action:()=>{o.emit("vf-modal-show",{type:"archive",items:l})}},unarchive:{title:()=>m("Unarchive"),action:()=>{o.emit("vf-modal-show",{type:"unarchive",items:l})}},rename:{title:()=>m("Rename"),action:()=>{o.emit("vf-modal-show",{type:"rename",items:l})}}},f=b=>{o.emit("vf-contextmenu-hide"),b.action()},u=e.ref("");o.on("vf-search-query",({newQuery:b})=>{u.value=b}),o.on("vf-contextmenu-show",({event:b,area:D,items:_,target:E=null})=>{if(a.items=[],u.value)if(E)a.items.push(p.openDir),o.emit("vf-context-selected",[E]);else return;else!E&&!u.value?(a.items.push(p.refresh),a.items.push(p.newfolder),o.emit("vf-context-selected",[])):_.length>1&&_.some(V=>V.path===E.path)?(a.items.push(p.refresh),a.items.push(p.archive),a.items.push(p.delete),o.emit("vf-context-selected",_)):(E.type=="dir"?a.items.push(p.open):(a.items.push(p.preview),a.items.push(p.download)),a.items.push(p.rename),E.mime_type=="application/zip"?a.items.push(p.unarchive):a.items.push(p.archive),a.items.push(p.delete),o.emit("vf-context-selected",[E]));g(b,D)}),o.on("vf-contextmenu-hide",()=>{a.active=!1});const g=(b,D)=>{a.active=!0,e.nextTick(()=>{let _=D.getBoundingClientRect(),E=b.pageX,V=b.pageY,I=n.value.offsetHeight,L=n.value.offsetWidth;E=_.right-b.pageX+window.scrollXa.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(a.positions)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.items,_=>(e.openBlock(),e.createElementBlock("li",{class:"px-2 py-1.5 cursor-pointer hover:bg-neutral-200 dark:hover:bg-gray-700",key:_.title,onClick:E=>f(_)},[Ui,e.createElementVNode("span",null,e.toDisplayString(_.title()),1)],8,Fi))),128))],4)):e.createCommentVNode("",!0)}}),Yi=(r,t)=>{const o=r[t];return o?typeof o=="function"?o():Promise.resolve(o):new Promise((n,s)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(s.bind(null,new Error("Unknown variable dynamic import: "+t)))})};async function Wi(r){const t=await Yi(Object.assign({"../locales/en.json":()=>Promise.resolve().then(()=>Sd),"../locales/fa.json":()=>Promise.resolve().then(()=>Dd),"../locales/ru.json":()=>Promise.resolve().then(()=>Ed),"../locales/tr.json":()=>Promise.resolve().then(()=>Nd)}),`../locales/${r}.json`);return JSON.parse(t.default)}function Xi(r,t,o){const{getStore:n,setStore:s}=yt(r),a=e.ref({}),l=f=>{Wi(f).then(u=>{a.value=u,s("locale",f),s("translations",u),o.emit("vf-toast-push",{label:"The language is set to "+f})}).catch(u=>{o.emit("vf-toast-push",{label:"The selected locale is not yet supported!",type:"error"}),l("en")})};n("locale")?a.value=n("translations"):l(t);const m=(f,...u)=>u.length?m(f=f.replace("%s",u.shift()),...u):f;function p(f,...u){return a.value.hasOwnProperty(f)?m(a.value[f],...u):m(f,...u)}return{t:p,changeLocale:l}}const qi={class:"vuefinder"},Gi=e.createElementVNode("iframe",{id:"download_frame",style:{display:"none"}},null,-1),Ji=Object.assign({name:"VueFinder"},{props:{url:{type:[String]},id:{type:String,default:"vf"},dark:{type:Boolean,default:!1},locale:{type:String,default:"en"},maxHeight:{type:String,default:"600px"},maxFileSize:{type:String,default:"10mb"},postData:{type:Object,default:{}}},setup(r){const t=r,o=To(),{setStore:n,getStore:s}=yt(t.id),a=e.ref(s("adapter"));e.provide("emitter",o),e.provide("storage",yt(t.id)),e.provide("postData",t.postData),e.provide("adapter",a),e.provide("maxFileSize",t.maxFileSize);const l=Xi(t.id,t.locale,o);e.provide("i18n",l);const{apiUrl:m,setApiUrl:p}=he();p(t.url);const f=e.reactive({adapter:a.value,storages:[],dirname:".",files:[]}),u=e.ref(s("viewport","grid")),g=e.ref(s("darkMode",t.dark));o.on("vf-darkMode-toggle",()=>{g.value=!g.value,n("darkMode",g.value)});const b=e.ref(!1);e.provide("loadingState",b);const D=e.ref(s("full-screen",!1));o.on("vf-fullscreen-toggle",()=>{D.value=!D.value,n("full-screen",D.value)}),o.on("vf-view-toggle",I=>{u.value=I});const _=e.reactive({active:!1,type:"delete",data:{}});o.on("vf-modal-close",()=>{_.active=!1}),o.on("vf-modal-show",I=>{_.active=!0,_.type=I.type,_.data=I});const E=I=>{Object.assign(f,I),o.emit("vf-nodes-selected",{}),o.emit("vf-explorer-update")};let V;return o.on("vf-fetch-abort",()=>{V.abort(),b.value=!1}),o.on("vf-fetch",({params:I,onSuccess:L=null,onError:M=null})=>{["index","search"].includes(I.q)&&(V&&V.abort(),b.value=!0),V=new AbortController;const R=V.signal;ot(m.value,{params:I,signal:R}).then(j=>{a.value=j.adapter,["index","search"].includes(I.q)&&(b.value=!1),o.emit("vf-modal-close"),E(j),L(j)}).catch(j=>{M&&M(j)}).finally(()=>{})}),o.on("vf-download",I=>{document.getElementById("download_frame").src=I,o.emit("vf-modal-close")}),e.onMounted(()=>{o.emit("vf-fetch",{params:{q:"index",adapter:a.value}})}),(I,L)=>(e.openBlock(),e.createElementBlock("div",qi,[e.createElementVNode("div",{class:e.normalizeClass(g.value?"dark":"")},[e.createElementVNode("div",{class:e.normalizeClass([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:e.normalizeStyle(D.value?"":"max-height: "+r.maxHeight),onMousedown:L[0]||(L[0]=M=>e.unref(o).emit("vf-contextmenu-hide")),onTouchstart:L[1]||(L[1]=M=>e.unref(o).emit("vf-contextmenu-hide"))},[e.createVNode(un,{data:f},null,8,["data"]),e.createVNode(Hi,{data:f},null,8,["data"]),e.createVNode(ai,{view:u.value,data:f},null,8,["view","data"]),e.createVNode(wi,{data:f},null,8,["data"])],38),_.active?(e.openBlock(),e.createBlock(e.resolveDynamicComponent("v-f-modal-"+_.type),{key:0,selection:_.data,current:f},null,8,["selection","current"])):e.createCommentVNode("",!0),e.createVNode(Ki,{current:f},null,8,["current"]),Gi],2)]))}}),Zi=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),Qi={class:"fixed z-10 inset-0 overflow-hidden"},es={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"},ts={class:"bg-white dark:bg-gray-800 px-4 pt-5 pb-4 sm:p-6 sm:pb-4"},rs={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"},fe={__name:"ModalLayout",setup(r){const t=e.inject("emitter");return e.onMounted(()=>{const o=document.querySelector(".v-f-modal input");o&&o.focus()}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{class:"v-f-modal relative z-30","aria-labelledby":"modal-title",role:"dialog","aria-modal":"true",onKeyup:n[1]||(n[1]=e.withKeys(s=>e.unref(t).emit("vf-modal-close"),["esc"])),tabindex:"0"},[Zi,e.createElementVNode("div",Qi,[e.createElementVNode("div",{class:"flex items-end sm:items-center justify-center min-h-full p-4 text-center sm:p-0",onMousedown:n[0]||(n[0]=e.withModifiers(s=>e.unref(t).emit("vf-modal-close"),["self"]))},[e.createElementVNode("div",es,[e.createElementVNode("div",ts,[e.renderSlot(o.$slots,"default")]),e.createElementVNode("div",rs,[e.renderSlot(o.$slots,"buttons")])])],32)])],32))}},os=["aria-label"],ns=[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)],me=Object.assign({name:"Message"},{props:{error:{type:Boolean,default:!1}},emits:["hidden"],setup(r,{emit:t}){var m;const{t:o}=e.inject("i18n"),n=e.ref(!1),s=e.ref(null),a=e.ref((m=s.value)==null?void 0:m.strMessage);e.watch(a,()=>n.value=!1);const l=()=>{t("hidden"),n.value=!0};return(p,f)=>(e.openBlock(),e.createElementBlock("div",null,[n.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"strMessage",ref:s,class:e.normalizeClass(["flex mt-1 p-1 px-2 rounded text-sm",r.error?"bg-red-100 text-red-600":"bg-emerald-100 text-emerald-600"])},[e.renderSlot(p.$slots,"default"),e.createElementVNode("div",{class:"ml-auto cursor-pointer",onClick:l,"aria-label":e.unref(o)("Close"),"data-microtip-position":"top-left",role:"tooltip"},ns,8,os)],2))]))}}),as={class:"sm:flex sm:items-start"},is=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),ss={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},ls={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},cs={class:"mt-2"},ds={class:"text-sm text-gray-500"},hs={class:"flex text-sm text-gray-800 dark:text-gray-400"},us={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"},fs=[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)],ms={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"},ps=[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)],gs={class:"ml-1.5"},ys={class:"m-auto font-bold text-red-500 text-sm dark:text-red-200 text-center"},bs=Object.assign({name:"VFModalDelete"},{props:{selection:Object,current:Object},setup(r){const t=r,o=e.inject("emitter");e.inject("storage");const n=e.inject("adapter"),{t:s}=e.inject("i18n"),a=e.ref(t.selection.items),l=e.ref(""),m=()=>{a.value.length&&o.emit("vf-fetch",{params:{q:"delete",adapter:n.value,path:t.current.dirname,items:JSON.stringify(a.value.map(({path:p,type:f})=>({path:p,type:f})))},onSuccess:()=>{o.emit("vf-toast-push",{label:s("Files deleted.")})},onError:p=>{l.value=s(p.message)}})};return(p,f)=>(e.openBlock(),e.createBlock(fe,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:m,class:"w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(s)("Yes, Delete!")),1),e.createElementVNode("button",{type:"button",onClick:f[1]||(f[1]=u=>e.unref(o).emit("vf-modal-close")),class:"mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(s)("Cancel")),1),e.createElementVNode("div",ys,e.toDisplayString(e.unref(s)("This action cannot be undone.")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",as,[is,e.createElementVNode("div",ss,[e.createElementVNode("h3",ls,e.toDisplayString(e.unref(s)("Delete files")),1),e.createElementVNode("div",cs,[e.createElementVNode("p",ds,e.toDisplayString(e.unref(s)("Are you sure you want to delete these files?")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,u=>(e.openBlock(),e.createElementBlock("p",hs,[u.type=="dir"?(e.openBlock(),e.createElementBlock("svg",us,fs)):(e.openBlock(),e.createElementBlock("svg",ms,ps)),e.createElementVNode("span",gs,e.toDisplayString(u.basename),1)]))),256)),l.value.length?(e.openBlock(),e.createBlock(me,{key:0,onHidden:f[0]||(f[0]=u=>l.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}}),vs={class:"sm:flex sm:items-start"},ws=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),ks={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},_s={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},xs={class:"mt-2"},Ss={class:"text-sm text-gray-500"},Ds=Object.assign({name:"VFModalMessage"},{props:{selection:Object},setup(r){const t=e.inject("emitter"),{t:o}=e.inject("i18n");return(n,s)=>(e.openBlock(),e.createBlock(fe,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:s[0]||(s[0]=a=>e.unref(t).emit("vf-modal-close")),class:"mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(o)("Close")),1)]),default:e.withCtx(()=>{var a,l,m,p;return[e.createElementVNode("div",vs,[ws,e.createElementVNode("div",ks,[e.createElementVNode("h3",_s,e.toDisplayString((l=(a=r.selection)==null?void 0:a.title)!=null?l:"Title"),1),e.createElementVNode("div",xs,[e.createElementVNode("p",Ss,e.toDisplayString((p=(m=r.selection)==null?void 0:m.message)!=null?p:"Message")+".",1)])])])]}),_:1}))}}),Es={class:"sm:flex sm:items-start"},Ns=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),Cs={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},Vs={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},$s={class:"mt-2"},Ms={class:"text-sm text-gray-500"},Bs=["onKeyup","placeholder"],Ts=Object.assign({name:"VFModalNewFolder"},{props:{selection:Object,current:Object},setup(r){const t=r,o=e.inject("emitter");e.inject("storage");const n=e.inject("adapter"),{t:s}=e.inject("i18n"),a=e.ref(""),l=e.ref(""),m=()=>{a.value!=""&&o.emit("vf-fetch",{params:{q:"newfolder",adapter:n.value,path:t.current.dirname,name:a.value},onSuccess:()=>{o.emit("vf-toast-push",{label:s("%s is created.",a.value)})},onError:p=>{l.value=s(p.message)}})};return(p,f)=>(e.openBlock(),e.createBlock(fe,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:m,class:"w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 dark:bg-gray-700 dark:hover:bg-gray-600/75 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(s)("Create")),1),e.createElementVNode("button",{type:"button",onClick:f[2]||(f[2]=u=>e.unref(o).emit("vf-modal-close")),class:"mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(s)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",Es,[Ns,e.createElementVNode("div",Cs,[e.createElementVNode("h3",Vs,e.toDisplayString(e.unref(s)("New Folder")),1),e.createElementVNode("div",$s,[e.createElementVNode("p",Ms,e.toDisplayString(e.unref(s)("Create a new folder")),1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":f[0]||(f[0]=u=>a.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:e.unref(s)("Folder Name"),type:"text"},null,40,Bs),[[e.vModelText,a.value]]),l.value.length?(e.openBlock(),e.createBlock(me,{key:0,onHidden:f[1]||(f[1]=u=>l.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}}),As={class:"sm:flex sm:items-start"},Os=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),Ls={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},Is={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},js={class:"mt-2"},Ps={class:"text-sm text-gray-500"},zs=["onKeyup","placeholder"],Rs=Object.assign({name:"VFModalNewFile"},{props:{selection:Object,current:Object},setup(r){const t=r,o=e.inject("emitter");e.inject("storage");const n=e.inject("adapter"),{t:s}=e.inject("i18n"),a=e.ref(""),l=e.ref(""),m=()=>{a.value!=""&&o.emit("vf-fetch",{params:{q:"newfile",adapter:n.value,path:t.current.dirname,name:a.value},onSuccess:()=>{o.emit("vf-toast-push",{label:s("%s is created.",a.value)})},onError:p=>{l.value=s(p.message)}})};return(p,f)=>(e.openBlock(),e.createBlock(fe,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:m,class:"w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 dark:bg-gray-700 dark:hover:bg-gray-600/75 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(s)("Create")),1),e.createElementVNode("button",{type:"button",onClick:f[2]||(f[2]=u=>e.unref(o).emit("vf-modal-close")),class:"mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(s)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",As,[Os,e.createElementVNode("div",Ls,[e.createElementVNode("h3",Is,e.toDisplayString(e.unref(s)("New File")),1),e.createElementVNode("div",js,[e.createElementVNode("p",Ps,e.toDisplayString(e.unref(s)("Create a new file")),1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":f[0]||(f[0]=u=>a.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:e.unref(s)("File Name"),type:"text"},null,40,zs),[[e.vModelText,a.value]]),l.value.length?(e.openBlock(),e.createBlock(me,{key:0,onHidden:f[1]||(f[1]=u=>l.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}}),Hs={class:"flex"},Fs=["aria-label"],Us={class:"ml-auto mb-2"},Ks={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"},Ys={key:1},Ws={__name:"Text",props:{selection:Object},emits:["load"],setup(r,{emit:t}){const o=r,n=e.ref(""),s=e.ref(""),a=e.ref(null),l=e.ref(!1),{apiUrl:m}=he(),p=e.ref(""),f=e.ref(!1),{t:u}=e.inject("i18n");e.onMounted(()=>{ot(m.value,{params:{q:"preview",adapter:o.selection.adapter,path:o.selection.item.path},json:!1}).then(_=>{n.value=_,t("load")})});const g=()=>{l.value=!l.value,s.value=n.value,l.value==!0&&e.nextTick(()=>{a.value.focus()})},b=e.inject("postData"),D=()=>{p.value="",f.value=!1,ot(m.value,{method:"POST",params:Object.assign(b,{q:"save",adapter:o.selection.adapter,path:o.selection.item.path,content:s.value}),json:!1}).then(_=>{p.value=u("Updated."),n.value=_,t("load"),l.value=!l.value}).catch(_=>{p.value=u(_.message),f.value=!0})};return(_,E)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Hs,[e.createElementVNode("div",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title","aria-label":r.selection.item.path,"data-microtip-position":"bottom-right",role:"tooltip"},e.toDisplayString(r.selection.item.basename),9,Fs),e.createElementVNode("div",Us,[l.value?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:D,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(u)("Save")),1)):e.createCommentVNode("",!0),e.createElementVNode("button",{class:"ml-1 px-2 py-1 text-blue-500",onClick:E[0]||(E[0]=V=>g())},e.toDisplayString(l.value?e.unref(u)("Cancel"):e.unref(u)("Edit")),1)])]),e.createElementVNode("div",null,[l.value?(e.openBlock(),e.createElementBlock("div",Ys,[e.withDirectives(e.createElementVNode("textarea",{ref_key:"editInput",ref:a,"onUpdate:modelValue":E[1]||(E[1]=V=>s.value=V),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,s.value]])])):(e.openBlock(),e.createElementBlock("pre",Ks,e.toDisplayString(n.value),1)),p.value.length?(e.openBlock(),e.createBlock(me,{key:2,onHidden:E[2]||(E[2]=V=>p.value=""),error:f.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.value),1)]),_:1},8,["error"])):e.createCommentVNode("",!0)])],64))}},lu="";/*! - * Cropper.js v1.5.12 +(function(e,ve){typeof exports=="object"&&typeof module<"u"?module.exports=ve(require("vue"),require("plupload")):typeof define=="function"&&define.amd?define(["vue","plupload"],ve):(e=typeof globalThis<"u"?globalThis:e||self,e.VueFinder=ve(e.Vue,e.plupload))})(this,function(e,ve){var mn;"use strict";const st=(mn=document.querySelector('meta[name="csrf-token"]'))==null?void 0:mn.getAttribute("content"),it=(r,{method:t="get",params:n={},json:s=!0,signal:l=null})=>{const i={method:t};if(i.signal=l,t=="get")r+="?"+new URLSearchParams(n);else{i.headers={},st&&(i.headers["X-CSRF-Token"]=st);let c=new FormData;for(const[u,y]of Object.entries(n))c.append(u,y);i.body=c}return fetch(r,i).then(c=>c.ok?s?c.json():c.text():c.json().then(Promise.reject.bind(Promise)))};function Sn(r){return{all:r=r||new Map,on:function(t,n){var s=r.get(t);s?s.push(n):r.set(t,[n])},off:function(t,n){var s=r.get(t);s&&(n?s.splice(s.indexOf(n)>>>0,1):r.set(t,[]))},emit:function(t,n){var s=r.get(t);s&&s.slice().map(function(l){l(n)}),(s=r.get("*"))&&s.slice().map(function(l){l(t,n)})}}}function St(r){let t=localStorage.getItem(r+"_storage");const n=e.ref(JSON.parse(t));e.watch(n,s);function s(){n.value===null||n.value===""?localStorage.removeItem(r+"_storage"):localStorage.setItem(r+"_storage",JSON.stringify(n.value))}function l(u,y){n.value=Object.assign({...n.value},{[u]:y})}function i(){n.value=null}return{getStore:(u,y=null)=>n.value===null||n.value===""?y:n.value.hasOwnProperty(u)?n.value[u]:y,setStore:l,clearStore:i}}const Qt=e.ref("");function ue(){function r(t){Qt.value=t}return{apiUrl:Qt,setApiUrl:r}}const _n={class:"border-neutral-300 flex justify-between items-center py-1 text-sm"},wn={key:0,class:"flex text-center"},kn=["aria-label"],xn=[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)],Dn=["aria-label"],En=[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)],Nn=["aria-label"],Cn=[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)],Vn=["aria-label"],Mn=[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)],Bn=["aria-label"],$n=[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)],Tn=["aria-label"],An=[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)],Ln=["aria-label"],In=[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)],On={key:1,class:"flex text-center"},jn={class:"pl-2"},Pn={class:"dark:bg-gray-700 bg-gray-200 text-xs px-2 py-1 rounded"},zn={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"},Rn=[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),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)],Hn={class:"flex text-center items-center justify-end"},Fn=["aria-label"],Un=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 3v2.25m6.364.386l-1.591 1.591M21 12h-2.25m-.386 6.364l-1.591-1.591M12 18.75V21m-4.773-4.227l-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0z"},null,-1)],Kn=["aria-label"],Yn={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"},Wn={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"},Xn={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"},Zn=["aria-label"],qn={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"},Gn={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"},Jn=Object.assign({name:"VFToolbar"},{props:{data:Object},setup(r){const t=e.inject("emitter"),{getStore:n,setStore:s}=e.inject("storage"),{t:l}=e.inject("i18n"),i=e.ref(n("viewport","grid")),c=e.ref([]),u=e.ref(n("full-screen",!1)),y=e.ref("");t.on("vf-search-query",({newQuery:S})=>{y.value=S});const g=e.inject("loadingState"),m=()=>g.value,b=()=>{u.value=!u.value,t.emit("vf-fullscreen-toggle")};return t.on("vf-nodes-selected",S=>{c.value=S}),t.on("vf-view-toggle",S=>{s("viewport",S),i.value=S}),(S,x)=>(e.openBlock(),e.createElementBlock("div",_n,[y.value.length?(e.openBlock(),e.createElementBlock("div",On,[e.createElementVNode("div",jn,[e.createTextVNode(e.toDisplayString(e.unref(l)("Search results for"))+" ",1),e.createElementVNode("span",Pn,e.toDisplayString(y.value),1)]),m()?(e.openBlock(),e.createElementBlock("svg",zn,Rn)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",wn,[e.createElementVNode("div",{class:"mx-1.5","aria-label":e.unref(l)("New Folder"),"data-microtip-position":"bottom-right",role:"tooltip",onClick:x[0]||(x[0]=k=>e.unref(t).emit("vf-modal-show",{type:"new-folder",items:c.value}))},xn,8,kn),e.createElementVNode("div",{class:"mx-1.5","aria-label":e.unref(l)("New File"),"data-microtip-position":"bottom",role:"tooltip",onClick:x[1]||(x[1]=k=>e.unref(t).emit("vf-modal-show",{type:"new-file",items:c.value}))},En,8,Dn),e.createElementVNode("div",{class:"mx-1.5","aria-label":e.unref(l)("Rename"),"data-microtip-position":"bottom",role:"tooltip",onClick:x[2]||(x[2]=k=>c.value.length!=1||e.unref(t).emit("vf-modal-show",{type:"rename",items:c.value}))},[(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",class:e.normalizeClass([c.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"},Cn,2))],8,Nn),e.createElementVNode("div",{class:"mx-1.5","aria-label":e.unref(l)("Delete"),"data-microtip-position":"bottom",role:"tooltip",onClick:x[3]||(x[3]=k=>!c.value.length||e.unref(t).emit("vf-modal-show",{type:"delete",items:c.value}))},[(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",class:e.normalizeClass([c.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"},Mn,2))],8,Vn),e.createElementVNode("div",{class:"mx-1.5","aria-label":e.unref(l)("Upload"),"data-microtip-position":"bottom",role:"tooltip",onClick:x[4]||(x[4]=k=>e.unref(t).emit("vf-modal-show",{type:"upload",items:c.value}))},$n,8,Bn),c.value.length==1&&c.value[0].mime_type=="application/zip"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"mx-1.5","aria-label":e.unref(l)("Unrchive"),"data-microtip-position":"bottom",role:"tooltip",onClick:x[5]||(x[5]=k=>!c.value.length||e.unref(t).emit("vf-modal-show",{type:"unarchive",items:c.value}))},[(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",class:e.normalizeClass([c.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"},An,2))],8,Tn)):(e.openBlock(),e.createElementBlock("div",{key:1,class:"mx-1.5","aria-label":e.unref(l)("Archive"),"data-microtip-position":"bottom",role:"tooltip",onClick:x[6]||(x[6]=k=>!c.value.length||e.unref(t).emit("vf-modal-show",{type:"archive",items:c.value}))},[(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",class:e.normalizeClass([c.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"},In,2))],8,Ln))])),e.createElementVNode("div",Hn,[e.createElementVNode("div",{class:"mx-1.5","aria-label":e.unref(l)("Dark Mode"),"data-microtip-position":"bottom",role:"tooltip"},[(e.openBlock(),e.createElementBlock("svg",{onClick:x[7]||(x[7]=k=>e.unref(t).emit("vf-darkMode-toggle")),viewBox:"0 0 24 24","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"h-6 w-6 m-auto cursor-pointer stroke-sky-500 fill-sky-100 hover:stroke-sky-600 dark:stroke-gray-400 dark:fill-gray-400/20 dark:hover:stroke-gray-300"},Un))],8,Fn),e.createElementVNode("div",{class:"mx-1.5","aria-label":e.unref(l)("Toggle Full Screen"),"data-microtip-position":"bottom-left",role:"tooltip",onClick:b},[(e.openBlock(),e.createElementBlock("svg",Yn,[u.value?(e.openBlock(),e.createElementBlock("path",Wn)):(e.openBlock(),e.createElementBlock("path",Xn))]))],8,Kn),e.createElementVNode("div",{class:"mx-1.5","aria-label":e.unref(l)("Change View"),"data-microtip-position":"bottom-left",role:"tooltip",onClick:x[8]||(x[8]=k=>y.value.length||e.unref(t).emit("vf-view-toggle",i.value=="list"?"grid":"list"))},[(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",class:e.normalizeClass([y.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"},[i.value=="grid"?(e.openBlock(),e.createElementBlock("path",qn)):e.createCommentVNode("",!0),i.value=="list"?(e.openBlock(),e.createElementBlock("path",Gn)):e.createCommentVNode("",!0)],2))],8,Zn)])]))}});var Qn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},er={exports:{}};(function(r,t){(function(n,s){r.exports=s()})(Qn,function(){function n(h,d){if(!(h instanceof d))throw new TypeError("Cannot call a class as a function")}function s(h,d){for(var o=0;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function S(h,d,o){return b()?S=Reflect.construct:S=function(a,f,v){var _=[null];_.push.apply(_,f);var w=Function.bind.apply(a,_),L=new w;return v&&m(L,v.prototype),L},S.apply(null,arguments)}function x(h){return Function.toString.call(h).indexOf("[native code]")!==-1}function k(h){var d=typeof Map=="function"?new Map:void 0;return k=function(p){if(p===null||!x(p))return p;if(typeof p!="function")throw new TypeError("Super expression must either be null or a function");if(typeof d<"u"){if(d.has(p))return d.get(p);d.set(p,a)}function a(){return S(p,arguments,g(this).constructor)}return a.prototype=Object.create(p.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),m(a,p)},k(h)}function N(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}function C(h,d){return d&&(typeof d=="object"||typeof d=="function")?d:N(h)}function A(h){var d=b();return function(){var p=g(h),a;if(d){var f=g(this).constructor;a=Reflect.construct(p,arguments,f)}else a=p.apply(this,arguments);return C(this,a)}}function T(h,d){for(;!Object.prototype.hasOwnProperty.call(h,d)&&(h=g(h),h!==null););return h}function V(h,d,o){return typeof Reflect<"u"&&Reflect.get?V=Reflect.get:V=function(a,f,v){var _=T(a,f);if(_){var w=Object.getOwnPropertyDescriptor(_,f);return w.get?w.get.call(v):w.value}},V(h,d,o||h)}function j(h,d){return B(h)||W(h,d)||Y(h,d)||ne()}function I(h){return D(h)||H(h)||Y(h)||ie()}function D(h){if(Array.isArray(h))return te(h)}function B(h){if(Array.isArray(h))return h}function H(h){if(typeof Symbol<"u"&&Symbol.iterator in Object(h))return Array.from(h)}function W(h,d){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(h)))){var o=[],p=!0,a=!1,f=void 0;try{for(var v=h[Symbol.iterator](),_;!(p=(_=v.next()).done)&&(o.push(_.value),!(d&&o.length===d));p=!0);}catch(w){a=!0,f=w}finally{try{!p&&v.return!=null&&v.return()}finally{if(a)throw f}}return o}}function Y(h,d){if(h){if(typeof h=="string")return te(h,d);var o=Object.prototype.toString.call(h).slice(8,-1);if(o==="Object"&&h.constructor&&(o=h.constructor.name),o==="Map"||o==="Set")return Array.from(h);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return te(h,d)}}function te(h,d){(d==null||d>h.length)&&(d=h.length);for(var o=0,p=new Array(d);o"u"||h[Symbol.iterator]==null){if(Array.isArray(h)||(o=Y(h))||d&&h&&typeof h.length=="number"){o&&(h=o);var p=0,a=function(){};return{s:a,n:function(){return p>=h.length?{done:!0}:{done:!1,value:h[p++]}},e:function(w){throw w},f:a}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var f=!0,v=!1,_;return{s:function(){o=h[Symbol.iterator]()},n:function(){var w=o.next();return f=w.done,w},e:function(w){v=!0,_=w},f:function(){try{!f&&o.return!=null&&o.return()}finally{if(v)throw _}}}}var E=function(d,o,p){var a=d.x,f=d.y,v=p.x,_=p.y,w={"+":{x:a+v,y:f+_},"-":{x:a-v,y:f-_},"*":{x:a*v,y:f*_},"/":{x:a/v,y:f/_}};return w[o]},$=function(d){return{x:d.left,y:d.top}},M=function(d){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return{left:d.x,top:d.y,right:d.x,bottom:d.y,width:o,height:o}},G=function(d){return{x:d,y:d}},O=function(h,d){var o=d;window.addEventListener("resize",o),window.addEventListener("scroll",o);var p=new MutationObserver(o);h.forEach(function(f,v){p.observe(f,{childList:v!==0,attributes:!0})});var a=function(){return Ed(p,o)};return{observer:p,callback:o,cleanup:a}},de=function(h){var d=vt(h);return d.x||d.y?!0:h instanceof Document?h.body?!!(h.body.scrollTop=1):!!(h.documentElement.scrollTop=1):!!(h.scrollTop=1)},he=function(){var h=document.createElement("div");return h.style.position="fixed",h.style.overflow="hidden",h.style.pointerEvents="none",h.style.zIndex="999999999999999999",h},yt=function(h){var d=document.createElement("div");return d.style.position="absolute",h||(d.style.background="rgba(0, 175, 255, 0.2)",d.style.border="1px solid rgba(0, 175, 255, 0.8)",d.style.display="none",d.style.pointerEvents="none"),d},Qe=function(h,d){var o;return function(){for(var p=arguments.length,a=new Array(p),f=0;f1&&arguments[1]!==void 0?arguments[1]:0,v=(a=p[f])===null||a===void 0?void 0:a.parentNode;return v?(p.push(v),f++,o(p,f)):p};return d([h])},pd=function(h,d){if(h instanceof Document)return{top:0,left:0,bottom:0,right:0,width:window.innerWidth,height:window.innerHeight};var o=h.getBoundingClientRect();return{top:o.top,left:o.left,bottom:o.bottom,right:o.right,width:(h.clientWidth||o.width)*d,height:(h.clientHeight||o.height)*d}},vt=function(h){return!h||h instanceof Document?et():{x:h.scrollLeft>=0?h.scrollLeft:et().x,y:h.scrollTop>=0?h.scrollTop:et().y}},pn=function(h){var d=h.elementRect,o=h.containerRect,p=h.tolerance,a=p===void 0?{x:0,y:0}:p,f=[];return d.top-a.yo.bottom&&f.push("bottom"),d.right+a.y>o.right&&f.push("right"),f},gd=function(h){var d=h.event;return{x:d.clientX,y:d.clientY}},yd=function(h){var d=h.scrollAmount,o=h.initialPointerPos,p=h.pointerPos,a={};return p.x>o.x-d.x?(a.left=o.x-d.x,a.width=p.x-o.x+d.x):(a.left=p.x,a.width=o.x-p.x-d.x),p.y>o.y-d.y?(a.top=o.y-d.y,a.height=p.y-o.y+d.y):(a.top=p.y,a.height=o.y-p.y-d.y),a},gn=function(d){var o={x:0,y:0},p=window.getComputedStyle(d);if(!p.transform||p.transform==="none")return o;if(p.transform.indexOf("3d")>=0){var a=p.transform.trim().match(/matrix3d\((.*?)\)/);if(a&&a.length){var f,v=(f=a[1])===null||f===void 0?void 0:f.split(",");o.x=parseInt(v[12])||0,o.y=parseInt(v[13])||0}return o}var _=p.transform.trim().match(/matrix\((.*?)\)/);if(_&&_.length){var w,L=(w=_[1])===null||w===void 0?void 0:w.split(",");o.x=parseInt(L[4])||0,o.y=parseInt(L[5])||0}return o},bd=function(d){var o=d.style.transform;if(!o||o.indexOf("translate")<0)return gn(d);var p={x:0,y:0},a=o.trim().match(/translate[3dD]*?\(.*?\)/);if(a){var f,v=(f=a[0])===null||f===void 0?void 0:f.split("(");if(v){var _,w=(_=v[1])===null||_===void 0?void 0:_.split(",");p.x=parseInt(w[0])||0,p.y=parseInt(w[1])||0}}return!p.x&&!p.x?gn(d):p},vd=function(d){var o=d.style,p={x:parseInt(o.left)||0,y:parseInt(o.top)||0};if(!p.x&&!p.x){var a=window.getComputedStyle(d);return{x:parseInt(a.left)||0,y:parseInt(a.top)||0}}return p},Sd=function(h,d){return d?bd(h):vd(h)},_d=function(h){var d=h.element,o=h.edges,p=h.elementRect,a=h.containerRect,f=h.elementPos,v=h.useTransform;o.includes("top")&&nt(d,{y:f.y+a.top-p.top,x:f.x},v),o.includes("left")&&nt(d,{y:f.y,x:f.x+a.left-p.left},v),o.includes("bottom")&&nt(d,{y:f.y+a.bottom-p.bottom,x:f.x},v),o.includes("right")&&nt(d,{y:f.y,x:f.x+a.right-p.right},v)},yn=function(h){var d=h.computedStyle,o=h.node,p=d.position,a=p==="absolute"||p==="relative"||p==="fixed";!(o instanceof Document)&&!a&&(o.style.position="relative")},wd=function(h){var d=h.shiftKey,o=h.keyboardDragSpeed,p=h.zoom,a=h.key,f=h.dragKeys,v=h.scrollDiff,_=h.canScroll,w=h.scrollCallback,L={x:0,y:0},R=d?o*4*p:o*p;return f.left.includes(a)&&(L.x=v.x||-R,!d&&!v.x&&_&&w(["left"],o)),f.right.includes(a)&&(L.x=v.x||R,!d&&!v.x&&_&&w(["right"],o)),f.up.includes(a)&&(L.y=v.y||-R,!d&&!v.y&&_&&w(["top"],o)),f.down.includes(a)&&(L.y=v.y||R,!d&&!v.y&&_&&w(["bottom"],o)),L},kd=function(h){var d=h.element,o=h.force,p=h.multiSelectionToggle,a=h.SelectedSet,f=h.hoverClassName;d.classList.contains(f)&&!o||(a.has(d)?p&&a.delete(d):a.add(d),d.classList.add(f))},xd=function(h){var d=h.element,o=h.force,p=h.SelectedSet,a=h.PrevSelectedSet,f=h.hoverClassName;if(!d.classList.contains(f)&&!o)return!1;var v=p.has(d),_=a.has(d);v&&!_?p.delete(d):!v&&_&&p.add(d),d.classList.remove(f)},tt=function(d,o,p){return console.warn('[DragSelect] TypeIssue: setting "'.concat(d,'" is not of type "').concat(o,'".'))},z=function(d,o,p,a){if(o===void 0)return p?i({},d,a):{};if(o===null)return i({},d,null);var f=!0,v=!1,_=typeof a=="string";_&&(f=typeof o=="string"||o instanceof String),_&&!f&&(v=!0,tt(d,"string"));var w=!Number.isNaN(a)&&typeof a=="number";w&&(f=!Number.isNaN(o)&&typeof o=="number"),w&&!f&&(v=!0,tt(d,"number"));var L=Object.prototype.toString.call(a)==="[object Object]";L&&(f=Object.prototype.toString.call(o)==="[object Object]"),L&&!f&&(v=!0,tt(d,"object"));var R=typeof a=="boolean";R&&(f=typeof o=="boolean"),R&&!f&&(v=!0,tt(d,"boolean"));var X=Array.isArray(a);X&&(f=Array.isArray(o)),X&&!f&&(v=!0,tt(d,"array"));var ae=v||p;return d==="dragKeys"&&f?i({},d,Object.assign(a,o)):d==="dragKeys"&&!f?ae?i({},d,a):{}:(d==="dropZones"&&f&&new Set(o.map(function(oe){return oe.id})).size!==o.length&&console.warn('[DragSelect] UniqueConstraintsIssue: setting "dropZones" contains duplicate ids.'),f?i({},d,o):ae?i({},d,a):{})},Dd=function(h,d){return u(u(u(u(u(u(u(u(u(u(u(u(u(u(u(u(u(u(u(u(u(u(u(u(u(u(u(u(u(u(u(u(u(u({},z("area",h.area,d,document)),z("selectables",h.selectables,d,null)),z("autoScrollSpeed",h.autoScrollSpeed,d,5)),z("overflowTolerance",h.overflowTolerance,d,{x:25,y:25})),z("zoom",h.zoom,d,1)),z("customStyles",h.customStyles,d,!1)),z("multiSelectMode",h.multiSelectMode,d,!1)),z("multiSelectToggling",h.multiSelectToggling,d,!0)),z("multiSelectKeys",h.multiSelectKeys,d,["Control","Shift","Meta"])),z("selector",h.selector,d,null)),z("selectionThreshold",h.selectionThreshold,d,0)),z("draggability",h.draggability,d,!0)),z("immediateDrag",h.immediateDrag,d,!0)),z("keyboardDrag",h.keyboardDrag,d,!0)),z("dragKeys",h.dragKeys,d,{up:["ArrowUp"],down:["ArrowDown"],left:["ArrowLeft"],right:["ArrowRight"]})),z("keyboardDragSpeed",h.keyboardDragSpeed,d,10)),z("useTransform",h.useTransform,d,!0)),z("refreshMemoryRate",h.refreshMemoryRate,d,80)),z("dropZones",h.dropZones,d,[])),z("dropInsideThreshold",h.dropInsideThreshold,d,1)),z("dropTargetThreshold",h.dropTargetThreshold,d,0)),z("usePointerEvents",h.usePointerEvents,d,!1)),z("hoverClass",h.hoverClass,d,"ds-hover")),z("selectableClass",h.selectableClass,d,"ds-selectable")),z("selectedClass",h.selectedClass,d,"ds-selected")),z("selectorClass",h.selectorClass,d,"ds-selector")),z("selectorAreaClass",h.selectorAreaClass,d,"ds-selector-area")),z("droppedTargetClass",h.droppedTargetClass,d,"ds-dropped-target")),z("droppedInsideClass",h.droppedInsideClass,d,"ds-dropped-inside")),z("droppableClass",h.droppableClass,d,"ds-droppable")),z("dropZoneClass",h.dropZoneClass,d,"ds-dropzone")),z("dropZoneReadyClass",h.dropZoneReadyClass,d,"ds-dropzone-ready")),z("dropZoneTargetClass",h.dropZoneTargetClass,d,"ds-dropzone-target")),z("dropZoneInsideClass",h.dropZoneInsideClass,d,"ds-dropzone-inside"))},rt=function(h,d){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,p=h;if(o>0){var a=(h.right-h.left)*o,f=(h.bottom-h.top)*o;p={left:h.left+a,right:h.right-a,top:h.top+f,bottom:h.bottom-f}}return p.leftd.left&&p.topd.top},bn=function(h){var d=h.element,o=h.posDirection,p=h.containerRect,a=h.useTransform,f=Sd(d,a),v=E(f,"+",o);nt(d,v,a);var _=d.getBoundingClientRect(),w=pn({elementRect:_,containerRect:p});_d({element:d,edges:w,elementRect:_,containerRect:p,elementPos:v,useTransform:a})},Ed=function(h,d){window.removeEventListener("resize",d),window.removeEventListener("scroll",d),h.disconnect()},Nd=function(h,d,o){if(d.length){var p=document&&document.documentElement&&document.documentElement.scrollTop&&document.documentElement,a=h instanceof Document?p||document.body:h,f=d.includes("top")&&a.scrollTop>0,v=d.includes("bottom")&&a.scrollTop0,w=d.includes("right")&&a.scrollLeft0)){var v=o.DS,_=v.stores,w=_.PointerStore,L=_.KeyStore,R=v.SelectableSet,X=v.SelectedSet;w.start(f);var ae=f.target;R.has(ae)&&(L.isMultiSelectKeyPressed(f)||X.clear(),X.toggle(ae),o.reset())}}),i(this,"stop",function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:o.DS.Area.HTMLNode;o.isInteracting=!1,o.isDragging=!1,o.Settings.usePointerEvents?(a.removeEventListener("pointerdown",o.start,{passive:!1}),document.removeEventListener("pointerup",o.reset),document.removeEventListener("pointercancel",o.reset)):(a.removeEventListener("mousedown",o.start),document.removeEventListener("mouseup",o.reset)),a.removeEventListener("touchstart",o.start,{passive:!1}),document.removeEventListener("touchend",o.reset)}),i(this,"update",function(a){var f=a.event,v=a.scroll_directions,_=a.scroll_multiplier;o.isInteracting&&o.DS.publish(["Interaction:update:pre","Interaction:update"],{event:f,scroll_directions:v,scroll_multiplier:_,isDragging:o.isDragging})}),i(this,"reset",function(a){return o.DS.publish("Interaction:end:pre",{event:a,isDragging:o.isDragging})}),i(this,"_reset",function(a){var f=o.isDragging;o.stop(),o.init(),o.DS.publish("Interaction:end",{event:a,isDragging:f})}),this.DS=p,this.Settings=p.stores.SettingsStore.s,this.DS.subscribe("Settings:updated:area",function(a){var f=a.settings;o.stop(f["area:pre"]),o.init()}),this.DS.subscribe("PointerStore:updated",this.update),this.DS.subscribe("Selectable:click",this.onClick),this.DS.subscribe("Selectable:pointer",function(a){var f=a.event;return o.start(f)}),this.DS.subscribe("Interaction:start:pre",function(a){var f=a.event;return o._start(f)}),this.DS.subscribe("Interaction:init:pre",this._init),this.DS.subscribe("Interaction:end:pre",function(a){var f=a.event;return o._reset(f)}),this.DS.subscribe("Area:scroll",this.update)}return l(h,[{key:"_canInteract",value:function(o){var p=o.clientX===0&&o.clientY===0&&o.detail===0&&o.target;return!(o.button===2||this.isInteracting||o.target&&!this.DS.SelectorArea.isInside(o.target)||!p&&!this.DS.SelectorArea.isClicked(o))}}]),h}(),Ad=function h(d){var o=this,p=d.DS;n(this,h),i(this,"subscribers",{}),i(this,"subscribe",function(a,f){return Array.isArray(o.subscribers[a])||(o.subscribers[a]=[]),o.subscribers[a].push(f),o.subscribers[a].length-1}),i(this,"unsubscribe",function(a,f,v){v>=0?o.subscribers[a].splice(v,1):f&&(o.subscribers[a]=o.subscribers[a].filter(function(_){return _!==f}))}),i(this,"publish",function(a,f){Array.isArray(a)?a.forEach(function(v){return o._publish(v,f)}):o._publish(a,f)}),i(this,"_publish",function(a,f){var v=o.subscribers[a];Array.isArray(v)&&(a.includes(":pre")?o._handlePrePublish(v,f):o._handlePublish(v,f))}),i(this,"_handlePublish",function(a,f){for(var v=0,_=a.length;v<_;v++){if(o.DS.stopped)return;a[v](f)}}),i(this,"_handlePrePublish",function(a,f){for(var v=a.length;v--;){if(o.DS.stopped)return;a[v](f)}}),this.DS=p},Ld=function(h){y(o,h);var d=A(o);function o(p){var a,f=p.DS;return n(this,o),a=d.call(this),i(N(a),"_rects",void 0),i(N(a),"_timeout",void 0),i(N(a),"init",function(){return Te(a.Settings.selectables).forEach(function(v){return a.add(v)})}),i(N(a),"clear",function(){return a.forEach(function(v){return a.delete(v)})}),i(N(a),"_onClick",function(v){return a.DS.publish(["Selectable:click:pre","Selectable:click"],{event:v})}),i(N(a),"_onPointer",function(v){return a.DS.publish(["Selectable:pointer:pre","Selectable:pointer"],{event:v})}),i(N(a),"addAll",function(v){return v.forEach(function(_){return a.add(_)})}),i(N(a),"deleteAll",function(v){return v.forEach(function(_){return a.delete(_)})}),a.DS=f,a.Settings=f.stores.SettingsStore.s,a.DS.subscribe("Interaction:init",a.init),a.DS.PubSub.subscribe("Settings:updated:selectables",function(){a.clear(),a.init()}),a.DS.subscribe("Settings:updated:selectableClass",function(v){var _=v.settings;a.forEach(function(w){w.classList.remove(_["selectableClass:pre"]),w.classList.add(_.selectableClass)})}),a}return l(o,[{key:"add",value:function(a){if(!V(g(o.prototype),"has",this).call(this,a)){var f={items:this.elements,item:a};return this.DS.publish("Selectable:added:pre",f),a.classList.add(this.Settings.selectableClass),a.addEventListener("click",this._onClick),this.Settings.usePointerEvents?a.addEventListener("pointerdown",this._onPointer,{passive:!1}):a.addEventListener("mousedown",this._onPointer),a.addEventListener("touchstart",this._onPointer,{passive:!1}),this.Settings.draggability&&!this.Settings.useTransform&&yn({computedStyle:window.getComputedStyle(a),node:a}),this.DS.publish("Selectable:added",f),V(g(o.prototype),"add",this).call(this,a)}}},{key:"delete",value:function(a){if(V(g(o.prototype),"has",this).call(this,a)){var f={items:this.elements,item:a};return this.DS.publish("Selectable:removed:pre",f),a.classList.remove(this.Settings.selectableClass),a.classList.remove(this.Settings.hoverClass),a.removeEventListener("click",this._onClick),this.Settings.usePointerEvents?a.removeEventListener("pointerdown",this._onPointer,{passive:!1}):a.removeEventListener("mousedown",this._onPointer),a.removeEventListener("touchstart",this._onPointer,{passive:!1}),this.DS.publish("Selectable:removed",f),V(g(o.prototype),"delete",this).call(this,a)}}},{key:"elements",get:function(){return Array.from(this.values())}},{key:"rects",get:function(){var a=this;return this._rects?this._rects:(this._rects=new Map,this.forEach(function(f){return a._rects.set(f,f.getBoundingClientRect())}),this._timeout&&clearTimeout(this._timeout),this._timeout=setTimeout(function(){return a._rects=null},this.Settings.refreshMemoryRate),this._rects)}}]),o}(k(Set)),Id=function(h){y(o,h);var d=A(o);function o(p){var a,f=p.DS;return n(this,o),a=d.call(this),i(N(a),"clear",function(){return a.forEach(function(v){return a.delete(v)})}),i(N(a),"addAll",function(v){return v.forEach(function(_){return a.add(_)})}),i(N(a),"deleteAll",function(v){return v.forEach(function(_){return a.delete(_)})}),a.DS=f,a}return l(o,[{key:"add",value:function(a){if(!V(g(o.prototype),"has",this).call(this,a)){var f={items:this.elements,item:a};return this.DS.publish("Selected:added:pre",f),V(g(o.prototype),"add",this).call(this,a),a.classList.add(this.DS.stores.SettingsStore.s.selectedClass),a.style.zIndex="".concat((parseInt(a.style.zIndex)||0)+1),this.DS.publish("Selected:added",f),this}}},{key:"delete",value:function(a){if(V(g(o.prototype),"has",this).call(this,a)){var f={items:this.elements,item:a};this.DS.publish("Selected:removed:pre",f);var v=V(g(o.prototype),"delete",this).call(this,a);return a.classList.remove(this.DS.stores.SettingsStore.s.selectedClass),a.style.zIndex="".concat((parseInt(a.style.zIndex)||0)-1),this.DS.publish("Selected:removed",f),v}}},{key:"toggle",value:function(a){return this.has(a)?this.delete(a):this.add(a),a}},{key:"elements",get:function(){return Array.from(this.values())}}]),o}(k(Set)),Od=function(){function h(d){var o=this,p=d.DS;n(this,h),i(this,"_prevSelectedSet",void 0),i(this,"start",function(a){var f=a.event,v=a.isDragging;v||(o._storePrevious(f),o._handleInsideSelection(!0,f))}),i(this,"update",function(a){var f=a.isDragging;f||o.DS.continue||o._handleInsideSelection()}),i(this,"_handleInsideSelection",function(a,f){var v=o.DS,_=v.SelectableSet,w=v.SelectorArea,L=v.Selector,R=_.rects,X=[],ae=[],oe=re(R),be;try{for(oe.s();!(be=oe.n()).done;){var Z=j(be.value,2),le=Z[0],ot=Z[1];w.isInside(le,ot)&&(rt(ot,L.rect,o.Settings.selectionThreshold)?X.push(le):ae.push(le))}}catch(Ae){oe.e(Ae)}finally{oe.f()}var Jt=o.DS.stores.KeyStore.isMultiSelectKeyPressed(f)&&o.Settings.multiSelectToggling;o.DS.continue||(X.forEach(function(Ae){return kd({element:Ae,force:a,multiSelectionToggle:Jt,SelectedSet:o.DS.SelectedSet,hoverClassName:o.Settings.hoverClass})}),ae.forEach(function(Ae){return xd({element:Ae,force:a,SelectedSet:o.DS.SelectedSet,hoverClassName:o.Settings.hoverClass,PrevSelectedSet:o._prevSelectedSet})}))}),this.DS=p,this.Settings=this.DS.stores.SettingsStore.s,this.DS.subscribe("Interaction:start",this.start),this.DS.subscribe("Interaction:update",this.update)}return l(h,[{key:"_storePrevious",value:function(o){var p=this.DS,a=p.stores.KeyStore,f=p.SelectedSet;a.isMultiSelectKeyPressed(o)?this._prevSelectedSet=new Set(f):this._prevSelectedSet=new Set}}]),h}(),jd=function(){function h(d){var o=this,p=d.DS;n(this,h),i(this,"_rect",void 0),i(this,"attachSelector",function(){var a,f;o.HTMLNode&&(a=o.DS.SelectorArea)!==null&&a!==void 0&&a.HTMLNode&&o.DS.SelectorArea.HTMLNode.removeChild(o.HTMLNode),o.HTMLNode=o.DS.stores.SettingsStore.s.selector||yt(o.DS.stores.SettingsStore.s.customStyles),o.HTMLNode.classList.add(o.DS.stores.SettingsStore.s.selectorClass),o.HTMLNode&&(f=o.DS.SelectorArea)!==null&&f!==void 0&&f.HTMLNode&&o.DS.SelectorArea.HTMLNode.appendChild(o.HTMLNode)}),i(this,"start",function(a){var f=a.isDragging;if(!f){var v=o.DS.stores.PointerStore,_=v.initialValArea;vn(o.HTMLNode,M(_,1)),o.HTMLNode.style.display="block",o._rect=null}}),i(this,"stop",function(){o.HTMLNode.style.width="0",o.HTMLNode.style.height="0",o.HTMLNode.style.display="none"}),i(this,"update",function(a){var f=a.isDragging;if(!(f||o.DS.continue)){var v=o.DS.stores,_=v.ScrollStore,w=v.PointerStore,L=yd({scrollAmount:_.scrollAmount,initialPointerPos:w.initialValArea,pointerPos:w.currentValArea});vn(o.HTMLNode,L),o._rect=null}}),this.DS=p,this.DS.subscribe("Settings:updated:selectorClass",function(a){var f=a.settings;o.HTMLNode.classList.remove(f["selectorClass:pre"]),o.HTMLNode.classList.add(f.selectorClass)}),this.DS.subscribe("Settings:updated:selector",this.attachSelector),this.DS.subscribe("Settings:updated:customStyles",this.attachSelector),this.attachSelector(),this.DS.subscribe("Interaction:start",this.start),this.DS.subscribe("Interaction:update",this.update),this.DS.subscribe("Interaction:end",this.stop)}return l(h,[{key:"rect",get:function(){return this._rect?this._rect:this._rect=this.HTMLNode.getBoundingClientRect()}}]),h}(),Pd=function(){function h(d){var o=this,p=d.DS;n(this,h),i(this,"_scrollInterval",void 0),i(this,"_rect",void 0),i(this,"currentEdges",[]),i(this,"start",function(){return o.applyElements("append")}),i(this,"applyElements",function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"append",f=document.body?"body":"documentElement",v="".concat(a,"Child");o.HTMLNode[v](o.DS.Selector.HTMLNode),document[f][v](o.HTMLNode)}),i(this,"updatePos",function(){o._rect=null;var a=o.DS.Area.rect,f=o.DS.Area.computedBorder,v=o.HTMLNode.style,_="".concat(a.top+f.top,"px"),w="".concat(a.left+f.left,"px"),L="".concat(a.width,"px"),R="".concat(a.height,"px");v.top!==_&&(v.top=_),v.left!==w&&(v.left=w),v.width!==L&&(v.width=L),v.height!==R&&(v.height=R)}),i(this,"stop",function(a){o.stopAutoScroll(),a&&o.applyElements("remove")}),i(this,"startAutoScroll",function(){o.currentEdges=[],o._scrollInterval=setInterval(function(){return o.handleAutoScroll()},16)}),i(this,"handleAutoScroll",function(){if(!o.DS.continue){var a=o.DS,f=a.stores.PointerStore,v=a.Area;o.currentEdges=pn({elementRect:M(f.currentVal),containerRect:o.rect,tolerance:o.DS.stores.SettingsStore.s.overflowTolerance}),o.currentEdges.length&&v.scroll(o.currentEdges,o.DS.stores.SettingsStore.s.autoScrollSpeed)}}),i(this,"stopAutoScroll",function(){o.currentEdges=[],clearInterval(o._scrollInterval)}),i(this,"isInside",function(a,f){return o.DS.Area.HTMLNode.contains(a)&&o.DS.stores.ScrollStore.canScroll?!0:rt(o.rect,f||a.getBoundingClientRect())}),this.DS=p,this.HTMLNode=he(),this.DS.subscribe("Settings:updated:selectorAreaClass",function(a){var f=a.settings;o.HTMLNode.classList.remove(f["selectorAreaClass:pre"]),o.HTMLNode.classList.add(f.selectorAreaClass)}),this.HTMLNode.classList.add(this.DS.stores.SettingsStore.s.selectorAreaClass),this.DS.subscribe("Area:modified",this.updatePos),this.DS.subscribe("Area:modified",this.updatePos),this.DS.subscribe("Interaction:init",this.start),this.DS.subscribe("Interaction:start",this.startAutoScroll),this.DS.subscribe("Interaction:end",function(){o.updatePos(),o.stopAutoScroll()})}return l(h,[{key:"isClicked",value:function(o){var p=this.DS.stores.PointerStore,a=o?p.getPointerPosition(o):p.initialVal;return rt({left:a.x,top:a.y,right:a.x,bottom:a.y},this.rect)}},{key:"rect",get:function(){return this._rect?this._rect:this._rect=this.HTMLNode.getBoundingClientRect()}}]),h}(),zd=function(){function h(d){var o=this,p=d.DS;n(this,h),i(this,"_currentValues",new Set),i(this,"_keyMapping",{control:"ctrlKey",shift:"shiftKey",meta:"metaKey"}),i(this,"init",function(){document.addEventListener("keydown",o.keydown),document.addEventListener("keyup",o.keyup),window.addEventListener("blur",o.reset)}),i(this,"keydown",function(a){var f=a.key.toLowerCase();o.DS.publish("KeyStore:down:pre",{event:a,key:f}),o._currentValues.add(f),o.DS.publish("KeyStore:down",{event:a,key:f})}),i(this,"keyup",function(a){var f=a.key.toLowerCase();o.DS.publish("KeyStore:up:pre",{event:a,key:f}),o._currentValues.delete(f),o.DS.publish("KeyStore:up",{event:a,key:f})}),i(this,"stop",function(){document.removeEventListener("keydown",o.keydown),document.removeEventListener("keyup",o.reset),window.removeEventListener("blur",o.reset),o.reset()}),i(this,"reset",function(){return o._currentValues.clear()}),this.DS=p,this.DS.subscribe("Interaction:init",this.init)}return l(h,[{key:"isMultiSelectKeyPressed",value:function(o){var p=this;if(this.DS.stores.SettingsStore.s.multiSelectMode)return!0;var a=this.DS.stores.SettingsStore.s.multiSelectKeys.map(function(f){return f.toLocaleLowerCase()});return!!(this.currentValues.some(function(f){return a.includes(f.toLocaleLowerCase())})||o&&a.some(function(f){return o[p._keyMapping[f]]}))}},{key:"currentValues",get:function(){return Array.from(this._currentValues.values())}}]),h}(),Rd=function(){function h(d){var o=this,p=d.DS;n(this,h),i(this,"_isMouseInteraction",!1),i(this,"_initialValArea",void 0),i(this,"_currentValArea",void 0),i(this,"_lastValArea",void 0),i(this,"_initialVal",void 0),i(this,"_currentVal",void 0),i(this,"_lastVal",void 0),i(this,"_lastTouch",void 0),i(this,"init",function(){o.Settings.usePointerEvents?document.addEventListener("pointermove",o.update,{passive:!1}):document.addEventListener("mousemove",o.update),document.addEventListener("touchmove",o.update,{passive:!1})}),i(this,"getPointerPosition",function(a){return gd({event:o._normalizedEvent(a)})}),i(this,"update",function(a){a&&(o.DS.publish("PointerStore:updated:pre",{event:a}),o.currentVal=o.getPointerPosition(a),o._isMouseInteraction&&o.DS.publish("PointerStore:updated",{event:a}))}),i(this,"stop",function(){o.Settings.usePointerEvents?document.removeEventListener("pointermove",o.update,{passive:!1}):document.removeEventListener("mousemove",o.update),document.removeEventListener("touchmove",o.update,{passive:!1}),setTimeout(function(){return o._isMouseInteraction=!1},100)}),i(this,"reset",function(a){a&&(o.currentVal=o.lastVal=o.getPointerPosition(a),o.stop(),o.init())}),this.DS=p,this.Settings=p.stores.SettingsStore.s,this.DS.subscribe("Interaction:init",this.init),this.DS.subscribe("Interaction:start",function(a){var f=a.event;return o.start(f)}),this.DS.subscribe("Interaction:end",function(a){var f=a.event;return o.reset(f)})}return l(h,[{key:"start",value:function(o){o&&(this._isMouseInteraction=!0,this.currentVal=this.initialVal=this.getPointerPosition(o))}},{key:"_normalizedEvent",value:function(o){return"touches"in o&&o.type!=="touchend"&&(this._lastTouch=o),"touches"in o?this._lastTouch.touches[0]:o}},{key:"initialValArea",get:function(){return this._initialValArea?this._initialValArea:{x:0,y:0}}},{key:"currentValArea",get:function(){return this._currentValArea?this._currentValArea:{x:0,y:0}}},{key:"lastValArea",get:function(){return this._lastValArea?this._lastValArea:{x:0,y:0}}},{key:"initialVal",get:function(){return this._initialVal?this._initialVal:{x:0,y:0}},set:function(o){this._initialVal=o,this._initialValArea=o&&E(o,"-",E($(this.DS.Area.rect),"+",$(this.DS.Area.computedBorder)))}},{key:"currentVal",get:function(){return this._currentVal?this._currentVal:{x:0,y:0}},set:function(o){this._currentVal=o,this._currentValArea=o&&E(o,"-",E($(this.DS.Area.rect),"+",$(this.DS.Area.computedBorder)))}},{key:"lastVal",get:function(){return this._lastVal?this._lastVal:{x:0,y:0}},set:function(o){this._lastVal=o,this._lastValArea=o&&E(o,"-",E($(this.DS.Area.rect),"+",$(this.DS.Area.computedBorder)))}}]),h}(),Hd=function(){function h(d){var o=this,p=d.DS;n(this,h),i(this,"_initialVal",void 0),i(this,"_currentVal",void 0),i(this,"_canScroll",void 0),i(this,"init",function(){return o.DS.stores.SettingsStore.s.area.addEventListener("scroll",o.update)}),i(this,"start",function(){o._currentVal=o._initialVal=vt(o.DS.stores.SettingsStore.s.area),o.DS.stores.SettingsStore.s.area.addEventListener("scroll",o.update)}),i(this,"update",function(){return o._currentVal=vt(o.DS.stores.SettingsStore.s.area)}),i(this,"stop",function(){o.DS.stores.SettingsStore.s.area.removeEventListener("scroll",o.update),o._initialVal={x:0,y:0},o._canScroll=null}),i(this,"reset",function(){o.stop(),o.start()}),this.DS=p,this.DS.subscribe("Interaction:init",this.init),this.DS.subscribe("Interaction:start",function(){return o.start()}),this.DS.subscribe("Interaction:end",function(){return o.reset()})}return l(h,[{key:"canScroll",get:function(){return typeof this._canScroll=="boolean"?this._canScroll:this._canScroll=de(this.DS.stores.SettingsStore.s.area)}},{key:"scrollAmount",get:function(){var o=E(this.currentVal,"-",this.initialVal),p=G(this.DS.stores.SettingsStore.s.zoom),a=E(E(o,"*",p),"-",o);return{x:o.x+a.x,y:o.y+a.y}}},{key:"initialVal",get:function(){return this._initialVal?this._initialVal:{x:0,y:0}}},{key:"currentVal",get:function(){return this._currentVal||(this._currentVal=vt(this.DS.stores.SettingsStore.s.area)),this._currentVal}}]),h}(),Fd=function h(d){var o=this,p=d.DS,a=d.settings;n(this,h),i(this,"_settings",{}),i(this,"s",{}),i(this,"update",function(f){var v=f.settings,_=f.init;return o.DS.publish("Settings:updated:pre",u({settings:v},_?{init:_}:{}))}),i(this,"_update",function(f){for(var v=f.settings,_=f.init,w=Dd(v,_),L=function(){var oe,be=j(X[R],2),Z=be[0],le=be[1];Z in o._settings||Object.defineProperty(o.s,Z,{get:function(){return o._settings[Z]},set:function(Ae){return o.update({settings:i({},Z,Ae)})}}),o._settings["".concat(Z,":pre")]=o._settings[Z],o._settings[Z]=le;var ot={settings:(oe={},i(oe,Z,o._settings[Z]),i(oe,"".concat(Z,":pre"),o._settings["".concat(Z,":pre")]),oe)};o.DS.publish("Settings:updated",ot),o.DS.publish("Settings:updated:".concat(Z),ot)},R=0,X=Object.entries(w);R0&&arguments[0]!==void 0?arguments[0]:!0,p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;a&&this.publish("callback",{items:this.getSelection()}),this.Interaction.stop(),this.Area.stop(),this.Drag.stop(),this.Selector.stop(),this.SelectorArea.stop(o),this.stores.KeyStore.stop(),this.stores.PointerStore.stop(),this.stores.ScrollStore.stop(),o&&this.SelectableSet.clear(),p&&this.SelectedSet.clear(),this.stopped=!0}},{key:"addSelection",value:function(o){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return this.SelectedSet.addAll(Te(o)),a||this.addSelectables(o),p&&this.PubSub.publish("callback",{items:this.getSelection()}),this.getSelection()}},{key:"removeSelection",value:function(o){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return this.SelectedSet.deleteAll(Te(o)),a&&this.removeSelectables(o),p&&this.PubSub.publish("callback",{items:this.getSelection()}),this.getSelection()}},{key:"toggleSelection",value:function(o){var p=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return Te(o).forEach(function(v){return p.SelectedSet.has(v)?p.removeSelection(o,a,f):p.addSelection(o,a,f)}),a&&this.PubSub.publish("callback",{items:this.getSelection()}),this.getSelection()}},{key:"setSelection",value:function(o){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return this.clearSelection(),this.addSelection(o,p,a),this.getSelection()}},{key:"clearSelection",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return this.SelectedSet.clear(),o&&this.PubSub.publish("callback",{items:this.getSelection()}),this.getSelection()}},{key:"addSelectables",value:function(o,p,a){var f=Te(o);return this.SelectableSet.addAll(f),p&&this.SelectedSet.addAll(f),a&&this.PubSub.publish("callback",{items:this.getSelection()}),o}},{key:"setSelectables",value:function(o){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return console.warn('[DragSelect] DEPRECATION ".setSelectables" is deprecated and will be removed soon. Please use "ds.setSettings({ selectables: << new dom elements >> })" instead (see docs)'),this.removeSelectables(o,p),this.addSelectables(o,a)}},{key:"removeSelectables",value:function(o,p,a){return this.SelectableSet.deleteAll(Te(o)),p&&this.removeSelection(o),a&&this.PubSub.publish("callback",{items:this.getSelection()}),o}}]),h}();return Ud})})(er);const eo=er.exports,tr=(r,t,n,s,l)=>(t=Math,n=t.log,s=1024,l=n(r)/n(s)|0,r/t.pow(s,l)).toFixed(0)+" "+(l?"KMGTPEZY"[--l]+"iB":"B"),rr=(r,t=null)=>new Date(r*1e3).toLocaleString(t??navigator.language??"en-US"),to={key:0,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor"},ro=[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)],no={key:1,xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor"},oo=[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)],at=Object.assign({name:"VFSortIcon"},{props:{direction:String},setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("div",null,[r.direction=="down"?(e.openBlock(),e.createElementBlock("svg",to,ro)):e.createCommentVNode("",!0),r.direction=="up"?(e.openBlock(),e.createElementBlock("svg",no,oo)):e.createCommentVNode("",!0)]))}}),so=["onClick"],io=Object.assign({name:"VFToast.vue"},{setup(r){const t=e.inject("emitter"),{getStore:n}=e.inject("storage"),s=e.ref(n("full-screen",!1)),l=y=>y=="error"?"text-red-400 border-red-400 dark:text-red-300 dark:border-red-300":"text-lime-600 border-lime-600 dark:text-lime-300 dark:border-lime-1300",i=e.ref([]),c=y=>{i.value.splice(y,1)},u=y=>{let g=i.value.findIndex(m=>m.id===y);g!==-1&&c(g)};return t.on("vf-toast-clear",()=>{i.value=[]}),t.on("vf-toast-push",y=>{let g=new Date().getTime().toString(36).concat(performance.now().toString(),Math.random().toString()).replace(/\./g,"");y.id=g,i.value.push(y),setTimeout(()=>{u(g)},5e3)}),(y,g)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([s.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(i.value,(m,b)=>(e.openBlock(),e.createElementBlock("div",{onClick:S=>c(b),key:m,class:e.normalizeClass([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"])},e.toDisplayString(m.label),11,so))),128))]),_:1})],2))}}),Ne=r=>Object.entries(r).map(t=>t.map(encodeURIComponent).join("=")).join("&"),{apiUrl:ao}=ue(),_t=(r,t)=>ao.value+"?"+Ne({q:"preview",adapter:r,path:t}),_e=typeof window<"u",nr=_e&&!("onscroll"in window)||typeof navigator<"u"&&/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),or=_e&&"IntersectionObserver"in window,sr=_e&&"classList"in document.createElement("p"),ir=_e&&window.devicePixelRatio>1,lo={elements_selector:".lazy",container:nr||_e?document:null,threshold:300,thresholds:null,data_src:"src",data_srcset:"srcset",data_sizes:"sizes",data_bg:"bg",data_bg_hidpi:"bg-hidpi",data_bg_multi:"bg-multi",data_bg_multi_hidpi:"bg-multi-hidpi",data_bg_set:"bg-set",data_poster:"poster",class_applied:"applied",class_loading:"loading",class_loaded:"loaded",class_error:"error",class_entered:"entered",class_exited:"exited",unobserve_completed:!0,unobserve_entered:!1,cancel_on_exit:!0,callback_enter:null,callback_exit:null,callback_applied:null,callback_loading:null,callback_loaded:null,callback_error:null,callback_finish:null,callback_cancel:null,use_native:!1,restore_on_error:!1},ar=r=>Object.assign({},lo,r),lr=function(r,t){let n;const s="LazyLoad::Initialized",l=new r(t);try{n=new CustomEvent(s,{detail:{instance:l}})}catch{n=document.createEvent("CustomEvent"),n.initCustomEvent(s,!1,!1,{instance:l})}window.dispatchEvent(n)},co=(r,t)=>{if(t)if(!t.length)lr(r,t);else for(let n=0,s;s=t[n];n+=1)lr(r,s)},Se="src",wt="srcset",kt="sizes",cr="poster",He="llOriginalAttrs",dr="data",xt="loading",hr="loaded",ur="applied",ho="entered",Dt="error",fr="native",mr="data-",pr="ll-status",J=(r,t)=>r.getAttribute(mr+t),uo=(r,t,n)=>{var s=mr+t;if(n===null){r.removeAttribute(s);return}r.setAttribute(s,n)},Fe=r=>J(r,pr),Ce=(r,t)=>uo(r,pr,t),lt=r=>Ce(r,null),Et=r=>Fe(r)===null,fo=r=>Fe(r)===xt,mo=r=>Fe(r)===Dt,Nt=r=>Fe(r)===fr,po=[xt,hr,ur,Dt],go=r=>po.indexOf(Fe(r))>=0,we=(r,t,n,s)=>{if(r){if(s!==void 0){r(t,n,s);return}if(n!==void 0){r(t,n);return}r(t)}},Le=(r,t)=>{if(sr){r.classList.add(t);return}r.className+=(r.className?" ":"")+t},fe=(r,t)=>{if(sr){r.classList.remove(t);return}r.className=r.className.replace(new RegExp("(^|\\s+)"+t+"(\\s+|$)")," ").replace(/^\s+/,"").replace(/\s+$/,"")},yo=r=>{r.llTempImage=document.createElement("IMG")},bo=r=>{delete r.llTempImage},gr=r=>r.llTempImage,ct=(r,t)=>{if(!t)return;const n=t._observer;n&&n.unobserve(r)},vo=r=>{r.disconnect()},So=(r,t,n)=>{t.unobserve_entered&&ct(r,n)},Ct=(r,t)=>{r&&(r.loadingCount+=t)},_o=r=>{r&&(r.toLoadCount-=1)},yr=(r,t)=>{r&&(r.toLoadCount=t)},wo=r=>r.loadingCount>0,ko=r=>r.toLoadCount>0,br=r=>{let t=[];for(let n=0,s;s=r.children[n];n+=1)s.tagName==="SOURCE"&&t.push(s);return t},Vt=(r,t)=>{const n=r.parentNode;if(!n||n.tagName!=="PICTURE")return;br(n).forEach(t)},vr=(r,t)=>{br(r).forEach(t)},dt=[Se],Sr=[Se,cr],Ue=[Se,wt,kt],_r=[dr],ht=r=>!!r[He],wr=r=>r[He],kr=r=>delete r[He],Ie=(r,t)=>{if(ht(r))return;const n={};t.forEach(s=>{n[s]=r.getAttribute(s)}),r[He]=n},xo=r=>{ht(r)||(r[He]={backgroundImage:r.style.backgroundImage})},Do=(r,t,n)=>{if(!n){r.removeAttribute(t);return}r.setAttribute(t,n)},Ve=(r,t)=>{if(!ht(r))return;const n=wr(r);t.forEach(s=>{Do(r,s,n[s])})},Eo=r=>{if(!ht(r))return;const t=wr(r);r.style.backgroundImage=t.backgroundImage},xr=(r,t,n)=>{Le(r,t.class_applied),Ce(r,ur),n&&(t.unobserve_completed&&ct(r,t),we(t.callback_applied,r,n))},Dr=(r,t,n)=>{Le(r,t.class_loading),Ce(r,xt),n&&(Ct(n,1),we(t.callback_loading,r,n))},ke=(r,t,n)=>{n&&r.setAttribute(t,n)},Er=(r,t)=>{ke(r,kt,J(r,t.data_sizes)),ke(r,wt,J(r,t.data_srcset)),ke(r,Se,J(r,t.data_src))},No=(r,t)=>{Vt(r,n=>{Ie(n,Ue),Er(n,t)}),Ie(r,Ue),Er(r,t)},Co=(r,t)=>{Ie(r,dt),ke(r,Se,J(r,t.data_src))},Vo=(r,t)=>{vr(r,n=>{Ie(n,dt),ke(n,Se,J(n,t.data_src))}),Ie(r,Sr),ke(r,cr,J(r,t.data_poster)),ke(r,Se,J(r,t.data_src)),r.load()},Mo=(r,t)=>{Ie(r,_r),ke(r,dr,J(r,t.data_src))},Bo=(r,t,n)=>{const s=J(r,t.data_bg),l=J(r,t.data_bg_hidpi),i=ir&&l?l:s;i&&(r.style.backgroundImage=`url("${i}")`,gr(r).setAttribute(Se,i),Dr(r,t,n))},$o=(r,t,n)=>{const s=J(r,t.data_bg_multi),l=J(r,t.data_bg_multi_hidpi),i=ir&&l?l:s;i&&(r.style.backgroundImage=i,xr(r,t,n))},To=(r,t,n)=>{const s=J(r,t.data_bg_set);if(!s)return;const l=s.split("|");let i=l.map(c=>`image-set(${c})`);r.style.backgroundImage=i.join(),r.style.backgroundImage===""&&(i=l.map(c=>`-webkit-image-set(${c})`),r.style.backgroundImage=i.join()),xr(r,t,n)},Nr={IMG:No,IFRAME:Co,VIDEO:Vo,OBJECT:Mo},Ao=(r,t)=>{const n=Nr[r.tagName];n&&n(r,t)},Lo=(r,t,n)=>{const s=Nr[r.tagName];s&&(s(r,t),Dr(r,t,n))},Io=["IMG","IFRAME","VIDEO","OBJECT"],Oo=r=>Io.indexOf(r.tagName)>-1,Cr=(r,t)=>{t&&!wo(t)&&!ko(t)&&we(r.callback_finish,t)},Vr=(r,t,n)=>{r.addEventListener(t,n),r.llEvLisnrs[t]=n},jo=(r,t,n)=>{r.removeEventListener(t,n)},Mt=r=>!!r.llEvLisnrs,Po=(r,t,n)=>{Mt(r)||(r.llEvLisnrs={});const s=r.tagName==="VIDEO"?"loadeddata":"load";Vr(r,s,t),Vr(r,"error",n)},Bt=r=>{if(!Mt(r))return;const t=r.llEvLisnrs;for(let n in t){const s=t[n];jo(r,n,s)}delete r.llEvLisnrs},Mr=(r,t,n)=>{bo(r),Ct(n,-1),_o(n),fe(r,t.class_loading),t.unobserve_completed&&ct(r,n)},zo=(r,t,n,s)=>{const l=Nt(t);Mr(t,n,s),Le(t,n.class_loaded),Ce(t,hr),we(n.callback_loaded,t,s),l||Cr(n,s)},Ro=(r,t,n,s)=>{const l=Nt(t);Mr(t,n,s),Le(t,n.class_error),Ce(t,Dt),we(n.callback_error,t,s),n.restore_on_error&&Ve(t,Ue),l||Cr(n,s)},$t=(r,t,n)=>{const s=gr(r)||r;if(Mt(s))return;Po(s,c=>{zo(c,r,t,n),Bt(s)},c=>{Ro(c,r,t,n),Bt(s)})},Ho=(r,t,n)=>{yo(r),$t(r,t,n),xo(r),Bo(r,t,n),$o(r,t,n),To(r,t,n)},Fo=(r,t,n)=>{$t(r,t,n),Lo(r,t,n)},Tt=(r,t,n)=>{Oo(r)?Fo(r,t,n):Ho(r,t,n)},Uo=(r,t,n)=>{r.setAttribute("loading","lazy"),$t(r,t,n),Ao(r,t),Ce(r,fr)},Br=r=>{r.removeAttribute(Se),r.removeAttribute(wt),r.removeAttribute(kt)},Ko=r=>{Vt(r,t=>{Br(t)}),Br(r)},$r=r=>{Vt(r,t=>{Ve(t,Ue)}),Ve(r,Ue)},Yo={IMG:$r,IFRAME:r=>{Ve(r,dt)},VIDEO:r=>{vr(r,t=>{Ve(t,dt)}),Ve(r,Sr),r.load()},OBJECT:r=>{Ve(r,_r)}},Wo=r=>{const t=Yo[r.tagName];if(!t){Eo(r);return}t(r)},Xo=(r,t)=>{Et(r)||Nt(r)||(fe(r,t.class_entered),fe(r,t.class_exited),fe(r,t.class_applied),fe(r,t.class_loading),fe(r,t.class_loaded),fe(r,t.class_error))},Zo=(r,t)=>{Wo(r),Xo(r,t),lt(r),kr(r)},qo=(r,t,n,s)=>{n.cancel_on_exit&&fo(r)&&r.tagName==="IMG"&&(Bt(r),Ko(r),$r(r),fe(r,n.class_loading),Ct(s,-1),lt(r),we(n.callback_cancel,r,t,s))},Go=(r,t,n,s)=>{const l=go(r);Ce(r,ho),Le(r,n.class_entered),fe(r,n.class_exited),So(r,n,s),we(n.callback_enter,r,t,s),!l&&Tt(r,n,s)},Jo=(r,t,n,s)=>{Et(r)||(Le(r,n.class_exited),qo(r,t,n,s),we(n.callback_exit,r,t,s))},Qo=["IMG","IFRAME","VIDEO"],Tr=r=>r.use_native&&"loading"in HTMLImageElement.prototype,es=(r,t,n)=>{r.forEach(s=>{Qo.indexOf(s.tagName)!==-1&&Uo(s,t,n)}),yr(n,0)},ts=r=>r.isIntersecting||r.intersectionRatio>0,rs=r=>({root:r.container===document?null:r.container,rootMargin:r.thresholds||r.threshold+"px"}),ns=(r,t,n)=>{r.forEach(s=>ts(s)?Go(s.target,s,t,n):Jo(s.target,s,t,n))},os=(r,t)=>{t.forEach(n=>{r.observe(n)})},ss=(r,t)=>{vo(r),os(r,t)},is=(r,t)=>{!or||Tr(r)||(t._observer=new IntersectionObserver(n=>{ns(n,r,t)},rs(r)))},Ar=r=>Array.prototype.slice.call(r),ut=r=>r.container.querySelectorAll(r.elements_selector),as=r=>Ar(r).filter(Et),ls=r=>mo(r),cs=r=>Ar(r).filter(ls),Lr=(r,t)=>as(r||ut(t)),ds=(r,t)=>{cs(ut(r)).forEach(s=>{fe(s,r.class_error),lt(s)}),t.update()},hs=(r,t)=>{_e&&(t._onlineHandler=()=>{ds(r,t)},window.addEventListener("online",t._onlineHandler))},us=r=>{_e&&window.removeEventListener("online",r._onlineHandler)},Ke=function(r,t){const n=ar(r);this._settings=n,this.loadingCount=0,is(n,this),hs(n,this),this.update(t)};Ke.prototype={update:function(r){const t=this._settings,n=Lr(r,t);if(yr(this,n.length),nr||!or){this.loadAll(n);return}if(Tr(t)){es(n,t,this);return}ss(this._observer,n)},destroy:function(){this._observer&&this._observer.disconnect(),us(this),ut(this._settings).forEach(r=>{kr(r)}),delete this._observer,delete this._settings,delete this._onlineHandler,delete this.loadingCount,delete this.toLoadCount},loadAll:function(r){const t=this._settings;Lr(r,t).forEach(s=>{ct(s,this),Tt(s,t,this)})},restoreAll:function(){const r=this._settings;ut(r).forEach(t=>{Zo(t,r)})}},Ke.load=(r,t)=>{const n=ar(t);Tt(r,n)},Ke.resetStatus=r=>{lt(r)},_e&&co(Ke,window.lazyLoadOptions);const fs={class:"relative flex-auto flex flex-col overflow-hidden"},ms={key:0,class:"grid grid-cols-12 border-b border-neutral-300 border-gray-200 dark:border-gray-700 text-xs select-none"},ps={class:"absolute"},gs=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),ys={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"},bs=["onDblclick","onContextmenu","data-type","data-item","data-index"],vs={class:"grid grid-cols-12 items-center"},Ss={class:"flex col-span-7 items-center"},_s={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"},ws=[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)],ks={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"},xs=[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)],Ds={class:"overflow-ellipsis overflow-hidden whitespace-nowrap"},Es={class:"col-span-5 overflow-ellipsis overflow-hidden whitespace-nowrap"},Ns=["onDblclick","onContextmenu","onDragstart","onDragover","onDrop","data-type","data-item","data-index"],Cs={class:"grid grid-cols-12 items-center"},Vs={class:"flex col-span-7 items-center"},Ms={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"},Bs=[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)],$s={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"},Ts=[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)],As={class:"overflow-ellipsis overflow-hidden whitespace-nowrap"},Ls={class:"col-span-2 text-center"},Is={class:"col-span-3 overflow-ellipsis overflow-hidden whitespace-nowrap"},Os=["onDblclick","onContextmenu","onDragstart","onDragover","onDrop","data-type","data-item","data-index"],js={class:"relative"},Ps={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"},zs=[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)],Rs=["data-src","alt"],Hs={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"},Fs=[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)],Us={key:3,class:"absolute hidden md:block top-1/2 w-full text-center text-neutral-500"},Ks={class:"break-all"},Ys=Object.assign({name:"VFExplorer"},{props:{view:String,data:Object,search:Object},setup(r){const t=r,n=e.inject("emitter"),{setStore:s,getStore:l}=e.inject("storage"),i=e.inject("adapter"),c=E=>E==null?void 0:E.substring(0,3),u=E=>E.replace(/((?=([\w\W]{0,14}))([\w\W]{8,})([\w\W]{8,}))/,"$2..$4"),y=e.ref(null),g=e.ref(null),m=e.ref(0),b=e.ref(null),{t:S}=e.inject("i18n"),x=Math.floor(Math.random()*2**32),k=e.ref(l("full-screen",!1)),N=new Ke;n.on("vf-fullscreen-toggle",()=>{y.value.style.height=null,k.value=!k.value,s("full-screen",k.value)});const C=e.ref("");n.on("vf-search-query",({newQuery:E})=>{C.value=E,E?n.emit("vf-fetch",{params:{q:"search",adapter:t.data.adapter,path:t.data.dirname,filter:E},onSuccess:$=>{$.files.length||n.emit("vf-toast-push",{label:S("No search result found.")})}}):n.emit("vf-fetch",{params:{q:"index",adapter:t.data.adapter,path:t.data.dirname}})});let A=null;const T=()=>{A&&clearTimeout(A)},V=e.ref(!0),j=E=>{E.touches.length>1&&(V.value?(b.value.stop(),n.emit("vf-toast-push",{label:S("Drag&Drop: off")})):(b.value.start(),n.emit("vf-toast-push",{label:S("Drag&Drop: on")}),n.emit("vf-explorer-update")),V.value=!V.value)},I=E=>{A=setTimeout(()=>{const $=new MouseEvent("contextmenu",{bubbles:!0,cancelable:!1,view:window,button:2,buttons:0,clientX:E.target.getBoundingClientRect().x,clientY:E.target.getBoundingClientRect().y});E.target.dispatchEvent($)},500)},D=E=>{E.type=="dir"?(n.emit("vf-search-exit"),n.emit("vf-fetch",{params:{q:"index",adapter:t.data.adapter,path:E.path}})):n.emit("vf-modal-show",{type:"preview",adapter:t.data.adapter,item:E})},B=e.reactive({active:!1,column:"",order:""}),H=(E=!0)=>{let $=[...t.data.files],M=B.column,G=B.order=="asc"?1:-1;if(!E)return $;const O=(de,he)=>typeof de=="string"&&typeof he=="string"?de.toLowerCase().localeCompare(he.toLowerCase()):dehe?1:0;return B.active&&($=$.slice().sort((de,he)=>O(de[M],he[M])*G)),$},W=E=>{B.active&&B.column==E?(B.active=B.order=="asc",B.column=E,B.order="desc"):(B.active=!0,B.column=E,B.order="asc")},Y=()=>b.value.getSelection().map(E=>JSON.parse(E.dataset.item)),te=(E,$)=>{if(E.altKey||E.ctrlKey||E.metaKey)return E.preventDefault(),!1;E.dataTransfer.setDragImage(g.value,0,15),E.dataTransfer.effectAllowed="all",E.dataTransfer.dropEffect="copy",E.dataTransfer.setData("items",JSON.stringify(Y()))},ie=(E,$)=>{E.preventDefault();let M=JSON.parse(E.dataTransfer.getData("items"));if(M.find(G=>G.storage!=i.value)){alert("Moving items between different storages is not supported yet.");return}n.emit("vf-modal-show",{type:"move",items:{from:M,to:$}})},ne=(E,$)=>{E.preventDefault(),!$||$.type!=="dir"||b.value.getSelection().find(M=>M==E.currentTarget)?(E.dataTransfer.dropEffect="none",E.dataTransfer.effectAllowed="none"):E.dataTransfer.dropEffect="copy"},re=()=>{b.value=new eo({area:y.value,keyboardDrag:!1,selectedClass:"vf-explorer-selected",selectorClass:"vf-explorer-selector"}),n.on("vf-explorer-update",()=>e.nextTick(()=>{b.value.clearSelection(),b.value.setSelectables(document.getElementsByClassName("vf-item-"+x))})),b.value.subscribe("predragstart",({event:E,isDragging:$})=>{if($)m.value=b.value.getSelection().length,b.value.break();else{const M=E.target.offsetWidth-E.offsetX,G=E.target.offsetHeight-E.offsetY;M<15&&G<15&&(b.value.clearSelection(),b.value.break())}}),b.value.subscribe("predragmove",({isDragging:E})=>{E&&b.value.break()}),b.value.subscribe("callback",({items:E,event:$,isDragging:M})=>{n.emit("vf-nodes-selected",Y()),m.value=b.value.getSelection().length})};return e.onMounted(re),e.onUpdated(()=>{b.value.Area.reset(),b.value.SelectorArea.updatePos(),N.update()}),e.onMounted(()=>{e.watch(()=>t.view,()=>n.emit("vf-explorer-update"))}),(E,$)=>(e.openBlock(),e.createElementBlock("div",fs,[r.view=="list"||C.value.length?(e.openBlock(),e.createElementBlock("div",ms,[e.createElementVNode("div",{onClick:$[0]||($[0]=M=>W("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(S)("Name"))+" ",1),e.withDirectives(e.createVNode(at,{direction:B.order=="asc"?"down":"up"},null,8,["direction"]),[[e.vShow,B.active&&B.column=="basename"]])]),C.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:$[1]||($[1]=M=>W("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(S)("Size"))+" ",1),e.withDirectives(e.createVNode(at,{direction:B.order=="asc"?"down":"up"},null,8,["direction"]),[[e.vShow,B.active&&B.column=="file_size"]])])),C.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:$[2]||($[2]=M=>W("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(S)("Date"))+" ",1),e.withDirectives(e.createVNode(at,{direction:B.order=="asc"?"down":"up"},null,8,["direction"]),[[e.vShow,B.active&&B.column=="last_modified"]])])),C.value.length?(e.openBlock(),e.createElementBlock("div",{key:2,onClick:$[3]||($[3]=M=>W("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(S)("Filepath"))+" ",1),e.withDirectives(e.createVNode(at,{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",ps,[e.createElementVNode("div",{ref_key:"dragImage",ref:g,class:"absolute -z-50 -top-96"},[gs,e.createElementVNode("div",ys,e.toDisplayString(m.value),1)],512)]),e.createElementVNode("div",{onTouchstart:j,onContextmenu:$[10]||($[10]=e.withModifiers(M=>e.unref(n).emit("vf-contextmenu-show",{event:M,area:y.value,items:Y()}),["self","prevent"])),class:e.normalizeClass([k.value?"":"resize-y","h-full w-full text-xs vf-selector-area min-h-[150px] overflow-auto p-1 z-0"]),ref_key:"selectorArea",ref:y},[C.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(H(),(M,G)=>(e.openBlock(),e.createElementBlock("div",{onDblclick:O=>D(M),onTouchstart:$[4]||($[4]=O=>I(O)),onTouchend:$[5]||($[5]=O=>T()),onContextmenu:e.withModifiers(O=>e.unref(n).emit("vf-contextmenu-show",{event:O,area:y.value,items:Y(),target:M}),["prevent"]),class:e.normalizeClass(["vf-item-"+e.unref(x),"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":M.type,"data-item":JSON.stringify(M),"data-index":G},[e.createElementVNode("div",vs,[e.createElementVNode("div",Ss,[M.type=="dir"?(e.openBlock(),e.createElementBlock("svg",_s,ws)):(e.openBlock(),e.createElementBlock("svg",ks,xs)),e.createElementVNode("span",Ds,e.toDisplayString(M.basename),1)]),e.createElementVNode("div",Es,e.toDisplayString(M.path),1)])],42,bs))),256)):e.createCommentVNode("",!0),r.view=="list"&&!C.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(H(),(M,G)=>(e.openBlock(),e.createElementBlock("div",{draggable:"true",onDblclick:O=>D(M),onTouchstart:$[6]||($[6]=O=>I(O)),onTouchend:$[7]||($[7]=O=>T()),onContextmenu:e.withModifiers(O=>e.unref(n).emit("vf-contextmenu-show",{event:O,area:y.value,items:Y(),target:M}),["prevent"]),onDragstart:O=>te(O),onDragover:O=>ne(O,M),onDrop:O=>ie(O,M),class:e.normalizeClass(["vf-item-"+e.unref(x),"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":M.type,"data-item":JSON.stringify(M),"data-index":G},[e.createElementVNode("div",Cs,[e.createElementVNode("div",Vs,[M.type=="dir"?(e.openBlock(),e.createElementBlock("svg",Ms,Bs)):(e.openBlock(),e.createElementBlock("svg",$s,Ts)),e.createElementVNode("span",As,e.toDisplayString(M.basename),1)]),e.createElementVNode("div",Ls,e.toDisplayString(M.file_size?e.unref(tr)(M.file_size):""),1),e.createElementVNode("div",Is,e.toDisplayString(e.unref(rr)(M.last_modified)),1)])],42,Ns))),256)):e.createCommentVNode("",!0),r.view=="grid"&&!C.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(H(!1),(M,G)=>(e.openBlock(),e.createElementBlock("div",{draggable:"true",onDblclick:O=>D(M),onTouchstart:$[8]||($[8]=O=>I(O)),onTouchend:$[9]||($[9]=O=>T()),onContextmenu:e.withModifiers(O=>e.unref(n).emit("vf-contextmenu-show",{event:O,area:y.value,items:Y(),target:M}),["prevent"]),onDragstart:O=>te(O),onDragover:O=>ne(O,M),onDrop:O=>ie(O,M),class:e.normalizeClass(["vf-item-"+e.unref(x),"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":M.type,"data-item":JSON.stringify(M),"data-index":G},[e.createElementVNode("div",null,[e.createElementVNode("div",js,[M.type=="dir"?(e.openBlock(),e.createElementBlock("svg",Ps,zs)):(M.mime_type??"").startsWith("image")?(e.openBlock(),e.createElementBlock("img",{key:1,class:"lazy h-10 md:h-12 m-auto","data-src":e.unref(_t)(e.unref(i).value,M.path),alt:M.basename},null,8,Rs)):(e.openBlock(),e.createElementBlock("svg",Hs,Fs)),!(M.mime_type??"").startsWith("image")&&M.type!="dir"?(e.openBlock(),e.createElementBlock("div",Us,e.toDisplayString(c(M.extension)),1)):e.createCommentVNode("",!0)]),e.createElementVNode("span",Ks,e.toDisplayString(u(M.basename)),1)])],42,Os))),256)):e.createCommentVNode("",!0)],34),e.createVNode(io)]))}}),Ws="1.2.0",Xs={class:"p-1 text-xs border-t border-neutral-300 dark:border-gray-700/50 flex justify-between select-none"},Zs={class:"flex leading-5 items-center"},qs=["aria-label"],Gs=[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)],Js=["value"],Qs={class:"ml-3"},ei={key:0},ti={class:"ml-1"},ri={class:"flex leading-5 items-center"},ni={value:"",disabled:""},oi=e.createStaticVNode('',5),si=["aria-label"],ii=[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)],ai=Object.assign({name:"VFStatusbar"},{props:{data:Object},setup(r){const t=e.inject("emitter"),{getStore:n,setStore:s}=e.inject("storage"),l=e.ref(0),i=e.inject("adapter"),{t:c,changeLocale:u}=e.inject("i18n"),y=e.ref(n("locale","")),g=()=>{t.emit("vf-search-exit"),t.emit("vf-fetch",{params:{q:"index",adapter:i.value}}),s("adapter",i.value)};t.on("vf-nodes-selected",b=>{l.value=b.length});const m=e.ref("");return t.on("vf-search-query",({newQuery:b})=>{m.value=b}),(b,S)=>(e.openBlock(),e.createElementBlock("div",Xs,[e.createElementVNode("div",Zs,[e.createElementVNode("div",{class:"mx-2","aria-label":e.unref(c)("Storage"),"data-microtip-position":"top-right",role:"tooltip"},Gs,8,qs),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":S[0]||(S[0]=x=>e.isRef(i)?i.value=x:null),onChange:g,class:"py-0.5 text-sm text-slate-500 dark:text-neutral-50 dark:bg-gray-700 rounded pl-2 pr-8"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.data.storages,x=>(e.openBlock(),e.createElementBlock("option",{value:x},e.toDisplayString(x),9,Js))),256))],544),[[e.vModelSelect,e.unref(i)]]),e.createElementVNode("div",Qs,[m.value.length?(e.openBlock(),e.createElementBlock("span",ei,e.toDisplayString(r.data.files.length)+" items found. ",1)):e.createCommentVNode("",!0),e.createElementVNode("span",ti,e.toDisplayString(l.value>0?l.value+" "+e.unref(c)("item(s) selected."):""),1)])]),e.createElementVNode("div",ri,[e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":S[1]||(S[1]=x=>y.value=x),onChange:S[2]||(S[2]=x=>e.unref(u)(x.target.value)),class:"py-0.5 text-sm text-slate-500 dark:text-neutral-50 dark:bg-gray-700 rounded pl-2 pr-8 mr-3"},[e.createElementVNode("option",ni,e.toDisplayString(e.unref(c)("Language")),1),oi],544),[[e.vModelSelect,y.value]]),e.createElementVNode("span",{class:"mr-1","aria-label":e.unref(c)("About"),"data-microtip-position":"top-left",role:"tooltip",onClick:S[3]||(S[3]=x=>e.unref(t).emit("vf-modal-show",{type:"message",title:"Vuefinder "+e.unref(Ws),message:e.unref(c)("Vuefinder is a file manager component for vue 3.")}))},ii,8,si)])]))}}),li=(r,t=0,n=!1)=>{let s;return(...l)=>{n&&!s&&r(...l),clearTimeout(s),s=setTimeout(()=>{r(...l)},t)}},ci=(r,t,n)=>{const s=e.ref(r);return e.customRef((i,c)=>({get(){return i(),s.value},set:li(u=>{s.value=u,c()},t,n)}))},di={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"},hi=["aria-label"],ui=[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)],fi=["aria-label"],mi=[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)],pi=["aria-label"],gi=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"},null,-1)],yi=["onClick"],bi=[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)],vi={class:"flex leading-5"},Si=e.createElementVNode("span",{class:"text-neutral-300 dark:text-gray-600 mx-0.5"},"/",-1),_i=["title","onClick"],wi={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"},ki=[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),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)],xi={key:3,class:"relative flex bg-white dark:bg-gray-700 items-center rounded p-1 ml-2 w-full"},Di=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),Ei=e.createElementVNode("div",{class:"w-full"},null,-1),Ni=["onKeydown","placeholder"],Ci=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"},null,-1)],Vi=Object.assign({name:"VFBreadcrumb"},{props:{data:Object},setup(r){const t=r,n=e.inject("emitter");e.inject("storage");const s=e.inject("adapter"),l=e.ref(null),i=e.ref([]),c=e.ref(!1),u=e.ref(null),{t:y}=e.inject("i18n"),g=e.inject("loadingState");n.on("vf-explorer-update",()=>{let T=[],V=[];l.value=t.data.dirname??s.value+"://",l.value.length==0&&(i.value=[]),l.value.replace(s.value+"://","").split("/").forEach(function(j){T.push(j),T.join("/")!=""&&V.push({basename:j,name:j,path:s.value+"://"+T.join("/"),type:"dir"})}),V.length>4&&(V=V.slice(-5),V[0].name=".."),i.value=V});const m=()=>{c.value=!1,S.value=""};n.on("vf-search-exit",()=>{m()});const b=()=>{c.value=!0,e.nextTick(()=>u.value.focus())},S=ci("",400),x=()=>g.value;e.watch(S,T=>{n.emit("vf-toast-clear"),n.emit("vf-search-query",{newQuery:T})});const k=()=>i.value.length&&!c.value,N=T=>{T.preventDefault();let V=JSON.parse(T.dataTransfer.getData("items"));if(V.find(j=>j.storage!=s.value)){alert("Moving items between different storages is not supported yet.");return}n.emit("vf-modal-show",{type:"move",items:{from:V,to:i.value[i.value.length-2]??{path:s.value+"://"}}})},C=T=>{T.preventDefault(),k()?T.dataTransfer.dropEffect="copy":(T.dataTransfer.dropEffect="none",T.dataTransfer.effectAllowed="none")},A=()=>{S.value==""&&m()};return(T,V)=>(e.openBlock(),e.createElementBlock("div",di,[e.createElementVNode("span",{"aria-label":e.unref(y)("Go up a directory"),"data-microtip-position":"bottom-right",role:"tooltip"},[(e.openBlock(),e.createElementBlock("svg",{onDragover:V[0]||(V[0]=j=>C(j)),onDrop:V[1]||(V[1]=j=>N(j)),onClick:V[2]||(V[2]=j=>{var I;return!k()||e.unref(n).emit("vf-fetch",{params:{q:"index",adapter:r.data.adapter,path:((I=i.value[i.value.length-2])==null?void 0:I.path)??e.unref(s)+"://"}})}),class:e.normalizeClass(["h-6 w-6 p-0.5 rounded",k()?"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"},ui,34))],8,hi),x()?(e.openBlock(),e.createElementBlock("span",{key:1,"aria-label":e.unref(y)("Cancel"),"data-microtip-position":"bottom-right",role:"tooltip"},[(e.openBlock(),e.createElementBlock("svg",{onClick:V[4]||(V[4]=j=>e.unref(n).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"},gi))],8,pi)):(e.openBlock(),e.createElementBlock("span",{key:0,"aria-label":e.unref(y)("Refresh"),"data-microtip-position":"bottom-right",role:"tooltip"},[(e.openBlock(),e.createElementBlock("svg",{onClick:V[3]||(V[3]=j=>{e.unref(n).emit("vf-fetch",{params:{q:"index",adapter:r.data.adapter,path:r.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"},mi))],8,fi)),c.value?(e.openBlock(),e.createElementBlock("div",xi,[Di,Ei,e.withDirectives(e.createElementVNode("input",{ref_key:"searchInput",ref:u,onKeydown:e.withKeys(m,["esc"]),onBlur:A,"onUpdate:modelValue":V[6]||(V[6]=j=>e.isRef(S)?S.value=j:null),placeholder:e.unref(y)("Search anything.."),class:"absolute ml-4 pt-1 pb-0 px-2 border-0 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,Ni),[[e.vModelText,e.unref(S)]]),(e.openBlock(),e.createElementBlock("svg",{class:"w-6 h-6 cursor-pointer",onClick:m,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},Ci))])):(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]=j=>e.unref(n).emit("vf-fetch",{params:{q:"index",adapter:r.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"},bi)),e.createElementVNode("div",vi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(j,I)=>(e.openBlock(),e.createElementBlock("div",{key:I},[Si,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:j.basename,onClick:D=>e.unref(n).emit("vf-fetch",{params:{q:"index",adapter:r.data.adapter,path:j.path}})},e.toDisplayString(j.name),9,_i)]))),128))]),x()?(e.openBlock(),e.createElementBlock("svg",wi,ki)):e.createCommentVNode("",!0)],8,yi))]))}}),Mi=["onClick"],Bi=e.createElementVNode("span",{class:"px-1"},null,-1),$i=Object.assign({name:"VFContextMenu"},{props:{current:Object},setup(r){const t=r,n=e.inject("emitter"),s=e.ref(null),{apiUrl:l}=ue(),i=e.reactive({active:!1,items:[],positions:{left:0,top:0}}),c=e.ref([]);n.on("vf-context-selected",S=>{c.value=S});const{t:u}=e.inject("i18n"),y={newfolder:{title:()=>u("New Folder"),action:()=>{n.emit("vf-modal-show",{type:"new-folder"})}},delete:{title:()=>u("Delete"),action:()=>{n.emit("vf-modal-show",{type:"delete",items:c})}},refresh:{title:()=>u("Refresh"),action:()=>{n.emit("vf-fetch",{params:{q:"index",adapter:t.current.adapter,path:t.current.dirname}})}},preview:{title:()=>u("Preview"),action:()=>{n.emit("vf-modal-show",{type:"preview",adapter:t.current.adapter,item:c.value[0]})}},open:{title:()=>u("Open"),action:()=>{n.emit("vf-search-exit"),n.emit("vf-fetch",{params:{q:"index",adapter:t.current.adapter,path:c.value[0].path}})}},openDir:{title:()=>u("Open containing folder"),action:()=>{n.emit("vf-search-exit"),n.emit("vf-fetch",{params:{q:"index",adapter:t.current.adapter,path:c.value[0].dir}})}},download:{title:()=>u("Download"),action:()=>{const S=l.value+"?"+Ne({q:"download",adapter:t.current.adapter,path:c.value[0].path});n.emit("vf-download",S)}},archive:{title:()=>u("Archive"),action:()=>{n.emit("vf-modal-show",{type:"archive",items:c})}},unarchive:{title:()=>u("Unarchive"),action:()=>{n.emit("vf-modal-show",{type:"unarchive",items:c})}},rename:{title:()=>u("Rename"),action:()=>{n.emit("vf-modal-show",{type:"rename",items:c})}}},g=S=>{n.emit("vf-contextmenu-hide"),S.action()},m=e.ref("");n.on("vf-search-query",({newQuery:S})=>{m.value=S}),n.on("vf-contextmenu-show",({event:S,area:x,items:k,target:N=null})=>{if(i.items=[],m.value)if(N)i.items.push(y.openDir),n.emit("vf-context-selected",[N]);else return;else!N&&!m.value?(i.items.push(y.refresh),i.items.push(y.newfolder),n.emit("vf-context-selected",[])):k.length>1&&k.some(C=>C.path===N.path)?(i.items.push(y.refresh),i.items.push(y.archive),i.items.push(y.delete),n.emit("vf-context-selected",k)):(N.type=="dir"?i.items.push(y.open):(i.items.push(y.preview),i.items.push(y.download)),i.items.push(y.rename),N.mime_type=="application/zip"?i.items.push(y.unarchive):i.items.push(y.archive),i.items.push(y.delete),n.emit("vf-context-selected",[N]));b(S,x)}),n.on("vf-contextmenu-hide",()=>{i.active=!1});const b=(S,x)=>{i.active=!0,e.nextTick(()=>{let k=x.getBoundingClientRect(),N=S.pageX,C=S.pageY,A=s.value.offsetHeight,T=s.value.offsetWidth;N=k.right-S.pageX+window.scrollXi.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:s,style:e.normalizeStyle(i.positions)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.items,k=>(e.openBlock(),e.createElementBlock("li",{class:"px-2 py-1.5 cursor-pointer hover:bg-neutral-200 dark:hover:bg-gray-700",key:k.title,onClick:N=>g(k)},[Bi,e.createElementVNode("span",null,e.toDisplayString(k.title()),1)],8,Mi))),128))],4)):e.createCommentVNode("",!0)}}),Ti=(r,t)=>{const n=r[t];return n?typeof n=="function"?n():Promise.resolve(n):new Promise((s,l)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(l.bind(null,new Error("Unknown variable dynamic import: "+t)))})};async function Ai(r){const t=await Ti(Object.assign({"../locales/en.json":()=>Promise.resolve().then(()=>hd),"../locales/fa.json":()=>Promise.resolve().then(()=>ud),"../locales/ru.json":()=>Promise.resolve().then(()=>fd),"../locales/tr.json":()=>Promise.resolve().then(()=>md)}),`../locales/${r}.json`);return JSON.parse(t.default)}function Li(r,t,n){const{getStore:s,setStore:l}=St(r),i=e.ref({}),c=g=>{Ai(g).then(m=>{i.value=m,l("locale",g),l("translations",m),n.emit("vf-toast-push",{label:"The language is set to "+g})}).catch(m=>{n.emit("vf-toast-push",{label:"The selected locale is not yet supported!",type:"error"}),c("en")})};s("locale")?i.value=s("translations"):c(t);const u=(g,...m)=>m.length?u(g=g.replace("%s",m.shift()),...m):g;function y(g,...m){return i.value.hasOwnProperty(g)?u(i.value[g],...m):u(g,...m)}return{t:y,changeLocale:c}}const Ii={class:"vuefinder"},Oi=e.createElementVNode("iframe",{id:"download_frame",style:{display:"none"}},null,-1),ji=Object.assign({name:"VueFinder"},{props:{url:{type:[String]},id:{type:String,default:"vf"},dark:{type:Boolean,default:!1},locale:{type:String,default:"en"},maxHeight:{type:String,default:"600px"},maxFileSize:{type:String,default:"10mb"},postData:{type:Object,default:{}}},setup(r){const t=r,n=Sn(),{setStore:s,getStore:l}=St(t.id),i=e.ref(l("adapter"));e.provide("emitter",n),e.provide("storage",St(t.id)),e.provide("postData",t.postData),e.provide("adapter",i),e.provide("maxFileSize",t.maxFileSize);const c=Li(t.id,t.locale,n);e.provide("i18n",c);const{apiUrl:u,setApiUrl:y}=ue();y(t.url);const g=e.reactive({adapter:i.value,storages:[],dirname:".",files:[]}),m=e.ref(l("viewport","grid")),b=e.ref(l("darkMode",t.dark));n.on("vf-darkMode-toggle",()=>{b.value=!b.value,s("darkMode",b.value)});const S=e.ref(!1);e.provide("loadingState",S);const x=e.ref(l("full-screen",!1));n.on("vf-fullscreen-toggle",()=>{x.value=!x.value,s("full-screen",x.value)}),n.on("vf-view-toggle",A=>{m.value=A});const k=e.reactive({active:!1,type:"delete",data:{}});n.on("vf-modal-close",()=>{k.active=!1}),n.on("vf-modal-show",A=>{k.active=!0,k.type=A.type,k.data=A});const N=A=>{Object.assign(g,A),n.emit("vf-nodes-selected",{}),n.emit("vf-explorer-update")};let C;return n.on("vf-fetch-abort",()=>{C.abort(),S.value=!1}),n.on("vf-fetch",({params:A,onSuccess:T=null,onError:V=null})=>{["index","search"].includes(A.q)&&(C&&C.abort(),S.value=!0),C=new AbortController;const j=C.signal;it(u.value,{params:A,signal:j}).then(I=>{i.value=I.adapter,["index","search"].includes(A.q)&&(S.value=!1),n.emit("vf-modal-close"),N(I),T(I)}).catch(I=>{V&&V(I)}).finally(()=>{})}),n.on("vf-download",A=>{document.getElementById("download_frame").src=A,n.emit("vf-modal-close")}),e.onMounted(()=>{n.emit("vf-fetch",{params:{q:"index",adapter:i.value}})}),(A,T)=>(e.openBlock(),e.createElementBlock("div",Ii,[e.createElementVNode("div",{class:e.normalizeClass(b.value?"dark":"")},[e.createElementVNode("div",{class:e.normalizeClass([x.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(x.value?"":"max-height: "+r.maxHeight),onMousedown:T[0]||(T[0]=V=>e.unref(n).emit("vf-contextmenu-hide")),onTouchstart:T[1]||(T[1]=V=>e.unref(n).emit("vf-contextmenu-hide"))},[e.createVNode(Jn,{data:g},null,8,["data"]),e.createVNode(Vi,{data:g},null,8,["data"]),e.createVNode(Ys,{view:m.value,data:g},null,8,["view","data"]),e.createVNode(ai,{data:g},null,8,["data"])],38),k.active?(e.openBlock(),e.createBlock(e.resolveDynamicComponent("v-f-modal-"+k.type),{key:0,selection:k.data,current:g},null,8,["selection","current"])):e.createCommentVNode("",!0),e.createVNode($i,{current:g},null,8,["current"]),Oi],2)]))}}),Pi=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),zi={class:"fixed z-10 inset-0 overflow-hidden"},Ri={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"},Hi={class:"bg-white dark:bg-gray-800 px-4 pt-5 pb-4 sm:p-6 sm:pb-4"},Fi={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"},me={__name:"ModalLayout",setup(r){const t=e.inject("emitter");return e.onMounted(()=>{const n=document.querySelector(".v-f-modal input");n&&n.focus()}),(n,s)=>(e.openBlock(),e.createElementBlock("div",{class:"v-f-modal relative z-30","aria-labelledby":"modal-title",role:"dialog","aria-modal":"true",onKeyup:s[1]||(s[1]=e.withKeys(l=>e.unref(t).emit("vf-modal-close"),["esc"])),tabindex:"0"},[Pi,e.createElementVNode("div",zi,[e.createElementVNode("div",{class:"flex items-end sm:items-center justify-center min-h-full p-4 text-center sm:p-0",onMousedown:s[0]||(s[0]=e.withModifiers(l=>e.unref(t).emit("vf-modal-close"),["self"]))},[e.createElementVNode("div",Ri,[e.createElementVNode("div",Hi,[e.renderSlot(n.$slots,"default")]),e.createElementVNode("div",Fi,[e.renderSlot(n.$slots,"buttons")])])],32)])],32))}},Ui=["aria-label"],Ki=[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)],pe=Object.assign({name:"Message"},{props:{error:{type:Boolean,default:!1}},emits:["hidden"],setup(r,{emit:t}){var u;const{t:n}=e.inject("i18n"),s=e.ref(!1),l=e.ref(null),i=e.ref((u=l.value)==null?void 0:u.strMessage);e.watch(i,()=>s.value=!1);const c=()=>{t("hidden"),s.value=!0};return(y,g)=>(e.openBlock(),e.createElementBlock("div",null,[s.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"strMessage",ref:l,class:e.normalizeClass(["flex mt-1 p-1 px-2 rounded text-sm",r.error?"bg-red-100 text-red-600":"bg-emerald-100 text-emerald-600"])},[e.renderSlot(y.$slots,"default"),e.createElementVNode("div",{class:"ml-auto cursor-pointer",onClick:c,"aria-label":e.unref(n)("Close"),"data-microtip-position":"top-left",role:"tooltip"},Ki,8,Ui)],2))]))}}),Yi={class:"sm:flex sm:items-start"},Wi=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),Xi={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},Zi={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},qi={class:"mt-2"},Gi={class:"text-sm text-gray-500"},Ji={class:"flex text-sm text-gray-800 dark:text-gray-400"},Qi={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"},ea=[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)],ta={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"},ra=[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)],na={class:"ml-1.5"},oa={class:"m-auto font-bold text-red-500 text-sm dark:text-red-200 text-center"},sa=Object.assign({name:"VFModalDelete"},{props:{selection:Object,current:Object},setup(r){const t=r,n=e.inject("emitter");e.inject("storage");const s=e.inject("adapter"),{t:l}=e.inject("i18n"),i=e.ref(t.selection.items),c=e.ref(""),u=()=>{i.value.length&&n.emit("vf-fetch",{params:{q:"delete",adapter:s.value,path:t.current.dirname,items:JSON.stringify(i.value.map(({path:y,type:g})=>({path:y,type:g})))},onSuccess:()=>{n.emit("vf-toast-push",{label:l("Files deleted.")})},onError:y=>{c.value=l(y.message)}})};return(y,g)=>(e.openBlock(),e.createBlock(me,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:u,class:"w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(l)("Yes, Delete!")),1),e.createElementVNode("button",{type:"button",onClick:g[1]||(g[1]=m=>e.unref(n).emit("vf-modal-close")),class:"mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(l)("Cancel")),1),e.createElementVNode("div",oa,e.toDisplayString(e.unref(l)("This action cannot be undone.")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",Yi,[Wi,e.createElementVNode("div",Xi,[e.createElementVNode("h3",Zi,e.toDisplayString(e.unref(l)("Delete files")),1),e.createElementVNode("div",qi,[e.createElementVNode("p",Gi,e.toDisplayString(e.unref(l)("Are you sure you want to delete these files?")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,m=>(e.openBlock(),e.createElementBlock("p",Ji,[m.type=="dir"?(e.openBlock(),e.createElementBlock("svg",Qi,ea)):(e.openBlock(),e.createElementBlock("svg",ta,ra)),e.createElementVNode("span",na,e.toDisplayString(m.basename),1)]))),256)),c.value.length?(e.openBlock(),e.createBlock(pe,{key:0,onHidden:g[0]||(g[0]=m=>c.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}}),ia={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:"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),la={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},ca={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},da={class:"mt-2"},ha={class:"text-sm text-gray-500"},ua=Object.assign({name:"VFModalMessage"},{props:{selection:Object},setup(r){const t=e.inject("emitter"),{t:n}=e.inject("i18n");return(s,l)=>(e.openBlock(),e.createBlock(me,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:l[0]||(l[0]=i=>e.unref(t).emit("vf-modal-close")),class:"mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(n)("Close")),1)]),default:e.withCtx(()=>{var i,c;return[e.createElementVNode("div",ia,[aa,e.createElementVNode("div",la,[e.createElementVNode("h3",ca,e.toDisplayString(((i=r.selection)==null?void 0:i.title)??"Title"),1),e.createElementVNode("div",da,[e.createElementVNode("p",ha,e.toDisplayString(((c=r.selection)==null?void 0:c.message)??"Message")+".",1)])])])]}),_:1}))}}),fa={class:"sm:flex sm:items-start"},ma=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),pa={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},ga={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},ya={class:"mt-2"},ba={class:"text-sm text-gray-500"},va=["onKeyup","placeholder"],Sa=Object.assign({name:"VFModalNewFolder"},{props:{selection:Object,current:Object},setup(r){const t=r,n=e.inject("emitter");e.inject("storage");const s=e.inject("adapter"),{t:l}=e.inject("i18n"),i=e.ref(""),c=e.ref(""),u=()=>{i.value!=""&&n.emit("vf-fetch",{params:{q:"newfolder",adapter:s.value,path:t.current.dirname,name:i.value},onSuccess:()=>{n.emit("vf-toast-push",{label:l("%s is created.",i.value)})},onError:y=>{c.value=l(y.message)}})};return(y,g)=>(e.openBlock(),e.createBlock(me,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:u,class:"w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 dark:bg-gray-700 dark:hover:bg-gray-600/75 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(l)("Create")),1),e.createElementVNode("button",{type:"button",onClick:g[2]||(g[2]=m=>e.unref(n).emit("vf-modal-close")),class:"mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(l)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",fa,[ma,e.createElementVNode("div",pa,[e.createElementVNode("h3",ga,e.toDisplayString(e.unref(l)("New Folder")),1),e.createElementVNode("div",ya,[e.createElementVNode("p",ba,e.toDisplayString(e.unref(l)("Create a new folder")),1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":g[0]||(g[0]=m=>i.value=m),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(l)("Folder Name"),type:"text"},null,40,va),[[e.vModelText,i.value]]),c.value.length?(e.openBlock(),e.createBlock(pe,{key:0,onHidden:g[1]||(g[1]=m=>c.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}}),_a={class:"sm:flex sm:items-start"},wa=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),ka={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},xa={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},Da={class:"mt-2"},Ea={class:"text-sm text-gray-500"},Na=["onKeyup","placeholder"],Ca=Object.assign({name:"VFModalNewFile"},{props:{selection:Object,current:Object},setup(r){const t=r,n=e.inject("emitter");e.inject("storage");const s=e.inject("adapter"),{t:l}=e.inject("i18n"),i=e.ref(""),c=e.ref(""),u=()=>{i.value!=""&&n.emit("vf-fetch",{params:{q:"newfile",adapter:s.value,path:t.current.dirname,name:i.value},onSuccess:()=>{n.emit("vf-toast-push",{label:l("%s is created.",i.value)})},onError:y=>{c.value=l(y.message)}})};return(y,g)=>(e.openBlock(),e.createBlock(me,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:u,class:"w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 dark:bg-gray-700 dark:hover:bg-gray-600/75 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(l)("Create")),1),e.createElementVNode("button",{type:"button",onClick:g[2]||(g[2]=m=>e.unref(n).emit("vf-modal-close")),class:"mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(l)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",_a,[wa,e.createElementVNode("div",ka,[e.createElementVNode("h3",xa,e.toDisplayString(e.unref(l)("New File")),1),e.createElementVNode("div",Da,[e.createElementVNode("p",Ea,e.toDisplayString(e.unref(l)("Create a new file")),1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":g[0]||(g[0]=m=>i.value=m),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(l)("File Name"),type:"text"},null,40,Na),[[e.vModelText,i.value]]),c.value.length?(e.openBlock(),e.createBlock(pe,{key:0,onHidden:g[1]||(g[1]=m=>c.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}}),Va={class:"flex"},Ma=["aria-label"],Ba={class:"ml-auto mb-2"},$a={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"},Ta={key:1},Aa={__name:"Text",props:{selection:Object},emits:["load"],setup(r,{emit:t}){const n=r,s=e.ref(""),l=e.ref(""),i=e.ref(null),c=e.ref(!1),{apiUrl:u}=ue(),y=e.ref(""),g=e.ref(!1),{t:m}=e.inject("i18n");e.onMounted(()=>{it(u.value,{params:{q:"preview",adapter:n.selection.adapter,path:n.selection.item.path},json:!1}).then(k=>{s.value=k,t("load")})});const b=()=>{c.value=!c.value,l.value=s.value,c.value==!0&&e.nextTick(()=>{i.value.focus()})},S=e.inject("postData"),x=()=>{y.value="",g.value=!1,it(u.value,{method:"POST",params:Object.assign(S,{q:"save",adapter:n.selection.adapter,path:n.selection.item.path,content:l.value}),json:!1}).then(k=>{y.value=m("Updated."),s.value=k,t("load"),c.value=!c.value}).catch(k=>{y.value=m(k.message),g.value=!0})};return(k,N)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Va,[e.createElementVNode("div",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title","aria-label":r.selection.item.path,"data-microtip-position":"bottom-right",role:"tooltip"},e.toDisplayString(r.selection.item.basename),9,Ma),e.createElementVNode("div",Ba,[c.value?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:x,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:N[0]||(N[0]=C=>b())},e.toDisplayString(c.value?e.unref(m)("Cancel"):e.unref(m)("Edit")),1)])]),e.createElementVNode("div",null,[c.value?(e.openBlock(),e.createElementBlock("div",Ta,[e.withDirectives(e.createElementVNode("textarea",{ref_key:"editInput",ref:i,"onUpdate:modelValue":N[1]||(N[1]=C=>l.value=C),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",$a,e.toDisplayString(s.value),1)),y.value.length?(e.openBlock(),e.createBlock(pe,{key:2,onHidden:N[2]||(N[2]=C=>y.value=""),error:g.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.value),1)]),_:1},8,["error"])):e.createCommentVNode("",!0)])],64))}},Oh="";/*! + * Cropper.js v1.5.13 * https://fengyuanchen.github.io/cropperjs * * Copyright 2015-present Chen Fengyuan * Released under the MIT license * - * Date: 2021-06-12T08:00:17.411Z - */function Ar(r,t){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable})),o.push.apply(o,n)}return o}function Or(r){for(var t=1;tr.length)&&(t=r.length);for(var o=0,n=new Array(t);o
',dl=Number.isNaN||pe.isNaN;function z(r){return typeof r=="number"&&!dl(r)}var ro=function(t){return t>0&&t<1/0};function Ft(r){return typeof r>"u"}function $e(r){return dt(r)==="object"&&r!==null}var hl=Object.prototype.hasOwnProperty;function Ae(r){if(!$e(r))return!1;try{var t=r.constructor,o=t.prototype;return t&&o&&hl.call(o,"isPrototypeOf")}catch{return!1}}function oe(r){return typeof r=="function"}var ul=Array.prototype.slice;function oo(r){return Array.from?Array.from(r):ul.call(r)}function q(r,t){return r&&oe(t)&&(Array.isArray(r)||z(r.length)?oo(r).forEach(function(o,n){t.call(r,o,n,r)}):$e(r)&&Object.keys(r).forEach(function(o){t.call(r,r[o],o,r)})),r}var Y=Object.assign||function(t){for(var o=arguments.length,n=new Array(o>1?o-1:0),s=1;s0&&n.forEach(function(a){$e(a)&&Object.keys(a).forEach(function(l){t[l]=a[l]})}),t},fl=/\.\d*(?:0|9){12}\d*$/;function Oe(r){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return fl.test(r)?Math.round(r*t)/t:r}var ml=/^width|height|left|top|marginLeft|marginTop$/;function _e(r,t){var o=r.style;q(t,function(n,s){ml.test(s)&&z(n)&&(n="".concat(n,"px")),o[s]=n})}function pl(r,t){return r.classList?r.classList.contains(t):r.className.indexOf(t)>-1}function Q(r,t){if(!!t){if(z(r.length)){q(r,function(n){Q(n,t)});return}if(r.classList){r.classList.add(t);return}var o=r.className.trim();o?o.indexOf(t)<0&&(r.className="".concat(o," ").concat(t)):r.className=t}}function ge(r,t){if(!!t){if(z(r.length)){q(r,function(o){ge(o,t)});return}if(r.classList){r.classList.remove(t);return}r.className.indexOf(t)>=0&&(r.className=r.className.replace(t,""))}}function Le(r,t,o){if(!!t){if(z(r.length)){q(r,function(n){Le(n,t,o)});return}o?Q(r,t):ge(r,t)}}var gl=/([a-z\d])([A-Z])/g;function Ut(r){return r.replace(gl,"$1-$2").toLowerCase()}function Kt(r,t){return $e(r[t])?r[t]:r.dataset?r.dataset[t]:r.getAttribute("data-".concat(Ut(t)))}function Qe(r,t,o){$e(o)?r[t]=o:r.dataset?r.dataset[t]=o:r.setAttribute("data-".concat(Ut(t)),o)}function yl(r,t){if($e(r[t]))try{delete r[t]}catch{r[t]=void 0}else if(r.dataset)try{delete r.dataset[t]}catch{r.dataset[t]=void 0}else r.removeAttribute("data-".concat(Ut(t)))}var no=/\s\s*/,ao=function(){var r=!1;if(ht){var t=!1,o=function(){},n=Object.defineProperty({},"once",{get:function(){return r=!0,t},set:function(a){t=a}});pe.addEventListener("test",o,n),pe.removeEventListener("test",o,n)}return r}();function de(r,t,o){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=o;t.trim().split(no).forEach(function(a){if(!ao){var l=r.listeners;l&&l[a]&&l[a][o]&&(s=l[a][o],delete l[a][o],Object.keys(l[a]).length===0&&delete l[a],Object.keys(l).length===0&&delete r.listeners)}r.removeEventListener(a,s,n)})}function le(r,t,o){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=o;t.trim().split(no).forEach(function(a){if(n.once&&!ao){var l=r.listeners,m=l===void 0?{}:l;s=function(){delete m[a][o],r.removeEventListener(a,s,n);for(var f=arguments.length,u=new Array(f),g=0;gMath.abs(o)&&(o=b)})}),o}function mt(r,t){var o=r.pageX,n=r.pageY,s={endX:o,endY:n};return t?s:Or({startX:o,startY:n},s)}function wl(r){var t=0,o=0,n=0;return q(r,function(s){var a=s.startX,l=s.startY;t+=a,o+=l,n+=1}),t/=n,o/=n,{pageX:t,pageY:o}}function xe(r){var t=r.aspectRatio,o=r.height,n=r.width,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"contain",a=ro(n),l=ro(o);if(a&&l){var m=o*t;s==="contain"&&m>n||s==="cover"&&m90?{width:p,height:m}:{width:m,height:p}}function _l(r,t,o,n){var s=t.aspectRatio,a=t.naturalWidth,l=t.naturalHeight,m=t.rotate,p=m===void 0?0:m,f=t.scaleX,u=f===void 0?1:f,g=t.scaleY,b=g===void 0?1:g,D=o.aspectRatio,_=o.naturalWidth,E=o.naturalHeight,V=n.fillColor,I=V===void 0?"transparent":V,L=n.imageSmoothingEnabled,M=L===void 0?!0:L,R=n.imageSmoothingQuality,j=R===void 0?"low":R,x=n.maxWidth,T=x===void 0?1/0:x,U=n.maxHeight,J=U===void 0?1/0:U,Z=n.minWidth,ne=Z===void 0?0:Z,ce=n.minHeight,ie=ce===void 0?0:ce,F=document.createElement("canvas"),C=F.getContext("2d"),O=xe({aspectRatio:D,width:T,height:J}),B=xe({aspectRatio:D,width:ne,height:ie},"cover"),ee=Math.min(O.width,Math.max(B.width,_)),H=Math.min(O.height,Math.max(B.height,E)),ae=xe({aspectRatio:s,width:T,height:J}),W=xe({aspectRatio:s,width:ne,height:ie},"cover"),pt=Math.min(ae.width,Math.max(W.width,a)),je=Math.min(ae.height,Math.max(W.height,l)),Xt=[-pt/2,-je/2,pt,je];return F.width=Oe(ee),F.height=Oe(H),C.fillStyle=I,C.fillRect(0,0,ee,H),C.save(),C.translate(ee/2,H/2),C.rotate(p*Math.PI/180),C.scale(u,b),C.imageSmoothingEnabled=M,C.imageSmoothingQuality=j,C.drawImage.apply(C,[r].concat(Ir(Xt.map(function(Pe){return Math.floor(Oe(Pe))})))),C.restore(),F}var co=String.fromCharCode;function xl(r,t,o){var n="";o+=t;for(var s=t;s0;)o.push(co.apply(null,oo(s.subarray(0,n)))),s=s.subarray(n);return"data:".concat(t,";base64,").concat(btoa(o.join("")))}function Nl(r){var t=new DataView(r),o;try{var n,s,a;if(t.getUint8(0)===255&&t.getUint8(1)===216)for(var l=t.byteLength,m=2;m+1=8&&(a=f+g)}}}if(a){var b=t.getUint16(a,n),D,_;for(_=0;_=0?a:Qr),height:Math.max(n.offsetHeight,l>=0?l:eo)};this.containerData=m,_e(s,{width:m.width,height:m.height}),Q(t,re),ge(s,re)},initCanvas:function(){var t=this.containerData,o=this.imageData,n=this.options.viewMode,s=Math.abs(o.rotate)%180===90,a=s?o.naturalHeight:o.naturalWidth,l=s?o.naturalWidth:o.naturalHeight,m=a/l,p=t.width,f=t.height;t.height*m>t.width?n===3?p=t.height*m:f=t.width/m:n===3?f=t.width/m:p=t.height*m;var u={aspectRatio:m,naturalWidth:a,naturalHeight:l,width:p,height:f};this.canvasData=u,this.limited=n===1||n===2,this.limitCanvas(!0,!0),u.width=Math.min(Math.max(u.width,u.minWidth),u.maxWidth),u.height=Math.min(Math.max(u.height,u.minHeight),u.maxHeight),u.left=(t.width-u.width)/2,u.top=(t.height-u.height)/2,u.oldLeft=u.left,u.oldTop=u.top,this.initialCanvasData=Y({},u)},limitCanvas:function(t,o){var n=this.options,s=this.containerData,a=this.canvasData,l=this.cropBoxData,m=n.viewMode,p=a.aspectRatio,f=this.cropped&&l;if(t){var u=Number(n.minCanvasWidth)||0,g=Number(n.minCanvasHeight)||0;m>1?(u=Math.max(u,s.width),g=Math.max(g,s.height),m===3&&(g*p>u?u=g*p:g=u/p)):m>0&&(u?u=Math.max(u,f?l.width:0):g?g=Math.max(g,f?l.height:0):f&&(u=l.width,g=l.height,g*p>u?u=g*p:g=u/p));var b=xe({aspectRatio:p,width:u,height:g});u=b.width,g=b.height,a.minWidth=u,a.minHeight=g,a.maxWidth=1/0,a.maxHeight=1/0}if(o)if(m>(f?0:1)){var D=s.width-a.width,_=s.height-a.height;a.minLeft=Math.min(0,D),a.minTop=Math.min(0,_),a.maxLeft=Math.max(0,D),a.maxTop=Math.max(0,_),f&&this.limited&&(a.minLeft=Math.min(l.left,l.left+(l.width-a.width)),a.minTop=Math.min(l.top,l.top+(l.height-a.height)),a.maxLeft=l.left,a.maxTop=l.top,m===2&&(a.width>=s.width&&(a.minLeft=Math.min(0,D),a.maxLeft=Math.max(0,D)),a.height>=s.height&&(a.minTop=Math.min(0,_),a.maxTop=Math.max(0,_))))}else a.minLeft=-a.width,a.minTop=-a.height,a.maxLeft=s.width,a.maxTop=s.height},renderCanvas:function(t,o){var n=this.canvasData,s=this.imageData;if(o){var a=kl({width:s.naturalWidth*Math.abs(s.scaleX||1),height:s.naturalHeight*Math.abs(s.scaleY||1),degree:s.rotate||0}),l=a.width,m=a.height,p=n.width*(l/n.naturalWidth),f=n.height*(m/n.naturalHeight);n.left-=(p-n.width)/2,n.top-=(f-n.height)/2,n.width=p,n.height=f,n.aspectRatio=l/m,n.naturalWidth=l,n.naturalHeight=m,this.limitCanvas(!0,!1)}(n.width>n.maxWidth||n.widthn.maxHeight||n.heighto.width?a.height=a.width/n:a.width=a.height*n),this.cropBoxData=a,this.limitCropBox(!0,!0),a.width=Math.min(Math.max(a.width,a.minWidth),a.maxWidth),a.height=Math.min(Math.max(a.height,a.minHeight),a.maxHeight),a.width=Math.max(a.minWidth,a.width*s),a.height=Math.max(a.minHeight,a.height*s),a.left=o.left+(o.width-a.width)/2,a.top=o.top+(o.height-a.height)/2,a.oldLeft=a.left,a.oldTop=a.top,this.initialCropBoxData=Y({},a)},limitCropBox:function(t,o){var n=this.options,s=this.containerData,a=this.canvasData,l=this.cropBoxData,m=this.limited,p=n.aspectRatio;if(t){var f=Number(n.minCropBoxWidth)||0,u=Number(n.minCropBoxHeight)||0,g=m?Math.min(s.width,a.width,a.width+a.left,s.width-a.left):s.width,b=m?Math.min(s.height,a.height,a.height+a.top,s.height-a.top):s.height;f=Math.min(f,s.width),u=Math.min(u,s.height),p&&(f&&u?u*p>f?u=f/p:f=u*p:f?u=f/p:u&&(f=u*p),b*p>g?b=g/p:g=b*p),l.minWidth=Math.min(f,g),l.minHeight=Math.min(u,b),l.maxWidth=g,l.maxHeight=b}o&&(m?(l.minLeft=Math.max(0,a.left),l.minTop=Math.max(0,a.top),l.maxLeft=Math.min(s.width,a.left+a.width)-l.width,l.maxTop=Math.min(s.height,a.top+a.height)-l.height):(l.minLeft=0,l.minTop=0,l.maxLeft=s.width-l.width,l.maxTop=s.height-l.height))},renderCropBox:function(){var t=this.options,o=this.containerData,n=this.cropBoxData;(n.width>n.maxWidth||n.widthn.maxHeight||n.height=o.width&&n.height>=o.height?Pr:At),_e(this.cropBox,Y({width:n.width,height:n.height},et({translateX:n.left,translateY:n.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),Ie(this.element,jt,this.getData())}},$l={initPreview:function(){var t=this.element,o=this.crossOrigin,n=this.options.preview,s=o?this.crossOriginUrl:this.url,a=t.alt||"The image to preview",l=document.createElement("img");if(o&&(l.crossOrigin=o),l.src=s,l.alt=a,this.viewBox.appendChild(l),this.viewBoxImage=l,!!n){var m=n;typeof n=="string"?m=t.ownerDocument.querySelectorAll(n):n.querySelector&&(m=[n]),this.previews=m,q(m,function(p){var f=document.createElement("img");Qe(p,ft,{width:p.offsetWidth,height:p.offsetHeight,html:p.innerHTML}),o&&(f.crossOrigin=o),f.src=s,f.alt=a,f.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',p.innerHTML="",p.appendChild(f)})}},resetPreview:function(){q(this.previews,function(t){var o=Kt(t,ft);_e(t,{width:o.width,height:o.height}),t.innerHTML=o.html,yl(t,ft)})},preview:function(){var t=this.imageData,o=this.canvasData,n=this.cropBoxData,s=n.width,a=n.height,l=t.width,m=t.height,p=n.left-o.left-t.left,f=n.top-o.top-t.top;!this.cropped||this.disabled||(_e(this.viewBoxImage,Y({width:l,height:m},et(Y({translateX:-p,translateY:-f},t)))),q(this.previews,function(u){var g=Kt(u,ft),b=g.width,D=g.height,_=b,E=D,V=1;s&&(V=b/s,E=a*V),a&&E>D&&(V=D/a,_=s*V,E=D),_e(u,{width:_,height:E}),_e(u.getElementsByTagName("img")[0],Y({width:l*V,height:m*V},et(Y({translateX:-p*V,translateY:-f*V},t))))}))}},Ml={bind:function(){var t=this.element,o=this.options,n=this.cropper;oe(o.cropstart)&&le(t,Rt,o.cropstart),oe(o.cropmove)&&le(t,zt,o.cropmove),oe(o.cropend)&&le(t,Pt,o.cropend),oe(o.crop)&&le(t,jt,o.crop),oe(o.zoom)&&le(t,Ht,o.zoom),le(n,Yr,this.onCropStart=this.cropStart.bind(this)),o.zoomable&&o.zoomOnWheel&&le(n,Jr,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),o.toggleDragModeOnDblclick&&le(n,Kr,this.onDblclick=this.dblclick.bind(this)),le(t.ownerDocument,Wr,this.onCropMove=this.cropMove.bind(this)),le(t.ownerDocument,Xr,this.onCropEnd=this.cropEnd.bind(this)),o.responsive&&le(window,Gr,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,o=this.options,n=this.cropper;oe(o.cropstart)&&de(t,Rt,o.cropstart),oe(o.cropmove)&&de(t,zt,o.cropmove),oe(o.cropend)&&de(t,Pt,o.cropend),oe(o.crop)&&de(t,jt,o.crop),oe(o.zoom)&&de(t,Ht,o.zoom),de(n,Yr,this.onCropStart),o.zoomable&&o.zoomOnWheel&&de(n,Jr,this.onWheel,{passive:!1,capture:!0}),o.toggleDragModeOnDblclick&&de(n,Kr,this.onDblclick),de(t.ownerDocument,Wr,this.onCropMove),de(t.ownerDocument,Xr,this.onCropEnd),o.responsive&&de(window,Gr,this.onResize)}},Bl={resize:function(){if(!this.disabled){var t=this.options,o=this.container,n=this.containerData,s=o.offsetWidth/n.width,a=o.offsetHeight/n.height,l=Math.abs(s-1)>Math.abs(a-1)?s:a;if(l!==1){var m,p;t.restore&&(m=this.getCanvasData(),p=this.getCropBoxData()),this.render(),t.restore&&(this.setCanvasData(q(m,function(f,u){m[u]=f*l})),this.setCropBoxData(q(p,function(f,u){p[u]=f*l})))}}},dblclick:function(){this.disabled||this.options.dragMode===Ur||this.setDragMode(pl(this.dragBox,Ot)?Fr:It)},wheel:function(t){var o=this,n=Number(this.options.wheelZoomRatio)||.1,s=1;this.disabled||(t.preventDefault(),!this.wheeling&&(this.wheeling=!0,setTimeout(function(){o.wheeling=!1},50),t.deltaY?s=t.deltaY>0?1:-1:t.wheelDelta?s=-t.wheelDelta/120:t.detail&&(s=t.detail>0?1:-1),this.zoom(-s*n,t)))},cropStart:function(t){var o=t.buttons,n=t.button;if(!(this.disabled||(t.type==="mousedown"||t.type==="pointerdown"&&t.pointerType==="mouse")&&(z(o)&&o!==1||z(n)&&n!==0||t.ctrlKey))){var s=this.options,a=this.pointers,l;t.changedTouches?q(t.changedTouches,function(m){a[m.identifier]=mt(m)}):a[t.pointerId||0]=mt(t),Object.keys(a).length>1&&s.zoomable&&s.zoomOnTouch?l=zr:l=Kt(t.target,Ze),!!al.test(l)&&Ie(this.element,Rt,{originalEvent:t,action:l})!==!1&&(t.preventDefault(),this.action=l,this.cropping=!1,l===jr&&(this.cropping=!0,Q(this.dragBox,ut)))}},cropMove:function(t){var o=this.action;if(!(this.disabled||!o)){var n=this.pointers;t.preventDefault(),Ie(this.element,zt,{originalEvent:t,action:o})!==!1&&(t.changedTouches?q(t.changedTouches,function(s){Y(n[s.identifier]||{},mt(s,!0))}):Y(n[t.pointerId||0]||{},mt(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var o=this.action,n=this.pointers;t.changedTouches?q(t.changedTouches,function(s){delete n[s.identifier]}):delete n[t.pointerId||0],o&&(t.preventDefault(),Object.keys(n).length||(this.action=""),this.cropping&&(this.cropping=!1,Le(this.dragBox,ut,this.cropped&&this.options.modal)),Ie(this.element,Pt,{originalEvent:t,action:o}))}}},Tl={change:function(t){var o=this.options,n=this.canvasData,s=this.containerData,a=this.cropBoxData,l=this.pointers,m=this.action,p=o.aspectRatio,f=a.left,u=a.top,g=a.width,b=a.height,D=f+g,_=u+b,E=0,V=0,I=s.width,L=s.height,M=!0,R;!p&&t.shiftKey&&(p=g&&b?g/b:1),this.limited&&(E=a.minLeft,V=a.minTop,I=E+Math.min(s.width,n.width,n.left+n.width),L=V+Math.min(s.height,n.height,n.top+n.height));var j=l[Object.keys(l)[0]],x={x:j.endX-j.startX,y:j.endY-j.startY},T=function(J){switch(J){case Ce:D+x.x>I&&(x.x=I-D);break;case Ve:f+x.xL&&(x.y=L-_);break}};switch(m){case At:f+=x.x,u+=x.y;break;case Ce:if(x.x>=0&&(D>=I||p&&(u<=V||_>=L))){M=!1;break}T(Ce),g+=x.x,g<0&&(m=Ve,g=-g,f-=g),p&&(b=g/p,u+=(a.height-b)/2);break;case ke:if(x.y<=0&&(u<=V||p&&(f<=E||D>=I))){M=!1;break}T(ke),b-=x.y,u+=x.y,b<0&&(m=Te,b=-b,u-=b),p&&(g=b*p,f+=(a.width-g)/2);break;case Ve:if(x.x<=0&&(f<=E||p&&(u<=V||_>=L))){M=!1;break}T(Ve),g-=x.x,f+=x.x,g<0&&(m=Ce,g=-g,f-=g),p&&(b=g/p,u+=(a.height-b)/2);break;case Te:if(x.y>=0&&(_>=L||p&&(f<=E||D>=I))){M=!1;break}T(Te),b+=x.y,b<0&&(m=ke,b=-b,u-=b),p&&(g=b*p,f+=(a.width-g)/2);break;case Xe:if(p){if(x.y<=0&&(u<=V||D>=I)){M=!1;break}T(ke),b-=x.y,u+=x.y,g=b*p}else T(ke),T(Ce),x.x>=0?DV&&(b-=x.y,u+=x.y):(b-=x.y,u+=x.y);g<0&&b<0?(m=Je,b=-b,g=-g,u-=b,f-=g):g<0?(m=qe,g=-g,f-=g):b<0&&(m=Ge,b=-b,u-=b);break;case qe:if(p){if(x.y<=0&&(u<=V||f<=E)){M=!1;break}T(ke),b-=x.y,u+=x.y,g=b*p,f+=a.width-g}else T(ke),T(Ve),x.x<=0?f>E?(g-=x.x,f+=x.x):x.y<=0&&u<=V&&(M=!1):(g-=x.x,f+=x.x),x.y<=0?u>V&&(b-=x.y,u+=x.y):(b-=x.y,u+=x.y);g<0&&b<0?(m=Ge,b=-b,g=-g,u-=b,f-=g):g<0?(m=Xe,g=-g,f-=g):b<0&&(m=Je,b=-b,u-=b);break;case Je:if(p){if(x.x<=0&&(f<=E||_>=L)){M=!1;break}T(Ve),g-=x.x,f+=x.x,b=g/p}else T(Te),T(Ve),x.x<=0?f>E?(g-=x.x,f+=x.x):x.y>=0&&_>=L&&(M=!1):(g-=x.x,f+=x.x),x.y>=0?_=0&&(D>=I||_>=L)){M=!1;break}T(Ce),g+=x.x,b=g/p}else T(Te),T(Ce),x.x>=0?D=0&&_>=L&&(M=!1):g+=x.x,x.y>=0?_0?m=x.y>0?Ge:Xe:x.x<0&&(f-=g,m=x.y>0?Je:qe),x.y<0&&(u-=b),this.cropped||(ge(this.cropBox,re),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}M&&(a.width=g,a.height=b,a.left=f,a.top=u,this.action=m,this.renderCropBox()),q(l,function(U){U.startX=U.endX,U.startY=U.endY})}},Al={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&Q(this.dragBox,ut),ge(this.cropBox,re),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=Y({},this.initialImageData),this.canvasData=Y({},this.initialCanvasData),this.cropBoxData=Y({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(Y(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),ge(this.dragBox,ut),Q(this.cropBox,re)),this},replace:function(t){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!this.disabled&&t&&(this.isImg&&(this.element.src=t),o?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,q(this.previews,function(n){n.getElementsByTagName("img")[0].src=t}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,ge(this.cropper,Rr)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,Q(this.cropper,Rr)),this},destroy:function(){var t=this.element;return t[K]?(t[K]=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,n=this.canvasData,s=n.left,a=n.top;return this.moveTo(Ft(t)?t:s+Number(t),Ft(o)?o:a+Number(o))},moveTo:function(t){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,n=this.canvasData,s=!1;return t=Number(t),o=Number(o),this.ready&&!this.disabled&&this.options.movable&&(z(t)&&(n.left=t,s=!0),z(o)&&(n.top=o,s=!0),s&&this.renderCanvas(!0)),this},zoom:function(t,o){var n=this.canvasData;return t=Number(t),t<0?t=1/(1-t):t=1+t,this.zoomTo(n.width*t/n.naturalWidth,null,o)},zoomTo:function(t,o,n){var s=this.options,a=this.canvasData,l=a.width,m=a.height,p=a.naturalWidth,f=a.naturalHeight;if(t=Number(t),t>=0&&this.ready&&!this.disabled&&s.zoomable){var u=p*t,g=f*t;if(Ie(this.element,Ht,{ratio:t,oldRatio:l/p,originalEvent:n})===!1)return this;if(n){var b=this.pointers,D=io(this.cropper),_=b&&Object.keys(b).length?wl(b):{pageX:n.pageX,pageY:n.pageY};a.left-=(u-l)*((_.pageX-D.left-a.left)/l),a.top-=(g-m)*((_.pageY-D.top-a.top)/m)}else Ae(o)&&z(o.x)&&z(o.y)?(a.left-=(u-l)*((o.x-a.left)/l),a.top-=(g-m)*((o.y-a.top)/m)):(a.left-=(u-l)/2,a.top-=(g-m)/2);a.width=u,a.height=g,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return t=Number(t),z(t)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var o=this.imageData.scaleY;return this.scale(t,z(o)?o:1)},scaleY:function(t){var o=this.imageData.scaleX;return this.scale(z(o)?o:1,t)},scale:function(t){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,n=this.imageData,s=!1;return t=Number(t),o=Number(o),this.ready&&!this.disabled&&this.options.scalable&&(z(t)&&(n.scaleX=t,s=!0),z(o)&&(n.scaleY=o,s=!0),s&&this.renderCanvas(!0,!0)),this},getData:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,o=this.options,n=this.imageData,s=this.canvasData,a=this.cropBoxData,l;if(this.ready&&this.cropped){l={x:a.left-s.left,y:a.top-s.top,width:a.width,height:a.height};var m=n.width/n.naturalWidth;if(q(l,function(u,g){l[g]=u/m}),t){var p=Math.round(l.y+l.height),f=Math.round(l.x+l.width);l.x=Math.round(l.x),l.y=Math.round(l.y),l.width=f-l.x,l.height=p-l.y}}else l={x:0,y:0,width:0,height:0};return o.rotatable&&(l.rotate=n.rotate||0),o.scalable&&(l.scaleX=n.scaleX||1,l.scaleY=n.scaleY||1),l},setData:function(t){var o=this.options,n=this.imageData,s=this.canvasData,a={};if(this.ready&&!this.disabled&&Ae(t)){var l=!1;o.rotatable&&z(t.rotate)&&t.rotate!==n.rotate&&(n.rotate=t.rotate,l=!0),o.scalable&&(z(t.scaleX)&&t.scaleX!==n.scaleX&&(n.scaleX=t.scaleX,l=!0),z(t.scaleY)&&t.scaleY!==n.scaleY&&(n.scaleY=t.scaleY,l=!0)),l&&this.renderCanvas(!0,!0);var m=n.width/n.naturalWidth;z(t.x)&&(a.left=t.x*m+s.left),z(t.y)&&(a.top=t.y*m+s.top),z(t.width)&&(a.width=t.width*m),z(t.height)&&(a.height=t.height*m),this.setCropBoxData(a)}return this},getContainerData:function(){return this.ready?Y({},this.containerData):{}},getImageData:function(){return this.sized?Y({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,o={};return this.ready&&q(["left","top","width","height","naturalWidth","naturalHeight"],function(n){o[n]=t[n]}),o},setCanvasData:function(t){var o=this.canvasData,n=o.aspectRatio;return this.ready&&!this.disabled&&Ae(t)&&(z(t.left)&&(o.left=t.left),z(t.top)&&(o.top=t.top),z(t.width)?(o.width=t.width,o.height=t.width/n):z(t.height)&&(o.height=t.height,o.width=t.height*n),this.renderCanvas(!0)),this},getCropBoxData:function(){var t=this.cropBoxData,o;return this.ready&&this.cropped&&(o={left:t.left,top:t.top,width:t.width,height:t.height}),o||{}},setCropBoxData:function(t){var o=this.cropBoxData,n=this.options.aspectRatio,s,a;return this.ready&&this.cropped&&!this.disabled&&Ae(t)&&(z(t.left)&&(o.left=t.left),z(t.top)&&(o.top=t.top),z(t.width)&&t.width!==o.width&&(s=!0,o.width=t.width),z(t.height)&&t.height!==o.height&&(a=!0,o.height=t.height),n&&(s?o.height=o.width/n:a&&(o.width=o.height*n)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var o=this.canvasData,n=_l(this.image,this.imageData,o,t);if(!this.cropped)return n;var s=this.getData(),a=s.x,l=s.y,m=s.width,p=s.height,f=n.width/Math.floor(o.naturalWidth);f!==1&&(a*=f,l*=f,m*=f,p*=f);var u=m/p,g=xe({aspectRatio:u,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),b=xe({aspectRatio:u,width:t.minWidth||0,height:t.minHeight||0},"cover"),D=xe({aspectRatio:u,width:t.width||(f!==1?n.width:m),height:t.height||(f!==1?n.height:p)}),_=D.width,E=D.height;_=Math.min(g.width,Math.max(b.width,_)),E=Math.min(g.height,Math.max(b.height,E));var V=document.createElement("canvas"),I=V.getContext("2d");V.width=Oe(_),V.height=Oe(E),I.fillStyle=t.fillColor||"transparent",I.fillRect(0,0,_,E);var L=t.imageSmoothingEnabled,M=L===void 0?!0:L,R=t.imageSmoothingQuality;I.imageSmoothingEnabled=M,R&&(I.imageSmoothingQuality=R);var j=n.width,x=n.height,T=a,U=l,J,Z,ne,ce,ie,F;T<=-m||T>j?(T=0,J=0,ne=0,ie=0):T<=0?(ne=-T,T=0,J=Math.min(j,m+T),ie=J):T<=j&&(ne=0,J=Math.min(m,j-T),ie=J),J<=0||U<=-p||U>x?(U=0,Z=0,ce=0,F=0):U<=0?(ce=-U,U=0,Z=Math.min(x,p+U),F=Z):U<=x&&(ce=0,Z=Math.min(p,x-U),F=Z);var C=[T,U,J,Z];if(ie>0&&F>0){var O=_/m;C.push(ne*O,ce*O,ie*O,F*O)}return I.drawImage.apply(I,[n].concat(Ir(C.map(function(B){return Math.floor(Oe(B))})))),V},setAspectRatio:function(t){var o=this.options;return!this.disabled&&!Ft(t)&&(o.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var o=this.options,n=this.dragBox,s=this.face;if(this.ready&&!this.disabled){var a=t===It,l=o.movable&&t===Fr;t=a||l?t:Ur,o.dragMode=t,Qe(n,Ze,t),Le(n,Ot,a),Le(n,Lt,l),o.cropBoxMovable||(Qe(s,Ze,t),Le(s,Ot,a),Le(s,Lt,l))}return this}},Ol=pe.Cropper,ho=function(){function r(t){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Xs(this,r),!t||!ll.test(t.tagName))throw new Error("The first argument is required and must be an or element.");this.element=t,this.options=Y({},to,Ae(o)&&o),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return qs(r,[{key:"init",value:function(){var o=this.element,n=o.tagName.toLowerCase(),s;if(!o[K]){if(o[K]=this,n==="img"){if(this.isImg=!0,s=o.getAttribute("src")||"",this.originalUrl=s,!s)return;s=o.src}else n==="canvas"&&window.HTMLCanvasElement&&(s=o.toDataURL());this.load(s)}}},{key:"load",value:function(o){var n=this;if(!!o){this.url=o,this.imageData={};var s=this.element,a=this.options;if(!a.rotatable&&!a.scalable&&(a.checkOrientation=!1),!a.checkOrientation||!window.ArrayBuffer){this.clone();return}if(il.test(o)){sl.test(o)?this.read(Dl(o)):this.clone();return}var l=new XMLHttpRequest,m=this.clone.bind(this);this.reloading=!0,this.xhr=l,l.onabort=m,l.onerror=m,l.ontimeout=m,l.onprogress=function(){l.getResponseHeader("content-type")!==Zr&&l.abort()},l.onload=function(){n.read(l.response)},l.onloadend=function(){n.reloading=!1,n.xhr=null},a.checkCrossOrigin&&so(o)&&s.crossOrigin&&(o=lo(o)),l.open("GET",o,!0),l.responseType="arraybuffer",l.withCredentials=s.crossOrigin==="use-credentials",l.send()}}},{key:"read",value:function(o){var n=this.options,s=this.imageData,a=Nl(o),l=0,m=1,p=1;if(a>1){this.url=El(o,Zr);var f=Cl(a);l=f.rotate,m=f.scaleX,p=f.scaleY}n.rotatable&&(s.rotate=l),n.scalable&&(s.scaleX=m,s.scaleY=p),this.clone()}},{key:"clone",value:function(){var o=this.element,n=this.url,s=o.crossOrigin,a=n;this.options.checkCrossOrigin&&so(n)&&(s||(s="anonymous"),a=lo(n)),this.crossOrigin=s,this.crossOriginUrl=a;var l=document.createElement("img");s&&(l.crossOrigin=s),l.src=a||n,l.alt=o.alt||"The image to crop",this.image=l,l.onload=this.start.bind(this),l.onerror=this.stop.bind(this),Q(l,Hr),o.parentNode.insertBefore(l,o.nextSibling)}},{key:"start",value:function(){var o=this,n=this.image;n.onload=null,n.onerror=null,this.sizing=!0;var s=pe.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(pe.navigator.userAgent),a=function(f,u){Y(o.imageData,{naturalWidth:f,naturalHeight:u,aspectRatio:f/u}),o.initialImageData=Y({},o.imageData),o.sizing=!1,o.sized=!0,o.build()};if(n.naturalWidth&&!s){a(n.naturalWidth,n.naturalHeight);return}var l=document.createElement("img"),m=document.body||document.documentElement;this.sizingImage=l,l.onload=function(){a(l.width,l.height),s||m.removeChild(l)},l.src=n.src,s||(l.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",m.appendChild(l))}},{key:"stop",value:function(){var o=this.image;o.onload=null,o.onerror=null,o.parentNode.removeChild(o),this.image=null}},{key:"build",value:function(){if(!(!this.sized||this.ready)){var o=this.element,n=this.options,s=this.image,a=o.parentNode,l=document.createElement("div");l.innerHTML=cl;var m=l.querySelector(".".concat(K,"-container")),p=m.querySelector(".".concat(K,"-canvas")),f=m.querySelector(".".concat(K,"-drag-box")),u=m.querySelector(".".concat(K,"-crop-box")),g=u.querySelector(".".concat(K,"-face"));this.container=a,this.cropper=m,this.canvas=p,this.dragBox=f,this.cropBox=u,this.viewBox=m.querySelector(".".concat(K,"-view-box")),this.face=g,p.appendChild(s),Q(o,re),a.insertBefore(m,o.nextSibling),this.isImg||ge(s,Hr),this.initPreview(),this.bind(),n.initialAspectRatio=Math.max(0,n.initialAspectRatio)||NaN,n.aspectRatio=Math.max(0,n.aspectRatio)||NaN,n.viewMode=Math.max(0,Math.min(3,Math.round(n.viewMode)))||0,Q(u,re),n.guides||Q(u.getElementsByClassName("".concat(K,"-dashed")),re),n.center||Q(u.getElementsByClassName("".concat(K,"-center")),re),n.background&&Q(m,"".concat(K,"-bg")),n.highlight||Q(g,tl),n.cropBoxMovable&&(Q(g,Lt),Qe(g,Ze,At)),n.cropBoxResizable||(Q(u.getElementsByClassName("".concat(K,"-line")),re),Q(u.getElementsByClassName("".concat(K,"-point")),re)),this.render(),this.ready=!0,this.setDragMode(n.dragMode),n.autoCrop&&this.crop(),this.setData(n.data),oe(n.ready)&&le(o,qr,n.ready,{once:!0}),Ie(o,qr)}}},{key:"unbuild",value:function(){!this.ready||(this.ready=!1,this.unbind(),this.resetPreview(),this.cropper.parentNode.removeChild(this.cropper),ge(this.element,re))}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],[{key:"noConflict",value:function(){return window.Cropper=Ol,r}},{key:"setDefaults",value:function(o){Y(to,Ae(o)&&o)}}]),r}();Y(ho.prototype,Vl,$l,Ml,Bl,Tl,Al);const Ll={class:"flex"},Il=["aria-label"],jl={class:"ml-auto mb-2"},Pl={class:"w-full flex justify-center"},zl=["src"],Rl={__name:"Image",props:{selection:Object},emits:["load"],setup(r,{emit:t}){const o=r,{t:n}=e.inject("i18n"),{apiUrl:s}=he(),a=e.ref(null),l=e.ref(null),m=e.ref(!1),p=e.ref(""),f=e.ref(!1),u=()=>{m.value=!m.value,m.value?l.value=new ho(a.value,{crop(D){}}):l.value.destroy()},g=e.inject("postData"),b=()=>{l.value.getCroppedCanvas({width:795,height:341}).toBlob(D=>{p.value="",f.value=!1,ot(s.value,{method:"POST",params:Object.assign(g,{q:"upload",adapter:o.selection.adapter,path:o.selection.item.path,file:D}),name:o.selection.item.basename,json:!1}).then(_=>{p.value=n("Updated."),a.value.src=bt(o.selection.adapter,o.selection.item.path),u(),t("load")}).catch(_=>{p.value=n(_.message),f.value=!0})})};return e.onMounted(()=>{t("load")}),(D,_)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Ll,[e.createElementVNode("h3",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title","aria-label":r.selection.item.path,"data-microtip-position":"bottom-right",role:"tooltip"},e.toDisplayString(r.selection.item.basename),9,Il),e.createElementVNode("div",jl,[m.value?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:b,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(n)("Crop")),1)):e.createCommentVNode("",!0),e.createElementVNode("button",{class:"ml-1 px-2 py-1 text-blue-500",onClick:_[0]||(_[0]=E=>u())},e.toDisplayString(m.value?e.unref(n)("Cancel"):e.unref(n)("Edit")),1)])]),e.createElementVNode("div",Pl,[e.createElementVNode("img",{ref_key:"image",ref:a,class:"max-w-[50vh] max-h-[50vh]",src:e.unref(bt)(o.selection.adapter,o.selection.item.path),alt:""},null,8,zl)]),p.value.length?(e.openBlock(),e.createBlock(me,{key:0,onHidden:_[1]||(_[1]=E=>p.value=""),error:f.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.value),1)]),_:1},8,["error"])):e.createCommentVNode("",!0)],64))}},Hl={class:"flex"},Fl=["aria-label"],Ul=e.createElementVNode("div",null,null,-1),Kl={__name:"Default",props:{selection:Object},emits:["load"],setup(r,{emit:t}){return e.onMounted(()=>{t("load")}),(o,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Hl,[e.createElementVNode("h3",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title","aria-label":r.selection.item.path,"data-microtip-position":"bottom-right",role:"tooltip"},e.toDisplayString(r.selection.item.basename),9,Fl)]),Ul],64))}},Yl=["aria-label"],Wl={class:"w-full",preload:"",controls:""},Xl=["src"],ql={__name:"Video",props:{selection:Object},emits:["load"],setup(r,{emit:t}){const o=r,{apiUrl:n}=he(),s=()=>n.value+"?"+De({q:"preview",adapter:o.selection.adapter,path:o.selection.item.path});return e.onMounted(()=>{t("load")}),(a,l)=>(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":r.selection.item.path,"data-microtip-position":"bottom-right",role:"tooltip"},e.toDisplayString(r.selection.item.basename),9,Yl),e.createElementVNode("div",null,[e.createElementVNode("video",Wl,[e.createElementVNode("source",{src:s(),type:"video/mp4"},null,8,Xl),e.createTextVNode(" Your browser does not support the video tag. ")])])],64))}},Gl=["aria-label"],Jl={class:"w-full",controls:""},Zl=["src"],Ql={__name:"Audio",props:{selection:Object},emits:["load"],setup(r,{emit:t}){const o=r,{apiUrl:n}=he(),s=()=>n.value+"?"+De({q:"preview",adapter:o.selection.adapter,path:o.selection.item.path});return e.onMounted(()=>{t("load")}),(a,l)=>(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":r.selection.item.path,"data-microtip-position":"bottom-right",role:"tooltip"},e.toDisplayString(r.selection.item.basename),9,Gl),e.createElementVNode("div",null,[e.createElementVNode("audio",Jl,[e.createElementVNode("source",{src:s(),type:"audio/mpeg"},null,8,Zl),e.createTextVNode(" Your browser does not support the audio element. ")])])],64))}},ec=["aria-label"],tc=["data"],rc=["src"],oc={__name:"Pdf",props:{selection:Object},emits:["load"],setup(r,{emit:t}){const o=r,{apiUrl:n}=he(),s=()=>n.value+"?"+De({q:"preview",adapter:o.selection.adapter,path:o.selection.item.path});return e.onMounted(()=>{t("load")}),(a,l)=>(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":r.selection.item.path,"data-microtip-position":"bottom-right",role:"tooltip"},e.toDisplayString(r.selection.item.basename),9,ec),e.createElementVNode("div",null,[e.createElementVNode("object",{class:"h-[60vh]",data:s(),type:"application/pdf",width:"100%",height:"100%"},[e.createElementVNode("iframe",{class:"border-0",src:s(),width:"100%",height:"100%"},` + * Date: 2022-11-20T05:30:46.114Z + */function Ir(r,t){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(r);t&&(s=s.filter(function(l){return Object.getOwnPropertyDescriptor(r,l).enumerable})),n.push.apply(n,s)}return n}function Or(r){for(var t=1;tr.length)&&(t=r.length);for(var n=0,s=new Array(t);n
',Ga=Number.isNaN||ge.isNaN;function P(r){return typeof r=="number"&&!Ga(r)}var on=function(t){return t>0&&t<1/0};function Wt(r){return typeof r>"u"}function $e(r){return At(r)==="object"&&r!==null}var Ja=Object.prototype.hasOwnProperty;function je(r){if(!$e(r))return!1;try{var t=r.constructor,n=t.prototype;return t&&n&&Ja.call(n,"isPrototypeOf")}catch{return!1}}function ee(r){return typeof r=="function"}var Qa=Array.prototype.slice;function sn(r){return Array.from?Array.from(r):Qa.call(r)}function K(r,t){return r&&ee(t)&&(Array.isArray(r)||P(r.length)?sn(r).forEach(function(n,s){t.call(r,n,s,r)}):$e(r)&&Object.keys(r).forEach(function(n){t.call(r,r[n],n,r)})),r}var U=Object.assign||function(t){for(var n=arguments.length,s=new Array(n>1?n-1:0),l=1;l0&&s.forEach(function(i){$e(i)&&Object.keys(i).forEach(function(c){t[c]=i[c]})}),t},el=/\.\d*(?:0|9){12}\d*$/;function Pe(r){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return el.test(r)?Math.round(r*t)/t:r}var tl=/^width|height|left|top|marginLeft|marginTop$/;function De(r,t){var n=r.style;K(t,function(s,l){tl.test(l)&&P(s)&&(s="".concat(s,"px")),n[l]=s})}function rl(r,t){return r.classList?r.classList.contains(t):r.className.indexOf(t)>-1}function q(r,t){if(t){if(P(r.length)){K(r,function(s){q(s,t)});return}if(r.classList){r.classList.add(t);return}var n=r.className.trim();n?n.indexOf(t)<0&&(r.className="".concat(n," ").concat(t)):r.className=t}}function ye(r,t){if(t){if(P(r.length)){K(r,function(n){ye(n,t)});return}if(r.classList){r.classList.remove(t);return}r.className.indexOf(t)>=0&&(r.className=r.className.replace(t,""))}}function ze(r,t,n){if(t){if(P(r.length)){K(r,function(s){ze(s,t,n)});return}n?q(r,t):ye(r,t)}}var nl=/([a-z\d])([A-Z])/g;function Xt(r){return r.replace(nl,"$1-$2").toLowerCase()}function Zt(r,t){return $e(r[t])?r[t]:r.dataset?r.dataset[t]:r.getAttribute("data-".concat(Xt(t)))}function Ge(r,t,n){$e(n)?r[t]=n:r.dataset?r.dataset[t]=n:r.setAttribute("data-".concat(Xt(t)),n)}function ol(r,t){if($e(r[t]))try{delete r[t]}catch{r[t]=void 0}else if(r.dataset)try{delete r.dataset[t]}catch{r.dataset[t]=void 0}else r.removeAttribute("data-".concat(Xt(t)))}var an=/\s\s*/,ln=function(){var r=!1;if(ft){var t=!1,n=function(){},s=Object.defineProperty({},"once",{get:function(){return r=!0,t},set:function(i){t=i}});ge.addEventListener("test",n,s),ge.removeEventListener("test",n,s)}return r}();function ce(r,t,n){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},l=n;t.trim().split(an).forEach(function(i){if(!ln){var c=r.listeners;c&&c[i]&&c[i][n]&&(l=c[i][n],delete c[i][n],Object.keys(c[i]).length===0&&delete c[i],Object.keys(c).length===0&&delete r.listeners)}r.removeEventListener(i,l,s)})}function se(r,t,n){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},l=n;t.trim().split(an).forEach(function(i){if(s.once&&!ln){var c=r.listeners,u=c===void 0?{}:c;l=function(){delete u[i][n],r.removeEventListener(i,l,s);for(var g=arguments.length,m=new Array(g),b=0;bMath.abs(n)&&(n=S)})}),n}function gt(r,t){var n=r.pageX,s=r.pageY,l={endX:n,endY:s};return t?l:Or({startX:n,startY:s},l)}function al(r){var t=0,n=0,s=0;return K(r,function(l){var i=l.startX,c=l.startY;t+=i,n+=c,s+=1}),t/=s,n/=s,{pageX:t,pageY:n}}function Ee(r){var t=r.aspectRatio,n=r.height,s=r.width,l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"contain",i=on(s),c=on(n);if(i&&c){var u=n*t;l==="contain"&&u>s||l==="cover"&&u90?{width:y,height:u}:{width:u,height:y}}function cl(r,t,n,s){var l=t.aspectRatio,i=t.naturalWidth,c=t.naturalHeight,u=t.rotate,y=u===void 0?0:u,g=t.scaleX,m=g===void 0?1:g,b=t.scaleY,S=b===void 0?1:b,x=n.aspectRatio,k=n.naturalWidth,N=n.naturalHeight,C=s.fillColor,A=C===void 0?"transparent":C,T=s.imageSmoothingEnabled,V=T===void 0?!0:T,j=s.imageSmoothingQuality,I=j===void 0?"low":j,D=s.maxWidth,B=D===void 0?1/0:D,H=s.maxHeight,W=H===void 0?1/0:H,Y=s.minWidth,te=Y===void 0?0:Y,ie=s.minHeight,ne=ie===void 0?0:ie,re=document.createElement("canvas"),E=re.getContext("2d"),$=Ee({aspectRatio:x,width:B,height:W}),M=Ee({aspectRatio:x,width:te,height:ne},"cover"),G=Math.min($.width,Math.max(M.width,k)),O=Math.min($.height,Math.max(M.height,N)),de=Ee({aspectRatio:l,width:B,height:W}),he=Ee({aspectRatio:l,width:te,height:ne},"cover"),yt=Math.min(de.width,Math.max(he.width,i)),Qe=Math.min(de.height,Math.max(he.height,c)),et=[-yt/2,-Qe/2,yt,Qe];return re.width=Pe(G),re.height=Pe(O),E.fillStyle=A,E.fillRect(0,0,G,O),E.save(),E.translate(G/2,O/2),E.rotate(y*Math.PI/180),E.scale(m,S),E.imageSmoothingEnabled=V,E.imageSmoothingQuality=I,E.drawImage.apply(E,[r].concat(Pr(et.map(function(bt){return Math.floor(Pe(bt))})))),E.restore(),re}var un=String.fromCharCode;function dl(r,t,n){var s="";n+=t;for(var l=t;l0;)n.push(un.apply(null,sn(l.subarray(0,s)))),l=l.subarray(s);return"data:".concat(t,";base64,").concat(btoa(n.join("")))}function ml(r){var t=new DataView(r),n;try{var s,l,i;if(t.getUint8(0)===255&&t.getUint8(1)===216)for(var c=t.byteLength,u=2;u+1=8&&(i=g+b)}}}if(i){var S=t.getUint16(i,s),x,k;for(k=0;k=0?i:tn),height:Math.max(s.offsetHeight,c>=0?c:rn)};this.containerData=u,De(l,{width:u.width,height:u.height}),q(t,Q),ye(l,Q)},initCanvas:function(){var t=this.containerData,n=this.imageData,s=this.options.viewMode,l=Math.abs(n.rotate)%180===90,i=l?n.naturalHeight:n.naturalWidth,c=l?n.naturalWidth:n.naturalHeight,u=i/c,y=t.width,g=t.height;t.height*u>t.width?s===3?y=t.height*u:g=t.width/u:s===3?g=t.width/u:y=t.height*u;var m={aspectRatio:u,naturalWidth:i,naturalHeight:c,width:y,height:g};this.canvasData=m,this.limited=s===1||s===2,this.limitCanvas(!0,!0),m.width=Math.min(Math.max(m.width,m.minWidth),m.maxWidth),m.height=Math.min(Math.max(m.height,m.minHeight),m.maxHeight),m.left=(t.width-m.width)/2,m.top=(t.height-m.height)/2,m.oldLeft=m.left,m.oldTop=m.top,this.initialCanvasData=U({},m)},limitCanvas:function(t,n){var s=this.options,l=this.containerData,i=this.canvasData,c=this.cropBoxData,u=s.viewMode,y=i.aspectRatio,g=this.cropped&&c;if(t){var m=Number(s.minCanvasWidth)||0,b=Number(s.minCanvasHeight)||0;u>1?(m=Math.max(m,l.width),b=Math.max(b,l.height),u===3&&(b*y>m?m=b*y:b=m/y)):u>0&&(m?m=Math.max(m,g?c.width:0):b?b=Math.max(b,g?c.height:0):g&&(m=c.width,b=c.height,b*y>m?m=b*y:b=m/y));var S=Ee({aspectRatio:y,width:m,height:b});m=S.width,b=S.height,i.minWidth=m,i.minHeight=b,i.maxWidth=1/0,i.maxHeight=1/0}if(n)if(u>(g?0:1)){var x=l.width-i.width,k=l.height-i.height;i.minLeft=Math.min(0,x),i.minTop=Math.min(0,k),i.maxLeft=Math.max(0,x),i.maxTop=Math.max(0,k),g&&this.limited&&(i.minLeft=Math.min(c.left,c.left+(c.width-i.width)),i.minTop=Math.min(c.top,c.top+(c.height-i.height)),i.maxLeft=c.left,i.maxTop=c.top,u===2&&(i.width>=l.width&&(i.minLeft=Math.min(0,x),i.maxLeft=Math.max(0,x)),i.height>=l.height&&(i.minTop=Math.min(0,k),i.maxTop=Math.max(0,k))))}else i.minLeft=-i.width,i.minTop=-i.height,i.maxLeft=l.width,i.maxTop=l.height},renderCanvas:function(t,n){var s=this.canvasData,l=this.imageData;if(n){var i=ll({width:l.naturalWidth*Math.abs(l.scaleX||1),height:l.naturalHeight*Math.abs(l.scaleY||1),degree:l.rotate||0}),c=i.width,u=i.height,y=s.width*(c/s.naturalWidth),g=s.height*(u/s.naturalHeight);s.left-=(y-s.width)/2,s.top-=(g-s.height)/2,s.width=y,s.height=g,s.aspectRatio=c/u,s.naturalWidth=c,s.naturalHeight=u,this.limitCanvas(!0,!1)}(s.width>s.maxWidth||s.widths.maxHeight||s.heightn.width?i.height=i.width/s:i.width=i.height*s),this.cropBoxData=i,this.limitCropBox(!0,!0),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),i.width=Math.max(i.minWidth,i.width*l),i.height=Math.max(i.minHeight,i.height*l),i.left=n.left+(n.width-i.width)/2,i.top=n.top+(n.height-i.height)/2,i.oldLeft=i.left,i.oldTop=i.top,this.initialCropBoxData=U({},i)},limitCropBox:function(t,n){var s=this.options,l=this.containerData,i=this.canvasData,c=this.cropBoxData,u=this.limited,y=s.aspectRatio;if(t){var g=Number(s.minCropBoxWidth)||0,m=Number(s.minCropBoxHeight)||0,b=u?Math.min(l.width,i.width,i.width+i.left,l.width-i.left):l.width,S=u?Math.min(l.height,i.height,i.height+i.top,l.height-i.top):l.height;g=Math.min(g,l.width),m=Math.min(m,l.height),y&&(g&&m?m*y>g?m=g/y:g=m*y:g?m=g/y:m&&(g=m*y),S*y>b?S=b/y:b=S*y),c.minWidth=Math.min(g,b),c.minHeight=Math.min(m,S),c.maxWidth=b,c.maxHeight=S}n&&(u?(c.minLeft=Math.max(0,i.left),c.minTop=Math.max(0,i.top),c.maxLeft=Math.min(l.width,i.left+i.width)-c.width,c.maxTop=Math.min(l.height,i.top+i.height)-c.height):(c.minLeft=0,c.minTop=0,c.maxLeft=l.width-c.width,c.maxTop=l.height-c.height))},renderCropBox:function(){var t=this.options,n=this.containerData,s=this.cropBoxData;(s.width>s.maxWidth||s.widths.maxHeight||s.height=n.width&&s.height>=n.height?Rr:jt),De(this.cropBox,U({width:s.width,height:s.height},Je({translateX:s.left,translateY:s.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),Re(this.element,Ht,this.getData())}},yl={initPreview:function(){var t=this.element,n=this.crossOrigin,s=this.options.preview,l=n?this.crossOriginUrl:this.url,i=t.alt||"The image to preview",c=document.createElement("img");if(n&&(c.crossOrigin=n),c.src=l,c.alt=i,this.viewBox.appendChild(c),this.viewBoxImage=c,!!s){var u=s;typeof s=="string"?u=t.ownerDocument.querySelectorAll(s):s.querySelector&&(u=[s]),this.previews=u,K(u,function(y){var g=document.createElement("img");Ge(y,pt,{width:y.offsetWidth,height:y.offsetHeight,html:y.innerHTML}),n&&(g.crossOrigin=n),g.src=l,g.alt=i,g.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',y.innerHTML="",y.appendChild(g)})}},resetPreview:function(){K(this.previews,function(t){var n=Zt(t,pt);De(t,{width:n.width,height:n.height}),t.innerHTML=n.html,ol(t,pt)})},preview:function(){var t=this.imageData,n=this.canvasData,s=this.cropBoxData,l=s.width,i=s.height,c=t.width,u=t.height,y=s.left-n.left-t.left,g=s.top-n.top-t.top;!this.cropped||this.disabled||(De(this.viewBoxImage,U({width:c,height:u},Je(U({translateX:-y,translateY:-g},t)))),K(this.previews,function(m){var b=Zt(m,pt),S=b.width,x=b.height,k=S,N=x,C=1;l&&(C=S/l,N=i*C),i&&N>x&&(C=x/i,k=l*C,N=x),De(m,{width:k,height:N}),De(m.getElementsByTagName("img")[0],U({width:c*C,height:u*C},Je(U({translateX:-y*C,translateY:-g*C},t))))}))}},bl={bind:function(){var t=this.element,n=this.options,s=this.cropper;ee(n.cropstart)&&se(t,Kt,n.cropstart),ee(n.cropmove)&&se(t,Ut,n.cropmove),ee(n.cropend)&&se(t,Ft,n.cropend),ee(n.crop)&&se(t,Ht,n.crop),ee(n.zoom)&&se(t,Yt,n.zoom),se(s,Xr,this.onCropStart=this.cropStart.bind(this)),n.zoomable&&n.zoomOnWheel&&se(s,Qr,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),n.toggleDragModeOnDblclick&&se(s,Wr,this.onDblclick=this.dblclick.bind(this)),se(t.ownerDocument,Zr,this.onCropMove=this.cropMove.bind(this)),se(t.ownerDocument,qr,this.onCropEnd=this.cropEnd.bind(this)),n.responsive&&se(window,Jr,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,n=this.options,s=this.cropper;ee(n.cropstart)&&ce(t,Kt,n.cropstart),ee(n.cropmove)&&ce(t,Ut,n.cropmove),ee(n.cropend)&&ce(t,Ft,n.cropend),ee(n.crop)&&ce(t,Ht,n.crop),ee(n.zoom)&&ce(t,Yt,n.zoom),ce(s,Xr,this.onCropStart),n.zoomable&&n.zoomOnWheel&&ce(s,Qr,this.onWheel,{passive:!1,capture:!0}),n.toggleDragModeOnDblclick&&ce(s,Wr,this.onDblclick),ce(t.ownerDocument,Zr,this.onCropMove),ce(t.ownerDocument,qr,this.onCropEnd),n.responsive&&ce(window,Jr,this.onResize)}},vl={resize:function(){if(!this.disabled){var t=this.options,n=this.container,s=this.containerData,l=n.offsetWidth/s.width,i=n.offsetHeight/s.height,c=Math.abs(l-1)>Math.abs(i-1)?l:i;if(c!==1){var u,y;t.restore&&(u=this.getCanvasData(),y=this.getCropBoxData()),this.render(),t.restore&&(this.setCanvasData(K(u,function(g,m){u[m]=g*c})),this.setCropBoxData(K(y,function(g,m){y[m]=g*c})))}}},dblclick:function(){this.disabled||this.options.dragMode===Yr||this.setDragMode(rl(this.dragBox,Pt)?Kr:Rt)},wheel:function(t){var n=this,s=Number(this.options.wheelZoomRatio)||.1,l=1;this.disabled||(t.preventDefault(),!this.wheeling&&(this.wheeling=!0,setTimeout(function(){n.wheeling=!1},50),t.deltaY?l=t.deltaY>0?1:-1:t.wheelDelta?l=-t.wheelDelta/120:t.detail&&(l=t.detail>0?1:-1),this.zoom(-l*s,t)))},cropStart:function(t){var n=t.buttons,s=t.button;if(!(this.disabled||(t.type==="mousedown"||t.type==="pointerdown"&&t.pointerType==="mouse")&&(P(n)&&n!==1||P(s)&&s!==0||t.ctrlKey))){var l=this.options,i=this.pointers,c;t.changedTouches?K(t.changedTouches,function(u){i[u.identifier]=gt(u)}):i[t.pointerId||0]=gt(t),Object.keys(i).length>1&&l.zoomable&&l.zoomOnTouch?c=Hr:c=Zt(t.target,qe),Ya.test(c)&&Re(this.element,Kt,{originalEvent:t,action:c})!==!1&&(t.preventDefault(),this.action=c,this.cropping=!1,c===zr&&(this.cropping=!0,q(this.dragBox,mt)))}},cropMove:function(t){var n=this.action;if(!(this.disabled||!n)){var s=this.pointers;t.preventDefault(),Re(this.element,Ut,{originalEvent:t,action:n})!==!1&&(t.changedTouches?K(t.changedTouches,function(l){U(s[l.identifier]||{},gt(l,!0))}):U(s[t.pointerId||0]||{},gt(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var n=this.action,s=this.pointers;t.changedTouches?K(t.changedTouches,function(l){delete s[l.identifier]}):delete s[t.pointerId||0],n&&(t.preventDefault(),Object.keys(s).length||(this.action=""),this.cropping&&(this.cropping=!1,ze(this.dragBox,mt,this.cropped&&this.options.modal)),Re(this.element,Ft,{originalEvent:t,action:n}))}}},Sl={change:function(t){var n=this.options,s=this.canvasData,l=this.containerData,i=this.cropBoxData,c=this.pointers,u=this.action,y=n.aspectRatio,g=i.left,m=i.top,b=i.width,S=i.height,x=g+b,k=m+S,N=0,C=0,A=l.width,T=l.height,V=!0,j;!y&&t.shiftKey&&(y=b&&S?b/S:1),this.limited&&(N=i.minLeft,C=i.minTop,A=N+Math.min(l.width,s.width,s.left+s.width),T=C+Math.min(l.height,s.height,s.top+s.height));var I=c[Object.keys(c)[0]],D={x:I.endX-I.startX,y:I.endY-I.startY},B=function(W){switch(W){case Me:x+D.x>A&&(D.x=A-x);break;case Be:g+D.xT&&(D.y=T-k);break}};switch(u){case jt:g+=D.x,m+=D.y;break;case Me:if(D.x>=0&&(x>=A||y&&(m<=C||k>=T))){V=!1;break}B(Me),b+=D.x,b<0&&(u=Be,b=-b,g-=b),y&&(S=b/y,m+=(i.height-S)/2);break;case xe:if(D.y<=0&&(m<=C||y&&(g<=N||x>=A))){V=!1;break}B(xe),S-=D.y,m+=D.y,S<0&&(u=Oe,S=-S,m-=S),y&&(b=S*y,g+=(i.width-b)/2);break;case Be:if(D.x<=0&&(g<=N||y&&(m<=C||k>=T))){V=!1;break}B(Be),b-=D.x,g+=D.x,b<0&&(u=Me,b=-b,g-=b),y&&(S=b/y,m+=(i.height-S)/2);break;case Oe:if(D.y>=0&&(k>=T||y&&(g<=N||x>=A))){V=!1;break}B(Oe),S+=D.y,S<0&&(u=xe,S=-S,m-=S),y&&(b=S*y,g+=(i.width-b)/2);break;case Ye:if(y){if(D.y<=0&&(m<=C||x>=A)){V=!1;break}B(xe),S-=D.y,m+=D.y,b=S*y}else B(xe),B(Me),D.x>=0?xC&&(S-=D.y,m+=D.y):(S-=D.y,m+=D.y);b<0&&S<0?(u=Ze,S=-S,b=-b,m-=S,g-=b):b<0?(u=We,b=-b,g-=b):S<0&&(u=Xe,S=-S,m-=S);break;case We:if(y){if(D.y<=0&&(m<=C||g<=N)){V=!1;break}B(xe),S-=D.y,m+=D.y,b=S*y,g+=i.width-b}else B(xe),B(Be),D.x<=0?g>N?(b-=D.x,g+=D.x):D.y<=0&&m<=C&&(V=!1):(b-=D.x,g+=D.x),D.y<=0?m>C&&(S-=D.y,m+=D.y):(S-=D.y,m+=D.y);b<0&&S<0?(u=Xe,S=-S,b=-b,m-=S,g-=b):b<0?(u=Ye,b=-b,g-=b):S<0&&(u=Ze,S=-S,m-=S);break;case Ze:if(y){if(D.x<=0&&(g<=N||k>=T)){V=!1;break}B(Be),b-=D.x,g+=D.x,S=b/y}else B(Oe),B(Be),D.x<=0?g>N?(b-=D.x,g+=D.x):D.y>=0&&k>=T&&(V=!1):(b-=D.x,g+=D.x),D.y>=0?k=0&&(x>=A||k>=T)){V=!1;break}B(Me),b+=D.x,S=b/y}else B(Oe),B(Me),D.x>=0?x=0&&k>=T&&(V=!1):b+=D.x,D.y>=0?k0?u=D.y>0?Xe:Ye:D.x<0&&(g-=b,u=D.y>0?Ze:We),D.y<0&&(m-=S),this.cropped||(ye(this.cropBox,Q),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}V&&(i.width=b,i.height=S,i.left=g,i.top=m,this.action=u,this.renderCropBox()),K(c,function(H){H.startX=H.endX,H.startY=H.endY})}},_l={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&q(this.dragBox,mt),ye(this.cropBox,Q),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=U({},this.initialImageData),this.canvasData=U({},this.initialCanvasData),this.cropBoxData=U({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(U(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),ye(this.dragBox,mt),q(this.cropBox,Q)),this},replace:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!this.disabled&&t&&(this.isImg&&(this.element.src=t),n?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,K(this.previews,function(s){s.getElementsByTagName("img")[0].src=t}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,ye(this.cropper,Fr)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,q(this.cropper,Fr)),this},destroy:function(){var t=this.element;return t[F]?(t[F]=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,s=this.canvasData,l=s.left,i=s.top;return this.moveTo(Wt(t)?t:l+Number(t),Wt(n)?n:i+Number(n))},moveTo:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,s=this.canvasData,l=!1;return t=Number(t),n=Number(n),this.ready&&!this.disabled&&this.options.movable&&(P(t)&&(s.left=t,l=!0),P(n)&&(s.top=n,l=!0),l&&this.renderCanvas(!0)),this},zoom:function(t,n){var s=this.canvasData;return t=Number(t),t<0?t=1/(1-t):t=1+t,this.zoomTo(s.width*t/s.naturalWidth,null,n)},zoomTo:function(t,n,s){var l=this.options,i=this.canvasData,c=i.width,u=i.height,y=i.naturalWidth,g=i.naturalHeight;if(t=Number(t),t>=0&&this.ready&&!this.disabled&&l.zoomable){var m=y*t,b=g*t;if(Re(this.element,Yt,{ratio:t,oldRatio:c/y,originalEvent:s})===!1)return this;if(s){var S=this.pointers,x=cn(this.cropper),k=S&&Object.keys(S).length?al(S):{pageX:s.pageX,pageY:s.pageY};i.left-=(m-c)*((k.pageX-x.left-i.left)/c),i.top-=(b-u)*((k.pageY-x.top-i.top)/u)}else je(n)&&P(n.x)&&P(n.y)?(i.left-=(m-c)*((n.x-i.left)/c),i.top-=(b-u)*((n.y-i.top)/u)):(i.left-=(m-c)/2,i.top-=(b-u)/2);i.width=m,i.height=b,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return t=Number(t),P(t)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var n=this.imageData.scaleY;return this.scale(t,P(n)?n:1)},scaleY:function(t){var n=this.imageData.scaleX;return this.scale(P(n)?n:1,t)},scale:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,s=this.imageData,l=!1;return t=Number(t),n=Number(n),this.ready&&!this.disabled&&this.options.scalable&&(P(t)&&(s.scaleX=t,l=!0),P(n)&&(s.scaleY=n,l=!0),l&&this.renderCanvas(!0,!0)),this},getData:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,n=this.options,s=this.imageData,l=this.canvasData,i=this.cropBoxData,c;if(this.ready&&this.cropped){c={x:i.left-l.left,y:i.top-l.top,width:i.width,height:i.height};var u=s.width/s.naturalWidth;if(K(c,function(m,b){c[b]=m/u}),t){var y=Math.round(c.y+c.height),g=Math.round(c.x+c.width);c.x=Math.round(c.x),c.y=Math.round(c.y),c.width=g-c.x,c.height=y-c.y}}else c={x:0,y:0,width:0,height:0};return n.rotatable&&(c.rotate=s.rotate||0),n.scalable&&(c.scaleX=s.scaleX||1,c.scaleY=s.scaleY||1),c},setData:function(t){var n=this.options,s=this.imageData,l=this.canvasData,i={};if(this.ready&&!this.disabled&&je(t)){var c=!1;n.rotatable&&P(t.rotate)&&t.rotate!==s.rotate&&(s.rotate=t.rotate,c=!0),n.scalable&&(P(t.scaleX)&&t.scaleX!==s.scaleX&&(s.scaleX=t.scaleX,c=!0),P(t.scaleY)&&t.scaleY!==s.scaleY&&(s.scaleY=t.scaleY,c=!0)),c&&this.renderCanvas(!0,!0);var u=s.width/s.naturalWidth;P(t.x)&&(i.left=t.x*u+l.left),P(t.y)&&(i.top=t.y*u+l.top),P(t.width)&&(i.width=t.width*u),P(t.height)&&(i.height=t.height*u),this.setCropBoxData(i)}return this},getContainerData:function(){return this.ready?U({},this.containerData):{}},getImageData:function(){return this.sized?U({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,n={};return this.ready&&K(["left","top","width","height","naturalWidth","naturalHeight"],function(s){n[s]=t[s]}),n},setCanvasData:function(t){var n=this.canvasData,s=n.aspectRatio;return this.ready&&!this.disabled&&je(t)&&(P(t.left)&&(n.left=t.left),P(t.top)&&(n.top=t.top),P(t.width)?(n.width=t.width,n.height=t.width/s):P(t.height)&&(n.height=t.height,n.width=t.height*s),this.renderCanvas(!0)),this},getCropBoxData:function(){var t=this.cropBoxData,n;return this.ready&&this.cropped&&(n={left:t.left,top:t.top,width:t.width,height:t.height}),n||{}},setCropBoxData:function(t){var n=this.cropBoxData,s=this.options.aspectRatio,l,i;return this.ready&&this.cropped&&!this.disabled&&je(t)&&(P(t.left)&&(n.left=t.left),P(t.top)&&(n.top=t.top),P(t.width)&&t.width!==n.width&&(l=!0,n.width=t.width),P(t.height)&&t.height!==n.height&&(i=!0,n.height=t.height),s&&(l?n.height=n.width/s:i&&(n.width=n.height*s)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var n=this.canvasData,s=cl(this.image,this.imageData,n,t);if(!this.cropped)return s;var l=this.getData(),i=l.x,c=l.y,u=l.width,y=l.height,g=s.width/Math.floor(n.naturalWidth);g!==1&&(i*=g,c*=g,u*=g,y*=g);var m=u/y,b=Ee({aspectRatio:m,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),S=Ee({aspectRatio:m,width:t.minWidth||0,height:t.minHeight||0},"cover"),x=Ee({aspectRatio:m,width:t.width||(g!==1?s.width:u),height:t.height||(g!==1?s.height:y)}),k=x.width,N=x.height;k=Math.min(b.width,Math.max(S.width,k)),N=Math.min(b.height,Math.max(S.height,N));var C=document.createElement("canvas"),A=C.getContext("2d");C.width=Pe(k),C.height=Pe(N),A.fillStyle=t.fillColor||"transparent",A.fillRect(0,0,k,N);var T=t.imageSmoothingEnabled,V=T===void 0?!0:T,j=t.imageSmoothingQuality;A.imageSmoothingEnabled=V,j&&(A.imageSmoothingQuality=j);var I=s.width,D=s.height,B=i,H=c,W,Y,te,ie,ne,re;B<=-u||B>I?(B=0,W=0,te=0,ne=0):B<=0?(te=-B,B=0,W=Math.min(I,u+B),ne=W):B<=I&&(te=0,W=Math.min(u,I-B),ne=W),W<=0||H<=-y||H>D?(H=0,Y=0,ie=0,re=0):H<=0?(ie=-H,H=0,Y=Math.min(D,y+H),re=Y):H<=D&&(ie=0,Y=Math.min(y,D-H),re=Y);var E=[B,H,W,Y];if(ne>0&&re>0){var $=k/u;E.push(te*$,ie*$,ne*$,re*$)}return A.drawImage.apply(A,[s].concat(Pr(E.map(function(M){return Math.floor(Pe(M))})))),C},setAspectRatio:function(t){var n=this.options;return!this.disabled&&!Wt(t)&&(n.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var n=this.options,s=this.dragBox,l=this.face;if(this.ready&&!this.disabled){var i=t===Rt,c=n.movable&&t===Kr;t=i||c?t:Yr,n.dragMode=t,Ge(s,qe,t),ze(s,Pt,i),ze(s,zt,c),n.cropBoxMovable||(Ge(l,qe,t),ze(l,Pt,i),ze(l,zt,c))}return this}},wl=ge.Cropper,fn=function(){function r(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(La(this,r),!t||!Za.test(t.tagName))throw new Error("The first argument is required and must be an or element.");this.element=t,this.options=U({},nn,je(n)&&n),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return Ia(r,[{key:"init",value:function(){var n=this.element,s=n.tagName.toLowerCase(),l;if(!n[F]){if(n[F]=this,s==="img"){if(this.isImg=!0,l=n.getAttribute("src")||"",this.originalUrl=l,!l)return;l=n.src}else s==="canvas"&&window.HTMLCanvasElement&&(l=n.toDataURL());this.load(l)}}},{key:"load",value:function(n){var s=this;if(n){this.url=n,this.imageData={};var l=this.element,i=this.options;if(!i.rotatable&&!i.scalable&&(i.checkOrientation=!1),!i.checkOrientation||!window.ArrayBuffer){this.clone();return}if(Wa.test(n)){Xa.test(n)?this.read(ul(n)):this.clone();return}var c=new XMLHttpRequest,u=this.clone.bind(this);this.reloading=!0,this.xhr=c,c.onabort=u,c.onerror=u,c.ontimeout=u,c.onprogress=function(){c.getResponseHeader("content-type")!==en&&c.abort()},c.onload=function(){s.read(c.response)},c.onloadend=function(){s.reloading=!1,s.xhr=null},i.checkCrossOrigin&&dn(n)&&l.crossOrigin&&(n=hn(n)),c.open("GET",n,!0),c.responseType="arraybuffer",c.withCredentials=l.crossOrigin==="use-credentials",c.send()}}},{key:"read",value:function(n){var s=this.options,l=this.imageData,i=ml(n),c=0,u=1,y=1;if(i>1){this.url=fl(n,en);var g=pl(i);c=g.rotate,u=g.scaleX,y=g.scaleY}s.rotatable&&(l.rotate=c),s.scalable&&(l.scaleX=u,l.scaleY=y),this.clone()}},{key:"clone",value:function(){var n=this.element,s=this.url,l=n.crossOrigin,i=s;this.options.checkCrossOrigin&&dn(s)&&(l||(l="anonymous"),i=hn(s)),this.crossOrigin=l,this.crossOriginUrl=i;var c=document.createElement("img");l&&(c.crossOrigin=l),c.src=i||s,c.alt=n.alt||"The image to crop",this.image=c,c.onload=this.start.bind(this),c.onerror=this.stop.bind(this),q(c,Ur),n.parentNode.insertBefore(c,n.nextSibling)}},{key:"start",value:function(){var n=this,s=this.image;s.onload=null,s.onerror=null,this.sizing=!0;var l=ge.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(ge.navigator.userAgent),i=function(g,m){U(n.imageData,{naturalWidth:g,naturalHeight:m,aspectRatio:g/m}),n.initialImageData=U({},n.imageData),n.sizing=!1,n.sized=!0,n.build()};if(s.naturalWidth&&!l){i(s.naturalWidth,s.naturalHeight);return}var c=document.createElement("img"),u=document.body||document.documentElement;this.sizingImage=c,c.onload=function(){i(c.width,c.height),l||u.removeChild(c)},c.src=s.src,l||(c.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",u.appendChild(c))}},{key:"stop",value:function(){var n=this.image;n.onload=null,n.onerror=null,n.parentNode.removeChild(n),this.image=null}},{key:"build",value:function(){if(!(!this.sized||this.ready)){var n=this.element,s=this.options,l=this.image,i=n.parentNode,c=document.createElement("div");c.innerHTML=qa;var u=c.querySelector(".".concat(F,"-container")),y=u.querySelector(".".concat(F,"-canvas")),g=u.querySelector(".".concat(F,"-drag-box")),m=u.querySelector(".".concat(F,"-crop-box")),b=m.querySelector(".".concat(F,"-face"));this.container=i,this.cropper=u,this.canvas=y,this.dragBox=g,this.cropBox=m,this.viewBox=u.querySelector(".".concat(F,"-view-box")),this.face=b,y.appendChild(l),q(n,Q),i.insertBefore(u,n.nextSibling),ye(l,Ur),this.initPreview(),this.bind(),s.initialAspectRatio=Math.max(0,s.initialAspectRatio)||NaN,s.aspectRatio=Math.max(0,s.aspectRatio)||NaN,s.viewMode=Math.max(0,Math.min(3,Math.round(s.viewMode)))||0,q(m,Q),s.guides||q(m.getElementsByClassName("".concat(F,"-dashed")),Q),s.center||q(m.getElementsByClassName("".concat(F,"-center")),Q),s.background&&q(u,"".concat(F,"-bg")),s.highlight||q(b,Ha),s.cropBoxMovable&&(q(b,zt),Ge(b,qe,jt)),s.cropBoxResizable||(q(m.getElementsByClassName("".concat(F,"-line")),Q),q(m.getElementsByClassName("".concat(F,"-point")),Q)),this.render(),this.ready=!0,this.setDragMode(s.dragMode),s.autoCrop&&this.crop(),this.setData(s.data),ee(s.ready)&&se(n,Gr,s.ready,{once:!0}),Re(n,Gr)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var n=this.cropper.parentNode;n&&n.removeChild(this.cropper),ye(this.element,Q)}}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],[{key:"noConflict",value:function(){return window.Cropper=wl,r}},{key:"setDefaults",value:function(n){U(nn,je(n)&&n)}}]),r}();U(fn.prototype,gl,yl,bl,vl,Sl,_l);const kl={class:"flex"},xl=["aria-label"],Dl={class:"ml-auto mb-2"},El={class:"w-full flex justify-center"},Nl=["src"],Cl={__name:"Image",props:{selection:Object},emits:["load"],setup(r,{emit:t}){const n=r,{t:s}=e.inject("i18n"),{apiUrl:l}=ue(),i=e.ref(null),c=e.ref(null),u=e.ref(!1),y=e.ref(""),g=e.ref(!1),m=()=>{u.value=!u.value,u.value?c.value=new fn(i.value,{crop(x){}}):c.value.destroy()},b=e.inject("postData"),S=()=>{c.value.getCroppedCanvas({width:795,height:341}).toBlob(x=>{y.value="",g.value=!1,it(l.value,{method:"POST",params:Object.assign(b,{q:"upload",adapter:n.selection.adapter,path:n.selection.item.path,file:x}),name:n.selection.item.basename,json:!1}).then(k=>{y.value=s("Updated."),i.value.src=_t(n.selection.adapter,n.selection.item.path),m(),t("load")}).catch(k=>{y.value=s(k.message),g.value=!0})})};return e.onMounted(()=>{t("load")}),(x,k)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",kl,[e.createElementVNode("h3",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title","aria-label":r.selection.item.path,"data-microtip-position":"bottom-right",role:"tooltip"},e.toDisplayString(r.selection.item.basename),9,xl),e.createElementVNode("div",Dl,[u.value?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:S,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(s)("Crop")),1)):e.createCommentVNode("",!0),e.createElementVNode("button",{class:"ml-1 px-2 py-1 text-blue-500",onClick:k[0]||(k[0]=N=>m())},e.toDisplayString(u.value?e.unref(s)("Cancel"):e.unref(s)("Edit")),1)])]),e.createElementVNode("div",El,[e.createElementVNode("img",{ref_key:"image",ref:i,class:"max-w-[50vh] max-h-[50vh]",src:e.unref(_t)(n.selection.adapter,n.selection.item.path),alt:""},null,8,Nl)]),y.value.length?(e.openBlock(),e.createBlock(pe,{key:0,onHidden:k[1]||(k[1]=N=>y.value=""),error:g.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.value),1)]),_:1},8,["error"])):e.createCommentVNode("",!0)],64))}},Vl={class:"flex"},Ml=["aria-label"],Bl=e.createElementVNode("div",null,null,-1),$l={__name:"Default",props:{selection:Object},emits:["load"],setup(r,{emit:t}){return e.onMounted(()=>{t("load")}),(n,s)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Vl,[e.createElementVNode("h3",{class:"mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title","aria-label":r.selection.item.path,"data-microtip-position":"bottom-right",role:"tooltip"},e.toDisplayString(r.selection.item.basename),9,Ml)]),Bl],64))}},Tl=["aria-label"],Al={class:"w-full",preload:"",controls:""},Ll=["src"],Il={__name:"Video",props:{selection:Object},emits:["load"],setup(r,{emit:t}){const n=r,{apiUrl:s}=ue(),l=()=>s.value+"?"+Ne({q:"preview",adapter:n.selection.adapter,path:n.selection.item.path});return e.onMounted(()=>{t("load")}),(i,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":r.selection.item.path,"data-microtip-position":"bottom-right",role:"tooltip"},e.toDisplayString(r.selection.item.basename),9,Tl),e.createElementVNode("div",null,[e.createElementVNode("video",Al,[e.createElementVNode("source",{src:l(),type:"video/mp4"},null,8,Ll),e.createTextVNode(" Your browser does not support the video tag. ")])])],64))}},Ol=["aria-label"],jl={class:"w-full",controls:""},Pl=["src"],zl={__name:"Audio",props:{selection:Object},emits:["load"],setup(r,{emit:t}){const n=r,{apiUrl:s}=ue(),l=()=>s.value+"?"+Ne({q:"preview",adapter:n.selection.adapter,path:n.selection.item.path});return e.onMounted(()=>{t("load")}),(i,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":r.selection.item.path,"data-microtip-position":"bottom-right",role:"tooltip"},e.toDisplayString(r.selection.item.basename),9,Ol),e.createElementVNode("div",null,[e.createElementVNode("audio",jl,[e.createElementVNode("source",{src:l(),type:"audio/mpeg"},null,8,Pl),e.createTextVNode(" Your browser does not support the audio element. ")])])],64))}},Rl=["aria-label"],Hl=["data"],Fl=["src"],Ul={__name:"Pdf",props:{selection:Object},emits:["load"],setup(r,{emit:t}){const n=r,{apiUrl:s}=ue(),l=()=>s.value+"?"+Ne({q:"preview",adapter:n.selection.adapter,path:n.selection.item.path});return e.onMounted(()=>{t("load")}),(i,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":r.selection.item.path,"data-microtip-position":"bottom-right",role:"tooltip"},e.toDisplayString(r.selection.item.basename),9,Rl),e.createElementVNode("div",null,[e.createElementVNode("object",{class:"h-[60vh]",data:l(),type:"application/pdf",width:"100%",height:"100%"},[e.createElementVNode("iframe",{class:"border-0",src:l(),width:"100%",height:"100%"},`

Your browser does not support PDFs. Download the PDF .

- `,8,rc)],8,tc)])],64))}},nc={class:"sm:flex sm:items-start"},ac={class:"mt-3 text-center sm:mt-0 sm:text-left w-full"},ic={class:"text-gray-700 dark:text-gray-200 text-sm"},sc={key:0,class:"flex leading-5"},lc=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),cc={class:"py-2 flex font-normal break-all dark:text-gray-200 rounded text-xs"},dc={class:"font-bold pl-2"},hc={class:"font-bold pl-2"},uc=Object.assign({name:"VFModalPreview"},{props:{selection:Object},setup(r){const t=r,{apiUrl:o}=he(),n=e.inject("emitter"),{t:s}=e.inject("i18n"),a=e.ref(!1),l=f=>a.value=f,m=f=>{var u;return((u=t.selection.item.mime_type)!=null?u:"").startsWith(f)},p=()=>{const f=o.value+"?"+De({q:"download",adapter:t.selection.adapter,path:t.selection.item.path});n.emit("vf-download",f)};return(f,u)=>(e.openBlock(),e.createBlock(fe,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:u[6]||(u[6]=g=>e.unref(n).emit("vf-modal-close")),class:"mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:focus:ring-gray-400 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(s)("Close")),1),e.createElementVNode("button",{type:"button",onClick:u[7]||(u[7]=g=>p()),class:"mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:focus:ring-gray-400 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(s)("Download")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",nc,[e.createElementVNode("div",ac,[e.createElementVNode("div",null,[m("text")?(e.openBlock(),e.createBlock(Ws,{key:0,selection:r.selection,onLoad:u[0]||(u[0]=g=>l(!0))},null,8,["selection"])):m("image")?(e.openBlock(),e.createBlock(Rl,{key:1,selection:r.selection,onLoad:u[1]||(u[1]=g=>l(!0))},null,8,["selection"])):m("video")?(e.openBlock(),e.createBlock(ql,{key:2,selection:r.selection,onLoad:u[2]||(u[2]=g=>l(!0))},null,8,["selection"])):m("audio")?(e.openBlock(),e.createBlock(Ql,{key:3,selection:r.selection,onLoad:u[3]||(u[3]=g=>l(!0))},null,8,["selection"])):m("application/pdf")?(e.openBlock(),e.createBlock(oc,{key:4,selection:r.selection,onLoad:u[4]||(u[4]=g=>l(!0))},null,8,["selection"])):(e.openBlock(),e.createBlock(Kl,{key:5,selection:r.selection,onLoad:u[5]||(u[5]=g=>l(!0))},null,8,["selection"]))]),e.createElementVNode("div",ic,[a.value==!1?(e.openBlock(),e.createElementBlock("div",sc,[lc,e.createElementVNode("span",null,e.toDisplayString(e.unref(s)("Loading")),1)])):e.createCommentVNode("",!0)])])]),e.createElementVNode("div",cc,[e.createElementVNode("div",null,[e.createElementVNode("span",dc,e.toDisplayString(e.unref(s)("File Size"))+": ",1),e.createTextVNode(e.toDisplayString(e.unref(Qt)(r.selection.item.file_size)),1)]),e.createElementVNode("div",null,[e.createElementVNode("span",hc,e.toDisplayString(e.unref(s)("Last Modified"))+": ",1),e.createTextVNode(" "+e.toDisplayString(e.unref(er)(r.selection.item.last_modified)),1)])])]),_:1}))}}),fc={class:"sm:flex sm:items-start"},mc=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),pc={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},gc={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},yc={class:"mt-2"},bc={class:"flex text-sm text-gray-800 dark:text-gray-400 py-2"},vc={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"},wc=[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)],kc={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"},_c=[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)],xc={class:"ml-1.5"},Sc=["onKeyup"],Dc=Object.assign({name:"VFModalRename"},{props:{selection:Object,current:Object},setup(r){const t=r,o=e.inject("emitter");e.inject("storage");const n=e.inject("adapter"),{t:s}=e.inject("i18n"),a=e.ref(t.selection.items[0]),l=e.ref(t.selection.items[0].basename),m=e.ref(""),p=()=>{l.value!=""&&o.emit("vf-fetch",{params:{q:"rename",adapter:n.value,path:t.current.dirname,item:a.value.path,name:l.value},onSuccess:()=>{o.emit("vf-toast-push",{label:s("%s is renamed.",l.value)})},onError:f=>{m.value=s(f.message)}})};return(f,u)=>(e.openBlock(),e.createBlock(fe,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:p,class:"w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 dark:bg-gray-700 dark:hover:bg-gray-600/75 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(s)("Rename")),1),e.createElementVNode("button",{type:"button",onClick:u[2]||(u[2]=g=>e.unref(o).emit("vf-modal-close")),class:"mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(s)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",fc,[mc,e.createElementVNode("div",pc,[e.createElementVNode("h3",gc,e.toDisplayString(e.unref(s)("Rename")),1),e.createElementVNode("div",yc,[e.createElementVNode("p",bc,[a.value.type=="dir"?(e.openBlock(),e.createElementBlock("svg",vc,wc)):(e.openBlock(),e.createElementBlock("svg",kc,_c)),e.createElementVNode("span",xc,e.toDisplayString(a.value.basename),1)]),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":u[0]||(u[0]=g=>l.value=g),onKeyup:e.withKeys(p,["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,40,Sc),[[e.vModelText,l.value]]),m.value.length?(e.openBlock(),e.createBlock(me,{key:0,onHidden:u[1]||(u[1]=g=>m.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}}),Ec={class:"sm:flex sm:items-start"},Nc=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),Cc={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},Vc={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},$c={class:"mt-2"},Mc={class:"text-gray-500 mb-1"},Bc=["id"],Tc={key:0,class:"py-2"},Ac=["disabled","onClick"],Oc=Object.assign({name:"VFModalUpload"},{props:{current:Object},setup(r){const t=r,o=e.inject("emitter"),{apiUrl:n}=he(),{t:s}=e.inject("i18n"),a=e.inject("maxFileSize"),l=e.ref(null),m=e.ref(null),p=e.ref(null),f=e.ref([]),u=e.ref(""),g=e.ref(!0),b=()=>{u.value="",l.value.start()},D=e.inject("postData");return e.onMounted(()=>{l.value=new Fe.default.Uploader({runtimes:"html5",browse_button:p.value,container:m.value,max_file_size:a,multiple_queues:!0,file_data_name:"file",url:n.value+"?"+De(Object.assign(D,{q:"upload",adapter:t.current.adapter,path:t.current.dirname})),headers:{...rt&&{"X-CSRF-Token":rt}},init:{PostInit:function(){},FilesAdded:function(_,E){g.value=!1,Fe.default.each(E,function(V){f.value.push({id:V.id,name:V.name,size:Fe.default.formatSize(V.size),percent:""})})},UploadProgress:function(_,E){f.value[f.value.findIndex(V=>V.id==E.id)].percent=E.percent+"%"},UploadComplete:function(){g.value=!0,o.emit("vf-fetch",{params:{q:"index",adapter:t.current.adapter,path:t.current.dirname}})},Error:function(_,E){l.value.stop(),E.code==Fe.default.HTTP_ERROR?u.value=s(JSON.parse(E.response).message):E.code==Fe.default.FILE_SIZE_ERROR?u.value=s("The selected file exceeds the maximum file size. You cannot upload files greater than %s",[a]):u.value=s(E.message)}}}),l.value.init()}),(_,E)=>(e.openBlock(),e.createBlock(fe,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{disabled:g.value,onClick:e.withModifiers(b,["prevent"]),type:"button",class:e.normalizeClass([g.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","w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 text-base font-medium text-white focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm"])},e.toDisplayString(e.unref(s)("Upload")),11,Ac),e.createElementVNode("button",{type:"button",onClick:E[1]||(E[1]=V=>e.unref(o).emit("vf-modal-close")),class:"mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(s)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",Ec,[Nc,e.createElementVNode("div",Cc,[e.createElementVNode("h3",Vc,e.toDisplayString(e.unref(s)("Upload files")),1),e.createElementVNode("div",$c,[e.createElementVNode("div",Mc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,V=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",{id:V.id},[e.createTextVNode(e.toDisplayString(V.name)+" ( "+e.toDisplayString(V.size)+") ",1),e.createElementVNode("b",null,e.toDisplayString(V.percent),1)],8,Bc)]))),256)),f.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Tc,e.toDisplayString(e.unref(s)("No files selected!")),1))]),e.createElementVNode("div",{class:"text-gray-500",ref_key:"container",ref:m},[e.createElementVNode("button",{ref_key:"pickFiles",ref:p,type:"button",class:"mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(s)("Select Files")),513)],512),u.value.length?(e.openBlock(),e.createBlock(me,{key:0,onHidden:E[0]||(E[0]=V=>u.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}}),Lc={class:"sm:flex sm:items-start"},Ic=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),jc={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},Pc={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},zc={class:"mt-2"},Rc={class:"flex text-sm text-gray-800 dark:text-gray-400"},Hc={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"},Fc=[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)],Uc={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"},Kc=[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)],Yc={class:"ml-1.5"},Wc=["onKeyup","placeholder"],Xc=Object.assign({name:"VFModalArchive"},{props:{selection:Object,current:Object},setup(r){const t=r,o=e.inject("emitter");e.inject("storage");const n=e.inject("adapter"),{t:s}=e.inject("i18n"),a=e.ref(""),l=e.ref(""),m=e.ref(t.selection.items),p=()=>{m.value.length&&o.emit("vf-fetch",{params:{q:"archive",adapter:n.value,path:t.current.dirname,items:JSON.stringify(m.value.map(({path:f,type:u})=>({path:f,type:u}))),name:a.value},onSuccess:()=>{o.emit("vf-toast-push",{label:s("The file(s) archived.")})},onError:f=>{l.value=s(f.message)}})};return(f,u)=>(e.openBlock(),e.createBlock(fe,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:p,class:"w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 dark:bg-gray-700 dark:hover:bg-gray-600/75 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(s)("Archive")),1),e.createElementVNode("button",{type:"button",onClick:u[2]||(u[2]=g=>e.unref(o).emit("vf-modal-close")),class:"mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(s)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",Lc,[Ic,e.createElementVNode("div",jc,[e.createElementVNode("h3",Pc,e.toDisplayString(e.unref(s)("Archive the files")),1),e.createElementVNode("div",zc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,g=>(e.openBlock(),e.createElementBlock("p",Rc,[g.type=="dir"?(e.openBlock(),e.createElementBlock("svg",Hc,Fc)):(e.openBlock(),e.createElementBlock("svg",Uc,Kc)),e.createElementVNode("span",Yc,e.toDisplayString(g.basename),1)]))),256)),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":u[0]||(u[0]=g=>a.value=g),onKeyup:e.withKeys(p,["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(s)("Archive name. (.zip file will be created)"),type:"text"},null,40,Wc),[[e.vModelText,a.value]]),l.value.length?(e.openBlock(),e.createBlock(me,{key:0,onHidden:u[1]||(u[1]=g=>l.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}}),qc={class:"sm:flex sm:items-start"},Gc=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),Jc={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},Zc={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},Qc={class:"mt-2"},ed={class:"flex text-sm text-gray-800 dark:text-gray-400"},td={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"},rd=[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)],od={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"},nd=[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)],ad={class:"ml-1.5"},id={class:"my-1 text-sm text-gray-500"},sd=Object.assign({name:"VFModalUnarchive"},{props:{selection:Object,current:Object},setup(r){const t=r,o=e.inject("emitter");e.inject("storage");const n=e.inject("adapter"),{t:s}=e.inject("i18n");e.ref("");const a=e.ref(t.selection.items[0]),l=e.ref(""),m=e.ref([]),p=()=>{o.emit("vf-fetch",{params:{q:"unarchive",adapter:n.value,path:t.current.dirname,item:a.value.path},onSuccess:()=>{o.emit("vf-toast-push",{label:s("The file unarchived.")})},onError:f=>{l.value=s(f.message)}})};return(f,u)=>(e.openBlock(),e.createBlock(fe,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:p,class:"w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 dark:bg-gray-700 dark:hover:bg-gray-600/75 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(s)("Unarchive")),1),e.createElementVNode("button",{type:"button",onClick:u[1]||(u[1]=g=>e.unref(o).emit("vf-modal-close")),class:"mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(s)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",qc,[Gc,e.createElementVNode("div",Jc,[e.createElementVNode("h3",Zc,e.toDisplayString(e.unref(s)("Unarchive")),1),e.createElementVNode("div",Qc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,g=>(e.openBlock(),e.createElementBlock("p",ed,[g.type=="dir"?(e.openBlock(),e.createElementBlock("svg",td,rd)):(e.openBlock(),e.createElementBlock("svg",od,nd)),e.createElementVNode("span",ad,e.toDisplayString(g.basename),1)]))),256)),e.createElementVNode("p",id,e.toDisplayString(e.unref(s)("The archive will be unarchived at"))+" ("+e.toDisplayString(r.current.dirname)+")",1),l.value.length?(e.openBlock(),e.createBlock(me,{key:0,onHidden:u[0]||(u[0]=g=>l.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}}),ld={class:"sm:flex sm:items-start"},cd=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),dd={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},hd={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},ud={class:"mt-2"},fd={class:"flex text-sm text-gray-800 dark:text-gray-400"},md={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"},pd=[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)],gd={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"},yd=[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)],bd={class:"ml-1.5"},vd={class:"text-sm text-gray-500 pb-1 pt-3"},wd={class:"flex text-sm text-gray-800 dark:text-gray-400"},kd=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})],-1),_d={class:"ml-1.5 overflow-auto"},Wt={VueFinder:Ji,...Object.freeze(Object.defineProperty({__proto__:null,ModalDelete:bs,ModalMessage:Ds,ModalNewFolder:Ts,ModalNewFile:Rs,ModalPreview:uc,ModalRename:Dc,ModalUpload:Oc,ModalArchive:Xc,ModalUnarchive:sd,ModalMove:Object.assign({name:"VFModalMove"},{props:{selection:Object,current:Object},setup(r){const t=r,o=e.inject("emitter"),{t:n}=e.inject("i18n");e.inject("storage");const s=e.inject("adapter"),a=e.ref(t.selection.items.from),l=e.ref(""),m=()=>{a.value.length&&o.emit("vf-fetch",{params:{q:"move",adapter:s.value,path:t.current.dirname,items:JSON.stringify(a.value.map(({path:p,type:f})=>({path:p,type:f}))),item:t.selection.items.to.path},onSuccess:()=>{o.emit("vf-toast-push",{label:n("Files moved.",t.selection.items.to.name)})},onError:p=>{l.value=n(p.message)}})};return(p,f)=>(e.openBlock(),e.createBlock(fe,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:m,class:"w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 dark:bg-gray-700 dark:hover:bg-gray-600/75 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(n)("Yes, Move!")),1),e.createElementVNode("button",{type:"button",onClick:f[1]||(f[1]=u=>e.unref(o).emit("vf-modal-close")),class:"mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(n)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",ld,[cd,e.createElementVNode("div",dd,[e.createElementVNode("h3",hd,e.toDisplayString(e.unref(n)("Move files")),1),e.createElementVNode("div",ud,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,u=>(e.openBlock(),e.createElementBlock("p",fd,[u.type=="dir"?(e.openBlock(),e.createElementBlock("svg",md,pd)):(e.openBlock(),e.createElementBlock("svg",gd,yd)),e.createElementVNode("span",bd,e.toDisplayString(u.path),1)]))),256)),e.createElementVNode("p",vd,e.toDisplayString(e.unref(n)("Are you sure you want to move these files?")),1),e.createElementVNode("p",wd,[kd,e.createElementVNode("span",_d,e.toDisplayString(r.selection.items.to.path),1)]),l.value.length?(e.openBlock(),e.createBlock(me,{key:0,onHidden:f[0]||(f[0]=u=>l.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}})},Symbol.toStringTag,{value:"Module"}))},Du="",Eu="",xd={install(r){for(const t in Wt)if(Wt.hasOwnProperty(t)){const o=Wt[t];r.component(o.name,o)}}},Sd=Object.freeze(Object.defineProperty({__proto__:null,default:`{ + `,8,Fl)],8,Hl)])],64))}},Kl={class:"sm:flex sm:items-start"},Yl={class:"mt-3 text-center sm:mt-0 sm:text-left w-full"},Wl={class:"text-gray-700 dark:text-gray-200 text-sm"},Xl={key:0,class:"flex leading-5"},Zl=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),ql={class:"py-2 flex font-normal break-all dark:text-gray-200 rounded text-xs"},Gl={class:"font-bold pl-2"},Jl={class:"font-bold pl-2"},Ql=Object.assign({name:"VFModalPreview"},{props:{selection:Object},setup(r){const t=r,{apiUrl:n}=ue(),s=e.inject("emitter"),{t:l}=e.inject("i18n"),i=e.ref(!1),c=g=>i.value=g,u=g=>(t.selection.item.mime_type??"").startsWith(g),y=()=>{const g=n.value+"?"+Ne({q:"download",adapter:t.selection.adapter,path:t.selection.item.path});s.emit("vf-download",g)};return(g,m)=>(e.openBlock(),e.createBlock(me,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:m[6]||(m[6]=b=>e.unref(s).emit("vf-modal-close")),class:"mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:focus:ring-gray-400 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(l)("Close")),1),e.createElementVNode("button",{type:"button",onClick:m[7]||(m[7]=b=>y()),class:"mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:focus:ring-gray-400 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(l)("Download")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",Kl,[e.createElementVNode("div",Yl,[e.createElementVNode("div",null,[u("text")?(e.openBlock(),e.createBlock(Aa,{key:0,selection:r.selection,onLoad:m[0]||(m[0]=b=>c(!0))},null,8,["selection"])):u("image")?(e.openBlock(),e.createBlock(Cl,{key:1,selection:r.selection,onLoad:m[1]||(m[1]=b=>c(!0))},null,8,["selection"])):u("video")?(e.openBlock(),e.createBlock(Il,{key:2,selection:r.selection,onLoad:m[2]||(m[2]=b=>c(!0))},null,8,["selection"])):u("audio")?(e.openBlock(),e.createBlock(zl,{key:3,selection:r.selection,onLoad:m[3]||(m[3]=b=>c(!0))},null,8,["selection"])):u("application/pdf")?(e.openBlock(),e.createBlock(Ul,{key:4,selection:r.selection,onLoad:m[4]||(m[4]=b=>c(!0))},null,8,["selection"])):(e.openBlock(),e.createBlock($l,{key:5,selection:r.selection,onLoad:m[5]||(m[5]=b=>c(!0))},null,8,["selection"]))]),e.createElementVNode("div",Wl,[i.value==!1?(e.openBlock(),e.createElementBlock("div",Xl,[Zl,e.createElementVNode("span",null,e.toDisplayString(e.unref(l)("Loading")),1)])):e.createCommentVNode("",!0)])])]),e.createElementVNode("div",ql,[e.createElementVNode("div",null,[e.createElementVNode("span",Gl,e.toDisplayString(e.unref(l)("File Size"))+": ",1),e.createTextVNode(e.toDisplayString(e.unref(tr)(r.selection.item.file_size)),1)]),e.createElementVNode("div",null,[e.createElementVNode("span",Jl,e.toDisplayString(e.unref(l)("Last Modified"))+": ",1),e.createTextVNode(" "+e.toDisplayString(e.unref(rr)(r.selection.item.last_modified)),1)])])]),_:1}))}}),ec={class:"sm:flex sm:items-start"},tc=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),rc={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},nc={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},oc={class:"mt-2"},sc={class:"flex text-sm text-gray-800 dark:text-gray-400 py-2"},ic={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"},ac=[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)],lc={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"},cc=[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)],dc={class:"ml-1.5"},hc=["onKeyup"],uc=Object.assign({name:"VFModalRename"},{props:{selection:Object,current:Object},setup(r){const t=r,n=e.inject("emitter");e.inject("storage");const s=e.inject("adapter"),{t:l}=e.inject("i18n"),i=e.ref(t.selection.items[0]),c=e.ref(t.selection.items[0].basename),u=e.ref(""),y=()=>{c.value!=""&&n.emit("vf-fetch",{params:{q:"rename",adapter:s.value,path:t.current.dirname,item:i.value.path,name:c.value},onSuccess:()=>{n.emit("vf-toast-push",{label:l("%s is renamed.",c.value)})},onError:g=>{u.value=l(g.message)}})};return(g,m)=>(e.openBlock(),e.createBlock(me,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:y,class:"w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 dark:bg-gray-700 dark:hover:bg-gray-600/75 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(l)("Rename")),1),e.createElementVNode("button",{type:"button",onClick:m[2]||(m[2]=b=>e.unref(n).emit("vf-modal-close")),class:"mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(l)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",ec,[tc,e.createElementVNode("div",rc,[e.createElementVNode("h3",nc,e.toDisplayString(e.unref(l)("Rename")),1),e.createElementVNode("div",oc,[e.createElementVNode("p",sc,[i.value.type=="dir"?(e.openBlock(),e.createElementBlock("svg",ic,ac)):(e.openBlock(),e.createElementBlock("svg",lc,cc)),e.createElementVNode("span",dc,e.toDisplayString(i.value.basename),1)]),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":m[0]||(m[0]=b=>c.value=b),onKeyup:e.withKeys(y,["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,40,hc),[[e.vModelText,c.value]]),u.value.length?(e.openBlock(),e.createBlock(pe,{key:0,onHidden:m[1]||(m[1]=b=>u.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}}),fc={class:"sm:flex sm:items-start"},mc=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),pc={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},gc={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},yc={class:"mt-2"},bc={class:"text-gray-500 mb-1"},vc=["id"],Sc={key:0,class:"py-2"},_c=["disabled","onClick"],wc=Object.assign({name:"VFModalUpload"},{props:{current:Object},setup(r){const t=r,n=e.inject("emitter"),{apiUrl:s}=ue(),{t:l}=e.inject("i18n"),i=e.inject("maxFileSize"),c=e.ref(null),u=e.ref(null),y=e.ref(null),g=e.ref([]),m=e.ref(""),b=e.ref(!0),S=()=>{m.value="",c.value.start()},x=e.inject("postData");return e.onMounted(()=>{c.value=new ve.Uploader({runtimes:"html5",browse_button:y.value,container:u.value,max_file_size:i,multiple_queues:!0,file_data_name:"file",url:s.value+"?"+Ne(Object.assign(x,{q:"upload",adapter:t.current.adapter,path:t.current.dirname})),headers:{...st&&{"X-CSRF-Token":st}},init:{PostInit:function(){},FilesAdded:function(k,N){b.value=!1,ve.each(N,function(C){g.value.push({id:C.id,name:C.name,size:ve.formatSize(C.size),percent:""})})},UploadProgress:function(k,N){g.value[g.value.findIndex(C=>C.id==N.id)].percent=N.percent+"%"},UploadComplete:function(){b.value=!0,n.emit("vf-fetch",{params:{q:"index",adapter:t.current.adapter,path:t.current.dirname}})},Error:function(k,N){c.value.stop(),N.code==ve.HTTP_ERROR?m.value=l(JSON.parse(N.response).message):N.code==ve.FILE_SIZE_ERROR?m.value=l("The selected file exceeds the maximum file size. You cannot upload files greater than %s",[i]):m.value=l(N.message)}}}),c.value.init()}),(k,N)=>(e.openBlock(),e.createBlock(me,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{disabled:b.value,onClick:e.withModifiers(S,["prevent"]),type:"button",class:e.normalizeClass([b.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","w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 text-base font-medium text-white focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm"])},e.toDisplayString(e.unref(l)("Upload")),11,_c),e.createElementVNode("button",{type:"button",onClick:N[1]||(N[1]=C=>e.unref(n).emit("vf-modal-close")),class:"mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(l)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",fc,[mc,e.createElementVNode("div",pc,[e.createElementVNode("h3",gc,e.toDisplayString(e.unref(l)("Upload files")),1),e.createElementVNode("div",yc,[e.createElementVNode("div",bc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,C=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",{id:C.id},[e.createTextVNode(e.toDisplayString(C.name)+" ( "+e.toDisplayString(C.size)+") ",1),e.createElementVNode("b",null,e.toDisplayString(C.percent),1)],8,vc)]))),256)),g.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Sc,e.toDisplayString(e.unref(l)("No files selected!")),1))]),e.createElementVNode("div",{class:"text-gray-500",ref_key:"container",ref:u},[e.createElementVNode("button",{ref_key:"pickFiles",ref:y,type:"button",class:"mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(l)("Select Files")),513)],512),m.value.length?(e.openBlock(),e.createBlock(pe,{key:0,onHidden:N[0]||(N[0]=C=>m.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}}),kc={class:"sm:flex sm:items-start"},xc=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),Dc={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},Ec={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},Nc={class:"mt-2"},Cc={class:"flex text-sm text-gray-800 dark:text-gray-400"},Vc={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"},Mc=[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)],Bc={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"},$c=[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)],Tc={class:"ml-1.5"},Ac=["onKeyup","placeholder"],Lc=Object.assign({name:"VFModalArchive"},{props:{selection:Object,current:Object},setup(r){const t=r,n=e.inject("emitter");e.inject("storage");const s=e.inject("adapter"),{t:l}=e.inject("i18n"),i=e.ref(""),c=e.ref(""),u=e.ref(t.selection.items),y=()=>{u.value.length&&n.emit("vf-fetch",{params:{q:"archive",adapter:s.value,path:t.current.dirname,items:JSON.stringify(u.value.map(({path:g,type:m})=>({path:g,type:m}))),name:i.value},onSuccess:()=>{n.emit("vf-toast-push",{label:l("The file(s) archived.")})},onError:g=>{c.value=l(g.message)}})};return(g,m)=>(e.openBlock(),e.createBlock(me,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:y,class:"w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 dark:bg-gray-700 dark:hover:bg-gray-600/75 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(l)("Archive")),1),e.createElementVNode("button",{type:"button",onClick:m[2]||(m[2]=b=>e.unref(n).emit("vf-modal-close")),class:"mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(l)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",kc,[xc,e.createElementVNode("div",Dc,[e.createElementVNode("h3",Ec,e.toDisplayString(e.unref(l)("Archive the files")),1),e.createElementVNode("div",Nc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,b=>(e.openBlock(),e.createElementBlock("p",Cc,[b.type=="dir"?(e.openBlock(),e.createElementBlock("svg",Vc,Mc)):(e.openBlock(),e.createElementBlock("svg",Bc,$c)),e.createElementVNode("span",Tc,e.toDisplayString(b.basename),1)]))),256)),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":m[0]||(m[0]=b=>i.value=b),onKeyup:e.withKeys(y,["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(l)("Archive name. (.zip file will be created)"),type:"text"},null,40,Ac),[[e.vModelText,i.value]]),c.value.length?(e.openBlock(),e.createBlock(pe,{key:0,onHidden:m[1]||(m[1]=b=>c.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}}),Ic={class:"sm:flex sm:items-start"},Oc=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),jc={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},Pc={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},zc={class:"mt-2"},Rc={class:"flex text-sm text-gray-800 dark:text-gray-400"},Hc={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"},Fc=[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)],Uc={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"},Kc=[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)],Yc={class:"ml-1.5"},Wc={class:"my-1 text-sm text-gray-500"},Xc=Object.assign({name:"VFModalUnarchive"},{props:{selection:Object,current:Object},setup(r){const t=r,n=e.inject("emitter");e.inject("storage");const s=e.inject("adapter"),{t:l}=e.inject("i18n");e.ref("");const i=e.ref(t.selection.items[0]),c=e.ref(""),u=e.ref([]),y=()=>{n.emit("vf-fetch",{params:{q:"unarchive",adapter:s.value,path:t.current.dirname,item:i.value.path},onSuccess:()=>{n.emit("vf-toast-push",{label:l("The file unarchived.")})},onError:g=>{c.value=l(g.message)}})};return(g,m)=>(e.openBlock(),e.createBlock(me,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:y,class:"w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 dark:bg-gray-700 dark:hover:bg-gray-600/75 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(l)("Unarchive")),1),e.createElementVNode("button",{type:"button",onClick:m[1]||(m[1]=b=>e.unref(n).emit("vf-modal-close")),class:"mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(l)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",Ic,[Oc,e.createElementVNode("div",jc,[e.createElementVNode("h3",Pc,e.toDisplayString(e.unref(l)("Unarchive")),1),e.createElementVNode("div",zc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,b=>(e.openBlock(),e.createElementBlock("p",Rc,[b.type=="dir"?(e.openBlock(),e.createElementBlock("svg",Hc,Fc)):(e.openBlock(),e.createElementBlock("svg",Uc,Kc)),e.createElementVNode("span",Yc,e.toDisplayString(b.basename),1)]))),256)),e.createElementVNode("p",Wc,e.toDisplayString(e.unref(l)("The archive will be unarchived at"))+" ("+e.toDisplayString(r.current.dirname)+")",1),c.value.length?(e.openBlock(),e.createBlock(pe,{key:0,onHidden:m[0]||(m[0]=b=>c.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}}),Zc={class:"sm:flex sm:items-start"},qc=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),Gc={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"},Jc={class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",id:"modal-title"},Qc={class:"mt-2"},ed={class:"flex text-sm text-gray-800 dark:text-gray-400"},td={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"},rd=[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)],nd={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"},od=[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)],sd={class:"ml-1.5"},id={class:"text-sm text-gray-500 pb-1 pt-3"},ad={class:"flex text-sm text-gray-800 dark:text-gray-400"},ld=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),cd={class:"ml-1.5 overflow-auto"},Gt={VueFinder:ji,...Object.freeze(Object.defineProperty({__proto__:null,ModalDelete:sa,ModalMessage:ua,ModalNewFolder:Sa,ModalNewFile:Ca,ModalPreview:Ql,ModalRename:uc,ModalUpload:wc,ModalArchive:Lc,ModalUnarchive:Xc,ModalMove:Object.assign({name:"VFModalMove"},{props:{selection:Object,current:Object},setup(r){const t=r,n=e.inject("emitter"),{t:s}=e.inject("i18n");e.inject("storage");const l=e.inject("adapter"),i=e.ref(t.selection.items.from),c=e.ref(""),u=()=>{i.value.length&&n.emit("vf-fetch",{params:{q:"move",adapter:l.value,path:t.current.dirname,items:JSON.stringify(i.value.map(({path:y,type:g})=>({path:y,type:g}))),item:t.selection.items.to.path},onSuccess:()=>{n.emit("vf-toast-push",{label:s("Files moved.",t.selection.items.to.name)})},onError:y=>{c.value=s(y.message)}})};return(y,g)=>(e.openBlock(),e.createBlock(me,null,{buttons:e.withCtx(()=>[e.createElementVNode("button",{type:"button",onClick:u,class:"w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 dark:bg-gray-700 dark:hover:bg-gray-600/75 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(s)("Yes, Move!")),1),e.createElementVNode("button",{type:"button",onClick:g[1]||(g[1]=m=>e.unref(n).emit("vf-modal-close")),class:"mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(e.unref(s)("Cancel")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",Zc,[qc,e.createElementVNode("div",Gc,[e.createElementVNode("h3",Jc,e.toDisplayString(e.unref(s)("Move files")),1),e.createElementVNode("div",Qc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,m=>(e.openBlock(),e.createElementBlock("p",ed,[m.type=="dir"?(e.openBlock(),e.createElementBlock("svg",td,rd)):(e.openBlock(),e.createElementBlock("svg",nd,od)),e.createElementVNode("span",sd,e.toDisplayString(m.path),1)]))),256)),e.createElementVNode("p",id,e.toDisplayString(e.unref(s)("Are you sure you want to move these files?")),1),e.createElementVNode("p",ad,[ld,e.createElementVNode("span",cd,e.toDisplayString(r.selection.items.to.path),1)]),c.value.length?(e.openBlock(),e.createBlock(pe,{key:0,onHidden:g[0]||(g[0]=m=>c.value=""),error:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.value),1)]),_:1})):e.createCommentVNode("",!0)])])])]),_:1}))}})},Symbol.toStringTag,{value:"Module"}))},eu="",tu="",dd={install(r){for(const t in Gt)if(Gt.hasOwnProperty(t)){const n=Gt[t];r.component(n.name,n)}}},hd=Object.freeze(Object.defineProperty({__proto__:null,default:`{ "Language": "Language", "Create": "Create", "Close": "Close", @@ -83,207 +84,207 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho "Drag&Drop: off": "Drag&Drop: off", "The selected file exceeds the maximum file size. You cannot upload files greater than %s": "The selected file exceeds the maximum file size. You cannot upload files greater than %s" } -`},Symbol.toStringTag,{value:"Module"})),Dd=Object.freeze(Object.defineProperty({__proto__:null,default:`{ - "Language": "\u0632\u0628\u0627\u0646", - "Create": "\u0627\u06CC\u062C\u0627\u062F", - "Close": "\u0628\u0633\u062A\u0646", - "Cancel": "\u0627\u0646\u0635\u0631\u0627\u0641", - "Save": "\u0630\u062E\u06CC\u0631\u0647", - "Edit": "\u0648\u06CC\u0631\u0627\u06CC\u0634", - "Crop": "\u0628\u0631\u0634 \u062A\u0635\u0648\u06CC\u0631", - "New Folder": "\u067E\u0648\u0634\u0647 \u062C\u062F\u06CC\u062F", - "New File": "\u0641\u0627\u06CC\u0644 \u062C\u062F\u06CC\u062F", - "Rename": "\u062A\u063A\u06CC\u06CC\u0631 \u0646\u0627\u0645", - "Delete": "\u062D\u0630\u0641", - "Upload": "\u0622\u067E\u0644\u0648\u062F", - "Download": "\u062F\u0627\u0646\u0644\u0648\u062F", - "Archive": "\u0641\u0634\u0631\u062F\u0647 \u0633\u0627\u0632\u06CC", - "Unarchive": "\u0628\u0627\u0632 \u06A9\u0631\u062F\u0646 \u0641\u0627\u06CC\u0644 \u0641\u0634\u0631\u062F\u0647", - "Open": "\u0628\u0627\u0632 \u06A9\u0631\u062F\u0646", - "Open containing folder": "\u0645\u062D\u062A\u0648\u0627\u06CC \u067E\u0648\u0634\u0647 \u0631\u0627 \u0628\u0627\u0632 \u06A9\u0646!", - "Refresh": "\u0628\u0627\u0631\u06A9\u0630\u0627\u0631\u06CC \u0645\u062C\u062F\u062F", - "Preview": "\u067E\u06CC\u0634\u0646\u0645\u0627\u06CC\u0634", - "Dark Mode": "\u062D\u0627\u0644\u062A \u0634\u0628", - "Toggle Full Screen": "\u062A\u0645\u0627\u0645 \u062A\u0635\u0648\u06CC\u0631 \u06A9\u0631\u062F\u0646", - "Change View": "\u062A\u063A\u06CC\u06CC\u0631 \u0646\u0648\u0639 \u0646\u0645\u0627\u06CC\u0634", - "Storage" : "\u0641\u0636\u0627", - "Go up a directory": "\u0628\u0631\u0648 \u0628\u0647 \u067E\u0648\u0634\u0647", - "Search anything..": "\u0628\u0647 \u062F\u0646\u0628\u0627\u0644 \u0686\u0647 \u0686\u06CC\u0632\u06CC \u0647\u0633\u062A\u06CC\u062F \u061F \u062C\u0633\u062A\u062C\u0648 \u06A9\u0646\u06CC\u062F ...", - "Name": "\u0646\u0627\u0645", - "Size": "\u0633\u0627\u06CC\u0632", - "Date": "\u062A\u0627\u0631\u06CC\u062E \u0627\u0646\u062A\u0634\u0627\u0631", - "Filepath": "\u0645\u0633\u06CC\u0631 \u0641\u0627\u06CC\u0644", - "About": "\u062F\u0631\u0628\u0627\u0631\u0647", - "Folder Name": "\u0646\u0627\u0645 \u067E\u0648\u0634\u0647", - "File Name": "\u0646\u0627\u0645 \u0641\u0627\u06CC\u0644", - "Move files": "\u0627\u0646\u062A\u0642\u0627\u0644 \u0641\u0627\u06CC\u0644 \u0647\u0627", - "Are you sure you want to move these files to?": "\u0622\u06CC\u0627 \u0628\u0631\u0627\u06CC \u0627\u0646\u062A\u0642\u0627\u0644 \u0641\u0627\u06CC\u0644 \u0647\u0627 \u0645\u0637\u0645\u0626\u0646 \u0647\u0633\u062A\u06CC\u062F \u061F", - "Yes, Move!": "\u0628\u0644\u0647\u060C \u0627\u0646\u062A\u0642\u0627\u0644 \u0628\u062F\u0647!", - "Delete files": "\u067E\u0627\u06A9 \u06A9\u0631\u062F\u0646 \u0641\u0627\u06CC\u0644 \u0647\u0627", - "Yes, Delete!": "\u0628\u0644\u0647\u060C \u067E\u0627\u06A9 \u06A9\u0646!", - "Upload Files" : "\u0622\u067E\u0644\u0648\u062F \u06A9\u0631\u062F\u0646 \u0641\u0627\u06CC\u0644 \u0647\u0627", - "No files selected!": "\u0647\u06CC\u0686 \u0641\u0627\u06CC\u0644\u06CC \u0627\u0646\u062A\u062E\u0627\u0628 \u0646\u0634\u062F\u0647 \u0627\u0633\u062A.", - "Select Files": "\u0627\u0646\u062A\u062E\u0627\u0628 \u0641\u0627\u06CC\u0644 \u0647\u0627", - "Archive the files": "\u0641\u0634\u0631\u062F\u0647 \u0633\u0627\u0632\u06CC \u0641\u0627\u06CC\u0644 \u0647\u0627", - "Unarchive the files": "\u0628\u0627\u0632 \u06A9\u0631\u062F\u0646 \u0641\u0627\u06CC\u0644 \u0647\u0627\u06CC \u0641\u0634\u0631\u062F\u0647", - "The archive will be unarchived at": "\u0641\u0627\u06CC\u0644 \u0641\u0634\u0631\u062F\u0647 \u0633\u0627\u0632\u0647 \u062F\u0631 \u0627\u06CC\u0646 \u0645\u0633\u06CC\u0631 \u0628\u0627\u0632 \u0645\u06CC\u0634\u0648\u062F: ", - "Archive name. (.zip file will be created)": "\u0646\u0627\u0645 \u0641\u0627\u06CC\u0644 \u0641\u0634\u0631\u062F\u0647", - "Vuefinder is a file manager component for vue 3.": "Vuefinder \u06CC\u06A9 \u06A9\u062A\u0627\u0628\u062E\u0627\u0646\u0647 \u0645\u062F\u06CC\u0631\u06CC\u062A \u0641\u0627\u06CC\u0644 \u0647\u0627 \u0628\u0631\u0627\u06CC Vue3 \u0645\u06CC\u0628\u0627\u0634\u062F.", - "Create a new folder": "\u0627\u06CC\u062C\u0627\u062F \u067E\u0648\u0634\u0647 \u062C\u062F\u06CC\u062F", - "Create a new file": "\u0627\u06CC\u062C\u0627\u062F \u0641\u0627\u06CC\u0644 \u062C\u062F\u06CC\u062F", - "Are you sure you want to delete these files?": "\u0622\u06CC\u0627 \u0627\u0632 \u062D\u0630\u0641 \u0641\u0627\u06CC\u0644 \u0647\u0627 \u0645\u0637\u0645\u0626\u0646 \u0647\u0633\u062A\u06CC\u062F \u061F", - "This action cannot be undone.": "\u0627\u06CC\u0646 \u062A\u063A\u06CC\u06CC\u0631\u0627\u062A \u0642\u0627\u0628\u0644 \u0628\u0627\u0632\u06AF\u0634\u062A \u0646\u06CC\u0633\u062A!", - "Search results for" : "\u0646\u062A\u06CC\u062C\u0647 \u062C\u0633\u062A\u062C\u0648 \u0628\u0631\u0627\u06CC", - "item(s) selected.": "\u0622\u06CC\u062A\u0645(\u0647\u0627\u06CC) \u0627\u0646\u062A\u062E\u0627\u0628 \u0634\u062F\u0647", - "%s is renamed." : "\u062A\u063A\u06CC\u06CC\u0631 \u0646\u0627\u0645 \u0628\u0631\u0627\u06CC %s \u0635\u0648\u0631\u062A \u06AF\u0631\u0641\u062A.", - "This is a readonly storage." : "\u0627\u06CC\u0646 \u0641\u0636\u0627 \u0641\u0642\u0637 \u0642\u0627\u0628\u0644 \u062E\u0648\u0627\u0646\u062F\u0646 \u0627\u0633\u062A!", - "%s is created." : "%s \u0633\u0627\u062E\u062A\u0647 \u0634\u062F!", - "Files moved." : "\u0641\u0627\u06CC\u0644(\u0647\u0627) \u0627\u0646\u0642\u0627\u0644 \u06CC\u0627\u0641\u062A\u0646\u062F.", - "Files deleted." : "\u0641\u0627\u06CC\u0644(\u0647\u0627) \u062D\u0630\u0641 \u0634\u062F\u0646\u062F.", - "The file unarchived." : "\u0641\u0627\u06CC\u0644 \u0641\u0634\u0631\u062F\u0647 \u0634\u062F\u0647 \u0628\u0627\u0632 \u0634\u062F.", - "The file(s) archived." : "\u0641\u0627\u06CC\u0644(\u0647\u0627) \u0641\u0634\u0631\u062F\u0647 \u0633\u0627\u0632\u06CC \u0634\u062F\u0646\u062F.", - "Updated." : "\u0622\u067E\u062F\u06CC\u062A \u0634\u062F.", - "No search result found." : "\u0647\u06CC\u0686 \u0646\u062A\u06CC\u062C\u0647 \u0627\u06CC \u06CC\u0627\u0641\u062A \u0646\u0634\u062F.", - "Are you sure you want to move these files?" : "\u0622\u06CC\u0627 \u0628\u0631\u0627\u06CC \u0627\u0646\u062A\u0642\u0627\u0644 \u0641\u0627\u06CC\u0644 \u0647\u0627 \u0645\u0637\u0645\u0626\u0646 \u0647\u0633\u062A\u06CC\u062F \u061F", - "File Size": "\u0633\u0627\u06CC\u0632 \u0641\u0627\u06CC\u0644", - "Last Modified": "\u0622\u062E\u0631\u06CC\u0646 \u0648\u06CC\u0631\u0627\u06CC\u0634", - "Drag&Drop: on": "Drag&Drop: \u0631\u0648\u0634\u0646", - "Drag&Drop: off": "Drag&Drop: \u062E\u0627\u0645\u0648\u0634", - "The selected file exceeds the maximum file size. You cannot upload files greater than %s": "\u062D\u062F\u0627\u06A9\u062B\u0631 \u0638\u0631\u0641\u06CC\u062A \u0645\u062C\u0627\u0632 \u0641\u0627\u06CC\u0644 %s \u0645\u06CC\u0628\u0627\u0634\u062F! \u0641\u0627\u06CC\u0644 \u0634\u0645\u0627 \u0628\u0632\u0631\u06AF\u062A\u0631 \u0627\u0632 \u0627\u06CC\u0646 \u0645\u0642\u062F\u0627\u0631 \u0645\u06CC\u0628\u0627\u0634\u062F." +`},Symbol.toStringTag,{value:"Module"})),ud=Object.freeze(Object.defineProperty({__proto__:null,default:`{ + "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)": "نام فایل فشرده", + "Vuefinder is a file manager component for vue 3.": "Vuefinder یک کتابخانه مدیریت فایل ها برای Vue3 میباشد.", + "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: روشن", + "Drag&Drop: off": "Drag&Drop: خاموش", + "The selected file exceeds the maximum file size. You cannot upload files greater than %s": "حداکثر ظرفیت مجاز فایل %s میباشد! فایل شما بزرگتر از این مقدار میباشد." } -`},Symbol.toStringTag,{value:"Module"})),Ed=Object.freeze(Object.defineProperty({__proto__:null,default:`{ - "Language": "\u042F\u0437\u044B\u043A", - "Create": "\u0421\u043E\u0437\u0434\u0430\u0442\u044C", - "Close": "\u0417\u0430\u043A\u0440\u044B\u0442\u044C", - "Cancel": "\u041E\u0442\u043C\u0435\u043D\u0430", - "Save": "\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C", - "Edit": "\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C", - "Crop": "\u041E\u0431\u0440\u0435\u0437\u0430\u0442\u044C", - "New Folder": "\u041D\u043E\u0432\u0430\u044F \u043F\u0430\u043F\u043A\u0430", - "New File": "\u041D\u043E\u0432\u044B\u0439 \u0444\u0430\u0439\u043B", - "Rename": "\u041F\u0435\u0440\u0435\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u0442\u044C", - "Delete": "\u0423\u0434\u0430\u043B\u0438\u0442\u044C", - "Upload": "\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C", - "Download": "\u0421\u043A\u0430\u0447\u0430\u0442\u044C", - "Archive": "\u0410\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C", - "Unarchive": "\u0420\u0430\u0437\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C", - "Open": "\u041E\u0442\u043A\u0440\u044B\u0442\u044C", - "Open containing folder": "\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435", - "Refresh": "\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C", - "Preview": "\u041F\u0440\u0435\u0434\u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440", - "Dark Mode": "\u0422\u0451\u043C\u043D\u044B\u0439 \u0440\u0435\u0436\u0438\u043C", - "Toggle Full Screen": "\u041F\u043E\u043B\u043D\u044B\u0439 \u044D\u043A\u0440\u0430\u043D", - "Change View": "\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u0432\u0438\u0434", - "Storage" : "\u0425\u0440\u0430\u043D\u0438\u043B\u0438\u0449\u0435", - "Go up a directory": "\u0412\u0432\u0435\u0440\u0445", - "Search anything..": "\u041F\u043E\u0438\u0441\u043A...", - "Name": "\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435", - "Size": "\u0420\u0430\u0437\u043C\u0435\u0440", - "Date": "\u0414\u0430\u0442\u0430", - "Filepath": "\u041F\u0443\u0442\u044C \u0434\u043E \u0444\u0430\u0439\u043B\u0430", - "About": "\u041E \u043A\u043E\u043C\u043F\u043E\u043D\u0435\u043D\u0442\u0435", - "Folder Name": "\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043F\u0430\u043F\u043A\u0438", - "File Name": "\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u0444\u0430\u0439\u043B\u0430", - "Move files": "\u041F\u0435\u0440\u0435\u043C\u0435\u0441\u0442\u0438\u0442\u044C \u0444\u0430\u0439\u043B\u044B", - "Are you sure you want to move these files to?": "\u0412\u044B \u0443\u0432\u0435\u0440\u0435\u043D\u044B, \u0447\u0442\u043E \u0445\u043E\u0442\u0438\u0442\u0435 \u043F\u0435\u0440\u0435\u043C\u0435\u0441\u0442\u0438\u0442\u044C \u044D\u0442\u0438 \u0444\u0430\u0439\u043B\u044B \u0432?", - "Yes, Move!": "\u041F\u0435\u0440\u0435\u043C\u0435\u0441\u0442\u0438\u0442\u044C", - "Delete files": "\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0444\u0430\u0439\u043B\u044B", - "Yes, Delete!": "\u0423\u0434\u0430\u043B\u0438\u0442\u044C", - "Upload Files": "\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0444\u0430\u0439\u043B\u044B", - "No files selected!": "\u0424\u0430\u0439\u043B\u044B \u043D\u0435 \u0432\u044B\u0431\u0440\u0430\u043D\u044B!", - "Select Files": "\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0444\u0430\u0439\u043B\u044B", - "Archive the files": "\u0410\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0444\u0430\u0439\u043B\u044B", - "Unarchive the files": "\u0420\u0430\u0437\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0444\u0430\u0439\u043B\u044B", - "The archive will be unarchived at": "\u0410\u0440\u0445\u0438\u0432 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D \u0432", - "Archive name. (.zip file will be created)": "\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u0430\u0440\u0445\u0438\u0432\u0430. (\u0431\u0443\u0434\u0435\u0442 \u0441\u043E\u0437\u0434\u0430\u043D .zip \u0444\u0430\u0439\u043B)", - "Vuefinder is a file manager component for vue 3.": "Vuefinder - \u0444\u0430\u0439\u043B\u043E\u0432\u044B\u0439 \u043C\u0435\u043D\u0435\u0434\u0436\u0435\u0440, \u043A\u043E\u043C\u043F\u043E\u043D\u0435\u043D\u0442 \u0434\u043B\u044F vue 3.", - "Create a new folder": "\u0421\u043E\u0437\u0434\u0430\u0442\u044C \u043D\u043E\u0432\u0443\u044E \u043F\u0430\u043F\u043A\u0443", - "Create a new file": "\u0421\u043E\u0437\u0434\u0430\u0442\u044C \u043D\u043E\u0432\u044B\u0439 \u0444\u0430\u0439\u043B", - "Are you sure you want to delete these files?": "\u0412\u044B \u0443\u0432\u0435\u0440\u0435\u043D\u044B, \u0447\u0442\u043E \u0445\u043E\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043B\u0438\u0442\u044C \u044D\u0442\u0438 \u0444\u0430\u0439\u043B\u044B?", - "This action cannot be undone.": "\u042D\u0442\u043E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u043D\u0435\u043B\u044C\u0437\u044F \u043E\u0442\u043C\u0435\u043D\u0438\u0442\u044C.", - "Search results for": "\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u043F\u043E\u0438\u0441\u043A\u0430 \u043F\u043E", - "item(s) selected.": "\u0432\u044B\u0431\u0440\u0430\u043D\u044B.", - "%s is renamed.": "%s \u043F\u0435\u0440\u0435\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D.", - "This is a readonly storage.": "\u0414\u0430\u043D\u043D\u043E\u0435 \u0445\u0440\u0430\u043D\u0438\u043B\u0438\u0449\u0435 \u0442\u043E\u043B\u044C\u043A\u043E \u0434\u043B\u044F \u0447\u0442\u0435\u043D\u0438\u044F.", - "%s is created.": "%s \u0441\u043E\u0437\u0434\u0430\u043D.", - "Files moved.": "\u0424\u0430\u0439\u043B\u044B \u043F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D\u044B.", - "Files deleted.": "\u0424\u0430\u0439\u043B\u044B \u0443\u0434\u0430\u043B\u0435\u043D\u044B.", - "The file unarchived.": "\u0424\u0430\u0439\u043B \u0440\u0430\u0437\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D", - "The file(s) archived.": "\u0424\u0430\u0439\u043B(-\u044B) \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u044B", - "Updated.": "\u041E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u043E.", - "No search result found.": "\u041D\u0438\u0447\u0435\u0433\u043E \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E", - "Are you sure you want to move these files?": "\u0412\u044B \u0443\u0432\u0435\u0440\u0435\u043D\u044B, \u0447\u0442\u043E \u0445\u043E\u0442\u0438\u0442\u0435 \u043F\u0435\u0440\u0435\u043C\u0435\u0441\u0442\u0438\u0442\u044C \u044D\u0442\u0438 \u0444\u0430\u0439\u043B\u044B?", - "File Size": "\u0420\u0430\u0437\u043C\u0435\u0440 \u0444\u0430\u0439\u043B\u0430", - "Last Modified": "\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0435 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0435", +`},Symbol.toStringTag,{value:"Module"})),fd=Object.freeze(Object.defineProperty({__proto__:null,default:`{ + "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: on", "Drag&Drop: off": "Drag&Drop: off" } -`},Symbol.toStringTag,{value:"Module"})),Nd=Object.freeze(Object.defineProperty({__proto__:null,default:`{ +`},Symbol.toStringTag,{value:"Module"})),md=Object.freeze(Object.defineProperty({__proto__:null,default:`{ "Language": "Dil", - "Create": "Olu\u015Ftur", + "Create": "Oluştur", "Close": "Kapat", - "Cancel": "\u0130ptal", + "Cancel": "İptal", "Save": "Kaydet", - "Edit": "D\xFCzenle", + "Edit": "Düzenle", "Crop": "Kes", - "New Folder": "Yeni Klas\xF6r", + "New Folder": "Yeni Klasör", "New File": "Yeni Dosya", - "Rename": "Yeniden Adland\u0131r", + "Rename": "Yeniden Adlandır", "Delete": "Sil", - "Upload": "Kar\u015F\u0131ya Y\xFCkle", - "Download": "\u0130ndir", - "Archive": "Ar\u015Fivle", - "Unarchive": "Ar\u015Fivden \xE7\u0131kar", - "Open": "A\xE7", - "Open containing folder": "\u0130\xE7eren klas\xF6r\xFC a\xE7", + "Upload": "Karşıya Yükle", + "Download": "İndir", + "Archive": "Arşivle", + "Unarchive": "Arşivden çıkar", + "Open": "Aç", + "Open containing folder": "İçeren klasörü aç", "Refresh": "Yenile", - "Preview": "\xD6nizleme", - "Dark Mode": "Karanl\u0131k Mod", + "Preview": "Önizleme", + "Dark Mode": "Karanlık Mod", "Toggle Full Screen": "Tam ekran", - "Change View": "G\xF6r\xFCn\xFCm\xFC de\u011Fi\u015Ftir", + "Change View": "Görünümü değiştir", "Storage": "Depo", - "Go up a directory": "Yukar\u0131 git", - "Search anything..": "Herhangi bir \u015Fey ara..", + "Go up a directory": "Yukarı git", + "Search anything..": "Herhangi bir şey ara..", "Name": "Ad", "Size": "Boyut", "Date": "Tarih", "Filepath": "Dosya yolu", - "About": "Hakk\u0131nda", - "Folder Name": "Klas\xF6r Ad\u0131", - "File Name": "Dosya Ad\u0131", - "Move files": "Dosyalar\u0131 ta\u015F\u0131", - "Are you sure you want to move these files to?": "Bu dosyalar\u0131 ta\u015F\u0131mak istedi\u011Finizden emin misiniz?", - "Yes, Move!": "Evet, Ta\u015F\u0131!", - "Delete files": "Dosyalar\u0131 Sil", + "About": "Hakkında", + "Folder Name": "Klasör Adı", + "File Name": "Dosya Adı", + "Move files": "Dosyaları taşı", + "Are you sure you want to move these files to?": "Bu dosyaları taşımak istediğinizden emin misiniz?", + "Yes, Move!": "Evet, Taşı!", + "Delete files": "Dosyaları Sil", "Yes, Delete!": "Evet, Sil!", - "Upload files": "Dosyalar\u0131 Y\xFCkle", - "No files selected!": "Dosya Se\xE7ilmedi!", - "Select Files": "Dosyalar\u0131 Se\xE7", - "Archive the files": "Dosyalar\u0131 ar\u015Fivleyin", - "Unarchive the files": "Dosyalar\u0131 ar\u015Fivden \xE7\u0131kar\u0131n", - "The archive will be unarchived at": "Ar\u015Fiv buraya \xE7\u0131kar\u0131lacak: ", - "Archive name. (.zip file will be created)": "Archive ad\u0131. (.zip dosyas\u0131 olu\u015Fturulacak)", - "Vuefinder is a file manager component for vue 3.": "Vuefinder, vue 3 i\xE7in bir web dosya y\xF6netim bile\u015Fenidir.", - "Create a new folder": "Yeni bir klas\xF6r olu\u015Fturun", - "Create a new file": "Yeni bir dosya olu\u015Fturun", - "Are you sure you want to delete these files?": "Bu dosyalar\u0131 silmek istedi\u011Finize emin misiniz?", - "This action cannot be undone.": "Bu i\u015Flem geri al\u0131namaz.", - "Search results for": "Arama sonu\xE7lar\u0131:", - "item(s) selected.": "dosya se\xE7ildi.", - "%s is renamed." : "%s yeniden adland\u0131r\u0131lm\u0131\u015Ft\u0131r.", - "This is a readonly storage." : "Bu salt okunur bir depolama alan\u0131d\u0131r.", - "%s is created." : "%s ba\u015Far\u0131yla olu\u015Fturulmu\u015Ftur.", - "Files moved." : "Dosyalar ta\u015F\u0131nd\u0131.", + "Upload files": "Dosyaları Yükle", + "No files selected!": "Dosya Seçilmedi!", + "Select Files": "Dosyaları Seç", + "Archive the files": "Dosyaları arşivleyin", + "Unarchive the files": "Dosyaları arşivden çıkarın", + "The archive will be unarchived at": "Arşiv buraya çıkarılacak: ", + "Archive name. (.zip file will be created)": "Archive adı. (.zip dosyası oluşturulacak)", + "Vuefinder is a file manager component for vue 3.": "Vuefinder, vue 3 için bir web dosya yönetim bileşenidir.", + "Create a new folder": "Yeni bir klasör oluşturun", + "Create a new file": "Yeni bir dosya oluşturun", + "Are you sure you want to delete these files?": "Bu dosyaları silmek istediğinize emin misiniz?", + "This action cannot be undone.": "Bu işlem geri alınamaz.", + "Search results for": "Arama sonuçları:", + "item(s) selected.": "dosya seçildi.", + "%s is renamed." : "%s yeniden adlandırılmıştır.", + "This is a readonly storage." : "Bu salt okunur bir depolama alanıdır.", + "%s is created." : "%s başarıyla oluşturulmuştur.", + "Files moved." : "Dosyalar taşındı.", "Files deleted." : "Dosyalar silindi.", - "The file is unarchived." : "Dosya ar\u015Fivden \xE7\u0131kar\u0131ld\u0131.", - "The file(s) is archived." : "Dosyalar ar\u015Fivlendi.", - "Updated." : "G\xFCncellendi.", - "No search result found." : "Arama sonucu bulunamad\u0131.", - "Are you sure you want to move these files?" : "Bu dosyalar\u0131 ta\u015F\u0131mak istedi\u011Finize emin misiniz?", + "The file is unarchived." : "Dosya arşivden çıkarıldı.", + "The file(s) is archived." : "Dosyalar arşivlendi.", + "Updated." : "Güncellendi.", + "No search result found." : "Arama sonucu bulunamadı.", + "Are you sure you want to move these files?" : "Bu dosyaları taşımak istediğinize emin misiniz?", "File Size": "Dosya Boyutu", - "Last Modified": "Son De\u011Fi\u015Fiklik", - "Drag&Drop: on": "S\xFCr\xFCkle&B\u0131rak: etkin", - "Drag&Drop: off": "S\xFCr\xFCkle&B\u0131rak: devre d\u0131\u015F\u0131", - "The selected file exceeds the maximum file size. You cannot upload files greater than %s": "Se\xE7ilen dosya maksimum dosya boyutunu a\u015F\u0131yor. %s'den b\xFCy\xFCk dosyalar\u0131 y\xFCkleyemezsiniz." + "Last Modified": "Son Değişiklik", + "Drag&Drop: on": "Sürükle&Bırak: etkin", + "Drag&Drop: off": "Sürükle&Bırak: devre dışı", + "The selected file exceeds the maximum file size. You cannot upload files greater than %s": "Seçilen dosya maksimum dosya boyutunu aşıyor. %s'den büyük dosyaları yükleyemezsiniz." } -`},Symbol.toStringTag,{value:"Module"}));return xd}); +`},Symbol.toStringTag,{value:"Module"}));return dd}); diff --git a/package.json b/package.json index e7ad6d17..73cf69bf 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vuefinder", - "version": "1.1.18", + "version": "1.2.0", "description": "Vuefinder is a file manager component for vuejs.", "type": "module", "files": [ @@ -32,13 +32,13 @@ "license": "MIT", "devDependencies": { "@types/node": "^18.7.1", - "@vitejs/plugin-vue": "^3.0.1", + "@vitejs/plugin-vue": "^4.0.0", "autoprefixer": "^10.4.8", "microtip": "^0.2.2", "mitt": "^3.0.0", "postcss": "^8.4.16", "tailwindcss": "^3.1.8", - "vite": "^3.0.4" + "vite": "^4.0.2" }, "dependencies": { "cropperjs": "^1.5.12",