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CAAEQ,MAAO,CAAEuwB,KAAM9xB,KAAK8xB,KAAMC,cAAe/xB,KAAKiyB,gBAClD,MAET,GAEF,MAAAtyB,CAAOP,GACL,OAAOY,KAAK6yB,YAAc7yB,KAAKo0B,eAAeh1B,GAAKY,KAAKk0B,gBAAgB90B,EAC1E,GAYI0O,GAVkB,OACtBhB,EAFK,KAAU,MAKf,EACA,KACA,WACA,KACA,MAEU3L,i1CCtLM,IACK,IACJ,IACC,IACH,IACD,IACC,IACC,IACG,IACL,IACQ,IACX,IACG,IACO,IACH,IACD,IACO,IACG,IACN,IACD,IACI,IACC,IACF,IACF,IACC,IACR,IACG,IACK,wBACZ,IACI,IACC,IACL,IACa,IACR,IACJ,IACM,IACE,IACI,IACX,IACM,IACM,IACd,IACM,IACD,IACC,IACA,IACF,IACD,IACK,IACN,IACI,IACD,EAAAoM,EACE,KACR,KACG,KACK,KACN,KACI,KACU,KACF,WACX,KACW,KACb,KACI,KACO,KACF,KACI,KACX,KACC,KACK,KACJ,KACbknB,OAAOC,YA8CD,KACE,KACA,YACRD,OAAOC","sources":["webpack:///nextcloud/node_modules/@nextcloud/dialogs/node_modules/@vueuse/shared/index.mjs","webpack:///nextcloud/node_modules/@nextcloud/dialogs/node_modules/@vueuse/shared/node_modules/vue-demi/lib/index.mjs","webpack:///nextcloud/node_modules/@nextcloud/dialogs/node_modules/@vueuse/core/index.mjs","webpack:///nextcloud/node_modules/@nextcloud/dialogs/node_modules/@vueuse/core/node_modules/vue-demi/lib/index.mjs","webpack:///nextcloud/node_modules/@nextcloud/dialogs/dist/chunks/FilePicker-c55dc760.mjs","webpack:///nextcloud/node_modules/@nextcloud/files/dist/index.mjs","webpack:///nextcloud/node_modules/@nextcloud/vue/dist/Components/NcRichContenteditable.mjs","webpack:///nextcloud/node_modules/@nextcloud/vue/dist/chunks/NcRichText-08b09b73.mjs","webpack:///nextcloud/node_modules/@nextcloud/vue/dist/index.mjs"],"sourcesContent":["import { shallowRef, watchEffect, readonly, ref, watch, customRef, getCurrentScope, onScopeDispose, effectScope, getCurrentInstance, provide, inject, isVue3, version, isRef, unref, computed, reactive, toRefs as toRefs$1, toRef as toRef$1, isVue2, set as set$1, onBeforeMount, nextTick, onBeforeUnmount, onMounted, onUnmounted, isReactive } from 'vue-demi';\n\nfunction computedEager(fn, options) {\n var _a;\n const result = shallowRef();\n watchEffect(() => {\n result.value = fn();\n }, {\n ...options,\n flush: (_a = options == null ? void 0 : options.flush) != null ? _a : \"sync\"\n });\n return readonly(result);\n}\n\nfunction computedWithControl(source, fn) {\n let v = void 0;\n let track;\n let trigger;\n const dirty = ref(true);\n const update = () => {\n dirty.value = true;\n trigger();\n };\n watch(source, update, { flush: \"sync\" });\n const get = typeof fn === \"function\" ? fn : fn.get;\n const set = typeof fn === \"function\" ? void 0 : fn.set;\n const result = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n if (dirty.value) {\n v = get();\n dirty.value = false;\n }\n track();\n return v;\n },\n set(v2) {\n set == null ? void 0 : set(v2);\n }\n };\n });\n if (Object.isExtensible(result))\n result.trigger = update;\n return result;\n}\n\nfunction tryOnScopeDispose(fn) {\n if (getCurrentScope()) {\n onScopeDispose(fn);\n return true;\n }\n return false;\n}\n\nfunction createEventHook() {\n const fns = /* @__PURE__ */ new Set();\n const off = (fn) => {\n fns.delete(fn);\n };\n const on = (fn) => {\n fns.add(fn);\n const offFn = () => off(fn);\n tryOnScopeDispose(offFn);\n return {\n off: offFn\n };\n };\n const trigger = (param) => {\n return Promise.all(Array.from(fns).map((fn) => fn(param)));\n };\n return {\n on,\n off,\n trigger\n };\n}\n\nfunction createGlobalState(stateFactory) {\n let initialized = false;\n let state;\n const scope = effectScope(true);\n return (...args) => {\n if (!initialized) {\n state = scope.run(() => stateFactory(...args));\n initialized = true;\n }\n return state;\n };\n}\n\nconst localProvidedStateMap = /* @__PURE__ */ new WeakMap();\n\nconst provideLocal = (key, value) => {\n var _a;\n const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;\n if (instance == null)\n throw new Error(\"provideLocal must be called in setup\");\n if (!localProvidedStateMap.has(instance))\n localProvidedStateMap.set(instance, /* @__PURE__ */ Object.create(null));\n const localProvidedState = localProvidedStateMap.get(instance);\n localProvidedState[key] = value;\n provide(key, value);\n};\n\nconst injectLocal = (...args) => {\n var _a;\n const key = args[0];\n const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;\n if (instance == null)\n throw new Error(\"injectLocal must be called in setup\");\n if (localProvidedStateMap.has(instance) && key in localProvidedStateMap.get(instance))\n return localProvidedStateMap.get(instance)[key];\n return inject(...args);\n};\n\nfunction createInjectionState(composable, options) {\n const key = (options == null ? void 0 : options.injectionKey) || Symbol(\"InjectionState\");\n const useProvidingState = (...args) => {\n const state = composable(...args);\n provideLocal(key, state);\n return state;\n };\n const useInjectedState = () => injectLocal(key);\n return [useProvidingState, useInjectedState];\n}\n\nfunction createSharedComposable(composable) {\n let subscribers = 0;\n let state;\n let scope;\n const dispose = () => {\n subscribers -= 1;\n if (scope && subscribers <= 0) {\n scope.stop();\n state = void 0;\n scope = void 0;\n }\n };\n return (...args) => {\n subscribers += 1;\n if (!state) {\n scope = effectScope(true);\n state = scope.run(() => composable(...args));\n }\n tryOnScopeDispose(dispose);\n return state;\n };\n}\n\nfunction extendRef(ref, extend, { enumerable = false, unwrap = true } = {}) {\n if (!isVue3 && !version.startsWith(\"2.7.\")) {\n if (process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] extendRef only works in Vue 2.7 or above.\");\n return;\n }\n for (const [key, value] of Object.entries(extend)) {\n if (key === \"value\")\n continue;\n if (isRef(value) && unwrap) {\n Object.defineProperty(ref, key, {\n get() {\n return value.value;\n },\n set(v) {\n value.value = v;\n },\n enumerable\n });\n } else {\n Object.defineProperty(ref, key, { value, enumerable });\n }\n }\n return ref;\n}\n\nfunction get(obj, key) {\n if (key == null)\n return unref(obj);\n return unref(obj)[key];\n}\n\nfunction isDefined(v) {\n return unref(v) != null;\n}\n\nfunction makeDestructurable(obj, arr) {\n if (typeof Symbol !== \"undefined\") {\n const clone = { ...obj };\n Object.defineProperty(clone, Symbol.iterator, {\n enumerable: false,\n value() {\n let index = 0;\n return {\n next: () => ({\n value: arr[index++],\n done: index > arr.length\n })\n };\n }\n });\n return clone;\n } else {\n return Object.assign([...arr], obj);\n }\n}\n\nfunction toValue(r) {\n return typeof r === \"function\" ? r() : unref(r);\n}\nconst resolveUnref = toValue;\n\nfunction reactify(fn, options) {\n const unrefFn = (options == null ? void 0 : options.computedGetter) === false ? unref : toValue;\n return function(...args) {\n return computed(() => fn.apply(this, args.map((i) => unrefFn(i))));\n };\n}\n\nfunction reactifyObject(obj, optionsOrKeys = {}) {\n let keys = [];\n let options;\n if (Array.isArray(optionsOrKeys)) {\n keys = optionsOrKeys;\n } else {\n options = optionsOrKeys;\n const { includeOwnProperties = true } = optionsOrKeys;\n keys.push(...Object.keys(obj));\n if (includeOwnProperties)\n keys.push(...Object.getOwnPropertyNames(obj));\n }\n return Object.fromEntries(\n keys.map((key) => {\n const value = obj[key];\n return [\n key,\n typeof value === \"function\" ? reactify(value.bind(obj), options) : value\n ];\n })\n );\n}\n\nfunction toReactive(objectRef) {\n if (!isRef(objectRef))\n return reactive(objectRef);\n const proxy = new Proxy({}, {\n get(_, p, receiver) {\n return unref(Reflect.get(objectRef.value, p, receiver));\n },\n set(_, p, value) {\n if (isRef(objectRef.value[p]) && !isRef(value))\n objectRef.value[p].value = value;\n else\n objectRef.value[p] = value;\n return true;\n },\n deleteProperty(_, p) {\n return Reflect.deleteProperty(objectRef.value, p);\n },\n has(_, p) {\n return Reflect.has(objectRef.value, p);\n },\n ownKeys() {\n return Object.keys(objectRef.value);\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true\n };\n }\n });\n return reactive(proxy);\n}\n\nfunction reactiveComputed(fn) {\n return toReactive(computed(fn));\n}\n\nfunction reactiveOmit(obj, ...keys) {\n const flatKeys = keys.flat();\n const predicate = flatKeys[0];\n return reactiveComputed(() => typeof predicate === \"function\" ? Object.fromEntries(Object.entries(toRefs$1(obj)).filter(([k, v]) => !predicate(toValue(v), k))) : Object.fromEntries(Object.entries(toRefs$1(obj)).filter((e) => !flatKeys.includes(e[0]))));\n}\n\nconst isClient = typeof window !== \"undefined\" && typeof document !== \"undefined\";\nconst isDef = (val) => typeof val !== \"undefined\";\nconst notNullish = (val) => val != null;\nconst assert = (condition, ...infos) => {\n if (!condition)\n console.warn(...infos);\n};\nconst toString = Object.prototype.toString;\nconst isObject = (val) => toString.call(val) === \"[object Object]\";\nconst now = () => Date.now();\nconst timestamp = () => +Date.now();\nconst clamp = (n, min, max) => Math.min(max, Math.max(min, n));\nconst noop = () => {\n};\nconst rand = (min, max) => {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min;\n};\nconst hasOwn = (val, key) => Object.prototype.hasOwnProperty.call(val, key);\nconst isIOS = /* @__PURE__ */ getIsIOS();\nfunction getIsIOS() {\n var _a;\n return isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /* @__PURE__ */ /iP(ad|hone|od)/.test(window.navigator.userAgent);\n}\n\nfunction createFilterWrapper(filter, fn) {\n function wrapper(...args) {\n return new Promise((resolve, reject) => {\n Promise.resolve(filter(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject);\n });\n }\n return wrapper;\n}\nconst bypassFilter = (invoke) => {\n return invoke();\n};\nfunction debounceFilter(ms, options = {}) {\n let timer;\n let maxTimer;\n let lastRejector = noop;\n const _clearTimeout = (timer2) => {\n clearTimeout(timer2);\n lastRejector();\n lastRejector = noop;\n };\n const filter = (invoke) => {\n const duration = toValue(ms);\n const maxDuration = toValue(options.maxWait);\n if (timer)\n _clearTimeout(timer);\n if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {\n if (maxTimer) {\n _clearTimeout(maxTimer);\n maxTimer = null;\n }\n return Promise.resolve(invoke());\n }\n return new Promise((resolve, reject) => {\n lastRejector = options.rejectOnCancel ? reject : resolve;\n if (maxDuration && !maxTimer) {\n maxTimer = setTimeout(() => {\n if (timer)\n _clearTimeout(timer);\n maxTimer = null;\n resolve(invoke());\n }, maxDuration);\n }\n timer = setTimeout(() => {\n if (maxTimer)\n _clearTimeout(maxTimer);\n maxTimer = null;\n resolve(invoke());\n }, duration);\n });\n };\n return filter;\n}\nfunction throttleFilter(ms, trailing = true, leading = true, rejectOnCancel = false) {\n let lastExec = 0;\n let timer;\n let isLeading = true;\n let lastRejector = noop;\n let lastValue;\n const clear = () => {\n if (timer) {\n clearTimeout(timer);\n timer = void 0;\n lastRejector();\n lastRejector = noop;\n }\n };\n const filter = (_invoke) => {\n const duration = toValue(ms);\n const elapsed = Date.now() - lastExec;\n const invoke = () => {\n return lastValue = _invoke();\n };\n clear();\n if (duration <= 0) {\n lastExec = Date.now();\n return invoke();\n }\n if (elapsed > duration && (leading || !isLeading)) {\n lastExec = Date.now();\n invoke();\n } else if (trailing) {\n lastValue = new Promise((resolve, reject) => {\n lastRejector = rejectOnCancel ? reject : resolve;\n timer = setTimeout(() => {\n lastExec = Date.now();\n isLeading = true;\n resolve(invoke());\n clear();\n }, Math.max(0, duration - elapsed));\n });\n }\n if (!leading && !timer)\n timer = setTimeout(() => isLeading = true, duration);\n isLeading = false;\n return lastValue;\n };\n return filter;\n}\nfunction pausableFilter(extendFilter = bypassFilter) {\n const isActive = ref(true);\n function pause() {\n isActive.value = false;\n }\n function resume() {\n isActive.value = true;\n }\n const eventFilter = (...args) => {\n if (isActive.value)\n extendFilter(...args);\n };\n return { isActive: readonly(isActive), pause, resume, eventFilter };\n}\n\nconst directiveHooks = {\n mounted: isVue3 ? \"mounted\" : \"inserted\",\n updated: isVue3 ? \"updated\" : \"componentUpdated\",\n unmounted: isVue3 ? \"unmounted\" : \"unbind\"\n};\n\nfunction cacheStringFunction(fn) {\n const cache = /* @__PURE__ */ Object.create(null);\n return (str) => {\n const hit = cache[str];\n return hit || (cache[str] = fn(str));\n };\n}\nconst hyphenateRE = /\\B([A-Z])/g;\nconst hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, \"-$1\").toLowerCase());\nconst camelizeRE = /-(\\w)/g;\nconst camelize = cacheStringFunction((str) => {\n return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\n});\n\nfunction promiseTimeout(ms, throwOnTimeout = false, reason = \"Timeout\") {\n return new Promise((resolve, reject) => {\n if (throwOnTimeout)\n setTimeout(() => reject(reason), ms);\n else\n setTimeout(resolve, ms);\n });\n}\nfunction identity(arg) {\n return arg;\n}\nfunction createSingletonPromise(fn) {\n let _promise;\n function wrapper() {\n if (!_promise)\n _promise = fn();\n return _promise;\n }\n wrapper.reset = async () => {\n const _prev = _promise;\n _promise = void 0;\n if (_prev)\n await _prev;\n };\n return wrapper;\n}\nfunction invoke(fn) {\n return fn();\n}\nfunction containsProp(obj, ...props) {\n return props.some((k) => k in obj);\n}\nfunction increaseWithUnit(target, delta) {\n var _a;\n if (typeof target === \"number\")\n return target + delta;\n const value = ((_a = target.match(/^-?[0-9]+\\.?[0-9]*/)) == null ? void 0 : _a[0]) || \"\";\n const unit = target.slice(value.length);\n const result = Number.parseFloat(value) + delta;\n if (Number.isNaN(result))\n return target;\n return result + unit;\n}\nfunction objectPick(obj, keys, omitUndefined = false) {\n return keys.reduce((n, k) => {\n if (k in obj) {\n if (!omitUndefined || obj[k] !== void 0)\n n[k] = obj[k];\n }\n return n;\n }, {});\n}\nfunction objectOmit(obj, keys, omitUndefined = false) {\n return Object.fromEntries(Object.entries(obj).filter(([key, value]) => {\n return (!omitUndefined || value !== void 0) && !keys.includes(key);\n }));\n}\nfunction objectEntries(obj) {\n return Object.entries(obj);\n}\n\nfunction toRef(...args) {\n if (args.length !== 1)\n return toRef$1(...args);\n const r = args[0];\n return typeof r === \"function\" ? readonly(customRef(() => ({ get: r, set: noop }))) : ref(r);\n}\nconst resolveRef = toRef;\n\nfunction reactivePick(obj, ...keys) {\n const flatKeys = keys.flat();\n const predicate = flatKeys[0];\n return reactiveComputed(() => typeof predicate === \"function\" ? Object.fromEntries(Object.entries(toRefs$1(obj)).filter(([k, v]) => predicate(toValue(v), k))) : Object.fromEntries(flatKeys.map((k) => [k, toRef(obj, k)])));\n}\n\nfunction refAutoReset(defaultValue, afterMs = 1e4) {\n return customRef((track, trigger) => {\n let value = toValue(defaultValue);\n let timer;\n const resetAfter = () => setTimeout(() => {\n value = toValue(defaultValue);\n trigger();\n }, toValue(afterMs));\n tryOnScopeDispose(() => {\n clearTimeout(timer);\n });\n return {\n get() {\n track();\n return value;\n },\n set(newValue) {\n value = newValue;\n trigger();\n clearTimeout(timer);\n timer = resetAfter();\n }\n };\n });\n}\n\nfunction useDebounceFn(fn, ms = 200, options = {}) {\n return createFilterWrapper(\n debounceFilter(ms, options),\n fn\n );\n}\n\nfunction refDebounced(value, ms = 200, options = {}) {\n const debounced = ref(value.value);\n const updater = useDebounceFn(() => {\n debounced.value = value.value;\n }, ms, options);\n watch(value, () => updater());\n return debounced;\n}\n\nfunction refDefault(source, defaultValue) {\n return computed({\n get() {\n var _a;\n return (_a = source.value) != null ? _a : defaultValue;\n },\n set(value) {\n source.value = value;\n }\n });\n}\n\nfunction useThrottleFn(fn, ms = 200, trailing = false, leading = true, rejectOnCancel = false) {\n return createFilterWrapper(\n throttleFilter(ms, trailing, leading, rejectOnCancel),\n fn\n );\n}\n\nfunction refThrottled(value, delay = 200, trailing = true, leading = true) {\n if (delay <= 0)\n return value;\n const throttled = ref(value.value);\n const updater = useThrottleFn(() => {\n throttled.value = value.value;\n }, delay, trailing, leading);\n watch(value, () => updater());\n return throttled;\n}\n\nfunction refWithControl(initial, options = {}) {\n let source = initial;\n let track;\n let trigger;\n const ref = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n return get();\n },\n set(v) {\n set(v);\n }\n };\n });\n function get(tracking = true) {\n if (tracking)\n track();\n return source;\n }\n function set(value, triggering = true) {\n var _a, _b;\n if (value === source)\n return;\n const old = source;\n if (((_a = options.onBeforeChange) == null ? void 0 : _a.call(options, value, old)) === false)\n return;\n source = value;\n (_b = options.onChanged) == null ? void 0 : _b.call(options, value, old);\n if (triggering)\n trigger();\n }\n const untrackedGet = () => get(false);\n const silentSet = (v) => set(v, false);\n const peek = () => get(false);\n const lay = (v) => set(v, false);\n return extendRef(\n ref,\n {\n get,\n set,\n untrackedGet,\n silentSet,\n peek,\n lay\n },\n { enumerable: true }\n );\n}\nconst controlledRef = refWithControl;\n\nfunction set(...args) {\n if (args.length === 2) {\n const [ref, value] = args;\n ref.value = value;\n }\n if (args.length === 3) {\n if (isVue2) {\n set$1(...args);\n } else {\n const [target, key, value] = args;\n target[key] = value;\n }\n }\n}\n\nfunction watchWithFilter(source, cb, options = {}) {\n const {\n eventFilter = bypassFilter,\n ...watchOptions\n } = options;\n return watch(\n source,\n createFilterWrapper(\n eventFilter,\n cb\n ),\n watchOptions\n );\n}\n\nfunction watchPausable(source, cb, options = {}) {\n const {\n eventFilter: filter,\n ...watchOptions\n } = options;\n const { eventFilter, pause, resume, isActive } = pausableFilter(filter);\n const stop = watchWithFilter(\n source,\n cb,\n {\n ...watchOptions,\n eventFilter\n }\n );\n return { stop, pause, resume, isActive };\n}\n\nfunction syncRef(left, right, options = {}) {\n var _a, _b;\n const {\n flush = \"sync\",\n deep = false,\n immediate = true,\n direction = \"both\",\n transform = {}\n } = options;\n const watchers = [];\n const transformLTR = (_a = transform.ltr) != null ? _a : (v) => v;\n const transformRTL = (_b = transform.rtl) != null ? _b : (v) => v;\n if (direction === \"both\" || direction === \"ltr\") {\n watchers.push(watchPausable(\n left,\n (newValue) => {\n watchers.forEach((w) => w.pause());\n right.value = transformLTR(newValue);\n watchers.forEach((w) => w.resume());\n },\n { flush, deep, immediate }\n ));\n }\n if (direction === \"both\" || direction === \"rtl\") {\n watchers.push(watchPausable(\n right,\n (newValue) => {\n watchers.forEach((w) => w.pause());\n left.value = transformRTL(newValue);\n watchers.forEach((w) => w.resume());\n },\n { flush, deep, immediate }\n ));\n }\n const stop = () => {\n watchers.forEach((w) => w.stop());\n };\n return stop;\n}\n\nfunction syncRefs(source, targets, options = {}) {\n const {\n flush = \"sync\",\n deep = false,\n immediate = true\n } = options;\n if (!Array.isArray(targets))\n targets = [targets];\n return watch(\n source,\n (newValue) => targets.forEach((target) => target.value = newValue),\n { flush, deep, immediate }\n );\n}\n\nfunction toRefs(objectRef, options = {}) {\n if (!isRef(objectRef))\n return toRefs$1(objectRef);\n const result = Array.isArray(objectRef.value) ? Array.from({ length: objectRef.value.length }) : {};\n for (const key in objectRef.value) {\n result[key] = customRef(() => ({\n get() {\n return objectRef.value[key];\n },\n set(v) {\n var _a;\n const replaceRef = (_a = toValue(options.replaceRef)) != null ? _a : true;\n if (replaceRef) {\n if (Array.isArray(objectRef.value)) {\n const copy = [...objectRef.value];\n copy[key] = v;\n objectRef.value = copy;\n } else {\n const newObject = { ...objectRef.value, [key]: v };\n Object.setPrototypeOf(newObject, Object.getPrototypeOf(objectRef.value));\n objectRef.value = newObject;\n }\n } else {\n objectRef.value[key] = v;\n }\n }\n }));\n }\n return result;\n}\n\nfunction tryOnBeforeMount(fn, sync = true) {\n if (getCurrentInstance())\n onBeforeMount(fn);\n else if (sync)\n fn();\n else\n nextTick(fn);\n}\n\nfunction tryOnBeforeUnmount(fn) {\n if (getCurrentInstance())\n onBeforeUnmount(fn);\n}\n\nfunction tryOnMounted(fn, sync = true) {\n if (getCurrentInstance())\n onMounted(fn);\n else if (sync)\n fn();\n else\n nextTick(fn);\n}\n\nfunction tryOnUnmounted(fn) {\n if (getCurrentInstance())\n onUnmounted(fn);\n}\n\nfunction createUntil(r, isNot = false) {\n function toMatch(condition, { flush = \"sync\", deep = false, timeout, throwOnTimeout } = {}) {\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch(\n r,\n (v) => {\n if (condition(v) !== isNot) {\n stop == null ? void 0 : stop();\n resolve(v);\n }\n },\n {\n flush,\n deep,\n immediate: true\n }\n );\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(\n promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => stop == null ? void 0 : stop())\n );\n }\n return Promise.race(promises);\n }\n function toBe(value, options) {\n if (!isRef(value))\n return toMatch((v) => v === value, options);\n const { flush = \"sync\", deep = false, timeout, throwOnTimeout } = options != null ? options : {};\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch(\n [r, value],\n ([v1, v2]) => {\n if (isNot !== (v1 === v2)) {\n stop == null ? void 0 : stop();\n resolve(v1);\n }\n },\n {\n flush,\n deep,\n immediate: true\n }\n );\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(\n promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => {\n stop == null ? void 0 : stop();\n return toValue(r);\n })\n );\n }\n return Promise.race(promises);\n }\n function toBeTruthy(options) {\n return toMatch((v) => Boolean(v), options);\n }\n function toBeNull(options) {\n return toBe(null, options);\n }\n function toBeUndefined(options) {\n return toBe(void 0, options);\n }\n function toBeNaN(options) {\n return toMatch(Number.isNaN, options);\n }\n function toContains(value, options) {\n return toMatch((v) => {\n const array = Array.from(v);\n return array.includes(value) || array.includes(toValue(value));\n }, options);\n }\n function changed(options) {\n return changedTimes(1, options);\n }\n function changedTimes(n = 1, options) {\n let count = -1;\n return toMatch(() => {\n count += 1;\n return count >= n;\n }, options);\n }\n if (Array.isArray(toValue(r))) {\n const instance = {\n toMatch,\n toContains,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n } else {\n const instance = {\n toMatch,\n toBe,\n toBeTruthy,\n toBeNull,\n toBeNaN,\n toBeUndefined,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n }\n}\nfunction until(r) {\n return createUntil(r);\n}\n\nfunction defaultComparator(value, othVal) {\n return value === othVal;\n}\nfunction useArrayDifference(...args) {\n var _a;\n const list = args[0];\n const values = args[1];\n let compareFn = (_a = args[2]) != null ? _a : defaultComparator;\n if (typeof compareFn === \"string\") {\n const key = compareFn;\n compareFn = (value, othVal) => value[key] === othVal[key];\n }\n return computed(() => toValue(list).filter((x) => toValue(values).findIndex((y) => compareFn(x, y)) === -1));\n}\n\nfunction useArrayEvery(list, fn) {\n return computed(() => toValue(list).every((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction useArrayFilter(list, fn) {\n return computed(() => toValue(list).map((i) => toValue(i)).filter(fn));\n}\n\nfunction useArrayFind(list, fn) {\n return computed(() => toValue(\n toValue(list).find((element, index, array) => fn(toValue(element), index, array))\n ));\n}\n\nfunction useArrayFindIndex(list, fn) {\n return computed(() => toValue(list).findIndex((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction findLast(arr, cb) {\n let index = arr.length;\n while (index-- > 0) {\n if (cb(arr[index], index, arr))\n return arr[index];\n }\n return void 0;\n}\nfunction useArrayFindLast(list, fn) {\n return computed(() => toValue(\n !Array.prototype.findLast ? findLast(toValue(list), (element, index, array) => fn(toValue(element), index, array)) : toValue(list).findLast((element, index, array) => fn(toValue(element), index, array))\n ));\n}\n\nfunction isArrayIncludesOptions(obj) {\n return isObject(obj) && containsProp(obj, \"formIndex\", \"comparator\");\n}\nfunction useArrayIncludes(...args) {\n var _a;\n const list = args[0];\n const value = args[1];\n let comparator = args[2];\n let formIndex = 0;\n if (isArrayIncludesOptions(comparator)) {\n formIndex = (_a = comparator.fromIndex) != null ? _a : 0;\n comparator = comparator.comparator;\n }\n if (typeof comparator === \"string\") {\n const key = comparator;\n comparator = (element, value2) => element[key] === toValue(value2);\n }\n comparator = comparator != null ? comparator : (element, value2) => element === toValue(value2);\n return computed(() => toValue(list).slice(formIndex).some((element, index, array) => comparator(\n toValue(element),\n toValue(value),\n index,\n toValue(array)\n )));\n}\n\nfunction useArrayJoin(list, separator) {\n return computed(() => toValue(list).map((i) => toValue(i)).join(toValue(separator)));\n}\n\nfunction useArrayMap(list, fn) {\n return computed(() => toValue(list).map((i) => toValue(i)).map(fn));\n}\n\nfunction useArrayReduce(list, reducer, ...args) {\n const reduceCallback = (sum, value, index) => reducer(toValue(sum), toValue(value), index);\n return computed(() => {\n const resolved = toValue(list);\n return args.length ? resolved.reduce(reduceCallback, toValue(args[0])) : resolved.reduce(reduceCallback);\n });\n}\n\nfunction useArraySome(list, fn) {\n return computed(() => toValue(list).some((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction uniq(array) {\n return Array.from(new Set(array));\n}\nfunction uniqueElementsBy(array, fn) {\n return array.reduce((acc, v) => {\n if (!acc.some((x) => fn(v, x, array)))\n acc.push(v);\n return acc;\n }, []);\n}\nfunction useArrayUnique(list, compareFn) {\n return computed(() => {\n const resolvedList = toValue(list).map((element) => toValue(element));\n return compareFn ? uniqueElementsBy(resolvedList, compareFn) : uniq(resolvedList);\n });\n}\n\nfunction useCounter(initialValue = 0, options = {}) {\n let _initialValue = unref(initialValue);\n const count = ref(initialValue);\n const {\n max = Number.POSITIVE_INFINITY,\n min = Number.NEGATIVE_INFINITY\n } = options;\n const inc = (delta = 1) => count.value = Math.min(max, count.value + delta);\n const dec = (delta = 1) => count.value = Math.max(min, count.value - delta);\n const get = () => count.value;\n const set = (val) => count.value = Math.max(min, Math.min(max, val));\n const reset = (val = _initialValue) => {\n _initialValue = val;\n return set(val);\n };\n return { count, inc, dec, get, set, reset };\n}\n\nconst REGEX_PARSE = /^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/;\nconst REGEX_FORMAT = /\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;\nfunction defaultMeridiem(hours, minutes, isLowercase, hasPeriod) {\n let m = hours < 12 ? \"AM\" : \"PM\";\n if (hasPeriod)\n m = m.split(\"\").reduce((acc, curr) => acc += `${curr}.`, \"\");\n return isLowercase ? m.toLowerCase() : m;\n}\nfunction formatDate(date, formatStr, options = {}) {\n var _a;\n const years = date.getFullYear();\n const month = date.getMonth();\n const days = date.getDate();\n const hours = date.getHours();\n const minutes = date.getMinutes();\n const seconds = date.getSeconds();\n const milliseconds = date.getMilliseconds();\n const day = date.getDay();\n const meridiem = (_a = options.customMeridiem) != null ? _a : defaultMeridiem;\n const matches = {\n YY: () => String(years).slice(-2),\n YYYY: () => years,\n M: () => month + 1,\n MM: () => `${month + 1}`.padStart(2, \"0\"),\n MMM: () => date.toLocaleDateString(options.locales, { month: \"short\" }),\n MMMM: () => date.toLocaleDateString(options.locales, { month: \"long\" }),\n D: () => String(days),\n DD: () => `${days}`.padStart(2, \"0\"),\n H: () => String(hours),\n HH: () => `${hours}`.padStart(2, \"0\"),\n h: () => `${hours % 12 || 12}`.padStart(1, \"0\"),\n hh: () => `${hours % 12 || 12}`.padStart(2, \"0\"),\n m: () => String(minutes),\n mm: () => `${minutes}`.padStart(2, \"0\"),\n s: () => String(seconds),\n ss: () => `${seconds}`.padStart(2, \"0\"),\n SSS: () => `${milliseconds}`.padStart(3, \"0\"),\n d: () => day,\n dd: () => date.toLocaleDateString(options.locales, { weekday: \"narrow\" }),\n ddd: () => date.toLocaleDateString(options.locales, { weekday: \"short\" }),\n dddd: () => date.toLocaleDateString(options.locales, { weekday: \"long\" }),\n A: () => meridiem(hours, minutes),\n AA: () => meridiem(hours, minutes, false, true),\n a: () => meridiem(hours, minutes, true),\n aa: () => meridiem(hours, minutes, true, true)\n };\n return formatStr.replace(REGEX_FORMAT, (match, $1) => {\n var _a2, _b;\n return (_b = $1 != null ? $1 : (_a2 = matches[match]) == null ? void 0 : _a2.call(matches)) != null ? _b : match;\n });\n}\nfunction normalizeDate(date) {\n if (date === null)\n return new Date(Number.NaN);\n if (date === void 0)\n return /* @__PURE__ */ new Date();\n if (date instanceof Date)\n return new Date(date);\n if (typeof date === \"string\" && !/Z$/i.test(date)) {\n const d = date.match(REGEX_PARSE);\n if (d) {\n const m = d[2] - 1 || 0;\n const ms = (d[7] || \"0\").substring(0, 3);\n return new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms);\n }\n }\n return new Date(date);\n}\nfunction useDateFormat(date, formatStr = \"HH:mm:ss\", options = {}) {\n return computed(() => formatDate(normalizeDate(toValue(date)), toValue(formatStr), options));\n}\n\nfunction useIntervalFn(cb, interval = 1e3, options = {}) {\n const {\n immediate = true,\n immediateCallback = false\n } = options;\n let timer = null;\n const isActive = ref(false);\n function clean() {\n if (timer) {\n clearInterval(timer);\n timer = null;\n }\n }\n function pause() {\n isActive.value = false;\n clean();\n }\n function resume() {\n const intervalValue = toValue(interval);\n if (intervalValue <= 0)\n return;\n isActive.value = true;\n if (immediateCallback)\n cb();\n clean();\n timer = setInterval(cb, intervalValue);\n }\n if (immediate && isClient)\n resume();\n if (isRef(interval) || typeof interval === \"function\") {\n const stopWatch = watch(interval, () => {\n if (isActive.value && isClient)\n resume();\n });\n tryOnScopeDispose(stopWatch);\n }\n tryOnScopeDispose(pause);\n return {\n isActive,\n pause,\n resume\n };\n}\n\nfunction useInterval(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n immediate = true,\n callback\n } = options;\n const counter = ref(0);\n const update = () => counter.value += 1;\n const reset = () => {\n counter.value = 0;\n };\n const controls = useIntervalFn(\n callback ? () => {\n update();\n callback(counter.value);\n } : update,\n interval,\n { immediate }\n );\n if (exposeControls) {\n return {\n counter,\n reset,\n ...controls\n };\n } else {\n return counter;\n }\n}\n\nfunction useLastChanged(source, options = {}) {\n var _a;\n const ms = ref((_a = options.initialValue) != null ? _a : null);\n watch(\n source,\n () => ms.value = timestamp(),\n options\n );\n return ms;\n}\n\nfunction useTimeoutFn(cb, interval, options = {}) {\n const {\n immediate = true\n } = options;\n const isPending = ref(false);\n let timer = null;\n function clear() {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n }\n function stop() {\n isPending.value = false;\n clear();\n }\n function start(...args) {\n clear();\n isPending.value = true;\n timer = setTimeout(() => {\n isPending.value = false;\n timer = null;\n cb(...args);\n }, toValue(interval));\n }\n if (immediate) {\n isPending.value = true;\n if (isClient)\n start();\n }\n tryOnScopeDispose(stop);\n return {\n isPending: readonly(isPending),\n start,\n stop\n };\n}\n\nfunction useTimeout(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n callback\n } = options;\n const controls = useTimeoutFn(\n callback != null ? callback : noop,\n interval,\n options\n );\n const ready = computed(() => !controls.isPending.value);\n if (exposeControls) {\n return {\n ready,\n ...controls\n };\n } else {\n return ready;\n }\n}\n\nfunction useToNumber(value, options = {}) {\n const {\n method = \"parseFloat\",\n radix,\n nanToZero\n } = options;\n return computed(() => {\n let resolved = toValue(value);\n if (typeof resolved === \"string\")\n resolved = Number[method](resolved, radix);\n if (nanToZero && Number.isNaN(resolved))\n resolved = 0;\n return resolved;\n });\n}\n\nfunction useToString(value) {\n return computed(() => `${toValue(value)}`);\n}\n\nfunction useToggle(initialValue = false, options = {}) {\n const {\n truthyValue = true,\n falsyValue = false\n } = options;\n const valueIsRef = isRef(initialValue);\n const _value = ref(initialValue);\n function toggle(value) {\n if (arguments.length) {\n _value.value = value;\n return _value.value;\n } else {\n const truthy = toValue(truthyValue);\n _value.value = _value.value === truthy ? toValue(falsyValue) : truthy;\n return _value.value;\n }\n }\n if (valueIsRef)\n return toggle;\n else\n return [_value, toggle];\n}\n\nfunction watchArray(source, cb, options) {\n let oldList = (options == null ? void 0 : options.immediate) ? [] : [...source instanceof Function ? source() : Array.isArray(source) ? source : toValue(source)];\n return watch(source, (newList, _, onCleanup) => {\n const oldListRemains = Array.from({ length: oldList.length });\n const added = [];\n for (const obj of newList) {\n let found = false;\n for (let i = 0; i < oldList.length; i++) {\n if (!oldListRemains[i] && obj === oldList[i]) {\n oldListRemains[i] = true;\n found = true;\n break;\n }\n }\n if (!found)\n added.push(obj);\n }\n const removed = oldList.filter((_2, i) => !oldListRemains[i]);\n cb(newList, oldList, added, removed, onCleanup);\n oldList = [...newList];\n }, options);\n}\n\nfunction watchAtMost(source, cb, options) {\n const {\n count,\n ...watchOptions\n } = options;\n const current = ref(0);\n const stop = watchWithFilter(\n source,\n (...args) => {\n current.value += 1;\n if (current.value >= toValue(count))\n nextTick(() => stop());\n cb(...args);\n },\n watchOptions\n );\n return { count: current, stop };\n}\n\nfunction watchDebounced(source, cb, options = {}) {\n const {\n debounce = 0,\n maxWait = void 0,\n ...watchOptions\n } = options;\n return watchWithFilter(\n source,\n cb,\n {\n ...watchOptions,\n eventFilter: debounceFilter(debounce, { maxWait })\n }\n );\n}\n\nfunction watchDeep(source, cb, options) {\n return watch(\n source,\n cb,\n {\n ...options,\n deep: true\n }\n );\n}\n\nfunction watchIgnorable(source, cb, options = {}) {\n const {\n eventFilter = bypassFilter,\n ...watchOptions\n } = options;\n const filteredCb = createFilterWrapper(\n eventFilter,\n cb\n );\n let ignoreUpdates;\n let ignorePrevAsyncUpdates;\n let stop;\n if (watchOptions.flush === \"sync\") {\n const ignore = ref(false);\n ignorePrevAsyncUpdates = () => {\n };\n ignoreUpdates = (updater) => {\n ignore.value = true;\n updater();\n ignore.value = false;\n };\n stop = watch(\n source,\n (...args) => {\n if (!ignore.value)\n filteredCb(...args);\n },\n watchOptions\n );\n } else {\n const disposables = [];\n const ignoreCounter = ref(0);\n const syncCounter = ref(0);\n ignorePrevAsyncUpdates = () => {\n ignoreCounter.value = syncCounter.value;\n };\n disposables.push(\n watch(\n source,\n () => {\n syncCounter.value++;\n },\n { ...watchOptions, flush: \"sync\" }\n )\n );\n ignoreUpdates = (updater) => {\n const syncCounterPrev = syncCounter.value;\n updater();\n ignoreCounter.value += syncCounter.value - syncCounterPrev;\n };\n disposables.push(\n watch(\n source,\n (...args) => {\n const ignore = ignoreCounter.value > 0 && ignoreCounter.value === syncCounter.value;\n ignoreCounter.value = 0;\n syncCounter.value = 0;\n if (ignore)\n return;\n filteredCb(...args);\n },\n watchOptions\n )\n );\n stop = () => {\n disposables.forEach((fn) => fn());\n };\n }\n return { stop, ignoreUpdates, ignorePrevAsyncUpdates };\n}\n\nfunction watchImmediate(source, cb, options) {\n return watch(\n source,\n cb,\n {\n ...options,\n immediate: true\n }\n );\n}\n\nfunction watchOnce(source, cb, options) {\n const stop = watch(source, (...args) => {\n nextTick(() => stop());\n return cb(...args);\n }, options);\n}\n\nfunction watchThrottled(source, cb, options = {}) {\n const {\n throttle = 0,\n trailing = true,\n leading = true,\n ...watchOptions\n } = options;\n return watchWithFilter(\n source,\n cb,\n {\n ...watchOptions,\n eventFilter: throttleFilter(throttle, trailing, leading)\n }\n );\n}\n\nfunction watchTriggerable(source, cb, options = {}) {\n let cleanupFn;\n function onEffect() {\n if (!cleanupFn)\n return;\n const fn = cleanupFn;\n cleanupFn = void 0;\n fn();\n }\n function onCleanup(callback) {\n cleanupFn = callback;\n }\n const _cb = (value, oldValue) => {\n onEffect();\n return cb(value, oldValue, onCleanup);\n };\n const res = watchIgnorable(source, _cb, options);\n const { ignoreUpdates } = res;\n const trigger = () => {\n let res2;\n ignoreUpdates(() => {\n res2 = _cb(getWatchSources(source), getOldValue(source));\n });\n return res2;\n };\n return {\n ...res,\n trigger\n };\n}\nfunction getWatchSources(sources) {\n if (isReactive(sources))\n return sources;\n if (Array.isArray(sources))\n return sources.map((item) => toValue(item));\n return toValue(sources);\n}\nfunction getOldValue(source) {\n return Array.isArray(source) ? source.map(() => void 0) : void 0;\n}\n\nfunction whenever(source, cb, options) {\n return watch(\n source,\n (v, ov, onInvalidate) => {\n if (v)\n cb(v, ov, onInvalidate);\n },\n options\n );\n}\n\nexport { assert, refAutoReset as autoResetRef, bypassFilter, camelize, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, reactify as createReactiveFn, createSharedComposable, createSingletonPromise, debounceFilter, refDebounced as debouncedRef, watchDebounced as debouncedWatch, directiveHooks, computedEager as eagerComputed, extendRef, formatDate, get, hasOwn, hyphenate, identity, watchIgnorable as ignorableWatch, increaseWithUnit, injectLocal, invoke, isClient, isDef, isDefined, isIOS, isObject, makeDestructurable, noop, normalizeDate, notNullish, now, objectEntries, objectOmit, objectPick, pausableFilter, watchPausable as pausableWatch, promiseTimeout, provideLocal, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, watchThrottled as throttledWatch, timestamp, toReactive, toRef, toRefs, toValue, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayDifference, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayIncludes, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, refDebounced as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchDeep, watchIgnorable, watchImmediate, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };\n","import Vue from 'vue'\nimport { getCurrentInstance } from 'vue'\n\nvar isVue2 = true\nvar isVue3 = false\nvar Vue2 = Vue\nvar warn = Vue.util.warn\n\nfunction install() {}\n\n// createApp polyfill\nexport function createApp(rootComponent, rootProps) {\n var vm\n var provide = {}\n var app = {\n config: Vue.config,\n use: Vue.use.bind(Vue),\n mixin: Vue.mixin.bind(Vue),\n component: Vue.component.bind(Vue),\n provide: function (key, value) {\n provide[key] = value\n return this\n },\n directive: function (name, dir) {\n if (dir) {\n Vue.directive(name, dir)\n return app\n } else {\n return Vue.directive(name)\n }\n },\n mount: function (el, hydrating) {\n if (!vm) {\n vm = new Vue(Object.assign({ propsData: rootProps }, rootComponent, { provide: Object.assign(provide, rootComponent.provide) }))\n vm.$mount(el, hydrating)\n return vm\n } else {\n return vm\n }\n },\n unmount: function () {\n if (vm) {\n vm.$destroy()\n vm = undefined\n }\n },\n }\n return app\n}\n\nexport {\n Vue,\n Vue2,\n isVue2,\n isVue3,\n install,\n warn\n}\n\n// Vue 3 components mock\nfunction createMockComponent(name) {\n return {\n setup() {\n throw new Error('[vue-demi] ' + name + ' is not supported in Vue 2. It\\'s provided to avoid compiler errors.')\n }\n }\n}\nexport var Fragment = /*#__PURE__*/ createMockComponent('Fragment')\nexport var Transition = /*#__PURE__*/ createMockComponent('Transition')\nexport var TransitionGroup = /*#__PURE__*/ createMockComponent('TransitionGroup')\nexport var Teleport = /*#__PURE__*/ createMockComponent('Teleport')\nexport var Suspense = /*#__PURE__*/ createMockComponent('Suspense')\nexport var KeepAlive = /*#__PURE__*/ createMockComponent('KeepAlive')\n\nexport * from 'vue'\n\n// Not implemented https://github.com/vuejs/core/pull/8111, falls back to getCurrentInstance()\nexport function hasInjectionContext() {\n return !!getCurrentInstance()\n}\n","import { noop, makeDestructurable, camelize, toValue, isClient, isObject, tryOnScopeDispose, isIOS, tryOnMounted, computedWithControl, objectOmit, promiseTimeout, until, increaseWithUnit, objectEntries, useTimeoutFn, pausableWatch, toRef, createEventHook, timestamp, pausableFilter, watchIgnorable, debounceFilter, createFilterWrapper, bypassFilter, createSingletonPromise, toRefs, useIntervalFn, notNullish, containsProp, hasOwn, throttleFilter, useDebounceFn, useThrottleFn, clamp, syncRef, objectPick, tryOnUnmounted, watchWithFilter, identity, isDef } from '@vueuse/shared';\nexport * from '@vueuse/shared';\nimport { isRef, ref, shallowRef, watchEffect, computed, inject, isVue3, version, defineComponent, h, TransitionGroup, shallowReactive, Fragment, watch, getCurrentInstance, customRef, onUpdated, onMounted, readonly, nextTick, reactive, markRaw, getCurrentScope, isVue2, set, del, isReadonly, onBeforeUpdate } from 'vue-demi';\n\nfunction computedAsync(evaluationCallback, initialState, optionsOrRef) {\n let options;\n if (isRef(optionsOrRef)) {\n options = {\n evaluating: optionsOrRef\n };\n } else {\n options = optionsOrRef || {};\n }\n const {\n lazy = false,\n evaluating = void 0,\n shallow = true,\n onError = noop\n } = options;\n const started = ref(!lazy);\n const current = shallow ? shallowRef(initialState) : ref(initialState);\n let counter = 0;\n watchEffect(async (onInvalidate) => {\n if (!started.value)\n return;\n counter++;\n const counterAtBeginning = counter;\n let hasFinished = false;\n if (evaluating) {\n Promise.resolve().then(() => {\n evaluating.value = true;\n });\n }\n try {\n const result = await evaluationCallback((cancelCallback) => {\n onInvalidate(() => {\n if (evaluating)\n evaluating.value = false;\n if (!hasFinished)\n cancelCallback();\n });\n });\n if (counterAtBeginning === counter)\n current.value = result;\n } catch (e) {\n onError(e);\n } finally {\n if (evaluating && counterAtBeginning === counter)\n evaluating.value = false;\n hasFinished = true;\n }\n });\n if (lazy) {\n return computed(() => {\n started.value = true;\n return current.value;\n });\n } else {\n return current;\n }\n}\n\nfunction computedInject(key, options, defaultSource, treatDefaultAsFactory) {\n let source = inject(key);\n if (defaultSource)\n source = inject(key, defaultSource);\n if (treatDefaultAsFactory)\n source = inject(key, defaultSource, treatDefaultAsFactory);\n if (typeof options === \"function\") {\n return computed((ctx) => options(source, ctx));\n } else {\n return computed({\n get: (ctx) => options.get(source, ctx),\n set: options.set\n });\n }\n}\n\nfunction createReusableTemplate(options = {}) {\n if (!isVue3 && !version.startsWith(\"2.7.\")) {\n if (process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] createReusableTemplate only works in Vue 2.7 or above.\");\n return;\n }\n const {\n inheritAttrs = true\n } = options;\n const render = shallowRef();\n const define = /* #__PURE__ */ defineComponent({\n setup(_, { slots }) {\n return () => {\n render.value = slots.default;\n };\n }\n });\n const reuse = /* #__PURE__ */ defineComponent({\n inheritAttrs,\n setup(_, { attrs, slots }) {\n return () => {\n var _a;\n if (!render.value && process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] Failed to find the definition of reusable template\");\n const vnode = (_a = render.value) == null ? void 0 : _a.call(render, { ...keysToCamelKebabCase(attrs), $slots: slots });\n return inheritAttrs && (vnode == null ? void 0 : vnode.length) === 1 ? vnode[0] : vnode;\n };\n }\n });\n return makeDestructurable(\n { define, reuse },\n [define, reuse]\n );\n}\nfunction keysToCamelKebabCase(obj) {\n const newObj = {};\n for (const key in obj)\n newObj[camelize(key)] = obj[key];\n return newObj;\n}\n\nfunction createTemplatePromise(options = {}) {\n if (!isVue3) {\n if (process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] createTemplatePromise only works in Vue 3 or above.\");\n return;\n }\n let index = 0;\n const instances = ref([]);\n function create(...args) {\n const props = shallowReactive({\n key: index++,\n args,\n promise: void 0,\n resolve: () => {\n },\n reject: () => {\n },\n isResolving: false,\n options\n });\n instances.value.push(props);\n props.promise = new Promise((_resolve, _reject) => {\n props.resolve = (v) => {\n props.isResolving = true;\n return _resolve(v);\n };\n props.reject = _reject;\n }).finally(() => {\n props.promise = void 0;\n const index2 = instances.value.indexOf(props);\n if (index2 !== -1)\n instances.value.splice(index2, 1);\n });\n return props.promise;\n }\n function start(...args) {\n if (options.singleton && instances.value.length > 0)\n return instances.value[0].promise;\n return create(...args);\n }\n const component = /* #__PURE__ */ defineComponent((_, { slots }) => {\n const renderList = () => instances.value.map((props) => {\n var _a;\n return h(Fragment, { key: props.key }, (_a = slots.default) == null ? void 0 : _a.call(slots, props));\n });\n if (options.transition)\n return () => h(TransitionGroup, options.transition, renderList);\n return renderList;\n });\n component.start = start;\n return component;\n}\n\nfunction createUnrefFn(fn) {\n return function(...args) {\n return fn.apply(this, args.map((i) => toValue(i)));\n };\n}\n\nfunction unrefElement(elRef) {\n var _a;\n const plain = toValue(elRef);\n return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;\n}\n\nconst defaultWindow = isClient ? window : void 0;\nconst defaultDocument = isClient ? window.document : void 0;\nconst defaultNavigator = isClient ? window.navigator : void 0;\nconst defaultLocation = isClient ? window.location : void 0;\n\nfunction useEventListener(...args) {\n let target;\n let events;\n let listeners;\n let options;\n if (typeof args[0] === \"string\" || Array.isArray(args[0])) {\n [events, listeners, options] = args;\n target = defaultWindow;\n } else {\n [target, events, listeners, options] = args;\n }\n if (!target)\n return noop;\n if (!Array.isArray(events))\n events = [events];\n if (!Array.isArray(listeners))\n listeners = [listeners];\n const cleanups = [];\n const cleanup = () => {\n cleanups.forEach((fn) => fn());\n cleanups.length = 0;\n };\n const register = (el, event, listener, options2) => {\n el.addEventListener(event, listener, options2);\n return () => el.removeEventListener(event, listener, options2);\n };\n const stopWatch = watch(\n () => [unrefElement(target), toValue(options)],\n ([el, options2]) => {\n cleanup();\n if (!el)\n return;\n const optionsClone = isObject(options2) ? { ...options2 } : options2;\n cleanups.push(\n ...events.flatMap((event) => {\n return listeners.map((listener) => register(el, event, listener, optionsClone));\n })\n );\n },\n { immediate: true, flush: \"post\" }\n );\n const stop = () => {\n stopWatch();\n cleanup();\n };\n tryOnScopeDispose(stop);\n return stop;\n}\n\nlet _iOSWorkaround = false;\nfunction onClickOutside(target, handler, options = {}) {\n const { window = defaultWindow, ignore = [], capture = true, detectIframe = false } = options;\n if (!window)\n return;\n if (isIOS && !_iOSWorkaround) {\n _iOSWorkaround = true;\n Array.from(window.document.body.children).forEach((el) => el.addEventListener(\"click\", noop));\n window.document.documentElement.addEventListener(\"click\", noop);\n }\n let shouldListen = true;\n const shouldIgnore = (event) => {\n return ignore.some((target2) => {\n if (typeof target2 === \"string\") {\n return Array.from(window.document.querySelectorAll(target2)).some((el) => el === event.target || event.composedPath().includes(el));\n } else {\n const el = unrefElement(target2);\n return el && (event.target === el || event.composedPath().includes(el));\n }\n });\n };\n const listener = (event) => {\n const el = unrefElement(target);\n if (!el || el === event.target || event.composedPath().includes(el))\n return;\n if (event.detail === 0)\n shouldListen = !shouldIgnore(event);\n if (!shouldListen) {\n shouldListen = true;\n return;\n }\n handler(event);\n };\n const cleanup = [\n useEventListener(window, \"click\", listener, { passive: true, capture }),\n useEventListener(window, \"pointerdown\", (e) => {\n const el = unrefElement(target);\n if (el)\n shouldListen = !e.composedPath().includes(el) && !shouldIgnore(e);\n }, { passive: true }),\n detectIframe && useEventListener(window, \"blur\", (event) => {\n setTimeout(() => {\n var _a;\n const el = unrefElement(target);\n if (((_a = window.document.activeElement) == null ? void 0 : _a.tagName) === \"IFRAME\" && !(el == null ? void 0 : el.contains(window.document.activeElement)))\n handler(event);\n }, 0);\n })\n ].filter(Boolean);\n const stop = () => cleanup.forEach((fn) => fn());\n return stop;\n}\n\nfunction createKeyPredicate(keyFilter) {\n if (typeof keyFilter === \"function\")\n return keyFilter;\n else if (typeof keyFilter === \"string\")\n return (event) => event.key === keyFilter;\n else if (Array.isArray(keyFilter))\n return (event) => keyFilter.includes(event.key);\n return () => true;\n}\nfunction onKeyStroke(...args) {\n let key;\n let handler;\n let options = {};\n if (args.length === 3) {\n key = args[0];\n handler = args[1];\n options = args[2];\n } else if (args.length === 2) {\n if (typeof args[1] === \"object\") {\n key = true;\n handler = args[0];\n options = args[1];\n } else {\n key = args[0];\n handler = args[1];\n }\n } else {\n key = true;\n handler = args[0];\n }\n const {\n target = defaultWindow,\n eventName = \"keydown\",\n passive = false,\n dedupe = false\n } = options;\n const predicate = createKeyPredicate(key);\n const listener = (e) => {\n if (e.repeat && toValue(dedupe))\n return;\n if (predicate(e))\n handler(e);\n };\n return useEventListener(target, eventName, listener, passive);\n}\nfunction onKeyDown(key, handler, options = {}) {\n return onKeyStroke(key, handler, { ...options, eventName: \"keydown\" });\n}\nfunction onKeyPressed(key, handler, options = {}) {\n return onKeyStroke(key, handler, { ...options, eventName: \"keypress\" });\n}\nfunction onKeyUp(key, handler, options = {}) {\n return onKeyStroke(key, handler, { ...options, eventName: \"keyup\" });\n}\n\nconst DEFAULT_DELAY = 500;\nfunction onLongPress(target, handler, options) {\n var _a, _b;\n const elementRef = computed(() => unrefElement(target));\n let timeout;\n function clear() {\n if (timeout) {\n clearTimeout(timeout);\n timeout = void 0;\n }\n }\n function onDown(ev) {\n var _a2, _b2, _c, _d;\n if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value)\n return;\n clear();\n if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent)\n ev.preventDefault();\n if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop)\n ev.stopPropagation();\n timeout = setTimeout(\n () => handler(ev),\n (_d = options == null ? void 0 : options.delay) != null ? _d : DEFAULT_DELAY\n );\n }\n const listenerOptions = {\n capture: (_a = options == null ? void 0 : options.modifiers) == null ? void 0 : _a.capture,\n once: (_b = options == null ? void 0 : options.modifiers) == null ? void 0 : _b.once\n };\n useEventListener(elementRef, \"pointerdown\", onDown, listenerOptions);\n useEventListener(elementRef, [\"pointerup\", \"pointerleave\"], clear, listenerOptions);\n}\n\nfunction isFocusedElementEditable() {\n const { activeElement, body } = document;\n if (!activeElement)\n return false;\n if (activeElement === body)\n return false;\n switch (activeElement.tagName) {\n case \"INPUT\":\n case \"TEXTAREA\":\n return true;\n }\n return activeElement.hasAttribute(\"contenteditable\");\n}\nfunction isTypedCharValid({\n keyCode,\n metaKey,\n ctrlKey,\n altKey\n}) {\n if (metaKey || ctrlKey || altKey)\n return false;\n if (keyCode >= 48 && keyCode <= 57)\n return true;\n if (keyCode >= 65 && keyCode <= 90)\n return true;\n if (keyCode >= 97 && keyCode <= 122)\n return true;\n return false;\n}\nfunction onStartTyping(callback, options = {}) {\n const { document: document2 = defaultDocument } = options;\n const keydown = (event) => {\n !isFocusedElementEditable() && isTypedCharValid(event) && callback(event);\n };\n if (document2)\n useEventListener(document2, \"keydown\", keydown, { passive: true });\n}\n\nfunction templateRef(key, initialValue = null) {\n const instance = getCurrentInstance();\n let _trigger = () => {\n };\n const element = customRef((track, trigger) => {\n _trigger = trigger;\n return {\n get() {\n var _a, _b;\n track();\n return (_b = (_a = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a.$refs[key]) != null ? _b : initialValue;\n },\n set() {\n }\n };\n });\n tryOnMounted(_trigger);\n onUpdated(_trigger);\n return element;\n}\n\nfunction useActiveElement(options = {}) {\n var _a;\n const {\n window = defaultWindow,\n deep = true\n } = options;\n const document = (_a = options.document) != null ? _a : window == null ? void 0 : window.document;\n const getDeepActiveElement = () => {\n var _a2;\n let element = document == null ? void 0 : document.activeElement;\n if (deep) {\n while (element == null ? void 0 : element.shadowRoot)\n element = (_a2 = element == null ? void 0 : element.shadowRoot) == null ? void 0 : _a2.activeElement;\n }\n return element;\n };\n const activeElement = computedWithControl(\n () => null,\n () => getDeepActiveElement()\n );\n if (window) {\n useEventListener(window, \"blur\", (event) => {\n if (event.relatedTarget !== null)\n return;\n activeElement.trigger();\n }, true);\n useEventListener(window, \"focus\", activeElement.trigger, true);\n }\n return activeElement;\n}\n\nfunction useMounted() {\n const isMounted = ref(false);\n if (getCurrentInstance()) {\n onMounted(() => {\n isMounted.value = true;\n });\n }\n return isMounted;\n}\n\nfunction useSupported(callback) {\n const isMounted = useMounted();\n return computed(() => {\n isMounted.value;\n return Boolean(callback());\n });\n}\n\nfunction useRafFn(fn, options = {}) {\n const {\n immediate = true,\n fpsLimit = void 0,\n window = defaultWindow\n } = options;\n const isActive = ref(false);\n const intervalLimit = fpsLimit ? 1e3 / fpsLimit : null;\n let previousFrameTimestamp = 0;\n let rafId = null;\n function loop(timestamp) {\n if (!isActive.value || !window)\n return;\n const delta = timestamp - (previousFrameTimestamp || timestamp);\n if (intervalLimit && delta < intervalLimit) {\n rafId = window.requestAnimationFrame(loop);\n return;\n }\n fn({ delta, timestamp });\n previousFrameTimestamp = timestamp;\n rafId = window.requestAnimationFrame(loop);\n }\n function resume() {\n if (!isActive.value && window) {\n isActive.value = true;\n rafId = window.requestAnimationFrame(loop);\n }\n }\n function pause() {\n isActive.value = false;\n if (rafId != null && window) {\n window.cancelAnimationFrame(rafId);\n rafId = null;\n }\n }\n if (immediate)\n resume();\n tryOnScopeDispose(pause);\n return {\n isActive: readonly(isActive),\n pause,\n resume\n };\n}\n\nfunction useAnimate(target, keyframes, options) {\n let config;\n let animateOptions;\n if (isObject(options)) {\n config = options;\n animateOptions = objectOmit(options, [\"window\", \"immediate\", \"commitStyles\", \"persist\", \"onReady\", \"onError\"]);\n } else {\n config = { duration: options };\n animateOptions = options;\n }\n const {\n window = defaultWindow,\n immediate = true,\n commitStyles,\n persist,\n playbackRate: _playbackRate = 1,\n onReady,\n onError = (e) => {\n console.error(e);\n }\n } = config;\n const isSupported = useSupported(() => window && HTMLElement && \"animate\" in HTMLElement.prototype);\n const animate = shallowRef(void 0);\n const store = shallowReactive({\n startTime: null,\n currentTime: null,\n timeline: null,\n playbackRate: _playbackRate,\n pending: false,\n playState: immediate ? \"idle\" : \"paused\",\n replaceState: \"active\"\n });\n const pending = computed(() => store.pending);\n const playState = computed(() => store.playState);\n const replaceState = computed(() => store.replaceState);\n const startTime = computed({\n get() {\n return store.startTime;\n },\n set(value) {\n store.startTime = value;\n if (animate.value)\n animate.value.startTime = value;\n }\n });\n const currentTime = computed({\n get() {\n return store.currentTime;\n },\n set(value) {\n store.currentTime = value;\n if (animate.value) {\n animate.value.currentTime = value;\n syncResume();\n }\n }\n });\n const timeline = computed({\n get() {\n return store.timeline;\n },\n set(value) {\n store.timeline = value;\n if (animate.value)\n animate.value.timeline = value;\n }\n });\n const playbackRate = computed({\n get() {\n return store.playbackRate;\n },\n set(value) {\n store.playbackRate = value;\n if (animate.value)\n animate.value.playbackRate = value;\n }\n });\n const play = () => {\n if (animate.value) {\n try {\n animate.value.play();\n syncResume();\n } catch (e) {\n syncPause();\n onError(e);\n }\n } else {\n update();\n }\n };\n const pause = () => {\n var _a;\n try {\n (_a = animate.value) == null ? void 0 : _a.pause();\n syncPause();\n } catch (e) {\n onError(e);\n }\n };\n const reverse = () => {\n var _a;\n !animate.value && update();\n try {\n (_a = animate.value) == null ? void 0 : _a.reverse();\n syncResume();\n } catch (e) {\n syncPause();\n onError(e);\n }\n };\n const finish = () => {\n var _a;\n try {\n (_a = animate.value) == null ? void 0 : _a.finish();\n syncPause();\n } catch (e) {\n onError(e);\n }\n };\n const cancel = () => {\n var _a;\n try {\n (_a = animate.value) == null ? void 0 : _a.cancel();\n syncPause();\n } catch (e) {\n onError(e);\n }\n };\n watch(() => unrefElement(target), (el) => {\n el && update();\n });\n watch(() => keyframes, (value) => {\n !animate.value && update();\n if (!unrefElement(target) && animate.value) {\n animate.value.effect = new KeyframeEffect(\n unrefElement(target),\n toValue(value),\n animateOptions\n );\n }\n }, { deep: true });\n tryOnMounted(() => {\n nextTick(() => update(true));\n });\n tryOnScopeDispose(cancel);\n function update(init) {\n const el = unrefElement(target);\n if (!isSupported.value || !el)\n return;\n animate.value = el.animate(toValue(keyframes), animateOptions);\n if (commitStyles)\n animate.value.commitStyles();\n if (persist)\n animate.value.persist();\n if (_playbackRate !== 1)\n animate.value.playbackRate = _playbackRate;\n if (init && !immediate)\n animate.value.pause();\n else\n syncResume();\n onReady == null ? void 0 : onReady(animate.value);\n }\n useEventListener(animate, [\"cancel\", \"finish\", \"remove\"], syncPause);\n const { resume: resumeRef, pause: pauseRef } = useRafFn(() => {\n if (!animate.value)\n return;\n store.pending = animate.value.pending;\n store.playState = animate.value.playState;\n store.replaceState = animate.value.replaceState;\n store.startTime = animate.value.startTime;\n store.currentTime = animate.value.currentTime;\n store.timeline = animate.value.timeline;\n store.playbackRate = animate.value.playbackRate;\n }, { immediate: false });\n function syncResume() {\n if (isSupported.value)\n resumeRef();\n }\n function syncPause() {\n if (isSupported.value && window)\n window.requestAnimationFrame(pauseRef);\n }\n return {\n isSupported,\n animate,\n // actions\n play,\n pause,\n reverse,\n finish,\n cancel,\n // state\n pending,\n playState,\n replaceState,\n startTime,\n currentTime,\n timeline,\n playbackRate\n };\n}\n\nfunction useAsyncQueue(tasks, options) {\n const {\n interrupt = true,\n onError = noop,\n onFinished = noop,\n signal\n } = options || {};\n const promiseState = {\n aborted: \"aborted\",\n fulfilled: \"fulfilled\",\n pending: \"pending\",\n rejected: \"rejected\"\n };\n const initialResult = Array.from(Array.from({ length: tasks.length }), () => ({ state: promiseState.pending, data: null }));\n const result = reactive(initialResult);\n const activeIndex = ref(-1);\n if (!tasks || tasks.length === 0) {\n onFinished();\n return {\n activeIndex,\n result\n };\n }\n function updateResult(state, res) {\n activeIndex.value++;\n result[activeIndex.value].data = res;\n result[activeIndex.value].state = state;\n }\n tasks.reduce((prev, curr) => {\n return prev.then((prevRes) => {\n var _a;\n if (signal == null ? void 0 : signal.aborted) {\n updateResult(promiseState.aborted, new Error(\"aborted\"));\n return;\n }\n if (((_a = result[activeIndex.value]) == null ? void 0 : _a.state) === promiseState.rejected && interrupt) {\n onFinished();\n return;\n }\n const done = curr(prevRes).then((currentRes) => {\n updateResult(promiseState.fulfilled, currentRes);\n activeIndex.value === tasks.length - 1 && onFinished();\n return currentRes;\n });\n if (!signal)\n return done;\n return Promise.race([done, whenAborted(signal)]);\n }).catch((e) => {\n if (signal == null ? void 0 : signal.aborted) {\n updateResult(promiseState.aborted, e);\n return e;\n }\n updateResult(promiseState.rejected, e);\n onError();\n return e;\n });\n }, Promise.resolve());\n return {\n activeIndex,\n result\n };\n}\nfunction whenAborted(signal) {\n return new Promise((resolve, reject) => {\n const error = new Error(\"aborted\");\n if (signal.aborted)\n reject(error);\n else\n signal.addEventListener(\"abort\", () => reject(error), { once: true });\n });\n}\n\nfunction useAsyncState(promise, initialState, options) {\n const {\n immediate = true,\n delay = 0,\n onError = noop,\n onSuccess = noop,\n resetOnExecute = true,\n shallow = true,\n throwError\n } = options != null ? options : {};\n const state = shallow ? shallowRef(initialState) : ref(initialState);\n const isReady = ref(false);\n const isLoading = ref(false);\n const error = shallowRef(void 0);\n async function execute(delay2 = 0, ...args) {\n if (resetOnExecute)\n state.value = initialState;\n error.value = void 0;\n isReady.value = false;\n isLoading.value = true;\n if (delay2 > 0)\n await promiseTimeout(delay2);\n const _promise = typeof promise === \"function\" ? promise(...args) : promise;\n try {\n const data = await _promise;\n state.value = data;\n isReady.value = true;\n onSuccess(data);\n } catch (e) {\n error.value = e;\n onError(e);\n if (throwError)\n throw e;\n } finally {\n isLoading.value = false;\n }\n return state.value;\n }\n if (immediate)\n execute(delay);\n const shell = {\n state,\n isReady,\n isLoading,\n error,\n execute\n };\n function waitUntilIsLoaded() {\n return new Promise((resolve, reject) => {\n until(isLoading).toBe(false).then(() => resolve(shell)).catch(reject);\n });\n }\n return {\n ...shell,\n then(onFulfilled, onRejected) {\n return waitUntilIsLoaded().then(onFulfilled, onRejected);\n }\n };\n}\n\nconst defaults = {\n array: (v) => JSON.stringify(v),\n object: (v) => JSON.stringify(v),\n set: (v) => JSON.stringify(Array.from(v)),\n map: (v) => JSON.stringify(Object.fromEntries(v)),\n null: () => \"\"\n};\nfunction getDefaultSerialization(target) {\n if (!target)\n return defaults.null;\n if (target instanceof Map)\n return defaults.map;\n else if (target instanceof Set)\n return defaults.set;\n else if (Array.isArray(target))\n return defaults.array;\n else\n return defaults.object;\n}\n\nfunction useBase64(target, options) {\n const base64 = ref(\"\");\n const promise = ref();\n function execute() {\n if (!isClient)\n return;\n promise.value = new Promise((resolve, reject) => {\n try {\n const _target = toValue(target);\n if (_target == null) {\n resolve(\"\");\n } else if (typeof _target === \"string\") {\n resolve(blobToBase64(new Blob([_target], { type: \"text/plain\" })));\n } else if (_target instanceof Blob) {\n resolve(blobToBase64(_target));\n } else if (_target instanceof ArrayBuffer) {\n resolve(window.btoa(String.fromCharCode(...new Uint8Array(_target))));\n } else if (_target instanceof HTMLCanvasElement) {\n resolve(_target.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n } else if (_target instanceof HTMLImageElement) {\n const img = _target.cloneNode(false);\n img.crossOrigin = \"Anonymous\";\n imgLoaded(img).then(() => {\n const canvas = document.createElement(\"canvas\");\n const ctx = canvas.getContext(\"2d\");\n canvas.width = img.width;\n canvas.height = img.height;\n ctx.drawImage(img, 0, 0, canvas.width, canvas.height);\n resolve(canvas.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n }).catch(reject);\n } else if (typeof _target === \"object\") {\n const _serializeFn = (options == null ? void 0 : options.serializer) || getDefaultSerialization(_target);\n const serialized = _serializeFn(_target);\n return resolve(blobToBase64(new Blob([serialized], { type: \"application/json\" })));\n } else {\n reject(new Error(\"target is unsupported types\"));\n }\n } catch (error) {\n reject(error);\n }\n });\n promise.value.then((res) => base64.value = res);\n return promise.value;\n }\n if (isRef(target) || typeof target === \"function\")\n watch(target, execute, { immediate: true });\n else\n execute();\n return {\n base64,\n promise,\n execute\n };\n}\nfunction imgLoaded(img) {\n return new Promise((resolve, reject) => {\n if (!img.complete) {\n img.onload = () => {\n resolve();\n };\n img.onerror = reject;\n } else {\n resolve();\n }\n });\n}\nfunction blobToBase64(blob) {\n return new Promise((resolve, reject) => {\n const fr = new FileReader();\n fr.onload = (e) => {\n resolve(e.target.result);\n };\n fr.onerror = reject;\n fr.readAsDataURL(blob);\n });\n}\n\nfunction useBattery(options = {}) {\n const { navigator = defaultNavigator } = options;\n const events = [\"chargingchange\", \"chargingtimechange\", \"dischargingtimechange\", \"levelchange\"];\n const isSupported = useSupported(() => navigator && \"getBattery\" in navigator);\n const charging = ref(false);\n const chargingTime = ref(0);\n const dischargingTime = ref(0);\n const level = ref(1);\n let battery;\n function updateBatteryInfo() {\n charging.value = this.charging;\n chargingTime.value = this.chargingTime || 0;\n dischargingTime.value = this.dischargingTime || 0;\n level.value = this.level;\n }\n if (isSupported.value) {\n navigator.getBattery().then((_battery) => {\n battery = _battery;\n updateBatteryInfo.call(battery);\n useEventListener(battery, events, updateBatteryInfo, { passive: true });\n });\n }\n return {\n isSupported,\n charging,\n chargingTime,\n dischargingTime,\n level\n };\n}\n\nfunction useBluetooth(options) {\n let {\n acceptAllDevices = false\n } = options || {};\n const {\n filters = void 0,\n optionalServices = void 0,\n navigator = defaultNavigator\n } = options || {};\n const isSupported = useSupported(() => navigator && \"bluetooth\" in navigator);\n const device = shallowRef(void 0);\n const error = shallowRef(null);\n watch(device, () => {\n connectToBluetoothGATTServer();\n });\n async function requestDevice() {\n if (!isSupported.value)\n return;\n error.value = null;\n if (filters && filters.length > 0)\n acceptAllDevices = false;\n try {\n device.value = await (navigator == null ? void 0 : navigator.bluetooth.requestDevice({\n acceptAllDevices,\n filters,\n optionalServices\n }));\n } catch (err) {\n error.value = err;\n }\n }\n const server = ref();\n const isConnected = computed(() => {\n var _a;\n return ((_a = server.value) == null ? void 0 : _a.connected) || false;\n });\n async function connectToBluetoothGATTServer() {\n error.value = null;\n if (device.value && device.value.gatt) {\n device.value.addEventListener(\"gattserverdisconnected\", () => {\n });\n try {\n server.value = await device.value.gatt.connect();\n } catch (err) {\n error.value = err;\n }\n }\n }\n tryOnMounted(() => {\n var _a;\n if (device.value)\n (_a = device.value.gatt) == null ? void 0 : _a.connect();\n });\n tryOnScopeDispose(() => {\n var _a;\n if (device.value)\n (_a = device.value.gatt) == null ? void 0 : _a.disconnect();\n });\n return {\n isSupported,\n isConnected,\n // Device:\n device,\n requestDevice,\n // Server:\n server,\n // Errors:\n error\n };\n}\n\nfunction useMediaQuery(query, options = {}) {\n const { window = defaultWindow } = options;\n const isSupported = useSupported(() => window && \"matchMedia\" in window && typeof window.matchMedia === \"function\");\n let mediaQuery;\n const matches = ref(false);\n const handler = (event) => {\n matches.value = event.matches;\n };\n const cleanup = () => {\n if (!mediaQuery)\n return;\n if (\"removeEventListener\" in mediaQuery)\n mediaQuery.removeEventListener(\"change\", handler);\n else\n mediaQuery.removeListener(handler);\n };\n const stopWatch = watchEffect(() => {\n if (!isSupported.value)\n return;\n cleanup();\n mediaQuery = window.matchMedia(toValue(query));\n if (\"addEventListener\" in mediaQuery)\n mediaQuery.addEventListener(\"change\", handler);\n else\n mediaQuery.addListener(handler);\n matches.value = mediaQuery.matches;\n });\n tryOnScopeDispose(() => {\n stopWatch();\n cleanup();\n mediaQuery = void 0;\n });\n return matches;\n}\n\nconst breakpointsTailwind = {\n \"sm\": 640,\n \"md\": 768,\n \"lg\": 1024,\n \"xl\": 1280,\n \"2xl\": 1536\n};\nconst breakpointsBootstrapV5 = {\n xs: 0,\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1400\n};\nconst breakpointsVuetify = {\n xs: 600,\n sm: 960,\n md: 1264,\n lg: 1904\n};\nconst breakpointsAntDesign = {\n xs: 480,\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1600\n};\nconst breakpointsQuasar = {\n xs: 600,\n sm: 1024,\n md: 1440,\n lg: 1920\n};\nconst breakpointsSematic = {\n mobileS: 320,\n mobileM: 375,\n mobileL: 425,\n tablet: 768,\n laptop: 1024,\n laptopL: 1440,\n desktop4K: 2560\n};\nconst breakpointsMasterCss = {\n \"3xs\": 360,\n \"2xs\": 480,\n \"xs\": 600,\n \"sm\": 768,\n \"md\": 1024,\n \"lg\": 1280,\n \"xl\": 1440,\n \"2xl\": 1600,\n \"3xl\": 1920,\n \"4xl\": 2560\n};\nconst breakpointsPrimeFlex = {\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200\n};\n\nfunction useBreakpoints(breakpoints, options = {}) {\n function getValue(k, delta) {\n let v = breakpoints[k];\n if (delta != null)\n v = increaseWithUnit(v, delta);\n if (typeof v === \"number\")\n v = `${v}px`;\n return v;\n }\n const { window = defaultWindow } = options;\n function match(query) {\n if (!window)\n return false;\n return window.matchMedia(query).matches;\n }\n const greaterOrEqual = (k) => {\n return useMediaQuery(`(min-width: ${getValue(k)})`, options);\n };\n const shortcutMethods = Object.keys(breakpoints).reduce((shortcuts, k) => {\n Object.defineProperty(shortcuts, k, {\n get: () => greaterOrEqual(k),\n enumerable: true,\n configurable: true\n });\n return shortcuts;\n }, {});\n return Object.assign(shortcutMethods, {\n greater(k) {\n return useMediaQuery(`(min-width: ${getValue(k, 0.1)})`, options);\n },\n greaterOrEqual,\n smaller(k) {\n return useMediaQuery(`(max-width: ${getValue(k, -0.1)})`, options);\n },\n smallerOrEqual(k) {\n return useMediaQuery(`(max-width: ${getValue(k)})`, options);\n },\n between(a, b) {\n return useMediaQuery(`(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`, options);\n },\n isGreater(k) {\n return match(`(min-width: ${getValue(k, 0.1)})`);\n },\n isGreaterOrEqual(k) {\n return match(`(min-width: ${getValue(k)})`);\n },\n isSmaller(k) {\n return match(`(max-width: ${getValue(k, -0.1)})`);\n },\n isSmallerOrEqual(k) {\n return match(`(max-width: ${getValue(k)})`);\n },\n isInBetween(a, b) {\n return match(`(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`);\n },\n current() {\n const points = Object.keys(breakpoints).map((i) => [i, greaterOrEqual(i)]);\n return computed(() => points.filter(([, v]) => v.value).map(([k]) => k));\n }\n });\n}\n\nfunction useBroadcastChannel(options) {\n const {\n name,\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"BroadcastChannel\" in window);\n const isClosed = ref(false);\n const channel = ref();\n const data = ref();\n const error = shallowRef(null);\n const post = (data2) => {\n if (channel.value)\n channel.value.postMessage(data2);\n };\n const close = () => {\n if (channel.value)\n channel.value.close();\n isClosed.value = true;\n };\n if (isSupported.value) {\n tryOnMounted(() => {\n error.value = null;\n channel.value = new BroadcastChannel(name);\n channel.value.addEventListener(\"message\", (e) => {\n data.value = e.data;\n }, { passive: true });\n channel.value.addEventListener(\"messageerror\", (e) => {\n error.value = e;\n }, { passive: true });\n channel.value.addEventListener(\"close\", () => {\n isClosed.value = true;\n });\n });\n }\n tryOnScopeDispose(() => {\n close();\n });\n return {\n isSupported,\n channel,\n data,\n post,\n close,\n error,\n isClosed\n };\n}\n\nconst WRITABLE_PROPERTIES = [\n \"hash\",\n \"host\",\n \"hostname\",\n \"href\",\n \"pathname\",\n \"port\",\n \"protocol\",\n \"search\"\n];\nfunction useBrowserLocation(options = {}) {\n const { window = defaultWindow } = options;\n const refs = Object.fromEntries(\n WRITABLE_PROPERTIES.map((key) => [key, ref()])\n );\n for (const [key, ref2] of objectEntries(refs)) {\n watch(ref2, (value) => {\n if (!(window == null ? void 0 : window.location) || window.location[key] === value)\n return;\n window.location[key] = value;\n });\n }\n const buildState = (trigger) => {\n var _a;\n const { state: state2, length } = (window == null ? void 0 : window.history) || {};\n const { origin } = (window == null ? void 0 : window.location) || {};\n for (const key of WRITABLE_PROPERTIES)\n refs[key].value = (_a = window == null ? void 0 : window.location) == null ? void 0 : _a[key];\n return reactive({\n trigger,\n state: state2,\n length,\n origin,\n ...refs\n });\n };\n const state = ref(buildState(\"load\"));\n if (window) {\n useEventListener(window, \"popstate\", () => state.value = buildState(\"popstate\"), { passive: true });\n useEventListener(window, \"hashchange\", () => state.value = buildState(\"hashchange\"), { passive: true });\n }\n return state;\n}\n\nfunction useCached(refValue, comparator = (a, b) => a === b, watchOptions) {\n const cachedValue = ref(refValue.value);\n watch(() => refValue.value, (value) => {\n if (!comparator(value, cachedValue.value))\n cachedValue.value = value;\n }, watchOptions);\n return cachedValue;\n}\n\nfunction useClipboard(options = {}) {\n const {\n navigator = defaultNavigator,\n read = false,\n source,\n copiedDuring = 1500,\n legacy = false\n } = options;\n const isClipboardApiSupported = useSupported(() => navigator && \"clipboard\" in navigator);\n const isSupported = computed(() => isClipboardApiSupported.value || legacy);\n const text = ref(\"\");\n const copied = ref(false);\n const timeout = useTimeoutFn(() => copied.value = false, copiedDuring);\n function updateText() {\n if (isClipboardApiSupported.value) {\n navigator.clipboard.readText().then((value) => {\n text.value = value;\n });\n } else {\n text.value = legacyRead();\n }\n }\n if (isSupported.value && read)\n useEventListener([\"copy\", \"cut\"], updateText);\n async function copy(value = toValue(source)) {\n if (isSupported.value && value != null) {\n if (isClipboardApiSupported.value)\n await navigator.clipboard.writeText(value);\n else\n legacyCopy(value);\n text.value = value;\n copied.value = true;\n timeout.start();\n }\n }\n function legacyCopy(value) {\n const ta = document.createElement(\"textarea\");\n ta.value = value != null ? value : \"\";\n ta.style.position = \"absolute\";\n ta.style.opacity = \"0\";\n document.body.appendChild(ta);\n ta.select();\n document.execCommand(\"copy\");\n ta.remove();\n }\n function legacyRead() {\n var _a, _b, _c;\n return (_c = (_b = (_a = document == null ? void 0 : document.getSelection) == null ? void 0 : _a.call(document)) == null ? void 0 : _b.toString()) != null ? _c : \"\";\n }\n return {\n isSupported,\n text,\n copied,\n copy\n };\n}\n\nfunction cloneFnJSON(source) {\n return JSON.parse(JSON.stringify(source));\n}\nfunction useCloned(source, options = {}) {\n const cloned = ref({});\n const {\n manual,\n clone = cloneFnJSON,\n // watch options\n deep = true,\n immediate = true\n } = options;\n function sync() {\n cloned.value = clone(toValue(source));\n }\n if (!manual && (isRef(source) || typeof source === \"function\")) {\n watch(source, sync, {\n ...options,\n deep,\n immediate\n });\n } else {\n sync();\n }\n return { cloned, sync };\n}\n\nconst _global = typeof globalThis !== \"undefined\" ? globalThis : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : {};\nconst globalKey = \"__vueuse_ssr_handlers__\";\nconst handlers = /* @__PURE__ */ getHandlers();\nfunction getHandlers() {\n if (!(globalKey in _global))\n _global[globalKey] = _global[globalKey] || {};\n return _global[globalKey];\n}\nfunction getSSRHandler(key, fallback) {\n return handlers[key] || fallback;\n}\nfunction setSSRHandler(key, fn) {\n handlers[key] = fn;\n}\n\nfunction guessSerializerType(rawInit) {\n return rawInit == null ? \"any\" : rawInit instanceof Set ? \"set\" : rawInit instanceof Map ? \"map\" : rawInit instanceof Date ? \"date\" : typeof rawInit === \"boolean\" ? \"boolean\" : typeof rawInit === \"string\" ? \"string\" : typeof rawInit === \"object\" ? \"object\" : !Number.isNaN(rawInit) ? \"number\" : \"any\";\n}\n\nconst StorageSerializers = {\n boolean: {\n read: (v) => v === \"true\",\n write: (v) => String(v)\n },\n object: {\n read: (v) => JSON.parse(v),\n write: (v) => JSON.stringify(v)\n },\n number: {\n read: (v) => Number.parseFloat(v),\n write: (v) => String(v)\n },\n any: {\n read: (v) => v,\n write: (v) => String(v)\n },\n string: {\n read: (v) => v,\n write: (v) => String(v)\n },\n map: {\n read: (v) => new Map(JSON.parse(v)),\n write: (v) => JSON.stringify(Array.from(v.entries()))\n },\n set: {\n read: (v) => new Set(JSON.parse(v)),\n write: (v) => JSON.stringify(Array.from(v))\n },\n date: {\n read: (v) => new Date(v),\n write: (v) => v.toISOString()\n }\n};\nconst customStorageEventName = \"vueuse-storage\";\nfunction useStorage(key, defaults, storage, options = {}) {\n var _a;\n const {\n flush = \"pre\",\n deep = true,\n listenToStorageChanges = true,\n writeDefaults = true,\n mergeDefaults = false,\n shallow,\n window = defaultWindow,\n eventFilter,\n onError = (e) => {\n console.error(e);\n }\n } = options;\n const data = (shallow ? shallowRef : ref)(defaults);\n if (!storage) {\n try {\n storage = getSSRHandler(\"getDefaultStorage\", () => {\n var _a2;\n return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n })();\n } catch (e) {\n onError(e);\n }\n }\n if (!storage)\n return data;\n const rawInit = toValue(defaults);\n const type = guessSerializerType(rawInit);\n const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n const { pause: pauseWatch, resume: resumeWatch } = pausableWatch(\n data,\n () => write(data.value),\n { flush, deep, eventFilter }\n );\n if (window && listenToStorageChanges) {\n useEventListener(window, \"storage\", update);\n useEventListener(window, customStorageEventName, updateFromCustomEvent);\n }\n update();\n return data;\n function write(v) {\n try {\n if (v == null) {\n storage.removeItem(key);\n } else {\n const serialized = serializer.write(v);\n const oldValue = storage.getItem(key);\n if (oldValue !== serialized) {\n storage.setItem(key, serialized);\n if (window) {\n window.dispatchEvent(new CustomEvent(customStorageEventName, {\n detail: {\n key,\n oldValue,\n newValue: serialized,\n storageArea: storage\n }\n }));\n }\n }\n }\n } catch (e) {\n onError(e);\n }\n }\n function read(event) {\n const rawValue = event ? event.newValue : storage.getItem(key);\n if (rawValue == null) {\n if (writeDefaults && rawInit !== null)\n storage.setItem(key, serializer.write(rawInit));\n return rawInit;\n } else if (!event && mergeDefaults) {\n const value = serializer.read(rawValue);\n if (typeof mergeDefaults === \"function\")\n return mergeDefaults(value, rawInit);\n else if (type === \"object\" && !Array.isArray(value))\n return { ...rawInit, ...value };\n return value;\n } else if (typeof rawValue !== \"string\") {\n return rawValue;\n } else {\n return serializer.read(rawValue);\n }\n }\n function updateFromCustomEvent(event) {\n update(event.detail);\n }\n function update(event) {\n if (event && event.storageArea !== storage)\n return;\n if (event && event.key == null) {\n data.value = rawInit;\n return;\n }\n if (event && event.key !== key)\n return;\n pauseWatch();\n try {\n if ((event == null ? void 0 : event.newValue) !== serializer.write(data.value))\n data.value = read(event);\n } catch (e) {\n onError(e);\n } finally {\n if (event)\n nextTick(resumeWatch);\n else\n resumeWatch();\n }\n }\n}\n\nfunction usePreferredDark(options) {\n return useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n}\n\nfunction useColorMode(options = {}) {\n const {\n selector = \"html\",\n attribute = \"class\",\n initialValue = \"auto\",\n window = defaultWindow,\n storage,\n storageKey = \"vueuse-color-scheme\",\n listenToStorageChanges = true,\n storageRef,\n emitAuto,\n disableTransition = true\n } = options;\n const modes = {\n auto: \"\",\n light: \"light\",\n dark: \"dark\",\n ...options.modes || {}\n };\n const preferredDark = usePreferredDark({ window });\n const system = computed(() => preferredDark.value ? \"dark\" : \"light\");\n const store = storageRef || (storageKey == null ? toRef(initialValue) : useStorage(storageKey, initialValue, storage, { window, listenToStorageChanges }));\n const state = computed(() => store.value === \"auto\" ? system.value : store.value);\n const updateHTMLAttrs = getSSRHandler(\n \"updateHTMLAttrs\",\n (selector2, attribute2, value) => {\n const el = typeof selector2 === \"string\" ? window == null ? void 0 : window.document.querySelector(selector2) : unrefElement(selector2);\n if (!el)\n return;\n let style;\n if (disableTransition) {\n style = window.document.createElement(\"style\");\n const styleString = \"*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}\";\n style.appendChild(document.createTextNode(styleString));\n window.document.head.appendChild(style);\n }\n if (attribute2 === \"class\") {\n const current = value.split(/\\s/g);\n Object.values(modes).flatMap((i) => (i || \"\").split(/\\s/g)).filter(Boolean).forEach((v) => {\n if (current.includes(v))\n el.classList.add(v);\n else\n el.classList.remove(v);\n });\n } else {\n el.setAttribute(attribute2, value);\n }\n if (disableTransition) {\n window.getComputedStyle(style).opacity;\n document.head.removeChild(style);\n }\n }\n );\n function defaultOnChanged(mode) {\n var _a;\n updateHTMLAttrs(selector, attribute, (_a = modes[mode]) != null ? _a : mode);\n }\n function onChanged(mode) {\n if (options.onChanged)\n options.onChanged(mode, defaultOnChanged);\n else\n defaultOnChanged(mode);\n }\n watch(state, onChanged, { flush: \"post\", immediate: true });\n tryOnMounted(() => onChanged(state.value));\n const auto = computed({\n get() {\n return emitAuto ? store.value : state.value;\n },\n set(v) {\n store.value = v;\n }\n });\n try {\n return Object.assign(auto, { store, system, state });\n } catch (e) {\n return auto;\n }\n}\n\nfunction useConfirmDialog(revealed = ref(false)) {\n const confirmHook = createEventHook();\n const cancelHook = createEventHook();\n const revealHook = createEventHook();\n let _resolve = noop;\n const reveal = (data) => {\n revealHook.trigger(data);\n revealed.value = true;\n return new Promise((resolve) => {\n _resolve = resolve;\n });\n };\n const confirm = (data) => {\n revealed.value = false;\n confirmHook.trigger(data);\n _resolve({ data, isCanceled: false });\n };\n const cancel = (data) => {\n revealed.value = false;\n cancelHook.trigger(data);\n _resolve({ data, isCanceled: true });\n };\n return {\n isRevealed: computed(() => revealed.value),\n reveal,\n confirm,\n cancel,\n onReveal: revealHook.on,\n onConfirm: confirmHook.on,\n onCancel: cancelHook.on\n };\n}\n\nfunction useMutationObserver(target, callback, options = {}) {\n const { window = defaultWindow, ...mutationOptions } = options;\n let observer;\n const isSupported = useSupported(() => window && \"MutationObserver\" in window);\n const cleanup = () => {\n if (observer) {\n observer.disconnect();\n observer = void 0;\n }\n };\n const stopWatch = watch(\n () => unrefElement(target),\n (el) => {\n cleanup();\n if (isSupported.value && window && el) {\n observer = new MutationObserver(callback);\n observer.observe(el, mutationOptions);\n }\n },\n { immediate: true }\n );\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop\n };\n}\n\nfunction useCssVar(prop, target, options = {}) {\n const { window = defaultWindow, initialValue = \"\", observe = false } = options;\n const variable = ref(initialValue);\n const elRef = computed(() => {\n var _a;\n return unrefElement(target) || ((_a = window == null ? void 0 : window.document) == null ? void 0 : _a.documentElement);\n });\n function updateCssVar() {\n var _a;\n const key = toValue(prop);\n const el = toValue(elRef);\n if (el && window) {\n const value = (_a = window.getComputedStyle(el).getPropertyValue(key)) == null ? void 0 : _a.trim();\n variable.value = value || initialValue;\n }\n }\n if (observe) {\n useMutationObserver(elRef, updateCssVar, {\n attributeFilter: [\"style\", \"class\"],\n window\n });\n }\n watch(\n [elRef, () => toValue(prop)],\n updateCssVar,\n { immediate: true }\n );\n watch(\n variable,\n (val) => {\n var _a;\n if ((_a = elRef.value) == null ? void 0 : _a.style)\n elRef.value.style.setProperty(toValue(prop), val);\n }\n );\n return variable;\n}\n\nfunction useCurrentElement() {\n const vm = getCurrentInstance();\n const currentElement = computedWithControl(\n () => null,\n () => vm.proxy.$el\n );\n onUpdated(currentElement.trigger);\n onMounted(currentElement.trigger);\n return currentElement;\n}\n\nfunction useCycleList(list, options) {\n const state = shallowRef(getInitialValue());\n const listRef = toRef(list);\n const index = computed({\n get() {\n var _a;\n const targetList = listRef.value;\n let index2 = (options == null ? void 0 : options.getIndexOf) ? options.getIndexOf(state.value, targetList) : targetList.indexOf(state.value);\n if (index2 < 0)\n index2 = (_a = options == null ? void 0 : options.fallbackIndex) != null ? _a : 0;\n return index2;\n },\n set(v) {\n set(v);\n }\n });\n function set(i) {\n const targetList = listRef.value;\n const length = targetList.length;\n const index2 = (i % length + length) % length;\n const value = targetList[index2];\n state.value = value;\n return value;\n }\n function shift(delta = 1) {\n return set(index.value + delta);\n }\n function next(n = 1) {\n return shift(n);\n }\n function prev(n = 1) {\n return shift(-n);\n }\n function getInitialValue() {\n var _a, _b;\n return (_b = toValue((_a = options == null ? void 0 : options.initialValue) != null ? _a : toValue(list)[0])) != null ? _b : void 0;\n }\n watch(listRef, () => set(index.value));\n return {\n state,\n index,\n next,\n prev\n };\n}\n\nfunction useDark(options = {}) {\n const {\n valueDark = \"dark\",\n valueLight = \"\"\n } = options;\n const mode = useColorMode({\n ...options,\n onChanged: (mode2, defaultHandler) => {\n var _a;\n if (options.onChanged)\n (_a = options.onChanged) == null ? void 0 : _a.call(options, mode2 === \"dark\", defaultHandler, mode2);\n else\n defaultHandler(mode2);\n },\n modes: {\n dark: valueDark,\n light: valueLight\n }\n });\n const isDark = computed({\n get() {\n return mode.value === \"dark\";\n },\n set(v) {\n const modeVal = v ? \"dark\" : \"light\";\n if (mode.system.value === modeVal)\n mode.value = \"auto\";\n else\n mode.value = modeVal;\n }\n });\n return isDark;\n}\n\nfunction fnBypass(v) {\n return v;\n}\nfunction fnSetSource(source, value) {\n return source.value = value;\n}\nfunction defaultDump(clone) {\n return clone ? typeof clone === \"function\" ? clone : cloneFnJSON : fnBypass;\n}\nfunction defaultParse(clone) {\n return clone ? typeof clone === \"function\" ? clone : cloneFnJSON : fnBypass;\n}\nfunction useManualRefHistory(source, options = {}) {\n const {\n clone = false,\n dump = defaultDump(clone),\n parse = defaultParse(clone),\n setSource = fnSetSource\n } = options;\n function _createHistoryRecord() {\n return markRaw({\n snapshot: dump(source.value),\n timestamp: timestamp()\n });\n }\n const last = ref(_createHistoryRecord());\n const undoStack = ref([]);\n const redoStack = ref([]);\n const _setSource = (record) => {\n setSource(source, parse(record.snapshot));\n last.value = record;\n };\n const commit = () => {\n undoStack.value.unshift(last.value);\n last.value = _createHistoryRecord();\n if (options.capacity && undoStack.value.length > options.capacity)\n undoStack.value.splice(options.capacity, Number.POSITIVE_INFINITY);\n if (redoStack.value.length)\n redoStack.value.splice(0, redoStack.value.length);\n };\n const clear = () => {\n undoStack.value.splice(0, undoStack.value.length);\n redoStack.value.splice(0, redoStack.value.length);\n };\n const undo = () => {\n const state = undoStack.value.shift();\n if (state) {\n redoStack.value.unshift(last.value);\n _setSource(state);\n }\n };\n const redo = () => {\n const state = redoStack.value.shift();\n if (state) {\n undoStack.value.unshift(last.value);\n _setSource(state);\n }\n };\n const reset = () => {\n _setSource(last.value);\n };\n const history = computed(() => [last.value, ...undoStack.value]);\n const canUndo = computed(() => undoStack.value.length > 0);\n const canRedo = computed(() => redoStack.value.length > 0);\n return {\n source,\n undoStack,\n redoStack,\n last,\n history,\n canUndo,\n canRedo,\n clear,\n commit,\n reset,\n undo,\n redo\n };\n}\n\nfunction useRefHistory(source, options = {}) {\n const {\n deep = false,\n flush = \"pre\",\n eventFilter\n } = options;\n const {\n eventFilter: composedFilter,\n pause,\n resume: resumeTracking,\n isActive: isTracking\n } = pausableFilter(eventFilter);\n const {\n ignoreUpdates,\n ignorePrevAsyncUpdates,\n stop\n } = watchIgnorable(\n source,\n commit,\n { deep, flush, eventFilter: composedFilter }\n );\n function setSource(source2, value) {\n ignorePrevAsyncUpdates();\n ignoreUpdates(() => {\n source2.value = value;\n });\n }\n const manualHistory = useManualRefHistory(source, { ...options, clone: options.clone || deep, setSource });\n const { clear, commit: manualCommit } = manualHistory;\n function commit() {\n ignorePrevAsyncUpdates();\n manualCommit();\n }\n function resume(commitNow) {\n resumeTracking();\n if (commitNow)\n commit();\n }\n function batch(fn) {\n let canceled = false;\n const cancel = () => canceled = true;\n ignoreUpdates(() => {\n fn(cancel);\n });\n if (!canceled)\n commit();\n }\n function dispose() {\n stop();\n clear();\n }\n return {\n ...manualHistory,\n isTracking,\n pause,\n resume,\n commit,\n batch,\n dispose\n };\n}\n\nfunction useDebouncedRefHistory(source, options = {}) {\n const filter = options.debounce ? debounceFilter(options.debounce) : void 0;\n const history = useRefHistory(source, { ...options, eventFilter: filter });\n return {\n ...history\n };\n}\n\nfunction useDeviceMotion(options = {}) {\n const {\n window = defaultWindow,\n eventFilter = bypassFilter\n } = options;\n const acceleration = ref({ x: null, y: null, z: null });\n const rotationRate = ref({ alpha: null, beta: null, gamma: null });\n const interval = ref(0);\n const accelerationIncludingGravity = ref({\n x: null,\n y: null,\n z: null\n });\n if (window) {\n const onDeviceMotion = createFilterWrapper(\n eventFilter,\n (event) => {\n acceleration.value = event.acceleration;\n accelerationIncludingGravity.value = event.accelerationIncludingGravity;\n rotationRate.value = event.rotationRate;\n interval.value = event.interval;\n }\n );\n useEventListener(window, \"devicemotion\", onDeviceMotion);\n }\n return {\n acceleration,\n accelerationIncludingGravity,\n rotationRate,\n interval\n };\n}\n\nfunction useDeviceOrientation(options = {}) {\n const { window = defaultWindow } = options;\n const isSupported = useSupported(() => window && \"DeviceOrientationEvent\" in window);\n const isAbsolute = ref(false);\n const alpha = ref(null);\n const beta = ref(null);\n const gamma = ref(null);\n if (window && isSupported.value) {\n useEventListener(window, \"deviceorientation\", (event) => {\n isAbsolute.value = event.absolute;\n alpha.value = event.alpha;\n beta.value = event.beta;\n gamma.value = event.gamma;\n });\n }\n return {\n isSupported,\n isAbsolute,\n alpha,\n beta,\n gamma\n };\n}\n\nfunction useDevicePixelRatio(options = {}) {\n const {\n window = defaultWindow\n } = options;\n const pixelRatio = ref(1);\n if (window) {\n let observe2 = function() {\n pixelRatio.value = window.devicePixelRatio;\n cleanup2();\n media = window.matchMedia(`(resolution: ${pixelRatio.value}dppx)`);\n media.addEventListener(\"change\", observe2, { once: true });\n }, cleanup2 = function() {\n media == null ? void 0 : media.removeEventListener(\"change\", observe2);\n };\n let media;\n observe2();\n tryOnScopeDispose(cleanup2);\n }\n return { pixelRatio };\n}\n\nfunction usePermission(permissionDesc, options = {}) {\n const {\n controls = false,\n navigator = defaultNavigator\n } = options;\n const isSupported = useSupported(() => navigator && \"permissions\" in navigator);\n let permissionStatus;\n const desc = typeof permissionDesc === \"string\" ? { name: permissionDesc } : permissionDesc;\n const state = ref();\n const onChange = () => {\n if (permissionStatus)\n state.value = permissionStatus.state;\n };\n const query = createSingletonPromise(async () => {\n if (!isSupported.value)\n return;\n if (!permissionStatus) {\n try {\n permissionStatus = await navigator.permissions.query(desc);\n useEventListener(permissionStatus, \"change\", onChange);\n onChange();\n } catch (e) {\n state.value = \"prompt\";\n }\n }\n return permissionStatus;\n });\n query();\n if (controls) {\n return {\n state,\n isSupported,\n query\n };\n } else {\n return state;\n }\n}\n\nfunction useDevicesList(options = {}) {\n const {\n navigator = defaultNavigator,\n requestPermissions = false,\n constraints = { audio: true, video: true },\n onUpdated\n } = options;\n const devices = ref([]);\n const videoInputs = computed(() => devices.value.filter((i) => i.kind === \"videoinput\"));\n const audioInputs = computed(() => devices.value.filter((i) => i.kind === \"audioinput\"));\n const audioOutputs = computed(() => devices.value.filter((i) => i.kind === \"audiooutput\"));\n const isSupported = useSupported(() => navigator && navigator.mediaDevices && navigator.mediaDevices.enumerateDevices);\n const permissionGranted = ref(false);\n let stream;\n async function update() {\n if (!isSupported.value)\n return;\n devices.value = await navigator.mediaDevices.enumerateDevices();\n onUpdated == null ? void 0 : onUpdated(devices.value);\n if (stream) {\n stream.getTracks().forEach((t) => t.stop());\n stream = null;\n }\n }\n async function ensurePermissions() {\n if (!isSupported.value)\n return false;\n if (permissionGranted.value)\n return true;\n const { state, query } = usePermission(\"camera\", { controls: true });\n await query();\n if (state.value !== \"granted\") {\n stream = await navigator.mediaDevices.getUserMedia(constraints);\n update();\n permissionGranted.value = true;\n } else {\n permissionGranted.value = true;\n }\n return permissionGranted.value;\n }\n if (isSupported.value) {\n if (requestPermissions)\n ensurePermissions();\n useEventListener(navigator.mediaDevices, \"devicechange\", update);\n update();\n }\n return {\n devices,\n ensurePermissions,\n permissionGranted,\n videoInputs,\n audioInputs,\n audioOutputs,\n isSupported\n };\n}\n\nfunction useDisplayMedia(options = {}) {\n var _a;\n const enabled = ref((_a = options.enabled) != null ? _a : false);\n const video = options.video;\n const audio = options.audio;\n const { navigator = defaultNavigator } = options;\n const isSupported = useSupported(() => {\n var _a2;\n return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getDisplayMedia;\n });\n const constraint = { audio, video };\n const stream = shallowRef();\n async function _start() {\n if (!isSupported.value || stream.value)\n return;\n stream.value = await navigator.mediaDevices.getDisplayMedia(constraint);\n return stream.value;\n }\n async function _stop() {\n var _a2;\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n stream.value = void 0;\n }\n function stop() {\n _stop();\n enabled.value = false;\n }\n async function start() {\n await _start();\n if (stream.value)\n enabled.value = true;\n return stream.value;\n }\n watch(\n enabled,\n (v) => {\n if (v)\n _start();\n else\n _stop();\n },\n { immediate: true }\n );\n return {\n isSupported,\n stream,\n start,\n stop,\n enabled\n };\n}\n\nfunction useDocumentVisibility(options = {}) {\n const { document = defaultDocument } = options;\n if (!document)\n return ref(\"visible\");\n const visibility = ref(document.visibilityState);\n useEventListener(document, \"visibilitychange\", () => {\n visibility.value = document.visibilityState;\n });\n return visibility;\n}\n\nfunction useDraggable(target, options = {}) {\n var _a, _b;\n const {\n pointerTypes,\n preventDefault,\n stopPropagation,\n exact,\n onMove,\n onEnd,\n onStart,\n initialValue,\n axis = \"both\",\n draggingElement = defaultWindow,\n containerElement,\n handle: draggingHandle = target\n } = options;\n const position = ref(\n (_a = toValue(initialValue)) != null ? _a : { x: 0, y: 0 }\n );\n const pressedDelta = ref();\n const filterEvent = (e) => {\n if (pointerTypes)\n return pointerTypes.includes(e.pointerType);\n return true;\n };\n const handleEvent = (e) => {\n if (toValue(preventDefault))\n e.preventDefault();\n if (toValue(stopPropagation))\n e.stopPropagation();\n };\n const start = (e) => {\n var _a2;\n if (!filterEvent(e))\n return;\n if (toValue(exact) && e.target !== toValue(target))\n return;\n const container = (_a2 = toValue(containerElement)) != null ? _a2 : toValue(target);\n const rect = container.getBoundingClientRect();\n const pos = {\n x: e.clientX - rect.left,\n y: e.clientY - rect.top\n };\n if ((onStart == null ? void 0 : onStart(pos, e)) === false)\n return;\n pressedDelta.value = pos;\n handleEvent(e);\n };\n const move = (e) => {\n if (!filterEvent(e))\n return;\n if (!pressedDelta.value)\n return;\n let { x, y } = position.value;\n if (axis === \"x\" || axis === \"both\")\n x = e.clientX - pressedDelta.value.x;\n if (axis === \"y\" || axis === \"both\")\n y = e.clientY - pressedDelta.value.y;\n position.value = {\n x,\n y\n };\n onMove == null ? void 0 : onMove(position.value, e);\n handleEvent(e);\n };\n const end = (e) => {\n if (!filterEvent(e))\n return;\n if (!pressedDelta.value)\n return;\n pressedDelta.value = void 0;\n onEnd == null ? void 0 : onEnd(position.value, e);\n handleEvent(e);\n };\n if (isClient) {\n const config = { capture: (_b = options.capture) != null ? _b : true };\n useEventListener(draggingHandle, \"pointerdown\", start, config);\n useEventListener(draggingElement, \"pointermove\", move, config);\n useEventListener(draggingElement, \"pointerup\", end, config);\n }\n return {\n ...toRefs(position),\n position,\n isDragging: computed(() => !!pressedDelta.value),\n style: computed(\n () => `left:${position.value.x}px;top:${position.value.y}px;`\n )\n };\n}\n\nfunction useDropZone(target, options = {}) {\n const isOverDropZone = ref(false);\n const files = shallowRef(null);\n let counter = 0;\n if (isClient) {\n const _options = typeof options === \"function\" ? { onDrop: options } : options;\n const getFiles = (event) => {\n var _a, _b;\n const list = Array.from((_b = (_a = event.dataTransfer) == null ? void 0 : _a.files) != null ? _b : []);\n return files.value = list.length === 0 ? null : list;\n };\n useEventListener(target, \"dragenter\", (event) => {\n var _a;\n event.preventDefault();\n counter += 1;\n isOverDropZone.value = true;\n (_a = _options.onEnter) == null ? void 0 : _a.call(_options, getFiles(event), event);\n });\n useEventListener(target, \"dragover\", (event) => {\n var _a;\n event.preventDefault();\n (_a = _options.onOver) == null ? void 0 : _a.call(_options, getFiles(event), event);\n });\n useEventListener(target, \"dragleave\", (event) => {\n var _a;\n event.preventDefault();\n counter -= 1;\n if (counter === 0)\n isOverDropZone.value = false;\n (_a = _options.onLeave) == null ? void 0 : _a.call(_options, getFiles(event), event);\n });\n useEventListener(target, \"drop\", (event) => {\n var _a;\n event.preventDefault();\n counter = 0;\n isOverDropZone.value = false;\n (_a = _options.onDrop) == null ? void 0 : _a.call(_options, getFiles(event), event);\n });\n }\n return {\n files,\n isOverDropZone\n };\n}\n\nfunction useResizeObserver(target, callback, options = {}) {\n const { window = defaultWindow, ...observerOptions } = options;\n let observer;\n const isSupported = useSupported(() => window && \"ResizeObserver\" in window);\n const cleanup = () => {\n if (observer) {\n observer.disconnect();\n observer = void 0;\n }\n };\n const targets = computed(() => Array.isArray(target) ? target.map((el) => unrefElement(el)) : [unrefElement(target)]);\n const stopWatch = watch(\n targets,\n (els) => {\n cleanup();\n if (isSupported.value && window) {\n observer = new ResizeObserver(callback);\n for (const _el of els)\n _el && observer.observe(_el, observerOptions);\n }\n },\n { immediate: true, flush: \"post\", deep: true }\n );\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop\n };\n}\n\nfunction useElementBounding(target, options = {}) {\n const {\n reset = true,\n windowResize = true,\n windowScroll = true,\n immediate = true\n } = options;\n const height = ref(0);\n const bottom = ref(0);\n const left = ref(0);\n const right = ref(0);\n const top = ref(0);\n const width = ref(0);\n const x = ref(0);\n const y = ref(0);\n function update() {\n const el = unrefElement(target);\n if (!el) {\n if (reset) {\n height.value = 0;\n bottom.value = 0;\n left.value = 0;\n right.value = 0;\n top.value = 0;\n width.value = 0;\n x.value = 0;\n y.value = 0;\n }\n return;\n }\n const rect = el.getBoundingClientRect();\n height.value = rect.height;\n bottom.value = rect.bottom;\n left.value = rect.left;\n right.value = rect.right;\n top.value = rect.top;\n width.value = rect.width;\n x.value = rect.x;\n y.value = rect.y;\n }\n useResizeObserver(target, update);\n watch(() => unrefElement(target), (ele) => !ele && update());\n if (windowScroll)\n useEventListener(\"scroll\", update, { capture: true, passive: true });\n if (windowResize)\n useEventListener(\"resize\", update, { passive: true });\n tryOnMounted(() => {\n if (immediate)\n update();\n });\n return {\n height,\n bottom,\n left,\n right,\n top,\n width,\n x,\n y,\n update\n };\n}\n\nfunction useElementByPoint(options) {\n const {\n x,\n y,\n document = defaultDocument,\n multiple,\n interval = \"requestAnimationFrame\",\n immediate = true\n } = options;\n const isSupported = useSupported(() => {\n if (toValue(multiple))\n return document && \"elementsFromPoint\" in document;\n return document && \"elementFromPoint\" in document;\n });\n const element = ref(null);\n const cb = () => {\n var _a, _b;\n element.value = toValue(multiple) ? (_a = document == null ? void 0 : document.elementsFromPoint(toValue(x), toValue(y))) != null ? _a : [] : (_b = document == null ? void 0 : document.elementFromPoint(toValue(x), toValue(y))) != null ? _b : null;\n };\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate });\n return {\n isSupported,\n element,\n ...controls\n };\n}\n\nfunction useElementHover(el, options = {}) {\n const {\n delayEnter = 0,\n delayLeave = 0,\n window = defaultWindow\n } = options;\n const isHovered = ref(false);\n let timer;\n const toggle = (entering) => {\n const delay = entering ? delayEnter : delayLeave;\n if (timer) {\n clearTimeout(timer);\n timer = void 0;\n }\n if (delay)\n timer = setTimeout(() => isHovered.value = entering, delay);\n else\n isHovered.value = entering;\n };\n if (!window)\n return isHovered;\n useEventListener(el, \"mouseenter\", () => toggle(true), { passive: true });\n useEventListener(el, \"mouseleave\", () => toggle(false), { passive: true });\n return isHovered;\n}\n\nfunction useElementSize(target, initialSize = { width: 0, height: 0 }, options = {}) {\n const { window = defaultWindow, box = \"content-box\" } = options;\n const isSVG = computed(() => {\n var _a, _b;\n return (_b = (_a = unrefElement(target)) == null ? void 0 : _a.namespaceURI) == null ? void 0 : _b.includes(\"svg\");\n });\n const width = ref(initialSize.width);\n const height = ref(initialSize.height);\n useResizeObserver(\n target,\n ([entry]) => {\n const boxSize = box === \"border-box\" ? entry.borderBoxSize : box === \"content-box\" ? entry.contentBoxSize : entry.devicePixelContentBoxSize;\n if (window && isSVG.value) {\n const $elem = unrefElement(target);\n if ($elem) {\n const styles = window.getComputedStyle($elem);\n width.value = Number.parseFloat(styles.width);\n height.value = Number.parseFloat(styles.height);\n }\n } else {\n if (boxSize) {\n const formatBoxSize = Array.isArray(boxSize) ? boxSize : [boxSize];\n width.value = formatBoxSize.reduce((acc, { inlineSize }) => acc + inlineSize, 0);\n height.value = formatBoxSize.reduce((acc, { blockSize }) => acc + blockSize, 0);\n } else {\n width.value = entry.contentRect.width;\n height.value = entry.contentRect.height;\n }\n }\n },\n options\n );\n watch(\n () => unrefElement(target),\n (ele) => {\n width.value = ele ? initialSize.width : 0;\n height.value = ele ? initialSize.height : 0;\n }\n );\n return {\n width,\n height\n };\n}\n\nfunction useIntersectionObserver(target, callback, options = {}) {\n const {\n root,\n rootMargin = \"0px\",\n threshold = 0.1,\n window = defaultWindow,\n immediate = true\n } = options;\n const isSupported = useSupported(() => window && \"IntersectionObserver\" in window);\n const targets = computed(() => {\n const _target = toValue(target);\n return (Array.isArray(_target) ? _target : [_target]).map(unrefElement).filter(notNullish);\n });\n let cleanup = noop;\n const isActive = ref(immediate);\n const stopWatch = isSupported.value ? watch(\n () => [targets.value, unrefElement(root), isActive.value],\n ([targets2, root2]) => {\n cleanup();\n if (!isActive.value)\n return;\n if (!targets2.length)\n return;\n const observer = new IntersectionObserver(\n callback,\n {\n root: unrefElement(root2),\n rootMargin,\n threshold\n }\n );\n targets2.forEach((el) => el && observer.observe(el));\n cleanup = () => {\n observer.disconnect();\n cleanup = noop;\n };\n },\n { immediate, flush: \"post\" }\n ) : noop;\n const stop = () => {\n cleanup();\n stopWatch();\n isActive.value = false;\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n isActive,\n pause() {\n cleanup();\n isActive.value = false;\n },\n resume() {\n isActive.value = true;\n },\n stop\n };\n}\n\nfunction useElementVisibility(element, options = {}) {\n const { window = defaultWindow, scrollTarget } = options;\n const elementIsVisible = ref(false);\n useIntersectionObserver(\n element,\n ([{ isIntersecting }]) => {\n elementIsVisible.value = isIntersecting;\n },\n {\n root: scrollTarget,\n window,\n threshold: 0\n }\n );\n return elementIsVisible;\n}\n\nconst events = /* @__PURE__ */ new Map();\n\nfunction useEventBus(key) {\n const scope = getCurrentScope();\n function on(listener) {\n var _a;\n const listeners = events.get(key) || /* @__PURE__ */ new Set();\n listeners.add(listener);\n events.set(key, listeners);\n const _off = () => off(listener);\n (_a = scope == null ? void 0 : scope.cleanups) == null ? void 0 : _a.push(_off);\n return _off;\n }\n function once(listener) {\n function _listener(...args) {\n off(_listener);\n listener(...args);\n }\n return on(_listener);\n }\n function off(listener) {\n const listeners = events.get(key);\n if (!listeners)\n return;\n listeners.delete(listener);\n if (!listeners.size)\n reset();\n }\n function reset() {\n events.delete(key);\n }\n function emit(event, payload) {\n var _a;\n (_a = events.get(key)) == null ? void 0 : _a.forEach((v) => v(event, payload));\n }\n return { on, once, off, emit, reset };\n}\n\nfunction useEventSource(url, events = [], options = {}) {\n const event = ref(null);\n const data = ref(null);\n const status = ref(\"CONNECTING\");\n const eventSource = ref(null);\n const error = shallowRef(null);\n const {\n withCredentials = false\n } = options;\n const close = () => {\n if (eventSource.value) {\n eventSource.value.close();\n eventSource.value = null;\n status.value = \"CLOSED\";\n }\n };\n const es = new EventSource(url, { withCredentials });\n eventSource.value = es;\n es.onopen = () => {\n status.value = \"OPEN\";\n error.value = null;\n };\n es.onerror = (e) => {\n status.value = \"CLOSED\";\n error.value = e;\n };\n es.onmessage = (e) => {\n event.value = null;\n data.value = e.data;\n };\n for (const event_name of events) {\n useEventListener(es, event_name, (e) => {\n event.value = event_name;\n data.value = e.data || null;\n });\n }\n tryOnScopeDispose(() => {\n close();\n });\n return {\n eventSource,\n event,\n data,\n status,\n error,\n close\n };\n}\n\nfunction useEyeDropper(options = {}) {\n const { initialValue = \"\" } = options;\n const isSupported = useSupported(() => typeof window !== \"undefined\" && \"EyeDropper\" in window);\n const sRGBHex = ref(initialValue);\n async function open(openOptions) {\n if (!isSupported.value)\n return;\n const eyeDropper = new window.EyeDropper();\n const result = await eyeDropper.open(openOptions);\n sRGBHex.value = result.sRGBHex;\n return result;\n }\n return { isSupported, sRGBHex, open };\n}\n\nfunction useFavicon(newIcon = null, options = {}) {\n const {\n baseUrl = \"\",\n rel = \"icon\",\n document = defaultDocument\n } = options;\n const favicon = toRef(newIcon);\n const applyIcon = (icon) => {\n const elements = document == null ? void 0 : document.head.querySelectorAll(`link[rel*=\"${rel}\"]`);\n if (!elements || elements.length === 0) {\n const link = document == null ? void 0 : document.createElement(\"link\");\n if (link) {\n link.rel = rel;\n link.href = `${baseUrl}${icon}`;\n link.type = `image/${icon.split(\".\").pop()}`;\n document == null ? void 0 : document.head.append(link);\n }\n return;\n }\n elements == null ? void 0 : elements.forEach((el) => el.href = `${baseUrl}${icon}`);\n };\n watch(\n favicon,\n (i, o) => {\n if (typeof i === \"string\" && i !== o)\n applyIcon(i);\n },\n { immediate: true }\n );\n return favicon;\n}\n\nconst payloadMapping = {\n json: \"application/json\",\n text: \"text/plain\"\n};\nfunction isFetchOptions(obj) {\n return obj && containsProp(obj, \"immediate\", \"refetch\", \"initialData\", \"timeout\", \"beforeFetch\", \"afterFetch\", \"onFetchError\", \"fetch\", \"updateDataOnError\");\n}\nfunction isAbsoluteURL(url) {\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\nfunction headersToObject(headers) {\n if (typeof Headers !== \"undefined\" && headers instanceof Headers)\n return Object.fromEntries([...headers.entries()]);\n return headers;\n}\nfunction combineCallbacks(combination, ...callbacks) {\n if (combination === \"overwrite\") {\n return async (ctx) => {\n const callback = callbacks[callbacks.length - 1];\n if (callback)\n return { ...ctx, ...await callback(ctx) };\n return ctx;\n };\n } else {\n return async (ctx) => {\n for (const callback of callbacks) {\n if (callback)\n ctx = { ...ctx, ...await callback(ctx) };\n }\n return ctx;\n };\n }\n}\nfunction createFetch(config = {}) {\n const _combination = config.combination || \"chain\";\n const _options = config.options || {};\n const _fetchOptions = config.fetchOptions || {};\n function useFactoryFetch(url, ...args) {\n const computedUrl = computed(() => {\n const baseUrl = toValue(config.baseUrl);\n const targetUrl = toValue(url);\n return baseUrl && !isAbsoluteURL(targetUrl) ? joinPaths(baseUrl, targetUrl) : targetUrl;\n });\n let options = _options;\n let fetchOptions = _fetchOptions;\n if (args.length > 0) {\n if (isFetchOptions(args[0])) {\n options = {\n ...options,\n ...args[0],\n beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[0].beforeFetch),\n afterFetch: combineCallbacks(_combination, _options.afterFetch, args[0].afterFetch),\n onFetchError: combineCallbacks(_combination, _options.onFetchError, args[0].onFetchError)\n };\n } else {\n fetchOptions = {\n ...fetchOptions,\n ...args[0],\n headers: {\n ...headersToObject(fetchOptions.headers) || {},\n ...headersToObject(args[0].headers) || {}\n }\n };\n }\n }\n if (args.length > 1 && isFetchOptions(args[1])) {\n options = {\n ...options,\n ...args[1],\n beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[1].beforeFetch),\n afterFetch: combineCallbacks(_combination, _options.afterFetch, args[1].afterFetch),\n onFetchError: combineCallbacks(_combination, _options.onFetchError, args[1].onFetchError)\n };\n }\n return useFetch(computedUrl, fetchOptions, options);\n }\n return useFactoryFetch;\n}\nfunction useFetch(url, ...args) {\n var _a;\n const supportsAbort = typeof AbortController === \"function\";\n let fetchOptions = {};\n let options = {\n immediate: true,\n refetch: false,\n timeout: 0,\n updateDataOnError: false\n };\n const config = {\n method: \"GET\",\n type: \"text\",\n payload: void 0\n };\n if (args.length > 0) {\n if (isFetchOptions(args[0]))\n options = { ...options, ...args[0] };\n else\n fetchOptions = args[0];\n }\n if (args.length > 1) {\n if (isFetchOptions(args[1]))\n options = { ...options, ...args[1] };\n }\n const {\n fetch = (_a = defaultWindow) == null ? void 0 : _a.fetch,\n initialData,\n timeout\n } = options;\n const responseEvent = createEventHook();\n const errorEvent = createEventHook();\n const finallyEvent = createEventHook();\n const isFinished = ref(false);\n const isFetching = ref(false);\n const aborted = ref(false);\n const statusCode = ref(null);\n const response = shallowRef(null);\n const error = shallowRef(null);\n const data = shallowRef(initialData || null);\n const canAbort = computed(() => supportsAbort && isFetching.value);\n let controller;\n let timer;\n const abort = () => {\n if (supportsAbort) {\n controller == null ? void 0 : controller.abort();\n controller = new AbortController();\n controller.signal.onabort = () => aborted.value = true;\n fetchOptions = {\n ...fetchOptions,\n signal: controller.signal\n };\n }\n };\n const loading = (isLoading) => {\n isFetching.value = isLoading;\n isFinished.value = !isLoading;\n };\n if (timeout)\n timer = useTimeoutFn(abort, timeout, { immediate: false });\n const execute = async (throwOnFailed = false) => {\n var _a2;\n abort();\n loading(true);\n error.value = null;\n statusCode.value = null;\n aborted.value = false;\n const defaultFetchOptions = {\n method: config.method,\n headers: {}\n };\n if (config.payload) {\n const headers = headersToObject(defaultFetchOptions.headers);\n const payload = toValue(config.payload);\n if (!config.payloadType && payload && Object.getPrototypeOf(payload) === Object.prototype && !(payload instanceof FormData))\n config.payloadType = \"json\";\n if (config.payloadType)\n headers[\"Content-Type\"] = (_a2 = payloadMapping[config.payloadType]) != null ? _a2 : config.payloadType;\n defaultFetchOptions.body = config.payloadType === \"json\" ? JSON.stringify(payload) : payload;\n }\n let isCanceled = false;\n const context = {\n url: toValue(url),\n options: {\n ...defaultFetchOptions,\n ...fetchOptions\n },\n cancel: () => {\n isCanceled = true;\n }\n };\n if (options.beforeFetch)\n Object.assign(context, await options.beforeFetch(context));\n if (isCanceled || !fetch) {\n loading(false);\n return Promise.resolve(null);\n }\n let responseData = null;\n if (timer)\n timer.start();\n return new Promise((resolve, reject) => {\n var _a3;\n fetch(\n context.url,\n {\n ...defaultFetchOptions,\n ...context.options,\n headers: {\n ...headersToObject(defaultFetchOptions.headers),\n ...headersToObject((_a3 = context.options) == null ? void 0 : _a3.headers)\n }\n }\n ).then(async (fetchResponse) => {\n response.value = fetchResponse;\n statusCode.value = fetchResponse.status;\n responseData = await fetchResponse[config.type]();\n if (!fetchResponse.ok) {\n data.value = initialData || null;\n throw new Error(fetchResponse.statusText);\n }\n if (options.afterFetch) {\n ({ data: responseData } = await options.afterFetch({\n data: responseData,\n response: fetchResponse\n }));\n }\n data.value = responseData;\n responseEvent.trigger(fetchResponse);\n return resolve(fetchResponse);\n }).catch(async (fetchError) => {\n let errorData = fetchError.message || fetchError.name;\n if (options.onFetchError) {\n ({ error: errorData, data: responseData } = await options.onFetchError({\n data: responseData,\n error: fetchError,\n response: response.value\n }));\n }\n error.value = errorData;\n if (options.updateDataOnError)\n data.value = responseData;\n errorEvent.trigger(fetchError);\n if (throwOnFailed)\n return reject(fetchError);\n return resolve(null);\n }).finally(() => {\n loading(false);\n if (timer)\n timer.stop();\n finallyEvent.trigger(null);\n });\n });\n };\n const refetch = toRef(options.refetch);\n watch(\n [\n refetch,\n toRef(url)\n ],\n ([refetch2]) => refetch2 && execute(),\n { deep: true }\n );\n const shell = {\n isFinished,\n statusCode,\n response,\n error,\n data,\n isFetching,\n canAbort,\n aborted,\n abort,\n execute,\n onFetchResponse: responseEvent.on,\n onFetchError: errorEvent.on,\n onFetchFinally: finallyEvent.on,\n // method\n get: setMethod(\"GET\"),\n put: setMethod(\"PUT\"),\n post: setMethod(\"POST\"),\n delete: setMethod(\"DELETE\"),\n patch: setMethod(\"PATCH\"),\n head: setMethod(\"HEAD\"),\n options: setMethod(\"OPTIONS\"),\n // type\n json: setType(\"json\"),\n text: setType(\"text\"),\n blob: setType(\"blob\"),\n arrayBuffer: setType(\"arrayBuffer\"),\n formData: setType(\"formData\")\n };\n function setMethod(method) {\n return (payload, payloadType) => {\n if (!isFetching.value) {\n config.method = method;\n config.payload = payload;\n config.payloadType = payloadType;\n if (isRef(config.payload)) {\n watch(\n [\n refetch,\n toRef(config.payload)\n ],\n ([refetch2]) => refetch2 && execute(),\n { deep: true }\n );\n }\n return {\n ...shell,\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n };\n }\n return void 0;\n };\n }\n function waitUntilFinished() {\n return new Promise((resolve, reject) => {\n until(isFinished).toBe(true).then(() => resolve(shell)).catch((error2) => reject(error2));\n });\n }\n function setType(type) {\n return () => {\n if (!isFetching.value) {\n config.type = type;\n return {\n ...shell,\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n };\n }\n return void 0;\n };\n }\n if (options.immediate)\n Promise.resolve().then(() => execute());\n return {\n ...shell,\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n };\n}\nfunction joinPaths(start, end) {\n if (!start.endsWith(\"/\") && !end.startsWith(\"/\"))\n return `${start}/${end}`;\n return `${start}${end}`;\n}\n\nconst DEFAULT_OPTIONS = {\n multiple: true,\n accept: \"*\",\n reset: false\n};\nfunction useFileDialog(options = {}) {\n const {\n document = defaultDocument\n } = options;\n const files = ref(null);\n const { on: onChange, trigger } = createEventHook();\n let input;\n if (document) {\n input = document.createElement(\"input\");\n input.type = \"file\";\n input.onchange = (event) => {\n const result = event.target;\n files.value = result.files;\n trigger(files.value);\n };\n }\n const reset = () => {\n files.value = null;\n if (input)\n input.value = \"\";\n };\n const open = (localOptions) => {\n if (!input)\n return;\n const _options = {\n ...DEFAULT_OPTIONS,\n ...options,\n ...localOptions\n };\n input.multiple = _options.multiple;\n input.accept = _options.accept;\n if (hasOwn(_options, \"capture\"))\n input.capture = _options.capture;\n if (_options.reset)\n reset();\n input.click();\n };\n return {\n files: readonly(files),\n open,\n reset,\n onChange\n };\n}\n\nfunction useFileSystemAccess(options = {}) {\n const {\n window: _window = defaultWindow,\n dataType = \"Text\"\n } = options;\n const window = _window;\n const isSupported = useSupported(() => window && \"showSaveFilePicker\" in window && \"showOpenFilePicker\" in window);\n const fileHandle = ref();\n const data = ref();\n const file = ref();\n const fileName = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.name) != null ? _b : \"\";\n });\n const fileMIME = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.type) != null ? _b : \"\";\n });\n const fileSize = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.size) != null ? _b : 0;\n });\n const fileLastModified = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.lastModified) != null ? _b : 0;\n });\n async function open(_options = {}) {\n if (!isSupported.value)\n return;\n const [handle] = await window.showOpenFilePicker({ ...toValue(options), ..._options });\n fileHandle.value = handle;\n await updateFile();\n await updateData();\n }\n async function create(_options = {}) {\n if (!isSupported.value)\n return;\n fileHandle.value = await window.showSaveFilePicker({ ...options, ..._options });\n data.value = void 0;\n await updateFile();\n await updateData();\n }\n async function save(_options = {}) {\n if (!isSupported.value)\n return;\n if (!fileHandle.value)\n return saveAs(_options);\n if (data.value) {\n const writableStream = await fileHandle.value.createWritable();\n await writableStream.write(data.value);\n await writableStream.close();\n }\n await updateFile();\n }\n async function saveAs(_options = {}) {\n if (!isSupported.value)\n return;\n fileHandle.value = await window.showSaveFilePicker({ ...options, ..._options });\n if (data.value) {\n const writableStream = await fileHandle.value.createWritable();\n await writableStream.write(data.value);\n await writableStream.close();\n }\n await updateFile();\n }\n async function updateFile() {\n var _a;\n file.value = await ((_a = fileHandle.value) == null ? void 0 : _a.getFile());\n }\n async function updateData() {\n var _a, _b;\n const type = toValue(dataType);\n if (type === \"Text\")\n data.value = await ((_a = file.value) == null ? void 0 : _a.text());\n else if (type === \"ArrayBuffer\")\n data.value = await ((_b = file.value) == null ? void 0 : _b.arrayBuffer());\n else if (type === \"Blob\")\n data.value = file.value;\n }\n watch(() => toValue(dataType), updateData);\n return {\n isSupported,\n data,\n file,\n fileName,\n fileMIME,\n fileSize,\n fileLastModified,\n open,\n create,\n save,\n saveAs,\n updateData\n };\n}\n\nfunction useFocus(target, options = {}) {\n const { initialValue = false, focusVisible = false } = options;\n const innerFocused = ref(false);\n const targetElement = computed(() => unrefElement(target));\n useEventListener(targetElement, \"focus\", (event) => {\n var _a, _b;\n if (!focusVisible || ((_b = (_a = event.target).matches) == null ? void 0 : _b.call(_a, \":focus-visible\")))\n innerFocused.value = true;\n });\n useEventListener(targetElement, \"blur\", () => innerFocused.value = false);\n const focused = computed({\n get: () => innerFocused.value,\n set(value) {\n var _a, _b;\n if (!value && innerFocused.value)\n (_a = targetElement.value) == null ? void 0 : _a.blur();\n else if (value && !innerFocused.value)\n (_b = targetElement.value) == null ? void 0 : _b.focus();\n }\n });\n watch(\n targetElement,\n () => {\n focused.value = initialValue;\n },\n { immediate: true, flush: \"post\" }\n );\n return { focused };\n}\n\nfunction useFocusWithin(target, options = {}) {\n const activeElement = useActiveElement(options);\n const targetElement = computed(() => unrefElement(target));\n const focused = computed(() => targetElement.value && activeElement.value ? targetElement.value.contains(activeElement.value) : false);\n return { focused };\n}\n\nfunction useFps(options) {\n var _a;\n const fps = ref(0);\n if (typeof performance === \"undefined\")\n return fps;\n const every = (_a = options == null ? void 0 : options.every) != null ? _a : 10;\n let last = performance.now();\n let ticks = 0;\n useRafFn(() => {\n ticks += 1;\n if (ticks >= every) {\n const now = performance.now();\n const diff = now - last;\n fps.value = Math.round(1e3 / (diff / ticks));\n last = now;\n ticks = 0;\n }\n });\n return fps;\n}\n\nconst eventHandlers = [\n \"fullscreenchange\",\n \"webkitfullscreenchange\",\n \"webkitendfullscreen\",\n \"mozfullscreenchange\",\n \"MSFullscreenChange\"\n];\nfunction useFullscreen(target, options = {}) {\n const {\n document = defaultDocument,\n autoExit = false\n } = options;\n const targetRef = computed(() => {\n var _a;\n return (_a = unrefElement(target)) != null ? _a : document == null ? void 0 : document.querySelector(\"html\");\n });\n const isFullscreen = ref(false);\n const requestMethod = computed(() => {\n return [\n \"requestFullscreen\",\n \"webkitRequestFullscreen\",\n \"webkitEnterFullscreen\",\n \"webkitEnterFullScreen\",\n \"webkitRequestFullScreen\",\n \"mozRequestFullScreen\",\n \"msRequestFullscreen\"\n ].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n });\n const exitMethod = computed(() => {\n return [\n \"exitFullscreen\",\n \"webkitExitFullscreen\",\n \"webkitExitFullScreen\",\n \"webkitCancelFullScreen\",\n \"mozCancelFullScreen\",\n \"msExitFullscreen\"\n ].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n });\n const fullscreenEnabled = computed(() => {\n return [\n \"fullScreen\",\n \"webkitIsFullScreen\",\n \"webkitDisplayingFullscreen\",\n \"mozFullScreen\",\n \"msFullscreenElement\"\n ].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n });\n const fullscreenElementMethod = [\n \"fullscreenElement\",\n \"webkitFullscreenElement\",\n \"mozFullScreenElement\",\n \"msFullscreenElement\"\n ].find((m) => document && m in document);\n const isSupported = useSupported(() => targetRef.value && document && requestMethod.value !== void 0 && exitMethod.value !== void 0 && fullscreenEnabled.value !== void 0);\n const isCurrentElementFullScreen = () => {\n if (fullscreenElementMethod)\n return (document == null ? void 0 : document[fullscreenElementMethod]) === targetRef.value;\n return false;\n };\n const isElementFullScreen = () => {\n if (fullscreenEnabled.value) {\n if (document && document[fullscreenEnabled.value] != null) {\n return document[fullscreenEnabled.value];\n } else {\n const target2 = targetRef.value;\n if ((target2 == null ? void 0 : target2[fullscreenEnabled.value]) != null) {\n return Boolean(target2[fullscreenEnabled.value]);\n }\n }\n }\n return false;\n };\n async function exit() {\n if (!isSupported.value || !isFullscreen.value)\n return;\n if (exitMethod.value) {\n if ((document == null ? void 0 : document[exitMethod.value]) != null) {\n await document[exitMethod.value]();\n } else {\n const target2 = targetRef.value;\n if ((target2 == null ? void 0 : target2[exitMethod.value]) != null)\n await target2[exitMethod.value]();\n }\n }\n isFullscreen.value = false;\n }\n async function enter() {\n if (!isSupported.value || isFullscreen.value)\n return;\n if (isElementFullScreen())\n await exit();\n const target2 = targetRef.value;\n if (requestMethod.value && (target2 == null ? void 0 : target2[requestMethod.value]) != null) {\n await target2[requestMethod.value]();\n isFullscreen.value = true;\n }\n }\n async function toggle() {\n await (isFullscreen.value ? exit() : enter());\n }\n const handlerCallback = () => {\n const isElementFullScreenValue = isElementFullScreen();\n if (!isElementFullScreenValue || isElementFullScreenValue && isCurrentElementFullScreen())\n isFullscreen.value = isElementFullScreenValue;\n };\n useEventListener(document, eventHandlers, handlerCallback, false);\n useEventListener(() => unrefElement(targetRef), eventHandlers, handlerCallback, false);\n if (autoExit)\n tryOnScopeDispose(exit);\n return {\n isSupported,\n isFullscreen,\n enter,\n exit,\n toggle\n };\n}\n\nfunction mapGamepadToXbox360Controller(gamepad) {\n return computed(() => {\n if (gamepad.value) {\n return {\n buttons: {\n a: gamepad.value.buttons[0],\n b: gamepad.value.buttons[1],\n x: gamepad.value.buttons[2],\n y: gamepad.value.buttons[3]\n },\n bumper: {\n left: gamepad.value.buttons[4],\n right: gamepad.value.buttons[5]\n },\n triggers: {\n left: gamepad.value.buttons[6],\n right: gamepad.value.buttons[7]\n },\n stick: {\n left: {\n horizontal: gamepad.value.axes[0],\n vertical: gamepad.value.axes[1],\n button: gamepad.value.buttons[10]\n },\n right: {\n horizontal: gamepad.value.axes[2],\n vertical: gamepad.value.axes[3],\n button: gamepad.value.buttons[11]\n }\n },\n dpad: {\n up: gamepad.value.buttons[12],\n down: gamepad.value.buttons[13],\n left: gamepad.value.buttons[14],\n right: gamepad.value.buttons[15]\n },\n back: gamepad.value.buttons[8],\n start: gamepad.value.buttons[9]\n };\n }\n return null;\n });\n}\nfunction useGamepad(options = {}) {\n const {\n navigator = defaultNavigator\n } = options;\n const isSupported = useSupported(() => navigator && \"getGamepads\" in navigator);\n const gamepads = ref([]);\n const onConnectedHook = createEventHook();\n const onDisconnectedHook = createEventHook();\n const stateFromGamepad = (gamepad) => {\n const hapticActuators = [];\n const vibrationActuator = \"vibrationActuator\" in gamepad ? gamepad.vibrationActuator : null;\n if (vibrationActuator)\n hapticActuators.push(vibrationActuator);\n if (gamepad.hapticActuators)\n hapticActuators.push(...gamepad.hapticActuators);\n return {\n ...gamepad,\n id: gamepad.id,\n hapticActuators,\n axes: gamepad.axes.map((axes) => axes),\n buttons: gamepad.buttons.map((button) => ({ pressed: button.pressed, touched: button.touched, value: button.value }))\n };\n };\n const updateGamepadState = () => {\n const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n for (let i = 0; i < _gamepads.length; ++i) {\n const gamepad = _gamepads[i];\n if (gamepad) {\n const index = gamepads.value.findIndex(({ index: index2 }) => index2 === gamepad.index);\n if (index > -1)\n gamepads.value[index] = stateFromGamepad(gamepad);\n }\n }\n };\n const { isActive, pause, resume } = useRafFn(updateGamepadState);\n const onGamepadConnected = (gamepad) => {\n if (!gamepads.value.some(({ index }) => index === gamepad.index)) {\n gamepads.value.push(stateFromGamepad(gamepad));\n onConnectedHook.trigger(gamepad.index);\n }\n resume();\n };\n const onGamepadDisconnected = (gamepad) => {\n gamepads.value = gamepads.value.filter((x) => x.index !== gamepad.index);\n onDisconnectedHook.trigger(gamepad.index);\n };\n useEventListener(\"gamepadconnected\", (e) => onGamepadConnected(e.gamepad));\n useEventListener(\"gamepaddisconnected\", (e) => onGamepadDisconnected(e.gamepad));\n tryOnMounted(() => {\n const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n if (_gamepads) {\n for (let i = 0; i < _gamepads.length; ++i) {\n const gamepad = _gamepads[i];\n if (gamepad)\n onGamepadConnected(gamepad);\n }\n }\n });\n pause();\n return {\n isSupported,\n onConnected: onConnectedHook.on,\n onDisconnected: onDisconnectedHook.on,\n gamepads,\n pause,\n resume,\n isActive\n };\n}\n\nfunction useGeolocation(options = {}) {\n const {\n enableHighAccuracy = true,\n maximumAge = 3e4,\n timeout = 27e3,\n navigator = defaultNavigator,\n immediate = true\n } = options;\n const isSupported = useSupported(() => navigator && \"geolocation\" in navigator);\n const locatedAt = ref(null);\n const error = shallowRef(null);\n const coords = ref({\n accuracy: 0,\n latitude: Number.POSITIVE_INFINITY,\n longitude: Number.POSITIVE_INFINITY,\n altitude: null,\n altitudeAccuracy: null,\n heading: null,\n speed: null\n });\n function updatePosition(position) {\n locatedAt.value = position.timestamp;\n coords.value = position.coords;\n error.value = null;\n }\n let watcher;\n function resume() {\n if (isSupported.value) {\n watcher = navigator.geolocation.watchPosition(\n updatePosition,\n (err) => error.value = err,\n {\n enableHighAccuracy,\n maximumAge,\n timeout\n }\n );\n }\n }\n if (immediate)\n resume();\n function pause() {\n if (watcher && navigator)\n navigator.geolocation.clearWatch(watcher);\n }\n tryOnScopeDispose(() => {\n pause();\n });\n return {\n isSupported,\n coords,\n locatedAt,\n error,\n resume,\n pause\n };\n}\n\nconst defaultEvents$1 = [\"mousemove\", \"mousedown\", \"resize\", \"keydown\", \"touchstart\", \"wheel\"];\nconst oneMinute = 6e4;\nfunction useIdle(timeout = oneMinute, options = {}) {\n const {\n initialState = false,\n listenForVisibilityChange = true,\n events = defaultEvents$1,\n window = defaultWindow,\n eventFilter = throttleFilter(50)\n } = options;\n const idle = ref(initialState);\n const lastActive = ref(timestamp());\n let timer;\n const reset = () => {\n idle.value = false;\n clearTimeout(timer);\n timer = setTimeout(() => idle.value = true, timeout);\n };\n const onEvent = createFilterWrapper(\n eventFilter,\n () => {\n lastActive.value = timestamp();\n reset();\n }\n );\n if (window) {\n const document = window.document;\n for (const event of events)\n useEventListener(window, event, onEvent, { passive: true });\n if (listenForVisibilityChange) {\n useEventListener(document, \"visibilitychange\", () => {\n if (!document.hidden)\n onEvent();\n });\n }\n reset();\n }\n return {\n idle,\n lastActive,\n reset\n };\n}\n\nasync function loadImage(options) {\n return new Promise((resolve, reject) => {\n const img = new Image();\n const { src, srcset, sizes, class: clazz, loading, crossorigin, referrerPolicy } = options;\n img.src = src;\n if (srcset)\n img.srcset = srcset;\n if (sizes)\n img.sizes = sizes;\n if (clazz)\n img.className = clazz;\n if (loading)\n img.loading = loading;\n if (crossorigin)\n img.crossOrigin = crossorigin;\n if (referrerPolicy)\n img.referrerPolicy = referrerPolicy;\n img.onload = () => resolve(img);\n img.onerror = reject;\n });\n}\nfunction useImage(options, asyncStateOptions = {}) {\n const state = useAsyncState(\n () => loadImage(toValue(options)),\n void 0,\n {\n resetOnExecute: true,\n ...asyncStateOptions\n }\n );\n watch(\n () => toValue(options),\n () => state.execute(asyncStateOptions.delay),\n { deep: true }\n );\n return state;\n}\n\nconst ARRIVED_STATE_THRESHOLD_PIXELS = 1;\nfunction useScroll(element, options = {}) {\n const {\n throttle = 0,\n idle = 200,\n onStop = noop,\n onScroll = noop,\n offset = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n },\n eventListenerOptions = {\n capture: false,\n passive: true\n },\n behavior = \"auto\",\n window = defaultWindow\n } = options;\n const internalX = ref(0);\n const internalY = ref(0);\n const x = computed({\n get() {\n return internalX.value;\n },\n set(x2) {\n scrollTo(x2, void 0);\n }\n });\n const y = computed({\n get() {\n return internalY.value;\n },\n set(y2) {\n scrollTo(void 0, y2);\n }\n });\n function scrollTo(_x, _y) {\n var _a, _b, _c;\n if (!window)\n return;\n const _element = toValue(element);\n if (!_element)\n return;\n (_c = _element instanceof Document ? window.document.body : _element) == null ? void 0 : _c.scrollTo({\n top: (_a = toValue(_y)) != null ? _a : y.value,\n left: (_b = toValue(_x)) != null ? _b : x.value,\n behavior: toValue(behavior)\n });\n }\n const isScrolling = ref(false);\n const arrivedState = reactive({\n left: true,\n right: false,\n top: true,\n bottom: false\n });\n const directions = reactive({\n left: false,\n right: false,\n top: false,\n bottom: false\n });\n const onScrollEnd = (e) => {\n if (!isScrolling.value)\n return;\n isScrolling.value = false;\n directions.left = false;\n directions.right = false;\n directions.top = false;\n directions.bottom = false;\n onStop(e);\n };\n const onScrollEndDebounced = useDebounceFn(onScrollEnd, throttle + idle);\n const setArrivedState = (target) => {\n var _a;\n if (!window)\n return;\n const el = target.document ? target.document.documentElement : (_a = target.documentElement) != null ? _a : target;\n const { display, flexDirection } = getComputedStyle(el);\n const scrollLeft = el.scrollLeft;\n directions.left = scrollLeft < internalX.value;\n directions.right = scrollLeft > internalX.value;\n const left = Math.abs(scrollLeft) <= 0 + (offset.left || 0);\n const right = Math.abs(scrollLeft) + el.clientWidth >= el.scrollWidth - (offset.right || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n if (display === \"flex\" && flexDirection === \"row-reverse\") {\n arrivedState.left = right;\n arrivedState.right = left;\n } else {\n arrivedState.left = left;\n arrivedState.right = right;\n }\n internalX.value = scrollLeft;\n let scrollTop = el.scrollTop;\n if (target === window.document && !scrollTop)\n scrollTop = window.document.body.scrollTop;\n directions.top = scrollTop < internalY.value;\n directions.bottom = scrollTop > internalY.value;\n const top = Math.abs(scrollTop) <= 0 + (offset.top || 0);\n const bottom = Math.abs(scrollTop) + el.clientHeight >= el.scrollHeight - (offset.bottom || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n if (display === \"flex\" && flexDirection === \"column-reverse\") {\n arrivedState.top = bottom;\n arrivedState.bottom = top;\n } else {\n arrivedState.top = top;\n arrivedState.bottom = bottom;\n }\n internalY.value = scrollTop;\n };\n const onScrollHandler = (e) => {\n var _a;\n if (!window)\n return;\n const eventTarget = (_a = e.target.documentElement) != null ? _a : e.target;\n setArrivedState(eventTarget);\n isScrolling.value = true;\n onScrollEndDebounced(e);\n onScroll(e);\n };\n useEventListener(\n element,\n \"scroll\",\n throttle ? useThrottleFn(onScrollHandler, throttle, true, false) : onScrollHandler,\n eventListenerOptions\n );\n useEventListener(\n element,\n \"scrollend\",\n onScrollEnd,\n eventListenerOptions\n );\n return {\n x,\n y,\n isScrolling,\n arrivedState,\n directions,\n measure() {\n const _element = toValue(element);\n if (window && _element)\n setArrivedState(_element);\n }\n };\n}\n\nfunction resolveElement(el) {\n if (typeof Window !== \"undefined\" && el instanceof Window)\n return el.document.documentElement;\n if (typeof Document !== \"undefined\" && el instanceof Document)\n return el.documentElement;\n return el;\n}\n\nfunction useInfiniteScroll(element, onLoadMore, options = {}) {\n var _a;\n const {\n direction = \"bottom\",\n interval = 100\n } = options;\n const state = reactive(useScroll(\n element,\n {\n ...options,\n offset: {\n [direction]: (_a = options.distance) != null ? _a : 0,\n ...options.offset\n }\n }\n ));\n const promise = ref();\n const isLoading = computed(() => !!promise.value);\n const observedElement = computed(() => {\n return resolveElement(toValue(element));\n });\n const isElementVisible = useElementVisibility(observedElement);\n function checkAndLoad() {\n state.measure();\n if (!observedElement.value || !isElementVisible.value)\n return;\n const { scrollHeight, clientHeight, scrollWidth, clientWidth } = observedElement.value;\n const isNarrower = direction === \"bottom\" || direction === \"top\" ? scrollHeight <= clientHeight : scrollWidth <= clientWidth;\n if (state.arrivedState[direction] || isNarrower) {\n if (!promise.value) {\n promise.value = Promise.all([\n onLoadMore(state),\n new Promise((resolve) => setTimeout(resolve, interval))\n ]).finally(() => {\n promise.value = null;\n nextTick(() => checkAndLoad());\n });\n }\n }\n }\n watch(\n () => [state.arrivedState[direction], isElementVisible.value],\n checkAndLoad,\n { immediate: true }\n );\n return {\n isLoading\n };\n}\n\nconst defaultEvents = [\"mousedown\", \"mouseup\", \"keydown\", \"keyup\"];\nfunction useKeyModifier(modifier, options = {}) {\n const {\n events = defaultEvents,\n document = defaultDocument,\n initial = null\n } = options;\n const state = ref(initial);\n if (document) {\n events.forEach((listenerEvent) => {\n useEventListener(document, listenerEvent, (evt) => {\n if (typeof evt.getModifierState === \"function\")\n state.value = evt.getModifierState(modifier);\n });\n });\n }\n return state;\n}\n\nfunction useLocalStorage(key, initialValue, options = {}) {\n const { window = defaultWindow } = options;\n return useStorage(key, initialValue, window == null ? void 0 : window.localStorage, options);\n}\n\nconst DefaultMagicKeysAliasMap = {\n ctrl: \"control\",\n command: \"meta\",\n cmd: \"meta\",\n option: \"alt\",\n up: \"arrowup\",\n down: \"arrowdown\",\n left: \"arrowleft\",\n right: \"arrowright\"\n};\n\nfunction useMagicKeys(options = {}) {\n const {\n reactive: useReactive = false,\n target = defaultWindow,\n aliasMap = DefaultMagicKeysAliasMap,\n passive = true,\n onEventFired = noop\n } = options;\n const current = reactive(/* @__PURE__ */ new Set());\n const obj = {\n toJSON() {\n return {};\n },\n current\n };\n const refs = useReactive ? reactive(obj) : obj;\n const metaDeps = /* @__PURE__ */ new Set();\n const usedKeys = /* @__PURE__ */ new Set();\n function setRefs(key, value) {\n if (key in refs) {\n if (useReactive)\n refs[key] = value;\n else\n refs[key].value = value;\n }\n }\n function reset() {\n current.clear();\n for (const key of usedKeys)\n setRefs(key, false);\n }\n function updateRefs(e, value) {\n var _a, _b;\n const key = (_a = e.key) == null ? void 0 : _a.toLowerCase();\n const code = (_b = e.code) == null ? void 0 : _b.toLowerCase();\n const values = [code, key].filter(Boolean);\n if (key) {\n if (value)\n current.add(key);\n else\n current.delete(key);\n }\n for (const key2 of values) {\n usedKeys.add(key2);\n setRefs(key2, value);\n }\n if (key === \"meta\" && !value) {\n metaDeps.forEach((key2) => {\n current.delete(key2);\n setRefs(key2, false);\n });\n metaDeps.clear();\n } else if (typeof e.getModifierState === \"function\" && e.getModifierState(\"Meta\") && value) {\n [...current, ...values].forEach((key2) => metaDeps.add(key2));\n }\n }\n useEventListener(target, \"keydown\", (e) => {\n updateRefs(e, true);\n return onEventFired(e);\n }, { passive });\n useEventListener(target, \"keyup\", (e) => {\n updateRefs(e, false);\n return onEventFired(e);\n }, { passive });\n useEventListener(\"blur\", reset, { passive: true });\n useEventListener(\"focus\", reset, { passive: true });\n const proxy = new Proxy(\n refs,\n {\n get(target2, prop, rec) {\n if (typeof prop !== \"string\")\n return Reflect.get(target2, prop, rec);\n prop = prop.toLowerCase();\n if (prop in aliasMap)\n prop = aliasMap[prop];\n if (!(prop in refs)) {\n if (/[+_-]/.test(prop)) {\n const keys = prop.split(/[+_-]/g).map((i) => i.trim());\n refs[prop] = computed(() => keys.every((key) => toValue(proxy[key])));\n } else {\n refs[prop] = ref(false);\n }\n }\n const r = Reflect.get(target2, prop, rec);\n return useReactive ? toValue(r) : r;\n }\n }\n );\n return proxy;\n}\n\nfunction usingElRef(source, cb) {\n if (toValue(source))\n cb(toValue(source));\n}\nfunction timeRangeToArray(timeRanges) {\n let ranges = [];\n for (let i = 0; i < timeRanges.length; ++i)\n ranges = [...ranges, [timeRanges.start(i), timeRanges.end(i)]];\n return ranges;\n}\nfunction tracksToArray(tracks) {\n return Array.from(tracks).map(({ label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }, id) => ({ id, label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }));\n}\nconst defaultOptions = {\n src: \"\",\n tracks: []\n};\nfunction useMediaControls(target, options = {}) {\n options = {\n ...defaultOptions,\n ...options\n };\n const {\n document = defaultDocument\n } = options;\n const currentTime = ref(0);\n const duration = ref(0);\n const seeking = ref(false);\n const volume = ref(1);\n const waiting = ref(false);\n const ended = ref(false);\n const playing = ref(false);\n const rate = ref(1);\n const stalled = ref(false);\n const buffered = ref([]);\n const tracks = ref([]);\n const selectedTrack = ref(-1);\n const isPictureInPicture = ref(false);\n const muted = ref(false);\n const supportsPictureInPicture = document && \"pictureInPictureEnabled\" in document;\n const sourceErrorEvent = createEventHook();\n const disableTrack = (track) => {\n usingElRef(target, (el) => {\n if (track) {\n const id = typeof track === \"number\" ? track : track.id;\n el.textTracks[id].mode = \"disabled\";\n } else {\n for (let i = 0; i < el.textTracks.length; ++i)\n el.textTracks[i].mode = \"disabled\";\n }\n selectedTrack.value = -1;\n });\n };\n const enableTrack = (track, disableTracks = true) => {\n usingElRef(target, (el) => {\n const id = typeof track === \"number\" ? track : track.id;\n if (disableTracks)\n disableTrack();\n el.textTracks[id].mode = \"showing\";\n selectedTrack.value = id;\n });\n };\n const togglePictureInPicture = () => {\n return new Promise((resolve, reject) => {\n usingElRef(target, async (el) => {\n if (supportsPictureInPicture) {\n if (!isPictureInPicture.value) {\n el.requestPictureInPicture().then(resolve).catch(reject);\n } else {\n document.exitPictureInPicture().then(resolve).catch(reject);\n }\n }\n });\n });\n };\n watchEffect(() => {\n if (!document)\n return;\n const el = toValue(target);\n if (!el)\n return;\n const src = toValue(options.src);\n let sources = [];\n if (!src)\n return;\n if (typeof src === \"string\")\n sources = [{ src }];\n else if (Array.isArray(src))\n sources = src;\n else if (isObject(src))\n sources = [src];\n el.querySelectorAll(\"source\").forEach((e) => {\n e.removeEventListener(\"error\", sourceErrorEvent.trigger);\n e.remove();\n });\n sources.forEach(({ src: src2, type }) => {\n const source = document.createElement(\"source\");\n source.setAttribute(\"src\", src2);\n source.setAttribute(\"type\", type || \"\");\n source.addEventListener(\"error\", sourceErrorEvent.trigger);\n el.appendChild(source);\n });\n el.load();\n });\n tryOnScopeDispose(() => {\n const el = toValue(target);\n if (!el)\n return;\n el.querySelectorAll(\"source\").forEach((e) => e.removeEventListener(\"error\", sourceErrorEvent.trigger));\n });\n watch([target, volume], () => {\n const el = toValue(target);\n if (!el)\n return;\n el.volume = volume.value;\n });\n watch([target, muted], () => {\n const el = toValue(target);\n if (!el)\n return;\n el.muted = muted.value;\n });\n watch([target, rate], () => {\n const el = toValue(target);\n if (!el)\n return;\n el.playbackRate = rate.value;\n });\n watchEffect(() => {\n if (!document)\n return;\n const textTracks = toValue(options.tracks);\n const el = toValue(target);\n if (!textTracks || !textTracks.length || !el)\n return;\n el.querySelectorAll(\"track\").forEach((e) => e.remove());\n textTracks.forEach(({ default: isDefault, kind, label, src, srcLang }, i) => {\n const track = document.createElement(\"track\");\n track.default = isDefault || false;\n track.kind = kind;\n track.label = label;\n track.src = src;\n track.srclang = srcLang;\n if (track.default)\n selectedTrack.value = i;\n el.appendChild(track);\n });\n });\n const { ignoreUpdates: ignoreCurrentTimeUpdates } = watchIgnorable(currentTime, (time) => {\n const el = toValue(target);\n if (!el)\n return;\n el.currentTime = time;\n });\n const { ignoreUpdates: ignorePlayingUpdates } = watchIgnorable(playing, (isPlaying) => {\n const el = toValue(target);\n if (!el)\n return;\n isPlaying ? el.play() : el.pause();\n });\n useEventListener(target, \"timeupdate\", () => ignoreCurrentTimeUpdates(() => currentTime.value = toValue(target).currentTime));\n useEventListener(target, \"durationchange\", () => duration.value = toValue(target).duration);\n useEventListener(target, \"progress\", () => buffered.value = timeRangeToArray(toValue(target).buffered));\n useEventListener(target, \"seeking\", () => seeking.value = true);\n useEventListener(target, \"seeked\", () => seeking.value = false);\n useEventListener(target, [\"waiting\", \"loadstart\"], () => {\n waiting.value = true;\n ignorePlayingUpdates(() => playing.value = false);\n });\n useEventListener(target, \"loadeddata\", () => waiting.value = false);\n useEventListener(target, \"playing\", () => {\n waiting.value = false;\n ended.value = false;\n ignorePlayingUpdates(() => playing.value = true);\n });\n useEventListener(target, \"ratechange\", () => rate.value = toValue(target).playbackRate);\n useEventListener(target, \"stalled\", () => stalled.value = true);\n useEventListener(target, \"ended\", () => ended.value = true);\n useEventListener(target, \"pause\", () => ignorePlayingUpdates(() => playing.value = false));\n useEventListener(target, \"play\", () => ignorePlayingUpdates(() => playing.value = true));\n useEventListener(target, \"enterpictureinpicture\", () => isPictureInPicture.value = true);\n useEventListener(target, \"leavepictureinpicture\", () => isPictureInPicture.value = false);\n useEventListener(target, \"volumechange\", () => {\n const el = toValue(target);\n if (!el)\n return;\n volume.value = el.volume;\n muted.value = el.muted;\n });\n const listeners = [];\n const stop = watch([target], () => {\n const el = toValue(target);\n if (!el)\n return;\n stop();\n listeners[0] = useEventListener(el.textTracks, \"addtrack\", () => tracks.value = tracksToArray(el.textTracks));\n listeners[1] = useEventListener(el.textTracks, \"removetrack\", () => tracks.value = tracksToArray(el.textTracks));\n listeners[2] = useEventListener(el.textTracks, \"change\", () => tracks.value = tracksToArray(el.textTracks));\n });\n tryOnScopeDispose(() => listeners.forEach((listener) => listener()));\n return {\n currentTime,\n duration,\n waiting,\n seeking,\n ended,\n stalled,\n buffered,\n playing,\n rate,\n // Volume\n volume,\n muted,\n // Tracks\n tracks,\n selectedTrack,\n enableTrack,\n disableTrack,\n // Picture in Picture\n supportsPictureInPicture,\n togglePictureInPicture,\n isPictureInPicture,\n // Events\n onSourceError: sourceErrorEvent.on\n };\n}\n\nfunction getMapVue2Compat() {\n const data = reactive({});\n return {\n get: (key) => data[key],\n set: (key, value) => set(data, key, value),\n has: (key) => hasOwn(data, key),\n delete: (key) => del(data, key),\n clear: () => {\n Object.keys(data).forEach((key) => {\n del(data, key);\n });\n }\n };\n}\nfunction useMemoize(resolver, options) {\n const initCache = () => {\n if (options == null ? void 0 : options.cache)\n return reactive(options.cache);\n if (isVue2)\n return getMapVue2Compat();\n return reactive(/* @__PURE__ */ new Map());\n };\n const cache = initCache();\n const generateKey = (...args) => (options == null ? void 0 : options.getKey) ? options.getKey(...args) : JSON.stringify(args);\n const _loadData = (key, ...args) => {\n cache.set(key, resolver(...args));\n return cache.get(key);\n };\n const loadData = (...args) => _loadData(generateKey(...args), ...args);\n const deleteData = (...args) => {\n cache.delete(generateKey(...args));\n };\n const clearData = () => {\n cache.clear();\n };\n const memoized = (...args) => {\n const key = generateKey(...args);\n if (cache.has(key))\n return cache.get(key);\n return _loadData(key, ...args);\n };\n memoized.load = loadData;\n memoized.delete = deleteData;\n memoized.clear = clearData;\n memoized.generateKey = generateKey;\n memoized.cache = cache;\n return memoized;\n}\n\nfunction useMemory(options = {}) {\n const memory = ref();\n const isSupported = useSupported(() => typeof performance !== \"undefined\" && \"memory\" in performance);\n if (isSupported.value) {\n const { interval = 1e3 } = options;\n useIntervalFn(() => {\n memory.value = performance.memory;\n }, interval, { immediate: options.immediate, immediateCallback: options.immediateCallback });\n }\n return { isSupported, memory };\n}\n\nconst UseMouseBuiltinExtractors = {\n page: (event) => [event.pageX, event.pageY],\n client: (event) => [event.clientX, event.clientY],\n screen: (event) => [event.screenX, event.screenY],\n movement: (event) => event instanceof Touch ? null : [event.movementX, event.movementY]\n};\nfunction useMouse(options = {}) {\n const {\n type = \"page\",\n touch = true,\n resetOnTouchEnds = false,\n initialValue = { x: 0, y: 0 },\n window = defaultWindow,\n target = window,\n scroll = true,\n eventFilter\n } = options;\n let _prevMouseEvent = null;\n const x = ref(initialValue.x);\n const y = ref(initialValue.y);\n const sourceType = ref(null);\n const extractor = typeof type === \"function\" ? type : UseMouseBuiltinExtractors[type];\n const mouseHandler = (event) => {\n const result = extractor(event);\n _prevMouseEvent = event;\n if (result) {\n [x.value, y.value] = result;\n sourceType.value = \"mouse\";\n }\n };\n const touchHandler = (event) => {\n if (event.touches.length > 0) {\n const result = extractor(event.touches[0]);\n if (result) {\n [x.value, y.value] = result;\n sourceType.value = \"touch\";\n }\n }\n };\n const scrollHandler = () => {\n if (!_prevMouseEvent || !window)\n return;\n const pos = extractor(_prevMouseEvent);\n if (_prevMouseEvent instanceof MouseEvent && pos) {\n x.value = pos[0] + window.scrollX;\n y.value = pos[1] + window.scrollY;\n }\n };\n const reset = () => {\n x.value = initialValue.x;\n y.value = initialValue.y;\n };\n const mouseHandlerWrapper = eventFilter ? (event) => eventFilter(() => mouseHandler(event), {}) : (event) => mouseHandler(event);\n const touchHandlerWrapper = eventFilter ? (event) => eventFilter(() => touchHandler(event), {}) : (event) => touchHandler(event);\n const scrollHandlerWrapper = eventFilter ? () => eventFilter(() => scrollHandler(), {}) : () => scrollHandler();\n if (target) {\n const listenerOptions = { passive: true };\n useEventListener(target, [\"mousemove\", \"dragover\"], mouseHandlerWrapper, listenerOptions);\n if (touch && type !== \"movement\") {\n useEventListener(target, [\"touchstart\", \"touchmove\"], touchHandlerWrapper, listenerOptions);\n if (resetOnTouchEnds)\n useEventListener(target, \"touchend\", reset, listenerOptions);\n }\n if (scroll && type === \"page\")\n useEventListener(window, \"scroll\", scrollHandlerWrapper, { passive: true });\n }\n return {\n x,\n y,\n sourceType\n };\n}\n\nfunction useMouseInElement(target, options = {}) {\n const {\n handleOutside = true,\n window = defaultWindow\n } = options;\n const { x, y, sourceType } = useMouse(options);\n const targetRef = ref(target != null ? target : window == null ? void 0 : window.document.body);\n const elementX = ref(0);\n const elementY = ref(0);\n const elementPositionX = ref(0);\n const elementPositionY = ref(0);\n const elementHeight = ref(0);\n const elementWidth = ref(0);\n const isOutside = ref(true);\n let stop = () => {\n };\n if (window) {\n stop = watch(\n [targetRef, x, y],\n () => {\n const el = unrefElement(targetRef);\n if (!el)\n return;\n const {\n left,\n top,\n width,\n height\n } = el.getBoundingClientRect();\n elementPositionX.value = left + window.pageXOffset;\n elementPositionY.value = top + window.pageYOffset;\n elementHeight.value = height;\n elementWidth.value = width;\n const elX = x.value - elementPositionX.value;\n const elY = y.value - elementPositionY.value;\n isOutside.value = width === 0 || height === 0 || elX < 0 || elY < 0 || elX > width || elY > height;\n if (handleOutside || !isOutside.value) {\n elementX.value = elX;\n elementY.value = elY;\n }\n },\n { immediate: true }\n );\n useEventListener(document, \"mouseleave\", () => {\n isOutside.value = true;\n });\n }\n return {\n x,\n y,\n sourceType,\n elementX,\n elementY,\n elementPositionX,\n elementPositionY,\n elementHeight,\n elementWidth,\n isOutside,\n stop\n };\n}\n\nfunction useMousePressed(options = {}) {\n const {\n touch = true,\n drag = true,\n capture = false,\n initialValue = false,\n window = defaultWindow\n } = options;\n const pressed = ref(initialValue);\n const sourceType = ref(null);\n if (!window) {\n return {\n pressed,\n sourceType\n };\n }\n const onPressed = (srcType) => () => {\n pressed.value = true;\n sourceType.value = srcType;\n };\n const onReleased = () => {\n pressed.value = false;\n sourceType.value = null;\n };\n const target = computed(() => unrefElement(options.target) || window);\n useEventListener(target, \"mousedown\", onPressed(\"mouse\"), { passive: true, capture });\n useEventListener(window, \"mouseleave\", onReleased, { passive: true, capture });\n useEventListener(window, \"mouseup\", onReleased, { passive: true, capture });\n if (drag) {\n useEventListener(target, \"dragstart\", onPressed(\"mouse\"), { passive: true, capture });\n useEventListener(window, \"drop\", onReleased, { passive: true, capture });\n useEventListener(window, \"dragend\", onReleased, { passive: true, capture });\n }\n if (touch) {\n useEventListener(target, \"touchstart\", onPressed(\"touch\"), { passive: true, capture });\n useEventListener(window, \"touchend\", onReleased, { passive: true, capture });\n useEventListener(window, \"touchcancel\", onReleased, { passive: true, capture });\n }\n return {\n pressed,\n sourceType\n };\n}\n\nfunction useNavigatorLanguage(options = {}) {\n const { window = defaultWindow } = options;\n const navigator = window == null ? void 0 : window.navigator;\n const isSupported = useSupported(() => navigator && \"language\" in navigator);\n const language = ref(navigator == null ? void 0 : navigator.language);\n useEventListener(window, \"languagechange\", () => {\n if (navigator)\n language.value = navigator.language;\n });\n return {\n isSupported,\n language\n };\n}\n\nfunction useNetwork(options = {}) {\n const { window = defaultWindow } = options;\n const navigator = window == null ? void 0 : window.navigator;\n const isSupported = useSupported(() => navigator && \"connection\" in navigator);\n const isOnline = ref(true);\n const saveData = ref(false);\n const offlineAt = ref(void 0);\n const onlineAt = ref(void 0);\n const downlink = ref(void 0);\n const downlinkMax = ref(void 0);\n const rtt = ref(void 0);\n const effectiveType = ref(void 0);\n const type = ref(\"unknown\");\n const connection = isSupported.value && navigator.connection;\n function updateNetworkInformation() {\n if (!navigator)\n return;\n isOnline.value = navigator.onLine;\n offlineAt.value = isOnline.value ? void 0 : Date.now();\n onlineAt.value = isOnline.value ? Date.now() : void 0;\n if (connection) {\n downlink.value = connection.downlink;\n downlinkMax.value = connection.downlinkMax;\n effectiveType.value = connection.effectiveType;\n rtt.value = connection.rtt;\n saveData.value = connection.saveData;\n type.value = connection.type;\n }\n }\n if (window) {\n useEventListener(window, \"offline\", () => {\n isOnline.value = false;\n offlineAt.value = Date.now();\n });\n useEventListener(window, \"online\", () => {\n isOnline.value = true;\n onlineAt.value = Date.now();\n });\n }\n if (connection)\n useEventListener(connection, \"change\", updateNetworkInformation, false);\n updateNetworkInformation();\n return {\n isSupported,\n isOnline,\n saveData,\n offlineAt,\n onlineAt,\n downlink,\n downlinkMax,\n effectiveType,\n rtt,\n type\n };\n}\n\nfunction useNow(options = {}) {\n const {\n controls: exposeControls = false,\n interval = \"requestAnimationFrame\"\n } = options;\n const now = ref(/* @__PURE__ */ new Date());\n const update = () => now.value = /* @__PURE__ */ new Date();\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(update, { immediate: true }) : useIntervalFn(update, interval, { immediate: true });\n if (exposeControls) {\n return {\n now,\n ...controls\n };\n } else {\n return now;\n }\n}\n\nfunction useObjectUrl(object) {\n const url = ref();\n const release = () => {\n if (url.value)\n URL.revokeObjectURL(url.value);\n url.value = void 0;\n };\n watch(\n () => toValue(object),\n (newObject) => {\n release();\n if (newObject)\n url.value = URL.createObjectURL(newObject);\n },\n { immediate: true }\n );\n tryOnScopeDispose(release);\n return readonly(url);\n}\n\nfunction useClamp(value, min, max) {\n if (typeof value === \"function\" || isReadonly(value))\n return computed(() => clamp(toValue(value), toValue(min), toValue(max)));\n const _value = ref(value);\n return computed({\n get() {\n return _value.value = clamp(_value.value, toValue(min), toValue(max));\n },\n set(value2) {\n _value.value = clamp(value2, toValue(min), toValue(max));\n }\n });\n}\n\nfunction useOffsetPagination(options) {\n const {\n total = Number.POSITIVE_INFINITY,\n pageSize = 10,\n page = 1,\n onPageChange = noop,\n onPageSizeChange = noop,\n onPageCountChange = noop\n } = options;\n const currentPageSize = useClamp(pageSize, 1, Number.POSITIVE_INFINITY);\n const pageCount = computed(() => Math.max(\n 1,\n Math.ceil(toValue(total) / toValue(currentPageSize))\n ));\n const currentPage = useClamp(page, 1, pageCount);\n const isFirstPage = computed(() => currentPage.value === 1);\n const isLastPage = computed(() => currentPage.value === pageCount.value);\n if (isRef(page))\n syncRef(page, currentPage);\n if (isRef(pageSize))\n syncRef(pageSize, currentPageSize);\n function prev() {\n currentPage.value--;\n }\n function next() {\n currentPage.value++;\n }\n const returnValue = {\n currentPage,\n currentPageSize,\n pageCount,\n isFirstPage,\n isLastPage,\n prev,\n next\n };\n watch(currentPage, () => {\n onPageChange(reactive(returnValue));\n });\n watch(currentPageSize, () => {\n onPageSizeChange(reactive(returnValue));\n });\n watch(pageCount, () => {\n onPageCountChange(reactive(returnValue));\n });\n return returnValue;\n}\n\nfunction useOnline(options = {}) {\n const { isOnline } = useNetwork(options);\n return isOnline;\n}\n\nfunction usePageLeave(options = {}) {\n const { window = defaultWindow } = options;\n const isLeft = ref(false);\n const handler = (event) => {\n if (!window)\n return;\n event = event || window.event;\n const from = event.relatedTarget || event.toElement;\n isLeft.value = !from;\n };\n if (window) {\n useEventListener(window, \"mouseout\", handler, { passive: true });\n useEventListener(window.document, \"mouseleave\", handler, { passive: true });\n useEventListener(window.document, \"mouseenter\", handler, { passive: true });\n }\n return isLeft;\n}\n\nfunction useParallax(target, options = {}) {\n const {\n deviceOrientationTiltAdjust = (i) => i,\n deviceOrientationRollAdjust = (i) => i,\n mouseTiltAdjust = (i) => i,\n mouseRollAdjust = (i) => i,\n window = defaultWindow\n } = options;\n const orientation = reactive(useDeviceOrientation({ window }));\n const {\n elementX: x,\n elementY: y,\n elementWidth: width,\n elementHeight: height\n } = useMouseInElement(target, { handleOutside: false, window });\n const source = computed(() => {\n if (orientation.isSupported && (orientation.alpha != null && orientation.alpha !== 0 || orientation.gamma != null && orientation.gamma !== 0))\n return \"deviceOrientation\";\n return \"mouse\";\n });\n const roll = computed(() => {\n if (source.value === \"deviceOrientation\") {\n const value = -orientation.beta / 90;\n return deviceOrientationRollAdjust(value);\n } else {\n const value = -(y.value - height.value / 2) / height.value;\n return mouseRollAdjust(value);\n }\n });\n const tilt = computed(() => {\n if (source.value === \"deviceOrientation\") {\n const value = orientation.gamma / 90;\n return deviceOrientationTiltAdjust(value);\n } else {\n const value = (x.value - width.value / 2) / width.value;\n return mouseTiltAdjust(value);\n }\n });\n return { roll, tilt, source };\n}\n\nfunction useParentElement(element = useCurrentElement()) {\n const parentElement = shallowRef();\n const update = () => {\n const el = unrefElement(element);\n if (el)\n parentElement.value = el.parentElement;\n };\n tryOnMounted(update);\n watch(() => toValue(element), update);\n return parentElement;\n}\n\nfunction usePerformanceObserver(options, callback) {\n const {\n window = defaultWindow,\n immediate = true,\n ...performanceOptions\n } = options;\n const isSupported = useSupported(() => window && \"PerformanceObserver\" in window);\n let observer;\n const stop = () => {\n observer == null ? void 0 : observer.disconnect();\n };\n const start = () => {\n if (isSupported.value) {\n stop();\n observer = new PerformanceObserver(callback);\n observer.observe(performanceOptions);\n }\n };\n tryOnScopeDispose(stop);\n if (immediate)\n start();\n return {\n isSupported,\n start,\n stop\n };\n}\n\nconst defaultState = {\n x: 0,\n y: 0,\n pointerId: 0,\n pressure: 0,\n tiltX: 0,\n tiltY: 0,\n width: 0,\n height: 0,\n twist: 0,\n pointerType: null\n};\nconst keys = /* @__PURE__ */ Object.keys(defaultState);\nfunction usePointer(options = {}) {\n const {\n target = defaultWindow\n } = options;\n const isInside = ref(false);\n const state = ref(options.initialValue || {});\n Object.assign(state.value, defaultState, state.value);\n const handler = (event) => {\n isInside.value = true;\n if (options.pointerTypes && !options.pointerTypes.includes(event.pointerType))\n return;\n state.value = objectPick(event, keys, false);\n };\n if (target) {\n const listenerOptions = { passive: true };\n useEventListener(target, [\"pointerdown\", \"pointermove\", \"pointerup\"], handler, listenerOptions);\n useEventListener(target, \"pointerleave\", () => isInside.value = false, listenerOptions);\n }\n return {\n ...toRefs(state),\n isInside\n };\n}\n\nfunction usePointerLock(target, options = {}) {\n const { document = defaultDocument, pointerLockOptions } = options;\n const isSupported = useSupported(() => document && \"pointerLockElement\" in document);\n const element = ref();\n const triggerElement = ref();\n let targetElement;\n if (isSupported.value) {\n useEventListener(document, \"pointerlockchange\", () => {\n var _a;\n const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;\n if (targetElement && currentElement === targetElement) {\n element.value = document.pointerLockElement;\n if (!element.value)\n targetElement = triggerElement.value = null;\n }\n });\n useEventListener(document, \"pointerlockerror\", () => {\n var _a;\n const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;\n if (targetElement && currentElement === targetElement) {\n const action = document.pointerLockElement ? \"release\" : \"acquire\";\n throw new Error(`Failed to ${action} pointer lock.`);\n }\n });\n }\n async function lock(e, options2) {\n var _a;\n if (!isSupported.value)\n throw new Error(\"Pointer Lock API is not supported by your browser.\");\n triggerElement.value = e instanceof Event ? e.currentTarget : null;\n targetElement = e instanceof Event ? (_a = unrefElement(target)) != null ? _a : triggerElement.value : unrefElement(e);\n if (!targetElement)\n throw new Error(\"Target element undefined.\");\n targetElement.requestPointerLock(options2 != null ? options2 : pointerLockOptions);\n return await until(element).toBe(targetElement);\n }\n async function unlock() {\n if (!element.value)\n return false;\n document.exitPointerLock();\n await until(element).toBeNull();\n return true;\n }\n return {\n isSupported,\n element,\n triggerElement,\n lock,\n unlock\n };\n}\n\nfunction usePointerSwipe(target, options = {}) {\n const targetRef = toRef(target);\n const {\n threshold = 50,\n onSwipe,\n onSwipeEnd,\n onSwipeStart\n } = options;\n const posStart = reactive({ x: 0, y: 0 });\n const updatePosStart = (x, y) => {\n posStart.x = x;\n posStart.y = y;\n };\n const posEnd = reactive({ x: 0, y: 0 });\n const updatePosEnd = (x, y) => {\n posEnd.x = x;\n posEnd.y = y;\n };\n const distanceX = computed(() => posStart.x - posEnd.x);\n const distanceY = computed(() => posStart.y - posEnd.y);\n const { max, abs } = Math;\n const isThresholdExceeded = computed(() => max(abs(distanceX.value), abs(distanceY.value)) >= threshold);\n const isSwiping = ref(false);\n const isPointerDown = ref(false);\n const direction = computed(() => {\n if (!isThresholdExceeded.value)\n return \"none\";\n if (abs(distanceX.value) > abs(distanceY.value)) {\n return distanceX.value > 0 ? \"left\" : \"right\";\n } else {\n return distanceY.value > 0 ? \"up\" : \"down\";\n }\n });\n const eventIsAllowed = (e) => {\n var _a, _b, _c;\n const isReleasingButton = e.buttons === 0;\n const isPrimaryButton = e.buttons === 1;\n return (_c = (_b = (_a = options.pointerTypes) == null ? void 0 : _a.includes(e.pointerType)) != null ? _b : isReleasingButton || isPrimaryButton) != null ? _c : true;\n };\n const stops = [\n useEventListener(target, \"pointerdown\", (e) => {\n var _a, _b;\n if (!eventIsAllowed(e))\n return;\n isPointerDown.value = true;\n (_b = (_a = targetRef.value) == null ? void 0 : _a.style) == null ? void 0 : _b.setProperty(\"touch-action\", \"none\");\n const eventTarget = e.target;\n eventTarget == null ? void 0 : eventTarget.setPointerCapture(e.pointerId);\n const { clientX: x, clientY: y } = e;\n updatePosStart(x, y);\n updatePosEnd(x, y);\n onSwipeStart == null ? void 0 : onSwipeStart(e);\n }),\n useEventListener(target, \"pointermove\", (e) => {\n if (!eventIsAllowed(e))\n return;\n if (!isPointerDown.value)\n return;\n const { clientX: x, clientY: y } = e;\n updatePosEnd(x, y);\n if (!isSwiping.value && isThresholdExceeded.value)\n isSwiping.value = true;\n if (isSwiping.value)\n onSwipe == null ? void 0 : onSwipe(e);\n }),\n useEventListener(target, \"pointerup\", (e) => {\n var _a, _b;\n if (!eventIsAllowed(e))\n return;\n if (isSwiping.value)\n onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n isPointerDown.value = false;\n isSwiping.value = false;\n (_b = (_a = targetRef.value) == null ? void 0 : _a.style) == null ? void 0 : _b.setProperty(\"touch-action\", \"initial\");\n })\n ];\n const stop = () => stops.forEach((s) => s());\n return {\n isSwiping: readonly(isSwiping),\n direction: readonly(direction),\n posStart: readonly(posStart),\n posEnd: readonly(posEnd),\n distanceX,\n distanceY,\n stop\n };\n}\n\nfunction usePreferredColorScheme(options) {\n const isLight = useMediaQuery(\"(prefers-color-scheme: light)\", options);\n const isDark = useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n return computed(() => {\n if (isDark.value)\n return \"dark\";\n if (isLight.value)\n return \"light\";\n return \"no-preference\";\n });\n}\n\nfunction usePreferredContrast(options) {\n const isMore = useMediaQuery(\"(prefers-contrast: more)\", options);\n const isLess = useMediaQuery(\"(prefers-contrast: less)\", options);\n const isCustom = useMediaQuery(\"(prefers-contrast: custom)\", options);\n return computed(() => {\n if (isMore.value)\n return \"more\";\n if (isLess.value)\n return \"less\";\n if (isCustom.value)\n return \"custom\";\n return \"no-preference\";\n });\n}\n\nfunction usePreferredLanguages(options = {}) {\n const { window = defaultWindow } = options;\n if (!window)\n return ref([\"en\"]);\n const navigator = window.navigator;\n const value = ref(navigator.languages);\n useEventListener(window, \"languagechange\", () => {\n value.value = navigator.languages;\n });\n return value;\n}\n\nfunction usePreferredReducedMotion(options) {\n const isReduced = useMediaQuery(\"(prefers-reduced-motion: reduce)\", options);\n return computed(() => {\n if (isReduced.value)\n return \"reduce\";\n return \"no-preference\";\n });\n}\n\nfunction usePrevious(value, initialValue) {\n const previous = shallowRef(initialValue);\n watch(\n toRef(value),\n (_, oldValue) => {\n previous.value = oldValue;\n },\n { flush: \"sync\" }\n );\n return readonly(previous);\n}\n\nfunction useScreenOrientation(options = {}) {\n const {\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"screen\" in window && \"orientation\" in window.screen);\n const screenOrientation = isSupported.value ? window.screen.orientation : {};\n const orientation = ref(screenOrientation.type);\n const angle = ref(screenOrientation.angle || 0);\n if (isSupported.value) {\n useEventListener(window, \"orientationchange\", () => {\n orientation.value = screenOrientation.type;\n angle.value = screenOrientation.angle;\n });\n }\n const lockOrientation = (type) => {\n if (!isSupported.value)\n return Promise.reject(new Error(\"Not supported\"));\n return screenOrientation.lock(type);\n };\n const unlockOrientation = () => {\n if (isSupported.value)\n screenOrientation.unlock();\n };\n return {\n isSupported,\n orientation,\n angle,\n lockOrientation,\n unlockOrientation\n };\n}\n\nconst topVarName = \"--vueuse-safe-area-top\";\nconst rightVarName = \"--vueuse-safe-area-right\";\nconst bottomVarName = \"--vueuse-safe-area-bottom\";\nconst leftVarName = \"--vueuse-safe-area-left\";\nfunction useScreenSafeArea() {\n const top = ref(\"\");\n const right = ref(\"\");\n const bottom = ref(\"\");\n const left = ref(\"\");\n if (isClient) {\n const topCssVar = useCssVar(topVarName);\n const rightCssVar = useCssVar(rightVarName);\n const bottomCssVar = useCssVar(bottomVarName);\n const leftCssVar = useCssVar(leftVarName);\n topCssVar.value = \"env(safe-area-inset-top, 0px)\";\n rightCssVar.value = \"env(safe-area-inset-right, 0px)\";\n bottomCssVar.value = \"env(safe-area-inset-bottom, 0px)\";\n leftCssVar.value = \"env(safe-area-inset-left, 0px)\";\n update();\n useEventListener(\"resize\", useDebounceFn(update));\n }\n function update() {\n top.value = getValue(topVarName);\n right.value = getValue(rightVarName);\n bottom.value = getValue(bottomVarName);\n left.value = getValue(leftVarName);\n }\n return {\n top,\n right,\n bottom,\n left,\n update\n };\n}\nfunction getValue(position) {\n return getComputedStyle(document.documentElement).getPropertyValue(position);\n}\n\nfunction useScriptTag(src, onLoaded = noop, options = {}) {\n const {\n immediate = true,\n manual = false,\n type = \"text/javascript\",\n async = true,\n crossOrigin,\n referrerPolicy,\n noModule,\n defer,\n document = defaultDocument,\n attrs = {}\n } = options;\n const scriptTag = ref(null);\n let _promise = null;\n const loadScript = (waitForScriptLoad) => new Promise((resolve, reject) => {\n const resolveWithElement = (el2) => {\n scriptTag.value = el2;\n resolve(el2);\n return el2;\n };\n if (!document) {\n resolve(false);\n return;\n }\n let shouldAppend = false;\n let el = document.querySelector(`script[src=\"${toValue(src)}\"]`);\n if (!el) {\n el = document.createElement(\"script\");\n el.type = type;\n el.async = async;\n el.src = toValue(src);\n if (defer)\n el.defer = defer;\n if (crossOrigin)\n el.crossOrigin = crossOrigin;\n if (noModule)\n el.noModule = noModule;\n if (referrerPolicy)\n el.referrerPolicy = referrerPolicy;\n Object.entries(attrs).forEach(([name, value]) => el == null ? void 0 : el.setAttribute(name, value));\n shouldAppend = true;\n } else if (el.hasAttribute(\"data-loaded\")) {\n resolveWithElement(el);\n }\n el.addEventListener(\"error\", (event) => reject(event));\n el.addEventListener(\"abort\", (event) => reject(event));\n el.addEventListener(\"load\", () => {\n el.setAttribute(\"data-loaded\", \"true\");\n onLoaded(el);\n resolveWithElement(el);\n });\n if (shouldAppend)\n el = document.head.appendChild(el);\n if (!waitForScriptLoad)\n resolveWithElement(el);\n });\n const load = (waitForScriptLoad = true) => {\n if (!_promise)\n _promise = loadScript(waitForScriptLoad);\n return _promise;\n };\n const unload = () => {\n if (!document)\n return;\n _promise = null;\n if (scriptTag.value)\n scriptTag.value = null;\n const el = document.querySelector(`script[src=\"${toValue(src)}\"]`);\n if (el)\n document.head.removeChild(el);\n };\n if (immediate && !manual)\n tryOnMounted(load);\n if (!manual)\n tryOnUnmounted(unload);\n return { scriptTag, load, unload };\n}\n\nfunction checkOverflowScroll(ele) {\n const style = window.getComputedStyle(ele);\n if (style.overflowX === \"scroll\" || style.overflowY === \"scroll\" || style.overflowX === \"auto\" && ele.clientWidth < ele.scrollWidth || style.overflowY === \"auto\" && ele.clientHeight < ele.scrollHeight) {\n return true;\n } else {\n const parent = ele.parentNode;\n if (!parent || parent.tagName === \"BODY\")\n return false;\n return checkOverflowScroll(parent);\n }\n}\nfunction preventDefault(rawEvent) {\n const e = rawEvent || window.event;\n const _target = e.target;\n if (checkOverflowScroll(_target))\n return false;\n if (e.touches.length > 1)\n return true;\n if (e.preventDefault)\n e.preventDefault();\n return false;\n}\nfunction useScrollLock(element, initialState = false) {\n const isLocked = ref(initialState);\n let stopTouchMoveListener = null;\n let initialOverflow;\n watch(toRef(element), (el) => {\n const target = resolveElement(toValue(el));\n if (target) {\n const ele = target;\n initialOverflow = ele.style.overflow;\n if (isLocked.value)\n ele.style.overflow = \"hidden\";\n }\n }, {\n immediate: true\n });\n const lock = () => {\n const el = resolveElement(toValue(element));\n if (!el || isLocked.value)\n return;\n if (isIOS) {\n stopTouchMoveListener = useEventListener(\n el,\n \"touchmove\",\n (e) => {\n preventDefault(e);\n },\n { passive: false }\n );\n }\n el.style.overflow = \"hidden\";\n isLocked.value = true;\n };\n const unlock = () => {\n const el = resolveElement(toValue(element));\n if (!el || !isLocked.value)\n return;\n isIOS && (stopTouchMoveListener == null ? void 0 : stopTouchMoveListener());\n el.style.overflow = initialOverflow;\n isLocked.value = false;\n };\n tryOnScopeDispose(unlock);\n return computed({\n get() {\n return isLocked.value;\n },\n set(v) {\n if (v)\n lock();\n else\n unlock();\n }\n });\n}\n\nfunction useSessionStorage(key, initialValue, options = {}) {\n const { window = defaultWindow } = options;\n return useStorage(key, initialValue, window == null ? void 0 : window.sessionStorage, options);\n}\n\nfunction useShare(shareOptions = {}, options = {}) {\n const { navigator = defaultNavigator } = options;\n const _navigator = navigator;\n const isSupported = useSupported(() => _navigator && \"canShare\" in _navigator);\n const share = async (overrideOptions = {}) => {\n if (isSupported.value) {\n const data = {\n ...toValue(shareOptions),\n ...toValue(overrideOptions)\n };\n let granted = true;\n if (data.files && _navigator.canShare)\n granted = _navigator.canShare({ files: data.files });\n if (granted)\n return _navigator.share(data);\n }\n };\n return {\n isSupported,\n share\n };\n}\n\nconst defaultSortFn = (source, compareFn) => source.sort(compareFn);\nconst defaultCompare = (a, b) => a - b;\nfunction useSorted(...args) {\n var _a, _b, _c, _d;\n const [source] = args;\n let compareFn = defaultCompare;\n let options = {};\n if (args.length === 2) {\n if (typeof args[1] === \"object\") {\n options = args[1];\n compareFn = (_a = options.compareFn) != null ? _a : defaultCompare;\n } else {\n compareFn = (_b = args[1]) != null ? _b : defaultCompare;\n }\n } else if (args.length > 2) {\n compareFn = (_c = args[1]) != null ? _c : defaultCompare;\n options = (_d = args[2]) != null ? _d : {};\n }\n const {\n dirty = false,\n sortFn = defaultSortFn\n } = options;\n if (!dirty)\n return computed(() => sortFn([...toValue(source)], compareFn));\n watchEffect(() => {\n const result = sortFn(toValue(source), compareFn);\n if (isRef(source))\n source.value = result;\n else\n source.splice(0, source.length, ...result);\n });\n return source;\n}\n\nfunction useSpeechRecognition(options = {}) {\n const {\n interimResults = true,\n continuous = true,\n window = defaultWindow\n } = options;\n const lang = toRef(options.lang || \"en-US\");\n const isListening = ref(false);\n const isFinal = ref(false);\n const result = ref(\"\");\n const error = shallowRef(void 0);\n const toggle = (value = !isListening.value) => {\n isListening.value = value;\n };\n const start = () => {\n isListening.value = true;\n };\n const stop = () => {\n isListening.value = false;\n };\n const SpeechRecognition = window && (window.SpeechRecognition || window.webkitSpeechRecognition);\n const isSupported = useSupported(() => SpeechRecognition);\n let recognition;\n if (isSupported.value) {\n recognition = new SpeechRecognition();\n recognition.continuous = continuous;\n recognition.interimResults = interimResults;\n recognition.lang = toValue(lang);\n recognition.onstart = () => {\n isFinal.value = false;\n };\n watch(lang, (lang2) => {\n if (recognition && !isListening.value)\n recognition.lang = lang2;\n });\n recognition.onresult = (event) => {\n const transcript = Array.from(event.results).map((result2) => {\n isFinal.value = result2.isFinal;\n return result2[0];\n }).map((result2) => result2.transcript).join(\"\");\n result.value = transcript;\n error.value = void 0;\n };\n recognition.onerror = (event) => {\n error.value = event;\n };\n recognition.onend = () => {\n isListening.value = false;\n recognition.lang = toValue(lang);\n };\n watch(isListening, () => {\n if (isListening.value)\n recognition.start();\n else\n recognition.stop();\n });\n }\n tryOnScopeDispose(() => {\n isListening.value = false;\n });\n return {\n isSupported,\n isListening,\n isFinal,\n recognition,\n result,\n error,\n toggle,\n start,\n stop\n };\n}\n\nfunction useSpeechSynthesis(text, options = {}) {\n const {\n pitch = 1,\n rate = 1,\n volume = 1,\n window = defaultWindow\n } = options;\n const synth = window && window.speechSynthesis;\n const isSupported = useSupported(() => synth);\n const isPlaying = ref(false);\n const status = ref(\"init\");\n const spokenText = toRef(text || \"\");\n const lang = toRef(options.lang || \"en-US\");\n const error = shallowRef(void 0);\n const toggle = (value = !isPlaying.value) => {\n isPlaying.value = value;\n };\n const bindEventsForUtterance = (utterance2) => {\n utterance2.lang = toValue(lang);\n utterance2.voice = toValue(options.voice) || null;\n utterance2.pitch = toValue(pitch);\n utterance2.rate = toValue(rate);\n utterance2.volume = volume;\n utterance2.onstart = () => {\n isPlaying.value = true;\n status.value = \"play\";\n };\n utterance2.onpause = () => {\n isPlaying.value = false;\n status.value = \"pause\";\n };\n utterance2.onresume = () => {\n isPlaying.value = true;\n status.value = \"play\";\n };\n utterance2.onend = () => {\n isPlaying.value = false;\n status.value = \"end\";\n };\n utterance2.onerror = (event) => {\n error.value = event;\n };\n };\n const utterance = computed(() => {\n isPlaying.value = false;\n status.value = \"init\";\n const newUtterance = new SpeechSynthesisUtterance(spokenText.value);\n bindEventsForUtterance(newUtterance);\n return newUtterance;\n });\n const speak = () => {\n synth.cancel();\n utterance && synth.speak(utterance.value);\n };\n const stop = () => {\n synth.cancel();\n isPlaying.value = false;\n };\n if (isSupported.value) {\n bindEventsForUtterance(utterance.value);\n watch(lang, (lang2) => {\n if (utterance.value && !isPlaying.value)\n utterance.value.lang = lang2;\n });\n if (options.voice) {\n watch(options.voice, () => {\n synth.cancel();\n });\n }\n watch(isPlaying, () => {\n if (isPlaying.value)\n synth.resume();\n else\n synth.pause();\n });\n }\n tryOnScopeDispose(() => {\n isPlaying.value = false;\n });\n return {\n isSupported,\n isPlaying,\n status,\n utterance,\n error,\n stop,\n toggle,\n speak\n };\n}\n\nfunction useStepper(steps, initialStep) {\n const stepsRef = ref(steps);\n const stepNames = computed(() => Array.isArray(stepsRef.value) ? stepsRef.value : Object.keys(stepsRef.value));\n const index = ref(stepNames.value.indexOf(initialStep != null ? initialStep : stepNames.value[0]));\n const current = computed(() => at(index.value));\n const isFirst = computed(() => index.value === 0);\n const isLast = computed(() => index.value === stepNames.value.length - 1);\n const next = computed(() => stepNames.value[index.value + 1]);\n const previous = computed(() => stepNames.value[index.value - 1]);\n function at(index2) {\n if (Array.isArray(stepsRef.value))\n return stepsRef.value[index2];\n return stepsRef.value[stepNames.value[index2]];\n }\n function get(step) {\n if (!stepNames.value.includes(step))\n return;\n return at(stepNames.value.indexOf(step));\n }\n function goTo(step) {\n if (stepNames.value.includes(step))\n index.value = stepNames.value.indexOf(step);\n }\n function goToNext() {\n if (isLast.value)\n return;\n index.value++;\n }\n function goToPrevious() {\n if (isFirst.value)\n return;\n index.value--;\n }\n function goBackTo(step) {\n if (isAfter(step))\n goTo(step);\n }\n function isNext(step) {\n return stepNames.value.indexOf(step) === index.value + 1;\n }\n function isPrevious(step) {\n return stepNames.value.indexOf(step) === index.value - 1;\n }\n function isCurrent(step) {\n return stepNames.value.indexOf(step) === index.value;\n }\n function isBefore(step) {\n return index.value < stepNames.value.indexOf(step);\n }\n function isAfter(step) {\n return index.value > stepNames.value.indexOf(step);\n }\n return {\n steps: stepsRef,\n stepNames,\n index,\n current,\n next,\n previous,\n isFirst,\n isLast,\n at,\n get,\n goTo,\n goToNext,\n goToPrevious,\n goBackTo,\n isNext,\n isPrevious,\n isCurrent,\n isBefore,\n isAfter\n };\n}\n\nfunction useStorageAsync(key, initialValue, storage, options = {}) {\n var _a;\n const {\n flush = \"pre\",\n deep = true,\n listenToStorageChanges = true,\n writeDefaults = true,\n mergeDefaults = false,\n shallow,\n window = defaultWindow,\n eventFilter,\n onError = (e) => {\n console.error(e);\n }\n } = options;\n const rawInit = toValue(initialValue);\n const type = guessSerializerType(rawInit);\n const data = (shallow ? shallowRef : ref)(initialValue);\n const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n if (!storage) {\n try {\n storage = getSSRHandler(\"getDefaultStorage\", () => {\n var _a2;\n return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n })();\n } catch (e) {\n onError(e);\n }\n }\n async function read(event) {\n if (!storage || event && event.key !== key)\n return;\n try {\n const rawValue = event ? event.newValue : await storage.getItem(key);\n if (rawValue == null) {\n data.value = rawInit;\n if (writeDefaults && rawInit !== null)\n await storage.setItem(key, await serializer.write(rawInit));\n } else if (mergeDefaults) {\n const value = await serializer.read(rawValue);\n if (typeof mergeDefaults === \"function\")\n data.value = mergeDefaults(value, rawInit);\n else if (type === \"object\" && !Array.isArray(value))\n data.value = { ...rawInit, ...value };\n else\n data.value = value;\n } else {\n data.value = await serializer.read(rawValue);\n }\n } catch (e) {\n onError(e);\n }\n }\n read();\n if (window && listenToStorageChanges)\n useEventListener(window, \"storage\", (e) => Promise.resolve().then(() => read(e)));\n if (storage) {\n watchWithFilter(\n data,\n async () => {\n try {\n if (data.value == null)\n await storage.removeItem(key);\n else\n await storage.setItem(key, await serializer.write(data.value));\n } catch (e) {\n onError(e);\n }\n },\n {\n flush,\n deep,\n eventFilter\n }\n );\n }\n return data;\n}\n\nlet _id = 0;\nfunction useStyleTag(css, options = {}) {\n const isLoaded = ref(false);\n const {\n document = defaultDocument,\n immediate = true,\n manual = false,\n id = `vueuse_styletag_${++_id}`\n } = options;\n const cssRef = ref(css);\n let stop = () => {\n };\n const load = () => {\n if (!document)\n return;\n const el = document.getElementById(id) || document.createElement(\"style\");\n if (!el.isConnected) {\n el.id = id;\n if (options.media)\n el.media = options.media;\n document.head.appendChild(el);\n }\n if (isLoaded.value)\n return;\n stop = watch(\n cssRef,\n (value) => {\n el.textContent = value;\n },\n { immediate: true }\n );\n isLoaded.value = true;\n };\n const unload = () => {\n if (!document || !isLoaded.value)\n return;\n stop();\n document.head.removeChild(document.getElementById(id));\n isLoaded.value = false;\n };\n if (immediate && !manual)\n tryOnMounted(load);\n if (!manual)\n tryOnScopeDispose(unload);\n return {\n id,\n css: cssRef,\n unload,\n load,\n isLoaded: readonly(isLoaded)\n };\n}\n\nfunction useSwipe(target, options = {}) {\n const {\n threshold = 50,\n onSwipe,\n onSwipeEnd,\n onSwipeStart,\n passive = true,\n window = defaultWindow\n } = options;\n const coordsStart = reactive({ x: 0, y: 0 });\n const coordsEnd = reactive({ x: 0, y: 0 });\n const diffX = computed(() => coordsStart.x - coordsEnd.x);\n const diffY = computed(() => coordsStart.y - coordsEnd.y);\n const { max, abs } = Math;\n const isThresholdExceeded = computed(() => max(abs(diffX.value), abs(diffY.value)) >= threshold);\n const isSwiping = ref(false);\n const direction = computed(() => {\n if (!isThresholdExceeded.value)\n return \"none\";\n if (abs(diffX.value) > abs(diffY.value)) {\n return diffX.value > 0 ? \"left\" : \"right\";\n } else {\n return diffY.value > 0 ? \"up\" : \"down\";\n }\n });\n const getTouchEventCoords = (e) => [e.touches[0].clientX, e.touches[0].clientY];\n const updateCoordsStart = (x, y) => {\n coordsStart.x = x;\n coordsStart.y = y;\n };\n const updateCoordsEnd = (x, y) => {\n coordsEnd.x = x;\n coordsEnd.y = y;\n };\n let listenerOptions;\n const isPassiveEventSupported = checkPassiveEventSupport(window == null ? void 0 : window.document);\n if (!passive)\n listenerOptions = isPassiveEventSupported ? { passive: false, capture: true } : { capture: true };\n else\n listenerOptions = isPassiveEventSupported ? { passive: true } : { capture: false };\n const onTouchEnd = (e) => {\n if (isSwiping.value)\n onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n isSwiping.value = false;\n };\n const stops = [\n useEventListener(target, \"touchstart\", (e) => {\n if (e.touches.length !== 1)\n return;\n if (listenerOptions.capture && !listenerOptions.passive)\n e.preventDefault();\n const [x, y] = getTouchEventCoords(e);\n updateCoordsStart(x, y);\n updateCoordsEnd(x, y);\n onSwipeStart == null ? void 0 : onSwipeStart(e);\n }, listenerOptions),\n useEventListener(target, \"touchmove\", (e) => {\n if (e.touches.length !== 1)\n return;\n const [x, y] = getTouchEventCoords(e);\n updateCoordsEnd(x, y);\n if (!isSwiping.value && isThresholdExceeded.value)\n isSwiping.value = true;\n if (isSwiping.value)\n onSwipe == null ? void 0 : onSwipe(e);\n }, listenerOptions),\n useEventListener(target, [\"touchend\", \"touchcancel\"], onTouchEnd, listenerOptions)\n ];\n const stop = () => stops.forEach((s) => s());\n return {\n isPassiveEventSupported,\n isSwiping,\n direction,\n coordsStart,\n coordsEnd,\n lengthX: diffX,\n lengthY: diffY,\n stop\n };\n}\nfunction checkPassiveEventSupport(document) {\n if (!document)\n return false;\n let supportsPassive = false;\n const optionsBlock = {\n get passive() {\n supportsPassive = true;\n return false;\n }\n };\n document.addEventListener(\"x\", noop, optionsBlock);\n document.removeEventListener(\"x\", noop);\n return supportsPassive;\n}\n\nfunction useTemplateRefsList() {\n const refs = ref([]);\n refs.value.set = (el) => {\n if (el)\n refs.value.push(el);\n };\n onBeforeUpdate(() => {\n refs.value.length = 0;\n });\n return refs;\n}\n\nfunction useTextDirection(options = {}) {\n const {\n document = defaultDocument,\n selector = \"html\",\n observe = false,\n initialValue = \"ltr\"\n } = options;\n function getValue() {\n var _a, _b;\n return (_b = (_a = document == null ? void 0 : document.querySelector(selector)) == null ? void 0 : _a.getAttribute(\"dir\")) != null ? _b : initialValue;\n }\n const dir = ref(getValue());\n tryOnMounted(() => dir.value = getValue());\n if (observe && document) {\n useMutationObserver(\n document.querySelector(selector),\n () => dir.value = getValue(),\n { attributes: true }\n );\n }\n return computed({\n get() {\n return dir.value;\n },\n set(v) {\n var _a, _b;\n dir.value = v;\n if (!document)\n return;\n if (dir.value)\n (_a = document.querySelector(selector)) == null ? void 0 : _a.setAttribute(\"dir\", dir.value);\n else\n (_b = document.querySelector(selector)) == null ? void 0 : _b.removeAttribute(\"dir\");\n }\n });\n}\n\nfunction getRangesFromSelection(selection) {\n var _a;\n const rangeCount = (_a = selection.rangeCount) != null ? _a : 0;\n return Array.from({ length: rangeCount }, (_, i) => selection.getRangeAt(i));\n}\nfunction useTextSelection(options = {}) {\n const {\n window = defaultWindow\n } = options;\n const selection = ref(null);\n const text = computed(() => {\n var _a, _b;\n return (_b = (_a = selection.value) == null ? void 0 : _a.toString()) != null ? _b : \"\";\n });\n const ranges = computed(() => selection.value ? getRangesFromSelection(selection.value) : []);\n const rects = computed(() => ranges.value.map((range) => range.getBoundingClientRect()));\n function onSelectionChange() {\n selection.value = null;\n if (window)\n selection.value = window.getSelection();\n }\n if (window)\n useEventListener(window.document, \"selectionchange\", onSelectionChange);\n return {\n text,\n rects,\n ranges,\n selection\n };\n}\n\nfunction useTextareaAutosize(options) {\n const textarea = ref(options == null ? void 0 : options.element);\n const input = ref(options == null ? void 0 : options.input);\n const textareaScrollHeight = ref(1);\n function triggerResize() {\n var _a, _b;\n if (!textarea.value)\n return;\n let height = \"\";\n textarea.value.style.height = \"1px\";\n textareaScrollHeight.value = (_a = textarea.value) == null ? void 0 : _a.scrollHeight;\n if (options == null ? void 0 : options.styleTarget)\n toValue(options.styleTarget).style.height = `${textareaScrollHeight.value}px`;\n else\n height = `${textareaScrollHeight.value}px`;\n textarea.value.style.height = height;\n (_b = options == null ? void 0 : options.onResize) == null ? void 0 : _b.call(options);\n }\n watch([input, textarea], () => nextTick(triggerResize), { immediate: true });\n useResizeObserver(textarea, () => triggerResize());\n if (options == null ? void 0 : options.watch)\n watch(options.watch, triggerResize, { immediate: true, deep: true });\n return {\n textarea,\n input,\n triggerResize\n };\n}\n\nfunction useThrottledRefHistory(source, options = {}) {\n const { throttle = 200, trailing = true } = options;\n const filter = throttleFilter(throttle, trailing);\n const history = useRefHistory(source, { ...options, eventFilter: filter });\n return {\n ...history\n };\n}\n\nconst DEFAULT_UNITS = [\n { max: 6e4, value: 1e3, name: \"second\" },\n { max: 276e4, value: 6e4, name: \"minute\" },\n { max: 72e6, value: 36e5, name: \"hour\" },\n { max: 5184e5, value: 864e5, name: \"day\" },\n { max: 24192e5, value: 6048e5, name: \"week\" },\n { max: 28512e6, value: 2592e6, name: \"month\" },\n { max: Number.POSITIVE_INFINITY, value: 31536e6, name: \"year\" }\n];\nconst DEFAULT_MESSAGES = {\n justNow: \"just now\",\n past: (n) => n.match(/\\d/) ? `${n} ago` : n,\n future: (n) => n.match(/\\d/) ? `in ${n}` : n,\n month: (n, past) => n === 1 ? past ? \"last month\" : \"next month\" : `${n} month${n > 1 ? \"s\" : \"\"}`,\n year: (n, past) => n === 1 ? past ? \"last year\" : \"next year\" : `${n} year${n > 1 ? \"s\" : \"\"}`,\n day: (n, past) => n === 1 ? past ? \"yesterday\" : \"tomorrow\" : `${n} day${n > 1 ? \"s\" : \"\"}`,\n week: (n, past) => n === 1 ? past ? \"last week\" : \"next week\" : `${n} week${n > 1 ? \"s\" : \"\"}`,\n hour: (n) => `${n} hour${n > 1 ? \"s\" : \"\"}`,\n minute: (n) => `${n} minute${n > 1 ? \"s\" : \"\"}`,\n second: (n) => `${n} second${n > 1 ? \"s\" : \"\"}`,\n invalid: \"\"\n};\nfunction DEFAULT_FORMATTER(date) {\n return date.toISOString().slice(0, 10);\n}\nfunction useTimeAgo(time, options = {}) {\n const {\n controls: exposeControls = false,\n updateInterval = 3e4\n } = options;\n const { now, ...controls } = useNow({ interval: updateInterval, controls: true });\n const timeAgo = computed(() => formatTimeAgo(new Date(toValue(time)), options, toValue(now)));\n if (exposeControls) {\n return {\n timeAgo,\n ...controls\n };\n } else {\n return timeAgo;\n }\n}\nfunction formatTimeAgo(from, options = {}, now = Date.now()) {\n var _a;\n const {\n max,\n messages = DEFAULT_MESSAGES,\n fullDateFormatter = DEFAULT_FORMATTER,\n units = DEFAULT_UNITS,\n showSecond = false,\n rounding = \"round\"\n } = options;\n const roundFn = typeof rounding === \"number\" ? (n) => +n.toFixed(rounding) : Math[rounding];\n const diff = +now - +from;\n const absDiff = Math.abs(diff);\n function getValue(diff2, unit) {\n return roundFn(Math.abs(diff2) / unit.value);\n }\n function format(diff2, unit) {\n const val = getValue(diff2, unit);\n const past = diff2 > 0;\n const str = applyFormat(unit.name, val, past);\n return applyFormat(past ? \"past\" : \"future\", str, past);\n }\n function applyFormat(name, val, isPast) {\n const formatter = messages[name];\n if (typeof formatter === \"function\")\n return formatter(val, isPast);\n return formatter.replace(\"{0}\", val.toString());\n }\n if (absDiff < 6e4 && !showSecond)\n return messages.justNow;\n if (typeof max === \"number\" && absDiff > max)\n return fullDateFormatter(new Date(from));\n if (typeof max === \"string\") {\n const unitMax = (_a = units.find((i) => i.name === max)) == null ? void 0 : _a.max;\n if (unitMax && absDiff > unitMax)\n return fullDateFormatter(new Date(from));\n }\n for (const [idx, unit] of units.entries()) {\n const val = getValue(diff, unit);\n if (val <= 0 && units[idx - 1])\n return format(diff, units[idx - 1]);\n if (absDiff < unit.max)\n return format(diff, unit);\n }\n return messages.invalid;\n}\n\nfunction useTimeoutPoll(fn, interval, timeoutPollOptions) {\n const { start } = useTimeoutFn(loop, interval, { immediate: false });\n const isActive = ref(false);\n async function loop() {\n if (!isActive.value)\n return;\n await fn();\n start();\n }\n function resume() {\n if (!isActive.value) {\n isActive.value = true;\n loop();\n }\n }\n function pause() {\n isActive.value = false;\n }\n if (timeoutPollOptions == null ? void 0 : timeoutPollOptions.immediate)\n resume();\n tryOnScopeDispose(pause);\n return {\n isActive,\n pause,\n resume\n };\n}\n\nfunction useTimestamp(options = {}) {\n const {\n controls: exposeControls = false,\n offset = 0,\n immediate = true,\n interval = \"requestAnimationFrame\",\n callback\n } = options;\n const ts = ref(timestamp() + offset);\n const update = () => ts.value = timestamp() + offset;\n const cb = callback ? () => {\n update();\n callback(ts.value);\n } : update;\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate });\n if (exposeControls) {\n return {\n timestamp: ts,\n ...controls\n };\n } else {\n return ts;\n }\n}\n\nfunction useTitle(newTitle = null, options = {}) {\n var _a, _b;\n const {\n document = defaultDocument\n } = options;\n const title = toRef((_a = newTitle != null ? newTitle : document == null ? void 0 : document.title) != null ? _a : null);\n const isReadonly = newTitle && typeof newTitle === \"function\";\n function format(t) {\n if (!(\"titleTemplate\" in options))\n return t;\n const template = options.titleTemplate || \"%s\";\n return typeof template === \"function\" ? template(t) : toValue(template).replace(/%s/g, t);\n }\n watch(\n title,\n (t, o) => {\n if (t !== o && document)\n document.title = format(typeof t === \"string\" ? t : \"\");\n },\n { immediate: true }\n );\n if (options.observe && !options.titleTemplate && document && !isReadonly) {\n useMutationObserver(\n (_b = document.head) == null ? void 0 : _b.querySelector(\"title\"),\n () => {\n if (document && document.title !== title.value)\n title.value = format(document.title);\n },\n { childList: true }\n );\n }\n return title;\n}\n\nconst _TransitionPresets = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nconst TransitionPresets = /* @__PURE__ */ Object.assign({}, { linear: identity }, _TransitionPresets);\nfunction createEasingFunction([p0, p1, p2, p3]) {\n const a = (a1, a2) => 1 - 3 * a2 + 3 * a1;\n const b = (a1, a2) => 3 * a2 - 6 * a1;\n const c = (a1) => 3 * a1;\n const calcBezier = (t, a1, a2) => ((a(a1, a2) * t + b(a1, a2)) * t + c(a1)) * t;\n const getSlope = (t, a1, a2) => 3 * a(a1, a2) * t * t + 2 * b(a1, a2) * t + c(a1);\n const getTforX = (x) => {\n let aGuessT = x;\n for (let i = 0; i < 4; ++i) {\n const currentSlope = getSlope(aGuessT, p0, p2);\n if (currentSlope === 0)\n return aGuessT;\n const currentX = calcBezier(aGuessT, p0, p2) - x;\n aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n };\n return (x) => p0 === p1 && p2 === p3 ? x : calcBezier(getTforX(x), p1, p3);\n}\nfunction lerp(a, b, alpha) {\n return a + alpha * (b - a);\n}\nfunction toVec(t) {\n return (typeof t === \"number\" ? [t] : t) || [];\n}\nfunction executeTransition(source, from, to, options = {}) {\n var _a, _b;\n const fromVal = toValue(from);\n const toVal = toValue(to);\n const v1 = toVec(fromVal);\n const v2 = toVec(toVal);\n const duration = (_a = toValue(options.duration)) != null ? _a : 1e3;\n const startedAt = Date.now();\n const endAt = Date.now() + duration;\n const trans = typeof options.transition === \"function\" ? options.transition : (_b = toValue(options.transition)) != null ? _b : identity;\n const ease = typeof trans === \"function\" ? trans : createEasingFunction(trans);\n return new Promise((resolve) => {\n source.value = fromVal;\n const tick = () => {\n var _a2;\n if ((_a2 = options.abort) == null ? void 0 : _a2.call(options)) {\n resolve();\n return;\n }\n const now = Date.now();\n const alpha = ease((now - startedAt) / duration);\n const arr = toVec(source.value).map((n, i) => lerp(v1[i], v2[i], alpha));\n if (Array.isArray(source.value))\n source.value = arr.map((n, i) => {\n var _a3, _b2;\n return lerp((_a3 = v1[i]) != null ? _a3 : 0, (_b2 = v2[i]) != null ? _b2 : 0, alpha);\n });\n else if (typeof source.value === \"number\")\n source.value = arr[0];\n if (now < endAt) {\n requestAnimationFrame(tick);\n } else {\n source.value = toVal;\n resolve();\n }\n };\n tick();\n });\n}\nfunction useTransition(source, options = {}) {\n let currentId = 0;\n const sourceVal = () => {\n const v = toValue(source);\n return typeof v === \"number\" ? v : v.map(toValue);\n };\n const outputRef = ref(sourceVal());\n watch(sourceVal, async (to) => {\n var _a, _b;\n if (toValue(options.disabled))\n return;\n const id = ++currentId;\n if (options.delay)\n await promiseTimeout(toValue(options.delay));\n if (id !== currentId)\n return;\n const toVal = Array.isArray(to) ? to.map(toValue) : toValue(to);\n (_a = options.onStarted) == null ? void 0 : _a.call(options);\n await executeTransition(outputRef, outputRef.value, toVal, {\n ...options,\n abort: () => {\n var _a2;\n return id !== currentId || ((_a2 = options.abort) == null ? void 0 : _a2.call(options));\n }\n });\n (_b = options.onFinished) == null ? void 0 : _b.call(options);\n }, { deep: true });\n watch(() => toValue(options.disabled), (disabled) => {\n if (disabled) {\n currentId++;\n outputRef.value = sourceVal();\n }\n });\n tryOnScopeDispose(() => {\n currentId++;\n });\n return computed(() => toValue(options.disabled) ? sourceVal() : outputRef.value);\n}\n\nfunction useUrlSearchParams(mode = \"history\", options = {}) {\n const {\n initialValue = {},\n removeNullishValues = true,\n removeFalsyValues = false,\n write: enableWrite = true,\n window = defaultWindow\n } = options;\n if (!window)\n return reactive(initialValue);\n const state = reactive({});\n function getRawParams() {\n if (mode === \"history\") {\n return window.location.search || \"\";\n } else if (mode === \"hash\") {\n const hash = window.location.hash || \"\";\n const index = hash.indexOf(\"?\");\n return index > 0 ? hash.slice(index) : \"\";\n } else {\n return (window.location.hash || \"\").replace(/^#/, \"\");\n }\n }\n function constructQuery(params) {\n const stringified = params.toString();\n if (mode === \"history\")\n return `${stringified ? `?${stringified}` : \"\"}${window.location.hash || \"\"}`;\n if (mode === \"hash-params\")\n return `${window.location.search || \"\"}${stringified ? `#${stringified}` : \"\"}`;\n const hash = window.location.hash || \"#\";\n const index = hash.indexOf(\"?\");\n if (index > 0)\n return `${hash.slice(0, index)}${stringified ? `?${stringified}` : \"\"}`;\n return `${hash}${stringified ? `?${stringified}` : \"\"}`;\n }\n function read() {\n return new URLSearchParams(getRawParams());\n }\n function updateState(params) {\n const unusedKeys = new Set(Object.keys(state));\n for (const key of params.keys()) {\n const paramsForKey = params.getAll(key);\n state[key] = paramsForKey.length > 1 ? paramsForKey : params.get(key) || \"\";\n unusedKeys.delete(key);\n }\n Array.from(unusedKeys).forEach((key) => delete state[key]);\n }\n const { pause, resume } = pausableWatch(\n state,\n () => {\n const params = new URLSearchParams(\"\");\n Object.keys(state).forEach((key) => {\n const mapEntry = state[key];\n if (Array.isArray(mapEntry))\n mapEntry.forEach((value) => params.append(key, value));\n else if (removeNullishValues && mapEntry == null)\n params.delete(key);\n else if (removeFalsyValues && !mapEntry)\n params.delete(key);\n else\n params.set(key, mapEntry);\n });\n write(params);\n },\n { deep: true }\n );\n function write(params, shouldUpdate) {\n pause();\n if (shouldUpdate)\n updateState(params);\n window.history.replaceState(\n window.history.state,\n window.document.title,\n window.location.pathname + constructQuery(params)\n );\n resume();\n }\n function onChanged() {\n if (!enableWrite)\n return;\n write(read(), true);\n }\n useEventListener(window, \"popstate\", onChanged, false);\n if (mode !== \"history\")\n useEventListener(window, \"hashchange\", onChanged, false);\n const initial = read();\n if (initial.keys().next().value)\n updateState(initial);\n else\n Object.assign(state, initialValue);\n return state;\n}\n\nfunction useUserMedia(options = {}) {\n var _a, _b;\n const enabled = ref((_a = options.enabled) != null ? _a : false);\n const autoSwitch = ref((_b = options.autoSwitch) != null ? _b : true);\n const constraints = ref(options.constraints);\n const { navigator = defaultNavigator } = options;\n const isSupported = useSupported(() => {\n var _a2;\n return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getUserMedia;\n });\n const stream = shallowRef();\n function getDeviceOptions(type) {\n switch (type) {\n case \"video\": {\n if (constraints.value)\n return constraints.value.video || false;\n break;\n }\n case \"audio\": {\n if (constraints.value)\n return constraints.value.audio || false;\n break;\n }\n }\n }\n async function _start() {\n if (!isSupported.value || stream.value)\n return;\n stream.value = await navigator.mediaDevices.getUserMedia({\n video: getDeviceOptions(\"video\"),\n audio: getDeviceOptions(\"audio\")\n });\n return stream.value;\n }\n function _stop() {\n var _a2;\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n stream.value = void 0;\n }\n function stop() {\n _stop();\n enabled.value = false;\n }\n async function start() {\n await _start();\n if (stream.value)\n enabled.value = true;\n return stream.value;\n }\n async function restart() {\n _stop();\n return await start();\n }\n watch(\n enabled,\n (v) => {\n if (v)\n _start();\n else\n _stop();\n },\n { immediate: true }\n );\n watch(\n constraints,\n () => {\n if (autoSwitch.value && stream.value)\n restart();\n },\n { immediate: true }\n );\n return {\n isSupported,\n stream,\n start,\n stop,\n restart,\n constraints,\n enabled,\n autoSwitch\n };\n}\n\nfunction useVModel(props, key, emit, options = {}) {\n var _a, _b, _c, _d, _e;\n const {\n clone = false,\n passive = false,\n eventName,\n deep = false,\n defaultValue,\n shouldEmit\n } = options;\n const vm = getCurrentInstance();\n const _emit = emit || (vm == null ? void 0 : vm.emit) || ((_a = vm == null ? void 0 : vm.$emit) == null ? void 0 : _a.bind(vm)) || ((_c = (_b = vm == null ? void 0 : vm.proxy) == null ? void 0 : _b.$emit) == null ? void 0 : _c.bind(vm == null ? void 0 : vm.proxy));\n let event = eventName;\n if (!key) {\n if (isVue2) {\n const modelOptions = (_e = (_d = vm == null ? void 0 : vm.proxy) == null ? void 0 : _d.$options) == null ? void 0 : _e.model;\n key = (modelOptions == null ? void 0 : modelOptions.value) || \"value\";\n if (!eventName)\n event = (modelOptions == null ? void 0 : modelOptions.event) || \"input\";\n } else {\n key = \"modelValue\";\n }\n }\n event = event || `update:${key.toString()}`;\n const cloneFn = (val) => !clone ? val : typeof clone === \"function\" ? clone(val) : cloneFnJSON(val);\n const getValue = () => isDef(props[key]) ? cloneFn(props[key]) : defaultValue;\n const triggerEmit = (value) => {\n if (shouldEmit) {\n if (shouldEmit(value))\n _emit(event, value);\n } else {\n _emit(event, value);\n }\n };\n if (passive) {\n const initialValue = getValue();\n const proxy = ref(initialValue);\n let isUpdating = false;\n watch(\n () => props[key],\n (v) => {\n if (!isUpdating) {\n isUpdating = true;\n proxy.value = cloneFn(v);\n nextTick(() => isUpdating = false);\n }\n }\n );\n watch(\n proxy,\n (v) => {\n if (!isUpdating && (v !== props[key] || deep))\n triggerEmit(v);\n },\n { deep }\n );\n return proxy;\n } else {\n return computed({\n get() {\n return getValue();\n },\n set(value) {\n triggerEmit(value);\n }\n });\n }\n}\n\nfunction useVModels(props, emit, options = {}) {\n const ret = {};\n for (const key in props) {\n ret[key] = useVModel(\n props,\n key,\n emit,\n options\n );\n }\n return ret;\n}\n\nfunction useVibrate(options) {\n const {\n pattern = [],\n interval = 0,\n navigator = defaultNavigator\n } = options || {};\n const isSupported = useSupported(() => typeof navigator !== \"undefined\" && \"vibrate\" in navigator);\n const patternRef = toRef(pattern);\n let intervalControls;\n const vibrate = (pattern2 = patternRef.value) => {\n if (isSupported.value)\n navigator.vibrate(pattern2);\n };\n const stop = () => {\n if (isSupported.value)\n navigator.vibrate(0);\n intervalControls == null ? void 0 : intervalControls.pause();\n };\n if (interval > 0) {\n intervalControls = useIntervalFn(\n vibrate,\n interval,\n {\n immediate: false,\n immediateCallback: false\n }\n );\n }\n return {\n isSupported,\n pattern,\n intervalControls,\n vibrate,\n stop\n };\n}\n\nfunction useVirtualList(list, options) {\n const { containerStyle, wrapperProps, scrollTo, calculateRange, currentList, containerRef } = \"itemHeight\" in options ? useVerticalVirtualList(options, list) : useHorizontalVirtualList(options, list);\n return {\n list: currentList,\n scrollTo,\n containerProps: {\n ref: containerRef,\n onScroll: () => {\n calculateRange();\n },\n style: containerStyle\n },\n wrapperProps\n };\n}\nfunction useVirtualListResources(list) {\n const containerRef = ref(null);\n const size = useElementSize(containerRef);\n const currentList = ref([]);\n const source = shallowRef(list);\n const state = ref({ start: 0, end: 10 });\n return { state, source, currentList, size, containerRef };\n}\nfunction createGetViewCapacity(state, source, itemSize) {\n return (containerSize) => {\n if (typeof itemSize === \"number\")\n return Math.ceil(containerSize / itemSize);\n const { start = 0 } = state.value;\n let sum = 0;\n let capacity = 0;\n for (let i = start; i < source.value.length; i++) {\n const size = itemSize(i);\n sum += size;\n capacity = i;\n if (sum > containerSize)\n break;\n }\n return capacity - start;\n };\n}\nfunction createGetOffset(source, itemSize) {\n return (scrollDirection) => {\n if (typeof itemSize === \"number\")\n return Math.floor(scrollDirection / itemSize) + 1;\n let sum = 0;\n let offset = 0;\n for (let i = 0; i < source.value.length; i++) {\n const size = itemSize(i);\n sum += size;\n if (sum >= scrollDirection) {\n offset = i;\n break;\n }\n }\n return offset + 1;\n };\n}\nfunction createCalculateRange(type, overscan, getOffset, getViewCapacity, { containerRef, state, currentList, source }) {\n return () => {\n const element = containerRef.value;\n if (element) {\n const offset = getOffset(type === \"vertical\" ? element.scrollTop : element.scrollLeft);\n const viewCapacity = getViewCapacity(type === \"vertical\" ? element.clientHeight : element.clientWidth);\n const from = offset - overscan;\n const to = offset + viewCapacity + overscan;\n state.value = {\n start: from < 0 ? 0 : from,\n end: to > source.value.length ? source.value.length : to\n };\n currentList.value = source.value.slice(state.value.start, state.value.end).map((ele, index) => ({\n data: ele,\n index: index + state.value.start\n }));\n }\n };\n}\nfunction createGetDistance(itemSize, source) {\n return (index) => {\n if (typeof itemSize === \"number\") {\n const size2 = index * itemSize;\n return size2;\n }\n const size = source.value.slice(0, index).reduce((sum, _, i) => sum + itemSize(i), 0);\n return size;\n };\n}\nfunction useWatchForSizes(size, list, calculateRange) {\n watch([size.width, size.height, list], () => {\n calculateRange();\n });\n}\nfunction createComputedTotalSize(itemSize, source) {\n return computed(() => {\n if (typeof itemSize === \"number\")\n return source.value.length * itemSize;\n return source.value.reduce((sum, _, index) => sum + itemSize(index), 0);\n });\n}\nconst scrollToDictionaryForElementScrollKey = {\n horizontal: \"scrollLeft\",\n vertical: \"scrollTop\"\n};\nfunction createScrollTo(type, calculateRange, getDistance, containerRef) {\n return (index) => {\n if (containerRef.value) {\n containerRef.value[scrollToDictionaryForElementScrollKey[type]] = getDistance(index);\n calculateRange();\n }\n };\n}\nfunction useHorizontalVirtualList(options, list) {\n const resources = useVirtualListResources(list);\n const { state, source, currentList, size, containerRef } = resources;\n const containerStyle = { overflowX: \"auto\" };\n const { itemWidth, overscan = 5 } = options;\n const getViewCapacity = createGetViewCapacity(state, source, itemWidth);\n const getOffset = createGetOffset(source, itemWidth);\n const calculateRange = createCalculateRange(\"horizontal\", overscan, getOffset, getViewCapacity, resources);\n const getDistanceLeft = createGetDistance(itemWidth, source);\n const offsetLeft = computed(() => getDistanceLeft(state.value.start));\n const totalWidth = createComputedTotalSize(itemWidth, source);\n useWatchForSizes(size, list, calculateRange);\n const scrollTo = createScrollTo(\"horizontal\", calculateRange, getDistanceLeft, containerRef);\n const wrapperProps = computed(() => {\n return {\n style: {\n height: \"100%\",\n width: `${totalWidth.value - offsetLeft.value}px`,\n marginLeft: `${offsetLeft.value}px`,\n display: \"flex\"\n }\n };\n });\n return {\n scrollTo,\n calculateRange,\n wrapperProps,\n containerStyle,\n currentList,\n containerRef\n };\n}\nfunction useVerticalVirtualList(options, list) {\n const resources = useVirtualListResources(list);\n const { state, source, currentList, size, containerRef } = resources;\n const containerStyle = { overflowY: \"auto\" };\n const { itemHeight, overscan = 5 } = options;\n const getViewCapacity = createGetViewCapacity(state, source, itemHeight);\n const getOffset = createGetOffset(source, itemHeight);\n const calculateRange = createCalculateRange(\"vertical\", overscan, getOffset, getViewCapacity, resources);\n const getDistanceTop = createGetDistance(itemHeight, source);\n const offsetTop = computed(() => getDistanceTop(state.value.start));\n const totalHeight = createComputedTotalSize(itemHeight, source);\n useWatchForSizes(size, list, calculateRange);\n const scrollTo = createScrollTo(\"vertical\", calculateRange, getDistanceTop, containerRef);\n const wrapperProps = computed(() => {\n return {\n style: {\n width: \"100%\",\n height: `${totalHeight.value - offsetTop.value}px`,\n marginTop: `${offsetTop.value}px`\n }\n };\n });\n return {\n calculateRange,\n scrollTo,\n containerStyle,\n wrapperProps,\n currentList,\n containerRef\n };\n}\n\nfunction useWakeLock(options = {}) {\n const {\n navigator = defaultNavigator,\n document = defaultDocument\n } = options;\n let wakeLock;\n const isSupported = useSupported(() => navigator && \"wakeLock\" in navigator);\n const isActive = ref(false);\n async function onVisibilityChange() {\n if (!isSupported.value || !wakeLock)\n return;\n if (document && document.visibilityState === \"visible\")\n wakeLock = await navigator.wakeLock.request(\"screen\");\n isActive.value = !wakeLock.released;\n }\n if (document)\n useEventListener(document, \"visibilitychange\", onVisibilityChange, { passive: true });\n async function request(type) {\n if (!isSupported.value)\n return;\n wakeLock = await navigator.wakeLock.request(type);\n isActive.value = !wakeLock.released;\n }\n async function release() {\n if (!isSupported.value || !wakeLock)\n return;\n await wakeLock.release();\n isActive.value = !wakeLock.released;\n wakeLock = null;\n }\n return {\n isSupported,\n isActive,\n request,\n release\n };\n}\n\nfunction useWebNotification(options = {}) {\n const {\n window = defaultWindow,\n requestPermissions: _requestForPermissions = true\n } = options;\n const defaultWebNotificationOptions = options;\n const isSupported = useSupported(() => !!window && \"Notification\" in window);\n const permissionGranted = ref(isSupported.value && \"permission\" in Notification && Notification.permission === \"granted\");\n const notification = ref(null);\n const ensurePermissions = async () => {\n if (!isSupported.value)\n return;\n if (!permissionGranted.value && Notification.permission !== \"denied\") {\n const result = await Notification.requestPermission();\n if (result === \"granted\")\n permissionGranted.value = true;\n }\n return permissionGranted.value;\n };\n const { on: onClick, trigger: clickTrigger } = createEventHook();\n const { on: onShow, trigger: showTrigger } = createEventHook();\n const { on: onError, trigger: errorTrigger } = createEventHook();\n const { on: onClose, trigger: closeTrigger } = createEventHook();\n const show = async (overrides) => {\n if (!isSupported.value || !permissionGranted.value)\n return;\n const options2 = Object.assign({}, defaultWebNotificationOptions, overrides);\n notification.value = new Notification(options2.title || \"\", options2);\n notification.value.onclick = clickTrigger;\n notification.value.onshow = showTrigger;\n notification.value.onerror = errorTrigger;\n notification.value.onclose = closeTrigger;\n return notification.value;\n };\n const close = () => {\n if (notification.value)\n notification.value.close();\n notification.value = null;\n };\n if (_requestForPermissions)\n tryOnMounted(ensurePermissions);\n tryOnScopeDispose(close);\n if (isSupported.value && window) {\n const document = window.document;\n useEventListener(document, \"visibilitychange\", (e) => {\n e.preventDefault();\n if (document.visibilityState === \"visible\") {\n close();\n }\n });\n }\n return {\n isSupported,\n notification,\n ensurePermissions,\n permissionGranted,\n show,\n close,\n onClick,\n onShow,\n onError,\n onClose\n };\n}\n\nconst DEFAULT_PING_MESSAGE = \"ping\";\nfunction resolveNestedOptions(options) {\n if (options === true)\n return {};\n return options;\n}\nfunction useWebSocket(url, options = {}) {\n const {\n onConnected,\n onDisconnected,\n onError,\n onMessage,\n immediate = true,\n autoClose = true,\n protocols = []\n } = options;\n const data = ref(null);\n const status = ref(\"CLOSED\");\n const wsRef = ref();\n const urlRef = toRef(url);\n let heartbeatPause;\n let heartbeatResume;\n let explicitlyClosed = false;\n let retried = 0;\n let bufferedData = [];\n let pongTimeoutWait;\n const _sendBuffer = () => {\n if (bufferedData.length && wsRef.value && status.value === \"OPEN\") {\n for (const buffer of bufferedData)\n wsRef.value.send(buffer);\n bufferedData = [];\n }\n };\n const resetHeartbeat = () => {\n clearTimeout(pongTimeoutWait);\n pongTimeoutWait = void 0;\n };\n const close = (code = 1e3, reason) => {\n if (!isClient || !wsRef.value)\n return;\n explicitlyClosed = true;\n resetHeartbeat();\n heartbeatPause == null ? void 0 : heartbeatPause();\n wsRef.value.close(code, reason);\n };\n const send = (data2, useBuffer = true) => {\n if (!wsRef.value || status.value !== \"OPEN\") {\n if (useBuffer)\n bufferedData.push(data2);\n return false;\n }\n _sendBuffer();\n wsRef.value.send(data2);\n return true;\n };\n const _init = () => {\n if (explicitlyClosed || typeof urlRef.value === \"undefined\")\n return;\n const ws = new WebSocket(urlRef.value, protocols);\n wsRef.value = ws;\n status.value = \"CONNECTING\";\n ws.onopen = () => {\n status.value = \"OPEN\";\n onConnected == null ? void 0 : onConnected(ws);\n heartbeatResume == null ? void 0 : heartbeatResume();\n _sendBuffer();\n };\n ws.onclose = (ev) => {\n status.value = \"CLOSED\";\n wsRef.value = void 0;\n onDisconnected == null ? void 0 : onDisconnected(ws, ev);\n if (!explicitlyClosed && options.autoReconnect) {\n const {\n retries = -1,\n delay = 1e3,\n onFailed\n } = resolveNestedOptions(options.autoReconnect);\n retried += 1;\n if (typeof retries === \"number\" && (retries < 0 || retried < retries))\n setTimeout(_init, delay);\n else if (typeof retries === \"function\" && retries())\n setTimeout(_init, delay);\n else\n onFailed == null ? void 0 : onFailed();\n }\n };\n ws.onerror = (e) => {\n onError == null ? void 0 : onError(ws, e);\n };\n ws.onmessage = (e) => {\n if (options.heartbeat) {\n resetHeartbeat();\n const {\n message = DEFAULT_PING_MESSAGE\n } = resolveNestedOptions(options.heartbeat);\n if (e.data === message)\n return;\n }\n data.value = e.data;\n onMessage == null ? void 0 : onMessage(ws, e);\n };\n };\n if (options.heartbeat) {\n const {\n message = DEFAULT_PING_MESSAGE,\n interval = 1e3,\n pongTimeout = 1e3\n } = resolveNestedOptions(options.heartbeat);\n const { pause, resume } = useIntervalFn(\n () => {\n send(message, false);\n if (pongTimeoutWait != null)\n return;\n pongTimeoutWait = setTimeout(() => {\n close();\n explicitlyClosed = false;\n }, pongTimeout);\n },\n interval,\n { immediate: false }\n );\n heartbeatPause = pause;\n heartbeatResume = resume;\n }\n if (autoClose) {\n useEventListener(\"beforeunload\", () => close());\n tryOnScopeDispose(close);\n }\n const open = () => {\n if (!isClient)\n return;\n close();\n explicitlyClosed = false;\n retried = 0;\n _init();\n };\n if (immediate)\n watch(urlRef, open, { immediate: true });\n return {\n data,\n status,\n close,\n send,\n open,\n ws: wsRef\n };\n}\n\nfunction useWebWorker(arg0, workerOptions, options) {\n const {\n window = defaultWindow\n } = options != null ? options : {};\n const data = ref(null);\n const worker = shallowRef();\n const post = (...args) => {\n if (!worker.value)\n return;\n worker.value.postMessage(...args);\n };\n const terminate = function terminate2() {\n if (!worker.value)\n return;\n worker.value.terminate();\n };\n if (window) {\n if (typeof arg0 === \"string\")\n worker.value = new Worker(arg0, workerOptions);\n else if (typeof arg0 === \"function\")\n worker.value = arg0();\n else\n worker.value = arg0;\n worker.value.onmessage = (e) => {\n data.value = e.data;\n };\n tryOnScopeDispose(() => {\n if (worker.value)\n worker.value.terminate();\n });\n }\n return {\n data,\n post,\n terminate,\n worker\n };\n}\n\nfunction jobRunner(userFunc) {\n return (e) => {\n const userFuncArgs = e.data[0];\n return Promise.resolve(userFunc.apply(void 0, userFuncArgs)).then((result) => {\n postMessage([\"SUCCESS\", result]);\n }).catch((error) => {\n postMessage([\"ERROR\", error]);\n });\n };\n}\n\nfunction depsParser(deps) {\n if (deps.length === 0)\n return \"\";\n const depsString = deps.map((dep) => `'${dep}'`).toString();\n return `importScripts(${depsString})`;\n}\n\nfunction createWorkerBlobUrl(fn, deps) {\n const blobCode = `${depsParser(deps)}; onmessage=(${jobRunner})(${fn})`;\n const blob = new Blob([blobCode], { type: \"text/javascript\" });\n const url = URL.createObjectURL(blob);\n return url;\n}\n\nfunction useWebWorkerFn(fn, options = {}) {\n const {\n dependencies = [],\n timeout,\n window = defaultWindow\n } = options;\n const worker = ref();\n const workerStatus = ref(\"PENDING\");\n const promise = ref({});\n const timeoutId = ref();\n const workerTerminate = (status = \"PENDING\") => {\n if (worker.value && worker.value._url && window) {\n worker.value.terminate();\n URL.revokeObjectURL(worker.value._url);\n promise.value = {};\n worker.value = void 0;\n window.clearTimeout(timeoutId.value);\n workerStatus.value = status;\n }\n };\n workerTerminate();\n tryOnScopeDispose(workerTerminate);\n const generateWorker = () => {\n const blobUrl = createWorkerBlobUrl(fn, dependencies);\n const newWorker = new Worker(blobUrl);\n newWorker._url = blobUrl;\n newWorker.onmessage = (e) => {\n const { resolve = () => {\n }, reject = () => {\n } } = promise.value;\n const [status, result] = e.data;\n switch (status) {\n case \"SUCCESS\":\n resolve(result);\n workerTerminate(status);\n break;\n default:\n reject(result);\n workerTerminate(\"ERROR\");\n break;\n }\n };\n newWorker.onerror = (e) => {\n const { reject = () => {\n } } = promise.value;\n e.preventDefault();\n reject(e);\n workerTerminate(\"ERROR\");\n };\n if (timeout) {\n timeoutId.value = setTimeout(\n () => workerTerminate(\"TIMEOUT_EXPIRED\"),\n timeout\n );\n }\n return newWorker;\n };\n const callWorker = (...fnArgs) => new Promise((resolve, reject) => {\n promise.value = {\n resolve,\n reject\n };\n worker.value && worker.value.postMessage([[...fnArgs]]);\n workerStatus.value = \"RUNNING\";\n });\n const workerFn = (...fnArgs) => {\n if (workerStatus.value === \"RUNNING\") {\n console.error(\n \"[useWebWorkerFn] You can only run one instance of the worker at a time.\"\n );\n return Promise.reject();\n }\n worker.value = generateWorker();\n return callWorker(...fnArgs);\n };\n return {\n workerFn,\n workerStatus,\n workerTerminate\n };\n}\n\nfunction useWindowFocus(options = {}) {\n const { window = defaultWindow } = options;\n if (!window)\n return ref(false);\n const focused = ref(window.document.hasFocus());\n useEventListener(window, \"blur\", () => {\n focused.value = false;\n });\n useEventListener(window, \"focus\", () => {\n focused.value = true;\n });\n return focused;\n}\n\nfunction useWindowScroll(options = {}) {\n const { window = defaultWindow } = options;\n if (!window) {\n return {\n x: ref(0),\n y: ref(0)\n };\n }\n const x = ref(window.scrollX);\n const y = ref(window.scrollY);\n useEventListener(\n window,\n \"scroll\",\n () => {\n x.value = window.scrollX;\n y.value = window.scrollY;\n },\n {\n capture: false,\n passive: true\n }\n );\n return { x, y };\n}\n\nfunction useWindowSize(options = {}) {\n const {\n window = defaultWindow,\n initialWidth = Number.POSITIVE_INFINITY,\n initialHeight = Number.POSITIVE_INFINITY,\n listenOrientation = true,\n includeScrollbar = true\n } = options;\n const width = ref(initialWidth);\n const height = ref(initialHeight);\n const update = () => {\n if (window) {\n if (includeScrollbar) {\n width.value = window.innerWidth;\n height.value = window.innerHeight;\n } else {\n width.value = window.document.documentElement.clientWidth;\n height.value = window.document.documentElement.clientHeight;\n }\n }\n };\n update();\n tryOnMounted(update);\n useEventListener(\"resize\", update, { passive: true });\n if (listenOrientation) {\n const matches = useMediaQuery(\"(orientation: portrait)\");\n watch(matches, () => update());\n }\n return { width, height };\n}\n\nexport { DefaultMagicKeysAliasMap, StorageSerializers, TransitionPresets, computedAsync as asyncComputed, breakpointsAntDesign, breakpointsBootstrapV5, breakpointsMasterCss, breakpointsPrimeFlex, breakpointsQuasar, breakpointsSematic, breakpointsTailwind, breakpointsVuetify, cloneFnJSON, computedAsync, computedInject, createFetch, createReusableTemplate, createTemplatePromise, createUnrefFn, customStorageEventName, defaultDocument, defaultLocation, defaultNavigator, defaultWindow, executeTransition, formatTimeAgo, getSSRHandler, mapGamepadToXbox360Controller, onClickOutside, onKeyDown, onKeyPressed, onKeyStroke, onKeyUp, onLongPress, onStartTyping, setSSRHandler, templateRef, unrefElement, useActiveElement, useAnimate, useAsyncQueue, useAsyncState, useBase64, useBattery, useBluetooth, useBreakpoints, useBroadcastChannel, useBrowserLocation, useCached, useClipboard, useCloned, useColorMode, useConfirmDialog, useCssVar, useCurrentElement, useCycleList, useDark, useDebouncedRefHistory, useDeviceMotion, useDeviceOrientation, useDevicePixelRatio, useDevicesList, useDisplayMedia, useDocumentVisibility, useDraggable, useDropZone, useElementBounding, useElementByPoint, useElementHover, useElementSize, useElementVisibility, useEventBus, useEventListener, useEventSource, useEyeDropper, useFavicon, useFetch, useFileDialog, useFileSystemAccess, useFocus, useFocusWithin, useFps, useFullscreen, useGamepad, useGeolocation, useIdle, useImage, useInfiniteScroll, useIntersectionObserver, useKeyModifier, useLocalStorage, useMagicKeys, useManualRefHistory, useMediaControls, useMediaQuery, useMemoize, useMemory, useMounted, useMouse, useMouseInElement, useMousePressed, useMutationObserver, useNavigatorLanguage, useNetwork, useNow, useObjectUrl, useOffsetPagination, useOnline, usePageLeave, useParallax, useParentElement, usePerformanceObserver, usePermission, usePointer, usePointerLock, usePointerSwipe, usePreferredColorScheme, usePreferredContrast, usePreferredDark, usePreferredLanguages, usePreferredReducedMotion, usePrevious, useRafFn, useRefHistory, useResizeObserver, useScreenOrientation, useScreenSafeArea, useScriptTag, useScroll, useScrollLock, useSessionStorage, useShare, useSorted, useSpeechRecognition, useSpeechSynthesis, useStepper, useStorage, useStorageAsync, useStyleTag, useSupported, useSwipe, useTemplateRefsList, useTextDirection, useTextSelection, useTextareaAutosize, useThrottledRefHistory, useTimeAgo, useTimeoutPoll, useTimestamp, useTitle, useTransition, useUrlSearchParams, useUserMedia, useVModel, useVModels, useVibrate, useVirtualList, useWakeLock, useWebNotification, useWebSocket, useWebWorker, useWebWorkerFn, useWindowFocus, useWindowScroll, useWindowSize };\n","import Vue from 'vue'\nimport { getCurrentInstance } from 'vue'\n\nvar isVue2 = true\nvar isVue3 = false\nvar Vue2 = Vue\nvar warn = Vue.util.warn\n\nfunction install() {}\n\n// createApp polyfill\nexport function createApp(rootComponent, rootProps) {\n var vm\n var provide = {}\n var app = {\n config: Vue.config,\n use: Vue.use.bind(Vue),\n mixin: Vue.mixin.bind(Vue),\n component: Vue.component.bind(Vue),\n provide: function (key, value) {\n provide[key] = value\n return this\n },\n directive: function (name, dir) {\n if (dir) {\n Vue.directive(name, dir)\n return app\n } else {\n return Vue.directive(name)\n }\n },\n mount: function (el, hydrating) {\n if (!vm) {\n vm = new Vue(Object.assign({ propsData: rootProps }, rootComponent, { provide: Object.assign(provide, rootComponent.provide) }))\n vm.$mount(el, hydrating)\n return vm\n } else {\n return vm\n }\n },\n unmount: function () {\n if (vm) {\n vm.$destroy()\n vm = undefined\n }\n },\n }\n return app\n}\n\nexport {\n Vue,\n Vue2,\n isVue2,\n isVue3,\n install,\n warn\n}\n\n// Vue 3 components mock\nfunction createMockComponent(name) {\n return {\n setup() {\n throw new Error('[vue-demi] ' + name + ' is not supported in Vue 2. It\\'s provided to avoid compiler errors.')\n }\n }\n}\nexport var Fragment = /*#__PURE__*/ createMockComponent('Fragment')\nexport var Transition = /*#__PURE__*/ createMockComponent('Transition')\nexport var TransitionGroup = /*#__PURE__*/ createMockComponent('TransitionGroup')\nexport var Teleport = /*#__PURE__*/ createMockComponent('Teleport')\nexport var Suspense = /*#__PURE__*/ createMockComponent('Suspense')\nexport var KeepAlive = /*#__PURE__*/ createMockComponent('KeepAlive')\n\nexport * from 'vue'\n\n// Not implemented https://github.com/vuejs/core/pull/8111, falls back to getCurrentInstance()\nexport function hasInjectionContext() {\n return !!getCurrentInstance()\n}\n","import { defineComponent as B, useSlots as ue, ref as h, computed as m, onMounted as V, watch as ie, onUnmounted as de, nextTick as _e, toRef as fe } from \"vue\";\nimport { NcButton as M, NcIconSvgWrapper as pe, NcModal as ve, NcCheckboxRadioSwitch as le, NcDateTime as me, NcActions as ge, NcActionInput as he, NcBreadcrumbs as ye, NcBreadcrumb as we, NcSelect as Ce, NcTextField as ke, NcEmptyContent as be } from \"@nextcloud/vue\";\nimport { useElementSize as Fe, toValue as ne } from \"@vueuse/core\";\nimport { FileType as I, formatFileSize as Se, davGetClient as $e, davResultToNode as R, davRootPath as D, getFavoriteNodes as xe, davGetRecentSearch as Ne, davGetDefaultPropfind as Pe } from \"@nextcloud/files\";\nimport { getCanonicalLocale as Be } from \"@nextcloud/l10n\";\nimport { join as se } from \"path\";\nimport { loadState as ae } from \"@nextcloud/initial-state\";\nimport re from \"@nextcloud/axios\";\nimport { generateUrl as H } from \"@nextcloud/router\";\nimport { t as w, k as Le } from \"./toast-bd3596c1.mjs\";\nimport { Fragment as ze } from \"vue-frag\";\nfunction C(s, e, n, t, i, l, c, r) {\n var a = typeof s == \"function\" ? s.options : s;\n e && (a.render = e, a.staticRenderFns = n, a._compiled = !0), t && (a.functional = !0), l && (a._scopeId = \"data-v-\" + l);\n var u;\n if (c ? (u = function(_) {\n _ = _ || // cached call\n this.$vnode && this.$vnode.ssrContext || // stateful\n this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !_ && typeof __VUE_SSR_CONTEXT__ < \"u\" && (_ = __VUE_SSR_CONTEXT__), i && i.call(this, _), _ && _._registeredComponents && _._registeredComponents.add(c);\n }, a._ssrRegister = u) : i && (u = r ? function() {\n i.call(\n this,\n (a.functional ? this.parent : this).$root.$options.shadowRoot\n );\n } : i), u)\n if (a.functional) {\n a._injectStyles = u;\n var v = a.render;\n a.render = function(y, f) {\n return u.call(f), v(y, f);\n };\n } else {\n var k = a.beforeCreate;\n a.beforeCreate = k ? [].concat(k, u) : [u];\n }\n return {\n exports: s,\n options: a\n };\n}\nconst Ie = {\n name: \"FileIcon\",\n emits: [\"click\"],\n props: {\n title: {\n type: String\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n};\nvar Ve = function() {\n var e = this, n = e._self._c;\n return n(\"span\", e._b({ staticClass: \"material-design-icon file-icon\", attrs: { \"aria-hidden\": !e.title, \"aria-label\": e.title, role: \"img\" }, on: { click: function(t) {\n return e.$emit(\"click\", t);\n } } }, \"span\", e.$attrs, !1), [n(\"svg\", { staticClass: \"material-design-icon__svg\", attrs: { fill: e.fillColor, width: e.size, height: e.size, viewBox: \"0 0 24 24\" } }, [n(\"path\", { attrs: { d: \"M13,9V3.5L18.5,9M6,2C4.89,2 4,2.89 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2H6Z\" } }, [e.title ? n(\"title\", [e._v(e._s(e.title))]) : e._e()])])]);\n}, Re = [], De = /* @__PURE__ */ C(\n Ie,\n Ve,\n Re,\n !1,\n null,\n null,\n null,\n null\n);\nconst oe = De.exports, Me = /* @__PURE__ */ B({\n __name: \"DialogButton\",\n props: {\n callback: null,\n label: null,\n icon: { default: void 0 },\n type: { default: \"secondary\" }\n },\n emits: [\"click\"],\n setup(s, { emit: e }) {\n const n = s;\n return { __sfc: !0, props: n, emit: e, handleClick: (i) => {\n var l;\n (l = n.callback) == null || l.call(n), e(\"click\", i);\n }, NcButton: M, NcIconSvgWrapper: pe };\n }\n});\nvar He = function() {\n var e = this, n = e._self._c, t = e._self._setupProxy;\n return n(t.NcButton, { attrs: { \"aria-label\": t.props.label, type: t.props.type }, on: { click: t.handleClick }, scopedSlots: e._u([t.props.icon !== void 0 ? { key: \"icon\", fn: function() {\n return [typeof t.props.icon == \"string\" ? n(t.NcIconSvgWrapper, { attrs: { svg: t.props.icon } }) : n(t.props.icon, { tag: \"component\", attrs: { size: 20 } })];\n }, proxy: !0 } : null], null, !0) }, [e._v(\" \" + e._s(t.props.label) + \" \")]);\n}, Ae = [], Te = /* @__PURE__ */ C(\n Me,\n He,\n Ae,\n !1,\n null,\n null,\n null,\n null\n);\nconst Ee = Te.exports, Ue = /* @__PURE__ */ B({\n __name: \"DialogBase\",\n props: {\n name: null,\n message: { default: \"\" },\n additionalTrapElements: { default: () => [] },\n container: { default: void 0 },\n size: { default: \"small\" },\n buttons: { default: () => [] },\n navigationClasses: { default: () => [] },\n contentClasses: { default: () => [] },\n dialogClasses: { default: () => [] }\n },\n emits: [\"close\"],\n setup(s, { emit: e }) {\n const n = s, t = ue(), i = h(), { width: l } = Fe(i), c = m(() => l.value < 876), r = m(() => (t == null ? void 0 : t.navigation) !== void 0), a = h(!0), u = () => {\n a.value = !1, e(\"close\");\n }, v = m(() => ({\n additionalTrapElements: n.additionalTrapElements,\n container: n.container === void 0 ? \"body\" : n.container,\n name: n.name,\n size: n.size,\n enableSlideshow: !1,\n enableSwipe: !1\n }));\n return { __sfc: !0, props: n, emit: e, slots: t, wrapper: i, dialogWidth: l, isNavigationCollapsed: c, hasNavigation: r, open: a, handleClose: u, modalProps: v, NcModal: ve, DialogButton: Ee };\n }\n});\nvar Ze = function() {\n var e = this, n = e._self._c, t = e._self._setupProxy;\n return t.open ? n(t.NcModal, e._b({ staticClass: \"dialog__modal\", on: { close: t.handleClose } }, \"NcModal\", t.modalProps, !1), [n(\"h2\", { staticClass: \"dialog__name\", domProps: { textContent: e._s(e.name) } }), n(\"div\", { staticClass: \"dialog\", class: e.dialogClasses }, [n(\"div\", { ref: \"wrapper\", class: [\"dialog__wrapper\", { \"dialog__wrapper--collapsed\": t.isNavigationCollapsed }] }, [t.hasNavigation ? n(\"nav\", { staticClass: \"dialog__navigation\", class: e.navigationClasses }, [e._t(\"navigation\", null, { isCollapsed: t.isNavigationCollapsed })], 2) : e._e(), n(\"div\", { staticClass: \"dialog__content\", class: e.contentClasses }, [e._t(\"default\", function() {\n return [n(\"p\", [e._v(e._s(t.props.message))])];\n })], 2)]), n(\"div\", { staticClass: \"dialog__actions\" }, [e._t(\"actions\", function() {\n return e._l(t.props.buttons, function(i, l) {\n return n(t.DialogButton, e._b({ key: l, on: { click: t.handleClose } }, \"DialogButton\", i, !1));\n });\n })], 2)])]) : e._e();\n}, Oe = [], We = /* @__PURE__ */ C(\n Ue,\n Ze,\n Oe,\n !1,\n null,\n \"89afd3fd\",\n null,\n null\n);\nconst je = We.exports;\n/**\n * @copyright Copyright (c) 2023 Ferdinand Thiessen <opensource@fthiessen.de>\n *\n * @author Ferdinand Thiessen <opensource@fthiessen.de>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nconst A = () => {\n var s, e, n;\n const t = ae(\"files\", \"config\", null), i = h((s = t == null ? void 0 : t.show_hidden) != null ? s : !1), l = h((e = t == null ? void 0 : t.sort_favorites_first) != null ? e : !0), c = h((n = t == null ? void 0 : t.crop_image_previews) != null ? n : !0);\n return V(() => {\n re.get(H(\"/apps/files/api/v1/configs\")).then((r) => {\n var a, u, v, k, _, y, f, F, S;\n i.value = (v = (u = (a = r.data) == null ? void 0 : a.data) == null ? void 0 : u.show_hidden) != null ? v : !1, l.value = (y = (_ = (k = r.data) == null ? void 0 : k.data) == null ? void 0 : _.sort_favorites_first) != null ? y : !0, c.value = (S = (F = (f = r.data) == null ? void 0 : f.data) == null ? void 0 : F.crop_image_previews) != null ? S : !0;\n });\n }), {\n showHiddenFiles: i,\n sortFavoritesFirst: l,\n cropImagePreviews: c\n };\n}, Ge = (s) => {\n var e, n, t, i, l, c, r, a, u, v, k, _;\n const y = (p) => p === \"asc\" ? \"ascending\" : p === \"desc\" ? \"descending\" : \"none\", f = ae(\"files\", \"viewConfigs\", null), F = h({\n sortBy: (n = (e = f == null ? void 0 : f.files) == null ? void 0 : e.sorting_mode) != null ? n : \"basename\",\n order: y((i = (t = f == null ? void 0 : f.files) == null ? void 0 : t.sorting_direction) != null ? i : \"asc\")\n }), S = h({\n sortBy: (c = (l = f == null ? void 0 : f.recent) == null ? void 0 : l.sorting_mode) != null ? c : \"basename\",\n order: y((a = (r = f == null ? void 0 : f.recent) == null ? void 0 : r.sorting_direction) != null ? a : \"asc\")\n }), P = h({\n sortBy: (v = (u = f == null ? void 0 : f.favorites) == null ? void 0 : u.sorting_mode) != null ? v : \"basename\",\n order: y((_ = (k = f == null ? void 0 : f.favorites) == null ? void 0 : k.sorting_direction) != null ? _ : \"asc\")\n });\n V(() => {\n re.get(H(\"/apps/files/api/v1/views\")).then((p) => {\n var o, d, b, N, L, z, E, U, Z, O, W, j, G, q, K, X, J, Q, Y, ee, te;\n F.value = {\n sortBy: (N = (b = (d = (o = p.data) == null ? void 0 : o.data) == null ? void 0 : d.files) == null ? void 0 : b.sorting_mode) != null ? N : \"basename\",\n order: y((E = (z = (L = p.data) == null ? void 0 : L.data) == null ? void 0 : z.files) == null ? void 0 : E.sorting_direction)\n }, P.value = {\n sortBy: (W = (O = (Z = (U = p.data) == null ? void 0 : U.data) == null ? void 0 : Z.favorites) == null ? void 0 : O.sorting_mode) != null ? W : \"basename\",\n order: y((q = (G = (j = p.data) == null ? void 0 : j.data) == null ? void 0 : G.favorites) == null ? void 0 : q.sorting_direction)\n }, S.value = {\n sortBy: (Q = (J = (X = (K = p.data) == null ? void 0 : K.data) == null ? void 0 : X.recent) == null ? void 0 : J.sorting_mode) != null ? Q : \"basename\",\n order: y((te = (ee = (Y = p.data) == null ? void 0 : Y.data) == null ? void 0 : ee.recent) == null ? void 0 : te.sorting_direction)\n };\n });\n });\n const $ = m(() => ne(s || \"files\") === \"files\" ? F.value : ne(s) === \"recent\" ? S.value : P.value), g = m(() => $.value.sortBy), x = m(() => $.value.order);\n return {\n filesViewConfig: F,\n favoritesViewConfig: P,\n recentViewConfig: S,\n currentConfig: $,\n sortBy: g,\n order: x\n };\n}, qe = {\n name: \"MenuUpIcon\",\n emits: [\"click\"],\n props: {\n title: {\n type: String\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n};\nvar Ke = function() {\n var e = this, n = e._self._c;\n return n(\"span\", e._b({ staticClass: \"material-design-icon menu-up-icon\", attrs: { \"aria-hidden\": !e.title, \"aria-label\": e.title, role: \"img\" }, on: { click: function(t) {\n return e.$emit(\"click\", t);\n } } }, \"span\", e.$attrs, !1), [n(\"svg\", { staticClass: \"material-design-icon__svg\", attrs: { fill: e.fillColor, width: e.size, height: e.size, viewBox: \"0 0 24 24\" } }, [n(\"path\", { attrs: { d: \"M7,15L12,10L17,15H7Z\" } }, [e.title ? n(\"title\", [e._v(e._s(e.title))]) : e._e()])])]);\n}, Xe = [], Je = /* @__PURE__ */ C(\n qe,\n Ke,\n Xe,\n !1,\n null,\n null,\n null,\n null\n);\nconst Qe = Je.exports, Ye = {\n name: \"MenuDownIcon\",\n emits: [\"click\"],\n props: {\n title: {\n type: String\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n};\nvar et = function() {\n var e = this, n = e._self._c;\n return n(\"span\", e._b({ staticClass: \"material-design-icon menu-down-icon\", attrs: { \"aria-hidden\": !e.title, \"aria-label\": e.title, role: \"img\" }, on: { click: function(t) {\n return e.$emit(\"click\", t);\n } } }, \"span\", e.$attrs, !1), [n(\"svg\", { staticClass: \"material-design-icon__svg\", attrs: { fill: e.fillColor, width: e.size, height: e.size, viewBox: \"0 0 24 24\" } }, [n(\"path\", { attrs: { d: \"M7,10L12,15L17,10H7Z\" } }, [e.title ? n(\"title\", [e._v(e._s(e.title))]) : e._e()])])]);\n}, tt = [], nt = /* @__PURE__ */ C(\n Ye,\n et,\n tt,\n !1,\n null,\n null,\n null,\n null\n);\nconst it = nt.exports, ce = {\n \"file-picker__file-icon\": \"_file-picker__file-icon_1vgv4_5\"\n}, lt = /* @__PURE__ */ B({\n __name: \"LoadingTableRow\",\n props: {\n showCheckbox: { type: Boolean }\n },\n setup(s) {\n return { __sfc: !0, fileListIconStyles: ce };\n }\n});\nvar st = function() {\n var e = this, n = e._self._c, t = e._self._setupProxy;\n return n(\"tr\", { staticClass: \"file-picker__row loading-row\", attrs: { \"aria-hidden\": \"true\" } }, [e.showCheckbox ? n(\"td\", { staticClass: \"row-checkbox\" }, [n(\"span\")]) : e._e(), n(\"td\", { staticClass: \"row-name\" }, [n(\"div\", { staticClass: \"row-wrapper\" }, [n(\"span\", { class: t.fileListIconStyles[\"file-picker__file-icon\"] }), n(\"span\")])]), e._m(0), e._m(1)]);\n}, at = [function() {\n var s = this, e = s._self._c;\n return s._self._setupProxy, e(\"td\", { staticClass: \"row-size\" }, [e(\"span\")]);\n}, function() {\n var s = this, e = s._self._c;\n return s._self._setupProxy, e(\"td\", { staticClass: \"row-modified\" }, [e(\"span\")]);\n}], rt = /* @__PURE__ */ C(\n lt,\n st,\n at,\n !1,\n null,\n \"6aded0d9\",\n null,\n null\n);\nconst ot = rt.exports;\n/**\n * @copyright Copyright (c) 2023 Ferdinand Thiessen <opensource@fthiessen.de>\n *\n * @author Ferdinand Thiessen <opensource@fthiessen.de>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nfunction ct(s, e = {}) {\n var n;\n e = { size: 32, cropPreview: !1, mimeFallback: !0, ...e };\n try {\n const t = ((n = s.attributes) == null ? void 0 : n.previewUrl) || H(\"/core/preview?fileId={fileid}\", {\n fileid: s.fileid\n });\n let i;\n try {\n i = new URL(t);\n } catch {\n i = new URL(t, window.location.origin);\n }\n return i.searchParams.set(\"x\", \"\".concat(e.size)), i.searchParams.set(\"y\", \"\".concat(e.size)), i.searchParams.set(\"mimeFallback\", \"\".concat(e.mimeFallback)), i.searchParams.set(\"a\", e.cropPreview === !0 ? \"0\" : \"1\"), i.searchParams.set(\"c\", \"\".concat(s.attributes.etag)), i;\n } catch {\n return null;\n }\n}\nconst ut = {\n name: \"FolderIcon\",\n emits: [\"click\"],\n props: {\n title: {\n type: String\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n};\nvar dt = function() {\n var e = this, n = e._self._c;\n return n(\"span\", e._b({ staticClass: \"material-design-icon folder-icon\", attrs: { \"aria-hidden\": !e.title, \"aria-label\": e.title, role: \"img\" }, on: { click: function(t) {\n return e.$emit(\"click\", t);\n } } }, \"span\", e.$attrs, !1), [n(\"svg\", { staticClass: \"material-design-icon__svg\", attrs: { fill: e.fillColor, width: e.size, height: e.size, viewBox: \"0 0 24 24\" } }, [n(\"path\", { attrs: { d: \"M10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6H12L10,4Z\" } }, [e.title ? n(\"title\", [e._v(e._s(e.title))]) : e._e()])])]);\n}, _t = [], ft = /* @__PURE__ */ C(\n ut,\n dt,\n _t,\n !1,\n null,\n null,\n null,\n null\n);\nconst T = ft.exports, pt = {\n name: \"FilePreview\"\n}, vt = /* @__PURE__ */ B({\n ...pt,\n props: {\n node: null\n },\n setup(s) {\n const e = s, n = h(ce), { cropImagePreviews: t } = A(), i = m(() => ct(e.node, { cropPreview: t.value })), l = m(() => e.node.type === I.File), c = h(!1);\n return ie(i, () => {\n if (c.value = !1, i.value) {\n const r = document.createElement(\"img\");\n r.src = i.value.href, r.onerror = () => r.remove(), r.onload = () => {\n c.value = !0, r.remove();\n }, document.body.appendChild(r);\n }\n }, { immediate: !0 }), { __sfc: !0, fileListIconStyles: n, props: e, cropImagePreviews: t, previewURL: i, isFile: l, canLoadPreview: c, t: w, IconFile: oe, IconFolder: T };\n }\n});\nvar mt = function() {\n var e = this, n = e._self._c, t = e._self._setupProxy;\n return n(\"div\", { class: t.fileListIconStyles[\"file-picker__file-icon\"], style: t.canLoadPreview ? { backgroundImage: \"url(\".concat(t.previewURL, \")\") } : void 0, attrs: { \"aria-label\": t.t(\"MIME type {mime}\", { mime: e.node.mime || t.t(\"unknown\") }) } }, [t.canLoadPreview ? e._e() : [t.isFile ? n(t.IconFile, { attrs: { size: 20 } }) : n(t.IconFolder, { attrs: { size: 20 } })]], 2);\n}, gt = [], ht = /* @__PURE__ */ C(\n vt,\n mt,\n gt,\n !1,\n null,\n null,\n null,\n null\n);\nconst yt = ht.exports, wt = /* @__PURE__ */ B({\n __name: \"FileListRow\",\n props: {\n allowPickDirectory: { type: Boolean },\n selected: { type: Boolean },\n showCheckbox: { type: Boolean },\n canPick: { type: Boolean },\n node: null\n },\n emits: [\"update:selected\", \"enter-directory\"],\n setup(s, { emit: e }) {\n const n = s, t = m(() => {\n var v;\n return ((v = n.node.attributes) == null ? void 0 : v.displayName) || n.node.basename.slice(0, n.node.extension ? -n.node.extension.length : void 0);\n }), i = m(() => n.node.extension), l = m(() => n.node.type === I.Folder), c = m(() => n.canPick && (n.allowPickDirectory || !l.value));\n function r() {\n e(\"update:selected\", !n.selected);\n }\n function a() {\n l.value ? e(\"enter-directory\", n.node) : r();\n }\n function u(v) {\n v.key === \"Enter\" && a();\n }\n return { __sfc: !0, props: n, emit: e, displayName: t, fileExtension: i, isDirectory: l, isPickable: c, toggleSelected: r, handleClick: a, handleKeyDown: u, formatFileSize: Se, NcCheckboxRadioSwitch: le, NcDateTime: me, t: w, FilePreview: yt };\n }\n});\nvar Ct = function() {\n var e = this, n = e._self._c, t = e._self._setupProxy;\n return n(\"tr\", e._g(\n { class: [\"file-picker__row\", {\n \"file-picker__row--selected\": e.selected && !e.showCheckbox\n }], attrs: { tabindex: e.showCheckbox && !t.isDirectory ? void 0 : 0, \"aria-selected\": t.isPickable ? e.selected : void 0, \"data-filename\": e.node.basename, \"data-testid\": \"file-list-row\" }, on: { click: t.handleClick } },\n /* same as tabindex -> if we hide the checkbox or this is a directory we need keyboard access to enter the directory or select the node */\n !e.showCheckbox || t.isDirectory ? { keydown: t.handleKeyDown } : {}\n ), [e.showCheckbox ? n(\"td\", { staticClass: \"row-checkbox\" }, [n(t.NcCheckboxRadioSwitch, { attrs: { disabled: !t.isPickable, checked: e.selected, \"aria-label\": t.t(\"Select the row for {nodename}\", { nodename: t.displayName }), \"data-testid\": \"row-checkbox\" }, on: { click: function(i) {\n i.stopPropagation();\n }, \"update:checked\": t.toggleSelected } })], 1) : e._e(), n(\"td\", { staticClass: \"row-name\" }, [n(\"div\", { staticClass: \"file-picker__name-container\", attrs: { \"data-testid\": \"row-name\" } }, [n(t.FilePreview, { attrs: { node: e.node } }), n(\"div\", { staticClass: \"file-picker__file-name\", attrs: { title: t.displayName }, domProps: { textContent: e._s(t.displayName) } }), n(\"div\", { staticClass: \"file-picker__file-extension\", domProps: { textContent: e._s(t.fileExtension) } })], 1)]), n(\"td\", { staticClass: \"row-size\" }, [e._v(\" \" + e._s(t.formatFileSize(e.node.size || 0)) + \" \")]), n(\"td\", { staticClass: \"row-modified\" }, [n(t.NcDateTime, { attrs: { timestamp: e.node.mtime, \"ignore-seconds\": !0 } })], 1)]);\n}, kt = [], bt = /* @__PURE__ */ C(\n wt,\n Ct,\n kt,\n !1,\n null,\n \"d337ebac\",\n null,\n null\n);\nconst Ft = bt.exports, St = /* @__PURE__ */ B({\n __name: \"FileList\",\n props: {\n currentView: null,\n multiselect: { type: Boolean },\n allowPickDirectory: { type: Boolean },\n loading: { type: Boolean },\n files: null,\n selectedFiles: null,\n path: null\n },\n emits: [\"update:path\", \"update:selectedFiles\"],\n setup(s, { emit: e }) {\n const n = s, t = h(), { currentConfig: i } = Ge(n.currentView), l = m(() => {\n var g;\n return (g = t.value) != null ? g : i.value;\n }), c = m(() => l.value.sortBy === \"basename\" ? l.value.order === \"none\" ? void 0 : l.value.order : void 0), r = m(() => l.value.sortBy === \"size\" ? l.value.order === \"none\" ? void 0 : l.value.order : void 0), a = m(() => l.value.sortBy === \"mtime\" ? l.value.order === \"none\" ? void 0 : l.value.order : void 0), u = (g) => {\n l.value.sortBy === g ? l.value.order === \"ascending\" ? t.value = { sortBy: l.value.sortBy, order: \"descending\" } : t.value = { sortBy: l.value.sortBy, order: \"ascending\" } : t.value = { sortBy: g, order: \"ascending\" };\n }, { sortFavoritesFirst: v } = A(), k = m(\n () => {\n const g = {\n ascending: (p, o, d) => d(p, o),\n descending: (p, o, d) => d(o, p),\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n none: (p, o, d) => 0\n }, x = {\n basename: (p, o) => {\n var d, b;\n return (((d = p.attributes) == null ? void 0 : d.displayName) || p.basename).localeCompare(((b = o.attributes) == null ? void 0 : b.displayName) || o.basename, Be());\n },\n size: (p, o) => (p.size || 0) - (o.size || 0),\n // reverted because \"young\" is smaller than \"old\"\n mtime: (p, o) => {\n var d, b, N, L;\n return (((b = (d = o.mtime) == null ? void 0 : d.getTime) == null ? void 0 : b.call(d)) || 0) - (((L = (N = p.mtime) == null ? void 0 : N.getTime) == null ? void 0 : L.call(N)) || 0);\n }\n };\n return [...n.files].sort(\n (p, o) => (\n // Folders always come above the files\n (o.type === I.Folder ? 1 : 0) - (p.type === I.Folder ? 1 : 0) || (v ? (o.attributes.favorite ? 1 : 0) - (p.attributes.favorite ? 1 : 0) : 0) || g[l.value.order](p, o, x[l.value.sortBy])\n )\n );\n }\n ), _ = m(() => n.files.filter((g) => n.allowPickDirectory || g.type !== I.Folder)), y = m(() => !n.loading && n.selectedFiles.length > 0 && n.selectedFiles.length >= _.value.length);\n function f() {\n n.selectedFiles.length < _.value.length ? e(\"update:selectedFiles\", _.value) : e(\"update:selectedFiles\", []);\n }\n function F(g) {\n n.selectedFiles.includes(g) ? e(\"update:selectedFiles\", n.selectedFiles.filter((x) => x.path !== g.path)) : n.multiselect ? e(\"update:selectedFiles\", [...n.selectedFiles, g]) : e(\"update:selectedFiles\", [g]);\n }\n function S(g) {\n e(\"update:path\", se(n.path, g.basename));\n }\n const P = h(4), $ = h();\n {\n const g = () => _e(() => {\n var x, p, o, d, b;\n const N = ((p = (x = $.value) == null ? void 0 : x.parentElement) == null ? void 0 : p.children) || [];\n let L = ((d = (o = $.value) == null ? void 0 : o.parentElement) == null ? void 0 : d.clientHeight) || 450;\n for (let z = 0; z < N.length; z++)\n (b = $.value) != null && b.isSameNode(N[z]) || (L -= N[z].clientHeight);\n P.value = Math.floor((L - 50) / 50);\n });\n V(() => {\n window.addEventListener(\"resize\", g), g();\n }), de(() => {\n window.removeEventListener(\"resize\", g);\n });\n }\n return { __sfc: !0, props: n, emit: e, customSortingConfig: t, filesAppSorting: i, sortingConfig: l, sortByName: c, sortBySize: r, sortByModified: a, toggleSorting: u, sortFavoritesFirst: v, sortedFiles: k, selectableFiles: _, allSelected: y, onSelectAll: f, onNodeSelected: F, onChangeDirectory: S, skeletonNumber: P, fileContainer: $, NcButton: M, NcCheckboxRadioSwitch: le, t: w, IconSortAscending: Qe, IconSortDescending: it, LoadingTableRow: ot, FileListRow: Ft };\n }\n});\nvar $t = function() {\n var e = this, n = e._self._c, t = e._self._setupProxy;\n return n(\"div\", { ref: \"fileContainer\", staticClass: \"file-picker__files\" }, [n(\"table\", [n(\"thead\", [n(\"tr\", [e.multiselect ? n(\"th\", { staticClass: \"row-checkbox\" }, [n(\"span\", { staticClass: \"hidden-visually\" }, [e._v(\" \" + e._s(t.t(\"Select entry\")) + \" \")]), e.multiselect ? n(t.NcCheckboxRadioSwitch, { attrs: { \"aria-label\": t.t(\"Select all entries\"), checked: t.allSelected, \"data-testid\": \"select-all-checkbox\" }, on: { \"update:checked\": t.onSelectAll } }) : e._e()], 1) : e._e(), n(\"th\", { staticClass: \"row-name\", attrs: { \"aria-sort\": t.sortByName } }, [n(\"div\", { staticClass: \"header-wrapper\" }, [n(\"span\", { staticClass: \"file-picker__header-preview\" }), n(t.NcButton, { attrs: { wide: !0, type: \"tertiary\", \"data-test\": \"file-picker_sort-name\" }, on: { click: function(i) {\n return t.toggleSorting(\"basename\");\n } }, scopedSlots: e._u([{ key: \"icon\", fn: function() {\n return [t.sortByName === \"ascending\" ? n(t.IconSortAscending, { attrs: { size: 20 } }) : t.sortByName === \"descending\" ? n(t.IconSortDescending, { attrs: { size: 20 } }) : n(\"span\", { staticStyle: { width: \"44px\" } })];\n }, proxy: !0 }]) }, [e._v(\" \" + e._s(t.t(\"Name\")) + \" \")])], 1)]), n(\"th\", { staticClass: \"row-size\", attrs: { \"aria-sort\": t.sortBySize } }, [n(t.NcButton, { attrs: { wide: !0, type: \"tertiary\" }, on: { click: function(i) {\n return t.toggleSorting(\"size\");\n } }, scopedSlots: e._u([{ key: \"icon\", fn: function() {\n return [t.sortBySize === \"ascending\" ? n(t.IconSortAscending, { attrs: { size: 20 } }) : t.sortBySize === \"descending\" ? n(t.IconSortDescending, { attrs: { size: 20 } }) : n(\"span\", { staticStyle: { width: \"44px\" } })];\n }, proxy: !0 }]) }, [e._v(\" \" + e._s(t.t(\"Size\")) + \" \")])], 1), n(\"th\", { staticClass: \"row-modified\", attrs: { \"aria-sort\": t.sortByModified } }, [n(t.NcButton, { attrs: { wide: !0, type: \"tertiary\" }, on: { click: function(i) {\n return t.toggleSorting(\"mtime\");\n } }, scopedSlots: e._u([{ key: \"icon\", fn: function() {\n return [t.sortByModified === \"ascending\" ? n(t.IconSortAscending, { attrs: { size: 20 } }) : t.sortByModified === \"descending\" ? n(t.IconSortDescending, { attrs: { size: 20 } }) : n(\"span\", { staticStyle: { width: \"44px\" } })];\n }, proxy: !0 }]) }, [e._v(\" \" + e._s(t.t(\"Modified\")) + \" \")])], 1)])]), n(\"tbody\", [e.loading ? e._l(t.skeletonNumber, function(i) {\n return n(t.LoadingTableRow, { key: i, attrs: { \"show-checkbox\": e.multiselect } });\n }) : e._l(t.sortedFiles, function(i) {\n return n(t.FileListRow, { key: i.fileid || i.path, attrs: { \"allow-pick-directory\": e.allowPickDirectory, \"show-checkbox\": e.multiselect, \"can-pick\": e.multiselect || e.selectedFiles.length === 0 || e.selectedFiles.includes(i), selected: e.selectedFiles.includes(i), node: i }, on: { \"update:selected\": function(l) {\n return t.onNodeSelected(i);\n }, \"enter-directory\": t.onChangeDirectory } });\n })], 2)])]);\n}, xt = [], Nt = /* @__PURE__ */ C(\n St,\n $t,\n xt,\n !1,\n null,\n \"ecc68c3c\",\n null,\n null\n);\nconst Pt = Nt.exports, Bt = {\n name: \"HomeIcon\",\n emits: [\"click\"],\n props: {\n title: {\n type: String\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n};\nvar Lt = function() {\n var e = this, n = e._self._c;\n return n(\"span\", e._b({ staticClass: \"material-design-icon home-icon\", attrs: { \"aria-hidden\": !e.title, \"aria-label\": e.title, role: \"img\" }, on: { click: function(t) {\n return e.$emit(\"click\", t);\n } } }, \"span\", e.$attrs, !1), [n(\"svg\", { staticClass: \"material-design-icon__svg\", attrs: { fill: e.fillColor, width: e.size, height: e.size, viewBox: \"0 0 24 24\" } }, [n(\"path\", { attrs: { d: \"M10,20V14H14V20H19V12H22L12,3L2,12H5V20H10Z\" } }, [e.title ? n(\"title\", [e._v(e._s(e.title))]) : e._e()])])]);\n}, zt = [], It = /* @__PURE__ */ C(\n Bt,\n Lt,\n zt,\n !1,\n null,\n null,\n null,\n null\n);\nconst Vt = It.exports, Rt = {\n name: \"PlusIcon\",\n emits: [\"click\"],\n props: {\n title: {\n type: String\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n};\nvar Dt = function() {\n var e = this, n = e._self._c;\n return n(\"span\", e._b({ staticClass: \"material-design-icon plus-icon\", attrs: { \"aria-hidden\": !e.title, \"aria-label\": e.title, role: \"img\" }, on: { click: function(t) {\n return e.$emit(\"click\", t);\n } } }, \"span\", e.$attrs, !1), [n(\"svg\", { staticClass: \"material-design-icon__svg\", attrs: { fill: e.fillColor, width: e.size, height: e.size, viewBox: \"0 0 24 24\" } }, [n(\"path\", { attrs: { d: \"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z\" } }, [e.title ? n(\"title\", [e._v(e._s(e.title))]) : e._e()])])]);\n}, Mt = [], Ht = /* @__PURE__ */ C(\n Rt,\n Dt,\n Mt,\n !1,\n null,\n null,\n null,\n null\n);\nconst At = Ht.exports, Tt = /* @__PURE__ */ B({\n __name: \"FilePickerBreadcrumbs\",\n props: {\n path: null,\n showMenu: { type: Boolean }\n },\n emits: [\"update:path\", \"create-node\"],\n setup(s, { emit: e }) {\n const n = s, t = h(\"\"), i = h();\n function l() {\n var a, u, v, k;\n const _ = t.value.trim(), y = (u = (a = i.value) == null ? void 0 : a.$el) == null ? void 0 : u.querySelector(\"input\");\n let f = \"\";\n return _.length === 0 ? f = w(\"Folder name cannot be empty.\") : _.includes(\"/\") ? f = w('\"/\" is not allowed inside a folder name.') : [\"..\", \".\"].includes(_) ? f = w('\"{name}\" is an invalid folder name.', { name: _ }) : (v = window.OC.config) != null && v.blacklist_files_regex && _.match((k = window.OC.config) == null ? void 0 : k.blacklist_files_regex) && (f = w('\"{name}\" is not an allowed folder name', { name: _ })), y && y.setCustomValidity(f), f === \"\";\n }\n const c = function() {\n const a = t.value.trim();\n l() && (e(\"create-node\", a), t.value = \"\");\n }, r = m(\n () => n.path.split(\"/\").filter((a) => a !== \"\").map((a, u, v) => ({\n name: a,\n path: \"/\" + v.slice(0, u + 1).join(\"/\")\n }))\n );\n return { __sfc: !0, props: n, emit: e, newNodeName: t, nameInput: i, validateInput: l, onSubmit: c, pathElements: r, IconFolder: T, IconHome: Vt, IconPlus: At, NcActions: ge, NcActionInput: he, NcBreadcrumbs: ye, NcBreadcrumb: we, t: w };\n }\n});\nvar Et = function() {\n var e = this, n = e._self._c, t = e._self._setupProxy;\n return n(t.NcBreadcrumbs, { staticClass: \"file-picker__breadcrumbs\", scopedSlots: e._u([{ key: \"default\", fn: function() {\n return [n(t.NcBreadcrumb, { attrs: { name: t.t(\"Home\"), title: t.t(\"Home\") }, on: { click: function(i) {\n return t.emit(\"update:path\", \"/\");\n } }, scopedSlots: e._u([{ key: \"icon\", fn: function() {\n return [n(t.IconHome, { attrs: { size: 20 } })];\n }, proxy: !0 }]) }), e._l(t.pathElements, function(i) {\n return n(t.NcBreadcrumb, { key: i.path, attrs: { name: i.name, title: i.path }, on: { click: function(l) {\n return t.emit(\"update:path\", i.path);\n } } });\n })];\n }, proxy: !0 }, e.showMenu ? { key: \"actions\", fn: function() {\n return [n(t.NcActions, { attrs: { \"aria-label\": t.t(\"Create directory\"), \"force-menu\": !0, \"force-name\": !0, \"menu-name\": t.t(\"New\"), type: \"secondary\" }, on: { close: function(i) {\n t.newNodeName = \"\";\n } }, scopedSlots: e._u([{ key: \"icon\", fn: function() {\n return [n(t.IconPlus, { attrs: { size: 20 } })];\n }, proxy: !0 }], null, !1, 2971667417) }, [n(t.NcActionInput, { ref: \"nameInput\", attrs: { value: t.newNodeName, label: t.t(\"New folder\"), placeholder: t.t(\"New folder name\") }, on: { \"update:value\": function(i) {\n t.newNodeName = i;\n }, submit: t.onSubmit, input: t.validateInput }, scopedSlots: e._u([{ key: \"icon\", fn: function() {\n return [n(t.IconFolder, { attrs: { size: 20 } })];\n }, proxy: !0 }], null, !1, 1614167509) })], 1)];\n }, proxy: !0 } : null], null, !0) });\n}, Ut = [], Zt = /* @__PURE__ */ C(\n Tt,\n Et,\n Ut,\n !1,\n null,\n \"3bc9efa5\",\n null,\n null\n);\nconst Ot = Zt.exports, Wt = {\n name: \"ClockIcon\",\n emits: [\"click\"],\n props: {\n title: {\n type: String\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n};\nvar jt = function() {\n var e = this, n = e._self._c;\n return n(\"span\", e._b({ staticClass: \"material-design-icon clock-icon\", attrs: { \"aria-hidden\": !e.title, \"aria-label\": e.title, role: \"img\" }, on: { click: function(t) {\n return e.$emit(\"click\", t);\n } } }, \"span\", e.$attrs, !1), [n(\"svg\", { staticClass: \"material-design-icon__svg\", attrs: { fill: e.fillColor, width: e.size, height: e.size, viewBox: \"0 0 24 24\" } }, [n(\"path\", { attrs: { d: \"M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M16.2,16.2L11,13V7H12.5V12.2L17,14.9L16.2,16.2Z\" } }, [e.title ? n(\"title\", [e._v(e._s(e.title))]) : e._e()])])]);\n}, Gt = [], qt = /* @__PURE__ */ C(\n Wt,\n jt,\n Gt,\n !1,\n null,\n null,\n null,\n null\n);\nconst Kt = qt.exports, Xt = {\n name: \"CloseIcon\",\n emits: [\"click\"],\n props: {\n title: {\n type: String\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n};\nvar Jt = function() {\n var e = this, n = e._self._c;\n return n(\"span\", e._b({ staticClass: \"material-design-icon close-icon\", attrs: { \"aria-hidden\": !e.title, \"aria-label\": e.title, role: \"img\" }, on: { click: function(t) {\n return e.$emit(\"click\", t);\n } } }, \"span\", e.$attrs, !1), [n(\"svg\", { staticClass: \"material-design-icon__svg\", attrs: { fill: e.fillColor, width: e.size, height: e.size, viewBox: \"0 0 24 24\" } }, [n(\"path\", { attrs: { d: \"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z\" } }, [e.title ? n(\"title\", [e._v(e._s(e.title))]) : e._e()])])]);\n}, Qt = [], Yt = /* @__PURE__ */ C(\n Xt,\n Jt,\n Qt,\n !1,\n null,\n null,\n null,\n null\n);\nconst en = Yt.exports, tn = {\n name: \"MagnifyIcon\",\n emits: [\"click\"],\n props: {\n title: {\n type: String\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n};\nvar nn = function() {\n var e = this, n = e._self._c;\n return n(\"span\", e._b({ staticClass: \"material-design-icon magnify-icon\", attrs: { \"aria-hidden\": !e.title, \"aria-label\": e.title, role: \"img\" }, on: { click: function(t) {\n return e.$emit(\"click\", t);\n } } }, \"span\", e.$attrs, !1), [n(\"svg\", { staticClass: \"material-design-icon__svg\", attrs: { fill: e.fillColor, width: e.size, height: e.size, viewBox: \"0 0 24 24\" } }, [n(\"path\", { attrs: { d: \"M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z\" } }, [e.title ? n(\"title\", [e._v(e._s(e.title))]) : e._e()])])]);\n}, ln = [], sn = /* @__PURE__ */ C(\n tn,\n nn,\n ln,\n !1,\n null,\n null,\n null,\n null\n);\nconst an = sn.exports, rn = {\n name: \"StarIcon\",\n emits: [\"click\"],\n props: {\n title: {\n type: String\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n};\nvar on = function() {\n var e = this, n = e._self._c;\n return n(\"span\", e._b({ staticClass: \"material-design-icon star-icon\", attrs: { \"aria-hidden\": !e.title, \"aria-label\": e.title, role: \"img\" }, on: { click: function(t) {\n return e.$emit(\"click\", t);\n } } }, \"span\", e.$attrs, !1), [n(\"svg\", { staticClass: \"material-design-icon__svg\", attrs: { fill: e.fillColor, width: e.size, height: e.size, viewBox: \"0 0 24 24\" } }, [n(\"path\", { attrs: { d: \"M12,17.27L18.18,21L16.54,13.97L22,9.24L14.81,8.62L12,2L9.19,8.62L2,9.24L7.45,13.97L5.82,21L12,17.27Z\" } }, [e.title ? n(\"title\", [e._v(e._s(e.title))]) : e._e()])])]);\n}, cn = [], un = /* @__PURE__ */ C(\n rn,\n on,\n cn,\n !1,\n null,\n null,\n null,\n null\n);\nconst dn = un.exports, _n = /* @__PURE__ */ B({\n __name: \"FilePickerNavigation\",\n props: {\n currentView: null,\n filterString: null,\n isCollapsed: { type: Boolean }\n },\n emits: [\"update:currentView\", \"update:filterString\"],\n setup(s, { emit: e }) {\n const n = s, t = [{\n id: \"files\",\n label: w(\"All files\"),\n icon: T\n }, {\n id: \"recent\",\n label: w(\"Recent\"),\n icon: Kt\n }, {\n id: \"favorites\",\n label: w(\"Favorites\"),\n icon: dn\n }], i = m(() => t.filter((c) => c.id === n.currentView)[0]);\n return { __sfc: !0, allViews: t, props: n, emit: e, currentViewObject: i, updateFilterValue: (c) => e(\"update:filterString\", c), IconClose: en, IconMagnify: an, NcButton: M, NcSelect: Ce, NcTextField: ke, t: w, Fragment: ze };\n }\n});\nvar fn = function() {\n var e = this, n = e._self._c, t = e._self._setupProxy;\n return n(t.Fragment, [n(t.NcTextField, { staticClass: \"file-picker__filter-input\", attrs: { value: e.filterString, label: t.t(\"Filter file list\"), \"show-trailing-button\": !!e.filterString }, on: { \"update:value\": t.updateFilterValue, \"trailing-button-click\": function(i) {\n return t.updateFilterValue(\"\");\n } }, scopedSlots: e._u([{ key: \"trailing-button-icon\", fn: function() {\n return [n(t.IconClose, { attrs: { size: 16 } })];\n }, proxy: !0 }]) }, [n(t.IconMagnify, { attrs: { size: 16 } })], 1), e.isCollapsed ? n(t.NcSelect, { attrs: { \"aria-label\": t.t(\"Current view selector\"), clearable: !1, searchable: !1, options: t.allViews, value: t.currentViewObject }, on: { input: (i) => t.emit(\"update:currentView\", i.id) } }) : n(\"ul\", { staticClass: \"file-picker__side\", attrs: { role: \"tablist\", \"aria-label\": t.t(\"Filepicker sections\") } }, e._l(t.allViews, function(i) {\n return n(\"li\", { key: i.id }, [n(t.NcButton, { attrs: { \"aria-selected\": e.currentView === i.id, type: e.currentView === i.id ? \"primary\" : \"tertiary\", wide: !0, role: \"tab\" }, on: { click: function(l) {\n return e.$emit(\"update:currentView\", i.id);\n } }, scopedSlots: e._u([{ key: \"icon\", fn: function() {\n return [n(i.icon, { tag: \"component\", attrs: { size: 20 } })];\n }, proxy: !0 }], null, !0) }, [e._v(\" \" + e._s(i.label) + \" \")])], 1);\n }), 0)], 1);\n}, pn = [], vn = /* @__PURE__ */ C(\n _n,\n fn,\n pn,\n !1,\n null,\n \"fcfd0f23\",\n null,\n null\n);\nconst mn = vn.exports;\n/**\n * @copyright Copyright (c) 2023 Ferdinand Thiessen <opensource@fthiessen.de>\n *\n * @author Ferdinand Thiessen <opensource@fthiessen.de>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst gn = function(s, e) {\n const n = $e(), t = h([]), i = h(!0);\n async function l(r, a = D) {\n const u = await n.stat(\"\".concat(a).concat(r), {\n details: !0\n });\n return R(u.data);\n }\n async function c() {\n if (i.value = !0, s.value === \"favorites\")\n t.value = await xe(n, e.value);\n else if (s.value === \"recent\") {\n const r = Math.round(Date.now() / 1e3) - 1209600, { data: a } = await n.search(\"/\", {\n details: !0,\n data: Ne(r)\n });\n t.value = a.results.map((u) => R(u));\n } else {\n const r = await n.getDirectoryContents(\"\".concat(D).concat(e.value), {\n details: !0,\n data: Pe()\n });\n t.value = r.data.map((a) => R(a));\n }\n i.value = !1;\n }\n return ie([s, e], () => c()), V(() => c()), {\n isLoading: i,\n files: t,\n loadFiles: () => c(),\n getFile: l,\n client: n\n };\n};\n/**\n * @copyright Copyright (c) 2023 Ferdinand Thiessen <opensource@fthiessen.de>\n *\n * @author Ferdinand Thiessen <opensource@fthiessen.de>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst hn = function(s) {\n const e = m(() => s.value.map((t) => t.split(\"/\")));\n return {\n isSupportedMimeType: (t) => {\n const i = t.split(\"/\");\n return e.value.some(\n ([l, c]) => (\n // check mime type matches or is wildcard\n (i[0] === l || l === \"*\") && (i[1] === c || c === \"*\")\n )\n );\n }\n };\n}, yn = {\n name: \"FilePicker\"\n}, wn = /* @__PURE__ */ B({\n ...yn,\n props: {\n buttons: null,\n name: null,\n allowPickDirectory: { type: Boolean, default: !1 },\n container: { default: \"body\" },\n filterFn: { default: void 0 },\n mimetypeFilter: { default: () => [] },\n multiselect: { type: Boolean, default: !0 },\n path: { default: \"/\" }\n },\n emits: [\"close\"],\n setup(s, { emit: e }) {\n const n = s, t = m(() => ({\n container: n.container,\n name: n.name,\n buttons: i.value,\n size: \"large\",\n contentClasses: [\"file-picker__content\"],\n dialogClasses: [\"file-picker\"],\n navigationClasses: [\"file-picker__navigation\"]\n })), i = m(() => (typeof n.buttons == \"function\" ? n.buttons(r.value, v.value, l.value) : n.buttons).map((d) => ({\n ...d,\n callback: async () => {\n const b = r.value.length === 0 && n.allowPickDirectory ? [await S(v.value)] : r.value;\n d.callback(b), e(\"close\", r.value);\n }\n }))), l = h(\"files\"), c = m(() => l.value === \"favorites\" ? w(\"Favorites\") : l.value === \"recent\" ? w(\"Recent\") : \"\"), r = h([]), a = h((window == null ? void 0 : window.sessionStorage.getItem(\"NC.FilePicker.LastPath\")) || \"/\"), u = h(), v = m({\n // Only use the path for the files view as favorites and recent only works on the root\n get: () => l.value === \"files\" ? u.value || n.path || a.value : \"/\",\n /**\n * Navigate to the new path and save it to the session storage\n *\n * @param path The new path\n */\n set: (o) => {\n n.path === void 0 && window.sessionStorage.setItem(\"NC.FilePicker.LastPath\", o), u.value = o, r.value = [];\n }\n }), k = h(\"\"), { isSupportedMimeType: _ } = hn(fe(n, \"mimetypeFilter\")), { files: y, isLoading: f, loadFiles: F, getFile: S, client: P } = gn(l, v);\n V(() => F());\n const { showHiddenFiles: $ } = A(), g = m(() => {\n let o = y.value;\n return $.value || (o = o.filter((d) => !d.basename.startsWith(\".\"))), n.mimetypeFilter.length > 0 && (o = o.filter((d) => d.type === \"folder\" || d.mime && _(d.mime))), k.value && (o = o.filter((d) => d.basename.toLowerCase().includes(k.value.toLowerCase()))), n.filterFn && (o = o.filter((d) => n.filterFn(d))), o;\n }), x = m(() => l.value === \"files\" ? w(\"Upload some content or sync with your devices!\") : l.value === \"recent\" ? w(\"Files and folders you recently modified will show up here.\") : w(\"Files and folders you mark as favorite will show up here.\"));\n return { __sfc: !0, props: n, emit: e, dialogProps: t, dialogButtons: i, currentView: l, viewHeadline: c, selectedFiles: r, savedPath: a, navigatedPath: u, currentPath: v, filterString: k, isSupportedMimeType: _, files: y, isLoading: f, loadFiles: F, getFile: S, client: P, showHiddenFiles: $, filteredFiles: g, noFilesDescription: x, onCreateFolder: (o) => {\n P.createDirectory(se(D, v.value, o)).then(() => F()).catch((d) => Le(w(\"Could not create the new folder\")));\n }, IconFile: oe, DialogBase: je, FileList: Pt, FilePickerBreadcrumbs: Ot, FilePickerNavigation: mn, NcEmptyContent: be, t: w };\n }\n});\nvar Cn = function() {\n var e = this, n = e._self._c, t = e._self._setupProxy;\n return n(t.DialogBase, e._b({ on: { close: function(i) {\n return t.emit(\"close\");\n } }, scopedSlots: e._u([{ key: \"navigation\", fn: function({ isCollapsed: i }) {\n return [n(t.FilePickerNavigation, { attrs: { \"is-collapsed\": i, \"current-view\": t.currentView, \"filter-string\": t.filterString }, on: { \"update:currentView\": function(l) {\n t.currentView = l;\n }, \"update:current-view\": function(l) {\n t.currentView = l;\n }, \"update:filterString\": function(l) {\n t.filterString = l;\n }, \"update:filter-string\": function(l) {\n t.filterString = l;\n } } })];\n } }]) }, \"DialogBase\", t.dialogProps, !1), [n(\"div\", { staticClass: \"file-picker__main\" }, [t.currentView === \"files\" ? n(t.FilePickerBreadcrumbs, { attrs: { path: t.currentPath, \"show-menu\": e.allowPickDirectory }, on: { \"update:path\": function(i) {\n t.currentPath = i;\n }, \"create-node\": t.onCreateFolder } }) : n(\"div\", { staticClass: \"file-picker__view\" }, [n(\"h3\", [e._v(e._s(t.viewHeadline))])]), t.isLoading || t.filteredFiles.length > 0 ? n(t.FileList, { attrs: { \"allow-pick-directory\": e.allowPickDirectory, \"current-view\": t.currentView, files: t.filteredFiles, multiselect: e.multiselect, loading: t.isLoading, path: t.currentPath, \"selected-files\": t.selectedFiles, name: t.viewHeadline }, on: { \"update:path\": [function(i) {\n t.currentPath = i;\n }, function(i) {\n t.currentView = \"files\";\n }], \"update:selectedFiles\": function(i) {\n t.selectedFiles = i;\n }, \"update:selected-files\": function(i) {\n t.selectedFiles = i;\n } } }) : t.filterString ? n(t.NcEmptyContent, { attrs: { name: t.t(\"No matching files\"), description: t.t(\"No files matching your filter were found.\") }, scopedSlots: e._u([{ key: \"icon\", fn: function() {\n return [n(t.IconFile)];\n }, proxy: !0 }]) }) : n(t.NcEmptyContent, { attrs: { name: t.t(\"No files in here\"), description: t.noFilesDescription }, scopedSlots: e._u([{ key: \"icon\", fn: function() {\n return [n(t.IconFile)];\n }, proxy: !0 }]) })], 1)]);\n}, kn = [], bn = /* @__PURE__ */ C(\n wn,\n Cn,\n kn,\n !1,\n null,\n \"f979a44d\",\n null,\n null\n);\nconst Rn = bn.exports;\nexport {\n Rn as default\n};\n","import { getCurrentUser as A, getRequestToken as ue } from \"@nextcloud/auth\";\nimport { getLoggerBuilder as q } from \"@nextcloud/logger\";\nimport { getCanonicalLocale as de } from \"@nextcloud/l10n\";\nimport { join as ae, basename as le, extname as fe, dirname as I } from \"path\";\nimport { encodePath as ce } from \"@nextcloud/paths\";\nimport { generateRemoteUrl as he } from \"@nextcloud/router\";\nimport { createClient as pe, getPatcher as ge } from \"webdav\";\nimport { request as we } from \"webdav/dist/node/request.js\";\n/**\n * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst me = (e) => e === null ? q().setApp(\"files\").build() : q().setApp(\"files\").setUid(e.uid).build(), m = me(A());\n/**\n * @copyright Copyright (c) 2021 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass Ne {\n _entries = [];\n registerEntry(t) {\n this.validateEntry(t), this._entries.push(t);\n }\n unregisterEntry(t) {\n const r = typeof t == \"string\" ? this.getEntryIndex(t) : this.getEntryIndex(t.id);\n if (r === -1) {\n m.warn(\"Entry not found, nothing removed\", { entry: t, entries: this.getEntries() });\n return;\n }\n this._entries.splice(r, 1);\n }\n /**\n * Get the list of registered entries\n *\n * @param {Folder} context the creation context. Usually the current folder\n */\n getEntries(t) {\n return t ? this._entries.filter((r) => typeof r.enabled == \"function\" ? r.enabled(t) : !0) : this._entries;\n }\n getEntryIndex(t) {\n return this._entries.findIndex((r) => r.id === t);\n }\n validateEntry(t) {\n if (!t.id || !t.displayName || !(t.iconSvgInline || t.iconClass) || !t.handler)\n throw new Error(\"Invalid entry\");\n if (typeof t.id != \"string\" || typeof t.displayName != \"string\")\n throw new Error(\"Invalid id or displayName property\");\n if (t.iconClass && typeof t.iconClass != \"string\" || t.iconSvgInline && typeof t.iconSvgInline != \"string\")\n throw new Error(\"Invalid icon provided\");\n if (t.enabled !== void 0 && typeof t.enabled != \"function\")\n throw new Error(\"Invalid enabled property\");\n if (typeof t.handler != \"function\")\n throw new Error(\"Invalid handler property\");\n if (\"order\" in t && typeof t.order != \"number\")\n throw new Error(\"Invalid order property\");\n if (this.getEntryIndex(t.id) !== -1)\n throw new Error(\"Duplicate entry\");\n }\n}\nconst F = function() {\n return typeof window._nc_newfilemenu > \"u\" && (window._nc_newfilemenu = new Ne(), m.debug(\"NewFileMenu initialized\")), window._nc_newfilemenu;\n};\n/**\n * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst C = [\"B\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\"], P = [\"B\", \"KiB\", \"MiB\", \"GiB\", \"TiB\", \"PiB\"];\nfunction Jt(e, t = !1, r = !0) {\n typeof e == \"string\" && (e = Number(e));\n let s = e > 0 ? Math.floor(Math.log(e) / Math.log(r ? 1024 : 1e3)) : 0;\n s = Math.min((r ? P.length : C.length) - 1, s);\n const n = r ? P[s] : C[s];\n let i = (e / Math.pow(r ? 1024 : 1e3, s)).toFixed(1);\n return t === !0 && s === 0 ? (i !== \"0.0\" ? \"< 1 \" : \"0 \") + (r ? P[1] : C[1]) : (s < 2 ? i = parseFloat(i).toFixed(0) : i = parseFloat(i).toLocaleString(de()), i + \" \" + n);\n}\nfunction Qt(e, t = !1) {\n try {\n e = `${e}`.toLocaleLowerCase().replaceAll(/\\s+/g, \"\").replaceAll(\",\", \".\");\n } catch {\n return null;\n }\n const r = e.match(/^([0-9]*(\\.[0-9]*)?)([kmgtp]?)(i?)b?$/);\n if (r === null || r[1] === \".\" || r[1] === \"\")\n return null;\n const s = {\n \"\": 0,\n k: 1,\n m: 2,\n g: 3,\n t: 4,\n p: 5,\n e: 6\n }, n = `${r[1]}`, i = r[4] === \"i\" || t ? 1024 : 1e3;\n return Math.round(Number.parseFloat(n) * i ** s[r[3]]);\n}\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nvar Z = /* @__PURE__ */ ((e) => (e.DEFAULT = \"default\", e.HIDDEN = \"hidden\", e))(Z || {});\nclass Dt {\n _action;\n constructor(t) {\n this.validateAction(t), this._action = t;\n }\n get id() {\n return this._action.id;\n }\n get displayName() {\n return this._action.displayName;\n }\n get title() {\n return this._action.title;\n }\n get iconSvgInline() {\n return this._action.iconSvgInline;\n }\n get enabled() {\n return this._action.enabled;\n }\n get exec() {\n return this._action.exec;\n }\n get execBatch() {\n return this._action.execBatch;\n }\n get order() {\n return this._action.order;\n }\n get default() {\n return this._action.default;\n }\n get inline() {\n return this._action.inline;\n }\n get renderInline() {\n return this._action.renderInline;\n }\n validateAction(t) {\n if (!t.id || typeof t.id != \"string\")\n throw new Error(\"Invalid id\");\n if (!t.displayName || typeof t.displayName != \"function\")\n throw new Error(\"Invalid displayName function\");\n if (\"title\" in t && typeof t.title != \"function\")\n throw new Error(\"Invalid title function\");\n if (!t.iconSvgInline || typeof t.iconSvgInline != \"function\")\n throw new Error(\"Invalid iconSvgInline function\");\n if (!t.exec || typeof t.exec != \"function\")\n throw new Error(\"Invalid exec function\");\n if (\"enabled\" in t && typeof t.enabled != \"function\")\n throw new Error(\"Invalid enabled function\");\n if (\"execBatch\" in t && typeof t.execBatch != \"function\")\n throw new Error(\"Invalid execBatch function\");\n if (\"order\" in t && typeof t.order != \"number\")\n throw new Error(\"Invalid order\");\n if (t.default && !Object.values(Z).includes(t.default))\n throw new Error(\"Invalid default\");\n if (\"inline\" in t && typeof t.inline != \"function\")\n throw new Error(\"Invalid inline function\");\n if (\"renderInline\" in t && typeof t.renderInline != \"function\")\n throw new Error(\"Invalid renderInline function\");\n }\n}\nconst er = function(e) {\n if (typeof window._nc_fileactions > \"u\" && (window._nc_fileactions = [], m.debug(\"FileActions initialized\")), window._nc_fileactions.find((t) => t.id === e.id)) {\n m.error(`FileAction ${e.id} already registered`, { action: e });\n return;\n }\n window._nc_fileactions.push(e);\n}, tr = function() {\n return typeof window._nc_fileactions > \"u\" && (window._nc_fileactions = [], m.debug(\"FileActions initialized\")), window._nc_fileactions;\n};\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass rr {\n _header;\n constructor(t) {\n this.validateHeader(t), this._header = t;\n }\n get id() {\n return this._header.id;\n }\n get order() {\n return this._header.order;\n }\n get enabled() {\n return this._header.enabled;\n }\n get render() {\n return this._header.render;\n }\n get updated() {\n return this._header.updated;\n }\n validateHeader(t) {\n if (!t.id || !t.render || !t.updated)\n throw new Error(\"Invalid header: id, render and updated are required\");\n if (typeof t.id != \"string\")\n throw new Error(\"Invalid id property\");\n if (t.enabled !== void 0 && typeof t.enabled != \"function\")\n throw new Error(\"Invalid enabled property\");\n if (t.render && typeof t.render != \"function\")\n throw new Error(\"Invalid render property\");\n if (t.updated && typeof t.updated != \"function\")\n throw new Error(\"Invalid updated property\");\n }\n}\nconst nr = function(e) {\n if (typeof window._nc_filelistheader > \"u\" && (window._nc_filelistheader = [], m.debug(\"FileListHeaders initialized\")), window._nc_filelistheader.find((t) => t.id === e.id)) {\n m.error(`Header ${e.id} already registered`, { header: e });\n return;\n }\n window._nc_filelistheader.push(e);\n}, ir = function() {\n return typeof window._nc_filelistheader > \"u\" && (window._nc_filelistheader = [], m.debug(\"FileListHeaders initialized\")), window._nc_filelistheader;\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nvar N = /* @__PURE__ */ ((e) => (e[e.NONE = 0] = \"NONE\", e[e.CREATE = 4] = \"CREATE\", e[e.READ = 1] = \"READ\", e[e.UPDATE = 2] = \"UPDATE\", e[e.DELETE = 8] = \"DELETE\", e[e.SHARE = 16] = \"SHARE\", e[e.ALL = 31] = \"ALL\", e))(N || {});\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Ferdinand Thiessen <opensource@fthiessen.de>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst j = [\n \"d:getcontentlength\",\n \"d:getcontenttype\",\n \"d:getetag\",\n \"d:getlastmodified\",\n \"d:quota-available-bytes\",\n \"d:resourcetype\",\n \"nc:has-preview\",\n \"nc:is-encrypted\",\n \"nc:mount-type\",\n \"nc:share-attributes\",\n \"oc:comments-unread\",\n \"oc:favorite\",\n \"oc:fileid\",\n \"oc:owner-display-name\",\n \"oc:owner-id\",\n \"oc:permissions\",\n \"oc:share-types\",\n \"oc:size\",\n \"ocs:share-permissions\"\n], Y = {\n d: \"DAV:\",\n nc: \"http://nextcloud.org/ns\",\n oc: \"http://owncloud.org/ns\",\n ocs: \"http://open-collaboration-services.org/ns\"\n}, sr = function(e, t = { nc: \"http://nextcloud.org/ns\" }) {\n typeof window._nc_dav_properties > \"u\" && (window._nc_dav_properties = [...j], window._nc_dav_namespaces = { ...Y });\n const r = { ...window._nc_dav_namespaces, ...t };\n if (window._nc_dav_properties.find((n) => n === e))\n return m.error(`${e} already registered`, { prop: e }), !1;\n if (e.startsWith(\"<\") || e.split(\":\").length !== 2)\n return m.error(`${e} is not valid. See example: 'oc:fileid'`, { prop: e }), !1;\n const s = e.split(\":\")[0];\n return r[s] ? (window._nc_dav_properties.push(e), window._nc_dav_namespaces = r, !0) : (m.error(`${e} namespace unknown`, { prop: e, namespaces: r }), !1);\n}, V = function() {\n return typeof window._nc_dav_properties > \"u\" && (window._nc_dav_properties = [...j]), window._nc_dav_properties.map((e) => `<${e} />`).join(\" \");\n}, L = function() {\n return typeof window._nc_dav_namespaces > \"u\" && (window._nc_dav_namespaces = { ...Y }), Object.keys(window._nc_dav_namespaces).map((e) => `xmlns:${e}=\"${window._nc_dav_namespaces?.[e]}\"`).join(\" \");\n}, or = function() {\n return `<?xml version=\"1.0\"?>\n\t\t<d:propfind ${L()}>\n\t\t\t<d:prop>\n\t\t\t\t${V()}\n\t\t\t</d:prop>\n\t\t</d:propfind>`;\n}, Ee = function() {\n return `<?xml version=\"1.0\"?>\n\t\t<oc:filter-files ${L()}>\n\t\t\t<d:prop>\n\t\t\t\t${V()}\n\t\t\t</d:prop>\n\t\t\t<oc:filter-rules>\n\t\t\t\t<oc:favorite>1</oc:favorite>\n\t\t\t</oc:filter-rules>\n\t\t</oc:filter-files>`;\n}, ur = function(e) {\n return `<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<d:searchrequest ${L()}\n\txmlns:ns=\"https://github.com/icewind1991/SearchDAV/ns\">\n\t<d:basicsearch>\n\t\t<d:select>\n\t\t\t<d:prop>\n\t\t\t\t${V()}\n\t\t\t</d:prop>\n\t\t</d:select>\n\t\t<d:from>\n\t\t\t<d:scope>\n\t\t\t\t<d:href>/files/${A()?.uid}/</d:href>\n\t\t\t\t<d:depth>infinity</d:depth>\n\t\t\t</d:scope>\n\t\t</d:from>\n\t\t<d:where>\n\t\t\t<d:and>\n\t\t\t\t<d:or>\n\t\t\t\t\t<d:not>\n\t\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t\t<d:getcontenttype/>\n\t\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t\t<d:literal>httpd/unix-directory</d:literal>\n\t\t\t\t\t\t</d:eq>\n\t\t\t\t\t</d:not>\n\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t<oc:size/>\n\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t<d:literal>0</d:literal>\n\t\t\t\t\t</d:eq>\n\t\t\t\t</d:or>\n\t\t\t\t<d:gt>\n\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t\t</d:prop>\n\t\t\t\t\t<d:literal>${e}</d:literal>\n\t\t\t\t</d:gt>\n\t\t\t</d:and>\n\t\t</d:where>\n\t\t<d:orderby>\n\t\t\t<d:order>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t</d:prop>\n\t\t\t\t<d:descending/>\n\t\t\t</d:order>\n\t\t</d:orderby>\n\t\t<d:limit>\n\t\t\t<d:nresults>100</d:nresults>\n\t\t\t<ns:firstresult>0</ns:firstresult>\n\t\t</d:limit>\n\t</d:basicsearch>\n</d:searchrequest>`;\n};\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Ferdinand Thiessen <opensource@fthiessen.de>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst be = function(e = \"\") {\n let t = N.NONE;\n return e && ((e.includes(\"C\") || e.includes(\"K\")) && (t |= N.CREATE), e.includes(\"G\") && (t |= N.READ), (e.includes(\"W\") || e.includes(\"N\") || e.includes(\"V\")) && (t |= N.UPDATE), e.includes(\"D\") && (t |= N.DELETE), e.includes(\"R\") && (t |= N.SHARE)), t;\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nvar S = /* @__PURE__ */ ((e) => (e.Folder = \"folder\", e.File = \"file\", e))(S || {});\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst J = function(e, t) {\n return e.match(t) !== null;\n}, X = (e, t) => {\n if (e.id && typeof e.id != \"number\")\n throw new Error(\"Invalid id type of value\");\n if (!e.source)\n throw new Error(\"Missing mandatory source\");\n try {\n new URL(e.source);\n } catch {\n throw new Error(\"Invalid source format, source must be a valid URL\");\n }\n if (!e.source.startsWith(\"http\"))\n throw new Error(\"Invalid source format, only http(s) is supported\");\n if (e.mtime && !(e.mtime instanceof Date))\n throw new Error(\"Invalid mtime type\");\n if (e.crtime && !(e.crtime instanceof Date))\n throw new Error(\"Invalid crtime type\");\n if (!e.mime || typeof e.mime != \"string\" || !e.mime.match(/^[-\\w.]+\\/[-+\\w.]+$/gi))\n throw new Error(\"Missing or invalid mandatory mime\");\n if (\"size\" in e && typeof e.size != \"number\" && e.size !== void 0)\n throw new Error(\"Invalid size type\");\n if (\"permissions\" in e && e.permissions !== void 0 && !(typeof e.permissions == \"number\" && e.permissions >= N.NONE && e.permissions <= N.ALL))\n throw new Error(\"Invalid permissions\");\n if (e.owner && e.owner !== null && typeof e.owner != \"string\")\n throw new Error(\"Invalid owner type\");\n if (e.attributes && typeof e.attributes != \"object\")\n throw new Error(\"Invalid attributes type\");\n if (e.root && typeof e.root != \"string\")\n throw new Error(\"Invalid root type\");\n if (e.root && !e.root.startsWith(\"/\"))\n throw new Error(\"Root must start with a leading slash\");\n if (e.root && !e.source.includes(e.root))\n throw new Error(\"Root must be part of the source\");\n if (e.root && J(e.source, t)) {\n const r = e.source.match(t)[0];\n if (!e.source.includes(ae(r, e.root)))\n throw new Error(\"The root must be relative to the service. e.g /files/emma\");\n }\n if (e.status && !Object.values(Q).includes(e.status))\n throw new Error(\"Status must be a valid NodeStatus\");\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nvar Q = /* @__PURE__ */ ((e) => (e.NEW = \"new\", e.FAILED = \"failed\", e.LOADING = \"loading\", e.LOCKED = \"locked\", e))(Q || {});\nclass D {\n _data;\n _attributes;\n _knownDavService = /(remote|public)\\.php\\/(web)?dav/i;\n constructor(t, r) {\n X(t, r || this._knownDavService), this._data = t;\n const s = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n set: (n, i, d) => (this.updateMtime(), Reflect.set(n, i, d)),\n deleteProperty: (n, i) => (this.updateMtime(), Reflect.deleteProperty(n, i))\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n };\n this._attributes = new Proxy(t.attributes || {}, s), delete this._data.attributes, r && (this._knownDavService = r);\n }\n /**\n * Get the source url to this object\n */\n get source() {\n return this._data.source.replace(/\\/$/i, \"\");\n }\n /**\n * Get the encoded source url to this object for requests purposes\n */\n get encodedSource() {\n const { origin: t } = new URL(this.source);\n return t + ce(this.source.slice(t.length));\n }\n /**\n * Get this object name\n */\n get basename() {\n return le(this.source);\n }\n /**\n * Get this object's extension\n */\n get extension() {\n return fe(this.source);\n }\n /**\n * Get the directory path leading to this object\n * Will use the relative path to root if available\n */\n get dirname() {\n if (this.root) {\n const r = this.source.indexOf(this.root);\n return I(this.source.slice(r + this.root.length) || \"/\");\n }\n const t = new URL(this.source);\n return I(t.pathname);\n }\n /**\n * Get the file mime\n */\n get mime() {\n return this._data.mime;\n }\n /**\n * Get the file modification time\n */\n get mtime() {\n return this._data.mtime;\n }\n /**\n * Get the file creation time\n */\n get crtime() {\n return this._data.crtime;\n }\n /**\n * Get the file size\n */\n get size() {\n return this._data.size;\n }\n /**\n * Get the file attribute\n */\n get attributes() {\n return this._attributes;\n }\n /**\n * Get the file permissions\n */\n get permissions() {\n return this.owner === null && !this.isDavRessource ? N.READ : this._data.permissions !== void 0 ? this._data.permissions : N.NONE;\n }\n /**\n * Get the file owner\n */\n get owner() {\n return this.isDavRessource ? this._data.owner : null;\n }\n /**\n * Is this a dav-related ressource ?\n */\n get isDavRessource() {\n return J(this.source, this._knownDavService);\n }\n /**\n * Get the dav root of this object\n */\n get root() {\n return this._data.root ? this._data.root.replace(/^(.+)\\/$/, \"$1\") : this.isDavRessource && I(this.source).split(this._knownDavService).pop() || null;\n }\n /**\n * Get the absolute path of this object relative to the root\n */\n get path() {\n if (this.root) {\n const t = this.source.indexOf(this.root);\n return this.source.slice(t + this.root.length) || \"/\";\n }\n return (this.dirname + \"/\" + this.basename).replace(/\\/\\//g, \"/\");\n }\n /**\n * Get the node id if defined.\n * Will look for the fileid in attributes if undefined.\n */\n get fileid() {\n return this._data?.id || this.attributes?.fileid;\n }\n /**\n * Get the node status.\n */\n get status() {\n return this._data?.status;\n }\n /**\n * Set the node status.\n */\n set status(t) {\n this._data.status = t;\n }\n /**\n * Move the node to a new destination\n *\n * @param {string} destination the new source.\n * e.g. https://cloud.domain.com/remote.php/dav/files/emma/Photos/picture.jpg\n */\n move(t) {\n X({ ...this._data, source: t }, this._knownDavService), this._data.source = t, this.updateMtime();\n }\n /**\n * Rename the node\n * This aliases the move method for easier usage\n *\n * @param basename The new name of the node\n */\n rename(t) {\n if (t.includes(\"/\"))\n throw new Error(\"Invalid basename\");\n this.move(I(this.source) + \"/\" + t);\n }\n /**\n * Update the mtime if exists.\n */\n updateMtime() {\n this._data.mtime && (this._data.mtime = /* @__PURE__ */ new Date());\n }\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass ye extends D {\n get type() {\n return S.File;\n }\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass _e extends D {\n constructor(t) {\n super({\n ...t,\n mime: \"httpd/unix-directory\"\n });\n }\n get type() {\n return S.Folder;\n }\n get extension() {\n return null;\n }\n get mime() {\n return \"httpd/unix-directory\";\n }\n}\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Ferdinand Thiessen <opensource@fthiessen.de>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst ee = `/files/${A()?.uid}`, te = he(\"dav\"), dr = function(e = te) {\n const t = pe(e, {\n headers: {\n requesttoken: ue() || \"\"\n }\n });\n return ge().patch(\"request\", (s) => (s.headers?.method && (s.method = s.headers.method, delete s.headers.method), we(s))), t;\n}, ar = async (e, t = \"/\", r = ee) => (await e.getDirectoryContents(`${r}${t}`, {\n details: !0,\n data: Ee(),\n headers: {\n // see davGetClient for patched webdav client\n method: \"REPORT\"\n },\n includeSelf: !0\n})).data.filter((n) => n.filename !== t).map((n) => ve(n, r)), ve = function(e, t = ee, r = te) {\n const s = e.props, n = be(s?.permissions), i = A()?.uid, d = {\n id: s?.fileid || 0,\n source: `${r}${e.filename}`,\n mtime: new Date(Date.parse(e.lastmod)),\n mime: e.mime,\n size: s?.size || Number.parseInt(s.getcontentlength || \"0\"),\n permissions: n,\n owner: i,\n root: t,\n attributes: {\n ...e,\n ...s,\n hasPreview: s?.[\"has-preview\"]\n }\n };\n return delete d.attributes?.props, e.type === \"file\" ? new ye(d) : new _e(d);\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass Te {\n _views = [];\n _currentView = null;\n register(t) {\n if (this._views.find((r) => r.id === t.id))\n throw new Error(`View id ${t.id} is already registered`);\n this._views.push(t);\n }\n remove(t) {\n const r = this._views.findIndex((s) => s.id === t);\n r !== -1 && this._views.splice(r, 1);\n }\n get views() {\n return this._views;\n }\n setActive(t) {\n this._currentView = t;\n }\n get active() {\n return this._currentView;\n }\n}\nconst lr = function() {\n return typeof window._nc_navigation > \"u\" && (window._nc_navigation = new Te(), m.debug(\"Navigation service initialized\")), window._nc_navigation;\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass Ie {\n _column;\n constructor(t) {\n Ae(t), this._column = t;\n }\n get id() {\n return this._column.id;\n }\n get title() {\n return this._column.title;\n }\n get render() {\n return this._column.render;\n }\n get sort() {\n return this._column.sort;\n }\n get summary() {\n return this._column.summary;\n }\n}\nconst Ae = function(e) {\n if (!e.id || typeof e.id != \"string\")\n throw new Error(\"A column id is required\");\n if (!e.title || typeof e.title != \"string\")\n throw new Error(\"A column title is required\");\n if (!e.render || typeof e.render != \"function\")\n throw new Error(\"A render function is required\");\n if (e.sort && typeof e.sort != \"function\")\n throw new Error(\"Column sortFunction must be a function\");\n if (e.summary && typeof e.summary != \"function\")\n throw new Error(\"Column summary must be a function\");\n return !0;\n};\nvar R = {}, O = {};\n(function(e) {\n const t = \":A-Za-z_\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\", r = t + \"\\\\-.\\\\d\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040\", s = \"[\" + t + \"][\" + r + \"]*\", n = new RegExp(\"^\" + s + \"$\"), i = function(u, o) {\n const a = [];\n let l = o.exec(u);\n for (; l; ) {\n const f = [];\n f.startIndex = o.lastIndex - l[0].length;\n const c = l.length;\n for (let g = 0; g < c; g++)\n f.push(l[g]);\n a.push(f), l = o.exec(u);\n }\n return a;\n }, d = function(u) {\n const o = n.exec(u);\n return !(o === null || typeof o > \"u\");\n };\n e.isExist = function(u) {\n return typeof u < \"u\";\n }, e.isEmptyObject = function(u) {\n return Object.keys(u).length === 0;\n }, e.merge = function(u, o, a) {\n if (o) {\n const l = Object.keys(o), f = l.length;\n for (let c = 0; c < f; c++)\n a === \"strict\" ? u[l[c]] = [o[l[c]]] : u[l[c]] = o[l[c]];\n }\n }, e.getValue = function(u) {\n return e.isExist(u) ? u : \"\";\n }, e.isName = d, e.getAllMatches = i, e.nameRegexp = s;\n})(O);\nconst M = O, Oe = {\n allowBooleanAttributes: !1,\n //A tag can have attributes without any value\n unpairedTags: []\n};\nR.validate = function(e, t) {\n t = Object.assign({}, Oe, t);\n const r = [];\n let s = !1, n = !1;\n e[0] === \"\\uFEFF\" && (e = e.substr(1));\n for (let i = 0; i < e.length; i++)\n if (e[i] === \"<\" && e[i + 1] === \"?\") {\n if (i += 2, i = G(e, i), i.err)\n return i;\n } else if (e[i] === \"<\") {\n let d = i;\n if (i++, e[i] === \"!\") {\n i = z(e, i);\n continue;\n } else {\n let u = !1;\n e[i] === \"/\" && (u = !0, i++);\n let o = \"\";\n for (; i < e.length && e[i] !== \">\" && e[i] !== \" \" && e[i] !== \"\t\" && e[i] !== `\n` && e[i] !== \"\\r\"; i++)\n o += e[i];\n if (o = o.trim(), o[o.length - 1] === \"/\" && (o = o.substring(0, o.length - 1), i--), !Se(o)) {\n let f;\n return o.trim().length === 0 ? f = \"Invalid space after '<'.\" : f = \"Tag '\" + o + \"' is an invalid name.\", p(\"InvalidTag\", f, w(e, i));\n }\n const a = xe(e, i);\n if (a === !1)\n return p(\"InvalidAttr\", \"Attributes for '\" + o + \"' have open quote.\", w(e, i));\n let l = a.value;\n if (i = a.index, l[l.length - 1] === \"/\") {\n const f = i - l.length;\n l = l.substring(0, l.length - 1);\n const c = H(l, t);\n if (c === !0)\n s = !0;\n else\n return p(c.err.code, c.err.msg, w(e, f + c.err.line));\n } else if (u)\n if (a.tagClosed) {\n if (l.trim().length > 0)\n return p(\"InvalidTag\", \"Closing tag '\" + o + \"' can't have attributes or invalid starting.\", w(e, d));\n {\n const f = r.pop();\n if (o !== f.tagName) {\n let c = w(e, f.tagStartPos);\n return p(\n \"InvalidTag\",\n \"Expected closing tag '\" + f.tagName + \"' (opened in line \" + c.line + \", col \" + c.col + \") instead of closing tag '\" + o + \"'.\",\n w(e, d)\n );\n }\n r.length == 0 && (n = !0);\n }\n } else\n return p(\"InvalidTag\", \"Closing tag '\" + o + \"' doesn't have proper closing.\", w(e, i));\n else {\n const f = H(l, t);\n if (f !== !0)\n return p(f.err.code, f.err.msg, w(e, i - l.length + f.err.line));\n if (n === !0)\n return p(\"InvalidXml\", \"Multiple possible root nodes found.\", w(e, i));\n t.unpairedTags.indexOf(o) !== -1 || r.push({ tagName: o, tagStartPos: d }), s = !0;\n }\n for (i++; i < e.length; i++)\n if (e[i] === \"<\")\n if (e[i + 1] === \"!\") {\n i++, i = z(e, i);\n continue;\n } else if (e[i + 1] === \"?\") {\n if (i = G(e, ++i), i.err)\n return i;\n } else\n break;\n else if (e[i] === \"&\") {\n const f = Ve(e, i);\n if (f == -1)\n return p(\"InvalidChar\", \"char '&' is not expected.\", w(e, i));\n i = f;\n } else if (n === !0 && !U(e[i]))\n return p(\"InvalidXml\", \"Extra text at the end\", w(e, i));\n e[i] === \"<\" && i--;\n }\n } else {\n if (U(e[i]))\n continue;\n return p(\"InvalidChar\", \"char '\" + e[i] + \"' is not expected.\", w(e, i));\n }\n if (s) {\n if (r.length == 1)\n return p(\"InvalidTag\", \"Unclosed tag '\" + r[0].tagName + \"'.\", w(e, r[0].tagStartPos));\n if (r.length > 0)\n return p(\"InvalidXml\", \"Invalid '\" + JSON.stringify(r.map((i) => i.tagName), null, 4).replace(/\\r?\\n/g, \"\") + \"' found.\", { line: 1, col: 1 });\n } else\n return p(\"InvalidXml\", \"Start tag expected.\", 1);\n return !0;\n};\nfunction U(e) {\n return e === \" \" || e === \"\t\" || e === `\n` || e === \"\\r\";\n}\nfunction G(e, t) {\n const r = t;\n for (; t < e.length; t++)\n if (e[t] == \"?\" || e[t] == \" \") {\n const s = e.substr(r, t - r);\n if (t > 5 && s === \"xml\")\n return p(\"InvalidXml\", \"XML declaration allowed only at the start of the document.\", w(e, t));\n if (e[t] == \"?\" && e[t + 1] == \">\") {\n t++;\n break;\n } else\n continue;\n }\n return t;\n}\nfunction z(e, t) {\n if (e.length > t + 5 && e[t + 1] === \"-\" && e[t + 2] === \"-\") {\n for (t += 3; t < e.length; t++)\n if (e[t] === \"-\" && e[t + 1] === \"-\" && e[t + 2] === \">\") {\n t += 2;\n break;\n }\n } else if (e.length > t + 8 && e[t + 1] === \"D\" && e[t + 2] === \"O\" && e[t + 3] === \"C\" && e[t + 4] === \"T\" && e[t + 5] === \"Y\" && e[t + 6] === \"P\" && e[t + 7] === \"E\") {\n let r = 1;\n for (t += 8; t < e.length; t++)\n if (e[t] === \"<\")\n r++;\n else if (e[t] === \">\" && (r--, r === 0))\n break;\n } else if (e.length > t + 9 && e[t + 1] === \"[\" && e[t + 2] === \"C\" && e[t + 3] === \"D\" && e[t + 4] === \"A\" && e[t + 5] === \"T\" && e[t + 6] === \"A\" && e[t + 7] === \"[\") {\n for (t += 8; t < e.length; t++)\n if (e[t] === \"]\" && e[t + 1] === \"]\" && e[t + 2] === \">\") {\n t += 2;\n break;\n }\n }\n return t;\n}\nconst Ce = '\"', Pe = \"'\";\nfunction xe(e, t) {\n let r = \"\", s = \"\", n = !1;\n for (; t < e.length; t++) {\n if (e[t] === Ce || e[t] === Pe)\n s === \"\" ? s = e[t] : s !== e[t] || (s = \"\");\n else if (e[t] === \">\" && s === \"\") {\n n = !0;\n break;\n }\n r += e[t];\n }\n return s !== \"\" ? !1 : {\n value: r,\n index: t,\n tagClosed: n\n };\n}\nconst $e = new RegExp(`(\\\\s*)([^\\\\s=]+)(\\\\s*=)?(\\\\s*(['\"])(([\\\\s\\\\S])*?)\\\\5)?`, \"g\");\nfunction H(e, t) {\n const r = M.getAllMatches(e, $e), s = {};\n for (let n = 0; n < r.length; n++) {\n if (r[n][1].length === 0)\n return p(\"InvalidAttr\", \"Attribute '\" + r[n][2] + \"' has no space in starting.\", v(r[n]));\n if (r[n][3] !== void 0 && r[n][4] === void 0)\n return p(\"InvalidAttr\", \"Attribute '\" + r[n][2] + \"' is without value.\", v(r[n]));\n if (r[n][3] === void 0 && !t.allowBooleanAttributes)\n return p(\"InvalidAttr\", \"boolean attribute '\" + r[n][2] + \"' is not allowed.\", v(r[n]));\n const i = r[n][2];\n if (!Le(i))\n return p(\"InvalidAttr\", \"Attribute '\" + i + \"' is an invalid name.\", v(r[n]));\n if (!s.hasOwnProperty(i))\n s[i] = 1;\n else\n return p(\"InvalidAttr\", \"Attribute '\" + i + \"' is repeated.\", v(r[n]));\n }\n return !0;\n}\nfunction Fe(e, t) {\n let r = /\\d/;\n for (e[t] === \"x\" && (t++, r = /[\\da-fA-F]/); t < e.length; t++) {\n if (e[t] === \";\")\n return t;\n if (!e[t].match(r))\n break;\n }\n return -1;\n}\nfunction Ve(e, t) {\n if (t++, e[t] === \";\")\n return -1;\n if (e[t] === \"#\")\n return t++, Fe(e, t);\n let r = 0;\n for (; t < e.length; t++, r++)\n if (!(e[t].match(/\\w/) && r < 20)) {\n if (e[t] === \";\")\n break;\n return -1;\n }\n return t;\n}\nfunction p(e, t, r) {\n return {\n err: {\n code: e,\n msg: t,\n line: r.line || r,\n col: r.col\n }\n };\n}\nfunction Le(e) {\n return M.isName(e);\n}\nfunction Se(e) {\n return M.isName(e);\n}\nfunction w(e, t) {\n const r = e.substring(0, t).split(/\\r?\\n/);\n return {\n line: r.length,\n // column number is last line's length + 1, because column numbering starts at 1:\n col: r[r.length - 1].length + 1\n };\n}\nfunction v(e) {\n return e.startIndex + e[1].length;\n}\nvar B = {};\nconst re = {\n preserveOrder: !1,\n attributeNamePrefix: \"@_\",\n attributesGroupName: !1,\n textNodeName: \"#text\",\n ignoreAttributes: !0,\n removeNSPrefix: !1,\n // remove NS from tag name or attribute name if true\n allowBooleanAttributes: !1,\n //a tag can have attributes without any value\n //ignoreRootElement : false,\n parseTagValue: !0,\n parseAttributeValue: !1,\n trimValues: !0,\n //Trim string values of tag and attributes\n cdataPropName: !1,\n numberParseOptions: {\n hex: !0,\n leadingZeros: !0,\n eNotation: !0\n },\n tagValueProcessor: function(e, t) {\n return t;\n },\n attributeValueProcessor: function(e, t) {\n return t;\n },\n stopNodes: [],\n //nested tags will not be parsed even for errors\n alwaysCreateTextNode: !1,\n isArray: () => !1,\n commentPropName: !1,\n unpairedTags: [],\n processEntities: !0,\n htmlEntities: !1,\n ignoreDeclaration: !1,\n ignorePiTags: !1,\n transformTagName: !1,\n transformAttributeName: !1,\n updateTag: function(e, t, r) {\n return e;\n }\n // skipEmptyListItem: false\n}, Re = function(e) {\n return Object.assign({}, re, e);\n};\nB.buildOptions = Re;\nB.defaultOptions = re;\nclass Me {\n constructor(t) {\n this.tagname = t, this.child = [], this[\":@\"] = {};\n }\n add(t, r) {\n t === \"__proto__\" && (t = \"#__proto__\"), this.child.push({ [t]: r });\n }\n addChild(t) {\n t.tagname === \"__proto__\" && (t.tagname = \"#__proto__\"), t[\":@\"] && Object.keys(t[\":@\"]).length > 0 ? this.child.push({ [t.tagname]: t.child, \":@\": t[\":@\"] }) : this.child.push({ [t.tagname]: t.child });\n }\n}\nvar Be = Me;\nconst ke = O;\nfunction qe(e, t) {\n const r = {};\n if (e[t + 3] === \"O\" && e[t + 4] === \"C\" && e[t + 5] === \"T\" && e[t + 6] === \"Y\" && e[t + 7] === \"P\" && e[t + 8] === \"E\") {\n t = t + 9;\n let s = 1, n = !1, i = !1, d = \"\";\n for (; t < e.length; t++)\n if (e[t] === \"<\" && !i) {\n if (n && Ge(e, t))\n t += 7, [entityName, val, t] = Xe(e, t + 1), val.indexOf(\"&\") === -1 && (r[We(entityName)] = {\n regx: RegExp(`&${entityName};`, \"g\"),\n val\n });\n else if (n && ze(e, t))\n t += 8;\n else if (n && He(e, t))\n t += 8;\n else if (n && Ke(e, t))\n t += 9;\n else if (Ue)\n i = !0;\n else\n throw new Error(\"Invalid DOCTYPE\");\n s++, d = \"\";\n } else if (e[t] === \">\") {\n if (i ? e[t - 1] === \"-\" && e[t - 2] === \"-\" && (i = !1, s--) : s--, s === 0)\n break;\n } else\n e[t] === \"[\" ? n = !0 : d += e[t];\n if (s !== 0)\n throw new Error(\"Unclosed DOCTYPE\");\n } else\n throw new Error(\"Invalid Tag instead of DOCTYPE\");\n return { entities: r, i: t };\n}\nfunction Xe(e, t) {\n let r = \"\";\n for (; t < e.length && e[t] !== \"'\" && e[t] !== '\"'; t++)\n r += e[t];\n if (r = r.trim(), r.indexOf(\" \") !== -1)\n throw new Error(\"External entites are not supported\");\n const s = e[t++];\n let n = \"\";\n for (; t < e.length && e[t] !== s; t++)\n n += e[t];\n return [r, n, t];\n}\nfunction Ue(e, t) {\n return e[t + 1] === \"!\" && e[t + 2] === \"-\" && e[t + 3] === \"-\";\n}\nfunction Ge(e, t) {\n return e[t + 1] === \"!\" && e[t + 2] === \"E\" && e[t + 3] === \"N\" && e[t + 4] === \"T\" && e[t + 5] === \"I\" && e[t + 6] === \"T\" && e[t + 7] === \"Y\";\n}\nfunction ze(e, t) {\n return e[t + 1] === \"!\" && e[t + 2] === \"E\" && e[t + 3] === \"L\" && e[t + 4] === \"E\" && e[t + 5] === \"M\" && e[t + 6] === \"E\" && e[t + 7] === \"N\" && e[t + 8] === \"T\";\n}\nfunction He(e, t) {\n return e[t + 1] === \"!\" && e[t + 2] === \"A\" && e[t + 3] === \"T\" && e[t + 4] === \"T\" && e[t + 5] === \"L\" && e[t + 6] === \"I\" && e[t + 7] === \"S\" && e[t + 8] === \"T\";\n}\nfunction Ke(e, t) {\n return e[t + 1] === \"!\" && e[t + 2] === \"N\" && e[t + 3] === \"O\" && e[t + 4] === \"T\" && e[t + 5] === \"A\" && e[t + 6] === \"T\" && e[t + 7] === \"I\" && e[t + 8] === \"O\" && e[t + 9] === \"N\";\n}\nfunction We(e) {\n if (ke.isName(e))\n return e;\n throw new Error(`Invalid entity name ${e}`);\n}\nvar Ze = qe;\nconst je = /^[-+]?0x[a-fA-F0-9]+$/, Ye = /^([\\-\\+])?(0*)(\\.[0-9]+([eE]\\-?[0-9]+)?|[0-9]+(\\.[0-9]+([eE]\\-?[0-9]+)?)?)$/;\n!Number.parseInt && window.parseInt && (Number.parseInt = window.parseInt);\n!Number.parseFloat && window.parseFloat && (Number.parseFloat = window.parseFloat);\nconst Je = {\n hex: !0,\n leadingZeros: !0,\n decimalPoint: \".\",\n eNotation: !0\n //skipLike: /regex/\n};\nfunction Qe(e, t = {}) {\n if (t = Object.assign({}, Je, t), !e || typeof e != \"string\")\n return e;\n let r = e.trim();\n if (t.skipLike !== void 0 && t.skipLike.test(r))\n return e;\n if (t.hex && je.test(r))\n return Number.parseInt(r, 16);\n {\n const s = Ye.exec(r);\n if (s) {\n const n = s[1], i = s[2];\n let d = De(s[3]);\n const u = s[4] || s[6];\n if (!t.leadingZeros && i.length > 0 && n && r[2] !== \".\")\n return e;\n if (!t.leadingZeros && i.length > 0 && !n && r[1] !== \".\")\n return e;\n {\n const o = Number(r), a = \"\" + o;\n return a.search(/[eE]/) !== -1 || u ? t.eNotation ? o : e : r.indexOf(\".\") !== -1 ? a === \"0\" && d === \"\" || a === d || n && a === \"-\" + d ? o : e : i ? d === a || n + d === a ? o : e : r === a || r === n + a ? o : e;\n }\n } else\n return e;\n }\n}\nfunction De(e) {\n return e && e.indexOf(\".\") !== -1 && (e = e.replace(/0+$/, \"\"), e === \".\" ? e = \"0\" : e[0] === \".\" ? e = \"0\" + e : e[e.length - 1] === \".\" && (e = e.substr(0, e.length - 1))), e;\n}\nvar et = Qe;\nconst k = O, T = Be, tt = Ze, rt = et;\n\"<((!\\\\[CDATA\\\\[([\\\\s\\\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\\\/)(NAME)\\\\s*>))([^<]*)\".replace(/NAME/g, k.nameRegexp);\nlet nt = class {\n constructor(t) {\n this.options = t, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = {\n apos: { regex: /&(apos|#39|#x27);/g, val: \"'\" },\n gt: { regex: /&(gt|#62|#x3E);/g, val: \">\" },\n lt: { regex: /&(lt|#60|#x3C);/g, val: \"<\" },\n quot: { regex: /&(quot|#34|#x22);/g, val: '\"' }\n }, this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: \"&\" }, this.htmlEntities = {\n space: { regex: /&(nbsp|#160);/g, val: \" \" },\n // \"lt\" : { regex: /&(lt|#60);/g, val: \"<\" },\n // \"gt\" : { regex: /&(gt|#62);/g, val: \">\" },\n // \"amp\" : { regex: /&(amp|#38);/g, val: \"&\" },\n // \"quot\" : { regex: /&(quot|#34);/g, val: \"\\\"\" },\n // \"apos\" : { regex: /&(apos|#39);/g, val: \"'\" },\n cent: { regex: /&(cent|#162);/g, val: \"¢\" },\n pound: { regex: /&(pound|#163);/g, val: \"£\" },\n yen: { regex: /&(yen|#165);/g, val: \"¥\" },\n euro: { regex: /&(euro|#8364);/g, val: \"€\" },\n copyright: { regex: /&(copy|#169);/g, val: \"©\" },\n reg: { regex: /&(reg|#174);/g, val: \"®\" },\n inr: { regex: /&(inr|#8377);/g, val: \"₹\" }\n }, this.addExternalEntities = it, this.parseXml = at, this.parseTextData = st, this.resolveNameSpace = ot, this.buildAttributesMap = dt, this.isItStopNode = ht, this.replaceEntitiesValue = ft, this.readStopNodeData = gt, this.saveTextToParentTag = ct, this.addChild = lt;\n }\n};\nfunction it(e) {\n const t = Object.keys(e);\n for (let r = 0; r < t.length; r++) {\n const s = t[r];\n this.lastEntities[s] = {\n regex: new RegExp(\"&\" + s + \";\", \"g\"),\n val: e[s]\n };\n }\n}\nfunction st(e, t, r, s, n, i, d) {\n if (e !== void 0 && (this.options.trimValues && !s && (e = e.trim()), e.length > 0)) {\n d || (e = this.replaceEntitiesValue(e));\n const u = this.options.tagValueProcessor(t, e, r, n, i);\n return u == null ? e : typeof u != typeof e || u !== e ? u : this.options.trimValues ? $(e, this.options.parseTagValue, this.options.numberParseOptions) : e.trim() === e ? $(e, this.options.parseTagValue, this.options.numberParseOptions) : e;\n }\n}\nfunction ot(e) {\n if (this.options.removeNSPrefix) {\n const t = e.split(\":\"), r = e.charAt(0) === \"/\" ? \"/\" : \"\";\n if (t[0] === \"xmlns\")\n return \"\";\n t.length === 2 && (e = r + t[1]);\n }\n return e;\n}\nconst ut = new RegExp(`([^\\\\s=]+)\\\\s*(=\\\\s*(['\"])([\\\\s\\\\S]*?)\\\\3)?`, \"gm\");\nfunction dt(e, t, r) {\n if (!this.options.ignoreAttributes && typeof e == \"string\") {\n const s = k.getAllMatches(e, ut), n = s.length, i = {};\n for (let d = 0; d < n; d++) {\n const u = this.resolveNameSpace(s[d][1]);\n let o = s[d][4], a = this.options.attributeNamePrefix + u;\n if (u.length)\n if (this.options.transformAttributeName && (a = this.options.transformAttributeName(a)), a === \"__proto__\" && (a = \"#__proto__\"), o !== void 0) {\n this.options.trimValues && (o = o.trim()), o = this.replaceEntitiesValue(o);\n const l = this.options.attributeValueProcessor(u, o, t);\n l == null ? i[a] = o : typeof l != typeof o || l !== o ? i[a] = l : i[a] = $(\n o,\n this.options.parseAttributeValue,\n this.options.numberParseOptions\n );\n } else\n this.options.allowBooleanAttributes && (i[a] = !0);\n }\n if (!Object.keys(i).length)\n return;\n if (this.options.attributesGroupName) {\n const d = {};\n return d[this.options.attributesGroupName] = i, d;\n }\n return i;\n }\n}\nconst at = function(e) {\n e = e.replace(/\\r\\n?/g, `\n`);\n const t = new T(\"!xml\");\n let r = t, s = \"\", n = \"\";\n for (let i = 0; i < e.length; i++)\n if (e[i] === \"<\")\n if (e[i + 1] === \"/\") {\n const u = y(e, \">\", i, \"Closing Tag is not closed.\");\n let o = e.substring(i + 2, u).trim();\n if (this.options.removeNSPrefix) {\n const f = o.indexOf(\":\");\n f !== -1 && (o = o.substr(f + 1));\n }\n this.options.transformTagName && (o = this.options.transformTagName(o)), r && (s = this.saveTextToParentTag(s, r, n));\n const a = n.substring(n.lastIndexOf(\".\") + 1);\n if (o && this.options.unpairedTags.indexOf(o) !== -1)\n throw new Error(`Unpaired tag can not be used as closing tag: </${o}>`);\n let l = 0;\n a && this.options.unpairedTags.indexOf(a) !== -1 ? (l = n.lastIndexOf(\".\", n.lastIndexOf(\".\") - 1), this.tagsNodeStack.pop()) : l = n.lastIndexOf(\".\"), n = n.substring(0, l), r = this.tagsNodeStack.pop(), s = \"\", i = u;\n } else if (e[i + 1] === \"?\") {\n let u = x(e, i, !1, \"?>\");\n if (!u)\n throw new Error(\"Pi Tag is not closed.\");\n if (s = this.saveTextToParentTag(s, r, n), !(this.options.ignoreDeclaration && u.tagName === \"?xml\" || this.options.ignorePiTags)) {\n const o = new T(u.tagName);\n o.add(this.options.textNodeName, \"\"), u.tagName !== u.tagExp && u.attrExpPresent && (o[\":@\"] = this.buildAttributesMap(u.tagExp, n, u.tagName)), this.addChild(r, o, n);\n }\n i = u.closeIndex + 1;\n } else if (e.substr(i + 1, 3) === \"!--\") {\n const u = y(e, \"-->\", i + 4, \"Comment is not closed.\");\n if (this.options.commentPropName) {\n const o = e.substring(i + 4, u - 2);\n s = this.saveTextToParentTag(s, r, n), r.add(this.options.commentPropName, [{ [this.options.textNodeName]: o }]);\n }\n i = u;\n } else if (e.substr(i + 1, 2) === \"!D\") {\n const u = tt(e, i);\n this.docTypeEntities = u.entities, i = u.i;\n } else if (e.substr(i + 1, 2) === \"![\") {\n const u = y(e, \"]]>\", i, \"CDATA is not closed.\") - 2, o = e.substring(i + 9, u);\n if (s = this.saveTextToParentTag(s, r, n), this.options.cdataPropName)\n r.add(this.options.cdataPropName, [{ [this.options.textNodeName]: o }]);\n else {\n let a = this.parseTextData(o, r.tagname, n, !0, !1, !0);\n a == null && (a = \"\"), r.add(this.options.textNodeName, a);\n }\n i = u + 2;\n } else {\n let u = x(e, i, this.options.removeNSPrefix), o = u.tagName;\n const a = u.rawTagName;\n let l = u.tagExp, f = u.attrExpPresent, c = u.closeIndex;\n this.options.transformTagName && (o = this.options.transformTagName(o)), r && s && r.tagname !== \"!xml\" && (s = this.saveTextToParentTag(s, r, n, !1));\n const g = r;\n if (g && this.options.unpairedTags.indexOf(g.tagname) !== -1 && (r = this.tagsNodeStack.pop(), n = n.substring(0, n.lastIndexOf(\".\"))), o !== t.tagname && (n += n ? \".\" + o : o), this.isItStopNode(this.options.stopNodes, n, o)) {\n let h = \"\";\n if (l.length > 0 && l.lastIndexOf(\"/\") === l.length - 1)\n i = u.closeIndex;\n else if (this.options.unpairedTags.indexOf(o) !== -1)\n i = u.closeIndex;\n else {\n const E = this.readStopNodeData(e, a, c + 1);\n if (!E)\n throw new Error(`Unexpected end of ${a}`);\n i = E.i, h = E.tagContent;\n }\n const _ = new T(o);\n o !== l && f && (_[\":@\"] = this.buildAttributesMap(l, n, o)), h && (h = this.parseTextData(h, o, n, !0, f, !0, !0)), n = n.substr(0, n.lastIndexOf(\".\")), _.add(this.options.textNodeName, h), this.addChild(r, _, n);\n } else {\n if (l.length > 0 && l.lastIndexOf(\"/\") === l.length - 1) {\n o[o.length - 1] === \"/\" ? (o = o.substr(0, o.length - 1), n = n.substr(0, n.length - 1), l = o) : l = l.substr(0, l.length - 1), this.options.transformTagName && (o = this.options.transformTagName(o));\n const h = new T(o);\n o !== l && f && (h[\":@\"] = this.buildAttributesMap(l, n, o)), this.addChild(r, h, n), n = n.substr(0, n.lastIndexOf(\".\"));\n } else {\n const h = new T(o);\n this.tagsNodeStack.push(r), o !== l && f && (h[\":@\"] = this.buildAttributesMap(l, n, o)), this.addChild(r, h, n), r = h;\n }\n s = \"\", i = c;\n }\n }\n else\n s += e[i];\n return t.child;\n};\nfunction lt(e, t, r) {\n const s = this.options.updateTag(t.tagname, r, t[\":@\"]);\n s === !1 || (typeof s == \"string\" && (t.tagname = s), e.addChild(t));\n}\nconst ft = function(e) {\n if (this.options.processEntities) {\n for (let t in this.docTypeEntities) {\n const r = this.docTypeEntities[t];\n e = e.replace(r.regx, r.val);\n }\n for (let t in this.lastEntities) {\n const r = this.lastEntities[t];\n e = e.replace(r.regex, r.val);\n }\n if (this.options.htmlEntities)\n for (let t in this.htmlEntities) {\n const r = this.htmlEntities[t];\n e = e.replace(r.regex, r.val);\n }\n e = e.replace(this.ampEntity.regex, this.ampEntity.val);\n }\n return e;\n};\nfunction ct(e, t, r, s) {\n return e && (s === void 0 && (s = Object.keys(t.child).length === 0), e = this.parseTextData(\n e,\n t.tagname,\n r,\n !1,\n t[\":@\"] ? Object.keys(t[\":@\"]).length !== 0 : !1,\n s\n ), e !== void 0 && e !== \"\" && t.add(this.options.textNodeName, e), e = \"\"), e;\n}\nfunction ht(e, t, r) {\n const s = \"*.\" + r;\n for (const n in e) {\n const i = e[n];\n if (s === i || t === i)\n return !0;\n }\n return !1;\n}\nfunction pt(e, t, r = \">\") {\n let s, n = \"\";\n for (let i = t; i < e.length; i++) {\n let d = e[i];\n if (s)\n d === s && (s = \"\");\n else if (d === '\"' || d === \"'\")\n s = d;\n else if (d === r[0])\n if (r[1]) {\n if (e[i + 1] === r[1])\n return {\n data: n,\n index: i\n };\n } else\n return {\n data: n,\n index: i\n };\n else\n d === \"\t\" && (d = \" \");\n n += d;\n }\n}\nfunction y(e, t, r, s) {\n const n = e.indexOf(t, r);\n if (n === -1)\n throw new Error(s);\n return n + t.length - 1;\n}\nfunction x(e, t, r, s = \">\") {\n const n = pt(e, t + 1, s);\n if (!n)\n return;\n let i = n.data;\n const d = n.index, u = i.search(/\\s/);\n let o = i, a = !0;\n u !== -1 && (o = i.substr(0, u).replace(/\\s\\s*$/, \"\"), i = i.substr(u + 1));\n const l = o;\n if (r) {\n const f = o.indexOf(\":\");\n f !== -1 && (o = o.substr(f + 1), a = o !== n.data.substr(f + 1));\n }\n return {\n tagName: o,\n tagExp: i,\n closeIndex: d,\n attrExpPresent: a,\n rawTagName: l\n };\n}\nfunction gt(e, t, r) {\n const s = r;\n let n = 1;\n for (; r < e.length; r++)\n if (e[r] === \"<\")\n if (e[r + 1] === \"/\") {\n const i = y(e, \">\", r, `${t} is not closed`);\n if (e.substring(r + 2, i).trim() === t && (n--, n === 0))\n return {\n tagContent: e.substring(s, r),\n i\n };\n r = i;\n } else if (e[r + 1] === \"?\")\n r = y(e, \"?>\", r + 1, \"StopNode is not closed.\");\n else if (e.substr(r + 1, 3) === \"!--\")\n r = y(e, \"-->\", r + 3, \"StopNode is not closed.\");\n else if (e.substr(r + 1, 2) === \"![\")\n r = y(e, \"]]>\", r, \"StopNode is not closed.\") - 2;\n else {\n const i = x(e, r, \">\");\n i && ((i && i.tagName) === t && i.tagExp[i.tagExp.length - 1] !== \"/\" && n++, r = i.closeIndex);\n }\n}\nfunction $(e, t, r) {\n if (t && typeof e == \"string\") {\n const s = e.trim();\n return s === \"true\" ? !0 : s === \"false\" ? !1 : rt(e, r);\n } else\n return k.isExist(e) ? e : \"\";\n}\nvar wt = nt, ne = {};\nfunction mt(e, t) {\n return ie(e, t);\n}\nfunction ie(e, t, r) {\n let s;\n const n = {};\n for (let i = 0; i < e.length; i++) {\n const d = e[i], u = Nt(d);\n let o = \"\";\n if (r === void 0 ? o = u : o = r + \".\" + u, u === t.textNodeName)\n s === void 0 ? s = d[u] : s += \"\" + d[u];\n else {\n if (u === void 0)\n continue;\n if (d[u]) {\n let a = ie(d[u], t, o);\n const l = bt(a, t);\n d[\":@\"] ? Et(a, d[\":@\"], o, t) : Object.keys(a).length === 1 && a[t.textNodeName] !== void 0 && !t.alwaysCreateTextNode ? a = a[t.textNodeName] : Object.keys(a).length === 0 && (t.alwaysCreateTextNode ? a[t.textNodeName] = \"\" : a = \"\"), n[u] !== void 0 && n.hasOwnProperty(u) ? (Array.isArray(n[u]) || (n[u] = [n[u]]), n[u].push(a)) : t.isArray(u, o, l) ? n[u] = [a] : n[u] = a;\n }\n }\n }\n return typeof s == \"string\" ? s.length > 0 && (n[t.textNodeName] = s) : s !== void 0 && (n[t.textNodeName] = s), n;\n}\nfunction Nt(e) {\n const t = Object.keys(e);\n for (let r = 0; r < t.length; r++) {\n const s = t[r];\n if (s !== \":@\")\n return s;\n }\n}\nfunction Et(e, t, r, s) {\n if (t) {\n const n = Object.keys(t), i = n.length;\n for (let d = 0; d < i; d++) {\n const u = n[d];\n s.isArray(u, r + \".\" + u, !0, !0) ? e[u] = [t[u]] : e[u] = t[u];\n }\n }\n}\nfunction bt(e, t) {\n const { textNodeName: r } = t, s = Object.keys(e).length;\n return !!(s === 0 || s === 1 && (e[r] || typeof e[r] == \"boolean\" || e[r] === 0));\n}\nne.prettify = mt;\nconst { buildOptions: yt } = B, _t = wt, { prettify: vt } = ne, Tt = R;\nlet It = class {\n constructor(t) {\n this.externalEntities = {}, this.options = yt(t);\n }\n /**\n * Parse XML dats to JS object \n * @param {string|Buffer} xmlData \n * @param {boolean|Object} validationOption \n */\n parse(t, r) {\n if (typeof t != \"string\")\n if (t.toString)\n t = t.toString();\n else\n throw new Error(\"XML data is accepted in String or Bytes[] form.\");\n if (r) {\n r === !0 && (r = {});\n const i = Tt.validate(t, r);\n if (i !== !0)\n throw Error(`${i.err.msg}:${i.err.line}:${i.err.col}`);\n }\n const s = new _t(this.options);\n s.addExternalEntities(this.externalEntities);\n const n = s.parseXml(t);\n return this.options.preserveOrder || n === void 0 ? n : vt(n, this.options);\n }\n /**\n * Add Entity which is not by default supported by this library\n * @param {string} key \n * @param {string} value \n */\n addEntity(t, r) {\n if (r.indexOf(\"&\") !== -1)\n throw new Error(\"Entity value can't have '&'\");\n if (t.indexOf(\"&\") !== -1 || t.indexOf(\";\") !== -1)\n throw new Error(\"An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'\");\n if (r === \"&\")\n throw new Error(\"An entity with value '&' is not permitted\");\n this.externalEntities[t] = r;\n }\n};\nvar At = It;\nconst Ot = `\n`;\nfunction Ct(e, t) {\n let r = \"\";\n return t.format && t.indentBy.length > 0 && (r = Ot), se(e, t, \"\", r);\n}\nfunction se(e, t, r, s) {\n let n = \"\", i = !1;\n for (let d = 0; d < e.length; d++) {\n const u = e[d], o = Pt(u);\n if (o === void 0)\n continue;\n let a = \"\";\n if (r.length === 0 ? a = o : a = `${r}.${o}`, o === t.textNodeName) {\n let h = u[o];\n xt(a, t) || (h = t.tagValueProcessor(o, h), h = oe(h, t)), i && (n += s), n += h, i = !1;\n continue;\n } else if (o === t.cdataPropName) {\n i && (n += s), n += `<![CDATA[${u[o][0][t.textNodeName]}]]>`, i = !1;\n continue;\n } else if (o === t.commentPropName) {\n n += s + `<!--${u[o][0][t.textNodeName]}-->`, i = !0;\n continue;\n } else if (o[0] === \"?\") {\n const h = K(u[\":@\"], t), _ = o === \"?xml\" ? \"\" : s;\n let E = u[o][0][t.textNodeName];\n E = E.length !== 0 ? \" \" + E : \"\", n += _ + `<${o}${E}${h}?>`, i = !0;\n continue;\n }\n let l = s;\n l !== \"\" && (l += t.indentBy);\n const f = K(u[\":@\"], t), c = s + `<${o}${f}`, g = se(u[o], t, a, l);\n t.unpairedTags.indexOf(o) !== -1 ? t.suppressUnpairedNode ? n += c + \">\" : n += c + \"/>\" : (!g || g.length === 0) && t.suppressEmptyNode ? n += c + \"/>\" : g && g.endsWith(\">\") ? n += c + `>${g}${s}</${o}>` : (n += c + \">\", g && s !== \"\" && (g.includes(\"/>\") || g.includes(\"</\")) ? n += s + t.indentBy + g + s : n += g, n += `</${o}>`), i = !0;\n }\n return n;\n}\nfunction Pt(e) {\n const t = Object.keys(e);\n for (let r = 0; r < t.length; r++) {\n const s = t[r];\n if (e.hasOwnProperty(s) && s !== \":@\")\n return s;\n }\n}\nfunction K(e, t) {\n let r = \"\";\n if (e && !t.ignoreAttributes)\n for (let s in e) {\n if (!e.hasOwnProperty(s))\n continue;\n let n = t.attributeValueProcessor(s, e[s]);\n n = oe(n, t), n === !0 && t.suppressBooleanAttributes ? r += ` ${s.substr(t.attributeNamePrefix.length)}` : r += ` ${s.substr(t.attributeNamePrefix.length)}=\"${n}\"`;\n }\n return r;\n}\nfunction xt(e, t) {\n e = e.substr(0, e.length - t.textNodeName.length - 1);\n let r = e.substr(e.lastIndexOf(\".\") + 1);\n for (let s in t.stopNodes)\n if (t.stopNodes[s] === e || t.stopNodes[s] === \"*.\" + r)\n return !0;\n return !1;\n}\nfunction oe(e, t) {\n if (e && e.length > 0 && t.processEntities)\n for (let r = 0; r < t.entities.length; r++) {\n const s = t.entities[r];\n e = e.replace(s.regex, s.val);\n }\n return e;\n}\nvar $t = Ct;\nconst Ft = $t, Vt = {\n attributeNamePrefix: \"@_\",\n attributesGroupName: !1,\n textNodeName: \"#text\",\n ignoreAttributes: !0,\n cdataPropName: !1,\n format: !1,\n indentBy: \" \",\n suppressEmptyNode: !1,\n suppressUnpairedNode: !0,\n suppressBooleanAttributes: !0,\n tagValueProcessor: function(e, t) {\n return t;\n },\n attributeValueProcessor: function(e, t) {\n return t;\n },\n preserveOrder: !1,\n commentPropName: !1,\n unpairedTags: [],\n entities: [\n { regex: new RegExp(\"&\", \"g\"), val: \"&amp;\" },\n //it must be on top\n { regex: new RegExp(\">\", \"g\"), val: \"&gt;\" },\n { regex: new RegExp(\"<\", \"g\"), val: \"&lt;\" },\n { regex: new RegExp(\"'\", \"g\"), val: \"&apos;\" },\n { regex: new RegExp('\"', \"g\"), val: \"&quot;\" }\n ],\n processEntities: !0,\n stopNodes: [],\n // transformTagName: false,\n // transformAttributeName: false,\n oneListGroup: !1\n};\nfunction b(e) {\n this.options = Object.assign({}, Vt, e), this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() {\n return !1;\n } : (this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = Rt), this.processTextOrObjNode = Lt, this.options.format ? (this.indentate = St, this.tagEndChar = `>\n`, this.newLine = `\n`) : (this.indentate = function() {\n return \"\";\n }, this.tagEndChar = \">\", this.newLine = \"\");\n}\nb.prototype.build = function(e) {\n return this.options.preserveOrder ? Ft(e, this.options) : (Array.isArray(e) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (e = {\n [this.options.arrayNodeName]: e\n }), this.j2x(e, 0).val);\n};\nb.prototype.j2x = function(e, t) {\n let r = \"\", s = \"\";\n for (let n in e)\n if (Object.prototype.hasOwnProperty.call(e, n))\n if (typeof e[n] > \"u\")\n this.isAttribute(n) && (s += \"\");\n else if (e[n] === null)\n this.isAttribute(n) ? s += \"\" : n[0] === \"?\" ? s += this.indentate(t) + \"<\" + n + \"?\" + this.tagEndChar : s += this.indentate(t) + \"<\" + n + \"/\" + this.tagEndChar;\n else if (e[n] instanceof Date)\n s += this.buildTextValNode(e[n], n, \"\", t);\n else if (typeof e[n] != \"object\") {\n const i = this.isAttribute(n);\n if (i)\n r += this.buildAttrPairStr(i, \"\" + e[n]);\n else if (n === this.options.textNodeName) {\n let d = this.options.tagValueProcessor(n, \"\" + e[n]);\n s += this.replaceEntitiesValue(d);\n } else\n s += this.buildTextValNode(e[n], n, \"\", t);\n } else if (Array.isArray(e[n])) {\n const i = e[n].length;\n let d = \"\";\n for (let u = 0; u < i; u++) {\n const o = e[n][u];\n typeof o > \"u\" || (o === null ? n[0] === \"?\" ? s += this.indentate(t) + \"<\" + n + \"?\" + this.tagEndChar : s += this.indentate(t) + \"<\" + n + \"/\" + this.tagEndChar : typeof o == \"object\" ? this.options.oneListGroup ? d += this.j2x(o, t + 1).val : d += this.processTextOrObjNode(o, n, t) : d += this.buildTextValNode(o, n, \"\", t));\n }\n this.options.oneListGroup && (d = this.buildObjectNode(d, n, \"\", t)), s += d;\n } else if (this.options.attributesGroupName && n === this.options.attributesGroupName) {\n const i = Object.keys(e[n]), d = i.length;\n for (let u = 0; u < d; u++)\n r += this.buildAttrPairStr(i[u], \"\" + e[n][i[u]]);\n } else\n s += this.processTextOrObjNode(e[n], n, t);\n return { attrStr: r, val: s };\n};\nb.prototype.buildAttrPairStr = function(e, t) {\n return t = this.options.attributeValueProcessor(e, \"\" + t), t = this.replaceEntitiesValue(t), this.options.suppressBooleanAttributes && t === \"true\" ? \" \" + e : \" \" + e + '=\"' + t + '\"';\n};\nfunction Lt(e, t, r) {\n const s = this.j2x(e, r + 1);\n return e[this.options.textNodeName] !== void 0 && Object.keys(e).length === 1 ? this.buildTextValNode(e[this.options.textNodeName], t, s.attrStr, r) : this.buildObjectNode(s.val, t, s.attrStr, r);\n}\nb.prototype.buildObjectNode = function(e, t, r, s) {\n if (e === \"\")\n return t[0] === \"?\" ? this.indentate(s) + \"<\" + t + r + \"?\" + this.tagEndChar : this.indentate(s) + \"<\" + t + r + this.closeTag(t) + this.tagEndChar;\n {\n let n = \"</\" + t + this.tagEndChar, i = \"\";\n return t[0] === \"?\" && (i = \"?\", n = \"\"), (r || r === \"\") && e.indexOf(\"<\") === -1 ? this.indentate(s) + \"<\" + t + r + i + \">\" + e + n : this.options.commentPropName !== !1 && t === this.options.commentPropName && i.length === 0 ? this.indentate(s) + `<!--${e}-->` + this.newLine : this.indentate(s) + \"<\" + t + r + i + this.tagEndChar + e + this.indentate(s) + n;\n }\n};\nb.prototype.closeTag = function(e) {\n let t = \"\";\n return this.options.unpairedTags.indexOf(e) !== -1 ? this.options.suppressUnpairedNode || (t = \"/\") : this.options.suppressEmptyNode ? t = \"/\" : t = `></${e}`, t;\n};\nb.prototype.buildTextValNode = function(e, t, r, s) {\n if (this.options.cdataPropName !== !1 && t === this.options.cdataPropName)\n return this.indentate(s) + `<![CDATA[${e}]]>` + this.newLine;\n if (this.options.commentPropName !== !1 && t === this.options.commentPropName)\n return this.indentate(s) + `<!--${e}-->` + this.newLine;\n if (t[0] === \"?\")\n return this.indentate(s) + \"<\" + t + r + \"?\" + this.tagEndChar;\n {\n let n = this.options.tagValueProcessor(t, e);\n return n = this.replaceEntitiesValue(n), n === \"\" ? this.indentate(s) + \"<\" + t + r + this.closeTag(t) + this.tagEndChar : this.indentate(s) + \"<\" + t + r + \">\" + n + \"</\" + t + this.tagEndChar;\n }\n};\nb.prototype.replaceEntitiesValue = function(e) {\n if (e && e.length > 0 && this.options.processEntities)\n for (let t = 0; t < this.options.entities.length; t++) {\n const r = this.options.entities[t];\n e = e.replace(r.regex, r.val);\n }\n return e;\n};\nfunction St(e) {\n return this.options.indentBy.repeat(e);\n}\nfunction Rt(e) {\n return e.startsWith(this.options.attributeNamePrefix) && e !== this.options.textNodeName ? e.substr(this.attrPrefixLen) : !1;\n}\nvar Mt = b;\nconst Bt = R, kt = At, qt = Mt;\nvar W = {\n XMLParser: kt,\n XMLValidator: Bt,\n XMLBuilder: qt\n};\nfunction Xt(e) {\n if (typeof e != \"string\")\n throw new TypeError(`Expected a \\`string\\`, got \\`${typeof e}\\``);\n if (e = e.trim(), e.length === 0 || W.XMLValidator.validate(e) !== !0)\n return !1;\n let t;\n const r = new W.XMLParser();\n try {\n t = r.parse(e);\n } catch {\n return !1;\n }\n return !(!t || !(\"svg\" in t));\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass hr {\n _view;\n constructor(t) {\n Ut(t), this._view = t;\n }\n get id() {\n return this._view.id;\n }\n get name() {\n return this._view.name;\n }\n get caption() {\n return this._view.caption;\n }\n get emptyTitle() {\n return this._view.emptyTitle;\n }\n get emptyCaption() {\n return this._view.emptyCaption;\n }\n get getContents() {\n return this._view.getContents;\n }\n get icon() {\n return this._view.icon;\n }\n set icon(t) {\n this._view.icon = t;\n }\n get order() {\n return this._view.order;\n }\n set order(t) {\n this._view.order = t;\n }\n get params() {\n return this._view.params;\n }\n set params(t) {\n this._view.params = t;\n }\n get columns() {\n return this._view.columns;\n }\n get emptyView() {\n return this._view.emptyView;\n }\n get parent() {\n return this._view.parent;\n }\n get sticky() {\n return this._view.sticky;\n }\n get expanded() {\n return this._view.expanded;\n }\n set expanded(t) {\n this._view.expanded = t;\n }\n get defaultSortKey() {\n return this._view.defaultSortKey;\n }\n}\nconst Ut = function(e) {\n if (!e.id || typeof e.id != \"string\")\n throw new Error(\"View id is required and must be a string\");\n if (!e.name || typeof e.name != \"string\")\n throw new Error(\"View name is required and must be a string\");\n if (e.columns && e.columns.length > 0 && (!e.caption || typeof e.caption != \"string\"))\n throw new Error(\"View caption is required for top-level views and must be a string\");\n if (!e.getContents || typeof e.getContents != \"function\")\n throw new Error(\"View getContents is required and must be a function\");\n if (!e.icon || typeof e.icon != \"string\" || !Xt(e.icon))\n throw new Error(\"View icon is required and must be a valid svg string\");\n if (!(\"order\" in e) || typeof e.order != \"number\")\n throw new Error(\"View order is required and must be a number\");\n if (e.columns && e.columns.forEach((t) => {\n if (!(t instanceof Ie))\n throw new Error(\"View columns must be an array of Column. Invalid column found\");\n }), e.emptyView && typeof e.emptyView != \"function\")\n throw new Error(\"View emptyView must be a function\");\n if (e.parent && typeof e.parent != \"string\")\n throw new Error(\"View parent must be a string\");\n if (\"sticky\" in e && typeof e.sticky != \"boolean\")\n throw new Error(\"View sticky must be a boolean\");\n if (\"expanded\" in e && typeof e.expanded != \"boolean\")\n throw new Error(\"View expanded must be a boolean\");\n if (e.defaultSortKey && typeof e.defaultSortKey != \"string\")\n throw new Error(\"View defaultSortKey must be a string\");\n return !0;\n};\n/**\n * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst pr = function(e) {\n return F().registerEntry(e);\n}, gr = function(e) {\n return F().unregisterEntry(e);\n}, wr = function(e) {\n return F().getEntries(e).sort((r, s) => r.order !== void 0 && s.order !== void 0 ? r.order - s.order : r.displayName.localeCompare(s.displayName));\n};\nexport {\n Ie as Column,\n Z as DefaultType,\n ye as File,\n Dt as FileAction,\n S as FileType,\n _e as Folder,\n rr as Header,\n Te as Navigation,\n D as Node,\n Q as NodeStatus,\n N as Permission,\n hr as View,\n pr as addNewFileMenuEntry,\n dr as davGetClient,\n or as davGetDefaultPropfind,\n Ee as davGetFavoritesReport,\n ur as davGetRecentSearch,\n be as davParsePermissions,\n te as davRemoteURL,\n ve as davResultToNode,\n ee as davRootPath,\n Y as defaultDavNamespaces,\n j as defaultDavProperties,\n Jt as formatFileSize,\n L as getDavNameSpaces,\n V as getDavProperties,\n ar as getFavoriteNodes,\n tr as getFileActions,\n ir as getFileListHeaders,\n lr as getNavigation,\n wr as getNewFileMenuEntries,\n Qt as parseFileSize,\n sr as registerDavProperty,\n er as registerFileAction,\n nr as registerFileListHeaders,\n gr as removeNewFileMenuEntry\n};\n","import \"../assets/index-d9ae9479.css\";\nimport { r as c } from \"../chunks/index-5f2a5f57.mjs\";\nimport { N as ut } from \"../chunks/index-5f2a5f57.mjs\";\nimport { generateUrl as p } from \"@nextcloud/router\";\nimport { n as u } from \"../chunks/_plugin-vue2_normalizer-71e2aa87.mjs\";\nimport { t as o } from \"../chunks/l10n-f88f0458.mjs\";\nimport \"../Directives/Tooltip.mjs\";\nimport { emojiAddRecent as m, emojiSearch as d } from \"../Functions/emoji.mjs\";\nimport { n as h, j as f } from \"../chunks/referencePickerModal-dffa6eda.mjs\";\nimport \"@nextcloud/axios\";\nimport \"unist-util-visit\";\nimport \"unist-builder\";\nimport \"unified\";\nimport \"remark-parse\";\nimport \"remark-breaks\";\nimport \"remark-rehype\";\nimport \"rehype-react\";\nimport \"rehype-external-links\";\nimport \"./NcEmptyContent.mjs\";\nimport \"./NcSelect.mjs\";\nimport \"vue-material-design-icons/LinkVariant.vue\";\nimport \"./NcLoadingIcon.mjs\";\nimport \"./NcTextField.mjs\";\nimport \"vue-material-design-icons/DotsHorizontal.vue\";\nimport \"./NcButton.mjs\";\nimport \"./NcModal.mjs\";\nimport \"@nextcloud/event-bus\";\nimport \"vue-material-design-icons/ArrowLeft.vue\";\nimport \"vue-material-design-icons/Close.vue\";\nimport l from \"tributejs/dist/tribute.esm.js\";\nimport _ from \"debounce\";\nimport g from \"string-length\";\nimport { VTooltip as b } from \"floating-vue\";\nconst y = {\n name: \"NcAutoCompleteResult\",\n props: {\n title: {\n type: String,\n required: !0\n },\n subline: {\n type: String,\n default: null\n },\n id: {\n type: String,\n default: null\n },\n icon: {\n type: String,\n required: !0\n },\n iconUrl: {\n type: String,\n default: null\n },\n source: {\n type: String,\n required: !0\n },\n status: {\n type: [Object, Array],\n default: () => ({})\n }\n },\n computed: {\n avatarUrl() {\n return this.iconUrl ? this.iconUrl : this.id && this.source === \"users\" ? this.getAvatarUrl(this.id, 44) : null;\n },\n haveStatus() {\n var e, t, n;\n return ((e = this.status) == null ? void 0 : e.icon) || ((t = this.status) == null ? void 0 : t.status) && ((n = this.status) == null ? void 0 : n.status) !== \"offline\";\n }\n },\n methods: {\n getAvatarUrl(e, t) {\n return p(\"/avatar/{user}/{size}\", {\n user: e,\n size: t\n });\n }\n }\n};\nvar C = function() {\n var t = this, n = t._self._c;\n return n(\"div\", { staticClass: \"autocomplete-result\" }, [n(\"div\", { staticClass: \"autocomplete-result__icon\", class: [t.icon, `autocomplete-result__icon--${t.avatarUrl ? \"with-avatar\" : \"\"}`], style: t.avatarUrl ? { backgroundImage: `url(${t.avatarUrl})` } : null }, [t.haveStatus ? n(\"div\", { staticClass: \"autocomplete-result__status\", class: [`autocomplete-result__status--${t.status && t.status.icon ? \"icon\" : t.status.status}`] }, [t._v(\" \" + t._s(t.status && t.status.icon || \"\") + \" \")]) : t._e()]), n(\"span\", { staticClass: \"autocomplete-result__content\" }, [n(\"span\", { staticClass: \"autocomplete-result__title\", attrs: { title: t.title } }, [t._v(\" \" + t._s(t.title) + \" \")]), t.subline ? n(\"span\", { staticClass: \"autocomplete-result__subline\" }, [t._v(\" \" + t._s(t.subline) + \" \")]) : t._e()])]);\n}, v = [], k = /* @__PURE__ */ u(\n y,\n C,\n v,\n !1,\n null,\n \"25cf09d8\",\n null,\n null\n);\nconst x = k.exports;\nconst T = {\n name: \"NcRichContenteditable\",\n directives: {\n tooltip: b\n },\n mixins: [c],\n props: {\n value: {\n type: String,\n default: \"\",\n required: !0\n },\n placeholder: {\n type: String,\n default: o(\"Write a message …\")\n },\n autoComplete: {\n type: Function,\n default: () => []\n },\n menuContainer: {\n type: Element,\n default: () => document.body\n },\n /**\n * Make the contenteditable looks like a textarea or not.\n * Default looks like a single-line input.\n * This also handle the default enter/shift+enter behaviour.\n * if multiline, enter = newline; otherwise enter = submit\n * shift+enter always add a new line. ctrl+enter always submits\n */\n multiline: {\n type: Boolean,\n default: !1\n },\n /**\n * Is the content editable ?\n */\n contenteditable: {\n type: Boolean,\n default: !0\n },\n /**\n * Disable the editing and show specific disabled design\n */\n disabled: {\n type: Boolean,\n default: !1\n },\n /**\n * Max allowed length\n */\n maxlength: {\n type: Number,\n default: null\n },\n /**\n * Enable or disable emoji autocompletion\n */\n emojiAutocomplete: {\n type: Boolean,\n default: !0\n },\n /**\n * Enable or disable link autocompletion\n */\n linkAutocomplete: {\n type: Boolean,\n default: !0\n }\n },\n emits: [\n \"submit\",\n \"paste\",\n \"update:value\",\n \"smart-picker-submit\"\n ],\n data() {\n return {\n textSmiles: [],\n tribute: null,\n autocompleteOptions: {\n // Allow spaces in the middle of mentions\n allowSpaces: !0,\n fillAttr: \"id\",\n // Search against id and title (display name)\n lookup: (e) => `${e.id} ${e.title}`,\n // Where to inject the menu popup\n menuContainer: this.menuContainer,\n // Popup mention autocompletion templates\n menuItemTemplate: (e) => this.renderComponentHtml(e.original, x),\n // Hide if no results\n noMatchTemplate: () => '<span class=\"hidden\"></span>',\n // Inner display of mentions\n selectTemplate: (e) => {\n var t;\n return this.genSelectTemplate((t = e == null ? void 0 : e.original) == null ? void 0 : t.id);\n },\n // Autocompletion results\n values: this.debouncedAutoComplete\n },\n emojiOptions: {\n trigger: \":\",\n // Don't use the tribute search function at all\n // We pass search results as values (see below)\n lookup: (e, t) => t,\n // Where to inject the menu popup\n menuContainer: this.menuContainer,\n // Popup mention autocompletion templates\n menuItemTemplate: (e) => this.textSmiles.includes(e.original) ? e.original : `<span class=\"tribute-container-emoji__item__emoji\">${e.original.native}</span> :${e.original.short_name}`,\n // Hide if no results\n noMatchTemplate: () => o(\"No emoji found\"),\n // Display raw emoji along with its name\n selectTemplate: (e) => this.textSmiles.includes(e.original) ? e.original : (m(e.original), e.original.native),\n // Pass the search results as values\n values: (e, t) => {\n const n = d(e);\n this.textSmiles.includes(\":\" + e) && n.unshift(\":\" + e), t(n);\n },\n // Class added to the menu container\n containerClass: \"tribute-container-emoji\",\n // Class added to each list item\n itemClass: \"tribute-container-emoji__item\"\n },\n linkOptions: {\n trigger: \"/\",\n // Don't use the tribute search function at all\n // We pass search results as values (see below)\n lookup: (e, t) => t,\n // Where to inject the menu popup\n menuContainer: this.menuContainer,\n // Popup mention autocompletion templates\n menuItemTemplate: (e) => `<img class=\"tribute-container-link__item__icon\" src=\"${e.original.icon_url}\"> <span class=\"tribute-container-link__item__title\">${e.original.title}</span>`,\n // Hide if no results\n noMatchTemplate: () => o(\"No link provider found\"),\n selectTemplate: this.getLink,\n // Pass the search results as values\n values: (e, t) => t(h(e)),\n // Class added to the menu container\n containerClass: \"tribute-container-link\",\n // Class added to each list item\n itemClass: \"tribute-container-link__item\"\n },\n // Represent the raw untrimmed text of the contenteditable\n // serves no other purpose than to check whether the\n // content is empty or not\n localValue: this.value,\n // Is in text composition session in IME\n isComposing: !1\n };\n },\n computed: {\n /**\n * Is the current trimmed value empty?\n *\n * @return {boolean}\n */\n isEmptyValue() {\n return !this.localValue || this.localValue && this.localValue.trim() === \"\";\n },\n /**\n * Is this Firefox? 🙄\n *\n * @return {boolean}\n */\n isFF() {\n return !!navigator.userAgent.match(/firefox/i);\n },\n /**\n * Is the current value over maxlength?\n *\n * @return {boolean}\n */\n isOverMaxlength() {\n return this.isEmptyValue || !this.maxlength ? !1 : g(this.localValue) > this.maxlength;\n },\n /**\n * Tooltip to show if characters count is over limit\n *\n * @return {string}\n */\n tooltipString() {\n return this.isOverMaxlength ? {\n content: o(\"Message limit of {count} characters reached\", { count: this.maxlength }),\n shown: !0,\n trigger: \"manual\"\n } : null;\n },\n /**\n * Edit is only allowed when contenteditableis true and disabled is false\n *\n * @return {boolean}\n */\n canEdit() {\n return this.contenteditable && !this.disabled;\n },\n /**\n * Proxied native event handlers without custom event handlers\n *\n * @return {Record<string, Function>}\n */\n listeners() {\n const e = { ...this.$listeners };\n return delete e.paste, e;\n }\n },\n watch: {\n /**\n * If the parent value change, we compare the plain text rendering\n * If it's different, we render everything and update the main content\n */\n value() {\n const e = this.$refs.contenteditable.innerHTML;\n this.value.trim() !== this.parseContent(e).trim() && this.updateContent(this.value);\n }\n },\n mounted() {\n const e = [\"d\", \"D\", \"p\", \"P\", \"s\", \"S\", \"x\", \"X\", \")\", \"(\", \"|\", \"/\"];\n this.textSmiles = [], e.forEach((t) => {\n this.textSmiles.push(\":\" + t), this.textSmiles.push(\":-\" + t);\n }), this.autocompleteTribute = new l(this.autocompleteOptions), this.autocompleteTribute.attach(this.$el), this.emojiAutocomplete && (this.emojiTribute = new l(this.emojiOptions), this.emojiTribute.attach(this.$el)), this.linkAutocomplete && (this.linkTribute = new l(this.linkOptions), this.linkTribute.attach(this.$el)), this.updateContent(this.value), this.$refs.contenteditable.contentEditable = this.canEdit;\n },\n beforeDestroy() {\n this.autocompleteTribute && this.autocompleteTribute.detach(this.$el), this.emojiTribute && this.emojiTribute.detach(this.$el), this.linkTribute && this.linkTribute.detach(this.$el);\n },\n methods: {\n /**\n * Focus the richContenteditable\n *\n * @public\n */\n focus() {\n this.$refs.contenteditable.focus();\n },\n getLink(e) {\n return f(e.original.id).then((t) => {\n const n = document.getElementById(\"tmp-smart-picker-result-node\"), i = {\n result: t,\n insertText: !0\n };\n if (this.$emit(\"smart-picker-submit\", i), i.insertText) {\n const s = document.createTextNode(t);\n n.replaceWith(s), this.setCursorAfter(s), this.updateValue(this.$refs.contenteditable.innerHTML);\n } else\n n.remove();\n }).catch((t) => {\n console.debug(\"Smart picker promise rejected:\", t);\n const n = document.getElementById(\"tmp-smart-picker-result-node\");\n this.setCursorAfter(n), n.remove();\n }), '<span id=\"tmp-smart-picker-result-node\"></span>';\n },\n setCursorAfter(e) {\n const t = document.createRange();\n t.setEndAfter(e), t.collapse();\n const n = window.getSelection();\n n.removeAllRanges(), n.addRange(t);\n },\n /**\n * Re-emit the input event to the parent\n *\n * @param {Event} event the input event\n */\n onInput(e) {\n this.updateValue(e.target.innerHTML);\n },\n /**\n * When pasting, sanitize the content, extract text\n * and render it again\n *\n * @param {Event} event the paste event\n * @fires Event paste the original paste event\n */\n onPaste(e) {\n if (!this.canEdit)\n return;\n e.preventDefault();\n const t = e.clipboardData;\n if (this.$emit(\"paste\", e), t.files.length !== 0 || !Object.values(t.items).find((a) => a == null ? void 0 : a.type.startsWith(\"text\")))\n return;\n const n = t.getData(\"text\"), i = window.getSelection();\n if (!i.rangeCount) {\n this.updateValue(n);\n return;\n }\n const s = i.getRangeAt(0);\n i.deleteFromDocument(), s.insertNode(document.createTextNode(n));\n const r = document.createRange();\n r.setStart(e.target, s.endOffset), r.collapse(!0), i.removeAllRanges(), i.addRange(r), this.updateValue(this.$refs.contenteditable.innerHTML);\n },\n /**\n * Update the value text from the provided html\n *\n * @param {string} htmlOrText the html content (or raw text with @mentions)\n */\n updateValue(e) {\n const t = this.parseContent(e);\n this.localValue = t, this.$emit(\"update:value\", t);\n },\n /**\n * Update content and local value\n *\n * @param {string} value the message value\n */\n updateContent(e) {\n const t = this.renderContent(e);\n this.$refs.contenteditable.innerHTML = t, this.localValue = e;\n },\n /**\n * Because FF have a decade old bug preventing contenteditable=false\n * to properly be deleted on backspace, we have to hack 👀\n * https://stackoverflow.com/a/59383394/3885878\n * https://stackoverflow.com/a/30574622\n *\n * @param {Event} event the delete keydown event\n */\n onDelete(e) {\n if (!this.isFF || !window.getSelection || !this.canEdit)\n return;\n const t = window.getSelection(), n = e.target;\n if (!t.isCollapsed || !t.rangeCount)\n return;\n const i = t.getRangeAt(t.rangeCount - 1);\n if (i.commonAncestorContainer.nodeType === 3 && i.startOffset > 0)\n return;\n const s = document.createRange();\n if (t.anchorNode !== n)\n s.selectNodeContents(n), s.setEndBefore(t.anchorNode);\n else if (t.anchorOffset > 0)\n s.setEnd(n, t.anchorOffset);\n else\n return;\n s.setStart(n, s.endOffset - 1);\n const r = s.cloneContents().lastChild;\n r && r.contentEditable === \"false\" && (s.deleteContents(), e.preventDefault());\n },\n /**\n * Enter key pressed. Submits if not multiline\n *\n * @param {Event} event the keydown event\n */\n onEnter(e) {\n this.multiline || this.isOverMaxlength || this.autocompleteTribute.isActive || this.emojiTribute.isActive || this.linkTribute.isActive || this.isComposing || (e.preventDefault(), e.stopPropagation(), this.$emit(\"submit\", e));\n },\n /**\n * Ctrl + Enter key pressed is used to submit\n *\n * @param {Event} event the keydown event\n */\n onCtrlEnter(e) {\n this.isOverMaxlength || this.$emit(\"submit\", e);\n },\n /**\n * Debounce the autocomplete function\n */\n debouncedAutoComplete: _(async function(e, t) {\n this.autoComplete(e, t);\n }, 100),\n onKeyUp(e) {\n e.stopImmediatePropagation();\n }\n }\n};\nvar S = function() {\n var t = this, n = t._self._c;\n return n(\"div\", t._g({ directives: [{ name: \"tooltip\", rawName: \"v-tooltip\", value: t.tooltipString, expression: \"tooltipString\" }], ref: \"contenteditable\", staticClass: \"rich-contenteditable__input\", class: {\n \"rich-contenteditable__input--empty\": t.isEmptyValue,\n \"rich-contenteditable__input--multiline\": t.multiline,\n \"rich-contenteditable__input--overflow\": t.isOverMaxlength,\n \"rich-contenteditable__input--disabled\": t.disabled\n }, attrs: { contenteditable: t.canEdit, placeholder: t.placeholder, \"aria-placeholder\": t.placeholder, \"aria-multiline\": \"true\", role: \"textbox\" }, on: { input: t.onInput, compositionstart: function(i) {\n t.isComposing = !0;\n }, compositionend: function(i) {\n t.isComposing = !1;\n }, keydown: [function(i) {\n return !i.type.indexOf(\"key\") && t._k(i.keyCode, \"delete\", [8, 46], i.key, [\"Backspace\", \"Delete\", \"Del\"]) ? null : t.onDelete.apply(null, arguments);\n }, function(i) {\n return !i.type.indexOf(\"key\") && t._k(i.keyCode, \"enter\", 13, i.key, \"Enter\") || i.ctrlKey || i.shiftKey || i.altKey || i.metaKey ? null : t.onEnter.apply(null, arguments);\n }, function(i) {\n return !i.type.indexOf(\"key\") && t._k(i.keyCode, \"enter\", 13, i.key, \"Enter\") || !i.ctrlKey || i.shiftKey || i.altKey || i.metaKey ? null : (i.stopPropagation(), i.preventDefault(), t.onCtrlEnter.apply(null, arguments));\n }], paste: t.onPaste, \"!keyup\": function(i) {\n return i.stopPropagation(), i.preventDefault(), t.onKeyUp.apply(null, arguments);\n } } }, t.listeners));\n}, A = [], E = /* @__PURE__ */ u(\n T,\n S,\n A,\n !1,\n null,\n \"599f92d5\",\n null,\n null\n);\nconst ot = E.exports;\nexport {\n x as NcAutoCompleteResult,\n ut as NcMentionBubble,\n ot as default\n};\n","import { N as b } from \"./referencePickerModal-dffa6eda.mjs\";\nimport h from \"@nextcloud/axios\";\nimport { generateOcsUrl as d } from \"@nextcloud/router\";\nimport { n as g } from \"./_plugin-vue2_normalizer-71e2aa87.mjs\";\nimport { visit as _, SKIP as v } from \"unist-util-visit\";\nimport { u as l } from \"unist-builder\";\nimport { unified as y } from \"unified\";\nimport w from \"remark-parse\";\nimport R from \"remark-breaks\";\nimport N from \"remark-rehype\";\nimport A from \"rehype-react\";\nimport L from \"rehype-external-links\";\nconst m = /(\\s|^)(https?:\\/\\/)((?:[-A-Z0-9+_]+\\.)+[-A-Z]+(?:\\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*)(\\s|$)/ig, x = /(\\s|\\(|^)((https?:\\/\\/)((?:[-A-Z0-9+_]+\\.)+[-A-Z0-9]+(?::[0-9]+)?(?:\\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*))(?=\\s|\\)|$)/ig, $ = {\n name: \"NcReferenceList\",\n components: {\n NcReferenceWidget: b\n },\n props: {\n text: {\n type: String,\n default: \"\"\n },\n referenceData: {\n type: Object,\n default: null\n },\n limit: {\n type: Number,\n default: 1\n }\n },\n data() {\n return {\n references: null,\n loading: !0\n };\n },\n computed: {\n isVisible() {\n return this.loading || this.displayedReferences;\n },\n values() {\n return this.referenceData ? this.referenceData : this.references ? Object.values(this.references) : [];\n },\n firstReference() {\n var e;\n return (e = this.values[0]) != null ? e : null;\n },\n displayedReferences() {\n return this.values.slice(0, this.limit);\n }\n },\n watch: {\n text: \"fetch\"\n },\n mounted() {\n this.fetch();\n },\n methods: {\n fetch() {\n if (this.loading = !0, this.referenceData) {\n this.loading = !1;\n return;\n }\n if (!new RegExp(m).exec(this.text)) {\n this.loading = !1;\n return;\n }\n this.resolve().then((e) => {\n this.references = e.data.ocs.data.references, this.loading = !1;\n }).catch((e) => {\n console.error(\"Failed to extract references\", e), this.loading = !1;\n });\n },\n resolve() {\n const e = new RegExp(m).exec(this.text.trim());\n return this.limit === 1 && e ? h.get(d(\"references/resolve\", 2) + `?reference=${encodeURIComponent(e[0])}`) : h.post(d(\"references/extract\", 2), {\n text: this.text,\n resolve: !0,\n limit: this.limit\n });\n }\n }\n};\nvar j = function() {\n var s = this, t = s._self._c;\n return s.isVisible ? t(\"div\", { staticClass: \"widgets--list\", class: { \"icon-loading\": s.loading } }, s._l(s.displayedReferences, function(r) {\n var i;\n return t(\"div\", { key: (i = r == null ? void 0 : r.openGraphObject) == null ? void 0 : i.id }, [t(\"NcReferenceWidget\", { attrs: { reference: r } })], 1);\n }), 0) : s._e();\n}, T = [], O = /* @__PURE__ */ g(\n $,\n j,\n T,\n !1,\n null,\n \"bd1fbb02\",\n null,\n null\n);\nconst f = O.exports, C = {\n name: \"NcLink\",\n props: {\n href: {\n type: String,\n required: !0\n }\n },\n render(e) {\n return e(\"a\", {\n attrs: {\n href: this.href,\n rel: \"noopener noreferrer\",\n target: \"_blank\",\n class: \"rich-text--external-link\"\n }\n }, [this.href.trim()]);\n }\n}, M = function({ autolink: e, useMarkdown: s }) {\n return function(t) {\n !s || !e || _(t, (r) => r.type === \"text\", (r, i, n) => {\n let c = k(r.value);\n return c = c.map((a) => typeof a == \"string\" ? l(\"text\", a) : l(\"link\", {\n url: a.props.href\n }, [l(\"text\", a.props.href)])).filter((a) => a), n.children.splice(i, 1, ...c.flat()), [v, i + c.flat().length];\n });\n };\n}, k = (e) => {\n let s = x.exec(e);\n const t = [];\n let r = 0;\n for (; s !== null; ) {\n let n = s[2], c, a = e.substring(r, s.index + s[1].length);\n n[0] === \" \" && (a += n[0], n = n.substring(1).trim());\n const o = n[n.length - 1];\n (o === \".\" || o === \",\" || o === \";\" || s[0][0] === \"(\" && o === \")\") && (n = n.substring(0, n.length - 1), c = o), t.push(a), t.push({ component: C, props: { href: n } }), c && t.push(c), r = s.index + s[0].length, s = x.exec(e);\n }\n t.push(e.substring(r));\n const i = t.map((n) => typeof n == \"string\" ? n : n.props.href).join(\"\");\n return e === i ? t : (console.error(\"Failed to reassemble the chunked text: \" + e), e);\n}, D = function() {\n return function(e) {\n _(e, (t) => t.type === \"text\", s);\n function s(t, r, i) {\n const n = t.value.split(/(\\{[a-z\\-_.0-9]+\\})/ig).map((c, a, o) => {\n const p = c.match(/^\\{([a-z\\-_.0-9]+)\\}$/i);\n if (!p)\n return l(\"text\", c);\n const [, u] = p;\n return l(\"element\", {\n tagName: `#${u}`\n });\n });\n i.children.splice(r, 1, ...n);\n }\n };\n}, E = ({ h: e, context: s }, t) => (s.autolink && (t = k(t)), Array.isArray(t) ? t.map((r) => {\n if (typeof r == \"string\")\n return r;\n const { component: i, props: n } = r, c = i.name === \"NcLink\" ? void 0 : \"rich-text--component\";\n return e(i, {\n props: n,\n class: c\n });\n}) : t), P = {\n name: \"NcRichText\",\n components: {\n NcReferenceList: f\n },\n props: {\n text: {\n type: String,\n default: \"\"\n },\n arguments: {\n type: Object,\n default: () => ({})\n },\n referenceLimit: {\n type: Number,\n default: 0\n },\n /** Provide data upfront to avoid extra http request */\n references: {\n type: Object,\n default: null\n },\n markdownCssClasses: {\n type: Object,\n default: () => ({\n a: \"rich-text--external-link\",\n ol: \"rich-text--ordered-list\",\n ul: \"rich-text--un-ordered-list\",\n li: \"rich-text--list-item\",\n strong: \"rich-text--strong\",\n em: \"rich-text--italic\",\n h1: \"rich-text--heading rich-text--heading-1\",\n h2: \"rich-text--heading rich-text--heading-2\",\n h3: \"rich-text--heading rich-text--heading-3\",\n h4: \"rich-text--heading rich-text--heading-4\",\n h5: \"rich-text--heading rich-text--heading-5\",\n h6: \"rich-text--heading rich-text--heading-6\",\n hr: \"rich-text--hr\",\n table: \"rich-text--table\",\n pre: \"rich-text--pre\",\n code: \"rich-text--code\",\n blockquote: \"rich-text--blockquote\"\n })\n },\n useMarkdown: {\n type: Boolean,\n default: !1\n },\n autolink: {\n type: Boolean,\n default: !0\n }\n },\n methods: {\n renderPlaintext(e) {\n const s = this, t = this.text.split(/(\\{[a-z\\-_.0-9]+\\})/ig).map(function(r, i, n) {\n const c = r.match(/^\\{([a-z\\-_.0-9]+)\\}$/i);\n if (!c)\n return E({ h: e, context: s }, r);\n const a = c[1], o = s.arguments[a];\n if (typeof o == \"object\") {\n const { component: p, props: u } = o;\n return e(p, {\n props: u,\n class: \"rich-text--component\"\n });\n }\n return o ? e(\"span\", { class: \"rich-text--fallback\" }, o) : r;\n });\n return e(\"div\", { class: \"rich-text--wrapper\" }, [\n e(\"div\", {}, t.flat()),\n this.referenceLimit > 0 ? e(\"div\", { class: \"rich-text--reference-widget\" }, [\n e(f, { props: { text: this.text, referenceData: this.references } })\n ]) : null\n ]);\n },\n renderMarkdown(e) {\n const s = y().use(w).use(M, {\n autolink: this.autolink,\n useMarkdown: this.useMarkdown\n }).use(R).use(N, {\n handlers: {\n component(t, r) {\n return t(r, r.component, { value: r.value });\n }\n }\n }).use(D).use(L, {\n target: \"_blank\",\n rel: [\"noopener noreferrer\"]\n }).use(A, {\n createElement: (t, r, i) => {\n if (i = i == null ? void 0 : i.map(\n (c) => typeof c == \"string\" ? c.replace(/&lt;/gmi, \"<\") : c\n ), !t.startsWith(\"#\"))\n return e(t, r, i);\n const n = this.arguments[t.slice(1)];\n return n ? n.component ? e(\n n.component,\n {\n attrs: r,\n props: n.props,\n class: \"rich-text--component\"\n },\n i\n ) : e(\"span\", r, [n]) : e(\"span\", { attrs: r, class: \"rich-text--fallback\" }, [`{${t.slice(1)}}`]);\n },\n prefix: !1\n }).processSync(\n this.text.replace(/</gmi, \"&lt;\").replace(/&gt;/gmi, \">\")\n ).result;\n return e(\"div\", { class: \"rich-text--wrapper rich-text--wrapper-markdown\" }, [\n s,\n this.referenceLimit > 0 ? e(\"div\", { class: \"rich-text--reference-widget\" }, [\n e(f, { props: { text: this.text, referenceData: this.references } })\n ]) : null\n ]);\n }\n },\n render(e) {\n return this.useMarkdown ? this.renderMarkdown(e) : this.renderPlaintext(e);\n }\n}, U = null, Z = null;\nvar z = /* @__PURE__ */ g(\n P,\n U,\n Z,\n !1,\n null,\n \"5f33f45b\",\n null,\n null\n);\nconst X = z.exports;\nexport {\n X as N,\n f as a\n};\n","import i from \"./Components/NcActionButton.mjs\";\nimport m from \"./Components/NcActionButtonGroup.mjs\";\nimport e from \"./Components/NcActionCaption.mjs\";\nimport p from \"./Components/NcActionCheckbox.mjs\";\nimport c from \"./Components/NcActionInput.mjs\";\nimport f from \"./Components/NcActionLink.mjs\";\nimport n from \"./Components/NcActionRadio.mjs\";\nimport N from \"./Components/NcActionRouter.mjs\";\nimport a from \"./Components/NcActions.mjs\";\nimport s from \"./Components/NcActionSeparator.mjs\";\nimport l from \"./Components/NcActionText.mjs\";\nimport u from \"./Components/NcActionTextEditable.mjs\";\nimport d from \"./Components/NcAppContent.mjs\";\nimport A from \"./Components/NcAppContentDetails.mjs\";\nimport g from \"./Components/NcAppContentList.mjs\";\nimport b from \"./Components/NcAppNavigation.mjs\";\nimport S from \"./Components/NcAppNavigationCaption.mjs\";\nimport v from \"./Components/NcAppNavigationIconBullet.mjs\";\nimport T from \"./Components/NcAppNavigationItem.mjs\";\nimport x from \"./Components/NcAppNavigationNew.mjs\";\nimport C from \"./Components/NcAppNavigationNewItem.mjs\";\nimport k from \"./Components/NcAppNavigationSettings.mjs\";\nimport h from \"./Components/NcAppNavigationSpacer.mjs\";\nimport I from \"./Components/NcAppSettingsDialog.mjs\";\nimport y from \"./Components/NcAppSettingsSection.mjs\";\nimport P from \"./Components/NcAppSidebar.mjs\";\nimport B from \"./Components/NcAppSidebarTab.mjs\";\nimport { N as D } from \"./chunks/index-c3a7e2d0.mjs\";\nimport { u as pt } from \"./chunks/index-c3a7e2d0.mjs\";\nimport j from \"./Components/NcBreadcrumb.mjs\";\nimport R from \"./Components/NcBreadcrumbs.mjs\";\nimport O from \"./Components/NcButton.mjs\";\nimport _ from \"./Components/NcCheckboxRadioSwitch.mjs\";\nimport E from \"./Components/NcColorPicker.mjs\";\nimport L from \"./Components/NcContent.mjs\";\nimport M from \"./Components/NcCounterBubble.mjs\";\nimport w from \"./Components/NcDashboardWidget.mjs\";\nimport F from \"./Components/NcDashboardWidgetItem.mjs\";\nimport z from \"./Components/NcDateTime.mjs\";\nimport G from \"./Components/NcDateTimePicker.mjs\";\nimport W from \"./Components/NcDateTimePickerNative.mjs\";\nimport H from \"./Components/NcDialog.mjs\";\nimport V from \"./Components/NcDialogButton.mjs\";\nimport U from \"./Components/NcEmojiPicker.mjs\";\nimport $ from \"./Components/NcEmptyContent.mjs\";\nimport q from \"./Components/NcGuestContent.mjs\";\nimport J from \"./Components/NcHeaderMenu.mjs\";\nimport { N as K } from \"./chunks/index-20a9ace9.mjs\";\nimport Q from \"./Components/NcIconSvgWrapper.mjs\";\nimport X from \"./Components/NcListItem.mjs\";\nimport Y from \"./Components/NcListItemIcon.mjs\";\nimport Z from \"./Components/NcLoadingIcon.mjs\";\nimport oo from \"./Components/NcModal.mjs\";\nimport ro from \"./Components/NcNoteCard.mjs\";\nimport to from \"./Components/NcPasswordField.mjs\";\nimport io from \"./Components/NcPopover.mjs\";\nimport mo from \"./Components/NcProgressBar.mjs\";\nimport eo from \"./Components/NcRelatedResourcesPanel.mjs\";\nimport { N as po } from \"./chunks/index-5f2a5f57.mjs\";\nimport { r as ft } from \"./chunks/index-5f2a5f57.mjs\";\nimport co, { NcAutoCompleteResult as fo } from \"./Components/NcRichContenteditable.mjs\";\nimport { N as no } from \"./chunks/NcRichText-08b09b73.mjs\";\nimport \"./chunks/referencePickerModal-dffa6eda.mjs\";\nimport \"@nextcloud/axios\";\nimport \"@nextcloud/router\";\nimport No from \"./Components/NcSelect.mjs\";\nimport \"./chunks/l10n-f88f0458.mjs\";\nimport \"vue-material-design-icons/LinkVariant.vue\";\nimport ao from \"./Components/NcTextField.mjs\";\nimport \"vue-material-design-icons/DotsHorizontal.vue\";\nimport \"@nextcloud/event-bus\";\nimport \"vue-material-design-icons/ArrowLeft.vue\";\nimport \"vue-material-design-icons/Close.vue\";\nimport \"vue\";\nimport so from \"./Components/NcSavingIndicatorIcon.mjs\";\nimport lo from \"./Components/NcSelectTags.mjs\";\nimport uo from \"./Components/NcSettingsInputText.mjs\";\nimport Ao from \"./Components/NcSettingsSection.mjs\";\nimport { N as go } from \"./chunks/NcSettingsSelectGroup-b0e5ce2e.mjs\";\nimport bo from \"./Components/NcTimezonePicker.mjs\";\nimport So from \"./Components/NcUserBubble.mjs\";\nimport vo from \"./Components/NcTextArea.mjs\";\nimport { emojiAddRecent as Nt, emojiSearch as at } from \"./Functions/emoji.mjs\";\nimport { default as lt } from \"./Functions/usernameToColor.mjs\";\nimport { directive as To } from \"./Directives/Focus.mjs\";\nimport { directive as xo } from \"./Directives/Linkify.mjs\";\nimport \"./Directives/Tooltip.mjs\";\nimport { default as dt } from \"./Mixins/clickOutsideOptions.mjs\";\nimport { default as gt } from \"./Mixins/isFullscreen.mjs\";\nimport { default as St } from \"./Mixins/isMobile.mjs\";\nimport { VTooltip as Co } from \"floating-vue\";\nimport { VTooltip as Tt } from \"floating-vue\";\n/**\n * @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst ko = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({\n __proto__: null,\n NcActionButton: i,\n NcActionButtonGroup: m,\n NcActionCaption: e,\n NcActionCheckbox: p,\n NcActionInput: c,\n NcActionLink: f,\n NcActionRadio: n,\n NcActionRouter: N,\n NcActionSeparator: s,\n NcActionText: l,\n NcActionTextEditable: u,\n NcActions: a,\n NcAppContent: d,\n NcAppContentDetails: A,\n NcAppContentList: g,\n NcAppNavigation: b,\n NcAppNavigationCaption: S,\n NcAppNavigationIconBullet: v,\n NcAppNavigationItem: T,\n NcAppNavigationNew: x,\n NcAppNavigationNewItem: C,\n NcAppNavigationSettings: k,\n NcAppNavigationSpacer: h,\n NcAppSettingsDialog: I,\n NcAppSettingsSection: y,\n NcAppSidebar: P,\n NcAppSidebarTab: B,\n NcAutoCompleteResult: fo,\n NcAvatar: D,\n NcBreadcrumb: j,\n NcBreadcrumbs: R,\n NcButton: O,\n NcCheckboxRadioSwitch: _,\n NcColorPicker: E,\n NcContent: L,\n NcCounterBubble: M,\n NcDashboardWidget: w,\n NcDashboardWidgetItem: F,\n NcDateTime: z,\n NcDateTimePicker: G,\n NcDateTimePickerNative: W,\n NcDialog: H,\n NcDialogButton: V,\n NcEmojiPicker: U,\n NcEmptyContent: $,\n NcGuestContent: q,\n NcHeaderMenu: J,\n NcHighlight: K,\n NcIconSvgWrapper: Q,\n NcListItem: X,\n NcListItemIcon: Y,\n NcLoadingIcon: Z,\n NcMentionBubble: po,\n NcModal: oo,\n NcNoteCard: ro,\n NcPasswordField: to,\n NcPopover: io,\n NcProgressBar: mo,\n NcRelatedResourcesPanel: eo,\n NcRichContenteditable: co,\n NcRichText: no,\n NcSavingIndicatorIcon: so,\n NcSelect: No,\n NcSelectTags: lo,\n NcSettingsInputText: uo,\n NcSettingsSection: Ao,\n NcSettingsSelectGroup: go,\n NcTextArea: vo,\n NcTextField: ao,\n NcTimezonePicker: bo,\n NcUserBubble: So\n}, Symbol.toStringTag, { value: \"Module\" }));\n/**\n * @copyright 2022 Christopher Ng <chrng8@gmail.com>\n *\n * @author Christopher Ng <chrng8@gmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst tt = (o) => o.type === \"click\" || o.type === \"keydown\" && o.key === \"Enter\";\n/**\n * @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst ho = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({\n __proto__: null,\n Focus: To,\n Linkify: xo,\n Tooltip: Co\n}, Symbol.toStringTag, { value: \"Module\" })), it = {\n install(o) {\n Object.entries(ko).forEach(([t, r]) => {\n o.component(r.name || t, r);\n }), Object.entries(ho).forEach(([t, r]) => {\n o.directive(t, r);\n });\n }\n};\nexport {\n To as Focus,\n xo as Linkify,\n i as NcActionButton,\n m as NcActionButtonGroup,\n e as NcActionCaption,\n p as NcActionCheckbox,\n c as NcActionInput,\n f as NcActionLink,\n n as NcActionRadio,\n N as NcActionRouter,\n s as NcActionSeparator,\n l as NcActionText,\n u as NcActionTextEditable,\n a as NcActions,\n d as NcAppContent,\n A as NcAppContentDetails,\n g as NcAppContentList,\n b as NcAppNavigation,\n S as NcAppNavigationCaption,\n v as NcAppNavigationIconBullet,\n T as NcAppNavigationItem,\n x as NcAppNavigationNew,\n C as NcAppNavigationNewItem,\n k as NcAppNavigationSettings,\n h as NcAppNavigationSpacer,\n I as NcAppSettingsDialog,\n y as NcAppSettingsSection,\n P as NcAppSidebar,\n B as NcAppSidebarTab,\n fo as NcAutoCompleteResult,\n D as NcAvatar,\n j as NcBreadcrumb,\n R as NcBreadcrumbs,\n O as NcButton,\n _ as NcCheckboxRadioSwitch,\n E as NcColorPicker,\n L as NcContent,\n M as NcCounterBubble,\n w as NcDashboardWidget,\n F as NcDashboardWidgetItem,\n z as NcDateTime,\n G as NcDateTimePicker,\n W as NcDateTimePickerNative,\n H as NcDialog,\n V as NcDialogButton,\n U as NcEmojiPicker,\n $ as NcEmptyContent,\n q as NcGuestContent,\n J as NcHeaderMenu,\n K as NcHighlight,\n Q as NcIconSvgWrapper,\n X as NcListItem,\n Y as NcListItemIcon,\n Z as NcLoadingIcon,\n po as NcMentionBubble,\n oo as NcModal,\n ro as NcNoteCard,\n to as NcPasswordField,\n io as NcPopover,\n mo as NcProgressBar,\n eo as NcRelatedResourcesPanel,\n co as NcRichContenteditable,\n no as NcRichText,\n so as NcSavingIndicatorIcon,\n No as NcSelect,\n lo as NcSelectTags,\n uo as NcSettingsInputText,\n Ao as NcSettingsSection,\n go as NcSettingsSelectGroup,\n vo as NcTextArea,\n ao as NcTextField,\n bo as NcTimezonePicker,\n So as NcUserBubble,\n it as NextcloudVuePlugin,\n Tt as Tooltip,\n dt as clickOutsideOptions,\n Nt as emojiAddRecent,\n at as emojiSearch,\n tt as isA11yActivation,\n gt as isFullscreen,\n St as isMobile,\n ft as richEditor,\n pt as userStatus,\n lt as usernameToColor\n};\n"],"names":["r","unref","util","warn","window","document","cacheStringFunction","fn","cache","Object","create","str","prototype","toString","hyphenateRE","camelizeRE","replace","toLowerCase","unrefElement","elRef","_a","plain","$el","_","c","toUpperCase","defaultWindow","useResizeObserver","target","callback","options","observerOptions","observer","isSupported","isMounted","ref","getCurrentInstance","onMounted","value","useMounted","computed","Boolean","useSupported","cleanup","disconnect","targets","Array","isArray","map","el","stopWatch","watch","els","ResizeObserver","_el","observe","immediate","flush","deep","stop","getCurrentScope","onScopeDispose","navigator","location","globalThis","global","self","Number","POSITIVE_INFINITY","C","s","e","n","t","i","l","u","a","render","staticRenderFns","_compiled","functional","_scopeId","this","$vnode","ssrContext","parent","__VUE_SSR_CONTEXT__","call","_registeredComponents","add","_ssrRegister","$root","$options","shadowRoot","_injectStyles","v","y","f","k","beforeCreate","concat","exports","oe","name","emits","props","title","type","String","fillColor","default","size","_self","_c","_b","staticClass","attrs","role","on","click","$emit","$attrs","fill","width","height","viewBox","d","_v","_s","_e","Ee","__name","label","icon","setup","emit","__sfc","handleClick","NcButton","NcIconSvgWrapper","_setupProxy","scopedSlots","_u","key","svg","tag","proxy","je","message","additionalTrapElements","container","buttons","navigationClasses","contentClasses","dialogClasses","initialSize","box","isSVG","namespaceURI","includes","entry","boxSize","borderBoxSize","contentBoxSize","devicePixelContentBoxSize","$elem","styles","getComputedStyle","parseFloat","formatBoxSize","reduce","acc","inlineSize","blockSize","contentRect","ele","navigation","enableSlideshow","enableSwipe","slots","wrapper","dialogWidth","isNavigationCollapsed","hasNavigation","open","handleClose","modalProps","NcModal","DialogButton","close","domProps","textContent","class","_t","isCollapsed","_l","A","show_hidden","sort_favorites_first","crop_image_previews","get","then","F","S","data","showHiddenFiles","sortFavoritesFirst","cropImagePreviews","Qe","it","ce","ot","showCheckbox","fileListIconStyles","_m","T","yt","node","cropPreview","mimeFallback","attributes","previewUrl","fileid","URL","origin","searchParams","set","etag","ct","File","createElement","src","href","onerror","remove","onload","body","appendChild","previewURL","isFile","canLoadPreview","IconFile","IconFolder","style","backgroundImage","mime","Ft","allowPickDirectory","selected","canPick","displayName","basename","slice","extension","length","Folder","fileExtension","isDirectory","isPickable","toggleSelected","handleKeyDown","formatFileSize","NcCheckboxRadioSwitch","NcDateTime","FilePreview","_g","tabindex","keydown","disabled","checked","nodename","stopPropagation","timestamp","mtime","Pt","currentView","multiselect","loading","files","selectedFiles","path","currentConfig","p","sortBy","sorting_mode","order","sorting_direction","recent","P","favorites","o","b","N","L","z","E","U","Z","O","W","j","G","q","K","X","J","Q","Y","ee","te","$","g","x","filesViewConfig","favoritesViewConfig","recentViewConfig","Ge","ascending","descending","none","localeCompare","getTime","sort","favorite","filter","parentElement","children","clientHeight","isSameNode","Math","floor","addEventListener","removeEventListener","customSortingConfig","filesAppSorting","sortingConfig","sortByName","sortBySize","sortByModified","toggleSorting","sortedFiles","selectableFiles","allSelected","onSelectAll","onNodeSelected","onChangeDirectory","skeletonNumber","fileContainer","IconSortAscending","IconSortDescending","LoadingTableRow","FileListRow","wide","staticStyle","Vt","At","Ot","showMenu","trim","querySelector","OC","config","blacklist_files_regex","match","setCustomValidity","split","join","newNodeName","nameInput","validateInput","onSubmit","pathElements","IconHome","IconPlus","NcActions","NcActionInput","NcBreadcrumbs","NcBreadcrumb","placeholder","submit","input","Kt","en","an","dn","mn","filterString","id","allViews","currentViewObject","updateFilterValue","IconClose","IconMagnify","NcSelect","NcTextField","Fragment","clearable","searchable","Rn","filterFn","mimetypeFilter","async","sessionStorage","getItem","setItem","isSupportedMimeType","some","hn","isLoading","loadFiles","getFile","client","round","Date","now","search","details","results","getDirectoryContents","stat","gn","startsWith","dialogProps","dialogButtons","viewHeadline","savedPath","navigatedPath","currentPath","filteredFiles","noFilesDescription","onCreateFolder","createDirectory","catch","DialogBase","FileList","FilePickerBreadcrumbs","FilePickerNavigation","NcEmptyContent","description","m","setApp","build","setUid","uid","Ne","_entries","registerEntry","validateEntry","push","unregisterEntry","getEntryIndex","splice","entries","getEntries","enabled","findIndex","iconSvgInline","iconClass","handler","Error","_nc_newfilemenu","debug","Jt","log","min","pow","toFixed","toLocaleString","DEFAULT","HIDDEN","Dt","_action","constructor","validateAction","exec","execBatch","inline","renderInline","values","er","_nc_fileactions","find","error","action","tr","ir","_nc_filelistheader","NONE","CREATE","READ","UPDATE","DELETE","SHARE","ALL","nc","oc","ocs","V","_nc_dav_properties","_nc_dav_namespaces","keys","or","ur","be","source","crtime","permissions","owner","root","status","NEW","FAILED","LOADING","LOCKED","D","_data","_attributes","_knownDavService","updateMtime","Reflect","deleteProperty","Proxy","encodedSource","dirname","indexOf","pathname","isDavRessource","pop","move","rename","ye","super","dr","headers","requesttoken","patch","method","ar","includeSelf","filename","ve","parse","lastmod","parseInt","getcontentlength","hasPreview","Te","_views","_currentView","register","views","setActive","active","lr","_nc_navigation","Ie","_column","Ae","summary","R","RegExp","isExist","isEmptyObject","merge","getValue","isName","getAllMatches","startIndex","lastIndex","nameRegexp","M","Oe","allowBooleanAttributes","unpairedTags","substr","w","validate","assign","err","substring","Se","xe","index","H","code","msg","line","tagClosed","tagName","tagStartPos","col","Ve","JSON","stringify","Ce","Pe","$e","Le","hasOwnProperty","Fe","B","re","preserveOrder","attributeNamePrefix","attributesGroupName","textNodeName","ignoreAttributes","removeNSPrefix","parseTagValue","parseAttributeValue","trimValues","cdataPropName","numberParseOptions","hex","leadingZeros","eNotation","tagValueProcessor","attributeValueProcessor","stopNodes","alwaysCreateTextNode","commentPropName","processEntities","htmlEntities","ignoreDeclaration","ignorePiTags","transformTagName","transformAttributeName","updateTag","buildOptions","defaultOptions","ke","Xe","Ue","ze","He","Ke","We","Ye","Je","decimalPoint","tagname","child","addChild","tt","entityName","val","regx","entities","rt","skipLike","test","De","lastEntities","regex","st","replaceEntitiesValue","charAt","ut","dt","resolveNameSpace","at","saveTextToParentTag","lastIndexOf","tagsNodeStack","tagExp","attrExpPresent","buildAttributesMap","closeIndex","docTypeEntities","parseTextData","rawTagName","isItStopNode","h","readStopNodeData","tagContent","lt","ft","ampEntity","ht","pt","gt","ne","ie","Nt","bt","Et","prettify","currentNode","apos","quot","space","cent","pound","yen","euro","copyright","reg","inr","addExternalEntities","parseXml","vt","Tt","se","xt","indentBy","suppressUnpairedNode","suppressEmptyNode","endsWith","suppressBooleanAttributes","format","oneListGroup","isAttribute","attrPrefixLen","Rt","processTextOrObjNode","Lt","indentate","St","tagEndChar","newLine","j2x","buildTextValNode","attrStr","buildObjectNode","repeat","arrayNodeName","buildAttrPairStr","closeTag","XMLParser","externalEntities","addEntity","XMLValidator","XMLBuilder","hr","_view","Ut","caption","emptyTitle","emptyCaption","getContents","params","columns","emptyView","sticky","expanded","defaultSortKey","TypeError","Xt","forEach","pr","gr","wr","required","subline","iconUrl","avatarUrl","getAvatarUrl","haveStatus","methods","user","directives","tooltip","mixins","autoComplete","Function","menuContainer","Element","multiline","contenteditable","maxlength","emojiAutocomplete","linkAutocomplete","textSmiles","tribute","autocompleteOptions","allowSpaces","fillAttr","lookup","menuItemTemplate","renderComponentHtml","original","noMatchTemplate","selectTemplate","genSelectTemplate","debouncedAutoComplete","emojiOptions","trigger","native","short_name","unshift","containerClass","itemClass","linkOptions","icon_url","getLink","localValue","isComposing","isEmptyValue","isFF","userAgent","isOverMaxlength","tooltipString","content","count","shown","canEdit","listeners","$listeners","paste","$refs","innerHTML","parseContent","updateContent","mounted","autocompleteTribute","attach","emojiTribute","linkTribute","contentEditable","beforeDestroy","detach","focus","getElementById","result","insertText","createTextNode","replaceWith","setCursorAfter","updateValue","console","createRange","setEndAfter","collapse","getSelection","removeAllRanges","addRange","onInput","onPaste","preventDefault","clipboardData","items","getData","rangeCount","getRangeAt","deleteFromDocument","insertNode","setStart","endOffset","renderContent","onDelete","commonAncestorContainer","nodeType","startOffset","anchorNode","selectNodeContents","setEndBefore","anchorOffset","setEnd","cloneContents","lastChild","deleteContents","onEnter","isActive","onCtrlEnter","onKeyUp","stopImmediatePropagation","rawName","expression","compositionstart","compositionend","_k","keyCode","apply","arguments","ctrlKey","shiftKey","altKey","metaKey","components","NcReferenceWidget","text","referenceData","limit","references","isVisible","displayedReferences","firstReference","fetch","resolve","encodeURIComponent","post","openGraphObject","reference","rel","autolink","useMarkdown","url","flat","component","NcReferenceList","referenceLimit","markdownCssClasses","ol","ul","li","strong","em","h1","h2","h3","h4","h5","h6","table","pre","blockquote","renderPlaintext","context","renderMarkdown","use","handlers","prefix","processSync","Symbol","toStringTag"],"sourceRoot":""}