import process from 'node:process';globalThis._importMeta_=globalThis._importMeta_||{url:"file:///_entry.js",env:process.env};import { inject, ref, h, getCurrentInstance, nextTick, reactive, defineComponent, createVNode, isRef, toValue, hasInjectionContext, watchEffect, onBeforeUnmount, onDeactivated, onActivated, computed, shallowRef, watch, provide, unref, cloneVNode, createElementBlock, Fragment, isVNode, Comment, Text, getCurrentScope, onScopeDispose, Transition, toRef as toRef$1, readonly, customRef, TransitionGroup, render, Teleport, withDirectives, vShow, defineAsyncComponent, shallowReactive, Suspense, useSSRContext, createApp, triggerRef, mergeProps, withCtx, onErrorCaptured, onServerPrefetch, resolveDynamicComponent, effectScope, isReadonly, toRaw, isShallow, isReactive } from 'vue'; import { t as createError$1, h as hasProtocol, z as isScriptProtocol, j as joinURL, A as withQuery, B as sanitizeStatusCode, C as getContext, $ as $fetch, D as baseURL, E as createHooks, e as defu, F as executeAsync, G as getRequestHeaders } from '../nitro/nitro.mjs'; import { defineStore, setActivePinia, createPinia, shouldHydrate } from 'pinia'; import { createClient } from '@supabase/supabase-js'; import axios from 'axios'; import { isEmpty, get, cloneDeep } from 'lodash-es'; import _extends from '@babel/runtime/helpers/esm/extends'; import _objectSpread$d from '@babel/runtime/helpers/esm/objectSpread2'; import { generate as generate$1, blue as blue$1 } from '@ant-design/colors'; import { TinyColor } from '@ctrl/tinycolor'; import { serialize, compile, stringify } from 'stylis'; import { createTypes } from 'vue-types'; import { ExclamationCircleOutlined as ExclamationCircleOutlined$2 } from '@ant-design/icons-vue'; import { ssrRenderAttrs, ssrRenderAttr, ssrRenderStyle, ssrRenderComponent, ssrRenderSuspense, ssrRenderVNode } from 'vue/server-renderer'; import { walkResolver } from 'unhead/utils'; /* eslint-disable */ // Inspired by https://github.com/garycourt/murmurhash-js // Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86 function murmur2(str) { // 'm' and 'r' are mixing constants generated offline. // They're not really 'magic', they just happen to work well. // const m = 0x5bd1e995; // const r = 24; // Initialize the hash var h = 0; // Mix 4 bytes at a time into the hash var k, i = 0, len = str.length; for (; len >= 4; ++i, len -= 4) { k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24; k = /* Math.imul(k, m): */ (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16); k ^= /* k >>> r: */ k >>> 24; h = /* Math.imul(k, m): */ (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^ /* Math.imul(h, m): */ (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16); } // Handle the last few bytes of the input array switch (len) { case 3: h ^= (str.charCodeAt(i + 2) & 0xff) << 16; case 2: h ^= (str.charCodeAt(i + 1) & 0xff) << 8; case 1: h ^= str.charCodeAt(i) & 0xff; h = /* Math.imul(h, m): */ (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16); } // Do a few final mixes of the hash to ensure the last few // bytes are well-incorporated. h ^= h >>> 13; h = /* Math.imul(h, m): */ (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16); return ((h ^ h >>> 15) >>> 0).toString(36); } var unitlessKeys = { animationIterationCount: 1, aspectRatio: 1, borderImageOutset: 1, borderImageSlice: 1, borderImageWidth: 1, boxFlex: 1, boxFlexGroup: 1, boxOrdinalGroup: 1, columnCount: 1, columns: 1, flex: 1, flexGrow: 1, flexPositive: 1, flexShrink: 1, flexNegative: 1, flexOrder: 1, gridRow: 1, gridRowEnd: 1, gridRowSpan: 1, gridRowStart: 1, gridColumn: 1, gridColumnEnd: 1, gridColumnSpan: 1, gridColumnStart: 1, msGridRow: 1, msGridRowSpan: 1, msGridColumn: 1, msGridColumnSpan: 1, fontWeight: 1, lineHeight: 1, opacity: 1, order: 1, orphans: 1, tabSize: 1, widows: 1, zIndex: 1, zoom: 1, WebkitLineClamp: 1, // SVG-related properties fillOpacity: 1, floodOpacity: 1, stopOpacity: 1, strokeDasharray: 1, strokeDashoffset: 1, strokeMiterlimit: 1, strokeOpacity: 1, strokeWidth: 1 }; var contextKey = Symbol('iconContext'); var useInjectIconContext = function useInjectIconContext() { return inject(contextKey, { prefixCls: ref('anticon'), rootClassName: ref(''), csp: ref() }); }; function _objectSpread$c(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$c(target, key, source[key]); }); } return target; } function _defineProperty$c(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function warning$2(valid, message) { } function isIconDefinition(target) { return typeof target === 'object' && typeof target.name === 'string' && typeof target.theme === 'string' && (typeof target.icon === 'object' || typeof target.icon === 'function'); } function generate(node, key, rootProps) { if (!rootProps) { return h(node.tag, _objectSpread$c({ key: key }, node.attrs), (node.children || []).map(function (child, index) { return generate(child, "".concat(key, "-").concat(node.tag, "-").concat(index)); })); } return h(node.tag, _objectSpread$c({ key: key }, rootProps, node.attrs), (node.children || []).map(function (child, index) { return generate(child, "".concat(key, "-").concat(node.tag, "-").concat(index)); })); } function getSecondaryColor(primaryColor) { // choose the second color return generate$1(primaryColor)[0]; } function normalizeTwoToneColors(twoToneColor) { if (!twoToneColor) { return []; } return Array.isArray(twoToneColor) ? twoToneColor : [twoToneColor]; } // These props make sure that the SVG behaviours like general text. var iconStyles = "\n.anticon {\n display: inline-block;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n"; var useInsertStyles = function useInsertStyles() { var _useInjectIconContext = useInjectIconContext(), prefixCls = _useInjectIconContext.prefixCls; _useInjectIconContext.csp; getCurrentInstance(); var mergedStyleStr = iconStyles; if (prefixCls) { mergedStyleStr = mergedStyleStr.replace(/anticon/g, prefixCls.value); } nextTick(function () { { return; } }); }; var _excluded$1 = ["icon", "primaryColor", "secondaryColor"]; function _objectWithoutProperties$1(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose$1(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } function _objectWithoutPropertiesLoose$1(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function _objectSpread$b(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$b(target, key, source[key]); }); } return target; } function _defineProperty$b(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var twoToneColorPalette = reactive({ primaryColor: '#333', secondaryColor: '#E6E6E6', calculated: false }); function setTwoToneColors(_ref) { var primaryColor = _ref.primaryColor, secondaryColor = _ref.secondaryColor; twoToneColorPalette.primaryColor = primaryColor; twoToneColorPalette.secondaryColor = secondaryColor || getSecondaryColor(primaryColor); twoToneColorPalette.calculated = !!secondaryColor; } function getTwoToneColors() { return _objectSpread$b({}, twoToneColorPalette); } var IconBase = function IconBase(props, context) { var _props$context$attrs = _objectSpread$b({}, props, context.attrs), icon = _props$context$attrs.icon, primaryColor = _props$context$attrs.primaryColor, secondaryColor = _props$context$attrs.secondaryColor, restProps = _objectWithoutProperties$1(_props$context$attrs, _excluded$1); var colors = twoToneColorPalette; if (primaryColor) { colors = { primaryColor: primaryColor, secondaryColor: secondaryColor || getSecondaryColor(primaryColor) }; } warning$2(isIconDefinition(icon)); if (!isIconDefinition(icon)) { return null; } var target = icon; if (target && typeof target.icon === 'function') { target = _objectSpread$b({}, target, { icon: target.icon(colors.primaryColor, colors.secondaryColor) }); } return generate(target.icon, "svg-".concat(target.name), _objectSpread$b({}, restProps, { 'data-icon': target.name, width: '1em', height: '1em', fill: 'currentColor', 'aria-hidden': 'true' })); // }, }; IconBase.props = { icon: Object, primaryColor: String, secondaryColor: String, focusable: String }; IconBase.inheritAttrs = false; IconBase.displayName = 'IconBase'; IconBase.getTwoToneColors = getTwoToneColors; IconBase.setTwoToneColors = setTwoToneColors; function _slicedToArray$1(arr, i) { return _arrayWithHoles$1(arr) || _iterableToArrayLimit$1(arr, i) || _unsupportedIterableToArray$1(arr, i) || _nonIterableRest$1(); } function _nonIterableRest$1() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray$1(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$1(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen); } function _arrayLikeToArray$1(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } function _iterableToArrayLimit$1(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles$1(arr) { if (Array.isArray(arr)) return arr; } function setTwoToneColor(twoToneColor) { var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor), _normalizeTwoToneColo2 = _slicedToArray$1(_normalizeTwoToneColo, 2), primaryColor = _normalizeTwoToneColo2[0], secondaryColor = _normalizeTwoToneColo2[1]; return IconBase.setTwoToneColors({ primaryColor: primaryColor, secondaryColor: secondaryColor }); } function getTwoToneColor() { var colors = IconBase.getTwoToneColors(); if (!colors.calculated) { return colors.primaryColor; } return [colors.primaryColor, colors.secondaryColor]; } var InsertStyles = defineComponent({ name: 'InsertStyles', setup: function setup() { useInsertStyles(); return function () { return null; }; } }); var _excluded = ["class", "icon", "spin", "rotate", "tabindex", "twoToneColor", "onClick"]; function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function _objectSpread$a(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$a(target, key, source[key]); }); } return target; } function _defineProperty$a(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } setTwoToneColor(blue$1.primary); var Icon = function Icon(props, context) { var _classObj; var _props$context$attrs = _objectSpread$a({}, props, context.attrs), cls = _props$context$attrs["class"], icon = _props$context$attrs.icon, spin = _props$context$attrs.spin, rotate = _props$context$attrs.rotate, tabindex = _props$context$attrs.tabindex, twoToneColor = _props$context$attrs.twoToneColor, onClick = _props$context$attrs.onClick, restProps = _objectWithoutProperties(_props$context$attrs, _excluded); var _useInjectIconContext = useInjectIconContext(), prefixCls = _useInjectIconContext.prefixCls, rootClassName = _useInjectIconContext.rootClassName; var classObj = (_classObj = {}, _defineProperty$a(_classObj, rootClassName.value, !!rootClassName.value), _defineProperty$a(_classObj, prefixCls.value, true), _defineProperty$a(_classObj, "".concat(prefixCls.value, "-").concat(icon.name), Boolean(icon.name)), _defineProperty$a(_classObj, "".concat(prefixCls.value, "-spin"), !!spin || icon.name === 'loading'), _classObj); var iconTabIndex = tabindex; if (iconTabIndex === undefined && onClick) { iconTabIndex = -1; } var svgStyle = rotate ? { msTransform: "rotate(".concat(rotate, "deg)"), transform: "rotate(".concat(rotate, "deg)") } : undefined; var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor), _normalizeTwoToneColo2 = _slicedToArray(_normalizeTwoToneColo, 2), primaryColor = _normalizeTwoToneColo2[0], secondaryColor = _normalizeTwoToneColo2[1]; return createVNode("span", _objectSpread$a({ "role": "img", "aria-label": icon.name }, restProps, { "onClick": onClick, "class": [classObj, cls], "tabindex": iconTabIndex }), [createVNode(IconBase, { "icon": icon, "primaryColor": primaryColor, "secondaryColor": secondaryColor, "style": svgStyle }, null), createVNode(InsertStyles, null, null)]); }; Icon.props = { spin: Boolean, rotate: Number, icon: Object, twoToneColor: [String, Array] }; Icon.displayName = 'AntdIcon'; Icon.inheritAttrs = false; Icon.getTwoToneColor = getTwoToneColor; Icon.setTwoToneColor = setTwoToneColor; // This icon file is generated automatically. var LoadingOutlined$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z" } }] }, "name": "loading", "theme": "outlined" }; function _objectSpread$9(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$9(target, key, source[key]); }); } return target; } function _defineProperty$9(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var LoadingOutlined = function LoadingOutlined(props, context) { var p = _objectSpread$9({}, props, context.attrs); return createVNode(Icon, _objectSpread$9({}, p, { "icon": LoadingOutlined$1 }), null); }; LoadingOutlined.displayName = 'LoadingOutlined'; LoadingOutlined.inheritAttrs = false; // This icon file is generated automatically. var CloseOutlined$1 = { "icon": { "tag": "svg", "attrs": { "fill-rule": "evenodd", "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z" } }] }, "name": "close", "theme": "outlined" }; function _objectSpread$8(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$8(target, key, source[key]); }); } return target; } function _defineProperty$8(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var CloseOutlined = function CloseOutlined(props, context) { var p = _objectSpread$8({}, props, context.attrs); return createVNode(Icon, _objectSpread$8({}, p, { "icon": CloseOutlined$1 }), null); }; CloseOutlined.displayName = 'CloseOutlined'; CloseOutlined.inheritAttrs = false; // This icon file is generated automatically. var CloseCircleFilled$1 = { "icon": { "tag": "svg", "attrs": { "fill-rule": "evenodd", "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z" } }] }, "name": "close-circle", "theme": "filled" }; function _objectSpread$7(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$7(target, key, source[key]); }); } return target; } function _defineProperty$7(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var CloseCircleFilled = function CloseCircleFilled(props, context) { var p = _objectSpread$7({}, props, context.attrs); return createVNode(Icon, _objectSpread$7({}, p, { "icon": CloseCircleFilled$1 }), null); }; CloseCircleFilled.displayName = 'CloseCircleFilled'; CloseCircleFilled.inheritAttrs = false; // This icon file is generated automatically. var CheckCircleOutlined$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z" } }, { "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }] }, "name": "check-circle", "theme": "outlined" }; function _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$6(target, key, source[key]); }); } return target; } function _defineProperty$6(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var CheckCircleOutlined = function CheckCircleOutlined(props, context) { var p = _objectSpread$6({}, props, context.attrs); return createVNode(Icon, _objectSpread$6({}, p, { "icon": CheckCircleOutlined$1 }), null); }; CheckCircleOutlined.displayName = 'CheckCircleOutlined'; CheckCircleOutlined.inheritAttrs = false; // This icon file is generated automatically. var ExclamationCircleOutlined$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { "tag": "path", "attrs": { "d": "M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z" } }] }, "name": "exclamation-circle", "theme": "outlined" }; function _objectSpread$5(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$5(target, key, source[key]); }); } return target; } function _defineProperty$5(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var ExclamationCircleOutlined = function ExclamationCircleOutlined(props, context) { var p = _objectSpread$5({}, props, context.attrs); return createVNode(Icon, _objectSpread$5({}, p, { "icon": ExclamationCircleOutlined$1 }), null); }; ExclamationCircleOutlined.displayName = 'ExclamationCircleOutlined'; ExclamationCircleOutlined.inheritAttrs = false; // This icon file is generated automatically. var InfoCircleOutlined$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { "tag": "path", "attrs": { "d": "M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z" } }] }, "name": "info-circle", "theme": "outlined" }; function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$4(target, key, source[key]); }); } return target; } function _defineProperty$4(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var InfoCircleOutlined = function InfoCircleOutlined(props, context) { var p = _objectSpread$4({}, props, context.attrs); return createVNode(Icon, _objectSpread$4({}, p, { "icon": InfoCircleOutlined$1 }), null); }; InfoCircleOutlined.displayName = 'InfoCircleOutlined'; InfoCircleOutlined.inheritAttrs = false; // This icon file is generated automatically. var CloseCircleOutlined$1 = { "icon": { "tag": "svg", "attrs": { "fill-rule": "evenodd", "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z" } }] }, "name": "close-circle", "theme": "outlined" }; function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$3(target, key, source[key]); }); } return target; } function _defineProperty$3(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var CloseCircleOutlined = function CloseCircleOutlined(props, context) { var p = _objectSpread$3({}, props, context.attrs); return createVNode(Icon, _objectSpread$3({}, p, { "icon": CloseCircleOutlined$1 }), null); }; CloseCircleOutlined.displayName = 'CloseCircleOutlined'; CloseCircleOutlined.inheritAttrs = false; // This icon file is generated automatically. var CheckCircleFilled$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z" } }] }, "name": "check-circle", "theme": "filled" }; function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$2(target, key, source[key]); }); } return target; } function _defineProperty$2(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var CheckCircleFilled = function CheckCircleFilled(props, context) { var p = _objectSpread$2({}, props, context.attrs); return createVNode(Icon, _objectSpread$2({}, p, { "icon": CheckCircleFilled$1 }), null); }; CheckCircleFilled.displayName = 'CheckCircleFilled'; CheckCircleFilled.inheritAttrs = false; // This icon file is generated automatically. var ExclamationCircleFilled$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, "name": "exclamation-circle", "theme": "filled" }; function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$1(target, key, source[key]); }); } return target; } function _defineProperty$1(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var ExclamationCircleFilled = function ExclamationCircleFilled(props, context) { var p = _objectSpread$1({}, props, context.attrs); return createVNode(Icon, _objectSpread$1({}, p, { "icon": ExclamationCircleFilled$1 }), null); }; ExclamationCircleFilled.displayName = 'ExclamationCircleFilled'; ExclamationCircleFilled.inheritAttrs = false; // This icon file is generated automatically. var InfoCircleFilled$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, "name": "info-circle", "theme": "filled" }; function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var InfoCircleFilled = function InfoCircleFilled(props, context) { var p = _objectSpread({}, props, context.attrs); return createVNode(Icon, _objectSpread({}, p, { "icon": InfoCircleFilled$1 }), null); }; InfoCircleFilled.displayName = 'InfoCircleFilled'; InfoCircleFilled.inheritAttrs = false; var SECONDS_A_MINUTE = 60; var SECONDS_A_HOUR = SECONDS_A_MINUTE * 60; var SECONDS_A_DAY = SECONDS_A_HOUR * 24; var SECONDS_A_WEEK = SECONDS_A_DAY * 7; var MILLISECONDS_A_SECOND = 1e3; var MILLISECONDS_A_MINUTE = SECONDS_A_MINUTE * MILLISECONDS_A_SECOND; var MILLISECONDS_A_HOUR = SECONDS_A_HOUR * MILLISECONDS_A_SECOND; var MILLISECONDS_A_DAY = SECONDS_A_DAY * MILLISECONDS_A_SECOND; var MILLISECONDS_A_WEEK = SECONDS_A_WEEK * MILLISECONDS_A_SECOND; // English locales var MS = 'millisecond'; var S = 'second'; var MIN = 'minute'; var H = 'hour'; var D = 'day'; var W = 'week'; var M = 'month'; var Q = 'quarter'; var Y = 'year'; var DATE = 'date'; var FORMAT_DEFAULT = 'YYYY-MM-DDTHH:mm:ssZ'; var INVALID_DATE_STRING = 'Invalid Date'; // regex var REGEX_PARSE = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/; var REGEX_FORMAT = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g; // English [en] // We don't need weekdaysShort, weekdaysMin, monthsShort in en.js locale const en = { name: 'en', weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), ordinal: function ordinal(n) { var s = ['th', 'st', 'nd', 'rd']; var v = n % 100; return "[" + n + (s[(v - 20) % 10] || s[v] || s[0]) + "]"; } }; var padStart = function padStart(string, length, pad) { var s = String(string); if (!s || s.length >= length) return string; return "" + Array(length + 1 - s.length).join(pad) + string; }; var padZoneStr = function padZoneStr(instance) { var negMinutes = -instance.utcOffset(); var minutes = Math.abs(negMinutes); var hourOffset = Math.floor(minutes / 60); var minuteOffset = minutes % 60; return "" + (negMinutes <= 0 ? '+' : '-') + padStart(hourOffset, 2, '0') + ":" + padStart(minuteOffset, 2, '0'); }; var monthDiff = function monthDiff(a, b) { // function from moment.js in order to keep the same result if (a.date() < b.date()) return -monthDiff(b, a); var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()); var anchor = a.clone().add(wholeMonthDiff, M); var c = b - anchor < 0; var anchor2 = a.clone().add(wholeMonthDiff + (c ? -1 : 1), M); return +(-(wholeMonthDiff + (b - anchor) / (c ? anchor - anchor2 : anchor2 - anchor)) || 0); }; var absFloor = function absFloor(n) { return n < 0 ? Math.ceil(n) || 0 : Math.floor(n); }; var prettyUnit = function prettyUnit(u) { var special = { M: M, y: Y, w: W, d: D, D: DATE, h: H, m: MIN, s: S, ms: MS, Q: Q }; return special[u] || String(u || '').toLowerCase().replace(/s$/, ''); }; var isUndefined = function isUndefined(s) { return s === undefined; }; const U = { s: padStart, z: padZoneStr, m: monthDiff, a: absFloor, p: prettyUnit, u: isUndefined }; var L = 'en'; // global locale var Ls = {}; // global loaded locale Ls[L] = en; var IS_DAYJS = '$isDayjsObject'; // eslint-disable-next-line no-use-before-define var isDayjs = function isDayjs(d) { return d instanceof Dayjs || !!(d && d[IS_DAYJS]); }; var parseLocale = function parseLocale(preset, object, isLocal) { var l; if (!preset) return L; if (typeof preset === 'string') { var presetLower = preset.toLowerCase(); if (Ls[presetLower]) { l = presetLower; } if (object) { Ls[presetLower] = object; l = presetLower; } var presetSplit = preset.split('-'); if (!l && presetSplit.length > 1) { return parseLocale(presetSplit[0]); } } else { var name = preset.name; Ls[name] = preset; l = name; } if (!isLocal && l) L = l; return l || !isLocal && L; }; var dayjs = function dayjs(date, c) { if (isDayjs(date)) { return date.clone(); } // eslint-disable-next-line no-nested-ternary var cfg = typeof c === 'object' ? c : {}; cfg.date = date; cfg.args = arguments; // eslint-disable-line prefer-rest-params return new Dayjs(cfg); // eslint-disable-line no-use-before-define }; var wrapper = function wrapper(date, instance) { return dayjs(date, { locale: instance.$L, utc: instance.$u, x: instance.$x, $offset: instance.$offset // todo: refactor; do not use this.$offset in you code }); }; var Utils = U; // for plugin use Utils.l = parseLocale; Utils.i = isDayjs; Utils.w = wrapper; var parseDate = function parseDate(cfg) { var date = cfg.date, utc = cfg.utc; if (date === null) return new Date(NaN); // null is invalid if (Utils.u(date)) return new Date(); // today if (date instanceof Date) return new Date(date); if (typeof date === 'string' && !/Z$/i.test(date)) { var d = date.match(REGEX_PARSE); if (d) { var m = d[2] - 1 || 0; var ms = (d[7] || '0').substring(0, 3); if (utc) { return new Date(Date.UTC(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms)); } return new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms); } } return new Date(date); // everything else }; var Dayjs = /*#__PURE__*/function () { function Dayjs(cfg) { this.$L = parseLocale(cfg.locale, null, true); this.parse(cfg); // for plugin this.$x = this.$x || cfg.x || {}; this[IS_DAYJS] = true; } var _proto = Dayjs.prototype; _proto.parse = function parse(cfg) { this.$d = parseDate(cfg); this.init(); }; _proto.init = function init() { var $d = this.$d; this.$y = $d.getFullYear(); this.$M = $d.getMonth(); this.$D = $d.getDate(); this.$W = $d.getDay(); this.$H = $d.getHours(); this.$m = $d.getMinutes(); this.$s = $d.getSeconds(); this.$ms = $d.getMilliseconds(); } // eslint-disable-next-line class-methods-use-this ; _proto.$utils = function $utils() { return Utils; }; _proto.isValid = function isValid() { return !(this.$d.toString() === INVALID_DATE_STRING); }; _proto.isSame = function isSame(that, units) { var other = dayjs(that); return this.startOf(units) <= other && other <= this.endOf(units); }; _proto.isAfter = function isAfter(that, units) { return dayjs(that) < this.startOf(units); }; _proto.isBefore = function isBefore(that, units) { return this.endOf(units) < dayjs(that); }; _proto.$g = function $g(input, get, set) { if (Utils.u(input)) return this[get]; return this.set(set, input); }; _proto.unix = function unix() { return Math.floor(this.valueOf() / 1000); }; _proto.valueOf = function valueOf() { // timezone(hour) * 60 * 60 * 1000 => ms return this.$d.getTime(); }; _proto.startOf = function startOf(units, _startOf) { var _this = this; // startOf -> endOf var isStartOf = !Utils.u(_startOf) ? _startOf : true; var unit = Utils.p(units); var instanceFactory = function instanceFactory(d, m) { var ins = Utils.w(_this.$u ? Date.UTC(_this.$y, m, d) : new Date(_this.$y, m, d), _this); return isStartOf ? ins : ins.endOf(D); }; var instanceFactorySet = function instanceFactorySet(method, slice) { var argumentStart = [0, 0, 0, 0]; var argumentEnd = [23, 59, 59, 999]; return Utils.w(_this.toDate()[method].apply( // eslint-disable-line prefer-spread _this.toDate('s'), (isStartOf ? argumentStart : argumentEnd).slice(slice)), _this); }; var $W = this.$W, $M = this.$M, $D = this.$D; var utcPad = "set" + (this.$u ? 'UTC' : ''); switch (unit) { case Y: return isStartOf ? instanceFactory(1, 0) : instanceFactory(31, 11); case M: return isStartOf ? instanceFactory(1, $M) : instanceFactory(0, $M + 1); case W: { var weekStart = this.$locale().weekStart || 0; var gap = ($W < weekStart ? $W + 7 : $W) - weekStart; return instanceFactory(isStartOf ? $D - gap : $D + (6 - gap), $M); } case D: case DATE: return instanceFactorySet(utcPad + "Hours", 0); case H: return instanceFactorySet(utcPad + "Minutes", 1); case MIN: return instanceFactorySet(utcPad + "Seconds", 2); case S: return instanceFactorySet(utcPad + "Milliseconds", 3); default: return this.clone(); } }; _proto.endOf = function endOf(arg) { return this.startOf(arg, false); }; _proto.$set = function $set(units, _int) { var _C$D$C$DATE$C$M$C$Y$C; // private set var unit = Utils.p(units); var utcPad = "set" + (this.$u ? 'UTC' : ''); var name = (_C$D$C$DATE$C$M$C$Y$C = {}, _C$D$C$DATE$C$M$C$Y$C[D] = utcPad + "Date", _C$D$C$DATE$C$M$C$Y$C[DATE] = utcPad + "Date", _C$D$C$DATE$C$M$C$Y$C[M] = utcPad + "Month", _C$D$C$DATE$C$M$C$Y$C[Y] = utcPad + "FullYear", _C$D$C$DATE$C$M$C$Y$C[H] = utcPad + "Hours", _C$D$C$DATE$C$M$C$Y$C[MIN] = utcPad + "Minutes", _C$D$C$DATE$C$M$C$Y$C[S] = utcPad + "Seconds", _C$D$C$DATE$C$M$C$Y$C[MS] = utcPad + "Milliseconds", _C$D$C$DATE$C$M$C$Y$C)[unit]; var arg = unit === D ? this.$D + (_int - this.$W) : _int; if (unit === M || unit === Y) { // clone is for badMutable plugin var date = this.clone().set(DATE, 1); date.$d[name](arg); date.init(); this.$d = date.set(DATE, Math.min(this.$D, date.daysInMonth())).$d; } else if (name) this.$d[name](arg); this.init(); return this; }; _proto.set = function set(string, _int2) { return this.clone().$set(string, _int2); }; _proto.get = function get(unit) { return this[Utils.p(unit)](); }; _proto.add = function add(number, units) { var _this2 = this, _C$MIN$C$H$C$S$unit; number = Number(number); // eslint-disable-line no-param-reassign var unit = Utils.p(units); var instanceFactorySet = function instanceFactorySet(n) { var d = dayjs(_this2); return Utils.w(d.date(d.date() + Math.round(n * number)), _this2); }; if (unit === M) { return this.set(M, this.$M + number); } if (unit === Y) { return this.set(Y, this.$y + number); } if (unit === D) { return instanceFactorySet(1); } if (unit === W) { return instanceFactorySet(7); } var step = (_C$MIN$C$H$C$S$unit = {}, _C$MIN$C$H$C$S$unit[MIN] = MILLISECONDS_A_MINUTE, _C$MIN$C$H$C$S$unit[H] = MILLISECONDS_A_HOUR, _C$MIN$C$H$C$S$unit[S] = MILLISECONDS_A_SECOND, _C$MIN$C$H$C$S$unit)[unit] || 1; // ms var nextTimeStamp = this.$d.getTime() + number * step; return Utils.w(nextTimeStamp, this); }; _proto.subtract = function subtract(number, string) { return this.add(number * -1, string); }; _proto.format = function format(formatStr) { var _this3 = this; var locale = this.$locale(); if (!this.isValid()) return locale.invalidDate || INVALID_DATE_STRING; var str = formatStr || FORMAT_DEFAULT; var zoneStr = Utils.z(this); var $H = this.$H, $m = this.$m, $M = this.$M; var weekdays = locale.weekdays, months = locale.months, meridiem = locale.meridiem; var getShort = function getShort(arr, index, full, length) { return arr && (arr[index] || arr(_this3, str)) || full[index].slice(0, length); }; var get$H = function get$H(num) { return Utils.s($H % 12 || 12, num, '0'); }; var meridiemFunc = meridiem || function (hour, minute, isLowercase) { var m = hour < 12 ? 'AM' : 'PM'; return isLowercase ? m.toLowerCase() : m; }; var matches = function matches(match) { switch (match) { case 'YY': return String(_this3.$y).slice(-2); case 'YYYY': return Utils.s(_this3.$y, 4, '0'); case 'M': return $M + 1; case 'MM': return Utils.s($M + 1, 2, '0'); case 'MMM': return getShort(locale.monthsShort, $M, months, 3); case 'MMMM': return getShort(months, $M); case 'D': return _this3.$D; case 'DD': return Utils.s(_this3.$D, 2, '0'); case 'd': return String(_this3.$W); case 'dd': return getShort(locale.weekdaysMin, _this3.$W, weekdays, 2); case 'ddd': return getShort(locale.weekdaysShort, _this3.$W, weekdays, 3); case 'dddd': return weekdays[_this3.$W]; case 'H': return String($H); case 'HH': return Utils.s($H, 2, '0'); case 'h': return get$H(1); case 'hh': return get$H(2); case 'a': return meridiemFunc($H, $m, true); case 'A': return meridiemFunc($H, $m, false); case 'm': return String($m); case 'mm': return Utils.s($m, 2, '0'); case 's': return String(_this3.$s); case 'ss': return Utils.s(_this3.$s, 2, '0'); case 'SSS': return Utils.s(_this3.$ms, 3, '0'); case 'Z': return zoneStr; } return null; }; return str.replace(REGEX_FORMAT, function (match, $1) { return $1 || matches(match) || zoneStr.replace(':', ''); }); // 'ZZ' }; _proto.utcOffset = function utcOffset() { // Because a bug at FF24, we're rounding the timezone offset around 15 minutes // https://github.com/moment/moment/pull/1871 return -Math.round(this.$d.getTimezoneOffset() / 15) * 15; }; _proto.diff = function diff(input, units, _float) { var _this4 = this; var unit = Utils.p(units); var that = dayjs(input); var zoneDelta = (that.utcOffset() - this.utcOffset()) * MILLISECONDS_A_MINUTE; var diff = this - that; var getMonth = function getMonth() { return Utils.m(_this4, that); }; var result; switch (unit) { case Y: result = getMonth() / 12; break; case M: result = getMonth(); break; case Q: result = getMonth() / 3; break; case W: result = (diff - zoneDelta) / MILLISECONDS_A_WEEK; break; case D: result = (diff - zoneDelta) / MILLISECONDS_A_DAY; break; case H: result = diff / MILLISECONDS_A_HOUR; break; case MIN: result = diff / MILLISECONDS_A_MINUTE; break; case S: result = diff / MILLISECONDS_A_SECOND; break; default: result = diff; // milliseconds break; } return _float ? result : Utils.a(result); }; _proto.daysInMonth = function daysInMonth() { return this.endOf(M).$D; }; _proto.$locale = function $locale() { // get locale object return Ls[this.$L]; }; _proto.locale = function locale(preset, object) { if (!preset) return this.$L; var that = this.clone(); var nextLocaleName = parseLocale(preset, object, true); if (nextLocaleName) that.$L = nextLocaleName; return that; }; _proto.clone = function clone() { return Utils.w(this.$d, this); }; _proto.toDate = function toDate() { return new Date(this.valueOf()); }; _proto.toJSON = function toJSON() { return this.isValid() ? this.toISOString() : null; }; _proto.toISOString = function toISOString() { // ie 8 return // new Dayjs(this.valueOf() + this.$d.getTimezoneOffset() * 60000) // .format('YYYY-MM-DDTHH:mm:ss.SSS[Z]') return this.$d.toISOString(); }; _proto.toString = function toString() { return this.$d.toUTCString(); }; return Dayjs; }(); var proto = Dayjs.prototype; dayjs.prototype = proto; [['$ms', MS], ['$s', S], ['$m', MIN], ['$H', H], ['$W', D], ['$M', M], ['$y', Y], ['$D', DATE]].forEach(function (g) { proto[g[1]] = function (input) { return this.$g(input, g[0], g[1]); }; }); dayjs.extend = function (plugin, option) { if (!plugin.$i) { // install plugin only once plugin(option, Dayjs, dayjs); plugin.$i = true; } return dayjs; }; dayjs.locale = parseLocale; dayjs.isDayjs = isDayjs; dayjs.unix = function (timestamp) { return dayjs(timestamp * 1e3); }; dayjs.en = Ls[L]; dayjs.Ls = Ls; dayjs.p = {}; const updateLocale = (function (option, Dayjs, dayjs) { dayjs.updateLocale = function (locale, customConfig) { var localeList = dayjs.Ls; var localeConfig = localeList[locale]; if (!localeConfig) return; var customConfigKeys = customConfig ? Object.keys(customConfig) : []; customConfigKeys.forEach(function (c) { localeConfig[c] = customConfig[c]; }); return localeConfig; // eslint-disable-line consistent-return }; }); const relativeTime = (function (o, c, d) { o = o || {}; var proto = c.prototype; var relObj = { future: 'in %s', past: '%s ago', s: 'a few seconds', m: 'a minute', mm: '%d minutes', h: 'an hour', hh: '%d hours', d: 'a day', dd: '%d days', M: 'a month', MM: '%d months', y: 'a year', yy: '%d years' }; d.en.relativeTime = relObj; proto.fromToBase = function (input, withoutSuffix, instance, isFrom, postFormat) { var loc = instance.$locale().relativeTime || relObj; var T = o.thresholds || [{ l: 's', r: 44, d: S }, { l: 'm', r: 89 }, { l: 'mm', r: 44, d: MIN }, { l: 'h', r: 89 }, { l: 'hh', r: 21, d: H }, { l: 'd', r: 35 }, { l: 'dd', r: 25, d: D }, { l: 'M', r: 45 }, { l: 'MM', r: 10, d: M }, { l: 'y', r: 17 }, { l: 'yy', d: Y }]; var Tl = T.length; var result; var out; var isFuture; for (var i = 0; i < Tl; i += 1) { var t = T[i]; if (t.d) { result = isFrom ? d(input).diff(instance, t.d, true) : instance.diff(input, t.d, true); } var abs = (o.rounding || Math.round)(Math.abs(result)); isFuture = result > 0; if (abs <= t.r || !t.r) { if (abs <= 1 && i > 0) t = T[i - 1]; // 1 minutes -> a minute, 0 seconds -> 0 second var format = loc[t.l]; if (postFormat) { abs = postFormat("" + abs); } if (typeof format === 'string') { out = format.replace('%d', abs); } else { out = format(abs, withoutSuffix, t.l, isFuture); } break; } } if (withoutSuffix) return out; var pastOrFuture = isFuture ? loc.future : loc.past; if (typeof pastOrFuture === 'function') { return pastOrFuture(out); } return pastOrFuture.replace('%s', out); }; function fromTo(input, withoutSuffix, instance, isFrom) { return proto.fromToBase(input, withoutSuffix, instance, isFrom); } proto.to = function (input, withoutSuffix) { return fromTo(input, withoutSuffix, this, true); }; proto.from = function (input, withoutSuffix) { return fromTo(input, withoutSuffix, this); }; var makeNow = function makeNow(thisDay) { return thisDay.$u ? d.utc() : d(); }; proto.toNow = function (withoutSuffix) { return this.to(makeNow(this), withoutSuffix); }; proto.fromNow = function (withoutSuffix) { return this.from(makeNow(this), withoutSuffix); }; }); var REGEX_VALID_OFFSET_FORMAT = /[+-]\d\d(?::?\d\d)?/g; var REGEX_OFFSET_HOURS_MINUTES_FORMAT = /([+-]|\d\d)/g; function offsetFromString(value) { if (value === void 0) { value = ''; } var offset = value.match(REGEX_VALID_OFFSET_FORMAT); if (!offset) { return null; } var _ref = ("" + offset[0]).match(REGEX_OFFSET_HOURS_MINUTES_FORMAT) || ['-', 0, 0], indicator = _ref[0], hoursOffset = _ref[1], minutesOffset = _ref[2]; var totalOffsetInMinutes = +hoursOffset * 60 + +minutesOffset; if (totalOffsetInMinutes === 0) { return 0; } return indicator === '+' ? totalOffsetInMinutes : -totalOffsetInMinutes; } const utc = (function (option, Dayjs, dayjs) { var proto = Dayjs.prototype; dayjs.utc = function (date) { var cfg = { date: date, utc: true, args: arguments }; // eslint-disable-line prefer-rest-params return new Dayjs(cfg); // eslint-disable-line no-use-before-define }; proto.utc = function (keepLocalTime) { var ins = dayjs(this.toDate(), { locale: this.$L, utc: true }); if (keepLocalTime) { return ins.add(this.utcOffset(), MIN); } return ins; }; proto.local = function () { return dayjs(this.toDate(), { locale: this.$L, utc: false }); }; var oldParse = proto.parse; proto.parse = function (cfg) { if (cfg.utc) { this.$u = true; } if (!this.$utils().u(cfg.$offset)) { this.$offset = cfg.$offset; } oldParse.call(this, cfg); }; var oldInit = proto.init; proto.init = function () { if (this.$u) { var $d = this.$d; this.$y = $d.getUTCFullYear(); this.$M = $d.getUTCMonth(); this.$D = $d.getUTCDate(); this.$W = $d.getUTCDay(); this.$H = $d.getUTCHours(); this.$m = $d.getUTCMinutes(); this.$s = $d.getUTCSeconds(); this.$ms = $d.getUTCMilliseconds(); } else { oldInit.call(this); } }; var oldUtcOffset = proto.utcOffset; proto.utcOffset = function (input, keepLocalTime) { var _this$$utils = this.$utils(), u = _this$$utils.u; if (u(input)) { if (this.$u) { return 0; } if (!u(this.$offset)) { return this.$offset; } return oldUtcOffset.call(this); } if (typeof input === 'string') { input = offsetFromString(input); if (input === null) { return this; } } var offset = Math.abs(input) <= 16 ? input * 60 : input; var ins = this; if (keepLocalTime) { ins.$offset = offset; ins.$u = input === 0; return ins; } if (input !== 0) { var localTimezoneOffset = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset(); ins = this.local().add(offset + localTimezoneOffset, MIN); ins.$offset = offset; ins.$x.$localOffset = localTimezoneOffset; } else { ins = this.utc(); } return ins; }; var oldFormat = proto.format; var UTC_FORMAT_DEFAULT = 'YYYY-MM-DDTHH:mm:ss[Z]'; proto.format = function (formatStr) { var str = formatStr || (this.$u ? UTC_FORMAT_DEFAULT : ''); return oldFormat.call(this, str); }; proto.valueOf = function () { var addedOffset = !this.$utils().u(this.$offset) ? this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset()) : 0; return this.$d.valueOf() - addedOffset * MILLISECONDS_A_MINUTE; }; proto.isUTC = function () { return !!this.$u; }; proto.toISOString = function () { return this.toDate().toISOString(); }; proto.toString = function () { return this.toDate().toUTCString(); }; var oldToDate = proto.toDate; proto.toDate = function (type) { if (type === 's' && this.$offset) { return dayjs(this.format('YYYY-MM-DD HH:mm:ss:SSS')).toDate(); } return oldToDate.call(this); }; var oldDiff = proto.diff; proto.diff = function (input, units, _float) { if (input && this.$u === input.$u) { return oldDiff.call(this, input, units, _float); } var localThis = this.local(); var localInput = dayjs(input).local(); return oldDiff.call(localThis, localInput, units, _float); }; }); const VueResolver = (_, value) => { return isRef(value) ? toValue(value) : value; }; const headSymbol = "usehead"; // @__NO_SIDE_EFFECTS__ function injectHead$1() { if (hasInjectionContext()) { const instance = inject(headSymbol); if (!instance) { throw new Error("useHead() was called without provide context, ensure you call it through the setup() function."); } return instance; } throw new Error("useHead() was called without provide context, ensure you call it through the setup() function."); } function useHead$1(input, options = {}) { const head = options.head || /* @__PURE__ */ injectHead$1(); return head.ssr ? head.push(input || {}, options) : clientUseHead(head, input, options); } function clientUseHead(head, input, options = {}) { const deactivated = ref(false); let entry; watchEffect(() => { const i = deactivated.value ? {} : walkResolver(input, VueResolver); if (entry) { entry.patch(i); } else { entry = head.push(i, options); } }); const vm = getCurrentInstance(); if (vm) { onBeforeUnmount(() => { entry.dispose(); }); onDeactivated(() => { deactivated.value = true; }); onActivated(() => { deactivated.value = false; }); } return entry; } if (!globalThis.$fetch) { globalThis.$fetch = $fetch.create({ baseURL: baseURL() }); } if (!("global" in globalThis)) { globalThis.global = globalThis; } const appLayoutTransition = false; const nuxtLinkDefaults = { "componentName": "NuxtLink" }; const asyncDataDefaults = { "deep": false }; const appId = "nuxt-app"; function getNuxtAppCtx(id = appId) { return getContext(id, { asyncContext: false }); } const NuxtPluginIndicator = "__nuxt_plugin"; function createNuxtApp(options) { let hydratingCount = 0; const nuxtApp = { _id: options.id || appId || "nuxt-app", _scope: effectScope(), provide: void 0, versions: { get nuxt() { return "4.3.0"; }, get vue() { return nuxtApp.vueApp.version; } }, payload: shallowReactive({ ...options.ssrContext?.payload || {}, data: shallowReactive({}), state: reactive({}), once: /* @__PURE__ */ new Set(), _errors: shallowReactive({}) }), static: { data: {} }, runWithContext(fn) { if (nuxtApp._scope.active && !getCurrentScope()) { return nuxtApp._scope.run(() => callWithNuxt(nuxtApp, fn)); } return callWithNuxt(nuxtApp, fn); }, isHydrating: false, deferHydration() { if (!nuxtApp.isHydrating) { return () => { }; } hydratingCount++; let called = false; return () => { if (called) { return; } called = true; hydratingCount--; if (hydratingCount === 0) { nuxtApp.isHydrating = false; return nuxtApp.callHook("app:suspense:resolve"); } }; }, _asyncDataPromises: {}, _asyncData: shallowReactive({}), _payloadRevivers: {}, ...options }; { nuxtApp.payload.serverRendered = true; } if (nuxtApp.ssrContext) { nuxtApp.payload.path = nuxtApp.ssrContext.url; nuxtApp.ssrContext.nuxt = nuxtApp; nuxtApp.ssrContext.payload = nuxtApp.payload; nuxtApp.ssrContext.config = { public: nuxtApp.ssrContext.runtimeConfig.public, app: nuxtApp.ssrContext.runtimeConfig.app }; } nuxtApp.hooks = createHooks(); nuxtApp.hook = nuxtApp.hooks.hook; { const contextCaller = async function(hooks, args) { for (const hook of hooks) { await nuxtApp.runWithContext(() => hook(...args)); } }; nuxtApp.hooks.callHook = (name, ...args) => nuxtApp.hooks.callHookWith(contextCaller, name, ...args); } nuxtApp.callHook = nuxtApp.hooks.callHook; nuxtApp.provide = (name, value) => { const $name = "$" + name; defineGetter(nuxtApp, $name, value); defineGetter(nuxtApp.vueApp.config.globalProperties, $name, value); }; defineGetter(nuxtApp.vueApp, "$nuxt", nuxtApp); defineGetter(nuxtApp.vueApp.config.globalProperties, "$nuxt", nuxtApp); const runtimeConfig = options.ssrContext.runtimeConfig; nuxtApp.provide("config", runtimeConfig); return nuxtApp; } function registerPluginHooks(nuxtApp, plugin2) { if (plugin2.hooks) { nuxtApp.hooks.addHooks(plugin2.hooks); } } async function applyPlugin(nuxtApp, plugin2) { if (typeof plugin2 === "function") { const { provide: provide2 } = await nuxtApp.runWithContext(() => plugin2(nuxtApp)) || {}; if (provide2 && typeof provide2 === "object") { for (const key2 in provide2) { nuxtApp.provide(key2, provide2[key2]); } } } } async function applyPlugins(nuxtApp, plugins2) { const resolvedPlugins = /* @__PURE__ */ new Set(); const unresolvedPlugins = []; const parallels = []; let error = void 0; let promiseDepth = 0; async function executePlugin(plugin2) { const unresolvedPluginsForThisPlugin = plugin2.dependsOn?.filter((name) => plugins2.some((p) => p._name === name) && !resolvedPlugins.has(name)) ?? []; if (unresolvedPluginsForThisPlugin.length > 0) { unresolvedPlugins.push([new Set(unresolvedPluginsForThisPlugin), plugin2]); } else { const promise = applyPlugin(nuxtApp, plugin2).then(async () => { if (plugin2._name) { resolvedPlugins.add(plugin2._name); await Promise.all(unresolvedPlugins.map(async ([dependsOn, unexecutedPlugin]) => { if (dependsOn.has(plugin2._name)) { dependsOn.delete(plugin2._name); if (dependsOn.size === 0) { promiseDepth++; await executePlugin(unexecutedPlugin); } } })); } }).catch((e) => { if (!plugin2.parallel && !nuxtApp.payload.error) { throw e; } error ||= e; }); if (plugin2.parallel) { parallels.push(promise); } else { await promise; } } } for (const plugin2 of plugins2) { if (nuxtApp.ssrContext?.islandContext && plugin2.env?.islands === false) { continue; } registerPluginHooks(nuxtApp, plugin2); } for (const plugin2 of plugins2) { if (nuxtApp.ssrContext?.islandContext && plugin2.env?.islands === false) { continue; } await executePlugin(plugin2); } await Promise.all(parallels); if (promiseDepth) { for (let i = 0; i < promiseDepth; i++) { await Promise.all(parallels); } } if (error) { throw nuxtApp.payload.error || error; } } // @__NO_SIDE_EFFECTS__ function defineNuxtPlugin(plugin2) { if (typeof plugin2 === "function") { return plugin2; } const _name = plugin2._name || plugin2.name; delete plugin2.name; return Object.assign(plugin2.setup || (() => { }), plugin2, { [NuxtPluginIndicator]: true, _name }); } const definePayloadPlugin = defineNuxtPlugin; function callWithNuxt(nuxt, setup, args) { const fn = () => setup(); const nuxtAppCtx = getNuxtAppCtx(nuxt._id); { return nuxt.vueApp.runWithContext(() => nuxtAppCtx.callAsync(nuxt, fn)); } } function tryUseNuxtApp(id) { let nuxtAppInstance; if (hasInjectionContext()) { nuxtAppInstance = getCurrentInstance()?.appContext.app.$nuxt; } nuxtAppInstance ||= getNuxtAppCtx(id).tryUse(); return nuxtAppInstance || null; } function useNuxtApp(id) { const nuxtAppInstance = tryUseNuxtApp(id); if (!nuxtAppInstance) { { throw new Error("[nuxt] instance unavailable"); } } return nuxtAppInstance; } // @__NO_SIDE_EFFECTS__ function useRuntimeConfig(_event) { return useNuxtApp().$config; } function defineGetter(obj, key2, val) { Object.defineProperty(obj, key2, { get: () => val }); } const LayoutMetaSymbol = /* @__PURE__ */ Symbol("layout-meta"); const PageRouteSymbol = /* @__PURE__ */ Symbol("route"); globalThis._importMeta_.url.replace(/\/app\/.*$/, "/"); const useRouter$1 = () => { return useNuxtApp()?.$router; }; const useRoute$1 = () => { if (hasInjectionContext()) { return inject(PageRouteSymbol, useNuxtApp()._route); } return useNuxtApp()._route; }; // @__NO_SIDE_EFFECTS__ function defineNuxtRouteMiddleware(middleware) { return middleware; } const isProcessingMiddleware = () => { try { if (useNuxtApp()._processingMiddleware) { return true; } } catch { return false; } return false; }; const URL_QUOTE_RE = /"/g; const navigateTo = (to, options) => { to ||= "/"; const toPath = typeof to === "string" ? to : "path" in to ? resolveRouteObject(to) : useRouter$1().resolve(to).href; const isExternalHost = hasProtocol(toPath, { acceptRelative: true }); const isExternal = options?.external || isExternalHost; if (isExternal) { if (!options?.external) { throw new Error("Navigating to an external URL is not allowed by default. Use `navigateTo(url, { external: true })`."); } const { protocol } = new URL(toPath, "http://localhost"); if (protocol && isScriptProtocol(protocol)) { throw new Error(`Cannot navigate to a URL with '${protocol}' protocol.`); } } const inMiddleware = isProcessingMiddleware(); const router = useRouter$1(); const nuxtApp = useNuxtApp(); { if (nuxtApp.ssrContext) { const fullPath = typeof to === "string" || isExternal ? toPath : router.resolve(to).fullPath || "/"; const location2 = isExternal ? toPath : joinURL((/* @__PURE__ */ useRuntimeConfig()).app.baseURL, fullPath); const redirect = async function(response) { await nuxtApp.callHook("app:redirected"); const encodedLoc = location2.replace(URL_QUOTE_RE, "%22"); const encodedHeader = encodeURL(location2, isExternalHost); nuxtApp.ssrContext["~renderResponse"] = { statusCode: sanitizeStatusCode(options?.redirectCode || 302, 302), body: ``, headers: { location: encodedHeader } }; return response; }; if (!isExternal && inMiddleware) { router.afterEach((final) => final.fullPath === fullPath ? redirect(false) : void 0); return to; } return redirect(!inMiddleware ? void 0 : ( /* abort route navigation */ false )); } } if (isExternal) { nuxtApp._scope.stop(); if (options?.replace) { (void 0).replace(toPath); } else { (void 0).href = toPath; } if (inMiddleware) { if (!nuxtApp.isHydrating) { return false; } return new Promise(() => { }); } return Promise.resolve(); } return options?.replace ? router.replace(to) : router.push(to); }; function resolveRouteObject(to) { return withQuery(to.path || "", to.query || {}) + (to.hash || ""); } function encodeURL(location2, isExternalHost = false) { const url = new URL(location2, "http://localhost"); if (!isExternalHost) { return url.pathname + url.search + url.hash; } if (location2.startsWith("//")) { return url.toString().replace(url.protocol, ""); } return url.toString(); } const NUXT_ERROR_SIGNATURE = "__nuxt_error"; const useError = /* @__NO_SIDE_EFFECTS__ */ () => toRef$1(useNuxtApp().payload, "error"); const showError = (error) => { const nuxtError = createError(error); try { const error2 = /* @__PURE__ */ useError(); if (false) ; error2.value ||= nuxtError; } catch { throw nuxtError; } return nuxtError; }; const isNuxtError = (error) => !!error && typeof error === "object" && NUXT_ERROR_SIGNATURE in error; const createError = (error) => { if (typeof error !== "string" && error.statusText) { error.message ??= error.statusText; } const nuxtError = createError$1(error); Object.defineProperty(nuxtError, NUXT_ERROR_SIGNATURE, { value: true, configurable: false, writable: false }); return nuxtError; }; function injectHead(nuxtApp) { const nuxt = nuxtApp || useNuxtApp(); return nuxt.ssrContext?.head || nuxt.runWithContext(() => { if (hasInjectionContext()) { const head = inject(headSymbol); if (!head) { throw new Error("[nuxt] [unhead] Missing Unhead instance."); } return head; } }); } function useHead(input, options = {}) { const head = options.head || injectHead(options.nuxt); return useHead$1(input, { head, ...options }); } const matcher = /* @__PURE__ */ (() => { const $0 = {}; return (m, p) => { let r = []; if (p.charCodeAt(p.length - 1) === 47) p = p.slice(0, -1) || "/"; if (p === "/user/address") { r.unshift({ data: $0 }); } if (p === "/user/attributes") { r.unshift({ data: $0 }); } if (p === "/user/brands") { r.unshift({ data: $0 }); } if (p === "/user/categories") { r.unshift({ data: $0 }); } if (p === "/user/managers") { r.unshift({ data: $0 }); } if (p === "/user/profile") { r.unshift({ data: $0 }); } if (p === "/user/setting") { r.unshift({ data: $0 }); } if (p === "/user/store_request") { r.unshift({ data: $0 }); } if (p === "/__sitemap__/style.xsl") { r.unshift({ data: $0 }); } if (p === "/sitemap.xml") { r.unshift({ data: $0 }); } let s = p.split("/"); s.length - 1; if (s[1] === "add") { r.unshift({ data: $0, params: { "_": s.slice(2).join("/") } }); } if (s[1] === "auth") { r.unshift({ data: $0, params: { "_": s.slice(2).join("/") } }); } if (s[1] === "fav") { r.unshift({ data: $0, params: { "_": s.slice(2).join("/") } }); } if (s[1] === "message") { r.unshift({ data: $0, params: { "_": s.slice(2).join("/") } }); } if (s[1] === "cart") { r.unshift({ data: $0, params: { "_": s.slice(2).join("/") } }); } if (s[1] === "edit") { r.unshift({ data: $0, params: { "_": s.slice(2).join("/") } }); } if (s[1] === "user") { if (s[2] === "edit") { r.unshift({ data: $0, params: { "_": s.slice(3).join("/") } }); } if (s[2] === "order") { r.unshift({ data: $0, params: { "_": s.slice(3).join("/") } }); } if (s[2] === "statistics_list") { r.unshift({ data: $0, params: { "_": s.slice(3).join("/") } }); } if (s[2] === "add") { r.unshift({ data: $0, params: { "_": s.slice(3).join("/") } }); } } return r; }; })(); const _routeRulesMatcher = (path) => defu({}, ...matcher("", path).map((r) => r.data).reverse()); const routeRulesMatcher$1 = _routeRulesMatcher; function getRouteRules(arg) { const path = typeof arg === "string" ? arg : arg.path; try { return routeRulesMatcher$1(path); } catch (e) { console.error("[nuxt] Error matching route rules.", e); return {}; } } function definePayloadReducer(name, reduce) { { useNuxtApp().ssrContext["~payloadReducers"][name] = reduce; } } const payloadPlugin = definePayloadPlugin(() => { definePayloadReducer( "skipHydrate", // We need to return something truthy to be treated as a match (data) => !shouldHydrate(data) && 1 ); }); const unhead_k2P3m_ZDyjlr2mMYnoDPwavjsDN8hBlk9cFai0bbopU = /* @__PURE__ */ defineNuxtPlugin({ name: "nuxt:head", enforce: "pre", setup(nuxtApp) { const head = nuxtApp.ssrContext.head; nuxtApp.vueApp.use(head); } }); function isRouteComponent(component) { return typeof component === "object" || "displayName" in component || "props" in component || "__vccOpts" in component; } function isESModule(obj) { return obj.__esModule || obj[Symbol.toStringTag] === "Module" || obj.default && isRouteComponent(obj.default); } const assign$1 = Object.assign; function applyToParams(fn, params) { const newParams = {}; for (const key2 in params) { const value = params[key2]; newParams[key2] = isArray$1(value) ? value.map(fn) : fn(value); } return newParams; } const noop$3 = () => { }; const isArray$1 = Array.isArray; function mergeOptions(defaults, partialOptions) { const options = {}; for (const key2 in defaults) options[key2] = key2 in partialOptions ? partialOptions[key2] : defaults[key2]; return options; } const HASH_RE = /#/g; const AMPERSAND_RE = /&/g; const SLASH_RE = /\//g; const EQUAL_RE = /=/g; const IM_RE = /\?/g; const PLUS_RE = /\+/g; const ENC_BRACKET_OPEN_RE = /%5B/g; const ENC_BRACKET_CLOSE_RE = /%5D/g; const ENC_CARET_RE = /%5E/g; const ENC_BACKTICK_RE = /%60/g; const ENC_CURLY_OPEN_RE = /%7B/g; const ENC_PIPE_RE = /%7C/g; const ENC_CURLY_CLOSE_RE = /%7D/g; const ENC_SPACE_RE = /%20/g; function commonEncode(text) { return text == null ? "" : encodeURI("" + text).replace(ENC_PIPE_RE, "|").replace(ENC_BRACKET_OPEN_RE, "[").replace(ENC_BRACKET_CLOSE_RE, "]"); } function encodeHash(text) { return commonEncode(text).replace(ENC_CURLY_OPEN_RE, "{").replace(ENC_CURLY_CLOSE_RE, "}").replace(ENC_CARET_RE, "^"); } function encodeQueryValue(text) { return commonEncode(text).replace(PLUS_RE, "%2B").replace(ENC_SPACE_RE, "+").replace(HASH_RE, "%23").replace(AMPERSAND_RE, "%26").replace(ENC_BACKTICK_RE, "`").replace(ENC_CURLY_OPEN_RE, "{").replace(ENC_CURLY_CLOSE_RE, "}").replace(ENC_CARET_RE, "^"); } function encodeQueryKey(text) { return encodeQueryValue(text).replace(EQUAL_RE, "%3D"); } function encodePath(text) { return commonEncode(text).replace(HASH_RE, "%23").replace(IM_RE, "%3F"); } function encodeParam(text) { return encodePath(text).replace(SLASH_RE, "%2F"); } function decode(text) { if (text == null) return null; try { return decodeURIComponent("" + text); } catch (err) { } return "" + text; } const TRAILING_SLASH_RE = /\/$/; const removeTrailingSlash = (path) => path.replace(TRAILING_SLASH_RE, ""); function parseURL(parseQuery$1, location, currentLocation = "/") { let path, query = {}, searchString = "", hash2 = ""; const hashPos = location.indexOf("#"); let searchPos = location.indexOf("?"); searchPos = hashPos >= 0 && searchPos > hashPos ? -1 : searchPos; if (searchPos >= 0) { path = location.slice(0, searchPos); searchString = location.slice(searchPos, hashPos > 0 ? hashPos : location.length); query = parseQuery$1(searchString.slice(1)); } if (hashPos >= 0) { path = path || location.slice(0, hashPos); hash2 = location.slice(hashPos, location.length); } path = resolveRelativePath(path != null ? path : location, currentLocation); return { fullPath: path + searchString + hash2, path, query, hash: decode(hash2) }; } function stringifyURL(stringifyQuery$1, location) { const query = location.query ? stringifyQuery$1(location.query) : ""; return location.path + (query && "?") + query + (location.hash || ""); } function isSameRouteLocation(stringifyQuery$1, a, b) { const aLastIndex = a.matched.length - 1; const bLastIndex = b.matched.length - 1; return aLastIndex > -1 && aLastIndex === bLastIndex && isSameRouteRecord(a.matched[aLastIndex], b.matched[bLastIndex]) && isSameRouteLocationParams(a.params, b.params) && stringifyQuery$1(a.query) === stringifyQuery$1(b.query) && a.hash === b.hash; } function isSameRouteRecord(a, b) { return (a.aliasOf || a) === (b.aliasOf || b); } function isSameRouteLocationParams(a, b) { if (Object.keys(a).length !== Object.keys(b).length) return false; for (var key2 in a) if (!isSameRouteLocationParamsValue(a[key2], b[key2])) return false; return true; } function isSameRouteLocationParamsValue(a, b) { return isArray$1(a) ? isEquivalentArray(a, b) : isArray$1(b) ? isEquivalentArray(b, a) : a?.valueOf() === b?.valueOf(); } function isEquivalentArray(a, b) { return isArray$1(b) ? a.length === b.length && a.every((value, i) => value === b[i]) : a.length === 1 && a[0] === b; } function resolveRelativePath(to, from) { if (to.startsWith("/")) return to; if (!to) return from; const fromSegments = from.split("/"); const toSegments = to.split("/"); const lastToSegment = toSegments[toSegments.length - 1]; if (lastToSegment === ".." || lastToSegment === ".") toSegments.push(""); let position = fromSegments.length - 1; let toPosition; let segment; for (toPosition = 0; toPosition < toSegments.length; toPosition++) { segment = toSegments[toPosition]; if (segment === ".") continue; if (segment === "..") { if (position > 1) position--; } else break; } return fromSegments.slice(0, position).join("/") + "/" + toSegments.slice(toPosition).join("/"); } const START_LOCATION_NORMALIZED = { path: "/", name: void 0, params: {}, query: {}, hash: "", fullPath: "/", matched: [], meta: {}, redirectedFrom: void 0 }; let NavigationType = /* @__PURE__ */ (function(NavigationType$1) { NavigationType$1["pop"] = "pop"; NavigationType$1["push"] = "push"; return NavigationType$1; })({}); let NavigationDirection = /* @__PURE__ */ (function(NavigationDirection$1) { NavigationDirection$1["back"] = "back"; NavigationDirection$1["forward"] = "forward"; NavigationDirection$1["unknown"] = ""; return NavigationDirection$1; })({}); const START = ""; function normalizeBase(base) { if (!base) base = "/"; if (base[0] !== "/" && base[0] !== "#") base = "/" + base; return removeTrailingSlash(base); } const BEFORE_HASH_RE = /^[^#]+#/; function createHref(base, location) { return base.replace(BEFORE_HASH_RE, "#") + location; } function isRouteLocation(route) { return typeof route === "string" || route && typeof route === "object"; } function isRouteName(name) { return typeof name === "string" || typeof name === "symbol"; } let ErrorTypes = /* @__PURE__ */ (function(ErrorTypes$1) { ErrorTypes$1[ErrorTypes$1["MATCHER_NOT_FOUND"] = 1] = "MATCHER_NOT_FOUND"; ErrorTypes$1[ErrorTypes$1["NAVIGATION_GUARD_REDIRECT"] = 2] = "NAVIGATION_GUARD_REDIRECT"; ErrorTypes$1[ErrorTypes$1["NAVIGATION_ABORTED"] = 4] = "NAVIGATION_ABORTED"; ErrorTypes$1[ErrorTypes$1["NAVIGATION_CANCELLED"] = 8] = "NAVIGATION_CANCELLED"; ErrorTypes$1[ErrorTypes$1["NAVIGATION_DUPLICATED"] = 16] = "NAVIGATION_DUPLICATED"; return ErrorTypes$1; })({}); const NavigationFailureSymbol = /* @__PURE__ */ Symbol(""); ({ [ErrorTypes.MATCHER_NOT_FOUND]({ location, currentLocation }) { return `No match for ${JSON.stringify(location)}${currentLocation ? "\nwhile being at\n" + JSON.stringify(currentLocation) : ""}`; }, [ErrorTypes.NAVIGATION_GUARD_REDIRECT]({ from, to }) { return `Redirected from "${from.fullPath}" to "${stringifyRoute(to)}" via a navigation guard.`; }, [ErrorTypes.NAVIGATION_ABORTED]({ from, to }) { return `Navigation aborted from "${from.fullPath}" to "${to.fullPath}" via a navigation guard.`; }, [ErrorTypes.NAVIGATION_CANCELLED]({ from, to }) { return `Navigation cancelled from "${from.fullPath}" to "${to.fullPath}" with a new navigation.`; }, [ErrorTypes.NAVIGATION_DUPLICATED]({ from, to }) { return `Avoided redundant navigation to current location: "${from.fullPath}".`; } }); function createRouterError(type, params) { return assign$1(/* @__PURE__ */ new Error(), { type, [NavigationFailureSymbol]: true }, params); } function isNavigationFailure(error, type) { return error instanceof Error && NavigationFailureSymbol in error && (type == null || !!(error.type & type)); } const propertiesToLog = [ "params", "query", "hash" ]; function stringifyRoute(to) { if (typeof to === "string") return to; if (to.path != null) return to.path; const location = {}; for (const key2 of propertiesToLog) if (key2 in to) location[key2] = to[key2]; return JSON.stringify(location, null, 2); } function parseQuery(search) { const query = {}; if (search === "" || search === "?") return query; const searchParams = (search[0] === "?" ? search.slice(1) : search).split("&"); for (let i = 0; i < searchParams.length; ++i) { const searchParam = searchParams[i].replace(PLUS_RE, " "); const eqPos = searchParam.indexOf("="); const key2 = decode(eqPos < 0 ? searchParam : searchParam.slice(0, eqPos)); const value = eqPos < 0 ? null : decode(searchParam.slice(eqPos + 1)); if (key2 in query) { let currentValue = query[key2]; if (!isArray$1(currentValue)) currentValue = query[key2] = [currentValue]; currentValue.push(value); } else query[key2] = value; } return query; } function stringifyQuery(query) { let search = ""; for (let key2 in query) { const value = query[key2]; key2 = encodeQueryKey(key2); if (value == null) { if (value !== void 0) search += (search.length ? "&" : "") + key2; continue; } (isArray$1(value) ? value.map((v) => v && encodeQueryValue(v)) : [value && encodeQueryValue(value)]).forEach((value$1) => { if (value$1 !== void 0) { search += (search.length ? "&" : "") + key2; if (value$1 != null) search += "=" + value$1; } }); } return search; } function normalizeQuery(query) { const normalizedQuery = {}; for (const key2 in query) { const value = query[key2]; if (value !== void 0) normalizedQuery[key2] = isArray$1(value) ? value.map((v) => v == null ? null : "" + v) : value == null ? value : "" + value; } return normalizedQuery; } const matchedRouteKey = /* @__PURE__ */ Symbol(""); const viewDepthKey = /* @__PURE__ */ Symbol(""); const routerKey = /* @__PURE__ */ Symbol(""); const routeLocationKey = /* @__PURE__ */ Symbol(""); const routerViewLocationKey = /* @__PURE__ */ Symbol(""); function useCallbacks() { let handlers = []; function add(handler) { handlers.push(handler); return () => { const i = handlers.indexOf(handler); if (i > -1) handlers.splice(i, 1); }; } function reset() { handlers = []; } return { add, list: () => handlers.slice(), reset }; } function guardToPromiseFn(guard, to, from, record, name, runWithContext = (fn) => fn()) { const enterCallbackArray = record && (record.enterCallbacks[name] = record.enterCallbacks[name] || []); return () => new Promise((resolve, reject) => { const next = (valid) => { if (valid === false) reject(createRouterError(ErrorTypes.NAVIGATION_ABORTED, { from, to })); else if (valid instanceof Error) reject(valid); else if (isRouteLocation(valid)) reject(createRouterError(ErrorTypes.NAVIGATION_GUARD_REDIRECT, { from: to, to: valid })); else { if (enterCallbackArray && record.enterCallbacks[name] === enterCallbackArray && typeof valid === "function") enterCallbackArray.push(valid); resolve(); } }; const guardReturn = runWithContext(() => guard.call(record && record.instances[name], to, from, next)); let guardCall = Promise.resolve(guardReturn); if (guard.length < 3) guardCall = guardCall.then(next); guardCall.catch((err) => reject(err)); }); } function extractComponentsGuards(matched, guardType, to, from, runWithContext = (fn) => fn()) { const guards = []; for (const record of matched) { for (const name in record.components) { let rawComponent = record.components[name]; if (guardType !== "beforeRouteEnter" && !record.instances[name]) continue; if (isRouteComponent(rawComponent)) { const guard = (rawComponent.__vccOpts || rawComponent)[guardType]; guard && guards.push(guardToPromiseFn(guard, to, from, record, name, runWithContext)); } else { let componentPromise = rawComponent(); guards.push(() => componentPromise.then((resolved) => { if (!resolved) throw new Error(`Couldn't resolve component "${name}" at "${record.path}"`); const resolvedComponent = isESModule(resolved) ? resolved.default : resolved; record.mods[name] = resolved; record.components[name] = resolvedComponent; const guard = (resolvedComponent.__vccOpts || resolvedComponent)[guardType]; return guard && guardToPromiseFn(guard, to, from, record, name, runWithContext)(); })); } } } return guards; } function extractChangingRecords(to, from) { const leavingRecords = []; const updatingRecords = []; const enteringRecords = []; const len = Math.max(from.matched.length, to.matched.length); for (let i = 0; i < len; i++) { const recordFrom = from.matched[i]; if (recordFrom) if (to.matched.find((record) => isSameRouteRecord(record, recordFrom))) updatingRecords.push(recordFrom); else leavingRecords.push(recordFrom); const recordTo = to.matched[i]; if (recordTo) { if (!from.matched.find((record) => isSameRouteRecord(record, recordTo))) enteringRecords.push(recordTo); } } return [ leavingRecords, updatingRecords, enteringRecords ]; } function createMemoryHistory(base = "") { let listeners = []; let queue = [[START, {}]]; let position = 0; base = normalizeBase(base); function setLocation(location$1, state = {}) { position++; if (position !== queue.length) queue.splice(position); queue.push([location$1, state]); } function triggerListeners(to, from, { direction, delta }) { const info = { direction, delta, type: NavigationType.pop }; for (const callback of listeners) callback(to, from, info); } const routerHistory = { location: START, state: {}, base, createHref: createHref.bind(null, base), replace(to, state) { queue.splice(position--, 1); setLocation(to, state); }, push(to, state) { setLocation(to, state); }, listen(callback) { listeners.push(callback); return () => { const index2 = listeners.indexOf(callback); if (index2 > -1) listeners.splice(index2, 1); }; }, destroy() { listeners = []; queue = [[START, {}]]; position = 0; }, go(delta, shouldTrigger = true) { const from = this.location; const direction = delta < 0 ? NavigationDirection.back : NavigationDirection.forward; position = Math.max(0, Math.min(position + delta, queue.length - 1)); if (shouldTrigger) triggerListeners(this.location, from, { direction, delta }); } }; Object.defineProperty(routerHistory, "location", { enumerable: true, get: () => queue[position][0] }); Object.defineProperty(routerHistory, "state", { enumerable: true, get: () => queue[position][1] }); return routerHistory; } let TokenType = /* @__PURE__ */ (function(TokenType$1) { TokenType$1[TokenType$1["Static"] = 0] = "Static"; TokenType$1[TokenType$1["Param"] = 1] = "Param"; TokenType$1[TokenType$1["Group"] = 2] = "Group"; return TokenType$1; })({}); var TokenizerState = /* @__PURE__ */ (function(TokenizerState$1) { TokenizerState$1[TokenizerState$1["Static"] = 0] = "Static"; TokenizerState$1[TokenizerState$1["Param"] = 1] = "Param"; TokenizerState$1[TokenizerState$1["ParamRegExp"] = 2] = "ParamRegExp"; TokenizerState$1[TokenizerState$1["ParamRegExpEnd"] = 3] = "ParamRegExpEnd"; TokenizerState$1[TokenizerState$1["EscapeNext"] = 4] = "EscapeNext"; return TokenizerState$1; })(TokenizerState || {}); const ROOT_TOKEN = { type: TokenType.Static, value: "" }; const VALID_PARAM_RE = /[a-zA-Z0-9_]/; function tokenizePath(path) { if (!path) return [[]]; if (path === "/") return [[ROOT_TOKEN]]; if (!path.startsWith("/")) throw new Error(`Invalid path "${path}"`); function crash(message) { throw new Error(`ERR (${state})/"${buffer}": ${message}`); } let state = TokenizerState.Static; let previousState = state; const tokens = []; let segment; function finalizeSegment() { if (segment) tokens.push(segment); segment = []; } let i = 0; let char; let buffer = ""; let customRe = ""; function consumeBuffer() { if (!buffer) return; if (state === TokenizerState.Static) segment.push({ type: TokenType.Static, value: buffer }); else if (state === TokenizerState.Param || state === TokenizerState.ParamRegExp || state === TokenizerState.ParamRegExpEnd) { if (segment.length > 1 && (char === "*" || char === "+")) crash(`A repeatable param (${buffer}) must be alone in its segment. eg: '/:ids+.`); segment.push({ type: TokenType.Param, value: buffer, regexp: customRe, repeatable: char === "*" || char === "+", optional: char === "*" || char === "?" }); } else crash("Invalid state to consume buffer"); buffer = ""; } function addCharToBuffer() { buffer += char; } while (i < path.length) { char = path[i++]; if (char === "\\" && state !== TokenizerState.ParamRegExp) { previousState = state; state = TokenizerState.EscapeNext; continue; } switch (state) { case TokenizerState.Static: if (char === "/") { if (buffer) consumeBuffer(); finalizeSegment(); } else if (char === ":") { consumeBuffer(); state = TokenizerState.Param; } else addCharToBuffer(); break; case TokenizerState.EscapeNext: addCharToBuffer(); state = previousState; break; case TokenizerState.Param: if (char === "(") state = TokenizerState.ParamRegExp; else if (VALID_PARAM_RE.test(char)) addCharToBuffer(); else { consumeBuffer(); state = TokenizerState.Static; if (char !== "*" && char !== "?" && char !== "+") i--; } break; case TokenizerState.ParamRegExp: if (char === ")") if (customRe[customRe.length - 1] == "\\") customRe = customRe.slice(0, -1) + char; else state = TokenizerState.ParamRegExpEnd; else customRe += char; break; case TokenizerState.ParamRegExpEnd: consumeBuffer(); state = TokenizerState.Static; if (char !== "*" && char !== "?" && char !== "+") i--; customRe = ""; break; default: crash("Unknown state"); break; } } if (state === TokenizerState.ParamRegExp) crash(`Unfinished custom RegExp for param "${buffer}"`); consumeBuffer(); finalizeSegment(); return tokens; } const BASE_PARAM_PATTERN = "[^/]+?"; const BASE_PATH_PARSER_OPTIONS = { sensitive: false, strict: false, start: true, end: true }; var PathScore = /* @__PURE__ */ (function(PathScore$1) { PathScore$1[PathScore$1["_multiplier"] = 10] = "_multiplier"; PathScore$1[PathScore$1["Root"] = 90] = "Root"; PathScore$1[PathScore$1["Segment"] = 40] = "Segment"; PathScore$1[PathScore$1["SubSegment"] = 30] = "SubSegment"; PathScore$1[PathScore$1["Static"] = 40] = "Static"; PathScore$1[PathScore$1["Dynamic"] = 20] = "Dynamic"; PathScore$1[PathScore$1["BonusCustomRegExp"] = 10] = "BonusCustomRegExp"; PathScore$1[PathScore$1["BonusWildcard"] = -50] = "BonusWildcard"; PathScore$1[PathScore$1["BonusRepeatable"] = -20] = "BonusRepeatable"; PathScore$1[PathScore$1["BonusOptional"] = -8] = "BonusOptional"; PathScore$1[PathScore$1["BonusStrict"] = 0.7000000000000001] = "BonusStrict"; PathScore$1[PathScore$1["BonusCaseSensitive"] = 0.25] = "BonusCaseSensitive"; return PathScore$1; })(PathScore || {}); const REGEX_CHARS_RE = /[.+*?^${}()[\]/\\]/g; function tokensToParser(segments, extraOptions) { const options = assign$1({}, BASE_PATH_PARSER_OPTIONS, extraOptions); const score = []; let pattern = options.start ? "^" : ""; const keys = []; for (const segment of segments) { const segmentScores = segment.length ? [] : [PathScore.Root]; if (options.strict && !segment.length) pattern += "/"; for (let tokenIndex = 0; tokenIndex < segment.length; tokenIndex++) { const token = segment[tokenIndex]; let subSegmentScore = PathScore.Segment + (options.sensitive ? PathScore.BonusCaseSensitive : 0); if (token.type === TokenType.Static) { if (!tokenIndex) pattern += "/"; pattern += token.value.replace(REGEX_CHARS_RE, "\\$&"); subSegmentScore += PathScore.Static; } else if (token.type === TokenType.Param) { const { value, repeatable, optional, regexp } = token; keys.push({ name: value, repeatable, optional }); const re$1 = regexp ? regexp : BASE_PARAM_PATTERN; if (re$1 !== BASE_PARAM_PATTERN) { subSegmentScore += PathScore.BonusCustomRegExp; try { `${re$1}`; } catch (err) { throw new Error(`Invalid custom RegExp for param "${value}" (${re$1}): ` + err.message); } } let subPattern = repeatable ? `((?:${re$1})(?:/(?:${re$1}))*)` : `(${re$1})`; if (!tokenIndex) subPattern = optional && segment.length < 2 ? `(?:/${subPattern})` : "/" + subPattern; if (optional) subPattern += "?"; pattern += subPattern; subSegmentScore += PathScore.Dynamic; if (optional) subSegmentScore += PathScore.BonusOptional; if (repeatable) subSegmentScore += PathScore.BonusRepeatable; if (re$1 === ".*") subSegmentScore += PathScore.BonusWildcard; } segmentScores.push(subSegmentScore); } score.push(segmentScores); } if (options.strict && options.end) { const i = score.length - 1; score[i][score[i].length - 1] += PathScore.BonusStrict; } if (!options.strict) pattern += "/?"; if (options.end) pattern += "$"; else if (options.strict && !pattern.endsWith("/")) pattern += "(?:/|$)"; const re = new RegExp(pattern, options.sensitive ? "" : "i"); function parse(path) { const match2 = path.match(re); const params = {}; if (!match2) return null; for (let i = 1; i < match2.length; i++) { const value = match2[i] || ""; const key2 = keys[i - 1]; params[key2.name] = value && key2.repeatable ? value.split("/") : value; } return params; } function stringify2(params) { let path = ""; let avoidDuplicatedSlash = false; for (const segment of segments) { if (!avoidDuplicatedSlash || !path.endsWith("/")) path += "/"; avoidDuplicatedSlash = false; for (const token of segment) if (token.type === TokenType.Static) path += token.value; else if (token.type === TokenType.Param) { const { value, repeatable, optional } = token; const param = value in params ? params[value] : ""; if (isArray$1(param) && !repeatable) throw new Error(`Provided param "${value}" is an array but it is not repeatable (* or + modifiers)`); const text = isArray$1(param) ? param.join("/") : param; if (!text) if (optional) { if (segment.length < 2) if (path.endsWith("/")) path = path.slice(0, -1); else avoidDuplicatedSlash = true; } else throw new Error(`Missing required param "${value}"`); path += text; } } return path || "/"; } return { re, score, keys, parse, stringify: stringify2 }; } function compareScoreArray(a, b) { let i = 0; while (i < a.length && i < b.length) { const diff = b[i] - a[i]; if (diff) return diff; i++; } if (a.length < b.length) return a.length === 1 && a[0] === PathScore.Static + PathScore.Segment ? -1 : 1; else if (a.length > b.length) return b.length === 1 && b[0] === PathScore.Static + PathScore.Segment ? 1 : -1; return 0; } function comparePathParserScore(a, b) { let i = 0; const aScore = a.score; const bScore = b.score; while (i < aScore.length && i < bScore.length) { const comp = compareScoreArray(aScore[i], bScore[i]); if (comp) return comp; i++; } if (Math.abs(bScore.length - aScore.length) === 1) { if (isLastScoreNegative(aScore)) return 1; if (isLastScoreNegative(bScore)) return -1; } return bScore.length - aScore.length; } function isLastScoreNegative(score) { const last = score[score.length - 1]; return score.length > 0 && last[last.length - 1] < 0; } const PATH_PARSER_OPTIONS_DEFAULTS = { strict: false, end: true, sensitive: false }; function createRouteRecordMatcher(record, parent, options) { const parser = tokensToParser(tokenizePath(record.path), options); const matcher2 = assign$1(parser, { record, parent, children: [], alias: [] }); if (parent) { if (!matcher2.record.aliasOf === !parent.record.aliasOf) parent.children.push(matcher2); } return matcher2; } function createRouterMatcher(routes, globalOptions) { const matchers = []; const matcherMap = /* @__PURE__ */ new Map(); globalOptions = mergeOptions(PATH_PARSER_OPTIONS_DEFAULTS, globalOptions); function getRecordMatcher(name) { return matcherMap.get(name); } function addRoute(record, parent, originalRecord) { const isRootAdd = !originalRecord; const mainNormalizedRecord = normalizeRouteRecord(record); mainNormalizedRecord.aliasOf = originalRecord && originalRecord.record; const options = mergeOptions(globalOptions, record); const normalizedRecords = [mainNormalizedRecord]; if ("alias" in record) { const aliases = typeof record.alias === "string" ? [record.alias] : record.alias; for (const alias of aliases) normalizedRecords.push(normalizeRouteRecord(assign$1({}, mainNormalizedRecord, { components: originalRecord ? originalRecord.record.components : mainNormalizedRecord.components, path: alias, aliasOf: originalRecord ? originalRecord.record : mainNormalizedRecord }))); } let matcher2; let originalMatcher; for (const normalizedRecord of normalizedRecords) { const { path } = normalizedRecord; if (parent && path[0] !== "/") { const parentPath = parent.record.path; const connectingSlash = parentPath[parentPath.length - 1] === "/" ? "" : "/"; normalizedRecord.path = parent.record.path + (path && connectingSlash + path); } matcher2 = createRouteRecordMatcher(normalizedRecord, parent, options); if (originalRecord) { originalRecord.alias.push(matcher2); } else { originalMatcher = originalMatcher || matcher2; if (originalMatcher !== matcher2) originalMatcher.alias.push(matcher2); if (isRootAdd && record.name && !isAliasRecord(matcher2)) { removeRoute(record.name); } } if (isMatchable(matcher2)) insertMatcher(matcher2); if (mainNormalizedRecord.children) { const children = mainNormalizedRecord.children; for (let i = 0; i < children.length; i++) addRoute(children[i], matcher2, originalRecord && originalRecord.children[i]); } originalRecord = originalRecord || matcher2; } return originalMatcher ? () => { removeRoute(originalMatcher); } : noop$3; } function removeRoute(matcherRef) { if (isRouteName(matcherRef)) { const matcher2 = matcherMap.get(matcherRef); if (matcher2) { matcherMap.delete(matcherRef); matchers.splice(matchers.indexOf(matcher2), 1); matcher2.children.forEach(removeRoute); matcher2.alias.forEach(removeRoute); } } else { const index2 = matchers.indexOf(matcherRef); if (index2 > -1) { matchers.splice(index2, 1); if (matcherRef.record.name) matcherMap.delete(matcherRef.record.name); matcherRef.children.forEach(removeRoute); matcherRef.alias.forEach(removeRoute); } } } function getRoutes() { return matchers; } function insertMatcher(matcher2) { const index2 = findInsertionIndex(matcher2, matchers); matchers.splice(index2, 0, matcher2); if (matcher2.record.name && !isAliasRecord(matcher2)) matcherMap.set(matcher2.record.name, matcher2); } function resolve(location$1, currentLocation) { let matcher2; let params = {}; let path; let name; if ("name" in location$1 && location$1.name) { matcher2 = matcherMap.get(location$1.name); if (!matcher2) throw createRouterError(ErrorTypes.MATCHER_NOT_FOUND, { location: location$1 }); name = matcher2.record.name; params = assign$1(pickParams(currentLocation.params, matcher2.keys.filter((k) => !k.optional).concat(matcher2.parent ? matcher2.parent.keys.filter((k) => k.optional) : []).map((k) => k.name)), location$1.params && pickParams(location$1.params, matcher2.keys.map((k) => k.name))); path = matcher2.stringify(params); } else if (location$1.path != null) { path = location$1.path; matcher2 = matchers.find((m) => m.re.test(path)); if (matcher2) { params = matcher2.parse(path); name = matcher2.record.name; } } else { matcher2 = currentLocation.name ? matcherMap.get(currentLocation.name) : matchers.find((m) => m.re.test(currentLocation.path)); if (!matcher2) throw createRouterError(ErrorTypes.MATCHER_NOT_FOUND, { location: location$1, currentLocation }); name = matcher2.record.name; params = assign$1({}, currentLocation.params, location$1.params); path = matcher2.stringify(params); } const matched = []; let parentMatcher = matcher2; while (parentMatcher) { matched.unshift(parentMatcher.record); parentMatcher = parentMatcher.parent; } return { name, path, params, matched, meta: mergeMetaFields(matched) }; } routes.forEach((route) => addRoute(route)); function clearRoutes() { matchers.length = 0; matcherMap.clear(); } return { addRoute, resolve, removeRoute, clearRoutes, getRoutes, getRecordMatcher }; } function pickParams(params, keys) { const newParams = {}; for (const key2 of keys) if (key2 in params) newParams[key2] = params[key2]; return newParams; } function normalizeRouteRecord(record) { const normalized = { path: record.path, redirect: record.redirect, name: record.name, meta: record.meta || {}, aliasOf: record.aliasOf, beforeEnter: record.beforeEnter, props: normalizeRecordProps(record), children: record.children || [], instances: {}, leaveGuards: /* @__PURE__ */ new Set(), updateGuards: /* @__PURE__ */ new Set(), enterCallbacks: {}, components: "components" in record ? record.components || null : record.component && { default: record.component } }; Object.defineProperty(normalized, "mods", { value: {} }); return normalized; } function normalizeRecordProps(record) { const propsObject = {}; const props = record.props || false; if ("component" in record) propsObject.default = props; else for (const name in record.components) propsObject[name] = typeof props === "object" ? props[name] : props; return propsObject; } function isAliasRecord(record) { while (record) { if (record.record.aliasOf) return true; record = record.parent; } return false; } function mergeMetaFields(matched) { return matched.reduce((meta, record) => assign$1(meta, record.meta), {}); } function findInsertionIndex(matcher2, matchers) { let lower = 0; let upper = matchers.length; while (lower !== upper) { const mid = lower + upper >> 1; if (comparePathParserScore(matcher2, matchers[mid]) < 0) upper = mid; else lower = mid + 1; } const insertionAncestor = getInsertionAncestor(matcher2); if (insertionAncestor) { upper = matchers.lastIndexOf(insertionAncestor, upper - 1); } return upper; } function getInsertionAncestor(matcher2) { let ancestor = matcher2; while (ancestor = ancestor.parent) if (isMatchable(ancestor) && comparePathParserScore(matcher2, ancestor) === 0) return ancestor; } function isMatchable({ record }) { return !!(record.name || record.components && Object.keys(record.components).length || record.redirect); } function useLink(props) { const router = inject(routerKey); const currentRoute = inject(routeLocationKey); const route = computed(() => { const to = unref(props.to); return router.resolve(to); }); const activeRecordIndex = computed(() => { const { matched } = route.value; const { length } = matched; const routeMatched = matched[length - 1]; const currentMatched = currentRoute.matched; if (!routeMatched || !currentMatched.length) return -1; const index2 = currentMatched.findIndex(isSameRouteRecord.bind(null, routeMatched)); if (index2 > -1) return index2; const parentRecordPath = getOriginalPath(matched[length - 2]); return length > 1 && getOriginalPath(routeMatched) === parentRecordPath && currentMatched[currentMatched.length - 1].path !== parentRecordPath ? currentMatched.findIndex(isSameRouteRecord.bind(null, matched[length - 2])) : index2; }); const isActive = computed(() => activeRecordIndex.value > -1 && includesParams(currentRoute.params, route.value.params)); const isExactActive = computed(() => activeRecordIndex.value > -1 && activeRecordIndex.value === currentRoute.matched.length - 1 && isSameRouteLocationParams(currentRoute.params, route.value.params)); function navigate(e = {}) { if (guardEvent(e)) { const p = router[unref(props.replace) ? "replace" : "push"](unref(props.to)).catch(noop$3); if (props.viewTransition && false) ; return p; } return Promise.resolve(); } return { route, href: computed(() => route.value.href), isActive, isExactActive, navigate }; } function preferSingleVNode(vnodes) { return vnodes.length === 1 ? vnodes[0] : vnodes; } const RouterLinkImpl = /* @__PURE__ */ defineComponent({ name: "RouterLink", compatConfig: { MODE: 3 }, props: { to: { type: [String, Object], required: true }, replace: Boolean, activeClass: String, exactActiveClass: String, custom: Boolean, ariaCurrentValue: { type: String, default: "page" }, viewTransition: Boolean }, useLink, setup(props, { slots }) { const link = reactive(useLink(props)); const { options } = inject(routerKey); const elClass = computed(() => ({ [getLinkClass(props.activeClass, options.linkActiveClass, "router-link-active")]: link.isActive, [getLinkClass(props.exactActiveClass, options.linkExactActiveClass, "router-link-exact-active")]: link.isExactActive })); return () => { const children = slots.default && preferSingleVNode(slots.default(link)); return props.custom ? children : h("a", { "aria-current": link.isExactActive ? props.ariaCurrentValue : null, href: link.href, onClick: link.navigate, class: elClass.value }, children); }; } }); const RouterLink = RouterLinkImpl; function guardEvent(e) { if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) return; if (e.defaultPrevented) return; if (e.button !== void 0 && e.button !== 0) return; if (e.currentTarget && e.currentTarget.getAttribute) { const target = e.currentTarget.getAttribute("target"); if (/\b_blank\b/i.test(target)) return; } if (e.preventDefault) e.preventDefault(); return true; } function includesParams(outer, inner) { for (const key2 in inner) { const innerValue = inner[key2]; const outerValue = outer[key2]; if (typeof innerValue === "string") { if (innerValue !== outerValue) return false; } else if (!isArray$1(outerValue) || outerValue.length !== innerValue.length || innerValue.some((value, i) => value.valueOf() !== outerValue[i].valueOf())) return false; } return true; } function getOriginalPath(record) { return record ? record.aliasOf ? record.aliasOf.path : record.path : ""; } const getLinkClass = (propClass, globalClass, defaultClass) => propClass != null ? propClass : globalClass != null ? globalClass : defaultClass; const RouterViewImpl = /* @__PURE__ */ defineComponent({ name: "RouterView", inheritAttrs: false, props: { name: { type: String, default: "default" }, route: Object }, compatConfig: { MODE: 3 }, setup(props, { attrs, slots }) { const injectedRoute = inject(routerViewLocationKey); const routeToDisplay = computed(() => props.route || injectedRoute.value); const injectedDepth = inject(viewDepthKey, 0); const depth = computed(() => { let initialDepth = unref(injectedDepth); const { matched } = routeToDisplay.value; let matchedRoute; while ((matchedRoute = matched[initialDepth]) && !matchedRoute.components) initialDepth++; return initialDepth; }); const matchedRouteRef = computed(() => routeToDisplay.value.matched[depth.value]); provide(viewDepthKey, computed(() => depth.value + 1)); provide(matchedRouteKey, matchedRouteRef); provide(routerViewLocationKey, routeToDisplay); const viewRef = ref(); watch(() => [ viewRef.value, matchedRouteRef.value, props.name ], ([instance, to, name], [oldInstance, from, oldName]) => { if (to) { to.instances[name] = instance; if (from && from !== to && instance && instance === oldInstance) { if (!to.leaveGuards.size) to.leaveGuards = from.leaveGuards; if (!to.updateGuards.size) to.updateGuards = from.updateGuards; } } if (instance && to && (!from || !isSameRouteRecord(to, from) || !oldInstance)) (to.enterCallbacks[name] || []).forEach((callback) => callback(instance)); }, { flush: "post" }); return () => { const route = routeToDisplay.value; const currentName = props.name; const matchedRoute = matchedRouteRef.value; const ViewComponent = matchedRoute && matchedRoute.components[currentName]; if (!ViewComponent) return normalizeSlot$1(slots.default, { Component: ViewComponent, route }); const routePropsOption = matchedRoute.props[currentName]; const routeProps = routePropsOption ? routePropsOption === true ? route.params : typeof routePropsOption === "function" ? routePropsOption(route) : routePropsOption : null; const onVnodeUnmounted = (vnode) => { if (vnode.component.isUnmounted) matchedRoute.instances[currentName] = null; }; const component = h(ViewComponent, assign$1({}, routeProps, attrs, { onVnodeUnmounted, ref: viewRef })); return normalizeSlot$1(slots.default, { Component: component, route }) || component; }; } }); function normalizeSlot$1(slot, data) { if (!slot) return null; const slotContent = slot(data); return slotContent.length === 1 ? slotContent[0] : slotContent; } const RouterView = RouterViewImpl; function createRouter(options) { const matcher2 = createRouterMatcher(options.routes, options); const parseQuery$1 = options.parseQuery || parseQuery; const stringifyQuery$1 = options.stringifyQuery || stringifyQuery; const routerHistory = options.history; const beforeGuards = useCallbacks(); const beforeResolveGuards = useCallbacks(); const afterGuards = useCallbacks(); const currentRoute = shallowRef(START_LOCATION_NORMALIZED); let pendingLocation = START_LOCATION_NORMALIZED; const normalizeParams = applyToParams.bind(null, (paramValue) => "" + paramValue); const encodeParams = applyToParams.bind(null, encodeParam); const decodeParams = applyToParams.bind(null, decode); function addRoute(parentOrRoute, route) { let parent; let record; if (isRouteName(parentOrRoute)) { parent = matcher2.getRecordMatcher(parentOrRoute); record = route; } else record = parentOrRoute; return matcher2.addRoute(record, parent); } function removeRoute(name) { const recordMatcher = matcher2.getRecordMatcher(name); if (recordMatcher) matcher2.removeRoute(recordMatcher); } function getRoutes() { return matcher2.getRoutes().map((routeMatcher) => routeMatcher.record); } function hasRoute(name) { return !!matcher2.getRecordMatcher(name); } function resolve(rawLocation, currentLocation) { currentLocation = assign$1({}, currentLocation || currentRoute.value); if (typeof rawLocation === "string") { const locationNormalized = parseURL(parseQuery$1, rawLocation, currentLocation.path); const matchedRoute$1 = matcher2.resolve({ path: locationNormalized.path }, currentLocation); const href$1 = routerHistory.createHref(locationNormalized.fullPath); return assign$1(locationNormalized, matchedRoute$1, { params: decodeParams(matchedRoute$1.params), hash: decode(locationNormalized.hash), redirectedFrom: void 0, href: href$1 }); } let matcherLocation; if (rawLocation.path != null) { matcherLocation = assign$1({}, rawLocation, { path: parseURL(parseQuery$1, rawLocation.path, currentLocation.path).path }); } else { const targetParams = assign$1({}, rawLocation.params); for (const key2 in targetParams) if (targetParams[key2] == null) delete targetParams[key2]; matcherLocation = assign$1({}, rawLocation, { params: encodeParams(targetParams) }); currentLocation.params = encodeParams(currentLocation.params); } const matchedRoute = matcher2.resolve(matcherLocation, currentLocation); const hash2 = rawLocation.hash || ""; matchedRoute.params = normalizeParams(decodeParams(matchedRoute.params)); const fullPath = stringifyURL(stringifyQuery$1, assign$1({}, rawLocation, { hash: encodeHash(hash2), path: matchedRoute.path })); const href = routerHistory.createHref(fullPath); return assign$1({ fullPath, hash: hash2, query: stringifyQuery$1 === stringifyQuery ? normalizeQuery(rawLocation.query) : rawLocation.query || {} }, matchedRoute, { redirectedFrom: void 0, href }); } function locationAsObject(to) { return typeof to === "string" ? parseURL(parseQuery$1, to, currentRoute.value.path) : assign$1({}, to); } function checkCanceledNavigation(to, from) { if (pendingLocation !== to) return createRouterError(ErrorTypes.NAVIGATION_CANCELLED, { from, to }); } function push(to) { return pushWithRedirect(to); } function replace(to) { return push(assign$1(locationAsObject(to), { replace: true })); } function handleRedirectRecord(to, from) { const lastMatched = to.matched[to.matched.length - 1]; if (lastMatched && lastMatched.redirect) { const { redirect } = lastMatched; let newTargetLocation = typeof redirect === "function" ? redirect(to, from) : redirect; if (typeof newTargetLocation === "string") { newTargetLocation = newTargetLocation.includes("?") || newTargetLocation.includes("#") ? newTargetLocation = locationAsObject(newTargetLocation) : { path: newTargetLocation }; newTargetLocation.params = {}; } return assign$1({ query: to.query, hash: to.hash, params: newTargetLocation.path != null ? {} : to.params }, newTargetLocation); } } function pushWithRedirect(to, redirectedFrom) { const targetLocation = pendingLocation = resolve(to); const from = currentRoute.value; const data = to.state; const force = to.force; const replace$1 = to.replace === true; const shouldRedirect = handleRedirectRecord(targetLocation, from); if (shouldRedirect) return pushWithRedirect(assign$1(locationAsObject(shouldRedirect), { state: typeof shouldRedirect === "object" ? assign$1({}, data, shouldRedirect.state) : data, force, replace: replace$1 }), redirectedFrom || targetLocation); const toLocation = targetLocation; toLocation.redirectedFrom = redirectedFrom; let failure; if (!force && isSameRouteLocation(stringifyQuery$1, from, targetLocation)) { failure = createRouterError(ErrorTypes.NAVIGATION_DUPLICATED, { to: toLocation, from }); handleScroll(); } return (failure ? Promise.resolve(failure) : navigate(toLocation, from)).catch((error) => isNavigationFailure(error) ? isNavigationFailure(error, ErrorTypes.NAVIGATION_GUARD_REDIRECT) ? error : markAsReady(error) : triggerError(error, toLocation, from)).then((failure$1) => { if (failure$1) { if (isNavigationFailure(failure$1, ErrorTypes.NAVIGATION_GUARD_REDIRECT)) { return pushWithRedirect(assign$1({ replace: replace$1 }, locationAsObject(failure$1.to), { state: typeof failure$1.to === "object" ? assign$1({}, data, failure$1.to.state) : data, force }), redirectedFrom || toLocation); } } else failure$1 = finalizeNavigation(toLocation, from, true, replace$1, data); triggerAfterEach(toLocation, from, failure$1); return failure$1; }); } function checkCanceledNavigationAndReject(to, from) { const error = checkCanceledNavigation(to, from); return error ? Promise.reject(error) : Promise.resolve(); } function runWithContext(fn) { const app = installedApps.values().next().value; return app && typeof app.runWithContext === "function" ? app.runWithContext(fn) : fn(); } function navigate(to, from) { let guards; const [leavingRecords, updatingRecords, enteringRecords] = extractChangingRecords(to, from); guards = extractComponentsGuards(leavingRecords.reverse(), "beforeRouteLeave", to, from); for (const record of leavingRecords) record.leaveGuards.forEach((guard) => { guards.push(guardToPromiseFn(guard, to, from)); }); const canceledNavigationCheck = checkCanceledNavigationAndReject.bind(null, to, from); guards.push(canceledNavigationCheck); return runGuardQueue(guards).then(() => { guards = []; for (const guard of beforeGuards.list()) guards.push(guardToPromiseFn(guard, to, from)); guards.push(canceledNavigationCheck); return runGuardQueue(guards); }).then(() => { guards = extractComponentsGuards(updatingRecords, "beforeRouteUpdate", to, from); for (const record of updatingRecords) record.updateGuards.forEach((guard) => { guards.push(guardToPromiseFn(guard, to, from)); }); guards.push(canceledNavigationCheck); return runGuardQueue(guards); }).then(() => { guards = []; for (const record of enteringRecords) if (record.beforeEnter) if (isArray$1(record.beforeEnter)) for (const beforeEnter of record.beforeEnter) guards.push(guardToPromiseFn(beforeEnter, to, from)); else guards.push(guardToPromiseFn(record.beforeEnter, to, from)); guards.push(canceledNavigationCheck); return runGuardQueue(guards); }).then(() => { to.matched.forEach((record) => record.enterCallbacks = {}); guards = extractComponentsGuards(enteringRecords, "beforeRouteEnter", to, from, runWithContext); guards.push(canceledNavigationCheck); return runGuardQueue(guards); }).then(() => { guards = []; for (const guard of beforeResolveGuards.list()) guards.push(guardToPromiseFn(guard, to, from)); guards.push(canceledNavigationCheck); return runGuardQueue(guards); }).catch((err) => isNavigationFailure(err, ErrorTypes.NAVIGATION_CANCELLED) ? err : Promise.reject(err)); } function triggerAfterEach(to, from, failure) { afterGuards.list().forEach((guard) => runWithContext(() => guard(to, from, failure))); } function finalizeNavigation(toLocation, from, isPush, replace$1, data) { const error = checkCanceledNavigation(toLocation, from); if (error) return error; const isFirstNavigation = from === START_LOCATION_NORMALIZED; const state = {}; if (isPush) if (replace$1 || isFirstNavigation) routerHistory.replace(toLocation.fullPath, assign$1({ scroll: isFirstNavigation && state && state.scroll }, data)); else routerHistory.push(toLocation.fullPath, data); currentRoute.value = toLocation; handleScroll(); markAsReady(); } let removeHistoryListener; function setupListeners() { if (removeHistoryListener) return; removeHistoryListener = routerHistory.listen((to, _from, info) => { if (!router.listening) return; const toLocation = resolve(to); const shouldRedirect = handleRedirectRecord(toLocation, router.currentRoute.value); if (shouldRedirect) { pushWithRedirect(assign$1(shouldRedirect, { replace: true, force: true }), toLocation).catch(noop$3); return; } pendingLocation = toLocation; const from = currentRoute.value; navigate(toLocation, from).catch((error) => { if (isNavigationFailure(error, ErrorTypes.NAVIGATION_ABORTED | ErrorTypes.NAVIGATION_CANCELLED)) return error; if (isNavigationFailure(error, ErrorTypes.NAVIGATION_GUARD_REDIRECT)) { pushWithRedirect(assign$1(locationAsObject(error.to), { force: true }), toLocation).then((failure) => { if (isNavigationFailure(failure, ErrorTypes.NAVIGATION_ABORTED | ErrorTypes.NAVIGATION_DUPLICATED) && !info.delta && info.type === NavigationType.pop) routerHistory.go(-1, false); }).catch(noop$3); return Promise.reject(); } if (info.delta) routerHistory.go(-info.delta, false); return triggerError(error, toLocation, from); }).then((failure) => { failure = failure || finalizeNavigation(toLocation, from, false); if (failure) { if (info.delta && !isNavigationFailure(failure, ErrorTypes.NAVIGATION_CANCELLED)) routerHistory.go(-info.delta, false); else if (info.type === NavigationType.pop && isNavigationFailure(failure, ErrorTypes.NAVIGATION_ABORTED | ErrorTypes.NAVIGATION_DUPLICATED)) routerHistory.go(-1, false); } triggerAfterEach(toLocation, from, failure); }).catch(noop$3); }); } let readyHandlers = useCallbacks(); let errorListeners = useCallbacks(); let ready; function triggerError(error, to, from) { markAsReady(error); const list = errorListeners.list(); if (list.length) list.forEach((handler) => handler(error, to, from)); else { console.error(error); } return Promise.reject(error); } function isReady() { if (ready && currentRoute.value !== START_LOCATION_NORMALIZED) return Promise.resolve(); return new Promise((resolve$1, reject) => { readyHandlers.add([resolve$1, reject]); }); } function markAsReady(err) { if (!ready) { ready = !err; setupListeners(); readyHandlers.list().forEach(([resolve$1, reject]) => err ? reject(err) : resolve$1()); readyHandlers.reset(); } return err; } function handleScroll(to, from, isPush, isFirstNavigation) { const { scrollBehavior } = options; return Promise.resolve(); } const go = (delta) => routerHistory.go(delta); const installedApps = /* @__PURE__ */ new Set(); const router = { currentRoute, listening: true, addRoute, removeRoute, clearRoutes: matcher2.clearRoutes, hasRoute, getRoutes, resolve, options, push, replace, go, back: () => go(-1), forward: () => go(1), beforeEach: beforeGuards.add, beforeResolve: beforeResolveGuards.add, afterEach: afterGuards.add, onError: errorListeners.add, isReady, install(app) { app.component("RouterLink", RouterLink); app.component("RouterView", RouterView); app.config.globalProperties.$router = router; Object.defineProperty(app.config.globalProperties, "$route", { enumerable: true, get: () => unref(currentRoute) }); const reactiveRoute = {}; for (const key2 in START_LOCATION_NORMALIZED) Object.defineProperty(reactiveRoute, key2, { get: () => currentRoute.value[key2], enumerable: true }); app.provide(routerKey, router); app.provide(routeLocationKey, shallowReactive(reactiveRoute)); app.provide(routerViewLocationKey, currentRoute); const unmountApp = app.unmount; installedApps.add(app); app.unmount = function() { installedApps.delete(app); if (installedApps.size < 1) { pendingLocation = START_LOCATION_NORMALIZED; removeHistoryListener && removeHistoryListener(); removeHistoryListener = null; currentRoute.value = START_LOCATION_NORMALIZED; ready = false; } unmountApp(); }; } }; function runGuardQueue(guards) { return guards.reduce((promise, guard) => promise.then(() => runWithContext(guard)), Promise.resolve()); } return router; } function useRouter() { return inject(routerKey); } function useRoute(_name) { return inject(routeLocationKey); } function toArray$1(value) { return Array.isArray(value) ? value : [value]; } const __nuxt_page_meta$G = { redirect: { name: "auth-login" }, showMobileNavigationMenu: false }; const __nuxt_page_meta$F = null; const __nuxt_page_meta$E = { ssr: false }; const __nuxt_page_meta$D = { ssr: false }; const __nuxt_page_meta$C = { ssr: false }; const __nuxt_page_meta$B = { ssr: false }; const __nuxt_page_meta$A = { ssr: false }; const __nuxt_page_meta$z = { ssr: false, showMobileNavigationMenu: false }; const __nuxt_page_meta$y = { ssr: false }; const __nuxt_page_meta$x = { ssr: false }; const __nuxt_page_meta$w = { ssr: false }; const __nuxt_page_meta$v = { ssr: false }; const __nuxt_page_meta$u = { ssr: false }; const __nuxt_page_meta$t = { ssr: false }; const __nuxt_page_meta$s = { ssr: false, showMobileNavigationMenu: false }; const __nuxt_page_meta$r = { ssr: false }; const __nuxt_page_meta$q = { ssr: false }; const __nuxt_page_meta$p = { redirect: { name: "add-story-inputStory" }, showMobileNavigationMenu: false }; const __nuxt_page_meta$o = { ssr: false }; const __nuxt_page_meta$n = { ssr: false }; const __nuxt_page_meta$m = { ssr: false }; const __nuxt_page_meta$l = { redirect: { name: "add-product-inputProduct" }, showMobileNavigationMenu: false }; const __nuxt_page_meta$k = { showMobileNavigationMenu: false }; const __nuxt_page_meta$j = { ssr: false }; const __nuxt_page_meta$i = { ssr: false }; const __nuxt_page_meta$h = { showMobileNavigationMenu: false }; const __nuxt_page_meta$g = { ssr: false }; const __nuxt_page_meta$f = { ssr: false }; const __nuxt_page_meta$e = { ssr: false }; const __nuxt_page_meta$d = { ssr: false }; const __nuxt_page_meta$c = { ssr: false }; const __nuxt_page_meta$b = { // redirect: {name: 'edit-story-id-inputStory'}, showMobileNavigationMenu: false }; const __nuxt_page_meta$a = { showMobileNavigationMenu: false }; const __nuxt_page_meta$9 = { ssr: false, showMobileNavigationMenu: false }; const __nuxt_page_meta$8 = { redirect: { name: "add-product-excel-inputProduct" }, showMobileNavigationMenu: false, ssr: false }; const __nuxt_page_meta$7 = { // redirect: {name: 'edit-product-id-inputProduct'}, showMobileNavigationMenu: false }; const __nuxt_page_meta$6 = { showMobileNavigationMenu: false }; const __nuxt_page_meta$5 = { showMobileNavigationMenu: false }; const __nuxt_page_meta$4 = { showMobileNavigationMenu: false }; const __nuxt_page_meta$3 = { ssr: false, showMobileNavigationMenu: false }; const __nuxt_page_meta$2 = { showMobileNavigationMenu: false }; const __nuxt_page_meta$1 = { ssr: false, showMobileNavigationMenu: false }; const __nuxt_page_meta = { showMobileNavigationMenu: false }; const _routes = [ { name: "auth", path: "/auth", meta: __nuxt_page_meta$G || {}, redirect: { "name": "auth-login" }, component: () => import('./auth-k6DyND_M.mjs'), children: [ { name: "auth-login", path: "login", component: () => import('./index-wSYyRQGL.mjs') }, { name: "auth-forget", path: "forget", component: () => import('./index-BGnbbFfi.mjs') }, { name: "auth-register", path: "register", component: () => import('./index-Cn1KlrPk.mjs') } ] }, { name: "index", path: "/", redirect: { "name": "home" }, component: () => import('./index-t6UUxREo.mjs') }, { name: __nuxt_page_meta$F?.name, path: "/posts", component: () => import('./posts-Bc5gMH3X.mjs'), children: [ { name: "posts", path: "", component: () => import('./index-BMBIY91Z.mjs') } ] }, { name: "user-add", path: "/user/add", meta: __nuxt_page_meta$E || {}, component: () => import('./add-i6kkjc1N.mjs') }, { name: "add", path: "/add", meta: __nuxt_page_meta$D || {}, component: () => import('./index-B4AObJ9q.mjs') }, { name: "cart-id", path: "/cart/:id()", meta: __nuxt_page_meta$C || {}, component: () => import('./_id_-C4I3q5xO.mjs') }, { name: "fav", path: "/fav", meta: __nuxt_page_meta$B || {}, component: () => import('./index-D-7yHbsO.mjs') }, { name: "cart", path: "/cart", meta: __nuxt_page_meta$A || {}, component: () => import('./index-B_tOQJcx.mjs') }, { name: "edit", path: "/edit", meta: __nuxt_page_meta$z || {}, component: () => import('./index-CAKGmkdK.mjs') }, { name: "home", path: "/home", component: () => import('./index-Dc6P9620.mjs') }, { name: "user", path: "/user", component: () => import('./index-B_W8HwYw.mjs') }, { name: "saved-posts", path: "/saved/posts", meta: __nuxt_page_meta$y || {}, component: () => import('./posts-CLDFAIgC.mjs') }, { name: "user-brands", path: "/user/brands", meta: __nuxt_page_meta$x || {}, component: () => import('./brands-p2sFsmkJ.mjs') }, { name: "message-list", path: "/message/list", component: () => import('./list-DXdwJIcD.mjs') }, { name: "search", path: "/search", component: () => import('./index-CkvjDvD1.mjs') }, { name: "user-address", path: "/user/address", meta: __nuxt_page_meta$w || {}, component: () => import('./address-DMxxjBo7.mjs') }, { name: "user-message", path: "/user/message", meta: __nuxt_page_meta$v || {}, component: () => import('./message-byjpBmke.mjs') }, { name: "user-profile", path: "/user/profile", meta: __nuxt_page_meta$u || {}, component: () => import('./profile-D7w2Bc43.mjs') }, { name: "user-setting", path: "/user/setting", meta: __nuxt_page_meta$t || {}, component: () => import('./setting-BB4rKKnn.mjs') }, { name: "message", path: "/message", meta: __nuxt_page_meta$s || {}, component: () => import('./index-Ai1IyyhR.mjs') }, { name: "user-discount", path: "/user/discount", meta: __nuxt_page_meta$r || {}, component: () => import('./discount-Cp2g0pO_.mjs') }, { name: "user-managers", path: "/user/managers", meta: __nuxt_page_meta$q || {}, component: () => import('./managers-CF6L12Rv.mjs') }, { name: "user-edit-id", path: "/user/edit/:id()", component: () => import('./_id_-CbHlWEMV.mjs') }, { name: "add-story", path: "/add/story", meta: __nuxt_page_meta$p || {}, redirect: { "name": "add-story-inputStory" }, component: () => import('./index-B5Vqh-k3.mjs') }, { name: "user-attributes", path: "/user/attributes", meta: __nuxt_page_meta$o || {}, component: () => import('./attributes-BNn9D4IH.mjs') }, { name: "user-categories", path: "/user/categories", meta: __nuxt_page_meta$n || {}, component: () => import('./categories-C4Nujzos.mjs') }, { name: "user-edit", path: "/user/edit", component: () => import('./index-Btss1YF3.mjs') }, { name: "user-order-id", path: "/user/order/:id()", component: () => import('./_id_-DgVwkTgv.mjs') }, { name: "highlight-create", path: "/highlight/create", meta: __nuxt_page_meta$m || {}, component: () => import('./create-T5syfKEB.mjs') }, { name: "user_detail-id", path: "/user_detail/:id()", component: () => import('./_id_-Bte-kth0.mjs') }, { name: "add-product", path: "/add/product", meta: __nuxt_page_meta$l || {}, redirect: { "name": "add-product-inputProduct" }, component: () => import('./index-CXSVx6e0.mjs') }, { name: "search-main", path: "/search/main", component: () => import('./index-BhZW2_4w.mjs') }, { name: "add-story-infStory", path: "/add/story/infStory", meta: __nuxt_page_meta$k || {}, component: () => import('./infStory-1d17yzdB.mjs') }, { name: "user-store_request", path: "/user/store_request", meta: __nuxt_page_meta$j || {}, component: () => import('./store_request-DRyhaUKy.mjs') }, { name: "highlight-edit-id", path: "/highlight/edit/:id()", meta: __nuxt_page_meta$i || {}, component: () => import('./_id_-CsILLsxv.mjs') }, { name: "product_detail-id", path: "/product_detail/:id()", component: () => import('./_id_-9VAKK0n_.mjs') }, { name: "add-story-inputStory", path: "/add/story/inputStory", meta: __nuxt_page_meta$h || {}, component: () => import('./inputStory-hQU_hywv.mjs') }, { name: "user-statistics_list", path: "/user/statistics_list", meta: __nuxt_page_meta$c || {}, component: () => import('./statistics_list-CmhSwMeY.mjs'), children: [ { name: "user-statistics_list-saved", path: "saved", meta: __nuxt_page_meta$g || {}, component: () => import('./saved-CgEMDJFc.mjs') }, { name: "user-statistics_list-orders", path: "orders", meta: __nuxt_page_meta$f || {}, component: () => import('./orders-p5l5Zsd7.mjs') }, { name: "user-statistics_list-customers", path: "customers", meta: __nuxt_page_meta$e || {}, component: () => import('./customers-DjnxOuCt.mjs') }, { name: "user-statistics_list-storeOrders", path: "storeOrders", meta: __nuxt_page_meta$d || {}, component: () => import('./storeOrders-HSLJCR2u.mjs') } ] }, { name: "edit-story-id", path: "/edit/story/:id()", meta: __nuxt_page_meta$b || {}, component: () => import('./index-BSvQmNib.mjs') }, { name: "add-product-infProduct", path: "/add/product/infProduct", meta: __nuxt_page_meta$a || {}, component: () => import('./infProduct-f6h-C0AY.mjs') }, { name: "message-detail_message", path: "/message/detail_message", meta: __nuxt_page_meta$9 || {}, component: () => import('./detail_message-CSyWmrY9.mjs') }, { name: "add-product-excel", path: "/add/product/excel", meta: __nuxt_page_meta$8 || {}, redirect: { "name": "add-product-excel-inputProduct" }, component: () => import('./index-Ddk8c6tz.mjs') }, { name: "edit-product-id", path: "/edit/product/:id()", meta: __nuxt_page_meta$7 || {}, component: () => import('./index-BkpfxUQW.mjs') }, { name: "add-product-inputProduct", path: "/add/product/inputProduct", meta: __nuxt_page_meta$6 || {}, component: () => import('./inputProduct-Zf3gSMnS.mjs') }, { name: "edit-story-id-infStory", path: "/edit/story/:id()/infStory", meta: __nuxt_page_meta$5 || {}, component: () => import('./infStory-Bog6ymKM.mjs') }, { name: "edit-story-id-inputStory", path: "/edit/story/:id()/inputStory", meta: __nuxt_page_meta$4 || {}, component: () => import('./inputStory-DbzTDAdQ.mjs') }, { name: "add-product-excel-infProductExcel", path: "/add/product/excel/infProductExcel", meta: __nuxt_page_meta$3 || {}, component: () => import('./infProductExcel-BT_QoWyR.mjs') }, { name: "edit-product-id-infProduct", path: "/edit/product/:id()/infProduct", meta: __nuxt_page_meta$2 || {}, component: () => import('./index-Dz1aTPhU.mjs') }, { name: "add-product-excel-inputProductExcel", path: "/add/product/excel/inputProductExcel", meta: __nuxt_page_meta$1 || {}, component: () => import('./inputProductExcel-BBQ5xIVD.mjs') }, { name: "edit-product-id-inputProduct", path: "/edit/product/:id()/inputProduct", meta: __nuxt_page_meta || {}, component: () => import('./index-Rky3cSLW.mjs') } ]; const _wrapInTransition = (props, children) => { return { default: () => children.default?.() }; }; const ROUTE_KEY_PARENTHESES_RE = /(:\w+)\([^)]+\)/g; const ROUTE_KEY_SYMBOLS_RE = /(:\w+)[?+*]/g; const ROUTE_KEY_NORMAL_RE = /:\w+/g; function generateRouteKey(route) { const source = route?.meta.key ?? route.path.replace(ROUTE_KEY_PARENTHESES_RE, "$1").replace(ROUTE_KEY_SYMBOLS_RE, "$1").replace(ROUTE_KEY_NORMAL_RE, (r) => route.params[r.slice(1)]?.toString() || ""); return typeof source === "function" ? source(route) : source; } function isChangingPage(to, from) { if (to === from || from === START_LOCATION_NORMALIZED) { return false; } if (generateRouteKey(to) !== generateRouteKey(from)) { return true; } const areComponentsSame = to.matched.every( (comp, index2) => comp.components && comp.components.default === from.matched[index2]?.components?.default ); if (areComponentsSame) { return false; } return true; } const routerOptions0 = { scrollBehavior(to, from, savedPosition) { const nuxtApp = useNuxtApp(); const hashScrollBehaviour = useRouter$1().options?.scrollBehaviorType ?? "auto"; if (to.path.replace(/\/$/, "") === from.path.replace(/\/$/, "")) { if (from.hash && !to.hash) { return { left: 0, top: 0 }; } if (to.hash) { return { el: to.hash, top: _getHashElementScrollMarginTop(to.hash), behavior: hashScrollBehaviour }; } return false; } const routeAllowsScrollToTop = typeof to.meta.scrollToTop === "function" ? to.meta.scrollToTop(to, from) : to.meta.scrollToTop; if (routeAllowsScrollToTop === false) { return false; } const hookToWait = nuxtApp._runningTransition ? "page:transition:finish" : "page:loading:end"; return new Promise((resolve) => { if (from === START_LOCATION_NORMALIZED) { resolve(_calculatePosition(to, from, savedPosition, hashScrollBehaviour)); return; } nuxtApp.hooks.hookOnce(hookToWait, () => { requestAnimationFrame(() => resolve(_calculatePosition(to, from, savedPosition, hashScrollBehaviour))); }); }); } }; function _getHashElementScrollMarginTop(selector) { try { const elem = (void 0).querySelector(selector); if (elem) { return (Number.parseFloat(getComputedStyle(elem).scrollMarginTop) || 0) + (Number.parseFloat(getComputedStyle((void 0).documentElement).scrollPaddingTop) || 0); } } catch { } return 0; } function _calculatePosition(to, from, savedPosition, defaultHashScrollBehaviour) { if (savedPosition) { return savedPosition; } const isPageNavigation = isChangingPage(to, from); if (to.hash) { return { el: to.hash, top: _getHashElementScrollMarginTop(to.hash), behavior: isPageNavigation ? defaultHashScrollBehaviour : "instant" }; } return { left: 0, top: 0 }; } const configRouterOptions = { hashMode: false, scrollBehaviorType: "auto" }; const routerOptions = { ...configRouterOptions, ...routerOptions0 }; const validate = /* @__PURE__ */ defineNuxtRouteMiddleware(async (to, from) => { let __temp, __restore; if (!to.meta?.validate) { return; } const result = ([__temp, __restore] = executeAsync(() => Promise.resolve(to.meta.validate(to))), __temp = await __temp, __restore(), __temp); if (result === true) { return; } const error = createError({ fatal: false, // eslint-disable-next-line @typescript-eslint/no-deprecated status: result && (result.status || result.statusCode) || 404, // eslint-disable-next-line @typescript-eslint/no-deprecated statusText: result && (result.statusText || result.statusMessage) || `Page Not Found: ${to.fullPath}`, data: { path: to.fullPath } }); return error; }); function tryOnScopeDispose(fn) { if (getCurrentScope()) { onScopeDispose(fn); return true; } return false; } const localProvidedStateMap = /* @__PURE__ */ new WeakMap(); const injectLocal = /* @__NO_SIDE_EFFECTS__ */ (...args) => { var _a; const key2 = args[0]; const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy; if (instance == null && !hasInjectionContext()) throw new Error("injectLocal must be called in setup"); if (instance && localProvidedStateMap.has(instance) && key2 in localProvidedStateMap.get(instance)) return localProvidedStateMap.get(instance)[key2]; return inject(...args); }; typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope; const notNullish = (val) => val != null; const toString$1 = Object.prototype.toString; const isObject$2 = (val) => toString$1.call(val) === "[object Object]"; const noop$2 = () => { }; function toRef(...args) { if (args.length !== 1) return toRef$1(...args); const r = args[0]; return typeof r === "function" ? readonly(customRef(() => ({ get: r, set: noop$2 }))) : ref(r); } function createFilterWrapper(filter, fn) { function wrapper(...args) { return new Promise((resolve, reject) => { Promise.resolve(filter(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject); }); } return wrapper; } const bypassFilter = (invoke2) => { return invoke2(); }; function debounceFilter(ms, options = {}) { let timer; let maxTimer; let lastRejector = noop$2; const _clearTimeout = (timer2) => { clearTimeout(timer2); lastRejector(); lastRejector = noop$2; }; let lastInvoker; const filter = (invoke2) => { const duration = toValue(ms); const maxDuration = toValue(options.maxWait); if (timer) _clearTimeout(timer); if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) { if (maxTimer) { _clearTimeout(maxTimer); maxTimer = void 0; } return Promise.resolve(invoke2()); } return new Promise((resolve, reject) => { lastRejector = options.rejectOnCancel ? reject : resolve; lastInvoker = invoke2; if (maxDuration && !maxTimer) { maxTimer = setTimeout(() => { if (timer) _clearTimeout(timer); maxTimer = void 0; resolve(lastInvoker()); }, maxDuration); } timer = setTimeout(() => { if (maxTimer) _clearTimeout(maxTimer); maxTimer = void 0; resolve(invoke2()); }, duration); }); }; return filter; } function increaseWithUnit(target, delta) { var _a; if (typeof target === "number") return target + delta; const value = ((_a = target.match(/^-?\d+\.?\d*/)) == null ? void 0 : _a[0]) || ""; const unit = target.slice(value.length); const result = Number.parseFloat(value) + delta; if (Number.isNaN(result)) return target; return result + unit; } function pxValue(px) { return px.endsWith("rem") ? Number.parseFloat(px) * 16 : Number.parseFloat(px); } function toArray(value) { return Array.isArray(value) ? value : [value]; } function getLifeCycleTarget(target) { return getCurrentInstance(); } function watchWithFilter(source, cb, options = {}) { const { eventFilter = bypassFilter, ...watchOptions } = options; return watch( source, createFilterWrapper( eventFilter, cb ), watchOptions ); } function tryOnMounted(fn, sync = true, target) { const instance = getLifeCycleTarget(); if (instance) ; else if (sync) fn(); else nextTick(fn); } function tryOnUnmounted(fn, target) { getLifeCycleTarget(); } function watchDebounced(source, cb, options = {}) { const { debounce = 0, maxWait = void 0, ...watchOptions } = options; return watchWithFilter( source, cb, { ...watchOptions, eventFilter: debounceFilter(debounce, { maxWait }) } ); } function watchImmediate(source, cb, options) { return watch( source, cb, { ...options, immediate: true } ); } const defaultWindow = void 0; function unrefElement(elRef) { var _a; const plain = toValue(elRef); return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain; } function useEventListener(...args) { const cleanups = []; const cleanup = () => { cleanups.forEach((fn) => fn()); cleanups.length = 0; }; const register = (el, event, listener, options) => { el.addEventListener(event, listener, options); return () => el.removeEventListener(event, listener, options); }; const firstParamTargets = computed(() => { const test = toArray(toValue(args[0])).filter((e) => e != null); return test.every((e) => typeof e !== "string") ? test : void 0; }); const stopWatch = watchImmediate( () => { var _a, _b; return [ (_b = (_a = firstParamTargets.value) == null ? void 0 : _a.map((e) => unrefElement(e))) != null ? _b : [defaultWindow].filter((e) => e != null), toArray(toValue(firstParamTargets.value ? args[1] : args[0])), toArray(unref(firstParamTargets.value ? args[2] : args[1])), // @ts-expect-error - TypeScript gets the correct types, but somehow still complains toValue(firstParamTargets.value ? args[3] : args[2]) ]; }, ([raw_targets, raw_events, raw_listeners, raw_options]) => { cleanup(); if (!(raw_targets == null ? void 0 : raw_targets.length) || !(raw_events == null ? void 0 : raw_events.length) || !(raw_listeners == null ? void 0 : raw_listeners.length)) return; const optionsClone = isObject$2(raw_options) ? { ...raw_options } : raw_options; cleanups.push( ...raw_targets.flatMap( (el) => raw_events.flatMap( (event) => raw_listeners.map((listener) => register(el, event, listener, optionsClone)) ) ) ); }, { flush: "post" } ); const stop = () => { stopWatch(); cleanup(); }; tryOnScopeDispose(cleanup); return stop; } function onClickOutside(target, handler, options = {}) { const { window: window2 = defaultWindow, ignore = [], capture = true, detectIframe = false, controls = false } = options; if (!window2) { return controls ? { stop: noop$2, cancel: noop$2, trigger: noop$2 } : noop$2; } let shouldListen = true; const shouldIgnore = (event) => { return toValue(ignore).some((target2) => { if (typeof target2 === "string") { return Array.from(window2.document.querySelectorAll(target2)).some((el) => el === event.target || event.composedPath().includes(el)); } else { const el = unrefElement(target2); return el && (event.target === el || event.composedPath().includes(el)); } }); }; function hasMultipleRoots(target2) { const vm = toValue(target2); return vm && vm.$.subTree.shapeFlag === 16; } function checkMultipleRoots(target2, event) { const vm = toValue(target2); const children = vm.$.subTree && vm.$.subTree.children; if (children == null || !Array.isArray(children)) return false; return children.some((child) => child.el === event.target || event.composedPath().includes(child.el)); } const listener = (event) => { const el = unrefElement(target); if (event.target == null) return; if (!(el instanceof Element) && hasMultipleRoots(target) && checkMultipleRoots(target, event)) return; if (!el || el === event.target || event.composedPath().includes(el)) return; if ("detail" in event && event.detail === 0) shouldListen = !shouldIgnore(event); if (!shouldListen) { shouldListen = true; return; } handler(event); }; let isProcessingClick = false; const cleanup = [ useEventListener(window2, "click", (event) => { if (!isProcessingClick) { isProcessingClick = true; setTimeout(() => { isProcessingClick = false; }, 0); listener(event); } }, { passive: true, capture }), useEventListener(window2, "pointerdown", (e) => { const el = unrefElement(target); shouldListen = !shouldIgnore(e) && !!(el && !e.composedPath().includes(el)); }, { passive: true }), detectIframe && useEventListener(window2, "blur", (event) => { setTimeout(() => { var _a; const el = unrefElement(target); if (((_a = window2.document.activeElement) == null ? void 0 : _a.tagName) === "IFRAME" && !(el == null ? void 0 : el.contains(window2.document.activeElement))) { handler(event); } }, 0); }, { passive: true }) ].filter(Boolean); const stop = () => cleanup.forEach((fn) => fn()); if (controls) { return { stop, cancel: () => { shouldListen = false; }, trigger: (event) => { shouldListen = true; listener(event); shouldListen = false; } }; } return stop; } // @__NO_SIDE_EFFECTS__ function useMounted() { const isMounted = shallowRef(false); getCurrentInstance(); return isMounted; } // @__NO_SIDE_EFFECTS__ function useSupported(callback) { const isMounted = /* @__PURE__ */ useMounted(); return computed(() => { isMounted.value; return Boolean(callback()); }); } const DEFAULT_DELAY = 500; const DEFAULT_THRESHOLD = 10; function onLongPress(target, handler, options) { var _a, _b; const elementRef = computed(() => unrefElement(target)); let timeout; let posStart; let startTimestamp; let hasLongPressed = false; function clear() { if (timeout) { clearTimeout(timeout); timeout = void 0; } posStart = void 0; startTimestamp = void 0; hasLongPressed = false; } function getDelay(ev) { const delay = options == null ? void 0 : options.delay; if (typeof delay === "function") { return delay(ev); } return delay != null ? delay : DEFAULT_DELAY; } function onRelease(ev) { var _a2, _b2, _c; const [_startTimestamp, _posStart, _hasLongPressed] = [startTimestamp, posStart, hasLongPressed]; clear(); if (!(options == null ? void 0 : options.onMouseUp) || !_posStart || !_startTimestamp) return; if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value) return; if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent) ev.preventDefault(); if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop) ev.stopPropagation(); const dx = ev.x - _posStart.x; const dy = ev.y - _posStart.y; const distance = Math.sqrt(dx * dx + dy * dy); options.onMouseUp(ev.timeStamp - _startTimestamp, distance, _hasLongPressed); } function onDown(ev) { var _a2, _b2, _c; if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value) return; clear(); if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent) ev.preventDefault(); if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop) ev.stopPropagation(); posStart = { x: ev.x, y: ev.y }; startTimestamp = ev.timeStamp; timeout = setTimeout( () => { hasLongPressed = true; handler(ev); }, getDelay(ev) ); } function onMove(ev) { var _a2, _b2, _c, _d; if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value) return; if (!posStart || (options == null ? void 0 : options.distanceThreshold) === false) return; if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent) ev.preventDefault(); if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop) ev.stopPropagation(); const dx = ev.x - posStart.x; const dy = ev.y - posStart.y; const distance = Math.sqrt(dx * dx + dy * dy); if (distance >= ((_d = options == null ? void 0 : options.distanceThreshold) != null ? _d : DEFAULT_THRESHOLD)) clear(); } const listenerOptions = { capture: (_a = options == null ? void 0 : options.modifiers) == null ? void 0 : _a.capture, once: (_b = options == null ? void 0 : options.modifiers) == null ? void 0 : _b.once }; const cleanup = [ useEventListener(elementRef, "pointerdown", onDown, listenerOptions), useEventListener(elementRef, "pointermove", onMove, listenerOptions), useEventListener(elementRef, ["pointerup", "pointerleave"], onRelease, listenerOptions) ]; const stop = () => cleanup.forEach((fn) => fn()); return stop; } const ssrWidthSymbol = /* @__PURE__ */ Symbol("vueuse-ssr-width"); // @__NO_SIDE_EFFECTS__ function useSSRWidth() { const ssrWidth = hasInjectionContext() ? /* @__PURE__ */ injectLocal(ssrWidthSymbol, null) : null; return typeof ssrWidth === "number" ? ssrWidth : void 0; } function useMediaQuery(query, options = {}) { const { window: window2 = defaultWindow, ssrWidth = /* @__PURE__ */ useSSRWidth() } = options; const isSupported = /* @__PURE__ */ useSupported(() => window2 && "matchMedia" in window2 && typeof window2.matchMedia === "function"); const ssrSupport = shallowRef(typeof ssrWidth === "number"); const mediaQuery = shallowRef(); const matches = shallowRef(false); const handler = (event) => { matches.value = event.matches; }; watchEffect(() => { if (ssrSupport.value) { ssrSupport.value = !isSupported.value; const queryStrings = toValue(query).split(","); matches.value = queryStrings.some((queryString) => { const not = queryString.includes("not all"); const minWidth = queryString.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/); const maxWidth = queryString.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/); let res = Boolean(minWidth || maxWidth); if (minWidth && res) { res = ssrWidth >= pxValue(minWidth[1]); } if (maxWidth && res) { res = ssrWidth <= pxValue(maxWidth[1]); } return not ? !res : res; }); return; } if (!isSupported.value) return; mediaQuery.value = window2.matchMedia(toValue(query)); matches.value = mediaQuery.value.matches; }); useEventListener(mediaQuery, "change", handler, { passive: true }); return computed(() => matches.value); } const breakpointsTailwind = { "sm": 640, "md": 768, "lg": 1024, "xl": 1280, "2xl": 1536 }; // @__NO_SIDE_EFFECTS__ function useBreakpoints(breakpoints, options = {}) { function getValue2(k, delta) { let v = toValue(breakpoints[toValue(k)]); if (delta != null) v = increaseWithUnit(v, delta); if (typeof v === "number") v = `${v}px`; return v; } const { window: window2 = defaultWindow, strategy = "min-width", ssrWidth = /* @__PURE__ */ useSSRWidth() } = options; const ssrSupport = typeof ssrWidth === "number"; const mounted = ssrSupport ? shallowRef(false) : { value: true }; if (ssrSupport) { tryOnMounted(() => mounted.value = !!window2); } function match2(query, size) { if (!mounted.value && ssrSupport) { return query === "min" ? ssrWidth >= pxValue(size) : ssrWidth <= pxValue(size); } if (!window2) return false; return window2.matchMedia(`(${query}-width: ${size})`).matches; } const greaterOrEqual = (k) => { return useMediaQuery(() => `(min-width: ${getValue2(k)})`, options); }; const smallerOrEqual = (k) => { return useMediaQuery(() => `(max-width: ${getValue2(k)})`, options); }; const shortcutMethods = Object.keys(breakpoints).reduce((shortcuts, k) => { Object.defineProperty(shortcuts, k, { get: () => strategy === "min-width" ? greaterOrEqual(k) : smallerOrEqual(k), enumerable: true, configurable: true }); return shortcuts; }, {}); function current() { const points = Object.keys(breakpoints).map((k) => [k, shortcutMethods[k], pxValue(getValue2(k))]).sort((a, b) => a[2] - b[2]); return computed(() => points.filter(([, v]) => v.value).map(([k]) => k)); } return Object.assign(shortcutMethods, { greaterOrEqual, smallerOrEqual, greater(k) { return useMediaQuery(() => `(min-width: ${getValue2(k, 0.1)})`, options); }, smaller(k) { return useMediaQuery(() => `(max-width: ${getValue2(k, -0.1)})`, options); }, between(a, b) { return useMediaQuery(() => `(min-width: ${getValue2(a)}) and (max-width: ${getValue2(b, -0.1)})`, options); }, isGreater(k) { return match2("min", getValue2(k, 0.1)); }, isGreaterOrEqual(k) { return match2("min", getValue2(k)); }, isSmaller(k) { return match2("max", getValue2(k, -0.1)); }, isSmallerOrEqual(k) { return match2("max", getValue2(k)); }, isInBetween(a, b) { return match2("min", getValue2(a)) && match2("max", getValue2(b, -0.1)); }, current, active() { const bps = current(); return computed(() => bps.value.length === 0 ? "" : bps.value.at(strategy === "min-width" ? -1 : 0)); } }); } // @__NO_SIDE_EFFECTS__ function usePreferredDark(options) { return useMediaQuery("(prefers-color-scheme: dark)", options); } function useResizeObserver(target, callback, options = {}) { const { window: window2 = defaultWindow, ...observerOptions } = options; let observer; const isSupported = /* @__PURE__ */ useSupported(() => window2 && "ResizeObserver" in window2); const cleanup = () => { if (observer) { observer.disconnect(); observer = void 0; } }; const targets = computed(() => { const _targets = toValue(target); return Array.isArray(_targets) ? _targets.map((el) => unrefElement(el)) : [unrefElement(_targets)]; }); const stopWatch = watch( targets, (els) => { cleanup(); if (isSupported.value && window2) { observer = new ResizeObserver(callback); for (const _el of els) { if (_el) observer.observe(_el, observerOptions); } } }, { immediate: true, flush: "post" } ); const stop = () => { cleanup(); stopWatch(); }; tryOnScopeDispose(stop); return { isSupported, stop }; } function useElementSize(target, initialSize = { width: 0, height: 0 }, options = {}) { const { window: window2 = defaultWindow, box: box2 = "content-box" } = options; const isSVG = computed(() => { var _a, _b; return (_b = (_a = unrefElement(target)) == null ? void 0 : _a.namespaceURI) == null ? void 0 : _b.includes("svg"); }); const width = shallowRef(initialSize.width); const height = shallowRef(initialSize.height); const { stop: stop1 } = useResizeObserver( target, ([entry2]) => { const boxSize = box2 === "border-box" ? entry2.borderBoxSize : box2 === "content-box" ? entry2.contentBoxSize : entry2.devicePixelContentBoxSize; if (window2 && isSVG.value) { const $elem = unrefElement(target); if ($elem) { const rect = $elem.getBoundingClientRect(); width.value = rect.width; height.value = rect.height; } } else { if (boxSize) { const formatBoxSize = toArray(boxSize); width.value = formatBoxSize.reduce((acc, { inlineSize }) => acc + inlineSize, 0); height.value = formatBoxSize.reduce((acc, { blockSize }) => acc + blockSize, 0); } else { width.value = entry2.contentRect.width; height.value = entry2.contentRect.height; } } }, options ); tryOnMounted(() => { const ele = unrefElement(target); if (ele) { width.value = "offsetWidth" in ele ? ele.offsetWidth : initialSize.width; height.value = "offsetHeight" in ele ? ele.offsetHeight : initialSize.height; } }); const stop2 = watch( () => unrefElement(target), (ele) => { width.value = ele ? initialSize.width : 0; height.value = ele ? initialSize.height : 0; } ); function stop() { stop1(); stop2(); } return { width, height, stop }; } function useIntersectionObserver(target, callback, options = {}) { const { root, rootMargin = "0px", threshold = 0, window: window2 = defaultWindow, immediate = true } = options; const isSupported = /* @__PURE__ */ useSupported(() => window2 && "IntersectionObserver" in window2); const targets = computed(() => { const _target = toValue(target); return toArray(_target).map(unrefElement).filter(notNullish); }); let cleanup = noop$2; const isActive = shallowRef(immediate); const stopWatch = isSupported.value ? watch( () => [targets.value, unrefElement(root), isActive.value], ([targets2, root2]) => { cleanup(); if (!isActive.value) return; if (!targets2.length) return; const observer = new IntersectionObserver( callback, { root: unrefElement(root2), rootMargin, threshold } ); targets2.forEach((el) => el && observer.observe(el)); cleanup = () => { observer.disconnect(); cleanup = noop$2; }; }, { immediate, flush: "post" } ) : noop$2; const stop = () => { cleanup(); stopWatch(); isActive.value = false; }; tryOnScopeDispose(stop); return { isSupported, isActive, pause() { cleanup(); isActive.value = false; }, resume() { isActive.value = true; }, stop }; } function resolveElement(el) { if (typeof Window !== "undefined" && el instanceof Window) return el.document.documentElement; if (typeof Document !== "undefined" && el instanceof Document) return el.documentElement; return el; } const elInitialOverflow = /* @__PURE__ */ new WeakMap(); function useScrollLock(element, initialState = false) { const isLocked = shallowRef(initialState); let initialOverflow = ""; watch(toRef(element), (el) => { const target = resolveElement(toValue(el)); if (target) { const ele = target; if (!elInitialOverflow.get(ele)) elInitialOverflow.set(ele, ele.style.overflow); if (ele.style.overflow !== "hidden") initialOverflow = ele.style.overflow; if (ele.style.overflow === "hidden") return isLocked.value = true; if (isLocked.value) return ele.style.overflow = "hidden"; } }, { immediate: true }); const lock = () => { const el = resolveElement(toValue(element)); if (!el || isLocked.value) return; el.style.overflow = "hidden"; isLocked.value = true; }; const unlock = () => { const el = resolveElement(toValue(element)); if (!el || !isLocked.value) return; el.style.overflow = initialOverflow; elInitialOverflow.delete(el); isLocked.value = false; }; tryOnScopeDispose(unlock); return computed({ get() { return isLocked.value; }, set(v) { if (v) lock(); else unlock(); } }); } function useSwipe(target, options = {}) { const { threshold = 50, onSwipe, onSwipeEnd, onSwipeStart, passive = true } = options; const coordsStart = reactive({ x: 0, y: 0 }); const coordsEnd = reactive({ x: 0, y: 0 }); const diffX = computed(() => coordsStart.x - coordsEnd.x); const diffY = computed(() => coordsStart.y - coordsEnd.y); const { max, abs } = Math; const isThresholdExceeded = computed(() => max(abs(diffX.value), abs(diffY.value)) >= threshold); const isSwiping = shallowRef(false); const direction = computed(() => { if (!isThresholdExceeded.value) return "none"; if (abs(diffX.value) > abs(diffY.value)) { return diffX.value > 0 ? "left" : "right"; } else { return diffY.value > 0 ? "up" : "down"; } }); const getTouchEventCoords = (e) => [e.touches[0].clientX, e.touches[0].clientY]; const updateCoordsStart = (x, y) => { coordsStart.x = x; coordsStart.y = y; }; const updateCoordsEnd = (x, y) => { coordsEnd.x = x; coordsEnd.y = y; }; const listenerOptions = { passive, capture: !passive }; const onTouchEnd = (e) => { if (isSwiping.value) onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value); isSwiping.value = false; }; const stops = [ useEventListener(target, "touchstart", (e) => { if (e.touches.length !== 1) return; const [x, y] = getTouchEventCoords(e); updateCoordsStart(x, y); updateCoordsEnd(x, y); onSwipeStart == null ? void 0 : onSwipeStart(e); }, listenerOptions), useEventListener(target, "touchmove", (e) => { if (e.touches.length !== 1) return; const [x, y] = getTouchEventCoords(e); updateCoordsEnd(x, y); if (listenerOptions.capture && !listenerOptions.passive && Math.abs(diffX.value) > Math.abs(diffY.value)) e.preventDefault(); if (!isSwiping.value && isThresholdExceeded.value) isSwiping.value = true; if (isSwiping.value) onSwipe == null ? void 0 : onSwipe(e); }, listenerOptions), useEventListener(target, ["touchend", "touchcancel"], onTouchEnd, listenerOptions) ]; const stop = () => stops.forEach((s) => s()); return { isSwiping, direction, coordsStart, coordsEnd, lengthX: diffX, lengthY: diffY, stop, // TODO: Remove in the next major version isPassiveEventSupported: true }; } // @__NO_SIDE_EFFECTS__ function useWindowSize(options = {}) { const { window: window2 = defaultWindow, initialWidth = Number.POSITIVE_INFINITY, initialHeight = Number.POSITIVE_INFINITY, listenOrientation = true, includeScrollbar = true, type = "inner" } = options; const width = shallowRef(initialWidth); const height = shallowRef(initialHeight); const update = () => { if (window2) { if (type === "outer") { width.value = window2.outerWidth; height.value = window2.outerHeight; } else if (type === "visual" && window2.visualViewport) { const { width: visualViewportWidth, height: visualViewportHeight, scale } = window2.visualViewport; width.value = Math.round(visualViewportWidth * scale); height.value = Math.round(visualViewportHeight * scale); } else if (includeScrollbar) { width.value = window2.innerWidth; height.value = window2.innerHeight; } else { width.value = window2.document.documentElement.clientWidth; height.value = window2.document.documentElement.clientHeight; } } }; update(); tryOnMounted(update); const listenerOptions = { passive: true }; useEventListener("resize", update, listenerOptions); if (window2 && type === "visual" && window2.visualViewport) { useEventListener(window2.visualViewport, "resize", update, listenerOptions); } if (listenOrientation) { const matches = useMediaQuery("(orientation: portrait)"); watch(matches, () => update()); } return { width, height }; } const tokenName = "auth-token"; const isFunction = (val) => typeof val === "function"; const isArray = Array.isArray; const isString = (val) => typeof val === "string"; const isObject$1 = (val) => val !== null && typeof val === "object"; const onRE = /^on[^a-z]/; const isOn = (key2) => onRE.test(key2); const cacheStringFunction = (fn) => { const cache = /* @__PURE__ */ Object.create(null); return (str) => { const hit = cache[str]; return hit || (cache[str] = fn(str)); }; }; const camelizeRE = /-(\w)/g; const camelize = cacheStringFunction((str) => { return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); }); const hyphenateRE = /\B([A-Z])/g; const hyphenate = cacheStringFunction((str) => { return str.replace(hyphenateRE, "-$1").toLowerCase(); }); const capitalize = cacheStringFunction((str) => { return str.charAt(0).toUpperCase() + str.slice(1); }); const hasOwnProperty = Object.prototype.hasOwnProperty; const hasOwn = (val, key2) => hasOwnProperty.call(val, key2); function resolvePropValue(options, props, key2, value) { const opt = options[key2]; if (opt != null) { const hasDefault = hasOwn(opt, "default"); if (hasDefault && value === void 0) { const defaultValue = opt.default; value = opt.type !== Function && isFunction(defaultValue) ? defaultValue() : defaultValue; } if (opt.type === Boolean) { if (!hasOwn(props, key2) && !hasDefault) { value = false; } else if (value === "") { value = true; } } } return value; } function getDataAndAriaProps(props) { return Object.keys(props).reduce((memo, key2) => { if (key2.startsWith("data-") || key2.startsWith("aria-")) { memo[key2] = props[key2]; } return memo; }, {}); } function toPx(val) { if (typeof val === "number") return `${val}px`; return val; } function renderHelper(v) { let props = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; let defaultV = arguments.length > 2 ? arguments[2] : void 0; if (typeof v === "function") { return v(props); } return v !== null && v !== void 0 ? v : defaultV; } function wrapPromiseFn(openFn) { let closeFn; const closePromise = new Promise((resolve) => { closeFn = openFn(() => { resolve(true); }); }); const result = () => { closeFn === null || closeFn === void 0 ? void 0 : closeFn(); }; result.then = (filled, rejected) => closePromise.then(filled, rejected); result.promise = closePromise; return result; } function classNames() { const classes = []; for (let i = 0; i < arguments.length; i++) { const value = i < 0 || arguments.length <= i ? void 0 : arguments[i]; if (!value) continue; if (isString(value)) { classes.push(value); } else if (isArray(value)) { for (let i2 = 0; i2 < value.length; i2++) { const inner = classNames(value[i2]); if (inner) { classes.push(inner); } } } else if (isObject$1(value)) { for (const name in value) { if (value[name]) { classes.push(name); } } } } return classes.join(" "); } const isValid = (value) => { return value !== void 0 && value !== null && value !== ""; }; const initDefaultProps = (types, defaultProps) => { const propTypes = _extends({}, types); Object.keys(defaultProps).forEach((k) => { const prop = propTypes[k]; if (prop) { if (prop.type || prop.default) { prop.default = defaultProps[k]; } else if (prop.def) { prop.def(defaultProps[k]); } else { propTypes[k] = { type: prop, default: defaultProps[k] }; } } else { throw new Error(`not have ${k} prop`); } }); return propTypes; }; const splitAttrs = (attrs) => { const allAttrs = Object.keys(attrs); const eventAttrs = {}; const onEvents = {}; const extraAttrs = {}; for (let i = 0, l = allAttrs.length; i < l; i++) { const key2 = allAttrs[i]; if (isOn(key2)) { eventAttrs[key2[2].toLowerCase() + key2.slice(3)] = attrs[key2]; onEvents[key2] = attrs[key2]; } else { extraAttrs[key2] = attrs[key2]; } } return { onEvents, events: eventAttrs, extraAttrs }; }; const parseStyleText = function() { let cssText = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ""; let camel = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false; const res = {}; const listDelimiter = /;(?![^(]*\))/g; const propertyDelimiter = /:(.+)/; if (typeof cssText === "object") return cssText; cssText.split(listDelimiter).forEach(function(item) { if (item) { const tmp = item.split(propertyDelimiter); if (tmp.length > 1) { const k = camel ? camelize(tmp[0].trim()) : tmp[0].trim(); res[k] = tmp[1].trim(); } } }); return res; }; const hasProp = (instance, prop) => { return instance[prop] !== void 0; }; const skipFlattenKey = /* @__PURE__ */ Symbol("skipFlatten"); const flattenChildren = function() { let children = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : []; let filterEmpty2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true; const temp = Array.isArray(children) ? children : [children]; const res = []; temp.forEach((child) => { if (Array.isArray(child)) { res.push(...flattenChildren(child, filterEmpty2)); } else if (child && child.type === Fragment) { if (child.key === skipFlattenKey) { res.push(child); } else { res.push(...flattenChildren(child.children, filterEmpty2)); } } else if (child && isVNode(child)) { if (filterEmpty2 && !isEmptyElement(child)) { res.push(child); } else if (!filterEmpty2) { res.push(child); } } else if (isValid(child)) { res.push(child); } }); return res; }; const getSlot = function(self) { let name = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "default"; let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; if (isVNode(self)) { if (self.type === Fragment) { return name === "default" ? flattenChildren(self.children) : []; } else if (self.children && self.children[name]) { return flattenChildren(self.children[name](options)); } else { return []; } } else { const res = self.$slots[name] && self.$slots[name](options); return flattenChildren(res); } }; const findDOMNode = (instance) => { var _a; let node = ((_a = instance === null || instance === void 0 ? void 0 : instance.vnode) === null || _a === void 0 ? void 0 : _a.el) || instance && (instance.$el || instance); while (node && !node.tagName) { node = node.nextSibling; } return node; }; const getOptionProps = (instance) => { const res = {}; if (instance.$ && instance.$.vnode) { const props = instance.$.vnode.props || {}; Object.keys(instance.$props).forEach((k) => { const v = instance.$props[k]; const hyphenateKey = hyphenate(k); if (v !== void 0 || hyphenateKey in props) { res[k] = v; } }); } else if (isVNode(instance) && typeof instance.type === "object") { const originProps = instance.props || {}; const props = {}; Object.keys(originProps).forEach((key2) => { props[camelize(key2)] = originProps[key2]; }); const options = instance.type.props || {}; Object.keys(options).forEach((k) => { const v = resolvePropValue(options, props, k, props[k]); if (v !== void 0 || k in props) { res[k] = v; } }); } return res; }; const getComponent = function(instance) { let prop = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "default"; let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : instance; let execute = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : true; let com = void 0; if (instance.$) { const temp = instance[prop]; if (temp !== void 0) { return typeof temp === "function" && execute ? temp(options) : temp; } else { com = instance.$slots[prop]; com = execute && com ? com(options) : com; } } else if (isVNode(instance)) { const temp = instance.props && instance.props[prop]; if (temp !== void 0 && instance.props !== null) { return typeof temp === "function" && execute ? temp(options) : temp; } else if (instance.type === Fragment) { com = instance.children; } else if (instance.children && instance.children[prop]) { com = instance.children[prop]; com = execute && com ? com(options) : com; } } if (Array.isArray(com)) { com = flattenChildren(com); com = com.length === 1 ? com[0] : com; com = com.length === 0 ? void 0 : com; } return com; }; function getEvents() { let ele = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; let on = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true; let props = {}; if (ele.$) { props = _extends(_extends({}, props), ele.$attrs); } else { props = _extends(_extends({}, props), ele.props); } return splitAttrs(props)[on ? "onEvents" : "events"]; } function getStyle$1(ele, camel) { const props = (isVNode(ele) ? ele.props : ele.$attrs) || {}; let style = props.style || {}; if (typeof style === "string") { style = parseStyleText(style, camel); } return style; } function isFragment(c) { return c.length === 1 && c[0].type === Fragment; } function isEmptyElement(c) { return c && (c.type === Comment || c.type === Fragment && c.children.length === 0 || c.type === Text && c.children.trim() === ""); } function filterEmpty() { let children = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : []; const res = []; children.forEach((child) => { if (Array.isArray(child)) { res.push(...child); } else if ((child === null || child === void 0 ? void 0 : child.type) === Fragment) { res.push(...filterEmpty(child.children)); } else { res.push(child); } }); return res.filter((c) => !isEmptyElement(c)); } function isValidElement(element) { if (Array.isArray(element) && element.length === 1) { element = element[0]; } return element && element.__v_isVNode && typeof element.type !== "symbol"; } function getPropsSlot(slots, props) { let prop = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "default"; var _a, _b; return (_a = props[prop]) !== null && _a !== void 0 ? _a : (_b = slots[prop]) === null || _b === void 0 ? void 0 : _b.call(slots); } const tuple = function() { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return args; }; const withInstall = (comp) => { const c = comp; c.install = function(app) { app.component(c.displayName || c.name, comp); }; return comp; }; function eventType() { return { type: [Function, Array] }; } function objectType(defaultVal) { return { type: Object, default: defaultVal }; } function booleanType(defaultVal) { return { type: Boolean, default: defaultVal }; } function functionType(defaultVal) { return { type: Function, default: defaultVal }; } function anyType(defaultVal, required) { const type = { validator: () => true, default: defaultVal }; return required ? type : type; } function arrayType(defaultVal) { return { type: Array, default: defaultVal }; } function stringType(defaultVal) { return { type: String, default: defaultVal }; } function someType(types, defaultVal) { return types ? { type: types, default: defaultVal } : anyType(defaultVal); } const defaultIconPrefixCls = "anticon"; const GlobalFormContextKey = /* @__PURE__ */ Symbol("GlobalFormContextKey"); const useProvideGlobalForm = (state) => { provide(GlobalFormContextKey, state); }; const useInjectGlobalForm = () => { return inject(GlobalFormContextKey, { validateMessages: computed(() => void 0) }); }; const configProviderProps = () => ({ iconPrefixCls: String, getTargetContainer: { type: Function }, getPopupContainer: { type: Function }, prefixCls: String, getPrefixCls: { type: Function }, renderEmpty: { type: Function }, transformCellText: { type: Function }, csp: objectType(), input: objectType(), autoInsertSpaceInButton: { type: Boolean, default: void 0 }, locale: objectType(), pageHeader: objectType(), componentSize: { type: String }, componentDisabled: { type: Boolean, default: void 0 }, direction: { type: String, default: "ltr" }, space: objectType(), virtual: { type: Boolean, default: void 0 }, dropdownMatchSelectWidth: { type: [Number, Boolean], default: true }, form: objectType(), pagination: objectType(), theme: objectType(), select: objectType(), wave: objectType() }); const configProviderKey = /* @__PURE__ */ Symbol("configProvider"); const defaultConfigProvider = { getPrefixCls: (suffixCls, customizePrefixCls) => { if (customizePrefixCls) return customizePrefixCls; return suffixCls ? `ant-${suffixCls}` : "ant"; }, iconPrefixCls: computed(() => defaultIconPrefixCls), getPopupContainer: computed(() => () => (void 0).body), direction: computed(() => "ltr") }; const useConfigContextInject = () => { return inject(configProviderKey, defaultConfigProvider); }; const useConfigContextProvider = (props) => { return provide(configProviderKey, props); }; const DisabledContextKey = /* @__PURE__ */ Symbol("DisabledContextKey"); const useInjectDisabled = () => { return inject(DisabledContextKey, ref(void 0)); }; const useProviderDisabled = (disabled) => { const parentDisabled = useInjectDisabled(); provide(DisabledContextKey, computed(() => { var _a; return (_a = disabled.value) !== null && _a !== void 0 ? _a : parentDisabled.value; })); return disabled; }; const enUS = { // Options.jsx items_per_page: "/ page", jump_to: "Go to", jump_to_confirm: "confirm", page: "", // Pagination.jsx prev_page: "Previous Page", next_page: "Next Page", prev_5: "Previous 5 Pages", next_5: "Next 5 Pages", prev_3: "Previous 3 Pages", next_3: "Next 3 Pages" }; const locale$3 = { locale: "en_US", today: "Today", now: "Now", backToToday: "Back to today", ok: "Ok", clear: "Clear", month: "Month", year: "Year", timeSelect: "select time", dateSelect: "select date", weekSelect: "Choose a week", monthSelect: "Choose a month", yearSelect: "Choose a year", decadeSelect: "Choose a decade", yearFormat: "YYYY", dateFormat: "M/D/YYYY", dayFormat: "D", dateTimeFormat: "M/D/YYYY HH:mm:ss", monthBeforeYear: true, previousMonth: "Previous month (PageUp)", nextMonth: "Next month (PageDown)", previousYear: "Last year (Control + left)", nextYear: "Next year (Control + right)", previousDecade: "Last decade", nextDecade: "Next decade", previousCentury: "Last century", nextCentury: "Next century" }; const locale$2 = { placeholder: "Select time", rangePlaceholder: ["Start time", "End time"] }; const locale$1 = { lang: _extends({ placeholder: "Select date", yearPlaceholder: "Select year", quarterPlaceholder: "Select quarter", monthPlaceholder: "Select month", weekPlaceholder: "Select week", rangePlaceholder: ["Start date", "End date"], rangeYearPlaceholder: ["Start year", "End year"], rangeQuarterPlaceholder: ["Start quarter", "End quarter"], rangeMonthPlaceholder: ["Start month", "End month"], rangeWeekPlaceholder: ["Start week", "End week"] }, locale$3), timePickerLocale: _extends({}, locale$2) }; const typeTemplate = "${label} is not a valid ${type}"; const localeValues = { locale: "en", Pagination: enUS, DatePicker: locale$1, TimePicker: locale$2, Calendar: locale$1, global: { placeholder: "Please select" }, Table: { filterTitle: "Filter menu", filterConfirm: "OK", filterReset: "Reset", filterEmptyText: "No filters", filterCheckall: "Select all items", filterSearchPlaceholder: "Search in filters", emptyText: "No data", selectAll: "Select current page", selectInvert: "Invert current page", selectNone: "Clear all data", selectionAll: "Select all data", sortTitle: "Sort", expand: "Expand row", collapse: "Collapse row", triggerDesc: "Click to sort descending", triggerAsc: "Click to sort ascending", cancelSort: "Click to cancel sorting" }, Tour: { Next: "Next", Previous: "Previous", Finish: "Finish" }, Modal: { okText: "OK", cancelText: "Cancel", justOkText: "OK" }, Popconfirm: { okText: "OK", cancelText: "Cancel" }, Transfer: { titles: ["", ""], searchPlaceholder: "Search here", itemUnit: "item", itemsUnit: "items", remove: "Remove", selectCurrent: "Select current page", removeCurrent: "Remove current page", selectAll: "Select all data", removeAll: "Remove all data", selectInvert: "Invert current page" }, Upload: { uploading: "Uploading...", removeFile: "Remove file", uploadError: "Upload error", previewFile: "Preview file", downloadFile: "Download file" }, Empty: { description: "No data" }, Icon: { icon: "icon" }, Text: { edit: "Edit", copy: "Copy", copied: "Copied", expand: "Expand" }, PageHeader: { back: "Back" }, Form: { optional: "(optional)", defaultValidateMessages: { default: "Field validation error for ${label}", required: "Please enter ${label}", enum: "${label} must be one of [${enum}]", whitespace: "${label} cannot be a blank character", date: { format: "${label} date format is invalid", parse: "${label} cannot be converted to a date", invalid: "${label} is an invalid date" }, types: { string: typeTemplate, method: typeTemplate, array: typeTemplate, object: typeTemplate, number: typeTemplate, date: typeTemplate, boolean: typeTemplate, integer: typeTemplate, float: typeTemplate, regexp: typeTemplate, email: typeTemplate, url: typeTemplate, hex: typeTemplate }, string: { len: "${label} must be ${len} characters", min: "${label} must be at least ${min} characters", max: "${label} must be up to ${max} characters", range: "${label} must be between ${min}-${max} characters" }, number: { len: "${label} must be equal to ${len}", min: "${label} must be minimum ${min}", max: "${label} must be maximum ${max}", range: "${label} must be between ${min}-${max}" }, array: { len: "Must be ${len} ${label}", min: "At least ${min} ${label}", max: "At most ${max} ${label}", range: "The amount of ${label} must be between ${min}-${max}" }, pattern: { mismatch: "${label} does not match the pattern ${pattern}" } } }, Image: { preview: "Preview" }, QRCode: { expired: "QR code expired", refresh: "Refresh", scanned: "Scanned" } }; const LocaleReceiver = defineComponent({ compatConfig: { MODE: 3 }, name: "LocaleReceiver", props: { componentName: String, defaultLocale: { type: [Object, Function] }, children: { type: Function } }, setup(props, _ref) { let { slots } = _ref; const localeData = inject("localeData", {}); const locale2 = computed(() => { const { componentName = "global", defaultLocale } = props; const locale3 = defaultLocale || localeValues[componentName || "global"]; const { antLocale } = localeData; const localeFromContext = componentName && antLocale ? antLocale[componentName] : {}; return _extends(_extends({}, typeof locale3 === "function" ? locale3() : locale3), localeFromContext || {}); }); const localeCode = computed(() => { const { antLocale } = localeData; const localeCode2 = antLocale && antLocale.locale; if (antLocale && antLocale.exist && !localeCode2) { return localeValues.locale; } return localeCode2; }); return () => { const children = props.children || slots.default; const { antLocale } = localeData; return children === null || children === void 0 ? void 0 : children(locale2.value, localeCode.value, antLocale); }; } }); function useLocaleReceiver(componentName, defaultLocale, propsLocale) { const localeData = inject("localeData", {}); const componentLocale = computed(() => { const { antLocale } = localeData; const locale2 = unref(defaultLocale) || localeValues[componentName || "global"]; const localeFromContext = componentName && antLocale ? antLocale[componentName] : {}; return _extends(_extends(_extends({}, typeof locale2 === "function" ? locale2() : locale2), localeFromContext || {}), unref(propsLocale) || {}); }); return [componentLocale]; } const SPLIT = "%"; class Entity { constructor(instanceId) { this.cache = /* @__PURE__ */ new Map(); this.instanceId = instanceId; } get(keys) { return this.cache.get(Array.isArray(keys) ? keys.join(SPLIT) : keys) || null; } update(keys, valueFn) { const path = Array.isArray(keys) ? keys.join(SPLIT) : keys; const prevValue = this.cache.get(path); const nextValue = valueFn(prevValue); if (nextValue === null) { this.cache.delete(path); } else { this.cache.set(path, nextValue); } } } function createCache() { const cssinjsInstanceId = Math.random().toString(12).slice(2); return new Entity(cssinjsInstanceId); } const StyleContextKey = /* @__PURE__ */ Symbol("StyleContextKey"); const getCache = () => { var _a, _b, _c; const instance = getCurrentInstance(); let cache; if (instance && instance.appContext) { const globalCache = (_c = (_b = (_a = instance.appContext) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.globalProperties) === null || _c === void 0 ? void 0 : _c.__ANTDV_CSSINJS_CACHE__; if (globalCache) { cache = globalCache; } else { cache = createCache(); if (instance.appContext.config.globalProperties) { instance.appContext.config.globalProperties.__ANTDV_CSSINJS_CACHE__ = cache; } } } else { cache = createCache(); } return cache; }; const defaultStyleContext = { cache: createCache(), defaultCache: true, hashPriority: "low" }; const useStyleInject = () => { const cache = getCache(); return inject(StyleContextKey, shallowRef(_extends(_extends({}, defaultStyleContext), { cache }))); }; const useStyleProvider = (props) => { const parentContext = useStyleInject(); const context = shallowRef(_extends(_extends({}, defaultStyleContext), { cache: createCache() })); watch([() => unref(props), parentContext], () => { const mergedContext = _extends({}, parentContext.value); const propsValue = unref(props); Object.keys(propsValue).forEach((key2) => { const value = propsValue[key2]; if (propsValue[key2] !== void 0) { mergedContext[key2] = value; } }); const { cache } = propsValue; mergedContext.cache = mergedContext.cache || createCache(); mergedContext.defaultCache = !cache && parentContext.value.defaultCache; context.value = mergedContext; }, { immediate: true }); provide(StyleContextKey, context); return context; }; const styleProviderProps = () => ({ autoClear: booleanType(), /** @private Test only. Not work in production. */ mock: stringType(), /** * Only set when you need ssr to extract style on you own. * If not provided, it will auto create