mx-ui-components
Version:
mobius ui library
1,964 lines (1,963 loc) • 11.1 MB
JavaScript
var K2t = Object.defineProperty;
var W4e = (n) => {
throw TypeError(n);
};
var Y2t = (n, e, t) => e in n ? K2t(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
var se = (n, e, t) => Y2t(n, typeof e != "symbol" ? e + "" : e, t), z4e = (n, e, t) => e.has(n) || W4e("Cannot " + t);
var Mm = (n, e, t) => (z4e(n, e, "read from private field"), t ? t.call(n) : e.get(n)), sue = (n, e, t) => e.has(n) ? W4e("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(n) : e.set(n, t), oue = (n, e, t, i) => (z4e(n, e, "write to private field"), i ? i.call(n, t) : e.set(n, t), t);
const Z2t = "5";
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(Z2t);
const X2t = 1, J2t = 2, ext = 4, txt = 8, ixt = 16, nxt = 1, rxt = 2, RZe = "[", BZe = "[!", PZe = "]", m7 = {}, $v = Symbol(), OZe = !1;
function GEe(n) {
console.warn("hydration_mismatch");
}
var FZe = Array.isArray, sxt = Array.from, IZ = Object.keys, NZ = Object.defineProperty, oS = Object.getOwnPropertyDescriptor, oxt = Object.getOwnPropertyDescriptors, axt = Object.prototype, lxt = Array.prototype, Gve = Object.getPrototypeOf;
function k8(n) {
return typeof n == "function";
}
const cxt = () => {
};
function HZe(n) {
for (var e = 0; e < n.length; e++)
n[e]();
}
const TS = 2, VZe = 4, lse = 8, KEe = 16, jy = 32, pz = 64, s3 = 128, MZ = 256, Q0 = 512, J5 = 1024, cse = 2048, mP = 4096, gz = 8192, uxt = 16384, use = 32768, dxt = 65536, hxt = 1 << 18, UZe = 1 << 19, aue = Symbol("$state"), fxt = Symbol("");
function WZe(n) {
return n === this.v;
}
function pxt(n, e) {
return n != n ? e == e : n !== e || n !== null && typeof n == "object" || typeof n == "function";
}
function YEe(n) {
return !pxt(n, this.v);
}
function gxt(n) {
throw new Error("effect_in_teardown");
}
function mxt() {
throw new Error("effect_in_unowned_derived");
}
function vxt(n) {
throw new Error("effect_orphan");
}
function Axt() {
throw new Error("effect_update_depth_exceeded");
}
function yxt() {
throw new Error("hydration_failed");
}
function bxt(n) {
throw new Error("props_invalid_value");
}
function _xt() {
throw new Error("state_descriptors_fixed");
}
function wxt() {
throw new Error("state_prototype_fixed");
}
function Cxt() {
throw new Error("state_unsafe_local_read");
}
function Sxt() {
throw new Error("state_unsafe_mutation");
}
function U1(n) {
return {
f: 0,
// TODO ideally we could skip this altogether, but it causes type errors
v: n,
reactions: null,
equals: WZe,
version: 0
};
}
function $4e(n) {
return /* @__PURE__ */ xxt(U1(n));
}
// @__NO_SIDE_EFFECTS__
function zZe(n, e = !1) {
var i;
const t = U1(n);
return e || (t.equals = YEe), td !== null && td.l !== null && ((i = td.l).s ?? (i.s = [])).push(t), t;
}
// @__NO_SIDE_EFFECTS__
function xxt(n) {
return _c !== null && _c.f & TS && (M_ === null ? Hxt([n]) : M_.push(n)), n;
}
function f0(n, e) {
return _c !== null && eLe() && _c.f & (TS | KEe) && // If the source was created locally within the current derived, then
// we allow the mutation.
(M_ === null || !M_.includes(n)) && Sxt(), Ext(n, e);
}
function Ext(n, e) {
return n.equals(e) || (n.v = e, n.version = oXe(), $Ze(n, J5), eLe() && Fa !== null && Fa.f & Q0 && !(Fa.f & jy) && (Np !== null && Np.includes(n) ? (o2(Fa, J5), fse(Fa)) : EE === null ? Vxt([n]) : EE.push(n))), e;
}
function $Ze(n, e) {
var t = n.reactions;
if (t !== null)
for (var i = eLe(), r = t.length, s = 0; s < r; s++) {
var o = t[s], a = o.f;
a & J5 || !i && o === Fa || (o2(o, e), a & (Q0 | s3) && (a & TS ? $Ze(
/** @type {Derived} */
o,
cse
) : fse(
/** @type {Effect} */
o
)));
}
}
// @__NO_SIDE_EFFECTS__
function Kve(n) {
var e = TS | J5;
Fa === null ? e |= s3 : Fa.f |= UZe;
const t = {
children: null,
ctx: td,
deps: null,
equals: WZe,
f: e,
fn: n,
reactions: null,
v: (
/** @type {V} */
null
),
version: 0,
parent: Fa
};
if (_c !== null && _c.f & TS) {
var i = (
/** @type {Derived} */
_c
);
(i.children ?? (i.children = [])).push(t);
}
return t;
}
// @__NO_SIDE_EFFECTS__
function Lxt(n) {
const e = /* @__PURE__ */ Kve(n);
return e.equals = YEe, e;
}
function jZe(n) {
var e = n.children;
if (e !== null) {
n.children = null;
for (var t = 0; t < e.length; t += 1) {
var i = e[t];
i.f & TS ? ZEe(
/** @type {Derived} */
i
) : o3(
/** @type {Effect} */
i
);
}
}
}
function qZe(n) {
var e, t = Fa;
j_(n.parent);
try {
jZe(n), e = aXe(n);
} finally {
j_(t);
}
return e;
}
function QZe(n) {
var e = qZe(n), t = (X4 || n.f & s3) && n.deps !== null ? cse : Q0;
o2(n, t), n.equals(e) || (n.v = e, n.version = oXe());
}
function ZEe(n) {
jZe(n), dV(n, 0), o2(n, gz), n.v = n.children = n.deps = n.ctx = n.reactions = null;
}
function kxt(n) {
Fa === null && _c === null && vxt(), _c !== null && _c.f & s3 && mxt(), JEe && gxt();
}
function Txt(n, e) {
var t = e.last;
t === null ? e.last = e.first = n : (t.next = n, n.prev = t, e.last = n);
}
function mz(n, e, t, i = !0) {
var r = (n & pz) !== 0, s = Fa, o = {
ctx: td,
deps: null,
deriveds: null,
nodes_start: null,
nodes_end: null,
f: n | J5,
first: null,
fn: e,
last: null,
next: null,
parent: r ? null : s,
prev: null,
teardown: null,
transitions: null,
version: 0
};
if (t) {
var a = aB;
try {
Q4e(!0), hse(o), o.f |= uxt;
} catch (u) {
throw o3(o), u;
} finally {
Q4e(a);
}
} else e !== null && fse(o);
var l = t && o.deps === null && o.first === null && o.nodes_start === null && o.teardown === null && (o.f & UZe) === 0;
if (!l && !r && i && (s !== null && Txt(o, s), _c !== null && _c.f & TS)) {
var c = (
/** @type {Derived} */
_c
);
(c.children ?? (c.children = [])).push(o);
}
return o;
}
function Dxt(n) {
kxt();
var e = Fa !== null && (Fa.f & jy) !== 0 && td !== null && !td.m;
if (e) {
var t = (
/** @type {ComponentContext} */
td
);
(t.e ?? (t.e = [])).push({
fn: n,
effect: Fa,
reaction: _c
});
} else {
var i = KZe(n);
return i;
}
}
function GZe(n) {
const e = mz(pz, n, !0);
return () => {
o3(e);
};
}
function KZe(n) {
return mz(VZe, n, !1);
}
function Ixt(n) {
return mz(lse, n, !0);
}
function Kc(n) {
return XEe(n);
}
function XEe(n, e = 0) {
return mz(lse | KEe | e, n, !0);
}
function RZ(n, e = !0) {
return mz(lse | jy, n, !0, e);
}
function YZe(n) {
var e = n.teardown;
if (e !== null) {
const t = JEe, i = _c;
G4e(!0), fL(null);
try {
e.call(null);
} finally {
G4e(t), fL(i);
}
}
}
function ZZe(n) {
var e = n.deriveds;
if (e !== null) {
n.deriveds = null;
for (var t = 0; t < e.length; t += 1)
ZEe(e[t]);
}
}
function XZe(n, e = !1) {
var t = n.first;
for (n.first = n.last = null; t !== null; ) {
var i = t.next;
o3(t, e), t = i;
}
}
function Nxt(n) {
for (var e = n.first; e !== null; ) {
var t = e.next;
e.f & jy || o3(e), e = t;
}
}
function o3(n, e = !0) {
var t = !1;
if ((e || n.f & hxt) && n.nodes_start !== null) {
for (var i = n.nodes_start, r = n.nodes_end; i !== null; ) {
var s = i === r ? null : (
/** @type {TemplateNode} */
/* @__PURE__ */ yk(i)
);
i.remove(), i = s;
}
t = !0;
}
XZe(n, e && !t), ZZe(n), dV(n, 0), o2(n, gz);
var o = n.transitions;
if (o !== null)
for (const l of o)
l.stop();
YZe(n);
var a = n.parent;
a !== null && a.first !== null && JZe(n), n.next = n.prev = n.teardown = n.ctx = n.deps = n.parent = n.fn = n.nodes_start = n.nodes_end = null;
}
function JZe(n) {
var e = n.parent, t = n.prev, i = n.next;
t !== null && (t.next = i), i !== null && (i.prev = t), e !== null && (e.first === n && (e.first = i), e.last === n && (e.last = t));
}
function j4e(n, e) {
var t = [];
eXe(n, t, !0), Mxt(t, () => {
o3(n), e && e();
});
}
function Mxt(n, e) {
var t = n.length;
if (t > 0) {
var i = () => --t || e();
for (var r of n)
r.out(i);
} else
e();
}
function eXe(n, e, t) {
if (!(n.f & mP)) {
if (n.f ^= mP, n.transitions !== null)
for (const o of n.transitions)
(o.is_global || t) && e.push(o);
for (var i = n.first; i !== null; ) {
var r = i.next, s = (i.f & use) !== 0 || (i.f & jy) !== 0;
eXe(i, e, s ? t : !1), i = r;
}
}
}
function q4e(n) {
tXe(n, !0);
}
function tXe(n, e) {
if (n.f & mP) {
vz(n) && hse(n), n.f ^= mP;
for (var t = n.first; t !== null; ) {
var i = t.next, r = (t.f & use) !== 0 || (t.f & jy) !== 0;
tXe(t, r ? e : !1), t = i;
}
if (n.transitions !== null)
for (const s of n.transitions)
(s.is_global || e) && s.in();
}
}
const Rxt = typeof requestIdleCallback > "u" ? (n) => setTimeout(n, 1) : requestIdleCallback;
let BZ = !1, PZ = !1, Yve = [], Zve = [];
function iXe() {
BZ = !1;
const n = Yve.slice();
Yve = [], HZe(n);
}
function nXe() {
PZ = !1;
const n = Zve.slice();
Zve = [], HZe(n);
}
function dse(n) {
BZ || (BZ = !0, queueMicrotask(iXe)), Yve.push(n);
}
function Bxt(n) {
PZ || (PZ = !0, Rxt(nXe)), Zve.push(n);
}
function Pxt() {
BZ && iXe(), PZ && nXe();
}
function Oxt(n) {
throw new Error("lifecycle_outside_component");
}
const rXe = 0, Fxt = 1;
let wK = rXe, uV = !1, aB = !1, JEe = !1;
function Q4e(n) {
aB = n;
}
function G4e(n) {
JEe = n;
}
let ZD = [], lB = 0;
let _c = null;
function fL(n) {
_c = n;
}
let Fa = null;
function j_(n) {
Fa = n;
}
let M_ = null;
function Hxt(n) {
M_ = n;
}
let Np = null, Kv = 0, EE = null;
function Vxt(n) {
EE = n;
}
let sXe = 0, X4 = !1, td = null;
function oXe() {
return ++sXe;
}
function eLe() {
return td !== null && td.l === null;
}
function vz(n) {
var o, a;
var e = n.f;
if (e & J5)
return !0;
if (e & cse) {
var t = n.deps, i = (e & s3) !== 0;
if (t !== null) {
var r;
if (e & MZ) {
for (r = 0; r < t.length; r++)
((o = t[r]).reactions ?? (o.reactions = [])).push(n);
n.f ^= MZ;
}
for (r = 0; r < t.length; r++) {
var s = t[r];
if (vz(
/** @type {Derived} */
s
) && QZe(
/** @type {Derived} */
s
), i && Fa !== null && !X4 && !((a = s == null ? void 0 : s.reactions) != null && a.includes(n)) && (s.reactions ?? (s.reactions = [])).push(n), s.version > n.version)
return !0;
}
}
i || o2(n, Q0);
}
return !1;
}
function Uxt(n, e, t) {
throw n;
}
function aXe(n) {
var h;
var e = Np, t = Kv, i = EE, r = _c, s = X4, o = M_, a = td, l = n.f;
Np = /** @type {null | Value[]} */
null, Kv = 0, EE = null, _c = l & (jy | pz) ? null : n, X4 = !aB && (l & s3) !== 0, M_ = null, td = n.ctx;
try {
var c = (
/** @type {Function} */
(0, n.fn)()
), u = n.deps;
if (Np !== null) {
var d;
if (dV(n, Kv), u !== null && Kv > 0)
for (u.length = Kv + Np.length, d = 0; d < Np.length; d++)
u[Kv + d] = Np[d];
else
n.deps = u = Np;
if (!X4)
for (d = Kv; d < u.length; d++)
((h = u[d]).reactions ?? (h.reactions = [])).push(n);
} else u !== null && Kv < u.length && (dV(n, Kv), u.length = Kv);
return c;
} finally {
Np = e, Kv = t, EE = i, _c = r, X4 = s, M_ = o, td = a;
}
}
function Wxt(n, e) {
let t = e.reactions;
if (t !== null) {
var i = t.indexOf(n);
if (i !== -1) {
var r = t.length - 1;
r === 0 ? t = e.reactions = null : (t[i] = t[r], t.pop());
}
}
t === null && e.f & TS && // Destroying a child effect while updating a parent effect can cause a dependency to appear
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
(Np === null || !Np.includes(e)) && (o2(e, cse), e.f & (s3 | MZ) || (e.f ^= MZ), dV(
/** @type {Derived} **/
e,
0
));
}
function dV(n, e) {
var t = n.deps;
if (t !== null)
for (var i = e; i < t.length; i++)
Wxt(n, t[i]);
}
function hse(n) {
var e = n.f;
if (!(e & gz)) {
o2(n, Q0);
var t = Fa;
Fa = n;
try {
e & KEe ? Nxt(n) : XZe(n), ZZe(n), YZe(n);
var i = aXe(n);
n.teardown = typeof i == "function" ? i : null, n.version = sXe;
} catch (r) {
Uxt(
/** @type {Error} */
r
);
} finally {
Fa = t;
}
}
}
function lXe() {
lB > 1e3 && (lB = 0, Axt()), lB++;
}
function cXe(n) {
var e = n.length;
if (e !== 0) {
lXe();
var t = aB;
aB = !0;
try {
for (var i = 0; i < e; i++) {
var r = n[i];
r.f & Q0 || (r.f ^= Q0);
var s = [];
uXe(r, s), zxt(s);
}
} finally {
aB = t;
}
}
}
function zxt(n) {
var e = n.length;
if (e !== 0)
for (var t = 0; t < e; t++) {
var i = n[t];
!(i.f & (gz | mP)) && vz(i) && (hse(i), i.deps === null && i.first === null && i.nodes_start === null && (i.teardown === null ? JZe(i) : i.fn = null));
}
}
function $xt() {
if (uV = !1, lB > 1001)
return;
const n = ZD;
ZD = [], cXe(n), uV || (lB = 0);
}
function fse(n) {
wK === rXe && (uV || (uV = !0, queueMicrotask($xt)));
for (var e = n; e.parent !== null; ) {
e = e.parent;
var t = e.f;
if (t & (pz | jy)) {
if (!(t & Q0)) return;
e.f ^= Q0;
}
}
ZD.push(e);
}
function uXe(n, e) {
var t = n.first, i = [];
e: for (; t !== null; ) {
var r = t.f, s = (r & jy) !== 0, o = s && (r & Q0) !== 0;
if (!o && !(r & mP))
if (r & lse) {
s ? t.f ^= Q0 : vz(t) && hse(t);
var a = t.first;
if (a !== null) {
t = a;
continue;
}
} else r & VZe && i.push(t);
var l = t.next;
if (l === null) {
let d = t.parent;
for (; d !== null; ) {
if (n === d)
break e;
var c = d.next;
if (c !== null) {
t = c;
continue e;
}
d = d.parent;
}
}
t = l;
}
for (var u = 0; u < i.length; u++)
a = i[u], e.push(a), uXe(a, e);
}
function Sr(n) {
var e = wK, t = ZD;
try {
lXe();
const r = [];
wK = Fxt, ZD = r, uV = !1, cXe(t);
var i = n == null ? void 0 : n();
return Pxt(), (ZD.length > 0 || r.length > 0) && Sr(), lB = 0, i;
} finally {
wK = e, ZD = t;
}
}
function jg(n) {
var a;
var e = n.f, t = (e & TS) !== 0;
if (t && e & gz) {
var i = qZe(
/** @type {Derived} */
n
);
return ZEe(
/** @type {Derived} */
n
), i;
}
if (_c !== null) {
M_ !== null && M_.includes(n) && Cxt();
var r = _c.deps;
Np === null && r !== null && r[Kv] === n ? Kv++ : Np === null ? Np = [n] : Np.push(n), EE !== null && Fa !== null && Fa.f & Q0 && !(Fa.f & jy) && EE.includes(n) && (o2(Fa, J5), fse(Fa));
} else if (t && /** @type {Derived} */
n.deps === null) {
var s = (
/** @type {Derived} */
n
), o = s.parent;
o !== null && !((a = o.deriveds) != null && a.includes(s)) && (o.deriveds ?? (o.deriveds = [])).push(s);
}
return t && (s = /** @type {Derived} */
n, vz(s) && QZe(s)), n.v;
}
function Xve(n) {
const e = _c;
try {
return _c = null, n();
} finally {
_c = e;
}
}
const jxt = -3585;
function o2(n, e) {
n.f = n.f & jxt | e;
}
function Oc(n, e = !1, t) {
td = {
p: td,
c: null,
e: null,
m: !1,
s: n,
x: null,
l: null
}, e || (td.l = {
s: null,
u: null,
r1: [],
r2: U1(!1)
});
}
function Fc(n) {
const e = td;
if (e !== null) {
n !== void 0 && (e.x = n);
const o = e.e;
if (o !== null) {
var t = Fa, i = _c;
e.e = null;
try {
for (var r = 0; r < o.length; r++) {
var s = o[r];
j_(s.effect), fL(s.reaction), KZe(s.fn);
}
} finally {
j_(t), fL(i);
}
}
td = e.p, e.m = !0;
}
return n || /** @type {T} */
{};
}
function Bx(n, e = null, t) {
if (typeof n != "object" || n === null || aue in n)
return n;
const i = Gve(n);
if (i !== axt && i !== lxt)
return n;
var r = /* @__PURE__ */ new Map(), s = FZe(n), o = U1(0);
s && r.set("length", U1(
/** @type {any[]} */
n.length
));
var a;
return new Proxy(
/** @type {any} */
n,
{
defineProperty(l, c, u) {
(!("value" in u) || u.configurable === !1 || u.enumerable === !1 || u.writable === !1) && _xt();
var d = r.get(c);
return d === void 0 ? (d = U1(u.value), r.set(c, d)) : f0(d, Bx(u.value, a)), !0;
},
deleteProperty(l, c) {
var u = r.get(c);
if (u === void 0)
c in l && r.set(c, U1($v));
else {
if (s && typeof c == "string") {
var d = (
/** @type {Source<number>} */
r.get("length")
), h = Number(c);
Number.isInteger(h) && h < d.v && f0(d, h);
}
f0(u, $v), K4e(o);
}
return !0;
},
get(l, c, u) {
var p;
if (c === aue)
return n;
var d = r.get(c), h = c in l;
if (d === void 0 && (!h || (p = oS(l, c)) != null && p.writable) && (d = U1(Bx(h ? l[c] : $v, a)), r.set(c, d)), d !== void 0) {
var f = jg(d);
return f === $v ? void 0 : f;
}
return Reflect.get(l, c, u);
},
getOwnPropertyDescriptor(l, c) {
var u = Reflect.getOwnPropertyDescriptor(l, c);
if (u && "value" in u) {
var d = r.get(c);
d && (u.value = jg(d));
} else if (u === void 0) {
var h = r.get(c), f = h == null ? void 0 : h.v;
if (h !== void 0 && f !== $v)
return {
enumerable: !0,
configurable: !0,
value: f,
writable: !0
};
}
return u;
},
has(l, c) {
var f;
if (c === aue)
return !0;
var u = r.get(c), d = u !== void 0 && u.v !== $v || Reflect.has(l, c);
if (u !== void 0 || Fa !== null && (!d || (f = oS(l, c)) != null && f.writable)) {
u === void 0 && (u = U1(d ? Bx(l[c], a) : $v), r.set(c, u));
var h = jg(u);
if (h === $v)
return !1;
}
return d;
},
set(l, c, u, d) {
var y;
var h = r.get(c), f = c in l;
if (s && c === "length")
for (var p = u; p < /** @type {Source<number>} */
h.v; p += 1) {
var g = r.get(p + "");
g !== void 0 ? f0(g, $v) : p in l && (g = U1($v), r.set(p + "", g));
}
h === void 0 ? (!f || (y = oS(l, c)) != null && y.writable) && (h = U1(void 0), f0(h, Bx(u, a)), r.set(c, h)) : (f = h.v !== $v, f0(h, Bx(u, a)));
var m = Reflect.getOwnPropertyDescriptor(l, c);
if (m != null && m.set && m.set.call(d, u), !f) {
if (s && typeof c == "string") {
var v = (
/** @type {Source<number>} */
r.get("length")
), A = Number(c);
Number.isInteger(A) && A >= v.v && f0(v, A + 1);
}
K4e(o);
}
return !0;
},
ownKeys(l) {
jg(o);
var c = Reflect.ownKeys(l).filter((h) => {
var f = r.get(h);
return f === void 0 || f.v !== $v;
});
for (var [u, d] of r)
d.v !== $v && !(u in l) && c.push(u);
return c;
},
setPrototypeOf() {
wxt();
}
}
);
}
function K4e(n, e = 1) {
f0(n, n.v + e);
}
var Y4e, dXe, hXe;
function Jve() {
if (Y4e === void 0) {
Y4e = window;
var n = Element.prototype, e = Node.prototype;
dXe = oS(e, "firstChild").get, hXe = oS(e, "nextSibling").get, n.__click = void 0, n.__className = "", n.__attributes = null, n.__styles = null, n.__e = void 0, Text.prototype.__t = void 0;
}
}
function eN(n = "") {
return document.createTextNode(n);
}
// @__NO_SIDE_EFFECTS__
function vP(n) {
return dXe.call(n);
}
// @__NO_SIDE_EFFECTS__
function yk(n) {
return hXe.call(n);
}
function Ql(n, e) {
if (!Mu)
return /* @__PURE__ */ vP(n);
var t = (
/** @type {TemplateNode} */
/* @__PURE__ */ vP(uu)
);
if (t === null)
t = uu.appendChild(eN());
else if (e && t.nodeType !== 3) {
var i = eN();
return t == null || t.before(i), IS(i), i;
}
return IS(t), t;
}
function DS(n, e) {
if (!Mu) {
var t = (
/** @type {DocumentFragment} */
/* @__PURE__ */ vP(
/** @type {Node} */
n
)
);
return t instanceof Comment && t.data === "" ? /* @__PURE__ */ yk(t) : t;
}
return uu;
}
function q_(n, e = 1, t = !1) {
let i = Mu ? uu : n;
for (; e--; )
i = /** @type {TemplateNode} */
/* @__PURE__ */ yk(i);
if (!Mu)
return i;
var r = i.nodeType;
if (t && r !== 3) {
var s = eN();
return i == null || i.before(s), IS(s), s;
}
return IS(i), /** @type {TemplateNode} */
i;
}
function qxt(n) {
n.textContent = "";
}
let Mu = !1;
function J4(n) {
Mu = n;
}
let uu;
function IS(n) {
if (n === null)
throw GEe(), m7;
return uu = n;
}
function tLe() {
return IS(
/** @type {TemplateNode} */
/* @__PURE__ */ yk(uu)
);
}
function Gl(n) {
if (Mu) {
if (/* @__PURE__ */ yk(uu) !== null)
throw GEe(), m7;
uu = n;
}
}
function OZ(n = 1) {
if (Mu) {
for (var e = n, t = uu; e--; )
t = /** @type {TemplateNode} */
/* @__PURE__ */ yk(t);
uu = t;
}
}
function Qxt() {
for (var n = 0, e = uu; ; ) {
if (e.nodeType === 8) {
var t = (
/** @type {Comment} */
e.data
);
if (t === PZe) {
if (n === 0) return e;
n -= 1;
} else (t === RZe || t === BZe) && (n += 1);
}
var i = (
/** @type {TemplateNode} */
/* @__PURE__ */ yk(e)
);
e.remove(), e = i;
}
}
const fXe = /* @__PURE__ */ new Set(), eAe = /* @__PURE__ */ new Set();
function Z4e(n, e, t, i) {
function r(s) {
if (i.capture || c9.call(e, s), !s.cancelBubble) {
var o = _c, a = Fa;
fL(null), j_(null);
try {
return t.call(this, s);
} finally {
fL(o), j_(a);
}
}
}
return n.startsWith("pointer") || n.startsWith("touch") || n === "wheel" ? dse(() => {
e.addEventListener(n, r, i);
}) : e.addEventListener(n, r, i), r;
}
function Gxt(n) {
for (var e = 0; e < n.length; e++)
fXe.add(n[e]);
for (var t of eAe)
t(n);
}
function c9(n) {
var A;
var e = this, t = (
/** @type {Node} */
e.ownerDocument
), i = n.type, r = ((A = n.composedPath) == null ? void 0 : A.call(n)) || [], s = (
/** @type {null | Element} */
r[0] || n.target
), o = 0, a = n.__root;
if (a) {
var l = r.indexOf(a);
if (l !== -1 && (e === document || e === /** @type {any} */
window)) {
n.__root = e;
return;
}
var c = r.indexOf(e);
if (c === -1)
return;
l <= c && (o = l);
}
if (s = /** @type {Element} */
r[o] || n.target, s !== e) {
NZ(n, "currentTarget", {
configurable: !0,
get() {
return s || t;
}
});
var u = _c, d = Fa;
fL(null), j_(null);
try {
for (var h, f = []; s !== null; ) {
var p = s.assignedSlot || s.parentNode || /** @type {any} */
s.host || null;
try {
var g = s["__" + i];
if (g !== void 0 && !/** @type {any} */
s.disabled)
if (FZe(g)) {
var [m, ...v] = g;
m.apply(s, [n, ...v]);
} else
g.call(s, n);
} catch (y) {
h ? f.push(y) : h = y;
}
if (n.cancelBubble || p === e || p === null)
break;
s = p;
}
if (h) {
for (let y of f)
queueMicrotask(() => {
throw y;
});
throw h;
}
} finally {
n.__root = e, delete n.currentTarget, fL(u), j_(d);
}
}
}
function Kxt(n) {
var e = document.createElement("template");
return e.innerHTML = n, e.content;
}
function LE(n, e) {
var t = (
/** @type {Effect} */
Fa
);
t.nodes_start === null && (t.nodes_start = n, t.nodes_end = e);
}
// @__NO_SIDE_EFFECTS__
function Zc(n, e) {
var t = (e & nxt) !== 0, i = (e & rxt) !== 0, r, s = !n.startsWith("<!>");
return () => {
if (Mu)
return LE(uu, null), uu;
r === void 0 && (r = Kxt(s ? n : "<!>" + n), t || (r = /** @type {Node} */
/* @__PURE__ */ vP(r)));
var o = (
/** @type {TemplateNode} */
i ? document.importNode(r, !0) : r.cloneNode(!0)
);
if (t) {
var a = (
/** @type {TemplateNode} */
/* @__PURE__ */ vP(o)
), l = (
/** @type {TemplateNode} */
o.lastChild
);
LE(a, l);
} else
LE(o, o);
return o;
};
}
function pXe(n = "") {
if (!Mu) {
var e = eN(n + "");
return LE(e, e), e;
}
var t = uu;
return t.nodeType !== 3 && (t.before(t = eN()), IS(t)), LE(t, t), t;
}
function tN() {
if (Mu)
return LE(uu, null), uu;
var n = document.createDocumentFragment(), e = document.createComment(""), t = eN();
return n.append(e, t), LE(e, t), n;
}
function Ea(n, e) {
if (Mu) {
Fa.nodes_end = uu, tLe();
return;
}
n !== null && n.before(
/** @type {Node} */
e
);
}
function Yxt(n) {
return n.endsWith("capture") && n !== "gotpointercapture" && n !== "lostpointercapture";
}
const Zxt = [
"beforeinput",
"click",
"change",
"dblclick",
"contextmenu",
"focusin",
"focusout",
"input",
"keydown",
"keyup",
"mousedown",
"mousemove",
"mouseout",
"mouseover",
"mouseup",
"pointerdown",
"pointermove",
"pointerout",
"pointerover",
"pointerup",
"touchend",
"touchmove",
"touchstart"
];
function Xxt(n) {
return Zxt.includes(n);
}
const Jxt = {
// no `class: 'className'` because we handle that separately
formnovalidate: "formNoValidate",
ismap: "isMap",
nomodule: "noModule",
playsinline: "playsInline",
readonly: "readOnly"
};
function eEt(n) {
return n = n.toLowerCase(), Jxt[n] ?? n;
}
const tEt = ["touchstart", "touchmove"];
function iEt(n) {
return tEt.includes(n);
}
function TA(n, e) {
var t = e == null ? "" : typeof e == "object" ? e + "" : e;
t !== (n.__t ?? (n.__t = n.nodeValue)) && (n.__t = t, n.nodeValue = t == null ? "" : t + "");
}
function gXe(n, e) {
return mXe(n, e);
}
function nEt(n, e) {
Jve(), e.intro = e.intro ?? !1;
const t = e.target, i = Mu, r = uu;
try {
for (var s = (
/** @type {TemplateNode} */
/* @__PURE__ */ vP(t)
); s && (s.nodeType !== 8 || /** @type {Comment} */
s.data !== RZe); )
s = /** @type {TemplateNode} */
/* @__PURE__ */ yk(s);
if (!s)
throw m7;
J4(!0), IS(
/** @type {Comment} */
s
), tLe();
const o = mXe(n, { ...e, anchor: s });
if (uu === null || uu.nodeType !== 8 || /** @type {Comment} */
uu.data !== PZe)
throw GEe(), m7;
return J4(!1), /** @type {Exports} */
o;
} catch (o) {
if (o === m7)
return e.recover === !1 && yxt(), Jve(), qxt(t), J4(!1), gXe(n, e);
throw o;
} finally {
J4(i), IS(r);
}
}
const dM = /* @__PURE__ */ new Map();
function mXe(n, { target: e, anchor: t, props: i = {}, events: r, context: s, intro: o = !0 }) {
Jve();
var a = /* @__PURE__ */ new Set(), l = (d) => {
for (var h = 0; h < d.length; h++) {
var f = d[h];
if (!a.has(f)) {
a.add(f);
var p = iEt(f);
e.addEventListener(f, c9, { passive: p });
var g = dM.get(f);
g === void 0 ? (document.addEventListener(f, c9, { passive: p }), dM.set(f, 1)) : dM.set(f, g + 1);
}
}
};
l(sxt(fXe)), eAe.add(l);
var c = void 0, u = GZe(() => {
var d = t ?? e.appendChild(eN());
return RZ(() => {
if (s) {
Oc({});
var h = (
/** @type {ComponentContext} */
td
);
h.c = s;
}
r && (i.$$events = r), Mu && LE(
/** @type {TemplateNode} */
d,
null
), c = n(d, i) || {}, Mu && (Fa.nodes_end = uu), s && Fc();
}), () => {
var p;
for (var h of a) {
e.removeEventListener(h, c9);
var f = (
/** @type {number} */
dM.get(h)
);
--f === 0 ? (document.removeEventListener(h, c9), dM.delete(h)) : dM.set(h, f);
}
eAe.delete(l), tAe.delete(c), d !== t && ((p = d.parentNode) == null || p.removeChild(d));
};
});
return tAe.set(c, u), c;
}
let tAe = /* @__PURE__ */ new WeakMap();
function rEt(n) {
const e = tAe.get(n);
e && e();
}
function AP(n, e, t, i = null, r = !1) {
Mu && tLe();
var s = n, o = null, a = null, l = null, c = r ? use : 0;
XEe(() => {
if (l === (l = !!e())) return;
let u = !1;
if (Mu) {
const d = (
/** @type {Comment} */
s.data === BZe
);
l === d && (s = Qxt(), IS(s), J4(!1), u = !0);
}
l ? (o ? q4e(o) : o = RZ(() => t(s)), a && j4e(a, () => {
a = null;
})) : (a ? q4e(a) : i && (a = RZ(() => i(s))), o && j4e(o, () => {
o = null;
})), u && J4(!0);
}, c), Mu && (s = uu);
}
function a1(n, e, ...t) {
var i = n, r = cxt, s;
XEe(() => {
r !== (r = e()) && (s && (o3(s), s = null), s = RZ(() => (
/** @type {SnippetFn} */
r(i, ...t)
)));
}, use), Mu && (i = uu);
}
function pse(n, e) {
dse(() => {
var t = n.getRootNode(), i = (
/** @type {ShadowRoot} */
t.host ? (
/** @type {ShadowRoot} */
t
) : (
/** @type {Document} */
t.head ?? /** @type {Document} */
t.ownerDocument.head
)
);
if (!i.querySelector("#" + e.hash)) {
const r = document.createElement("style");
r.id = e.hash, r.textContent = e.code, i.appendChild(r);
}
});
}
function sEt(n, e) {
if (e) {
const t = document.body;
n.autofocus = !0, dse(() => {
document.activeElement === t && n.focus();
});
}
}
let X4e = !1;
function oEt() {
X4e || (X4e = !0, document.addEventListener(
"reset",
(n) => {
Promise.resolve().then(() => {
var e;
if (!n.defaultPrevented)
for (
const t of
/**@type {HTMLFormElement} */
n.target.elements
)
(e = t.__on_r) == null || e.call(t);
});
},
// In the capture phase to guarantee we get noticed of it (no possiblity of stopPropagation)
{ capture: !0 }
));
}
function gse(n) {
if (Mu) {
var e = !1, t = () => {
if (!e) {
if (e = !0, n.hasAttribute("value")) {
var i = n.value;
_A(n, "value", null), n.value = i;
}
if (n.hasAttribute("checked")) {
var r = n.checked;
_A(n, "checked", null), n.checked = r;
}
}
};
n.__on_r = t, Bxt(t), oEt();
}
}
function _A(n, e, t, i) {
var r = n.__attributes ?? (n.__attributes = {});
Mu && (r[e] = n.getAttribute(e), e === "src" || e === "srcset" || e === "href" && n.nodeName === "LINK") || r[e] !== (r[e] = t) && (e === "style" && "__styles" in n && (n.__styles = {}), e === "loading" && (n[fxt] = t), t == null ? n.removeAttribute(e) : typeof t != "string" && vXe(n).includes(e) ? n[e] = t : n.setAttribute(e, t));
}
function rg(n, e, t, i, r = !1, s = !1, o = !1) {
var a = e || {}, l = n.tagName === "OPTION";
for (var c in e)
c in t || (t[c] = null);
var u = vXe(n), d = (
/** @type {Record<string, unknown>} **/
n.__attributes ?? (n.__attributes = {})
), h = [];
for (const v in t) {
let A = t[v];
if (l && v === "value" && A == null) {
n.value = n.__value = "", a[v] = A;
continue;
}
var f = a[v];
if (A !== f) {
a[v] = A;
var p = v[0] + v[1];
if (p !== "$$") {
if (p === "on") {
const y = {}, b = "$$" + v;
let _ = v.slice(2);
var g = Xxt(_);
if (Yxt(_) && (_ = _.slice(0, -7), y.capture = !0), !g && f) {
if (A != null) continue;
n.removeEventListener(_, a[b], y), a[b] = null;
}
if (A != null)
if (g)
n[`__${_}`] = A, Gxt([_]);
else {
let S = function(w) {
a[v].call(this, w);
};
e ? a[b] = Z4e(_, n, S, y) : h.push([
v,
A,
() => a[b] = Z4e(_, n, S, y)
]);
}
} else if (v === "style" && A != null)
n.style.cssText = A + "";
else if (v === "autofocus")
sEt(
/** @type {HTMLElement} */
n,
!!A
);
else if (v === "__value" || v === "value" && A != null)
n.value = n[v] = n.__value = A;
else {
var m = v;
r || (m = eEt(m)), A == null && !s ? (d[v] = null, n.removeAttribute(v)) : u.includes(m) && (s || typeof A != "string") ? n[m] = A : typeof A != "function" && (Mu && (m === "src" || m === "href" || m === "srcset") || _A(n, m, A));
}
v === "style" && "__styles" in n && (n.__styles = {});
}
}
}
return e || dse(() => {
if (n.isConnected)
for (const [v, A, y] of h)
a[v] === A && y();
}), a;
}
var J4e = /* @__PURE__ */ new Map();
function vXe(n) {
var e = J4e.get(n.nodeName);
if (e) return e;
J4e.set(n.nodeName, e = []);
for (var t, i = Gve(n), r = Element.prototype; r !== i; ) {
t = oxt(i);
for (var s in t)
t[s].set && e.push(s);
i = Gve(i);
}
return e;
}
function iN(n, e) {
var t = n.__className, i = aEt(e);
Mu && n.className === i ? n.__className = i : (t !== i || Mu && n.className !== i) && (e == null ? n.removeAttribute("class") : n.className = i, n.__className = i);
}
function aEt(n) {
return n ?? "";
}
function lEt(n) {
td === null && Oxt(), td.l !== null ? cEt(td).m.push(n) : Dxt(() => {
const e = Xve(n);
if (typeof e == "function") return (
/** @type {() => void} */
e
);
});
}
function cEt(n) {
var e = (
/** @type {ComponentContextLegacy} */
n.l
);
return e.u ?? (e.u = { a: [], b: [], m: [] });
}
let Mj = !1;
function uEt(n) {
var e = Mj;
try {
return Mj = !1, [n(), Mj];
} finally {
Mj = e;
}
}
const dEt = {
get(n, e) {
let t = n.props.length;
for (; t--; ) {
let i = n.props[t];
if (k8(i) && (i = i()), typeof i == "object" && i !== null && e in i) return i[e];
}
},
set(n, e, t) {
let i = n.props.length;
for (; i--; ) {
let r = n.props[i];
k8(r) && (r = r());
const s = oS(r, e);
if (s && s.set)
return s.set(t), !0;
}
return !1;
},
getOwnPropertyDescriptor(n, e) {
let t = n.props.length;
for (; t--; ) {
let i = n.props[t];
if (k8(i) && (i = i()), typeof i == "object" && i !== null && e in i) {
const r = oS(i, e);
return r && !r.configurable && (r.configurable = !0), r;
}
}
},
has(n, e) {
for (let t of n.props)
if (k8(t) && (t = t()), t != null && e in t) return !0;
return !1;
},
ownKeys(n) {
const e = [];
for (let t of n.props) {
k8(t) && (t = t());
for (const i in t)
e.includes(i) || e.push(i);
}
return e;
}
};
function hEt(...n) {
return new Proxy({ props: n }, dEt);
}
function eRe(n) {
for (var e = Fa, t = Fa; e !== null && !(e.f & (jy | pz)); )
e = e.parent;
try {
return j_(e), n();
} finally {
j_(t);
}
}
function Dr(n, e, t, i) {
var S;
var r = (t & X2t) !== 0, s = (t & J2t) !== 0, o = (t & txt) !== 0, a = (t & ixt) !== 0, l = !1, c;
o ? [c, l] = uEt(() => (
/** @type {V} */
n[e]
)) : c = /** @type {V} */
n[e];
var u = (S = oS(n, e)) == null ? void 0 : S.set, d = (
/** @type {V} */
i
), h = !0, f = !1, p = () => (f = !0, h && (h = !1, a ? d = Xve(
/** @type {() => V} */
i
) : d = /** @type {V} */
i), d);
c === void 0 && i !== void 0 && (u && s && bxt(), c = p(), u && u(c));
var g;
if (s)
g = () => {
var w = (
/** @type {V} */
n[e]
);
return w === void 0 ? p() : (h = !0, f = !1, w);
};
else {
var m = eRe(
() => (r ? Kve : Lxt)(() => (
/** @type {V} */
n[e]
))
);
m.f |= dxt, g = () => {
var w = jg(m);
return w !== void 0 && (d = /** @type {V} */
void 0), w === void 0 ? d : w;
};
}
if (!(t & ext))
return g;
if (u) {
var v = n.$$legacy;
return function(w, x) {
return arguments.length > 0 ? ((!s || !x || v || l) && u(x ? g() : w), w) : g();
};
}
var A = !1, y = !1, b = /* @__PURE__ */ zZe(c), _ = eRe(
() => /* @__PURE__ */ Kve(() => {
var w = g(), x = jg(b);
return A ? (A = !1, y = !0, x) : (y = !1, b.v = w);
})
);
return r || (_.equals = YEe), function(w, x) {
if (arguments.length > 0) {
const E = x ? jg(_) : s && o ? Bx(w) : w;
return _.equals(E) || (A = !0, f0(b, E), f && d !== void 0 && (d = E), Xve(() => jg(_))), w;
}
return jg(_);
};
}
function fEt(n) {
return new pEt(n);
}
var RC, u0;
class pEt {
/**
* @param {ComponentConstructorOptions & {
* component: any;
* }} options
*/
constructor(e) {
/** @type {any} */
sue(this, RC);
/** @type {Record<string, any>} */
sue(this, u0);
var s;
var t = /* @__PURE__ */ new Map(), i = (o, a) => {
var l = /* @__PURE__ */ zZe(a);
return t.set(o, l), l;
};
const r = new Proxy(
{ ...e.props || {}, $$events: {} },
{
get(o, a) {
return jg(t.get(a) ?? i(a, Reflect.get(o, a)));
},
has(o, a) {
return jg(t.get(a) ?? i(a, Reflect.get(o, a))), Reflect.has(o, a);
},
set(o, a, l) {
return f0(t.get(a) ?? i(a, l), l), Reflect.set(o, a, l);
}
}
);
oue(this, u0, (e.hydrate ? nEt : gXe)(e.component, {
target: e.target,
props: r,
context: e.context,
intro: e.intro ?? !1,
recover: e.recover
})), (!((s = e == null ? void 0 : e.props) != null && s.$$host) || e.sync === !1) && Sr(), oue(this, RC, r.$$events);
for (const o of Object.keys(Mm(this, u0)))
o === "$set" || o === "$destroy" || o === "$on" || NZ(this, o, {
get() {
return Mm(this, u0)[o];
},
/** @param {any} value */
set(a) {
Mm(this, u0)[o] = a;
},
enumerable: !0
});
Mm(this, u0).$set = /** @param {Record<string, any>} next */
(o) => {
Object.assign(r, o);
}, Mm(this, u0).$destroy = () => {
rEt(Mm(this, u0));
};
}
/** @param {Record<string, any>} props */
$set(e) {
Mm(this, u0).$set(e);
}
/**
* @param {string} event
* @param {(...args: any[]) => any} callback
* @returns {any}
*/
$on(e, t) {
Mm(this, RC)[e] = Mm(this, RC)[e] || [];
const i = (...r) => t.call(this, ...r);
return Mm(this, RC)[e].push(i), () => {
Mm(this, RC)[e] = Mm(this, RC)[e].filter(
/** @param {any} fn */
(r) => r !== i
);
};
}
$destroy() {
Mm(this, u0).$destroy();
}
}
RC = new WeakMap(), u0 = new WeakMap();
let AXe;
typeof HTMLElement == "function" && (AXe = class extends HTMLElement {
/**
* @param {*} $$componentCtor
* @param {*} $$slots
* @param {*} use_shadow_dom
*/
constructor(e, t, i) {
super();
/** The Svelte component constructor */
se(this, "$$ctor");
/** Slots */
se(this, "$$s");
/** @type {any} The Svelte component instance */
se(this, "$$c");
/** Whether or not the custom element is connected */
se(this, "$$cn", !1);
/** @type {Record<string, any>} Component props data */
se(this, "$$d", {});
/** `true` if currently in the process of reflecting component props back to attributes */
se(this, "$$r", !1);
/** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
se(this, "$$p_d", {});
/** @type {Record<string, EventListenerOrEventListenerObject[]>} Event listeners */
se(this, "$$l", {});
/** @type {Map<EventListenerOrEventListenerObject, Function>} Event listener unsubscribe functions */
se(this, "$$l_u", /* @__PURE__ */ new Map());
/** @type {any} The managed render effect for reflecting attributes */
se(this, "$$me");
this.$$ctor = e, this.$$s = t, i && this.attachShadow({ mode: "open" });
}
/**
* @param {string} type
* @param {EventListenerOrEventListenerObject} listener
* @param {boolean | AddEventListenerOptions} [options]
*/
addEventListener(e, t, i) {
if (this.$$l[e] = this.$$l[e] || [], this.$$l[e].push(t), this.$$c) {
const r = this.$$c.$on(e, t);
this.$$l_u.set(t, r);
}
super.addEventListener(e, t, i);
}
/**
* @param {string} type
* @param {EventListenerOrEventListenerObject} listener
* @param {boolean | AddEventListenerOptions} [options]
*/
removeEventListener(e, t, i) {
if (super.removeEventListener(e, t, i), this.$$c) {
const r = this.$$l_u.get(t);
r && (r(), this.$$l_u.delete(t));
}
}
async connectedCallback() {
if (this.$$cn = !0, !this.$$c) {
let e = function(r) {
return (s) => {
const o = document.createElement("slot");
r !== "default" && (o.name = r), Ea(s, o);
};
};
if (await Promise.resolve(), !this.$$cn || this.$$c)
return;
const t = {}, i = gEt(this);
for (const r of this.$$s)
r in i && (r === "default" && !this.$$d.children ? (this.$$d.children = e(r), t.default = !0) : t[r] = e(r));
for (const r of this.attributes) {
const s = this.$$g_p(r.name);
s in this.$$d || (this.$$d[s] = CK(s, r.value, this.$$p_d, "toProp"));
}
for (const r in this.$$p_d)
!(r in this.$$d) && this[r] !== void 0 && (this.$$d[r] = this[r], delete this[r]);
this.$$c = fEt({
component: this.$$ctor,
target: this.shadowRoot || this,
props: {
...this.$$d,
$$slots: t,
$$host: this
}
}), this.$$me = GZe(() => {
Ixt(() => {
var r;
this.$$r = !0;
for (const s of IZ(this.$$c)) {
if (!((r = this.$$p_d[s]) != null && r.reflect)) continue;
this.$$d[s] = this.$$c[s];
const o = CK(
s,
this.$$d[s],
this.$$p_d,
"toAttribute"
);
o == null ? this.removeAttribute(this.$$p_d[s].attribute || s) : this.setAttribute(this.$$p_d[s].attribute || s, o);
}
this.$$r = !1;
});
});
for (const r in this.$$l)
for (const s of this.$$l[r]) {
const o = this.$$c.$on(r, s);
this.$$l_u.set(s, o);
}
this.$$l = {};
}
}
// We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte
// and setting attributes through setAttribute etc, this is helpful
/**
* @param {string} attr
* @param {string} _oldValue
* @param {string} newValue
*/
attributeChangedCallback(e, t, i) {
var r;
this.$$r || (e = this.$$g_p(e), this.$$d[e] = CK(e, i, this.$$p_d, "toProp"), (r = this.$$c) == null || r.$set({ [e]: this.$$d[e] }));
}
disconnectedCallback() {
this.$$cn = !1, Promise.resolve().then(() => {
!this.$$cn && this.$$c && (this.$$c.$destroy(), this.$$me(), this.$$c = void 0);
});
}
/**
* @param {string} attribute_name
*/
$$g_p(e) {
return IZ(this.$$p_d).find(
(t) => this.$$p_d[t].attribute === e || !this.$$p_d[t].attribute && t.toLowerCase() === e
) || e;
}
});
function CK(n, e, t, i) {
var s;
const r = (s = t[n]) == null ? void 0 : s.type;
if (e = r === "Boolean" && typeof e != "boolean" ? e != null : e, !i || !t[n])
return e;
if (i === "toAttribute")
switch (r) {
case "Object":
case "Array":
return e == null ? null : JSON.stringify(e);
case "Boolean":
return e ? "" : null;
case "Number":
return e ?? null;
default:
return e;
}
else
switch (r) {
case "Object":
case "Array":
return e && JSON.parse(e);
case "Boolean":
return e;
case "Number":
return e != null ? +e : e;
default:
return e;
}
}
function gEt(n) {
const e = {};
return n.childNodes.forEach((t) => {
e[
/** @type {Element} node */
t.slot || "default"
] = !0;
}), e;
}
function Xc(n, e, t, i, r, s) {
let o = class extends AXe {
constructor() {
super(n, t, r), this.$$p_d = e;
}
static get observedAttributes() {
return IZ(e).map(
(a) => (e[a].attribute || a).toLowerCase()
);
}
};
return IZ(e).forEach((a) => {
NZ(o.prototype, a, {
get() {
return this.$$c && a in this.$$c ? this.$$c[a] : this.$$d[a];
},
set(l) {
var d;
l = CK(a, l, e), this.$$d[a] = l;
var c = this.$$c;
if (c) {
var u = (d = oS(c, a)) == null ? void 0 : d.get;
u ? c[a] = l : c.$set({ [a]: l });
}
}
});
}), i.forEach((a) => {
NZ(o.prototype, a, {
get() {
var l;
return (l = this.$$c) == null ? void 0 : l[a];
}
});
}), s && (o = s(o)), n.element = /** @type {any} */
o, o;
}
var mEt = /* @__PURE__ */ Zc('<div><label class="svelte-13x2xcg"> <input type="text" class="svelte-13x2xcg"></label></div>');
const vEt = {
hash: "svelte-13x2xcg",
code: ":host {display:block;}label.svelte-13x2xcg {font-weight:bold;display:block;}input.svelte-13x2xcg {width:100%;padding:0.5rem;margin-top:0.25rem;border:1px solid #ccc;border-radius:4px;}"
};
function AEt(n, e) {
Oc(e, !1), pse(n, vEt);
let t = Dr(e, "label", 12, "Text Field"), i = Dr(e, "name", 12, ""), r = Dr(e, "placeholder", 12, ""), s = Dr(e, "required", 12, !1);
var o = mEt(), a = Ql(o), l = Ql(a), c = q_(l);
return Gl(a), Gl(o), Kc(() => {
TA(l, `${t() ?? ""} `), _A(c, "name", i()), _A(c, "placeholder", r()), c.required = s();
}), Ea(n, o), Fc({
get label() {
return t();
},
set label(u) {
t(u), Sr();
},
get name() {
return i();
},
set name(u) {
i(u), Sr();
},
get placeholder() {
return r();
},
set placeholder(u) {
r(u), Sr();
},
get required() {
return s();
},
set required(u) {
s(u), Sr();
}
});
}
customElements.define("text-field", Xc(
AEt,
{
label: {},
name: {},
placeholder: {},
required: { type: "Boolean" }
},
[],
[],
!0
));
var yEt = /* @__PURE__ */ Zc('<div><label class="svelte-13x2xcg"> <input type="email" class="svelte-13x2xcg"></label></div>');
const bEt = {
hash: "svelte-13x2xcg",
code: ":host {display:block;}label.svelte-13x2xcg {font-weight:bold;display:block;}input.svelte-13x2xcg {width:100%;padding:0.5rem;margin-top:0.25rem;border:1px solid #ccc;border-radius:4px;}"
};
function _Et(n, e) {
Oc(e, !1), pse(n, bEt);
let t = Dr(e, "label", 12, "Email Field"), i = Dr(e, "name", 12, ""), r = Dr(e, "placeholder", 12, ""), s = Dr(e, "required", 12, !1);
var o = yEt(), a = Ql(o), l = Ql(a), c = q_(l);
return Gl(a), Gl(o), Kc(() => {
TA(l, `${t() ?? ""} `), _A(c, "name", i()), _A(c, "placeholder", r()), c.required = s();
}), Ea(n, o), Fc({
get label() {
return t();
},
set label(u) {
t(u), Sr();
},
get name() {
return i();
},
set name(u) {
i(u), Sr();
},
get placeholder() {
return r();
},
set placeholder(u) {
r(u), Sr();
},
get required() {
return s();
},
set required(u) {
s(u), Sr();
}
});
}
customElements.define("email-field", Xc(
_Et,
{
label: {},
name: {},
placeholder: {},
required: { type: "Boolean" }
},
[],
[],
!0
));
var wEt = /* @__PURE__ */ Zc('<div><label class="svelte-13x2xcg"> <input type="password" class="svelte-13x2xcg"></label></div>');
const CEt = {
hash: "svelte-13x2xcg",
code: ":host {display:block;}label.svelte-13x2xcg {font-weight:bold;display:block;}input.svelte-13x2xcg {width:100%;padding:0.5rem;margin-top:0.25rem;border:1px solid #ccc;border-radius:4px;}"
};
function SEt(n, e) {
Oc(e, !1), pse(n, CEt);
let t = Dr(e, "label", 12, "Password Field"), i = Dr(e, "name", 12, ""), r = Dr(e, "placeholder", 12, ""), s = Dr(e, "required", 12, !1);
var o = wEt(), a = Ql(o), l = Ql(a), c = q_(l);
return Gl(a), Gl(o), Kc(() => {
TA(l, `${t() ?? ""} `), _A(c, "name", i()), _A(c, "placeholder", r()), c.required = s();
}), Ea(n, o), Fc({
get label() {
return t();
},
set label(u) {
t(u), Sr();
},
get name() {
return i();
},
set name(u) {
i(u), Sr();
},
get placeholder() {
return r();
},
set placeholder(u) {
r(u), Sr();
},
get required() {
return s();
},
set required(u) {
s(u), Sr();
}
});
}
customElements.define("password-field", Xc(
SEt,
{
label: {},
name: {},
placeholder: {},
required: { type: "Boolean" }
},