@fest-lib/object 0.1.2 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +9 -10
  2. package/dist/object.js +623 -611
  3. package/package.json +5 -4
package/dist/object.js CHANGED
@@ -1,29 +1,29 @@
1
- var Le = /* @__PURE__ */ Symbol.for("@fix"), m = (e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean" || typeof e == "bigint" || typeof e > "u" || e == null, E = (e, t) => m(e) ? t == "number" ? Number(e) || 0 : t == "string" ? String(e) || "" : t == "boolean" ? !!e : e : null, ke = (e, t = "value") => (typeof e == "object" || typeof e == "function") && e != null && (t in e || e?.[t] != null), M = (e) => ke(e, "value"), Ke = (e) => m(e) ? e : M(e) ? e?.value : e, S = (e, t) => e?.[Le] ?? e ?? t ?? t, lt = (e) => {
1
+ var je = /* @__PURE__ */ Symbol.for("@fix"), m = (e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean" || typeof e == "bigint" || typeof e > "u" || e == null, E = (e, t) => m(e) ? t == "number" ? Number(e) || 0 : t == "string" ? String(e) || "" : t == "boolean" ? !!e : e : null, ke = (e, t = "value") => (typeof e == "object" || typeof e == "function") && e != null && (t in e || e?.[t] != null), I = (e) => ke(e, "value"), Ke = (e) => m(e) ? e : I(e) ? e?.value : e, S = (e, t) => e?.[je] ?? e ?? t ?? t, yt = (e) => {
2
2
  if (typeof e == "function" || e == null) return e;
3
3
  const t = function() {
4
4
  };
5
- return t[Le] = e, t;
6
- }, Q = /* @__PURE__ */ Symbol.for("@trigger-lock"), ye = (e, t, r = "value") => {
7
- ke(e, r) && (e[Q] = !0);
5
+ return t[je] = e, t;
6
+ }, X = /* @__PURE__ */ Symbol.for("@trigger-lock"), ye = (e, t, r = "value") => {
7
+ ke(e, r) && (e[X] = !0);
8
8
  let n;
9
9
  try {
10
10
  n = t?.();
11
11
  } finally {
12
- ke(e, r) && delete e[Q];
12
+ ke(e, r) && delete e[X];
13
13
  }
14
14
  return n;
15
- }, st = (e, t) => e instanceof Promise || typeof e?.then == "function" ? e?.then?.(t) : t?.(e), ut = (e, t) => e instanceof Promise || typeof e?.then == "function" ? e?.then?.(t) : t?.(e), pe = function(e) {
15
+ }, at = (e, t) => e instanceof Promise || typeof e?.then == "function" ? e?.then?.(t) : t?.(e), ht = (e, t) => e instanceof Promise || typeof e?.then == "function" ? e?.then?.(t) : t?.(e), pe = function(e) {
16
16
  return (t) => {
17
- e[Q] = !0;
17
+ e[X] = !0;
18
18
  let r;
19
19
  try {
20
20
  r = t?.();
21
21
  } finally {
22
- e[Q] = !1;
22
+ e[X] = !1;
23
23
  }
24
24
  return r;
25
25
  };
26
- }, ft = (e) => {
26
+ }, dt = (e) => {
27
27
  switch (typeof e) {
28
28
  case "number":
29
29
  return 0;
@@ -40,77 +40,77 @@ var Le = /* @__PURE__ */ Symbol.for("@fix"), m = (e) => typeof e == "string" ||
40
40
  case "bigint":
41
41
  return 0n;
42
42
  }
43
- }, U = (e) => typeof e?.[Symbol.iterator] == "function", C = (e) => [
43
+ }, J = (e) => typeof e?.[Symbol.iterator] == "function", N = (e) => [
44
44
  "symbol",
45
45
  "string",
46
46
  "number"
47
- ].indexOf(typeof e) >= 0, ot = (e, t, r = null) => {
47
+ ].indexOf(typeof e) >= 0, vt = (e, t, r = null) => {
48
48
  const n = r != null && (typeof e == "object" || typeof e == "function") ? e?.[r] ?? e : e;
49
49
  let i = [];
50
- t instanceof Set || t instanceof Map || Array.isArray(t) || U(t) ? i = (n instanceof Set || n instanceof WeakSet ? t?.values?.() : t?.entries?.()) || (Array.isArray(t) || U(t) ? t : []) : (typeof t == "object" || typeof t == "function") && (i = n instanceof Set || n instanceof WeakSet ? Object.values(t) : Object.entries(t));
51
- let u = [];
52
- Array.isArray(n) ? u = n.entries() : n instanceof Map || n instanceof WeakMap ? u = n?.entries?.() : n instanceof Set || n instanceof WeakSet ? u = n?.values?.() : (typeof n == "object" || typeof n == "function") && (u = Object.entries(n));
53
- const s = new Set(Array.from(i).map((o) => o?.[0])), l = new Set(Array.from(u).map((o) => o?.[0])), f = s?.difference?.(l);
50
+ t instanceof Set || t instanceof Map || Array.isArray(t) || J(t) ? i = (n instanceof Set || n instanceof WeakSet ? t?.values?.() : t?.entries?.()) || (Array.isArray(t) || J(t) ? t : []) : (typeof t == "object" || typeof t == "function") && (i = n instanceof Set || n instanceof WeakSet ? Object.values(t) : Object.entries(t));
51
+ let s = [];
52
+ Array.isArray(n) ? s = n.entries() : n instanceof Map || n instanceof WeakMap ? s = n?.entries?.() : n instanceof Set || n instanceof WeakSet ? s = n?.values?.() : (typeof n == "object" || typeof n == "function") && (s = Object.entries(n));
53
+ const u = new Set(Array.from(i).map((o) => o?.[0])), l = new Set(Array.from(s).map((o) => o?.[0])), f = u?.difference?.(l);
54
54
  if (Array.isArray(n)) {
55
55
  const o = n.filter((y, a) => !f.has(a));
56
56
  n.splice(0, n.length), n.push(...o);
57
57
  } else if (n instanceof Map || n instanceof Set || n instanceof WeakMap || n instanceof WeakSet) for (const o of f) n.delete(o);
58
58
  else if (typeof n == "function" || typeof n == "object") for (const o of f) delete n[o];
59
59
  return n;
60
- }, ne = (e, t, r = null, n = !0, i = "id") => {
61
- const u = r != null && (typeof e == "object" || typeof e == "function") ? e?.[r] ?? e : e;
62
- let s = null;
63
- if (n && ot(u, t), t instanceof Set || t instanceof Map || Array.isArray(t) || U(t) ? s = (u instanceof Set || u instanceof WeakSet ? t?.values?.() : t?.entries?.()) || (Array.isArray(t) || U(t) ? t : []) : (typeof t == "object" || typeof t == "function") && (s = u instanceof Set || u instanceof WeakSet ? Object.values(t) : Object.entries(t)), u && s && (typeof s == "object" || typeof s == "function")) {
64
- if (u instanceof Map || u instanceof WeakMap) {
65
- for (const l of s) u.set(...l);
66
- return u;
60
+ }, ie = (e, t, r = null, n = !0, i = "id") => {
61
+ const s = r != null && (typeof e == "object" || typeof e == "function") ? e?.[r] ?? e : e;
62
+ let u = null;
63
+ if (n && vt(s, t), t instanceof Set || t instanceof Map || Array.isArray(t) || J(t) ? u = (s instanceof Set || s instanceof WeakSet ? t?.values?.() : t?.entries?.()) || (Array.isArray(t) || J(t) ? t : []) : (typeof t == "object" || typeof t == "function") && (u = s instanceof Set || s instanceof WeakSet ? Object.values(t) : Object.entries(t)), s && u && (typeof u == "object" || typeof u == "function")) {
64
+ if (s instanceof Map || s instanceof WeakMap) {
65
+ for (const l of u) s.set(...l);
66
+ return s;
67
67
  }
68
- if (u instanceof Set || u instanceof WeakSet) {
69
- for (const l of s) {
70
- const f = l?.[i] ? Array.from(u?.values?.() || []).find((o) => !x?.(o?.[i], l?.[i])) : null;
71
- f != null ? ne(f, l, null, n, i) : u.add(l);
68
+ if (s instanceof Set || s instanceof WeakSet) {
69
+ for (const l of u) {
70
+ const f = l?.[i] ? Array.from(s?.values?.() || []).find((o) => !x?.(o?.[i], l?.[i])) : null;
71
+ f != null ? ie(f, l, null, n, i) : s.add(l);
72
72
  }
73
- return u;
73
+ return s;
74
74
  }
75
- if (typeof u == "object" || typeof u == "function") {
76
- if (Array.isArray(u) || U(u)) {
75
+ if (typeof s == "object" || typeof s == "function") {
76
+ if (Array.isArray(s) || J(s)) {
77
77
  let l = 0;
78
- for (const f of s) l < u.length ? u[l++] = f?.[1] : u?.push?.(f?.[1]);
79
- return u;
78
+ for (const f of u) l < s.length ? s[l++] = f?.[1] : s?.push?.(f?.[1]);
79
+ return s;
80
80
  }
81
- return Object.assign(u, Object.fromEntries([...s || []].filter((l) => typeof l != "symbol")));
81
+ return Object.assign(s, Object.fromEntries([...u || []].filter((l) => typeof l != "symbol")));
82
82
  }
83
83
  }
84
84
  return r != null ? (Reflect.set(e, r, t), e) : typeof t == "object" || typeof t == "function" ? Object.assign(e, t) : t;
85
- }, ct = (e, t) => at.getOrInsert(e, /* @__PURE__ */ new WeakMap()).getOrInsert(t, t?.bind?.(e)), K = (e, t) => (typeof t == "function" ? ct(e, t) : t) ?? t, ae = (e, t, r, n) => {
85
+ }, bt = (e, t) => pt.getOrInsert(e, /* @__PURE__ */ new WeakMap()).getOrInsert(t, t?.bind?.(e)), K = (e, t) => (typeof t == "function" ? bt(e, t) : t) ?? t, ae = (e, t, r, n) => {
86
86
  if (t == Symbol.iterator) return Ve(e, r, n);
87
87
  if (t == null || typeof t == "symbol" || typeof t == "object" || typeof t == "function") return;
88
- const i = (u, ...s) => {
89
- if (u != null) return r?.(u, ...s);
88
+ const i = (s, ...u) => {
89
+ if (s != null) return r?.(s, ...u);
90
90
  };
91
91
  if (e instanceof Map || e instanceof WeakMap) {
92
92
  if (e.has(t)) return i?.(e.get(t), t, null, "@set");
93
93
  } else if (e instanceof Set || e instanceof WeakSet) {
94
94
  if (e.has(t)) return i?.(t, t, null, "@add");
95
95
  } else if (Array.isArray(e) && typeof t == "string" && [...t?.matchAll?.(/^\d+$/g)].length == 1 && Number.isInteger(typeof t == "string" ? parseInt(t) : t)) {
96
- const u = typeof t == "string" ? parseInt(t) : t;
97
- return i?.(e?.[u], u, null, "@add");
96
+ const s = typeof t == "string" ? parseInt(t) : t;
97
+ return i?.(e?.[s], s, null, "@add");
98
98
  } else if (typeof e == "function" || typeof e == "object") return i?.(e?.[t], t, null, "@set");
99
- }, yt = (e, t = {}) => (Object.entries(t)?.forEach?.(([r, n]) => {
99
+ }, St = (e, t = {}) => (Object.entries(t)?.forEach?.(([r, n]) => {
100
100
  x(n, e[r]) && (e[r] = n);
101
101
  }), e), Ve = (e, t, r) => {
102
102
  if (e == null) return;
103
103
  let n = [];
104
104
  if (e instanceof Set || e instanceof Map || typeof e?.keys == "function") return [...e?.keys?.() || n].forEach?.((i) => ae(e, i, t, r));
105
- if (Array.isArray(e) || U(e)) return [...e].forEach?.((i, u) => ae(e, u, t, r));
105
+ if (Array.isArray(e) || J(e)) return [...e].forEach?.((i, s) => ae(e, s, t, r));
106
106
  if (typeof e == "object" || typeof e == "function") return [...Object.keys(e) || n].forEach?.((i) => ae(e, i, t, r));
107
- }, x = (e, t) => e == null && t == null ? !1 : e == null || t == null ? !0 : typeof e == "boolean" && typeof t == "boolean" ? e != t : typeof e == "number" && typeof t == "number" ? !(e == t || Math.abs(e - t) < 1e-9) : typeof e == "string" && typeof t == "string" ? e != "" && t != "" && e != t || e !== t : typeof e != typeof t ? e !== t : e && t && e != t || e !== t, at = /* @__PURE__ */ new WeakMap(), ie = (e, t) => {
107
+ }, x = (e, t) => e == null && t == null ? !1 : e == null || t == null ? !0 : typeof e == "boolean" && typeof t == "boolean" ? e != t : typeof e == "number" && typeof t == "number" ? !(e == t || Math.abs(e - t) < 1e-9) : typeof e == "string" && typeof t == "string" ? e != "" && t != "" && e != t || e !== t : typeof e != typeof t ? e !== t : e && t && e != t || e !== t, pt = /* @__PURE__ */ new WeakMap(), le = (e, t) => {
108
108
  const r = e == null || e < 0 || typeof e != "number" || e == Symbol.iterator || (t != null ? e >= (t?.length || 0) : !1);
109
109
  return t != null ? Array.isArray(t) && r : !1;
110
110
  }, _ = /* @__PURE__ */ new WeakMap(), Ge = /* @__PURE__ */ new WeakMap(), T = (e, t) => e instanceof Promise || typeof e?.then == "function" ? _?.has?.(e) ? t(_?.get?.(e)) : Promise.try?.(async () => {
111
111
  const r = await e;
112
112
  return _?.set?.(e, r), r;
113
- })?.then?.(t) : t(e), dt = class {
113
+ })?.then?.(t) : t(e), mt = class {
114
114
  #t;
115
115
  #e;
116
116
  constructor(e, t) {
@@ -150,12 +150,12 @@ var Le = /* @__PURE__ */ Symbol.for("@fix"), m = (e) => typeof e == "string" ||
150
150
  get(e, t, r) {
151
151
  if (e = S(e), t == "promise") return e;
152
152
  if (t == "resolve" && this.#t) return (...i) => {
153
- const u = this.#t?.(...i);
154
- return this.#t = null, u;
153
+ const s = this.#t?.(...i);
154
+ return this.#t = null, s;
155
155
  };
156
156
  if (t == "reject" && this.#e) return (...i) => {
157
- const u = this.#e?.(...i);
158
- return this.#e = null, u;
157
+ const s = this.#e?.(...i);
158
+ return this.#e = null, s;
159
159
  };
160
160
  if (t == "then" || t == "catch" || t == "finally") {
161
161
  if (e instanceof Promise) return e?.[t]?.bind?.(e);
@@ -168,13 +168,13 @@ var Le = /* @__PURE__ */ Symbol.for("@fix"), m = (e) => typeof e == "string" ||
168
168
  return _?.has?.(e) && (n = _?.get?.(e))?.[t] != null ? n = _?.get?.(e)?.[t] : n = Ee(T(e, async (i) => {
169
169
  if (S(i) instanceof Promise) return Reflect.get(i, t, r);
170
170
  if (m(i)) return t == Symbol.toPrimitive || t == Symbol.toStringTag ? i : void 0;
171
- let u;
171
+ let s;
172
172
  try {
173
- u = Reflect.get(i, t, r);
173
+ s = Reflect.get(i, t, r);
174
174
  } catch {
175
- u = e?.[t];
175
+ s = e?.[t];
176
176
  }
177
- return typeof u == "function" ? u?.bind?.(i) : u;
177
+ return typeof s == "function" ? s?.bind?.(i) : s;
178
178
  })), t == Symbol.toStringTag ? m(n) ? String(n ?? "") || "" : n?.[Symbol.toStringTag]?.() || String(n ?? "") || "" : t == Symbol.toPrimitive ? (i) => {
179
179
  if (m(n)) return E(n, i);
180
180
  } : n;
@@ -194,34 +194,34 @@ var Le = /* @__PURE__ */ Symbol.for("@fix"), m = (e) => typeof e == "string" ||
194
194
  }
195
195
  };
196
196
  function Ee(e, t, r) {
197
- return e instanceof Promise || typeof e?.then == "function" ? _?.has?.(e) ? _?.get?.(e) : (Ge?.has?.(e) || e?.then?.((n) => _?.set?.(e, n)), Ge?.getOrInsertComputed?.(e, () => new Proxy(lt(e), new dt(t, r)))) : e;
197
+ return e instanceof Promise || typeof e?.then == "function" ? _?.has?.(e) ? _?.get?.(e) : (Ge?.has?.(e) || e?.then?.((n) => _?.set?.(e, n)), Ge?.getOrInsertComputed?.(e, () => new Proxy(yt(e), new mt(t, r)))) : e;
198
198
  }
199
199
  Symbol.observable ||= /* @__PURE__ */ Symbol.for("observable");
200
200
  Symbol.subscribe ||= /* @__PURE__ */ Symbol.for("subscribe");
201
201
  Symbol.unsubscribe ||= /* @__PURE__ */ Symbol.for("unsubscribe");
202
- var h = /* @__PURE__ */ Symbol.for("@value"), g = /* @__PURE__ */ Symbol.for("@extract"), $ = /* @__PURE__ */ Symbol.for("@origin"), le = /* @__PURE__ */ Symbol.for("@registry"), G = /* @__PURE__ */ Symbol.for("@behavior"), fe = /* @__PURE__ */ Symbol.for("@promise"), me = /* @__PURE__ */ Symbol.for("@trigger-less"), d = /* @__PURE__ */ Symbol.for("@trigger-lock"), ht = /* @__PURE__ */ Symbol.for("@trigger-control"), D = /* @__PURE__ */ Symbol.for("@trigger"), se = /* @__PURE__ */ Symbol.for("@subscribe"), vt = /* @__PURE__ */ Symbol.for("@isNotEqual"), he = /* @__PURE__ */ Symbol.for("@realProp"), qe = /* @__PURE__ */ new WeakMap(), de = (e) => {
203
- const t = typeof e == "object" || typeof e == "function" ? e?.[g] ?? e : e, r = (n) => de(n);
204
- return Array.isArray(t) ? t?.map?.(r) || Array.from(t || [])?.map?.(r) || [] : t instanceof Map || t instanceof WeakMap ? new Map(Array.from(t?.entries?.() || [])?.map?.(([n, i]) => [n, de(i)])) : t instanceof Set || t instanceof WeakSet ? new Set(Array.from(t?.values?.() || [])?.map?.(r)) : t != null && typeof t == "function" || typeof t == "object" ? Object.fromEntries(Array.from(Object.entries(t || {}) || [])?.filter?.(([n]) => n != g && n != $ && n != le)?.map?.(([n, i]) => [n, de(i)])) : t;
205
- }, bt = (e) => e?.[g] ?? e?.["@target"] ?? e, V = (e, t = !1) => {
202
+ var d = /* @__PURE__ */ Symbol.for("@value"), g = /* @__PURE__ */ Symbol.for("@extract"), $ = /* @__PURE__ */ Symbol.for("@origin"), se = /* @__PURE__ */ Symbol.for("@registry"), G = /* @__PURE__ */ Symbol.for("@behavior"), oe = /* @__PURE__ */ Symbol.for("@promise"), me = /* @__PURE__ */ Symbol.for("@trigger-less"), h = /* @__PURE__ */ Symbol.for("@trigger-lock"), gt = /* @__PURE__ */ Symbol.for("@trigger-control"), D = /* @__PURE__ */ Symbol.for("@trigger"), ue = /* @__PURE__ */ Symbol.for("@subscribe"), At = /* @__PURE__ */ Symbol.for("@isNotEqual"), de = /* @__PURE__ */ Symbol.for("@realProp"), qe = /* @__PURE__ */ new WeakMap(), he = (e) => {
203
+ const t = typeof e == "object" || typeof e == "function" ? e?.[g] ?? e : e, r = (n) => he(n);
204
+ return Array.isArray(t) ? t?.map?.(r) || Array.from(t || [])?.map?.(r) || [] : t instanceof Map || t instanceof WeakMap ? new Map(Array.from(t?.entries?.() || [])?.map?.(([n, i]) => [n, he(i)])) : t instanceof Set || t instanceof WeakSet ? new Set(Array.from(t?.values?.() || [])?.map?.(r)) : t != null && typeof t == "function" || typeof t == "object" ? Object.fromEntries(Array.from(Object.entries(t || {}) || [])?.filter?.(([n]) => n != g && n != $ && n != se)?.map?.(([n, i]) => [n, he(i)])) : t;
205
+ }, Ot = (e) => e?.[g] ?? e?.["@target"] ?? e, V = (e, t = !1) => {
206
206
  const r = e;
207
207
  if (m(e) || typeof e == "symbol") return e;
208
208
  if (e != null && (e instanceof WeakRef || "deref" in e && typeof e?.deref == "function") && (e = e?.deref?.()), e != null && (typeof e == "object" || typeof e == "function")) {
209
- e = bt(e);
210
- const n = t && M(e) && e?.value;
209
+ e = Ot(e);
210
+ const n = t && I(e) && e?.value;
211
211
  if (n != null && (typeof n == "object" || typeof n == "function") && (e = n), r != e) return V(e, t);
212
212
  }
213
213
  return e;
214
- }, We = (e) => e != null && typeof e.then == "function", St = (e, t) => m(e) || typeof e == "function" ? t?.(e) : We(e) ? e.then(t) : e?.promise && We(e.promise) ? e.promise.then(t) : t?.(e), Ue = /* @__PURE__ */ new WeakMap(), pt = new FinalizationRegistry((e) => {
214
+ }, We = (e) => e != null && typeof e.then == "function", xt = (e, t) => m(e) || typeof e == "function" ? t?.(e) : We(e) ? e.then(t) : e?.promise && We(e.promise) ? e.promise.then(t) : t?.(e), Ue = /* @__PURE__ */ new WeakMap(), wt = new FinalizationRegistry((e) => {
215
215
  e?.forEach?.((t) => t?.());
216
216
  });
217
- function I(e, t, r) {
217
+ function M(e, t, r) {
218
218
  if (!(!r || typeof r != "function" || typeof e != "object" && typeof e != "function"))
219
219
  if (t == Symbol.dispose) {
220
220
  const n = e?.[g] ?? e;
221
221
  Ue?.getOrInsertComputed?.(n, () => {
222
222
  const i = /* @__PURE__ */ new Set();
223
- return (typeof n == "object" || typeof n == "function") && (pt.register(n, i), Ue.set(n, i), n[Symbol.dispose] ??= () => i.forEach((u) => {
224
- u?.();
223
+ return (typeof n == "object" || typeof n == "function") && (wt.register(n, i), Ue.set(n, i), n[Symbol.dispose] ??= () => i.forEach((s) => {
224
+ s?.();
225
225
  })), i;
226
226
  })?.add?.(r);
227
227
  } else e[t] = function(...n) {
@@ -229,12 +229,12 @@ function I(e, t, r) {
229
229
  typeof i == "function" && i.apply(this, n), r.apply(this, n);
230
230
  };
231
231
  }
232
- var j = (e) => {
232
+ var ee = (e) => {
233
233
  if (typeof e != "string" || e === "") return !1;
234
234
  const t = Number(e);
235
235
  return Number.isInteger(t) && t >= 0 && String(t) === e;
236
236
  };
237
- function or(e = [], t = {}) {
237
+ function vr(e = [], t = {}) {
238
238
  let r = /* @__PURE__ */ new Set();
239
239
  const n = (l, f, o) => {
240
240
  t.onDuplicate?.({
@@ -251,10 +251,10 @@ function or(e = [], t = {}) {
251
251
  }
252
252
  r.add(l);
253
253
  }
254
- const i = () => Array.from(r), u = (l) => {
254
+ const i = () => Array.from(r), s = (l) => {
255
255
  r.clear();
256
256
  for (const f of l) r.add(f);
257
- }, s = {
257
+ }, u = {
258
258
  push: (...l) => {
259
259
  let f = r.size;
260
260
  for (const o of l) {
@@ -290,19 +290,19 @@ function or(e = [], t = {}) {
290
290
  }
291
291
  if (!o.length) return f.length;
292
292
  const y = [...o, ...f];
293
- return u(y), y.length;
293
+ return s(y), y.length;
294
294
  },
295
295
  splice: (l, f, ...o) => {
296
296
  const y = i(), a = Math.min(Math.max(l, 0), y.length), v = f === void 0 ? y.length - a : Math.max(0, Math.min(f, y.length - a)), A = y.splice(a, v);
297
- let R = a;
297
+ let w = a;
298
298
  for (const O of o) {
299
299
  if (y.includes(O)) {
300
- n(O, "splice", R);
300
+ n(O, "splice", w);
301
301
  continue;
302
302
  }
303
- y.splice(R++, 0, O);
303
+ y.splice(w++, 0, O);
304
304
  }
305
- return u(y), A;
305
+ return s(y), A;
306
306
  },
307
307
  includes: (l) => r.has(l),
308
308
  indexOf: (l) => i().indexOf(l),
@@ -314,11 +314,11 @@ function or(e = [], t = {}) {
314
314
  toSet: () => new Set(r),
315
315
  [Symbol.iterator]: () => r[Symbol.iterator]()
316
316
  };
317
- return new Proxy(s, {
317
+ return new Proxy(u, {
318
318
  get: (l, f) => {
319
319
  if (f === "length") return r.size;
320
- if (j(f)) return i()[Number(f)];
321
- const o = s[f];
320
+ if (ee(f)) return i()[Number(f)];
321
+ const o = u[f];
322
322
  return o;
323
323
  },
324
324
  set: (l, f, o) => {
@@ -327,16 +327,16 @@ function or(e = [], t = {}) {
327
327
  const y = Math.floor(o);
328
328
  if (y >= r.size) return !0;
329
329
  const a = i().slice(0, y);
330
- return u(a), !0;
330
+ return s(a), !0;
331
331
  }
332
- if (j(f)) {
332
+ if (ee(f)) {
333
333
  const y = i(), a = Number(f);
334
334
  if (a > y.length) return !0;
335
335
  const v = o;
336
336
  if (a < y.length) {
337
337
  const A = y[a];
338
338
  if (Object.is(A, v)) return !0;
339
- if (y.some((R, O) => O !== a && Object.is(R, v)))
339
+ if (y.some((w, O) => O !== a && Object.is(w, v)))
340
340
  return n(v, "set", a), !0;
341
341
  y[a] = v;
342
342
  } else {
@@ -344,17 +344,17 @@ function or(e = [], t = {}) {
344
344
  return n(v, "set", a), !0;
345
345
  y.push(v);
346
346
  }
347
- return u(y), !0;
347
+ return s(y), !0;
348
348
  }
349
- return Reflect.set(s, f, o);
349
+ return Reflect.set(u, f, o);
350
350
  },
351
351
  deleteProperty: (l, f) => {
352
352
  if (f === "length") return !1;
353
- if (j(f)) {
353
+ if (ee(f)) {
354
354
  const o = i(), y = Number(f);
355
- return y >= o.length || (o.splice(y, 1), u(o)), !0;
355
+ return y >= o.length || (o.splice(y, 1), s(o)), !0;
356
356
  }
357
- return Reflect.deleteProperty(s, f);
357
+ return Reflect.deleteProperty(u, f);
358
358
  },
359
359
  ownKeys: () => {
360
360
  const l = [];
@@ -369,7 +369,7 @@ function or(e = [], t = {}) {
369
369
  writable: !0,
370
370
  value: r.size
371
371
  };
372
- if (j(f)) {
372
+ if (ee(f)) {
373
373
  const o = i(), y = Number(f);
374
374
  return y >= o.length ? void 0 : {
375
375
  configurable: !0,
@@ -378,19 +378,19 @@ function or(e = [], t = {}) {
378
378
  value: o[y]
379
379
  };
380
380
  }
381
- return Reflect.getOwnPropertyDescriptor(s, f);
381
+ return Reflect.getOwnPropertyDescriptor(u, f);
382
382
  },
383
383
  has: (l, f) => {
384
384
  if (f === "length") return !0;
385
- if (j(f)) {
385
+ if (ee(f)) {
386
386
  const o = Number(f);
387
387
  return o >= 0 && o < r.size;
388
388
  }
389
- return f in s;
389
+ return f in u;
390
390
  }
391
391
  });
392
392
  }
393
- var mt = class {
393
+ var Rt = class {
394
394
  constructor() {
395
395
  }
396
396
  deleteProperty(e, t) {
@@ -406,36 +406,44 @@ var mt = class {
406
406
  return Reflect.has(e, t);
407
407
  }
408
408
  set(e, t, r) {
409
- return ne(e, r, t), !0;
409
+ return ie(e, r, t), !0;
410
410
  }
411
411
  get(e, t, r) {
412
412
  return typeof t == "symbol" ? e?.[t] ?? e : Reflect.get(e, t, r);
413
413
  }
414
- }, cr = (e) => {
414
+ }, br = (e) => {
415
415
  if (e?.[$] || qe.has(e)) return e;
416
- const t = new Proxy(e, new mt());
416
+ const t = new Proxy(e, new Rt());
417
417
  return qe.set(t, e), t;
418
- }, gt = /* @__PURE__ */ new WeakMap(), At = (e, t, r) => gt.getOrInsert(e, () => {
418
+ }, Le = /* @__PURE__ */ Symbol.for("object.ts@withUnsub");
419
+ globalThis[Le] ??= /* @__PURE__ */ new WeakMap();
420
+ var Pt = globalThis[Le], Tt = (e, t, r) => Pt.getOrInsert(e, () => {
419
421
  const n = t?.deref?.();
420
422
  n?.affected?.(r);
421
- const i = e?.complete?.bind?.(e), u = () => {
422
- const s = i?.();
423
- return n?.unaffected?.(r), s;
423
+ const i = e?.complete?.bind?.(e), s = () => {
424
+ const u = i?.();
425
+ return n?.unaffected?.(r), u;
424
426
  };
425
- return e.complete = u, {
426
- unaffected: u,
427
- [Symbol.dispose]: u,
428
- [Symbol.asyncDispose]: u
427
+ return e.complete = s, {
428
+ unaffected: s,
429
+ [Symbol.dispose]: s,
430
+ [Symbol.asyncDispose]: s
429
431
  };
430
- }), p = /* @__PURE__ */ new WeakMap(), ve = /* @__PURE__ */ new Map(), Je = (e, t = ["*"]) => {
432
+ }), et = /* @__PURE__ */ Symbol.for("object.ts@subscriptRegistry");
433
+ globalThis[et] ??= /* @__PURE__ */ new WeakMap();
434
+ var p = globalThis[et] ??= /* @__PURE__ */ new WeakMap(), tt = /* @__PURE__ */ Symbol.for("object.ts@globalEffectListeners");
435
+ globalThis[tt] ??= /* @__PURE__ */ new Map();
436
+ var ve = globalThis[tt], Je = (e, t = ["*"]) => {
431
437
  if (e == null || typeof e != "function") return;
432
- const r = rt(t);
438
+ const r = ut(t);
433
439
  return ve.set(e, r.affectTypes), () => ve.delete(e);
434
- }, Ot = /* @__PURE__ */ new WeakMap(), xt = (e, t) => {
440
+ }, rt = /* @__PURE__ */ Symbol.for("object.ts@wrapped");
441
+ globalThis[rt] ??= /* @__PURE__ */ new WeakMap();
442
+ var Mt = globalThis[rt], It = (e, t) => {
435
443
  const r = e?.[g] ?? e;
436
444
  let n = p.get(r);
437
- return n ? n.bindSource(r) : (n = new wt(r), p.set(r, n)), t;
438
- }, oe = (e, t) => (e = V(e?.[g] ?? e), typeof e == "symbol" || !(typeof e == "object" || typeof e == "function") || e == null ? e : Ot.getOrInsertComputed(e, () => new Proxy(e, xt(e, t)))), ee = /* @__PURE__ */ Symbol.for("@allProps"), je = /* @__PURE__ */ new Set(["*", "all"]), ze = /* @__PURE__ */ new Map([
445
+ return n ? n.bindSource(r) : (n = new Et(r), p.set(r, n)), t;
446
+ }, ce = (e, t) => (e = V(e?.[g] ?? e), typeof e == "symbol" || !(typeof e == "object" || typeof e == "function") || e == null ? e : Mt.getOrInsertComputed(e, () => new Proxy(e, It(e, t)))), te = /* @__PURE__ */ Symbol.for("@allProps"), nt = /* @__PURE__ */ new Set(["*", "all"]), Ce = /* @__PURE__ */ new Map([
439
447
  ["set", ["setter", "@set"]],
440
448
  ["add", ["@add"]],
441
449
  ["delete", ["@delete"]],
@@ -445,39 +453,42 @@ var mt = class {
445
453
  ["setAll", ["@setAll"]],
446
454
  ["addAll", ["@addAll"]],
447
455
  ["deleteAll", ["@deleteAll", "@clear"]]
448
- ]), Rt = new Map(Array.from(ze.entries()).flatMap(([e, t]) => t.map((r) => [r, e]))), ue = (e = "set") => {
456
+ ]), it = /* @__PURE__ */ Symbol.for("object.ts@triggerCanonicalNames");
457
+ globalThis[it] ??= new Map(Array.from(Ce.entries()).flatMap(([e, t]) => t.map((r) => [r, e])));
458
+ var kt = globalThis[it], fe = (e = "set") => {
449
459
  if (e == null) return e;
450
460
  const t = String(e || "set");
451
- return Rt.get(t) ?? t;
452
- }, et = (e) => {
453
- const t = e == null ? "all" : String(ue(e) ?? "all");
454
- return [t, ...ze.get(t) ?? []];
455
- }, Qe = (e = ["*"]) => new Set([...X(e)].flatMap((t) => [t, ...ze.get(t) ?? []])), X = (e = ["*"]) => {
461
+ return kt.get(t) ?? t;
462
+ }, lt = (e) => {
463
+ const t = e == null ? "all" : String(fe(e) ?? "all");
464
+ return [t, ...Ce.get(t) ?? []];
465
+ }, Qe = (e = ["*"]) => new Set([...Y(e)].flatMap((t) => [t, ...Ce.get(t) ?? []])), Y = (e = ["*"]) => {
456
466
  const t = typeof e == "string" ? [e] : Array.from(e ?? ["*"]), r = new Set(t.map((n) => {
457
467
  const i = String(n || "*");
458
- return je.has(i) ? i : String(ue(i) ?? i);
468
+ return nt.has(i) ? i : String(fe(i) ?? i);
459
469
  }));
460
470
  return r.size ? r : /* @__PURE__ */ new Set(["*"]);
461
- }, J = (e, t) => {
462
- const r = e instanceof Set ? e : X(e);
463
- return [...je].some((n) => r.has(n)) || et(t).some((n) => r.has(n));
464
- }, tt = (e) => !!e && typeof e == "object" && !Array.isArray(e) && ("affectTypes" in e || "triggers" in e || "triggerImmediately" in e), ge = (e = ["*"]) => {
465
- if (tt(e)) return {
466
- affectTypes: X(e.affectTypes ?? e.triggers ?? ["*"]),
471
+ }, Q = (e, t) => {
472
+ const r = e instanceof Set ? e : Y(e);
473
+ return [...nt].some((n) => r.has(n)) || lt(t).some((n) => r.has(n));
474
+ }, st = (e) => !!e && typeof e == "object" && !Array.isArray(e) && ("affectTypes" in e || "triggers" in e || "triggerImmediately" in e), ge = (e = ["*"]) => {
475
+ if (st(e)) return {
476
+ affectTypes: Y(e.affectTypes ?? e.triggers ?? ["*"]),
467
477
  triggerImmediately: e.triggerImmediately !== !1
468
478
  };
469
- const t = X(e);
479
+ const t = Y(e);
470
480
  return {
471
481
  affectTypes: t,
472
- triggerImmediately: J(t, "initial")
482
+ triggerImmediately: Q(t, "initial")
473
483
  };
474
- }, rt = (e = ["*"]) => tt(e) ? {
475
- affectTypes: X(e.affectTypes ?? e.triggers ?? ["*"]),
484
+ }, ut = (e = ["*"]) => st(e) ? {
485
+ affectTypes: Y(e.affectTypes ?? e.triggers ?? ["*"]),
476
486
  triggerImmediately: e.triggerImmediately === !0
477
487
  } : {
478
- affectTypes: X(e),
488
+ affectTypes: Y(e),
479
489
  triggerImmediately: !1
480
- }, wt = class {
490
+ }, ft = /* @__PURE__ */ Symbol.for("object.ts@Subscript");
491
+ globalThis[ft] ??= class {
481
492
  compatible;
482
493
  #t;
483
494
  #e;
@@ -490,133 +501,133 @@ var mt = class {
490
501
  #y = /* @__PURE__ */ new Map();
491
502
  #i = /* @__PURE__ */ new Map();
492
503
  #s = !1;
493
- constructor(e) {
494
- this.#t = e, this.#e = /* @__PURE__ */ new Map(), this.#r = /* @__PURE__ */ new WeakSet(), this.#c = {
495
- enable: (n = ["*"], i) => i ? this.withTriggers(n, !0, i) : this.setTriggersEnabled(n, !0),
496
- disable: (n = ["*"], i) => i ? this.withTriggers(n, !1, i) : this.setTriggersEnabled(n, !1),
497
- set: (n, i) => this.setTriggersEnabled(n, i),
498
- with: (n, i) => this.withTriggers(n, !0, i),
499
- without: (n, i) => this.withTriggers(n, !1, i),
500
- isEnabled: (n) => this.isTriggerEnabled(n)
501
- }, this.#o = { next: (n) => {
502
- n && (Array.isArray(n) ? this.#u(...n) : this.#u(n));
504
+ constructor(t) {
505
+ this.#t = t, this.#e = /* @__PURE__ */ new Map(), this.#r = /* @__PURE__ */ new WeakSet(), this.#c = {
506
+ enable: (i = ["*"], s) => s ? this.withTriggers(i, !0, s) : this.setTriggersEnabled(i, !0),
507
+ disable: (i = ["*"], s) => s ? this.withTriggers(i, !1, s) : this.setTriggersEnabled(i, !1),
508
+ set: (i, s) => this.setTriggersEnabled(i, s),
509
+ with: (i, s) => this.withTriggers(i, !0, s),
510
+ without: (i, s) => this.withTriggers(i, !1, s),
511
+ isEnabled: (i) => this.isTriggerEnabled(i)
512
+ }, this.#o = { next: (i) => {
513
+ i && (Array.isArray(i) ? this.#u(...i) : this.#u(i));
503
514
  } };
504
- const t = new WeakRef(this), r = function(n) {
505
- const i = n?.next?.bind?.(n);
506
- return At(n, t, i);
515
+ const r = new WeakRef(this), n = function(i) {
516
+ const s = i?.next?.bind?.(i);
517
+ return Tt(i, r, s);
507
518
  };
508
- this.#f = typeof Observable < "u" ? new Observable(r) : null, this.compatible = () => this.#f;
519
+ this.#f = typeof Observable < "u" ? new Observable(n) : null, this.compatible = () => this.#f;
509
520
  }
510
- bindSource(e) {
511
- return this.#t ??= e, this;
521
+ bindSource(t) {
522
+ return this.#t ??= t, this;
512
523
  }
513
- $safeExec(e, ...t) {
514
- if (!(!e || this.#r.has(e))) {
515
- this.#r.add(e);
524
+ $safeExec(t, ...r) {
525
+ if (!(!t || this.#r.has(t))) {
526
+ this.#r.add(t);
516
527
  try {
517
- const r = e(...t);
518
- if (r && typeof r.then == "function") {
519
- r.catch(console.warn);
528
+ const n = t(...r);
529
+ if (n && typeof n.then == "function") {
530
+ n.catch(console.warn);
520
531
  return;
521
532
  }
522
- return r;
523
- } catch (r) {
524
- console.warn(r);
533
+ return n;
534
+ } catch (n) {
535
+ console.warn(n);
525
536
  } finally {
526
- this.#r.delete(e);
537
+ this.#r.delete(t);
527
538
  }
528
539
  }
529
540
  }
530
- #u(e, t = null, r, n = "all", ...i) {
531
- n = ue(n) ?? n;
541
+ #u(t, r = null, n, i = "all", ...s) {
542
+ i = fe(i) ?? i;
532
543
  const u = this.#e;
533
544
  if (u?.size)
534
- for (const [s, l] of u.entries()) (l.prop === e || l.prop === ee || l.prop === null) && J(l.triggers, n) && this.$safeExec(s, t, e, r, n, ...i);
545
+ for (const [l, f] of u.entries()) (f.prop === t || f.prop === te || f.prop === null) && Q(f.triggers, i) && this.$safeExec(l, r, t, n, i, ...s);
535
546
  if (ve.size) {
536
- const s = {
547
+ const l = {
537
548
  source: this.#t,
538
549
  target: this.#t,
539
- value: t,
540
- prop: e,
541
- name: e,
542
- oldValue: r,
543
- trigger: n,
544
- args: i
550
+ value: r,
551
+ prop: t,
552
+ name: t,
553
+ oldValue: n,
554
+ trigger: i,
555
+ args: s
545
556
  };
546
- for (const [l, f] of ve.entries()) J(f, n) && this.$safeExec(l, s);
557
+ for (const [f, o] of ve.entries()) Q(o, i) && this.$safeExec(f, l);
547
558
  }
548
559
  }
549
- wrap(e) {
550
- return Array.isArray(e) ? oe(e, this) : e;
560
+ wrap(t) {
561
+ return Array.isArray(t) ? ce(t, this) : t;
551
562
  }
552
563
  get triggerControl() {
553
564
  return this.#c;
554
565
  }
555
- isTriggerEnabled(e) {
556
- return !J(this.#n, "all") && !et(e).some((t) => this.#n.has(t));
566
+ isTriggerEnabled(t) {
567
+ return !Q(this.#n, "all") && !lt(t).some((r) => this.#n.has(r));
557
568
  }
558
- setTriggersEnabled(e = ["*"], t = !0) {
559
- const r = Qe(e);
560
- for (const n of r) t ? this.#n.delete(n) : this.#n.add(n);
569
+ setTriggersEnabled(t = ["*"], r = !0) {
570
+ const n = Qe(t);
571
+ for (const i of n) r ? this.#n.delete(i) : this.#n.add(i);
561
572
  }
562
- withTriggers(e, t, r) {
563
- const n = [...Qe(e)], i = new Map(n.map((s) => [s, this.#n.has(s)])), u = () => {
564
- i.forEach((s, l) => {
565
- s ? this.#n.add(l) : this.#n.delete(l);
573
+ withTriggers(t, r, n) {
574
+ const i = [...Qe(t)], s = new Map(i.map((l) => [l, this.#n.has(l)])), u = () => {
575
+ s.forEach((l, f) => {
576
+ l ? this.#n.add(f) : this.#n.delete(f);
566
577
  });
567
578
  };
568
- this.setTriggersEnabled(n, t);
579
+ this.setTriggersEnabled(i, r);
569
580
  try {
570
- const s = r?.();
571
- return s && typeof s.finally == "function" ? s.finally(u) : (u(), s);
572
- } catch (s) {
573
- throw u(), s;
581
+ const l = n?.();
582
+ return l && typeof l.finally == "function" ? l.finally(u) : (u(), l);
583
+ } catch (l) {
584
+ throw u(), l;
574
585
  }
575
586
  }
576
- affected(e, t, r = ["*"]) {
577
- if (e == null || typeof e != "function") return;
578
- const n = ge(r);
579
- return this.#e.set(e, {
580
- prop: t || ee,
581
- triggers: n.affectTypes
582
- }), () => this.unaffected(e, t || ee);
583
- }
584
- unaffected(e, t) {
585
- if (e != null && typeof e == "function") {
586
- const r = this.#e, n = r?.get(e);
587
- if (n && (n.prop == t || t == null || t == ee))
588
- return r.delete(e), () => this.affected(e, t || ee, n.triggers);
587
+ affected(t, r, n = ["*"]) {
588
+ if (t == null || typeof t != "function") return;
589
+ const i = ge(n);
590
+ return this.#e.set(t, {
591
+ prop: r || te,
592
+ triggers: i.affectTypes
593
+ }), () => this.unaffected(t, r || te);
594
+ }
595
+ unaffected(t, r) {
596
+ if (t != null && typeof t == "function") {
597
+ const n = this.#e, i = n?.get(t);
598
+ if (i && (i.prop == r || r == null || r == te))
599
+ return n.delete(t), () => this.affected(t, r || te, i.triggers);
589
600
  }
590
601
  return this.#e.clear();
591
602
  }
592
- trigger(e, t, r, n = "set", ...i) {
593
- if (typeof e == "symbol" || (n === void 0 && (n = "set"), n = ue(n) ?? n, !this.isTriggerEnabled(n))) return;
594
- const u = `${n ?? "all"}`;
595
- let s = this.#i.get(e);
596
- s || (s = /* @__PURE__ */ new Map(), this.#i.set(e, s)), s.set(u, [
597
- e,
603
+ trigger(t, r, n, i = "set", ...s) {
604
+ if (typeof t == "symbol" || (i === void 0 && (i = "set"), i = fe(i) ?? i, !this.isTriggerEnabled(i))) return;
605
+ const u = `${i ?? "all"}`;
606
+ let l = this.#i.get(t);
607
+ l || (l = /* @__PURE__ */ new Map(), this.#i.set(t, l)), l.set(u, [
598
608
  t,
599
609
  r,
600
610
  n,
601
- i
611
+ i,
612
+ s
602
613
  ]), !this.#s && (this.#s = !0, queueMicrotask(() => {
603
614
  this.#s = !1;
604
- const l = this.#i;
615
+ const f = this.#i;
605
616
  this.#i = /* @__PURE__ */ new Map();
606
- for (const [f, o] of l)
607
- if (!(f != null && this.#l.has(f))) {
608
- f != null && this.#l.add(f);
617
+ for (const [o, y] of f)
618
+ if (!(o != null && this.#l.has(o))) {
619
+ o != null && this.#l.add(o);
609
620
  try {
610
- for (const [, y] of o) {
611
- const [a, v, A, R, O] = y;
621
+ for (const [, a] of y) {
622
+ const [v, A, w, O, k] = a;
612
623
  try {
613
- this.#u(a, v, A, R, ...O ?? []);
614
- } catch (k) {
615
- console.warn(k);
624
+ this.#u(v, A, w, O, ...k ?? []);
625
+ } catch (q) {
626
+ console.warn(q);
616
627
  }
617
628
  }
618
629
  } finally {
619
- f != null && this.#l.delete(f);
630
+ o != null && this.#l.delete(o);
620
631
  }
621
632
  }
622
633
  }));
@@ -624,7 +635,8 @@ var mt = class {
624
635
  get iterator() {
625
636
  return this.#o;
626
637
  }
627
- }, Pt = /* @__PURE__ */ new Set([
638
+ };
639
+ var Et = globalThis[ft], Wt = /* @__PURE__ */ new Set([
628
640
  Symbol.toStringTag,
629
641
  Symbol.iterator,
630
642
  Symbol.asyncIterator,
@@ -639,19 +651,19 @@ var mt = class {
639
651
  "catch",
640
652
  "finally",
641
653
  "next"
642
- ]), te = (e, t) => {
643
- if (!Pt.has(t)) return null;
654
+ ]), re = (e, t) => {
655
+ if (!Wt.has(t)) return null;
644
656
  const r = c(e, t);
645
657
  return typeof r == "function" ? K(e, r) : r;
646
- }, w = /* @__PURE__ */ new WeakMap();
647
- function Tt(e, t) {
658
+ }, R = /* @__PURE__ */ new WeakMap();
659
+ function $t(e, t) {
648
660
  let r = !0;
649
661
  try {
650
- w?.getOrInsert?.(e, /* @__PURE__ */ new Set())?.add?.(t), w?.get?.(e)?.has?.(t) && (r = !0), r = typeof Reflect.getOwnPropertyDescriptor(e, t)?.get == "function";
662
+ R?.getOrInsert?.(e, /* @__PURE__ */ new Set())?.add?.(t), R?.get?.(e)?.has?.(t) && (r = !0), r = typeof Reflect.getOwnPropertyDescriptor(e, t)?.get == "function";
651
663
  } catch {
652
664
  r = !0;
653
665
  } finally {
654
- w?.get?.(e)?.delete?.(t);
666
+ R?.get?.(e)?.delete?.(t);
655
667
  }
656
668
  return r;
657
669
  }
@@ -663,16 +675,16 @@ var H = (e, t) => {
663
675
  return n != null && !m(n) ? H(n, t) : r;
664
676
  } else if (t == "value" && r != null && !m(r) && typeof r != "function") return H(r, t) ?? r ?? e;
665
677
  return r ?? e;
666
- }, It = (e, t, r) => {
678
+ }, _t = (e, t, r) => {
667
679
  if (e == null) return !1;
668
680
  let n = __safeSetGuard.getOrInsert(e, /* @__PURE__ */ new Set());
669
681
  return n?.has?.(t) ? !1 : (n?.add?.(t), Reflect.set(e, t, r));
670
682
  }, c = (e, t, r) => {
671
683
  let n;
672
684
  if (e == null) return e;
673
- let i = w.getOrInsert(e, /* @__PURE__ */ new Set());
685
+ let i = R.getOrInsert(e, /* @__PURE__ */ new Set());
674
686
  if (i?.has?.(t)) return null;
675
- if (!Tt(e, t)) n ??= Reflect.get(e, t, r ?? e);
687
+ if (!$t(e, t)) n ??= Reflect.get(e, t, r ?? e);
676
688
  else {
677
689
  i?.add?.(t);
678
690
  try {
@@ -680,29 +692,29 @@ var H = (e, t) => {
680
692
  } catch {
681
693
  n = void 0;
682
694
  } finally {
683
- i.delete(t), i?.size === 0 && w?.delete?.(e);
695
+ i.delete(t), i?.size === 0 && R?.delete?.(e);
684
696
  }
685
697
  }
686
698
  return typeof n == "function" ? K(e, n) : n;
687
- }, W = (e, t) => Object.prototype.hasOwnProperty.call(e, t), Pe = (e, t = !1) => !!e && typeof e == "object" && !Array.isArray(e) && (W(e, "key") || W(e, "name") || W(e, "oldValue") || W(e, "old") || W(e, "op") || W(e, "trigger") || t && W(e, "value")), N = (e, t, r) => W(e, t) ? e[t] : t == "oldValue" && W(e, "old") ? e.old : r(), Ae = (e, t = "manual") => ue(e.trigger ?? e.op ?? t), Mt = (e) => typeof e == "string" || typeof e == "number" || typeof e == "symbol", be = (e) => {
688
- const t = c(e, he) ?? c(e, "realProp");
689
- return Mt(t) ? t : null;
690
- }, Xe = (e, t) => t == "value" ? be(e) ?? t : t, kt = (e, t) => {
699
+ }, W = (e, t) => Object.prototype.hasOwnProperty.call(e, t), Pe = (e, t = !1) => !!e && typeof e == "object" && !Array.isArray(e) && (W(e, "key") || W(e, "name") || W(e, "oldValue") || W(e, "old") || W(e, "op") || W(e, "trigger") || t && W(e, "value")), z = (e, t, r) => W(e, t) ? e[t] : t == "oldValue" && W(e, "old") ? e.old : r(), Ae = (e, t = "manual") => fe(e.trigger ?? e.op ?? t), Vt = (e) => typeof e == "string" || typeof e == "number" || typeof e == "symbol", be = (e) => {
700
+ const t = c(e, de) ?? c(e, "realProp");
701
+ return Vt(t) ? t : null;
702
+ }, Xe = (e, t) => t == "value" ? be(e) ?? t : t, Ct = (e, t) => {
691
703
  const r = be(e);
692
- return r != null && t == r ? c(e, "value") ?? c(e, h) ?? c(e, t) : t == null ? void 0 : c(e, t);
704
+ return r != null && t == r ? c(e, "value") ?? c(e, d) ?? c(e, t) : t == null ? void 0 : c(e, t);
693
705
  }, Oe = (e, t) => {
694
- const r = (i, u, s) => (Pe(u) || (s ??= u), t(Pe(i) ? i : Pe(u, !0) ? {
706
+ const r = (i, s, u) => (Pe(s) || (u ??= s), t(Pe(i) ? i : Pe(s, !0) ? {
695
707
  key: i,
696
- trigger: s,
697
- ...u
708
+ trigger: u,
709
+ ...s
698
710
  } : {
699
711
  key: i,
700
- trigger: s ?? u
712
+ trigger: u ?? s
701
713
  })), n = e?.triggerControl;
702
- return n && Object.assign(r, n), r.custom = (i, u, s, l) => r({
703
- key: u,
714
+ return n && Object.assign(r, n), r.custom = (i, s, u, l) => r({
715
+ key: s,
704
716
  trigger: i,
705
- value: s,
717
+ value: u,
706
718
  oldValue: l
707
719
  }), r;
708
720
  }, xe = (e, t, r) => {
@@ -713,32 +725,32 @@ var H = (e, t) => {
713
725
  "@target",
714
726
  $,
715
727
  g,
716
- le
728
+ se
717
729
  ].indexOf(t) < 0 ? c(e, t)?.bind?.(e) : null) != null) return null;
718
730
  if ([g, $].indexOf(t) >= 0) return c(e, t) ?? e;
719
- if (t == h) return c(e, t) ?? c(e, "value");
720
- if (t == le) return r;
721
- if (t == ht) return r?.triggerControl;
731
+ if (t == d) return c(e, t) ?? c(e, "value");
732
+ if (t == se) return r;
733
+ if (t == gt) return r?.triggerControl;
722
734
  if (t == Symbol.observable) return r?.compatible;
723
- if (t == Symbol.subscribe) return (n, i, u) => b(i != null ? [e, i] : e, n, u);
735
+ if (t == Symbol.subscribe) return (n, i, s) => b(i != null ? [e, i] : e, n, s);
724
736
  if (t == Symbol.iterator || t == Symbol.asyncIterator) return c(e, t);
725
737
  if (t == Symbol.dispose) return (n) => {
726
- c(e, Symbol.dispose)?.(n), Me(n != null ? [e, n] : e);
738
+ c(e, Symbol.dispose)?.(n), Ie(n != null ? [e, n] : e);
727
739
  };
728
740
  if (t == Symbol.asyncDispose) return (n) => {
729
- c(e, Symbol.asyncDispose)?.(n), Me(n != null ? [e, n] : e);
741
+ c(e, Symbol.asyncDispose)?.(n), Ie(n != null ? [e, n] : e);
730
742
  };
731
- if (t == Symbol.unsubscribe) return (n) => Me(n != null ? [e, n] : e);
743
+ if (t == Symbol.unsubscribe) return (n) => Ie(n != null ? [e, n] : e);
732
744
  if (typeof t == "symbol" && (t in e || c(e, t) != null)) return c(e, t);
733
- }, Re = (e, t, r) => {
745
+ }, we = (e, t, r) => {
734
746
  if (t == "subscribe") return r?.compatible?.[t] ?? ((n) => {
735
747
  if (typeof n == "function") return b(e, n);
736
748
  if ("next" in n && n?.next != null) {
737
- const i = b(e, n?.next), u = n?.complete;
738
- return n.complete = (...s) => (i?.(), u?.(...s)), n.complete;
749
+ const i = b(e, n?.next), s = n?.complete;
750
+ return n.complete = (...u) => (i?.(), s?.(...u)), n.complete;
739
751
  }
740
752
  });
741
- }, Et = class {
753
+ }, Nt = class {
742
754
  #t;
743
755
  #e;
744
756
  #r;
@@ -746,37 +758,37 @@ var H = (e, t) => {
746
758
  this.#t = e, this.#e = t, this.#r = r;
747
759
  }
748
760
  get(e, t, r) {
749
- const n = te(e, t);
761
+ const n = re(e, t);
750
762
  return n ?? Reflect.get(e, t, r);
751
763
  }
752
764
  apply(e, t, r) {
753
- let n = [], i = [], u = [], s = [...this.#e], l = -1;
765
+ let n = [], i = [], s = [], u = [...this.#e], l = -1;
754
766
  const f = Reflect.apply(e, t || this.#e, r);
755
- if (this.#r?.[d])
767
+ if (this.#r?.[h])
756
768
  return Array.isArray(f) ? $e(f) : f;
757
769
  switch (this.#t) {
758
770
  case "push":
759
- l = s?.length, n = r;
771
+ l = u?.length, n = r;
760
772
  break;
761
773
  case "unshift":
762
774
  l = 0, n = r;
763
775
  break;
764
776
  case "pop":
765
- l = s?.length - 1, s.length > 0 && (i = [s[l]]);
777
+ l = u?.length - 1, u.length > 0 && (i = [u[l]]);
766
778
  break;
767
779
  case "shift":
768
- l = 0, s.length > 0 && (i = [s[l]]);
780
+ l = 0, u.length > 0 && (i = [u[l]]);
769
781
  break;
770
782
  case "splice":
771
783
  l = r[0];
772
- for (let y = 0; y < Math.max(s.length, this.#e.length); y++) {
773
- const a = s[y], v = this.#e[y];
774
- v === void 0 && y >= this.#e.length ? i.push(a) : a === void 0 && y >= s.length ? u.push([
784
+ for (let y = 0; y < Math.max(u.length, this.#e.length); y++) {
785
+ const a = u[y], v = this.#e[y];
786
+ v === void 0 && y >= this.#e.length ? i.push(a) : a === void 0 && y >= u.length ? s.push([
775
787
  y,
776
788
  v,
777
789
  void 0,
778
790
  !1
779
- ]) : x(a, v) && u.push([
791
+ ]) : x(a, v) && s.push([
780
792
  y,
781
793
  v,
782
794
  a,
@@ -789,46 +801,46 @@ var H = (e, t) => {
789
801
  case "reverse":
790
802
  case "copyWithin":
791
803
  l = 0;
792
- for (let y = 0; y < s.length; y++) x(s[y], this.#e[y]) && u.push([
804
+ for (let y = 0; y < u.length; y++) x(u[y], this.#e[y]) && s.push([
793
805
  l + y,
794
806
  this.#e[y],
795
- s[y],
807
+ u[y],
796
808
  !0
797
809
  ]);
798
810
  break;
799
811
  case "set":
800
- l = r[1], u.push([
812
+ l = r[1], s.push([
801
813
  l,
802
814
  r[0],
803
- s?.[l],
804
- l in s
815
+ u?.[l],
816
+ l in u
805
817
  ]);
806
818
  break;
807
819
  }
808
820
  const o = p.get(this.#e);
809
- return n?.length == 1 ? o?.trigger?.(l, n[0], null, "add") : n?.length > 1 && (o?.trigger?.(l, n, null, "addAll"), n.forEach((y, a) => o?.trigger?.(l + a, y, null, "add"))), u?.length == 1 ? o?.trigger?.(u[0]?.[0] ?? l, u[0]?.[1], u[0]?.[2], u[0]?.[3] === !1 ? "add" : "set") : u?.length > 1 && (o?.trigger?.(l, u, s, "setAll"), u.forEach((y, a) => o?.trigger?.(y?.[0] ?? l + a, y?.[1], y?.[2], y?.[3] === !1 ? "add" : "set"))), i?.length == 1 ? o?.trigger?.(l, null, i[0], "delete") : i?.length > 1 && (o?.trigger?.(l, null, i, "deleteAll"), i.forEach((y, a) => o?.trigger?.(l + a, null, y, "delete"))), f == e ? new Proxy(f, this.#r) : Array.isArray(f) ? $e(f) : f;
821
+ return n?.length == 1 ? o?.trigger?.(l, n[0], null, "add") : n?.length > 1 && (o?.trigger?.(l, n, null, "addAll"), n.forEach((y, a) => o?.trigger?.(l + a, y, null, "add"))), s?.length == 1 ? o?.trigger?.(s[0]?.[0] ?? l, s[0]?.[1], s[0]?.[2], s[0]?.[3] === !1 ? "add" : "set") : s?.length > 1 && (o?.trigger?.(l, s, u, "setAll"), s.forEach((y, a) => o?.trigger?.(y?.[0] ?? l + a, y?.[1], y?.[2], y?.[3] === !1 ? "add" : "set"))), i?.length == 1 ? o?.trigger?.(l, null, i[0], "delete") : i?.length > 1 && (o?.trigger?.(l, null, i, "deleteAll"), i.forEach((y, a) => o?.trigger?.(l + a, null, y, "delete"))), f == e ? new Proxy(f, this.#r) : Array.isArray(f) ? $e(f) : f;
810
822
  }
811
- }, Wt = (e, t, r, n) => {
823
+ }, zt = (e, t, r, n) => {
812
824
  const i = Number.isInteger(r) && Number.isInteger(n) && n < r ? t.slice(n, r) : [];
813
- if (!e[d] && r !== n) {
814
- const u = p.get(t);
815
- i.length === 1 ? u?.trigger?.(n, null, i[0], "delete") : i.length > 1 && (u?.trigger?.(n, null, i, "deleteAll"), i.forEach((l, f) => u?.trigger?.(n + f, null, l, "delete")));
816
- const s = Number.isInteger(r) && Number.isInteger(n) && n > r ? n - r : 0;
817
- if (s === 1) u?.trigger?.(r, void 0, null, "add");
818
- else if (s > 1) {
819
- const l = Array(s).fill(void 0);
820
- u?.trigger?.(r, l, null, "addAll"), l.forEach((f, o) => u?.trigger?.(r + o, void 0, null, "add"));
825
+ if (!e[h] && r !== n) {
826
+ const s = p.get(t);
827
+ i.length === 1 ? s?.trigger?.(n, null, i[0], "delete") : i.length > 1 && (s?.trigger?.(n, null, i, "deleteAll"), i.forEach((l, f) => s?.trigger?.(n + f, null, l, "delete")));
828
+ const u = Number.isInteger(r) && Number.isInteger(n) && n > r ? n - r : 0;
829
+ if (u === 1) s?.trigger?.(r, void 0, null, "add");
830
+ else if (u > 1) {
831
+ const l = Array(u).fill(void 0);
832
+ s?.trigger?.(r, l, null, "addAll"), l.forEach((f, o) => s?.trigger?.(r + o, void 0, null, "add"));
821
833
  }
822
834
  }
823
- }, $t = class {
824
- [d];
835
+ }, Dt = class {
836
+ [h];
825
837
  constructor() {
826
838
  }
827
839
  has(e, t) {
828
840
  return Reflect.has(e, t);
829
841
  }
830
842
  get(e, t, r) {
831
- const n = te(e, t);
843
+ const n = re(e, t);
832
844
  if (n != null) return n;
833
845
  if ([
834
846
  g,
@@ -836,13 +848,13 @@ var H = (e, t) => {
836
848
  "@target",
837
849
  "deref"
838
850
  ].indexOf(t) >= 0 && c(e, t) != null && c(e, t) != e) return typeof c(e, t) == "function" ? c(e, t)?.bind?.(e) : c(e, t);
839
- const i = p?.get?.(e), u = xe(e, t, i);
840
- if (u != null) return u;
841
- const s = Re(e, t, i);
851
+ const i = p?.get?.(e), s = xe(e, t, i);
842
852
  if (s != null) return s;
853
+ const u = we(e, t, i);
854
+ if (u != null) return u;
843
855
  if (t == me) return pe.call(this, this);
844
856
  if (t == D) return Oe(i, (f) => {
845
- const o = f.key ?? f.name ?? 0, y = N(f, "value", () => c(e, o)), a = N(f, "oldValue", () => {
857
+ const o = f.key ?? f.name ?? 0, y = z(f, "value", () => c(e, o)), a = z(f, "oldValue", () => {
846
858
  });
847
859
  return i?.trigger?.(o, y, a, Ae(f, "manual"));
848
860
  });
@@ -855,36 +867,36 @@ var H = (e, t) => {
855
867
  if (t == "g") return () => e?.g ?? e?.[1];
856
868
  if (t == "b") return () => e?.b ?? e?.[2];
857
869
  if (t == "a") return () => e?.a ?? e?.[3];
858
- const l = c(e, t) ?? (t == "value" ? c(e, h) : null);
859
- return typeof l == "function" ? new Proxy(typeof l == "function" ? l?.bind?.(e) : l, new Et(t, e, this)) : l;
870
+ const l = c(e, t) ?? (t == "value" ? c(e, d) : null);
871
+ return typeof l == "function" ? new Proxy(typeof l == "function" ? l?.bind?.(e) : l, new Nt(t, e, this)) : l;
860
872
  }
861
873
  set(e, t, r) {
862
- if (typeof t != "symbol" && Number.isInteger(parseInt(t)) && (t = parseInt(t) ?? t), t == d && r)
863
- return this[d] = !!r, !0;
864
- if (t == d && !r)
865
- return delete this[d], !0;
874
+ if (typeof t != "symbol" && Number.isInteger(parseInt(t)) && (t = parseInt(t) ?? t), t == h && r)
875
+ return this[h] = !!r, !0;
876
+ if (t == h && !r)
877
+ return delete this[h], !0;
866
878
  const n = c(e, t), i = [
867
879
  "x",
868
880
  "y",
869
881
  "z",
870
882
  "w"
871
- ], u = [
883
+ ], s = [
872
884
  "r",
873
885
  "g",
874
886
  "b",
875
887
  "a"
876
- ], s = i.indexOf(t), l = u.indexOf(t);
888
+ ], u = i.indexOf(t), l = s.indexOf(t);
877
889
  let f = !1;
878
- return s >= 0 ? f = Reflect.set(e, s, r) : l >= 0 ? f = Reflect.set(e, l, r) : f = Reflect.set(e, t, r), t == "length" && x(n, r) && Wt(this, e, n, r), !this[d] && typeof t != "symbol" && x(n, r) && p?.get?.(e)?.trigger?.(t, r, n, "set"), f;
890
+ return u >= 0 ? f = Reflect.set(e, u, r) : l >= 0 ? f = Reflect.set(e, l, r) : f = Reflect.set(e, t, r), t == "length" && x(n, r) && zt(this, e, n, r), !this[h] && typeof t != "symbol" && x(n, r) && p?.get?.(e)?.trigger?.(t, r, n, "set"), f;
879
891
  }
880
892
  deleteProperty(e, t) {
881
- if (typeof t != "symbol" && Number.isInteger(parseInt(t)) && (t = parseInt(t) ?? t), t == d)
882
- return delete this[d], !0;
893
+ if (typeof t != "symbol" && Number.isInteger(parseInt(t)) && (t = parseInt(t) ?? t), t == h)
894
+ return delete this[h], !0;
883
895
  const r = c(e, t), n = Reflect.deleteProperty(e, t);
884
- return !this[d] && t != "length" && t != d && typeof t != "symbol" && r != null && p.get(e)?.trigger?.(t, t, r, "delete"), n;
896
+ return !this[h] && t != "length" && t != h && typeof t != "symbol" && r != null && p.get(e)?.trigger?.(t, t, r, "delete"), n;
885
897
  }
886
- }, _t = class {
887
- [d];
898
+ }, Bt = class {
899
+ [h];
888
900
  constructor() {
889
901
  }
890
902
  get(e, t, r) {
@@ -899,23 +911,23 @@ var H = (e, t) => {
899
911
  ].indexOf(t) >= 0 && c(e, t) != null && c(e, t) != e) return typeof c(e, t) == "function" ? K(e, c(e, t)) : c(e, t);
900
912
  const n = p.get(e) ?? p.get(c(e, "value") ?? e), i = xe(e, t, n);
901
913
  if (i != null) return i;
902
- c(e, t) == null && t != "value" && M(e) && c(e, "value") != null && (typeof c(e, "value") == "object" || typeof c(e, "value") == "function") && c(c(e, "value"), t) != null && (e = c(e, "value") ?? e);
903
- const u = Re(e, t, n);
904
- return u ?? (t == me ? pe.call(this, this) : t == D ? Oe(n, (s) => {
905
- const l = Xe(e, s.key ?? s.name ?? be(e) ?? "value"), f = N(s, "oldValue", () => l == "value" || l == be(e) ? c(e, h) : void 0), o = N(s, "value", () => kt(e, l));
906
- return n?.trigger?.(l, o, f, Ae(s, "manual"));
907
- }) : t == Symbol.toPrimitive ? (s) => {
914
+ c(e, t) == null && t != "value" && I(e) && c(e, "value") != null && (typeof c(e, "value") == "object" || typeof c(e, "value") == "function") && c(c(e, "value"), t) != null && (e = c(e, "value") ?? e);
915
+ const s = we(e, t, n);
916
+ return s ?? (t == me ? pe.call(this, this) : t == D ? Oe(n, (u) => {
917
+ const l = Xe(e, u.key ?? u.name ?? be(e) ?? "value"), f = z(u, "oldValue", () => l == "value" || l == be(e) ? c(e, d) : void 0), o = z(u, "value", () => Ct(e, l));
918
+ return n?.trigger?.(l, o, f, Ae(u, "manual"));
919
+ }) : t == Symbol.toPrimitive ? (u) => {
908
920
  const l = H(e, t);
909
- return c(l, t) ? c(l, t)?.(s) : m(l) ? E(l, s) : m(c(l, "value")) ? E(c(l, "value"), s) : E(c(l, "value") ?? l, s);
921
+ return c(l, t) ? c(l, t)?.(u) : m(l) ? E(l, u) : m(c(l, "value")) ? E(c(l, "value"), u) : E(c(l, "value") ?? l, u);
910
922
  } : t == Symbol.toStringTag ? () => {
911
- const s = H(e, t);
912
- return c(s, t) ? c(s, t)?.() : m(s) ? String(s ?? "") || "" : m(c(s, "value")) ? String(c(s, "value") ?? "") || "" : String(c(s, "value") ?? s ?? "") || "";
923
+ const u = H(e, t);
924
+ return c(u, t) ? c(u, t)?.() : m(u) ? String(u ?? "") || "" : m(c(u, "value")) ? String(c(u, "value") ?? "") || "" : String(c(u, "value") ?? u ?? "") || "";
913
925
  } : t == "toString" ? () => {
914
- const s = H(e, t);
915
- return c(s, t) ? c(s, t)?.() : c(s, Symbol.toStringTag) ? c(s, Symbol.toStringTag)?.() : m(s) ? String(s ?? "") || "" : m(c(s, "value")) ? String(c(s, "value") ?? "") || "" : String(c(s, "value") ?? s ?? "") || "";
926
+ const u = H(e, t);
927
+ return c(u, t) ? c(u, t)?.() : c(u, Symbol.toStringTag) ? c(u, Symbol.toStringTag)?.() : m(u) ? String(u ?? "") || "" : m(c(u, "value")) ? String(c(u, "value") ?? "") || "" : String(c(u, "value") ?? u ?? "") || "";
916
928
  } : t == "valueOf" ? () => {
917
- const s = H(e, t);
918
- return c(s, t) ? c(s, t)?.() : c(s, Symbol.toPrimitive) ? c(s, Symbol.toPrimitive)?.() : m(s) ? s : m(c(s, "value")) ? c(s, "value") : c(s, "value") ?? s;
929
+ const u = H(e, t);
930
+ return c(u, t) ? c(u, t)?.() : c(u, Symbol.toPrimitive) ? c(u, Symbol.toPrimitive)?.() : m(u) ? u : m(c(u, "value")) ? c(u, "value") : c(u, "value") ?? u;
919
931
  } : typeof t == "symbol" && (t in e || c(e, t) != null) ? c(e, t) : H(e, t));
920
932
  }
921
933
  apply(e, t, r) {
@@ -933,11 +945,11 @@ var H = (e, t) => {
933
945
  getOwnPropertyDescriptor(e, t) {
934
946
  let r;
935
947
  try {
936
- w?.getOrInsert?.(e, /* @__PURE__ */ new Set())?.add?.(t), w?.get?.(e)?.has?.(t) && (r = void 0), r = Reflect.getOwnPropertyDescriptor(e, t);
948
+ R?.getOrInsert?.(e, /* @__PURE__ */ new Set())?.add?.(t), R?.get?.(e)?.has?.(t) && (r = void 0), r = Reflect.getOwnPropertyDescriptor(e, t);
937
949
  } catch {
938
950
  r = void 0;
939
951
  } finally {
940
- w?.get?.(e)?.delete?.(t);
952
+ R?.get?.(e)?.delete?.(t);
941
953
  }
942
954
  return r;
943
955
  }
@@ -945,47 +957,47 @@ var H = (e, t) => {
945
957
  return t in e;
946
958
  }
947
959
  set(e, t, r) {
948
- const n = te(e, t);
949
- return n ?? st(r, (i) => {
950
- const u = te(i, t);
951
- if (u != null) return u;
952
- if (t == d && r)
953
- return this[d] = !!r, !0;
954
- if (t == d && !r)
955
- return delete this[d], !0;
956
- const s = e;
957
- if (c(e, t) == null && t != "value" && M(e) && c(e, "value") != null && (typeof c(e, "value") == "object" || typeof c(e, "value") == "function") && c(c(e, "value"), t) != null && (e = c(e, "value") ?? e), typeof t == "symbol" && !(c(e, t) != null && t in e)) return;
958
- const l = Xe(e, t), f = t == "value" ? c(e, h) ?? c(e, t) : c(e, t);
960
+ const n = re(e, t);
961
+ return n ?? at(r, (i) => {
962
+ const s = re(i, t);
963
+ if (s != null) return s;
964
+ if (t == h && r)
965
+ return this[h] = !!r, !0;
966
+ if (t == h && !r)
967
+ return delete this[h], !0;
968
+ const u = e;
969
+ if (c(e, t) == null && t != "value" && I(e) && c(e, "value") != null && (typeof c(e, "value") == "object" || typeof c(e, "value") == "function") && c(c(e, "value"), t) != null && (e = c(e, "value") ?? e), typeof t == "symbol" && !(c(e, t) != null && t in e)) return;
970
+ const l = Xe(e, t), f = t == "value" ? c(e, d) ?? c(e, t) : c(e, t);
959
971
  e[t] = i;
960
972
  const o = c(e, t) ?? i;
961
- return !this[d] && typeof t != "symbol" && (c(e, vt) ?? x)?.(f, o) && (p.get(e) ?? p.get(s))?.trigger?.(l, i, f), !0;
973
+ return !this[h] && typeof t != "symbol" && (c(e, At) ?? x)?.(f, o) && (p.get(e) ?? p.get(u))?.trigger?.(l, i, f), !0;
962
974
  });
963
975
  }
964
976
  defineProperty(e, t, r) {
965
- const n = te(e, t);
977
+ const n = re(e, t);
966
978
  if (n != null) return n;
967
- if (t == d && r.value)
968
- return this[d] = !!r.value, !0;
969
- if (t == d && !r.value)
970
- return delete this[d], !0;
971
- if (c(e, t) == null && t != "value" && M(e) && c(e, "value") != null && (typeof c(e, "value") == "object" || typeof c(e, "value") == "function") && c(c(e, "value"), t) != null && (e = c(e, "value") ?? e), r.get == null && r.set == null) return Reflect.defineProperty(e, t, r);
972
- const i = c(e, t), u = Reflect.defineProperty(e, t, {
979
+ if (t == h && r.value)
980
+ return this[h] = !!r.value, !0;
981
+ if (t == h && !r.value)
982
+ return delete this[h], !0;
983
+ if (c(e, t) == null && t != "value" && I(e) && c(e, "value") != null && (typeof c(e, "value") == "object" || typeof c(e, "value") == "function") && c(c(e, "value"), t) != null && (e = c(e, "value") ?? e), r.get == null && r.set == null) return Reflect.defineProperty(e, t, r);
984
+ const i = c(e, t), s = Reflect.defineProperty(e, t, {
973
985
  get: r.get,
974
986
  set: r.set,
975
987
  enumerable: r.enumerable ?? !0,
976
988
  configurable: r.configurable ?? !0
977
989
  });
978
- return It(e, t, i), u;
990
+ return _t(e, t, i), s;
979
991
  }
980
992
  deleteProperty(e, t) {
981
- if (t == d)
982
- return delete this[d], !0;
983
- c(e, t) == null && t != "value" && M(e) && c(e, "value") != null && (typeof c(e, "value") == "object" || typeof c(e, "value") == "function") && c(c(e, "value"), t) != null && (e = c(e, "value") ?? e);
993
+ if (t == h)
994
+ return delete this[h], !0;
995
+ c(e, t) == null && t != "value" && I(e) && c(e, "value") != null && (typeof c(e, "value") == "object" || typeof c(e, "value") == "function") && c(c(e, "value"), t) != null && (e = c(e, "value") ?? e);
984
996
  const r = c(e, t), n = Reflect.deleteProperty(e, t);
985
- return !this[d] && t != d && typeof t != "symbol" && p.get(e)?.trigger?.(t, null, r, "delete"), n;
997
+ return !this[h] && t != h && typeof t != "symbol" && p.get(e)?.trigger?.(t, null, r, "delete"), n;
986
998
  }
987
- }, Vt = class {
988
- [d];
999
+ }, Ft = class {
1000
+ [h];
989
1001
  constructor() {
990
1002
  }
991
1003
  get(e, t, r) {
@@ -997,33 +1009,33 @@ var H = (e, t) => {
997
1009
  ].indexOf(t) >= 0 && c(e, t) != null && c(e, t) != e) return typeof c(e, t) == "function" ? K(e, c(e, t)) : c(e, t);
998
1010
  const n = p.get(e), i = xe(e, t, n);
999
1011
  if (i != null) return i;
1000
- const u = Re(e, t, n);
1001
- if (u != null) return u;
1012
+ const s = we(e, t, n);
1013
+ if (s != null) return s;
1002
1014
  e = c(e, g) ?? c(e, $) ?? e;
1003
- const s = K(e, c(e, t));
1004
- return typeof t == "symbol" && (t in e || c(e, t) != null) ? s : t == me ? pe.call(this, this) : t == D ? Oe(n, (l) => {
1015
+ const u = K(e, c(e, t));
1016
+ return typeof t == "symbol" && (t in e || c(e, t) != null) ? u : t == me ? pe.call(this, this) : t == D ? Oe(n, (l) => {
1005
1017
  const f = l.key ?? l.name;
1006
1018
  if (f == null) return;
1007
- const o = N(l, "value", () => e.get(f));
1019
+ const o = z(l, "value", () => e.get(f));
1008
1020
  if (o == null && !W(l, "value")) return;
1009
- const y = N(l, "oldValue", () => {
1021
+ const y = z(l, "oldValue", () => {
1010
1022
  });
1011
1023
  return n?.trigger?.(f, o, y, Ae(l, "manual"));
1012
1024
  }) : t == "clear" ? () => {
1013
- const l = Array.from(e?.entries?.() || []), f = s();
1025
+ const l = Array.from(e?.entries?.() || []), f = u();
1014
1026
  return l.forEach(([o, y]) => {
1015
- this[d] || p.get(e)?.trigger?.(o, null, y, "delete");
1027
+ this[h] || p.get(e)?.trigger?.(o, null, y, "delete");
1016
1028
  }), f;
1017
1029
  } : t == "delete" ? (l, f = null) => {
1018
- const o = e.has(l), y = e.get(l), a = s(l);
1019
- return !this[d] && o && p.get(e)?.trigger?.(l, null, y, "delete"), a;
1020
- } : t == "set" ? (l, f) => ut(f, (o) => {
1021
- const y = e.has(l), a = e.get(l), v = s(l, o);
1022
- return (!y || x(a, o)) && (this[d] || p.get(e)?.trigger?.(l, o, y ? a : null, y ? "set" : "add")), v;
1023
- }) : s;
1030
+ const o = e.has(l), y = e.get(l), a = u(l);
1031
+ return !this[h] && o && p.get(e)?.trigger?.(l, null, y, "delete"), a;
1032
+ } : t == "set" ? (l, f) => ht(f, (o) => {
1033
+ const y = e.has(l), a = e.get(l), v = u(l, o);
1034
+ return (!y || x(a, o)) && (this[h] || p.get(e)?.trigger?.(l, o, y ? a : null, y ? "set" : "add")), v;
1035
+ }) : u;
1024
1036
  }
1025
1037
  set(e, t, r) {
1026
- return t == d ? (this[d] = !!r, !0) : t == d && !r ? (delete this[d], !0) : Reflect.set(e, t, r);
1038
+ return t == h ? (this[h] = !!r, !0) : t == h && !r ? (delete this[h], !0) : Reflect.set(e, t, r);
1027
1039
  }
1028
1040
  has(e, t) {
1029
1041
  return Reflect.has(e, t);
@@ -1043,19 +1055,19 @@ var H = (e, t) => {
1043
1055
  getOwnPropertyDescriptor(e, t) {
1044
1056
  let r;
1045
1057
  try {
1046
- w?.getOrInsert?.(e, /* @__PURE__ */ new Set())?.add?.(t), w?.get?.(e)?.has?.(t) && (r = void 0), r = Reflect.getOwnPropertyDescriptor(e, t);
1058
+ R?.getOrInsert?.(e, /* @__PURE__ */ new Set())?.add?.(t), R?.get?.(e)?.has?.(t) && (r = void 0), r = Reflect.getOwnPropertyDescriptor(e, t);
1047
1059
  } catch {
1048
1060
  r = void 0;
1049
1061
  } finally {
1050
- w?.get?.(e)?.delete?.(t);
1062
+ R?.get?.(e)?.delete?.(t);
1051
1063
  }
1052
1064
  return r;
1053
1065
  }
1054
1066
  deleteProperty(e, t) {
1055
- return t == d ? (delete this[d], !0) : Reflect.deleteProperty(e, t);
1067
+ return t == h ? (delete this[h], !0) : Reflect.deleteProperty(e, t);
1056
1068
  }
1057
- }, zt = class {
1058
- [d] = !1;
1069
+ }, Ht = class {
1070
+ [h] = !1;
1059
1071
  constructor() {
1060
1072
  }
1061
1073
  get(e, t, r) {
@@ -1067,31 +1079,31 @@ var H = (e, t) => {
1067
1079
  ].indexOf(t) >= 0 && c(e, t) != null && c(e, t) != e) return typeof c(e, t) == "function" ? K(e, c(e, t)) : c(e, t);
1068
1080
  const n = p.get(e), i = xe(e, t, n);
1069
1081
  if (i != null) return i;
1070
- const u = Re(e, t, n);
1071
- if (u != null) return u;
1082
+ const s = we(e, t, n);
1083
+ if (s != null) return s;
1072
1084
  e = c(e, g) ?? c(e, $) ?? e;
1073
- const s = K(e, c(e, t));
1074
- return typeof t == "symbol" && (t in e || c(e, t) != null) ? s : t == me ? pe.call(this, this) : t == D ? Oe(n, (l) => {
1085
+ const u = K(e, c(e, t));
1086
+ return typeof t == "symbol" && (t in e || c(e, t) != null) ? u : t == me ? pe.call(this, this) : t == D ? Oe(n, (l) => {
1075
1087
  const f = l.key ?? l.name;
1076
1088
  if (f == null) return;
1077
- const o = N(l, "value", () => e.has(f)), y = N(l, "oldValue", () => {
1089
+ const o = z(l, "value", () => e.has(f)), y = z(l, "oldValue", () => {
1078
1090
  });
1079
1091
  return n?.trigger?.(f, o, y, Ae(l, "manual"));
1080
1092
  }) : t == "clear" ? () => {
1081
- const l = Array.from(e?.values?.() || []), f = s();
1093
+ const l = Array.from(e?.values?.() || []), f = u();
1082
1094
  return l.forEach((o) => {
1083
- this[d] || p.get(e)?.trigger?.(null, null, o, "delete");
1095
+ this[h] || p.get(e)?.trigger?.(null, null, o, "delete");
1084
1096
  }), f;
1085
1097
  } : t == "delete" ? (l) => {
1086
- const f = e.has(l), o = f ? l : null, y = s(l);
1087
- return !this[d] && f && p.get(e)?.trigger?.(l, null, o, "delete"), y;
1098
+ const f = e.has(l), o = f ? l : null, y = u(l);
1099
+ return !this[h] && f && p.get(e)?.trigger?.(l, null, o, "delete"), y;
1088
1100
  } : t == "add" ? (l) => {
1089
- const f = e.has(l), o = f ? l : null, y = s(l);
1090
- return f || this[d] || p.get(e)?.trigger?.(l, l, o, "add"), y;
1091
- } : s;
1101
+ const f = e.has(l), o = f ? l : null, y = u(l);
1102
+ return f || this[h] || p.get(e)?.trigger?.(l, l, o, "add"), y;
1103
+ } : u;
1092
1104
  }
1093
1105
  set(e, t, r) {
1094
- return t == d && r ? (this[d] = !!r, !0) : t == d && !r ? (delete this[d], !0) : Reflect.set(e, t, r);
1106
+ return t == h && r ? (this[h] = !!r, !0) : t == h && !r ? (delete this[h], !0) : Reflect.set(e, t, r);
1095
1107
  }
1096
1108
  has(e, t) {
1097
1109
  return Reflect.has(e, t);
@@ -1111,77 +1123,77 @@ var H = (e, t) => {
1111
1123
  getOwnPropertyDescriptor(e, t) {
1112
1124
  let r;
1113
1125
  try {
1114
- w?.getOrInsert?.(e, /* @__PURE__ */ new Set())?.add?.(t), w?.get?.(e)?.has?.(t) && (r = void 0), r = Reflect.getOwnPropertyDescriptor(e, t);
1126
+ R?.getOrInsert?.(e, /* @__PURE__ */ new Set())?.add?.(t), R?.get?.(e)?.has?.(t) && (r = void 0), r = Reflect.getOwnPropertyDescriptor(e, t);
1115
1127
  } catch {
1116
1128
  r = void 0;
1117
1129
  } finally {
1118
- w?.get?.(e)?.delete?.(t);
1130
+ R?.get?.(e)?.delete?.(t);
1119
1131
  }
1120
1132
  return r;
1121
1133
  }
1122
1134
  deleteProperty(e, t) {
1123
- return t == d ? (delete this[d], !0) : Reflect.deleteProperty(e, t);
1135
+ return t == h ? (delete this[h], !0) : Reflect.deleteProperty(e, t);
1124
1136
  }
1125
- }, Y = (e) => !!((typeof e == "object" || typeof e == "function") && e != null && (e?.[g] || e?.[se])), $e = (e) => Y(e) ? e : oe(e, new $t()), Ct = (e) => Y(e) ? e : oe(e, new _t()), Nt = (e) => Y(e) ? e : oe(e, new Vt()), Dt = (e) => Y(e) ? e : oe(e, new zt()), Bt = (e, t) => {
1137
+ }, Z = (e) => !!((typeof e == "object" || typeof e == "function") && e != null && (e?.[g] || e?.[ue])), $e = (e) => Z(e) ? e : ce(e, new Dt()), Kt = (e) => Z(e) ? e : ce(e, new Bt()), Gt = (e) => Z(e) ? e : ce(e, new Ft()), qt = (e) => Z(e) ? e : ce(e, new Ht()), Ut = (e, t) => {
1126
1138
  const r = e instanceof Promise || typeof e?.then == "function", n = P({
1127
- [fe]: r ? e : null,
1128
- [h]: r ? 0 : Number(V(e) || 0) || 0,
1139
+ [oe]: r ? e : null,
1140
+ [d]: r ? 0 : Number(V(e) || 0) || 0,
1129
1141
  [G]: t,
1130
1142
  [Symbol?.toStringTag]() {
1131
- return String(this?.[h] ?? "") || "";
1143
+ return String(this?.[d] ?? "") || "";
1132
1144
  },
1133
1145
  [Symbol?.toPrimitive](i) {
1134
- return E((typeof this?.[h] != "object" ? this?.[h] : this?.[h]?.value || 0) ?? 0, i);
1146
+ return E((typeof this?.[d] != "object" ? this?.[d] : this?.[d]?.value || 0) ?? 0, i);
1135
1147
  },
1136
1148
  set value(i) {
1137
- this[h] = (i != null && !Number.isNaN(i) ? Number(i) : this[h]) || 0;
1149
+ this[d] = (i != null && !Number.isNaN(i) ? Number(i) : this[d]) || 0;
1138
1150
  },
1139
1151
  get value() {
1140
- return Number(this[h] || 0) || 0;
1152
+ return Number(this[d] || 0) || 0;
1141
1153
  }
1142
1154
  });
1143
1155
  return e?.then?.((i) => n.value = i), n;
1144
- }, Ft = (e, t) => {
1156
+ }, Jt = (e, t) => {
1145
1157
  const r = e instanceof Promise || typeof e?.then == "function", n = P({
1146
- [fe]: r ? e : null,
1147
- [h]: (r ? "" : String(V(typeof e == "number" ? String(e) : e || ""))) ?? "",
1158
+ [oe]: r ? e : null,
1159
+ [d]: (r ? "" : String(V(typeof e == "number" ? String(e) : e || ""))) ?? "",
1148
1160
  [G]: t,
1149
1161
  [Symbol?.toStringTag]() {
1150
- return String(this?.[h] ?? "") ?? "";
1162
+ return String(this?.[d] ?? "") ?? "";
1151
1163
  },
1152
1164
  [Symbol?.toPrimitive](i) {
1153
- return E(this?.[h] ?? "", i);
1165
+ return E(this?.[d] ?? "", i);
1154
1166
  },
1155
1167
  set value(i) {
1156
- this[h] = String(typeof i == "number" ? String(i) : i || "") ?? "";
1168
+ this[d] = String(typeof i == "number" ? String(i) : i || "") ?? "";
1157
1169
  },
1158
1170
  get value() {
1159
- return String(this[h] ?? "") ?? "";
1171
+ return String(this[d] ?? "") ?? "";
1160
1172
  }
1161
1173
  });
1162
1174
  return e?.then?.((i) => n.value = i), n;
1163
- }, Ht = (e, t) => {
1175
+ }, Qt = (e, t) => {
1164
1176
  const r = e instanceof Promise || typeof e?.then == "function", n = P({
1165
- [fe]: r ? e : null,
1166
- [h]: (r ? !1 : (V(e) != null ? typeof V(e) == "string" ? !0 : !!V(e) : !1) || !1) || !1,
1177
+ [oe]: r ? e : null,
1178
+ [d]: (r ? !1 : (V(e) != null ? typeof V(e) == "string" ? !0 : !!V(e) : !1) || !1) || !1,
1167
1179
  [G]: t,
1168
1180
  [Symbol?.toStringTag]() {
1169
- return String(this?.[h] ?? "") || "";
1181
+ return String(this?.[d] ?? "") || "";
1170
1182
  },
1171
1183
  [Symbol?.toPrimitive](i) {
1172
- return E(!!this?.[h] || !1, i);
1184
+ return E(!!this?.[d] || !1, i);
1173
1185
  },
1174
1186
  set value(i) {
1175
- this[h] = (i != null ? typeof i == "string" ? !0 : !!i : this[h]) || !1;
1187
+ this[d] = (i != null ? typeof i == "string" ? !0 : !!i : this[d]) || !1;
1176
1188
  },
1177
1189
  get value() {
1178
- return this[h] || !1;
1190
+ return this[d] || !1;
1179
1191
  }
1180
1192
  });
1181
1193
  return e?.then?.((i) => n.value = i), n;
1182
1194
  }, Ye = (e, t) => {
1183
1195
  const r = e instanceof Promise || typeof e?.then == "function", n = P({
1184
- [fe]: r ? e : null,
1196
+ [oe]: r ? e : null,
1185
1197
  [G]: t,
1186
1198
  [Symbol?.toStringTag]() {
1187
1199
  return String(this.value ?? "") || "";
@@ -1197,14 +1209,14 @@ var H = (e, t) => {
1197
1209
  }, Te = (e, t) => {
1198
1210
  if (e == null || typeof e != "object" && typeof e != "function") return e;
1199
1211
  try {
1200
- Object.defineProperty(e, he, {
1212
+ Object.defineProperty(e, de, {
1201
1213
  value: t,
1202
1214
  writable: !0,
1203
1215
  configurable: !0
1204
1216
  });
1205
1217
  } catch {
1206
1218
  try {
1207
- e[he] = t;
1219
+ e[de] = t;
1208
1220
  } catch {
1209
1221
  }
1210
1222
  }
@@ -1221,144 +1233,144 @@ var H = (e, t) => {
1221
1233
  }
1222
1234
  }
1223
1235
  return e;
1224
- }, Kt = (e, t = "value", r, n) => {
1236
+ }, Xt = (e, t = "value", r, n) => {
1225
1237
  if (m(e) || !e) return e;
1226
- Array.isArray(e) && e.length == 2 && e[0] != null && (e[0] instanceof Map || e[0] instanceof WeakMap || e[0] instanceof Set || e[0] instanceof WeakSet) ? ((t == null || t === "value") && (t = e[1]), e = e[0]) : Array.isArray(e) && !ie(e?.[1], e) && (Array.isArray(e?.[0]) || typeof e?.[0] == "object" || typeof e?.[0] == "function") && (e = e?.[0]);
1227
- const i = e instanceof Map || e instanceof WeakMap, u = e instanceof Set || e instanceof WeakSet;
1228
- if (i || u) {
1238
+ Array.isArray(e) && e.length == 2 && e[0] != null && (e[0] instanceof Map || e[0] instanceof WeakMap || e[0] instanceof Set || e[0] instanceof WeakSet) ? ((t == null || t === "value") && (t = e[1]), e = e[0]) : Array.isArray(e) && !le(e?.[1], e) && (Array.isArray(e?.[0]) || typeof e?.[0] == "object" || typeof e?.[0] == "function") && (e = e?.[0]);
1239
+ const i = e instanceof Map || e instanceof WeakMap, s = e instanceof Set || e instanceof WeakSet;
1240
+ if (i || s) {
1229
1241
  if (t == null) return;
1230
- } else if ((t ??= Array.isArray(e) ? null : "value") == null || ie(t, e)) return;
1231
- const s = () => i ? e.get(t) : u ? e.has(t) : e?.[t], l = (a) => i ? (e.set(t, a), a) : u ? (a ? e.add(t) : e.delete(t), e.has(t)) : e[t] = a;
1232
- i && r !== void 0 && !e.has(t) ? e.set(t, r) : u && r && !e.has(t) && e.add(t);
1233
- const f = s();
1234
- if (!u && t != null && M(f) && z(f)) return Te(Ut(f), t);
1235
- if (!i && !u && t && typeof e?.getProperty == "function" && z(e?.getProperty?.(t))) return Te(e?.getProperty?.(t), t);
1236
- !i && !u && (e[t] ??= r ?? e[t]);
1242
+ } else if ((t ??= Array.isArray(e) ? null : "value") == null || le(t, e)) return;
1243
+ const u = () => i ? e.get(t) : s ? e.has(t) : e?.[t], l = (a) => i ? (e.set(t, a), a) : s ? (a ? e.add(t) : e.delete(t), e.has(t)) : e[t] = a;
1244
+ i && r !== void 0 && !e.has(t) ? e.set(t, r) : s && r && !e.has(t) && e.add(t);
1245
+ const f = u();
1246
+ if (!s && t != null && I(f) && C(f)) return Te(jt(f), t);
1247
+ if (!i && !s && t && typeof e?.getProperty == "function" && C(e?.getProperty?.(t))) return Te(e?.getProperty?.(t), t);
1248
+ !i && !s && (e[t] ??= r ?? e[t]);
1237
1249
  const o = P({
1238
- [h]: u ? !!s() : s() ?? r,
1250
+ [d]: s ? !!u() : u() ?? r,
1239
1251
  [G]: n,
1240
1252
  [Symbol?.toStringTag]() {
1241
- return String(s() ?? this[h] ?? "") || "";
1253
+ return String(u() ?? this[d] ?? "") || "";
1242
1254
  },
1243
1255
  [Symbol?.toPrimitive](a) {
1244
- return E(s(), a);
1256
+ return E(u(), a);
1245
1257
  },
1246
1258
  set value(a) {
1247
- if (o[Q] = !0, u) this[h] = l(a);
1259
+ if (o[X] = !0, s) this[d] = l(a);
1248
1260
  else {
1249
- const v = a ?? ft(s());
1250
- this[h] = l(v);
1261
+ const v = a ?? dt(u());
1262
+ this[d] = l(v);
1251
1263
  }
1252
- o[Q] = !1;
1264
+ o[X] = !1;
1253
1265
  },
1254
1266
  get value() {
1255
- const a = s();
1256
- return this[h] = u ? !!a : a ?? this[h];
1267
+ const a = u();
1268
+ return this[d] = s ? !!a : a ?? this[d];
1257
1269
  }
1258
1270
  });
1259
1271
  Te(o, t);
1260
- const y = b(e, (a, v, A, R) => {
1272
+ const y = b(e, (a, v, A, w) => {
1261
1273
  if (v === t) {
1262
- const O = u ? a != null : a, k = u ? A != null : A;
1274
+ const O = s ? a != null : a, k = s ? A != null : A;
1263
1275
  o?.[D]?.({
1264
1276
  key: t,
1265
1277
  value: O,
1266
1278
  oldValue: k,
1267
- trigger: R
1279
+ trigger: w
1268
1280
  });
1269
1281
  }
1270
1282
  });
1271
- return I(o, Symbol.dispose, y), o;
1272
- }, Gt = (e, t) => {
1283
+ return M(o, Symbol.dispose, y), o;
1284
+ }, Yt = (e, t) => {
1273
1285
  switch (typeof e) {
1274
1286
  case "boolean":
1275
- return Ht(e, t);
1287
+ return Qt(e, t);
1276
1288
  case "number":
1277
- return Bt(e, t);
1289
+ return Ut(e, t);
1278
1290
  case "string":
1279
- return Ft(e, t);
1291
+ return Jt(e, t);
1280
1292
  case "object":
1281
1293
  if (e != null) return Ye(P(e), t);
1282
1294
  default:
1283
1295
  return Ye(e, t);
1284
1296
  }
1285
- }, qt = (e, t = "value", r) => {
1286
- const n = z(e) ? e : Gt(e, r);
1287
- return t != null ? Kt(n, t, r) : n;
1288
- }, yr = (e, t) => qt(e, t), Ce = (e, t, r = 100) => {
1297
+ }, Zt = (e, t = "value", r) => {
1298
+ const n = C(e) ? e : Yt(e, r);
1299
+ return t != null ? Xt(n, t, r) : n;
1300
+ }, pr = (e, t) => Zt(e, t), Ne = (e, t, r = 100) => {
1289
1301
  if (e?.value ?? e) return setTimeout(() => {
1290
1302
  e.value && t?.();
1291
1303
  }, r);
1292
- }, ar = (e = 100) => (t, [r], [n]) => {
1293
- let i = Ce(r, t, e);
1304
+ }, mr = (e = 100) => (t, [r], [n]) => {
1305
+ let i = Ne(r, t, e);
1294
1306
  n?.addEventListener?.("abort", () => {
1295
1307
  i && clearTimeout(i);
1296
1308
  }, { once: !0 });
1297
- }, dr = (e = 100) => (t, [r], [n]) => {
1298
- let i = Ce(r, t, e);
1309
+ }, gr = (e = 100) => (t, [r], [n]) => {
1310
+ let i = Ne(r, t, e);
1299
1311
  n?.addEventListener?.("abort", () => {
1300
1312
  i && clearTimeout(i);
1301
1313
  }, { once: !0 }), i || t?.();
1302
1314
  };
1303
1315
  function P(e, t) {
1304
- if (e == null || typeof e == "symbol" || !(typeof e == "object" || typeof e == "function") || Y(e) || (e = V?.(e)) == null || e instanceof Promise || e instanceof WeakRef || Y(e)) return e;
1316
+ if (e == null || typeof e == "symbol" || !(typeof e == "object" || typeof e == "function") || Z(e) || (e = V?.(e)) == null || e instanceof Promise || e instanceof WeakRef || Z(e)) return e;
1305
1317
  const r = e;
1306
1318
  if (r == null || typeof r == "symbol" || !(typeof r == "object" || typeof r == "function") || r instanceof Promise || r instanceof WeakRef) return r;
1307
1319
  let n = r;
1308
- return Array.isArray(r) ? (n = $e(r), n) : r instanceof Map ? (n = Nt(r), n) : r instanceof Set ? (n = Dt(r), n) : ((typeof r == "function" || typeof r == "object") && (n = Ct(r)), n);
1320
+ return Array.isArray(r) ? (n = $e(r), n) : r instanceof Map ? (n = Gt(r), n) : r instanceof Set ? (n = qt(r), n) : ((typeof r == "function" || typeof r == "object") && (n = Kt(r)), n);
1309
1321
  }
1310
- var z = (e) => typeof HTMLInputElement < "u" && e instanceof HTMLInputElement ? !0 : !!((typeof e == "object" || typeof e == "function") && e != null && (e?.[g] || e?.[se] || p?.has?.(e))), Ut = (e) => z(e) ? P(e) : null, hr = (e) => {
1322
+ var C = (e) => typeof HTMLInputElement < "u" && e instanceof HTMLInputElement ? !0 : !!((typeof e == "object" || typeof e == "function") && e != null && (e?.[g] || e?.[ue] || p?.has?.(e))), jt = (e) => C(e) ? P(e) : null, Ar = (e) => {
1311
1323
  if (e == null || typeof e != "object" && typeof e != "function" || e?.[Symbol.observable] != null) return e;
1312
1324
  try {
1313
1325
  e[Symbol.observable] = self?.compatible;
1314
1326
  } catch {
1315
1327
  console.warn("Unable to assign <[Symbol.observable]>, object will not observable by other frameworks");
1316
1328
  }
1317
- return e[se] = (t, r, n) => {
1329
+ return e[ue] = (t, r, n) => {
1318
1330
  const i = e?.[Symbol?.observable];
1319
1331
  return i?.()?.affected?.(t, r, n), () => i?.()?.unaffected?.(t, r);
1320
1332
  }, e;
1321
- }, q = /* @__PURE__ */ new WeakMap(), Ne = (e) => {
1333
+ }, U = /* @__PURE__ */ new WeakMap(), ze = (e) => {
1322
1334
  if (!(typeof e == "symbol" || e == null || !(typeof e == "object" || typeof e == "function")))
1323
1335
  return e;
1324
1336
  }, Se = "initial", De = (e) => {
1325
- const t = e?.[he] ?? e?.realProp;
1326
- return C(t) ? t : null;
1337
+ const t = e?.[de] ?? e?.realProp;
1338
+ return N(t) ? t : null;
1327
1339
  }, Be = (e, t) => {
1328
1340
  const r = De(e);
1329
1341
  return r != null && (t == null || t == "value") ? r : t;
1330
- }, Jt = (e, t) => t != null && t == De(e) ? e?.value : e?.[t], _e = (e, t, r, n) => {
1342
+ }, Lt = (e, t) => t != null && t == De(e) ? e?.value : e?.[t], _e = (e, t, r, n) => {
1331
1343
  if (t != null && t == De(e)) {
1332
- const i = Jt(e, t);
1344
+ const i = Lt(e, t);
1333
1345
  if (i != null) return r?.(i, t, null, "set");
1334
1346
  }
1335
1347
  return ae(e, t, r, n);
1336
- }, nt = (e, t, r) => {
1348
+ }, ot = (e, t, r) => {
1337
1349
  const n = ge(t);
1338
1350
  if (r == Se) {
1339
1351
  if (!n.triggerImmediately) return;
1340
- } else if (!J(n.affectTypes, r)) return;
1341
- return (i, u, s, ...l) => e?.(i, u, s, r, ...l);
1342
- }, Qt = (e, t, r, n = ["*"]) => {
1343
- if (!e || !Ne(e)) return;
1352
+ } else if (!Q(n.affectTypes, r)) return;
1353
+ return (i, s, u, ...l) => e?.(i, s, u, r, ...l);
1354
+ }, er = (e, t, r, n = ["*"]) => {
1355
+ if (!e || !ze(e)) return;
1344
1356
  const i = t != Symbol.iterator ? Be(e, t) : null;
1345
- let u = e?.[le] ?? p.get(e);
1357
+ let s = e?.[se] ?? p.get(e);
1346
1358
  e = e?.[g] ?? e, queueMicrotask(() => {
1347
- const l = nt(r, n, Se);
1359
+ const l = ot(r, n, Se);
1348
1360
  l && (i != null && i != Symbol.iterator ? _e(e, i, l, null) : Ve(e, l, null));
1349
1361
  });
1350
- let s = u?.affected?.(r, i, n);
1351
- return e?.[Symbol.dispose] || (I(s, Symbol.dispose, s), I(s, Symbol.asyncDispose, s), I(e, Symbol.dispose, s), I(e, Symbol.asyncDispose, s)), s;
1352
- }, Xt = (e, t, r, n = ["*"]) => {
1353
- const i = ge(n).affectTypes, u = {};
1354
- let s = e?.value;
1362
+ let u = s?.affected?.(r, i, n);
1363
+ return e?.[Symbol.dispose] || (M(u, Symbol.dispose, u), M(u, Symbol.asyncDispose, u), M(e, Symbol.dispose, u), M(e, Symbol.asyncDispose, u)), u;
1364
+ }, tr = (e, t, r, n = ["*"]) => {
1365
+ const i = ge(n).affectTypes, s = {};
1366
+ let u = e?.value;
1355
1367
  const l = (f) => {
1356
1368
  const o = f?.target?.value;
1357
- J(i, "set") && r?.(o, "value", s, "set", f), s = o;
1369
+ Q(i, "set") && r?.(o, "value", u, "set", f), u = o;
1358
1370
  };
1359
- return e?.addEventListener?.("change", l, u), () => e?.removeEventListener?.("change", l, u);
1360
- }, re = (e) => Array.isArray(e) && e?.length == 2 && Ne(e?.[0]) && (C(e?.[1]) || e?.[1] == Symbol.iterator), Yt = (e) => !!e && typeof e == "object" && !Array.isArray(e) && ("affectTypes" in e || "triggers" in e || "triggerImmediately" in e), Zt = (e) => e == null ? [] : Array.isArray(e) && !re(e) && !z(e) ? e : [e], Lt = (e) => {
1361
- if (re(e)) {
1371
+ return e?.addEventListener?.("change", l, s), () => e?.removeEventListener?.("change", l, s);
1372
+ }, ne = (e) => Array.isArray(e) && e?.length == 2 && ze(e?.[0]) && (N(e?.[1]) || e?.[1] == Symbol.iterator), rr = (e) => !!e && typeof e == "object" && !Array.isArray(e) && ("affectTypes" in e || "triggers" in e || "triggerImmediately" in e), nr = (e) => e == null ? [] : Array.isArray(e) && !ne(e) && !C(e) ? e : [e], ir = (e) => {
1373
+ if (ne(e)) {
1362
1374
  const t = e?.[0];
1363
1375
  return {
1364
1376
  source: e,
@@ -1371,51 +1383,51 @@ var z = (e) => typeof HTMLInputElement < "u" && e instanceof HTMLInputElement ?
1371
1383
  target: e,
1372
1384
  prop: null
1373
1385
  };
1374
- }, jt = (e, t, r, n, i, u, s) => ({
1386
+ }, lr = (e, t, r, n, i, s, u) => ({
1375
1387
  source: e,
1376
1388
  target: t,
1377
1389
  value: r,
1378
1390
  prop: n,
1379
1391
  name: n,
1380
1392
  oldValue: i,
1381
- trigger: u,
1382
- args: s
1383
- }), er = (e, t, r, n = ["*"]) => {
1384
- const i = C(e?.[1]) ? e?.[1] : null;
1393
+ trigger: s,
1394
+ args: u
1395
+ }), sr = (e, t, r, n = ["*"]) => {
1396
+ const i = N(e?.[1]) ? e?.[1] : null;
1385
1397
  return b(e?.[0], i, r, n);
1386
- }, tr = (e, t, r, n = ["*"]) => e?.then?.((i) => b?.(i, t, r, n))?.catch?.((i) => (console.warn(i), null)), b = (e, t, r = () => {
1398
+ }, ur = (e, t, r, n = ["*"]) => e?.then?.((i) => b?.(i, t, r, n))?.catch?.((i) => (console.warn(i), null)), b = (e, t, r = () => {
1387
1399
  }, n) => {
1388
1400
  if (typeof t == "function" ? (n = r, r = t, t = null) : t = Be(e, t), (typeof r == "object" || Array.isArray(r)) && (n = r, r = () => {
1389
1401
  }), (m(e) || typeof e == "symbol") && ge(n).triggerImmediately)
1390
1402
  return Ee(globalThis?.Promise?.try?.(() => r?.(e, null, null, null, Se)));
1391
- if (typeof e?.[se] == "function") return e?.[se]?.(r, t, n);
1392
- if (Ne(e)) {
1403
+ if (typeof e?.[ue] == "function") return e?.[ue]?.(r, t, n);
1404
+ if (ze(e)) {
1393
1405
  const i = e;
1394
- if (q?.has?.(e = e?.[g] ?? e)) return q?.get?.(e)?.(i, t, r, n);
1395
- if (z(i) || re(e) && z(e?.[0])) return We(e) ? q?.getOrInsert?.(e, tr)?.(e, t, r, n) : re(e) ? q?.getOrInsert?.(e, er)?.(e, t, r, n) : typeof HTMLInputElement < "u" && e instanceof HTMLInputElement ? q?.getOrInsert?.(e, Xt)?.(e, t, r, n) : q?.getOrInsert?.(e, Qt)?.(i, t, r, n);
1406
+ if (U?.has?.(e = e?.[g] ?? e)) return U?.get?.(e)?.(i, t, r, n);
1407
+ if (C(i) || ne(e) && C(e?.[0])) return We(e) ? U?.getOrInsert?.(e, ur)?.(e, t, r, n) : ne(e) ? U?.getOrInsert?.(e, sr)?.(e, t, r, n) : typeof HTMLInputElement < "u" && e instanceof HTMLInputElement ? U?.getOrInsert?.(e, tr)?.(e, t, r, n) : U?.getOrInsert?.(e, er)?.(i, t, r, n);
1396
1408
  {
1397
- const u = nt(r, n, Se);
1398
- return u ? Ee(globalThis?.Promise?.try?.(() => re(e) ? _e?.(e?.[0], e?.[1], u, null) : t != null && t != Symbol.iterator ? _e?.(e, t, u, null) : Ve?.(e, u, null))) : void 0;
1409
+ const s = ot(r, n, Se);
1410
+ return s ? Ee(globalThis?.Promise?.try?.(() => ne(e) ? _e?.(e?.[0], e?.[1], s, null) : t != null && t != Symbol.iterator ? _e?.(e, t, s, null) : Ve?.(e, s, null))) : void 0;
1399
1411
  }
1400
1412
  }
1401
1413
  };
1402
- function rr(e, t, r) {
1414
+ function fr(e, t, r) {
1403
1415
  if (e == null || typeof e != "function") return;
1404
- if (Yt(t) && r === void 0) return Je(e, t);
1416
+ if (rr(t) && r === void 0) return Je(e, t);
1405
1417
  if (t == null) return Je(e, r);
1406
- const n = rt(r), i = {
1418
+ const n = ut(r), i = {
1407
1419
  affectTypes: n.affectTypes,
1408
1420
  triggerImmediately: n.triggerImmediately
1409
- }, u = Zt(t).map((s) => {
1410
- const l = Lt(s);
1411
- return b(l.target, l.prop, (f, o, y, a, ...v) => e(jt(l.source, l.target, f, o, y, a ?? null, v)), i);
1412
- }).filter((s) => typeof s == "function");
1413
- return () => u.forEach((s) => s?.());
1421
+ }, s = nr(t).map((u) => {
1422
+ const l = ir(u);
1423
+ return b(l.target, l.prop, (f, o, y, a, ...v) => e(lr(l.source, l.target, f, o, y, a ?? null, v)), i);
1424
+ }).filter((u) => typeof u == "function");
1425
+ return () => s.forEach((u) => u?.());
1414
1426
  }
1415
- function vr(e, t, r) {
1416
- return rr(t, e, r);
1427
+ function Or(e, t, r) {
1428
+ return fr(t, e, r);
1417
1429
  }
1418
- var br = (e) => e instanceof Set ? it(e) : e instanceof Map ? ur(e) : e, nr = class {
1430
+ var xr = (e) => e instanceof Set ? ct(e) : e instanceof Map ? hr(e) : e, or = class {
1419
1431
  #t = /* @__PURE__ */ new WeakMap();
1420
1432
  #e(e) {
1421
1433
  let t = this.#t.get(e);
@@ -1449,8 +1461,8 @@ var br = (e) => e instanceof Set ? it(e) : e instanceof Map ? ur(e) : e, nr = cl
1449
1461
  getOrCreate(e, t) {
1450
1462
  const [r, n] = this.#r(e), i = this.#e(r);
1451
1463
  if (i.has(n)) return i.get(n);
1452
- const u = t();
1453
- return i.set(n, u), u;
1464
+ const s = t();
1465
+ return i.set(n, s), s;
1454
1466
  }
1455
1467
  getOrInsert(e, t) {
1456
1468
  const [r, n] = this.#r(e), i = this.#e(r);
@@ -1459,45 +1471,45 @@ var br = (e) => e instanceof Set ? it(e) : e instanceof Map ? ur(e) : e, nr = cl
1459
1471
  getOrInsertComputed(e, t) {
1460
1472
  const [r, n] = this.#r(e), i = this.#e(r);
1461
1473
  if (i.has(n)) return i.get(n);
1462
- const u = t([r, n]);
1463
- return i.set(n, u), u;
1474
+ const s = t([r, n]);
1475
+ return i.set(n, s), s;
1464
1476
  }
1465
- }, Ie = new nr();
1466
- function ir(e, t, r = ["*"]) {
1477
+ }, Me = new or();
1478
+ function cr(e, t, r = ["*"]) {
1467
1479
  if (!e) return;
1468
- if (Ie.has([e, t])) return Ie.get([e, t]);
1469
- const n = (i, u, s, l) => {
1470
- if (u == "value") {
1471
- const f = (s?.value ?? s)?.entries?.(), o = e?.value ?? i?.value ?? i;
1480
+ if (Me.has([e, t])) return Me.get([e, t]);
1481
+ const n = (i, s, u, l) => {
1482
+ if (s == "value") {
1483
+ const f = (u?.value ?? u)?.entries?.(), o = e?.value ?? i?.value ?? i;
1472
1484
  if (f) for (const [y, a] of f) {
1473
- const v = a ?? (s?.value ?? s)?.[y] ?? null, A = o?.[y];
1485
+ const v = a ?? (u?.value ?? u)?.[y] ?? null, A = o?.[y];
1474
1486
  v == null && A != null ? t(A, y, null, "add") : v != null && A == null ? t(null, y, v, "delete") : x(v, A) && t(A, y, v, "set");
1475
1487
  }
1476
- return ir(i ?? e?.value, t, r);
1488
+ return cr(i ?? e?.value, t, r);
1477
1489
  }
1478
- return u == null ? void 0 : e[u];
1490
+ return s == null ? void 0 : e[s];
1479
1491
  };
1480
- return Ie.getOrInsertComputed([e, t], () => e instanceof Set ? b([it(e), Symbol.iterator], t, r) : e instanceof Map ? b(e, t, r) : M(e) ? b(e, n, r) : Array.isArray(e) && !(e?.length == 2 && C(e?.[1]) && z(e?.[0])) ? b([e, Symbol.iterator], t, r) : b(e, t, r));
1492
+ return Me.getOrInsertComputed([e, t], () => e instanceof Set ? b([ct(e), Symbol.iterator], t, r) : e instanceof Map ? b(e, t, r) : I(e) ? b(e, n, r) : Array.isArray(e) && !(e?.length == 2 && N(e?.[1]) && C(e?.[0])) ? b([e, Symbol.iterator], t, r) : b(e, t, r));
1481
1493
  }
1482
- function Me(e, t) {
1483
- return St(e, (r) => {
1484
- const n = Array.isArray(r) && r?.length == 2 && ["object", "function"].indexOf(typeof r?.[0]) >= 0 && C(r?.[1]), i = n ? r?.[1] : null;
1494
+ function Ie(e, t) {
1495
+ return xt(e, (r) => {
1496
+ const n = Array.isArray(r) && r?.length == 2 && ["object", "function"].indexOf(typeof r?.[0]) >= 0 && N(r?.[1]), i = n ? r?.[1] : null;
1485
1497
  r = n && i != null ? r?.[0] ?? r : r;
1486
- const u = typeof r == "object" || typeof r == "function" ? r?.[g] ?? r : r;
1487
- (r?.[le] ?? p.get(u))?.unaffected?.(t, i);
1498
+ const s = typeof r == "object" || typeof r == "function" ? r?.[g] ?? r : r;
1499
+ (r?.[se] ?? p.get(s))?.unaffected?.(t, i);
1488
1500
  });
1489
1501
  }
1490
- var lr = (e, t, r) => (b(t, null, (n, i) => {
1491
- ne(e, n, i, !0);
1502
+ var yr = (e, t, r) => (b(t, null, (n, i) => {
1503
+ ie(e, n, i, !0);
1492
1504
  }), r?.(() => e, (n) => {
1493
- for (const i in n) ne(t, n[i], i, !0);
1494
- }, { deep: !0 }), e), Sr = (e, t, r) => lr(t(de(e)), e, r), pr = (e, t, r = () => "") => b(t, null, (n, i) => {
1495
- i == r() && ne(e, n, null, !0);
1496
- }), mr = (e = []) => {
1497
- const t = P({ value: 0 }), r = (l) => typeof l == "function" ? l() : M(l) ? l.value : l, i = fr([t, "value"], () => e.findIndex((l) => !!r(l)), "value"), u = () => {
1505
+ for (const i in n) ie(t, n[i], i, !0);
1506
+ }, { deep: !0 }), e), wr = (e, t, r) => yr(t(he(e)), e, r), Rr = (e, t, r = () => "") => b(t, null, (n, i) => {
1507
+ i == r() && ie(e, n, null, !0);
1508
+ }), Pr = (e = []) => {
1509
+ const t = P({ value: 0 }), r = (l) => typeof l == "function" ? l() : I(l) ? l.value : l, i = dr([t, "value"], () => e.findIndex((l) => !!r(l)), "value"), s = () => {
1498
1510
  t.value++;
1499
- }, s = [];
1500
- z(e) && s.push(b(e, u, {
1511
+ }, u = [];
1512
+ C(e) && u.push(b(e, s, {
1501
1513
  affectTypes: [
1502
1514
  "add",
1503
1515
  "set",
@@ -1505,213 +1517,213 @@ var lr = (e, t, r) => (b(t, null, (n, i) => {
1505
1517
  ],
1506
1518
  triggerImmediately: !1
1507
1519
  }));
1508
- for (const l of e) M(l) && s.push(b([l, "value"], u, {
1520
+ for (const l of e) I(l) && u.push(b([l, "value"], s, {
1509
1521
  affectTypes: ["setter"],
1510
1522
  triggerImmediately: !1
1511
1523
  }));
1512
- return I(i, Symbol.dispose, () => s.forEach((l) => l?.())), i;
1513
- }, sr = (e, t, r, n) => {
1524
+ return M(i, Symbol.dispose, () => u.forEach((l) => l?.())), i;
1525
+ }, ar = (e, t, r, n) => {
1514
1526
  if (m(e)) return e ? t : r;
1515
- const i = () => t, u = () => r, s = (o) => (o != null && (e.value = M(o) ? o?.value : o), (M(e) ? e?.value : e) ? i() : u()), l = P({
1516
- [h]: s(),
1527
+ const i = () => t, s = () => r, u = (o) => (o != null && (e.value = I(o) ? o?.value : o), (I(e) ? e?.value : e) ? i() : s()), l = P({
1528
+ [d]: u(),
1517
1529
  [G]: n,
1518
1530
  [Symbol?.toStringTag]() {
1519
- return String(s() ?? this[h] ?? "") || "";
1531
+ return String(u() ?? this[d] ?? "") || "";
1520
1532
  },
1521
1533
  [Symbol?.toPrimitive](o) {
1522
- return E(s() ?? this[h], o);
1534
+ return E(u() ?? this[d], o);
1523
1535
  },
1524
1536
  set value(o) {
1525
- this[h] = s(o);
1537
+ this[d] = u(o);
1526
1538
  },
1527
1539
  get value() {
1528
- return this[h] = s() ?? this[h];
1540
+ return this[d] = u() ?? this[d];
1529
1541
  }
1530
1542
  }), f = b([e, "value"], () => {
1531
- const o = l?.[h], y = s();
1532
- l[h] = y, l?.[D]?.({
1543
+ const o = l?.[d], y = u();
1544
+ l[d] = y, l?.[D]?.({
1533
1545
  key: "value",
1534
1546
  value: y,
1535
1547
  oldValue: o,
1536
1548
  trigger: "manual"
1537
1549
  });
1538
1550
  });
1539
- return I(l, Symbol.dispose, f), l;
1540
- }, gr = sr, Ar = (e, t, r) => {
1551
+ return M(l, Symbol.dispose, f), l;
1552
+ }, Tr = ar, Mr = (e, t, r) => {
1541
1553
  r || (r = P({}));
1542
- const n = b(e, (i, u, s) => {
1543
- if (u == null) return;
1544
- const l = t?.(i, u, s);
1545
- typeof l == "object" ? yt(r, l) : x(r[u], l) && (r[u] = l);
1554
+ const n = b(e, (i, s, u) => {
1555
+ if (s == null) return;
1556
+ const l = t?.(i, s, u);
1557
+ typeof l == "object" ? St(r, l) : x(r[s], l) && (r[s] = l);
1546
1558
  });
1547
- return r && I(r, Symbol.dispose, n), r;
1548
- }, Or = (...e) => {
1559
+ return r && M(r, Symbol.dispose, n), r;
1560
+ }, Ir = (...e) => {
1549
1561
  const t = P({});
1550
- return e?.forEach?.((r) => b(r, (n, i, u) => {
1562
+ return e?.forEach?.((r) => b(r, (n, i, s) => {
1551
1563
  i != null && x(t[i], n) && (t[i] = n);
1552
1564
  })), t;
1553
- }, it = (e) => {
1565
+ }, ct = (e) => {
1554
1566
  const t = P([]);
1555
- return t.push(...Array.from(e?.values?.() || [])), I(t, Symbol.dispose, b(e, (r, n, i) => {
1567
+ return t.push(...Array.from(e?.values?.() || [])), M(t, Symbol.dispose, b(e, (r, n, i) => {
1556
1568
  if (x(r, i)) if (i == null && r != null) t.push(r);
1557
1569
  else if (i != null && r == null) {
1558
- const u = t.indexOf(i);
1559
- u >= 0 && t.splice(u, 1);
1570
+ const s = t.indexOf(i);
1571
+ s >= 0 && t.splice(s, 1);
1560
1572
  } else {
1561
- const u = t.indexOf(i);
1562
- u >= 0 && x(t[u], r) && (t[u] = r);
1573
+ const s = t.indexOf(i);
1574
+ s >= 0 && x(t[s], r) && (t[s] = r);
1563
1575
  }
1564
1576
  })), t;
1565
- }, ur = (e) => {
1577
+ }, hr = (e) => {
1566
1578
  const t = P([]), r = Array.from(e.entries());
1567
- return t.push(...r), I(t, Symbol.dispose, b(e, (n, i, u) => {
1568
- if (x(n, u) || u == null && n != null || u != null && n == null) if (u != null && n == null) {
1569
- let s = t.findIndex(([l, f]) => l == i);
1570
- s < 0 && (s = t.findLastIndex(([l, f]) => u === f)), s >= 0 && t.splice(s, 1);
1579
+ return t.push(...r), M(t, Symbol.dispose, b(e, (n, i, s) => {
1580
+ if (x(n, s) || s == null && n != null || s != null && n == null) if (s != null && n == null) {
1581
+ let u = t.findIndex(([l, f]) => l == i);
1582
+ u < 0 && (u = t.findLastIndex(([l, f]) => s === f)), u >= 0 && t.splice(u, 1);
1571
1583
  } else {
1572
- let s = t.findIndex(([l, f]) => l == i);
1573
- s >= 0 && s < t.length ? x(t[s]?.[1], n) && (t[s] = [i, n]) : t.push([i, n]);
1584
+ let u = t.findIndex(([l, f]) => l == i);
1585
+ u >= 0 && u < t.length ? x(t[u]?.[1], n) && (t[u] = [i, n]) : t.push([i, n]);
1574
1586
  }
1575
1587
  })), t;
1576
1588
  }, F = /* @__PURE__ */ new WeakMap(), Ze = (e, t, r = "value") => {
1577
- const n = typeof e?.[1] == "function" && e?.length == 2, i = typeof t?.[1] == "function" && t?.length == 2, u = i ? t?.[1] : null, s = (C(e?.[1]) || e?.[1] == Symbol.iterator) && e?.length == 2;
1578
- let l = s && !n ? e?.[1] : Array.isArray(e) ? null : r;
1579
- !s && !n && (e = [e, l]), n && (e[1] = l);
1580
- const f = (C(t?.[1]) || t?.[1] == Symbol.iterator) && t?.length == 2;
1589
+ const n = typeof e?.[1] == "function" && e?.length == 2, i = typeof t?.[1] == "function" && t?.length == 2, s = i ? t?.[1] : null, u = (N(e?.[1]) || e?.[1] == Symbol.iterator) && e?.length == 2;
1590
+ let l = u && !n ? e?.[1] : Array.isArray(e) ? null : r;
1591
+ !u && !n && (e = [e, l]), n && (e[1] = l);
1592
+ const f = (N(t?.[1]) || t?.[1] == Symbol.iterator) && t?.length == 2;
1581
1593
  let o = f && !i ? t?.[1] : Array.isArray(t) ? null : r;
1582
- if (!f && !i && (t = [t, o]), i && (t[1] = o), l == null || o == null || ie(l, e?.[0]) || ie(o, t?.[0])) return;
1594
+ if (!f && !i && (t = [t, o]), i && (t[1] = o), l == null || o == null || le(l, e?.[0]) || le(o, t?.[0])) return;
1583
1595
  if (!((typeof t?.[0] == "object" || typeof t?.[0] == "function") && t?.[0] != null) && !Array.isArray(e[0]))
1584
1596
  return ye(t, () => {
1585
1597
  e[0][l] = t?.[0];
1586
1598
  }), () => {
1587
1599
  };
1588
- const y = (ce, Z) => {
1600
+ const y = (q, j) => {
1589
1601
  const B = A?.deref?.(), L = v?.deref?.();
1590
1602
  if (F?.get?.(B)?.get?.(l)?.bound == L) {
1591
- let we = null;
1603
+ let Re = null;
1592
1604
  const Fe = F?.get?.(B)?.get?.(l)?.cmpfx;
1593
1605
  ye(L, () => {
1594
- typeof Fe == "function" ? we = Fe?.(Ke(L) ?? ce, Z, null) : we = L?.[Z] ?? ce;
1606
+ typeof Fe == "function" ? Re = Fe?.(Ke(L) ?? q, j, null) : Re = L?.[j] ?? q;
1595
1607
  });
1596
- const He = Ke(we);
1608
+ const He = Ke(Re);
1597
1609
  x(B[l], He) && ye(L, () => {
1598
1610
  B[l] = He;
1599
1611
  });
1600
1612
  } else F?.get?.(B)?.get?.(l)?.dispose?.();
1601
1613
  }, a = () => {
1602
- const ce = A?.deref?.(), Z = F?.get?.(ce), B = Z?.get?.(l);
1603
- Z?.delete?.(l), B?.unsub?.();
1614
+ const q = A?.deref?.(), j = F?.get?.(q), B = j?.get?.(l);
1615
+ j?.delete?.(l), B?.unsub?.();
1604
1616
  }, v = t?.[0] != null && (typeof t?.[0] == "object" || typeof t?.[0] == "function") && !(t?.[0] instanceof WeakRef || typeof t?.[0]?.deref == "function") ? new WeakRef(t?.[0]) : t?.[0], A = e?.[0] != null && (typeof e?.[0] == "object" || typeof e?.[0] == "function") && !(e?.[0] instanceof WeakRef || typeof e?.[0]?.deref == "function") ? new WeakRef(e?.[0]) : e?.[0];
1605
- let R = {
1617
+ let w = {
1606
1618
  compute: y,
1607
1619
  dispose: a,
1608
- cmpfx: u
1620
+ cmpfx: s
1609
1621
  };
1610
1622
  const O = A?.deref?.(), k = v?.deref?.();
1611
- return A instanceof WeakRef && (F?.get?.(O)?.get?.(l)?.bound != k && F?.get?.(O)?.delete?.(l), R = F?.getOrInsert?.(O, /* @__PURE__ */ new Map())?.getOrInsertComputed?.(l, () => ({
1623
+ return A instanceof WeakRef && (F?.get?.(O)?.get?.(l)?.bound != k && F?.get?.(O)?.delete?.(l), w = F?.getOrInsert?.(O, /* @__PURE__ */ new Map())?.getOrInsertComputed?.(l, () => ({
1612
1624
  bound: k,
1613
- cmpfx: u,
1625
+ cmpfx: s,
1614
1626
  unsub: null,
1615
1627
  compute: y,
1616
1628
  dispose: a
1617
- })), R.unsub = b(t, y), R.cmpfx = u, I(O, Symbol.dispose, R?.dispose), I(k, Symbol.dispose, R?.dispose)), k && !Array.isArray(k) && ye(O, () => {
1629
+ })), w.unsub = b(t, y), w.cmpfx = s, M(O, Symbol.dispose, w?.dispose), M(k, Symbol.dispose, w?.dispose)), k && !Array.isArray(k) && ye(O, () => {
1618
1630
  k[o] ??= O?.[l] ?? k[o];
1619
- }), R?.dispose;
1620
- }, xr = (e, t, r = "value") => {
1631
+ }), w?.dispose;
1632
+ }, kr = (e, t, r = "value") => {
1621
1633
  const n = [Ze(e, t, r), Ze(t, e, r)];
1622
1634
  return () => n?.map?.((i) => i?.());
1623
- }, fr = (e, t, r, n = "value") => {
1624
- const i = typeof e?.[1] == "function" && e?.length == 2, u = (C(e?.[1]) || e?.[1] == Symbol.iterator) && e?.length == 2;
1625
- let s = u && !i ? e?.[1] : Array.isArray(e) ? null : n;
1626
- if (!u && !i && (e = [u ? e?.[0] : e, s]), i && (e[1] = s), s == null || ie(s, e?.[0])) return;
1635
+ }, dr = (e, t, r, n = "value") => {
1636
+ const i = typeof e?.[1] == "function" && e?.length == 2, s = (N(e?.[1]) || e?.[1] == Symbol.iterator) && e?.length == 2;
1637
+ let u = s && !i ? e?.[1] : Array.isArray(e) ? null : n;
1638
+ if (!s && !i && (e = [s ? e?.[0] : e, u]), i && (e[1] = u), u == null || le(u, e?.[0])) return;
1627
1639
  const l = (a) => {
1628
1640
  let v;
1629
- return a != null && (v = e[0][s], e[0][s] = a), t?.(e?.[0]?.[s], s, v);
1641
+ return a != null && (v = e[0][u], e[0][u] = a), t?.(e?.[0]?.[u], u, v);
1630
1642
  }, f = l(), o = P({
1631
- [fe]: void 0,
1632
- [h]: f,
1643
+ [oe]: void 0,
1644
+ [d]: f,
1633
1645
  [G]: r,
1634
1646
  [Symbol?.toStringTag]() {
1635
- return String(l() ?? this[h] ?? "") || "";
1647
+ return String(l() ?? this[d] ?? "") || "";
1636
1648
  },
1637
1649
  [Symbol?.toPrimitive](a) {
1638
- return E(l() ?? this[h], a);
1650
+ return E(l() ?? this[d], a);
1639
1651
  },
1640
1652
  set value(a) {
1641
- this[h] = l(a);
1653
+ this[d] = l(a);
1642
1654
  },
1643
1655
  get value() {
1644
- return this[h] = l() ?? this[h];
1656
+ return this[d] = l() ?? this[d];
1645
1657
  }
1646
- }), y = b([e?.[0] ?? e, s ?? "value"], () => {
1647
- const a = o?.[h], v = l();
1648
- o[h] = v, o?.[D]?.({
1658
+ }), y = b([e?.[0] ?? e, u ?? "value"], () => {
1659
+ const a = o?.[d], v = l();
1660
+ o[d] = v, o?.[D]?.({
1649
1661
  key: "value",
1650
1662
  value: v,
1651
1663
  oldValue: a,
1652
1664
  trigger: "manual"
1653
1665
  });
1654
1666
  });
1655
- return I(o, Symbol.dispose, y), o;
1656
- }, Rr = (e, t, r = 100) => {
1667
+ return M(o, Symbol.dispose, y), o;
1668
+ }, Er = (e, t, r = 100) => {
1657
1669
  let n;
1658
1670
  return b(e, "value", (i) => {
1659
- !i && n ? (clearTimeout(n), n = null) : i && !n && (n = Ce(e, t, r) ?? n);
1671
+ !i && n ? (clearTimeout(n), n = null) : i && !n && (n = Ne(e, t, r) ?? n);
1660
1672
  });
1661
1673
  };
1662
1674
  export {
1663
- se as $affected,
1664
- Gt as $ref,
1675
+ ue as $affected,
1676
+ Yt as $ref,
1665
1677
  D as $trigger,
1666
- ht as $triggerControl,
1678
+ gt as $triggerControl,
1667
1679
  me as $triggerLess,
1668
- d as $triggerLock,
1669
- mt as AssignObjectHandler,
1670
- nr as DoubleWeakMap,
1671
- I as addToCallChain,
1680
+ h as $triggerLock,
1681
+ Rt as AssignObjectHandler,
1682
+ or as DoubleWeakMap,
1683
+ M as addToCallChain,
1672
1684
  b as affected,
1673
1685
  Ze as assign,
1674
1686
  F as assignMap,
1675
- lr as bindBy,
1676
- pr as bindByKey,
1677
- Ht as booleanRef,
1678
- fr as computed,
1679
- gr as conditional,
1680
- mr as conditionalIndex,
1681
- sr as conditionalRef,
1682
- ar as delayedBehavior,
1683
- dr as delayedOrInstantBehavior,
1684
- Rr as delayedSubscribe,
1687
+ yr as bindBy,
1688
+ Rr as bindByKey,
1689
+ Qt as booleanRef,
1690
+ dr as computed,
1691
+ Tr as conditional,
1692
+ Pr as conditionalIndex,
1693
+ ar as conditionalRef,
1694
+ mr as delayedBehavior,
1695
+ gr as delayedOrInstantBehavior,
1696
+ Er as delayedSubscribe,
1685
1697
  V as deref,
1686
- Sr as derivate,
1687
- rr as effect,
1688
- vr as effected,
1689
- z as isObservable,
1690
- ir as iterated,
1691
- xr as link,
1692
- br as makeArrayObservable,
1693
- cr as makeObjectAssignable,
1694
- Bt as numberRef,
1695
- ur as observableByMap,
1696
- it as observableBySet,
1698
+ wr as derivate,
1699
+ fr as effect,
1700
+ Or as effected,
1701
+ C as isObservable,
1702
+ cr as iterated,
1703
+ kr as link,
1704
+ xr as makeArrayObservable,
1705
+ br as makeObjectAssignable,
1706
+ Ut as numberRef,
1707
+ hr as observableByMap,
1708
+ ct as observableBySet,
1697
1709
  P as observe,
1698
- yr as promised,
1699
- Kt as propRef,
1700
- Ut as recoverReactive,
1701
- qt as ref,
1702
- Ar as remap,
1703
- de as safe,
1704
- q as specializedSubscribe,
1705
- Ft as stringRef,
1706
- Qt as subscribeDirectly,
1707
- Xt as subscribeInput,
1708
- er as subscribePaired,
1709
- tr as subscribeThenable,
1710
- Ce as triggerWithDelay,
1711
- Me as unaffected,
1712
- Or as unified,
1713
- bt as unwrap,
1714
- hr as useObservable,
1710
+ pr as promised,
1711
+ Xt as propRef,
1712
+ jt as recoverReactive,
1713
+ Zt as ref,
1714
+ Mr as remap,
1715
+ he as safe,
1716
+ U as specializedSubscribe,
1717
+ Jt as stringRef,
1718
+ er as subscribeDirectly,
1719
+ tr as subscribeInput,
1720
+ sr as subscribePaired,
1721
+ ur as subscribeThenable,
1722
+ Ne as triggerWithDelay,
1723
+ Ie as unaffected,
1724
+ Ir as unified,
1725
+ Ot as unwrap,
1726
+ Ar as useObservable,
1715
1727
  Ye as wrapRef,
1716
- or as wrapSetAsArray
1728
+ vr as wrapSetAsArray
1717
1729
  };