diff --git a/dist/js/tool.js b/dist/js/tool.js index 4ceb8cd1..03900bd0 100644 --- a/dist/js/tool.js +++ b/dist/js/tool.js @@ -1,15 +1,15 @@ -(function(o,oa){typeof exports=="object"&&typeof module<"u"?oa(require("vue")):typeof define=="function"&&define.amd?define(["vue"],oa):(o=typeof globalThis<"u"?globalThis:o||self,oa(o.Vue))})(this,function(o){"use strict";var oa=!1,cl={GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_3d8ae53c-5eeb-460e-a0bd-e9e9ee09a1c0",STATS_TRP:"true",DEPLOYMENT_BASEPATH:"/opt/runner",DOTNET_NOLOGO:"1",USER:"runner",npm_config_user_agent:"npm/10.8.2 node/v18.20.5 linux x64 workspaces/false ci/github-actions",CI:"true",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_3d8ae53c-5eeb-460e-a0bd-e9e9ee09a1c0",PIPX_HOME:"/opt/pipx",npm_node_execpath:"/opt/hostedtoolcache/node/18.20.5/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_config_noproxy:"",HOME:"/home/runner",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",npm_package_json:"/home/runner/work/nova-file-manager/nova-file-manager/package.json",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"oneduo",GRADLE_HOME:"/usr/share/gradle-8.11.1",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/27.2.12479018",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",STATS_RDCL:"true",GITHUB_RETENTION_DAYS:"90",GITHUB_REPOSITORY_OWNER_ID:"113685820",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu22",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_config_userconfig:"/home/runner/.npmrc",npm_config_local_prefix:"/home/runner/work/nova-file-manager/nova-file-manager",SYSTEMD_EXEC_PID:"603",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",COLOR:"0",NVM_DIR:"/home/runner/.nvm",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",GOROOT_1_21_X64:"/opt/hostedtoolcache/go/1.21.13/x64",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20241215.1.0",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",GOROOT_1_22_X64:"/opt/hostedtoolcache/go/1.22.10/x64",SWIFT_PATH:"/usr/share/swift/usr/bin",RUNNER_USER:"runner",STATS_V3PS:"true",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",GOROOT_1_23_X64:"/opt/hostedtoolcache/go/1.23.4/x64",JOURNAL_STREAM:"8:19167",GITHUB_WORKFLOW:"Update Assets",_:"/opt/hostedtoolcache/node/18.20.5/x64/bin/npm",npm_config_prefix:"/opt/hostedtoolcache/node/18.20.5/x64",npm_config_npm_version:"10.8.2",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",STATS_D:"true",GITHUB_RUN_ID:"12413654384",STATS_VMFE:"true",npm_config_cache:"/home/runner/.npm",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"42d90f0d180c23c35a75b1622fd54f599f192575",GITHUB_BASE_REF:"",ImageOS:"ubuntu22",GITHUB_WORKFLOW_REF:"oneduo/nova-file-manager/.github/workflows/update-assets.yml@refs/heads/main",PERFLOG_LOCATION_SETTING:"RUNNER_PERFLOG",GITHUB_ACTION_REPOSITORY:"",npm_config_node_gyp:"/opt/hostedtoolcache/node/18.20.5/x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/nova-file-manager/nova-file-manager/node_modules/.bin:/home/runner/work/nova-file-manager/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/18.20.5/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/runner/work/nova-file-manager/nova-file-manager/node_modules/.bin:/home/runner/work/nova-file-manager/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/18.20.5/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/opt/hostedtoolcache/node/18.20.5/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_5bf7d58c-a7e5-41f9-9440-da2662365d7d",INVOCATION_ID:"80eb6c77e4d741a2ab7cbed66c67f725",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",NODE:"/opt/hostedtoolcache/node/18.20.5/x64/bin/node",npm_package_name:"nova-file-manager",GITHUB_ACTION:"__run",GITHUB_RUN_NUMBER:"703",GITHUB_TRIGGERING_ACTOR:"mikaelpopowicz",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub Actions 10",XDG_CONFIG_HOME:"/home/runner/.config",STATS_VMD:"true",GITHUB_REF_NAME:"main",GITHUB_REPOSITORY:"oneduo/nova-file-manager",STATS_D_D:"true",npm_lifecycle_script:"vite build",STATS_UE:"true",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/27.2.12479018",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",GITHUB_REPOSITORY_ID:"505375003",GITHUB_ACTIONS:"true",STATS_PIP:"false",npm_package_version:"0.8.0",npm_lifecycle_event:"build",GITHUB_REF_PROTECTED:"false",GITHUB_WORKSPACE:"/home/runner/work/nova-file-manager/nova-file-manager",ACCEPT_EULA:"Y",GITHUB_JOB:"update",RUNNER_PERFLOG:"/home/runner/perflog",GITHUB_SHA:"42d90f0d180c23c35a75b1622fd54f599f192575",GITHUB_RUN_ATTEMPT:"1",STATS_D_TC:"true",GITHUB_REF:"refs/heads/main",GITHUB_ACTOR:"mikaelpopowicz",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",LEIN_HOME:"/usr/local/lib/lein",npm_config_globalconfig:"/opt/hostedtoolcache/node/18.20.5/x64/etc/npmrc",npm_config_init_module:"/home/runner/.npm-init.js",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_3d8ae53c-5eeb-460e-a0bd-e9e9ee09a1c0",JAVA_HOME:"/usr/lib/jvm/temurin-11-jdk-amd64",PWD:"/home/runner/work/nova-file-manager/nova-file-manager",GITHUB_ACTOR_ID:"5689944",RUNNER_WORKSPACE:"/home/runner/work/nova-file-manager",npm_execpath:"/opt/hostedtoolcache/node/18.20.5/x64/lib/node_modules/npm/bin/npm-cli.js",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",LEIN_JAR:"/usr/local/lib/lein/self-installs/leiningen-2.11.2-standalone.jar",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_3d8ae53c-5eeb-460e-a0bd-e9e9ee09a1c0",npm_config_global_prefix:"/opt/hostedtoolcache/node/18.20.5/x64",TAILWIND_MODE:"build",EDGEWEBDRIVER:"/usr/local/share/edge_driver",STATS_EXT:"true",npm_command:"run-script",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/27.2.12479018",SGX_AESM_ADDR:"1",CHROME_BIN:"/usr/bin/google-chrome",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",STATS_EXTP:"https://provjobdprod.z13.web.core.windows.net/settings/provjobdsettings-latest/provjobd.data",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/27.2.12479018",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_3d8ae53c-5eeb-460e-a0bd-e9e9ee09a1c0",INIT_CWD:"/home/runner/work/nova-file-manager/nova-file-manager",EDITOR:"vi",NODE_ENV:"production"};let dl;const Qa=e=>dl=e,ul=Symbol();function es(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var aa;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(aa||(aa={}));function Wf(){const e=o.effectScope(!0),t=e.run(()=>o.ref({}));let n=[],a=[];const r=o.markRaw({install(i){Qa(r),r._a=i,i.provide(ul,r),i.config.globalProperties.$pinia=r,a.forEach(s=>n.push(s)),a=[]},use(i){return!this._a&&!oa?a.push(i):n.push(i),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return r}const fl=()=>{};function pl(e,t,n,a=fl){e.push(t);const r=()=>{const i=e.indexOf(t);i>-1&&(e.splice(i,1),a())};return!n&&o.getCurrentScope()&&o.onScopeDispose(r),r}function wo(e,...t){e.slice().forEach(n=>{n(...t)})}function ts(e,t){e instanceof Map&&t instanceof Map&&t.forEach((n,a)=>e.set(a,n)),e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const a=t[n],r=e[n];es(r)&&es(a)&&e.hasOwnProperty(n)&&!o.isRef(a)&&!o.isReactive(a)?e[n]=ts(r,a):e[n]=a}return e}const Kf=Symbol();function Xf(e){return!es(e)||!e.hasOwnProperty(Kf)}const{assign:xn}=Object;function Yf(e){return!!(o.isRef(e)&&e.effect)}function Jf(e,t,n,a){const{state:r,actions:i,getters:s}=t,l=n.state.value[e];let c;function d(){!l&&cl.NODE_ENV==="production"&&(n.state.value[e]=r?r():{});const f=o.toRefs(n.state.value[e]);return xn(f,i,Object.keys(s||{}).reduce((p,h)=>(p[h]=o.markRaw(o.computed(()=>{Qa(n);const v=n._s.get(e);return s[h].call(v,v)})),p),{}))}return c=hl(e,d,t,n,a,!0),c}function hl(e,t,n={},a,r,i){let s;const l=xn({actions:{}},n),c={deep:!0};let d,f,p=o.markRaw([]),h=o.markRaw([]),v;const u=a.state.value[e];!i&&!u&&cl.NODE_ENV==="production"&&(a.state.value[e]={}),o.ref({});let m;function y(I){let _;d=f=!1,typeof I=="function"?(I(a.state.value[e]),_={type:aa.patchFunction,storeId:e,events:v}):(ts(a.state.value[e],I),_={type:aa.patchObject,payload:I,storeId:e,events:v});const A=m=Symbol();o.nextTick().then(()=>{m===A&&(d=!0)}),f=!0,wo(p,_,a.state.value[e])}const b=i?function(){const{state:_}=n,A=_?_():{};this.$patch(D=>{xn(D,A)})}:fl;function g(){s.stop(),p=[],h=[],a._s.delete(e)}function T(I,_){return function(){Qa(a);const A=Array.from(arguments),D=[],M=[];function K(H){D.push(H)}function B(H){M.push(H)}wo(h,{args:A,name:I,store:S,after:K,onError:B});let j;try{j=_.apply(this&&this.$id===e?this:S,A)}catch(H){throw wo(M,H),H}return j instanceof Promise?j.then(H=>(wo(D,H),H)).catch(H=>(wo(M,H),Promise.reject(H))):(wo(D,j),j)}}const O={_p:a,$id:e,$onAction:pl.bind(null,h),$patch:y,$reset:b,$subscribe(I,_={}){const A=pl(p,I,_.detached,()=>D()),D=s.run(()=>o.watch(()=>a.state.value[e],M=>{(_.flush==="sync"?f:d)&&I({storeId:e,type:aa.direct,events:v},M)},xn({},c,_)));return A},$dispose:g},S=o.reactive(O);a._s.set(e,S);const N=a._e.run(()=>(s=o.effectScope(),s.run(()=>t())));for(const I in N){const _=N[I];if(o.isRef(_)&&!Yf(_)||o.isReactive(_))i||(u&&Xf(_)&&(o.isRef(_)?_.value=u[I]:ts(_,u[I])),a.state.value[e][I]=_);else if(typeof _=="function"){const A=T(I,_);N[I]=A,l.actions[I]=_}}return xn(S,N),xn(o.toRaw(S),N),Object.defineProperty(S,"$state",{get:()=>a.state.value[e],set:I=>{y(_=>{xn(_,I)})}}),a._p.forEach(I=>{xn(S,s.run(()=>I({store:S,app:a._a,pinia:a,options:l})))}),u&&i&&n.hydrate&&n.hydrate(S.$state,u),d=!0,f=!0,S}function ns(e,t,n){let a,r;const i=typeof t=="function";typeof e=="string"?(a=e,r=i?n:t):(r=e,a=e.id);function s(l,c){const d=o.getCurrentInstance();return l=l||d&&o.inject(ul,null),l&&Qa(l),l=dl,l._s.has(a)||(i?hl(a,t,r,l):Jf(a,r,l)),l._s.get(a)}return s.$id=a,s}function Qf(e,t){return Array.isArray(t)?t.reduce((n,a)=>(n[a]=function(){return e(this.$pinia)[a]},n),{}):Object.keys(t).reduce((n,a)=>(n[a]=function(){const r=e(this.$pinia),i=t[a];return typeof i=="function"?i.call(this,r):r[i]},n),{})}function Zf(e,t){return Array.isArray(t)?t.reduce((n,a)=>(n[a]=function(...r){return e(this.$pinia)[a](...r)},n),{}):Object.keys(t).reduce((n,a)=>(n[a]=function(...r){return e(this.$pinia)[t[a]](...r)},n),{})}function qf(e){{e=o.toRaw(e);const t={};for(const n in e){const a=e[n];(o.isRef(a)||o.isReactive(a))&&(t[n]=o.toRef(e,n))}return t}}function $f(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o.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"})])}function ep(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"})])}function Za(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4.5 12.75l6 6 9-13.5"})])}function ml(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})])}function os(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})])}function tp(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8.25 7.5V6.108c0-1.135.845-2.098 1.976-2.192.373-.03.748-.057 1.123-.08M15.75 18H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08M15.75 18.75v-1.875a3.375 3.375 0 00-3.375-3.375h-1.5a1.125 1.125 0 01-1.125-1.125v-1.5A3.375 3.375 0 006.375 7.5H5.25m11.9-3.664A2.251 2.251 0 0015 2.25h-1.5a2.251 2.251 0 00-2.15 1.586m5.8 0c.065.21.1.433.1.664v.75h-6V4.5c0-.231.035-.454.1-.664M6.75 7.5H4.875c-.621 0-1.125.504-1.125 1.125v12c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V16.5a9 9 0 00-9-9z"})])}function np(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9.75v6.75m0 0l-3-3m3 3l3-3m-8.25 6a4.5 4.5 0 01-1.41-8.775 5.25 5.25 0 0110.233-2.33 3 3 0 013.758 3.848A3.752 3.752 0 0118 19.5H6.75z"})])}function as(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 16.5V9.75m0 0l3 3m-3-3l-3 3M6.75 19.5a4.5 4.5 0 01-1.41-8.775 5.25 5.25 0 0110.233-2.33 3 3 0 013.758 3.848A3.752 3.752 0 0118 19.5H6.75z"})])}function op(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M2.25 15a4.5 4.5 0 004.5 4.5H18a3.75 3.75 0 001.332-7.257 3 3 0 00-3.758-3.848 5.25 5.25 0 00-10.233 2.33A4.502 4.502 0 002.25 15z"})])}function ra(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o.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.25m2.25 0H5.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"})])}function vl(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z"})])}function gl(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"})])}function ap(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o.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"})])}function rs(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M2.25 12.75V12A2.25 2.25 0 014.5 9.75h15A2.25 2.25 0 0121.75 12v.75m-8.69-6.44l-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"})])}function rp(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M2.25 12l8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25"})])}function sp(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M16.712 4.33a9.027 9.027 0 011.652 1.306c.51.51.944 1.064 1.306 1.652M16.712 4.33l-3.448 4.138m3.448-4.138a9.014 9.014 0 00-9.424 0M19.67 7.288l-4.138 3.448m4.138-3.448a9.014 9.014 0 010 9.424m-4.138-5.976a3.736 3.736 0 00-.88-1.388 3.737 3.737 0 00-1.388-.88m2.268 2.268a3.765 3.765 0 010 2.528m-2.268-4.796a3.765 3.765 0 00-2.528 0m4.796 4.796c-.181.506-.475.982-.88 1.388a3.736 3.736 0 01-1.388.88m2.268-2.268l4.138 3.448m0 0a9.027 9.027 0 01-1.306 1.652c-.51.51-1.064.944-1.652 1.306m0 0l-3.448-4.138m3.448 4.138a9.014 9.014 0 01-9.424 0m5.976-4.138a3.765 3.765 0 01-2.528 0m0 0a3.736 3.736 0 01-1.388-.88 3.737 3.737 0 01-.88-1.388m2.268 2.268L7.288 19.67m0 0a9.024 9.024 0 01-1.652-1.306 9.027 9.027 0 01-1.306-1.652m0 0l4.138-3.448M4.33 16.712a9.014 9.014 0 010-9.424m4.138 5.976a3.765 3.765 0 010-2.528m0 0c.181-.506.475-.982.88-1.388a3.736 3.736 0 011.388-.88m-2.268 2.268L4.33 7.288m6.406 1.18L7.288 4.33m0 0a9.024 9.024 0 00-1.652 1.306A9.025 9.025 0 004.33 7.288"})])}function ip(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o.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"})])}function lp(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o.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"})])}function cp(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"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"})])}function dp(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"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"})])}function bl(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o.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"})])}function ss(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})])}function yl(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"fill-rule":"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm13.36-1.814a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z","clip-rule":"evenodd"})])}function up(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"fill-rule":"evenodd",d:"M19.916 4.626a.75.75 0 01.208 1.04l-9 13.5a.75.75 0 01-1.154.114l-6-6a.75.75 0 011.06-1.06l5.353 5.353 8.493-12.739a.75.75 0 011.04-.208z","clip-rule":"evenodd"})])}function fp(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"fill-rule":"evenodd",d:"M12.53 16.28a.75.75 0 01-1.06 0l-7.5-7.5a.75.75 0 011.06-1.06L12 14.69l6.97-6.97a.75.75 0 111.06 1.06l-7.5 7.5z","clip-rule":"evenodd"})])}function pp(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"fill-rule":"evenodd",d:"M7.72 12.53a.75.75 0 010-1.06l7.5-7.5a.75.75 0 111.06 1.06L9.31 12l6.97 6.97a.75.75 0 11-1.06 1.06l-7.5-7.5z","clip-rule":"evenodd"})])}function hp(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"fill-rule":"evenodd",d:"M16.28 11.47a.75.75 0 010 1.06l-7.5 7.5a.75.75 0 01-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 011.06-1.06l7.5 7.5z","clip-rule":"evenodd"})])}function mp(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.5 12a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0zm6 0a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0zm6 0a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0z","clip-rule":"evenodd"})])}function vp(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"fill-rule":"evenodd",d:"M10.5 6a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0zm0 6a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0zm0 6a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0z","clip-rule":"evenodd"})])}function El(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"fill-rule":"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z","clip-rule":"evenodd"})])}function gp(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"fill-rule":"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z","clip-rule":"evenodd"})])}function bp(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.5 5.653c0-1.426 1.529-2.33 2.779-1.643l11.54 6.348c1.295.712 1.295 2.573 0 3.285L7.28 19.991c-1.25.687-2.779-.217-2.779-1.643V5.653z","clip-rule":"evenodd"})])}function yp(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"fill-rule":"evenodd",d:"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25zm-1.72 6.97a.75.75 0 10-1.06 1.06L10.94 12l-1.72 1.72a.75.75 0 101.06 1.06L12 13.06l1.72 1.72a.75.75 0 101.06-1.06L13.06 12l1.72-1.72a.75.75 0 10-1.06-1.06L12 10.94l-1.72-1.72z","clip-rule":"evenodd"})])}const is=(e,t)=>{const n=e.__vccOpts||e;for(const[a,r]of t)n[a]=r;return n},Ep={},wp={class:"text-gray-200 animate-spin dark:text-gray-600 fill-blue-600",fill:"none",viewBox:"0 0 100 101",xmlns:"http://www.w3.org/2000/svg"},xp=[o.createElementVNode("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"},null,-1),o.createElementVNode("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"},null,-1)];function Sp(e,t){return o.openBlock(),o.createElementBlock("svg",wp,xp)}const xo=is(Ep,[["render",Sp]]),wl=o.defineComponent({__name:"ImageLoader",props:{src:{},alt:{},isThumbnail:{type:Boolean,default:!0}},emits:["missing"],setup(e,{emit:t}){const n=e,a=t,r=o.ref(!0),i=o.ref(!1),s=o.ref();return o.onMounted(()=>{new Promise((l,c)=>{let d=new Image;d.addEventListener("load",()=>l(d)),d.addEventListener("error",f=>c(f)),d.src=n.src}).then(l=>{l.className="pointer-events-none w-full h-full",l.classList.add(n.isThumbnail?"object-cover":"object-contain"),l.draggable=!1,s.value?.appendChild(l)}).catch(()=>{i.value=!0,a("missing",!0)}).finally(()=>{r.value=!1})}),(l,c)=>(o.openBlock(),o.createElementBlock("div",{class:"flex justify-center items-center h-full max-h-[80vh]",ref_key:"card",ref:s},[r.value?(o.openBlock(),o.createBlock(xo,{key:0,class:"w-6 h-6"})):o.createCommentVNode("",!0)],512))}}),Op=["title"],Tp={key:0,class:"absolute z-40 inset-0 flex justify-center items-center w-full h-full"},Cp={key:1,class:"absolute inset-0 w-full h-full bg-gray-100/50 dark:bg-gray-800/50"},Np={key:2,class:"absolute inset-0 flex flex-row items-center justify-center text-sm font-bold text-gray-600 dark:text-gray-100"},kp={class:"m-auto z-20 flex h-full items-center justify-center select-none"},Ip={key:0,class:"m-auto flex h-full w-full items-center justify-center bg-gray-50 dark:bg-gray-900 text-red-500"},_p={key:0,class:"m-auto flex h-full w-full items-center justify-center bg-gray-50 dark:bg-gray-900 text-gray-500 dark:text-gray-600"},Ap={class:"pointer-events-none w-full h-full object-cover"},Dp=["src"],Rp={key:0,class:"absolute m-auto flex items-center justify-center bg-transparent"},Pp={key:3,class:"absolute right-1 top-1"},Bp=["title"],Mp={key:1,class:"text-sm text-red-500 font-semibold text-left break-all"},Fp={class:"gap-x-0.5 inline-flex flex-wrap items-center text-xs pointer-events-none block font-medium text-gray-500 text-left break-all"},Lp={key:0},jp={key:1,class:"ml-0.5"},Vp={key:2,class:"absolute top-1 right-1"},ls=o.defineComponent({__name:"File",props:{file:{},isUploading:{type:Boolean},isUploaded:{type:Boolean},uploadRatio:{},selected:{type:Boolean,default:!1},onDeselect:{},singleDisk:{type:Boolean},fieldMode:{type:Boolean}},setup(e){const t=e,n=o.computed(()=>t.file.type==="image"),a=o.computed(()=>t.file.type==="video"),r=o.computed(()=>t.file.type!=="image"&&t.file.type!=="video"),i=o.computed(()=>!t.file.exists),s=o.computed(()=>i.value?t.file.path:t.file.name);return(l,c)=>(o.openBlock(),o.createElementBlock("button",{class:"relative cursor-pointer group focus-visible:outline-none flex flex-col items-start",title:s.value},[o.createElementVNode("div",{class:o.normalizeClass(["relative block aspect-square w-full h-full overflow-hidden rounded-lg hover:shadow-md hover:opacity-75 border border-gray-200/50 dark:border-gray-700/50 text-left","group-focus-visible:outline group-focus-visible:outline-2 group-focus-visible:outline-black dark:group-focus-visible:outline-white",l.selected?"outline outline-2 outline-blue-500 group-focus-visible:outline-blue-500":""])},[l.isUploading?(o.openBlock(),o.createElementBlock("div",Tp,[l.isUploaded===null?(o.openBlock(),o.createBlock(xo,{key:0,class:"w-16 h-16"})):l.isUploaded===!1?(o.openBlock(),o.createBlock(o.unref(El),{key:1,class:"w-16 h-16 text-red-500"})):l.isUploaded===!0?(o.openBlock(),o.createBlock(o.unref(yl),{key:2,class:"w-16 h-16 text-green-500"})):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0),l.isUploading?(o.openBlock(),o.createElementBlock("div",Cp)):o.createCommentVNode("",!0),l.isUploading&&l.isUploaded===null?(o.openBlock(),o.createElementBlock("div",Np,[o.createElementVNode("span",null,o.toDisplayString(l.uploadRatio)+"%",1)])):o.createCommentVNode("",!0),o.createElementVNode("div",kp,[i.value&&!l.isUploading?(o.openBlock(),o.createElementBlock("div",Ip,[o.createVNode(o.unref(gp),{class:"w-16 h-16"})])):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[r.value?(o.openBlock(),o.createElementBlock("div",_p,[l.isUploading?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(ra),{key:0,class:"w-16 h-16"}))])):o.createCommentVNode("",!0),n.value?(o.openBlock(),o.createBlock(wl,{key:1,src:l.file.url,alt:l.file.name},null,8,["src","alt"])):o.createCommentVNode("",!0),a.value?(o.openBlock(),o.createElementBlock(o.Fragment,{key:2},[o.createElementVNode("video",Ap,[o.createElementVNode("source",{src:l.file.url},null,8,Dp),o.createTextVNode(" "+o.toDisplayString(l.__("Sorry, your browser doesn't support embedded videos.")),1)]),l.isUploading?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",Rp,[o.createVNode(o.unref(bp),{class:"h-16 w-16 text-white/60"})]))],64)):o.createCommentVNode("",!0)],64))]),l.onDeselect?(o.openBlock(),o.createElementBlock("div",Pp,[l.onDeselect?(o.openBlock(),o.createElementBlock("button",{key:0,onClick:c[0]||(c[0]=d=>l.onDeselect(l.file)),class:"text-red-500 hover:text-red-600 rounded-full"},[o.createVNode(o.unref(yp),{class:"h-6 w-6"})])):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0)],2),!i.value||l.isUploading?(o.openBlock(),o.createElementBlock("p",{key:0,class:o.normalizeClass(["pointer-events-none mt-2 block truncate font-medium text-gray-900 dark:text-gray-50 text-left w-full",l.isUploading||l.onDeselect?"text-xs":"text-sm"]),title:l.isUploading?l.file.name:s.value},o.toDisplayString(l.isUploading?l.file.name:s.value),11,Bp)):o.createCommentVNode("",!0),i.value&&!l.isUploading?(o.openBlock(),o.createElementBlock("p",Mp,o.toDisplayString(l.__("NovaFileManager.fileMissing",{path:l.file.path})),1)):o.createCommentVNode("",!0),o.createElementVNode("div",Fp,[l.file.size?(o.openBlock(),o.createElementBlock("span",Lp,o.toDisplayString(l.file.size),1)):o.createCommentVNode("",!0),l.fieldMode&&!l.singleDisk&&l.file.disk?.length>0?(o.openBlock(),o.createElementBlock("span",jp,"ยท "+o.toDisplayString(l.file.disk),1)):o.createCommentVNode("",!0)]),l.selected?(o.openBlock(),o.createElementBlock("span",Vp,[o.createVNode(o.unref(yl),{class:"h-5 w-5 text-blue-500","aria-hidden":"true"})])):o.createCommentVNode("",!0)],8,Op))}});var So=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Sn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Up(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function a(){return this instanceof a?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(a){var r=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(n,a,r.get?r:{enumerable:!0,get:function(){return e[a]}})}),n}var Hp=Math.ceil,zp=Math.max;function Gp(e,t,n,a){for(var r=-1,i=zp(Hp((t-e)/(n||1)),0),s=Array(i);i--;)s[a?i:++r]=e,e+=n;return s}var Wp=Gp;function Kp(e,t){return e===t||e!==e&&t!==t}var cs=Kp,Xp=typeof So=="object"&&So&&So.Object===Object&&So,xl=Xp,Yp=xl,Jp=typeof self=="object"&&self&&self.Object===Object&&self,Qp=Yp||Jp||Function("return this")(),Vt=Qp,Zp=Vt,qp=Zp.Symbol,sa=qp,Sl=sa,Ol=Object.prototype,$p=Ol.hasOwnProperty,eh=Ol.toString,ia=Sl?Sl.toStringTag:void 0;function th(e){var t=$p.call(e,ia),n=e[ia];try{e[ia]=void 0;var a=!0}catch{}var r=eh.call(e);return a&&(t?e[ia]=n:delete e[ia]),r}var nh=th,oh=Object.prototype,ah=oh.toString;function rh(e){return ah.call(e)}var sh=rh,Tl=sa,ih=nh,lh=sh,ch="[object Null]",dh="[object Undefined]",Cl=Tl?Tl.toStringTag:void 0;function uh(e){return e==null?e===void 0?dh:ch:Cl&&Cl in Object(e)?ih(e):lh(e)}var Oo=uh;function fh(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var On=fh,ph=Oo,hh=On,mh="[object AsyncFunction]",vh="[object Function]",gh="[object GeneratorFunction]",bh="[object Proxy]";function yh(e){if(!hh(e))return!1;var t=ph(e);return t==vh||t==gh||t==mh||t==bh}var Nl=yh,Eh=9007199254740991;function wh(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Eh}var kl=wh,xh=Nl,Sh=kl;function Oh(e){return e!=null&&Sh(e.length)&&!xh(e)}var ds=Oh,Th=9007199254740991,Ch=/^(?:0|[1-9]\d*)$/;function Nh(e,t){var n=typeof e;return t=t??Th,!!t&&(n=="number"||n!="symbol"&&Ch.test(e))&&e>-1&&e%1==0&&e0){var _=!1;for(var A in b.fileType){var D="."+b.fileType[A];if(I.toLowerCase().indexOf(D.toLowerCase(),I.length-D.length)!==-1){_=!0;break}}if(!_)return b.fileTypeErrorCallback(N,y++),!1}if(typeof b.minFileSize<"u"&&N.sizeb.maxFileSize)return b.maxFileSizeErrorCallback(N,y++),!1;function M(B){a.getFromUniqueIdentifier(B)?T.push(N):function(){N.uniqueIdentifier=B;var j=new h(a,N,B);a.files.push(j),g.push(j),j.container=typeof m<"u"?m.srcElement:null,window.setTimeout(function(){a.fire("fileAdded",j,m)},0)}(),S()}var K=r.generateUniqueIdentifier(N,m);K&&typeof K.then=="function"?K.then(function(B){M(B)},function(){S()}):M(K)})};function h(u,m,y){var b=this;b.opts={},b.getOpt=u.getOpt,b._prevProgress=0,b.resumableObj=u,b.file=m,b.fileName=m.fileName||m.name,b.size=m.size,b.relativePath=m.relativePath||m.webkitRelativePath||b.fileName,b.uniqueIdentifier=y,b._pause=!1,b.container="";var g=y!==void 0,T=function(O,S){switch(O){case"progress":b.resumableObj.fire("fileProgress",b,S);break;case"error":b.abort(),g=!0,b.chunks=[],b.resumableObj.fire("fileError",b,S);break;case"success":if(g)return;b.resumableObj.fire("fileProgress",b),b.isComplete()&&b.resumableObj.fire("fileSuccess",b,S);break;case"retry":b.resumableObj.fire("fileRetry",b);break}};return b.chunks=[],b.abort=function(){var O=0;r.each(b.chunks,function(S){S.status()=="uploading"&&(S.abort(),O++)}),O>0&&b.resumableObj.fire("fileProgress",b)},b.cancel=function(){var O=b.chunks;b.chunks=[],r.each(O,function(S){S.status()=="uploading"&&(S.abort(),b.resumableObj.uploadNextChunk())}),b.resumableObj.removeFile(b),b.resumableObj.fire("fileProgress",b)},b.retry=function(){b.bootstrap();var O=!1;b.resumableObj.on("chunkingComplete",function(){O||b.resumableObj.upload(),O=!0})},b.bootstrap=function(){b.abort(),g=!1,b.chunks=[],b._prevProgress=0;for(var O=b.getOpt("forceChunkSize")?Math.ceil:Math.floor,S=Math.max(O(b.file.size/b.getOpt("chunkSize")),1),N=0;N.99999?1:O,O=Math.max(b._prevProgress,O),b._prevProgress=O,O},b.isUploading=function(){var O=!1;return r.each(b.chunks,function(S){if(S.status()=="uploading")return O=!0,!1}),O},b.isComplete=function(){var O=!1;return r.each(b.chunks,function(S){var N=S.status();if(N=="pending"||N=="uploading"||S.preprocessState===1)return O=!0,!1}),!O},b.pause=function(O){typeof O>"u"?b._pause=!b._pause:b._pause=O},b.isPaused=function(){return b._pause},b.resumableObj.fire("chunkingStart",b),b.bootstrap(),this}function v(u,m,y,b){var g=this;g.opts={},g.getOpt=u.getOpt,g.resumableObj=u,g.fileObj=m,g.fileObjSize=m.size,g.fileObjType=m.file.type,g.offset=y,g.callback=b,g.lastProgressCallback=new Date,g.tested=!1,g.retries=0,g.pendingRetry=!1,g.preprocessState=0;var T=g.getOpt("chunkSize");return g.loaded=0,g.startByte=g.offset*T,g.endByte=Math.min(g.fileObjSize,(g.offset+1)*T),g.fileObjSize-g.endByteg.getOpt("throttleProgressCallbacks")*1e3&&(g.callback("progress"),g.lastProgressCallback=new Date),g.loaded=Q.loaded||0},!1),g.loaded=0,g.pendingRetry=!1,g.callback("progress");var S=function(Q){var ne=g.status();if(ne=="success"||ne=="error")g.callback(ne,g.message()),g.resumableObj.uploadNextChunk();else{g.callback("retry",g.message()),g.abort(),g.retries++;var we=g.getOpt("chunkRetryInterval");we!==void 0?(g.pendingRetry=!0,setTimeout(g.send,we)):g.send()}};g.xhr.addEventListener("load",S,!1),g.xhr.addEventListener("error",S,!1),g.xhr.addEventListener("timeout",S,!1);var N=[["chunkNumberParameterName",g.offset+1],["chunkSizeParameterName",g.getOpt("chunkSize")],["currentChunkSizeParameterName",g.endByte-g.startByte],["totalSizeParameterName",g.fileObjSize],["typeParameterName",g.fileObjType],["identifierParameterName",g.fileObj.uniqueIdentifier],["fileNameParameterName",g.fileObj.fileName],["relativePathParameterName",g.fileObj.relativePath],["totalChunksParameterName",g.fileObj.chunks.length]].filter(function(Q){return g.getOpt(Q[0])}).reduce(function(Q,ne){return Q[g.getOpt(ne[0])]=ne[1],Q},{}),I=g.getOpt("query");typeof I=="function"&&(I=I(g.fileObj,g)),r.each(I,function(Q,ne){N[Q]=ne});var _=g.fileObj.file.slice?"slice":g.fileObj.file.mozSlice?"mozSlice":g.fileObj.file.webkitSlice?"webkitSlice":"slice",A=g.fileObj.file[_](g.startByte,g.endByte,g.getOpt("setChunkTypeFromFile")?g.fileObj.file.type:""),D=null,M=[],K=g.getOpt("parameterNamespace");if(g.getOpt("method")==="octet")D=A,r.each(N,function(Q,ne){M.push([encodeURIComponent(K+Q),encodeURIComponent(ne)].join("="))});else if(D=new FormData,r.each(N,function(Q,ne){D.append(K+Q,ne),M.push([encodeURIComponent(K+Q),encodeURIComponent(ne)].join("="))}),g.getOpt("chunkFormat")=="blob")D.append(K+g.getOpt("fileParameterName"),A,g.fileObj.fileName);else if(g.getOpt("chunkFormat")=="base64"){var B=new FileReader;B.onload=function(Q){D.append(K+g.getOpt("fileParameterName"),B.result),g.xhr.send(D)},B.readAsDataURL(A)}var j=r.getTarget("upload",M),H=g.getOpt("uploadMethod");g.xhr.open(H,j),g.getOpt("method")==="octet"&&g.xhr.setRequestHeader("Content-Type","application/octet-stream"),g.xhr.timeout=g.getOpt("xhrTimeout"),g.xhr.withCredentials=g.getOpt("withCredentials");var W=g.getOpt("headers");typeof W=="function"&&(W=W(g.fileObj,g)),r.each(W,function(Q,ne){g.xhr.setRequestHeader(Q,ne)}),g.getOpt("chunkFormat")=="blob"&&g.xhr.send(D)},g.abort=function(){g.xhr&&g.xhr.abort(),g.xhr=null},g.status=function(){return g.pendingRetry?"uploading":g.xhr?g.xhr.readyState<4?"uploading":g.xhr.status==200||g.xhr.status==201?"success":r.contains(g.getOpt("permanentErrors"),g.xhr.status)||g.retries>=g.getOpt("maxChunkRetries")?"error":(g.abort(),"pending"):"pending"},g.message=function(){return g.xhr?g.xhr.responseText:""},g.progress=function(O){typeof O>"u"&&(O=!1);var S=O?(g.endByte-g.startByte)/g.fileObjSize:1;if(g.pendingRetry)return 0;(!g.xhr||!g.xhr.status)&&(S*=.95);var N=g.status();switch(N){case"success":case"error":return 1*S;case"pending":return 0*S;default:return g.loaded/(g.endByte-g.startByte)*S}},this}return a.uploadNextChunk=function(){var u=!1;if(a.getOpt("prioritizeFirstAndLastChunk")&&(r.each(a.files,function(y){if(y.chunks.length&&y.chunks[0].status()=="pending"&&y.chunks[0].preprocessState===0)return y.chunks[0].send(),u=!0,!1;if(y.chunks.length>1&&y.chunks[y.chunks.length-1].status()=="pending"&&y.chunks[y.chunks.length-1].preprocessState===0)return y.chunks[y.chunks.length-1].send(),u=!0,!1}),u)||(r.each(a.files,function(y){if(y.isPaused()===!1&&r.each(y.chunks,function(b){if(b.status()=="pending"&&b.preprocessState===0)return b.send(),u=!0,!1}),u)return!1}),u))return!0;var m=!1;return r.each(a.files,function(y){if(!y.isComplete())return m=!0,!1}),m||a.fire("complete"),!1},a.assignBrowse=function(u,m){typeof u.length>"u"&&(u=[u]),r.each(u,function(y){var b;y.tagName==="INPUT"&&y.type==="file"?b=y:(b=document.createElement("input"),b.setAttribute("type","file"),b.style.display="none",y.addEventListener("click",function(){b.style.opacity=0,b.style.display="block",b.focus(),b.click(),b.style.display="none"},!1),y.appendChild(b));var g=a.getOpt("maxFiles");typeof g>"u"||g!=1?b.setAttribute("multiple","multiple"):b.removeAttribute("multiple"),m?b.setAttribute("webkitdirectory","webkitdirectory"):b.removeAttribute("webkitdirectory");var T=a.getOpt("fileType");typeof T<"u"&&T.length>=1?b.setAttribute("accept",T.map(function(O){return"."+O}).join(",")):b.removeAttribute("accept"),b.addEventListener("change",function(O){p(O.target.files,O);var S=a.getOpt("clearInput");S&&(O.target.value="")},!1)})},a.assignDrop=function(u){typeof u.length>"u"&&(u=[u]),r.each(u,function(m){m.addEventListener("dragover",s,!1),m.addEventListener("dragenter",s,!1),m.addEventListener("drop",i,!1)})},a.unAssignDrop=function(u){typeof u.length>"u"&&(u=[u]),r.each(u,function(m){m.removeEventListener("dragover",s),m.removeEventListener("dragenter",s),m.removeEventListener("drop",i)})},a.isUploading=function(){var u=!1;return r.each(a.files,function(m){if(m.isUploading())return u=!0,!1}),u},a.upload=function(){if(!a.isUploading()){a.fire("uploadStart");for(var u=1;u<=a.getOpt("simultaneousUploads");u++)a.uploadNextChunk()}},a.pause=function(){r.each(a.files,function(u){u.abort()}),a.fire("pause")},a.cancel=function(){a.fire("beforeCancel");for(var u=a.files.length-1;u>=0;u--)a.files[u].cancel();a.fire("cancel")},a.progress=function(){var u=0,m=0;return r.each(a.files,function(y){u+=y.progress()*y.size,m+=y.size}),m>0?u/m:0},a.addFile=function(u,m){p([u],m)},a.addFiles=function(u,m){p(u,m)},a.removeFile=function(u){for(var m=a.files.length-1;m>=0;m--)a.files[m]===u&&a.files.splice(m,1)},a.getFromUniqueIdentifier=function(u){var m=!1;return r.each(a.files,function(y){y.uniqueIdentifier==u&&(m=y)}),m},a.getSize=function(){var u=0;return r.each(a.files,function(m){u+=m.size}),u},a.handleDropEvent=function(u){i(u)},a.handleChangeEvent=function(u){p(u.target.files,u),u.target.value=""},a.updateQuery=function(u){a.opts.query=u},this};e.exports=t})()})(Pl);var dm=Pl.exports;const um=Sn(dm),la="queue",ps="preview",fm="upload",Tn="upload-crop",hs="browser",pm="folder",hm="KeyK",ms={folders:"#",files:">",help:"?"},mm=["setDisk","setPath","setPerPage","setPage","setSearch","upload","renameFile","deleteFiles","unzipFile","createFolder","renameFolder","deleteFolder"],Qt={CREATE_FOLDER:"createFolder",RENAME_FOLDER:"renameFolder",DELETE_FOLDER:"deleteFolder",RENAME_FILE:"renameFile",DELETE_FILE:"deleteFile",UNZIP_FILE:"unzipFile"},Ut={CREATE_FOLDER:"createFolder",DELETE_FILES:"deleteFiles",DELETE_FOLDER:"deleteFolder",RENAME_FILE:"renameFile",RENAME_FOLDER:"renameFolder",UNZIP_FILE:"unzipFile"},ln={CREATE_FOLDER:"/folders/create",DELETE_FILE:"/files/delete",DELETE_FOLDER:"/folders/delete",DISKS:"/disks",DOWNLOAD_FILE:"/files/download",RENAME_FILE:"/files/rename",RENAME_FOLDER:"/folders/rename",UNZIP_FILE:"/files/unzip",UPLOAD:"/nova-vendor/nova-file-manager/files/upload"};async function To({operation:e,endpoint:t,data:n,modal:a,callback:r}){const i=Re(),s=i.post,l=i.setError,c=i.resetError,d=i.closeModal;try{i.loadingOperation=e;const f=await s({path:t,data:n});c(),window.Nova.success(f.data.message),r&&r(f),a&&d({name:a})}catch(f){i.loadingOperation=void 0;const p=f.response?.data;window.Nova.error(p?.message||"An error occurred"),l({attribute:e,bag:p})}}function Bl(e,t){return function(){return e.apply(t,arguments)}}const{toString:vm}=Object.prototype,{getPrototypeOf:vs}=Object,$a=(e=>t=>{const n=vm.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Zt=e=>(e=e.toLowerCase(),t=>$a(t)===e),er=e=>t=>typeof t===e,{isArray:Co}=Array,ca=er("undefined");function gm(e){return e!==null&&!ca(e)&&e.constructor!==null&&!ca(e.constructor)&&It(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ml=Zt("ArrayBuffer");function bm(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ml(e.buffer),t}const ym=er("string"),It=er("function"),Fl=er("number"),tr=e=>e!==null&&typeof e=="object",Em=e=>e===!0||e===!1,nr=e=>{if($a(e)!=="object")return!1;const t=vs(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},wm=Zt("Date"),xm=Zt("File"),Sm=Zt("Blob"),Om=Zt("FileList"),Tm=e=>tr(e)&&It(e.pipe),Cm=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||It(e.append)&&((t=$a(e))==="formdata"||t==="object"&&It(e.toString)&&e.toString()==="[object FormData]"))},Nm=Zt("URLSearchParams"),km=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function da(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let a,r;if(typeof e!="object"&&(e=[e]),Co(e))for(a=0,r=e.length;a0;)if(r=n[a],t===r.toLowerCase())return r;return null}const jl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Vl=e=>!ca(e)&&e!==jl;function gs(){const{caseless:e}=Vl(this)&&this||{},t={},n=(a,r)=>{const i=e&&Ll(t,r)||r;nr(t[i])&&nr(a)?t[i]=gs(t[i],a):nr(a)?t[i]=gs({},a):Co(a)?t[i]=a.slice():t[i]=a};for(let a=0,r=arguments.length;a(da(t,(r,i)=>{n&&It(r)?e[i]=Bl(r,n):e[i]=r},{allOwnKeys:a}),e),_m=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Am=(e,t,n,a)=>{e.prototype=Object.create(t.prototype,a),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Dm=(e,t,n,a)=>{let r,i,s;const l={};if(t=t||{},e==null)return t;do{for(r=Object.getOwnPropertyNames(e),i=r.length;i-- >0;)s=r[i],(!a||a(s,e,t))&&!l[s]&&(t[s]=e[s],l[s]=!0);e=n!==!1&&vs(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Rm=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const a=e.indexOf(t,n);return a!==-1&&a===n},Pm=e=>{if(!e)return null;if(Co(e))return e;let t=e.length;if(!Fl(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Bm=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&vs(Uint8Array)),Mm=(e,t)=>{const a=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=a.next())&&!r.done;){const i=r.value;t.call(e,i[0],i[1])}},Fm=(e,t)=>{let n;const a=[];for(;(n=e.exec(t))!==null;)a.push(n);return a},Lm=Zt("HTMLFormElement"),jm=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,a,r){return a.toUpperCase()+r}),Ul=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Vm=Zt("RegExp"),Hl=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),a={};da(n,(r,i)=>{let s;(s=t(r,i,e))!==!1&&(a[i]=s||r)}),Object.defineProperties(e,a)},Um=e=>{Hl(e,(t,n)=>{if(It(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const a=e[n];if(It(a)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Hm=(e,t)=>{const n={},a=r=>{r.forEach(i=>{n[i]=!0})};return Co(e)?a(e):a(String(e).split(t)),n},zm=()=>{},Gm=(e,t)=>(e=+e,Number.isFinite(e)?e:t),bs="abcdefghijklmnopqrstuvwxyz",zl="0123456789",Gl={DIGIT:zl,ALPHA:bs,ALPHA_DIGIT:bs+bs.toUpperCase()+zl},Wm=(e=16,t=Gl.ALPHA_DIGIT)=>{let n="";const{length:a}=t;for(;e--;)n+=t[Math.random()*a|0];return n};function Km(e){return!!(e&&It(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Xm=e=>{const t=new Array(10),n=(a,r)=>{if(tr(a)){if(t.indexOf(a)>=0)return;if(!("toJSON"in a)){t[r]=a;const i=Co(a)?[]:{};return da(a,(s,l)=>{const c=n(s,r+1);!ca(c)&&(i[l]=c)}),t[r]=void 0,i}}return a};return n(e,0)},Ym=Zt("AsyncFunction"),X={isArray:Co,isArrayBuffer:Ml,isBuffer:gm,isFormData:Cm,isArrayBufferView:bm,isString:ym,isNumber:Fl,isBoolean:Em,isObject:tr,isPlainObject:nr,isUndefined:ca,isDate:wm,isFile:xm,isBlob:Sm,isRegExp:Vm,isFunction:It,isStream:Tm,isURLSearchParams:Nm,isTypedArray:Bm,isFileList:Om,forEach:da,merge:gs,extend:Im,trim:km,stripBOM:_m,inherits:Am,toFlatObject:Dm,kindOf:$a,kindOfTest:Zt,endsWith:Rm,toArray:Pm,forEachEntry:Mm,matchAll:Fm,isHTMLForm:Lm,hasOwnProperty:Ul,hasOwnProp:Ul,reduceDescriptors:Hl,freezeMethods:Um,toObjectSet:Hm,toCamelCase:jm,noop:zm,toFiniteNumber:Gm,findKey:Ll,global:jl,isContextDefined:Vl,ALPHABET:Gl,generateString:Wm,isSpecCompliantForm:Km,toJSONObject:Xm,isAsyncFn:Ym,isThenable:e=>e&&(tr(e)||It(e))&&It(e.then)&&It(e.catch)};function Ce(e,t,n,a,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),a&&(this.request=a),r&&(this.response=r)}X.inherits(Ce,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:X.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Wl=Ce.prototype,Kl={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Kl[e]={value:e}}),Object.defineProperties(Ce,Kl),Object.defineProperty(Wl,"isAxiosError",{value:!0}),Ce.from=(e,t,n,a,r,i)=>{const s=Object.create(Wl);return X.toFlatObject(e,s,function(c){return c!==Error.prototype},l=>l!=="isAxiosError"),Ce.call(s,e.message,t,n,a,r),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const Jm=null;function ys(e){return X.isPlainObject(e)||X.isArray(e)}function Xl(e){return X.endsWith(e,"[]")?e.slice(0,-2):e}function Yl(e,t,n){return e?e.concat(t).map(function(r,i){return r=Xl(r),!n&&i?"["+r+"]":r}).join(n?".":""):t}function Qm(e){return X.isArray(e)&&!e.some(ys)}const Zm=X.toFlatObject(X,{},null,function(t){return/^is[A-Z]/.test(t)});function or(e,t,n){if(!X.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=X.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,y){return!X.isUndefined(y[m])});const a=n.metaTokens,r=n.visitor||f,i=n.dots,s=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&X.isSpecCompliantForm(t);if(!X.isFunction(r))throw new TypeError("visitor must be a function");function d(u){if(u===null)return"";if(X.isDate(u))return u.toISOString();if(!c&&X.isBlob(u))throw new Ce("Blob is not supported. Use a Buffer instead.");return X.isArrayBuffer(u)||X.isTypedArray(u)?c&&typeof Blob=="function"?new Blob([u]):Buffer.from(u):u}function f(u,m,y){let b=u;if(u&&!y&&typeof u=="object"){if(X.endsWith(m,"{}"))m=a?m:m.slice(0,-2),u=JSON.stringify(u);else if(X.isArray(u)&&Qm(u)||(X.isFileList(u)||X.endsWith(m,"[]"))&&(b=X.toArray(u)))return m=Xl(m),b.forEach(function(T,O){!(X.isUndefined(T)||T===null)&&t.append(s===!0?Yl([m],O,i):s===null?m:m+"[]",d(T))}),!1}return ys(u)?!0:(t.append(Yl(y,m,i),d(u)),!1)}const p=[],h=Object.assign(Zm,{defaultVisitor:f,convertValue:d,isVisitable:ys});function v(u,m){if(!X.isUndefined(u)){if(p.indexOf(u)!==-1)throw Error("Circular reference detected in "+m.join("."));p.push(u),X.forEach(u,function(b,g){(!(X.isUndefined(b)||b===null)&&r.call(t,b,X.isString(g)?g.trim():g,m,h))===!0&&v(b,m?m.concat(g):[g])}),p.pop()}}if(!X.isObject(e))throw new TypeError("data must be an object");return v(e),t}function Jl(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(a){return t[a]})}function Es(e,t){this._pairs=[],e&&or(e,this,t)}const Ql=Es.prototype;Ql.append=function(t,n){this._pairs.push([t,n])},Ql.toString=function(t){const n=t?function(a){return t.call(this,a,Jl)}:Jl;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function qm(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Zl(e,t,n){if(!t)return e;const a=n&&n.encode||qm,r=n&&n.serialize;let i;if(r?i=r(t,n):i=X.isURLSearchParams(t)?t.toString():new Es(t,n).toString(a),i){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class ql{constructor(){this.handlers=[]}use(t,n,a){return this.handlers.push({fulfilled:t,rejected:n,synchronous:a?a.synchronous:!1,runWhen:a?a.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){X.forEach(this.handlers,function(a){a!==null&&t(a)})}}const $l={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},$m={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Es,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},ec=typeof window<"u"&&typeof document<"u",ev=(e=>ec&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),tv=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",qt={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ec,hasStandardBrowserEnv:ev,hasStandardBrowserWebWorkerEnv:tv},Symbol.toStringTag,{value:"Module"})),...$m};function nv(e,t){return or(e,new qt.classes.URLSearchParams,Object.assign({visitor:function(n,a,r,i){return qt.isNode&&X.isBuffer(n)?(this.append(a,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function ov(e){return X.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function av(e){const t={},n=Object.keys(e);let a;const r=n.length;let i;for(a=0;a=n.length;return s=!s&&X.isArray(r)?r.length:s,c?(X.hasOwnProp(r,s)?r[s]=[r[s],a]:r[s]=a,!l):((!r[s]||!X.isObject(r[s]))&&(r[s]=[]),t(n,a,r[s],i)&&X.isArray(r[s])&&(r[s]=av(r[s])),!l)}if(X.isFormData(e)&&X.isFunction(e.entries)){const n={};return X.forEachEntry(e,(a,r)=>{t(ov(a),r,n,0)}),n}return null}function rv(e,t,n){if(X.isString(e))try{return(t||JSON.parse)(e),X.trim(e)}catch(a){if(a.name!=="SyntaxError")throw a}return(0,JSON.stringify)(e)}const ua={transitional:$l,adapter:["xhr","http"],transformRequest:[function(t,n){const a=n.getContentType()||"",r=a.indexOf("application/json")>-1,i=X.isObject(t);if(i&&X.isHTMLForm(t)&&(t=new FormData(t)),X.isFormData(t))return r?JSON.stringify(tc(t)):t;if(X.isArrayBuffer(t)||X.isBuffer(t)||X.isStream(t)||X.isFile(t)||X.isBlob(t))return t;if(X.isArrayBufferView(t))return t.buffer;if(X.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(i){if(a.indexOf("application/x-www-form-urlencoded")>-1)return nv(t,this.formSerializer).toString();if((l=X.isFileList(t))||a.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return or(l?{"files[]":t}:t,c&&new c,this.formSerializer)}}return i||r?(n.setContentType("application/json",!1),rv(t)):t}],transformResponse:[function(t){const n=this.transitional||ua.transitional,a=n&&n.forcedJSONParsing,r=this.responseType==="json";if(t&&X.isString(t)&&(a&&!this.responseType||r)){const s=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(l){if(s)throw l.name==="SyntaxError"?Ce.from(l,Ce.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:qt.classes.FormData,Blob:qt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};X.forEach(["delete","get","head","post","put","patch"],e=>{ua.headers[e]={}});const sv=X.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),iv=e=>{const t={};let n,a,r;return e&&e.split(` -`).forEach(function(s){r=s.indexOf(":"),n=s.substring(0,r).trim().toLowerCase(),a=s.substring(r+1).trim(),!(!n||t[n]&&sv[n])&&(n==="set-cookie"?t[n]?t[n].push(a):t[n]=[a]:t[n]=t[n]?t[n]+", "+a:a)}),t},nc=Symbol("internals");function fa(e){return e&&String(e).trim().toLowerCase()}function ar(e){return e===!1||e==null?e:X.isArray(e)?e.map(ar):String(e)}function lv(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let a;for(;a=n.exec(e);)t[a[1]]=a[2];return t}const cv=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ws(e,t,n,a,r){if(X.isFunction(a))return a.call(this,t,n);if(r&&(t=n),!!X.isString(t)){if(X.isString(a))return t.indexOf(a)!==-1;if(X.isRegExp(a))return a.test(t)}}function dv(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,a)=>n.toUpperCase()+a)}function uv(e,t){const n=X.toCamelCase(" "+t);["get","set","has"].forEach(a=>{Object.defineProperty(e,a+n,{value:function(r,i,s){return this[a].call(this,t,r,i,s)},configurable:!0})})}class _t{constructor(t){t&&this.set(t)}set(t,n,a){const r=this;function i(l,c,d){const f=fa(c);if(!f)throw new Error("header name must be a non-empty string");const p=X.findKey(r,f);(!p||r[p]===void 0||d===!0||d===void 0&&r[p]!==!1)&&(r[p||c]=ar(l))}const s=(l,c)=>X.forEach(l,(d,f)=>i(d,f,c));return X.isPlainObject(t)||t instanceof this.constructor?s(t,n):X.isString(t)&&(t=t.trim())&&!cv(t)?s(iv(t),n):t!=null&&i(n,t,a),this}get(t,n){if(t=fa(t),t){const a=X.findKey(this,t);if(a){const r=this[a];if(!n)return r;if(n===!0)return lv(r);if(X.isFunction(n))return n.call(this,r,a);if(X.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=fa(t),t){const a=X.findKey(this,t);return!!(a&&this[a]!==void 0&&(!n||ws(this,this[a],a,n)))}return!1}delete(t,n){const a=this;let r=!1;function i(s){if(s=fa(s),s){const l=X.findKey(a,s);l&&(!n||ws(a,a[l],l,n))&&(delete a[l],r=!0)}}return X.isArray(t)?t.forEach(i):i(t),r}clear(t){const n=Object.keys(this);let a=n.length,r=!1;for(;a--;){const i=n[a];(!t||ws(this,this[i],i,t,!0))&&(delete this[i],r=!0)}return r}normalize(t){const n=this,a={};return X.forEach(this,(r,i)=>{const s=X.findKey(a,i);if(s){n[s]=ar(r),delete n[i];return}const l=t?dv(i):String(i).trim();l!==i&&delete n[i],n[l]=ar(r),a[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return X.forEach(this,(a,r)=>{a!=null&&a!==!1&&(n[r]=t&&X.isArray(a)?a.join(", "):a)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const a=new this(t);return n.forEach(r=>a.set(r)),a}static accessor(t){const a=(this[nc]=this[nc]={accessors:{}}).accessors,r=this.prototype;function i(s){const l=fa(s);a[l]||(uv(r,s),a[l]=!0)}return X.isArray(t)?t.forEach(i):i(t),this}}_t.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),X.reduceDescriptors(_t.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(a){this[n]=a}}}),X.freezeMethods(_t);function xs(e,t){const n=this||ua,a=t||n,r=_t.from(a.headers);let i=a.data;return X.forEach(e,function(l){i=l.call(n,i,r.normalize(),t?t.status:void 0)}),r.normalize(),i}function oc(e){return!!(e&&e.__CANCEL__)}function pa(e,t,n){Ce.call(this,e??"canceled",Ce.ERR_CANCELED,t,n),this.name="CanceledError"}X.inherits(pa,Ce,{__CANCEL__:!0});function fv(e,t,n){const a=n.config.validateStatus;!n.status||!a||a(n.status)?e(n):t(new Ce("Request failed with status code "+n.status,[Ce.ERR_BAD_REQUEST,Ce.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const pv=qt.hasStandardBrowserEnv?{write(e,t,n,a,r,i){const s=[e+"="+encodeURIComponent(t)];X.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),X.isString(a)&&s.push("path="+a),X.isString(r)&&s.push("domain="+r),i===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function hv(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function mv(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function ac(e,t){return e&&!hv(t)?mv(e,t):t}const vv=qt.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let a;function r(i){let s=i;return t&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return a=r(window.location.href),function(s){const l=X.isString(s)?r(s):s;return l.protocol===a.protocol&&l.host===a.host}}():function(){return function(){return!0}}();function gv(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function bv(e,t){e=e||10;const n=new Array(e),a=new Array(e);let r=0,i=0,s;return t=t!==void 0?t:1e3,function(c){const d=Date.now(),f=a[i];s||(s=d),n[r]=c,a[r]=d;let p=i,h=0;for(;p!==r;)h+=n[p++],p=p%e;if(r=(r+1)%e,r===i&&(i=(i+1)%e),d-s{const i=r.loaded,s=r.lengthComputable?r.total:void 0,l=i-n,c=a(l),d=i<=s;n=i;const f={loaded:i,total:s,progress:s?i/s:void 0,bytes:l,rate:c||void 0,estimated:c&&s&&d?(s-i)/c:void 0,event:r};f[t?"download":"upload"]=!0,e(f)}}const Ss={http:Jm,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,a){let r=e.data;const i=_t.from(e.headers).normalize();let{responseType:s,withXSRFToken:l}=e,c;function d(){e.cancelToken&&e.cancelToken.unsubscribe(c),e.signal&&e.signal.removeEventListener("abort",c)}let f;if(X.isFormData(r)){if(qt.hasStandardBrowserEnv||qt.hasStandardBrowserWebWorkerEnv)i.setContentType(!1);else if((f=i.getContentType())!==!1){const[m,...y]=f?f.split(";").map(b=>b.trim()).filter(Boolean):[];i.setContentType([m||"multipart/form-data",...y].join("; "))}}let p=new XMLHttpRequest;if(e.auth){const m=e.auth.username||"",y=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(m+":"+y))}const h=ac(e.baseURL,e.url);p.open(e.method.toUpperCase(),Zl(h,e.params,e.paramsSerializer),!0),p.timeout=e.timeout;function v(){if(!p)return;const m=_t.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),b={data:!s||s==="text"||s==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:m,config:e,request:p};fv(function(T){n(T),d()},function(T){a(T),d()},b),p=null}if("onloadend"in p?p.onloadend=v:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(v)},p.onabort=function(){p&&(a(new Ce("Request aborted",Ce.ECONNABORTED,e,p)),p=null)},p.onerror=function(){a(new Ce("Network Error",Ce.ERR_NETWORK,e,p)),p=null},p.ontimeout=function(){let y=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const b=e.transitional||$l;e.timeoutErrorMessage&&(y=e.timeoutErrorMessage),a(new Ce(y,b.clarifyTimeoutError?Ce.ETIMEDOUT:Ce.ECONNABORTED,e,p)),p=null},qt.hasStandardBrowserEnv&&(l&&X.isFunction(l)&&(l=l(e)),l||l!==!1&&vv(h))){const m=e.xsrfHeaderName&&e.xsrfCookieName&&pv.read(e.xsrfCookieName);m&&i.set(e.xsrfHeaderName,m)}r===void 0&&i.setContentType(null),"setRequestHeader"in p&&X.forEach(i.toJSON(),function(y,b){p.setRequestHeader(b,y)}),X.isUndefined(e.withCredentials)||(p.withCredentials=!!e.withCredentials),s&&s!=="json"&&(p.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&p.addEventListener("progress",rc(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&p.upload&&p.upload.addEventListener("progress",rc(e.onUploadProgress)),(e.cancelToken||e.signal)&&(c=m=>{p&&(a(!m||m.type?new pa(null,e,p):m),p.abort(),p=null)},e.cancelToken&&e.cancelToken.subscribe(c),e.signal&&(e.signal.aborted?c():e.signal.addEventListener("abort",c)));const u=gv(h);if(u&&qt.protocols.indexOf(u)===-1){a(new Ce("Unsupported protocol "+u+":",Ce.ERR_BAD_REQUEST,e));return}p.send(r||null)})}};X.forEach(Ss,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const sc=e=>`- ${e}`,yv=e=>X.isFunction(e)||e===null||e===!1,ic={getAdapter:e=>{e=X.isArray(e)?e:[e];const{length:t}=e;let n,a;const r={};for(let i=0;i`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let s=t?i.length>1?`since : +(function(o,oa){typeof exports=="object"&&typeof module<"u"?oa(require("vue")):typeof define=="function"&&define.amd?define(["vue"],oa):(o=typeof globalThis<"u"?globalThis:o||self,oa(o.Vue))})(this,function(o){"use strict";var oa=!1,cl={TERM_PROGRAM:"vscode",NODE:"/opt/homebrew/Cellar/node@18/18.20.5/bin/node",INIT_CWD:"/Users/tarvo/Development/_OpenSource/nova-file-manager",TERM:"xterm-256color",SHELL:"/bin/zsh",HOMEBREW_REPOSITORY:"/opt/homebrew",TMPDIR:"/var/folders/kx/xvjxfhbs0vq1zwgzb_969rsw0000gp/T/",npm_config_global_prefix:"/opt/homebrew",TERM_PROGRAM_VERSION:"1.96.1",ZDOTDIR:"/Users/tarvo",ORIGINAL_XDG_CURRENT_DESKTOP:"undefined",MallocNanoZone:"0",COLOR:"1",TERM_SESSION_ID:"w0t0p0:7EB579D8-3823-4699-95E0-34128A9C3098",npm_config_noproxy:"",npm_config_local_prefix:"/Users/tarvo/Development/_OpenSource/nova-file-manager",ZSH:"/Users/tarvo/.oh-my-zsh",USER:"tarvo",LS_COLORS:"di=1;36:ln=35:so=32:pi=33:ex=31:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43",COMMAND_MODE:"unix2003",npm_config_globalconfig:"/opt/homebrew/etc/npmrc",SSH_AUTH_SOCK:"/private/tmp/com.apple.launchd.1aXB809ZrP/Listeners",__CF_USER_TEXT_ENCODING:"0x1F6:0x0:0x0",npm_execpath:"/opt/homebrew/Cellar/node@18/18.20.5/lib/node_modules/npm/bin/npm-cli.js",TERM_FEATURES:"T3LrMSc7UUw9Ts3BFGsSyHNoSxF",PAGER:"less",LSCOLORS:"Gxfxcxdxbxegedabagacad",TERMINFO_DIRS:"/Applications/iTerm.app/Contents/Resources/terminfo:/usr/share/terminfo",PATH:"/Users/tarvo/Development/_OpenSource/nova-file-manager/node_modules/.bin:/Users/tarvo/Development/_OpenSource/node_modules/.bin:/Users/tarvo/Development/node_modules/.bin:/Users/tarvo/node_modules/.bin:/Users/node_modules/.bin:/node_modules/.bin:/opt/homebrew/Cellar/node@18/18.20.5/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Apple/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Applications/iTerm.app/Contents/Resources/utilities:/Users/tarvo/.local/bin:/Users/tarvo/.composer/vendor/bin:/Users/tarvo/.spicetify:/Users/tarvo/.local/bin:/Users/tarvo/.composer/vendor/bin:/Users/tarvo/.spicetify:/Users/tarvo/.local/bin",npm_package_json:"/Users/tarvo/Development/_OpenSource/nova-file-manager/package.json",_:"/Users/tarvo/Development/_OpenSource/nova-file-manager/node_modules/.bin/vite",LaunchInstanceID:"785076B8-02D4-4561-9EF7-B242C84332DC",npm_config_userconfig:"/Users/tarvo/.npmrc",npm_config_init_module:"/Users/tarvo/.npm-init.js",USER_ZDOTDIR:"/Users/tarvo",__CFBundleIdentifier:"com.microsoft.VSCode",npm_command:"run-script",PWD:"/Users/tarvo/Development/_OpenSource/nova-file-manager",npm_lifecycle_event:"build",EDITOR:"vi",npm_package_name:"nova-file-manager",LANG:"et_EE.UTF-8",ITERM_PROFILE:"Default",npm_config_progress:"",npm_config_npm_version:"10.8.2",VSCODE_GIT_ASKPASS_EXTRA_ARGS:"",XPC_FLAGS:"0x0",npm_config_node_gyp:"/opt/homebrew/Cellar/node@18/18.20.5/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",npm_package_version:"0.8.0",XPC_SERVICE_NAME:"0",VSCODE_INJECTION:"1",COLORFGBG:"15;0",SHLVL:"4",HOME:"/Users/tarvo",VSCODE_GIT_ASKPASS_MAIN:"/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/askpass-main.js",LC_TERMINAL_VERSION:"3.5.7",HOMEBREW_PREFIX:"/opt/homebrew",ITERM_SESSION_ID:"w0t0p0:7EB579D8-3823-4699-95E0-34128A9C3098",npm_config_cache:"/Users/tarvo/.npm",LESS:"-R",LOGNAME:"tarvo",npm_lifecycle_script:"vite build",VSCODE_GIT_IPC_HANDLE:"/var/folders/kx/xvjxfhbs0vq1zwgzb_969rsw0000gp/T/vscode-git-0c1820040e.sock",npm_config_user_agent:"npm/10.8.2 node/v18.20.5 darwin arm64 workspaces/false",VSCODE_GIT_ASKPASS_NODE:"/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin)",GIT_ASKPASS:"/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/askpass.sh",HOMEBREW_CELLAR:"/opt/homebrew/Cellar",INFOPATH:"/opt/homebrew/share/info:/opt/homebrew/share/info:",LC_TERMINAL:"iTerm2",SECURITYSESSIONID:"186b4",npm_node_execpath:"/opt/homebrew/Cellar/node@18/18.20.5/bin/node",npm_config_prefix:"/opt/homebrew",COLORTERM:"truecolor",NODE_ENV:"production"};let dl;const Ja=e=>dl=e,ul=Symbol();function es(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var aa;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(aa||(aa={}));function Wf(){const e=o.effectScope(!0),t=e.run(()=>o.ref({}));let n=[],a=[];const r=o.markRaw({install(i){Ja(r),r._a=i,i.provide(ul,r),i.config.globalProperties.$pinia=r,a.forEach(s=>n.push(s)),a=[]},use(i){return!this._a&&!oa?a.push(i):n.push(i),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return r}const fl=()=>{};function pl(e,t,n,a=fl){e.push(t);const r=()=>{const i=e.indexOf(t);i>-1&&(e.splice(i,1),a())};return!n&&o.getCurrentScope()&&o.onScopeDispose(r),r}function xo(e,...t){e.slice().forEach(n=>{n(...t)})}function ts(e,t){e instanceof Map&&t instanceof Map&&t.forEach((n,a)=>e.set(a,n)),e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const a=t[n],r=e[n];es(r)&&es(a)&&e.hasOwnProperty(n)&&!o.isRef(a)&&!o.isReactive(a)?e[n]=ts(r,a):e[n]=a}return e}const Kf=Symbol();function Xf(e){return!es(e)||!e.hasOwnProperty(Kf)}const{assign:En}=Object;function Yf(e){return!!(o.isRef(e)&&e.effect)}function Zf(e,t,n,a){const{state:r,actions:i,getters:s}=t,l=n.state.value[e];let c;function d(){!l&&cl.NODE_ENV==="production"&&(n.state.value[e]=r?r():{});const f=o.toRefs(n.state.value[e]);return En(f,i,Object.keys(s||{}).reduce((p,h)=>(p[h]=o.markRaw(o.computed(()=>{Ja(n);const v=n._s.get(e);return s[h].call(v,v)})),p),{}))}return c=hl(e,d,t,n,a,!0),c}function hl(e,t,n={},a,r,i){let s;const l=En({actions:{}},n),c={deep:!0};let d,f,p=o.markRaw([]),h=o.markRaw([]),v;const u=a.state.value[e];!i&&!u&&cl.NODE_ENV==="production"&&(a.state.value[e]={}),o.ref({});let m;function b(D){let A;d=f=!1,typeof D=="function"?(D(a.state.value[e]),A={type:aa.patchFunction,storeId:e,events:v}):(ts(a.state.value[e],D),A={type:aa.patchObject,payload:D,storeId:e,events:v});const I=m=Symbol();o.nextTick().then(()=>{m===I&&(d=!0)}),f=!0,xo(p,A,a.state.value[e])}const y=i?function(){const{state:A}=n,I=A?A():{};this.$patch(R=>{En(R,I)})}:fl;function g(){s.stop(),p=[],h=[],a._s.delete(e)}function O(D,A){return function(){Ja(a);const I=Array.from(arguments),R=[],F=[];function K(z){R.push(z)}function B(z){F.push(z)}xo(h,{args:I,name:D,store:S,after:K,onError:B});let V;try{V=A.apply(this&&this.$id===e?this:S,I)}catch(z){throw xo(F,z),z}return V instanceof Promise?V.then(z=>(xo(R,z),z)).catch(z=>(xo(F,z),Promise.reject(z))):(xo(R,V),V)}}const C={_p:a,$id:e,$onAction:pl.bind(null,h),$patch:b,$reset:y,$subscribe(D,A={}){const I=pl(p,D,A.detached,()=>R()),R=s.run(()=>o.watch(()=>a.state.value[e],F=>{(A.flush==="sync"?f:d)&&D({storeId:e,type:aa.direct,events:v},F)},En({},c,A)));return I},$dispose:g},S=o.reactive(C);a._s.set(e,S);const k=a._e.run(()=>(s=o.effectScope(),s.run(()=>t())));for(const D in k){const A=k[D];if(o.isRef(A)&&!Yf(A)||o.isReactive(A))i||(u&&Xf(A)&&(o.isRef(A)?A.value=u[D]:ts(A,u[D])),a.state.value[e][D]=A);else if(typeof A=="function"){const I=O(D,A);k[D]=I,l.actions[D]=A}}return En(S,k),En(o.toRaw(S),k),Object.defineProperty(S,"$state",{get:()=>a.state.value[e],set:D=>{b(A=>{En(A,D)})}}),a._p.forEach(D=>{En(S,s.run(()=>D({store:S,app:a._a,pinia:a,options:l})))}),u&&i&&n.hydrate&&n.hydrate(S.$state,u),d=!0,f=!0,S}function ns(e,t,n){let a,r;const i=typeof t=="function";typeof e=="string"?(a=e,r=i?n:t):(r=e,a=e.id);function s(l,c){const d=o.getCurrentInstance();return l=l||d&&o.inject(ul,null),l&&Ja(l),l=dl,l._s.has(a)||(i?hl(a,t,r,l):Zf(a,r,l)),l._s.get(a)}return s.$id=a,s}function Jf(e,t){return Array.isArray(t)?t.reduce((n,a)=>(n[a]=function(){return e(this.$pinia)[a]},n),{}):Object.keys(t).reduce((n,a)=>(n[a]=function(){const r=e(this.$pinia),i=t[a];return typeof i=="function"?i.call(this,r):r[i]},n),{})}function Qf(e,t){return Array.isArray(t)?t.reduce((n,a)=>(n[a]=function(...r){return e(this.$pinia)[a](...r)},n),{}):Object.keys(t).reduce((n,a)=>(n[a]=function(...r){return e(this.$pinia)[t[a]](...r)},n),{})}function qf(e){{e=o.toRaw(e);const t={};for(const n in e){const a=e[n];(o.isRef(a)||o.isReactive(a))&&(t[n]=o.toRef(e,n))}return t}}function $f(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o.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"})])}function ep(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"})])}function Qa(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4.5 12.75l6 6 9-13.5"})])}function ml(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})])}function os(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})])}function tp(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8.25 7.5V6.108c0-1.135.845-2.098 1.976-2.192.373-.03.748-.057 1.123-.08M15.75 18H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08M15.75 18.75v-1.875a3.375 3.375 0 00-3.375-3.375h-1.5a1.125 1.125 0 01-1.125-1.125v-1.5A3.375 3.375 0 006.375 7.5H5.25m11.9-3.664A2.251 2.251 0 0015 2.25h-1.5a2.251 2.251 0 00-2.15 1.586m5.8 0c.065.21.1.433.1.664v.75h-6V4.5c0-.231.035-.454.1-.664M6.75 7.5H4.875c-.621 0-1.125.504-1.125 1.125v12c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V16.5a9 9 0 00-9-9z"})])}function np(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9.75v6.75m0 0l-3-3m3 3l3-3m-8.25 6a4.5 4.5 0 01-1.41-8.775 5.25 5.25 0 0110.233-2.33 3 3 0 013.758 3.848A3.752 3.752 0 0118 19.5H6.75z"})])}function as(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 16.5V9.75m0 0l3 3m-3-3l-3 3M6.75 19.5a4.5 4.5 0 01-1.41-8.775 5.25 5.25 0 0110.233-2.33 3 3 0 013.758 3.848A3.752 3.752 0 0118 19.5H6.75z"})])}function op(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M2.25 15a4.5 4.5 0 004.5 4.5H18a3.75 3.75 0 001.332-7.257 3 3 0 00-3.758-3.848 5.25 5.25 0 00-10.233 2.33A4.502 4.502 0 002.25 15z"})])}function ra(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o.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.25m2.25 0H5.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"})])}function vl(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z"})])}function gl(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"})])}function ap(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o.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"})])}function rs(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M2.25 12.75V12A2.25 2.25 0 014.5 9.75h15A2.25 2.25 0 0121.75 12v.75m-8.69-6.44l-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"})])}function rp(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M2.25 12l8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25"})])}function sp(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M16.712 4.33a9.027 9.027 0 011.652 1.306c.51.51.944 1.064 1.306 1.652M16.712 4.33l-3.448 4.138m3.448-4.138a9.014 9.014 0 00-9.424 0M19.67 7.288l-4.138 3.448m4.138-3.448a9.014 9.014 0 010 9.424m-4.138-5.976a3.736 3.736 0 00-.88-1.388 3.737 3.737 0 00-1.388-.88m2.268 2.268a3.765 3.765 0 010 2.528m-2.268-4.796a3.765 3.765 0 00-2.528 0m4.796 4.796c-.181.506-.475.982-.88 1.388a3.736 3.736 0 01-1.388.88m2.268-2.268l4.138 3.448m0 0a9.027 9.027 0 01-1.306 1.652c-.51.51-1.064.944-1.652 1.306m0 0l-3.448-4.138m3.448 4.138a9.014 9.014 0 01-9.424 0m5.976-4.138a3.765 3.765 0 01-2.528 0m0 0a3.736 3.736 0 01-1.388-.88 3.737 3.737 0 01-.88-1.388m2.268 2.268L7.288 19.67m0 0a9.024 9.024 0 01-1.652-1.306 9.027 9.027 0 01-1.306-1.652m0 0l4.138-3.448M4.33 16.712a9.014 9.014 0 010-9.424m4.138 5.976a3.765 3.765 0 010-2.528m0 0c.181-.506.475-.982.88-1.388a3.736 3.736 0 011.388-.88m-2.268 2.268L4.33 7.288m6.406 1.18L7.288 4.33m0 0a9.024 9.024 0 00-1.652 1.306A9.025 9.025 0 004.33 7.288"})])}function ip(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o.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"})])}function lp(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o.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"})])}function cp(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"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"})])}function dp(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"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"})])}function yl(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o.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"})])}function ss(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})])}function bl(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"fill-rule":"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm13.36-1.814a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z","clip-rule":"evenodd"})])}function up(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"fill-rule":"evenodd",d:"M19.916 4.626a.75.75 0 01.208 1.04l-9 13.5a.75.75 0 01-1.154.114l-6-6a.75.75 0 011.06-1.06l5.353 5.353 8.493-12.739a.75.75 0 011.04-.208z","clip-rule":"evenodd"})])}function fp(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"fill-rule":"evenodd",d:"M12.53 16.28a.75.75 0 01-1.06 0l-7.5-7.5a.75.75 0 011.06-1.06L12 14.69l6.97-6.97a.75.75 0 111.06 1.06l-7.5 7.5z","clip-rule":"evenodd"})])}function pp(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"fill-rule":"evenodd",d:"M7.72 12.53a.75.75 0 010-1.06l7.5-7.5a.75.75 0 111.06 1.06L9.31 12l6.97 6.97a.75.75 0 11-1.06 1.06l-7.5-7.5z","clip-rule":"evenodd"})])}function hp(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"fill-rule":"evenodd",d:"M16.28 11.47a.75.75 0 010 1.06l-7.5 7.5a.75.75 0 01-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 011.06-1.06l7.5 7.5z","clip-rule":"evenodd"})])}function mp(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.5 12a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0zm6 0a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0zm6 0a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0z","clip-rule":"evenodd"})])}function vp(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"fill-rule":"evenodd",d:"M10.5 6a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0zm0 6a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0zm0 6a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0z","clip-rule":"evenodd"})])}function wl(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"fill-rule":"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z","clip-rule":"evenodd"})])}function gp(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"fill-rule":"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z","clip-rule":"evenodd"})])}function yp(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.5 5.653c0-1.426 1.529-2.33 2.779-1.643l11.54 6.348c1.295.712 1.295 2.573 0 3.285L7.28 19.991c-1.25.687-2.779-.217-2.779-1.643V5.653z","clip-rule":"evenodd"})])}function bp(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[o.createElementVNode("path",{"fill-rule":"evenodd",d:"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25zm-1.72 6.97a.75.75 0 10-1.06 1.06L10.94 12l-1.72 1.72a.75.75 0 101.06 1.06L12 13.06l1.72 1.72a.75.75 0 101.06-1.06L13.06 12l1.72-1.72a.75.75 0 10-1.06-1.06L12 10.94l-1.72-1.72z","clip-rule":"evenodd"})])}const is=(e,t)=>{const n=e.__vccOpts||e;for(const[a,r]of t)n[a]=r;return n},wp={},xp={class:"text-gray-200 animate-spin dark:text-gray-600 fill-blue-600",fill:"none",viewBox:"0 0 100 101",xmlns:"http://www.w3.org/2000/svg"},Ep=[o.createElementVNode("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"},null,-1),o.createElementVNode("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"},null,-1)];function Sp(e,t){return o.openBlock(),o.createElementBlock("svg",xp,Ep)}const Eo=is(wp,[["render",Sp]]),xl=o.defineComponent({__name:"ImageLoader",props:{src:{},alt:{},isThumbnail:{type:Boolean,default:!0}},emits:["missing"],setup(e,{emit:t}){const n=e,a=t,r=o.ref(!0),i=o.ref(!1),s=o.ref();return o.onMounted(()=>{new Promise((l,c)=>{let d=new Image;d.addEventListener("load",()=>l(d)),d.addEventListener("error",f=>c(f)),d.src=n.src}).then(l=>{l.className="pointer-events-none w-full h-full",l.classList.add(n.isThumbnail?"object-cover":"object-contain"),l.draggable=!1,s.value?.appendChild(l)}).catch(()=>{i.value=!0,a("missing",!0)}).finally(()=>{r.value=!1})}),(l,c)=>(o.openBlock(),o.createElementBlock("div",{class:"flex justify-center items-center h-full max-h-[80vh]",ref_key:"card",ref:s},[r.value?(o.openBlock(),o.createBlock(Eo,{key:0,class:"w-6 h-6"})):o.createCommentVNode("",!0)],512))}}),Cp=["title"],Op={key:0,class:"absolute z-40 inset-0 flex justify-center items-center w-full h-full"},Tp={key:1,class:"absolute inset-0 w-full h-full bg-gray-100/50 dark:bg-gray-800/50"},kp={key:2,class:"absolute inset-0 flex flex-row items-center justify-center text-sm font-bold text-gray-600 dark:text-gray-100"},Np={class:"m-auto z-20 flex h-full items-center justify-center select-none"},Dp={key:0,class:"m-auto flex h-full w-full items-center justify-center bg-gray-50 dark:bg-gray-900 text-red-500"},Ap={key:0,class:"m-auto flex h-full w-full items-center justify-center bg-gray-50 dark:bg-gray-900 text-gray-500 dark:text-gray-600"},Ip={class:"pointer-events-none w-full h-full object-cover"},Rp=["src"],Pp={key:0,class:"absolute m-auto flex items-center justify-center bg-transparent"},Mp={key:3,class:"absolute right-1 top-1"},Bp=["title"],Fp={key:1,class:"text-sm text-red-500 font-semibold text-left break-all"},_p={class:"gap-x-0.5 inline-flex flex-wrap items-center text-xs pointer-events-none block font-medium text-gray-500 text-left break-all"},Lp={key:0},Vp={key:1,class:"ml-0.5"},jp={key:2,class:"absolute top-1 right-1"},ls=o.defineComponent({__name:"File",props:{file:{},isUploading:{type:Boolean},isUploaded:{type:Boolean},uploadRatio:{},selected:{type:Boolean,default:!1},onDeselect:{},singleDisk:{type:Boolean},fieldMode:{type:Boolean}},setup(e){const t=e,n=o.computed(()=>t.file.type==="image"),a=o.computed(()=>t.file.type==="video"),r=o.computed(()=>t.file.type!=="image"&&t.file.type!=="video"),i=o.computed(()=>!t.file.exists),s=o.computed(()=>i.value?t.file.path:t.file.name);return(l,c)=>(o.openBlock(),o.createElementBlock("button",{class:"relative cursor-pointer group focus-visible:outline-none flex flex-col items-start",title:s.value},[o.createElementVNode("div",{class:o.normalizeClass(["relative block aspect-square w-full h-full overflow-hidden rounded-lg hover:shadow-md hover:opacity-75 border border-gray-200/50 dark:border-gray-700/50 text-left","group-focus-visible:outline group-focus-visible:outline-2 group-focus-visible:outline-black dark:group-focus-visible:outline-white",l.selected?"outline outline-2 outline-blue-500 group-focus-visible:outline-blue-500":""])},[l.isUploading?(o.openBlock(),o.createElementBlock("div",Op,[l.isUploaded===null?(o.openBlock(),o.createBlock(Eo,{key:0,class:"w-16 h-16"})):l.isUploaded===!1?(o.openBlock(),o.createBlock(o.unref(wl),{key:1,class:"w-16 h-16 text-red-500"})):l.isUploaded===!0?(o.openBlock(),o.createBlock(o.unref(bl),{key:2,class:"w-16 h-16 text-green-500"})):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0),l.isUploading?(o.openBlock(),o.createElementBlock("div",Tp)):o.createCommentVNode("",!0),l.isUploading&&l.isUploaded===null?(o.openBlock(),o.createElementBlock("div",kp,[o.createElementVNode("span",null,o.toDisplayString(l.uploadRatio)+"%",1)])):o.createCommentVNode("",!0),o.createElementVNode("div",Np,[i.value&&!l.isUploading?(o.openBlock(),o.createElementBlock("div",Dp,[o.createVNode(o.unref(gp),{class:"w-16 h-16"})])):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[r.value?(o.openBlock(),o.createElementBlock("div",Ap,[l.isUploading?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(ra),{key:0,class:"w-16 h-16"}))])):o.createCommentVNode("",!0),n.value?(o.openBlock(),o.createBlock(xl,{key:1,src:l.file.url,alt:l.file.name},null,8,["src","alt"])):o.createCommentVNode("",!0),a.value?(o.openBlock(),o.createElementBlock(o.Fragment,{key:2},[o.createElementVNode("video",Ip,[o.createElementVNode("source",{src:l.file.url},null,8,Rp),o.createTextVNode(" "+o.toDisplayString(l.__("Sorry, your browser doesn't support embedded videos.")),1)]),l.isUploading?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",Pp,[o.createVNode(o.unref(yp),{class:"h-16 w-16 text-white/60"})]))],64)):o.createCommentVNode("",!0)],64))]),l.onDeselect?(o.openBlock(),o.createElementBlock("div",Mp,[l.onDeselect?(o.openBlock(),o.createElementBlock("button",{key:0,onClick:c[0]||(c[0]=d=>l.onDeselect(l.file)),class:"text-red-500 hover:text-red-600 rounded-full"},[o.createVNode(o.unref(bp),{class:"h-6 w-6"})])):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0)],2),!i.value||l.isUploading?(o.openBlock(),o.createElementBlock("p",{key:0,class:o.normalizeClass(["pointer-events-none mt-2 block truncate font-medium text-gray-900 dark:text-gray-50 text-left w-full",l.isUploading||l.onDeselect?"text-xs":"text-sm"]),title:l.isUploading?l.file.name:s.value},o.toDisplayString(l.isUploading?l.file.name:s.value),11,Bp)):o.createCommentVNode("",!0),i.value&&!l.isUploading?(o.openBlock(),o.createElementBlock("p",Fp,o.toDisplayString(l.__("NovaFileManager.fileMissing",{path:l.file.path})),1)):o.createCommentVNode("",!0),o.createElementVNode("div",_p,[l.file.size?(o.openBlock(),o.createElementBlock("span",Lp,o.toDisplayString(l.file.size),1)):o.createCommentVNode("",!0),l.fieldMode&&!l.singleDisk&&l.file.disk?.length>0?(o.openBlock(),o.createElementBlock("span",Vp,"ยท "+o.toDisplayString(l.file.disk),1)):o.createCommentVNode("",!0)]),l.selected?(o.openBlock(),o.createElementBlock("span",jp,[o.createVNode(o.unref(bl),{class:"h-5 w-5 text-blue-500","aria-hidden":"true"})])):o.createCommentVNode("",!0)],8,Cp))}});var So=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Sn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Up(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function a(){return this instanceof a?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(a){var r=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(n,a,r.get?r:{enumerable:!0,get:function(){return e[a]}})}),n}var zp=Math.ceil,Hp=Math.max;function Gp(e,t,n,a){for(var r=-1,i=Hp(zp((t-e)/(n||1)),0),s=Array(i);i--;)s[a?i:++r]=e,e+=n;return s}var Wp=Gp;function Kp(e,t){return e===t||e!==e&&t!==t}var cs=Kp,Xp=typeof So=="object"&&So&&So.Object===Object&&So,El=Xp,Yp=El,Zp=typeof self=="object"&&self&&self.Object===Object&&self,Jp=Yp||Zp||Function("return this")(),jt=Jp,Qp=jt,qp=Qp.Symbol,sa=qp,Sl=sa,Cl=Object.prototype,$p=Cl.hasOwnProperty,eh=Cl.toString,ia=Sl?Sl.toStringTag:void 0;function th(e){var t=$p.call(e,ia),n=e[ia];try{e[ia]=void 0;var a=!0}catch{}var r=eh.call(e);return a&&(t?e[ia]=n:delete e[ia]),r}var nh=th,oh=Object.prototype,ah=oh.toString;function rh(e){return ah.call(e)}var sh=rh,Ol=sa,ih=nh,lh=sh,ch="[object Null]",dh="[object Undefined]",Tl=Ol?Ol.toStringTag:void 0;function uh(e){return e==null?e===void 0?dh:ch:Tl&&Tl in Object(e)?ih(e):lh(e)}var Co=uh;function fh(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Cn=fh,ph=Co,hh=Cn,mh="[object AsyncFunction]",vh="[object Function]",gh="[object GeneratorFunction]",yh="[object Proxy]";function bh(e){if(!hh(e))return!1;var t=ph(e);return t==vh||t==gh||t==mh||t==yh}var kl=bh,wh=9007199254740991;function xh(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=wh}var Nl=xh,Eh=kl,Sh=Nl;function Ch(e){return e!=null&&Sh(e.length)&&!Eh(e)}var ds=Ch,Oh=9007199254740991,Th=/^(?:0|[1-9]\d*)$/;function kh(e,t){var n=typeof e;return t=t??Oh,!!t&&(n=="number"||n!="symbol"&&Th.test(e))&&e>-1&&e%1==0&&e0){var A=!1;for(var I in y.fileType){var R="."+y.fileType[I];if(D.toLowerCase().indexOf(R.toLowerCase(),D.length-R.length)!==-1){A=!0;break}}if(!A)return y.fileTypeErrorCallback(k,b++),!1}if(typeof y.minFileSize<"u"&&k.sizey.maxFileSize)return y.maxFileSizeErrorCallback(k,b++),!1;function F(B){a.getFromUniqueIdentifier(B)?O.push(k):function(){k.uniqueIdentifier=B;var V=new h(a,k,B);a.files.push(V),g.push(V),V.container=typeof m<"u"?m.srcElement:null,window.setTimeout(function(){a.fire("fileAdded",V,m)},0)}(),S()}var K=r.generateUniqueIdentifier(k,m);K&&typeof K.then=="function"?K.then(function(B){F(B)},function(){S()}):F(K)})};function h(u,m,b){var y=this;y.opts={},y.getOpt=u.getOpt,y._prevProgress=0,y.resumableObj=u,y.file=m,y.fileName=m.fileName||m.name,y.size=m.size,y.relativePath=m.relativePath||m.webkitRelativePath||y.fileName,y.uniqueIdentifier=b,y._pause=!1,y.container="";var g=b!==void 0,O=function(C,S){switch(C){case"progress":y.resumableObj.fire("fileProgress",y,S);break;case"error":y.abort(),g=!0,y.chunks=[],y.resumableObj.fire("fileError",y,S);break;case"success":if(g)return;y.resumableObj.fire("fileProgress",y),y.isComplete()&&y.resumableObj.fire("fileSuccess",y,S);break;case"retry":y.resumableObj.fire("fileRetry",y);break}};return y.chunks=[],y.abort=function(){var C=0;r.each(y.chunks,function(S){S.status()=="uploading"&&(S.abort(),C++)}),C>0&&y.resumableObj.fire("fileProgress",y)},y.cancel=function(){var C=y.chunks;y.chunks=[],r.each(C,function(S){S.status()=="uploading"&&(S.abort(),y.resumableObj.uploadNextChunk())}),y.resumableObj.removeFile(y),y.resumableObj.fire("fileProgress",y)},y.retry=function(){y.bootstrap();var C=!1;y.resumableObj.on("chunkingComplete",function(){C||y.resumableObj.upload(),C=!0})},y.bootstrap=function(){y.abort(),g=!1,y.chunks=[],y._prevProgress=0;for(var C=y.getOpt("forceChunkSize")?Math.ceil:Math.floor,S=Math.max(C(y.file.size/y.getOpt("chunkSize")),1),k=0;k.99999?1:C,C=Math.max(y._prevProgress,C),y._prevProgress=C,C},y.isUploading=function(){var C=!1;return r.each(y.chunks,function(S){if(S.status()=="uploading")return C=!0,!1}),C},y.isComplete=function(){var C=!1;return r.each(y.chunks,function(S){var k=S.status();if(k=="pending"||k=="uploading"||S.preprocessState===1)return C=!0,!1}),!C},y.pause=function(C){typeof C>"u"?y._pause=!y._pause:y._pause=C},y.isPaused=function(){return y._pause},y.resumableObj.fire("chunkingStart",y),y.bootstrap(),this}function v(u,m,b,y){var g=this;g.opts={},g.getOpt=u.getOpt,g.resumableObj=u,g.fileObj=m,g.fileObjSize=m.size,g.fileObjType=m.file.type,g.offset=b,g.callback=y,g.lastProgressCallback=new Date,g.tested=!1,g.retries=0,g.pendingRetry=!1,g.preprocessState=0;var O=g.getOpt("chunkSize");return g.loaded=0,g.startByte=g.offset*O,g.endByte=Math.min(g.fileObjSize,(g.offset+1)*O),g.fileObjSize-g.endByteg.getOpt("throttleProgressCallbacks")*1e3&&(g.callback("progress"),g.lastProgressCallback=new Date),g.loaded=J.loaded||0},!1),g.loaded=0,g.pendingRetry=!1,g.callback("progress");var S=function(J){var ne=g.status();if(ne=="success"||ne=="error")g.callback(ne,g.message()),g.resumableObj.uploadNextChunk();else{g.callback("retry",g.message()),g.abort(),g.retries++;var xe=g.getOpt("chunkRetryInterval");xe!==void 0?(g.pendingRetry=!0,setTimeout(g.send,xe)):g.send()}};g.xhr.addEventListener("load",S,!1),g.xhr.addEventListener("error",S,!1),g.xhr.addEventListener("timeout",S,!1);var k=[["chunkNumberParameterName",g.offset+1],["chunkSizeParameterName",g.getOpt("chunkSize")],["currentChunkSizeParameterName",g.endByte-g.startByte],["totalSizeParameterName",g.fileObjSize],["typeParameterName",g.fileObjType],["identifierParameterName",g.fileObj.uniqueIdentifier],["fileNameParameterName",g.fileObj.fileName],["relativePathParameterName",g.fileObj.relativePath],["totalChunksParameterName",g.fileObj.chunks.length]].filter(function(J){return g.getOpt(J[0])}).reduce(function(J,ne){return J[g.getOpt(ne[0])]=ne[1],J},{}),D=g.getOpt("query");typeof D=="function"&&(D=D(g.fileObj,g)),r.each(D,function(J,ne){k[J]=ne});var A=g.fileObj.file.slice?"slice":g.fileObj.file.mozSlice?"mozSlice":g.fileObj.file.webkitSlice?"webkitSlice":"slice",I=g.fileObj.file[A](g.startByte,g.endByte,g.getOpt("setChunkTypeFromFile")?g.fileObj.file.type:""),R=null,F=[],K=g.getOpt("parameterNamespace");if(g.getOpt("method")==="octet")R=I,r.each(k,function(J,ne){F.push([encodeURIComponent(K+J),encodeURIComponent(ne)].join("="))});else if(R=new FormData,r.each(k,function(J,ne){R.append(K+J,ne),F.push([encodeURIComponent(K+J),encodeURIComponent(ne)].join("="))}),g.getOpt("chunkFormat")=="blob")R.append(K+g.getOpt("fileParameterName"),I,g.fileObj.fileName);else if(g.getOpt("chunkFormat")=="base64"){var B=new FileReader;B.onload=function(J){R.append(K+g.getOpt("fileParameterName"),B.result),g.xhr.send(R)},B.readAsDataURL(I)}var V=r.getTarget("upload",F),z=g.getOpt("uploadMethod");g.xhr.open(z,V),g.getOpt("method")==="octet"&&g.xhr.setRequestHeader("Content-Type","application/octet-stream"),g.xhr.timeout=g.getOpt("xhrTimeout"),g.xhr.withCredentials=g.getOpt("withCredentials");var W=g.getOpt("headers");typeof W=="function"&&(W=W(g.fileObj,g)),r.each(W,function(J,ne){g.xhr.setRequestHeader(J,ne)}),g.getOpt("chunkFormat")=="blob"&&g.xhr.send(R)},g.abort=function(){g.xhr&&g.xhr.abort(),g.xhr=null},g.status=function(){return g.pendingRetry?"uploading":g.xhr?g.xhr.readyState<4?"uploading":g.xhr.status==200||g.xhr.status==201?"success":r.contains(g.getOpt("permanentErrors"),g.xhr.status)||g.retries>=g.getOpt("maxChunkRetries")?"error":(g.abort(),"pending"):"pending"},g.message=function(){return g.xhr?g.xhr.responseText:""},g.progress=function(C){typeof C>"u"&&(C=!1);var S=C?(g.endByte-g.startByte)/g.fileObjSize:1;if(g.pendingRetry)return 0;(!g.xhr||!g.xhr.status)&&(S*=.95);var k=g.status();switch(k){case"success":case"error":return 1*S;case"pending":return 0*S;default:return g.loaded/(g.endByte-g.startByte)*S}},this}return a.uploadNextChunk=function(){var u=!1;if(a.getOpt("prioritizeFirstAndLastChunk")&&(r.each(a.files,function(b){if(b.chunks.length&&b.chunks[0].status()=="pending"&&b.chunks[0].preprocessState===0)return b.chunks[0].send(),u=!0,!1;if(b.chunks.length>1&&b.chunks[b.chunks.length-1].status()=="pending"&&b.chunks[b.chunks.length-1].preprocessState===0)return b.chunks[b.chunks.length-1].send(),u=!0,!1}),u)||(r.each(a.files,function(b){if(b.isPaused()===!1&&r.each(b.chunks,function(y){if(y.status()=="pending"&&y.preprocessState===0)return y.send(),u=!0,!1}),u)return!1}),u))return!0;var m=!1;return r.each(a.files,function(b){if(!b.isComplete())return m=!0,!1}),m||a.fire("complete"),!1},a.assignBrowse=function(u,m){typeof u.length>"u"&&(u=[u]),r.each(u,function(b){var y;b.tagName==="INPUT"&&b.type==="file"?y=b:(y=document.createElement("input"),y.setAttribute("type","file"),y.style.display="none",b.addEventListener("click",function(){y.style.opacity=0,y.style.display="block",y.focus(),y.click(),y.style.display="none"},!1),b.appendChild(y));var g=a.getOpt("maxFiles");typeof g>"u"||g!=1?y.setAttribute("multiple","multiple"):y.removeAttribute("multiple"),m?y.setAttribute("webkitdirectory","webkitdirectory"):y.removeAttribute("webkitdirectory");var O=a.getOpt("fileType");typeof O<"u"&&O.length>=1?y.setAttribute("accept",O.map(function(C){return"."+C}).join(",")):y.removeAttribute("accept"),y.addEventListener("change",function(C){p(C.target.files,C);var S=a.getOpt("clearInput");S&&(C.target.value="")},!1)})},a.assignDrop=function(u){typeof u.length>"u"&&(u=[u]),r.each(u,function(m){m.addEventListener("dragover",s,!1),m.addEventListener("dragenter",s,!1),m.addEventListener("drop",i,!1)})},a.unAssignDrop=function(u){typeof u.length>"u"&&(u=[u]),r.each(u,function(m){m.removeEventListener("dragover",s),m.removeEventListener("dragenter",s),m.removeEventListener("drop",i)})},a.isUploading=function(){var u=!1;return r.each(a.files,function(m){if(m.isUploading())return u=!0,!1}),u},a.upload=function(){if(!a.isUploading()){a.fire("uploadStart");for(var u=1;u<=a.getOpt("simultaneousUploads");u++)a.uploadNextChunk()}},a.pause=function(){r.each(a.files,function(u){u.abort()}),a.fire("pause")},a.cancel=function(){a.fire("beforeCancel");for(var u=a.files.length-1;u>=0;u--)a.files[u].cancel();a.fire("cancel")},a.progress=function(){var u=0,m=0;return r.each(a.files,function(b){u+=b.progress()*b.size,m+=b.size}),m>0?u/m:0},a.addFile=function(u,m){p([u],m)},a.addFiles=function(u,m){p(u,m)},a.removeFile=function(u){for(var m=a.files.length-1;m>=0;m--)a.files[m]===u&&a.files.splice(m,1)},a.getFromUniqueIdentifier=function(u){var m=!1;return r.each(a.files,function(b){b.uniqueIdentifier==u&&(m=b)}),m},a.getSize=function(){var u=0;return r.each(a.files,function(m){u+=m.size}),u},a.handleDropEvent=function(u){i(u)},a.handleChangeEvent=function(u){p(u.target.files,u),u.target.value=""},a.updateQuery=function(u){a.opts.query=u},this};e.exports=t})()})(Ml);var dm=Ml.exports;const um=Sn(dm),la="queue",ps="preview",fm="upload",On="upload-crop",hs="browser",pm="folder",hm="KeyK",ms={folders:"#",files:">",help:"?"},mm=["setDisk","setPath","setPerPage","setPage","setSearch","upload","renameFile","deleteFiles","unzipFile","createFolder","renameFolder","deleteFolder"],Jt={CREATE_FOLDER:"createFolder",RENAME_FOLDER:"renameFolder",DELETE_FOLDER:"deleteFolder",RENAME_FILE:"renameFile",DELETE_FILE:"deleteFile",UNZIP_FILE:"unzipFile"},Ut={CREATE_FOLDER:"createFolder",DELETE_FILES:"deleteFiles",DELETE_FOLDER:"deleteFolder",RENAME_FILE:"renameFile",RENAME_FOLDER:"renameFolder",UNZIP_FILE:"unzipFile"},ln={CREATE_FOLDER:"/folders/create",DELETE_FILE:"/files/delete",DELETE_FOLDER:"/folders/delete",DISKS:"/disks",DOWNLOAD_FILE:"/files/download",RENAME_FILE:"/files/rename",RENAME_FOLDER:"/folders/rename",UNZIP_FILE:"/files/unzip",UPLOAD:"/nova-vendor/nova-file-manager/files/upload"};async function Oo({operation:e,endpoint:t,data:n,modal:a,callback:r}){const i=Pe(),s=i.post,l=i.setError,c=i.resetError,d=i.closeModal;try{i.loadingOperation=e;const f=await s({path:t,data:n});c(),window.Nova.success(f.data.message),r&&r(f),a&&d({name:a})}catch(f){i.loadingOperation=void 0;const p=f.response?.data;window.Nova.error(p?.message||"An error occurred"),l({attribute:e,bag:p})}}function Bl(e,t){return function(){return e.apply(t,arguments)}}const{toString:vm}=Object.prototype,{getPrototypeOf:vs}=Object,$a=(e=>t=>{const n=vm.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Qt=e=>(e=e.toLowerCase(),t=>$a(t)===e),er=e=>t=>typeof t===e,{isArray:To}=Array,ca=er("undefined");function gm(e){return e!==null&&!ca(e)&&e.constructor!==null&&!ca(e.constructor)&&Dt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Fl=Qt("ArrayBuffer");function ym(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Fl(e.buffer),t}const bm=er("string"),Dt=er("function"),_l=er("number"),tr=e=>e!==null&&typeof e=="object",wm=e=>e===!0||e===!1,nr=e=>{if($a(e)!=="object")return!1;const t=vs(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},xm=Qt("Date"),Em=Qt("File"),Sm=Qt("Blob"),Cm=Qt("FileList"),Om=e=>tr(e)&&Dt(e.pipe),Tm=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Dt(e.append)&&((t=$a(e))==="formdata"||t==="object"&&Dt(e.toString)&&e.toString()==="[object FormData]"))},km=Qt("URLSearchParams"),Nm=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function da(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let a,r;if(typeof e!="object"&&(e=[e]),To(e))for(a=0,r=e.length;a0;)if(r=n[a],t===r.toLowerCase())return r;return null}const Vl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,jl=e=>!ca(e)&&e!==Vl;function gs(){const{caseless:e}=jl(this)&&this||{},t={},n=(a,r)=>{const i=e&&Ll(t,r)||r;nr(t[i])&&nr(a)?t[i]=gs(t[i],a):nr(a)?t[i]=gs({},a):To(a)?t[i]=a.slice():t[i]=a};for(let a=0,r=arguments.length;a(da(t,(r,i)=>{n&&Dt(r)?e[i]=Bl(r,n):e[i]=r},{allOwnKeys:a}),e),Am=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Im=(e,t,n,a)=>{e.prototype=Object.create(t.prototype,a),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Rm=(e,t,n,a)=>{let r,i,s;const l={};if(t=t||{},e==null)return t;do{for(r=Object.getOwnPropertyNames(e),i=r.length;i-- >0;)s=r[i],(!a||a(s,e,t))&&!l[s]&&(t[s]=e[s],l[s]=!0);e=n!==!1&&vs(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Pm=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const a=e.indexOf(t,n);return a!==-1&&a===n},Mm=e=>{if(!e)return null;if(To(e))return e;let t=e.length;if(!_l(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Bm=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&vs(Uint8Array)),Fm=(e,t)=>{const a=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=a.next())&&!r.done;){const i=r.value;t.call(e,i[0],i[1])}},_m=(e,t)=>{let n;const a=[];for(;(n=e.exec(t))!==null;)a.push(n);return a},Lm=Qt("HTMLFormElement"),Vm=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,a,r){return a.toUpperCase()+r}),Ul=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),jm=Qt("RegExp"),zl=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),a={};da(n,(r,i)=>{let s;(s=t(r,i,e))!==!1&&(a[i]=s||r)}),Object.defineProperties(e,a)},Um=e=>{zl(e,(t,n)=>{if(Dt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const a=e[n];if(Dt(a)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},zm=(e,t)=>{const n={},a=r=>{r.forEach(i=>{n[i]=!0})};return To(e)?a(e):a(String(e).split(t)),n},Hm=()=>{},Gm=(e,t)=>(e=+e,Number.isFinite(e)?e:t),ys="abcdefghijklmnopqrstuvwxyz",Hl="0123456789",Gl={DIGIT:Hl,ALPHA:ys,ALPHA_DIGIT:ys+ys.toUpperCase()+Hl},Wm=(e=16,t=Gl.ALPHA_DIGIT)=>{let n="";const{length:a}=t;for(;e--;)n+=t[Math.random()*a|0];return n};function Km(e){return!!(e&&Dt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Xm=e=>{const t=new Array(10),n=(a,r)=>{if(tr(a)){if(t.indexOf(a)>=0)return;if(!("toJSON"in a)){t[r]=a;const i=To(a)?[]:{};return da(a,(s,l)=>{const c=n(s,r+1);!ca(c)&&(i[l]=c)}),t[r]=void 0,i}}return a};return n(e,0)},Ym=Qt("AsyncFunction"),X={isArray:To,isArrayBuffer:Fl,isBuffer:gm,isFormData:Tm,isArrayBufferView:ym,isString:bm,isNumber:_l,isBoolean:wm,isObject:tr,isPlainObject:nr,isUndefined:ca,isDate:xm,isFile:Em,isBlob:Sm,isRegExp:jm,isFunction:Dt,isStream:Om,isURLSearchParams:km,isTypedArray:Bm,isFileList:Cm,forEach:da,merge:gs,extend:Dm,trim:Nm,stripBOM:Am,inherits:Im,toFlatObject:Rm,kindOf:$a,kindOfTest:Qt,endsWith:Pm,toArray:Mm,forEachEntry:Fm,matchAll:_m,isHTMLForm:Lm,hasOwnProperty:Ul,hasOwnProp:Ul,reduceDescriptors:zl,freezeMethods:Um,toObjectSet:zm,toCamelCase:Vm,noop:Hm,toFiniteNumber:Gm,findKey:Ll,global:Vl,isContextDefined:jl,ALPHABET:Gl,generateString:Wm,isSpecCompliantForm:Km,toJSONObject:Xm,isAsyncFn:Ym,isThenable:e=>e&&(tr(e)||Dt(e))&&Dt(e.then)&&Dt(e.catch)};function Te(e,t,n,a,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),a&&(this.request=a),r&&(this.response=r)}X.inherits(Te,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:X.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Wl=Te.prototype,Kl={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Kl[e]={value:e}}),Object.defineProperties(Te,Kl),Object.defineProperty(Wl,"isAxiosError",{value:!0}),Te.from=(e,t,n,a,r,i)=>{const s=Object.create(Wl);return X.toFlatObject(e,s,function(c){return c!==Error.prototype},l=>l!=="isAxiosError"),Te.call(s,e.message,t,n,a,r),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const Zm=null;function bs(e){return X.isPlainObject(e)||X.isArray(e)}function Xl(e){return X.endsWith(e,"[]")?e.slice(0,-2):e}function Yl(e,t,n){return e?e.concat(t).map(function(r,i){return r=Xl(r),!n&&i?"["+r+"]":r}).join(n?".":""):t}function Jm(e){return X.isArray(e)&&!e.some(bs)}const Qm=X.toFlatObject(X,{},null,function(t){return/^is[A-Z]/.test(t)});function or(e,t,n){if(!X.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=X.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,b){return!X.isUndefined(b[m])});const a=n.metaTokens,r=n.visitor||f,i=n.dots,s=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&X.isSpecCompliantForm(t);if(!X.isFunction(r))throw new TypeError("visitor must be a function");function d(u){if(u===null)return"";if(X.isDate(u))return u.toISOString();if(!c&&X.isBlob(u))throw new Te("Blob is not supported. Use a Buffer instead.");return X.isArrayBuffer(u)||X.isTypedArray(u)?c&&typeof Blob=="function"?new Blob([u]):Buffer.from(u):u}function f(u,m,b){let y=u;if(u&&!b&&typeof u=="object"){if(X.endsWith(m,"{}"))m=a?m:m.slice(0,-2),u=JSON.stringify(u);else if(X.isArray(u)&&Jm(u)||(X.isFileList(u)||X.endsWith(m,"[]"))&&(y=X.toArray(u)))return m=Xl(m),y.forEach(function(O,C){!(X.isUndefined(O)||O===null)&&t.append(s===!0?Yl([m],C,i):s===null?m:m+"[]",d(O))}),!1}return bs(u)?!0:(t.append(Yl(b,m,i),d(u)),!1)}const p=[],h=Object.assign(Qm,{defaultVisitor:f,convertValue:d,isVisitable:bs});function v(u,m){if(!X.isUndefined(u)){if(p.indexOf(u)!==-1)throw Error("Circular reference detected in "+m.join("."));p.push(u),X.forEach(u,function(y,g){(!(X.isUndefined(y)||y===null)&&r.call(t,y,X.isString(g)?g.trim():g,m,h))===!0&&v(y,m?m.concat(g):[g])}),p.pop()}}if(!X.isObject(e))throw new TypeError("data must be an object");return v(e),t}function Zl(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(a){return t[a]})}function ws(e,t){this._pairs=[],e&&or(e,this,t)}const Jl=ws.prototype;Jl.append=function(t,n){this._pairs.push([t,n])},Jl.toString=function(t){const n=t?function(a){return t.call(this,a,Zl)}:Zl;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function qm(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ql(e,t,n){if(!t)return e;const a=n&&n.encode||qm,r=n&&n.serialize;let i;if(r?i=r(t,n):i=X.isURLSearchParams(t)?t.toString():new ws(t,n).toString(a),i){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class ql{constructor(){this.handlers=[]}use(t,n,a){return this.handlers.push({fulfilled:t,rejected:n,synchronous:a?a.synchronous:!1,runWhen:a?a.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){X.forEach(this.handlers,function(a){a!==null&&t(a)})}}const $l={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},$m={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:ws,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},ec=typeof window<"u"&&typeof document<"u",ev=(e=>ec&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),tv=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",qt={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ec,hasStandardBrowserEnv:ev,hasStandardBrowserWebWorkerEnv:tv},Symbol.toStringTag,{value:"Module"})),...$m};function nv(e,t){return or(e,new qt.classes.URLSearchParams,Object.assign({visitor:function(n,a,r,i){return qt.isNode&&X.isBuffer(n)?(this.append(a,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function ov(e){return X.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function av(e){const t={},n=Object.keys(e);let a;const r=n.length;let i;for(a=0;a=n.length;return s=!s&&X.isArray(r)?r.length:s,c?(X.hasOwnProp(r,s)?r[s]=[r[s],a]:r[s]=a,!l):((!r[s]||!X.isObject(r[s]))&&(r[s]=[]),t(n,a,r[s],i)&&X.isArray(r[s])&&(r[s]=av(r[s])),!l)}if(X.isFormData(e)&&X.isFunction(e.entries)){const n={};return X.forEachEntry(e,(a,r)=>{t(ov(a),r,n,0)}),n}return null}function rv(e,t,n){if(X.isString(e))try{return(t||JSON.parse)(e),X.trim(e)}catch(a){if(a.name!=="SyntaxError")throw a}return(0,JSON.stringify)(e)}const ua={transitional:$l,adapter:["xhr","http"],transformRequest:[function(t,n){const a=n.getContentType()||"",r=a.indexOf("application/json")>-1,i=X.isObject(t);if(i&&X.isHTMLForm(t)&&(t=new FormData(t)),X.isFormData(t))return r?JSON.stringify(tc(t)):t;if(X.isArrayBuffer(t)||X.isBuffer(t)||X.isStream(t)||X.isFile(t)||X.isBlob(t))return t;if(X.isArrayBufferView(t))return t.buffer;if(X.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(i){if(a.indexOf("application/x-www-form-urlencoded")>-1)return nv(t,this.formSerializer).toString();if((l=X.isFileList(t))||a.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return or(l?{"files[]":t}:t,c&&new c,this.formSerializer)}}return i||r?(n.setContentType("application/json",!1),rv(t)):t}],transformResponse:[function(t){const n=this.transitional||ua.transitional,a=n&&n.forcedJSONParsing,r=this.responseType==="json";if(t&&X.isString(t)&&(a&&!this.responseType||r)){const s=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(l){if(s)throw l.name==="SyntaxError"?Te.from(l,Te.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:qt.classes.FormData,Blob:qt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};X.forEach(["delete","get","head","post","put","patch"],e=>{ua.headers[e]={}});const sv=X.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),iv=e=>{const t={};let n,a,r;return e&&e.split(` +`).forEach(function(s){r=s.indexOf(":"),n=s.substring(0,r).trim().toLowerCase(),a=s.substring(r+1).trim(),!(!n||t[n]&&sv[n])&&(n==="set-cookie"?t[n]?t[n].push(a):t[n]=[a]:t[n]=t[n]?t[n]+", "+a:a)}),t},nc=Symbol("internals");function fa(e){return e&&String(e).trim().toLowerCase()}function ar(e){return e===!1||e==null?e:X.isArray(e)?e.map(ar):String(e)}function lv(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let a;for(;a=n.exec(e);)t[a[1]]=a[2];return t}const cv=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function xs(e,t,n,a,r){if(X.isFunction(a))return a.call(this,t,n);if(r&&(t=n),!!X.isString(t)){if(X.isString(a))return t.indexOf(a)!==-1;if(X.isRegExp(a))return a.test(t)}}function dv(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,a)=>n.toUpperCase()+a)}function uv(e,t){const n=X.toCamelCase(" "+t);["get","set","has"].forEach(a=>{Object.defineProperty(e,a+n,{value:function(r,i,s){return this[a].call(this,t,r,i,s)},configurable:!0})})}class At{constructor(t){t&&this.set(t)}set(t,n,a){const r=this;function i(l,c,d){const f=fa(c);if(!f)throw new Error("header name must be a non-empty string");const p=X.findKey(r,f);(!p||r[p]===void 0||d===!0||d===void 0&&r[p]!==!1)&&(r[p||c]=ar(l))}const s=(l,c)=>X.forEach(l,(d,f)=>i(d,f,c));return X.isPlainObject(t)||t instanceof this.constructor?s(t,n):X.isString(t)&&(t=t.trim())&&!cv(t)?s(iv(t),n):t!=null&&i(n,t,a),this}get(t,n){if(t=fa(t),t){const a=X.findKey(this,t);if(a){const r=this[a];if(!n)return r;if(n===!0)return lv(r);if(X.isFunction(n))return n.call(this,r,a);if(X.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=fa(t),t){const a=X.findKey(this,t);return!!(a&&this[a]!==void 0&&(!n||xs(this,this[a],a,n)))}return!1}delete(t,n){const a=this;let r=!1;function i(s){if(s=fa(s),s){const l=X.findKey(a,s);l&&(!n||xs(a,a[l],l,n))&&(delete a[l],r=!0)}}return X.isArray(t)?t.forEach(i):i(t),r}clear(t){const n=Object.keys(this);let a=n.length,r=!1;for(;a--;){const i=n[a];(!t||xs(this,this[i],i,t,!0))&&(delete this[i],r=!0)}return r}normalize(t){const n=this,a={};return X.forEach(this,(r,i)=>{const s=X.findKey(a,i);if(s){n[s]=ar(r),delete n[i];return}const l=t?dv(i):String(i).trim();l!==i&&delete n[i],n[l]=ar(r),a[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return X.forEach(this,(a,r)=>{a!=null&&a!==!1&&(n[r]=t&&X.isArray(a)?a.join(", "):a)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const a=new this(t);return n.forEach(r=>a.set(r)),a}static accessor(t){const a=(this[nc]=this[nc]={accessors:{}}).accessors,r=this.prototype;function i(s){const l=fa(s);a[l]||(uv(r,s),a[l]=!0)}return X.isArray(t)?t.forEach(i):i(t),this}}At.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),X.reduceDescriptors(At.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(a){this[n]=a}}}),X.freezeMethods(At);function Es(e,t){const n=this||ua,a=t||n,r=At.from(a.headers);let i=a.data;return X.forEach(e,function(l){i=l.call(n,i,r.normalize(),t?t.status:void 0)}),r.normalize(),i}function oc(e){return!!(e&&e.__CANCEL__)}function pa(e,t,n){Te.call(this,e??"canceled",Te.ERR_CANCELED,t,n),this.name="CanceledError"}X.inherits(pa,Te,{__CANCEL__:!0});function fv(e,t,n){const a=n.config.validateStatus;!n.status||!a||a(n.status)?e(n):t(new Te("Request failed with status code "+n.status,[Te.ERR_BAD_REQUEST,Te.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const pv=qt.hasStandardBrowserEnv?{write(e,t,n,a,r,i){const s=[e+"="+encodeURIComponent(t)];X.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),X.isString(a)&&s.push("path="+a),X.isString(r)&&s.push("domain="+r),i===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function hv(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function mv(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function ac(e,t){return e&&!hv(t)?mv(e,t):t}const vv=qt.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let a;function r(i){let s=i;return t&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return a=r(window.location.href),function(s){const l=X.isString(s)?r(s):s;return l.protocol===a.protocol&&l.host===a.host}}():function(){return function(){return!0}}();function gv(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function yv(e,t){e=e||10;const n=new Array(e),a=new Array(e);let r=0,i=0,s;return t=t!==void 0?t:1e3,function(c){const d=Date.now(),f=a[i];s||(s=d),n[r]=c,a[r]=d;let p=i,h=0;for(;p!==r;)h+=n[p++],p=p%e;if(r=(r+1)%e,r===i&&(i=(i+1)%e),d-s{const i=r.loaded,s=r.lengthComputable?r.total:void 0,l=i-n,c=a(l),d=i<=s;n=i;const f={loaded:i,total:s,progress:s?i/s:void 0,bytes:l,rate:c||void 0,estimated:c&&s&&d?(s-i)/c:void 0,event:r};f[t?"download":"upload"]=!0,e(f)}}const Ss={http:Zm,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,a){let r=e.data;const i=At.from(e.headers).normalize();let{responseType:s,withXSRFToken:l}=e,c;function d(){e.cancelToken&&e.cancelToken.unsubscribe(c),e.signal&&e.signal.removeEventListener("abort",c)}let f;if(X.isFormData(r)){if(qt.hasStandardBrowserEnv||qt.hasStandardBrowserWebWorkerEnv)i.setContentType(!1);else if((f=i.getContentType())!==!1){const[m,...b]=f?f.split(";").map(y=>y.trim()).filter(Boolean):[];i.setContentType([m||"multipart/form-data",...b].join("; "))}}let p=new XMLHttpRequest;if(e.auth){const m=e.auth.username||"",b=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(m+":"+b))}const h=ac(e.baseURL,e.url);p.open(e.method.toUpperCase(),Ql(h,e.params,e.paramsSerializer),!0),p.timeout=e.timeout;function v(){if(!p)return;const m=At.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),y={data:!s||s==="text"||s==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:m,config:e,request:p};fv(function(O){n(O),d()},function(O){a(O),d()},y),p=null}if("onloadend"in p?p.onloadend=v:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(v)},p.onabort=function(){p&&(a(new Te("Request aborted",Te.ECONNABORTED,e,p)),p=null)},p.onerror=function(){a(new Te("Network Error",Te.ERR_NETWORK,e,p)),p=null},p.ontimeout=function(){let b=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const y=e.transitional||$l;e.timeoutErrorMessage&&(b=e.timeoutErrorMessage),a(new Te(b,y.clarifyTimeoutError?Te.ETIMEDOUT:Te.ECONNABORTED,e,p)),p=null},qt.hasStandardBrowserEnv&&(l&&X.isFunction(l)&&(l=l(e)),l||l!==!1&&vv(h))){const m=e.xsrfHeaderName&&e.xsrfCookieName&&pv.read(e.xsrfCookieName);m&&i.set(e.xsrfHeaderName,m)}r===void 0&&i.setContentType(null),"setRequestHeader"in p&&X.forEach(i.toJSON(),function(b,y){p.setRequestHeader(y,b)}),X.isUndefined(e.withCredentials)||(p.withCredentials=!!e.withCredentials),s&&s!=="json"&&(p.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&p.addEventListener("progress",rc(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&p.upload&&p.upload.addEventListener("progress",rc(e.onUploadProgress)),(e.cancelToken||e.signal)&&(c=m=>{p&&(a(!m||m.type?new pa(null,e,p):m),p.abort(),p=null)},e.cancelToken&&e.cancelToken.subscribe(c),e.signal&&(e.signal.aborted?c():e.signal.addEventListener("abort",c)));const u=gv(h);if(u&&qt.protocols.indexOf(u)===-1){a(new Te("Unsupported protocol "+u+":",Te.ERR_BAD_REQUEST,e));return}p.send(r||null)})}};X.forEach(Ss,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const sc=e=>`- ${e}`,bv=e=>X.isFunction(e)||e===null||e===!1,ic={getAdapter:e=>{e=X.isArray(e)?e:[e];const{length:t}=e;let n,a;const r={};for(let i=0;i`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let s=t?i.length>1?`since : `+i.map(sc).join(` -`):" "+sc(i[0]):"as no adapter specified";throw new Ce("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return a},adapters:Ss};function Os(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new pa(null,e)}function lc(e){return Os(e),e.headers=_t.from(e.headers),e.data=xs.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ic.getAdapter(e.adapter||ua.adapter)(e).then(function(a){return Os(e),a.data=xs.call(e,e.transformResponse,a),a.headers=_t.from(a.headers),a},function(a){return oc(a)||(Os(e),a&&a.response&&(a.response.data=xs.call(e,e.transformResponse,a.response),a.response.headers=_t.from(a.response.headers))),Promise.reject(a)})}const cc=e=>e instanceof _t?e.toJSON():e;function No(e,t){t=t||{};const n={};function a(d,f,p){return X.isPlainObject(d)&&X.isPlainObject(f)?X.merge.call({caseless:p},d,f):X.isPlainObject(f)?X.merge({},f):X.isArray(f)?f.slice():f}function r(d,f,p){if(X.isUndefined(f)){if(!X.isUndefined(d))return a(void 0,d,p)}else return a(d,f,p)}function i(d,f){if(!X.isUndefined(f))return a(void 0,f)}function s(d,f){if(X.isUndefined(f)){if(!X.isUndefined(d))return a(void 0,d)}else return a(void 0,f)}function l(d,f,p){if(p in t)return a(d,f);if(p in e)return a(void 0,d)}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l,headers:(d,f)=>r(cc(d),cc(f),!0)};return X.forEach(Object.keys(Object.assign({},e,t)),function(f){const p=c[f]||r,h=p(e[f],t[f],f);X.isUndefined(h)&&p!==l||(n[f]=h)}),n}const dc="1.6.7",Ts={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ts[e]=function(a){return typeof a===e||"a"+(t<1?"n ":" ")+e}});const uc={};Ts.transitional=function(t,n,a){function r(i,s){return"[Axios v"+dc+"] Transitional option '"+i+"'"+s+(a?". "+a:"")}return(i,s,l)=>{if(t===!1)throw new Ce(r(s," has been removed"+(n?" in "+n:"")),Ce.ERR_DEPRECATED);return n&&!uc[s]&&(uc[s]=!0,console.warn(r(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,s,l):!0}};function Ev(e,t,n){if(typeof e!="object")throw new Ce("options must be an object",Ce.ERR_BAD_OPTION_VALUE);const a=Object.keys(e);let r=a.length;for(;r-- >0;){const i=a[r],s=t[i];if(s){const l=e[i],c=l===void 0||s(l,i,e);if(c!==!0)throw new Ce("option "+i+" must be "+c,Ce.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ce("Unknown option "+i,Ce.ERR_BAD_OPTION)}}const Cs={assertOptions:Ev,validators:Ts},Cn=Cs.validators;class Xn{constructor(t){this.defaults=t,this.interceptors={request:new ql,response:new ql}}async request(t,n){try{return await this._request(t,n)}catch(a){if(a instanceof Error){let r;Error.captureStackTrace?Error.captureStackTrace(r={}):r=new Error;const i=r.stack?r.stack.replace(/^.+\n/,""):"";a.stack?i&&!String(a.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(a.stack+=` -`+i):a.stack=i}throw a}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=No(this.defaults,n);const{transitional:a,paramsSerializer:r,headers:i}=n;a!==void 0&&Cs.assertOptions(a,{silentJSONParsing:Cn.transitional(Cn.boolean),forcedJSONParsing:Cn.transitional(Cn.boolean),clarifyTimeoutError:Cn.transitional(Cn.boolean)},!1),r!=null&&(X.isFunction(r)?n.paramsSerializer={serialize:r}:Cs.assertOptions(r,{encode:Cn.function,serialize:Cn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=i&&X.merge(i.common,i[n.method]);i&&X.forEach(["delete","get","head","post","put","patch","common"],u=>{delete i[u]}),n.headers=_t.concat(s,i);const l=[];let c=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(c=c&&m.synchronous,l.unshift(m.fulfilled,m.rejected))});const d=[];this.interceptors.response.forEach(function(m){d.push(m.fulfilled,m.rejected)});let f,p=0,h;if(!c){const u=[lc.bind(this),void 0];for(u.unshift.apply(u,l),u.push.apply(u,d),h=u.length,f=Promise.resolve(n);p{if(!a._listeners)return;let i=a._listeners.length;for(;i-- >0;)a._listeners[i](r);a._listeners=null}),this.promise.then=r=>{let i;const s=new Promise(l=>{a.subscribe(l),i=l}).then(r);return s.cancel=function(){a.unsubscribe(i)},s},t(function(i,s,l){a.reason||(a.reason=new pa(i,s,l),n(a.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new Ns(function(r){t=r}),cancel:t}}}function wv(e){return function(n){return e.apply(null,n)}}function xv(e){return X.isObject(e)&&e.isAxiosError===!0}const ks={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ks).forEach(([e,t])=>{ks[t]=e});function fc(e){const t=new Xn(e),n=Bl(Xn.prototype.request,t);return X.extend(n,Xn.prototype,t,{allOwnKeys:!0}),X.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return fc(No(e,r))},n}const We=fc(ua);We.Axios=Xn,We.CanceledError=pa,We.CancelToken=Ns,We.isCancel=oc,We.VERSION=dc,We.toFormData=or,We.AxiosError=Ce,We.Cancel=We.CanceledError,We.all=function(t){return Promise.all(t)},We.spread=wv,We.isAxiosError=xv,We.mergeConfig=No,We.AxiosHeaders=_t,We.formToJSON=e=>tc(X.isHTMLForm(e)?new FormData(e):e),We.getAdapter=ic.getAdapter,We.HttpStatusCode=ks,We.default=We;function Sv(e){return e==null}var Ov=Sv;const Tv=Sn(Ov);function pc(){return document.head.querySelector('meta[name="csrf-token"]')?.content??!1}function hc(){const e=We.create();return e.defaults.headers.common["X-Requested-With"]="XMLHttpRequest",e.defaults.headers.common["X-CSRF-TOKEN"]=pc(),e.interceptors.response.use(t=>t,t=>{if(We.isCancel(t))return Promise.reject(t);const n=t.response,{status:a,data:{redirect:r}}=n;if(a>=500&&window.Nova.$emit("error",t.response.data.message),a===401){if(!Tv(r)){location.href=r;return}window.Nova.redirectToLogin()}return a===403&&window.Nova.visit("/403"),a===419&&window.Nova.$emit("token-expired"),Promise.reject(t)}),e}function Cv(e){return function(t){return e?.[t]}}var Nv=Cv,kv=Nv,Iv={"&":"&","<":"<",">":">",'"':""","'":"'"},_v=kv(Iv),Av=_v;function Dv(e,t){for(var n=-1,a=e==null?0:e.length,r=Array(a);++n"']/g,zv=RegExp(wc.source);function Gv(e){return e=Hv(e),e&&zv.test(e)?e.replace(wc,Uv):e}var Wv=Gv;const Kv=Sn(Wv);function Nn(e,t){if(e==null)return e;let n=t?.escape?Kv(e):e;return n=n.trim().replace(/ /g," ").replace(/\/{2,}/g,"/"),n}const Re=ns("nova-file-manager/browser",{state:()=>({path:void 0,disk:void 0,disks:void 0,page:void 0,search:void 0,perPage:10,perPageOptions:fs(10,60,10),view:"grid",modals:[],callback:()=>{},files:void 0,folders:void 0,breadcrumbs:void 0,pagination:void 0,error:void 0,selection:void 0,preview:void 0,limit:void 0,wrapper:void 0,queue:[],multiple:void 0,ready:!1,isField:!1,isFetchingDisks:!1,isFetchingData:!1,isUploading:!1,loadingOperation:void 0,dark:void 0,tour:!1,resource:void 0,resourceId:void 0,attribute:void 0,singleDisk:!1,flexibleGroup:[],fieldInit:void 0,permissions:{folder:{create:!0,rename:!0,delete:!0},file:{upload:!0,rename:!0,edit:!0,delete:!0,unzip:!0}},chunkSize:50*1024*1024,usePintura:!1,pinturaOptions:{},cropperOptions:{}}),actions:{init(){this.ready||(this.syncDarkMode(),this.loadFromLocalStorage(),this.loadFromQueryString(),this.ready=!0)},syncDarkMode(){this.dark===void 0&&(this.dark=document.documentElement.classList.contains("dark")),window.Nova.$on("nova-theme-switched",({theme:e})=>{this.dark=e==="dark"})},loadFromLocalStorage(){if(this.isField)return;["perPage","view","disk"].forEach(t=>{const n=window?.localStorage.getItem(`nova-file-manager/${t}`);n&&n.length&&this.$patch({[t]:n})})},loadFromQueryString(){if(this.isField)return;const e=Object.fromEntries(new URLSearchParams(window?.location.search).entries());for(const[t,n]of Object.entries(e))["path","disk","page","perPage"].includes(t)&&this.$patch({[t]:n});window.location.href.includes("?")||(this.path="/")},saveToLocalStorage({values:e}){if(!(this.isField||!e))for(const[t,n]of Object.entries(e))n&&window?.localStorage.setItem(`nova-file-manager/${t}`,n.toString())},selectFile({file:e}){if(!this.selection){this.selection=[e];return}this.selection.push(e)},deselectFile({file:e}){this.selection=this.selection?.filter(t=>t.id!==e.id)},setSelection({files:e}){this.selection=e},clearSelection(){this.setSelection({files:void 0})},toggleSelection({file:e}){if(this.isSelected(e)){this.deselectFile({file:e});return}this.multiple||this.clearSelection(),this.selectFile({file:e})},openModal({name:e}){this.modals.unshift(e)},closeModal({name:e}){e===ps&&(this.preview=void 0),this.modals=this.modals.filter(t=>t!==e),this.resetError(),this.fixPortal()},setError({attribute:e,bag:t}){this.error={attribute:e,bag:t}},resetError(){this.error=void 0},queueFile({file:e}){this.queue.push({id:e.name,ratio:0,status:null,file:e,isImage:e.type.includes("image")??!1})},clearQueue(){this.queue=[]},updateQueue({id:e,ratio:t=100,status:n=null}){this.queue=this.queue.map(r=>r.id===e?{...r,status:n,ratio:t}:r),this.queue.reduce((r,i)=>r&&i.ratio===100,!0)&&this.queue.length&&setTimeout(async()=>{this.closeModal({name:fm}),this.closeModal({name:la}),this.clearQueue(),this.isUploading=!1,await this.data()},1e3)},fixPortal(){this.modals.length||this.preview||setTimeout(()=>{document.documentElement.style.removeProperty("overflow"),document.documentElement.style.removeProperty("padding-right")},200)},setQueryString({parameters:e}){if(this.isField)return;const t=new URLSearchParams(window.location.search),n=window.Nova.app.config.globalProperties.$inertia.page;for(const[a,r]of Object.entries(e)){const i=r?.toString();if(!i){t.delete(a);continue}i?.length>0&&t.set(a,i)}if(n.url!==`${window.location.pathname}?${t}`){n.url=`${window.location.pathname}?${t}`;const a=t.toString().length>0?"?":"";window.history.pushState(n,"",`${window.location.pathname}${a}${t}`)}},reset(){["page","search","path"].forEach(t=>{this.$patch({[t]:null})})},async setPath({path:e}){this.reset(),this.path=e,this.setQueryString({parameters:{page:null,search:null,path:e}})},async setDisk({disk:e}){this.reset(),this.disk=e,this.setQueryString({parameters:{disk:e}}),this.saveToLocalStorage({values:{disk:e,page:null,search:null,path:null}})},async setPerPage({perPage:e}){this.perPage=e,this.page=1,this.setQueryString({parameters:{perPage:e}}),this.saveToLocalStorage({values:{perPage:e}})},async setPage({page:e}){this.page=e,this.setQueryString({parameters:{page:e}})},setView({view:e}){this.view=e,this.saveToLocalStorage({values:{view:e}})},setSearch({search:e}){this.search=e,this.setQueryString({parameters:{search:e}})},setPreview({preview:e}){this.preview=e},async deleteSelectedFiles(){await this.deleteFiles({paths:this.selection?.map(e=>e.path)??[]})},async data(){this.isFetchingData=!0;const{data:e}=await this.get({params:this.payload({path:this.path,page:this.page,perPage:this.perPage,search:this.search})});this.disk=e.disk,this.folders=e.folders,this.breadcrumbs=e.breadcrumbs,this.files=e.files,this.pagination=e.pagination,this.isFetchingData=!1},async getDisks(){this.isFetchingDisks=!0;const{data:e}=await this.get({path:ln.DISKS});this.disks=e,this.isFetchingDisks=!1},async createFolder({path:e}){await To({operation:Qt.CREATE_FOLDER,modal:Ut.CREATE_FOLDER,endpoint:ln.CREATE_FOLDER,data:this.payload({path:Nn(`${this.path??""}/${Nn(e)}`,{escape:!1})})})},async renameFolder({id:e,from:t,to:n}){await To({operation:Qt.RENAME_FOLDER,modal:`${Ut.RENAME_FOLDER}-${e}`,endpoint:ln.RENAME_FOLDER,data:this.payload({path:this.path,from:Nn(t,{escape:!1}),to:Nn(`${this.path??""}/${Nn(n)}`,{escape:!1})})})},async deleteFolder({id:e,path:t}){await To({operation:Qt.DELETE_FOLDER,modal:`${Ut.DELETE_FOLDER}-${e}`,endpoint:ln.DELETE_FOLDER,data:this.payload({path:t})})},upload({files:e}){this.isUploading=!0;const t=new um({permanentErrors:[400,404,409,415,419,422,500,501],chunkSize:this.chunkSize,maxChunkRetries:5,chunkRetryInterval:1e3,simultaneousUploads:1,testChunks:!1,target:this.url(ln.UPLOAD),query:this.payload({path:this.path??"/"}),headers:{Accept:"application/json","X-CSRF-TOKEN":pc()}});e.forEach(n=>{t.addFile(n),this.queueFile({file:n})}),t.on("fileAdded",()=>t.upload()),t.on("fileSuccess",n=>{this.updateQueue({id:n.fileName,status:!0})}),t.on("fileProgress",n=>{this.updateQueue({id:n.fileName,ratio:Math.floor(n.progress(!1)*100)})}),t.on("fileError",(n,a)=>{this.updateQueue({id:n.fileName,status:!1}),window.Nova.error(JSON.parse(a).message)})},async renameFile({id:e,from:t,to:n}){await To({operation:Qt.RENAME_FILE,modal:`${Ut.RENAME_FILE}-${e}`,endpoint:ln.RENAME_FILE,data:this.payload({path:this.path,from:Nn(t,{escape:!1}),to:Nn(`${this.path??""}/${Nn(n)}`,{escape:!1})})})},async deleteFiles({paths:e}){e.length!==0&&await To({operation:Qt.DELETE_FILE,modal:Ut.DELETE_FILES,endpoint:ln.DELETE_FILE,data:this.payload({paths:e}),callback:()=>{this.preview=void 0,this.clearSelection()}})},async unzipFile({path:e}){await To({operation:Qt.UNZIP_FILE,endpoint:ln.UNZIP_FILE,data:this.payload({path:e}),callback:()=>{this.preview=void 0,this.clearSelection()}})},downloadUrl(e){return this.url(`/nova-vendor/nova-file-manager/${ln.DOWNLOAD_FILE}?disk=${e.disk}&path=${e.path}`)},async get({path:e,params:t,options:n={}}){return await hc().get(this.url(`/nova-vendor/nova-file-manager${e??""}`),{params:t,...n})},async post({path:e,data:t}){return await hc().post(this.url(`/nova-vendor/nova-file-manager${e??""}`),t)},payload(e){let t={...e,attribute:this.attribute,resource:this.resource,fieldMode:this.isField};if(this.component?.length&&["Nova.Create","Nova.Update"].includes(this.component)){let n;switch(this.component){case"Nova.Create":n="create";break;case"Nova.Update":n="update";break}t={...t,editing:!0,editMode:n}}return this.wrapper?.length&&(t={...t,wrapper:this.wrapper}),this.resourceId&&(t={...t,resourceId:this.resourceId}),this.singleDisk||(t={...t,disk:this.disk}),this.isField&&this.flexibleGroup?.length&&(t={...t,flexible:this.flexibleGroup.join(".")}),t},url(e){const t=this.isField?`/${this.resource}`:"";return`${e}${t}`.replace("//","/")},openBrowser({initialFiles:e,multiple:t,limit:n,wrapper:a,resource:r,resourceId:i,attribute:s,singleDisk:l,permissions:c,flexibleGroup:d,callback:f,usePintura:p,pinturaOptions:h,cropperOptions:v,paginationOptions:u,component:m}){this.isField=!0,this.multiple=t,this.limit=n,this.wrapper=a,this.resource=r,this.resourceId=i,this.attribute=s,this.singleDisk=l,this.flexibleGroup=d,this.callback=f,this.usePintura=p,this.pinturaOptions=h,this.cropperOptions=v,this.perPageOptions=u??this.perPageOptions,this.error=void 0,this.permissions=c,this.disk=void 0,this.component=m,this.openModal({name:hs}),this.setSelection({files:[...e]})},closeBrowser(){this.isField=!1,this.multiple=void 0,this.limit=void 0,this.wrapper=void 0,this.resource=void 0,this.resourceId=void 0,this.attribute=void 0,this.singleDisk=!1,this.flexibleGroup=[],this.callback=void 0,this.usePintura=!1,this.pinturaOptions={},this.cropperOptions={},this.perPage=10,this.perPageOptions=fs(10,60,10),this.error=void 0,this.permissions=void 0,this.disk=void 0,this.setSelection({files:[]}),this.closeModal({name:hs})},confirm(){this.callback&&this.callback(this.selection),this.closeBrowser()},prepareTool({singleDisk:e,permissions:t,tour:n,usePintura:a,pinturaOptions:r,cropperOptions:i,paginationOptions:s}){this.init(),this.clearSelection(),this.limit=void 0,this.isField=!1,this.multiple=!0,this.singleDisk=e,this.permissions=t,this.tour=n,this.usePintura=a,this.pinturaOptions=r,this.cropperOptions=i,this.perPageOptions=s??this.perPageOptions,this.error=void 0}},getters:{isOpen(){return e=>e===ps?!!this.preview:this.modals.includes(e)},isSelected(){return e=>!!this.selection?.find(t=>t.id===e.id)},isBrowserOpen(e){return e.modals.includes(hs)}}}),xc=o.defineComponent({__name:"FieldCard",props:{file:{},detail:{type:Boolean,default:!1},field:{},onDeselect:{}},setup(e){const t=Re(),n=e,a=o.computed(()=>t.singleDisk),r=s=>t.preview=s,i=s=>{n.detail&&s.exists&&r(s)};return(s,l)=>(o.openBlock(),o.createBlock(ls,{file:s.file,selected:!1,"on-deselect":s.onDeselect,"single-disk":a.value,"field-mode":!0,onClick:l[0]||(l[0]=o.withModifiers(c=>i(s.file),["prevent","stop"]))},null,8,["file","on-deselect","single-disk"]))}});function ko(e,t,n){let a=n.initialDeps??[],r;return()=>{var i,s,l,c;let d;n.key&&((i=n.debug)!=null&&i.call(n))&&(d=Date.now());const f=e();if(!(f.length!==a.length||f.some((v,u)=>a[u]!==v)))return r;a=f;let h;if(n.key&&((s=n.debug)!=null&&s.call(n))&&(h=Date.now()),r=t(...f),n.key&&((l=n.debug)!=null&&l.call(n))){const v=Math.round((Date.now()-d)*100)/100,u=Math.round((Date.now()-h)*100)/100,m=u/16,y=(b,g)=>{for(b=String(b);b.lengthe instanceof At?e.toJSON():e;function ko(e,t){t=t||{};const n={};function a(d,f,p){return X.isPlainObject(d)&&X.isPlainObject(f)?X.merge.call({caseless:p},d,f):X.isPlainObject(f)?X.merge({},f):X.isArray(f)?f.slice():f}function r(d,f,p){if(X.isUndefined(f)){if(!X.isUndefined(d))return a(void 0,d,p)}else return a(d,f,p)}function i(d,f){if(!X.isUndefined(f))return a(void 0,f)}function s(d,f){if(X.isUndefined(f)){if(!X.isUndefined(d))return a(void 0,d)}else return a(void 0,f)}function l(d,f,p){if(p in t)return a(d,f);if(p in e)return a(void 0,d)}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l,headers:(d,f)=>r(cc(d),cc(f),!0)};return X.forEach(Object.keys(Object.assign({},e,t)),function(f){const p=c[f]||r,h=p(e[f],t[f],f);X.isUndefined(h)&&p!==l||(n[f]=h)}),n}const dc="1.6.7",Os={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Os[e]=function(a){return typeof a===e||"a"+(t<1?"n ":" ")+e}});const uc={};Os.transitional=function(t,n,a){function r(i,s){return"[Axios v"+dc+"] Transitional option '"+i+"'"+s+(a?". "+a:"")}return(i,s,l)=>{if(t===!1)throw new Te(r(s," has been removed"+(n?" in "+n:"")),Te.ERR_DEPRECATED);return n&&!uc[s]&&(uc[s]=!0,console.warn(r(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,s,l):!0}};function wv(e,t,n){if(typeof e!="object")throw new Te("options must be an object",Te.ERR_BAD_OPTION_VALUE);const a=Object.keys(e);let r=a.length;for(;r-- >0;){const i=a[r],s=t[i];if(s){const l=e[i],c=l===void 0||s(l,i,e);if(c!==!0)throw new Te("option "+i+" must be "+c,Te.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Te("Unknown option "+i,Te.ERR_BAD_OPTION)}}const Ts={assertOptions:wv,validators:Os},Tn=Ts.validators;class Xn{constructor(t){this.defaults=t,this.interceptors={request:new ql,response:new ql}}async request(t,n){try{return await this._request(t,n)}catch(a){if(a instanceof Error){let r;Error.captureStackTrace?Error.captureStackTrace(r={}):r=new Error;const i=r.stack?r.stack.replace(/^.+\n/,""):"";a.stack?i&&!String(a.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(a.stack+=` +`+i):a.stack=i}throw a}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ko(this.defaults,n);const{transitional:a,paramsSerializer:r,headers:i}=n;a!==void 0&&Ts.assertOptions(a,{silentJSONParsing:Tn.transitional(Tn.boolean),forcedJSONParsing:Tn.transitional(Tn.boolean),clarifyTimeoutError:Tn.transitional(Tn.boolean)},!1),r!=null&&(X.isFunction(r)?n.paramsSerializer={serialize:r}:Ts.assertOptions(r,{encode:Tn.function,serialize:Tn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=i&&X.merge(i.common,i[n.method]);i&&X.forEach(["delete","get","head","post","put","patch","common"],u=>{delete i[u]}),n.headers=At.concat(s,i);const l=[];let c=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(c=c&&m.synchronous,l.unshift(m.fulfilled,m.rejected))});const d=[];this.interceptors.response.forEach(function(m){d.push(m.fulfilled,m.rejected)});let f,p=0,h;if(!c){const u=[lc.bind(this),void 0];for(u.unshift.apply(u,l),u.push.apply(u,d),h=u.length,f=Promise.resolve(n);p{if(!a._listeners)return;let i=a._listeners.length;for(;i-- >0;)a._listeners[i](r);a._listeners=null}),this.promise.then=r=>{let i;const s=new Promise(l=>{a.subscribe(l),i=l}).then(r);return s.cancel=function(){a.unsubscribe(i)},s},t(function(i,s,l){a.reason||(a.reason=new pa(i,s,l),n(a.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new ks(function(r){t=r}),cancel:t}}}function xv(e){return function(n){return e.apply(null,n)}}function Ev(e){return X.isObject(e)&&e.isAxiosError===!0}const Ns={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ns).forEach(([e,t])=>{Ns[t]=e});function fc(e){const t=new Xn(e),n=Bl(Xn.prototype.request,t);return X.extend(n,Xn.prototype,t,{allOwnKeys:!0}),X.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return fc(ko(e,r))},n}const We=fc(ua);We.Axios=Xn,We.CanceledError=pa,We.CancelToken=ks,We.isCancel=oc,We.VERSION=dc,We.toFormData=or,We.AxiosError=Te,We.Cancel=We.CanceledError,We.all=function(t){return Promise.all(t)},We.spread=xv,We.isAxiosError=Ev,We.mergeConfig=ko,We.AxiosHeaders=At,We.formToJSON=e=>tc(X.isHTMLForm(e)?new FormData(e):e),We.getAdapter=ic.getAdapter,We.HttpStatusCode=Ns,We.default=We;function Sv(e){return e==null}var Cv=Sv;const Ov=Sn(Cv);function pc(){return document.head.querySelector('meta[name="csrf-token"]')?.content??!1}function hc(){const e=We.create();return e.defaults.headers.common["X-Requested-With"]="XMLHttpRequest",e.defaults.headers.common["X-CSRF-TOKEN"]=pc(),e.interceptors.response.use(t=>t,t=>{if(We.isCancel(t))return Promise.reject(t);const n=t.response,{status:a,data:{redirect:r}}=n;if(a>=500&&window.Nova.$emit("error",t.response.data.message),a===401){if(!Ov(r)){location.href=r;return}window.Nova.redirectToLogin()}return a===403&&window.Nova.visit("/403"),a===419&&window.Nova.$emit("token-expired"),Promise.reject(t)}),e}function Tv(e){return function(t){return e?.[t]}}var kv=Tv,Nv=kv,Dv={"&":"&","<":"<",">":">",'"':""","'":"'"},Av=Nv(Dv),Iv=Av;function Rv(e,t){for(var n=-1,a=e==null?0:e.length,r=Array(a);++n"']/g,Hv=RegExp(xc.source);function Gv(e){return e=zv(e),e&&Hv.test(e)?e.replace(xc,Uv):e}var Wv=Gv;const Kv=Sn(Wv);function kn(e,t){if(e==null)return e;let n=t?.escape?Kv(e):e;return n=n.trim().replace(/ /g," ").replace(/\/{2,}/g,"/"),n}const Pe=ns("nova-file-manager/browser",{state:()=>({path:void 0,disk:void 0,disks:void 0,page:void 0,search:void 0,perPage:10,perPageOptions:fs(10,60,10),view:"grid",modals:[],callback:()=>{},files:void 0,folders:void 0,breadcrumbs:void 0,pagination:void 0,error:void 0,selection:void 0,preview:void 0,limit:void 0,wrapper:void 0,queue:[],multiple:void 0,ready:!1,isField:!1,isFetchingDisks:!1,isFetchingData:!1,isUploading:!1,loadingOperation:void 0,dark:void 0,tour:!1,resource:void 0,resourceId:void 0,attribute:void 0,singleDisk:!1,flexibleGroup:[],fieldInit:void 0,permissions:{folder:{create:!0,rename:!0,delete:!0},file:{upload:!0,rename:!0,edit:!0,delete:!0,unzip:!0}},chunkSize:50*1024*1024,usePintura:!1,pinturaOptions:{},cropperOptions:{}}),actions:{init(){this.ready||(this.syncDarkMode(),this.loadFromLocalStorage(),this.loadFromQueryString(),this.ready=!0)},syncDarkMode(){this.dark===void 0&&(this.dark=document.documentElement.classList.contains("dark")),window.Nova.$on("nova-theme-switched",({theme:e})=>{this.dark=e==="dark"})},loadFromLocalStorage(){if(this.isField)return;["perPage","view","disk"].forEach(t=>{const n=window?.localStorage.getItem(`nova-file-manager/${t}`);n&&n.length&&this.$patch({[t]:n})})},loadFromQueryString(){if(this.isField)return;const e=Object.fromEntries(new URLSearchParams(window?.location.search).entries());for(const[t,n]of Object.entries(e))["path","disk","page","perPage"].includes(t)&&this.$patch({[t]:n});window.location.href.includes("?")||(this.path="/")},saveToLocalStorage({values:e}){if(!(this.isField||!e))for(const[t,n]of Object.entries(e))n&&window?.localStorage.setItem(`nova-file-manager/${t}`,n.toString())},selectFile({file:e}){if(!this.selection){this.selection=[e];return}this.selection.push(e)},deselectFile({file:e}){this.selection=this.selection?.filter(t=>t.id!==e.id)},setSelection({files:e}){this.selection=e},clearSelection(){this.setSelection({files:void 0})},toggleSelection({file:e}){if(this.isSelected(e)){this.deselectFile({file:e});return}this.multiple||this.clearSelection(),this.selectFile({file:e})},openModal({name:e}){this.modals.unshift(e)},closeModal({name:e}){e===ps&&(this.preview=void 0),this.modals=this.modals.filter(t=>t!==e),this.resetError(),this.fixPortal()},setError({attribute:e,bag:t}){this.error={attribute:e,bag:t}},resetError(){this.error=void 0},queueFile({file:e}){this.queue.push({id:e.name,ratio:0,status:null,file:e,isImage:e.type.includes("image")??!1})},clearQueue(){this.queue=[]},updateQueue({id:e,ratio:t=100,status:n=null}){this.queue=this.queue.map(r=>r.id===e?{...r,status:n,ratio:t}:r),this.queue.reduce((r,i)=>r&&i.ratio===100,!0)&&this.queue.length&&setTimeout(async()=>{this.closeModal({name:fm}),this.closeModal({name:la}),this.clearQueue(),this.isUploading=!1,await this.data()},1e3)},fixPortal(){this.modals.length||this.preview||setTimeout(()=>{document.documentElement.style.removeProperty("overflow"),document.documentElement.style.removeProperty("padding-right")},200)},setQueryString({parameters:e}){if(this.isField)return;const t=new URLSearchParams(window.location.search),n={url:`${window.location.pathname}${window.location.search}`};for(const[a,r]of Object.entries(e)){const i=r?.toString();if(!i){t.delete(a);continue}i?.length>0&&t.set(a,i)}if(console.info(n.url,window.location.pathname,t.toString()),n.url!==`${window.location.pathname}?${t}`){n.url=`${window.location.pathname}?${t}`;const a=t.toString().length>0?"?":"";window.history.pushState(n,"",`${window.location.pathname}${a}${t}`)}},reset(){["page","search","path"].forEach(t=>{this.$patch({[t]:null})})},async setPath({path:e}){this.reset(),this.path=e,this.setQueryString({parameters:{page:null,search:null,path:e}})},async setDisk({disk:e}){this.reset(),this.disk=e,this.setQueryString({parameters:{disk:e}}),this.saveToLocalStorage({values:{disk:e,page:null,search:null,path:null}})},async setPerPage({perPage:e}){this.perPage=e,this.page=1,this.setQueryString({parameters:{perPage:e}}),this.saveToLocalStorage({values:{perPage:e}})},async setPage({page:e}){this.page=e,this.setQueryString({parameters:{page:e}})},setView({view:e}){this.view=e,this.saveToLocalStorage({values:{view:e}})},setSearch({search:e}){this.search=e,this.setQueryString({parameters:{search:e}})},setPreview({preview:e}){this.preview=e},async deleteSelectedFiles(){await this.deleteFiles({paths:this.selection?.map(e=>e.path)??[]})},async data(){this.isFetchingData=!0;const{data:e}=await this.get({params:this.payload({path:this.path,page:this.page,perPage:this.perPage,search:this.search})});this.disk=e.disk,this.folders=e.folders,this.breadcrumbs=e.breadcrumbs,this.files=e.files,this.pagination=e.pagination,this.isFetchingData=!1},async getDisks(){this.isFetchingDisks=!0;const{data:e}=await this.get({path:ln.DISKS});this.disks=e,this.isFetchingDisks=!1},async createFolder({path:e}){await Oo({operation:Jt.CREATE_FOLDER,modal:Ut.CREATE_FOLDER,endpoint:ln.CREATE_FOLDER,data:this.payload({path:kn(`${this.path??""}/${kn(e)}`,{escape:!1})})})},async renameFolder({id:e,from:t,to:n}){await Oo({operation:Jt.RENAME_FOLDER,modal:`${Ut.RENAME_FOLDER}-${e}`,endpoint:ln.RENAME_FOLDER,data:this.payload({path:this.path,from:kn(t,{escape:!1}),to:kn(`${this.path??""}/${kn(n)}`,{escape:!1})})})},async deleteFolder({id:e,path:t}){await Oo({operation:Jt.DELETE_FOLDER,modal:`${Ut.DELETE_FOLDER}-${e}`,endpoint:ln.DELETE_FOLDER,data:this.payload({path:t})})},upload({files:e}){this.isUploading=!0;const t=new um({permanentErrors:[400,404,409,415,419,422,500,501],chunkSize:this.chunkSize,maxChunkRetries:5,chunkRetryInterval:1e3,simultaneousUploads:1,testChunks:!1,target:this.url(ln.UPLOAD),query:this.payload({path:this.path??"/"}),headers:{Accept:"application/json","X-CSRF-TOKEN":pc()}});e.forEach(n=>{t.addFile(n),this.queueFile({file:n})}),t.on("fileAdded",()=>t.upload()),t.on("fileSuccess",n=>{this.updateQueue({id:n.fileName,status:!0})}),t.on("fileProgress",n=>{this.updateQueue({id:n.fileName,ratio:Math.floor(n.progress(!1)*100)})}),t.on("fileError",(n,a)=>{this.updateQueue({id:n.fileName,status:!1}),window.Nova.error(JSON.parse(a).message)})},async renameFile({id:e,from:t,to:n}){await Oo({operation:Jt.RENAME_FILE,modal:`${Ut.RENAME_FILE}-${e}`,endpoint:ln.RENAME_FILE,data:this.payload({path:this.path,from:kn(t,{escape:!1}),to:kn(`${this.path??""}/${kn(n)}`,{escape:!1})})})},async deleteFiles({paths:e}){e.length!==0&&await Oo({operation:Jt.DELETE_FILE,modal:Ut.DELETE_FILES,endpoint:ln.DELETE_FILE,data:this.payload({paths:e}),callback:()=>{this.preview=void 0,this.clearSelection()}})},async unzipFile({path:e}){await Oo({operation:Jt.UNZIP_FILE,endpoint:ln.UNZIP_FILE,data:this.payload({path:e}),callback:()=>{this.preview=void 0,this.clearSelection()}})},downloadUrl(e){return this.url(`/nova-vendor/nova-file-manager/${ln.DOWNLOAD_FILE}?disk=${e.disk}&path=${e.path}`)},async get({path:e,params:t,options:n={}}){return await hc().get(this.url(`/nova-vendor/nova-file-manager${e??""}`),{params:t,...n})},async post({path:e,data:t}){return await hc().post(this.url(`/nova-vendor/nova-file-manager${e??""}`),t)},payload(e){let t={...e,attribute:this.attribute,resource:this.resource,fieldMode:this.isField};if(this.component?.length&&["Nova.Create","Nova.Update"].includes(this.component)){let n;switch(this.component){case"Nova.Create":n="create";break;case"Nova.Update":n="update";break}t={...t,editing:!0,editMode:n}}return this.wrapper?.length&&(t={...t,wrapper:this.wrapper}),this.resourceId&&(t={...t,resourceId:this.resourceId}),this.singleDisk||(t={...t,disk:this.disk}),this.isField&&this.flexibleGroup?.length&&(t={...t,flexible:this.flexibleGroup.join(".")}),t},url(e){const t=this.isField?`/${this.resource}`:"";return`${e}${t}`.replace("//","/")},openBrowser({initialFiles:e,multiple:t,limit:n,wrapper:a,resource:r,resourceId:i,attribute:s,singleDisk:l,permissions:c,flexibleGroup:d,callback:f,usePintura:p,pinturaOptions:h,cropperOptions:v,paginationOptions:u,component:m}){this.isField=!0,this.multiple=t,this.limit=n,this.wrapper=a,this.resource=r,this.resourceId=i,this.attribute=s,this.singleDisk=l,this.flexibleGroup=d,this.callback=f,this.usePintura=p,this.pinturaOptions=h,this.cropperOptions=v,this.perPageOptions=u??this.perPageOptions,this.error=void 0,this.permissions=c,this.disk=void 0,this.component=m,this.openModal({name:hs}),this.setSelection({files:[...e]})},closeBrowser(){this.isField=!1,this.multiple=void 0,this.limit=void 0,this.wrapper=void 0,this.resource=void 0,this.resourceId=void 0,this.attribute=void 0,this.singleDisk=!1,this.flexibleGroup=[],this.callback=void 0,this.usePintura=!1,this.pinturaOptions={},this.cropperOptions={},this.perPage=10,this.perPageOptions=fs(10,60,10),this.error=void 0,this.permissions=void 0,this.disk=void 0,this.setSelection({files:[]}),this.closeModal({name:hs})},confirm(){this.callback&&this.callback(this.selection),this.closeBrowser()},prepareTool({singleDisk:e,permissions:t,tour:n,usePintura:a,pinturaOptions:r,cropperOptions:i,paginationOptions:s}){this.init(),this.clearSelection(),this.limit=void 0,this.isField=!1,this.multiple=!0,this.singleDisk=e,this.permissions=t,this.tour=n,this.usePintura=a,this.pinturaOptions=r,this.cropperOptions=i,this.perPageOptions=s??this.perPageOptions,this.error=void 0}},getters:{isOpen(){return e=>e===ps?!!this.preview:this.modals.includes(e)},isSelected(){return e=>!!this.selection?.find(t=>t.id===e.id)},isBrowserOpen(e){return e.modals.includes(hs)}}}),Ec=o.defineComponent({__name:"FieldCard",props:{file:{},detail:{type:Boolean,default:!1},field:{},onDeselect:{}},setup(e){const t=Pe(),n=e,a=o.computed(()=>t.singleDisk),r=s=>t.preview=s,i=s=>{n.detail&&s.exists&&r(s)};return(s,l)=>(o.openBlock(),o.createBlock(ls,{file:s.file,selected:!1,"on-deselect":s.onDeselect,"single-disk":a.value,"field-mode":!0,onClick:l[0]||(l[0]=o.withModifiers(c=>i(s.file),["prevent","stop"]))},null,8,["file","on-deselect","single-disk"]))}});function No(e,t,n){let a=n.initialDeps??[],r;return()=>{var i,s,l,c;let d;n.key&&((i=n.debug)!=null&&i.call(n))&&(d=Date.now());const f=e();if(!(f.length!==a.length||f.some((v,u)=>a[u]!==v)))return r;a=f;let h;if(n.key&&((s=n.debug)!=null&&s.call(n))&&(h=Date.now()),r=t(...f),n.key&&((l=n.debug)!=null&&l.call(n))){const v=Math.round((Date.now()-d)*100)/100,u=Math.round((Date.now()-h)*100)/100,m=u/16,b=(y,g)=>{for(y=String(y);y.lengthMath.abs(e-t)<1;var ha={GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_3d8ae53c-5eeb-460e-a0bd-e9e9ee09a1c0",STATS_TRP:"true",DEPLOYMENT_BASEPATH:"/opt/runner",DOTNET_NOLOGO:"1",USER:"runner",npm_config_user_agent:"npm/10.8.2 node/v18.20.5 linux x64 workspaces/false ci/github-actions",CI:"true",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_3d8ae53c-5eeb-460e-a0bd-e9e9ee09a1c0",PIPX_HOME:"/opt/pipx",npm_node_execpath:"/opt/hostedtoolcache/node/18.20.5/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_config_noproxy:"",HOME:"/home/runner",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",npm_package_json:"/home/runner/work/nova-file-manager/nova-file-manager/package.json",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"oneduo",GRADLE_HOME:"/usr/share/gradle-8.11.1",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/27.2.12479018",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",STATS_RDCL:"true",GITHUB_RETENTION_DAYS:"90",GITHUB_REPOSITORY_OWNER_ID:"113685820",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu22",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_config_userconfig:"/home/runner/.npmrc",npm_config_local_prefix:"/home/runner/work/nova-file-manager/nova-file-manager",SYSTEMD_EXEC_PID:"603",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",COLOR:"0",NVM_DIR:"/home/runner/.nvm",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",GOROOT_1_21_X64:"/opt/hostedtoolcache/go/1.21.13/x64",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20241215.1.0",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",GOROOT_1_22_X64:"/opt/hostedtoolcache/go/1.22.10/x64",SWIFT_PATH:"/usr/share/swift/usr/bin",RUNNER_USER:"runner",STATS_V3PS:"true",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",GOROOT_1_23_X64:"/opt/hostedtoolcache/go/1.23.4/x64",JOURNAL_STREAM:"8:19167",GITHUB_WORKFLOW:"Update Assets",_:"/opt/hostedtoolcache/node/18.20.5/x64/bin/npm",npm_config_prefix:"/opt/hostedtoolcache/node/18.20.5/x64",npm_config_npm_version:"10.8.2",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",STATS_D:"true",GITHUB_RUN_ID:"12413654384",STATS_VMFE:"true",npm_config_cache:"/home/runner/.npm",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"42d90f0d180c23c35a75b1622fd54f599f192575",GITHUB_BASE_REF:"",ImageOS:"ubuntu22",GITHUB_WORKFLOW_REF:"oneduo/nova-file-manager/.github/workflows/update-assets.yml@refs/heads/main",PERFLOG_LOCATION_SETTING:"RUNNER_PERFLOG",GITHUB_ACTION_REPOSITORY:"",npm_config_node_gyp:"/opt/hostedtoolcache/node/18.20.5/x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/nova-file-manager/nova-file-manager/node_modules/.bin:/home/runner/work/nova-file-manager/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/18.20.5/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/runner/work/nova-file-manager/nova-file-manager/node_modules/.bin:/home/runner/work/nova-file-manager/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/18.20.5/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/opt/hostedtoolcache/node/18.20.5/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_5bf7d58c-a7e5-41f9-9440-da2662365d7d",INVOCATION_ID:"80eb6c77e4d741a2ab7cbed66c67f725",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",NODE:"/opt/hostedtoolcache/node/18.20.5/x64/bin/node",npm_package_name:"nova-file-manager",GITHUB_ACTION:"__run",GITHUB_RUN_NUMBER:"703",GITHUB_TRIGGERING_ACTOR:"mikaelpopowicz",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub Actions 10",XDG_CONFIG_HOME:"/home/runner/.config",STATS_VMD:"true",GITHUB_REF_NAME:"main",GITHUB_REPOSITORY:"oneduo/nova-file-manager",STATS_D_D:"true",npm_lifecycle_script:"vite build",STATS_UE:"true",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/27.2.12479018",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",GITHUB_REPOSITORY_ID:"505375003",GITHUB_ACTIONS:"true",STATS_PIP:"false",npm_package_version:"0.8.0",npm_lifecycle_event:"build",GITHUB_REF_PROTECTED:"false",GITHUB_WORKSPACE:"/home/runner/work/nova-file-manager/nova-file-manager",ACCEPT_EULA:"Y",GITHUB_JOB:"update",RUNNER_PERFLOG:"/home/runner/perflog",GITHUB_SHA:"42d90f0d180c23c35a75b1622fd54f599f192575",GITHUB_RUN_ATTEMPT:"1",STATS_D_TC:"true",GITHUB_REF:"refs/heads/main",GITHUB_ACTOR:"mikaelpopowicz",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",LEIN_HOME:"/usr/local/lib/lein",npm_config_globalconfig:"/opt/hostedtoolcache/node/18.20.5/x64/etc/npmrc",npm_config_init_module:"/home/runner/.npm-init.js",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_3d8ae53c-5eeb-460e-a0bd-e9e9ee09a1c0",JAVA_HOME:"/usr/lib/jvm/temurin-11-jdk-amd64",PWD:"/home/runner/work/nova-file-manager/nova-file-manager",GITHUB_ACTOR_ID:"5689944",RUNNER_WORKSPACE:"/home/runner/work/nova-file-manager",npm_execpath:"/opt/hostedtoolcache/node/18.20.5/x64/lib/node_modules/npm/bin/npm-cli.js",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",LEIN_JAR:"/usr/local/lib/lein/self-installs/leiningen-2.11.2-standalone.jar",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_3d8ae53c-5eeb-460e-a0bd-e9e9ee09a1c0",npm_config_global_prefix:"/opt/hostedtoolcache/node/18.20.5/x64",TAILWIND_MODE:"build",EDGEWEBDRIVER:"/usr/local/share/edge_driver",STATS_EXT:"true",npm_command:"run-script",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/27.2.12479018",SGX_AESM_ADDR:"1",CHROME_BIN:"/usr/bin/google-chrome",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",STATS_EXTP:"https://provjobdprod.z13.web.core.windows.net/settings/provjobdsettings-latest/provjobd.data",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/27.2.12479018",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_3d8ae53c-5eeb-460e-a0bd-e9e9ee09a1c0",INIT_CWD:"/home/runner/work/nova-file-manager/nova-file-manager",EDITOR:"vi",NODE_ENV:"production"};const Yv=e=>e,Jv=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),a=[];for(let r=t;r<=n;r++)a.push(r);return a},Qv=(e,t)=>{const n=e.scrollElement;if(!n)return;const a=i=>{const{width:s,height:l}=i;t({width:Math.round(s),height:Math.round(l)})};if(a(n.getBoundingClientRect()),typeof ResizeObserver>"u")return()=>{};const r=new ResizeObserver(i=>{const s=i[0];if(s?.borderBoxSize){const l=s.borderBoxSize[0];if(l){a({width:l.inlineSize,height:l.blockSize});return}}a(n.getBoundingClientRect())});return r.observe(n,{box:"border-box"}),()=>{r.unobserve(n)}},Zv=(e,t)=>{const n=e.scrollElement;if(!n)return;const a=()=>{t(n[e.options.horizontal?"scrollLeft":"scrollTop"])};return a(),n.addEventListener("scroll",a,{passive:!0}),()=>{n.removeEventListener("scroll",a)}},qv=(e,t,n)=>{if(t?.borderBoxSize){const a=t.borderBoxSize[0];if(a)return Math.round(a[n.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[n.options.horizontal?"width":"height"])},$v=(e,{adjustments:t=0,behavior:n},a)=>{var r,i;const s=e+t;(i=(r=a.scrollElement)==null?void 0:r.scrollTo)==null||i.call(r,{[a.options.horizontal?"left":"top"]:s,behavior:n})};class eg{constructor(t){this.unsubs=[],this.scrollElement=null,this.isScrolling=!1,this.isScrollingTimeoutId=null,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollDirection=null,this.scrollAdjustments=0,this.measureElementCache=new Map,this.observer=(()=>{let n=null;const a=()=>n||(typeof ResizeObserver<"u"?n=new ResizeObserver(r=>{r.forEach(i=>{this._measureElement(i.target,i)})}):null);return{disconnect:()=>{var r;return(r=a())==null?void 0:r.disconnect()},observe:r=>{var i;return(i=a())==null?void 0:i.observe(r,{box:"border-box"})},unobserve:r=>{var i;return(i=a())==null?void 0:i.unobserve(r)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([a,r])=>{typeof r>"u"&&delete n[a]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Yv,rangeExtractor:Jv,onChange:()=>{},measureElement:qv,initialRect:{width:0,height:0},scrollMargin:0,scrollingDelay:150,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,...n}},this.notify=n=>{var a,r;(r=(a=this.options).onChange)==null||r.call(a,this,n)},this.maybeNotify=ko(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:ha.NODE_ENV!=="production",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.scrollElement=null},this._didMount=()=>(this.measureElementCache.forEach(this.observer.observe),()=>{this.observer.disconnect(),this.cleanup()}),this._willUpdate=()=>{const n=this.options.getScrollElement();this.scrollElement!==n&&(this.cleanup(),this.scrollElement=n,this._scrollToOffset(this.scrollOffset,{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,a=>{this.scrollRect=a,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,a=>{this.scrollAdjustments=0,this.scrollOffset!==a&&(this.isScrollingTimeoutId!==null&&(clearTimeout(this.isScrollingTimeoutId),this.isScrollingTimeoutId=null),this.isScrolling=!0,this.scrollDirection=this.scrollOffset{this.isScrollingTimeoutId=null,this.isScrolling=!1,this.scrollDirection=null,this.maybeNotify()},this.options.scrollingDelay))})))},this.getSize=()=>this.scrollRect[this.options.horizontal?"width":"height"],this.memoOptions=ko(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey],(n,a,r,i)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:a,scrollMargin:r,getItemKey:i}),{key:!1}),this.getFurthestMeasurement=(n,a)=>{const r=new Map,i=new Map;for(let s=a-1;s>=0;s--){const l=n[s];if(r.has(l.lane))continue;const c=i.get(l.lane);if(c==null||l.end>c.end?i.set(l.lane,l):l.ends.end===l.end?s.index-l.index:s.end-l.end)[0]:void 0},this.getMeasurements=ko(()=>[this.memoOptions(),this.itemSizeCache],({count:n,paddingStart:a,scrollMargin:r,getItemKey:i},s)=>{const l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const c=this.measurementsCache.slice(0,l);for(let d=l;dthis.options.debug}),this.calculateRange=ko(()=>[this.getMeasurements(),this.getSize(),this.scrollOffset],(n,a,r)=>this.range=n.length>0&&a>0?tg({measurements:n,outerSize:a,scrollOffset:r}):null,{key:ha.NODE_ENV!=="production",debug:()=>this.options.debug}),this.getIndexes=ko(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(n,a,r,i)=>a===null?[]:n({...a,overscan:r,count:i}),{key:ha.NODE_ENV!=="production",debug:()=>this.options.debug}),this.indexFromElement=n=>{const a=this.options.indexAttribute,r=n.getAttribute(a);return r?parseInt(r,10):(console.warn(`Missing attribute name '${a}={index}' on measured element.`),-1)},this._measureElement=(n,a)=>{const r=this.measurementsCache[this.indexFromElement(n)];if(!r||!n.isConnected){this.measureElementCache.forEach((l,c)=>{l===n&&(this.observer.unobserve(n),this.measureElementCache.delete(c))});return}const i=this.measureElementCache.get(r.key);i!==n&&(i&&this.observer.unobserve(i),this.observer.observe(n),this.measureElementCache.set(r.key,n));const s=this.options.measureElement(n,a,this);this.resizeItem(r,s)},this.resizeItem=(n,a)=>{const r=this.itemSizeCache.get(n.key)??n.size,i=a-r;i!==0&&(n.start{n&&this._measureElement(n,void 0)},this.getVirtualItems=ko(()=>[this.getIndexes(),this.getMeasurements()],(n,a)=>{const r=[];for(let i=0,s=n.length;ithis.options.debug}),this.getVirtualItemForOffset=n=>{const a=this.getMeasurements();return Is(a[Sc(0,a.length-1,r=>Is(a[r]).start,n)])},this.getOffsetForAlignment=(n,a)=>{const r=this.getSize();a==="auto"&&(n<=this.scrollOffset?a="start":n>=this.scrollOffset+r?a="end":a="start"),a==="start"?n=n:a==="end"?n=n-r:a==="center"&&(n=n-r/2);const i=this.options.horizontal?"scrollWidth":"scrollHeight",l=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[i]:this.scrollElement[i]:0)-this.getSize();return Math.max(Math.min(l,n),0)},this.getOffsetForIndex=(n,a="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const r=Is(this.getMeasurements()[n]);if(a==="auto")if(r.end>=this.scrollOffset+this.getSize()-this.options.scrollPaddingEnd)a="end";else if(r.start<=this.scrollOffset+this.options.scrollPaddingStart)a="start";else return[this.scrollOffset,a];const i=a==="end"?r.end+this.options.scrollPaddingEnd:r.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(i,a),a]},this.isDynamicMode=()=>this.measureElementCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&(clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(n,{align:a="start",behavior:r}={})=>{this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,a),{adjustments:void 0,behavior:r})},this.scrollToIndex=(n,{align:a="auto",behavior:r}={})=>{n=Math.max(0,Math.min(n,this.options.count-1)),this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const[i,s]=this.getOffsetForIndex(n,a);this._scrollToOffset(i,{adjustments:void 0,behavior:r}),r!=="smooth"&&this.isDynamicMode()&&(this.scrollToIndexTimeoutId=setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.measureElementCache.has(this.options.getItemKey(n))){const[c]=this.getOffsetForIndex(n,s);Xv(c,this.scrollOffset)||this.scrollToIndex(n,{align:s,behavior:r})}else this.scrollToIndex(n,{align:s,behavior:r})}))},this.scrollBy=(n,{behavior:a}={})=>{this.cancelScrollToIndex(),a==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.scrollOffset+n,{adjustments:void 0,behavior:a})},this.getTotalSize=()=>{var n;const a=this.getMeasurements();let r;return a.length===0?r=this.options.paddingStart:r=this.options.lanes===1?((n=a[a.length-1])==null?void 0:n.end)??0:Math.max(...a.slice(-this.options.lanes).map(i=>i.end)),r-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(n,{adjustments:a,behavior:r})=>{this.options.scrollToFn(n,{behavior:r,adjustments:a},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(t),this.scrollRect=this.options.initialRect,this.scrollOffset=this.options.initialOffset,this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(n=>{this.itemSizeCache.set(n.key,n.size)}),this.maybeNotify()}}const Sc=(e,t,n,a)=>{for(;e<=t;){const r=(e+t)/2|0,i=n(r);if(ia)t=r-1;else return r}return e>0?e-1:0};function tg({measurements:e,outerSize:t,scrollOffset:n}){const a=e.length-1,i=Sc(0,a,l=>e[l].start,n);let s=i;for(;so.unref(e).getScrollElement(),r=>{r&&t._willUpdate()},{immediate:!0}),o.watch(()=>o.unref(e),r=>{t.setOptions({...r,onChange:(i,s)=>{var l;o.triggerRef(n),(l=r.onChange)==null||l.call(r,i,s)}}),t._willUpdate(),o.triggerRef(n)},{immediate:!0}),o.onScopeDispose(a),n}function og(e){return ng(o.computed(()=>({observeElementRect:Qv,observeElementOffset:Zv,scrollToFn:$v,...o.unref(e)})))}function ag(e,t,n){let a=o.ref(n?.value),r=o.computed(()=>e.value!==void 0);return[o.computed(()=>r.value?e.value:a.value),function(i){return r.value||(a.value=i),t?.(i)}]}function _s(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function kn(){let e=[],t={addEventListener(n,a,r,i){return n.addEventListener(a,r,i),t.add(()=>n.removeEventListener(a,r,i))},requestAnimationFrame(...n){let a=requestAnimationFrame(...n);t.add(()=>cancelAnimationFrame(a))},nextFrame(...n){t.requestAnimationFrame(()=>{t.requestAnimationFrame(...n)})},setTimeout(...n){let a=setTimeout(...n);t.add(()=>clearTimeout(a))},microTask(...n){let a={current:!0};return _s(()=>{a.current&&n[0]()}),t.add(()=>{a.current=!1})},style(n,a,r){let i=n.style.getPropertyValue(a);return Object.assign(n.style,{[a]:r}),this.add(()=>{Object.assign(n.style,{[a]:i})})},group(n){let a=kn();return n(a),this.add(()=>a.dispose())},add(n){return e.push(n),()=>{let a=e.indexOf(n);if(a>=0)for(let r of e.splice(a,1))r()}},dispose(){for(let n of e.splice(0))n()}};return t}function rg(){let e=kn();return o.onUnmounted(()=>e.dispose()),e}function sg(){let e=rg();return t=>{e.dispose(),e.nextFrame(t)}}let ig=Symbol("headlessui.useid"),lg=0;function dt(){return o.inject(ig,()=>`${++lg}`)()}function ae(e){var t;if(e==null||e.value==null)return null;let n=(t=e.value.$el)!=null?t:e.value;return n instanceof Node?n:null}function tt(e,t,...n){if(e in t){let r=t[e];return typeof r=="function"?r(...n):r}let a=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(r=>`"${r}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(a,tt),a}var cg=Object.defineProperty,dg=(e,t,n)=>t in e?cg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Oc=(e,t,n)=>(dg(e,typeof t!="symbol"?t+"":t,n),n);let ug=class{constructor(){Oc(this,"current",this.detect()),Oc(this,"currentId",0)}set(t){this.current!==t&&(this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}},ma=new ug;function cn(e){if(ma.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty("value")){let t=ae(e);if(t)return t.ownerDocument}return document}let As=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var $t=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))($t||{}),Tc=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Tc||{}),fg=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(fg||{});function Cc(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(As)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var Ds=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Ds||{});function Rs(e,t=0){var n;return e===((n=cn(e))==null?void 0:n.body)?!1:tt(t,{0(){return e.matches(As)},1(){let a=e;for(;a!==null;){if(a.matches(As))return!0;a=a.parentElement}return!1}})}function Nc(e){let t=cn(e);o.nextTick(()=>{t&&!Rs(t.activeElement,0)&&In(e)})}var pg=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(pg||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function In(e){e?.focus({preventScroll:!0})}let hg=["textarea","input"].join(",");function mg(e){var t,n;return(n=(t=e?.matches)==null?void 0:t.call(e,hg))!=null?n:!1}function Ps(e,t=n=>n){return e.slice().sort((n,a)=>{let r=t(n),i=t(a);if(r===null||i===null)return 0;let s=r.compareDocumentPosition(i);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function vg(e,t){return va(Cc(),t,{relativeTo:e})}function va(e,t,{sorted:n=!0,relativeTo:a=null,skipElements:r=[]}={}){var i;let s=(i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e?.ownerDocument)!=null?i:document,l=Array.isArray(e)?n?Ps(e):e:Cc(e);r.length>0&&l.length>1&&(l=l.filter(u=>!r.includes(u))),a=a??s.activeElement;let c=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),d=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,l.indexOf(a))-1;if(t&4)return Math.max(0,l.indexOf(a))+1;if(t&8)return l.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),f=t&32?{preventScroll:!0}:{},p=0,h=l.length,v;do{if(p>=h||p+h<=0)return 0;let u=d+p;if(t&16)u=(u+h)%h;else{if(u<0)return 3;if(u>=h)return 1}v=l[u],v?.focus(f),p+=c}while(v!==s.activeElement);return t&6&&mg(v)&&v.select(),2}function kc(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function gg(){return/Android/gi.test(window.navigator.userAgent)}function Ic(){return kc()||gg()}function rr(e,t,n){ma.isServer||o.watchEffect(a=>{document.addEventListener(e,t,n),a(()=>document.removeEventListener(e,t,n))})}function _c(e,t,n){ma.isServer||o.watchEffect(a=>{window.addEventListener(e,t,n),a(()=>window.removeEventListener(e,t,n))})}function Bs(e,t,n=o.computed(()=>!0)){function a(i,s){if(!n.value||i.defaultPrevented)return;let l=s(i);if(l===null||!l.getRootNode().contains(l))return;let c=function d(f){return typeof f=="function"?d(f()):Array.isArray(f)||f instanceof Set?f:[f]}(e);for(let d of c){if(d===null)continue;let f=d instanceof HTMLElement?d:ae(d);if(f!=null&&f.contains(l)||i.composed&&i.composedPath().includes(f))return}return!Rs(l,Ds.Loose)&&l.tabIndex!==-1&&i.preventDefault(),t(i,l)}let r=o.ref(null);rr("pointerdown",i=>{var s,l;n.value&&(r.value=((l=(s=i.composedPath)==null?void 0:s.call(i))==null?void 0:l[0])||i.target)},!0),rr("mousedown",i=>{var s,l;n.value&&(r.value=((l=(s=i.composedPath)==null?void 0:s.call(i))==null?void 0:l[0])||i.target)},!0),rr("click",i=>{Ic()||r.value&&(a(i,()=>r.value),r.value=null)},!0),rr("touchend",i=>a(i,()=>i.target instanceof HTMLElement?i.target:null),!0),_c("blur",i=>a(i,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Ac(e,t){if(e)return e;let n=t??"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function Ms(e,t){let n=o.ref(Ac(e.value.type,e.value.as));return o.onMounted(()=>{n.value=Ac(e.value.type,e.value.as)}),o.watchEffect(()=>{var a;n.value||ae(t)&&ae(t)instanceof HTMLButtonElement&&!((a=ae(t))!=null&&a.hasAttribute("type"))&&(n.value="button")}),n}function Dc(e){return[e.screenX,e.screenY]}function Rc(){let e=o.ref([-1,-1]);return{wasMoved(t){let n=Dc(t);return e.value[0]===n[0]&&e.value[1]===n[1]?!1:(e.value=n,!0)},update(t){e.value=Dc(t)}}}function Pc({container:e,accept:t,walk:n,enabled:a}){o.watchEffect(()=>{let r=e.value;if(!r||a!==void 0&&!a.value)return;let i=cn(e);if(!i)return;let s=Object.assign(c=>t(c),{acceptNode:t}),l=i.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,s,!1);for(;l.nextNode();)n(l.currentNode)})}var At=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(At||{}),_n=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(_n||{});function Be({visible:e=!0,features:t=0,ourProps:n,theirProps:a,...r}){var i;let s=Mc(a,n),l=Object.assign(r,{props:s});if(e||t&2&&s.static)return Fs(l);if(t&1){let c=(i=s.unmount)==null||i?0:1;return tt(c,{0(){return null},1(){return Fs({...r,props:{...s,hidden:!0,style:{display:"none"}}})}})}return Fs(l)}function Fs({props:e,attrs:t,slots:n,slot:a,name:r}){var i,s;let{as:l,...c}=ga(e,["unmount","static"]),d=(i=n.default)==null?void 0:i.call(n,a),f={};if(a){let p=!1,h=[];for(let[v,u]of Object.entries(a))typeof u=="boolean"&&(p=!0),u===!0&&h.push(v);p&&(f["data-headlessui-state"]=h.join(" "))}if(l==="template"){if(d=Bc(d??[]),Object.keys(c).length>0||Object.keys(t).length>0){let[p,...h]=d??[];if(!yg(p)||h.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${r} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(c).concat(Object.keys(t)).map(m=>m.trim()).filter((m,y,b)=>b.indexOf(m)===y).sort((m,y)=>m.localeCompare(y)).map(m=>` - ${m}`).join(` + color: hsl(${Math.max(0,Math.min(120-120*m,120))}deg 100% 31%);`,n?.key)}return(c=n?.onChange)==null||c.call(n,r),r}}function Ds(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const Xv=(e,t)=>Math.abs(e-t)<1;var ha={TERM_PROGRAM:"vscode",NODE:"/opt/homebrew/Cellar/node@18/18.20.5/bin/node",INIT_CWD:"/Users/tarvo/Development/_OpenSource/nova-file-manager",TERM:"xterm-256color",SHELL:"/bin/zsh",HOMEBREW_REPOSITORY:"/opt/homebrew",TMPDIR:"/var/folders/kx/xvjxfhbs0vq1zwgzb_969rsw0000gp/T/",npm_config_global_prefix:"/opt/homebrew",TERM_PROGRAM_VERSION:"1.96.1",ZDOTDIR:"/Users/tarvo",ORIGINAL_XDG_CURRENT_DESKTOP:"undefined",MallocNanoZone:"0",COLOR:"1",TERM_SESSION_ID:"w0t0p0:7EB579D8-3823-4699-95E0-34128A9C3098",npm_config_noproxy:"",npm_config_local_prefix:"/Users/tarvo/Development/_OpenSource/nova-file-manager",ZSH:"/Users/tarvo/.oh-my-zsh",USER:"tarvo",LS_COLORS:"di=1;36:ln=35:so=32:pi=33:ex=31:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43",COMMAND_MODE:"unix2003",npm_config_globalconfig:"/opt/homebrew/etc/npmrc",SSH_AUTH_SOCK:"/private/tmp/com.apple.launchd.1aXB809ZrP/Listeners",__CF_USER_TEXT_ENCODING:"0x1F6:0x0:0x0",npm_execpath:"/opt/homebrew/Cellar/node@18/18.20.5/lib/node_modules/npm/bin/npm-cli.js",TERM_FEATURES:"T3LrMSc7UUw9Ts3BFGsSyHNoSxF",PAGER:"less",LSCOLORS:"Gxfxcxdxbxegedabagacad",TERMINFO_DIRS:"/Applications/iTerm.app/Contents/Resources/terminfo:/usr/share/terminfo",PATH:"/Users/tarvo/Development/_OpenSource/nova-file-manager/node_modules/.bin:/Users/tarvo/Development/_OpenSource/node_modules/.bin:/Users/tarvo/Development/node_modules/.bin:/Users/tarvo/node_modules/.bin:/Users/node_modules/.bin:/node_modules/.bin:/opt/homebrew/Cellar/node@18/18.20.5/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Apple/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Applications/iTerm.app/Contents/Resources/utilities:/Users/tarvo/.local/bin:/Users/tarvo/.composer/vendor/bin:/Users/tarvo/.spicetify:/Users/tarvo/.local/bin:/Users/tarvo/.composer/vendor/bin:/Users/tarvo/.spicetify:/Users/tarvo/.local/bin",npm_package_json:"/Users/tarvo/Development/_OpenSource/nova-file-manager/package.json",_:"/Users/tarvo/Development/_OpenSource/nova-file-manager/node_modules/.bin/vite",LaunchInstanceID:"785076B8-02D4-4561-9EF7-B242C84332DC",npm_config_userconfig:"/Users/tarvo/.npmrc",npm_config_init_module:"/Users/tarvo/.npm-init.js",USER_ZDOTDIR:"/Users/tarvo",__CFBundleIdentifier:"com.microsoft.VSCode",npm_command:"run-script",PWD:"/Users/tarvo/Development/_OpenSource/nova-file-manager",npm_lifecycle_event:"build",EDITOR:"vi",npm_package_name:"nova-file-manager",LANG:"et_EE.UTF-8",ITERM_PROFILE:"Default",npm_config_progress:"",npm_config_npm_version:"10.8.2",VSCODE_GIT_ASKPASS_EXTRA_ARGS:"",XPC_FLAGS:"0x0",npm_config_node_gyp:"/opt/homebrew/Cellar/node@18/18.20.5/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",npm_package_version:"0.8.0",XPC_SERVICE_NAME:"0",VSCODE_INJECTION:"1",COLORFGBG:"15;0",SHLVL:"4",HOME:"/Users/tarvo",VSCODE_GIT_ASKPASS_MAIN:"/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/askpass-main.js",LC_TERMINAL_VERSION:"3.5.7",HOMEBREW_PREFIX:"/opt/homebrew",ITERM_SESSION_ID:"w0t0p0:7EB579D8-3823-4699-95E0-34128A9C3098",npm_config_cache:"/Users/tarvo/.npm",LESS:"-R",LOGNAME:"tarvo",npm_lifecycle_script:"vite build",VSCODE_GIT_IPC_HANDLE:"/var/folders/kx/xvjxfhbs0vq1zwgzb_969rsw0000gp/T/vscode-git-0c1820040e.sock",npm_config_user_agent:"npm/10.8.2 node/v18.20.5 darwin arm64 workspaces/false",VSCODE_GIT_ASKPASS_NODE:"/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin)",GIT_ASKPASS:"/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/askpass.sh",HOMEBREW_CELLAR:"/opt/homebrew/Cellar",INFOPATH:"/opt/homebrew/share/info:/opt/homebrew/share/info:",LC_TERMINAL:"iTerm2",SECURITYSESSIONID:"186b4",npm_node_execpath:"/opt/homebrew/Cellar/node@18/18.20.5/bin/node",npm_config_prefix:"/opt/homebrew",COLORTERM:"truecolor",NODE_ENV:"production"};const Yv=e=>e,Zv=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),a=[];for(let r=t;r<=n;r++)a.push(r);return a},Jv=(e,t)=>{const n=e.scrollElement;if(!n)return;const a=i=>{const{width:s,height:l}=i;t({width:Math.round(s),height:Math.round(l)})};if(a(n.getBoundingClientRect()),typeof ResizeObserver>"u")return()=>{};const r=new ResizeObserver(i=>{const s=i[0];if(s?.borderBoxSize){const l=s.borderBoxSize[0];if(l){a({width:l.inlineSize,height:l.blockSize});return}}a(n.getBoundingClientRect())});return r.observe(n,{box:"border-box"}),()=>{r.unobserve(n)}},Qv=(e,t)=>{const n=e.scrollElement;if(!n)return;const a=()=>{t(n[e.options.horizontal?"scrollLeft":"scrollTop"])};return a(),n.addEventListener("scroll",a,{passive:!0}),()=>{n.removeEventListener("scroll",a)}},qv=(e,t,n)=>{if(t?.borderBoxSize){const a=t.borderBoxSize[0];if(a)return Math.round(a[n.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[n.options.horizontal?"width":"height"])},$v=(e,{adjustments:t=0,behavior:n},a)=>{var r,i;const s=e+t;(i=(r=a.scrollElement)==null?void 0:r.scrollTo)==null||i.call(r,{[a.options.horizontal?"left":"top"]:s,behavior:n})};class eg{constructor(t){this.unsubs=[],this.scrollElement=null,this.isScrolling=!1,this.isScrollingTimeoutId=null,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollDirection=null,this.scrollAdjustments=0,this.measureElementCache=new Map,this.observer=(()=>{let n=null;const a=()=>n||(typeof ResizeObserver<"u"?n=new ResizeObserver(r=>{r.forEach(i=>{this._measureElement(i.target,i)})}):null);return{disconnect:()=>{var r;return(r=a())==null?void 0:r.disconnect()},observe:r=>{var i;return(i=a())==null?void 0:i.observe(r,{box:"border-box"})},unobserve:r=>{var i;return(i=a())==null?void 0:i.unobserve(r)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([a,r])=>{typeof r>"u"&&delete n[a]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Yv,rangeExtractor:Zv,onChange:()=>{},measureElement:qv,initialRect:{width:0,height:0},scrollMargin:0,scrollingDelay:150,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,...n}},this.notify=n=>{var a,r;(r=(a=this.options).onChange)==null||r.call(a,this,n)},this.maybeNotify=No(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:ha.NODE_ENV!=="production",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.scrollElement=null},this._didMount=()=>(this.measureElementCache.forEach(this.observer.observe),()=>{this.observer.disconnect(),this.cleanup()}),this._willUpdate=()=>{const n=this.options.getScrollElement();this.scrollElement!==n&&(this.cleanup(),this.scrollElement=n,this._scrollToOffset(this.scrollOffset,{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,a=>{this.scrollRect=a,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,a=>{this.scrollAdjustments=0,this.scrollOffset!==a&&(this.isScrollingTimeoutId!==null&&(clearTimeout(this.isScrollingTimeoutId),this.isScrollingTimeoutId=null),this.isScrolling=!0,this.scrollDirection=this.scrollOffset{this.isScrollingTimeoutId=null,this.isScrolling=!1,this.scrollDirection=null,this.maybeNotify()},this.options.scrollingDelay))})))},this.getSize=()=>this.scrollRect[this.options.horizontal?"width":"height"],this.memoOptions=No(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey],(n,a,r,i)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:a,scrollMargin:r,getItemKey:i}),{key:!1}),this.getFurthestMeasurement=(n,a)=>{const r=new Map,i=new Map;for(let s=a-1;s>=0;s--){const l=n[s];if(r.has(l.lane))continue;const c=i.get(l.lane);if(c==null||l.end>c.end?i.set(l.lane,l):l.ends.end===l.end?s.index-l.index:s.end-l.end)[0]:void 0},this.getMeasurements=No(()=>[this.memoOptions(),this.itemSizeCache],({count:n,paddingStart:a,scrollMargin:r,getItemKey:i},s)=>{const l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const c=this.measurementsCache.slice(0,l);for(let d=l;dthis.options.debug}),this.calculateRange=No(()=>[this.getMeasurements(),this.getSize(),this.scrollOffset],(n,a,r)=>this.range=n.length>0&&a>0?tg({measurements:n,outerSize:a,scrollOffset:r}):null,{key:ha.NODE_ENV!=="production",debug:()=>this.options.debug}),this.getIndexes=No(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(n,a,r,i)=>a===null?[]:n({...a,overscan:r,count:i}),{key:ha.NODE_ENV!=="production",debug:()=>this.options.debug}),this.indexFromElement=n=>{const a=this.options.indexAttribute,r=n.getAttribute(a);return r?parseInt(r,10):(console.warn(`Missing attribute name '${a}={index}' on measured element.`),-1)},this._measureElement=(n,a)=>{const r=this.measurementsCache[this.indexFromElement(n)];if(!r||!n.isConnected){this.measureElementCache.forEach((l,c)=>{l===n&&(this.observer.unobserve(n),this.measureElementCache.delete(c))});return}const i=this.measureElementCache.get(r.key);i!==n&&(i&&this.observer.unobserve(i),this.observer.observe(n),this.measureElementCache.set(r.key,n));const s=this.options.measureElement(n,a,this);this.resizeItem(r,s)},this.resizeItem=(n,a)=>{const r=this.itemSizeCache.get(n.key)??n.size,i=a-r;i!==0&&(n.start{n&&this._measureElement(n,void 0)},this.getVirtualItems=No(()=>[this.getIndexes(),this.getMeasurements()],(n,a)=>{const r=[];for(let i=0,s=n.length;ithis.options.debug}),this.getVirtualItemForOffset=n=>{const a=this.getMeasurements();return Ds(a[Sc(0,a.length-1,r=>Ds(a[r]).start,n)])},this.getOffsetForAlignment=(n,a)=>{const r=this.getSize();a==="auto"&&(n<=this.scrollOffset?a="start":n>=this.scrollOffset+r?a="end":a="start"),a==="start"?n=n:a==="end"?n=n-r:a==="center"&&(n=n-r/2);const i=this.options.horizontal?"scrollWidth":"scrollHeight",l=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[i]:this.scrollElement[i]:0)-this.getSize();return Math.max(Math.min(l,n),0)},this.getOffsetForIndex=(n,a="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const r=Ds(this.getMeasurements()[n]);if(a==="auto")if(r.end>=this.scrollOffset+this.getSize()-this.options.scrollPaddingEnd)a="end";else if(r.start<=this.scrollOffset+this.options.scrollPaddingStart)a="start";else return[this.scrollOffset,a];const i=a==="end"?r.end+this.options.scrollPaddingEnd:r.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(i,a),a]},this.isDynamicMode=()=>this.measureElementCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&(clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(n,{align:a="start",behavior:r}={})=>{this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,a),{adjustments:void 0,behavior:r})},this.scrollToIndex=(n,{align:a="auto",behavior:r}={})=>{n=Math.max(0,Math.min(n,this.options.count-1)),this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const[i,s]=this.getOffsetForIndex(n,a);this._scrollToOffset(i,{adjustments:void 0,behavior:r}),r!=="smooth"&&this.isDynamicMode()&&(this.scrollToIndexTimeoutId=setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.measureElementCache.has(this.options.getItemKey(n))){const[c]=this.getOffsetForIndex(n,s);Xv(c,this.scrollOffset)||this.scrollToIndex(n,{align:s,behavior:r})}else this.scrollToIndex(n,{align:s,behavior:r})}))},this.scrollBy=(n,{behavior:a}={})=>{this.cancelScrollToIndex(),a==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.scrollOffset+n,{adjustments:void 0,behavior:a})},this.getTotalSize=()=>{var n;const a=this.getMeasurements();let r;return a.length===0?r=this.options.paddingStart:r=this.options.lanes===1?((n=a[a.length-1])==null?void 0:n.end)??0:Math.max(...a.slice(-this.options.lanes).map(i=>i.end)),r-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(n,{adjustments:a,behavior:r})=>{this.options.scrollToFn(n,{behavior:r,adjustments:a},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(t),this.scrollRect=this.options.initialRect,this.scrollOffset=this.options.initialOffset,this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(n=>{this.itemSizeCache.set(n.key,n.size)}),this.maybeNotify()}}const Sc=(e,t,n,a)=>{for(;e<=t;){const r=(e+t)/2|0,i=n(r);if(ia)t=r-1;else return r}return e>0?e-1:0};function tg({measurements:e,outerSize:t,scrollOffset:n}){const a=e.length-1,i=Sc(0,a,l=>e[l].start,n);let s=i;for(;so.unref(e).getScrollElement(),r=>{r&&t._willUpdate()},{immediate:!0}),o.watch(()=>o.unref(e),r=>{t.setOptions({...r,onChange:(i,s)=>{var l;o.triggerRef(n),(l=r.onChange)==null||l.call(r,i,s)}}),t._willUpdate(),o.triggerRef(n)},{immediate:!0}),o.onScopeDispose(a),n}function og(e){return ng(o.computed(()=>({observeElementRect:Jv,observeElementOffset:Qv,scrollToFn:$v,...o.unref(e)})))}function ag(e,t,n){let a=o.ref(n?.value),r=o.computed(()=>e.value!==void 0);return[o.computed(()=>r.value?e.value:a.value),function(i){return r.value||(a.value=i),t?.(i)}]}function As(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Nn(){let e=[],t={addEventListener(n,a,r,i){return n.addEventListener(a,r,i),t.add(()=>n.removeEventListener(a,r,i))},requestAnimationFrame(...n){let a=requestAnimationFrame(...n);t.add(()=>cancelAnimationFrame(a))},nextFrame(...n){t.requestAnimationFrame(()=>{t.requestAnimationFrame(...n)})},setTimeout(...n){let a=setTimeout(...n);t.add(()=>clearTimeout(a))},microTask(...n){let a={current:!0};return As(()=>{a.current&&n[0]()}),t.add(()=>{a.current=!1})},style(n,a,r){let i=n.style.getPropertyValue(a);return Object.assign(n.style,{[a]:r}),this.add(()=>{Object.assign(n.style,{[a]:i})})},group(n){let a=Nn();return n(a),this.add(()=>a.dispose())},add(n){return e.push(n),()=>{let a=e.indexOf(n);if(a>=0)for(let r of e.splice(a,1))r()}},dispose(){for(let n of e.splice(0))n()}};return t}function rg(){let e=Nn();return o.onUnmounted(()=>e.dispose()),e}function sg(){let e=rg();return t=>{e.dispose(),e.nextFrame(t)}}let ig=Symbol("headlessui.useid"),lg=0;function dt(){return o.inject(ig,()=>`${++lg}`)()}function ae(e){var t;if(e==null||e.value==null)return null;let n=(t=e.value.$el)!=null?t:e.value;return n instanceof Node?n:null}function tt(e,t,...n){if(e in t){let r=t[e];return typeof r=="function"?r(...n):r}let a=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(r=>`"${r}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(a,tt),a}var cg=Object.defineProperty,dg=(e,t,n)=>t in e?cg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Cc=(e,t,n)=>(dg(e,typeof t!="symbol"?t+"":t,n),n);let ug=class{constructor(){Cc(this,"current",this.detect()),Cc(this,"currentId",0)}set(t){this.current!==t&&(this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}},ma=new ug;function cn(e){if(ma.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty("value")){let t=ae(e);if(t)return t.ownerDocument}return document}let Is=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var $t=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))($t||{}),Oc=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Oc||{}),fg=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(fg||{});function Tc(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Is)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var Rs=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Rs||{});function Ps(e,t=0){var n;return e===((n=cn(e))==null?void 0:n.body)?!1:tt(t,{0(){return e.matches(Is)},1(){let a=e;for(;a!==null;){if(a.matches(Is))return!0;a=a.parentElement}return!1}})}function kc(e){let t=cn(e);o.nextTick(()=>{t&&!Ps(t.activeElement,0)&&Dn(e)})}var pg=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(pg||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function Dn(e){e?.focus({preventScroll:!0})}let hg=["textarea","input"].join(",");function mg(e){var t,n;return(n=(t=e?.matches)==null?void 0:t.call(e,hg))!=null?n:!1}function Ms(e,t=n=>n){return e.slice().sort((n,a)=>{let r=t(n),i=t(a);if(r===null||i===null)return 0;let s=r.compareDocumentPosition(i);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function vg(e,t){return va(Tc(),t,{relativeTo:e})}function va(e,t,{sorted:n=!0,relativeTo:a=null,skipElements:r=[]}={}){var i;let s=(i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e?.ownerDocument)!=null?i:document,l=Array.isArray(e)?n?Ms(e):e:Tc(e);r.length>0&&l.length>1&&(l=l.filter(u=>!r.includes(u))),a=a??s.activeElement;let c=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),d=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,l.indexOf(a))-1;if(t&4)return Math.max(0,l.indexOf(a))+1;if(t&8)return l.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),f=t&32?{preventScroll:!0}:{},p=0,h=l.length,v;do{if(p>=h||p+h<=0)return 0;let u=d+p;if(t&16)u=(u+h)%h;else{if(u<0)return 3;if(u>=h)return 1}v=l[u],v?.focus(f),p+=c}while(v!==s.activeElement);return t&6&&mg(v)&&v.select(),2}function Nc(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function gg(){return/Android/gi.test(window.navigator.userAgent)}function Dc(){return Nc()||gg()}function rr(e,t,n){ma.isServer||o.watchEffect(a=>{document.addEventListener(e,t,n),a(()=>document.removeEventListener(e,t,n))})}function Ac(e,t,n){ma.isServer||o.watchEffect(a=>{window.addEventListener(e,t,n),a(()=>window.removeEventListener(e,t,n))})}function Bs(e,t,n=o.computed(()=>!0)){function a(i,s){if(!n.value||i.defaultPrevented)return;let l=s(i);if(l===null||!l.getRootNode().contains(l))return;let c=function d(f){return typeof f=="function"?d(f()):Array.isArray(f)||f instanceof Set?f:[f]}(e);for(let d of c){if(d===null)continue;let f=d instanceof HTMLElement?d:ae(d);if(f!=null&&f.contains(l)||i.composed&&i.composedPath().includes(f))return}return!Ps(l,Rs.Loose)&&l.tabIndex!==-1&&i.preventDefault(),t(i,l)}let r=o.ref(null);rr("pointerdown",i=>{var s,l;n.value&&(r.value=((l=(s=i.composedPath)==null?void 0:s.call(i))==null?void 0:l[0])||i.target)},!0),rr("mousedown",i=>{var s,l;n.value&&(r.value=((l=(s=i.composedPath)==null?void 0:s.call(i))==null?void 0:l[0])||i.target)},!0),rr("click",i=>{Dc()||r.value&&(a(i,()=>r.value),r.value=null)},!0),rr("touchend",i=>a(i,()=>i.target instanceof HTMLElement?i.target:null),!0),Ac("blur",i=>a(i,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Ic(e,t){if(e)return e;let n=t??"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function Fs(e,t){let n=o.ref(Ic(e.value.type,e.value.as));return o.onMounted(()=>{n.value=Ic(e.value.type,e.value.as)}),o.watchEffect(()=>{var a;n.value||ae(t)&&ae(t)instanceof HTMLButtonElement&&!((a=ae(t))!=null&&a.hasAttribute("type"))&&(n.value="button")}),n}function Rc(e){return[e.screenX,e.screenY]}function Pc(){let e=o.ref([-1,-1]);return{wasMoved(t){let n=Rc(t);return e.value[0]===n[0]&&e.value[1]===n[1]?!1:(e.value=n,!0)},update(t){e.value=Rc(t)}}}function Mc({container:e,accept:t,walk:n,enabled:a}){o.watchEffect(()=>{let r=e.value;if(!r||a!==void 0&&!a.value)return;let i=cn(e);if(!i)return;let s=Object.assign(c=>t(c),{acceptNode:t}),l=i.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,s,!1);for(;l.nextNode();)n(l.currentNode)})}var It=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(It||{}),An=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(An||{});function Be({visible:e=!0,features:t=0,ourProps:n,theirProps:a,...r}){var i;let s=Fc(a,n),l=Object.assign(r,{props:s});if(e||t&2&&s.static)return _s(l);if(t&1){let c=(i=s.unmount)==null||i?0:1;return tt(c,{0(){return null},1(){return _s({...r,props:{...s,hidden:!0,style:{display:"none"}}})}})}return _s(l)}function _s({props:e,attrs:t,slots:n,slot:a,name:r}){var i,s;let{as:l,...c}=ga(e,["unmount","static"]),d=(i=n.default)==null?void 0:i.call(n,a),f={};if(a){let p=!1,h=[];for(let[v,u]of Object.entries(a))typeof u=="boolean"&&(p=!0),u===!0&&h.push(v);p&&(f["data-headlessui-state"]=h.join(" "))}if(l==="template"){if(d=Bc(d??[]),Object.keys(c).length>0||Object.keys(t).length>0){let[p,...h]=d??[];if(!bg(p)||h.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${r} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(c).concat(Object.keys(t)).map(m=>m.trim()).filter((m,b,y)=>y.indexOf(m)===b).sort((m,b)=>m.localeCompare(b)).map(m=>` - ${m}`).join(` `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".',"Render a single element as the child so that we can forward the props onto that element."].map(m=>` - ${m}`).join(` `)].join(` -`));let v=Mc((s=p.props)!=null?s:{},c,f),u=o.cloneVNode(p,v,!0);for(let m in v)m.startsWith("on")&&(u.props||(u.props={}),u.props[m]=v[m]);return u}return Array.isArray(d)&&d.length===1?d[0]:d}return o.h(l,Object.assign({},c,f),{default:()=>d})}function Bc(e){return e.flatMap(t=>t.type===o.Fragment?Bc(t.children):[t])}function Mc(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let a of e)for(let r in a)r.startsWith("on")&&typeof a[r]=="function"?(n[r]!=null||(n[r]=[]),n[r].push(a[r])):t[r]=a[r];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(a=>[a,void 0])));for(let a in n)Object.assign(t,{[a](r,...i){let s=n[a];for(let l of s){if(r instanceof Event&&r.defaultPrevented)return;l(r,...i)}}});return t}function bg(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function ga(e,t=[]){let n=Object.assign({},e);for(let a of t)a in n&&delete n[a];return n}function yg(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}var ba=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(ba||{});let sr=o.defineComponent({name:"Hidden",props:{as:{type:[Object,String],default:"div"},features:{type:Number,default:1}},setup(e,{slots:t,attrs:n}){return()=>{var a;let{features:r,...i}=e,s={"aria-hidden":(r&2)===2?!0:(a=i["aria-hidden"])!=null?a:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return Be({ourProps:s,theirProps:i,slot:{},attrs:n,slots:t,name:"Hidden"})}}}),Fc=Symbol("Context");var Ve=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Ve||{});function Eg(){return Io()!==null}function Io(){return o.inject(Fc,null)}function ir(e){o.provide(Fc,e)}var Oe=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Oe||{}),Lc=(e=>(e[e.Left=0]="Left",e[e.Right=2]="Right",e))(Lc||{});function wg(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let dn=[];wg(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&dn[0]!==t.target&&(dn.unshift(t.target),dn=dn.filter(n=>n!=null&&n.isConnected),dn.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function xg(e){throw new Error("Unexpected object: "+e)}var Ae=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(Ae||{});function Ls(e,t){let n=t.resolveItems();if(n.length<=0)return null;let a=t.resolveActiveIndex(),r=a??-1;switch(e.focus){case 0:{for(let i=0;i=0;--i)if(!t.resolveDisabled(n[i],i,n))return i;return a}case 2:{for(let i=r+1;i=0;--i)if(!t.resolveDisabled(n[i],i,n))return i;return a}case 4:{for(let i=0;i(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Tg||{}),Cg=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Cg||{}),Ng=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(Ng||{});let Hc=Symbol("ComboboxContext");function Jn(e){let t=o.inject(Hc,null);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Jn),n}return t}let zc=Symbol("VirtualContext"),kg=o.defineComponent({name:"VirtualProvider",setup(e,{slots:t}){let n=Jn("VirtualProvider"),a=o.computed(()=>{let l=ae(n.optionsRef);if(!l)return{start:0,end:0};let c=window.getComputedStyle(l);return{start:parseFloat(c.paddingBlockStart||c.paddingTop),end:parseFloat(c.paddingBlockEnd||c.paddingBottom)}}),r=og(o.computed(()=>({scrollPaddingStart:a.value.start,scrollPaddingEnd:a.value.end,count:n.virtual.value.options.length,estimateSize(){return 40},getScrollElement(){return ae(n.optionsRef)},overscan:12}))),i=o.computed(()=>{var l;return(l=n.virtual.value)==null?void 0:l.options}),s=o.ref(0);return o.watch([i],()=>{s.value+=1}),o.provide(zc,n.virtual.value?r:null),()=>[o.h("div",{style:{position:"relative",width:"100%",height:`${r.value.getTotalSize()}px`},ref:l=>{if(l){if(typeof process<"u"&&Sg.JEST_WORKER_ID!==void 0||n.activationTrigger.value===0)return;n.activeOptionIndex.value!==null&&n.virtual.value.options.length>n.activeOptionIndex.value&&r.value.scrollToIndex(n.activeOptionIndex.value)}}},r.value.getVirtualItems().map(l=>o.cloneVNode(t.default({option:n.virtual.value.options[l.index],open:n.comboboxState.value===0})[0],{key:`${s.value}-${l.index}`,"data-index":l.index,"aria-setsize":n.virtual.value.options.length,"aria-posinset":l.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${l.start}px)`,overflowAnchor:"none"}})))]}}),Ig=o.defineComponent({name:"Combobox",emits:{"update:modelValue":e=>!0},props:{as:{type:[Object,String],default:"template"},disabled:{type:[Boolean],default:!1},by:{type:[String,Function],nullable:!0,default:null},modelValue:{type:[Object,String,Number,Boolean],default:void 0},defaultValue:{type:[Object,String,Number,Boolean],default:void 0},form:{type:String,optional:!0},name:{type:String,optional:!0},nullable:{type:Boolean,default:!1},multiple:{type:[Boolean],default:!1},immediate:{type:[Boolean],default:!1},virtual:{type:Object,default:null}},inheritAttrs:!1,setup(e,{slots:t,attrs:n,emit:a}){let r=o.ref(1),i=o.ref(null),s=o.ref(null),l=o.ref(null),c=o.ref(null),d=o.ref({static:!1,hold:!1}),f=o.ref([]),p=o.ref(null),h=o.ref(2),v=o.ref(!1);function u(D=M=>M){let M=p.value!==null?f.value[p.value]:null,K=D(f.value.slice()),B=K.length>0&&K[0].dataRef.order.value!==null?K.sort((H,W)=>H.dataRef.order.value-W.dataRef.order.value):Ps(K,H=>ae(H.dataRef.domRef)),j=M?B.indexOf(M):null;return j===-1&&(j=null),{options:B,activeOptionIndex:j}}let m=o.computed(()=>e.multiple?1:0),y=o.computed(()=>e.nullable),[b,g]=ag(o.computed(()=>e.modelValue),D=>a("update:modelValue",D),o.computed(()=>e.defaultValue)),T=o.computed(()=>b.value===void 0?tt(m.value,{1:[],0:void 0}):b.value),O=null,S=null;function N(D){return tt(m.value,{0(){return g?.(D)},1:()=>{let M=o.toRaw(_.value.value).slice(),K=o.toRaw(D),B=M.findIndex(j=>_.compare(K,o.toRaw(j)));return B===-1?M.push(K):M.splice(B,1),g?.(M)}})}let I=o.computed(()=>{});o.watch([I],([D],[M])=>{if(_.virtual.value&&D&&M&&p.value!==null){let K=D.indexOf(M[p.value]);K!==-1?p.value=K:p.value=null}});let _={comboboxState:r,value:T,mode:m,compare(D,M){if(typeof e.by=="string"){let K=e.by;return D?.[K]===M?.[K]}return e.by===null?Og(D,M):e.by(D,M)},calculateIndex(D){return _.virtual.value?e.by===null?_.virtual.value.options.indexOf(D):_.virtual.value.options.findIndex(M=>_.compare(M,D)):f.value.findIndex(M=>_.compare(M.dataRef.value,D))},defaultValue:o.computed(()=>e.defaultValue),nullable:y,immediate:o.computed(()=>!1),virtual:o.computed(()=>null),inputRef:s,labelRef:i,buttonRef:l,optionsRef:c,disabled:o.computed(()=>e.disabled),options:f,change(D){g(D)},activeOptionIndex:o.computed(()=>{if(v.value&&p.value===null&&(_.virtual.value?_.virtual.value.options.length>0:f.value.length>0)){if(_.virtual.value){let M=_.virtual.value.options.findIndex(K=>{var B;return!((B=_.virtual.value)!=null&&B.disabled(K))});if(M!==-1)return M}let D=f.value.findIndex(M=>!M.dataRef.disabled);if(D!==-1)return D}return p.value}),activationTrigger:h,optionsPropsRef:d,closeCombobox(){v.value=!1,!e.disabled&&r.value!==1&&(r.value=1,p.value=null)},openCombobox(){if(v.value=!0,!e.disabled&&r.value!==0){if(_.value.value){let D=_.calculateIndex(_.value.value);D!==-1&&(p.value=D)}r.value=0}},setActivationTrigger(D){h.value=D},goToOption(D,M,K){v.value=!1,O!==null&&cancelAnimationFrame(O),O=requestAnimationFrame(()=>{if(e.disabled||c.value&&!d.value.static&&r.value===1)return;if(_.virtual.value){p.value=D===Ae.Specific?M:Ls({focus:D},{resolveItems:()=>_.virtual.value.options,resolveActiveIndex:()=>{var H,W;return(W=(H=_.activeOptionIndex.value)!=null?H:_.virtual.value.options.findIndex(Q=>{var ne;return!((ne=_.virtual.value)!=null&&ne.disabled(Q))}))!=null?W:null},resolveDisabled:H=>_.virtual.value.disabled(H),resolveId(){throw new Error("Function not implemented.")}}),h.value=K??2;return}let B=u();if(B.activeOptionIndex===null){let H=B.options.findIndex(W=>!W.dataRef.disabled);H!==-1&&(B.activeOptionIndex=H)}let j=D===Ae.Specific?M:Ls({focus:D},{resolveItems:()=>B.options,resolveActiveIndex:()=>B.activeOptionIndex,resolveId:H=>H.id,resolveDisabled:H=>H.dataRef.disabled});p.value=j,h.value=K??2,f.value=B.options})},selectOption(D){let M=f.value.find(B=>B.id===D);if(!M)return;let{dataRef:K}=M;N(K.value)},selectActiveOption(){if(_.activeOptionIndex.value!==null){if(_.virtual.value)N(_.virtual.value.options[_.activeOptionIndex.value]);else{let{dataRef:D}=f.value[_.activeOptionIndex.value];N(D.value)}_.goToOption(Ae.Specific,_.activeOptionIndex.value)}},registerOption(D,M){let K=o.reactive({id:D,dataRef:M});if(_.virtual.value){f.value.push(K);return}S&&cancelAnimationFrame(S);let B=u(j=>(j.push(K),j));p.value===null&&_.isSelected(M.value.value)&&(B.activeOptionIndex=B.options.indexOf(K)),f.value=B.options,p.value=B.activeOptionIndex,h.value=2,B.options.some(j=>!ae(j.dataRef.domRef))&&(S=requestAnimationFrame(()=>{let j=u();f.value=j.options,p.value=j.activeOptionIndex}))},unregisterOption(D,M){if(O!==null&&cancelAnimationFrame(O),M&&(v.value=!0),_.virtual.value){f.value=f.value.filter(B=>B.id!==D);return}let K=u(B=>{let j=B.findIndex(H=>H.id===D);return j!==-1&&B.splice(j,1),B});f.value=K.options,p.value=K.activeOptionIndex,h.value=2},isSelected(D){return tt(m.value,{0:()=>_.compare(o.toRaw(_.value.value),o.toRaw(D)),1:()=>o.toRaw(_.value.value).some(M=>_.compare(o.toRaw(M),o.toRaw(D)))})},isActive(D){return p.value===_.calculateIndex(D)}};Bs([s,l,c],()=>_.closeCombobox(),o.computed(()=>r.value===0)),o.provide(Hc,_),ir(o.computed(()=>tt(r.value,{0:Ve.Open,1:Ve.Closed})));let A=o.computed(()=>{var D;return(D=ae(s))==null?void 0:D.closest("form")});return o.onMounted(()=>{o.watch([A],()=>{if(!A.value||e.defaultValue===void 0)return;function D(){_.change(e.defaultValue)}return A.value.addEventListener("reset",D),()=>{var M;(M=A.value)==null||M.removeEventListener("reset",D)}},{immediate:!0})}),()=>{var D,M,K;let{name:B,disabled:j,form:H,...W}=e,Q={open:r.value===0,disabled:j,activeIndex:_.activeOptionIndex.value,activeOption:_.activeOptionIndex.value===null?null:_.virtual.value?_.virtual.value.options[(D=_.activeOptionIndex.value)!=null?D:0]:(K=(M=_.options.value[_.activeOptionIndex.value])==null?void 0:M.dataRef.value)!=null?K:null,value:T.value};return o.h(o.Fragment,[...B!=null&&T.value!=null?jc({[B]:T.value}).map(([ne,we])=>o.h(sr,bg({features:ba.Hidden,key:ne,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:H,disabled:j,name:ne,value:we}))):[],Be({theirProps:{...n,...ga(W,["by","defaultValue","immediate","modelValue","multiple","nullable","onUpdate:modelValue","virtual"])},ourProps:{},slot:Q,slots:t,attrs:n,name:"Combobox"})])}}});o.defineComponent({name:"ComboboxLabel",props:{as:{type:[Object,String],default:"label"},id:{type:String,default:null}},setup(e,{attrs:t,slots:n}){var a;let r=(a=e.id)!=null?a:`headlessui-combobox-label-${dt()}`,i=Jn("ComboboxLabel");function s(){var l;(l=ae(i.inputRef))==null||l.focus({preventScroll:!0})}return()=>{let l={open:i.comboboxState.value===0,disabled:i.disabled.value},{...c}=e,d={id:r,ref:i.labelRef,onClick:s};return Be({ourProps:d,theirProps:c,slot:l,attrs:t,slots:n,name:"ComboboxLabel"})}}}),o.defineComponent({name:"ComboboxButton",props:{as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(e,{attrs:t,slots:n,expose:a}){var r;let i=(r=e.id)!=null?r:`headlessui-combobox-button-${dt()}`,s=Jn("ComboboxButton");a({el:s.buttonRef,$el:s.buttonRef});function l(f){s.disabled.value||(s.comboboxState.value===0?s.closeCombobox():(f.preventDefault(),s.openCombobox()),o.nextTick(()=>{var p;return(p=ae(s.inputRef))==null?void 0:p.focus({preventScroll:!0})}))}function c(f){switch(f.key){case Oe.ArrowDown:f.preventDefault(),f.stopPropagation(),s.comboboxState.value===1&&s.openCombobox(),o.nextTick(()=>{var p;return(p=s.inputRef.value)==null?void 0:p.focus({preventScroll:!0})});return;case Oe.ArrowUp:f.preventDefault(),f.stopPropagation(),s.comboboxState.value===1&&(s.openCombobox(),o.nextTick(()=>{s.value.value||s.goToOption(Ae.Last)})),o.nextTick(()=>{var p;return(p=s.inputRef.value)==null?void 0:p.focus({preventScroll:!0})});return;case Oe.Escape:if(s.comboboxState.value!==0)return;f.preventDefault(),s.optionsRef.value&&!s.optionsPropsRef.value.static&&f.stopPropagation(),s.closeCombobox(),o.nextTick(()=>{var p;return(p=s.inputRef.value)==null?void 0:p.focus({preventScroll:!0})});return}}let d=Ms(o.computed(()=>({as:e.as,type:t.type})),s.buttonRef);return()=>{var f,p;let h={open:s.comboboxState.value===0,disabled:s.disabled.value,value:s.value.value},{...v}=e,u={ref:s.buttonRef,id:i,type:d.value,tabindex:"-1","aria-haspopup":"listbox","aria-controls":(f=ae(s.optionsRef))==null?void 0:f.id,"aria-expanded":s.comboboxState.value===0,"aria-labelledby":s.labelRef.value?[(p=ae(s.labelRef))==null?void 0:p.id,i].join(" "):void 0,disabled:s.disabled.value===!0?!0:void 0,onKeydown:c,onClick:l};return Be({ourProps:u,theirProps:v,slot:h,attrs:t,slots:n,name:"ComboboxButton"})}}});let _g=o.defineComponent({name:"ComboboxInput",props:{as:{type:[Object,String],default:"input"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},displayValue:{type:Function},defaultValue:{type:String,default:void 0},id:{type:String,default:null}},emits:{change:e=>!0},setup(e,{emit:t,attrs:n,slots:a,expose:r}){var i;let s=(i=e.id)!=null?i:`headlessui-combobox-input-${dt()}`,l=Jn("ComboboxInput"),c=o.computed(()=>cn(ae(l.inputRef))),d={value:!1};r({el:l.inputRef,$el:l.inputRef});function f(){l.change(null);let S=ae(l.optionsRef);S&&(S.scrollTop=0),l.goToOption(Ae.Nothing)}let p=o.computed(()=>{var S;let N=l.value.value;return ae(l.inputRef)?typeof e.displayValue<"u"&&N!==void 0?(S=e.displayValue(N))!=null?S:"":typeof N=="string"?N:"":""});o.onMounted(()=>{o.watch([p,l.comboboxState,c],([S,N],[I,_])=>{if(d.value)return;let A=ae(l.inputRef);A&&((_===0&&N===1||S!==I)&&(A.value=S),requestAnimationFrame(()=>{var D;if(d.value||!A||((D=c.value)==null?void 0:D.activeElement)!==A)return;let{selectionStart:M,selectionEnd:K}=A;Math.abs((K??0)-(M??0))===0&&M===0&&A.setSelectionRange(A.value.length,A.value.length)}))},{immediate:!0}),o.watch([l.comboboxState],([S],[N])=>{if(S===0&&N===1){if(d.value)return;let I=ae(l.inputRef);if(!I)return;let _=I.value,{selectionStart:A,selectionEnd:D,selectionDirection:M}=I;I.value="",I.value=_,M!==null?I.setSelectionRange(A,D,M):I.setSelectionRange(A,D)}})});let h=o.ref(!1);function v(){h.value=!0}function u(){kn().nextFrame(()=>{h.value=!1})}let m=sg();function y(S){switch(d.value=!0,m(()=>{d.value=!1}),S.key){case Oe.Enter:if(d.value=!1,l.comboboxState.value!==0||h.value)return;if(S.preventDefault(),S.stopPropagation(),l.activeOptionIndex.value===null){l.closeCombobox();return}l.selectActiveOption(),l.mode.value===0&&l.closeCombobox();break;case Oe.ArrowDown:return d.value=!1,S.preventDefault(),S.stopPropagation(),tt(l.comboboxState.value,{0:()=>l.goToOption(Ae.Next),1:()=>l.openCombobox()});case Oe.ArrowUp:return d.value=!1,S.preventDefault(),S.stopPropagation(),tt(l.comboboxState.value,{0:()=>l.goToOption(Ae.Previous),1:()=>{l.openCombobox(),o.nextTick(()=>{l.value.value||l.goToOption(Ae.Last)})}});case Oe.Home:if(S.shiftKey)break;return d.value=!1,S.preventDefault(),S.stopPropagation(),l.goToOption(Ae.First);case Oe.PageUp:return d.value=!1,S.preventDefault(),S.stopPropagation(),l.goToOption(Ae.First);case Oe.End:if(S.shiftKey)break;return d.value=!1,S.preventDefault(),S.stopPropagation(),l.goToOption(Ae.Last);case Oe.PageDown:return d.value=!1,S.preventDefault(),S.stopPropagation(),l.goToOption(Ae.Last);case Oe.Escape:if(d.value=!1,l.comboboxState.value!==0)return;S.preventDefault(),l.optionsRef.value&&!l.optionsPropsRef.value.static&&S.stopPropagation(),l.nullable.value&&l.mode.value===0&&l.value.value===null&&f(),l.closeCombobox();break;case Oe.Tab:if(d.value=!1,l.comboboxState.value!==0)return;l.mode.value===0&&l.activationTrigger.value!==1&&l.selectActiveOption(),l.closeCombobox();break}}function b(S){t("change",S),l.nullable.value&&l.mode.value===0&&S.target.value===""&&f(),l.openCombobox()}function g(S){var N,I,_;let A=(N=S.relatedTarget)!=null?N:dn.find(D=>D!==S.currentTarget);if(d.value=!1,!((I=ae(l.optionsRef))!=null&&I.contains(A))&&!((_=ae(l.buttonRef))!=null&&_.contains(A))&&l.comboboxState.value===0)return S.preventDefault(),l.mode.value===0&&(l.nullable.value&&l.value.value===null?f():l.activationTrigger.value!==1&&l.selectActiveOption()),l.closeCombobox()}function T(S){var N,I,_;let A=(N=S.relatedTarget)!=null?N:dn.find(D=>D!==S.currentTarget);(I=ae(l.buttonRef))!=null&&I.contains(A)||(_=ae(l.optionsRef))!=null&&_.contains(A)||l.disabled.value||l.immediate.value&&l.comboboxState.value!==0&&(l.openCombobox(),kn().nextFrame(()=>{l.setActivationTrigger(1)}))}let O=o.computed(()=>{var S,N,I,_;return(_=(I=(N=e.defaultValue)!=null?N:l.defaultValue.value!==void 0?(S=e.displayValue)==null?void 0:S.call(e,l.defaultValue.value):null)!=null?I:l.defaultValue.value)!=null?_:""});return()=>{var S,N,I,_,A,D,M;let K={open:l.comboboxState.value===0},{displayValue:B,onChange:j,...H}=e,W={"aria-controls":(S=l.optionsRef.value)==null?void 0:S.id,"aria-expanded":l.comboboxState.value===0,"aria-activedescendant":l.activeOptionIndex.value===null?void 0:l.virtual.value?(N=l.options.value.find(Q=>!l.virtual.value.disabled(Q.dataRef.value)&&l.compare(Q.dataRef.value,l.virtual.value.options[l.activeOptionIndex.value])))==null?void 0:N.id:(I=l.options.value[l.activeOptionIndex.value])==null?void 0:I.id,"aria-labelledby":(D=(_=ae(l.labelRef))==null?void 0:_.id)!=null?D:(A=ae(l.buttonRef))==null?void 0:A.id,"aria-autocomplete":"list",id:s,onCompositionstart:v,onCompositionend:u,onKeydown:y,onInput:b,onFocus:T,onBlur:g,role:"combobox",type:(M=n.type)!=null?M:"text",tabIndex:0,ref:l.inputRef,defaultValue:O.value,disabled:l.disabled.value===!0?!0:void 0};return Be({ourProps:W,theirProps:H,slot:K,attrs:n,slots:a,features:At.RenderStrategy|At.Static,name:"ComboboxInput"})}}}),Ag=o.defineComponent({name:"ComboboxOptions",props:{as:{type:[Object,String],default:"ul"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},hold:{type:[Boolean],default:!1}},setup(e,{attrs:t,slots:n,expose:a}){let r=Jn("ComboboxOptions"),i=`headlessui-combobox-options-${dt()}`;a({el:r.optionsRef,$el:r.optionsRef}),o.watchEffect(()=>{r.optionsPropsRef.value.static=e.static}),o.watchEffect(()=>{r.optionsPropsRef.value.hold=e.hold});let s=Io(),l=o.computed(()=>s!==null?(s.value&Ve.Open)===Ve.Open:r.comboboxState.value===0);Pc({container:o.computed(()=>ae(r.optionsRef)),enabled:o.computed(()=>r.comboboxState.value===0),accept(d){return d.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:d.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(d){d.setAttribute("role","none")}});function c(d){d.preventDefault()}return()=>{var d,f,p;let h={open:r.comboboxState.value===0},v={"aria-labelledby":(p=(d=ae(r.labelRef))==null?void 0:d.id)!=null?p:(f=ae(r.buttonRef))==null?void 0:f.id,id:i,ref:r.optionsRef,role:"listbox","aria-multiselectable":r.mode.value===1?!0:void 0,onMousedown:c},u=ga(e,["hold"]);return Be({ourProps:v,theirProps:u,slot:h,attrs:t,slots:r.virtual.value&&r.comboboxState.value===0?{...n,default:()=>[o.h(kg,{},n.default)]}:n,features:At.RenderStrategy|At.Static,visible:l.value,name:"ComboboxOptions"})}}}),Gc=o.defineComponent({name:"ComboboxOption",props:{as:{type:[Object,String],default:"li"},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1},order:{type:[Number],default:null}},setup(e,{slots:t,attrs:n,expose:a}){let r=Jn("ComboboxOption"),i=`headlessui-combobox-option-${dt()}`,s=o.ref(null),l=o.computed(()=>e.disabled);a({el:s,$el:s});let c=o.computed(()=>{var g;return r.virtual.value?r.activeOptionIndex.value===r.calculateIndex(e.value):r.activeOptionIndex.value===null?!1:((g=r.options.value[r.activeOptionIndex.value])==null?void 0:g.id)===i}),d=o.computed(()=>r.isSelected(e.value)),f=o.inject(zc,null),p=o.computed(()=>({disabled:e.disabled,value:e.value,domRef:s,order:o.computed(()=>e.order)}));o.onMounted(()=>r.registerOption(i,p)),o.onUnmounted(()=>r.unregisterOption(i,c.value)),o.watchEffect(()=>{let g=ae(s);g&&f?.value.measureElement(g)}),o.watchEffect(()=>{r.comboboxState.value===0&&c.value&&(r.virtual.value||r.activationTrigger.value!==0&&o.nextTick(()=>{var g,T;return(T=(g=ae(s))==null?void 0:g.scrollIntoView)==null?void 0:T.call(g,{block:"nearest"})}))});function h(g){g.preventDefault(),g.button===Lc.Left&&(l.value||(r.selectOption(i),Ic()||requestAnimationFrame(()=>{var T;return(T=ae(r.inputRef))==null?void 0:T.focus({preventScroll:!0})}),r.mode.value===0&&r.closeCombobox()))}function v(){var g;if(e.disabled||(g=r.virtual.value)!=null&&g.disabled(e.value))return r.goToOption(Ae.Nothing);let T=r.calculateIndex(e.value);r.goToOption(Ae.Specific,T)}let u=Rc();function m(g){u.update(g)}function y(g){var T;if(!u.wasMoved(g)||e.disabled||(T=r.virtual.value)!=null&&T.disabled(e.value)||c.value)return;let O=r.calculateIndex(e.value);r.goToOption(Ae.Specific,O,0)}function b(g){var T;u.wasMoved(g)&&(e.disabled||(T=r.virtual.value)!=null&&T.disabled(e.value)||c.value&&(r.optionsPropsRef.value.hold||r.goToOption(Ae.Nothing)))}return()=>{let{disabled:g}=e,T={active:c.value,selected:d.value,disabled:g},O={id:i,ref:s,role:"option",tabIndex:g===!0?void 0:-1,"aria-disabled":g===!0?!0:void 0,"aria-selected":d.value,disabled:void 0,onMousedown:h,onFocus:v,onPointerenter:m,onMouseenter:m,onPointermove:y,onMousemove:y,onPointerleave:b,onMouseleave:b},S=ga(e,["order","value"]);return Be({ourProps:O,theirProps:S,slot:T,attrs:n,slots:t,name:"ComboboxOption"})}}});function Wc(e,t,n,a){ma.isServer||o.watchEffect(r=>{e=e??window,e.addEventListener(t,n,a),r(()=>e.removeEventListener(t,n,a))})}var ya=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(ya||{});function Dg(){let e=o.ref(0);return _c("keydown",t=>{t.key==="Tab"&&(e.value=t.shiftKey?1:0)}),e}function Kc(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.value){let a=ae(n);a instanceof HTMLElement&&t.add(a)}return t}var Xc=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(Xc||{});let Ea=Object.assign(o.defineComponent({name:"FocusTrap",props:{as:{type:[Object,String],default:"div"},initialFocus:{type:Object,default:null},features:{type:Number,default:30},containers:{type:[Object,Function],default:o.ref(new Set)}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:a}){let r=o.ref(null);a({el:r,$el:r});let i=o.computed(()=>cn(r)),s=o.ref(!1);o.onMounted(()=>s.value=!0),o.onUnmounted(()=>s.value=!1),Pg({ownerDocument:i},o.computed(()=>s.value&&!!(e.features&16)));let l=Bg({ownerDocument:i,container:r,initialFocus:o.computed(()=>e.initialFocus)},o.computed(()=>s.value&&!!(e.features&2)));Mg({ownerDocument:i,container:r,containers:e.containers,previousActiveElement:l},o.computed(()=>s.value&&!!(e.features&8)));let c=Dg();function d(v){let u=ae(r);u&&(m=>m())(()=>{tt(c.value,{[ya.Forwards]:()=>{va(u,$t.First,{skipElements:[v.relatedTarget]})},[ya.Backwards]:()=>{va(u,$t.Last,{skipElements:[v.relatedTarget]})}})})}let f=o.ref(!1);function p(v){v.key==="Tab"&&(f.value=!0,requestAnimationFrame(()=>{f.value=!1}))}function h(v){if(!s.value)return;let u=Kc(e.containers);ae(r)instanceof HTMLElement&&u.add(ae(r));let m=v.relatedTarget;m instanceof HTMLElement&&m.dataset.headlessuiFocusGuard!=="true"&&(Yc(u,m)||(f.value?va(ae(r),tt(c.value,{[ya.Forwards]:()=>$t.Next,[ya.Backwards]:()=>$t.Previous})|$t.WrapAround,{relativeTo:v.target}):v.target instanceof HTMLElement&&In(v.target)))}return()=>{let v={},u={ref:r,onKeydown:p,onFocusout:h},{features:m,initialFocus:y,containers:b,...g}=e;return o.h(o.Fragment,[!!(m&4)&&o.h(sr,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:d,features:ba.Focusable}),Be({ourProps:u,theirProps:{...t,...g},slot:v,attrs:t,slots:n,name:"FocusTrap"}),!!(m&4)&&o.h(sr,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:d,features:ba.Focusable})])}}}),{features:Xc});function Rg(e){let t=o.ref(dn.slice());return o.watch([e],([n],[a])=>{a===!0&&n===!1?_s(()=>{t.value.splice(0)}):a===!1&&n===!0&&(t.value=dn.slice())},{flush:"post"}),()=>{var n;return(n=t.value.find(a=>a!=null&&a.isConnected))!=null?n:null}}function Pg({ownerDocument:e},t){let n=Rg(t);o.onMounted(()=>{o.watchEffect(()=>{var a,r;t.value||((a=e.value)==null?void 0:a.activeElement)===((r=e.value)==null?void 0:r.body)&&In(n())},{flush:"post"})}),o.onUnmounted(()=>{t.value&&In(n())})}function Bg({ownerDocument:e,container:t,initialFocus:n},a){let r=o.ref(null),i=o.ref(!1);return o.onMounted(()=>i.value=!0),o.onUnmounted(()=>i.value=!1),o.onMounted(()=>{o.watch([t,n,a],(s,l)=>{if(s.every((d,f)=>l?.[f]===d)||!a.value)return;let c=ae(t);c&&_s(()=>{var d,f;if(!i.value)return;let p=ae(n),h=(d=e.value)==null?void 0:d.activeElement;if(p){if(p===h){r.value=h;return}}else if(c.contains(h)){r.value=h;return}p?In(p):va(c,$t.First|$t.NoScroll)===Tc.Error&&console.warn("There are no focusable elements inside the "),r.value=(f=e.value)==null?void 0:f.activeElement})},{immediate:!0,flush:"post"})}),r}function Mg({ownerDocument:e,container:t,containers:n,previousActiveElement:a},r){var i;Wc((i=e.value)==null?void 0:i.defaultView,"focus",s=>{if(!r.value)return;let l=Kc(n);ae(t)instanceof HTMLElement&&l.add(ae(t));let c=a.value;if(!c)return;let d=s.target;d&&d instanceof HTMLElement?Yc(l,d)?(a.value=d,In(d)):(s.preventDefault(),s.stopPropagation(),In(c)):In(a.value)},!0)}function Yc(e,t){for(let n of e)if(n.contains(t))return!0;return!1}function Fg(e){let t=o.shallowRef(e.getSnapshot());return o.onUnmounted(e.subscribe(()=>{t.value=e.getSnapshot()})),t}function Lg(e,t){let n=e(),a=new Set;return{getSnapshot(){return n},subscribe(r){return a.add(r),()=>a.delete(r)},dispatch(r,...i){let s=t[r].call(n,...i);s&&(n=s,a.forEach(l=>l()))}}}function jg(){let e;return{before({doc:t}){var n;let a=t.documentElement;e=((n=t.defaultView)!=null?n:window).innerWidth-a.clientWidth},after({doc:t,d:n}){let a=t.documentElement,r=a.clientWidth-a.offsetWidth,i=e-r;n.style(a,"paddingRight",`${i}px`)}}}function Vg(){return kc()?{before({doc:e,d:t,meta:n}){function a(r){return n.containers.flatMap(i=>i()).some(i=>i.contains(r))}t.microTask(()=>{var r;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let l=kn();l.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>l.dispose()))}let i=(r=window.scrollY)!=null?r:window.pageYOffset,s=null;t.addEventListener(e,"click",l=>{if(l.target instanceof HTMLElement)try{let c=l.target.closest("a");if(!c)return;let{hash:d}=new URL(c.href),f=e.querySelector(d);f&&!a(f)&&(s=f)}catch{}},!0),t.addEventListener(e,"touchstart",l=>{if(l.target instanceof HTMLElement)if(a(l.target)){let c=l.target;for(;c.parentElement&&a(c.parentElement);)c=c.parentElement;t.style(c,"overscrollBehavior","contain")}else t.style(l.target,"touchAction","none")}),t.addEventListener(e,"touchmove",l=>{if(l.target instanceof HTMLElement){if(l.target.tagName==="INPUT")return;if(a(l.target)){let c=l.target;for(;c.parentElement&&c.dataset.headlessuiPortal!==""&&!(c.scrollHeight>c.clientHeight||c.scrollWidth>c.clientWidth);)c=c.parentElement;c.dataset.headlessuiPortal===""&&l.preventDefault()}else l.preventDefault()}},{passive:!1}),t.add(()=>{var l;let c=(l=window.scrollY)!=null?l:window.pageYOffset;i!==c&&window.scrollTo(0,i),s&&s.isConnected&&(s.scrollIntoView({block:"nearest"}),s=null)})})}}:{}}function Ug(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function Hg(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let Qn=Lg(()=>new Map,{PUSH(e,t){var n;let a=(n=this.get(e))!=null?n:{doc:e,count:0,d:kn(),meta:new Set};return a.count++,a.meta.add(t),this.set(e,a),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let a={doc:e,d:t,meta:Hg(n)},r=[Vg(),jg(),Ug()];r.forEach(({before:i})=>i?.(a)),r.forEach(({after:i})=>i?.(a))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});Qn.subscribe(()=>{let e=Qn.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let a=t.get(n.doc)==="hidden",r=n.count!==0;(r&&!a||!r&&a)&&Qn.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&Qn.dispatch("TEARDOWN",n)}});function zg(e,t,n){let a=Fg(Qn),r=o.computed(()=>{let i=e.value?a.value.get(e.value):void 0;return i?i.count>0:!1});return o.watch([e,t],([i,s],[l],c)=>{if(!i||!s)return;Qn.dispatch("PUSH",i,n);let d=!1;c(()=>{d||(Qn.dispatch("POP",l??i,n),d=!0)})},{immediate:!0}),r}let js=new Map,wa=new Map;function Jc(e,t=o.ref(!0)){o.watchEffect(n=>{var a;if(!t.value)return;let r=ae(e);if(!r)return;n(function(){var s;if(!r)return;let l=(s=wa.get(r))!=null?s:1;if(l===1?wa.delete(r):wa.set(r,l-1),l!==1)return;let c=js.get(r);c&&(c["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",c["aria-hidden"]),r.inert=c.inert,js.delete(r))});let i=(a=wa.get(r))!=null?a:0;wa.set(r,i+1),i===0&&(js.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0)})}function Gg({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){let a=o.ref(null),r=cn(a);function i(){var s,l,c;let d=[];for(let f of e)f!==null&&(f instanceof HTMLElement?d.push(f):"value"in f&&f.value instanceof HTMLElement&&d.push(f.value));if(t!=null&&t.value)for(let f of t.value)d.push(f);for(let f of(s=r?.querySelectorAll("html > *, body > *"))!=null?s:[])f!==document.body&&f!==document.head&&f instanceof HTMLElement&&f.id!=="headlessui-portal-root"&&(f.contains(ae(a))||f.contains((c=(l=ae(a))==null?void 0:l.getRootNode())==null?void 0:c.host)||d.some(p=>f.contains(p))||d.push(f));return d}return{resolveContainers:i,contains(s){return i().some(l=>l.contains(s))},mainTreeNodeRef:a,MainTreeNode(){return n!=null?null:o.h(sr,{features:ba.Hidden,ref:a})}}}let Qc=Symbol("ForcePortalRootContext");function Wg(){return o.inject(Qc,!1)}let Vs=o.defineComponent({name:"ForcePortalRoot",props:{as:{type:[Object,String],default:"template"},force:{type:Boolean,default:!1}},setup(e,{slots:t,attrs:n}){return o.provide(Qc,e.force),()=>{let{force:a,...r}=e;return Be({theirProps:r,ourProps:{},slot:{},slots:t,attrs:n,name:"ForcePortalRoot"})}}}),Zc=Symbol("StackContext");var Us=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(Us||{});function Kg(){return o.inject(Zc,()=>{})}function Xg({type:e,enabled:t,element:n,onUpdate:a}){let r=Kg();function i(...s){a?.(...s),r(...s)}o.onMounted(()=>{o.watch(t,(s,l)=>{s?i(0,e,n):l===!0&&i(1,e,n)},{immediate:!0,flush:"sync"})}),o.onUnmounted(()=>{t.value&&i(1,e,n)}),o.provide(Zc,i)}let qc=Symbol("DescriptionContext");function Yg(){let e=o.inject(qc,null);if(e===null)throw new Error("Missing parent");return e}function Jg({slot:e=o.ref({}),name:t="Description",props:n={}}={}){let a=o.ref([]);function r(i){return a.value.push(i),()=>{let s=a.value.indexOf(i);s!==-1&&a.value.splice(s,1)}}return o.provide(qc,{register:r,slot:e,name:t,props:n}),o.computed(()=>a.value.length>0?a.value.join(" "):void 0)}o.defineComponent({name:"Description",props:{as:{type:[Object,String],default:"p"},id:{type:String,default:null}},setup(e,{attrs:t,slots:n}){var a;let r=(a=e.id)!=null?a:`headlessui-description-${dt()}`,i=Yg();return o.onMounted(()=>o.onUnmounted(i.register(r))),()=>{let{name:s="Description",slot:l=o.ref({}),props:c={}}=i,{...d}=e,f={...Object.entries(c).reduce((p,[h,v])=>Object.assign(p,{[h]:o.unref(v)}),{}),id:r};return Be({ourProps:f,theirProps:d,slot:l.value,attrs:t,slots:n,name:s})}}});function Qg(e){let t=cn(e);if(!t){if(e===null)return null;throw new Error(`[Headless UI]: Cannot find ownerDocument for contextElement: ${e}`)}let n=t.getElementById("headlessui-portal-root");if(n)return n;let a=t.createElement("div");return a.setAttribute("id","headlessui-portal-root"),t.body.appendChild(a)}const Hs=new WeakMap;function Zg(e){var t;return(t=Hs.get(e))!=null?t:0}function $c(e,t){let n=t(Zg(e));return n<=0?Hs.delete(e):Hs.set(e,n),n}let ed=o.defineComponent({name:"Portal",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){let a=o.ref(null),r=o.computed(()=>cn(a)),i=Wg(),s=o.inject(td,null),l=o.ref(i===!0||s==null?Qg(a.value):s.resolveTarget());l.value&&$c(l.value,h=>h+1);let c=o.ref(!1);o.onMounted(()=>{c.value=!0}),o.watchEffect(()=>{i||s!=null&&(l.value=s.resolveTarget())});let d=o.inject(zs,null),f=!1,p=o.getCurrentInstance();return o.watch(a,()=>{if(f||!d)return;let h=ae(a);h&&(o.onUnmounted(d.register(h),p),f=!0)}),o.onUnmounted(()=>{var h,v;let u=(h=r.value)==null?void 0:h.getElementById("headlessui-portal-root");!u||l.value!==u||$c(l.value,m=>m-1)||l.value.children.length>0||(v=l.value.parentElement)==null||v.removeChild(l.value)}),()=>{if(!c.value||l.value===null)return null;let h={ref:a,"data-headlessui-portal":""};return o.h(o.Teleport,{to:l.value},Be({ourProps:h,theirProps:e,slot:{},attrs:n,slots:t,name:"Portal"}))}}}),zs=Symbol("PortalParentContext");function qg(){let e=o.inject(zs,null),t=o.ref([]);function n(i){return t.value.push(i),e&&e.register(i),()=>a(i)}function a(i){let s=t.value.indexOf(i);s!==-1&&t.value.splice(s,1),e&&e.unregister(i)}let r={register:n,unregister:a,portals:t};return[t,o.defineComponent({name:"PortalWrapper",setup(i,{slots:s}){return o.provide(zs,r),()=>{var l;return(l=s.default)==null?void 0:l.call(s)}}})]}let td=Symbol("PortalGroupContext"),$g=o.defineComponent({name:"PortalGroup",props:{as:{type:[Object,String],default:"template"},target:{type:Object,default:null}},setup(e,{attrs:t,slots:n}){let a=o.reactive({resolveTarget(){return e.target}});return o.provide(td,a),()=>{let{target:r,...i}=e;return Be({theirProps:i,ourProps:{},slot:{},attrs:t,slots:n,name:"PortalGroup"})}}});var eb=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(eb||{});let Gs=Symbol("DialogContext");function xa(e){let t=o.inject(Gs,null);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,xa),n}return t}let lr="DC8F892D-2EBD-447C-A4C8-A03058436FF4",cr=o.defineComponent({name:"Dialog",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},open:{type:[Boolean,String],default:lr},initialFocus:{type:Object,default:null},id:{type:String,default:null},role:{type:String,default:"dialog"}},emits:{close:e=>!0},setup(e,{emit:t,attrs:n,slots:a,expose:r}){var i,s;let l=(i=e.id)!=null?i:`headlessui-dialog-${dt()}`,c=o.ref(!1);o.onMounted(()=>{c.value=!0});let d=!1,f=o.computed(()=>e.role==="dialog"||e.role==="alertdialog"?e.role:(d||(d=!0,console.warn(`Invalid role [${f}] passed to . Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")),p=o.ref(0),h=Io(),v=o.computed(()=>e.open===lr&&h!==null?(h.value&Ve.Open)===Ve.Open:e.open),u=o.ref(null),m=o.computed(()=>cn(u));if(r({el:u,$el:u}),!(e.open!==lr||h!==null))throw new Error("You forgot to provide an `open` prop to the `Dialog`.");if(typeof v.value!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${v.value===lr?void 0:e.open}`);let y=o.computed(()=>c.value&&v.value?0:1),b=o.computed(()=>y.value===0),g=o.computed(()=>p.value>1),T=o.inject(Gs,null)!==null,[O,S]=qg(),{resolveContainers:N,mainTreeNodeRef:I,MainTreeNode:_}=Gg({portals:O,defaultContainers:[o.computed(()=>{var se;return(se=Q.panelRef.value)!=null?se:u.value})]}),A=o.computed(()=>g.value?"parent":"leaf"),D=o.computed(()=>h!==null?(h.value&Ve.Closing)===Ve.Closing:!1),M=o.computed(()=>T||D.value?!1:b.value),K=o.computed(()=>{var se,fe,ye;return(ye=Array.from((fe=(se=m.value)==null?void 0:se.querySelectorAll("body > *"))!=null?fe:[]).find(Se=>Se.id==="headlessui-portal-root"?!1:Se.contains(ae(I))&&Se instanceof HTMLElement))!=null?ye:null});Jc(K,M);let B=o.computed(()=>g.value?!0:b.value),j=o.computed(()=>{var se,fe,ye;return(ye=Array.from((fe=(se=m.value)==null?void 0:se.querySelectorAll("[data-headlessui-portal]"))!=null?fe:[]).find(Se=>Se.contains(ae(I))&&Se instanceof HTMLElement))!=null?ye:null});Jc(j,B),Xg({type:"Dialog",enabled:o.computed(()=>y.value===0),element:u,onUpdate:(se,fe)=>{if(fe==="Dialog")return tt(se,{[Us.Add]:()=>p.value+=1,[Us.Remove]:()=>p.value-=1})}});let H=Jg({name:"DialogDescription",slot:o.computed(()=>({open:v.value}))}),W=o.ref(null),Q={titleId:W,panelRef:o.ref(null),dialogState:y,setTitleId(se){W.value!==se&&(W.value=se)},close(){t("close",!1)}};o.provide(Gs,Q);let ne=o.computed(()=>!(!b.value||g.value));Bs(N,(se,fe)=>{se.preventDefault(),Q.close(),o.nextTick(()=>fe?.focus())},ne);let we=o.computed(()=>!(g.value||y.value!==0));Wc((s=m.value)==null?void 0:s.defaultView,"keydown",se=>{we.value&&(se.defaultPrevented||se.key===Oe.Escape&&(se.preventDefault(),se.stopPropagation(),Q.close()))});let Ze=o.computed(()=>!(D.value||y.value!==0||T));return zg(m,Ze,se=>{var fe;return{containers:[...(fe=se.containers)!=null?fe:[],N]}}),o.watchEffect(se=>{if(y.value!==0)return;let fe=ae(u);if(!fe)return;let ye=new ResizeObserver(Se=>{for(let Pe of Se){let ke=Pe.target.getBoundingClientRect();ke.x===0&&ke.y===0&&ke.width===0&&ke.height===0&&Q.close()}});ye.observe(fe),se(()=>ye.disconnect())}),()=>{let{open:se,initialFocus:fe,...ye}=e,Se={...n,ref:u,id:l,role:f.value,"aria-modal":y.value===0?!0:void 0,"aria-labelledby":W.value,"aria-describedby":H.value},Pe={open:y.value===0};return o.h(Vs,{force:!0},()=>[o.h(ed,()=>o.h($g,{target:u.value},()=>o.h(Vs,{force:!1},()=>o.h(Ea,{initialFocus:fe,containers:N,features:b.value?tt(A.value,{parent:Ea.features.RestoreFocus,leaf:Ea.features.All&~Ea.features.FocusLock}):Ea.features.None},()=>o.h(S,{},()=>Be({ourProps:Se,theirProps:{...ye,...n},slot:Pe,attrs:n,slots:a,visible:y.value===0,features:At.RenderStrategy|At.Static,name:"Dialog"})))))),o.h(_)])}}});o.defineComponent({name:"DialogOverlay",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:null}},setup(e,{attrs:t,slots:n}){var a;let r=(a=e.id)!=null?a:`headlessui-dialog-overlay-${dt()}`,i=xa("DialogOverlay");function s(l){l.target===l.currentTarget&&(l.preventDefault(),l.stopPropagation(),i.close())}return()=>{let{...l}=e;return Be({ourProps:{id:r,"aria-hidden":!0,onClick:s},theirProps:l,slot:{open:i.dialogState.value===0},attrs:t,slots:n,name:"DialogOverlay"})}}}),o.defineComponent({name:"DialogBackdrop",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:null}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:a}){var r;let i=(r=e.id)!=null?r:`headlessui-dialog-backdrop-${dt()}`,s=xa("DialogBackdrop"),l=o.ref(null);return a({el:l,$el:l}),o.onMounted(()=>{if(s.panelRef.value===null)throw new Error("A component is being used, but a component is missing.")}),()=>{let{...c}=e,d={id:i,ref:l,"aria-hidden":!0};return o.h(Vs,{force:!0},()=>o.h(ed,()=>Be({ourProps:d,theirProps:{...t,...c},slot:{open:s.dialogState.value===0},attrs:t,slots:n,name:"DialogBackdrop"})))}}});let un=o.defineComponent({name:"DialogPanel",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:null}},setup(e,{attrs:t,slots:n,expose:a}){var r;let i=(r=e.id)!=null?r:`headlessui-dialog-panel-${dt()}`,s=xa("DialogPanel");a({el:s.panelRef,$el:s.panelRef});function l(c){c.stopPropagation()}return()=>{let{...c}=e,d={id:i,ref:s.panelRef,onClick:l};return Be({ourProps:d,theirProps:c,slot:{open:s.dialogState.value===0},attrs:t,slots:n,name:"DialogPanel"})}}}),nd=o.defineComponent({name:"DialogTitle",props:{as:{type:[Object,String],default:"h2"},id:{type:String,default:null}},setup(e,{attrs:t,slots:n}){var a;let r=(a=e.id)!=null?a:`headlessui-dialog-title-${dt()}`,i=xa("DialogTitle");return o.onMounted(()=>{i.setTitleId(r),o.onUnmounted(()=>i.setTitleId(null))}),()=>{let{...s}=e;return Be({ourProps:{id:r},theirProps:s,slot:{open:i.dialogState.value===0},attrs:t,slots:n,name:"DialogTitle"})}}});var tb=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(tb||{});let od=Symbol("DisclosureContext");function Ws(e){let t=o.inject(od,null);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Ws),n}return t}let ad=Symbol("DisclosurePanelContext");function nb(){return o.inject(ad,null)}let rd=o.defineComponent({name:"Disclosure",props:{as:{type:[Object,String],default:"template"},defaultOpen:{type:[Boolean],default:!1}},setup(e,{slots:t,attrs:n}){let a=o.ref(e.defaultOpen?0:1),r=o.ref(null),i=o.ref(null),s={buttonId:o.ref(`headlessui-disclosure-button-${dt()}`),panelId:o.ref(`headlessui-disclosure-panel-${dt()}`),disclosureState:a,panel:r,button:i,toggleDisclosure(){a.value=tt(a.value,{0:1,1:0})},closeDisclosure(){a.value!==1&&(a.value=1)},close(l){s.closeDisclosure();let c=l?l instanceof HTMLElement?l:l.value instanceof HTMLElement?ae(l):ae(s.button):ae(s.button);c?.focus()}};return o.provide(od,s),ir(o.computed(()=>tt(a.value,{0:Ve.Open,1:Ve.Closed}))),()=>{let{defaultOpen:l,...c}=e,d={open:a.value===0,close:s.close};return Be({theirProps:c,ourProps:{},slot:d,slots:t,attrs:n,name:"Disclosure"})}}}),sd=o.defineComponent({name:"DisclosureButton",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:null}},setup(e,{attrs:t,slots:n,expose:a}){let r=Ws("DisclosureButton"),i=nb(),s=o.computed(()=>i===null?!1:i.value===r.panelId.value);o.onMounted(()=>{s.value||e.id!==null&&(r.buttonId.value=e.id)}),o.onUnmounted(()=>{s.value||(r.buttonId.value=null)});let l=o.ref(null);a({el:l,$el:l}),s.value||o.watchEffect(()=>{r.button.value=l.value});let c=Ms(o.computed(()=>({as:e.as,type:t.type})),l);function d(){var h;e.disabled||(s.value?(r.toggleDisclosure(),(h=ae(r.button))==null||h.focus()):r.toggleDisclosure())}function f(h){var v;if(!e.disabled)if(s.value)switch(h.key){case Oe.Space:case Oe.Enter:h.preventDefault(),h.stopPropagation(),r.toggleDisclosure(),(v=ae(r.button))==null||v.focus();break}else switch(h.key){case Oe.Space:case Oe.Enter:h.preventDefault(),h.stopPropagation(),r.toggleDisclosure();break}}function p(h){switch(h.key){case Oe.Space:h.preventDefault();break}}return()=>{var h;let v={open:r.disclosureState.value===0},{id:u,...m}=e,y=s.value?{ref:l,type:c.value,onClick:d,onKeydown:f}:{id:(h=r.buttonId.value)!=null?h:u,ref:l,type:c.value,"aria-expanded":r.disclosureState.value===0,"aria-controls":r.disclosureState.value===0||ae(r.panel)?r.panelId.value:void 0,disabled:e.disabled?!0:void 0,onClick:d,onKeydown:f,onKeyup:p};return Be({ourProps:y,theirProps:m,slot:v,attrs:t,slots:n,name:"DisclosureButton"})}}}),id=o.defineComponent({name:"DisclosurePanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:null}},setup(e,{attrs:t,slots:n,expose:a}){let r=Ws("DisclosurePanel");o.onMounted(()=>{e.id!==null&&(r.panelId.value=e.id)}),o.onUnmounted(()=>{r.panelId.value=null}),a({el:r.panel,$el:r.panel}),o.provide(ad,r.panelId);let i=Io(),s=o.computed(()=>i!==null?(i.value&Ve.Open)===Ve.Open:r.disclosureState.value===0);return()=>{var l;let c={open:r.disclosureState.value===0,close:r.close},{id:d,...f}=e,p={id:(l=r.panelId.value)!=null?l:d,ref:r.panel};return Be({ourProps:p,theirProps:f,slot:c,attrs:t,slots:n,features:At.RenderStrategy|At.Static,visible:s.value,name:"DisclosurePanel"})}}}),ld=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function cd(e){var t,n;let a=(t=e.innerText)!=null?t:"",r=e.cloneNode(!0);if(!(r instanceof HTMLElement))return a;let i=!1;for(let l of r.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))l.remove(),i=!0;let s=i?(n=r.innerText)!=null?n:"":a;return ld.test(s)&&(s=s.replace(ld,"")),s}function ob(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let a=n.split(" ").map(r=>{let i=document.getElementById(r);if(i){let s=i.getAttribute("aria-label");return typeof s=="string"?s.trim():cd(i).trim()}return null}).filter(Boolean);if(a.length>0)return a.join(", ")}return cd(e).trim()}function ab(e){let t=o.ref(""),n=o.ref("");return()=>{let a=ae(e);if(!a)return"";let r=a.innerText;if(t.value===r)return n.value;let i=ob(a).trim().toLowerCase();return t.value=r,n.value=i,i}}var rb=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(rb||{}),sb=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(sb||{});function ib(e){requestAnimationFrame(()=>requestAnimationFrame(e))}let dd=Symbol("MenuContext");function dr(e){let t=o.inject(dd,null);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,dr),n}return t}let Ks=o.defineComponent({name:"Menu",props:{as:{type:[Object,String],default:"template"}},setup(e,{slots:t,attrs:n}){let a=o.ref(1),r=o.ref(null),i=o.ref(null),s=o.ref([]),l=o.ref(""),c=o.ref(null),d=o.ref(1);function f(h=v=>v){let v=c.value!==null?s.value[c.value]:null,u=Ps(h(s.value.slice()),y=>ae(y.dataRef.domRef)),m=v?u.indexOf(v):null;return m===-1&&(m=null),{items:u,activeItemIndex:m}}let p={menuState:a,buttonRef:r,itemsRef:i,items:s,searchQuery:l,activeItemIndex:c,activationTrigger:d,closeMenu:()=>{a.value=1,c.value=null},openMenu:()=>a.value=0,goToItem(h,v,u){let m=f(),y=Ls(h===Ae.Specific?{focus:Ae.Specific,id:v}:{focus:h},{resolveItems:()=>m.items,resolveActiveIndex:()=>m.activeItemIndex,resolveId:b=>b.id,resolveDisabled:b=>b.dataRef.disabled});l.value="",c.value=y,d.value=u??1,s.value=m.items},search(h){let v=l.value!==""?0:1;l.value+=h.toLowerCase();let u=(c.value!==null?s.value.slice(c.value+v).concat(s.value.slice(0,c.value+v)):s.value).find(y=>y.dataRef.textValue.startsWith(l.value)&&!y.dataRef.disabled),m=u?s.value.indexOf(u):-1;m===-1||m===c.value||(c.value=m,d.value=1)},clearSearch(){l.value=""},registerItem(h,v){let u=f(m=>[...m,{id:h,dataRef:v}]);s.value=u.items,c.value=u.activeItemIndex,d.value=1},unregisterItem(h){let v=f(u=>{let m=u.findIndex(y=>y.id===h);return m!==-1&&u.splice(m,1),u});s.value=v.items,c.value=v.activeItemIndex,d.value=1}};return Bs([r,i],(h,v)=>{var u;p.closeMenu(),Rs(v,Ds.Loose)||(h.preventDefault(),(u=ae(r))==null||u.focus())},o.computed(()=>a.value===0)),o.provide(dd,p),ir(o.computed(()=>tt(a.value,{0:Ve.Open,1:Ve.Closed}))),()=>{let h={open:a.value===0,close:p.closeMenu};return Be({ourProps:{},theirProps:e,slot:h,slots:t,attrs:n,name:"Menu"})}}}),Xs=o.defineComponent({name:"MenuButton",props:{disabled:{type:Boolean,default:!1},as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(e,{attrs:t,slots:n,expose:a}){var r;let i=(r=e.id)!=null?r:`headlessui-menu-button-${dt()}`,s=dr("MenuButton");a({el:s.buttonRef,$el:s.buttonRef});function l(p){switch(p.key){case Oe.Space:case Oe.Enter:case Oe.ArrowDown:p.preventDefault(),p.stopPropagation(),s.openMenu(),o.nextTick(()=>{var h;(h=ae(s.itemsRef))==null||h.focus({preventScroll:!0}),s.goToItem(Ae.First)});break;case Oe.ArrowUp:p.preventDefault(),p.stopPropagation(),s.openMenu(),o.nextTick(()=>{var h;(h=ae(s.itemsRef))==null||h.focus({preventScroll:!0}),s.goToItem(Ae.Last)});break}}function c(p){switch(p.key){case Oe.Space:p.preventDefault();break}}function d(p){e.disabled||(s.menuState.value===0?(s.closeMenu(),o.nextTick(()=>{var h;return(h=ae(s.buttonRef))==null?void 0:h.focus({preventScroll:!0})})):(p.preventDefault(),s.openMenu(),ib(()=>{var h;return(h=ae(s.itemsRef))==null?void 0:h.focus({preventScroll:!0})})))}let f=Ms(o.computed(()=>({as:e.as,type:t.type})),s.buttonRef);return()=>{var p;let h={open:s.menuState.value===0},{...v}=e,u={ref:s.buttonRef,id:i,type:f.value,"aria-haspopup":"menu","aria-controls":(p=ae(s.itemsRef))==null?void 0:p.id,"aria-expanded":s.menuState.value===0,onKeydown:l,onKeyup:c,onClick:d};return Be({ourProps:u,theirProps:v,slot:h,attrs:t,slots:n,name:"MenuButton"})}}}),Ys=o.defineComponent({name:"MenuItems",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:null}},setup(e,{attrs:t,slots:n,expose:a}){var r;let i=(r=e.id)!=null?r:`headlessui-menu-items-${dt()}`,s=dr("MenuItems"),l=o.ref(null);a({el:s.itemsRef,$el:s.itemsRef}),Pc({container:o.computed(()=>ae(s.itemsRef)),enabled:o.computed(()=>s.menuState.value===0),accept(h){return h.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:h.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(h){h.setAttribute("role","none")}});function c(h){var v;switch(l.value&&clearTimeout(l.value),h.key){case Oe.Space:if(s.searchQuery.value!=="")return h.preventDefault(),h.stopPropagation(),s.search(h.key);case Oe.Enter:if(h.preventDefault(),h.stopPropagation(),s.activeItemIndex.value!==null){let u=s.items.value[s.activeItemIndex.value];(v=ae(u.dataRef.domRef))==null||v.click()}s.closeMenu(),Nc(ae(s.buttonRef));break;case Oe.ArrowDown:return h.preventDefault(),h.stopPropagation(),s.goToItem(Ae.Next);case Oe.ArrowUp:return h.preventDefault(),h.stopPropagation(),s.goToItem(Ae.Previous);case Oe.Home:case Oe.PageUp:return h.preventDefault(),h.stopPropagation(),s.goToItem(Ae.First);case Oe.End:case Oe.PageDown:return h.preventDefault(),h.stopPropagation(),s.goToItem(Ae.Last);case Oe.Escape:h.preventDefault(),h.stopPropagation(),s.closeMenu(),o.nextTick(()=>{var u;return(u=ae(s.buttonRef))==null?void 0:u.focus({preventScroll:!0})});break;case Oe.Tab:h.preventDefault(),h.stopPropagation(),s.closeMenu(),o.nextTick(()=>vg(ae(s.buttonRef),h.shiftKey?$t.Previous:$t.Next));break;default:h.key.length===1&&(s.search(h.key),l.value=setTimeout(()=>s.clearSearch(),350));break}}function d(h){switch(h.key){case Oe.Space:h.preventDefault();break}}let f=Io(),p=o.computed(()=>f!==null?(f.value&Ve.Open)===Ve.Open:s.menuState.value===0);return()=>{var h,v;let u={open:s.menuState.value===0},{...m}=e,y={"aria-activedescendant":s.activeItemIndex.value===null||(h=s.items.value[s.activeItemIndex.value])==null?void 0:h.id,"aria-labelledby":(v=ae(s.buttonRef))==null?void 0:v.id,id:i,onKeydown:c,onKeyup:d,role:"menu",tabIndex:0,ref:s.itemsRef};return Be({ourProps:y,theirProps:m,slot:u,attrs:t,slots:n,features:At.RenderStrategy|At.Static,visible:p.value,name:"MenuItems"})}}}),Sa=o.defineComponent({name:"MenuItem",inheritAttrs:!1,props:{as:{type:[Object,String],default:"template"},disabled:{type:Boolean,default:!1},id:{type:String,default:null}},setup(e,{slots:t,attrs:n,expose:a}){var r;let i=(r=e.id)!=null?r:`headlessui-menu-item-${dt()}`,s=dr("MenuItem"),l=o.ref(null);a({el:l,$el:l});let c=o.computed(()=>s.activeItemIndex.value!==null?s.items.value[s.activeItemIndex.value].id===i:!1),d=ab(l),f=o.computed(()=>({disabled:e.disabled,get textValue(){return d()},domRef:l}));o.onMounted(()=>s.registerItem(i,f)),o.onUnmounted(()=>s.unregisterItem(i)),o.watchEffect(()=>{s.menuState.value===0&&c.value&&s.activationTrigger.value!==0&&o.nextTick(()=>{var b,g;return(g=(b=ae(l))==null?void 0:b.scrollIntoView)==null?void 0:g.call(b,{block:"nearest"})})});function p(b){if(e.disabled)return b.preventDefault();s.closeMenu(),Nc(ae(s.buttonRef))}function h(){if(e.disabled)return s.goToItem(Ae.Nothing);s.goToItem(Ae.Specific,i)}let v=Rc();function u(b){v.update(b)}function m(b){v.wasMoved(b)&&(e.disabled||c.value||s.goToItem(Ae.Specific,i,0))}function y(b){v.wasMoved(b)&&(e.disabled||c.value&&s.goToItem(Ae.Nothing))}return()=>{let{disabled:b,...g}=e,T={active:c.value,disabled:b,close:s.closeMenu};return Be({ourProps:{id:i,ref:l,role:"menuitem",tabIndex:b===!0?void 0:-1,"aria-disabled":b===!0?!0:void 0,onClick:p,onFocus:h,onPointerenter:u,onMouseenter:u,onPointermove:m,onMousemove:m,onPointerleave:y,onMouseleave:y},theirProps:{...n,...g},slot:T,attrs:n,slots:t,name:"MenuItem"})}}});function lb(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function Js(e,...t){e&&t.length>0&&e.classList.add(...t)}function ur(e,...t){e&&t.length>0&&e.classList.remove(...t)}var Qs=(e=>(e.Finished="finished",e.Cancelled="cancelled",e))(Qs||{});function cb(e,t){let n=kn();if(!e)return n.dispose;let{transitionDuration:a,transitionDelay:r}=getComputedStyle(e),[i,s]=[a,r].map(l=>{let[c=0]=l.split(",").filter(Boolean).map(d=>d.includes("ms")?parseFloat(d):parseFloat(d)*1e3).sort((d,f)=>f-d);return c});return i!==0?n.setTimeout(()=>t("finished"),i+s):t("finished"),n.add(()=>t("cancelled")),n.dispose}function ud(e,t,n,a,r,i){let s=kn(),l=i!==void 0?lb(i):()=>{};return ur(e,...r),Js(e,...t,...n),s.nextFrame(()=>{ur(e,...n),Js(e,...a),s.add(cb(e,c=>(ur(e,...a,...t),Js(e,...r),l(c))))}),s.add(()=>ur(e,...t,...n,...a,...r)),s.add(()=>l("cancelled")),s.dispose}function Zn(e=""){return e.split(/\s+/).filter(t=>t.length>1)}let Zs=Symbol("TransitionContext");var db=(e=>(e.Visible="visible",e.Hidden="hidden",e))(db||{});function ub(){return o.inject(Zs,null)!==null}function fb(){let e=o.inject(Zs,null);if(e===null)throw new Error("A is used but it is missing a parent .");return e}function pb(){let e=o.inject(qs,null);if(e===null)throw new Error("A is used but it is missing a parent .");return e}let qs=Symbol("NestingContext");function fr(e){return"children"in e?fr(e.children):e.value.filter(({state:t})=>t==="visible").length>0}function fd(e){let t=o.ref([]),n=o.ref(!1);o.onMounted(()=>n.value=!0),o.onUnmounted(()=>n.value=!1);function a(i,s=_n.Hidden){let l=t.value.findIndex(({id:c})=>c===i);l!==-1&&(tt(s,{[_n.Unmount](){t.value.splice(l,1)},[_n.Hidden](){t.value[l].state="hidden"}}),!fr(t)&&n.value&&e?.())}function r(i){let s=t.value.find(({id:l})=>l===i);return s?s.state!=="visible"&&(s.state="visible"):t.value.push({id:i,state:"visible"}),()=>a(i,_n.Unmount)}return{children:t,register:r,unregister:a}}let pd=At.RenderStrategy,An=o.defineComponent({props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:n,slots:a,expose:r}){let i=o.ref(0);function s(){i.value|=Ve.Opening,t("beforeEnter")}function l(){i.value&=~Ve.Opening,t("afterEnter")}function c(){i.value|=Ve.Closing,t("beforeLeave")}function d(){i.value&=~Ve.Closing,t("afterLeave")}if(!ub()&&Eg())return()=>o.h(Oa,{...e,onBeforeEnter:s,onAfterEnter:l,onBeforeLeave:c,onAfterLeave:d},a);let f=o.ref(null),p=o.computed(()=>e.unmount?_n.Unmount:_n.Hidden);r({el:f,$el:f});let{show:h,appear:v}=fb(),{register:u,unregister:m}=pb(),y=o.ref(h.value?"visible":"hidden"),b={value:!0},g=dt(),T={value:!1},O=fd(()=>{!T.value&&y.value!=="hidden"&&(y.value="hidden",m(g),d())});o.onMounted(()=>{let B=u(g);o.onUnmounted(B)}),o.watchEffect(()=>{if(p.value===_n.Hidden&&g){if(h.value&&y.value!=="visible"){y.value="visible";return}tt(y.value,{hidden:()=>m(g),visible:()=>u(g)})}});let S=Zn(e.enter),N=Zn(e.enterFrom),I=Zn(e.enterTo),_=Zn(e.entered),A=Zn(e.leave),D=Zn(e.leaveFrom),M=Zn(e.leaveTo);o.onMounted(()=>{o.watchEffect(()=>{if(y.value==="visible"){let B=ae(f);if(B instanceof Comment&&B.data==="")throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}})});function K(B){let j=b.value&&!v.value,H=ae(f);!H||!(H instanceof HTMLElement)||j||(T.value=!0,h.value&&s(),h.value||c(),B(h.value?ud(H,S,N,I,_,W=>{T.value=!1,W===Qs.Finished&&l()}):ud(H,A,D,M,_,W=>{T.value=!1,W===Qs.Finished&&(fr(O)||(y.value="hidden",m(g),d()))})))}return o.onMounted(()=>{o.watch([h],(B,j,H)=>{K(H),b.value=!1},{immediate:!0})}),o.provide(qs,O),ir(o.computed(()=>tt(y.value,{visible:Ve.Open,hidden:Ve.Closed})|i.value)),()=>{let{appear:B,show:j,enter:H,enterFrom:W,enterTo:Q,entered:ne,leave:we,leaveFrom:Ze,leaveTo:se,...fe}=e,ye={ref:f},Se={...fe,...v.value&&h.value&&ma.isServer?{class:o.normalizeClass([n.class,fe.class,...S,...N])}:{}};return Be({theirProps:Se,ourProps:ye,slot:{},slots:a,attrs:n,features:pd,visible:y.value==="visible",name:"TransitionChild"})}}}),hb=An,Oa=o.defineComponent({inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:n,slots:a}){let r=Io(),i=o.computed(()=>e.show===null&&r!==null?(r.value&Ve.Open)===Ve.Open:e.show);o.watchEffect(()=>{if(![!0,!1].includes(i.value))throw new Error('A is used but it is missing a `:show="true | false"` prop.')});let s=o.ref(i.value?"visible":"hidden"),l=fd(()=>{s.value="hidden"}),c=o.ref(!0),d={show:i,appear:o.computed(()=>e.appear||!c.value)};return o.onMounted(()=>{o.watchEffect(()=>{c.value=!1,i.value?s.value="visible":fr(l)||(s.value="hidden")})}),o.provide(qs,l),o.provide(Zs,d),()=>{let f=ga(e,["show","appear","unmount","onBeforeEnter","onBeforeLeave","onAfterEnter","onAfterLeave"]),p={unmount:e.unmount};return Be({ourProps:{...p,as:"template"},theirProps:{},slot:{},slots:{...a,default:()=>[o.h(hb,{onBeforeEnter:()=>t("beforeEnter"),onAfterEnter:()=>t("afterEnter"),onBeforeLeave:()=>t("beforeLeave"),onAfterLeave:()=>t("afterLeave"),...n,...p,...f},a.default)]},attrs:{},features:pd,visible:s.value==="visible",name:"Transition"})}}});const mb={},vb={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},gb=[o.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),o.createElementVNode("path",{d:"M8 5v10a1 1 0 0 0 1 1h10"},null,-1),o.createElementVNode("path",{d:"M5 8h10a1 1 0 0 1 1 1v10"},null,-1)];function bb(e,t){return o.openBlock(),o.createElementBlock("svg",vb,gb)}const hd=is(mb,[["render",bb]]),it=o.defineComponent({__name:"IconButton",props:{variant:{default:"secondary"},type:{default:"button"},asAnchor:{type:Boolean,default:!1},download:{}},setup(e){const t={primary:"bg-blue-500 text-white focus:outline-blue-500",secondary:"bg-gray-300 dark:bg-gray-700 text-gray-800 dark:text-gray-200 focus:outline-blue-500",danger:"bg-red-500 text-white focus:outline-red-500",success:"bg-green-500 text-white focus:outline-green-500",transparent:"bg-transparent text-gray-800 dark:text-gray-100"},n=e,a=o.computed(()=>t[n.variant]);return(r,i)=>(o.openBlock(),o.createBlock(o.resolveDynamicComponent(r.asAnchor?"a":"button"),{class:o.normalizeClass(`inline-flex items-center rounded-full border-0 p-2 shadow-sm focus:outline-none focus:ring-1 hover:opacity-75 disabled:opacity-25 ${a.value}`),type:r.asAnchor?void 0:r.type??"button",download:r.download??null},{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},8,["class","type","download"]))}}),yb=o.createElementVNode("div",{class:"fixed inset-0 bg-gray-800/20 backdrop-blur-sm transition-opacity"},null,-1),Eb={class:"flex items-end sm:items-center justify-center min-h-full p-0 md:p-4"},_o=o.defineComponent({__name:"BaseModal",props:{name:{},initialFocusRef:{}},setup(e){const t=e;o.onBeforeUnmount(()=>{r.value&&i()});const n=Re(),a=o.computed(()=>n.dark),r=o.computed(()=>n.isOpen(t.name)),i=()=>{n.closeModal({name:t.name})};return(s,l)=>(o.openBlock(),o.createBlock(o.unref(Oa),{show:r.value,as:"template",class:"nova-file-manager"},{default:o.withCtx(()=>[o.createVNode(o.unref(cr),{as:"div",class:"relative z-[60]",style:{"z-index":"999"},onClose:i,"initial-focus":s.initialFocusRef},{default:o.withCtx(()=>[o.createVNode(o.unref(An),{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"ease-in duration-200","leave-from":"opacity-100","leave-to":"opacity-0"},{default:o.withCtx(()=>[yb]),_:1}),o.createElementVNode("div",{class:o.normalizeClass([{dark:a.value},"fixed z-10 inset-0 overflow-y-auto"])},[o.createElementVNode("div",Eb,[o.createVNode(o.unref(An),{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95","enter-to":"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200","leave-from":"opacity-100 translate-y-0 sm:scale-100","leave-to":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"},{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default",{close:i,isOpen:r.value,dark:a.value})]),_:3})])],2)]),_:3},8,["initial-focus"])]),_:3},8,["show"]))}});var md={},vd={exports:{}};/*! +`));let v=Fc((s=p.props)!=null?s:{},c,f),u=o.cloneVNode(p,v,!0);for(let m in v)m.startsWith("on")&&(u.props||(u.props={}),u.props[m]=v[m]);return u}return Array.isArray(d)&&d.length===1?d[0]:d}return o.h(l,Object.assign({},c,f),{default:()=>d})}function Bc(e){return e.flatMap(t=>t.type===o.Fragment?Bc(t.children):[t])}function Fc(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let a of e)for(let r in a)r.startsWith("on")&&typeof a[r]=="function"?(n[r]!=null||(n[r]=[]),n[r].push(a[r])):t[r]=a[r];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(a=>[a,void 0])));for(let a in n)Object.assign(t,{[a](r,...i){let s=n[a];for(let l of s){if(r instanceof Event&&r.defaultPrevented)return;l(r,...i)}}});return t}function yg(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function ga(e,t=[]){let n=Object.assign({},e);for(let a of t)a in n&&delete n[a];return n}function bg(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}var ya=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(ya||{});let sr=o.defineComponent({name:"Hidden",props:{as:{type:[Object,String],default:"div"},features:{type:Number,default:1}},setup(e,{slots:t,attrs:n}){return()=>{var a;let{features:r,...i}=e,s={"aria-hidden":(r&2)===2?!0:(a=i["aria-hidden"])!=null?a:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return Be({ourProps:s,theirProps:i,slot:{},attrs:n,slots:t,name:"Hidden"})}}}),_c=Symbol("Context");var je=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(je||{});function wg(){return Do()!==null}function Do(){return o.inject(_c,null)}function ir(e){o.provide(_c,e)}var Ce=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Ce||{}),Lc=(e=>(e[e.Left=0]="Left",e[e.Right=2]="Right",e))(Lc||{});function xg(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let dn=[];xg(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&dn[0]!==t.target&&(dn.unshift(t.target),dn=dn.filter(n=>n!=null&&n.isConnected),dn.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function Eg(e){throw new Error("Unexpected object: "+e)}var Ie=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(Ie||{});function Ls(e,t){let n=t.resolveItems();if(n.length<=0)return null;let a=t.resolveActiveIndex(),r=a??-1;switch(e.focus){case 0:{for(let i=0;i=0;--i)if(!t.resolveDisabled(n[i],i,n))return i;return a}case 2:{for(let i=r+1;i=0;--i)if(!t.resolveDisabled(n[i],i,n))return i;return a}case 4:{for(let i=0;i(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Og||{}),Tg=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Tg||{}),kg=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(kg||{});let zc=Symbol("ComboboxContext");function Zn(e){let t=o.inject(zc,null);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Zn),n}return t}let Hc=Symbol("VirtualContext"),Ng=o.defineComponent({name:"VirtualProvider",setup(e,{slots:t}){let n=Zn("VirtualProvider"),a=o.computed(()=>{let l=ae(n.optionsRef);if(!l)return{start:0,end:0};let c=window.getComputedStyle(l);return{start:parseFloat(c.paddingBlockStart||c.paddingTop),end:parseFloat(c.paddingBlockEnd||c.paddingBottom)}}),r=og(o.computed(()=>({scrollPaddingStart:a.value.start,scrollPaddingEnd:a.value.end,count:n.virtual.value.options.length,estimateSize(){return 40},getScrollElement(){return ae(n.optionsRef)},overscan:12}))),i=o.computed(()=>{var l;return(l=n.virtual.value)==null?void 0:l.options}),s=o.ref(0);return o.watch([i],()=>{s.value+=1}),o.provide(Hc,n.virtual.value?r:null),()=>[o.h("div",{style:{position:"relative",width:"100%",height:`${r.value.getTotalSize()}px`},ref:l=>{if(l){if(typeof process<"u"&&Sg.JEST_WORKER_ID!==void 0||n.activationTrigger.value===0)return;n.activeOptionIndex.value!==null&&n.virtual.value.options.length>n.activeOptionIndex.value&&r.value.scrollToIndex(n.activeOptionIndex.value)}}},r.value.getVirtualItems().map(l=>o.cloneVNode(t.default({option:n.virtual.value.options[l.index],open:n.comboboxState.value===0})[0],{key:`${s.value}-${l.index}`,"data-index":l.index,"aria-setsize":n.virtual.value.options.length,"aria-posinset":l.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${l.start}px)`,overflowAnchor:"none"}})))]}}),Dg=o.defineComponent({name:"Combobox",emits:{"update:modelValue":e=>!0},props:{as:{type:[Object,String],default:"template"},disabled:{type:[Boolean],default:!1},by:{type:[String,Function],nullable:!0,default:null},modelValue:{type:[Object,String,Number,Boolean],default:void 0},defaultValue:{type:[Object,String,Number,Boolean],default:void 0},form:{type:String,optional:!0},name:{type:String,optional:!0},nullable:{type:Boolean,default:!1},multiple:{type:[Boolean],default:!1},immediate:{type:[Boolean],default:!1},virtual:{type:Object,default:null}},inheritAttrs:!1,setup(e,{slots:t,attrs:n,emit:a}){let r=o.ref(1),i=o.ref(null),s=o.ref(null),l=o.ref(null),c=o.ref(null),d=o.ref({static:!1,hold:!1}),f=o.ref([]),p=o.ref(null),h=o.ref(2),v=o.ref(!1);function u(R=F=>F){let F=p.value!==null?f.value[p.value]:null,K=R(f.value.slice()),B=K.length>0&&K[0].dataRef.order.value!==null?K.sort((z,W)=>z.dataRef.order.value-W.dataRef.order.value):Ms(K,z=>ae(z.dataRef.domRef)),V=F?B.indexOf(F):null;return V===-1&&(V=null),{options:B,activeOptionIndex:V}}let m=o.computed(()=>e.multiple?1:0),b=o.computed(()=>e.nullable),[y,g]=ag(o.computed(()=>e.modelValue),R=>a("update:modelValue",R),o.computed(()=>e.defaultValue)),O=o.computed(()=>y.value===void 0?tt(m.value,{1:[],0:void 0}):y.value),C=null,S=null;function k(R){return tt(m.value,{0(){return g?.(R)},1:()=>{let F=o.toRaw(A.value.value).slice(),K=o.toRaw(R),B=F.findIndex(V=>A.compare(K,o.toRaw(V)));return B===-1?F.push(K):F.splice(B,1),g?.(F)}})}let D=o.computed(()=>{});o.watch([D],([R],[F])=>{if(A.virtual.value&&R&&F&&p.value!==null){let K=R.indexOf(F[p.value]);K!==-1?p.value=K:p.value=null}});let A={comboboxState:r,value:O,mode:m,compare(R,F){if(typeof e.by=="string"){let K=e.by;return R?.[K]===F?.[K]}return e.by===null?Cg(R,F):e.by(R,F)},calculateIndex(R){return A.virtual.value?e.by===null?A.virtual.value.options.indexOf(R):A.virtual.value.options.findIndex(F=>A.compare(F,R)):f.value.findIndex(F=>A.compare(F.dataRef.value,R))},defaultValue:o.computed(()=>e.defaultValue),nullable:b,immediate:o.computed(()=>!1),virtual:o.computed(()=>null),inputRef:s,labelRef:i,buttonRef:l,optionsRef:c,disabled:o.computed(()=>e.disabled),options:f,change(R){g(R)},activeOptionIndex:o.computed(()=>{if(v.value&&p.value===null&&(A.virtual.value?A.virtual.value.options.length>0:f.value.length>0)){if(A.virtual.value){let F=A.virtual.value.options.findIndex(K=>{var B;return!((B=A.virtual.value)!=null&&B.disabled(K))});if(F!==-1)return F}let R=f.value.findIndex(F=>!F.dataRef.disabled);if(R!==-1)return R}return p.value}),activationTrigger:h,optionsPropsRef:d,closeCombobox(){v.value=!1,!e.disabled&&r.value!==1&&(r.value=1,p.value=null)},openCombobox(){if(v.value=!0,!e.disabled&&r.value!==0){if(A.value.value){let R=A.calculateIndex(A.value.value);R!==-1&&(p.value=R)}r.value=0}},setActivationTrigger(R){h.value=R},goToOption(R,F,K){v.value=!1,C!==null&&cancelAnimationFrame(C),C=requestAnimationFrame(()=>{if(e.disabled||c.value&&!d.value.static&&r.value===1)return;if(A.virtual.value){p.value=R===Ie.Specific?F:Ls({focus:R},{resolveItems:()=>A.virtual.value.options,resolveActiveIndex:()=>{var z,W;return(W=(z=A.activeOptionIndex.value)!=null?z:A.virtual.value.options.findIndex(J=>{var ne;return!((ne=A.virtual.value)!=null&&ne.disabled(J))}))!=null?W:null},resolveDisabled:z=>A.virtual.value.disabled(z),resolveId(){throw new Error("Function not implemented.")}}),h.value=K??2;return}let B=u();if(B.activeOptionIndex===null){let z=B.options.findIndex(W=>!W.dataRef.disabled);z!==-1&&(B.activeOptionIndex=z)}let V=R===Ie.Specific?F:Ls({focus:R},{resolveItems:()=>B.options,resolveActiveIndex:()=>B.activeOptionIndex,resolveId:z=>z.id,resolveDisabled:z=>z.dataRef.disabled});p.value=V,h.value=K??2,f.value=B.options})},selectOption(R){let F=f.value.find(B=>B.id===R);if(!F)return;let{dataRef:K}=F;k(K.value)},selectActiveOption(){if(A.activeOptionIndex.value!==null){if(A.virtual.value)k(A.virtual.value.options[A.activeOptionIndex.value]);else{let{dataRef:R}=f.value[A.activeOptionIndex.value];k(R.value)}A.goToOption(Ie.Specific,A.activeOptionIndex.value)}},registerOption(R,F){let K=o.reactive({id:R,dataRef:F});if(A.virtual.value){f.value.push(K);return}S&&cancelAnimationFrame(S);let B=u(V=>(V.push(K),V));p.value===null&&A.isSelected(F.value.value)&&(B.activeOptionIndex=B.options.indexOf(K)),f.value=B.options,p.value=B.activeOptionIndex,h.value=2,B.options.some(V=>!ae(V.dataRef.domRef))&&(S=requestAnimationFrame(()=>{let V=u();f.value=V.options,p.value=V.activeOptionIndex}))},unregisterOption(R,F){if(C!==null&&cancelAnimationFrame(C),F&&(v.value=!0),A.virtual.value){f.value=f.value.filter(B=>B.id!==R);return}let K=u(B=>{let V=B.findIndex(z=>z.id===R);return V!==-1&&B.splice(V,1),B});f.value=K.options,p.value=K.activeOptionIndex,h.value=2},isSelected(R){return tt(m.value,{0:()=>A.compare(o.toRaw(A.value.value),o.toRaw(R)),1:()=>o.toRaw(A.value.value).some(F=>A.compare(o.toRaw(F),o.toRaw(R)))})},isActive(R){return p.value===A.calculateIndex(R)}};Bs([s,l,c],()=>A.closeCombobox(),o.computed(()=>r.value===0)),o.provide(zc,A),ir(o.computed(()=>tt(r.value,{0:je.Open,1:je.Closed})));let I=o.computed(()=>{var R;return(R=ae(s))==null?void 0:R.closest("form")});return o.onMounted(()=>{o.watch([I],()=>{if(!I.value||e.defaultValue===void 0)return;function R(){A.change(e.defaultValue)}return I.value.addEventListener("reset",R),()=>{var F;(F=I.value)==null||F.removeEventListener("reset",R)}},{immediate:!0})}),()=>{var R,F,K;let{name:B,disabled:V,form:z,...W}=e,J={open:r.value===0,disabled:V,activeIndex:A.activeOptionIndex.value,activeOption:A.activeOptionIndex.value===null?null:A.virtual.value?A.virtual.value.options[(R=A.activeOptionIndex.value)!=null?R:0]:(K=(F=A.options.value[A.activeOptionIndex.value])==null?void 0:F.dataRef.value)!=null?K:null,value:O.value};return o.h(o.Fragment,[...B!=null&&O.value!=null?Vc({[B]:O.value}).map(([ne,xe])=>o.h(sr,yg({features:ya.Hidden,key:ne,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:z,disabled:V,name:ne,value:xe}))):[],Be({theirProps:{...n,...ga(W,["by","defaultValue","immediate","modelValue","multiple","nullable","onUpdate:modelValue","virtual"])},ourProps:{},slot:J,slots:t,attrs:n,name:"Combobox"})])}}});o.defineComponent({name:"ComboboxLabel",props:{as:{type:[Object,String],default:"label"},id:{type:String,default:null}},setup(e,{attrs:t,slots:n}){var a;let r=(a=e.id)!=null?a:`headlessui-combobox-label-${dt()}`,i=Zn("ComboboxLabel");function s(){var l;(l=ae(i.inputRef))==null||l.focus({preventScroll:!0})}return()=>{let l={open:i.comboboxState.value===0,disabled:i.disabled.value},{...c}=e,d={id:r,ref:i.labelRef,onClick:s};return Be({ourProps:d,theirProps:c,slot:l,attrs:t,slots:n,name:"ComboboxLabel"})}}}),o.defineComponent({name:"ComboboxButton",props:{as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(e,{attrs:t,slots:n,expose:a}){var r;let i=(r=e.id)!=null?r:`headlessui-combobox-button-${dt()}`,s=Zn("ComboboxButton");a({el:s.buttonRef,$el:s.buttonRef});function l(f){s.disabled.value||(s.comboboxState.value===0?s.closeCombobox():(f.preventDefault(),s.openCombobox()),o.nextTick(()=>{var p;return(p=ae(s.inputRef))==null?void 0:p.focus({preventScroll:!0})}))}function c(f){switch(f.key){case Ce.ArrowDown:f.preventDefault(),f.stopPropagation(),s.comboboxState.value===1&&s.openCombobox(),o.nextTick(()=>{var p;return(p=s.inputRef.value)==null?void 0:p.focus({preventScroll:!0})});return;case Ce.ArrowUp:f.preventDefault(),f.stopPropagation(),s.comboboxState.value===1&&(s.openCombobox(),o.nextTick(()=>{s.value.value||s.goToOption(Ie.Last)})),o.nextTick(()=>{var p;return(p=s.inputRef.value)==null?void 0:p.focus({preventScroll:!0})});return;case Ce.Escape:if(s.comboboxState.value!==0)return;f.preventDefault(),s.optionsRef.value&&!s.optionsPropsRef.value.static&&f.stopPropagation(),s.closeCombobox(),o.nextTick(()=>{var p;return(p=s.inputRef.value)==null?void 0:p.focus({preventScroll:!0})});return}}let d=Fs(o.computed(()=>({as:e.as,type:t.type})),s.buttonRef);return()=>{var f,p;let h={open:s.comboboxState.value===0,disabled:s.disabled.value,value:s.value.value},{...v}=e,u={ref:s.buttonRef,id:i,type:d.value,tabindex:"-1","aria-haspopup":"listbox","aria-controls":(f=ae(s.optionsRef))==null?void 0:f.id,"aria-expanded":s.comboboxState.value===0,"aria-labelledby":s.labelRef.value?[(p=ae(s.labelRef))==null?void 0:p.id,i].join(" "):void 0,disabled:s.disabled.value===!0?!0:void 0,onKeydown:c,onClick:l};return Be({ourProps:u,theirProps:v,slot:h,attrs:t,slots:n,name:"ComboboxButton"})}}});let Ag=o.defineComponent({name:"ComboboxInput",props:{as:{type:[Object,String],default:"input"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},displayValue:{type:Function},defaultValue:{type:String,default:void 0},id:{type:String,default:null}},emits:{change:e=>!0},setup(e,{emit:t,attrs:n,slots:a,expose:r}){var i;let s=(i=e.id)!=null?i:`headlessui-combobox-input-${dt()}`,l=Zn("ComboboxInput"),c=o.computed(()=>cn(ae(l.inputRef))),d={value:!1};r({el:l.inputRef,$el:l.inputRef});function f(){l.change(null);let S=ae(l.optionsRef);S&&(S.scrollTop=0),l.goToOption(Ie.Nothing)}let p=o.computed(()=>{var S;let k=l.value.value;return ae(l.inputRef)?typeof e.displayValue<"u"&&k!==void 0?(S=e.displayValue(k))!=null?S:"":typeof k=="string"?k:"":""});o.onMounted(()=>{o.watch([p,l.comboboxState,c],([S,k],[D,A])=>{if(d.value)return;let I=ae(l.inputRef);I&&((A===0&&k===1||S!==D)&&(I.value=S),requestAnimationFrame(()=>{var R;if(d.value||!I||((R=c.value)==null?void 0:R.activeElement)!==I)return;let{selectionStart:F,selectionEnd:K}=I;Math.abs((K??0)-(F??0))===0&&F===0&&I.setSelectionRange(I.value.length,I.value.length)}))},{immediate:!0}),o.watch([l.comboboxState],([S],[k])=>{if(S===0&&k===1){if(d.value)return;let D=ae(l.inputRef);if(!D)return;let A=D.value,{selectionStart:I,selectionEnd:R,selectionDirection:F}=D;D.value="",D.value=A,F!==null?D.setSelectionRange(I,R,F):D.setSelectionRange(I,R)}})});let h=o.ref(!1);function v(){h.value=!0}function u(){Nn().nextFrame(()=>{h.value=!1})}let m=sg();function b(S){switch(d.value=!0,m(()=>{d.value=!1}),S.key){case Ce.Enter:if(d.value=!1,l.comboboxState.value!==0||h.value)return;if(S.preventDefault(),S.stopPropagation(),l.activeOptionIndex.value===null){l.closeCombobox();return}l.selectActiveOption(),l.mode.value===0&&l.closeCombobox();break;case Ce.ArrowDown:return d.value=!1,S.preventDefault(),S.stopPropagation(),tt(l.comboboxState.value,{0:()=>l.goToOption(Ie.Next),1:()=>l.openCombobox()});case Ce.ArrowUp:return d.value=!1,S.preventDefault(),S.stopPropagation(),tt(l.comboboxState.value,{0:()=>l.goToOption(Ie.Previous),1:()=>{l.openCombobox(),o.nextTick(()=>{l.value.value||l.goToOption(Ie.Last)})}});case Ce.Home:if(S.shiftKey)break;return d.value=!1,S.preventDefault(),S.stopPropagation(),l.goToOption(Ie.First);case Ce.PageUp:return d.value=!1,S.preventDefault(),S.stopPropagation(),l.goToOption(Ie.First);case Ce.End:if(S.shiftKey)break;return d.value=!1,S.preventDefault(),S.stopPropagation(),l.goToOption(Ie.Last);case Ce.PageDown:return d.value=!1,S.preventDefault(),S.stopPropagation(),l.goToOption(Ie.Last);case Ce.Escape:if(d.value=!1,l.comboboxState.value!==0)return;S.preventDefault(),l.optionsRef.value&&!l.optionsPropsRef.value.static&&S.stopPropagation(),l.nullable.value&&l.mode.value===0&&l.value.value===null&&f(),l.closeCombobox();break;case Ce.Tab:if(d.value=!1,l.comboboxState.value!==0)return;l.mode.value===0&&l.activationTrigger.value!==1&&l.selectActiveOption(),l.closeCombobox();break}}function y(S){t("change",S),l.nullable.value&&l.mode.value===0&&S.target.value===""&&f(),l.openCombobox()}function g(S){var k,D,A;let I=(k=S.relatedTarget)!=null?k:dn.find(R=>R!==S.currentTarget);if(d.value=!1,!((D=ae(l.optionsRef))!=null&&D.contains(I))&&!((A=ae(l.buttonRef))!=null&&A.contains(I))&&l.comboboxState.value===0)return S.preventDefault(),l.mode.value===0&&(l.nullable.value&&l.value.value===null?f():l.activationTrigger.value!==1&&l.selectActiveOption()),l.closeCombobox()}function O(S){var k,D,A;let I=(k=S.relatedTarget)!=null?k:dn.find(R=>R!==S.currentTarget);(D=ae(l.buttonRef))!=null&&D.contains(I)||(A=ae(l.optionsRef))!=null&&A.contains(I)||l.disabled.value||l.immediate.value&&l.comboboxState.value!==0&&(l.openCombobox(),Nn().nextFrame(()=>{l.setActivationTrigger(1)}))}let C=o.computed(()=>{var S,k,D,A;return(A=(D=(k=e.defaultValue)!=null?k:l.defaultValue.value!==void 0?(S=e.displayValue)==null?void 0:S.call(e,l.defaultValue.value):null)!=null?D:l.defaultValue.value)!=null?A:""});return()=>{var S,k,D,A,I,R,F;let K={open:l.comboboxState.value===0},{displayValue:B,onChange:V,...z}=e,W={"aria-controls":(S=l.optionsRef.value)==null?void 0:S.id,"aria-expanded":l.comboboxState.value===0,"aria-activedescendant":l.activeOptionIndex.value===null?void 0:l.virtual.value?(k=l.options.value.find(J=>!l.virtual.value.disabled(J.dataRef.value)&&l.compare(J.dataRef.value,l.virtual.value.options[l.activeOptionIndex.value])))==null?void 0:k.id:(D=l.options.value[l.activeOptionIndex.value])==null?void 0:D.id,"aria-labelledby":(R=(A=ae(l.labelRef))==null?void 0:A.id)!=null?R:(I=ae(l.buttonRef))==null?void 0:I.id,"aria-autocomplete":"list",id:s,onCompositionstart:v,onCompositionend:u,onKeydown:b,onInput:y,onFocus:O,onBlur:g,role:"combobox",type:(F=n.type)!=null?F:"text",tabIndex:0,ref:l.inputRef,defaultValue:C.value,disabled:l.disabled.value===!0?!0:void 0};return Be({ourProps:W,theirProps:z,slot:K,attrs:n,slots:a,features:It.RenderStrategy|It.Static,name:"ComboboxInput"})}}}),Ig=o.defineComponent({name:"ComboboxOptions",props:{as:{type:[Object,String],default:"ul"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},hold:{type:[Boolean],default:!1}},setup(e,{attrs:t,slots:n,expose:a}){let r=Zn("ComboboxOptions"),i=`headlessui-combobox-options-${dt()}`;a({el:r.optionsRef,$el:r.optionsRef}),o.watchEffect(()=>{r.optionsPropsRef.value.static=e.static}),o.watchEffect(()=>{r.optionsPropsRef.value.hold=e.hold});let s=Do(),l=o.computed(()=>s!==null?(s.value&je.Open)===je.Open:r.comboboxState.value===0);Mc({container:o.computed(()=>ae(r.optionsRef)),enabled:o.computed(()=>r.comboboxState.value===0),accept(d){return d.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:d.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(d){d.setAttribute("role","none")}});function c(d){d.preventDefault()}return()=>{var d,f,p;let h={open:r.comboboxState.value===0},v={"aria-labelledby":(p=(d=ae(r.labelRef))==null?void 0:d.id)!=null?p:(f=ae(r.buttonRef))==null?void 0:f.id,id:i,ref:r.optionsRef,role:"listbox","aria-multiselectable":r.mode.value===1?!0:void 0,onMousedown:c},u=ga(e,["hold"]);return Be({ourProps:v,theirProps:u,slot:h,attrs:t,slots:r.virtual.value&&r.comboboxState.value===0?{...n,default:()=>[o.h(Ng,{},n.default)]}:n,features:It.RenderStrategy|It.Static,visible:l.value,name:"ComboboxOptions"})}}}),Gc=o.defineComponent({name:"ComboboxOption",props:{as:{type:[Object,String],default:"li"},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1},order:{type:[Number],default:null}},setup(e,{slots:t,attrs:n,expose:a}){let r=Zn("ComboboxOption"),i=`headlessui-combobox-option-${dt()}`,s=o.ref(null),l=o.computed(()=>e.disabled);a({el:s,$el:s});let c=o.computed(()=>{var g;return r.virtual.value?r.activeOptionIndex.value===r.calculateIndex(e.value):r.activeOptionIndex.value===null?!1:((g=r.options.value[r.activeOptionIndex.value])==null?void 0:g.id)===i}),d=o.computed(()=>r.isSelected(e.value)),f=o.inject(Hc,null),p=o.computed(()=>({disabled:e.disabled,value:e.value,domRef:s,order:o.computed(()=>e.order)}));o.onMounted(()=>r.registerOption(i,p)),o.onUnmounted(()=>r.unregisterOption(i,c.value)),o.watchEffect(()=>{let g=ae(s);g&&f?.value.measureElement(g)}),o.watchEffect(()=>{r.comboboxState.value===0&&c.value&&(r.virtual.value||r.activationTrigger.value!==0&&o.nextTick(()=>{var g,O;return(O=(g=ae(s))==null?void 0:g.scrollIntoView)==null?void 0:O.call(g,{block:"nearest"})}))});function h(g){g.preventDefault(),g.button===Lc.Left&&(l.value||(r.selectOption(i),Dc()||requestAnimationFrame(()=>{var O;return(O=ae(r.inputRef))==null?void 0:O.focus({preventScroll:!0})}),r.mode.value===0&&r.closeCombobox()))}function v(){var g;if(e.disabled||(g=r.virtual.value)!=null&&g.disabled(e.value))return r.goToOption(Ie.Nothing);let O=r.calculateIndex(e.value);r.goToOption(Ie.Specific,O)}let u=Pc();function m(g){u.update(g)}function b(g){var O;if(!u.wasMoved(g)||e.disabled||(O=r.virtual.value)!=null&&O.disabled(e.value)||c.value)return;let C=r.calculateIndex(e.value);r.goToOption(Ie.Specific,C,0)}function y(g){var O;u.wasMoved(g)&&(e.disabled||(O=r.virtual.value)!=null&&O.disabled(e.value)||c.value&&(r.optionsPropsRef.value.hold||r.goToOption(Ie.Nothing)))}return()=>{let{disabled:g}=e,O={active:c.value,selected:d.value,disabled:g},C={id:i,ref:s,role:"option",tabIndex:g===!0?void 0:-1,"aria-disabled":g===!0?!0:void 0,"aria-selected":d.value,disabled:void 0,onMousedown:h,onFocus:v,onPointerenter:m,onMouseenter:m,onPointermove:b,onMousemove:b,onPointerleave:y,onMouseleave:y},S=ga(e,["order","value"]);return Be({ourProps:C,theirProps:S,slot:O,attrs:n,slots:t,name:"ComboboxOption"})}}});function Wc(e,t,n,a){ma.isServer||o.watchEffect(r=>{e=e??window,e.addEventListener(t,n,a),r(()=>e.removeEventListener(t,n,a))})}var ba=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(ba||{});function Rg(){let e=o.ref(0);return Ac("keydown",t=>{t.key==="Tab"&&(e.value=t.shiftKey?1:0)}),e}function Kc(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.value){let a=ae(n);a instanceof HTMLElement&&t.add(a)}return t}var Xc=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(Xc||{});let wa=Object.assign(o.defineComponent({name:"FocusTrap",props:{as:{type:[Object,String],default:"div"},initialFocus:{type:Object,default:null},features:{type:Number,default:30},containers:{type:[Object,Function],default:o.ref(new Set)}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:a}){let r=o.ref(null);a({el:r,$el:r});let i=o.computed(()=>cn(r)),s=o.ref(!1);o.onMounted(()=>s.value=!0),o.onUnmounted(()=>s.value=!1),Mg({ownerDocument:i},o.computed(()=>s.value&&!!(e.features&16)));let l=Bg({ownerDocument:i,container:r,initialFocus:o.computed(()=>e.initialFocus)},o.computed(()=>s.value&&!!(e.features&2)));Fg({ownerDocument:i,container:r,containers:e.containers,previousActiveElement:l},o.computed(()=>s.value&&!!(e.features&8)));let c=Rg();function d(v){let u=ae(r);u&&(m=>m())(()=>{tt(c.value,{[ba.Forwards]:()=>{va(u,$t.First,{skipElements:[v.relatedTarget]})},[ba.Backwards]:()=>{va(u,$t.Last,{skipElements:[v.relatedTarget]})}})})}let f=o.ref(!1);function p(v){v.key==="Tab"&&(f.value=!0,requestAnimationFrame(()=>{f.value=!1}))}function h(v){if(!s.value)return;let u=Kc(e.containers);ae(r)instanceof HTMLElement&&u.add(ae(r));let m=v.relatedTarget;m instanceof HTMLElement&&m.dataset.headlessuiFocusGuard!=="true"&&(Yc(u,m)||(f.value?va(ae(r),tt(c.value,{[ba.Forwards]:()=>$t.Next,[ba.Backwards]:()=>$t.Previous})|$t.WrapAround,{relativeTo:v.target}):v.target instanceof HTMLElement&&Dn(v.target)))}return()=>{let v={},u={ref:r,onKeydown:p,onFocusout:h},{features:m,initialFocus:b,containers:y,...g}=e;return o.h(o.Fragment,[!!(m&4)&&o.h(sr,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:d,features:ya.Focusable}),Be({ourProps:u,theirProps:{...t,...g},slot:v,attrs:t,slots:n,name:"FocusTrap"}),!!(m&4)&&o.h(sr,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:d,features:ya.Focusable})])}}}),{features:Xc});function Pg(e){let t=o.ref(dn.slice());return o.watch([e],([n],[a])=>{a===!0&&n===!1?As(()=>{t.value.splice(0)}):a===!1&&n===!0&&(t.value=dn.slice())},{flush:"post"}),()=>{var n;return(n=t.value.find(a=>a!=null&&a.isConnected))!=null?n:null}}function Mg({ownerDocument:e},t){let n=Pg(t);o.onMounted(()=>{o.watchEffect(()=>{var a,r;t.value||((a=e.value)==null?void 0:a.activeElement)===((r=e.value)==null?void 0:r.body)&&Dn(n())},{flush:"post"})}),o.onUnmounted(()=>{t.value&&Dn(n())})}function Bg({ownerDocument:e,container:t,initialFocus:n},a){let r=o.ref(null),i=o.ref(!1);return o.onMounted(()=>i.value=!0),o.onUnmounted(()=>i.value=!1),o.onMounted(()=>{o.watch([t,n,a],(s,l)=>{if(s.every((d,f)=>l?.[f]===d)||!a.value)return;let c=ae(t);c&&As(()=>{var d,f;if(!i.value)return;let p=ae(n),h=(d=e.value)==null?void 0:d.activeElement;if(p){if(p===h){r.value=h;return}}else if(c.contains(h)){r.value=h;return}p?Dn(p):va(c,$t.First|$t.NoScroll)===Oc.Error&&console.warn("There are no focusable elements inside the "),r.value=(f=e.value)==null?void 0:f.activeElement})},{immediate:!0,flush:"post"})}),r}function Fg({ownerDocument:e,container:t,containers:n,previousActiveElement:a},r){var i;Wc((i=e.value)==null?void 0:i.defaultView,"focus",s=>{if(!r.value)return;let l=Kc(n);ae(t)instanceof HTMLElement&&l.add(ae(t));let c=a.value;if(!c)return;let d=s.target;d&&d instanceof HTMLElement?Yc(l,d)?(a.value=d,Dn(d)):(s.preventDefault(),s.stopPropagation(),Dn(c)):Dn(a.value)},!0)}function Yc(e,t){for(let n of e)if(n.contains(t))return!0;return!1}function _g(e){let t=o.shallowRef(e.getSnapshot());return o.onUnmounted(e.subscribe(()=>{t.value=e.getSnapshot()})),t}function Lg(e,t){let n=e(),a=new Set;return{getSnapshot(){return n},subscribe(r){return a.add(r),()=>a.delete(r)},dispatch(r,...i){let s=t[r].call(n,...i);s&&(n=s,a.forEach(l=>l()))}}}function Vg(){let e;return{before({doc:t}){var n;let a=t.documentElement;e=((n=t.defaultView)!=null?n:window).innerWidth-a.clientWidth},after({doc:t,d:n}){let a=t.documentElement,r=a.clientWidth-a.offsetWidth,i=e-r;n.style(a,"paddingRight",`${i}px`)}}}function jg(){return Nc()?{before({doc:e,d:t,meta:n}){function a(r){return n.containers.flatMap(i=>i()).some(i=>i.contains(r))}t.microTask(()=>{var r;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let l=Nn();l.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>l.dispose()))}let i=(r=window.scrollY)!=null?r:window.pageYOffset,s=null;t.addEventListener(e,"click",l=>{if(l.target instanceof HTMLElement)try{let c=l.target.closest("a");if(!c)return;let{hash:d}=new URL(c.href),f=e.querySelector(d);f&&!a(f)&&(s=f)}catch{}},!0),t.addEventListener(e,"touchstart",l=>{if(l.target instanceof HTMLElement)if(a(l.target)){let c=l.target;for(;c.parentElement&&a(c.parentElement);)c=c.parentElement;t.style(c,"overscrollBehavior","contain")}else t.style(l.target,"touchAction","none")}),t.addEventListener(e,"touchmove",l=>{if(l.target instanceof HTMLElement){if(l.target.tagName==="INPUT")return;if(a(l.target)){let c=l.target;for(;c.parentElement&&c.dataset.headlessuiPortal!==""&&!(c.scrollHeight>c.clientHeight||c.scrollWidth>c.clientWidth);)c=c.parentElement;c.dataset.headlessuiPortal===""&&l.preventDefault()}else l.preventDefault()}},{passive:!1}),t.add(()=>{var l;let c=(l=window.scrollY)!=null?l:window.pageYOffset;i!==c&&window.scrollTo(0,i),s&&s.isConnected&&(s.scrollIntoView({block:"nearest"}),s=null)})})}}:{}}function Ug(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function zg(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let Jn=Lg(()=>new Map,{PUSH(e,t){var n;let a=(n=this.get(e))!=null?n:{doc:e,count:0,d:Nn(),meta:new Set};return a.count++,a.meta.add(t),this.set(e,a),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let a={doc:e,d:t,meta:zg(n)},r=[jg(),Vg(),Ug()];r.forEach(({before:i})=>i?.(a)),r.forEach(({after:i})=>i?.(a))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});Jn.subscribe(()=>{let e=Jn.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let a=t.get(n.doc)==="hidden",r=n.count!==0;(r&&!a||!r&&a)&&Jn.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&Jn.dispatch("TEARDOWN",n)}});function Hg(e,t,n){let a=_g(Jn),r=o.computed(()=>{let i=e.value?a.value.get(e.value):void 0;return i?i.count>0:!1});return o.watch([e,t],([i,s],[l],c)=>{if(!i||!s)return;Jn.dispatch("PUSH",i,n);let d=!1;c(()=>{d||(Jn.dispatch("POP",l??i,n),d=!0)})},{immediate:!0}),r}let Vs=new Map,xa=new Map;function Zc(e,t=o.ref(!0)){o.watchEffect(n=>{var a;if(!t.value)return;let r=ae(e);if(!r)return;n(function(){var s;if(!r)return;let l=(s=xa.get(r))!=null?s:1;if(l===1?xa.delete(r):xa.set(r,l-1),l!==1)return;let c=Vs.get(r);c&&(c["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",c["aria-hidden"]),r.inert=c.inert,Vs.delete(r))});let i=(a=xa.get(r))!=null?a:0;xa.set(r,i+1),i===0&&(Vs.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0)})}function Gg({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){let a=o.ref(null),r=cn(a);function i(){var s,l,c;let d=[];for(let f of e)f!==null&&(f instanceof HTMLElement?d.push(f):"value"in f&&f.value instanceof HTMLElement&&d.push(f.value));if(t!=null&&t.value)for(let f of t.value)d.push(f);for(let f of(s=r?.querySelectorAll("html > *, body > *"))!=null?s:[])f!==document.body&&f!==document.head&&f instanceof HTMLElement&&f.id!=="headlessui-portal-root"&&(f.contains(ae(a))||f.contains((c=(l=ae(a))==null?void 0:l.getRootNode())==null?void 0:c.host)||d.some(p=>f.contains(p))||d.push(f));return d}return{resolveContainers:i,contains(s){return i().some(l=>l.contains(s))},mainTreeNodeRef:a,MainTreeNode(){return n!=null?null:o.h(sr,{features:ya.Hidden,ref:a})}}}let Jc=Symbol("ForcePortalRootContext");function Wg(){return o.inject(Jc,!1)}let js=o.defineComponent({name:"ForcePortalRoot",props:{as:{type:[Object,String],default:"template"},force:{type:Boolean,default:!1}},setup(e,{slots:t,attrs:n}){return o.provide(Jc,e.force),()=>{let{force:a,...r}=e;return Be({theirProps:r,ourProps:{},slot:{},slots:t,attrs:n,name:"ForcePortalRoot"})}}}),Qc=Symbol("StackContext");var Us=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(Us||{});function Kg(){return o.inject(Qc,()=>{})}function Xg({type:e,enabled:t,element:n,onUpdate:a}){let r=Kg();function i(...s){a?.(...s),r(...s)}o.onMounted(()=>{o.watch(t,(s,l)=>{s?i(0,e,n):l===!0&&i(1,e,n)},{immediate:!0,flush:"sync"})}),o.onUnmounted(()=>{t.value&&i(1,e,n)}),o.provide(Qc,i)}let qc=Symbol("DescriptionContext");function Yg(){let e=o.inject(qc,null);if(e===null)throw new Error("Missing parent");return e}function Zg({slot:e=o.ref({}),name:t="Description",props:n={}}={}){let a=o.ref([]);function r(i){return a.value.push(i),()=>{let s=a.value.indexOf(i);s!==-1&&a.value.splice(s,1)}}return o.provide(qc,{register:r,slot:e,name:t,props:n}),o.computed(()=>a.value.length>0?a.value.join(" "):void 0)}o.defineComponent({name:"Description",props:{as:{type:[Object,String],default:"p"},id:{type:String,default:null}},setup(e,{attrs:t,slots:n}){var a;let r=(a=e.id)!=null?a:`headlessui-description-${dt()}`,i=Yg();return o.onMounted(()=>o.onUnmounted(i.register(r))),()=>{let{name:s="Description",slot:l=o.ref({}),props:c={}}=i,{...d}=e,f={...Object.entries(c).reduce((p,[h,v])=>Object.assign(p,{[h]:o.unref(v)}),{}),id:r};return Be({ourProps:f,theirProps:d,slot:l.value,attrs:t,slots:n,name:s})}}});function Jg(e){let t=cn(e);if(!t){if(e===null)return null;throw new Error(`[Headless UI]: Cannot find ownerDocument for contextElement: ${e}`)}let n=t.getElementById("headlessui-portal-root");if(n)return n;let a=t.createElement("div");return a.setAttribute("id","headlessui-portal-root"),t.body.appendChild(a)}const zs=new WeakMap;function Qg(e){var t;return(t=zs.get(e))!=null?t:0}function $c(e,t){let n=t(Qg(e));return n<=0?zs.delete(e):zs.set(e,n),n}let ed=o.defineComponent({name:"Portal",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){let a=o.ref(null),r=o.computed(()=>cn(a)),i=Wg(),s=o.inject(td,null),l=o.ref(i===!0||s==null?Jg(a.value):s.resolveTarget());l.value&&$c(l.value,h=>h+1);let c=o.ref(!1);o.onMounted(()=>{c.value=!0}),o.watchEffect(()=>{i||s!=null&&(l.value=s.resolveTarget())});let d=o.inject(Hs,null),f=!1,p=o.getCurrentInstance();return o.watch(a,()=>{if(f||!d)return;let h=ae(a);h&&(o.onUnmounted(d.register(h),p),f=!0)}),o.onUnmounted(()=>{var h,v;let u=(h=r.value)==null?void 0:h.getElementById("headlessui-portal-root");!u||l.value!==u||$c(l.value,m=>m-1)||l.value.children.length>0||(v=l.value.parentElement)==null||v.removeChild(l.value)}),()=>{if(!c.value||l.value===null)return null;let h={ref:a,"data-headlessui-portal":""};return o.h(o.Teleport,{to:l.value},Be({ourProps:h,theirProps:e,slot:{},attrs:n,slots:t,name:"Portal"}))}}}),Hs=Symbol("PortalParentContext");function qg(){let e=o.inject(Hs,null),t=o.ref([]);function n(i){return t.value.push(i),e&&e.register(i),()=>a(i)}function a(i){let s=t.value.indexOf(i);s!==-1&&t.value.splice(s,1),e&&e.unregister(i)}let r={register:n,unregister:a,portals:t};return[t,o.defineComponent({name:"PortalWrapper",setup(i,{slots:s}){return o.provide(Hs,r),()=>{var l;return(l=s.default)==null?void 0:l.call(s)}}})]}let td=Symbol("PortalGroupContext"),$g=o.defineComponent({name:"PortalGroup",props:{as:{type:[Object,String],default:"template"},target:{type:Object,default:null}},setup(e,{attrs:t,slots:n}){let a=o.reactive({resolveTarget(){return e.target}});return o.provide(td,a),()=>{let{target:r,...i}=e;return Be({theirProps:i,ourProps:{},slot:{},attrs:t,slots:n,name:"PortalGroup"})}}});var ey=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(ey||{});let Gs=Symbol("DialogContext");function Ea(e){let t=o.inject(Gs,null);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Ea),n}return t}let lr="DC8F892D-2EBD-447C-A4C8-A03058436FF4",cr=o.defineComponent({name:"Dialog",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},open:{type:[Boolean,String],default:lr},initialFocus:{type:Object,default:null},id:{type:String,default:null},role:{type:String,default:"dialog"}},emits:{close:e=>!0},setup(e,{emit:t,attrs:n,slots:a,expose:r}){var i,s;let l=(i=e.id)!=null?i:`headlessui-dialog-${dt()}`,c=o.ref(!1);o.onMounted(()=>{c.value=!0});let d=!1,f=o.computed(()=>e.role==="dialog"||e.role==="alertdialog"?e.role:(d||(d=!0,console.warn(`Invalid role [${f}] passed to . Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")),p=o.ref(0),h=Do(),v=o.computed(()=>e.open===lr&&h!==null?(h.value&je.Open)===je.Open:e.open),u=o.ref(null),m=o.computed(()=>cn(u));if(r({el:u,$el:u}),!(e.open!==lr||h!==null))throw new Error("You forgot to provide an `open` prop to the `Dialog`.");if(typeof v.value!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${v.value===lr?void 0:e.open}`);let b=o.computed(()=>c.value&&v.value?0:1),y=o.computed(()=>b.value===0),g=o.computed(()=>p.value>1),O=o.inject(Gs,null)!==null,[C,S]=qg(),{resolveContainers:k,mainTreeNodeRef:D,MainTreeNode:A}=Gg({portals:C,defaultContainers:[o.computed(()=>{var se;return(se=J.panelRef.value)!=null?se:u.value})]}),I=o.computed(()=>g.value?"parent":"leaf"),R=o.computed(()=>h!==null?(h.value&je.Closing)===je.Closing:!1),F=o.computed(()=>O||R.value?!1:y.value),K=o.computed(()=>{var se,fe,be;return(be=Array.from((fe=(se=m.value)==null?void 0:se.querySelectorAll("body > *"))!=null?fe:[]).find(Se=>Se.id==="headlessui-portal-root"?!1:Se.contains(ae(D))&&Se instanceof HTMLElement))!=null?be:null});Zc(K,F);let B=o.computed(()=>g.value?!0:y.value),V=o.computed(()=>{var se,fe,be;return(be=Array.from((fe=(se=m.value)==null?void 0:se.querySelectorAll("[data-headlessui-portal]"))!=null?fe:[]).find(Se=>Se.contains(ae(D))&&Se instanceof HTMLElement))!=null?be:null});Zc(V,B),Xg({type:"Dialog",enabled:o.computed(()=>b.value===0),element:u,onUpdate:(se,fe)=>{if(fe==="Dialog")return tt(se,{[Us.Add]:()=>p.value+=1,[Us.Remove]:()=>p.value-=1})}});let z=Zg({name:"DialogDescription",slot:o.computed(()=>({open:v.value}))}),W=o.ref(null),J={titleId:W,panelRef:o.ref(null),dialogState:b,setTitleId(se){W.value!==se&&(W.value=se)},close(){t("close",!1)}};o.provide(Gs,J);let ne=o.computed(()=>!(!y.value||g.value));Bs(k,(se,fe)=>{se.preventDefault(),J.close(),o.nextTick(()=>fe?.focus())},ne);let xe=o.computed(()=>!(g.value||b.value!==0));Wc((s=m.value)==null?void 0:s.defaultView,"keydown",se=>{xe.value&&(se.defaultPrevented||se.key===Ce.Escape&&(se.preventDefault(),se.stopPropagation(),J.close()))});let Qe=o.computed(()=>!(R.value||b.value!==0||O));return Hg(m,Qe,se=>{var fe;return{containers:[...(fe=se.containers)!=null?fe:[],k]}}),o.watchEffect(se=>{if(b.value!==0)return;let fe=ae(u);if(!fe)return;let be=new ResizeObserver(Se=>{for(let Me of Se){let Ne=Me.target.getBoundingClientRect();Ne.x===0&&Ne.y===0&&Ne.width===0&&Ne.height===0&&J.close()}});be.observe(fe),se(()=>be.disconnect())}),()=>{let{open:se,initialFocus:fe,...be}=e,Se={...n,ref:u,id:l,role:f.value,"aria-modal":b.value===0?!0:void 0,"aria-labelledby":W.value,"aria-describedby":z.value},Me={open:b.value===0};return o.h(js,{force:!0},()=>[o.h(ed,()=>o.h($g,{target:u.value},()=>o.h(js,{force:!1},()=>o.h(wa,{initialFocus:fe,containers:k,features:y.value?tt(I.value,{parent:wa.features.RestoreFocus,leaf:wa.features.All&~wa.features.FocusLock}):wa.features.None},()=>o.h(S,{},()=>Be({ourProps:Se,theirProps:{...be,...n},slot:Me,attrs:n,slots:a,visible:b.value===0,features:It.RenderStrategy|It.Static,name:"Dialog"})))))),o.h(A)])}}});o.defineComponent({name:"DialogOverlay",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:null}},setup(e,{attrs:t,slots:n}){var a;let r=(a=e.id)!=null?a:`headlessui-dialog-overlay-${dt()}`,i=Ea("DialogOverlay");function s(l){l.target===l.currentTarget&&(l.preventDefault(),l.stopPropagation(),i.close())}return()=>{let{...l}=e;return Be({ourProps:{id:r,"aria-hidden":!0,onClick:s},theirProps:l,slot:{open:i.dialogState.value===0},attrs:t,slots:n,name:"DialogOverlay"})}}}),o.defineComponent({name:"DialogBackdrop",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:null}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:a}){var r;let i=(r=e.id)!=null?r:`headlessui-dialog-backdrop-${dt()}`,s=Ea("DialogBackdrop"),l=o.ref(null);return a({el:l,$el:l}),o.onMounted(()=>{if(s.panelRef.value===null)throw new Error("A component is being used, but a component is missing.")}),()=>{let{...c}=e,d={id:i,ref:l,"aria-hidden":!0};return o.h(js,{force:!0},()=>o.h(ed,()=>Be({ourProps:d,theirProps:{...t,...c},slot:{open:s.dialogState.value===0},attrs:t,slots:n,name:"DialogBackdrop"})))}}});let un=o.defineComponent({name:"DialogPanel",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:null}},setup(e,{attrs:t,slots:n,expose:a}){var r;let i=(r=e.id)!=null?r:`headlessui-dialog-panel-${dt()}`,s=Ea("DialogPanel");a({el:s.panelRef,$el:s.panelRef});function l(c){c.stopPropagation()}return()=>{let{...c}=e,d={id:i,ref:s.panelRef,onClick:l};return Be({ourProps:d,theirProps:c,slot:{open:s.dialogState.value===0},attrs:t,slots:n,name:"DialogPanel"})}}}),nd=o.defineComponent({name:"DialogTitle",props:{as:{type:[Object,String],default:"h2"},id:{type:String,default:null}},setup(e,{attrs:t,slots:n}){var a;let r=(a=e.id)!=null?a:`headlessui-dialog-title-${dt()}`,i=Ea("DialogTitle");return o.onMounted(()=>{i.setTitleId(r),o.onUnmounted(()=>i.setTitleId(null))}),()=>{let{...s}=e;return Be({ourProps:{id:r},theirProps:s,slot:{open:i.dialogState.value===0},attrs:t,slots:n,name:"DialogTitle"})}}});var ty=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(ty||{});let od=Symbol("DisclosureContext");function Ws(e){let t=o.inject(od,null);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Ws),n}return t}let ad=Symbol("DisclosurePanelContext");function ny(){return o.inject(ad,null)}let rd=o.defineComponent({name:"Disclosure",props:{as:{type:[Object,String],default:"template"},defaultOpen:{type:[Boolean],default:!1}},setup(e,{slots:t,attrs:n}){let a=o.ref(e.defaultOpen?0:1),r=o.ref(null),i=o.ref(null),s={buttonId:o.ref(`headlessui-disclosure-button-${dt()}`),panelId:o.ref(`headlessui-disclosure-panel-${dt()}`),disclosureState:a,panel:r,button:i,toggleDisclosure(){a.value=tt(a.value,{0:1,1:0})},closeDisclosure(){a.value!==1&&(a.value=1)},close(l){s.closeDisclosure();let c=l?l instanceof HTMLElement?l:l.value instanceof HTMLElement?ae(l):ae(s.button):ae(s.button);c?.focus()}};return o.provide(od,s),ir(o.computed(()=>tt(a.value,{0:je.Open,1:je.Closed}))),()=>{let{defaultOpen:l,...c}=e,d={open:a.value===0,close:s.close};return Be({theirProps:c,ourProps:{},slot:d,slots:t,attrs:n,name:"Disclosure"})}}}),sd=o.defineComponent({name:"DisclosureButton",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:null}},setup(e,{attrs:t,slots:n,expose:a}){let r=Ws("DisclosureButton"),i=ny(),s=o.computed(()=>i===null?!1:i.value===r.panelId.value);o.onMounted(()=>{s.value||e.id!==null&&(r.buttonId.value=e.id)}),o.onUnmounted(()=>{s.value||(r.buttonId.value=null)});let l=o.ref(null);a({el:l,$el:l}),s.value||o.watchEffect(()=>{r.button.value=l.value});let c=Fs(o.computed(()=>({as:e.as,type:t.type})),l);function d(){var h;e.disabled||(s.value?(r.toggleDisclosure(),(h=ae(r.button))==null||h.focus()):r.toggleDisclosure())}function f(h){var v;if(!e.disabled)if(s.value)switch(h.key){case Ce.Space:case Ce.Enter:h.preventDefault(),h.stopPropagation(),r.toggleDisclosure(),(v=ae(r.button))==null||v.focus();break}else switch(h.key){case Ce.Space:case Ce.Enter:h.preventDefault(),h.stopPropagation(),r.toggleDisclosure();break}}function p(h){switch(h.key){case Ce.Space:h.preventDefault();break}}return()=>{var h;let v={open:r.disclosureState.value===0},{id:u,...m}=e,b=s.value?{ref:l,type:c.value,onClick:d,onKeydown:f}:{id:(h=r.buttonId.value)!=null?h:u,ref:l,type:c.value,"aria-expanded":r.disclosureState.value===0,"aria-controls":r.disclosureState.value===0||ae(r.panel)?r.panelId.value:void 0,disabled:e.disabled?!0:void 0,onClick:d,onKeydown:f,onKeyup:p};return Be({ourProps:b,theirProps:m,slot:v,attrs:t,slots:n,name:"DisclosureButton"})}}}),id=o.defineComponent({name:"DisclosurePanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:null}},setup(e,{attrs:t,slots:n,expose:a}){let r=Ws("DisclosurePanel");o.onMounted(()=>{e.id!==null&&(r.panelId.value=e.id)}),o.onUnmounted(()=>{r.panelId.value=null}),a({el:r.panel,$el:r.panel}),o.provide(ad,r.panelId);let i=Do(),s=o.computed(()=>i!==null?(i.value&je.Open)===je.Open:r.disclosureState.value===0);return()=>{var l;let c={open:r.disclosureState.value===0,close:r.close},{id:d,...f}=e,p={id:(l=r.panelId.value)!=null?l:d,ref:r.panel};return Be({ourProps:p,theirProps:f,slot:c,attrs:t,slots:n,features:It.RenderStrategy|It.Static,visible:s.value,name:"DisclosurePanel"})}}}),ld=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function cd(e){var t,n;let a=(t=e.innerText)!=null?t:"",r=e.cloneNode(!0);if(!(r instanceof HTMLElement))return a;let i=!1;for(let l of r.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))l.remove(),i=!0;let s=i?(n=r.innerText)!=null?n:"":a;return ld.test(s)&&(s=s.replace(ld,"")),s}function oy(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let a=n.split(" ").map(r=>{let i=document.getElementById(r);if(i){let s=i.getAttribute("aria-label");return typeof s=="string"?s.trim():cd(i).trim()}return null}).filter(Boolean);if(a.length>0)return a.join(", ")}return cd(e).trim()}function ay(e){let t=o.ref(""),n=o.ref("");return()=>{let a=ae(e);if(!a)return"";let r=a.innerText;if(t.value===r)return n.value;let i=oy(a).trim().toLowerCase();return t.value=r,n.value=i,i}}var ry=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(ry||{}),sy=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(sy||{});function iy(e){requestAnimationFrame(()=>requestAnimationFrame(e))}let dd=Symbol("MenuContext");function dr(e){let t=o.inject(dd,null);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,dr),n}return t}let Ks=o.defineComponent({name:"Menu",props:{as:{type:[Object,String],default:"template"}},setup(e,{slots:t,attrs:n}){let a=o.ref(1),r=o.ref(null),i=o.ref(null),s=o.ref([]),l=o.ref(""),c=o.ref(null),d=o.ref(1);function f(h=v=>v){let v=c.value!==null?s.value[c.value]:null,u=Ms(h(s.value.slice()),b=>ae(b.dataRef.domRef)),m=v?u.indexOf(v):null;return m===-1&&(m=null),{items:u,activeItemIndex:m}}let p={menuState:a,buttonRef:r,itemsRef:i,items:s,searchQuery:l,activeItemIndex:c,activationTrigger:d,closeMenu:()=>{a.value=1,c.value=null},openMenu:()=>a.value=0,goToItem(h,v,u){let m=f(),b=Ls(h===Ie.Specific?{focus:Ie.Specific,id:v}:{focus:h},{resolveItems:()=>m.items,resolveActiveIndex:()=>m.activeItemIndex,resolveId:y=>y.id,resolveDisabled:y=>y.dataRef.disabled});l.value="",c.value=b,d.value=u??1,s.value=m.items},search(h){let v=l.value!==""?0:1;l.value+=h.toLowerCase();let u=(c.value!==null?s.value.slice(c.value+v).concat(s.value.slice(0,c.value+v)):s.value).find(b=>b.dataRef.textValue.startsWith(l.value)&&!b.dataRef.disabled),m=u?s.value.indexOf(u):-1;m===-1||m===c.value||(c.value=m,d.value=1)},clearSearch(){l.value=""},registerItem(h,v){let u=f(m=>[...m,{id:h,dataRef:v}]);s.value=u.items,c.value=u.activeItemIndex,d.value=1},unregisterItem(h){let v=f(u=>{let m=u.findIndex(b=>b.id===h);return m!==-1&&u.splice(m,1),u});s.value=v.items,c.value=v.activeItemIndex,d.value=1}};return Bs([r,i],(h,v)=>{var u;p.closeMenu(),Ps(v,Rs.Loose)||(h.preventDefault(),(u=ae(r))==null||u.focus())},o.computed(()=>a.value===0)),o.provide(dd,p),ir(o.computed(()=>tt(a.value,{0:je.Open,1:je.Closed}))),()=>{let h={open:a.value===0,close:p.closeMenu};return Be({ourProps:{},theirProps:e,slot:h,slots:t,attrs:n,name:"Menu"})}}}),Xs=o.defineComponent({name:"MenuButton",props:{disabled:{type:Boolean,default:!1},as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(e,{attrs:t,slots:n,expose:a}){var r;let i=(r=e.id)!=null?r:`headlessui-menu-button-${dt()}`,s=dr("MenuButton");a({el:s.buttonRef,$el:s.buttonRef});function l(p){switch(p.key){case Ce.Space:case Ce.Enter:case Ce.ArrowDown:p.preventDefault(),p.stopPropagation(),s.openMenu(),o.nextTick(()=>{var h;(h=ae(s.itemsRef))==null||h.focus({preventScroll:!0}),s.goToItem(Ie.First)});break;case Ce.ArrowUp:p.preventDefault(),p.stopPropagation(),s.openMenu(),o.nextTick(()=>{var h;(h=ae(s.itemsRef))==null||h.focus({preventScroll:!0}),s.goToItem(Ie.Last)});break}}function c(p){switch(p.key){case Ce.Space:p.preventDefault();break}}function d(p){e.disabled||(s.menuState.value===0?(s.closeMenu(),o.nextTick(()=>{var h;return(h=ae(s.buttonRef))==null?void 0:h.focus({preventScroll:!0})})):(p.preventDefault(),s.openMenu(),iy(()=>{var h;return(h=ae(s.itemsRef))==null?void 0:h.focus({preventScroll:!0})})))}let f=Fs(o.computed(()=>({as:e.as,type:t.type})),s.buttonRef);return()=>{var p;let h={open:s.menuState.value===0},{...v}=e,u={ref:s.buttonRef,id:i,type:f.value,"aria-haspopup":"menu","aria-controls":(p=ae(s.itemsRef))==null?void 0:p.id,"aria-expanded":s.menuState.value===0,onKeydown:l,onKeyup:c,onClick:d};return Be({ourProps:u,theirProps:v,slot:h,attrs:t,slots:n,name:"MenuButton"})}}}),Ys=o.defineComponent({name:"MenuItems",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:null}},setup(e,{attrs:t,slots:n,expose:a}){var r;let i=(r=e.id)!=null?r:`headlessui-menu-items-${dt()}`,s=dr("MenuItems"),l=o.ref(null);a({el:s.itemsRef,$el:s.itemsRef}),Mc({container:o.computed(()=>ae(s.itemsRef)),enabled:o.computed(()=>s.menuState.value===0),accept(h){return h.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:h.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(h){h.setAttribute("role","none")}});function c(h){var v;switch(l.value&&clearTimeout(l.value),h.key){case Ce.Space:if(s.searchQuery.value!=="")return h.preventDefault(),h.stopPropagation(),s.search(h.key);case Ce.Enter:if(h.preventDefault(),h.stopPropagation(),s.activeItemIndex.value!==null){let u=s.items.value[s.activeItemIndex.value];(v=ae(u.dataRef.domRef))==null||v.click()}s.closeMenu(),kc(ae(s.buttonRef));break;case Ce.ArrowDown:return h.preventDefault(),h.stopPropagation(),s.goToItem(Ie.Next);case Ce.ArrowUp:return h.preventDefault(),h.stopPropagation(),s.goToItem(Ie.Previous);case Ce.Home:case Ce.PageUp:return h.preventDefault(),h.stopPropagation(),s.goToItem(Ie.First);case Ce.End:case Ce.PageDown:return h.preventDefault(),h.stopPropagation(),s.goToItem(Ie.Last);case Ce.Escape:h.preventDefault(),h.stopPropagation(),s.closeMenu(),o.nextTick(()=>{var u;return(u=ae(s.buttonRef))==null?void 0:u.focus({preventScroll:!0})});break;case Ce.Tab:h.preventDefault(),h.stopPropagation(),s.closeMenu(),o.nextTick(()=>vg(ae(s.buttonRef),h.shiftKey?$t.Previous:$t.Next));break;default:h.key.length===1&&(s.search(h.key),l.value=setTimeout(()=>s.clearSearch(),350));break}}function d(h){switch(h.key){case Ce.Space:h.preventDefault();break}}let f=Do(),p=o.computed(()=>f!==null?(f.value&je.Open)===je.Open:s.menuState.value===0);return()=>{var h,v;let u={open:s.menuState.value===0},{...m}=e,b={"aria-activedescendant":s.activeItemIndex.value===null||(h=s.items.value[s.activeItemIndex.value])==null?void 0:h.id,"aria-labelledby":(v=ae(s.buttonRef))==null?void 0:v.id,id:i,onKeydown:c,onKeyup:d,role:"menu",tabIndex:0,ref:s.itemsRef};return Be({ourProps:b,theirProps:m,slot:u,attrs:t,slots:n,features:It.RenderStrategy|It.Static,visible:p.value,name:"MenuItems"})}}}),Sa=o.defineComponent({name:"MenuItem",inheritAttrs:!1,props:{as:{type:[Object,String],default:"template"},disabled:{type:Boolean,default:!1},id:{type:String,default:null}},setup(e,{slots:t,attrs:n,expose:a}){var r;let i=(r=e.id)!=null?r:`headlessui-menu-item-${dt()}`,s=dr("MenuItem"),l=o.ref(null);a({el:l,$el:l});let c=o.computed(()=>s.activeItemIndex.value!==null?s.items.value[s.activeItemIndex.value].id===i:!1),d=ay(l),f=o.computed(()=>({disabled:e.disabled,get textValue(){return d()},domRef:l}));o.onMounted(()=>s.registerItem(i,f)),o.onUnmounted(()=>s.unregisterItem(i)),o.watchEffect(()=>{s.menuState.value===0&&c.value&&s.activationTrigger.value!==0&&o.nextTick(()=>{var y,g;return(g=(y=ae(l))==null?void 0:y.scrollIntoView)==null?void 0:g.call(y,{block:"nearest"})})});function p(y){if(e.disabled)return y.preventDefault();s.closeMenu(),kc(ae(s.buttonRef))}function h(){if(e.disabled)return s.goToItem(Ie.Nothing);s.goToItem(Ie.Specific,i)}let v=Pc();function u(y){v.update(y)}function m(y){v.wasMoved(y)&&(e.disabled||c.value||s.goToItem(Ie.Specific,i,0))}function b(y){v.wasMoved(y)&&(e.disabled||c.value&&s.goToItem(Ie.Nothing))}return()=>{let{disabled:y,...g}=e,O={active:c.value,disabled:y,close:s.closeMenu};return Be({ourProps:{id:i,ref:l,role:"menuitem",tabIndex:y===!0?void 0:-1,"aria-disabled":y===!0?!0:void 0,onClick:p,onFocus:h,onPointerenter:u,onMouseenter:u,onPointermove:m,onMousemove:m,onPointerleave:b,onMouseleave:b},theirProps:{...n,...g},slot:O,attrs:n,slots:t,name:"MenuItem"})}}});function ly(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function Zs(e,...t){e&&t.length>0&&e.classList.add(...t)}function ur(e,...t){e&&t.length>0&&e.classList.remove(...t)}var Js=(e=>(e.Finished="finished",e.Cancelled="cancelled",e))(Js||{});function cy(e,t){let n=Nn();if(!e)return n.dispose;let{transitionDuration:a,transitionDelay:r}=getComputedStyle(e),[i,s]=[a,r].map(l=>{let[c=0]=l.split(",").filter(Boolean).map(d=>d.includes("ms")?parseFloat(d):parseFloat(d)*1e3).sort((d,f)=>f-d);return c});return i!==0?n.setTimeout(()=>t("finished"),i+s):t("finished"),n.add(()=>t("cancelled")),n.dispose}function ud(e,t,n,a,r,i){let s=Nn(),l=i!==void 0?ly(i):()=>{};return ur(e,...r),Zs(e,...t,...n),s.nextFrame(()=>{ur(e,...n),Zs(e,...a),s.add(cy(e,c=>(ur(e,...a,...t),Zs(e,...r),l(c))))}),s.add(()=>ur(e,...t,...n,...a,...r)),s.add(()=>l("cancelled")),s.dispose}function Qn(e=""){return e.split(/\s+/).filter(t=>t.length>1)}let Qs=Symbol("TransitionContext");var dy=(e=>(e.Visible="visible",e.Hidden="hidden",e))(dy||{});function uy(){return o.inject(Qs,null)!==null}function fy(){let e=o.inject(Qs,null);if(e===null)throw new Error("A is used but it is missing a parent .");return e}function py(){let e=o.inject(qs,null);if(e===null)throw new Error("A is used but it is missing a parent .");return e}let qs=Symbol("NestingContext");function fr(e){return"children"in e?fr(e.children):e.value.filter(({state:t})=>t==="visible").length>0}function fd(e){let t=o.ref([]),n=o.ref(!1);o.onMounted(()=>n.value=!0),o.onUnmounted(()=>n.value=!1);function a(i,s=An.Hidden){let l=t.value.findIndex(({id:c})=>c===i);l!==-1&&(tt(s,{[An.Unmount](){t.value.splice(l,1)},[An.Hidden](){t.value[l].state="hidden"}}),!fr(t)&&n.value&&e?.())}function r(i){let s=t.value.find(({id:l})=>l===i);return s?s.state!=="visible"&&(s.state="visible"):t.value.push({id:i,state:"visible"}),()=>a(i,An.Unmount)}return{children:t,register:r,unregister:a}}let pd=It.RenderStrategy,In=o.defineComponent({props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:n,slots:a,expose:r}){let i=o.ref(0);function s(){i.value|=je.Opening,t("beforeEnter")}function l(){i.value&=~je.Opening,t("afterEnter")}function c(){i.value|=je.Closing,t("beforeLeave")}function d(){i.value&=~je.Closing,t("afterLeave")}if(!uy()&&wg())return()=>o.h(Ca,{...e,onBeforeEnter:s,onAfterEnter:l,onBeforeLeave:c,onAfterLeave:d},a);let f=o.ref(null),p=o.computed(()=>e.unmount?An.Unmount:An.Hidden);r({el:f,$el:f});let{show:h,appear:v}=fy(),{register:u,unregister:m}=py(),b=o.ref(h.value?"visible":"hidden"),y={value:!0},g=dt(),O={value:!1},C=fd(()=>{!O.value&&b.value!=="hidden"&&(b.value="hidden",m(g),d())});o.onMounted(()=>{let B=u(g);o.onUnmounted(B)}),o.watchEffect(()=>{if(p.value===An.Hidden&&g){if(h.value&&b.value!=="visible"){b.value="visible";return}tt(b.value,{hidden:()=>m(g),visible:()=>u(g)})}});let S=Qn(e.enter),k=Qn(e.enterFrom),D=Qn(e.enterTo),A=Qn(e.entered),I=Qn(e.leave),R=Qn(e.leaveFrom),F=Qn(e.leaveTo);o.onMounted(()=>{o.watchEffect(()=>{if(b.value==="visible"){let B=ae(f);if(B instanceof Comment&&B.data==="")throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}})});function K(B){let V=y.value&&!v.value,z=ae(f);!z||!(z instanceof HTMLElement)||V||(O.value=!0,h.value&&s(),h.value||c(),B(h.value?ud(z,S,k,D,A,W=>{O.value=!1,W===Js.Finished&&l()}):ud(z,I,R,F,A,W=>{O.value=!1,W===Js.Finished&&(fr(C)||(b.value="hidden",m(g),d()))})))}return o.onMounted(()=>{o.watch([h],(B,V,z)=>{K(z),y.value=!1},{immediate:!0})}),o.provide(qs,C),ir(o.computed(()=>tt(b.value,{visible:je.Open,hidden:je.Closed})|i.value)),()=>{let{appear:B,show:V,enter:z,enterFrom:W,enterTo:J,entered:ne,leave:xe,leaveFrom:Qe,leaveTo:se,...fe}=e,be={ref:f},Se={...fe,...v.value&&h.value&&ma.isServer?{class:o.normalizeClass([n.class,fe.class,...S,...k])}:{}};return Be({theirProps:Se,ourProps:be,slot:{},slots:a,attrs:n,features:pd,visible:b.value==="visible",name:"TransitionChild"})}}}),hy=In,Ca=o.defineComponent({inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:n,slots:a}){let r=Do(),i=o.computed(()=>e.show===null&&r!==null?(r.value&je.Open)===je.Open:e.show);o.watchEffect(()=>{if(![!0,!1].includes(i.value))throw new Error('A is used but it is missing a `:show="true | false"` prop.')});let s=o.ref(i.value?"visible":"hidden"),l=fd(()=>{s.value="hidden"}),c=o.ref(!0),d={show:i,appear:o.computed(()=>e.appear||!c.value)};return o.onMounted(()=>{o.watchEffect(()=>{c.value=!1,i.value?s.value="visible":fr(l)||(s.value="hidden")})}),o.provide(qs,l),o.provide(Qs,d),()=>{let f=ga(e,["show","appear","unmount","onBeforeEnter","onBeforeLeave","onAfterEnter","onAfterLeave"]),p={unmount:e.unmount};return Be({ourProps:{...p,as:"template"},theirProps:{},slot:{},slots:{...a,default:()=>[o.h(hy,{onBeforeEnter:()=>t("beforeEnter"),onAfterEnter:()=>t("afterEnter"),onBeforeLeave:()=>t("beforeLeave"),onAfterLeave:()=>t("afterLeave"),...n,...p,...f},a.default)]},attrs:{},features:pd,visible:s.value==="visible",name:"Transition"})}}});const my={},vy={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},gy=[o.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),o.createElementVNode("path",{d:"M8 5v10a1 1 0 0 0 1 1h10"},null,-1),o.createElementVNode("path",{d:"M5 8h10a1 1 0 0 1 1 1v10"},null,-1)];function yy(e,t){return o.openBlock(),o.createElementBlock("svg",vy,gy)}const hd=is(my,[["render",yy]]),it=o.defineComponent({__name:"IconButton",props:{variant:{default:"secondary"},type:{default:"button"},asAnchor:{type:Boolean,default:!1},download:{}},setup(e){const t={primary:"bg-blue-500 text-white focus:outline-blue-500",secondary:"bg-gray-300 dark:bg-gray-700 text-gray-800 dark:text-gray-200 focus:outline-blue-500",danger:"bg-red-500 text-white focus:outline-red-500",success:"bg-green-500 text-white focus:outline-green-500",transparent:"bg-transparent text-gray-800 dark:text-gray-100"},n=e,a=o.computed(()=>t[n.variant]);return(r,i)=>(o.openBlock(),o.createBlock(o.resolveDynamicComponent(r.asAnchor?"a":"button"),{class:o.normalizeClass(`inline-flex items-center rounded-full border-0 p-2 shadow-sm focus:outline-none focus:ring-1 hover:opacity-75 disabled:opacity-25 ${a.value}`),type:r.asAnchor?void 0:r.type??"button",download:r.download??null},{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},8,["class","type","download"]))}}),by=o.createElementVNode("div",{class:"fixed inset-0 bg-gray-800/20 backdrop-blur-sm transition-opacity"},null,-1),wy={class:"flex items-end sm:items-center justify-center min-h-full p-0 md:p-4"},Ao=o.defineComponent({__name:"BaseModal",props:{name:{},initialFocusRef:{}},setup(e){const t=e;o.onBeforeUnmount(()=>{r.value&&i()});const n=Pe(),a=o.computed(()=>n.dark),r=o.computed(()=>n.isOpen(t.name)),i=()=>{n.closeModal({name:t.name})};return(s,l)=>(o.openBlock(),o.createBlock(o.unref(Ca),{show:r.value,as:"template",class:"nova-file-manager"},{default:o.withCtx(()=>[o.createVNode(o.unref(cr),{as:"div",class:"relative z-[60]",style:{"z-index":"999"},onClose:i,"initial-focus":s.initialFocusRef},{default:o.withCtx(()=>[o.createVNode(o.unref(In),{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"ease-in duration-200","leave-from":"opacity-100","leave-to":"opacity-0"},{default:o.withCtx(()=>[by]),_:1}),o.createElementVNode("div",{class:o.normalizeClass([{dark:a.value},"fixed z-10 inset-0 overflow-y-auto"])},[o.createElementVNode("div",wy,[o.createVNode(o.unref(In),{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95","enter-to":"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200","leave-from":"opacity-100 translate-y-0 sm:scale-100","leave-to":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"},{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default",{close:i,isOpen:r.value,dark:a.value})]),_:3})])],2)]),_:3},8,["initial-focus"])]),_:3},8,["show"]))}});var md={},vd={exports:{}};/*! * Cropper.js v1.5.12 * https://fengyuanchen.github.io/cropperjs * @@ -17,14 +17,14 @@ * Released under the MIT license * * Date: 2021-06-12T08:00:17.411Z - */(function(e,t){(function(n,a){e.exports=a()})(So,function(){function n(C,E){var x=Object.keys(C);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(C);E&&(w=w.filter(function(P){return Object.getOwnPropertyDescriptor(C,P).enumerable})),x.push.apply(x,w)}return x}function a(C){for(var E=1;EC.length)&&(E=C.length);for(var x=0,w=new Array(E);x
',Z=Number.isNaN||y.isNaN;function J(C){return typeof C=="number"&&!Z(C)}var de=function(E){return E>0&&E<1/0};function pe(C){return typeof C>"u"}function ve(C){return r(C)==="object"&&C!==null}var Xe=Object.prototype.hasOwnProperty;function le(C){if(!ve(C))return!1;try{var E=C.constructor,x=E.prototype;return E&&x&&Xe.call(x,"isPrototypeOf")}catch{return!1}}function oe(C){return typeof C=="function"}var ce=Array.prototype.slice;function Ee(C){return Array.from?Array.from(C):ce.call(C)}function ie(C,E){return C&&oe(E)&&(Array.isArray(C)||J(C.length)?Ee(C).forEach(function(x,w){E.call(C,x,w,C)}):ve(C)&&Object.keys(C).forEach(function(x){E.call(C,C[x],x,C)})),C}var ge=Object.assign||function(E){for(var x=arguments.length,w=new Array(x>1?x-1:0),P=1;P0&&w.forEach(function(k){ve(k)&&Object.keys(k).forEach(function(R){E[R]=k[R]})}),E},Xa=/\.\d*(?:0|9){12}\d*$/;function Hn(C){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return Xa.test(C)?Math.round(C*E)/E:C}var ea=/^width|height|left|top|marginLeft|marginTop$/;function zn(C,E){var x=C.style;ie(E,function(w,P){ea.test(P)&&J(w)&&(w="".concat(w,"px")),x[P]=w})}function uA(C,E){return C.classList?C.classList.contains(E):C.className.indexOf(E)>-1}function lt(C,E){if(E){if(J(C.length)){ie(C,function(w){lt(w,E)});return}if(C.classList){C.classList.add(E);return}var x=C.className.trim();x?x.indexOf(E)<0&&(C.className="".concat(x," ").concat(E)):C.className=E}}function rn(C,E){if(E){if(J(C.length)){ie(C,function(x){rn(x,E)});return}if(C.classList){C.classList.remove(E);return}C.className.indexOf(E)>=0&&(C.className=C.className.replace(E,""))}}function ta(C,E,x){if(E){if(J(C.length)){ie(C,function(w){ta(w,E,x)});return}x?lt(C,E):rn(C,E)}}var fA=/([a-z\d])([A-Z])/g;function al(C){return C.replace(fA,"$1-$2").toLowerCase()}function rl(C,E){return ve(C[E])?C[E]:C.dataset?C.dataset[E]:C.getAttribute("data-".concat(al(E)))}function Ya(C,E,x){ve(x)?C[E]=x:C.dataset?C.dataset[E]=x:C.setAttribute("data-".concat(al(E)),x)}function pA(C,E){if(ve(C[E]))try{delete C[E]}catch{C[E]=void 0}else if(C.dataset)try{delete C.dataset[E]}catch{C.dataset[E]=void 0}else C.removeAttribute("data-".concat(al(E)))}var Pf=/\s\s*/,Bf=function(){var C=!1;if(m){var E=!1,x=function(){},w=Object.defineProperty({},"once",{get:function(){return C=!0,E},set:function(k){E=k}});y.addEventListener("test",x,w),y.removeEventListener("test",x,w)}return C}();function Jt(C,E,x){var w=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},P=x;E.trim().split(Pf).forEach(function(k){if(!Bf){var R=C.listeners;R&&R[k]&&R[k][x]&&(P=R[k][x],delete R[k][x],Object.keys(R[k]).length===0&&delete R[k],Object.keys(R).length===0&&delete C.listeners)}C.removeEventListener(k,P,w)})}function Lt(C,E,x){var w=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},P=x;E.trim().split(Pf).forEach(function(k){if(w.once&&!Bf){var R=C.listeners,U=R===void 0?{}:R;P=function(){delete U[k][x],C.removeEventListener(k,P,w);for(var Y=arguments.length,z=new Array(Y),G=0;GMath.abs(x)&&(x=q)})}),x}function qr(C,E){var x=C.pageX,w=C.pageY,P={endX:x,endY:w};return E?P:a({startX:x,startY:w},P)}function vA(C){var E=0,x=0,w=0;return ie(C,function(P){var k=P.startX,R=P.startY;E+=k,x+=R,w+=1}),E/=w,x/=w,{pageX:E,pageY:x}}function Gn(C){var E=C.aspectRatio,x=C.height,w=C.width,P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"contain",k=de(w),R=de(x);if(k&&R){var U=x*E;P==="contain"&&U>w||P==="cover"&&U90?{width:$,height:U}:{width:U,height:$}}function bA(C,E,x,w){var P=E.aspectRatio,k=E.naturalWidth,R=E.naturalHeight,U=E.rotate,$=U===void 0?0:U,Y=E.scaleX,z=Y===void 0?1:Y,G=E.scaleY,q=G===void 0?1:G,Ne=x.aspectRatio,Te=x.naturalWidth,Ge=x.naturalHeight,Ie=w.fillColor,rt=Ie===void 0?"transparent":Ie,ct=w.imageSmoothingEnabled,et=ct===void 0?!0:ct,En=w.imageSmoothingQuality,kt=En===void 0?"low":En,ee=w.maxWidth,_e=ee===void 0?1/0:ee,st=w.maxHeight,jt=st===void 0?1/0:st,wn=w.minWidth,bo=wn===void 0?0:wn,yo=w.minHeight,Wn=yo===void 0?0:yo,sn=document.createElement("canvas"),wt=sn.getContext("2d"),Eo=Gn({aspectRatio:Ne,width:_e,height:jt}),$r=Gn({aspectRatio:Ne,width:bo,height:Wn},"cover"),il=Math.min(Eo.width,Math.max($r.width,Te)),ll=Math.min(Eo.height,Math.max($r.height,Ge)),Uf=Gn({aspectRatio:P,width:_e,height:jt}),Hf=Gn({aspectRatio:P,width:bo,height:Wn},"cover"),zf=Math.min(Uf.width,Math.max(Hf.width,k)),Gf=Math.min(Uf.height,Math.max(Hf.height,R)),DA=[-zf/2,-Gf/2,zf,Gf];return sn.width=Hn(il),sn.height=Hn(ll),wt.fillStyle=rt,wt.fillRect(0,0,il,ll),wt.save(),wt.translate(il/2,ll/2),wt.rotate($*Math.PI/180),wt.scale(z,q),wt.imageSmoothingEnabled=et,wt.imageSmoothingQuality=kt,wt.drawImage.apply(wt,[C].concat(d(DA.map(function(RA){return Math.floor(Hn(RA))})))),wt.restore(),sn}var jf=String.fromCharCode;function yA(C,E,x){var w="";x+=E;for(var P=E;P0;)x.push(jf.apply(null,Ee(P.subarray(0,w)))),P=P.subarray(w);return"data:".concat(E,";base64,").concat(btoa(x.join("")))}function SA(C){var E=new DataView(C),x;try{var w,P,k;if(E.getUint8(0)===255&&E.getUint8(1)===216)for(var R=E.byteLength,U=2;U+1=8&&(k=Y+G)}}}if(k){var q=E.getUint16(k,w),Ne,Te;for(Te=0;Te=0?k:Un),height:Math.max(w.offsetHeight,R>=0?R:L)};this.containerData=U,zn(P,{width:U.width,height:U.height}),lt(E,ne),rn(P,ne)},initCanvas:function(){var E=this.containerData,x=this.imageData,w=this.options.viewMode,P=Math.abs(x.rotate)%180===90,k=P?x.naturalHeight:x.naturalWidth,R=P?x.naturalWidth:x.naturalHeight,U=k/R,$=E.width,Y=E.height;E.height*U>E.width?w===3?$=E.height*U:Y=E.width/U:w===3?Y=E.width/U:$=E.height*U;var z={aspectRatio:U,naturalWidth:k,naturalHeight:R,width:$,height:Y};this.canvasData=z,this.limited=w===1||w===2,this.limitCanvas(!0,!0),z.width=Math.min(Math.max(z.width,z.minWidth),z.maxWidth),z.height=Math.min(Math.max(z.height,z.minHeight),z.maxHeight),z.left=(E.width-z.width)/2,z.top=(E.height-z.height)/2,z.oldLeft=z.left,z.oldTop=z.top,this.initialCanvasData=ge({},z)},limitCanvas:function(E,x){var w=this.options,P=this.containerData,k=this.canvasData,R=this.cropBoxData,U=w.viewMode,$=k.aspectRatio,Y=this.cropped&&R;if(E){var z=Number(w.minCanvasWidth)||0,G=Number(w.minCanvasHeight)||0;U>1?(z=Math.max(z,P.width),G=Math.max(G,P.height),U===3&&(G*$>z?z=G*$:G=z/$)):U>0&&(z?z=Math.max(z,Y?R.width:0):G?G=Math.max(G,Y?R.height:0):Y&&(z=R.width,G=R.height,G*$>z?z=G*$:G=z/$));var q=Gn({aspectRatio:$,width:z,height:G});z=q.width,G=q.height,k.minWidth=z,k.minHeight=G,k.maxWidth=1/0,k.maxHeight=1/0}if(x)if(U>(Y?0:1)){var Ne=P.width-k.width,Te=P.height-k.height;k.minLeft=Math.min(0,Ne),k.minTop=Math.min(0,Te),k.maxLeft=Math.max(0,Ne),k.maxTop=Math.max(0,Te),Y&&this.limited&&(k.minLeft=Math.min(R.left,R.left+(R.width-k.width)),k.minTop=Math.min(R.top,R.top+(R.height-k.height)),k.maxLeft=R.left,k.maxTop=R.top,U===2&&(k.width>=P.width&&(k.minLeft=Math.min(0,Ne),k.maxLeft=Math.max(0,Ne)),k.height>=P.height&&(k.minTop=Math.min(0,Te),k.maxTop=Math.max(0,Te))))}else k.minLeft=-k.width,k.minTop=-k.height,k.maxLeft=P.width,k.maxTop=P.height},renderCanvas:function(E,x){var w=this.canvasData,P=this.imageData;if(x){var k=gA({width:P.naturalWidth*Math.abs(P.scaleX||1),height:P.naturalHeight*Math.abs(P.scaleY||1),degree:P.rotate||0}),R=k.width,U=k.height,$=w.width*(R/w.naturalWidth),Y=w.height*(U/w.naturalHeight);w.left-=($-w.width)/2,w.top-=(Y-w.height)/2,w.width=$,w.height=Y,w.aspectRatio=R/U,w.naturalWidth=R,w.naturalHeight=U,this.limitCanvas(!0,!1)}(w.width>w.maxWidth||w.widthw.maxHeight||w.heightx.width?k.height=k.width/w:k.width=k.height*w),this.cropBoxData=k,this.limitCropBox(!0,!0),k.width=Math.min(Math.max(k.width,k.minWidth),k.maxWidth),k.height=Math.min(Math.max(k.height,k.minHeight),k.maxHeight),k.width=Math.max(k.minWidth,k.width*P),k.height=Math.max(k.minHeight,k.height*P),k.left=x.left+(x.width-k.width)/2,k.top=x.top+(x.height-k.height)/2,k.oldLeft=k.left,k.oldTop=k.top,this.initialCropBoxData=ge({},k)},limitCropBox:function(E,x){var w=this.options,P=this.containerData,k=this.canvasData,R=this.cropBoxData,U=this.limited,$=w.aspectRatio;if(E){var Y=Number(w.minCropBoxWidth)||0,z=Number(w.minCropBoxHeight)||0,G=U?Math.min(P.width,k.width,k.width+k.left,P.width-k.left):P.width,q=U?Math.min(P.height,k.height,k.height+k.top,P.height-k.top):P.height;Y=Math.min(Y,P.width),z=Math.min(z,P.height),$&&(Y&&z?z*$>Y?z=Y/$:Y=z*$:Y?z=Y/$:z&&(Y=z*$),q*$>G?q=G/$:G=q*$),R.minWidth=Math.min(Y,G),R.minHeight=Math.min(z,q),R.maxWidth=G,R.maxHeight=q}x&&(U?(R.minLeft=Math.max(0,k.left),R.minTop=Math.max(0,k.top),R.maxLeft=Math.min(P.width,k.left+k.width)-R.width,R.maxTop=Math.min(P.height,k.top+k.height)-R.height):(R.minLeft=0,R.minTop=0,R.maxLeft=P.width-R.width,R.maxTop=P.height-R.height))},renderCropBox:function(){var E=this.options,x=this.containerData,w=this.cropBoxData;(w.width>w.maxWidth||w.widthw.maxHeight||w.height=x.width&&w.height>=x.height?N:O),zn(this.cropBox,ge({width:w.width,height:w.height},Ja({translateX:w.left,translateY:w.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),na(this.element,ft,this.getData())}},CA={initPreview:function(){var E=this.element,x=this.crossOrigin,w=this.options.preview,P=x?this.crossOriginUrl:this.url,k=E.alt||"The image to preview",R=document.createElement("img");if(x&&(R.crossOrigin=x),R.src=P,R.alt=k,this.viewBox.appendChild(R),this.viewBoxImage=R,!!w){var U=w;typeof w=="string"?U=E.ownerDocument.querySelectorAll(w):w.querySelector&&(U=[w]),this.previews=U,ie(U,function($){var Y=document.createElement("img");Ya($,Se,{width:$.offsetWidth,height:$.offsetHeight,html:$.innerHTML}),x&&(Y.crossOrigin=x),Y.src=P,Y.alt=k,Y.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;"',$.innerHTML="",$.appendChild(Y)})}},resetPreview:function(){ie(this.previews,function(E){var x=rl(E,Se);zn(E,{width:x.width,height:x.height}),E.innerHTML=x.html,pA(E,Se)})},preview:function(){var E=this.imageData,x=this.canvasData,w=this.cropBoxData,P=w.width,k=w.height,R=E.width,U=E.height,$=w.left-x.left-E.left,Y=w.top-x.top-E.top;!this.cropped||this.disabled||(zn(this.viewBoxImage,ge({width:R,height:U},Ja(ge({translateX:-$,translateY:-Y},E)))),ie(this.previews,function(z){var G=rl(z,Se),q=G.width,Ne=G.height,Te=q,Ge=Ne,Ie=1;P&&(Ie=q/P,Ge=k*Ie),k&&Ge>Ne&&(Ie=Ne/k,Te=P*Ie,Ge=Ne),zn(z,{width:Te,height:Ge}),zn(z.getElementsByTagName("img")[0],ge({width:R*Ie,height:U*Ie},Ja(ge({translateX:-$*Ie,translateY:-Y*Ie},E))))}))}},NA={bind:function(){var E=this.element,x=this.options,w=this.cropper;oe(x.cropstart)&&Lt(E,Kt,x.cropstart),oe(x.cropmove)&&Lt(E,Ft,x.cropmove),oe(x.cropend)&&Lt(E,nt,x.cropend),oe(x.crop)&&Lt(E,ft,x.crop),oe(x.zoom)&&Lt(E,an,x.zoom),Lt(w,Ct,this.onCropStart=this.cropStart.bind(this)),x.zoomable&&x.zoomOnWheel&&Lt(w,Yt,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),x.toggleDragModeOnDblclick&&Lt(w,Xt,this.onDblclick=this.dblclick.bind(this)),Lt(E.ownerDocument,Nt,this.onCropMove=this.cropMove.bind(this)),Lt(E.ownerDocument,po,this.onCropEnd=this.cropEnd.bind(this)),x.responsive&&Lt(window,Et,this.onResize=this.resize.bind(this))},unbind:function(){var E=this.element,x=this.options,w=this.cropper;oe(x.cropstart)&&Jt(E,Kt,x.cropstart),oe(x.cropmove)&&Jt(E,Ft,x.cropmove),oe(x.cropend)&&Jt(E,nt,x.cropend),oe(x.crop)&&Jt(E,ft,x.crop),oe(x.zoom)&&Jt(E,an,x.zoom),Jt(w,Ct,this.onCropStart),x.zoomable&&x.zoomOnWheel&&Jt(w,Yt,this.onWheel,{passive:!1,capture:!0}),x.toggleDragModeOnDblclick&&Jt(w,Xt,this.onDblclick),Jt(E.ownerDocument,Nt,this.onCropMove),Jt(E.ownerDocument,po,this.onCropEnd),x.responsive&&Jt(window,Et,this.onResize)}},kA={resize:function(){if(!this.disabled){var E=this.options,x=this.container,w=this.containerData,P=x.offsetWidth/w.width,k=x.offsetHeight/w.height,R=Math.abs(P-1)>Math.abs(k-1)?P:k;if(R!==1){var U,$;E.restore&&(U=this.getCanvasData(),$=this.getCropBoxData()),this.render(),E.restore&&(this.setCanvasData(ie(U,function(Y,z){U[z]=Y*R})),this.setCropBoxData(ie($,function(Y,z){$[z]=Y*R})))}}},dblclick:function(){this.disabled||this.options.dragMode===je||this.setDragMode(uA(this.dragBox,W)?ke:Pe)},wheel:function(E){var x=this,w=Number(this.options.wheelZoomRatio)||.1,P=1;this.disabled||(E.preventDefault(),!this.wheeling&&(this.wheeling=!0,setTimeout(function(){x.wheeling=!1},50),E.deltaY?P=E.deltaY>0?1:-1:E.wheelDelta?P=-E.wheelDelta/120:E.detail&&(P=E.detail>0?1:-1),this.zoom(-P*w,E)))},cropStart:function(E){var x=E.buttons,w=E.button;if(!(this.disabled||(E.type==="mousedown"||E.type==="pointerdown"&&E.pointerType==="mouse")&&(J(x)&&x!==1||J(w)&&w!==0||E.ctrlKey))){var P=this.options,k=this.pointers,R;E.changedTouches?ie(E.changedTouches,function(U){k[U.identifier]=qr(U)}):k[E.pointerId||0]=qr(E),Object.keys(k).length>1&&P.zoomable&&P.zoomOnTouch?R=I:R=rl(E.target,ye),ho.test(R)&&na(this.element,Kt,{originalEvent:E,action:R})!==!1&&(E.preventDefault(),this.action=R,this.cropping=!1,R===S&&(this.cropping=!0,lt(this.dragBox,se)))}},cropMove:function(E){var x=this.action;if(!(this.disabled||!x)){var w=this.pointers;E.preventDefault(),na(this.element,Ft,{originalEvent:E,action:x})!==!1&&(E.changedTouches?ie(E.changedTouches,function(P){ge(w[P.identifier]||{},qr(P,!0))}):ge(w[E.pointerId||0]||{},qr(E,!0)),this.change(E))}},cropEnd:function(E){if(!this.disabled){var x=this.action,w=this.pointers;E.changedTouches?ie(E.changedTouches,function(P){delete w[P.identifier]}):delete w[E.pointerId||0],x&&(E.preventDefault(),Object.keys(w).length||(this.action=""),this.cropping&&(this.cropping=!1,ta(this.dragBox,se,this.cropped&&this.options.modal)),na(this.element,nt,{originalEvent:E,action:x}))}}},IA={change:function(E){var x=this.options,w=this.canvasData,P=this.containerData,k=this.cropBoxData,R=this.pointers,U=this.action,$=x.aspectRatio,Y=k.left,z=k.top,G=k.width,q=k.height,Ne=Y+G,Te=z+q,Ge=0,Ie=0,rt=P.width,ct=P.height,et=!0,En;!$&&E.shiftKey&&($=G&&q?G/q:1),this.limited&&(Ge=k.minLeft,Ie=k.minTop,rt=Ge+Math.min(P.width,w.width,w.left+w.width),ct=Ie+Math.min(P.height,w.height,w.top+w.height));var kt=R[Object.keys(R)[0]],ee={x:kt.endX-kt.startX,y:kt.endY-kt.startY},_e=function(jt){switch(jt){case _:Ne+ee.x>rt&&(ee.x=rt-Ne);break;case A:Y+ee.xct&&(ee.y=ct-Te);break}};switch(U){case O:Y+=ee.x,z+=ee.y;break;case _:if(ee.x>=0&&(Ne>=rt||$&&(z<=Ie||Te>=ct))){et=!1;break}_e(_),G+=ee.x,G<0&&(U=A,G=-G,Y-=G),$&&(q=G/$,z+=(k.height-q)/2);break;case M:if(ee.y<=0&&(z<=Ie||$&&(Y<=Ge||Ne>=rt))){et=!1;break}_e(M),q-=ee.y,z+=ee.y,q<0&&(U=D,q=-q,z-=q),$&&(G=q*$,Y+=(k.width-G)/2);break;case A:if(ee.x<=0&&(Y<=Ge||$&&(z<=Ie||Te>=ct))){et=!1;break}_e(A),G-=ee.x,Y+=ee.x,G<0&&(U=_,G=-G,Y-=G),$&&(q=G/$,z+=(k.height-q)/2);break;case D:if(ee.y>=0&&(Te>=ct||$&&(Y<=Ge||Ne>=rt))){et=!1;break}_e(D),q+=ee.y,q<0&&(U=M,q=-q,z-=q),$&&(G=q*$,Y+=(k.width-G)/2);break;case K:if($){if(ee.y<=0&&(z<=Ie||Ne>=rt)){et=!1;break}_e(M),q-=ee.y,z+=ee.y,G=q*$}else _e(M),_e(_),ee.x>=0?NeIe&&(q-=ee.y,z+=ee.y):(q-=ee.y,z+=ee.y);G<0&&q<0?(U=H,q=-q,G=-G,z-=q,Y-=G):G<0?(U=B,G=-G,Y-=G):q<0&&(U=j,q=-q,z-=q);break;case B:if($){if(ee.y<=0&&(z<=Ie||Y<=Ge)){et=!1;break}_e(M),q-=ee.y,z+=ee.y,G=q*$,Y+=k.width-G}else _e(M),_e(A),ee.x<=0?Y>Ge?(G-=ee.x,Y+=ee.x):ee.y<=0&&z<=Ie&&(et=!1):(G-=ee.x,Y+=ee.x),ee.y<=0?z>Ie&&(q-=ee.y,z+=ee.y):(q-=ee.y,z+=ee.y);G<0&&q<0?(U=j,q=-q,G=-G,z-=q,Y-=G):G<0?(U=K,G=-G,Y-=G):q<0&&(U=H,q=-q,z-=q);break;case H:if($){if(ee.x<=0&&(Y<=Ge||Te>=ct)){et=!1;break}_e(A),G-=ee.x,Y+=ee.x,q=G/$}else _e(D),_e(A),ee.x<=0?Y>Ge?(G-=ee.x,Y+=ee.x):ee.y>=0&&Te>=ct&&(et=!1):(G-=ee.x,Y+=ee.x),ee.y>=0?Te=0&&(Ne>=rt||Te>=ct)){et=!1;break}_e(_),G+=ee.x,q=G/$}else _e(D),_e(_),ee.x>=0?Ne=0&&Te>=ct&&(et=!1):G+=ee.x,ee.y>=0?Te0?U=ee.y>0?j:K:ee.x<0&&(Y-=G,U=ee.y>0?H:B),ee.y<0&&(z-=q),this.cropped||(rn(this.cropBox,ne),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}et&&(k.width=G,k.height=q,k.left=Y,k.top=z,this.action=U,this.renderCropBox()),ie(R,function(st){st.startX=st.endX,st.startY=st.endY})}},_A={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&<(this.dragBox,se),rn(this.cropBox,ne),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=ge({},this.initialImageData),this.canvasData=ge({},this.initialCanvasData),this.cropBoxData=ge({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(ge(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),rn(this.dragBox,se),lt(this.cropBox,ne)),this},replace:function(E){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!this.disabled&&E&&(this.isImg&&(this.element.src=E),x?(this.url=E,this.image.src=E,this.ready&&(this.viewBoxImage.src=E,ie(this.previews,function(w){w.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,rn(this.cropper,Q)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,lt(this.cropper,Q)),this},destroy:function(){var E=this.element;return E[T]?(E[T]=void 0,this.isImg&&this.replaced&&(E.src=this.originalUrl),this.uncreate(),this):this},move:function(E){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:E,w=this.canvasData,P=w.left,k=w.top;return this.moveTo(pe(E)?E:P+Number(E),pe(x)?x:k+Number(x))},moveTo:function(E){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:E,w=this.canvasData,P=!1;return E=Number(E),x=Number(x),this.ready&&!this.disabled&&this.options.movable&&(J(E)&&(w.left=E,P=!0),J(x)&&(w.top=x,P=!0),P&&this.renderCanvas(!0)),this},zoom:function(E,x){var w=this.canvasData;return E=Number(E),E<0?E=1/(1-E):E=1+E,this.zoomTo(w.width*E/w.naturalWidth,null,x)},zoomTo:function(E,x,w){var P=this.options,k=this.canvasData,R=k.width,U=k.height,$=k.naturalWidth,Y=k.naturalHeight;if(E=Number(E),E>=0&&this.ready&&!this.disabled&&P.zoomable){var z=$*E,G=Y*E;if(na(this.element,an,{ratio:E,oldRatio:R/$,originalEvent:w})===!1)return this;if(w){var q=this.pointers,Ne=Mf(this.cropper),Te=q&&Object.keys(q).length?vA(q):{pageX:w.pageX,pageY:w.pageY};k.left-=(z-R)*((Te.pageX-Ne.left-k.left)/R),k.top-=(G-U)*((Te.pageY-Ne.top-k.top)/U)}else le(x)&&J(x.x)&&J(x.y)?(k.left-=(z-R)*((x.x-k.left)/R),k.top-=(G-U)*((x.y-k.top)/U)):(k.left-=(z-R)/2,k.top-=(G-U)/2);k.width=z,k.height=G,this.renderCanvas(!0)}return this},rotate:function(E){return this.rotateTo((this.imageData.rotate||0)+Number(E))},rotateTo:function(E){return E=Number(E),J(E)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=E%360,this.renderCanvas(!0,!0)),this},scaleX:function(E){var x=this.imageData.scaleY;return this.scale(E,J(x)?x:1)},scaleY:function(E){var x=this.imageData.scaleX;return this.scale(J(x)?x:1,E)},scale:function(E){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:E,w=this.imageData,P=!1;return E=Number(E),x=Number(x),this.ready&&!this.disabled&&this.options.scalable&&(J(E)&&(w.scaleX=E,P=!0),J(x)&&(w.scaleY=x,P=!0),P&&this.renderCanvas(!0,!0)),this},getData:function(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,x=this.options,w=this.imageData,P=this.canvasData,k=this.cropBoxData,R;if(this.ready&&this.cropped){R={x:k.left-P.left,y:k.top-P.top,width:k.width,height:k.height};var U=w.width/w.naturalWidth;if(ie(R,function(z,G){R[G]=z/U}),E){var $=Math.round(R.y+R.height),Y=Math.round(R.x+R.width);R.x=Math.round(R.x),R.y=Math.round(R.y),R.width=Y-R.x,R.height=$-R.y}}else R={x:0,y:0,width:0,height:0};return x.rotatable&&(R.rotate=w.rotate||0),x.scalable&&(R.scaleX=w.scaleX||1,R.scaleY=w.scaleY||1),R},setData:function(E){var x=this.options,w=this.imageData,P=this.canvasData,k={};if(this.ready&&!this.disabled&&le(E)){var R=!1;x.rotatable&&J(E.rotate)&&E.rotate!==w.rotate&&(w.rotate=E.rotate,R=!0),x.scalable&&(J(E.scaleX)&&E.scaleX!==w.scaleX&&(w.scaleX=E.scaleX,R=!0),J(E.scaleY)&&E.scaleY!==w.scaleY&&(w.scaleY=E.scaleY,R=!0)),R&&this.renderCanvas(!0,!0);var U=w.width/w.naturalWidth;J(E.x)&&(k.left=E.x*U+P.left),J(E.y)&&(k.top=E.y*U+P.top),J(E.width)&&(k.width=E.width*U),J(E.height)&&(k.height=E.height*U),this.setCropBoxData(k)}return this},getContainerData:function(){return this.ready?ge({},this.containerData):{}},getImageData:function(){return this.sized?ge({},this.imageData):{}},getCanvasData:function(){var E=this.canvasData,x={};return this.ready&&ie(["left","top","width","height","naturalWidth","naturalHeight"],function(w){x[w]=E[w]}),x},setCanvasData:function(E){var x=this.canvasData,w=x.aspectRatio;return this.ready&&!this.disabled&&le(E)&&(J(E.left)&&(x.left=E.left),J(E.top)&&(x.top=E.top),J(E.width)?(x.width=E.width,x.height=E.width/w):J(E.height)&&(x.height=E.height,x.width=E.height*w),this.renderCanvas(!0)),this},getCropBoxData:function(){var E=this.cropBoxData,x;return this.ready&&this.cropped&&(x={left:E.left,top:E.top,width:E.width,height:E.height}),x||{}},setCropBoxData:function(E){var x=this.cropBoxData,w=this.options.aspectRatio,P,k;return this.ready&&this.cropped&&!this.disabled&&le(E)&&(J(E.left)&&(x.left=E.left),J(E.top)&&(x.top=E.top),J(E.width)&&E.width!==x.width&&(P=!0,x.width=E.width),J(E.height)&&E.height!==x.height&&(k=!0,x.height=E.height),w&&(P?x.height=x.width/w:k&&(x.width=x.height*w)),this.renderCropBox()),this},getCroppedCanvas:function(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var x=this.canvasData,w=bA(this.image,this.imageData,x,E);if(!this.cropped)return w;var P=this.getData(),k=P.x,R=P.y,U=P.width,$=P.height,Y=w.width/Math.floor(x.naturalWidth);Y!==1&&(k*=Y,R*=Y,U*=Y,$*=Y);var z=U/$,G=Gn({aspectRatio:z,width:E.maxWidth||1/0,height:E.maxHeight||1/0}),q=Gn({aspectRatio:z,width:E.minWidth||0,height:E.minHeight||0},"cover"),Ne=Gn({aspectRatio:z,width:E.width||(Y!==1?w.width:U),height:E.height||(Y!==1?w.height:$)}),Te=Ne.width,Ge=Ne.height;Te=Math.min(G.width,Math.max(q.width,Te)),Ge=Math.min(G.height,Math.max(q.height,Ge));var Ie=document.createElement("canvas"),rt=Ie.getContext("2d");Ie.width=Hn(Te),Ie.height=Hn(Ge),rt.fillStyle=E.fillColor||"transparent",rt.fillRect(0,0,Te,Ge);var ct=E.imageSmoothingEnabled,et=ct===void 0?!0:ct,En=E.imageSmoothingQuality;rt.imageSmoothingEnabled=et,En&&(rt.imageSmoothingQuality=En);var kt=w.width,ee=w.height,_e=k,st=R,jt,wn,bo,yo,Wn,sn;_e<=-U||_e>kt?(_e=0,jt=0,bo=0,Wn=0):_e<=0?(bo=-_e,_e=0,jt=Math.min(kt,U+_e),Wn=jt):_e<=kt&&(bo=0,jt=Math.min(U,kt-_e),Wn=jt),jt<=0||st<=-$||st>ee?(st=0,wn=0,yo=0,sn=0):st<=0?(yo=-st,st=0,wn=Math.min(ee,$+st),sn=wn):st<=ee&&(yo=0,wn=Math.min($,ee-st),sn=wn);var wt=[_e,st,jt,wn];if(Wn>0&&sn>0){var Eo=Te/U;wt.push(bo*Eo,yo*Eo,Wn*Eo,sn*Eo)}return rt.drawImage.apply(rt,[w].concat(d(wt.map(function($r){return Math.floor(Hn($r))})))),Ie},setAspectRatio:function(E){var x=this.options;return!this.disabled&&!pe(E)&&(x.aspectRatio=Math.max(0,E)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(E){var x=this.options,w=this.dragBox,P=this.face;if(this.ready&&!this.disabled){var k=E===Pe,R=x.movable&&E===ke;E=k||R?E:je,x.dragMode=E,Ya(w,ye,E),ta(w,W,k),ta(w,fe,R),x.cropBoxMovable||(Ya(P,ye,E),ta(P,W,k),ta(P,fe,R))}return this}},AA=y.Cropper,Vf=function(){function C(E){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(i(this,C),!E||!go.test(E.tagName))throw new Error("The first argument is required and must be an or element.");this.element=E,this.options=ge({},F,le(x)&&x),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 l(C,[{key:"init",value:function(){var x=this.element,w=x.tagName.toLowerCase(),P;if(!x[T]){if(x[T]=this,w==="img"){if(this.isImg=!0,P=x.getAttribute("src")||"",this.originalUrl=P,!P)return;P=x.src}else w==="canvas"&&window.HTMLCanvasElement&&(P=x.toDataURL());this.load(P)}}},{key:"load",value:function(x){var w=this;if(x){this.url=x,this.imageData={};var P=this.element,k=this.options;if(!k.rotatable&&!k.scalable&&(k.checkOrientation=!1),!k.checkOrientation||!window.ArrayBuffer){this.clone();return}if(mo.test(x)){vo.test(x)?this.read(wA(x)):this.clone();return}var R=new XMLHttpRequest,U=this.clone.bind(this);this.reloading=!0,this.xhr=R,R.onabort=U,R.onerror=U,R.ontimeout=U,R.onprogress=function(){R.getResponseHeader("content-type")!==Vn&&R.abort()},R.onload=function(){w.read(R.response)},R.onloadend=function(){w.reloading=!1,w.xhr=null},k.checkCrossOrigin&&Ff(x)&&P.crossOrigin&&(x=Lf(x)),R.open("GET",x,!0),R.responseType="arraybuffer",R.withCredentials=P.crossOrigin==="use-credentials",R.send()}}},{key:"read",value:function(x){var w=this.options,P=this.imageData,k=SA(x),R=0,U=1,$=1;if(k>1){this.url=xA(x,Vn);var Y=OA(k);R=Y.rotate,U=Y.scaleX,$=Y.scaleY}w.rotatable&&(P.rotate=R),w.scalable&&(P.scaleX=U,P.scaleY=$),this.clone()}},{key:"clone",value:function(){var x=this.element,w=this.url,P=x.crossOrigin,k=w;this.options.checkCrossOrigin&&Ff(w)&&(P||(P="anonymous"),k=Lf(w)),this.crossOrigin=P,this.crossOriginUrl=k;var R=document.createElement("img");P&&(R.crossOrigin=P),R.src=k||w,R.alt=x.alt||"The image to crop",this.image=R,R.onload=this.start.bind(this),R.onerror=this.stop.bind(this),lt(R,we),x.parentNode.insertBefore(R,x.nextSibling)}},{key:"start",value:function(){var x=this,w=this.image;w.onload=null,w.onerror=null,this.sizing=!0;var P=y.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(y.navigator.userAgent),k=function(Y,z){ge(x.imageData,{naturalWidth:Y,naturalHeight:z,aspectRatio:Y/z}),x.initialImageData=ge({},x.imageData),x.sizing=!1,x.sized=!0,x.build()};if(w.naturalWidth&&!P){k(w.naturalWidth,w.naturalHeight);return}var R=document.createElement("img"),U=document.body||document.documentElement;this.sizingImage=R,R.onload=function(){k(R.width,R.height),P||U.removeChild(R)},R.src=w.src,P||(R.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(R))}},{key:"stop",value:function(){var x=this.image;x.onload=null,x.onerror=null,x.parentNode.removeChild(x),this.image=null}},{key:"build",value:function(){if(!(!this.sized||this.ready)){var x=this.element,w=this.options,P=this.image,k=x.parentNode,R=document.createElement("div");R.innerHTML=V;var U=R.querySelector(".".concat(T,"-container")),$=U.querySelector(".".concat(T,"-canvas")),Y=U.querySelector(".".concat(T,"-drag-box")),z=U.querySelector(".".concat(T,"-crop-box")),G=z.querySelector(".".concat(T,"-face"));this.container=k,this.cropper=U,this.canvas=$,this.dragBox=Y,this.cropBox=z,this.viewBox=U.querySelector(".".concat(T,"-view-box")),this.face=G,$.appendChild(P),lt(x,ne),k.insertBefore(U,x.nextSibling),this.isImg||rn(P,we),this.initPreview(),this.bind(),w.initialAspectRatio=Math.max(0,w.initialAspectRatio)||NaN,w.aspectRatio=Math.max(0,w.aspectRatio)||NaN,w.viewMode=Math.max(0,Math.min(3,Math.round(w.viewMode)))||0,lt(z,ne),w.guides||lt(z.getElementsByClassName("".concat(T,"-dashed")),ne),w.center||lt(z.getElementsByClassName("".concat(T,"-center")),ne),w.background&<(U,"".concat(T,"-bg")),w.highlight||lt(G,Ze),w.cropBoxMovable&&(lt(G,fe),Ya(G,ye,O)),w.cropBoxResizable||(lt(z.getElementsByClassName("".concat(T,"-line")),ne),lt(z.getElementsByClassName("".concat(T,"-point")),ne)),this.render(),this.ready=!0,this.setDragMode(w.dragMode),w.autoCrop&&this.crop(),this.setData(w.data),oe(w.ready)&&Lt(x,$o,w.ready,{once:!0}),na(x,$o)}}},{key:"unbuild",value:function(){this.ready&&(this.ready=!1,this.unbind(),this.resetPreview(),this.cropper.parentNode.removeChild(this.cropper),rn(this.element,ne))}},{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=AA,C}},{key:"setDefaults",value:function(x){ge(F,le(x)&&x)}}]),C}();return ge(Vf.prototype,TA,CA,NA,kA,IA,_A),Vf})})(vd);var wb=vd.exports;Object.defineProperty(md,"__esModule",{value:!0});var gd=o,xb=wb,Sb=Ob(xb);function Ob(e){return e&&e.__esModule?e:{default:e}}function Tb(e,t){var n={};for(var a in e)t.indexOf(a)>=0||Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=e[a]);return n}var Cb=typeof window>"u"?[String,Array]:[String,Array,Element,NodeList],Nb=md.default={render:function(){var t=this.crossorigin||void 0;return(0,gd.h)("div",{style:this.containerStyle},[(0,gd.h)("img",{ref:"img",src:this.src,alt:this.alt||"image",style:[{"max-width":"100%"},this.imgStyle],crossorigin:t})])},props:{containerStyle:Object,src:{type:String,default:""},alt:String,imgStyle:Object,viewMode:Number,dragMode:String,initialAspectRatio:Number,aspectRatio:Number,data:Object,preview:Cb,responsive:{type:Boolean,default:!0},restore:{type:Boolean,default:!0},checkCrossOrigin:{type:Boolean,default:!0},checkOrientation:{type:Boolean,default:!0},crossorigin:{type:String},modal:{type:Boolean,default:!0},guides:{type:Boolean,default:!0},center:{type:Boolean,default:!0},highlight:{type:Boolean,default:!0},background:{type:Boolean,default:!0},autoCrop:{type:Boolean,default:!0},autoCropArea:Number,movable:{type:Boolean,default:!0},rotatable:{type:Boolean,default:!0},scalable:{type:Boolean,default:!0},zoomable:{type:Boolean,default:!0},zoomOnTouch:{type:Boolean,default:!0},zoomOnWheel:{type:Boolean,default:!0},wheelZoomRatio:Number,cropBoxMovable:{type:Boolean,default:!0},cropBoxResizable:{type:Boolean,default:!0},toggleDragModeOnDblclick:{type:Boolean,default:!0},minCanvasWidth:Number,minCanvasHeight:Number,minCropBoxWidth:Number,minCropBoxHeight:Number,minContainerWidth:Number,minContainerHeight:Number,ready:Function,cropstart:Function,cropmove:Function,cropend:Function,crop:Function,zoom:Function},mounted:function(){var t=this.$options.props;t.containerStyle,t.src,t.alt,t.imgStyle;var n=Tb(t,["containerStyle","src","alt","imgStyle"]),a={};for(var r in n)this[r]!==void 0&&(a[r]=this[r]);this.cropper=new Sb.default(this.$refs.img,a)},methods:{reset:function(){return this.cropper.reset()},clear:function(){return this.cropper.clear()},initCrop:function(){return this.cropper.crop()},replace:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.cropper.replace(t,n)},enable:function(){return this.cropper.enable()},disable:function(){return this.cropper.disable()},destroy:function(){return this.cropper.destroy()},move:function(t,n){return this.cropper.move(t,n)},moveTo:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t;return this.cropper.moveTo(t,n)},relativeZoom:function(t,n){return this.cropper.zoom(t,n)},zoomTo:function(t,n){return this.cropper.zoomTo(t,n)},rotate:function(t){return this.cropper.rotate(t)},rotateTo:function(t){return this.cropper.rotateTo(t)},scaleX:function(t){return this.cropper.scaleX(t)},scaleY:function(t){return this.cropper.scaleY(t)},scale:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t;return this.cropper.scale(t,n)},getData:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return this.cropper.getData(t)},setData:function(t){return this.cropper.setData(t)},getContainerData:function(){return this.cropper.getContainerData()},getImageData:function(){return this.cropper.getImageData()},getCanvasData:function(){return this.cropper.getCanvasData()},setCanvasData:function(t){return this.cropper.setCanvasData(t)},getCropBoxData:function(){return this.cropper.getCropBoxData()},setCropBoxData:function(t){return this.cropper.setCropBoxData(t)},getCroppedCanvas:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.cropper.getCroppedCanvas(t)},setAspectRatio:function(t){return this.cropper.setAspectRatio(t)},setDragMode:function(t){return this.cropper.setDragMode(t)}}};const Dt=o.defineComponent({__name:"Button",props:{variant:{default:"secondary"},type:{default:"button"},href:{},loading:{type:Boolean,default:!1}},setup(e){const t={primary:"bg-blue-500 dark:bg-blue-600/50 focus:outline-blue-500",secondary:"bg-gray-600 dark:bg-gray-600/50 focus:outline-gray-600",success:"bg-green-500 dark:bg-green-600/50 focus:outline-green-500",warning:"bg-orange-400 dark:bg-orange-600/50 focus:outline-orange-400",danger:"bg-red-500 dark:bg-red-600/50 focus:outline-red-500",transparent:"bg-transparent"},n=e,a=o.computed(()=>t[n.variant]);return(r,i)=>(o.openBlock(),o.createBlock(o.resolveDynamicComponent(r.href?"a":"button"),{class:o.normalizeClass(["inline-flex items-center py-2 px-4 border-0 uppercase rounded-md shadow-sm text-xs font-medium text-white hover:shadow-md hover:opacity-75 disabled:opacity-50 focus:outline-none focus:ring-1",a.value]),href:r.href,type:r.type},{default:o.withCtx(()=>[r.loading?(o.openBlock(),o.createBlock(xo,{key:0,class:"mr-2 w-3 h-3"})):o.createCommentVNode("",!0),o.renderSlot(r.$slots,"default")]),_:3},8,["class","href","type"]))}}),kb={class:"px-4 pt-5 pb-4 sm:p-6 sm:pb-4"},Ib={class:"sm:flex sm:items-start"},_b={class:"text-left w-full space-y-6"},Ab={class:"mt-2 w-full space-y-6"},Db={class:"mt-5 sm:mt-4 px-4 sm:px-6 pb-4 sm:flex sm:flex-row-reverse sm:gap-x-2 space-y-3 sm:space-y-0"},pr=o.defineComponent({__name:"InputModal",props:{name:{},title:{},onSubmit:{type:Function}},setup(e){return(t,n)=>(o.openBlock(),o.createBlock(_o,{as:"template",class:"nova-file-manager",name:t.name},{default:o.withCtx(({close:a})=>[o.createVNode(o.unref(un),{class:"relative bg-gray-200 dark:bg-gray-900 rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:max-w-lg w-full"},{default:o.withCtx(()=>[o.createElementVNode("form",{name:"input-modal",onSubmit:n[0]||(n[0]=o.withModifiers((...r)=>t.onSubmit&&t.onSubmit(...r),["prevent"]))},[o.createElementVNode("div",kb,[o.createElementVNode("div",Ib,[o.createElementVNode("div",_b,[o.createVNode(o.unref(nd),{as:"h3",class:"text-lg leading-6 font-medium text-gray-700 dark:text-gray-200"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(t.title),1)]),_:1}),o.createElementVNode("div",Ab,[o.renderSlot(t.$slots,"inputs")])])])]),o.createElementVNode("div",Db,[o.renderSlot(t.$slots,"submitButton"),o.renderSlot(t.$slots,"cancelButton",{close:a})])],32)]),_:2},1024)]),_:3},8,["name"]))}}),Rb={class:"rounded-md overflow-auto"},Pb={class:"relative rounded-md text-center overflow-hidden w-full"},Bb=o.createElementVNode("div",{class:"absolute inset-0 opacity-50 bg-stripes bg-stripes-gray-400"},null,-1),Mb=["src","alt"],Fb={class:"w-full border rounded-md space-y-2 px-3 py-2 bg-gray-100 dark:bg-gray-900 shadow-sm focus-within:ring-1 focus-within:ring-blue-600 focus-within:border-blue-600 border-gray-400 dark:border-gray-700"},Lb={class:"block text-xs font-medium text-gray-700 dark:text-gray-200",for:"name"},jb=["placeholder"],Vb={class:"mt-2 text-xs text-gray-400",id:"name-description"},bd=o.defineComponent({__name:"UploadCropModal",props:{file:{},name:{},onSubmit:{type:Function},destFile:{},destName:{}},setup(e){const t=e,n=Re(),a=o.ref(null);o.onMounted(()=>{a.value=t.destName??""});const r=o.computed(()=>URL.createObjectURL(t.destFile)),i=l=>n.closeModal({name:l}),s=()=>a.value&&t.onSubmit(a.value);return(l,c)=>(o.openBlock(),o.createBlock(pr,{name:l.name,"on-submit":s,title:l.__("NovaFileManager.uploadCropTitle")},{inputs:o.withCtx(()=>[o.createElementVNode("div",Rb,[o.createElementVNode("div",Pb,[Bb,o.createElementVNode("img",{class:"relative z-10 object-contain h-48 w-full",src:r.value,alt:l.name},null,8,Mb)])]),o.createElementVNode("div",null,[o.createElementVNode("div",Fb,[o.createElementVNode("label",Lb,o.toDisplayString(l.__("Name")),1),o.withDirectives(o.createElementVNode("input",{id:"name","onUpdate:modelValue":c[0]||(c[0]=d=>a.value=d),placeholder:l.__("NovaFileManager.actions.uploadCrop"),class:"block w-full border-0 p-0 bg-gray-100 dark:bg-gray-900 placeholder-gray-400 sm:text-sm text-black dark:text-white focus:outline-none focus:ring-0",name:"name",type:"text"},null,8,jb),[[o.vModelText,a.value]])]),o.createElementVNode("p",Vb,o.toDisplayString(l.__("NovaFileManager.edit.originalName",{name:l.file.name})),1)])]),submitButton:o.withCtx(()=>[o.createVNode(Dt,{disabled:!a.value,class:"w-full sm:w-auto",type:"submit",variant:"primary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(l.__("NovaFileManager.actions.upload")),1)]),_:1},8,["disabled"])]),cancelButton:o.withCtx(()=>[o.createVNode(Dt,{class:"w-full sm:w-auto",type:"reset",variant:"secondary",onClick:c[1]||(c[1]=d=>i(l.name))},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(l.__("Cancel")),1)]),_:1})]),_:1},8,["name","title"]))}}),Ub={class:"w-full flex flex-col flex-col-reverse gap-2 md:flex-row justify-between items-start"},Hb={class:"text-lg font-medium text-gray-900 dark:text-gray-400 break-all w-full"},zb={class:"flex flex-row gap-2 justify-end flex-shrink-0"},Gb={class:"h-full max-h-[70vh]"},Wb=o.defineComponent({__name:"CropImageModal",props:{file:{},name:{},onConfirm:{type:Function}},setup(e){const t=e,n=Re(),a=o.ref(),r=o.ref(null),i=o.ref(),s=o.computed(()=>n.isOpen(Tn)),l=o.computed(()=>n.cropperOptions),c=o.computed(()=>({height:"100%",minHeight:"60vh"})),d=o.computed(()=>{const u=r.value?.getData(),m=`${Math.round(u.width)}_${Math.round(u.height)}_${Math.round(u.x)}_${Math.round(u.y)}`;return t.file?.name.replace(t.file?.extension,`${m}.${t.file?.extension}`)}),f=u=>n.openModal({name:u}),p=u=>n.closeModal({name:u}),h=()=>{r.value?.getCroppedCanvas().toBlob(u=>{u&&(i.value=new File([u],t.file.name,{type:t.file.mime}),f(Tn))})},v=u=>{if(!i.value)return;const m=new File([i.value],u,{type:t.file.mime});p(Tn),p(t.name),t.onConfirm(m)};return(u,m)=>(o.openBlock(),o.createBlock(_o,{as:"template",class:"nova-file-manager",name:u.name},{default:o.withCtx(({close:y})=>[o.createVNode(o.unref(un),{class:"relative bg-gray-100 dark:bg-gray-900 rounded-lg overflow-hidden shadow-xl transform transition-all w-full max-w-7xl p-4 flex flex-col gap-4 h-[80vh] max-h-[80vh]"},{default:o.withCtx(()=>[o.createElementVNode("div",Ub,[o.createElementVNode("h2",Hb,o.toDisplayString(u.__("NovaFileManager.actions.cropImage",{image:u.file.name})),1),o.createElementVNode("div",zb,[o.createVNode(it,{ref_key:"buttonRef",ref:a,title:u.__("NovaFileManager.actions.close"),onClick:o.withModifiers(y,["prevent","stop"])},{default:o.withCtx(()=>[o.createVNode(o.unref(ss),{class:"w-5 h-5"})]),_:2},1032,["title","onClick"]),o.createVNode(it,{variant:"success",onClick:h},{default:o.withCtx(()=>[o.createVNode(o.unref(Za),{class:"h-5 w-5"})]),_:1})])]),o.createElementVNode("div",Gb,[o.createVNode(o.unref(Nb),o.mergeProps({ref_key:"cropper",ref:r,containerStyle:c.value,src:u.file.url,alt:u.file.name},l.value),null,16,["containerStyle","src","alt"])]),s.value?(o.openBlock(),o.createBlock(bd,{key:0,file:u.file,name:o.unref(Tn),"on-submit":v,"dest-file":i.value,"dest-name":d.value},null,8,["file","name","dest-file","dest-name"])):o.createCommentVNode("",!0)]),_:2},1024)]),_:1},8,["name"]))}});var Kb=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],a=0;a"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var p=yd[t.format]||yd.default;window.clipboardData.setData(p,e)}else f.clipboardData.clearData(),f.clipboardData.setData(t.format,e);t.onCopy&&(f.preventDefault(),t.onCopy(f.clipboardData))}),document.body.appendChild(l),i.selectNodeContents(l),s.addRange(i);var d=document.execCommand("copy");if(!d)throw new Error("copy command was unsuccessful");c=!0}catch(f){n&&console.error("unable to copy using execCommand: ",f),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),c=!0}catch(p){n&&console.error("unable to copy using clipboardData: ",p),n&&console.error("falling back to prompt"),a=Jb("message"in t?t.message:Yb),window.prompt(a,e)}}finally{s&&(typeof s.removeRange=="function"?s.removeRange(i):s.removeAllRanges()),l&&document.body.removeChild(l),r()}return c}var Zb=Qb;const qb=Sn(Zb);function Ed(){return{copy:t=>{qb(t)}}}function hr(e){const t=Re(),{error:n}=qf(t);return{message:o.computed(()=>n?.value?.bag?.message),invalid:o.computed(()=>n?.value?.attribute===e),errors:o.computed(()=>n?.value?.bag?.errors)}}function $b(){return{__:(t,n)=>{let a=window.Nova.config("translations")[t]?window.Nova.config("translations")[t]:t;return Object.entries(n??{}).forEach(([r,i])=>{if(i===null){console.error(`Translation '${a}' for key '${r}' contains a null replacement.`);return}i=String(i);const s=[`:${r}`,`:${r.toUpperCase()}`,`:${r.charAt(0).toUpperCase()}${r.slice(1)}`],l=[i,i.toUpperCase(),i.charAt(0).toUpperCase()+i.slice(1)];for(let c=s.length-1;c>=0;c--)a=a.replace(s[c],l[c])}),a}}}function Ta(){const e=Re(),t=o.computed(()=>e.permissions?.folder.create),n=o.computed(()=>e.permissions?.file.edit),a=o.computed(()=>e.permissions?.file.delete),r=o.computed(()=>e.permissions?.folder.delete),i=o.computed(()=>e.permissions?.file.download),s=o.computed(()=>e.permissions?.file.rename),l=o.computed(()=>e.permissions?.folder.rename),c=o.computed(()=>e.permissions?.file.unzip),d=o.computed(()=>e.permissions?.file.upload);return{showCreateFolder:t,showCropImage:n,showDeleteFile:a,showDeleteFolder:r,showDownloadFile:i,showRenameFile:s,showRenameFolder:l,showUnzipFile:c,showUploadFile:d}}function wd(){const e=Re(),t=o.computed(()=>e.usePintura),n=o.computed(()=>e.pinturaOptions);return{usePinturaEditor:t,pinturaOptions:n}}const ey={class:"sm:flex sm:items-start"},ty={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left"},ny={class:"mt-2"},oy={class:"text-sm text-gray-500 dark:text-gray-400"},ay={class:"mt-5 sm:mt-4 sm:flex sm:flex-row-reverse sm:gap-x-2 space-y-3 sm:space-y-0"},xd=o.defineComponent({__name:"ConfirmModal",props:{name:{},attribute:{},title:{},content:{},icon:{},variant:{default:"danger"}},setup(e){const t={danger:{iconBackground:"bg-red-100 dark:bg-red-800/30",iconColor:"text-red-600 dark:text-red-500"}},n=e,{invalid:a,errors:r}=hr(n.attribute),i=o.computed(()=>n.variant?t[n.variant].iconColor:""),s=o.computed(()=>n.variant?t[n.variant].iconBackground:"");return(l,c)=>(o.openBlock(),o.createBlock(_o,{as:"template",class:"nova-file-manager",name:l.name},{default:o.withCtx(({close:d})=>[o.createVNode(o.unref(un),{class:"relative bg-gray-100 dark:bg-gray-900 rounded-lg px-4 pt-5 pb-4 text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:max-w-lg sm:w-full sm:p-6"},{default:o.withCtx(()=>[o.createElementVNode("div",ey,[o.createElementVNode("div",{class:o.normalizeClass(`${s.value} mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full sm:mx-0 sm:h-10 sm:w-10`)},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(l.icon),{class:o.normalizeClass(`${i.value} h-6 w-6`),"aria-hidden":"true"},null,8,["class"]))],2),o.createElementVNode("div",ty,[o.createVNode(o.unref(nd),{as:"h3",class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-100"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(l.title),1)]),_:1}),o.createElementVNode("div",ny,[o.createElementVNode("p",oy,o.toDisplayString(l.content),1)]),o.unref(a)?(o.openBlock(!0),o.createElementBlock(o.Fragment,{key:0},o.renderList(o.unref(r),(f,p)=>(o.openBlock(),o.createElementBlock("p",{key:`confirm_modal_error_${p}`,class:"mt-2 text-sm text-red-600"},o.toDisplayString(f),1))),128)):o.createCommentVNode("",!0)])]),o.createElementVNode("div",ay,[o.renderSlot(l.$slots,"confirmButton"),o.renderSlot(l.$slots,"cancelButton",{close:d})])]),_:2},1024)]),_:3},8,["name"]))}}),Sd=o.defineComponent({__name:"DeleteFileModal",props:{isOpen:{type:Boolean,default:!1},name:{},onConfirm:{},count:{}},setup(e){const t=o.computed(()=>vl);return(n,a)=>(o.openBlock(),o.createBlock(xd,{content:n.__("NovaFileManager.deleteFileContent"),icon:t.value,"is-open":n.isOpen,name:n.name,title:n.__("NovaFileManager.deleteFileTitle",{count:n.count}),variant:"danger",attribute:"deleteFile"},{confirmButton:o.withCtx(()=>[o.createVNode(Dt,{class:"w-full sm:w-auto",type:"button",variant:"danger",onClick:n.onConfirm},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(n.__("Delete")),1)]),_:1},8,["onClick"])]),cancelButton:o.withCtx(({close:r})=>[o.createVNode(Dt,{class:"w-full sm:w-auto",type:"button",variant:"secondary",onClick:r},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(n.__("Cancel")),1)]),_:2},1032,["onClick"])]),_:1},8,["content","icon","is-open","name","title"]))}}),ry={class:"w-full flex flex-col flex-col-reverse gap-2 md:flex-row justify-between items-start"},sy={class:"text-lg font-medium text-gray-900 dark:text-gray-400 break-all w-full"},iy={class:"flex flex-row gap-2 justify-end flex-shrink-0"},ly={key:0,class:"h-full max-h-[70vh] flex flex-col items-center justify-center space-y-4"},cy={class:"text-red-500 text-xl"},dy=o.defineComponent({__name:"EditImageModal",props:{file:{},name:{},onConfirm:{type:Function}},setup(e){const t=e,n=Re(),a=o.ref(),r=o.ref(),i=o.ref(),s=o.computed(()=>n.isOpen(Tn)),l=o.ref(),c=o.ref(),{pinturaOptions:d}=wd();o.watchEffect(()=>{if(l.value&&!c.value)try{const{appendDefaultEditor:u,editorOptions:m}=window.novaFileManagerEditor;c.value=u(l.value,{...m,...d.value,src:t.file.url,enableButtonExport:!1}),c.value&&c.value.on("loaderror",({error:y})=>window.Nova.error(y.message))}catch(u){r.value=!0,console.error(u)}});const f=u=>n.openModal({name:u}),p=u=>n.closeModal({name:u}),h=()=>{c.value?.processImage().then(({dest:u})=>{i.value=u,f(Tn)})},v=u=>{if(!i.value)return;const m=new File([i.value],u,{type:t.file.mime});p(Tn),p(t.name),t.onConfirm(m)};return(u,m)=>(o.openBlock(),o.createBlock(_o,{as:"template",class:"nova-file-manager",name:u.name},{default:o.withCtx(({close:y})=>[o.createVNode(o.unref(un),{class:"relative bg-gray-100 dark:bg-gray-900 rounded-lg overflow-hidden shadow-xl transform transition-all w-full max-w-7xl p-4 flex flex-col gap-4 h-[80vh] max-h-[80vh]"},{default:o.withCtx(()=>[o.createElementVNode("div",ry,[o.createElementVNode("h2",sy,o.toDisplayString(u.__("NovaFileManager.actions.editImage",{image:u.file.name})),1),o.createElementVNode("div",iy,[o.createVNode(it,{ref_key:"buttonRef",ref:a,title:u.__("NovaFileManager.actions.close"),onClick:o.withModifiers(y,["prevent","stop"])},{default:o.withCtx(()=>[o.createVNode(o.unref(ss),{class:"w-5 h-5"})]),_:2},1032,["title","onClick"]),o.createVNode(it,{variant:"success",onClick:h},{default:o.withCtx(()=>[o.createVNode(o.unref(Za),{class:"h-5 w-5"})]),_:1})])]),r.value?(o.openBlock(),o.createElementBlock("div",ly,[o.createVNode(o.unref(El),{class:"w-16 h-16 text-red-500"}),o.createElementVNode("p",cy,o.toDisplayString(u.__("NovaFileManager.pintura.loadingError")),1)])):(o.openBlock(),o.createElementBlock("div",{key:1,class:"h-full max-h-[70vh]",ref_key:"editorRef",ref:l},null,512)),s.value?(o.openBlock(),o.createBlock(bd,{key:2,file:u.file,name:o.unref(Tn),"on-submit":v,"dest-file":i.value},null,8,["file","name","dest-file"])):o.createCommentVNode("",!0)]),_:2},1024)]),_:1},8,["name"]))}}),uy={class:"block text-xs font-medium text-gray-700 dark:text-gray-200",for:"name"},fy=["placeholder"],py=o.defineComponent({__name:"RenameFileModal",props:{name:{},onSubmit:{type:Function},from:{}},setup(e){const t=e,{invalid:n,errors:a}=hr(Qt.RENAME_FILE),r=o.ref(null);o.onMounted(()=>r.value=t.from);const i=()=>r.value&&t.onSubmit(r.value);return(s,l)=>(o.openBlock(),o.createBlock(pr,{name:s.name,"on-submit":i,title:s.__("NovaFileManager.renameFileTitle")},{inputs:o.withCtx(()=>[o.createElementVNode("div",null,[o.createElementVNode("div",{class:o.normalizeClass(["w-full border rounded-md space-y-2 px-3 py-2 bg-gray-100 dark:bg-gray-900 shadow-sm focus-within:ring-1 focus-within:ring-blue-600 focus-within:border-blue-600",o.unref(n)?"border-red-400 dark:border-red-700":"border-gray-400 dark:border-gray-700"])},[o.createElementVNode("label",uy,o.toDisplayString(s.__("Name")),1),o.withDirectives(o.createElementVNode("input",{id:"name","onUpdate:modelValue":l[0]||(l[0]=c=>r.value=c),placeholder:s.__("Name"),class:"block w-full border-0 p-0 bg-gray-100 dark:bg-gray-900 placeholder-gray-400 sm:text-sm text-black dark:text-white focus:outline-none focus:ring-0",name:"name",type:"text"},null,8,fy),[[o.vModelText,r.value]])],2),o.unref(n)?(o.openBlock(!0),o.createElementBlock(o.Fragment,{key:0},o.renderList(o.unref(a),(c,d)=>(o.openBlock(),o.createElementBlock("p",{key:`rename_file_modal_error_${d}`,class:"mt-2 text-sm text-red-600"},o.toDisplayString(c),1))),128)):o.createCommentVNode("",!0)])]),submitButton:o.withCtx(()=>[o.createVNode(Dt,{disabled:r.value===s.from,class:"w-full sm:w-auto",type:"submit",variant:"primary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(s.__("Submit")),1)]),_:1},8,["disabled"])]),cancelButton:o.withCtx(({close:c})=>[o.createVNode(Dt,{class:"w-full sm:w-auto",type:"button",variant:"secondary",onClick:c},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(s.__("Cancel")),1)]),_:2},1032,["onClick"])]),_:1},8,["name","title"]))}}),hy={class:"w-full flex flex-col flex-col-reverse gap-y-2 md:flex-row justify-between items-start"},my={class:"text-lg font-medium text-gray-900 dark:text-gray-400 break-all w-full"},vy={class:"flex flex-row gap-2 justify-end flex-shrink-0"},gy={class:"overflow-hidden flex flex-col md:flex-row gap-4 w-full"},by={class:"block relative w-full md:w-4/6 overflow-hidden rounded-lg bg-gray-500/10 flex items-center justify-center"},yy={key:1,class:"w-full max-w-screen max-h-[80vh] relative",controls:"controls"},Ey=["src"],wy=["src"],xy={class:"w-full md:w-2/6"},Sy={class:"font-medium text-gray-800 dark:text-gray-100"},Oy={class:"mt-2 divide-y divide-gray-200 dark:divide-gray-800/40 border-t border-b border-gray-300 dark:border-gray-800/70"},Ty={class:"flex justify-between py-3 text-sm font-medium"},Cy={class:"text-gray-500"},Ny={class:"text-gray-400 dark:text-gray-600"},ky={class:"flex justify-between py-3 text-sm font-medium"},Iy={class:"text-gray-500"},_y={class:"text-gray-400 dark:text-gray-600"},Ay={class:"flex justify-between py-3 text-sm font-medium"},Dy={class:"text-gray-500"},Ry={class:"text-gray-400 dark:text-gray-600"},Py={class:"text-gray-500"},By={class:"text-gray-400 dark:text-gray-600"},$s=o.defineComponent({__name:"PreviewModal",props:{file:{},readOnly:{type:Boolean,default:!1}},setup(e){const t=e,n=Re(),{copy:a}=Ed(),{showCropImage:r,showDeleteFile:i,showDownloadFile:s,showRenameFile:l,showUnzipFile:c}=Ta(),{usePinturaEditor:d}=wd(),f=o.ref(),p=o.computed(()=>n.isOpen(`crop-image-${t.file?.id}`)),h=o.computed(()=>n.isOpen(`edit-image-${t.file?.id}`)),v=o.computed(()=>n.isField),u=o.computed(()=>n.downloadUrl(t.file)),m=I=>n.openModal({name:I}),y=I=>n.renameFile({id:t.file.id,from:t.file.path,to:I}),b=()=>n.deleteFiles({paths:[t.file.path]}),g=I=>n.unzipFile({path:I}),T=()=>{n.selectFile({file:t.file}),n.confirm()},O=()=>{n.preview=void 0,n.fixPortal()},S=I=>{O(),m(la),n.upload({files:[I]})},N=I=>{a(I.url),window.Nova.success("OK!")};return(I,_)=>(o.openBlock(),o.createBlock(_o,{as:"template",class:"nova-file-manager",name:o.unref(ps),"initial-focus-ref":f.value},{default:o.withCtx(()=>[o.createVNode(o.unref(un),{class:"relative bg-gray-100 dark:bg-gray-900 rounded-lg overflow-hidden shadow-xl transform transition-all w-full max-w-7xl p-4 flex flex-col gap-4"},{default:o.withCtx(()=>[o.createElementVNode("div",hy,[o.createElementVNode("h2",my,o.toDisplayString(I.file?.name),1),o.createElementVNode("div",vy,[!I.readOnly&&o.unref(i)?(o.openBlock(),o.createBlock(it,{key:0,variant:"danger",onClick:_[0]||(_[0]=A=>m(`${o.unref(Ut).DELETE_FILES}-${I.file?.id}`)),title:I.__("NovaFileManager.actions.delete")},{default:o.withCtx(()=>[o.createVNode(o.unref(bl),{class:"w-5 h-5"})]),_:1},8,["title"])):o.createCommentVNode("",!0),!I.readOnly&&o.unref(r)&&!o.unref(d)&&I.file?.type==="image"?(o.openBlock(),o.createBlock(it,{key:1,variant:"secondary",onClick:_[1]||(_[1]=A=>m(`crop-image-${I.file?.id}`)),title:I.__("NovaFileManager.actions.cropImage",{image:I.file?.name})},{default:o.withCtx(()=>[o.createVNode(hd,{class:"w-5 h-5"})]),_:1},8,["title"])):o.createCommentVNode("",!0),!I.readOnly&&o.unref(r)&&o.unref(d)&&I.file?.type==="image"?(o.openBlock(),o.createBlock(it,{key:2,variant:"secondary",onClick:_[2]||(_[2]=A=>m(`edit-image-${I.file?.id}`)),title:I.__("NovaFileManager.actions.editImage",{image:I.file?.name})},{default:o.withCtx(()=>[o.createVNode(hd,{class:"w-5 h-5"})]),_:1},8,["title"])):o.createCommentVNode("",!0),!I.readOnly&&o.unref(c)&&I.file?.type==="zip"?(o.openBlock(),o.createBlock(it,{key:3,variant:"secondary",onClick:_[3]||(_[3]=A=>g(I.file.path)),title:I.__("NovaFileManager.actions.unzip")},{default:o.withCtx(()=>[o.createVNode(o.unref($f),{class:"w-5 h-5"})]),_:1},8,["title"])):o.createCommentVNode("",!0),o.createVNode(it,{onClick:_[4]||(_[4]=A=>N(I.file)),variant:"secondary",title:I.__("NovaFileManager.actions.copy")},{default:o.withCtx(()=>[o.createVNode(o.unref(tp),{class:"w-5 h-5"})]),_:1},8,["title"]),o.unref(s)?(o.openBlock(),o.createBlock(it,{key:4,"as-anchor":!0,download:I.file?.name,href:u.value,variant:"secondary",title:I.__("NovaFileManager.actions.download")},{default:o.withCtx(()=>[o.createVNode(o.unref(np),{class:"w-5 h-5"})]),_:1},8,["download","href","title"])):o.createCommentVNode("",!0),!I.readOnly&&o.unref(l)?(o.openBlock(),o.createBlock(it,{key:5,variant:"secondary",onClick:_[5]||(_[5]=A=>m(`rename-file-${I.file?.id}`)),title:I.__("NovaFileManager.actions.rename")},{default:o.withCtx(()=>[o.createVNode(o.unref(lp),{class:"w-5 h-5"})]),_:1},8,["title"])):o.createCommentVNode("",!0),o.createVNode(it,{ref_key:"buttonRef",ref:f,onClick:O,title:I.__("NovaFileManager.actions.close")},{default:o.withCtx(()=>[o.createVNode(o.unref(ss),{class:"w-5 h-5"})]),_:1},8,["title"]),v.value?(o.openBlock(),o.createBlock(it,{key:6,variant:"success",onClick:T},{default:o.withCtx(()=>[o.createVNode(o.unref(Za),{class:"h-5 w-5"})]),_:1})):o.createCommentVNode("",!0)])]),o.createElementVNode("div",gy,[o.createElementVNode("div",by,[I.file?.type==="image"?(o.openBlock(),o.createBlock(wl,{key:0,src:I.file.url,"is-thumbnail":!1,"full-width":!1,class:"relative",alt:I.file.name},null,8,["src","alt"])):I.file?.type==="video"?(o.openBlock(),o.createElementBlock("video",yy,[o.createElementVNode("source",{src:I.file?.url},null,8,Ey),o.createTextVNode(" Sorry, your browser doesn't support embedded videos. ")])):I.file?.type==="pdf"?(o.openBlock(),o.createElementBlock("embed",{key:2,src:I.file?.url,type:"application/pdf",class:"w-full max-w-screen h-[80vh]"},null,8,wy)):(o.openBlock(),o.createBlock(o.unref(ra),{key:3,class:"h-40 w-40 text-gray-500 m-12"}))]),o.createElementVNode("div",xy,[o.createElementVNode("div",null,[o.createElementVNode("h3",Sy,o.toDisplayString(I.__("NovaFileManager.preview.information")),1),o.createElementVNode("dl",Oy,[o.createElementVNode("div",Ty,[o.createElementVNode("dt",Cy,o.toDisplayString(I.__("NovaFileManager.meta.size")),1),o.createElementVNode("dd",Ny,o.toDisplayString(I.file?.size),1)]),o.createElementVNode("div",ky,[o.createElementVNode("dt",Iy,o.toDisplayString(I.__("NovaFileManager.meta.mime")),1),o.createElementVNode("dd",_y,o.toDisplayString(I.file?.mime),1)]),o.createElementVNode("div",Ay,[o.createElementVNode("dt",Dy,o.toDisplayString(I.__("NovaFileManager.meta.lastModifiedAt")),1),o.createElementVNode("dd",Ry,o.toDisplayString(I.file?.lastModifiedAt),1)]),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(I.file?.meta,(A,D)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[A?(o.openBlock(),o.createElementBlock("div",{key:D,class:"flex justify-between py-3 text-sm font-medium"},[o.createElementVNode("dt",Py,o.toDisplayString(I.__(`NovaFileManager.meta.${D}`)),1),o.createElementVNode("dd",By,o.toDisplayString(A),1)])):o.createCommentVNode("",!0)],64))),256))])])])]),o.unref(i)?(o.openBlock(),o.createBlock(Sd,{key:0,name:`${o.unref(Ut).DELETE_FILES}-${I.file?.id}`,"on-confirm":b},null,8,["name"])):o.createCommentVNode("",!0),o.unref(r)&&p.value?(o.openBlock(),o.createBlock(Wb,{key:1,name:`crop-image-${I.file?.id}`,file:I.file,"on-confirm":S},null,8,["name","file"])):o.createCommentVNode("",!0),o.unref(r)&&h.value?(o.openBlock(),o.createBlock(dy,{key:2,name:`edit-image-${I.file?.id}`,file:I.file,"on-confirm":S},null,8,["name","file"])):o.createCommentVNode("",!0),o.unref(l)?(o.openBlock(),o.createBlock(py,{key:3,name:`rename-file-${I.file?.id}`,from:I.file?.name,"on-submit":y},null,8,["name","from"])):o.createCommentVNode("",!0)]),_:1})]),_:1},8,["name","initial-focus-ref"]))}}),My={class:"nova-file-manager"},Fy={class:"grid grid-cols-2 md:grid-cols-4 gap-2 mb-2 w-full",role:"group"},Ly=o.defineComponent({__name:"DetailField",props:{field:{},index:{}},setup(e){const t=o.ref(void 0),n=Re(),{copy:a}=Ed(),r=o.computed(()=>n.dark),i=o.computed(()=>n.preview),s=l=>{t.value=l,a(l.url),setTimeout(()=>{t.value=void 0},1e3)};return o.onMounted(()=>n.syncDarkMode()),(l,c)=>{const d=o.resolveComponent("PanelItem");return o.openBlock(),o.createBlock(d,{field:l.field,index:l.index},o.createSlots({_:2},[l.field.value?{name:"value",fn:o.withCtx(()=>[o.createElementVNode("div",My,[o.createElementVNode("div",{class:o.normalizeClass({dark:r.value})},[o.createElementVNode("ul",Fy,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(l.field.value,f=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:f.id},[o.createVNode(xc,{field:l.field,file:f,attribute:l.field.attribute,detail:!0,"on-copy":s},null,8,["field","file","attribute"]),i.value&&i.value.id===f.id?(o.openBlock(),o.createBlock($s,{key:0,file:f,"read-only":!0},null,8,["file"])):o.createCommentVNode("",!0)],64))),128))])],2)])]),key:"0"}:void 0]),1032,["field","index"])}}});var Od={exports:{}};/**! + */(function(e,t){(function(n,a){e.exports=a()})(So,function(){function n(T,w){var E=Object.keys(T);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(T);w&&(x=x.filter(function(M){return Object.getOwnPropertyDescriptor(T,M).enumerable})),E.push.apply(E,x)}return E}function a(T){for(var w=1;wT.length)&&(w=T.length);for(var E=0,x=new Array(w);E
',Q=Number.isNaN||b.isNaN;function Z(T){return typeof T=="number"&&!Q(T)}var de=function(w){return w>0&&w<1/0};function pe(T){return typeof T>"u"}function ve(T){return r(T)==="object"&&T!==null}var Xe=Object.prototype.hasOwnProperty;function le(T){if(!ve(T))return!1;try{var w=T.constructor,E=w.prototype;return w&&E&&Xe.call(E,"isPrototypeOf")}catch{return!1}}function oe(T){return typeof T=="function"}var ce=Array.prototype.slice;function we(T){return Array.from?Array.from(T):ce.call(T)}function ie(T,w){return T&&oe(w)&&(Array.isArray(T)||Z(T.length)?we(T).forEach(function(E,x){w.call(T,E,x,T)}):ve(T)&&Object.keys(T).forEach(function(E){w.call(T,T[E],E,T)})),T}var ge=Object.assign||function(w){for(var E=arguments.length,x=new Array(E>1?E-1:0),M=1;M0&&x.forEach(function(N){ve(N)&&Object.keys(N).forEach(function(P){w[P]=N[P]})}),w},Xa=/\.\d*(?:0|9){12}\d*$/;function zn(T){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return Xa.test(T)?Math.round(T*w)/w:T}var ea=/^width|height|left|top|marginLeft|marginTop$/;function Hn(T,w){var E=T.style;ie(w,function(x,M){ea.test(M)&&Z(x)&&(x="".concat(x,"px")),E[M]=x})}function uI(T,w){return T.classList?T.classList.contains(w):T.className.indexOf(w)>-1}function lt(T,w){if(w){if(Z(T.length)){ie(T,function(x){lt(x,w)});return}if(T.classList){T.classList.add(w);return}var E=T.className.trim();E?E.indexOf(w)<0&&(T.className="".concat(E," ").concat(w)):T.className=w}}function rn(T,w){if(w){if(Z(T.length)){ie(T,function(E){rn(E,w)});return}if(T.classList){T.classList.remove(w);return}T.className.indexOf(w)>=0&&(T.className=T.className.replace(w,""))}}function ta(T,w,E){if(w){if(Z(T.length)){ie(T,function(x){ta(x,w,E)});return}E?lt(T,w):rn(T,w)}}var fI=/([a-z\d])([A-Z])/g;function al(T){return T.replace(fI,"$1-$2").toLowerCase()}function rl(T,w){return ve(T[w])?T[w]:T.dataset?T.dataset[w]:T.getAttribute("data-".concat(al(w)))}function Ya(T,w,E){ve(E)?T[w]=E:T.dataset?T.dataset[w]=E:T.setAttribute("data-".concat(al(w)),E)}function pI(T,w){if(ve(T[w]))try{delete T[w]}catch{T[w]=void 0}else if(T.dataset)try{delete T.dataset[w]}catch{T.dataset[w]=void 0}else T.removeAttribute("data-".concat(al(w)))}var Mf=/\s\s*/,Bf=function(){var T=!1;if(m){var w=!1,E=function(){},x=Object.defineProperty({},"once",{get:function(){return T=!0,w},set:function(N){w=N}});b.addEventListener("test",E,x),b.removeEventListener("test",E,x)}return T}();function Zt(T,w,E){var x=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},M=E;w.trim().split(Mf).forEach(function(N){if(!Bf){var P=T.listeners;P&&P[N]&&P[N][E]&&(M=P[N][E],delete P[N][E],Object.keys(P[N]).length===0&&delete P[N],Object.keys(P).length===0&&delete T.listeners)}T.removeEventListener(N,M,x)})}function Lt(T,w,E){var x=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},M=E;w.trim().split(Mf).forEach(function(N){if(x.once&&!Bf){var P=T.listeners,U=P===void 0?{}:P;M=function(){delete U[N][E],T.removeEventListener(N,M,x);for(var Y=arguments.length,H=new Array(Y),G=0;GMath.abs(E)&&(E=q)})}),E}function qr(T,w){var E=T.pageX,x=T.pageY,M={endX:E,endY:x};return w?M:a({startX:E,startY:x},M)}function vI(T){var w=0,E=0,x=0;return ie(T,function(M){var N=M.startX,P=M.startY;w+=N,E+=P,x+=1}),w/=x,E/=x,{pageX:w,pageY:E}}function Gn(T){var w=T.aspectRatio,E=T.height,x=T.width,M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"contain",N=de(x),P=de(E);if(N&&P){var U=E*w;M==="contain"&&U>x||M==="cover"&&U90?{width:$,height:U}:{width:U,height:$}}function yI(T,w,E,x){var M=w.aspectRatio,N=w.naturalWidth,P=w.naturalHeight,U=w.rotate,$=U===void 0?0:U,Y=w.scaleX,H=Y===void 0?1:Y,G=w.scaleY,q=G===void 0?1:G,ke=E.aspectRatio,Oe=E.naturalWidth,Ge=E.naturalHeight,De=x.fillColor,rt=De===void 0?"transparent":De,ct=x.imageSmoothingEnabled,et=ct===void 0?!0:ct,wn=x.imageSmoothingQuality,Nt=wn===void 0?"low":wn,ee=x.maxWidth,Ae=ee===void 0?1/0:ee,st=x.maxHeight,Vt=st===void 0?1/0:st,xn=x.minWidth,yo=xn===void 0?0:xn,bo=x.minHeight,Wn=bo===void 0?0:bo,sn=document.createElement("canvas"),xt=sn.getContext("2d"),wo=Gn({aspectRatio:ke,width:Ae,height:Vt}),$r=Gn({aspectRatio:ke,width:yo,height:Wn},"cover"),il=Math.min(wo.width,Math.max($r.width,Oe)),ll=Math.min(wo.height,Math.max($r.height,Ge)),Uf=Gn({aspectRatio:M,width:Ae,height:Vt}),zf=Gn({aspectRatio:M,width:yo,height:Wn},"cover"),Hf=Math.min(Uf.width,Math.max(zf.width,N)),Gf=Math.min(Uf.height,Math.max(zf.height,P)),RI=[-Hf/2,-Gf/2,Hf,Gf];return sn.width=zn(il),sn.height=zn(ll),xt.fillStyle=rt,xt.fillRect(0,0,il,ll),xt.save(),xt.translate(il/2,ll/2),xt.rotate($*Math.PI/180),xt.scale(H,q),xt.imageSmoothingEnabled=et,xt.imageSmoothingQuality=Nt,xt.drawImage.apply(xt,[T].concat(d(RI.map(function(PI){return Math.floor(zn(PI))})))),xt.restore(),sn}var Vf=String.fromCharCode;function bI(T,w,E){var x="";E+=w;for(var M=w;M0;)E.push(Vf.apply(null,we(M.subarray(0,x)))),M=M.subarray(x);return"data:".concat(w,";base64,").concat(btoa(E.join("")))}function SI(T){var w=new DataView(T),E;try{var x,M,N;if(w.getUint8(0)===255&&w.getUint8(1)===216)for(var P=w.byteLength,U=2;U+1=8&&(N=Y+G)}}}if(N){var q=w.getUint16(N,x),ke,Oe;for(Oe=0;Oe=0?N:Un),height:Math.max(x.offsetHeight,P>=0?P:L)};this.containerData=U,Hn(M,{width:U.width,height:U.height}),lt(w,ne),rn(M,ne)},initCanvas:function(){var w=this.containerData,E=this.imageData,x=this.options.viewMode,M=Math.abs(E.rotate)%180===90,N=M?E.naturalHeight:E.naturalWidth,P=M?E.naturalWidth:E.naturalHeight,U=N/P,$=w.width,Y=w.height;w.height*U>w.width?x===3?$=w.height*U:Y=w.width/U:x===3?Y=w.width/U:$=w.height*U;var H={aspectRatio:U,naturalWidth:N,naturalHeight:P,width:$,height:Y};this.canvasData=H,this.limited=x===1||x===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=(w.width-H.width)/2,H.top=(w.height-H.height)/2,H.oldLeft=H.left,H.oldTop=H.top,this.initialCanvasData=ge({},H)},limitCanvas:function(w,E){var x=this.options,M=this.containerData,N=this.canvasData,P=this.cropBoxData,U=x.viewMode,$=N.aspectRatio,Y=this.cropped&&P;if(w){var H=Number(x.minCanvasWidth)||0,G=Number(x.minCanvasHeight)||0;U>1?(H=Math.max(H,M.width),G=Math.max(G,M.height),U===3&&(G*$>H?H=G*$:G=H/$)):U>0&&(H?H=Math.max(H,Y?P.width:0):G?G=Math.max(G,Y?P.height:0):Y&&(H=P.width,G=P.height,G*$>H?H=G*$:G=H/$));var q=Gn({aspectRatio:$,width:H,height:G});H=q.width,G=q.height,N.minWidth=H,N.minHeight=G,N.maxWidth=1/0,N.maxHeight=1/0}if(E)if(U>(Y?0:1)){var ke=M.width-N.width,Oe=M.height-N.height;N.minLeft=Math.min(0,ke),N.minTop=Math.min(0,Oe),N.maxLeft=Math.max(0,ke),N.maxTop=Math.max(0,Oe),Y&&this.limited&&(N.minLeft=Math.min(P.left,P.left+(P.width-N.width)),N.minTop=Math.min(P.top,P.top+(P.height-N.height)),N.maxLeft=P.left,N.maxTop=P.top,U===2&&(N.width>=M.width&&(N.minLeft=Math.min(0,ke),N.maxLeft=Math.max(0,ke)),N.height>=M.height&&(N.minTop=Math.min(0,Oe),N.maxTop=Math.max(0,Oe))))}else N.minLeft=-N.width,N.minTop=-N.height,N.maxLeft=M.width,N.maxTop=M.height},renderCanvas:function(w,E){var x=this.canvasData,M=this.imageData;if(E){var N=gI({width:M.naturalWidth*Math.abs(M.scaleX||1),height:M.naturalHeight*Math.abs(M.scaleY||1),degree:M.rotate||0}),P=N.width,U=N.height,$=x.width*(P/x.naturalWidth),Y=x.height*(U/x.naturalHeight);x.left-=($-x.width)/2,x.top-=(Y-x.height)/2,x.width=$,x.height=Y,x.aspectRatio=P/U,x.naturalWidth=P,x.naturalHeight=U,this.limitCanvas(!0,!1)}(x.width>x.maxWidth||x.widthx.maxHeight||x.heightE.width?N.height=N.width/x:N.width=N.height*x),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*M),N.height=Math.max(N.minHeight,N.height*M),N.left=E.left+(E.width-N.width)/2,N.top=E.top+(E.height-N.height)/2,N.oldLeft=N.left,N.oldTop=N.top,this.initialCropBoxData=ge({},N)},limitCropBox:function(w,E){var x=this.options,M=this.containerData,N=this.canvasData,P=this.cropBoxData,U=this.limited,$=x.aspectRatio;if(w){var Y=Number(x.minCropBoxWidth)||0,H=Number(x.minCropBoxHeight)||0,G=U?Math.min(M.width,N.width,N.width+N.left,M.width-N.left):M.width,q=U?Math.min(M.height,N.height,N.height+N.top,M.height-N.top):M.height;Y=Math.min(Y,M.width),H=Math.min(H,M.height),$&&(Y&&H?H*$>Y?H=Y/$:Y=H*$:Y?H=Y/$:H&&(Y=H*$),q*$>G?q=G/$:G=q*$),P.minWidth=Math.min(Y,G),P.minHeight=Math.min(H,q),P.maxWidth=G,P.maxHeight=q}E&&(U?(P.minLeft=Math.max(0,N.left),P.minTop=Math.max(0,N.top),P.maxLeft=Math.min(M.width,N.left+N.width)-P.width,P.maxTop=Math.min(M.height,N.top+N.height)-P.height):(P.minLeft=0,P.minTop=0,P.maxLeft=M.width-P.width,P.maxTop=M.height-P.height))},renderCropBox:function(){var w=this.options,E=this.containerData,x=this.cropBoxData;(x.width>x.maxWidth||x.widthx.maxHeight||x.height=E.width&&x.height>=E.height?k:C),Hn(this.cropBox,ge({width:x.width,height:x.height},Za({translateX:x.left,translateY:x.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),na(this.element,ft,this.getData())}},TI={initPreview:function(){var w=this.element,E=this.crossOrigin,x=this.options.preview,M=E?this.crossOriginUrl:this.url,N=w.alt||"The image to preview",P=document.createElement("img");if(E&&(P.crossOrigin=E),P.src=M,P.alt=N,this.viewBox.appendChild(P),this.viewBoxImage=P,!!x){var U=x;typeof x=="string"?U=w.ownerDocument.querySelectorAll(x):x.querySelector&&(U=[x]),this.previews=U,ie(U,function($){var Y=document.createElement("img");Ya($,Se,{width:$.offsetWidth,height:$.offsetHeight,html:$.innerHTML}),E&&(Y.crossOrigin=E),Y.src=M,Y.alt=N,Y.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;"',$.innerHTML="",$.appendChild(Y)})}},resetPreview:function(){ie(this.previews,function(w){var E=rl(w,Se);Hn(w,{width:E.width,height:E.height}),w.innerHTML=E.html,pI(w,Se)})},preview:function(){var w=this.imageData,E=this.canvasData,x=this.cropBoxData,M=x.width,N=x.height,P=w.width,U=w.height,$=x.left-E.left-w.left,Y=x.top-E.top-w.top;!this.cropped||this.disabled||(Hn(this.viewBoxImage,ge({width:P,height:U},Za(ge({translateX:-$,translateY:-Y},w)))),ie(this.previews,function(H){var G=rl(H,Se),q=G.width,ke=G.height,Oe=q,Ge=ke,De=1;M&&(De=q/M,Ge=N*De),N&&Ge>ke&&(De=ke/N,Oe=M*De,Ge=ke),Hn(H,{width:Oe,height:Ge}),Hn(H.getElementsByTagName("img")[0],ge({width:P*De,height:U*De},Za(ge({translateX:-$*De,translateY:-Y*De},w))))}))}},kI={bind:function(){var w=this.element,E=this.options,x=this.cropper;oe(E.cropstart)&&Lt(w,Kt,E.cropstart),oe(E.cropmove)&&Lt(w,_t,E.cropmove),oe(E.cropend)&&Lt(w,nt,E.cropend),oe(E.crop)&&Lt(w,ft,E.crop),oe(E.zoom)&&Lt(w,an,E.zoom),Lt(x,Tt,this.onCropStart=this.cropStart.bind(this)),E.zoomable&&E.zoomOnWheel&&Lt(x,Yt,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),E.toggleDragModeOnDblclick&&Lt(x,Xt,this.onDblclick=this.dblclick.bind(this)),Lt(w.ownerDocument,kt,this.onCropMove=this.cropMove.bind(this)),Lt(w.ownerDocument,po,this.onCropEnd=this.cropEnd.bind(this)),E.responsive&&Lt(window,wt,this.onResize=this.resize.bind(this))},unbind:function(){var w=this.element,E=this.options,x=this.cropper;oe(E.cropstart)&&Zt(w,Kt,E.cropstart),oe(E.cropmove)&&Zt(w,_t,E.cropmove),oe(E.cropend)&&Zt(w,nt,E.cropend),oe(E.crop)&&Zt(w,ft,E.crop),oe(E.zoom)&&Zt(w,an,E.zoom),Zt(x,Tt,this.onCropStart),E.zoomable&&E.zoomOnWheel&&Zt(x,Yt,this.onWheel,{passive:!1,capture:!0}),E.toggleDragModeOnDblclick&&Zt(x,Xt,this.onDblclick),Zt(w.ownerDocument,kt,this.onCropMove),Zt(w.ownerDocument,po,this.onCropEnd),E.responsive&&Zt(window,wt,this.onResize)}},NI={resize:function(){if(!this.disabled){var w=this.options,E=this.container,x=this.containerData,M=E.offsetWidth/x.width,N=E.offsetHeight/x.height,P=Math.abs(M-1)>Math.abs(N-1)?M:N;if(P!==1){var U,$;w.restore&&(U=this.getCanvasData(),$=this.getCropBoxData()),this.render(),w.restore&&(this.setCanvasData(ie(U,function(Y,H){U[H]=Y*P})),this.setCropBoxData(ie($,function(Y,H){$[H]=Y*P})))}}},dblclick:function(){this.disabled||this.options.dragMode===Ve||this.setDragMode(uI(this.dragBox,W)?Ne:Me)},wheel:function(w){var E=this,x=Number(this.options.wheelZoomRatio)||.1,M=1;this.disabled||(w.preventDefault(),!this.wheeling&&(this.wheeling=!0,setTimeout(function(){E.wheeling=!1},50),w.deltaY?M=w.deltaY>0?1:-1:w.wheelDelta?M=-w.wheelDelta/120:w.detail&&(M=w.detail>0?1:-1),this.zoom(-M*x,w)))},cropStart:function(w){var E=w.buttons,x=w.button;if(!(this.disabled||(w.type==="mousedown"||w.type==="pointerdown"&&w.pointerType==="mouse")&&(Z(E)&&E!==1||Z(x)&&x!==0||w.ctrlKey))){var M=this.options,N=this.pointers,P;w.changedTouches?ie(w.changedTouches,function(U){N[U.identifier]=qr(U)}):N[w.pointerId||0]=qr(w),Object.keys(N).length>1&&M.zoomable&&M.zoomOnTouch?P=D:P=rl(w.target,be),ho.test(P)&&na(this.element,Kt,{originalEvent:w,action:P})!==!1&&(w.preventDefault(),this.action=P,this.cropping=!1,P===S&&(this.cropping=!0,lt(this.dragBox,se)))}},cropMove:function(w){var E=this.action;if(!(this.disabled||!E)){var x=this.pointers;w.preventDefault(),na(this.element,_t,{originalEvent:w,action:E})!==!1&&(w.changedTouches?ie(w.changedTouches,function(M){ge(x[M.identifier]||{},qr(M,!0))}):ge(x[w.pointerId||0]||{},qr(w,!0)),this.change(w))}},cropEnd:function(w){if(!this.disabled){var E=this.action,x=this.pointers;w.changedTouches?ie(w.changedTouches,function(M){delete x[M.identifier]}):delete x[w.pointerId||0],E&&(w.preventDefault(),Object.keys(x).length||(this.action=""),this.cropping&&(this.cropping=!1,ta(this.dragBox,se,this.cropped&&this.options.modal)),na(this.element,nt,{originalEvent:w,action:E}))}}},DI={change:function(w){var E=this.options,x=this.canvasData,M=this.containerData,N=this.cropBoxData,P=this.pointers,U=this.action,$=E.aspectRatio,Y=N.left,H=N.top,G=N.width,q=N.height,ke=Y+G,Oe=H+q,Ge=0,De=0,rt=M.width,ct=M.height,et=!0,wn;!$&&w.shiftKey&&($=G&&q?G/q:1),this.limited&&(Ge=N.minLeft,De=N.minTop,rt=Ge+Math.min(M.width,x.width,x.left+x.width),ct=De+Math.min(M.height,x.height,x.top+x.height));var Nt=P[Object.keys(P)[0]],ee={x:Nt.endX-Nt.startX,y:Nt.endY-Nt.startY},Ae=function(Vt){switch(Vt){case A:ke+ee.x>rt&&(ee.x=rt-ke);break;case I:Y+ee.xct&&(ee.y=ct-Oe);break}};switch(U){case C:Y+=ee.x,H+=ee.y;break;case A:if(ee.x>=0&&(ke>=rt||$&&(H<=De||Oe>=ct))){et=!1;break}Ae(A),G+=ee.x,G<0&&(U=I,G=-G,Y-=G),$&&(q=G/$,H+=(N.height-q)/2);break;case F:if(ee.y<=0&&(H<=De||$&&(Y<=Ge||ke>=rt))){et=!1;break}Ae(F),q-=ee.y,H+=ee.y,q<0&&(U=R,q=-q,H-=q),$&&(G=q*$,Y+=(N.width-G)/2);break;case I:if(ee.x<=0&&(Y<=Ge||$&&(H<=De||Oe>=ct))){et=!1;break}Ae(I),G-=ee.x,Y+=ee.x,G<0&&(U=A,G=-G,Y-=G),$&&(q=G/$,H+=(N.height-q)/2);break;case R:if(ee.y>=0&&(Oe>=ct||$&&(Y<=Ge||ke>=rt))){et=!1;break}Ae(R),q+=ee.y,q<0&&(U=F,q=-q,H-=q),$&&(G=q*$,Y+=(N.width-G)/2);break;case K:if($){if(ee.y<=0&&(H<=De||ke>=rt)){et=!1;break}Ae(F),q-=ee.y,H+=ee.y,G=q*$}else Ae(F),Ae(A),ee.x>=0?keDe&&(q-=ee.y,H+=ee.y):(q-=ee.y,H+=ee.y);G<0&&q<0?(U=z,q=-q,G=-G,H-=q,Y-=G):G<0?(U=B,G=-G,Y-=G):q<0&&(U=V,q=-q,H-=q);break;case B:if($){if(ee.y<=0&&(H<=De||Y<=Ge)){et=!1;break}Ae(F),q-=ee.y,H+=ee.y,G=q*$,Y+=N.width-G}else Ae(F),Ae(I),ee.x<=0?Y>Ge?(G-=ee.x,Y+=ee.x):ee.y<=0&&H<=De&&(et=!1):(G-=ee.x,Y+=ee.x),ee.y<=0?H>De&&(q-=ee.y,H+=ee.y):(q-=ee.y,H+=ee.y);G<0&&q<0?(U=V,q=-q,G=-G,H-=q,Y-=G):G<0?(U=K,G=-G,Y-=G):q<0&&(U=z,q=-q,H-=q);break;case z:if($){if(ee.x<=0&&(Y<=Ge||Oe>=ct)){et=!1;break}Ae(I),G-=ee.x,Y+=ee.x,q=G/$}else Ae(R),Ae(I),ee.x<=0?Y>Ge?(G-=ee.x,Y+=ee.x):ee.y>=0&&Oe>=ct&&(et=!1):(G-=ee.x,Y+=ee.x),ee.y>=0?Oe=0&&(ke>=rt||Oe>=ct)){et=!1;break}Ae(A),G+=ee.x,q=G/$}else Ae(R),Ae(A),ee.x>=0?ke=0&&Oe>=ct&&(et=!1):G+=ee.x,ee.y>=0?Oe0?U=ee.y>0?V:K:ee.x<0&&(Y-=G,U=ee.y>0?z:B),ee.y<0&&(H-=q),this.cropped||(rn(this.cropBox,ne),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}et&&(N.width=G,N.height=q,N.left=Y,N.top=H,this.action=U,this.renderCropBox()),ie(P,function(st){st.startX=st.endX,st.startY=st.endY})}},AI={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&<(this.dragBox,se),rn(this.cropBox,ne),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=ge({},this.initialImageData),this.canvasData=ge({},this.initialCanvasData),this.cropBoxData=ge({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(ge(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),rn(this.dragBox,se),lt(this.cropBox,ne)),this},replace:function(w){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!this.disabled&&w&&(this.isImg&&(this.element.src=w),E?(this.url=w,this.image.src=w,this.ready&&(this.viewBoxImage.src=w,ie(this.previews,function(x){x.getElementsByTagName("img")[0].src=w}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(w))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,rn(this.cropper,J)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,lt(this.cropper,J)),this},destroy:function(){var w=this.element;return w[O]?(w[O]=void 0,this.isImg&&this.replaced&&(w.src=this.originalUrl),this.uncreate(),this):this},move:function(w){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:w,x=this.canvasData,M=x.left,N=x.top;return this.moveTo(pe(w)?w:M+Number(w),pe(E)?E:N+Number(E))},moveTo:function(w){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:w,x=this.canvasData,M=!1;return w=Number(w),E=Number(E),this.ready&&!this.disabled&&this.options.movable&&(Z(w)&&(x.left=w,M=!0),Z(E)&&(x.top=E,M=!0),M&&this.renderCanvas(!0)),this},zoom:function(w,E){var x=this.canvasData;return w=Number(w),w<0?w=1/(1-w):w=1+w,this.zoomTo(x.width*w/x.naturalWidth,null,E)},zoomTo:function(w,E,x){var M=this.options,N=this.canvasData,P=N.width,U=N.height,$=N.naturalWidth,Y=N.naturalHeight;if(w=Number(w),w>=0&&this.ready&&!this.disabled&&M.zoomable){var H=$*w,G=Y*w;if(na(this.element,an,{ratio:w,oldRatio:P/$,originalEvent:x})===!1)return this;if(x){var q=this.pointers,ke=Ff(this.cropper),Oe=q&&Object.keys(q).length?vI(q):{pageX:x.pageX,pageY:x.pageY};N.left-=(H-P)*((Oe.pageX-ke.left-N.left)/P),N.top-=(G-U)*((Oe.pageY-ke.top-N.top)/U)}else le(E)&&Z(E.x)&&Z(E.y)?(N.left-=(H-P)*((E.x-N.left)/P),N.top-=(G-U)*((E.y-N.top)/U)):(N.left-=(H-P)/2,N.top-=(G-U)/2);N.width=H,N.height=G,this.renderCanvas(!0)}return this},rotate:function(w){return this.rotateTo((this.imageData.rotate||0)+Number(w))},rotateTo:function(w){return w=Number(w),Z(w)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=w%360,this.renderCanvas(!0,!0)),this},scaleX:function(w){var E=this.imageData.scaleY;return this.scale(w,Z(E)?E:1)},scaleY:function(w){var E=this.imageData.scaleX;return this.scale(Z(E)?E:1,w)},scale:function(w){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:w,x=this.imageData,M=!1;return w=Number(w),E=Number(E),this.ready&&!this.disabled&&this.options.scalable&&(Z(w)&&(x.scaleX=w,M=!0),Z(E)&&(x.scaleY=E,M=!0),M&&this.renderCanvas(!0,!0)),this},getData:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,E=this.options,x=this.imageData,M=this.canvasData,N=this.cropBoxData,P;if(this.ready&&this.cropped){P={x:N.left-M.left,y:N.top-M.top,width:N.width,height:N.height};var U=x.width/x.naturalWidth;if(ie(P,function(H,G){P[G]=H/U}),w){var $=Math.round(P.y+P.height),Y=Math.round(P.x+P.width);P.x=Math.round(P.x),P.y=Math.round(P.y),P.width=Y-P.x,P.height=$-P.y}}else P={x:0,y:0,width:0,height:0};return E.rotatable&&(P.rotate=x.rotate||0),E.scalable&&(P.scaleX=x.scaleX||1,P.scaleY=x.scaleY||1),P},setData:function(w){var E=this.options,x=this.imageData,M=this.canvasData,N={};if(this.ready&&!this.disabled&&le(w)){var P=!1;E.rotatable&&Z(w.rotate)&&w.rotate!==x.rotate&&(x.rotate=w.rotate,P=!0),E.scalable&&(Z(w.scaleX)&&w.scaleX!==x.scaleX&&(x.scaleX=w.scaleX,P=!0),Z(w.scaleY)&&w.scaleY!==x.scaleY&&(x.scaleY=w.scaleY,P=!0)),P&&this.renderCanvas(!0,!0);var U=x.width/x.naturalWidth;Z(w.x)&&(N.left=w.x*U+M.left),Z(w.y)&&(N.top=w.y*U+M.top),Z(w.width)&&(N.width=w.width*U),Z(w.height)&&(N.height=w.height*U),this.setCropBoxData(N)}return this},getContainerData:function(){return this.ready?ge({},this.containerData):{}},getImageData:function(){return this.sized?ge({},this.imageData):{}},getCanvasData:function(){var w=this.canvasData,E={};return this.ready&&ie(["left","top","width","height","naturalWidth","naturalHeight"],function(x){E[x]=w[x]}),E},setCanvasData:function(w){var E=this.canvasData,x=E.aspectRatio;return this.ready&&!this.disabled&&le(w)&&(Z(w.left)&&(E.left=w.left),Z(w.top)&&(E.top=w.top),Z(w.width)?(E.width=w.width,E.height=w.width/x):Z(w.height)&&(E.height=w.height,E.width=w.height*x),this.renderCanvas(!0)),this},getCropBoxData:function(){var w=this.cropBoxData,E;return this.ready&&this.cropped&&(E={left:w.left,top:w.top,width:w.width,height:w.height}),E||{}},setCropBoxData:function(w){var E=this.cropBoxData,x=this.options.aspectRatio,M,N;return this.ready&&this.cropped&&!this.disabled&&le(w)&&(Z(w.left)&&(E.left=w.left),Z(w.top)&&(E.top=w.top),Z(w.width)&&w.width!==E.width&&(M=!0,E.width=w.width),Z(w.height)&&w.height!==E.height&&(N=!0,E.height=w.height),x&&(M?E.height=E.width/x:N&&(E.width=E.height*x)),this.renderCropBox()),this},getCroppedCanvas:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var E=this.canvasData,x=yI(this.image,this.imageData,E,w);if(!this.cropped)return x;var M=this.getData(),N=M.x,P=M.y,U=M.width,$=M.height,Y=x.width/Math.floor(E.naturalWidth);Y!==1&&(N*=Y,P*=Y,U*=Y,$*=Y);var H=U/$,G=Gn({aspectRatio:H,width:w.maxWidth||1/0,height:w.maxHeight||1/0}),q=Gn({aspectRatio:H,width:w.minWidth||0,height:w.minHeight||0},"cover"),ke=Gn({aspectRatio:H,width:w.width||(Y!==1?x.width:U),height:w.height||(Y!==1?x.height:$)}),Oe=ke.width,Ge=ke.height;Oe=Math.min(G.width,Math.max(q.width,Oe)),Ge=Math.min(G.height,Math.max(q.height,Ge));var De=document.createElement("canvas"),rt=De.getContext("2d");De.width=zn(Oe),De.height=zn(Ge),rt.fillStyle=w.fillColor||"transparent",rt.fillRect(0,0,Oe,Ge);var ct=w.imageSmoothingEnabled,et=ct===void 0?!0:ct,wn=w.imageSmoothingQuality;rt.imageSmoothingEnabled=et,wn&&(rt.imageSmoothingQuality=wn);var Nt=x.width,ee=x.height,Ae=N,st=P,Vt,xn,yo,bo,Wn,sn;Ae<=-U||Ae>Nt?(Ae=0,Vt=0,yo=0,Wn=0):Ae<=0?(yo=-Ae,Ae=0,Vt=Math.min(Nt,U+Ae),Wn=Vt):Ae<=Nt&&(yo=0,Vt=Math.min(U,Nt-Ae),Wn=Vt),Vt<=0||st<=-$||st>ee?(st=0,xn=0,bo=0,sn=0):st<=0?(bo=-st,st=0,xn=Math.min(ee,$+st),sn=xn):st<=ee&&(bo=0,xn=Math.min($,ee-st),sn=xn);var xt=[Ae,st,Vt,xn];if(Wn>0&&sn>0){var wo=Oe/U;xt.push(yo*wo,bo*wo,Wn*wo,sn*wo)}return rt.drawImage.apply(rt,[x].concat(d(xt.map(function($r){return Math.floor(zn($r))})))),De},setAspectRatio:function(w){var E=this.options;return!this.disabled&&!pe(w)&&(E.aspectRatio=Math.max(0,w)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(w){var E=this.options,x=this.dragBox,M=this.face;if(this.ready&&!this.disabled){var N=w===Me,P=E.movable&&w===Ne;w=N||P?w:Ve,E.dragMode=w,Ya(x,be,w),ta(x,W,N),ta(x,fe,P),E.cropBoxMovable||(Ya(M,be,w),ta(M,W,N),ta(M,fe,P))}return this}},II=b.Cropper,jf=function(){function T(w){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(i(this,T),!w||!go.test(w.tagName))throw new Error("The first argument is required and must be an or element.");this.element=w,this.options=ge({},_,le(E)&&E),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 l(T,[{key:"init",value:function(){var E=this.element,x=E.tagName.toLowerCase(),M;if(!E[O]){if(E[O]=this,x==="img"){if(this.isImg=!0,M=E.getAttribute("src")||"",this.originalUrl=M,!M)return;M=E.src}else x==="canvas"&&window.HTMLCanvasElement&&(M=E.toDataURL());this.load(M)}}},{key:"load",value:function(E){var x=this;if(E){this.url=E,this.imageData={};var M=this.element,N=this.options;if(!N.rotatable&&!N.scalable&&(N.checkOrientation=!1),!N.checkOrientation||!window.ArrayBuffer){this.clone();return}if(mo.test(E)){vo.test(E)?this.read(xI(E)):this.clone();return}var P=new XMLHttpRequest,U=this.clone.bind(this);this.reloading=!0,this.xhr=P,P.onabort=U,P.onerror=U,P.ontimeout=U,P.onprogress=function(){P.getResponseHeader("content-type")!==jn&&P.abort()},P.onload=function(){x.read(P.response)},P.onloadend=function(){x.reloading=!1,x.xhr=null},N.checkCrossOrigin&&_f(E)&&M.crossOrigin&&(E=Lf(E)),P.open("GET",E,!0),P.responseType="arraybuffer",P.withCredentials=M.crossOrigin==="use-credentials",P.send()}}},{key:"read",value:function(E){var x=this.options,M=this.imageData,N=SI(E),P=0,U=1,$=1;if(N>1){this.url=EI(E,jn);var Y=CI(N);P=Y.rotate,U=Y.scaleX,$=Y.scaleY}x.rotatable&&(M.rotate=P),x.scalable&&(M.scaleX=U,M.scaleY=$),this.clone()}},{key:"clone",value:function(){var E=this.element,x=this.url,M=E.crossOrigin,N=x;this.options.checkCrossOrigin&&_f(x)&&(M||(M="anonymous"),N=Lf(x)),this.crossOrigin=M,this.crossOriginUrl=N;var P=document.createElement("img");M&&(P.crossOrigin=M),P.src=N||x,P.alt=E.alt||"The image to crop",this.image=P,P.onload=this.start.bind(this),P.onerror=this.stop.bind(this),lt(P,xe),E.parentNode.insertBefore(P,E.nextSibling)}},{key:"start",value:function(){var E=this,x=this.image;x.onload=null,x.onerror=null,this.sizing=!0;var M=b.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(b.navigator.userAgent),N=function(Y,H){ge(E.imageData,{naturalWidth:Y,naturalHeight:H,aspectRatio:Y/H}),E.initialImageData=ge({},E.imageData),E.sizing=!1,E.sized=!0,E.build()};if(x.naturalWidth&&!M){N(x.naturalWidth,x.naturalHeight);return}var P=document.createElement("img"),U=document.body||document.documentElement;this.sizingImage=P,P.onload=function(){N(P.width,P.height),M||U.removeChild(P)},P.src=x.src,M||(P.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(P))}},{key:"stop",value:function(){var E=this.image;E.onload=null,E.onerror=null,E.parentNode.removeChild(E),this.image=null}},{key:"build",value:function(){if(!(!this.sized||this.ready)){var E=this.element,x=this.options,M=this.image,N=E.parentNode,P=document.createElement("div");P.innerHTML=j;var U=P.querySelector(".".concat(O,"-container")),$=U.querySelector(".".concat(O,"-canvas")),Y=U.querySelector(".".concat(O,"-drag-box")),H=U.querySelector(".".concat(O,"-crop-box")),G=H.querySelector(".".concat(O,"-face"));this.container=N,this.cropper=U,this.canvas=$,this.dragBox=Y,this.cropBox=H,this.viewBox=U.querySelector(".".concat(O,"-view-box")),this.face=G,$.appendChild(M),lt(E,ne),N.insertBefore(U,E.nextSibling),this.isImg||rn(M,xe),this.initPreview(),this.bind(),x.initialAspectRatio=Math.max(0,x.initialAspectRatio)||NaN,x.aspectRatio=Math.max(0,x.aspectRatio)||NaN,x.viewMode=Math.max(0,Math.min(3,Math.round(x.viewMode)))||0,lt(H,ne),x.guides||lt(H.getElementsByClassName("".concat(O,"-dashed")),ne),x.center||lt(H.getElementsByClassName("".concat(O,"-center")),ne),x.background&<(U,"".concat(O,"-bg")),x.highlight||lt(G,Qe),x.cropBoxMovable&&(lt(G,fe),Ya(G,be,C)),x.cropBoxResizable||(lt(H.getElementsByClassName("".concat(O,"-line")),ne),lt(H.getElementsByClassName("".concat(O,"-point")),ne)),this.render(),this.ready=!0,this.setDragMode(x.dragMode),x.autoCrop&&this.crop(),this.setData(x.data),oe(x.ready)&&Lt(E,$o,x.ready,{once:!0}),na(E,$o)}}},{key:"unbuild",value:function(){this.ready&&(this.ready=!1,this.unbind(),this.resetPreview(),this.cropper.parentNode.removeChild(this.cropper),rn(this.element,ne))}},{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=II,T}},{key:"setDefaults",value:function(E){ge(_,le(E)&&E)}}]),T}();return ge(jf.prototype,OI,TI,kI,NI,DI,AI),jf})})(vd);var xy=vd.exports;Object.defineProperty(md,"__esModule",{value:!0});var gd=o,Ey=xy,Sy=Cy(Ey);function Cy(e){return e&&e.__esModule?e:{default:e}}function Oy(e,t){var n={};for(var a in e)t.indexOf(a)>=0||Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=e[a]);return n}var Ty=typeof window>"u"?[String,Array]:[String,Array,Element,NodeList],ky=md.default={render:function(){var t=this.crossorigin||void 0;return(0,gd.h)("div",{style:this.containerStyle},[(0,gd.h)("img",{ref:"img",src:this.src,alt:this.alt||"image",style:[{"max-width":"100%"},this.imgStyle],crossorigin:t})])},props:{containerStyle:Object,src:{type:String,default:""},alt:String,imgStyle:Object,viewMode:Number,dragMode:String,initialAspectRatio:Number,aspectRatio:Number,data:Object,preview:Ty,responsive:{type:Boolean,default:!0},restore:{type:Boolean,default:!0},checkCrossOrigin:{type:Boolean,default:!0},checkOrientation:{type:Boolean,default:!0},crossorigin:{type:String},modal:{type:Boolean,default:!0},guides:{type:Boolean,default:!0},center:{type:Boolean,default:!0},highlight:{type:Boolean,default:!0},background:{type:Boolean,default:!0},autoCrop:{type:Boolean,default:!0},autoCropArea:Number,movable:{type:Boolean,default:!0},rotatable:{type:Boolean,default:!0},scalable:{type:Boolean,default:!0},zoomable:{type:Boolean,default:!0},zoomOnTouch:{type:Boolean,default:!0},zoomOnWheel:{type:Boolean,default:!0},wheelZoomRatio:Number,cropBoxMovable:{type:Boolean,default:!0},cropBoxResizable:{type:Boolean,default:!0},toggleDragModeOnDblclick:{type:Boolean,default:!0},minCanvasWidth:Number,minCanvasHeight:Number,minCropBoxWidth:Number,minCropBoxHeight:Number,minContainerWidth:Number,minContainerHeight:Number,ready:Function,cropstart:Function,cropmove:Function,cropend:Function,crop:Function,zoom:Function},mounted:function(){var t=this.$options.props;t.containerStyle,t.src,t.alt,t.imgStyle;var n=Oy(t,["containerStyle","src","alt","imgStyle"]),a={};for(var r in n)this[r]!==void 0&&(a[r]=this[r]);this.cropper=new Sy.default(this.$refs.img,a)},methods:{reset:function(){return this.cropper.reset()},clear:function(){return this.cropper.clear()},initCrop:function(){return this.cropper.crop()},replace:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.cropper.replace(t,n)},enable:function(){return this.cropper.enable()},disable:function(){return this.cropper.disable()},destroy:function(){return this.cropper.destroy()},move:function(t,n){return this.cropper.move(t,n)},moveTo:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t;return this.cropper.moveTo(t,n)},relativeZoom:function(t,n){return this.cropper.zoom(t,n)},zoomTo:function(t,n){return this.cropper.zoomTo(t,n)},rotate:function(t){return this.cropper.rotate(t)},rotateTo:function(t){return this.cropper.rotateTo(t)},scaleX:function(t){return this.cropper.scaleX(t)},scaleY:function(t){return this.cropper.scaleY(t)},scale:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t;return this.cropper.scale(t,n)},getData:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return this.cropper.getData(t)},setData:function(t){return this.cropper.setData(t)},getContainerData:function(){return this.cropper.getContainerData()},getImageData:function(){return this.cropper.getImageData()},getCanvasData:function(){return this.cropper.getCanvasData()},setCanvasData:function(t){return this.cropper.setCanvasData(t)},getCropBoxData:function(){return this.cropper.getCropBoxData()},setCropBoxData:function(t){return this.cropper.setCropBoxData(t)},getCroppedCanvas:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.cropper.getCroppedCanvas(t)},setAspectRatio:function(t){return this.cropper.setAspectRatio(t)},setDragMode:function(t){return this.cropper.setDragMode(t)}}};const Rt=o.defineComponent({__name:"Button",props:{variant:{default:"secondary"},type:{default:"button"},href:{},loading:{type:Boolean,default:!1}},setup(e){const t={primary:"bg-blue-500 dark:bg-blue-600/50 focus:outline-blue-500",secondary:"bg-gray-600 dark:bg-gray-600/50 focus:outline-gray-600",success:"bg-green-500 dark:bg-green-600/50 focus:outline-green-500",warning:"bg-orange-400 dark:bg-orange-600/50 focus:outline-orange-400",danger:"bg-red-500 dark:bg-red-600/50 focus:outline-red-500",transparent:"bg-transparent"},n=e,a=o.computed(()=>t[n.variant]);return(r,i)=>(o.openBlock(),o.createBlock(o.resolveDynamicComponent(r.href?"a":"button"),{class:o.normalizeClass(["inline-flex items-center py-2 px-4 border-0 uppercase rounded-md shadow-sm text-xs font-medium text-white hover:shadow-md hover:opacity-75 disabled:opacity-50 focus:outline-none focus:ring-1",a.value]),href:r.href,type:r.type},{default:o.withCtx(()=>[r.loading?(o.openBlock(),o.createBlock(Eo,{key:0,class:"mr-2 w-3 h-3"})):o.createCommentVNode("",!0),o.renderSlot(r.$slots,"default")]),_:3},8,["class","href","type"]))}}),Ny={class:"px-4 pt-5 pb-4 sm:p-6 sm:pb-4"},Dy={class:"sm:flex sm:items-start"},Ay={class:"text-left w-full space-y-6"},Iy={class:"mt-2 w-full space-y-6"},Ry={class:"mt-5 sm:mt-4 px-4 sm:px-6 pb-4 sm:flex sm:flex-row-reverse sm:gap-x-2 space-y-3 sm:space-y-0"},pr=o.defineComponent({__name:"InputModal",props:{name:{},title:{},onSubmit:{type:Function}},setup(e){return(t,n)=>(o.openBlock(),o.createBlock(Ao,{as:"template",class:"nova-file-manager",name:t.name},{default:o.withCtx(({close:a})=>[o.createVNode(o.unref(un),{class:"relative bg-gray-200 dark:bg-gray-900 rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:max-w-lg w-full"},{default:o.withCtx(()=>[o.createElementVNode("form",{name:"input-modal",onSubmit:n[0]||(n[0]=o.withModifiers((...r)=>t.onSubmit&&t.onSubmit(...r),["prevent"]))},[o.createElementVNode("div",Ny,[o.createElementVNode("div",Dy,[o.createElementVNode("div",Ay,[o.createVNode(o.unref(nd),{as:"h3",class:"text-lg leading-6 font-medium text-gray-700 dark:text-gray-200"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(t.title),1)]),_:1}),o.createElementVNode("div",Iy,[o.renderSlot(t.$slots,"inputs")])])])]),o.createElementVNode("div",Ry,[o.renderSlot(t.$slots,"submitButton"),o.renderSlot(t.$slots,"cancelButton",{close:a})])],32)]),_:2},1024)]),_:3},8,["name"]))}}),Py={class:"rounded-md overflow-auto"},My={class:"relative rounded-md text-center overflow-hidden w-full"},By=o.createElementVNode("div",{class:"absolute inset-0 opacity-50 bg-stripes bg-stripes-gray-400"},null,-1),Fy=["src","alt"],_y={class:"w-full border rounded-md space-y-2 px-3 py-2 bg-gray-100 dark:bg-gray-900 shadow-sm focus-within:ring-1 focus-within:ring-blue-600 focus-within:border-blue-600 border-gray-400 dark:border-gray-700"},Ly={class:"block text-xs font-medium text-gray-700 dark:text-gray-200",for:"name"},Vy=["placeholder"],jy={class:"mt-2 text-xs text-gray-400",id:"name-description"},yd=o.defineComponent({__name:"UploadCropModal",props:{file:{},name:{},onSubmit:{type:Function},destFile:{},destName:{}},setup(e){const t=e,n=Pe(),a=o.ref(null);o.onMounted(()=>{a.value=t.destName??""});const r=o.computed(()=>URL.createObjectURL(t.destFile)),i=l=>n.closeModal({name:l}),s=()=>a.value&&t.onSubmit(a.value);return(l,c)=>(o.openBlock(),o.createBlock(pr,{name:l.name,"on-submit":s,title:l.__("NovaFileManager.uploadCropTitle")},{inputs:o.withCtx(()=>[o.createElementVNode("div",Py,[o.createElementVNode("div",My,[By,o.createElementVNode("img",{class:"relative z-10 object-contain h-48 w-full",src:r.value,alt:l.name},null,8,Fy)])]),o.createElementVNode("div",null,[o.createElementVNode("div",_y,[o.createElementVNode("label",Ly,o.toDisplayString(l.__("Name")),1),o.withDirectives(o.createElementVNode("input",{id:"name","onUpdate:modelValue":c[0]||(c[0]=d=>a.value=d),placeholder:l.__("NovaFileManager.actions.uploadCrop"),class:"block w-full border-0 p-0 bg-gray-100 dark:bg-gray-900 placeholder-gray-400 sm:text-sm text-black dark:text-white focus:outline-none focus:ring-0",name:"name",type:"text"},null,8,Vy),[[o.vModelText,a.value]])]),o.createElementVNode("p",jy,o.toDisplayString(l.__("NovaFileManager.edit.originalName",{name:l.file.name})),1)])]),submitButton:o.withCtx(()=>[o.createVNode(Rt,{disabled:!a.value,class:"w-full sm:w-auto",type:"submit",variant:"primary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(l.__("NovaFileManager.actions.upload")),1)]),_:1},8,["disabled"])]),cancelButton:o.withCtx(()=>[o.createVNode(Rt,{class:"w-full sm:w-auto",type:"reset",variant:"secondary",onClick:c[1]||(c[1]=d=>i(l.name))},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(l.__("Cancel")),1)]),_:1})]),_:1},8,["name","title"]))}}),Uy={class:"w-full flex flex-col flex-col-reverse gap-2 md:flex-row justify-between items-start"},zy={class:"text-lg font-medium text-gray-900 dark:text-gray-400 break-all w-full"},Hy={class:"flex flex-row gap-2 justify-end flex-shrink-0"},Gy={class:"h-full max-h-[70vh]"},Wy=o.defineComponent({__name:"CropImageModal",props:{file:{},name:{},onConfirm:{type:Function}},setup(e){const t=e,n=Pe(),a=o.ref(),r=o.ref(null),i=o.ref(),s=o.computed(()=>n.isOpen(On)),l=o.computed(()=>n.cropperOptions),c=o.computed(()=>({height:"100%",minHeight:"60vh"})),d=o.computed(()=>{const u=r.value?.getData(),m=`${Math.round(u.width)}_${Math.round(u.height)}_${Math.round(u.x)}_${Math.round(u.y)}`;return t.file?.name.replace(t.file?.extension,`${m}.${t.file?.extension}`)}),f=u=>n.openModal({name:u}),p=u=>n.closeModal({name:u}),h=()=>{r.value?.getCroppedCanvas().toBlob(u=>{u&&(i.value=new File([u],t.file.name,{type:t.file.mime}),f(On))})},v=u=>{if(!i.value)return;const m=new File([i.value],u,{type:t.file.mime});p(On),p(t.name),t.onConfirm(m)};return(u,m)=>(o.openBlock(),o.createBlock(Ao,{as:"template",class:"nova-file-manager",name:u.name},{default:o.withCtx(({close:b})=>[o.createVNode(o.unref(un),{class:"relative bg-gray-100 dark:bg-gray-900 rounded-lg overflow-hidden shadow-xl transform transition-all w-full max-w-7xl p-4 flex flex-col gap-4 h-[80vh] max-h-[80vh]"},{default:o.withCtx(()=>[o.createElementVNode("div",Uy,[o.createElementVNode("h2",zy,o.toDisplayString(u.__("NovaFileManager.actions.cropImage",{image:u.file.name})),1),o.createElementVNode("div",Hy,[o.createVNode(it,{ref_key:"buttonRef",ref:a,title:u.__("NovaFileManager.actions.close"),onClick:o.withModifiers(b,["prevent","stop"])},{default:o.withCtx(()=>[o.createVNode(o.unref(ss),{class:"w-5 h-5"})]),_:2},1032,["title","onClick"]),o.createVNode(it,{variant:"success",onClick:h},{default:o.withCtx(()=>[o.createVNode(o.unref(Qa),{class:"h-5 w-5"})]),_:1})])]),o.createElementVNode("div",Gy,[o.createVNode(o.unref(ky),o.mergeProps({ref_key:"cropper",ref:r,containerStyle:c.value,src:u.file.url,alt:u.file.name},l.value),null,16,["containerStyle","src","alt"])]),s.value?(o.openBlock(),o.createBlock(yd,{key:0,file:u.file,name:o.unref(On),"on-submit":v,"dest-file":i.value,"dest-name":d.value},null,8,["file","name","dest-file","dest-name"])):o.createCommentVNode("",!0)]),_:2},1024)]),_:1},8,["name"]))}});var Ky=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],a=0;a"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var p=bd[t.format]||bd.default;window.clipboardData.setData(p,e)}else f.clipboardData.clearData(),f.clipboardData.setData(t.format,e);t.onCopy&&(f.preventDefault(),t.onCopy(f.clipboardData))}),document.body.appendChild(l),i.selectNodeContents(l),s.addRange(i);var d=document.execCommand("copy");if(!d)throw new Error("copy command was unsuccessful");c=!0}catch(f){n&&console.error("unable to copy using execCommand: ",f),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),c=!0}catch(p){n&&console.error("unable to copy using clipboardData: ",p),n&&console.error("falling back to prompt"),a=Zy("message"in t?t.message:Yy),window.prompt(a,e)}}finally{s&&(typeof s.removeRange=="function"?s.removeRange(i):s.removeAllRanges()),l&&document.body.removeChild(l),r()}return c}var Qy=Jy;const qy=Sn(Qy);function wd(){return{copy:t=>{qy(t)}}}function hr(e){const t=Pe(),{error:n}=qf(t);return{message:o.computed(()=>n?.value?.bag?.message),invalid:o.computed(()=>n?.value?.attribute===e),errors:o.computed(()=>n?.value?.bag?.errors)}}function $y(){return{__:(t,n)=>{let a=window.Nova.config("translations")[t]?window.Nova.config("translations")[t]:t;return Object.entries(n??{}).forEach(([r,i])=>{if(i===null){console.error(`Translation '${a}' for key '${r}' contains a null replacement.`);return}i=String(i);const s=[`:${r}`,`:${r.toUpperCase()}`,`:${r.charAt(0).toUpperCase()}${r.slice(1)}`],l=[i,i.toUpperCase(),i.charAt(0).toUpperCase()+i.slice(1)];for(let c=s.length-1;c>=0;c--)a=a.replace(s[c],l[c])}),a}}}function Oa(){const e=Pe(),t=o.computed(()=>e.permissions?.folder.create),n=o.computed(()=>e.permissions?.file.edit),a=o.computed(()=>e.permissions?.file.delete),r=o.computed(()=>e.permissions?.folder.delete),i=o.computed(()=>e.permissions?.file.download),s=o.computed(()=>e.permissions?.file.rename),l=o.computed(()=>e.permissions?.folder.rename),c=o.computed(()=>e.permissions?.file.unzip),d=o.computed(()=>e.permissions?.file.upload);return{showCreateFolder:t,showCropImage:n,showDeleteFile:a,showDeleteFolder:r,showDownloadFile:i,showRenameFile:s,showRenameFolder:l,showUnzipFile:c,showUploadFile:d}}function xd(){const e=Pe(),t=o.computed(()=>e.usePintura),n=o.computed(()=>e.pinturaOptions);return{usePinturaEditor:t,pinturaOptions:n}}const eb={class:"sm:flex sm:items-start"},tb={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left"},nb={class:"mt-2"},ob={class:"text-sm text-gray-500 dark:text-gray-400"},ab={class:"mt-5 sm:mt-4 sm:flex sm:flex-row-reverse sm:gap-x-2 space-y-3 sm:space-y-0"},Ed=o.defineComponent({__name:"ConfirmModal",props:{name:{},attribute:{},title:{},content:{},icon:{},variant:{default:"danger"}},setup(e){const t={danger:{iconBackground:"bg-red-100 dark:bg-red-800/30",iconColor:"text-red-600 dark:text-red-500"}},n=e,{invalid:a,errors:r}=hr(n.attribute),i=o.computed(()=>n.variant?t[n.variant].iconColor:""),s=o.computed(()=>n.variant?t[n.variant].iconBackground:"");return(l,c)=>(o.openBlock(),o.createBlock(Ao,{as:"template",class:"nova-file-manager",name:l.name},{default:o.withCtx(({close:d})=>[o.createVNode(o.unref(un),{class:"relative bg-gray-100 dark:bg-gray-900 rounded-lg px-4 pt-5 pb-4 text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:max-w-lg sm:w-full sm:p-6"},{default:o.withCtx(()=>[o.createElementVNode("div",eb,[o.createElementVNode("div",{class:o.normalizeClass(`${s.value} mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full sm:mx-0 sm:h-10 sm:w-10`)},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(l.icon),{class:o.normalizeClass(`${i.value} h-6 w-6`),"aria-hidden":"true"},null,8,["class"]))],2),o.createElementVNode("div",tb,[o.createVNode(o.unref(nd),{as:"h3",class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-100"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(l.title),1)]),_:1}),o.createElementVNode("div",nb,[o.createElementVNode("p",ob,o.toDisplayString(l.content),1)]),o.unref(a)?(o.openBlock(!0),o.createElementBlock(o.Fragment,{key:0},o.renderList(o.unref(r),(f,p)=>(o.openBlock(),o.createElementBlock("p",{key:`confirm_modal_error_${p}`,class:"mt-2 text-sm text-red-600"},o.toDisplayString(f),1))),128)):o.createCommentVNode("",!0)])]),o.createElementVNode("div",ab,[o.renderSlot(l.$slots,"confirmButton"),o.renderSlot(l.$slots,"cancelButton",{close:d})])]),_:2},1024)]),_:3},8,["name"]))}}),Sd=o.defineComponent({__name:"DeleteFileModal",props:{isOpen:{type:Boolean,default:!1},name:{},onConfirm:{},count:{}},setup(e){const t=o.computed(()=>vl);return(n,a)=>(o.openBlock(),o.createBlock(Ed,{content:n.__("NovaFileManager.deleteFileContent"),icon:t.value,"is-open":n.isOpen,name:n.name,title:n.__("NovaFileManager.deleteFileTitle",{count:n.count}),variant:"danger",attribute:"deleteFile"},{confirmButton:o.withCtx(()=>[o.createVNode(Rt,{class:"w-full sm:w-auto",type:"button",variant:"danger",onClick:n.onConfirm},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(n.__("Delete")),1)]),_:1},8,["onClick"])]),cancelButton:o.withCtx(({close:r})=>[o.createVNode(Rt,{class:"w-full sm:w-auto",type:"button",variant:"secondary",onClick:r},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(n.__("Cancel")),1)]),_:2},1032,["onClick"])]),_:1},8,["content","icon","is-open","name","title"]))}}),rb={class:"w-full flex flex-col flex-col-reverse gap-2 md:flex-row justify-between items-start"},sb={class:"text-lg font-medium text-gray-900 dark:text-gray-400 break-all w-full"},ib={class:"flex flex-row gap-2 justify-end flex-shrink-0"},lb={key:0,class:"h-full max-h-[70vh] flex flex-col items-center justify-center space-y-4"},cb={class:"text-red-500 text-xl"},db=o.defineComponent({__name:"EditImageModal",props:{file:{},name:{},onConfirm:{type:Function}},setup(e){const t=e,n=Pe(),a=o.ref(),r=o.ref(),i=o.ref(),s=o.computed(()=>n.isOpen(On)),l=o.ref(),c=o.ref(),{pinturaOptions:d}=xd();o.watchEffect(()=>{if(l.value&&!c.value)try{const{appendDefaultEditor:u,editorOptions:m}=window.novaFileManagerEditor;c.value=u(l.value,{...m,...d.value,src:t.file.url,enableButtonExport:!1}),c.value&&c.value.on("loaderror",({error:b})=>window.Nova.error(b.message))}catch(u){r.value=!0,console.error(u)}});const f=u=>n.openModal({name:u}),p=u=>n.closeModal({name:u}),h=()=>{c.value?.processImage().then(({dest:u})=>{i.value=u,f(On)})},v=u=>{if(!i.value)return;const m=new File([i.value],u,{type:t.file.mime});p(On),p(t.name),t.onConfirm(m)};return(u,m)=>(o.openBlock(),o.createBlock(Ao,{as:"template",class:"nova-file-manager",name:u.name},{default:o.withCtx(({close:b})=>[o.createVNode(o.unref(un),{class:"relative bg-gray-100 dark:bg-gray-900 rounded-lg overflow-hidden shadow-xl transform transition-all w-full max-w-7xl p-4 flex flex-col gap-4 h-[80vh] max-h-[80vh]"},{default:o.withCtx(()=>[o.createElementVNode("div",rb,[o.createElementVNode("h2",sb,o.toDisplayString(u.__("NovaFileManager.actions.editImage",{image:u.file.name})),1),o.createElementVNode("div",ib,[o.createVNode(it,{ref_key:"buttonRef",ref:a,title:u.__("NovaFileManager.actions.close"),onClick:o.withModifiers(b,["prevent","stop"])},{default:o.withCtx(()=>[o.createVNode(o.unref(ss),{class:"w-5 h-5"})]),_:2},1032,["title","onClick"]),o.createVNode(it,{variant:"success",onClick:h},{default:o.withCtx(()=>[o.createVNode(o.unref(Qa),{class:"h-5 w-5"})]),_:1})])]),r.value?(o.openBlock(),o.createElementBlock("div",lb,[o.createVNode(o.unref(wl),{class:"w-16 h-16 text-red-500"}),o.createElementVNode("p",cb,o.toDisplayString(u.__("NovaFileManager.pintura.loadingError")),1)])):(o.openBlock(),o.createElementBlock("div",{key:1,class:"h-full max-h-[70vh]",ref_key:"editorRef",ref:l},null,512)),s.value?(o.openBlock(),o.createBlock(yd,{key:2,file:u.file,name:o.unref(On),"on-submit":v,"dest-file":i.value},null,8,["file","name","dest-file"])):o.createCommentVNode("",!0)]),_:2},1024)]),_:1},8,["name"]))}}),ub={class:"block text-xs font-medium text-gray-700 dark:text-gray-200",for:"name"},fb=["placeholder"],pb=o.defineComponent({__name:"RenameFileModal",props:{name:{},onSubmit:{type:Function},from:{}},setup(e){const t=e,{invalid:n,errors:a}=hr(Jt.RENAME_FILE),r=o.ref(null);o.onMounted(()=>r.value=t.from);const i=()=>r.value&&t.onSubmit(r.value);return(s,l)=>(o.openBlock(),o.createBlock(pr,{name:s.name,"on-submit":i,title:s.__("NovaFileManager.renameFileTitle")},{inputs:o.withCtx(()=>[o.createElementVNode("div",null,[o.createElementVNode("div",{class:o.normalizeClass(["w-full border rounded-md space-y-2 px-3 py-2 bg-gray-100 dark:bg-gray-900 shadow-sm focus-within:ring-1 focus-within:ring-blue-600 focus-within:border-blue-600",o.unref(n)?"border-red-400 dark:border-red-700":"border-gray-400 dark:border-gray-700"])},[o.createElementVNode("label",ub,o.toDisplayString(s.__("Name")),1),o.withDirectives(o.createElementVNode("input",{id:"name","onUpdate:modelValue":l[0]||(l[0]=c=>r.value=c),placeholder:s.__("Name"),class:"block w-full border-0 p-0 bg-gray-100 dark:bg-gray-900 placeholder-gray-400 sm:text-sm text-black dark:text-white focus:outline-none focus:ring-0",name:"name",type:"text"},null,8,fb),[[o.vModelText,r.value]])],2),o.unref(n)?(o.openBlock(!0),o.createElementBlock(o.Fragment,{key:0},o.renderList(o.unref(a),(c,d)=>(o.openBlock(),o.createElementBlock("p",{key:`rename_file_modal_error_${d}`,class:"mt-2 text-sm text-red-600"},o.toDisplayString(c),1))),128)):o.createCommentVNode("",!0)])]),submitButton:o.withCtx(()=>[o.createVNode(Rt,{disabled:r.value===s.from,class:"w-full sm:w-auto",type:"submit",variant:"primary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(s.__("Submit")),1)]),_:1},8,["disabled"])]),cancelButton:o.withCtx(({close:c})=>[o.createVNode(Rt,{class:"w-full sm:w-auto",type:"button",variant:"secondary",onClick:c},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(s.__("Cancel")),1)]),_:2},1032,["onClick"])]),_:1},8,["name","title"]))}}),hb={class:"w-full flex flex-col flex-col-reverse gap-y-2 md:flex-row justify-between items-start"},mb={class:"text-lg font-medium text-gray-900 dark:text-gray-400 break-all w-full"},vb={class:"flex flex-row gap-2 justify-end flex-shrink-0"},gb={class:"overflow-hidden flex flex-col md:flex-row gap-4 w-full"},yb={class:"block relative w-full md:w-4/6 overflow-hidden rounded-lg bg-gray-500/10 flex items-center justify-center"},bb={key:1,class:"w-full max-w-screen max-h-[80vh] relative",controls:"controls"},wb=["src"],xb=["src"],Eb={class:"w-full md:w-2/6"},Sb={class:"font-medium text-gray-800 dark:text-gray-100"},Cb={class:"mt-2 divide-y divide-gray-200 dark:divide-gray-800/40 border-t border-b border-gray-300 dark:border-gray-800/70"},Ob={class:"flex justify-between py-3 text-sm font-medium"},Tb={class:"text-gray-500"},kb={class:"text-gray-400 dark:text-gray-600"},Nb={class:"flex justify-between py-3 text-sm font-medium"},Db={class:"text-gray-500"},Ab={class:"text-gray-400 dark:text-gray-600"},Ib={class:"flex justify-between py-3 text-sm font-medium"},Rb={class:"text-gray-500"},Pb={class:"text-gray-400 dark:text-gray-600"},Mb={class:"text-gray-500"},Bb={class:"text-gray-400 dark:text-gray-600"},$s=o.defineComponent({__name:"PreviewModal",props:{file:{},readOnly:{type:Boolean,default:!1}},setup(e){const t=e,n=Pe(),{copy:a}=wd(),{showCropImage:r,showDeleteFile:i,showDownloadFile:s,showRenameFile:l,showUnzipFile:c}=Oa(),{usePinturaEditor:d}=xd(),f=o.ref(),p=o.computed(()=>n.isOpen(`crop-image-${t.file?.id}`)),h=o.computed(()=>n.isOpen(`edit-image-${t.file?.id}`)),v=o.computed(()=>n.isField),u=o.computed(()=>n.downloadUrl(t.file)),m=D=>n.openModal({name:D}),b=D=>n.renameFile({id:t.file.id,from:t.file.path,to:D}),y=()=>n.deleteFiles({paths:[t.file.path]}),g=D=>n.unzipFile({path:D}),O=()=>{n.selectFile({file:t.file}),n.confirm()},C=()=>{n.preview=void 0,n.fixPortal()},S=D=>{C(),m(la),n.upload({files:[D]})},k=D=>{a(D.url),window.Nova.success("OK!")};return(D,A)=>(o.openBlock(),o.createBlock(Ao,{as:"template",class:"nova-file-manager",name:o.unref(ps),"initial-focus-ref":f.value},{default:o.withCtx(()=>[o.createVNode(o.unref(un),{class:"relative bg-gray-100 dark:bg-gray-900 rounded-lg overflow-hidden shadow-xl transform transition-all w-full max-w-7xl p-4 flex flex-col gap-4"},{default:o.withCtx(()=>[o.createElementVNode("div",hb,[o.createElementVNode("h2",mb,o.toDisplayString(D.file?.name),1),o.createElementVNode("div",vb,[!D.readOnly&&o.unref(i)?(o.openBlock(),o.createBlock(it,{key:0,variant:"danger",onClick:A[0]||(A[0]=I=>m(`${o.unref(Ut).DELETE_FILES}-${D.file?.id}`)),title:D.__("NovaFileManager.actions.delete")},{default:o.withCtx(()=>[o.createVNode(o.unref(yl),{class:"w-5 h-5"})]),_:1},8,["title"])):o.createCommentVNode("",!0),!D.readOnly&&o.unref(r)&&!o.unref(d)&&D.file?.type==="image"?(o.openBlock(),o.createBlock(it,{key:1,variant:"secondary",onClick:A[1]||(A[1]=I=>m(`crop-image-${D.file?.id}`)),title:D.__("NovaFileManager.actions.cropImage",{image:D.file?.name})},{default:o.withCtx(()=>[o.createVNode(hd,{class:"w-5 h-5"})]),_:1},8,["title"])):o.createCommentVNode("",!0),!D.readOnly&&o.unref(r)&&o.unref(d)&&D.file?.type==="image"?(o.openBlock(),o.createBlock(it,{key:2,variant:"secondary",onClick:A[2]||(A[2]=I=>m(`edit-image-${D.file?.id}`)),title:D.__("NovaFileManager.actions.editImage",{image:D.file?.name})},{default:o.withCtx(()=>[o.createVNode(hd,{class:"w-5 h-5"})]),_:1},8,["title"])):o.createCommentVNode("",!0),!D.readOnly&&o.unref(c)&&D.file?.type==="zip"?(o.openBlock(),o.createBlock(it,{key:3,variant:"secondary",onClick:A[3]||(A[3]=I=>g(D.file.path)),title:D.__("NovaFileManager.actions.unzip")},{default:o.withCtx(()=>[o.createVNode(o.unref($f),{class:"w-5 h-5"})]),_:1},8,["title"])):o.createCommentVNode("",!0),o.createVNode(it,{onClick:A[4]||(A[4]=I=>k(D.file)),variant:"secondary",title:D.__("NovaFileManager.actions.copy")},{default:o.withCtx(()=>[o.createVNode(o.unref(tp),{class:"w-5 h-5"})]),_:1},8,["title"]),o.unref(s)?(o.openBlock(),o.createBlock(it,{key:4,"as-anchor":!0,download:D.file?.name,href:u.value,variant:"secondary",title:D.__("NovaFileManager.actions.download")},{default:o.withCtx(()=>[o.createVNode(o.unref(np),{class:"w-5 h-5"})]),_:1},8,["download","href","title"])):o.createCommentVNode("",!0),!D.readOnly&&o.unref(l)?(o.openBlock(),o.createBlock(it,{key:5,variant:"secondary",onClick:A[5]||(A[5]=I=>m(`rename-file-${D.file?.id}`)),title:D.__("NovaFileManager.actions.rename")},{default:o.withCtx(()=>[o.createVNode(o.unref(lp),{class:"w-5 h-5"})]),_:1},8,["title"])):o.createCommentVNode("",!0),o.createVNode(it,{ref_key:"buttonRef",ref:f,onClick:C,title:D.__("NovaFileManager.actions.close")},{default:o.withCtx(()=>[o.createVNode(o.unref(ss),{class:"w-5 h-5"})]),_:1},8,["title"]),v.value?(o.openBlock(),o.createBlock(it,{key:6,variant:"success",onClick:O},{default:o.withCtx(()=>[o.createVNode(o.unref(Qa),{class:"h-5 w-5"})]),_:1})):o.createCommentVNode("",!0)])]),o.createElementVNode("div",gb,[o.createElementVNode("div",yb,[D.file?.type==="image"?(o.openBlock(),o.createBlock(xl,{key:0,src:D.file.url,"is-thumbnail":!1,"full-width":!1,class:"relative",alt:D.file.name},null,8,["src","alt"])):D.file?.type==="video"?(o.openBlock(),o.createElementBlock("video",bb,[o.createElementVNode("source",{src:D.file?.url},null,8,wb),o.createTextVNode(" Sorry, your browser doesn't support embedded videos. ")])):D.file?.type==="pdf"?(o.openBlock(),o.createElementBlock("embed",{key:2,src:D.file?.url,type:"application/pdf",class:"w-full max-w-screen h-[80vh]"},null,8,xb)):(o.openBlock(),o.createBlock(o.unref(ra),{key:3,class:"h-40 w-40 text-gray-500 m-12"}))]),o.createElementVNode("div",Eb,[o.createElementVNode("div",null,[o.createElementVNode("h3",Sb,o.toDisplayString(D.__("NovaFileManager.preview.information")),1),o.createElementVNode("dl",Cb,[o.createElementVNode("div",Ob,[o.createElementVNode("dt",Tb,o.toDisplayString(D.__("NovaFileManager.meta.size")),1),o.createElementVNode("dd",kb,o.toDisplayString(D.file?.size),1)]),o.createElementVNode("div",Nb,[o.createElementVNode("dt",Db,o.toDisplayString(D.__("NovaFileManager.meta.mime")),1),o.createElementVNode("dd",Ab,o.toDisplayString(D.file?.mime),1)]),o.createElementVNode("div",Ib,[o.createElementVNode("dt",Rb,o.toDisplayString(D.__("NovaFileManager.meta.lastModifiedAt")),1),o.createElementVNode("dd",Pb,o.toDisplayString(D.file?.lastModifiedAt),1)]),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(D.file?.meta,(I,R)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[I?(o.openBlock(),o.createElementBlock("div",{key:R,class:"flex justify-between py-3 text-sm font-medium"},[o.createElementVNode("dt",Mb,o.toDisplayString(D.__(`NovaFileManager.meta.${R}`)),1),o.createElementVNode("dd",Bb,o.toDisplayString(I),1)])):o.createCommentVNode("",!0)],64))),256))])])])]),o.unref(i)?(o.openBlock(),o.createBlock(Sd,{key:0,name:`${o.unref(Ut).DELETE_FILES}-${D.file?.id}`,"on-confirm":y},null,8,["name"])):o.createCommentVNode("",!0),o.unref(r)&&p.value?(o.openBlock(),o.createBlock(Wy,{key:1,name:`crop-image-${D.file?.id}`,file:D.file,"on-confirm":S},null,8,["name","file"])):o.createCommentVNode("",!0),o.unref(r)&&h.value?(o.openBlock(),o.createBlock(db,{key:2,name:`edit-image-${D.file?.id}`,file:D.file,"on-confirm":S},null,8,["name","file"])):o.createCommentVNode("",!0),o.unref(l)?(o.openBlock(),o.createBlock(pb,{key:3,name:`rename-file-${D.file?.id}`,from:D.file?.name,"on-submit":b},null,8,["name","from"])):o.createCommentVNode("",!0)]),_:1})]),_:1},8,["name","initial-focus-ref"]))}}),Fb={class:"nova-file-manager"},_b={class:"grid grid-cols-2 md:grid-cols-4 gap-2 mb-2 w-full",role:"group"},Lb=o.defineComponent({__name:"DetailField",props:{field:{},index:{}},setup(e){const t=o.ref(void 0),n=Pe(),{copy:a}=wd(),r=o.computed(()=>n.dark),i=o.computed(()=>n.preview),s=l=>{t.value=l,a(l.url),setTimeout(()=>{t.value=void 0},1e3)};return o.onMounted(()=>n.syncDarkMode()),(l,c)=>{const d=o.resolveComponent("PanelItem");return o.openBlock(),o.createBlock(d,{field:l.field,index:l.index},o.createSlots({_:2},[l.field.value?{name:"value",fn:o.withCtx(()=>[o.createElementVNode("div",Fb,[o.createElementVNode("div",{class:o.normalizeClass({dark:r.value})},[o.createElementVNode("ul",_b,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(l.field.value,f=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:f.id},[o.createVNode(Ec,{field:l.field,file:f,attribute:l.field.attribute,detail:!0,"on-copy":s},null,8,["field","file","attribute"]),i.value&&i.value.id===f.id?(o.openBlock(),o.createBlock($s,{key:0,file:f,"read-only":!0},null,8,["file"])):o.createCommentVNode("",!0)],64))),128))])],2)])]),key:"0"}:void 0]),1032,["field","index"])}}});var Cd={exports:{}};/**! * Sortable 1.14.0 * @author RubaXa * @author owenm * @license MIT - */function Td(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,a)}return n}function en(e){for(var t=1;t=0)&&(n[r]=e[r]);return n}function Uy(e,t){if(e==null)return{};var n=Vy(e,t),a,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}function Hy(e){return zy(e)||Gy(e)||Wy(e)||Ky()}function zy(e){if(Array.isArray(e))return ei(e)}function Gy(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Wy(e,t){if(e){if(typeof e=="string")return ei(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ei(e,t)}}function ei(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function Jy(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function Ht(e,t,n,a){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&vr(e,t):vr(e,t))||a&&e===n)return e;if(e===n)break}while(e=Jy(e))}return null}var Id=/\s+/g;function Ke(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var a=(" "+e.className+" ").replace(Id," ").replace(" "+t+" "," ");e.className=(a+(n?" "+t:"")).replace(Id," ")}}function re(e,t,n){var a=e&&e.style;if(a){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in a)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),a[t]=n+(typeof n=="string"?"":"px")}}function qn(e,t){var n="";if(typeof e=="string")n=e;else do{var a=re(e,"transform");a&&a!=="none"&&(n=a+" "+n)}while(!t&&(e=e.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(n)}function _d(e,t,n){if(e){var a=e.getElementsByTagName(t),r=0,i=a.length;if(n)for(;r=i,!s)return a;if(a===tn())break;a=Dn(a,!1)}return!1}function Ao(e,t,n,a){for(var r=0,i=0,s=e.children;i2&&arguments[2]!==void 0?arguments[2]:{},r=a.evt,i=Uy(a,n1);Ia.pluginEvent.bind(ue)(t,n,en({dragEl:te,parentEl:Je,ghostEl:me,rootEl:ze,nextEl:$n,lastDownEl:gr,cloneEl:Qe,cloneHidden:Rn,dragStarted:Da,putSortable:ut,activeSortable:ue.active,originalEvent:r,oldIndex:Ro,oldDraggableIndex:Aa,newIndex:xt,newDraggableIndex:Pn,hideGhostForTarget:Hd,unhideGhostForTarget:zd,cloneNowHidden:function(){Rn=!0},cloneNowShown:function(){Rn=!1},dispatchSortableEvent:function(l){gt({sortable:n,name:l,originalEvent:r})}},i))};function gt(e){_a(en({putSortable:ut,cloneEl:Qe,targetEl:te,rootEl:ze,oldIndex:Ro,oldDraggableIndex:Aa,newIndex:xt,newDraggableIndex:Pn},e))}var te,Je,me,ze,$n,gr,Qe,Rn,Ro,xt,Aa,Pn,br,ut,Po=!1,yr=!1,Er=[],eo,zt,si,ii,Md,Fd,Da,Bo,Ra,Pa=!1,wr=!1,xr,ht,li=[],ci=!1,Sr=[],Or=typeof document<"u",Tr=Nd,Ld=Ca||pn?"cssFloat":"float",o1=Or&&!Yy&&!Nd&&"draggable"in document.createElement("div"),jd=function(){if(Or){if(pn)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),Vd=function(t,n){var a=re(t),r=parseInt(a.width)-parseInt(a.paddingLeft)-parseInt(a.paddingRight)-parseInt(a.borderLeftWidth)-parseInt(a.borderRightWidth),i=Ao(t,0,n),s=Ao(t,1,n),l=i&&re(i),c=s&&re(s),d=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+He(i).width,f=c&&parseInt(c.marginLeft)+parseInt(c.marginRight)+He(s).width;if(a.display==="flex")return a.flexDirection==="column"||a.flexDirection==="column-reverse"?"vertical":"horizontal";if(a.display==="grid")return a.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&l.float&&l.float!=="none"){var p=l.float==="left"?"left":"right";return s&&(c.clear==="both"||c.clear===p)?"vertical":"horizontal"}return i&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||d>=r&&a[Ld]==="none"||s&&a[Ld]==="none"&&d+f>r)?"vertical":"horizontal"},a1=function(t,n,a){var r=a?t.left:t.top,i=a?t.right:t.bottom,s=a?t.width:t.height,l=a?n.left:n.top,c=a?n.right:n.bottom,d=a?n.width:n.height;return r===l||i===c||r+s/2===l+d/2},r1=function(t,n){var a;return Er.some(function(r){var i=r[pt].options.emptyInsertThreshold;if(!(!i||ti(r))){var s=He(r),l=t>=s.left-i&&t<=s.right+i,c=n>=s.top-i&&n<=s.bottom+i;if(l&&c)return a=r}}),a},Ud=function(t){function n(i,s){return function(l,c,d,f){var p=l.options.group.name&&c.options.group.name&&l.options.group.name===c.options.group.name;if(i==null&&(s||p))return!0;if(i==null||i===!1)return!1;if(s&&i==="clone")return i;if(typeof i=="function")return n(i(l,c,d,f),s)(l,c,d,f);var h=(s?l:c).options.group.name;return i===!0||typeof i=="string"&&i===h||i.join&&i.indexOf(h)>-1}}var a={},r=t.group;(!r||mr(r)!="object")&&(r={name:r}),a.name=r.name,a.checkPull=n(r.pull,!0),a.checkPut=n(r.put),a.revertClone=r.revertClone,t.group=a},Hd=function(){!jd&&me&&re(me,"display","none")},zd=function(){!jd&&me&&re(me,"display","")};Or&&document.addEventListener("click",function(e){if(yr)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),yr=!1,!1},!0);var to=function(t){if(te){t=t.touches?t.touches[0]:t;var n=r1(t.clientX,t.clientY);if(n){var a={};for(var r in t)t.hasOwnProperty(r)&&(a[r]=t[r]);a.target=a.rootEl=n,a.preventDefault=void 0,a.stopPropagation=void 0,n[pt]._onDragOver(a)}}},s1=function(t){te&&te.parentNode[pt]._isOutsideThisEl(t.target)};function ue(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=Rt({},t),e[pt]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Vd(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(s,l){s.setData("Text",l.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:ue.supportPointer!==!1&&"PointerEvent"in window&&!Na,emptyInsertThreshold:5};Ia.initializePlugins(this,e,n);for(var a in n)!(a in t)&&(t[a]=n[a]);Ud(t);for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));this.nativeDraggable=t.forceFallback?!1:o1,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?xe(e,"pointerdown",this._onTapStart):(xe(e,"mousedown",this._onTapStart),xe(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(xe(e,"dragover",this),xe(e,"dragenter",this)),Er.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),Rt(this,$y())}ue.prototype={constructor:ue,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(Bo=null)},_getDirection:function(t,n){return typeof this.options.direction=="function"?this.options.direction.call(this,t,n,te):this.options.direction},_onTapStart:function(t){if(t.cancelable){var n=this,a=this.el,r=this.options,i=r.preventOnFilter,s=t.type,l=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,c=(l||t).target,d=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||c,f=r.filter;if(h1(a),!te&&!(/mousedown|pointerdown/.test(s)&&t.button!==0||r.disabled)&&!d.isContentEditable&&!(!this.nativeDraggable&&Na&&c&&c.tagName.toUpperCase()==="SELECT")&&(c=Ht(c,r.draggable,a,!1),!(c&&c.animated)&&gr!==c)){if(Ro=Ye(c),Aa=Ye(c,r.draggable),typeof f=="function"){if(f.call(this,t,c,this)){gt({sortable:n,rootEl:d,name:"filter",targetEl:c,toEl:a,fromEl:a}),bt("filter",n,{evt:t}),i&&t.cancelable&&t.preventDefault();return}}else if(f&&(f=f.split(",").some(function(p){if(p=Ht(d,p.trim(),a,!1),p)return gt({sortable:n,rootEl:p,name:"filter",targetEl:c,fromEl:a,toEl:a}),bt("filter",n,{evt:t}),!0}),f)){i&&t.cancelable&&t.preventDefault();return}r.handle&&!Ht(d,r.handle,a,!1)||this._prepareDragStart(t,l,c)}}},_prepareDragStart:function(t,n,a){var r=this,i=r.el,s=r.options,l=i.ownerDocument,c;if(a&&!te&&a.parentNode===i){var d=He(a);if(ze=i,te=a,Je=te.parentNode,$n=te.nextSibling,gr=a,br=s.group,ue.dragged=te,eo={target:te,clientX:(n||t).clientX,clientY:(n||t).clientY},Md=eo.clientX-d.left,Fd=eo.clientY-d.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,te.style["will-change"]="all",c=function(){if(bt("delayEnded",r,{evt:t}),ue.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!Cd&&r.nativeDraggable&&(te.draggable=!0),r._triggerDragStart(t,n),gt({sortable:r,name:"choose",originalEvent:t}),Ke(te,s.chosenClass,!0)},s.ignore.split(",").forEach(function(f){_d(te,f.trim(),di)}),xe(l,"dragover",to),xe(l,"mousemove",to),xe(l,"touchmove",to),xe(l,"mouseup",r._onDrop),xe(l,"touchend",r._onDrop),xe(l,"touchcancel",r._onDrop),Cd&&this.nativeDraggable&&(this.options.touchStartThreshold=4,te.draggable=!0),bt("delayStart",this,{evt:t}),s.delay&&(!s.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(Ca||pn))){if(ue.eventCanceled){this._onDrop();return}xe(l,"mouseup",r._disableDelayedDrag),xe(l,"touchend",r._disableDelayedDrag),xe(l,"touchcancel",r._disableDelayedDrag),xe(l,"mousemove",r._delayedDragTouchMoveHandler),xe(l,"touchmove",r._delayedDragTouchMoveHandler),s.supportPointer&&xe(l,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(c,s.delay)}else c()}},_delayedDragTouchMoveHandler:function(t){var n=t.touches?t.touches[0]:t;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){te&&di(te),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;be(t,"mouseup",this._disableDelayedDrag),be(t,"touchend",this._disableDelayedDrag),be(t,"touchcancel",this._disableDelayedDrag),be(t,"mousemove",this._delayedDragTouchMoveHandler),be(t,"touchmove",this._delayedDragTouchMoveHandler),be(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||t.pointerType=="touch"&&t,!this.nativeDraggable||n?this.options.supportPointer?xe(document,"pointermove",this._onTouchMove):n?xe(document,"touchmove",this._onTouchMove):xe(document,"mousemove",this._onTouchMove):(xe(te,"dragend",this),xe(ze,"dragstart",this._onDragStart));try{document.selection?Nr(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,n){if(Po=!1,ze&&te){bt("dragStarted",this,{evt:n}),this.nativeDraggable&&xe(document,"dragover",s1);var a=this.options;!t&&Ke(te,a.dragClass,!1),Ke(te,a.ghostClass,!0),ue.active=this,t&&this._appendGhost(),gt({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(zt){this._lastX=zt.clientX,this._lastY=zt.clientY,Hd();for(var t=document.elementFromPoint(zt.clientX,zt.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(zt.clientX,zt.clientY),t!==n);)n=t;if(te.parentNode[pt]._isOutsideThisEl(t),n)do{if(n[pt]){var a=void 0;if(a=n[pt]._onDragOver({clientX:zt.clientX,clientY:zt.clientY,target:t,rootEl:n}),a&&!this.options.dragoverBubble)break}t=n}while(n=n.parentNode);zd()}},_onTouchMove:function(t){if(eo){var n=this.options,a=n.fallbackTolerance,r=n.fallbackOffset,i=t.touches?t.touches[0]:t,s=me&&qn(me,!0),l=me&&s&&s.a,c=me&&s&&s.d,d=Tr&&ht&&Dd(ht),f=(i.clientX-eo.clientX+r.x)/(l||1)+(d?d[0]-li[0]:0)/(l||1),p=(i.clientY-eo.clientY+r.y)/(c||1)+(d?d[1]-li[1]:0)/(c||1);if(!ue.active&&!Po){if(a&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))=0&&(gt({rootEl:Je,name:"add",toEl:Je,fromEl:ze,originalEvent:t}),gt({sortable:this,name:"remove",toEl:Je,originalEvent:t}),gt({rootEl:Je,name:"sort",toEl:Je,fromEl:ze,originalEvent:t}),gt({sortable:this,name:"sort",toEl:Je,originalEvent:t})),ut&&ut.save()):xt!==Ro&&xt>=0&&(gt({sortable:this,name:"update",toEl:Je,originalEvent:t}),gt({sortable:this,name:"sort",toEl:Je,originalEvent:t})),ue.active&&((xt==null||xt===-1)&&(xt=Ro,Pn=Aa),gt({sortable:this,name:"end",toEl:Je,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){bt("nulling",this),ze=te=Je=me=$n=Qe=gr=Rn=eo=zt=Da=xt=Pn=Ro=Aa=Bo=Ra=ut=br=ue.dragged=ue.ghost=ue.clone=ue.active=null,Sr.forEach(function(t){t.checked=!0}),Sr.length=si=ii=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":te&&(this._onDragOver(t),i1(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],n,a=this.el.children,r=0,i=a.length,s=this.options;ra.right+r||e.clientX<=a.right&&e.clientY>a.bottom&&e.clientX>=a.left:e.clientX>a.right&&e.clientY>a.top||e.clientX<=a.right&&e.clientY>a.bottom+r}function u1(e,t,n,a,r,i,s,l){var c=a?e.clientY:e.clientX,d=a?n.height:n.width,f=a?n.top:n.left,p=a?n.bottom:n.right,h=!1;if(!s){if(l&&xrf+d*i/2:cp-xr)return-Ra}else if(c>f+d*(1-r)/2&&cp-d*i/2)?c>f+d/2?1:-1:0}function f1(e){return Ye(te)1&&(he.forEach(function(l){i.addAnimationState({target:l,rect:yt?He(l):s}),ai(l),l.fromRect=s,a.removeAnimationState(l)}),yt=!1,y1(!this.options.removeCloneOnHide,r))},dragOverCompleted:function(n){var a=n.sortable,r=n.isOwner,i=n.insertion,s=n.activeSortable,l=n.parentEl,c=n.putSortable,d=this.options;if(i){if(r&&s._hideClone(),La=!1,d.animation&&he.length>1&&(yt||!r&&!s.options.sort&&!c)){var f=He(Me,!1,!0,!0);he.forEach(function(h){h!==Me&&(Bd(h,f),l.appendChild(h))}),yt=!0}if(!r)if(yt||Ar(),he.length>1){var p=_r;s._showClone(a),s.options.animation&&!_r&&p&&St.forEach(function(h){s.addAnimationState({target:h,rect:ja}),h.fromRect=ja,h.thisAnimationDuration=null})}else s._showClone(a)}},dragOverAnimationCapture:function(n){var a=n.dragRect,r=n.isOwner,i=n.activeSortable;if(he.forEach(function(l){l.thisAnimationDuration=null}),i.options.animation&&!r&&i.multiDrag.isMultiDrag){ja=Rt({},a);var s=qn(Me,!0);ja.top-=s.f,ja.left-=s.e}},dragOverAnimationComplete:function(){yt&&(yt=!1,Ar())},drop:function(n){var a=n.originalEvent,r=n.rootEl,i=n.parentEl,s=n.sortable,l=n.dispatchSortableEvent,c=n.oldIndex,d=n.putSortable,f=d||this.sortable;if(a){var p=this.options,h=i.children;if(!Mo)if(p.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),Ke(Me,p.selectedClass,!~he.indexOf(Me)),~he.indexOf(Me))he.splice(he.indexOf(Me),1),Fa=null,_a({sortable:s,rootEl:r,name:"deselect",targetEl:Me,originalEvt:a});else{if(he.push(Me),_a({sortable:s,rootEl:r,name:"select",targetEl:Me,originalEvt:a}),a.shiftKey&&Fa&&s.el.contains(Fa)){var v=Ye(Fa),u=Ye(Me);if(~v&&~u&&v!==u){var m,y;for(u>v?(y=v,m=u):(y=u,m=v+1);y1){var b=He(Me),g=Ye(Me,":not(."+this.options.selectedClass+")");if(!La&&p.animation&&(Me.thisAnimationDuration=null),f.captureAnimationState(),!La&&(p.animation&&(Me.fromRect=b,he.forEach(function(O){if(O.thisAnimationDuration=null,O!==Me){var S=yt?He(O):b;O.fromRect=S,f.addAnimationState({target:O,rect:S})}})),Ar(),he.forEach(function(O){h[g]?i.insertBefore(O,h[g]):i.appendChild(O),g++}),c===Ye(Me))){var T=!1;he.forEach(function(O){if(O.sortableIndex!==Ye(O)){T=!0;return}}),T&&l("update")}he.forEach(function(O){ai(O)}),f.animateAll()}Gt=f}(r===i||d&&d.lastPutMode!=="clone")&&St.forEach(function(O){O.parentNode&&O.parentNode.removeChild(O)})}},nullingGlobal:function(){this.isMultiDrag=Mo=!1,St.length=0},destroyGlobal:function(){this._deselectMultiDrag(),be(document,"pointerup",this._deselectMultiDrag),be(document,"mouseup",this._deselectMultiDrag),be(document,"touchend",this._deselectMultiDrag),be(document,"keydown",this._checkKeyDown),be(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(n){if(!(typeof Mo<"u"&&Mo)&&Gt===this.sortable&&!(n&&Ht(n.target,this.options.draggable,this.sortable.el,!1))&&!(n&&n.button!==0))for(;he.length;){var a=he[0];Ke(a,this.options.selectedClass,!1),he.shift(),_a({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:a,originalEvt:n})}},_checkKeyDown:function(n){n.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(n){n.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},Rt(e,{pluginName:"multiDrag",utils:{select:function(n){var a=n.parentNode[pt];!a||!a.options.multiDrag||~he.indexOf(n)||(Gt&&Gt!==a&&(Gt.multiDrag._deselectMultiDrag(),Gt=a),Ke(n,a.options.selectedClass,!0),he.push(n))},deselect:function(n){var a=n.parentNode[pt],r=he.indexOf(n);!a||!a.options.multiDrag||!~r||(Ke(n,a.options.selectedClass,!1),he.splice(r,1))}},eventProperties:function(){var n=this,a=[],r=[];return he.forEach(function(i){a.push({multiDragElement:i,index:i.sortableIndex});var s;yt&&i!==Me?s=-1:yt?s=Ye(i,":not(."+n.options.selectedClass+")"):s=Ye(i),r.push({multiDragElement:i,index:s})}),{items:Hy(he),clones:[].concat(St),oldIndicies:a,newIndicies:r}},optionListeners:{multiDragKey:function(n){return n=n.toLowerCase(),n==="ctrl"?n="Control":n.length>1&&(n=n.charAt(0).toUpperCase()+n.substr(1)),n}}})}function y1(e,t){he.forEach(function(n,a){var r=t.children[n.sortableIndex+(e?Number(a):0)];r?t.insertBefore(n,r):t.appendChild(n)})}function Kd(e,t){St.forEach(function(n,a){var r=t.children[n.sortableIndex+(e?Number(a):0)];r?t.insertBefore(n,r):t.appendChild(n)})}function Ar(){he.forEach(function(e){e!==Me&&e.parentNode&&e.parentNode.removeChild(e)})}ue.mount(new m1),ue.mount(bi,gi);const E1=Up(Object.freeze(Object.defineProperty({__proto__:null,MultiDrag:b1,Sortable:ue,Swap:v1,default:ue},Symbol.toStringTag,{value:"Module"})));(function(e,t){(function(a,r){e.exports=r(o,E1)})(typeof self<"u"?self:So,function(n,a){return function(r){var i={};function s(l){if(i[l])return i[l].exports;var c=i[l]={i:l,l:!1,exports:{}};return r[l].call(c.exports,c,c.exports,s),c.l=!0,c.exports}return s.m=r,s.c=i,s.d=function(l,c,d){s.o(l,c)||Object.defineProperty(l,c,{enumerable:!0,get:d})},s.r=function(l){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(l,"__esModule",{value:!0})},s.t=function(l,c){if(c&1&&(l=s(l)),c&8||c&4&&typeof l=="object"&&l&&l.__esModule)return l;var d=Object.create(null);if(s.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:l}),c&2&&typeof l!="string")for(var f in l)s.d(d,f,function(p){return l[p]}.bind(null,f));return d},s.n=function(l){var c=l&&l.__esModule?function(){return l.default}:function(){return l};return s.d(c,"a",c),c},s.o=function(l,c){return Object.prototype.hasOwnProperty.call(l,c)},s.p="",s(s.s="fb15")}({"00ee":function(r,i,s){var l=s("b622"),c=l("toStringTag"),d={};d[c]="z",r.exports=String(d)==="[object z]"},"0366":function(r,i,s){var l=s("1c0b");r.exports=function(c,d,f){if(l(c),d===void 0)return c;switch(f){case 0:return function(){return c.call(d)};case 1:return function(p){return c.call(d,p)};case 2:return function(p,h){return c.call(d,p,h)};case 3:return function(p,h,v){return c.call(d,p,h,v)}}return function(){return c.apply(d,arguments)}}},"057f":function(r,i,s){var l=s("fc6a"),c=s("241c").f,d={}.toString,f=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],p=function(h){try{return c(h)}catch{return f.slice()}};r.exports.f=function(v){return f&&d.call(v)=="[object Window]"?p(v):c(l(v))}},"06cf":function(r,i,s){var l=s("83ab"),c=s("d1e7"),d=s("5c6c"),f=s("fc6a"),p=s("c04e"),h=s("5135"),v=s("0cfb"),u=Object.getOwnPropertyDescriptor;i.f=l?u:function(y,b){if(y=f(y),b=p(b,!0),v)try{return u(y,b)}catch{}if(h(y,b))return d(!c.f.call(y,b),y[b])}},"0cfb":function(r,i,s){var l=s("83ab"),c=s("d039"),d=s("cc12");r.exports=!l&&!c(function(){return Object.defineProperty(d("div"),"a",{get:function(){return 7}}).a!=7})},"13d5":function(r,i,s){var l=s("23e7"),c=s("d58f").left,d=s("a640"),f=s("ae40"),p=d("reduce"),h=f("reduce",{1:0});l({target:"Array",proto:!0,forced:!p||!h},{reduce:function(u){return c(this,u,arguments.length,arguments.length>1?arguments[1]:void 0)}})},"14c3":function(r,i,s){var l=s("c6b6"),c=s("9263");r.exports=function(d,f){var p=d.exec;if(typeof p=="function"){var h=p.call(d,f);if(typeof h!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return h}if(l(d)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return c.call(d,f)}},"159b":function(r,i,s){var l=s("da84"),c=s("fdbc"),d=s("17c2"),f=s("9112");for(var p in c){var h=l[p],v=h&&h.prototype;if(v&&v.forEach!==d)try{f(v,"forEach",d)}catch{v.forEach=d}}},"17c2":function(r,i,s){var l=s("b727").forEach,c=s("a640"),d=s("ae40"),f=c("forEach"),p=d("forEach");r.exports=!f||!p?function(v){return l(this,v,arguments.length>1?arguments[1]:void 0)}:[].forEach},"1be4":function(r,i,s){var l=s("d066");r.exports=l("document","documentElement")},"1c0b":function(r,i){r.exports=function(s){if(typeof s!="function")throw TypeError(String(s)+" is not a function");return s}},"1c7e":function(r,i,s){var l=s("b622"),c=l("iterator"),d=!1;try{var f=0,p={next:function(){return{done:!!f++}},return:function(){d=!0}};p[c]=function(){return this},Array.from(p,function(){throw 2})}catch{}r.exports=function(h,v){if(!v&&!d)return!1;var u=!1;try{var m={};m[c]=function(){return{next:function(){return{done:u=!0}}}},h(m)}catch{}return u}},"1d80":function(r,i){r.exports=function(s){if(s==null)throw TypeError("Can't call method on "+s);return s}},"1dde":function(r,i,s){var l=s("d039"),c=s("b622"),d=s("2d00"),f=c("species");r.exports=function(p){return d>=51||!l(function(){var h=[],v=h.constructor={};return v[f]=function(){return{foo:1}},h[p](Boolean).foo!==1})}},"23cb":function(r,i,s){var l=s("a691"),c=Math.max,d=Math.min;r.exports=function(f,p){var h=l(f);return h<0?c(h+p,0):d(h,p)}},"23e7":function(r,i,s){var l=s("da84"),c=s("06cf").f,d=s("9112"),f=s("6eeb"),p=s("ce4e"),h=s("e893"),v=s("94ca");r.exports=function(u,m){var y=u.target,b=u.global,g=u.stat,T,O,S,N,I,_;if(b?O=l:g?O=l[y]||p(y,{}):O=(l[y]||{}).prototype,O)for(S in m){if(I=m[S],u.noTargetGet?(_=c(O,S),N=_&&_.value):N=O[S],T=v(b?S:y+(g?".":"#")+S,u.forced),!T&&N!==void 0){if(typeof I==typeof N)continue;h(I,N)}(u.sham||N&&N.sham)&&d(I,"sham",!0),f(O,S,I,u)}}},"241c":function(r,i,s){var l=s("ca84"),c=s("7839"),d=c.concat("length","prototype");i.f=Object.getOwnPropertyNames||function(p){return l(p,d)}},"25f0":function(r,i,s){var l=s("6eeb"),c=s("825a"),d=s("d039"),f=s("ad6d"),p="toString",h=RegExp.prototype,v=h[p],u=d(function(){return v.call({source:"a",flags:"b"})!="/a/b"}),m=v.name!=p;(u||m)&&l(RegExp.prototype,p,function(){var b=c(this),g=String(b.source),T=b.flags,O=String(T===void 0&&b instanceof RegExp&&!("flags"in h)?f.call(b):T);return"/"+g+"/"+O},{unsafe:!0})},"2ca0":function(r,i,s){var l=s("23e7"),c=s("06cf").f,d=s("50c4"),f=s("5a34"),p=s("1d80"),h=s("ab13"),v=s("c430"),u="".startsWith,m=Math.min,y=h("startsWith"),b=!v&&!y&&!!function(){var g=c(String.prototype,"startsWith");return g&&!g.writable}();l({target:"String",proto:!0,forced:!b&&!y},{startsWith:function(T){var O=String(p(this));f(T);var S=d(m(arguments.length>1?arguments[1]:void 0,O.length)),N=String(T);return u?u.call(O,N,S):O.slice(S,S+N.length)===N}})},"2d00":function(r,i,s){var l=s("da84"),c=s("342f"),d=l.process,f=d&&d.versions,p=f&&f.v8,h,v;p?(h=p.split("."),v=h[0]+h[1]):c&&(h=c.match(/Edge\/(\d+)/),(!h||h[1]>=74)&&(h=c.match(/Chrome\/(\d+)/),h&&(v=h[1]))),r.exports=v&&+v},"342f":function(r,i,s){var l=s("d066");r.exports=l("navigator","userAgent")||""},"35a1":function(r,i,s){var l=s("f5df"),c=s("3f8c"),d=s("b622"),f=d("iterator");r.exports=function(p){if(p!=null)return p[f]||p["@@iterator"]||c[l(p)]}},"37e8":function(r,i,s){var l=s("83ab"),c=s("9bf2"),d=s("825a"),f=s("df75");r.exports=l?Object.defineProperties:function(h,v){d(h);for(var u=f(v),m=u.length,y=0,b;m>y;)c.f(h,b=u[y++],v[b]);return h}},"3bbe":function(r,i,s){var l=s("861d");r.exports=function(c){if(!l(c)&&c!==null)throw TypeError("Can't set "+String(c)+" as a prototype");return c}},"3ca3":function(r,i,s){var l=s("6547").charAt,c=s("69f3"),d=s("7dd0"),f="String Iterator",p=c.set,h=c.getterFor(f);d(String,"String",function(v){p(this,{type:f,string:String(v),index:0})},function(){var u=h(this),m=u.string,y=u.index,b;return y>=m.length?{value:void 0,done:!0}:(b=l(m,y),u.index+=b.length,{value:b,done:!1})})},"3f8c":function(r,i){r.exports={}},4160:function(r,i,s){var l=s("23e7"),c=s("17c2");l({target:"Array",proto:!0,forced:[].forEach!=c},{forEach:c})},"428f":function(r,i,s){var l=s("da84");r.exports=l},"44ad":function(r,i,s){var l=s("d039"),c=s("c6b6"),d="".split;r.exports=l(function(){return!Object("z").propertyIsEnumerable(0)})?function(f){return c(f)=="String"?d.call(f,""):Object(f)}:Object},"44d2":function(r,i,s){var l=s("b622"),c=s("7c73"),d=s("9bf2"),f=l("unscopables"),p=Array.prototype;p[f]==null&&d.f(p,f,{configurable:!0,value:c(null)}),r.exports=function(h){p[f][h]=!0}},"44e7":function(r,i,s){var l=s("861d"),c=s("c6b6"),d=s("b622"),f=d("match");r.exports=function(p){var h;return l(p)&&((h=p[f])!==void 0?!!h:c(p)=="RegExp")}},4930:function(r,i,s){var l=s("d039");r.exports=!!Object.getOwnPropertySymbols&&!l(function(){return!String(Symbol())})},"4d64":function(r,i,s){var l=s("fc6a"),c=s("50c4"),d=s("23cb"),f=function(p){return function(h,v,u){var m=l(h),y=c(m.length),b=d(u,y),g;if(p&&v!=v){for(;y>b;)if(g=m[b++],g!=g)return!0}else for(;y>b;b++)if((p||b in m)&&m[b]===v)return p||b||0;return!p&&-1}};r.exports={includes:f(!0),indexOf:f(!1)}},"4de4":function(r,i,s){var l=s("23e7"),c=s("b727").filter,d=s("1dde"),f=s("ae40"),p=d("filter"),h=f("filter");l({target:"Array",proto:!0,forced:!p||!h},{filter:function(u){return c(this,u,arguments.length>1?arguments[1]:void 0)}})},"4df4":function(r,i,s){var l=s("0366"),c=s("7b0b"),d=s("9bdd"),f=s("e95a"),p=s("50c4"),h=s("8418"),v=s("35a1");r.exports=function(m){var y=c(m),b=typeof this=="function"?this:Array,g=arguments.length,T=g>1?arguments[1]:void 0,O=T!==void 0,S=v(y),N=0,I,_,A,D,M,K;if(O&&(T=l(T,g>2?arguments[2]:void 0,2)),S!=null&&!(b==Array&&f(S)))for(D=S.call(y),M=D.next,_=new b;!(A=M.call(D)).done;N++)K=O?d(D,T,[A.value,N],!0):A.value,h(_,N,K);else for(I=p(y.length),_=new b(I);I>N;N++)K=O?T(y[N],N):y[N],h(_,N,K);return _.length=N,_}},"4fad":function(r,i,s){var l=s("23e7"),c=s("6f53").entries;l({target:"Object",stat:!0},{entries:function(f){return c(f)}})},"50c4":function(r,i,s){var l=s("a691"),c=Math.min;r.exports=function(d){return d>0?c(l(d),9007199254740991):0}},5135:function(r,i){var s={}.hasOwnProperty;r.exports=function(l,c){return s.call(l,c)}},5319:function(r,i,s){var l=s("d784"),c=s("825a"),d=s("7b0b"),f=s("50c4"),p=s("a691"),h=s("1d80"),v=s("8aa5"),u=s("14c3"),m=Math.max,y=Math.min,b=Math.floor,g=/\$([$&'`]|\d\d?|<[^>]*>)/g,T=/\$([$&'`]|\d\d?)/g,O=function(S){return S===void 0?S:String(S)};l("replace",2,function(S,N,I,_){var A=_.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,D=_.REPLACE_KEEPS_$0,M=A?"$":"$0";return[function(j,H){var W=h(this),Q=j?.[S];return Q!==void 0?Q.call(j,W,H):N.call(String(W),j,H)},function(B,j){if(!A&&D||typeof j=="string"&&j.indexOf(M)===-1){var H=I(N,B,this,j);if(H.done)return H.value}var W=c(B),Q=String(this),ne=typeof j=="function";ne||(j=String(j));var we=W.global;if(we){var Ze=W.unicode;W.lastIndex=0}for(var se=[];;){var fe=u(W,Q);if(fe===null||(se.push(fe),!we))break;var ye=String(fe[0]);ye===""&&(W.lastIndex=v(Q,f(W.lastIndex),Ze))}for(var Se="",Pe=0,ke=0;ke=Pe&&(Se+=Q.slice(Pe,ft)+ot,Pe=ft+je.length)}return Se+Q.slice(Pe)}];function K(B,j,H,W,Q,ne){var we=H+B.length,Ze=W.length,se=T;return Q!==void 0&&(Q=d(Q),se=g),N.call(ne,se,function(fe,ye){var Se;switch(ye.charAt(0)){case"$":return"$";case"&":return B;case"`":return j.slice(0,H);case"'":return j.slice(we);case"<":Se=Q[ye.slice(1,-1)];break;default:var Pe=+ye;if(Pe===0)return fe;if(Pe>Ze){var ke=b(Pe/10);return ke===0?fe:ke<=Ze?W[ke-1]===void 0?ye.charAt(1):W[ke-1]+ye.charAt(1):fe}Se=W[Pe-1]}return Se===void 0?"":Se})}})},5692:function(r,i,s){var l=s("c430"),c=s("c6cd");(r.exports=function(d,f){return c[d]||(c[d]=f!==void 0?f:{})})("versions",[]).push({version:"3.6.5",mode:l?"pure":"global",copyright:"ยฉ 2020 Denis Pushkarev (zloirock.ru)"})},"56ef":function(r,i,s){var l=s("d066"),c=s("241c"),d=s("7418"),f=s("825a");r.exports=l("Reflect","ownKeys")||function(h){var v=c.f(f(h)),u=d.f;return u?v.concat(u(h)):v}},"5a34":function(r,i,s){var l=s("44e7");r.exports=function(c){if(l(c))throw TypeError("The method doesn't accept regular expressions");return c}},"5c6c":function(r,i){r.exports=function(s,l){return{enumerable:!(s&1),configurable:!(s&2),writable:!(s&4),value:l}}},"5db7":function(r,i,s){var l=s("23e7"),c=s("a2bf"),d=s("7b0b"),f=s("50c4"),p=s("1c0b"),h=s("65f0");l({target:"Array",proto:!0},{flatMap:function(u){var m=d(this),y=f(m.length),b;return p(u),b=h(m,0),b.length=c(b,m,m,y,0,1,u,arguments.length>1?arguments[1]:void 0),b}})},6547:function(r,i,s){var l=s("a691"),c=s("1d80"),d=function(f){return function(p,h){var v=String(c(p)),u=l(h),m=v.length,y,b;return u<0||u>=m?f?"":void 0:(y=v.charCodeAt(u),y<55296||y>56319||u+1===m||(b=v.charCodeAt(u+1))<56320||b>57343?f?v.charAt(u):y:f?v.slice(u,u+2):(y-55296<<10)+(b-56320)+65536)}};r.exports={codeAt:d(!1),charAt:d(!0)}},"65f0":function(r,i,s){var l=s("861d"),c=s("e8b5"),d=s("b622"),f=d("species");r.exports=function(p,h){var v;return c(p)&&(v=p.constructor,typeof v=="function"&&(v===Array||c(v.prototype))?v=void 0:l(v)&&(v=v[f],v===null&&(v=void 0))),new(v===void 0?Array:v)(h===0?0:h)}},"69f3":function(r,i,s){var l=s("7f9a"),c=s("da84"),d=s("861d"),f=s("9112"),p=s("5135"),h=s("f772"),v=s("d012"),u=c.WeakMap,m,y,b,g=function(A){return b(A)?y(A):m(A,{})},T=function(A){return function(D){var M;if(!d(D)||(M=y(D)).type!==A)throw TypeError("Incompatible receiver, "+A+" required");return M}};if(l){var O=new u,S=O.get,N=O.has,I=O.set;m=function(A,D){return I.call(O,A,D),D},y=function(A){return S.call(O,A)||{}},b=function(A){return N.call(O,A)}}else{var _=h("state");v[_]=!0,m=function(A,D){return f(A,_,D),D},y=function(A){return p(A,_)?A[_]:{}},b=function(A){return p(A,_)}}r.exports={set:m,get:y,has:b,enforce:g,getterFor:T}},"6eeb":function(r,i,s){var l=s("da84"),c=s("9112"),d=s("5135"),f=s("ce4e"),p=s("8925"),h=s("69f3"),v=h.get,u=h.enforce,m=String(String).split("String");(r.exports=function(y,b,g,T){var O=T?!!T.unsafe:!1,S=T?!!T.enumerable:!1,N=T?!!T.noTargetGet:!1;if(typeof g=="function"&&(typeof b=="string"&&!d(g,"name")&&c(g,"name",b),u(g).source=m.join(typeof b=="string"?b:"")),y===l){S?y[b]=g:f(b,g);return}else O?!N&&y[b]&&(S=!0):delete y[b];S?y[b]=g:c(y,b,g)})(Function.prototype,"toString",function(){return typeof this=="function"&&v(this).source||p(this)})},"6f53":function(r,i,s){var l=s("83ab"),c=s("df75"),d=s("fc6a"),f=s("d1e7").f,p=function(h){return function(v){for(var u=d(v),m=c(u),y=m.length,b=0,g=[],T;y>b;)T=m[b++],(!l||f.call(u,T))&&g.push(h?[T,u[T]]:u[T]);return g}};r.exports={entries:p(!0),values:p(!1)}},"73d9":function(r,i,s){var l=s("44d2");l("flatMap")},7418:function(r,i){i.f=Object.getOwnPropertySymbols},"746f":function(r,i,s){var l=s("428f"),c=s("5135"),d=s("e538"),f=s("9bf2").f;r.exports=function(p){var h=l.Symbol||(l.Symbol={});c(h,p)||f(h,p,{value:d.f(p)})}},7839:function(r,i){r.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7b0b":function(r,i,s){var l=s("1d80");r.exports=function(c){return Object(l(c))}},"7c73":function(r,i,s){var l=s("825a"),c=s("37e8"),d=s("7839"),f=s("d012"),p=s("1be4"),h=s("cc12"),v=s("f772"),u=">",m="<",y="prototype",b="script",g=v("IE_PROTO"),T=function(){},O=function(A){return m+b+u+A+m+"/"+b+u},S=function(A){A.write(O("")),A.close();var D=A.parentWindow.Object;return A=null,D},N=function(){var A=h("iframe"),D="java"+b+":",M;return A.style.display="none",p.appendChild(A),A.src=String(D),M=A.contentWindow.document,M.open(),M.write(O("document.F=Object")),M.close(),M.F},I,_=function(){try{I=document.domain&&new ActiveXObject("htmlfile")}catch{}_=I?S(I):N();for(var A=d.length;A--;)delete _[y][d[A]];return _()};f[g]=!0,r.exports=Object.create||function(D,M){var K;return D!==null?(T[y]=l(D),K=new T,T[y]=null,K[g]=D):K=_(),M===void 0?K:c(K,M)}},"7dd0":function(r,i,s){var l=s("23e7"),c=s("9ed3"),d=s("e163"),f=s("d2bb"),p=s("d44e"),h=s("9112"),v=s("6eeb"),u=s("b622"),m=s("c430"),y=s("3f8c"),b=s("ae93"),g=b.IteratorPrototype,T=b.BUGGY_SAFARI_ITERATORS,O=u("iterator"),S="keys",N="values",I="entries",_=function(){return this};r.exports=function(A,D,M,K,B,j,H){c(M,D,K);var W=function(ke){if(ke===B&&se)return se;if(!T&&ke in we)return we[ke];switch(ke){case S:return function(){return new M(this,ke)};case N:return function(){return new M(this,ke)};case I:return function(){return new M(this,ke)}}return function(){return new M(this)}},Q=D+" Iterator",ne=!1,we=A.prototype,Ze=we[O]||we["@@iterator"]||B&&we[B],se=!T&&Ze||W(B),fe=D=="Array"&&we.entries||Ze,ye,Se,Pe;if(fe&&(ye=d(fe.call(new A)),g!==Object.prototype&&ye.next&&(!m&&d(ye)!==g&&(f?f(ye,g):typeof ye[O]!="function"&&h(ye,O,_)),p(ye,Q,!0,!0),m&&(y[Q]=_))),B==N&&Ze&&Ze.name!==N&&(ne=!0,se=function(){return Ze.call(this)}),(!m||H)&&we[O]!==se&&h(we,O,se),y[D]=se,B)if(Se={values:W(N),keys:j?se:W(S),entries:W(I)},H)for(Pe in Se)(T||ne||!(Pe in we))&&v(we,Pe,Se[Pe]);else l({target:D,proto:!0,forced:T||ne},Se);return Se}},"7f9a":function(r,i,s){var l=s("da84"),c=s("8925"),d=l.WeakMap;r.exports=typeof d=="function"&&/native code/.test(c(d))},"825a":function(r,i,s){var l=s("861d");r.exports=function(c){if(!l(c))throw TypeError(String(c)+" is not an object");return c}},"83ab":function(r,i,s){var l=s("d039");r.exports=!l(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},8418:function(r,i,s){var l=s("c04e"),c=s("9bf2"),d=s("5c6c");r.exports=function(f,p,h){var v=l(p);v in f?c.f(f,v,d(0,h)):f[v]=h}},"861d":function(r,i){r.exports=function(s){return typeof s=="object"?s!==null:typeof s=="function"}},8875:function(r,i,s){var l,c,d;(function(f,p){c=[],l=p,d=typeof l=="function"?l.apply(i,c):l,d!==void 0&&(r.exports=d)})(typeof self<"u"?self:this,function(){function f(){var p=Object.getOwnPropertyDescriptor(document,"currentScript");if(!p&&"currentScript"in document&&document.currentScript||p&&p.get!==f&&document.currentScript)return document.currentScript;try{throw new Error}catch(I){var h=/.*at [^(]*\((.*):(.+):(.+)\)$/ig,v=/@([^@]*):(\d+):(\d+)\s*$/ig,u=h.exec(I.stack)||v.exec(I.stack),m=u&&u[1]||!1,y=u&&u[2]||!1,b=document.location.href.replace(document.location.hash,""),g,T,O,S=document.getElementsByTagName("script");m===b&&(g=document.documentElement.outerHTML,T=new RegExp("(?:[^\\n]+?\\n){0,"+(y-2)+"}[^<]*