@varlet/ui
Version:
A Vue3 component library based on Material Design 2 and 3, supporting mobile and desktop.
2,221 lines (2,220 loc) • 769 kB
JavaScript
import { onMounted as bo, nextTick as Ye, onActivated as Lo, computed as B, ref as w, watch as fe, isRef as Jg, onBeforeUnmount as sa, onDeactivated as yt, onUnmounted as Jt, getCurrentInstance as _o, inject as Ys, unref as yf, reactive as en, provide as Ws, isVNode as Qg, defineComponent as ee, h as Qt, Comment as _g, Fragment as Ae, createApp as xg, onBeforeMount as eb, createVNode as X, Teleport as lo, Transition as xe, withDirectives as Ne, vShow as eo, mergeProps as je, createElementBlock as P, openBlock as g, normalizeClass as p, createBlock as we, resolveDynamicComponent as wt, normalizeStyle as Z, resolveComponent as _, resolveDirective as We, createCommentVNode as G, createElementVNode as R, toDisplayString as le, withCtx as ue, renderSlot as H, renderList as qe, createTextVNode as De, onUpdated as _t, normalizeProps as Ko, guardReactiveProps as ua, createSlots as Xo, withModifiers as Rn, vModelText as nb, withKeys as Ru, TransitionGroup as ob } from "vue";
function Ks(e) {
return { all: e = e || /* @__PURE__ */ new Map(), on: function(n, o) {
var t = e.get(n);
t ? t.push(o) : e.set(n, [o]);
}, off: function(n, o) {
var t = e.get(n);
t && (o ? t.splice(t.indexOf(o) >>> 0, 1) : e.set(n, []));
}, emit: function(n, o) {
var t = e.get(n);
t && t.slice().map(function(r) {
r(o);
}), (t = e.get("*")) && t.slice().map(function(r) {
r(n, o);
});
} };
}
const tb = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
default: Ks
}, Symbol.toStringTag, { value: "Module" }));
var qs = Object.defineProperty, rb = Object.defineProperties, ab = Object.getOwnPropertyDescriptor, ib = Object.getOwnPropertyDescriptors, lb = Object.getOwnPropertyNames, Lu = Object.getOwnPropertySymbols, wf = Object.prototype.hasOwnProperty, sb = Object.prototype.propertyIsEnumerable, Fu = (e, n, o) => n in e ? qs(e, n, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[n] = o, kf = (e, n) => {
for (var o in n || (n = {}))
wf.call(n, o) && Fu(e, o, n[o]);
if (Lu)
for (var o of Lu(n))
sb.call(n, o) && Fu(e, o, n[o]);
return e;
}, $f = (e, n) => rb(e, ib(n)), Cf = (e, n) => {
for (var o in n)
qs(e, o, { get: n[o], enumerable: !0 });
}, ub = (e, n, o, t) => {
if (n && typeof n == "object" || typeof n == "function")
for (let r of lb(n))
!wf.call(e, r) && r !== o && qs(e, r, { get: () => n[r], enumerable: !(t = ab(n, r)) || t.enumerable });
return e;
}, Sf = (e, n, o) => (ub(e, n, "default"), o), Pf = {};
Cf(Pf, {
NOOP: () => Jb,
assert: () => Af,
at: () => xt,
baseRound: () => va,
call: () => $,
camelize: () => da,
cancelAnimationFrame: () => ut,
ceil: () => s0,
chunk: () => Pb,
clamp: () => $n,
clampArrayRange: () => Of,
classes: () => Js,
cloneDeep: () => Qb,
cloneDeepWith: () => qf,
copyText: () => Lf,
createNamespaceFn: () => _s,
createStorage: () => fa,
debounce: () => Zb,
delay: () => cb,
difference: () => Tb,
differenceWith: () => Wr,
doubleRaf: () => bn,
download: () => Kf,
ensurePrefix: () => Fb,
ensureSuffix: () => Ub,
find: () => Mf,
floor: () => cl,
genNumberKey: () => Sb,
genStringKey: () => jb,
getAllParentScroller: () => Uf,
getGlobalThis: () => er,
getParentScroller: () => xs,
getRect: () => nn,
getScrollLeft: () => or,
getScrollTop: () => ho,
getStyle: () => Zn,
groupBy: () => Db,
hasOwn: () => Go,
inBrowser: () => oo,
inMobile: () => Nt,
inViewport: () => eu,
intersection: () => Bb,
intersectionWith: () => Vf,
isArray: () => Fe,
isArrayBuffer: () => Mr,
isBlob: () => wb,
isBoolean: () => nr,
isDOMException: () => Rr,
isDataView: () => Nr,
isDate: () => Vr,
isEmpty: () => Kn,
isEmptyPlainObject: () => $b,
isEqual: () => pb,
isEqualWith: () => Tf,
isError: () => Hr,
isFile: () => yb,
isFunction: () => mn,
isMap: () => Lr,
isNonEmptyArray: () => vb,
isNullish: () => mb,
isNumber: () => En,
isNumeric: () => Gs,
isObject: () => mo,
isPlainObject: () => Ln,
isPrimitive: () => kb,
isPromise: () => hb,
isRegExp: () => Ur,
isSet: () => Fr,
isString: () => sn,
isSymbol: () => gb,
isTruthy: () => bb,
isTypedArray: () => jr,
isWeakMap: () => Bf,
isWeakSet: () => Df,
isWindow: () => ca,
kebabCase: () => Qs,
localStorage: () => Yf,
lowerFirst: () => Yb,
mapObject: () => Rb,
maxBy: () => n0,
mean: () => r0,
meanBy: () => a0,
merge: () => _b,
mergeWith: () => Xf,
minBy: () => o0,
mitt: () => Ks,
motion: () => nu,
normalizeToArray: () => fo,
objectToString: () => Ef,
omit: () => Nb,
omitBy: () => Vb,
once: () => Gb,
pascalCase: () => Ff,
pick: () => Ab,
pickBy: () => Mb,
prettyJSONObject: () => Hf,
preventDefault: () => Me,
promiseWithResolvers: () => Lb,
raf: () => po,
randomColor: () => Kb,
randomNumber: () => zf,
randomString: () => qb,
removeArrayBlank: () => Nf,
removeArrayEmpty: () => Eb,
removeItem: () => Io,
requestAnimationFrame: () => Ao,
round: () => l0,
sample: () => i0,
sessionStorage: () => jf,
shuffle: () => zb,
slash: () => Xb,
sum: () => Zf,
sumBy: () => Jf,
sumHash: () => t0,
supportTouch: () => If,
throttle: () => pa,
times: () => db,
toArrayBuffer: () => xb,
toDataURL: () => Gf,
toNumber: () => W,
toRawType: () => Xe,
toText: () => e0,
toTypeString: () => Xs,
toggleItem: () => Ob,
tryParseJSON: () => Wf,
uniq: () => ul,
uniqBy: () => Yr,
upperFirst: () => Wb,
xor: () => Ib,
xorWith: () => Rf
});
function xt(e, n) {
if (e.length)
return n < 0 && (n += e.length), e[n];
}
function $n(e, n, o) {
return Math.min(o, Math.max(n, e));
}
function Of(e, n) {
return $n(e, 0, n.length - 1);
}
function cb(e) {
return new Promise((n) => {
setTimeout(n, e);
});
}
function zf(e = 0, n = 100) {
return Math.floor(Math.random() * (n - e + 1)) + e;
}
function db(e, n) {
return Array.from({ length: e }, (o, t) => n(t));
}
function oo() {
return typeof window < "u";
}
function er() {
return typeof globalThis < "u" ? globalThis : oo() ? window : typeof global < "u" ? global : self;
}
var { hasOwnProperty: fb } = Object.prototype;
function Go(e, n) {
return fb.call(e, n);
}
function Nt() {
return oo() && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
}
function Fe(e) {
return Array.isArray(e);
}
var Ef = Object.prototype.toString;
function Xs(e) {
return Ef.call(e);
}
function Xe(e) {
return Xs(e).slice(8, -1);
}
function Mr(e) {
return Xe(e) === "ArrayBuffer";
}
function nr(e) {
return typeof e == "boolean";
}
function Nr(e) {
return Xe(e) === "DataView";
}
function Vr(e) {
return Xe(e) === "Date";
}
function Rr(e) {
return Xe(e) === "DOMException";
}
function Kn(e) {
return e == null || e === "" || Fe(e) && !e.length;
}
function Lr(e) {
return Xe(e) === "Map";
}
function Ln(e) {
return Xe(e) === "Object";
}
function Fr(e) {
return Xe(e) === "Set";
}
function mo(e) {
return typeof e == "object" && e !== null;
}
function Ur(e) {
return Xe(e) === "RegExp";
}
function Hr(e) {
return Xe(e) === "Error";
}
function jr(e) {
return [
"Int8Array",
"Uint8Array",
"Uint8ClampedArray",
"Int16Array",
"Uint16Array",
"Int32Array",
"Uint32Array",
"Float32Array",
"Float64Array",
"BigInt64Array",
"BigUint64Array"
].includes(Xe(e));
}
function Tf(e, n, o) {
const t = /* @__PURE__ */ new WeakMap(), r = /* @__PURE__ */ new WeakMap();
function a(i, l, s, u) {
if (o(i, l) === !0 || i === l || i !== i && l !== l)
return !0;
if (!mo(i) || !mo(l))
return i === l;
if (i.constructor !== l.constructor)
return !1;
if (Xe(i) === "String" && Xe(l) === "String" || Xe(i) === "Number" && Xe(l) === "Number" || Xe(i) === "Boolean" && Xe(l) === "Boolean" || Xe(i) === "BigInt" && Xe(l) === "BigInt" || Xe(i) === "Symbol" && Xe(l) === "Symbol")
return i.valueOf() === l.valueOf();
if (Vr(i) && Vr(l))
return i.getTime() === l.getTime();
if (Ur(i) && Ur(l))
return i.source === l.source && i.flags === l.flags;
if (Hr(i) && Hr(l))
return i.name === l.name && i.message === l.message && i.cause === l.cause;
if (Rr(i) && Rr(l))
return i.name === l.name && i.message === l.message;
if (jr(i) && jr(l) || Nr(i) && Nr(l)) {
if (i.byteLength !== l.byteLength)
return !1;
const d = new Uint8Array(i.buffer), f = new Uint8Array(l.buffer);
return d.every((v, h) => v === f[h]);
}
if (Mr(i) && Mr(l)) {
if (i.byteLength !== l.byteLength)
return !1;
const d = new Uint8Array(i), f = new Uint8Array(l);
return d.every((v, h) => v === f[h]);
}
if (s.get(i) === l && u.get(l) === i)
return !0;
if (s.set(i, l), u.set(l, i), Lr(i) && Lr(l) || Fr(i) && Fr(l)) {
if (i.size !== l.size)
return !1;
const d = [...i], f = [...l], v = d.every((h, m) => a(h, f[m], s, u));
return s.delete(i), u.delete(l), v;
}
if (Fe(i) && Fe(l)) {
if (i.length !== l.length)
return !1;
const d = i.every((f, v) => a(f, l[v], s, u));
return s.delete(i), u.delete(l), d;
}
if (Ln(i) && Ln(l)) {
const d = [...Object.keys(i), ...Object.getOwnPropertySymbols(i)], f = [...Object.keys(l), ...Object.getOwnPropertySymbols(l)];
if (d.length !== f.length)
return !1;
const v = d.every(
(h) => a(i[h], l[h], s, u)
);
return s.delete(i), u.delete(l), v;
}
return !1;
}
return a(e, n, t, r);
}
function pb(e, n) {
return Tf(e, n, () => {
});
}
function mn(e) {
return typeof e == "function";
}
function vb(e) {
return Fe(e) && !!e.length;
}
function mb(e) {
return e == null;
}
function En(e) {
return typeof e == "number";
}
function sn(e) {
return typeof e == "string";
}
function Gs(e) {
return En(e) || sn(e) && /^[-+]?\d+$/.test(e);
}
function hb(e) {
return mo(e) && mn(e.then) && mn(e.catch);
}
function gb(e) {
return typeof e == "symbol";
}
function bb(e) {
return !!e;
}
function Bf(e) {
return Xe(e) === "WeakMap";
}
function Df(e) {
return Xe(e) === "WeakSet";
}
function ca(e) {
return e === window;
}
function If() {
return oo() && "ontouchstart" in window;
}
function yb(e) {
return Xe(e) === "File";
}
function wb(e) {
return Xe(e) === "Blob";
}
function kb(e) {
return e == null || typeof e != "object" && typeof e != "function";
}
function $b(e) {
return Ln(e) && Object.keys(e).length === 0 && Object.getOwnPropertySymbols(e).length === 0;
}
function Af(e, n) {
if (!e)
throw new Error(n);
}
function W(e) {
return e == null ? 0 : sn(e) ? (e = parseFloat(e), e = Number.isNaN(e) ? 0 : e, e) : nr(e) ? Number(e) : e;
}
var Cb = 0;
function Sb() {
return Cb++;
}
function Pb(e, n = 1) {
n = $n(n, 1, e.length);
const o = [];
let t = 0;
for (; t < e.length; )
o.push(e.slice(t, t + n)), t += n;
return o;
}
function Io(e, n) {
if (e.length) {
const o = e.indexOf(n);
if (o > -1)
return e.splice(o, 1);
}
}
function Ob(e, n) {
return e.includes(n) ? Io(e, n) : e.push(n), e;
}
function ul(e) {
return [...new Set(e)];
}
function Yr(e, n) {
return e.reduce((o, t) => (o.findIndex((a) => n(t, a)) === -1 && o.push(t), o), []);
}
function Mf(e, n, o = "start") {
let t = o === "start" ? 0 : e.length - 1;
for (; e.length > 0 && t >= 0 && t <= e.length - 1; ) {
if (n(e[t], t, e))
return [e[t], t];
o === "start" ? t++ : t--;
}
return [null, -1];
}
function zb(e) {
for (let n = e.length - 1; n > 0; n--) {
const o = Math.floor(Math.random() * (n + 1));
[e[n], e[o]] = [e[o], e[n]];
}
return e;
}
function Nf(e) {
return e.filter((n) => n != null);
}
function Eb(e) {
return e.filter((n) => n != null && n !== "");
}
function fo(e) {
return Fe(e) ? e : [e];
}
function Wr(e, ...n) {
const o = xt(n, -1), t = n.slice(0, -1).reduce((r, a) => [...r, ...a], []);
return e.filter((r) => !t.some((a) => o(r, a)));
}
function Tb(e, ...n) {
return Wr(e, ...n, (o, t) => o === t);
}
function Vf(...e) {
const n = xt(e, -1), o = e.slice(0, -1);
if (o.length === 0)
return [];
if (o.length === 1)
return Yr(o[0], n);
function t(r, a) {
return r.filter((i) => a.some((l) => n(i, l)));
}
return Yr(
o.reduce((r, a) => t(r, a)),
n
);
}
function Bb(...e) {
return Vf(...e, (n, o) => n === o);
}
function Db(e, n) {
return e.reduce(
(o, t) => {
var r;
const a = n(t);
return ((r = o[a]) != null ? r : o[a] = []).push(t), o;
},
{}
);
}
function Rf(...e) {
const n = xt(e, -1), o = e.slice(0, -1);
return Yr(
o.reduce((t, r) => [...Wr(t, r, n), ...Wr(r, t, n)]),
n
);
}
function Ib(...e) {
return Rf(...e, (n, o) => n === o);
}
function Ab(e, n) {
return n.reduce(
(o, t) => (o[t] = e[t], o),
{}
);
}
function Mb(e, n) {
return [...Object.keys(e), ...Object.getOwnPropertySymbols(e)].reduce((t, r) => {
const a = e[r];
return n(a, r) && (t[r] = a), t;
}, {});
}
function Nb(e, n) {
return [...Object.keys(e), ...Object.getOwnPropertySymbols(e)].reduce(
(t, r) => (n.includes(r) || (t[r] = e[r]), t),
{}
);
}
function Vb(e, n) {
return [...Object.keys(e), ...Object.getOwnPropertySymbols(e)].reduce((t, r) => {
const a = e[r];
return n(a, r) || (t[r] = a), t;
}, {});
}
function Rb(e, n) {
return Object.entries(e).reduce(
(o, [t, r]) => {
const a = n(t, r);
if (Fe(a)) {
const [i, l] = a;
o[i] = l;
}
return o;
},
{}
);
}
function Lb() {
let e, n;
return { promise: new Promise((t, r) => {
e = t, n = r;
}), resolve: e, reject: n };
}
var Zs = {};
Cf(Zs, {
cancelAnimationFrame: () => ut,
classes: () => Js,
copyText: () => Lf,
createNamespaceFn: () => _s,
createStorage: () => fa,
doubleRaf: () => bn,
download: () => Kf,
getAllParentScroller: () => Uf,
getParentScroller: () => xs,
getRect: () => nn,
getScrollLeft: () => or,
getScrollTop: () => ho,
getStyle: () => Zn,
inViewport: () => eu,
localStorage: () => Yf,
mitt: () => Ks,
motion: () => nu,
prettyJSONObject: () => Hf,
preventDefault: () => Me,
raf: () => po,
requestAnimationFrame: () => Ao,
sessionStorage: () => jf,
tryParseJSON: () => Wf
});
function ut(e) {
const n = er();
n.cancelAnimationFrame ? n.cancelAnimationFrame(e) : n.clearTimeout(e);
}
function Js(...e) {
return e.map((n) => {
if (Fe(n)) {
const [o, t, r = null] = n;
return o ? t : r;
}
return n;
});
}
function Lf(e) {
if (!e)
return;
const n = document.createElement("textarea");
n.value = e, n.style.position = "fixed", n.style.opacity = "0", document.body.appendChild(n), n.select(), document.execCommand("copy"), document.body.removeChild(n);
}
function da(e) {
return e = e.replace(/-(\w)/g, (n, o) => o.toUpperCase()), e.replace(e.charAt(0), e.charAt(0).toLowerCase());
}
function Fb(e, n) {
return e.startsWith(n) ? e : n + e;
}
function Ub(e, n) {
return e.endsWith(n) ? e : e + n;
}
var Hb = 0;
function jb() {
return `generated-key-${Hb++}`;
}
function Qs(e) {
return e.replace(/([A-Z])/g, " $1").trim().split(" ").join("-").toLowerCase();
}
function Ff(e) {
return da(e).replace(e.charAt(0), e.charAt(0).toUpperCase());
}
function Yb(e) {
return e.charAt(0).toLowerCase() + e.slice(1);
}
function Wb(e) {
return e.charAt(0).toUpperCase() + e.slice(1);
}
function Kb() {
const e = "0123456789abcdef";
let n = "#";
for (let o = 0; o < 6; o++)
n += e[Math.floor(Math.random() * 16)];
return n;
}
function qb(e = 10) {
let n = o();
for (; n.length < e; )
n += o();
function o() {
return Math.random().toString(36).slice(2);
}
return n.slice(0, e);
}
function Xb(e) {
return e.startsWith("\\\\?\\") ? e : e.replace(/\\/g, "/");
}
function _s(e) {
return (n) => {
const o = `${e}-${n}`, t = (r) => r ? r[0] === "$" ? r.replace("$", e) : r.startsWith("--") ? `${o}${r}` : `${o}__${r}` : o;
return {
name: Ff(o),
n: t,
classes: Js
};
};
}
function Ao(e) {
const n = er();
return n.requestAnimationFrame ? n.requestAnimationFrame(e) : n.setTimeout(e);
}
function bn() {
return new Promise((e) => {
Ao(() => {
Ao(e);
});
});
}
function Zn(e) {
return window.getComputedStyle(e);
}
function xs(e) {
let n = e;
for (; n && !(!n.parentNode || (n = n.parentNode, n === document.body || n === document.documentElement)); ) {
const o = /(scroll|auto)/, { overflowY: t, overflow: r } = Zn(n);
if (o.test(t) || o.test(r))
return n;
}
return window;
}
function Uf(e) {
const n = [];
let o = e;
for (; !ca(o); )
o = xs(o), n.push(o);
return n;
}
function nn(e) {
if (ca(e)) {
const n = e.innerWidth, o = e.innerHeight, t = {
x: 0,
y: 0,
top: 0,
left: 0,
right: n,
bottom: o,
width: n,
height: o
};
return $f(kf({}, t), {
toJSON: () => t
});
}
return e.getBoundingClientRect();
}
function or(e) {
const n = "scrollLeft" in e ? e.scrollLeft : e.scrollX;
return Math.max(n, 0);
}
function ho(e) {
const n = "scrollTop" in e ? e.scrollTop : e.scrollY;
return Math.max(n, 0);
}
function eu(e) {
const { top: n, bottom: o, left: t, right: r } = nn(e), { width: a, height: i } = nn(window), l = t <= a && r >= 0, s = n <= i && o >= 0;
return l && s;
}
function Hf(e) {
return JSON.stringify(e, null, 2);
}
function Me(e) {
e.cancelable !== !1 && e.preventDefault();
}
function po() {
return new Promise((e) => {
Ao(e);
});
}
function fa(e) {
return $f(kf({}, e), {
set(n, o) {
o != null && (sn(o) || (o = JSON.stringify(o)), e.setItem(n, o));
},
get(n) {
const o = e.getItem(n);
try {
return JSON.parse(o);
} catch {
return o;
}
},
remove(n) {
e.removeItem(n);
}
});
}
var jf = fa(er().sessionStorage), Yf = fa(er().localStorage);
function Wf(e) {
try {
return JSON.parse(e);
} catch {
return;
}
}
function Kf(e, n = "file") {
const o = document.createElement("a");
o.style.display = "none", o.href = sn(e) ? e : URL.createObjectURL(e), o.download = n, document.body.appendChild(o), o.click(), URL.revokeObjectURL(o.href), document.body.removeChild(o);
}
function nu(e) {
const {
from: n,
to: o,
duration: t = 300,
frame: r = () => {
},
timingFunction: a = (b) => b,
onStateChange: i = () => {
}
} = e;
let l = "pending", s = n;
const u = o - n;
let c, d, f, v = 0;
function h() {
if (l === "running" || l === "finished")
return;
k("running");
const b = performance.now();
d = d ?? b, v += f != null ? b - f : 0, f = void 0, S();
function S() {
c = Ao(() => {
const O = performance.now() - d - v, D = $n(O / t, 0, 1);
if (s = u * a(D) + n, D >= 1) {
k("finished"), r({ value: o, done: !0 });
return;
}
r({ value: s, done: !1 }), S();
});
}
}
function m() {
l === "running" && (ut(c), k("paused"), f = performance.now());
}
function y() {
ut(c), k("pending"), s = n, c = void 0, d = void 0, f = void 0, v = 0;
}
function C() {
return l;
}
function k(b) {
l = b, i(b);
}
return {
start: h,
pause: m,
reset: y,
getState: C
};
}
Sf(Zs, tb);
Sf(Pf, Zs);
function $(e, ...n) {
if (Fe(e))
return e.map((o) => o(...n));
if (e)
return e(...n);
}
function Gb(e) {
let n = !1, o;
return function(...t) {
return n || (n = !0, o = e.apply(this, t)), o;
};
}
function Zb(e, n = 0) {
let o;
return function(...t) {
o && clearTimeout(o), o = setTimeout(() => {
e.apply(this, t);
}, n);
};
}
function pa(e, n = 200) {
let o, t = 0;
return function r(...a) {
const i = performance.now(), l = i - t;
t || (t = i), o && clearTimeout(o), l >= n ? (e.apply(this, a), t = i) : o = setTimeout(() => {
r.apply(this, a);
}, n - l);
};
}
function Jb() {
}
function qf(e, n) {
const o = /* @__PURE__ */ new WeakMap();
function t(i, l) {
const s = n(i);
if (s !== void 0)
return s;
if (!mo(i))
return i;
if (l.has(i))
return l.get(i);
if (Vr(i))
return new Date(i);
if (Ur(i))
return new RegExp(i);
if (Lr(i)) {
const u = /* @__PURE__ */ new Map();
return l.set(i, u), i.forEach((c, d) => {
u.set(t(d, l), t(c, l));
}), u;
}
if (Fr(i)) {
const u = /* @__PURE__ */ new Set();
return l.set(i, u), i.forEach((c) => {
u.add(t(c, l));
}), u;
}
if (Xe(i) === "String" || Xe(i) === "Number" || Xe(i) === "Boolean")
return a(i, i.valueOf());
if (Bf(i) || Df(i) || Hr(i) || Rr(i))
return {};
if (jr(i))
return a(i, r(i.buffer), i.byteOffset, i.length);
if (Nr(i))
return a(i, r(i.buffer), i.byteOffset, i.byteLength);
if (Mr(i))
return r(i);
if (Fe(i)) {
const u = [];
return l.set(i, u), i.forEach((c, d) => {
u[d] = t(c, l);
}), u;
}
if (Ln(i)) {
const u = Object.create(Reflect.getPrototypeOf(i));
return l.set(i, u), [...Object.keys(i), ...Object.getOwnPropertySymbols(i)].forEach((d) => {
u[d] = t(i[d], l);
}), u;
}
return i;
}
function r(i) {
const l = new ArrayBuffer(i.byteLength);
return new Uint8Array(l).set(new Uint8Array(i)), l;
}
function a(i, ...l) {
return new i.constructor(...l);
}
return t(e, o);
}
function Qb(e) {
return qf(e, () => {
});
}
function Xf(e, ...n) {
const o = xt(n, -1), t = [e, ...n.slice(0, -1)];
let r = t.length - 1, a = t[r];
for (; r; )
a = i(t[r - 1], a, o), r--;
function i(l, s, u) {
function c(d, f) {
for (const v in f)
if (Go(f, v)) {
const h = f[v], m = d[v], y = u(m, h, v, l, s);
y !== void 0 ? d[v] = y : mo(h) ? mo(m) ? d[v] = c(m, h) : d[v] = c(Fe(h) ? [] : {}, h) : d[v] = h;
}
return d;
}
return c(l, s);
}
return a;
}
function _b(e, ...n) {
return Xf(e, ...n, () => {
});
}
function xb(e) {
return new Promise((n) => {
const o = new FileReader();
o.onload = () => {
n(o.result);
}, o.readAsArrayBuffer(e);
});
}
function Gf(e) {
return new Promise((n) => {
const o = new FileReader();
o.onload = () => {
n(o.result);
}, o.readAsDataURL(e);
});
}
function e0(e) {
return new Promise((n) => {
const o = new FileReader();
o.onload = () => {
n(o.result);
}, o.readAsText(e);
});
}
function n0(e, n) {
if (e.length)
return e.reduce((o, t) => n(o) > n(t) ? o : t, e[0]);
}
function o0(e, n) {
if (e.length)
return e.reduce((o, t) => n(o) < n(t) ? o : t, e[0]);
}
function Zf(e) {
return e.reduce((n, o) => n + o, 0);
}
function Jf(e, n) {
return e.reduce((o, t) => o + n(t), 0);
}
function t0(e) {
function n(t, r) {
for (let a = 0; a < r.length; a++) {
const i = r.charCodeAt(a);
t = (t << 5) - t + i, t |= 0;
}
return t < 0 ? t * -2 : t;
}
function o(t, r, a, i) {
return t = n(t, a), t = n(t, Xs(r)), t = n(t, typeof r), r === null ? n(t, "null") : r === void 0 ? n(t, "undefined") : mo(r) || mn(r) ? i.includes(r) ? n(t, `[Circular]${a}`) : (i.push(r), t = Object.keys(r).sort().reduce((l, s) => o(l, r[s], s, i), t), mn(r.valueOf) ? n(t, String(r.valueOf())) : t) : n(t, r.toString());
}
return o(0, e, "", []).toString(16).padStart(8, "0");
}
function r0(e) {
return Zf(e) / e.length;
}
function a0(e, n) {
return Jf(e, n) / e.length;
}
function i0(e) {
if (e.length)
return e[zf(0, e.length - 1)];
}
function l0(e, n = 0) {
return va(e, n, Math.round);
}
function va(e, n = 0, o) {
return n = $n(n, -292, 292), n ? +`${o(`${e}e${n}`)}e${-n}` : o(e);
}
function cl(e, n = 0) {
return va(e, n, Math.floor);
}
function s0(e, n = 0) {
return va(e, n, Math.ceil);
}
function Fn(e, n, o) {
return Af(e, `Varlet [${n}]: ${o}`);
}
function u0(e, n) {
console.warn(`Varlet [${e}]: ${n}`);
}
function lt(e, n) {
console.error(`Varlet [${e}]: ${n}`);
}
var c0 = (e) => e ? /^(http)|(\.*\/)/.test(e) : !1, d0 = Object.defineProperty, Kr = Object.getOwnPropertySymbols, Qf = Object.prototype.hasOwnProperty, _f = Object.prototype.propertyIsEnumerable, Uu = (e, n, o) => n in e ? d0(e, n, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[n] = o, f0 = (e, n) => {
for (var o in n || (n = {}))
Qf.call(n, o) && Uu(e, o, n[o]);
if (Kr)
for (var o of Kr(n))
_f.call(n, o) && Uu(e, o, n[o]);
return e;
}, p0 = (e, n) => {
var o = {};
for (var t in e)
Qf.call(e, t) && n.indexOf(t) < 0 && (o[t] = e[t]);
if (e != null && Kr)
for (var t of Kr(e))
n.indexOf(t) < 0 && _f.call(e, t) && (o[t] = e[t]);
return o;
};
function yn(e) {
let n = !1;
bo(() => {
e(), Ye(() => {
n = !0;
});
}), Lo(() => {
n && e();
});
}
function He(e, n, o, t = {}) {
if (!oo())
return;
const { passive: r = !1, capture: a = !1 } = t;
let i = !1, l = !1;
const s = (v) => mn(v) ? v() : yf(v), u = (v) => {
if (i || l)
return;
const h = s(v);
h && (h.addEventListener(n, o, {
passive: r,
capture: a
}), i = !0);
}, c = (v) => {
if (!i || l)
return;
const h = s(v);
h && (h.removeEventListener(n, o, {
capture: a
}), i = !1);
};
let d;
Jg(e) && (d = fe(
() => e.value,
(v, h) => {
c(h), u(v);
}
));
const f = () => {
d == null || d(), c(e), l = !0;
};
return yn(() => {
u(e);
}), sa(() => {
c(e);
}), yt(() => {
c(e);
}), f;
}
function xf(e, n, o) {
if (!oo())
return;
He(document, n, (r) => {
const a = mn(e) ? e() : yf(e);
a && !a.contains(r.target) && o(r);
});
}
function tr(e) {
let n = !1;
yt(() => {
n = !0, e();
}), Jt(() => {
n || e();
});
}
function ou(e) {
const n = _o();
return e in n.provides;
}
function wn(e) {
if (!ou(e))
return {
index: null,
parentProvider: null,
bindParent: null
};
const o = Ys(e), { childInstances: t, collect: r, clear: a } = o, i = p0(o, ["childInstances", "collect", "clear"]), l = _o();
return {
index: B(() => t.indexOf(l)),
parentProvider: i,
bindParent: (c) => {
bo(() => {
Ye().then(() => {
r(l, c);
});
}), sa(() => {
Ye().then(() => {
a(l, c);
});
});
}
};
}
function v0(e) {
const n = [], o = (t) => {
if (t != null && t.component) {
o(t == null ? void 0 : t.component.subTree);
return;
}
Fe(t == null ? void 0 : t.children) && t.children.forEach((r) => {
Qg(r) && (n.push(r), o(r));
});
};
return o(e), n;
}
function kn(e) {
const n = _o(), o = en([]), t = [], r = B(() => o.length), a = () => {
const u = v0(n.subTree);
o.sort((c, d) => u.indexOf(c.vnode) - u.indexOf(d.vnode));
}, i = (u, c) => {
o.push(u), t.push(c), a();
}, l = (u, c) => {
Io(o, u), Io(t, c);
};
return {
length: r,
childProviders: t,
bindChildren: (u) => {
Ws(e, f0({
childInstances: o,
collect: i,
clear: l
}, u));
}
};
}
function to(e) {
He(() => window, "resize", e, { passive: !0 }), He(() => window, "orientationchange", e, { passive: !0 });
}
function m0(e, n) {
const o = w(!1);
return fe(
e,
(t) => {
n === t && (o.value = !0);
},
{ immediate: !0 }
), o;
}
function h0(e, n) {
if (e > n)
return "horizontal";
if (n > e)
return "vertical";
}
function kt() {
const e = w(0), n = w(0), o = w(0), t = w(0), r = w(0), a = w(0), i = w(0), l = w(0), s = w(0), u = w(0), c = w(), d = w(!1), f = w(!1), v = w(0), h = w(0);
let m = null;
const y = () => {
e.value = 0, n.value = 0, o.value = 0, t.value = 0, r.value = 0, a.value = 0, i.value = 0, l.value = 0, s.value = 0, u.value = 0, c.value = void 0, d.value = !1, f.value = !1, v.value = 0, h.value = 0;
};
return {
startX: e,
startY: n,
deltaX: o,
deltaY: t,
offsetX: r,
offsetY: a,
prevX: i,
prevY: l,
moveX: s,
moveY: u,
direction: c,
touching: d,
dragging: f,
startTime: v,
distance: h,
resetTouch: y,
startTouch: (O) => {
y();
const { clientX: D, clientY: M } = O.touches[0];
e.value = D, n.value = M, i.value = D, l.value = M, d.value = !0, v.value = performance.now(), f.value = !1, m && window.cancelAnimationFrame(m);
},
moveTouch: (O) => {
const { clientX: D, clientY: M } = O.touches[0];
f.value = !0, o.value = D - e.value, t.value = M - n.value, r.value = Math.abs(o.value), a.value = Math.abs(t.value), h.value = Math.sqrt(r.value ** 2 + a.value ** 2), s.value = D - i.value, u.value = M - l.value, c.value || (c.value = h0(r.value, a.value)), i.value = D, l.value = M;
},
endTouch: () => {
d.value = !1, m = window.requestAnimationFrame(() => {
f.value = !1;
});
},
isReachTop: (O) => ho(O) === 0 && t.value > 0,
isReachBottom: (O, D = 1) => {
const { scrollHeight: M, clientHeight: V, scrollTop: L } = O, Y = Math.abs(M - L - V);
return t.value < 0 && Y <= D;
}
};
}
function ep() {
const e = _o(), n = Qs(e.type.name), o = w(void 0);
return bo(() => {
o.value = `${n}-${e.uid}`;
}), o;
}
function g0(e = {}) {
const { initialWidth: n = 0, initialHeight: o = 0 } = e, t = w(n), r = w(o), a = () => {
oo() && (t.value = window.innerWidth, r.value = window.innerHeight);
};
return yn(a), to(a), {
width: t,
height: r
};
}
function Gn(e, n, o = {}) {
const { passive: t = !0, eventName: r, defaultValue: a, emit: i } = o, l = r ?? `onUpdate:${n.toString()}`, s = () => {
var d;
return (d = e[n]) != null ? d : a;
};
if (!t)
return B({
get() {
return s();
},
set(d) {
i ? i(l, d) : $(e[l], d);
}
});
const u = w(s());
let c = !0;
return fe(
() => e[n],
() => {
c = !1, u.value = s(), Ye(() => {
c = !0;
});
}
), fe(
() => u.value,
(d) => {
c && (i ? i(l, d) : $(e[l], d));
}
), u;
}
function b0(e) {
const n = w(r(e.from)), o = w("pending");
let t = s();
function r(u) {
return mn(u) ? u() : u;
}
function a() {
t.reset(), n.value = r(e.from), o.value = "pending", t = s();
}
function i() {
t.start();
}
function l() {
t.pause();
}
function s() {
return nu({
from: r(e.from),
to: r(e.to),
duration: e.duration ? r(e.duration) : 300,
timingFunction: e.timingFunction,
onStateChange(u) {
o.value = u;
},
frame({ value: u, done: c }) {
var d;
n.value = u, c && ((d = e.onFinished) == null || d.call(e, n.value));
}
});
}
return {
value: n,
state: o,
start: i,
pause: l,
reset: a
};
}
var y0 = Object.defineProperty, w0 = Object.defineProperties, k0 = Object.getOwnPropertyDescriptors, Hu = Object.getOwnPropertySymbols, $0 = Object.prototype.hasOwnProperty, C0 = Object.prototype.propertyIsEnumerable, ju = (e, n, o) => n in e ? y0(e, n, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[n] = o, dl = (e, n) => {
for (var o in n || (n = {}))
$0.call(n, o) && ju(e, o, n[o]);
if (Hu)
for (var o of Hu(n))
C0.call(n, o) && ju(e, o, n[o]);
return e;
}, S0 = (e, n) => w0(e, k0(n)), Yu = (e, n, o) => new Promise((t, r) => {
var a = (s) => {
try {
l(o.next(s));
} catch (u) {
r(u);
}
}, i = (s) => {
try {
l(o.throw(s));
} catch (u) {
r(u);
}
}, l = (s) => s.done ? t(s.value) : Promise.resolve(s.value).then(a, i);
l((o = o.apply(e, n)).next());
});
function Ie(e, n) {
return Fe(n) ? n.reduce((o, t) => (o[t] = e[t], o), {}) : e[n];
}
function re(e, n) {
const o = n ?? e;
return o.install = function(t) {
const { name: r } = e;
r && t.component(r, e);
}, o;
}
function ie(e, n) {
e.setPropsDefaults = function(o) {
Object.entries(o).forEach(([t, r]) => {
const a = n[t];
if (a != null) {
if (Ln(a)) {
n[t] = S0(dl({}, a), {
default: r
});
return;
}
n[t] = {
type: a,
default: r
};
}
});
};
}
function P0(e) {
const n = xg(e), o = document.createElement("div");
return document.body.appendChild(o), {
instance: n.mount(o),
unmount() {
n.unmount(), o.parentNode && document.body.removeChild(o);
}
};
}
function $t(e, n = {}, o = {}) {
const t = {
setup() {
return () => Qt(e, dl(dl({}, n), o));
}
}, { unmount: r } = P0(t);
return { unmountInstance: r };
}
function np(e) {
const n = [];
return e.forEach((o) => {
if (o.type !== _g) {
if (o.type === Ae && Fe(o.children)) {
o.children.forEach((t) => {
n.push(t);
});
return;
}
n.push(o);
}
}), n;
}
function Wu(e) {
return Ln(e) && mn(e.safeParseAsync);
}
function O0(e) {
return Ln(e) && Go(e, "success");
}
function Hn() {
const e = w(""), n = (r, a, i) => Yu(this, null, function* () {
const l = fo(r).filter((u) => Wu(u) || mn(u)), s = yield Promise.all(
l.map((u) => Wu(u) ? u.safeParseAsync(a) : u(a, i))
);
return o(), !s.some((u) => {
if (O0(u)) {
if (u.success === !1)
return e.value = u.error.issues[0].message, !0;
} else if (u !== !0)
return e.value = String(u), !0;
return !1;
});
}), o = () => {
e.value = "";
};
return {
errorMessage: e,
validate: n,
resetValidation: o,
validateWithTrigger: (r, a, i, l, s) => Yu(this, null, function* () {
r.includes(a) && (yield n(i, l, s)) && (e.value = "");
})
};
}
function z0(e) {
He(() => window, "hashchange", e), He(() => window, "popstate", e);
}
function xo() {
const e = w(!1);
return Lo(() => {
e.value = !1;
}), yt(() => {
e.value = !0;
}), {
disabled: e
};
}
const ne = _s("var");
function F(e) {
return {
type: [Function, Array],
default: e
};
}
function dn(e, n) {
return e === !1 ? null : (e === !0 && n && (e = n), `var-elevation--${e}`);
}
const rr = ee({
props: {
is: {
type: [String, Object]
},
tag: {
type: String,
default: "span"
}
},
setup(e) {
return () => sn(e.is) ? Qt(e.tag, e.is) : e.is;
}
});
var op = {
// Dialog
dialogTitle: "Hint",
dialogConfirmButtonText: "Confirm",
dialogCancelButtonText: "Cancel",
// ActionSheet
actionSheetTitle: "Select One",
// List
listLoadingText: "Loading",
listFinishedText: "No more",
listErrorText: "Load fail",
// Picker
pickerTitle: "Pick it",
pickerConfirmButtonText: "Confirm",
pickerCancelButtonText: "Cancel",
// date-picker
datePickerMonthDict: {
"01": {
name: "January",
abbr: "JAN"
},
"02": {
name: "February",
abbr: "FEB"
},
"03": {
name: "March",
abbr: "MAR"
},
"04": {
name: "April",
abbr: "APR"
},
"05": {
name: "May",
abbr: "MAY"
},
"06": {
name: "June",
abbr: "JUN"
},
"07": {
name: "July",
abbr: "JUL"
},
"08": {
name: "August",
abbr: "AUG"
},
"09": {
name: "September",
abbr: "SEP"
},
10: {
name: "October",
abbr: "OCT"
},
11: {
name: "November",
abbr: "NOV"
},
12: {
name: "December",
abbr: "DEC"
}
},
datePickerWeekDict: {
0: {
name: "Sunday",
abbr: "S"
},
1: {
name: "Monday",
abbr: "M"
},
2: {
name: "Tuesday",
abbr: "T"
},
3: {
name: "Wednesday",
abbr: "W"
},
4: {
name: "Thursday",
abbr: "T"
},
5: {
name: "Friday",
abbr: "F"
},
6: {
name: "Saturday",
abbr: "S"
}
},
datePickerSelected: " selected",
datePickerHint: "SELECT DATE",
// pagination
paginationItem: "",
paginationPage: "page",
paginationJump: "Go to",
// time-picker
timePickerHint: "SELECT TIME"
}, tp = {
// Dialog
dialogTitle: "اشاره",
dialogConfirmButtonText: "تایید",
dialogCancelButtonText: "لغو",
// ActionSheet
actionSheetTitle: "انتخاب یک مورد",
// List
listLoadingText: "در حال بارگزاری",
listFinishedText: "مورد دیگری وجود ندارد",
listErrorText: "بارگزاری ناموفق",
// Picker
pickerTitle: "انتخاب کنید",
pickerConfirmButtonText: "تایید",
pickerCancelButtonText: "لغو",
// date-picker
datePickerMonthDict: {
"01": {
name: "ژانویه",
abbr: "JAN"
},
"02": {
name: "فوریه",
abbr: "FEB"
},
"03": {
name: "مارس",
abbr: "MAR"
},
"04": {
name: "آوریل",
abbr: "APR"
},
"05": {
name: "مه",
abbr: "MAY"
},
"06": {
name: "ژوئن",
abbr: "JUN"
},
"07": {
name: "جولای",
abbr: "JUL"
},
"08": {
name: "آگوست",
abbr: "AUG"
},
"09": {
name: "سپتامبر",
abbr: "SEP"
},
10: {
name: "اوکتبر",
abbr: "OCT"
},
11: {
name: "نوامبر",
abbr: "NOV"
},
12: {
name: "دسامبر",
abbr: "DEC"
}
},
datePickerWeekDict: {
0: {
name: "یکشنبه",
abbr: "S"
},
1: {
name: "دوشنبه",
abbr: "M"
},
2: {
name: "سهشنبه",
abbr: "T"
},
3: {
name: "چهارشنبه",
abbr: "W"
},
4: {
name: "پنجشنبه",
abbr: "T"
},
5: {
name: "جمعه",
abbr: "F"
},
6: {
name: "شنبه",
abbr: "S"
}
},
datePickerSelected: " انتخاب شده",
datePickerHint: "انتخاب تاریخ",
// pagination
paginationItem: "",
paginationPage: "صفحه",
paginationJump: "برو به",
// time-picker
timePickerHint: "انتخاب زمان"
}, rp = {
// Dialog
dialogTitle: "確認",
dialogConfirmButtonText: "確認",
dialogCancelButtonText: "キャンセル",
// ActionSheet
actionSheetTitle: "いずれかを選択",
// List
listLoadingText: "読み込み中",
listFinishedText: "以上です",
listErrorText: "読み込み失敗",
// Picker
pickerTitle: "選択してください",
pickerConfirmButtonText: "確認",
pickerCancelButtonText: "キャンセル",
// date-picker
datePickerMonthDict: {
"01": {
name: "1月",
abbr: "1月"
},
"02": {
name: "2月",
abbr: "2月"
},
"03": {
name: "3月",
abbr: "3月"
},
"04": {
name: "4月",
abbr: "4月"
},
"05": {
name: "5月",
abbr: "5月"
},
"06": {
name: "6月",
abbr: "6月"
},
"07": {
name: "7月",
abbr: "7月"
},
"08": {
name: "8月",
abbr: "8月"
},
"09": {
name: "9月",
abbr: "9月"
},
10: {
name: "10月",
abbr: "10月"
},
11: {
name: "11月",
abbr: "11月"
},
12: {
name: "12月",
abbr: "12月"
}
},
datePickerWeekDict: {
0: {
name: "日曜日",
abbr: "日"
},
1: {
name: "月曜日",
abbr: "月"
},
2: {
name: "火曜日",
abbr: "火"
},
3: {
name: "水曜日",
abbr: "水"
},
4: {
name: "木曜日",
abbr: "木"
},
5: {
name: "金曜日",
abbr: "金"
},
6: {
name: "土曜日",
abbr: "土"
}
},
datePickerSelected: "件選択済み",
datePickerHint: "日付を選択",
// pagination
paginationItem: "件",
paginationPage: "ページ",
paginationJump: "ジャンプ",
// time-picker
timePickerHint: "時間を選択"
}, tu = {
// Dialog
dialogTitle: "提示",
dialogConfirmButtonText: "确认",
dialogCancelButtonText: "取消",
// ActionSheet
actionSheetTitle: "请选择",
// List
listLoadingText: "加载中",
listFinishedText: "没有更多了",
listErrorText: "加载失败",
// Picker
pickerTitle: "请选择",
pickerConfirmButtonText: "确认",
pickerCancelButtonText: "取消",
// date-picker
datePickerMonthDict: {
"01": {
name: "一月",
abbr: "一月"
},
"02": {
name: "二月",
abbr: "二月"
},
"03": {
name: "三月",
abbr: "三月"
},
"04": {
name: "四月",
abbr: "四月"
},
"05": {
name: "五月",
abbr: "五月"
},
"06": {
name: "六月",
abbr: "六月"
},
"07": {
name: "七月",
abbr: "七月"
},
"08": {
name: "八月",
abbr: "八月"
},
"09": {
name: "九月",
abbr: "九月"
},
10: {
name: "十月",
abbr: "十月"
},
11: {
name: "十一月",
abbr: "十一月"
},
12: {
name: "十二月",
abbr: "十二月"
}
},
datePickerWeekDict: {
0: {
name: "星期日",
abbr: "日"
},
1: {
name: "星期一",
abbr: "一"
},
2: {
name: "星期二",
abbr: "二"
},
3: {
name: "星期三",
abbr: "三"
},
4: {
name: "星期四",
abbr: "四"
},
5: {
name: "星期五",
abbr: "五"
},
6: {
name: "星期六",
abbr: "六"
}
},
datePickerSelected: "个被选择",
datePickerHint: "选择日期",
// pagination
paginationItem: "条",
paginationPage: "页",
paginationJump: "前往",
// time-picker
timePickerHint: "选择时间"
}, ru = {
// Dialog
dialogTitle: "提示",
dialogConfirmButtonText: "確認",
dialogCancelButtonText: "取消",
// ActionSheet
actionSheetTitle: "請選擇",
// List
listLoadingText: "載入中",
listFinishedText: "沒有更多了",
listErrorText: "載入失敗",
// Picker
pickerTitle: "請選擇",
pickerConfirmButtonText: "確認",
pickerCancelButtonText: "取消",
// date-picker
datePickerMonthDict: {
"01": {
name: "一月",
abbr: "一月"
},
"02": {
name: "二月",
abbr: "二月"
},
"03": {
name: "三月",
abbr: "三月"
},
"04": {
name: "四月",
abbr: "四月"
},
"05": {
name: "五月",
abbr: "五月"
},
"06": {
name: "六月",
abbr: "六月"
},
"07": {
name: "七月",
abbr: "七月"
},
"08": {
name: "八月",
abbr: "八月"
},
"09": {
name: "九月",
abbr: "九月"
},
10: {
name: "十月",
abbr: "十月"
},
11: {
name: "十一月",
abbr: "十一月"
},
12: {
name: "十二月",
abbr: "十二月"
}
},
datePickerWeekDict: {
0: {
name: "星期日",
abbr: "日"
},
1: {
name: "星期一",
abbr: "一"
},
2: {
name: "星期二",
abbr: "二"
},
3: {
name: "星期三",
abbr: "三"
},
4: {
name: "星期四",
abbr: "四"
},
5: {
name: "星期五",
abbr: "五"
},
6: {
name: "星期六",
abbr: "六"
}
},
datePickerSelected: "個被選擇",
datePickerHint: "選擇日期",
// pagination
paginationItem: "條",
paginationPage: "頁",
paginationJump: "前往",
// time-picker
timePickerHint: "選擇時間"
}, ap = ru, E0 = Object.defineProperty, Ku = Object.getOwnPropertySymbols, T0 = Object.prototype.hasOwnProperty, B0 = Object.prototype.propertyIsEnumerable, qu = (e, n, o) => n in e ? E0(e, n, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[n] = o, Xu = (e, n) => {
for (var o in n || (n = {}))
T0.call(n, o) && qu(e, o, n[o]);
if (Ku)
for (var o of Ku(n))
B0.call(n, o) && qu(e, o, n[o]);
return e;
};
function au() {
const e = w({}), n = w({}), o = (i, l) => {
l.lang = i, e.value[i] = l;
}, t = (i) => {
if (!e.value[i])
return console.warn(`The ${i} does not exist. You can mount a language message using the add method`), {};
n.value = e.value[i];
};
return {
messages: e,
currentMessage: n,
add: o,
use: t,
merge: (i, l) => {
if (!e.value[i]) {
console.warn(`The ${i} does not exist. You can mount a language message using the add method`);
return;
}
e.value[i] = Xu(Xu({}, e.value[i]), l), t(i);
},
t: (i) => {
if (Go(n.value, i))
return n.value[i];
}
};
}
const { messages: ip, currentMessage: lp, add: iu, use: lu, merge: sp, t: an } = au();
iu("zh-CN", tu);
lu("zh-CN");
const $B = {
zhCN: tu,
enUS: op,
zhTW: ru,
zhHK: ap,
faIR: tp,
jaJP: rp,
messages: ip,
currentMessage: lp,
add: iu,
use: lu,
merge: sp,
t: an,
useLocale: au
};
var fl = {
zhCN: tu,
enUS: op,
zhTW: ru,
zhHK: ap,
faIR: tp,
jaJP: rp,
messages: ip,
currentMessage: lp,
add: iu,
use: lu,
merge: sp,
t: an,
useLocale: au
};
const pl = Symbol("LOCALE_PROVIDER_KEY");
function D0(e) {
Ws(pl, e);
}
function so() {
return ou(pl) ? Ys(pl) : { t: null };
}
const up = {
locks: {},
zIndex: 2e3,
enableRipple: !0
}, CB = en(up);
var Vn = en(up);
const { n: Gu } = ne("");
function cp() {
Object.keys(Vn.locks).length <= 0 ? document.body.classList.remove(Gu("$--lock")) : document.body.classList.add(Gu("$--lock"));
}
function vr(e) {
Vn.locks[e] = 1, cp();
}
function mr(e) {
delete Vn.locks[e], cp();
}
function ar(e, n) {
const { uid: o } = _o();
n && fe(n, (t) => {
t === !1 ? mr(o) : t === !0 && e() === !0 && vr(o);
}), fe(e, (t) => {
n && n() === !1 || (t === !0 ? vr(o) : mr(o));
}), eb(() => {
n && n() === !1 || e() === !0 && vr(o);
}), Jt(() => {
n && n() === !1 || e() === !0 && mr(o);
}), Lo(() => {
n && n() === !1 || e() === !0 && vr(o);
}), yt(() => {
n && n() === !1 || e() === !0 && mr(o);
});
}
const yo = [];
function su(e, n) {
const { uid: o } = _o();
fe(e, (i) => {
i && !a(o) ? r() : setTimeout(() => {
Io(yo, a(o));
});
}), yn(() => {
e() && r();
}), tr(() => {
Io(yo, a(o));
});
function t() {
return yo.length === 0 ? !0 : (yo.sort((i, l) => i.zIndex.value - l.zIndex.value), yo[yo.length - 1].uid === o);
}
function r() {
a(o) || yo.push({ uid: o, zIndex: n });
}
function a(i) {
return yo.find((l) => l.uid === i);
}
return {
onStackTop: t
};
}
function ir(e, n) {
const o = w(Vn.zIndex);
return fe(
e,
(t) => {
t && (Vn.zIndex += n, o.value = Vn.zIndex);
},
{ immediate: !0 }
), { zIndex: o };
}
const Ct = {
show: Boolean,
position: {
type: String,
default: "center"
},
transition: String,
overlay: {
type: Boolean,
default: !0
},
overlayClass: String,
overlayStyle: Object,
lockScroll: {
type: Boolean,
default: !0
},
closeOnClickOverlay: {
type: Boolean,
default: !0
},
closeOnKeyEscape: {
type: Boolean,
default: !0
},
defaultStyle: {
type: Boolean,
default: !0
},
zIndex: Number,
safeArea: Boolean,
safeAreaTop: Boolean,
teleport: {
type: [String, Object, Boolean],
default: "body"
},
onOpen: F(),
onOpened: F(),
onClose: F(),
onClosed: F(),
onKeyEscape: F(),
onClickOverlay: F(),
"onUpdate:show": F(),
// internal for Dialog
onRouteChange: F()
}, dp = Symbol("POPUP_BIND_POPUP_ITEM_KEY");
function fp() {
const { bindParent: e, parentProvider: n, index: o } = wn(dp);
return {
index: o,
popup: n,
bindPopup: e
};
}
function I0() {
const { bindChildren: e, childProviders: n, length: o } = kn(dp);
return {
length: o,
popupItems: n,
bindPopupItems: e
};
}
var A0 = Object.defineProperty, Zu = Object.getOwnPropertySymbols, M0 = Object.prototype.hasOwnProperty, N0 = Object.prototype.propertyIsEnumerable, Ju = (e, n, o) => n in e ? A0(e, n, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[n] = o, V0 = (e, n) => {
for (var o in n || (n = {}))
M0.call(n, o) && Ju(e, o, n[o]);
if (Zu)
for (var o of Zu(n))
N0.call(n, o) && Ju(e, o, n[o]);
return e;
};
const {
name: R0,
n: Yn,
classes: xi
} = ne("popup");
var ma = ee({
name: R0,
inheritAttrs: !1,
props: Ct,
setup(e, {
slots: n,
attrs: o
}) {
const t = m0(() => e.show, !0), {
zIndex: r
} = ir(() => e.show, 3), a = B(() => {
var h;
return (h = e.zIndex) != null ? h : r.value;
}), {
onStackTop: i
} = su(() => e.show, a), {
disabled: l
} = xo(), {
bindPopupItems: s
} = I0();
ar(() => e.show, () => e.lockScroll), fe(() => e.show, (h) => {
$(h ? e.onOpen : e.onClose);
}), s({
show: B(() => e.show)
}), He(() => window, "keydown", v), z0(() => $(e.onRouteChange));
function u() {
const {
closeOnClickOverlay: h,
onClickOverlay: m
} = e;
$(m), h && $(e["onUpdate:show"], !1);
}
function c() {
const {
overlayClass: h = "",
overlayStyle: m
} = e;
return X("div", {
class: xi(Yn("overlay"), h),
style: V0({
zIndex: a.value - 1
}, m),
onClick: u
}, null);
}
function d() {
return Ne(X("div", je({
class: xi(Yn("content"), Yn(`--${e.position}`), [e.defaultStyle, Yn("--content-background-color")], [e.defaultStyle, Yn("$-elevation--3")], [e.safeArea, Yn("--safe-area")], [e.safeAreaTop, Yn("--safe-area-top")]),
style: {
zIndex: a.value
},
role: "dialog",
"aria-modal": "true"
}, o), [t.value && $(n.default)]), [[eo, e.show]]);
}
function f() {
return X(xe, {
name: Yn("$-fade"),
onAfterEnter: e.onOpened,
onAfterLeave: e.onClosed
}, {
default: () => [Ne(X("div", {
class: xi(Yn("$--box"), Yn(), [!e.overlay, Yn("--pointer-events-none")]),
style: {
zIndex: a.value - 2
}
}, [e.overlay && c(), X(xe, {
name: e.transition || Yn(`$-pop-${e.position}`)
}, {
default: () => [d()]
})]), [[eo, e.show]])]