@fest-lib/veela 0.1.2 → 0.1.4

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 (2) hide show
  1. package/dist/veela.js +308 -308
  2. package/package.json +1 -1
package/dist/veela.js CHANGED
@@ -1,4 +1,4 @@
1
- var K = /* @__PURE__ */ new Set();
1
+ var pe = /* @__PURE__ */ Symbol.for("dom.ts@__registeredCssProperties"), K = globalThis[pe] ??= /* @__PURE__ */ new Set();
2
2
  [
3
3
  {
4
4
  name: "--screen-width",
@@ -198,42 +198,42 @@ var K = /* @__PURE__ */ new Set();
198
198
  if (!(!t || K.has(t)))
199
199
  try {
200
200
  CSS.registerProperty(e);
201
- } catch (n) {
202
- String(n?.name || "").toLowerCase() !== "invalidmodificationerror" && console.warn(n);
201
+ } catch (a) {
202
+ String(a?.name || "").toLowerCase() !== "invalidmodificationerror" && console.warn(a);
203
203
  } finally {
204
204
  K.add(t);
205
205
  }
206
206
  });
207
- function pe() {
207
+ function he() {
208
208
  const e = globalThis;
209
209
  if (typeof e.HTMLElement == "function") return;
210
210
  const t = class {
211
- }, n = (a) => {
212
- typeof e[a] != "function" && (e[a] = t);
211
+ }, a = (n) => {
212
+ typeof e[n] != "function" && (e[n] = t);
213
213
  };
214
- n("EventTarget"), n("Node"), n("Element"), n("HTMLElement"), n("SVGElement"), n("Text"), n("Comment"), n("DocumentFragment"), n("ShadowRoot"), n("HTMLDocument"), n("Document"), n("HTMLBodyElement"), n("HTMLHeadElement"), n("HTMLCanvasElement"), n("HTMLInputElement"), n("HTMLLinkElement"), n("HTMLStyleElement"), n("HTMLPreElement"), n("HTMLDivElement"), n("CSSStyleRule"), n("CSSLayerBlockRule");
214
+ a("EventTarget"), a("Node"), a("Element"), a("HTMLElement"), a("SVGElement"), a("Text"), a("Comment"), a("DocumentFragment"), a("ShadowRoot"), a("HTMLDocument"), a("Document"), a("HTMLBodyElement"), a("HTMLHeadElement"), a("HTMLCanvasElement"), a("HTMLInputElement"), a("HTMLLinkElement"), a("HTMLStyleElement"), a("HTMLPreElement"), a("HTMLDivElement"), a("CSSStyleRule"), a("CSSLayerBlockRule");
215
215
  }
216
- var he = (e, t = "value") => (typeof e == "object" || typeof e == "function") && e != null && (t in e || e?.[t] != null), ne = (e) => he(e, "value"), ae = (e) => e && e?.replace?.(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(), re = (e) => {
216
+ var fe = (e, t = "value") => (typeof e == "object" || typeof e == "function") && e != null && (t in e || e?.[t] != null), ae = (e) => fe(e, "value"), ne = (e) => e && e?.replace?.(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(), re = (e) => {
217
217
  if (typeof e != "string") return null;
218
218
  const t = [...e?.matchAll?.(/^\d+(\.\d+)?$/g)];
219
219
  if (t?.length != 1) return null;
220
- const n = parseFloat(t[0][0]);
221
- return !Number.isNaN(n) && Number.isFinite(n) ? n : null;
220
+ const a = parseFloat(t[0][0]);
221
+ return !Number.isNaN(a) && Number.isFinite(a) ? a : null;
222
222
  };
223
- pe();
224
- var qe = typeof document < "u" ? document?.documentElement : null, fe = /* @__PURE__ */ new Map();
223
+ he();
224
+ var at = typeof document < "u" ? document?.documentElement : null, ye = /* @__PURE__ */ new Map();
225
225
  typeof requestAnimationFrame < "u" && requestAnimationFrame(async () => {
226
226
  for (; ; )
227
- fe.forEach((e) => e?.()), await new Promise((e) => requestAnimationFrame(e));
227
+ ye.forEach((e) => e?.()), await new Promise((e) => requestAnimationFrame(e));
228
228
  });
229
229
  var ge = {};
230
- function v(e, t, n, a = ge) {
231
- e?.addEventListener?.(t, n, a);
230
+ function v(e, t, a, n = ge) {
231
+ e?.addEventListener?.(t, a, n);
232
232
  const r = typeof e == "object" || typeof e == "function" && !e?.deref ? new WeakRef(e) : e;
233
- return () => r?.deref?.()?.removeEventListener?.(t, n, a);
233
+ return () => r?.deref?.()?.removeEventListener?.(t, a, n);
234
234
  }
235
- var ye = () => {
236
- const e = typeof matchMedia < "u" ? matchMedia("(orientation: landscape)")?.matches : !1, t = typeof window < "u" ? window.visualViewport : null, n = t ? {
235
+ var ve = /* @__PURE__ */ Symbol.for("dom.ts@zoomValues"), nt = globalThis[ve] ??= /* @__PURE__ */ new WeakMap(), me = () => {
236
+ const e = typeof matchMedia < "u" ? matchMedia("(orientation: landscape)")?.matches : !1, t = typeof window < "u" ? window.visualViewport : null, a = t ? {
237
237
  "--vv-width": `${t.width}px`,
238
238
  "--vv-height": `${t.height}px`,
239
239
  "--vv-offset-left": `${t.offsetLeft}px`,
@@ -247,15 +247,15 @@ var ye = () => {
247
247
  "--vv-scale": "1"
248
248
  };
249
249
  if (typeof screen < "u") {
250
- const a = screen?.availWidth + "px", r = screen?.availHeight + "px";
250
+ const n = screen?.availWidth + "px", r = screen?.availHeight + "px";
251
251
  return {
252
252
  "--screen-width": Math.min(screen?.width, screen?.availWidth) + "px",
253
253
  "--screen-height": Math.min(screen?.height, screen?.availHeight) + "px",
254
- "--avail-width": e ? r : a,
255
- "--avail-height": e ? a : r,
254
+ "--avail-width": e ? r : n,
255
+ "--avail-height": e ? n : r,
256
256
  "--view-height": Math.min(screen?.availHeight, window?.innerHeight) + "px",
257
257
  "--pixel-ratio": String(devicePixelRatio || 1),
258
- ...n
258
+ ...a
259
259
  };
260
260
  }
261
261
  return {
@@ -265,45 +265,45 @@ var ye = () => {
265
265
  "--avail-height": "0px",
266
266
  "--view-height": "0px",
267
267
  "--pixel-ratio": "1",
268
- ...n
268
+ ...a
269
269
  };
270
- }, Oe = ye(), We = new OffscreenCanvas(1, 1).getContext("2d"), ie = (e) => (typeof e?.current == "object" && (e = e?.element ?? e?.current ?? (typeof e?.self == "object" ? e?.self : null) ?? e), e), ve = (e, t, n, a) => {
271
- const r = new Set([...n.split(",") || [n]].map((i) => i.trim())), o = new MutationObserver((i, u) => {
272
- for (const s of i) if (s.type == "childList") {
273
- const p = Array.from(s.addedNodes) || [], y = Array.from(s.removedNodes) || [];
274
- p.push(...Array.from(s.addedNodes || []).flatMap((h) => Array.from(h?.querySelectorAll?.(t) || []))), y.push(...Array.from(s.removedNodes || []).flatMap((h) => Array.from(h?.querySelectorAll?.(t) || []))), [...new Set(p)].filter((h) => h?.matches?.(t))?.map?.((h) => {
270
+ }, rt = me(), ot = new OffscreenCanvas(1, 1).getContext("2d"), be = /* @__PURE__ */ Symbol.for("dom.ts@onBorderObserve"), it = globalThis[be] ??= /* @__PURE__ */ new WeakMap(), Se = /* @__PURE__ */ Symbol.for("dom.ts@onContentObserve"), st = globalThis[Se] ??= /* @__PURE__ */ new WeakMap(), oe = (e) => (typeof e?.current == "object" && (e = e?.element ?? e?.current ?? (typeof e?.self == "object" ? e?.self : null) ?? e), e), we = (e, t, a, n) => {
271
+ const r = new Set([...a.split(",") || [a]].map((o) => o.trim())), s = new MutationObserver((o, c) => {
272
+ for (const i of o) if (i.type == "childList") {
273
+ const p = Array.from(i.addedNodes) || [], g = Array.from(i.removedNodes) || [];
274
+ p.push(...Array.from(i.addedNodes || []).flatMap((h) => Array.from(h?.querySelectorAll?.(t) || []))), g.push(...Array.from(i.removedNodes || []).flatMap((h) => Array.from(h?.querySelectorAll?.(t) || []))), [...new Set(p)].filter((h) => h?.matches?.(t))?.map?.((h) => {
275
275
  r.forEach((d) => {
276
- a({
276
+ n({
277
277
  target: h,
278
278
  type: "attributes",
279
279
  attributeName: d,
280
280
  oldValue: h?.getAttribute?.(d)
281
- }, u);
281
+ }, c);
282
282
  });
283
283
  });
284
- } else s.target?.matches?.(t) && s.attributeName && r.has(s.attributeName) && a(s, u);
284
+ } else i.target?.matches?.(t) && i.attributeName && r.has(i.attributeName) && n(i, c);
285
285
  });
286
- return o.observe(e = ie(e), {
286
+ return s.observe(e = oe(e), {
287
287
  attributeOldValue: !0,
288
288
  attributes: !0,
289
289
  attributeFilter: [...r],
290
290
  childList: !0,
291
291
  subtree: !0,
292
292
  characterData: !0
293
- }), [...e.querySelectorAll(t)].map((i) => r.forEach((u) => a({
294
- target: i,
293
+ }), [...e.querySelectorAll(t)].map((o) => r.forEach((c) => n({
294
+ target: o,
295
295
  type: "attributes",
296
- attributeName: u,
297
- oldValue: i?.getAttribute?.(u)
298
- }, o))), o;
299
- }, me = (e, t = "*", n = (a, r) => {
296
+ attributeName: c,
297
+ oldValue: o?.getAttribute?.(c)
298
+ }, s))), s;
299
+ }, xe = (e, t = "*", a = (n, r) => {
300
300
  }) => {
301
- const a = (d) => {
302
- const l = Array.from(d || []) || [];
303
- return l.push(...Array.from(d || []).flatMap((c) => Array.from(c?.querySelectorAll?.(t) || []))), [...Array.from(new Set(l).values())].filter((c) => c?.matches?.(t));
301
+ const n = (d) => {
302
+ const u = Array.from(d || []) || [];
303
+ return u.push(...Array.from(d || []).flatMap((l) => Array.from(l?.querySelectorAll?.(t) || []))), [...Array.from(new Set(u).values())].filter((l) => l?.matches?.(t));
304
304
  }, r = (d) => {
305
- const l = y?.deref?.(), c = a(d.addedNodes), f = a(d.removedNodes);
306
- (c.length > 0 || f.length > 0) && n?.({
305
+ const u = g?.deref?.(), l = n(d.addedNodes), f = n(d.removedNodes);
306
+ (l.length > 0 || f.length > 0) && a?.({
307
307
  type: d.type,
308
308
  target: d.target,
309
309
  attributeName: d.attributeName,
@@ -311,281 +311,281 @@ var ye = () => {
311
311
  nextSibling: d.nextSibling,
312
312
  oldValue: d.oldValue,
313
313
  previousSibling: d.previousSibling,
314
- addedNodes: c,
314
+ addedNodes: l,
315
315
  removedNodes: f
316
- }, l);
317
- }, o = (d) => {
316
+ }, u);
317
+ }, s = (d) => {
318
318
  r({
319
- addedNodes: [d?.target].filter((l) => !!l),
320
- removedNodes: [d?.relatedTarget].filter((l) => !!l),
319
+ addedNodes: [d?.target].filter((u) => !!u),
320
+ removedNodes: [d?.relatedTarget].filter((u) => !!u),
321
321
  type: "childList",
322
322
  target: d?.currentTarget
323
323
  });
324
- }, i = (d) => {
324
+ }, o = (d) => {
325
325
  r({
326
- addedNodes: [d?.relatedTarget].filter((l) => !!l),
327
- removedNodes: [d?.target].filter((l) => !!l),
326
+ addedNodes: [d?.relatedTarget].filter((u) => !!u),
327
+ removedNodes: [d?.target].filter((u) => !!u),
328
328
  type: "childList",
329
329
  target: d?.currentTarget
330
330
  });
331
- }, u = (d) => {
331
+ }, c = (d) => {
332
332
  r({
333
- addedNodes: [d?.target].filter((l) => !!l),
334
- removedNodes: [d?.relatedTarget || document?.activeElement].filter((l) => !!l),
333
+ addedNodes: [d?.target].filter((u) => !!u),
334
+ removedNodes: [d?.relatedTarget || document?.activeElement].filter((u) => !!u),
335
335
  type: "childList",
336
336
  target: d?.currentTarget
337
337
  });
338
- }, s = {
338
+ }, i = {
339
339
  passive: !0,
340
340
  capture: !1
341
341
  };
342
342
  if (t?.includes?.(":hover") && t?.includes?.(":active"))
343
- return e.addEventListener("pointerover", o, s), e.addEventListener("pointerout", i, s), e.addEventListener("pointerdown", o, s), e.addEventListener("pointerup", i, s), e.addEventListener("pointercancel", i, s), { disconnect: () => {
344
- e.removeEventListener("pointerover", o, s), e.removeEventListener("pointerout", i, s), e.removeEventListener("pointerdown", o, s), e.removeEventListener("pointerup", i, s), e.removeEventListener("pointercancel", i, s);
343
+ return e.addEventListener("pointerover", s, i), e.addEventListener("pointerout", o, i), e.addEventListener("pointerdown", s, i), e.addEventListener("pointerup", o, i), e.addEventListener("pointercancel", o, i), { disconnect: () => {
344
+ e.removeEventListener("pointerover", s, i), e.removeEventListener("pointerout", o, i), e.removeEventListener("pointerdown", s, i), e.removeEventListener("pointerup", o, i), e.removeEventListener("pointercancel", o, i);
345
345
  } };
346
346
  if (t?.includes?.(":hover"))
347
- return e.addEventListener("pointerover", o, s), e.addEventListener("pointerout", i, s), { disconnect: () => {
348
- e.removeEventListener("pointerover", o, s), e.removeEventListener("pointerout", i, s);
347
+ return e.addEventListener("pointerover", s, i), e.addEventListener("pointerout", o, i), { disconnect: () => {
348
+ e.removeEventListener("pointerover", s, i), e.removeEventListener("pointerout", o, i);
349
349
  } };
350
350
  if (t?.includes?.(":active"))
351
- return e.addEventListener("pointerdown", o, s), e.addEventListener("pointerup", i, s), e.addEventListener("pointercancel", i, s), { disconnect: () => {
352
- e.removeEventListener("pointerdown", o, s), e.removeEventListener("pointerup", i, s), e.removeEventListener("pointercancel", i, s);
351
+ return e.addEventListener("pointerdown", s, i), e.addEventListener("pointerup", o, i), e.addEventListener("pointercancel", o, i), { disconnect: () => {
352
+ e.removeEventListener("pointerdown", s, i), e.removeEventListener("pointerup", o, i), e.removeEventListener("pointercancel", o, i);
353
353
  } };
354
354
  if (t?.includes?.(":focus") && t?.includes?.(":focus-within") && t?.includes?.(":focus-visible"))
355
- return e.addEventListener("focusin", o, s), e.addEventListener("focusout", i, s), e.addEventListener("click", u, s), { disconnect: () => {
356
- e.removeEventListener("focusin", o, s), e.removeEventListener("focusout", i, s), e.removeEventListener("click", u, s);
355
+ return e.addEventListener("focusin", s, i), e.addEventListener("focusout", o, i), e.addEventListener("click", c, i), { disconnect: () => {
356
+ e.removeEventListener("focusin", s, i), e.removeEventListener("focusout", o, i), e.removeEventListener("click", c, i);
357
357
  } };
358
- const p = new MutationObserver((d, l) => {
359
- for (const c of d) c.type == "childList" && r(c);
360
- }), y = new WeakRef(p);
361
- (e?.element ?? e) instanceof Node && p.observe(e = ie(e), {
358
+ const p = new MutationObserver((d, u) => {
359
+ for (const l of d) l.type == "childList" && r(l);
360
+ }), g = new WeakRef(p);
361
+ (e?.element ?? e) instanceof Node && p.observe(e = oe(e), {
362
362
  childList: !0,
363
363
  subtree: !0
364
364
  });
365
365
  const h = Array.from(e.querySelectorAll(t));
366
- return h.length > 0 && n?.({
366
+ return h.length > 0 && a?.({
367
367
  addedNodes: h,
368
368
  removedNodes: []
369
369
  }, p), p;
370
- }, be = () => typeof globalThis < "u" && typeof globalThis.CSSStyleSheet == "function", Q = (e) => typeof e == "string" && /@import\b/i.test(e), Y = "DOM", W = typeof document < "u" ? document.createElement("style") : null;
371
- W && (typeof document < "u" && document.querySelector("head")?.appendChild?.(W), W.dataset.owner = Y);
372
- var ee = (e, t, n = "") => {
373
- e[0][e[1]] = e[1] == "innerHTML" ? `@import url("${t}") ${n && typeof n == "string" ? `layer(${n})` : ""};` : t;
374
- }, O = typeof CSSStyleValue < "u" && typeof CSSUnitValue < "u", E = (e) => O && e instanceof CSSStyleValue, S = (e) => O && e instanceof CSSUnitValue, b = (e, t, n, a = "") => {
370
+ }, Me = () => typeof globalThis < "u" && typeof globalThis.CSSStyleSheet == "function", Q = (e) => typeof e == "string" && /@import\b/i.test(e), Y = "DOM", q = typeof document < "u" ? document.createElement("style") : null;
371
+ q && (typeof document < "u" && document.querySelector("head")?.appendChild?.(q), q.dataset.owner = Y);
372
+ var ee = (e, t, a = "") => {
373
+ e[0][e[1]] = e[1] == "innerHTML" ? `@import url("${t}") ${a && typeof a == "string" ? `layer(${a})` : ""};` : t;
374
+ }, H = typeof CSSStyleValue < "u" && typeof CSSUnitValue < "u", M = (e) => H && e instanceof CSSStyleValue, x = (e) => H && e instanceof CSSUnitValue, b = (e, t, a, n = "") => {
375
375
  if (!(!e || !t)) {
376
- if (n == null) {
376
+ if (a == null) {
377
377
  e.getPropertyValue(t) !== "" && e.removeProperty(t);
378
378
  return;
379
379
  }
380
- e.getPropertyValue(t) !== n && e.setProperty(t, n, a);
380
+ e.getPropertyValue(t) !== a && e.setProperty(t, a, n);
381
381
  }
382
- }, we = (e, t, n, a = "") => {
382
+ }, Ee = (e, t, a, n = "") => {
383
383
  if (!e || !t) return e;
384
- const r = ae(t), o = e.style, i = e.attributeStyleMap ?? e.styleMap;
385
- if (!O || !i) return se(e, t, n, a);
386
- let u = ne(n) && !(E(n) || S(n)) ? n?.value : n;
387
- if (u == null)
388
- return i.delete?.(r), o && b(o, r, null, a), e;
389
- if (E(u)) {
390
- const s = i.get(r);
391
- if (S(u) && S(s)) {
392
- if (s.value === u.value && s.unit === u.unit) return e;
393
- } else if (s === u) return e;
394
- return i.set(r, u), e;
395
- }
396
- if (typeof u == "number") if (CSS?.number && !r.startsWith("--")) {
397
- const s = CSS.number(u), p = i.get(r);
398
- return S(p) && p.value === s.value && p.unit === s.unit || i.set(r, s), e;
384
+ const r = ne(t), s = e.style, o = e.attributeStyleMap ?? e.styleMap;
385
+ if (!H || !o) return ie(e, t, a, n);
386
+ let c = ae(a) && !(M(a) || x(a)) ? a?.value : a;
387
+ if (c == null)
388
+ return o.delete?.(r), s && b(s, r, null, n), e;
389
+ if (M(c)) {
390
+ const i = o.get(r);
391
+ if (x(c) && x(i)) {
392
+ if (i.value === c.value && i.unit === c.unit) return e;
393
+ } else if (i === c) return e;
394
+ return o.set(r, c), e;
395
+ }
396
+ if (typeof c == "number") if (CSS?.number && !r.startsWith("--")) {
397
+ const i = CSS.number(c), p = o.get(r);
398
+ return x(p) && p.value === i.value && p.unit === i.unit || o.set(r, i), e;
399
399
  } else
400
- return b(o, r, String(u), a), e;
401
- if (typeof u == "string" && !E(u)) {
402
- const s = re(u);
403
- if (typeof s == "number" && CSS?.number && !r.startsWith("--")) {
404
- const p = CSS.number(s), y = i.get(r);
405
- return S(y) && y.value === p.value && y.unit === p.unit || i.set(r, p), e;
400
+ return b(s, r, String(c), n), e;
401
+ if (typeof c == "string" && !M(c)) {
402
+ const i = re(c);
403
+ if (typeof i == "number" && CSS?.number && !r.startsWith("--")) {
404
+ const p = CSS.number(i), g = o.get(r);
405
+ return x(g) && g.value === p.value && g.unit === p.unit || o.set(r, p), e;
406
406
  } else
407
- return b(o, r, u, a), e;
407
+ return b(s, r, c, n), e;
408
408
  }
409
- return b(o, r, String(u), a), e;
410
- }, se = (e, t, n, a = "") => {
409
+ return b(s, r, String(c), n), e;
410
+ }, ie = (e, t, a, n = "") => {
411
411
  if (!e || !t) return e;
412
- const r = ae(t), o = e.style;
413
- if (!o) return e;
414
- let i = ne(n) && !(E(n) || S(n)) ? n?.value : n;
415
- return typeof i == "string" && !E(i) && (i = re(i) ?? i), i == null ? (b(o, r, null, a), e) : (E(i) || typeof i == "number", b(o, r, String(i), a), e);
416
- }, oe = (e, t) => typeof e?.then == "function" ? e?.then?.(t) : t(e), M = /* @__PURE__ */ new WeakMap(), w = /* @__PURE__ */ new Map(), xe = (e) => {
412
+ const r = ne(t), s = e.style;
413
+ if (!s) return e;
414
+ let o = ae(a) && !(M(a) || x(a)) ? a?.value : a;
415
+ return typeof o == "string" && !M(o) && (o = re(o) ?? o), o == null ? (b(s, r, null, n), e) : (M(o) || typeof o == "number", b(s, r, String(o), n), e);
416
+ }, se = (e, t) => typeof e?.then == "function" ? e?.then?.(t) : t(e), Le = /* @__PURE__ */ Symbol.for("dom.ts@blobURLMap"), E = globalThis[Le] ??= /* @__PURE__ */ new WeakMap(), Ce = /* @__PURE__ */ Symbol.for("dom.ts@cacheMap"), S = globalThis[Ce] ??= /* @__PURE__ */ new Map(), Ve = (e) => {
417
417
  if (!e) return null;
418
- if (w.has(e)) return w.get(e);
418
+ if (S.has(e)) return S.get(e);
419
419
  if (e instanceof Blob || e instanceof File) {
420
- if (M.has(e)) return M.get(e);
420
+ if (E.has(e)) return E.get(e);
421
421
  const t = URL.createObjectURL(e);
422
- return M.set(e, t), w.set(t, t), t;
422
+ return E.set(e, t), S.set(t, t), t;
423
423
  }
424
424
  if (URL.canParse(e) || e?.trim?.()?.startsWith?.("./")) {
425
425
  const t = fetch(e?.replace?.("?url", "?raw"), {
426
426
  cache: "force-cache",
427
427
  mode: "same-origin",
428
428
  priority: "high"
429
- })?.then?.(async (n) => {
430
- const a = await n.blob(), r = URL.createObjectURL(a);
431
- return M.set(a, r), w.set(e, r), w.set(r, r), r;
429
+ })?.then?.(async (a) => {
430
+ const n = await a.blob(), r = URL.createObjectURL(n);
431
+ return E.set(n, r), S.set(e, r), S.set(r, r), r;
432
432
  });
433
- return w.set(e, t), t;
433
+ return S.set(e, t), t;
434
434
  }
435
435
  if (typeof e == "string") {
436
- const t = new Blob([e], { type: "text/css" }), n = URL.createObjectURL(t);
437
- return M.set(t, n), w.set(n, n), n;
436
+ const t = new Blob([e], { type: "text/css" }), a = URL.createObjectURL(t);
437
+ return E.set(t, a), S.set(a, a), a;
438
438
  }
439
439
  return e;
440
- }, L = /* @__PURE__ */ new Map(), T = /* @__PURE__ */ new WeakMap(), Se = (e) => {
440
+ }, L = /* @__PURE__ */ new Map(), A = /* @__PURE__ */ new WeakMap(), Te = (e) => {
441
441
  if (!e) return "";
442
442
  if (L.has(e)) return L.get(e) ?? "";
443
443
  if (e instanceof Blob || e instanceof File) {
444
- if (T.has(e)) return T.get(e) ?? "";
445
- const t = e?.text?.()?.then?.((n) => (T.set(e, n), n));
446
- return T.set(e, t), t;
444
+ if (A.has(e)) return A.get(e) ?? "";
445
+ const t = e?.text?.()?.then?.((a) => (A.set(e, a), a));
446
+ return A.set(e, t), t;
447
447
  }
448
448
  if (URL.canParse(e) || e?.trim?.()?.startsWith?.("./")) {
449
449
  const t = fetch(e?.replace?.("?url", "?raw"), {
450
450
  cache: "force-cache",
451
451
  mode: "same-origin",
452
452
  priority: "high"
453
- })?.then?.(async (n) => {
454
- const a = await n.text();
455
- return L.set(e, a), a;
453
+ })?.then?.(async (a) => {
454
+ const n = await a.text();
455
+ return L.set(e, n), n;
456
456
  });
457
457
  return L.set(e, t), t;
458
458
  }
459
459
  return typeof e == "string" && L.set(e, e), e;
460
- }, N = (e, t, n, a = "") => O ? we(e, t, n, a) : se(e, t, n, a), de = (e, t, n = "", a) => {
461
- const r = xe(e), o = typeof e == "string" && URL.canParse(e) ? e : r;
462
- return t?.[0] && (t[0].fetchPriority = "high"), t && o && typeof o == "string" && ee(t, o, n), t?.[0] && (!URL.canParse(e) || a) && t?.[0] instanceof HTMLLinkElement, oe(r, (i) => {
463
- t?.[0] && i && (ee(t, i, n), t?.[0].setAttribute("loaded", ""));
464
- })?.catch?.((i) => {
465
- console.warn("Failed to load style sheet:", i);
460
+ }, je = /* @__PURE__ */ Symbol.for("dom.ts@adoptedSelectorMap"), dt = globalThis[je] ??= /* @__PURE__ */ new Map(), Ae = /* @__PURE__ */ Symbol.for("dom.ts@adoptedShadowSelectorMap"), lt = globalThis[Ae] ??= /* @__PURE__ */ new WeakMap(), Ne = /* @__PURE__ */ Symbol.for("dom.ts@adoptedLayerMap"), ct = globalThis[Ne] ??= /* @__PURE__ */ new Map(), Pe = /* @__PURE__ */ Symbol.for("dom.ts@adoptedShadowLayerMap"), ut = globalThis[Pe] ??= /* @__PURE__ */ new WeakMap(), N = (e, t, a, n = "") => H ? Ee(e, t, a, n) : ie(e, t, a, n), de = (e, t, a = "", n) => {
461
+ const r = Ve(e), s = typeof e == "string" && URL.canParse(e) ? e : r;
462
+ return t?.[0] && (t[0].fetchPriority = "high"), t && s && typeof s == "string" && ee(t, s, a), t?.[0] && (!URL.canParse(e) || n) && t?.[0] instanceof HTMLLinkElement, se(r, (o) => {
463
+ t?.[0] && o && (ee(t, o, a), t?.[0].setAttribute("loaded", ""));
464
+ })?.catch?.((o) => {
465
+ console.warn("Failed to load style sheet:", o);
466
466
  });
467
- }, Ee = (e) => {
467
+ }, Re = (e) => {
468
468
  const t = typeof document < "u" ? document.createElement("link") : null;
469
469
  return t && (t.fetchPriority = "high"), t ? (Object.assign(t, {
470
470
  rel: "stylesheet",
471
471
  type: "text/css",
472
472
  crossOrigin: "same-origin"
473
473
  }), t.dataset.owner = Y, de(e, [t, "href"]), typeof document < "u" && document.head.append(t), t) : null;
474
- }, V = (e, t = typeof document < "u" ? document?.head : null, n = "") => {
475
- const a = t?.querySelector?.("head") ?? t;
476
- if (typeof HTMLHeadElement < "u" && a instanceof HTMLHeadElement) return Ee(e);
474
+ }, C = (e, t = typeof document < "u" ? document?.head : null, a = "") => {
475
+ const n = t?.querySelector?.("head") ?? t;
476
+ if (typeof HTMLHeadElement < "u" && n instanceof HTMLHeadElement) return Re(e);
477
477
  const r = typeof document < "u" ? document.createElement("style") : null;
478
- return r ? (r.dataset.owner = Y, de(e, [r, "innerHTML"], n), a?.prepend?.(r), r) : null;
479
- }, m = /* @__PURE__ */ new Map(), C = /* @__PURE__ */ new WeakMap(), te = (e, t) => {
478
+ return r ? (r.dataset.owner = Y, de(e, [r, "innerHTML"], a), n?.prepend?.(r), r) : null;
479
+ }, ke = /* @__PURE__ */ Symbol.for("dom.ts@adoptedMap"), m = globalThis[ke] ??= /* @__PURE__ */ new Map(), ze = /* @__PURE__ */ Symbol.for("dom.ts@adoptedBlobMap"), V = globalThis[ze] ??= /* @__PURE__ */ new WeakMap(), Oe = /* @__PURE__ */ Symbol.for("dom.ts@layerCounter"), pt = globalThis[Oe] ??= 0, te = (e, t) => {
480
480
  if (!e || !t) return !1;
481
481
  try {
482
482
  return e.replaceSync(t), !0;
483
- } catch (n) {
484
- const a = String(n?.message || "").toLowerCase();
485
- return a.includes("@import rules are not allowed") || a.includes("@import") && a.includes("not allowed") || console.warn("[DOM] Failed to apply adopted stylesheet:", n), !1;
483
+ } catch (a) {
484
+ const n = String(a?.message || "").toLowerCase();
485
+ return n.includes("@import rules are not allowed") || n.includes("@import") && n.includes("not allowed") || console.warn("[DOM] Failed to apply adopted stylesheet:", a), !1;
486
486
  }
487
- }, ce = (e, t = null) => {
488
- if (!be())
489
- return typeof e == "string" && V(e, void 0, t || ""), null;
487
+ }, le = (e, t = null) => {
488
+ if (!Me())
489
+ return typeof e == "string" && C(e, void 0, t || ""), null;
490
490
  if (typeof e == "string" && Q(e))
491
- return V(e, void 0, t || ""), null;
491
+ return C(e, void 0, t || ""), null;
492
492
  if (typeof e == "string" && m?.has?.(e)) {
493
- const a = m.get(e);
494
- return typeof document < "u" && document.adoptedStyleSheets && !document.adoptedStyleSheets.includes(a) && document.adoptedStyleSheets.push(a), a;
493
+ const n = m.get(e);
494
+ return typeof document < "u" && document.adoptedStyleSheets && !document.adoptedStyleSheets.includes(n) && document.adoptedStyleSheets.push(n), n;
495
495
  }
496
- if ((e instanceof Blob || e instanceof File) && C?.has?.(e)) {
497
- const a = C.get(e);
498
- return typeof document < "u" && document.adoptedStyleSheets && !document.adoptedStyleSheets.includes(a) && document.adoptedStyleSheets.push(a), a;
496
+ if ((e instanceof Blob || e instanceof File) && V?.has?.(e)) {
497
+ const n = V.get(e);
498
+ return typeof document < "u" && document.adoptedStyleSheets && !document.adoptedStyleSheets.includes(n) && document.adoptedStyleSheets.push(n), n;
499
499
  }
500
500
  if (!e) return null;
501
- const n = typeof e == "string" ? m.getOrInsertComputed(e, (a) => new CSSStyleSheet()) : C.getOrInsertComputed(e, (a) => new CSSStyleSheet());
502
- if (typeof document < "u" && document.adoptedStyleSheets && !document.adoptedStyleSheets.includes(n) && document.adoptedStyleSheets.push(n), typeof e == "string" && !URL.canParse(e)) {
503
- const a = t ? `@layer ${t} { ${e} }` : e;
504
- return m.set(e, n), te(n, a) || ($(n), m.delete(e), V(e)), n;
505
- } else oe(Se(e), (a) => {
506
- if (m.set(a, n), a) {
507
- if (Q(a))
508
- return $(n), m.delete(a), C.delete(e), V(a, void 0, t || ""), n;
509
- const r = t ? `@layer ${t} { ${a} }` : a;
510
- return te(n, r) || ($(n), m.delete(a), C.delete(e), V(a, void 0, t || "")), n;
501
+ const a = typeof e == "string" ? m.getOrInsertComputed(e, (n) => new CSSStyleSheet()) : V.getOrInsertComputed(e, (n) => new CSSStyleSheet());
502
+ if (typeof document < "u" && document.adoptedStyleSheets && !document.adoptedStyleSheets.includes(a) && document.adoptedStyleSheets.push(a), typeof e == "string" && !URL.canParse(e)) {
503
+ const n = t ? `@layer ${t} { ${e} }` : e;
504
+ return m.set(e, a), te(a, n) || ($(a), m.delete(e), C(e)), a;
505
+ } else se(Te(e), (n) => {
506
+ if (m.set(n, a), n) {
507
+ if (Q(n))
508
+ return $(a), m.delete(n), V.delete(e), C(n, void 0, t || ""), a;
509
+ const r = t ? `@layer ${t} { ${n} }` : n;
510
+ return te(a, r) || ($(a), m.delete(n), V.delete(e), C(n, void 0, t || "")), a;
511
511
  }
512
512
  });
513
- return n;
513
+ return a;
514
514
  }, $ = (e) => {
515
515
  if (!e) return !1;
516
516
  const t = typeof e == "string" ? m.get(e) : e;
517
517
  if (!t || typeof document > "u") return !1;
518
- const n = document.adoptedStyleSheets, a = n.indexOf(t);
519
- return a !== -1 ? (n.splice(a, 1), !0) : !1;
520
- }, Me = /* @__PURE__ */ new WeakMap(), B = /* @__PURE__ */ new Map(), Le = (e, t) => {
521
- const n = [...e.entries() || []];
522
- return new Map(n?.map?.(([a, r]) => [a, r?.get?.(t)])?.filter?.(([a, r]) => !!r) || []);
518
+ const a = document.adoptedStyleSheets, n = a.indexOf(t);
519
+ return n !== -1 ? (a.splice(n, 1), !0) : !1;
520
+ }, We = /* @__PURE__ */ new WeakMap(), He = /* @__PURE__ */ Symbol.for("dom.ts@namedStoreMaps"), I = globalThis[He] ??= /* @__PURE__ */ new Map(), qe = (e, t) => {
521
+ const a = [...e.entries() || []];
522
+ return new Map(a?.map?.(([n, r]) => [n, r?.get?.(t)])?.filter?.(([n, r]) => !!r) || []);
523
523
  }, R = (e) => ({
524
- storeSet: Le(B, e),
525
- mixinSet: z?.get?.(e),
526
- behaviorSet: Me?.get?.(e)
527
- }), z = /* @__PURE__ */ new WeakMap(), j = /* @__PURE__ */ new WeakMap(), A = /* @__PURE__ */ new Map(), k = /* @__PURE__ */ new WeakMap(), ue = (e, t) => {
528
- typeof t == "string" && (t = A?.get?.(t));
529
- const n = /* @__PURE__ */ new Set([...e?.getAttribute?.("data-mixin")?.split?.(" ") || []]), a = new Set([...n].map((i) => A?.get?.(i)).filter((i) => !!i)), r = z?.get?.(e) ?? /* @__PURE__ */ new WeakSet();
530
- j?.has?.(t) || j?.set?.(t, /* @__PURE__ */ new WeakSet()), z?.has?.(e) || z?.set?.(e, r);
531
- const o = new WeakRef(e);
532
- r?.has?.(t) || (a.has(t) || t?.disconnect?.(o, t, R(e)), (a.has(t) || !j?.get?.(t)?.has?.(e)) && (t?.connect?.(o, t, R(e)), n.add(k?.get?.(t)), r?.add?.(t), e?.setAttribute?.("data-mixin", [...n].filter((i) => !!i).join(" "))), j?.get?.(t)?.add?.(e)), r?.has?.(t) && (a.has(t) || (r?.delete?.(t), t?.disconnect?.(o, t, R(e))));
533
- }, _ = /* @__PURE__ */ new Set(), Ve = (e = typeof document < "u" ? document : null) => {
524
+ storeSet: qe(I, e),
525
+ mixinSet: k?.get?.(e),
526
+ behaviorSet: We?.get?.(e)
527
+ }), $e = /* @__PURE__ */ Symbol.for("dom.ts@boundMixinSet"), k = globalThis[$e] ??= /* @__PURE__ */ new WeakMap(), Fe = /* @__PURE__ */ Symbol.for("dom.ts@mixinElements"), T = globalThis[Fe] ??= /* @__PURE__ */ new WeakMap(), Ue = /* @__PURE__ */ Symbol.for("dom.ts@mixinRegistry"), j = globalThis[Ue] ??= /* @__PURE__ */ new Map(), Be = /* @__PURE__ */ Symbol.for("dom.ts@mixinNamespace"), z = globalThis[Be] ??= /* @__PURE__ */ new WeakMap(), ce = (e, t) => {
528
+ typeof t == "string" && (t = j?.get?.(t));
529
+ const a = /* @__PURE__ */ new Set([...e?.getAttribute?.("data-mixin")?.split?.(" ") || []]), n = new Set([...a].map((o) => j?.get?.(o)).filter((o) => !!o)), r = k?.get?.(e) ?? /* @__PURE__ */ new WeakSet();
530
+ T?.has?.(t) || T?.set?.(t, /* @__PURE__ */ new WeakSet()), k?.has?.(e) || k?.set?.(e, r);
531
+ const s = new WeakRef(e);
532
+ r?.has?.(t) || (n.has(t) || t?.disconnect?.(s, t, R(e)), (n.has(t) || !T?.get?.(t)?.has?.(e)) && (t?.connect?.(s, t, R(e)), a.add(z?.get?.(t)), r?.add?.(t), e?.setAttribute?.("data-mixin", [...a].filter((o) => !!o).join(" "))), T?.get?.(t)?.add?.(e)), r?.has?.(t) && (n.has(t) || (r?.delete?.(t), t?.disconnect?.(s, t, R(e))));
533
+ }, _ = /* @__PURE__ */ new Set(), De = (e = typeof document < "u" ? document : null) => {
534
534
  if (e)
535
- return _?.has?.(e) || (_?.add?.(e), ve(e, "*", "data-mixin", (t) => X(t.target)), me(e, "[data-mixin]", (t) => {
536
- for (const n of t.addedNodes) n instanceof HTMLElement && X(n);
535
+ return _?.has?.(e) || (_?.add?.(e), we(e, "*", "data-mixin", (t) => X(t.target)), xe(e, "[data-mixin]", (t) => {
536
+ for (const a of t.addedNodes) a instanceof HTMLElement && X(a);
537
537
  })), e;
538
538
  }, X = (e) => {
539
539
  const t = /* @__PURE__ */ new Set([...e?.getAttribute?.("data-mixin")?.split?.(" ") || []]);
540
- [...new Set([...t].map((n) => A?.get?.(n)).filter((n) => !!n))].map?.((n) => ue(e, n));
541
- }, Ce = (e, t) => {
542
- e.forEach((n) => t ? ue(n, t) : X(n));
543
- }, je = (e) => {
544
- for (const t of _) Ce(t?.querySelectorAll?.("[data-mixin]"), e);
545
- }, Ae = new FinalizationRegistry((e) => {
546
- A?.delete?.(e);
547
- }), Te = (e, t) => {
548
- if (!k?.has?.(t)) {
549
- const n = e?.trim?.();
550
- n && (k?.set?.(t, n), A?.set?.(n, t), Ae?.register?.(t, n), je(t));
540
+ [...new Set([...t].map((a) => j?.get?.(a)).filter((a) => !!a))].map?.((a) => ce(e, a));
541
+ }, Ie = (e, t) => {
542
+ e.forEach((a) => t ? ce(a, t) : X(a));
543
+ }, _e = (e) => {
544
+ for (const t of _) Ie(t?.querySelectorAll?.("[data-mixin]"), e);
545
+ }, Xe = new FinalizationRegistry((e) => {
546
+ j?.delete?.(e);
547
+ }), Ye = (e, t) => {
548
+ if (!z?.has?.(t)) {
549
+ const a = e?.trim?.();
550
+ a && (z?.set?.(t, a), j?.set?.(a, t), Xe?.register?.(t, a), _e(t));
551
551
  }
552
552
  };
553
- Ve(typeof document < "u" ? document : null);
553
+ De(typeof document < "u" ? document : null);
554
554
  var J = class {
555
555
  constructor(e = null) {
556
- e && Te(e, this);
556
+ e && Ye(e, this);
557
557
  }
558
- connect(e, t, n) {
558
+ connect(e, t, a) {
559
559
  return this;
560
560
  }
561
- disconnect(e, t, n) {
561
+ disconnect(e, t, a) {
562
562
  return this;
563
563
  }
564
564
  storeForElement(e) {
565
- return B.get(this.name || "")?.get?.(e);
565
+ return I.get(this.name || "")?.get?.(e);
566
566
  }
567
567
  relatedForElement(e) {
568
568
  return R(e);
569
569
  }
570
570
  get elements() {
571
- return j?.get?.(this);
571
+ return T?.get?.(this);
572
572
  }
573
573
  get storage() {
574
- return B?.get?.(this.name || "");
574
+ return I?.get?.(this.name || "");
575
575
  }
576
576
  get name() {
577
- return k?.get?.(this);
577
+ return z?.get?.(this);
578
578
  }
579
579
  };
580
580
  function F(e, t) {
581
- const n = Math.min(e.x, t.x), a = Math.min(e.y, t.y), r = Math.max(e.x, t.x), o = Math.max(e.y, t.y);
581
+ const a = Math.min(e.x, t.x), n = Math.min(e.y, t.y), r = Math.max(e.x, t.x), s = Math.max(e.y, t.y);
582
582
  return {
583
- left: n,
584
- top: a,
583
+ left: a,
584
+ top: n,
585
585
  right: r,
586
- bottom: o,
587
- width: r - n,
588
- height: o - a
586
+ bottom: s,
587
+ width: r - a,
588
+ height: s - n
589
589
  };
590
590
  }
591
591
  var P = {
@@ -597,105 +597,105 @@ var P = {
597
597
  start: "junction-drag:start",
598
598
  move: "junction-drag:move",
599
599
  end: "junction-drag:end"
600
- }, I = {
600
+ }, B = {
601
601
  start: "junction-resize:start",
602
602
  move: "junction-resize:move",
603
603
  end: "junction-resize:end"
604
- }, H = /* @__PURE__ */ new WeakMap(), g = (e, t, n) => {
605
- const a = H.get(e) ?? /* @__PURE__ */ new Map(), r = a.get(t) ?? [];
606
- r.push(n), a.set(t, r), H.set(e, a);
604
+ }, Je = /* @__PURE__ */ Symbol.for("dom.ts@mixinDisposers"), O = globalThis[Je] ??= /* @__PURE__ */ new WeakMap(), y = (e, t, a) => {
605
+ const n = O.get(e) ?? /* @__PURE__ */ new Map(), r = n.get(t) ?? [];
606
+ r.push(a), n.set(t, r), O.set(e, n);
607
607
  }, G = (e, t) => {
608
- const n = H.get(e), a = n?.get(t);
609
- if (a) {
610
- for (const r of a) try {
608
+ const a = O.get(e), n = a?.get(t);
609
+ if (n) {
610
+ for (const r of n) try {
611
611
  r();
612
612
  } catch {
613
613
  }
614
- n.delete(t), n.size === 0 && H.delete(e);
615
- }
616
- }, x = (e, t) => {
617
- const n = globalThis.getComputedStyle?.(e)?.getPropertyValue?.(t)?.trim?.() ?? "", a = parseFloat(n);
618
- return Number.isFinite(a) ? a : 0;
619
- }, le = (e, t, n) => {
620
- const a = e.getAttribute(t)?.trim();
621
- if (!a) return n;
622
- const r = e.querySelector(a);
623
- return r instanceof HTMLElement ? r : n;
624
- }, Ne = class extends J {
614
+ a.delete(t), a.size === 0 && O.delete(e);
615
+ }
616
+ }, w = (e, t) => {
617
+ const a = globalThis.getComputedStyle?.(e)?.getPropertyValue?.(t)?.trim?.() ?? "", n = parseFloat(a);
618
+ return Number.isFinite(n) ? n : 0;
619
+ }, ue = (e, t, a) => {
620
+ const n = e.getAttribute(t)?.trim();
621
+ if (!n) return a;
622
+ const r = e.querySelector(n);
623
+ return r instanceof HTMLElement ? r : a;
624
+ }, Ge = class extends J {
625
625
  constructor() {
626
626
  super("ui-junction-select");
627
627
  }
628
628
  connect(e) {
629
629
  const t = e?.deref?.();
630
630
  if (!t) return this;
631
- const n = document.createElement("div");
632
- n.className = "ui-junction-select-overlay", n.setAttribute("data-junction-overlay", ""), n.style.cssText = "position:absolute;pointer-events:none;z-index:9999;box-sizing:border-box;border:1px dashed color-mix(in oklab, #3794ff 70%, transparent);background:color-mix(in oklab, #3794ff 14%, transparent);display:none;inset:auto;min-width:0;min-height:0;", globalThis.getComputedStyle?.(t)?.position === "static" && (t.style.position = "relative"), t.appendChild(n);
633
- let r = !1, o = {
631
+ const a = document.createElement("div");
632
+ a.className = "ui-junction-select-overlay", a.setAttribute("data-junction-overlay", ""), a.style.cssText = "position:absolute;pointer-events:none;z-index:9999;box-sizing:border-box;border:1px dashed color-mix(in oklab, #3794ff 70%, transparent);background:color-mix(in oklab, #3794ff 14%, transparent);display:none;inset:auto;min-width:0;min-height:0;", globalThis.getComputedStyle?.(t)?.position === "static" && (t.style.position = "relative"), t.appendChild(a);
633
+ let r = !1, s = {
634
634
  x: 0,
635
635
  y: 0
636
- }, i = {
636
+ }, o = {
637
637
  x: 0,
638
638
  y: 0
639
639
  };
640
- const u = (c) => {
640
+ const c = (l) => {
641
641
  const f = t.getBoundingClientRect();
642
642
  return {
643
- x: c.clientX - f.left,
644
- y: c.clientY - f.top
643
+ x: l.clientX - f.left,
644
+ y: l.clientY - f.top
645
645
  };
646
- }, s = () => {
647
- const c = F(o, i);
648
- if (c.width < 1 && c.height < 1) {
649
- n.style.display = "none";
646
+ }, i = () => {
647
+ const l = F(s, o);
648
+ if (l.width < 1 && l.height < 1) {
649
+ a.style.display = "none";
650
650
  return;
651
651
  }
652
- n.style.display = "block", n.style.left = `${c.left}px`, n.style.top = `${c.top}px`, n.style.width = `${c.width}px`, n.style.height = `${c.height}px`;
653
- }, p = (c) => {
654
- c.button === 0 && (c.target?.closest?.("[data-junction-ignore-select], [data-junction-drag-handle], [data-junction-resize-handle], button, a, input, textarea, select") || (c.target === t || t.contains(c.target)) && (r = !0, o = u(c), i = { ...o }, t.setPointerCapture(c.pointerId), t.dispatchEvent(new CustomEvent(P.start, {
652
+ a.style.display = "block", a.style.left = `${l.left}px`, a.style.top = `${l.top}px`, a.style.width = `${l.width}px`, a.style.height = `${l.height}px`;
653
+ }, p = (l) => {
654
+ l.button === 0 && (l.target?.closest?.("[data-junction-ignore-select], [data-junction-drag-handle], [data-junction-resize-handle], button, a, input, textarea, select") || (l.target === t || t.contains(l.target)) && (r = !0, s = c(l), o = { ...s }, t.setPointerCapture(l.pointerId), t.dispatchEvent(new CustomEvent(P.start, {
655
655
  bubbles: !0,
656
656
  detail: {
657
- a: { ...o },
658
- b: { ...i },
657
+ a: { ...s },
658
+ b: { ...o },
659
659
  host: t
660
660
  }
661
- })), s()));
662
- }, y = (c) => {
661
+ })), i()));
662
+ }, g = (l) => {
663
663
  if (!r) return;
664
- i = u(c), s();
665
- const f = F(o, i);
664
+ o = c(l), i();
665
+ const f = F(s, o);
666
666
  t.dispatchEvent(new CustomEvent(P.move, {
667
667
  bubbles: !0,
668
668
  detail: {
669
- a: { ...o },
670
- b: { ...i },
669
+ a: { ...s },
670
+ b: { ...o },
671
671
  box: f,
672
672
  host: t
673
673
  }
674
674
  }));
675
- }, h = (c) => {
675
+ }, h = (l) => {
676
676
  if (!r) return;
677
677
  r = !1;
678
678
  try {
679
- t.releasePointerCapture(c.pointerId);
679
+ t.releasePointerCapture(l.pointerId);
680
680
  } catch {
681
681
  }
682
- const f = F(o, i);
682
+ const f = F(s, o);
683
683
  t.dispatchEvent(new CustomEvent(P.end, {
684
684
  bubbles: !0,
685
685
  detail: {
686
- a: { ...o },
687
- b: { ...i },
686
+ a: { ...s },
687
+ b: { ...o },
688
688
  box: f,
689
689
  host: t
690
690
  }
691
691
  }));
692
- }, d = (c) => {
693
- r && h(c);
694
- }, l = (c) => {
692
+ }, d = (l) => {
693
+ r && h(l);
694
+ }, u = (l) => {
695
695
  if (r) {
696
- r = !1, n.style.display = "none";
696
+ r = !1, a.style.display = "none";
697
697
  try {
698
- t.releasePointerCapture(c.pointerId);
698
+ t.releasePointerCapture(l.pointerId);
699
699
  } catch {
700
700
  }
701
701
  t.dispatchEvent(new CustomEvent(P.cancel, {
@@ -704,46 +704,46 @@ var P = {
704
704
  }));
705
705
  }
706
706
  };
707
- return g(t, "ui-junction-select", () => {
708
- n.remove();
709
- }), g(t, "ui-junction-select", v(t, "pointerdown", p)), g(t, "ui-junction-select", v(t, "pointermove", y)), g(t, "ui-junction-select", v(t, "pointerup", d)), g(t, "ui-junction-select", v(t, "pointercancel", l)), this;
707
+ return y(t, "ui-junction-select", () => {
708
+ a.remove();
709
+ }), y(t, "ui-junction-select", v(t, "pointerdown", p)), y(t, "ui-junction-select", v(t, "pointermove", g)), y(t, "ui-junction-select", v(t, "pointerup", d)), y(t, "ui-junction-select", v(t, "pointercancel", u)), this;
710
710
  }
711
711
  disconnect(e) {
712
712
  const t = e?.deref?.();
713
713
  return t && G(t, "ui-junction-select"), this;
714
714
  }
715
- }, Pe = class extends J {
715
+ }, Ze = class extends J {
716
716
  constructor() {
717
717
  super("ui-junction-drag");
718
718
  }
719
719
  connect(e) {
720
720
  const t = e?.deref?.();
721
721
  if (!t) return this;
722
- N(t, "--jx-drag-x", x(t, "--jx-drag-x")), N(t, "--jx-drag-y", x(t, "--jx-drag-y"));
723
- const n = t.style.transform;
722
+ N(t, "--jx-drag-x", w(t, "--jx-drag-x")), N(t, "--jx-drag-y", w(t, "--jx-drag-y"));
723
+ const a = t.style.transform;
724
724
  (!t.style.transform || t.style.transform === "none") && (t.style.transform = "translate3d(calc(var(--jx-drag-x, 0) * 1px), calc(var(--jx-drag-y, 0) * 1px), 0)");
725
- const a = le(t, "data-junction-drag-handle", t);
726
- let r = !1, o = 0, i = 0, u = 0, s = 0;
725
+ const n = ue(t, "data-junction-drag-handle", t);
726
+ let r = !1, s = 0, o = 0, c = 0, i = 0;
727
727
  const p = (d) => {
728
- d.button === 0 && (d.target !== a && !a.contains(d.target) || (r = !0, o = d.clientX, i = d.clientY, u = x(t, "--jx-drag-x"), s = x(t, "--jx-drag-y"), a.setPointerCapture(d.pointerId), t.dispatchEvent(new CustomEvent(U.start, {
728
+ d.button === 0 && (d.target !== n && !n.contains(d.target) || (r = !0, s = d.clientX, o = d.clientY, c = w(t, "--jx-drag-x"), i = w(t, "--jx-drag-y"), n.setPointerCapture(d.pointerId), t.dispatchEvent(new CustomEvent(U.start, {
729
729
  bubbles: !0,
730
730
  detail: {
731
731
  host: t,
732
732
  clientX: d.clientX,
733
733
  clientY: d.clientY,
734
- baseX: u,
735
- baseY: s
734
+ baseX: c,
735
+ baseY: i
736
736
  }
737
737
  }))));
738
- }, y = (d) => {
738
+ }, g = (d) => {
739
739
  if (!r) return;
740
- const l = d.clientX - o, c = d.clientY - i, f = u + l, Z = s + c;
740
+ const u = d.clientX - s, l = d.clientY - o, f = c + u, Z = i + l;
741
741
  N(t, "--jx-drag-x", f), N(t, "--jx-drag-y", Z), t.dispatchEvent(new CustomEvent(U.move, {
742
742
  bubbles: !0,
743
743
  detail: {
744
744
  host: t,
745
- dx: l,
746
- dy: c,
745
+ dx: u,
746
+ dy: l,
747
747
  x: f,
748
748
  y: Z
749
749
  }
@@ -752,64 +752,64 @@ var P = {
752
752
  if (r) {
753
753
  r = !1;
754
754
  try {
755
- a.releasePointerCapture(d.pointerId);
755
+ n.releasePointerCapture(d.pointerId);
756
756
  } catch {
757
757
  }
758
758
  t.dispatchEvent(new CustomEvent(U.end, {
759
759
  bubbles: !0,
760
760
  detail: {
761
761
  host: t,
762
- x: x(t, "--jx-drag-x"),
763
- y: x(t, "--jx-drag-y")
762
+ x: w(t, "--jx-drag-x"),
763
+ y: w(t, "--jx-drag-y")
764
764
  }
765
765
  }));
766
766
  }
767
767
  };
768
- return g(t, "ui-junction-drag", () => {
769
- t.style.transform = n;
770
- }), g(t, "ui-junction-drag", v(a, "pointerdown", p)), g(t, "ui-junction-drag", v(a, "pointermove", y)), g(t, "ui-junction-drag", v(a, "pointerup", h)), g(t, "ui-junction-drag", v(a, "pointercancel", h)), this;
768
+ return y(t, "ui-junction-drag", () => {
769
+ t.style.transform = a;
770
+ }), y(t, "ui-junction-drag", v(n, "pointerdown", p)), y(t, "ui-junction-drag", v(n, "pointermove", g)), y(t, "ui-junction-drag", v(n, "pointerup", h)), y(t, "ui-junction-drag", v(n, "pointercancel", h)), this;
771
771
  }
772
772
  disconnect(e) {
773
773
  const t = e?.deref?.();
774
774
  return t && G(t, "ui-junction-drag"), this;
775
775
  }
776
- }, Re = class extends J {
776
+ }, Ke = class extends J {
777
777
  constructor() {
778
778
  super("ui-junction-resize");
779
779
  }
780
780
  connect(e) {
781
781
  const t = e?.deref?.();
782
782
  if (!t) return this;
783
- const n = le(t, "data-junction-resize-handle", t);
784
- let a = !1, r = 0, o = 0, i = 0, u = 0;
785
- const s = Math.max(120, parseFloat(t.getAttribute("data-junction-resize-min-w") || "") || 120), p = Math.max(80, parseFloat(t.getAttribute("data-junction-resize-min-h") || "") || 80), y = (l) => {
786
- l.button === 0 && (l.target !== n && !n.contains(l.target) || (a = !0, r = l.clientX, o = l.clientY, i = t.offsetWidth, u = t.offsetHeight, n.setPointerCapture(l.pointerId), t.dispatchEvent(new CustomEvent(I.start, {
783
+ const a = ue(t, "data-junction-resize-handle", t);
784
+ let n = !1, r = 0, s = 0, o = 0, c = 0;
785
+ const i = Math.max(120, parseFloat(t.getAttribute("data-junction-resize-min-w") || "") || 120), p = Math.max(80, parseFloat(t.getAttribute("data-junction-resize-min-h") || "") || 80), g = (u) => {
786
+ u.button === 0 && (u.target !== a && !a.contains(u.target) || (n = !0, r = u.clientX, s = u.clientY, o = t.offsetWidth, c = t.offsetHeight, a.setPointerCapture(u.pointerId), t.dispatchEvent(new CustomEvent(B.start, {
787
787
  bubbles: !0,
788
788
  detail: {
789
789
  host: t,
790
- width: i,
791
- height: u
790
+ width: o,
791
+ height: c
792
792
  }
793
793
  }))));
794
- }, h = (l) => {
795
- if (!a) return;
796
- const c = Math.max(s, i + (l.clientX - r)), f = Math.max(p, u + (l.clientY - o));
797
- t.style.width = `${c}px`, t.style.height = `${f}px`, t.dispatchEvent(new CustomEvent(I.move, {
794
+ }, h = (u) => {
795
+ if (!n) return;
796
+ const l = Math.max(i, o + (u.clientX - r)), f = Math.max(p, c + (u.clientY - s));
797
+ t.style.width = `${l}px`, t.style.height = `${f}px`, t.dispatchEvent(new CustomEvent(B.move, {
798
798
  bubbles: !0,
799
799
  detail: {
800
800
  host: t,
801
- width: c,
801
+ width: l,
802
802
  height: f
803
803
  }
804
804
  }));
805
- }, d = (l) => {
806
- if (a) {
807
- a = !1;
805
+ }, d = (u) => {
806
+ if (n) {
807
+ n = !1;
808
808
  try {
809
- n.releasePointerCapture(l.pointerId);
809
+ a.releasePointerCapture(u.pointerId);
810
810
  } catch {
811
811
  }
812
- t.dispatchEvent(new CustomEvent(I.end, {
812
+ t.dispatchEvent(new CustomEvent(B.end, {
813
813
  bubbles: !0,
814
814
  detail: {
815
815
  host: t,
@@ -819,35 +819,35 @@ var P = {
819
819
  }));
820
820
  }
821
821
  };
822
- return g(t, "ui-junction-resize", v(n, "pointerdown", y)), g(t, "ui-junction-resize", v(n, "pointermove", h)), g(t, "ui-junction-resize", v(n, "pointerup", d)), g(t, "ui-junction-resize", v(n, "pointercancel", d)), this;
822
+ return y(t, "ui-junction-resize", v(a, "pointerdown", g)), y(t, "ui-junction-resize", v(a, "pointermove", h)), y(t, "ui-junction-resize", v(a, "pointerup", d)), y(t, "ui-junction-resize", v(a, "pointercancel", d)), this;
823
823
  }
824
824
  disconnect(e) {
825
825
  const t = e?.deref?.();
826
826
  return t && G(t, "ui-junction-resize"), this;
827
827
  }
828
828
  };
829
- new Ne();
830
- new Pe();
831
- new Re();
832
- var ze = "@layer animations{}@function --wavy-step(--step <number>){--angle:calc((var(--step, 0) * 2) * 1rad * pi);--variant:calc(cos(var(--clip-freq, 8) * var(--angle, 0deg)) * 0.5 + 0.5);--adjust:calc(var(--variant, 0) * var(--clip-amplitude, 0));--x:calc(50% + (cos(var(--angle, 0deg)) * (0.5 - var(--adjust, 0))) * var(--icon-size, 100%));--y:calc(50% + (sin(var(--angle, 0deg)) * (0.5 - var(--adjust, 0))) * var(--icon-size, 100%));result:var(--x) var(--y)}@layer ux-shapes{.shaped{aspect-ratio:1/1;border-radius:1.5rem;contain:strict;display:flex;overflow:hidden;padding:1.25rem;place-content:center;place-items:center;pointer-events:auto;transition:--background-tone-shift .2s ease-in-out,--icon-color .2s ease-in-out;transition-behavior:allow-discrete;user-select:none;z-index:1}.shaped,.shaped :is(span,ui-icon){block-size:stretch;inline-size:stretch}[data-dragging]{z-index:calc(100 + var(--z-index, 0))!important}:not(.shaped) .shaped[data-shape],:not(.shaped)>[data-shape],:not(:has(.shaped))[data-shape]{aspect-ratio:1/1;contain:strict;overflow:hidden;pointer-events:auto;touch-action:none}:not(.shaped) .shaped[data-shape=square],:not(.shaped)>[data-shape=square],:not(:has(.shaped))[data-shape=square]{--border-radius:var(--radius-md);--clip-path:none}:not(.shaped) .shaped[data-shape=squircle],:not(.shaped)>[data-shape=squircle],:not(:has(.shaped))[data-shape=squircle]{--border-radius:28%;--clip-path:none}:not(.shaped) .shaped[data-shape=circle],:not(.shaped)>[data-shape=circle],:not(:has(.shaped))[data-shape=circle]{--border-radius:50%;--clip-path:none}:not(.shaped) .shaped[data-shape=rounded],:not(.shaped)>[data-shape=rounded],:not(:has(.shaped))[data-shape=rounded]{--border-radius:var(--radius-xl);--clip-path:none}:not(.shaped) .shaped[data-shape=blob],:not(.shaped)>[data-shape=blob],:not(:has(.shaped))[data-shape=blob]{--border-radius:60% 40% 30% 70%/60% 30% 70% 40%;--clip-path:none}:not(.shaped) .shaped[data-shape=hexagon],:not(.shaped)>[data-shape=hexagon],:not(:has(.shaped))[data-shape=hexagon]{--border-radius:0;--clip-path:polygon(round 0.375rem,50% 0%,93.3% 25%,93.3% 75%,50% 100%,6.7% 75%,6.7% 25%)}:not(.shaped) .shaped[data-shape=diamond],:not(.shaped)>[data-shape=diamond],:not(:has(.shaped))[data-shape=diamond]{--border-radius:0;--clip-path:polygon(round 0.5rem,50% 0%,100% 50%,50% 100%,0% 50%)}:not(.shaped) .shaped[data-shape=star],:not(.shaped)>[data-shape=star],:not(:has(.shaped))[data-shape=star]{--border-radius:0;--clip-path:polygon(round 0.25rem,50% 0%,61% 35%,98% 38%,68% 59%,79% 95%,50% 75%,21% 95%,32% 59%,2% 38%,39% 35%)}:not(.shaped) .shaped[data-shape=badge],:not(.shaped)>[data-shape=badge],:not(:has(.shaped))[data-shape=badge]{--border-radius:0;--clip-path:polygon(round 0.375rem,0% 0%,100% 0%,100% 70%,50% 100%,0% 70%)}:not(.shaped) .shaped[data-shape=heart],:not(.shaped)>[data-shape=heart],:not(:has(.shaped))[data-shape=heart]{--border-radius:0;--clip-path:polygon(round 0.25rem,50% 100%,10% 65%,0% 45%,0% 30%,5% 15%,18% 3%,35% 0%,50% 12%,65% 0%,82% 3%,95% 15%,100% 30%,100% 45%,90% 65%)}:not(.shaped) .shaped[data-shape=clover],:not(.shaped)>[data-shape=clover],:not(:has(.shaped))[data-shape=clover]{--border-radius:0;--clip-path:polygon(round 0.375rem,50% 0%,60% 30%,70% 30%,100% 50%,70% 70%,60% 70%,50% 100%,40% 70%,30% 70%,0% 50%,30% 30%,40% 30%)}:not(.shaped) .shaped[data-shape=flower],:not(.shaped)>[data-shape=flower],:not(:has(.shaped))[data-shape=flower]{--border-radius:0;--clip-path:polygon(round 0.25rem,50% 0%,58% 25%,85% 15%,68% 40%,100% 50%,68% 60%,85% 85%,58% 75%,50% 100%,42% 75%,15% 85%,32% 60%,0% 50%,32% 40%,15% 15%,42% 25%)}:not(.shaped) .shaped[data-shape=triangle],:not(.shaped)>[data-shape=triangle],:not(:has(.shaped))[data-shape=triangle]{--border-radius:0;--clip-path:polygon(round 0.5rem,50% 0%,100% 87%,0% 87%)}:not(.shaped) .shaped[data-shape=pentagon],:not(.shaped)>[data-shape=pentagon],:not(:has(.shaped))[data-shape=pentagon]{--border-radius:0;--clip-path:polygon(round 0.375rem,50% 0%,97.5% 35%,79.5% 95%,20.5% 95%,2.5% 35%)}:not(.shaped) .shaped[data-shape=octagon],:not(.shaped)>[data-shape=octagon],:not(:has(.shaped))[data-shape=octagon]{--border-radius:0;--clip-path:polygon(round 0.25rem,30% 0%,70% 0%,100% 30%,100% 70%,70% 100%,30% 100%,0% 70%,0% 30%)}:not(.shaped) .shaped[data-shape=cross],:not(.shaped)>[data-shape=cross],:not(:has(.shaped))[data-shape=cross]{--border-radius:0;--clip-path:polygon(round 0.375rem,35% 0%,65% 0%,65% 35%,100% 35%,100% 65%,65% 65%,65% 100%,35% 100%,35% 65%,0% 65%,0% 35%,35% 35%)}:not(.shaped) .shaped[data-shape=arrow],:not(.shaped)>[data-shape=arrow],:not(:has(.shaped))[data-shape=arrow]{--border-radius:0;--clip-path:polygon(round 0.375rem,0% 20%,60% 20%,60% 0%,100% 50%,60% 100%,60% 80%,0% 80%)}:not(.shaped) .shaped[data-shape=egg],:not(.shaped)>[data-shape=egg],:not(:has(.shaped))[data-shape=egg]{--border-radius:50% 50% 50% 50%/60% 60% 40% 40%;--clip-path:none}:not(.shaped) .shaped[data-shape=tear],:not(.shaped)>[data-shape=tear],:not(:has(.shaped))[data-shape=tear]{--border-radius:50cqmin 50cqmin 5rem 50cqmin;--clip-path:none;border-end-end-radius:5rem;border-end-start-radius:50cqmin;border-start-end-radius:50cqmin;border-start-start-radius:50cqmin}:not(.shaped) .shaped[data-shape=wavy],:not(.shaped)>[data-shape=wavy],:not(:has(.shaped))[data-shape=wavy]{--border-radius:calc(var(--icon-size, 100%) * 0.5)}}";
829
+ new Ge();
830
+ new Ze();
831
+ new Ke();
832
+ var Qe = "@layer animations{}@function --wavy-step(--step <number>){--angle:calc((var(--step, 0) * 2) * 1rad * pi);--variant:calc(cos(var(--clip-freq, 8) * var(--angle, 0deg)) * 0.5 + 0.5);--adjust:calc(var(--variant, 0) * var(--clip-amplitude, 0));--x:calc(50% + (cos(var(--angle, 0deg)) * (0.5 - var(--adjust, 0))) * var(--icon-size, 100%));--y:calc(50% + (sin(var(--angle, 0deg)) * (0.5 - var(--adjust, 0))) * var(--icon-size, 100%));result:var(--x) var(--y)}@layer ux-shapes{.shaped{aspect-ratio:1/1;border-radius:1.5rem;contain:strict;display:flex;overflow:hidden;padding:1.25rem;place-content:center;place-items:center;pointer-events:auto;transition:--background-tone-shift .2s ease-in-out,--icon-color .2s ease-in-out;transition-behavior:allow-discrete;user-select:none;z-index:1}.shaped,.shaped :is(span,ui-icon){block-size:stretch;inline-size:stretch}[data-dragging]{z-index:calc(100 + var(--z-index, 0))!important}:not(.shaped) .shaped[data-shape],:not(.shaped)>[data-shape],:not(:has(.shaped))[data-shape]{aspect-ratio:1/1;contain:strict;overflow:hidden;pointer-events:auto;touch-action:none}:not(.shaped) .shaped[data-shape=square],:not(.shaped)>[data-shape=square],:not(:has(.shaped))[data-shape=square]{--border-radius:var(--radius-md);--clip-path:none}:not(.shaped) .shaped[data-shape=squircle],:not(.shaped)>[data-shape=squircle],:not(:has(.shaped))[data-shape=squircle]{--border-radius:28%;--clip-path:none}:not(.shaped) .shaped[data-shape=circle],:not(.shaped)>[data-shape=circle],:not(:has(.shaped))[data-shape=circle]{--border-radius:50%;--clip-path:none}:not(.shaped) .shaped[data-shape=rounded],:not(.shaped)>[data-shape=rounded],:not(:has(.shaped))[data-shape=rounded]{--border-radius:var(--radius-xl);--clip-path:none}:not(.shaped) .shaped[data-shape=blob],:not(.shaped)>[data-shape=blob],:not(:has(.shaped))[data-shape=blob]{--border-radius:60% 40% 30% 70%/60% 30% 70% 40%;--clip-path:none}:not(.shaped) .shaped[data-shape=hexagon],:not(.shaped)>[data-shape=hexagon],:not(:has(.shaped))[data-shape=hexagon]{--border-radius:0;--clip-path:polygon(round 0.375rem,50% 0%,93.3% 25%,93.3% 75%,50% 100%,6.7% 75%,6.7% 25%)}:not(.shaped) .shaped[data-shape=diamond],:not(.shaped)>[data-shape=diamond],:not(:has(.shaped))[data-shape=diamond]{--border-radius:0;--clip-path:polygon(round 0.5rem,50% 0%,100% 50%,50% 100%,0% 50%)}:not(.shaped) .shaped[data-shape=star],:not(.shaped)>[data-shape=star],:not(:has(.shaped))[data-shape=star]{--border-radius:0;--clip-path:polygon(round 0.25rem,50% 0%,61% 35%,98% 38%,68% 59%,79% 95%,50% 75%,21% 95%,32% 59%,2% 38%,39% 35%)}:not(.shaped) .shaped[data-shape=badge],:not(.shaped)>[data-shape=badge],:not(:has(.shaped))[data-shape=badge]{--border-radius:0;--clip-path:polygon(round 0.375rem,0% 0%,100% 0%,100% 70%,50% 100%,0% 70%)}:not(.shaped) .shaped[data-shape=heart],:not(.shaped)>[data-shape=heart],:not(:has(.shaped))[data-shape=heart]{--border-radius:0;--clip-path:polygon(round 0.25rem,50% 100%,10% 65%,0% 45%,0% 30%,5% 15%,18% 3%,35% 0%,50% 12%,65% 0%,82% 3%,95% 15%,100% 30%,100% 45%,90% 65%)}:not(.shaped) .shaped[data-shape=clover],:not(.shaped)>[data-shape=clover],:not(:has(.shaped))[data-shape=clover]{--border-radius:0;--clip-path:polygon(round 0.375rem,50% 0%,60% 30%,70% 30%,100% 50%,70% 70%,60% 70%,50% 100%,40% 70%,30% 70%,0% 50%,30% 30%,40% 30%)}:not(.shaped) .shaped[data-shape=flower],:not(.shaped)>[data-shape=flower],:not(:has(.shaped))[data-shape=flower]{--border-radius:0;--clip-path:polygon(round 0.25rem,50% 0%,58% 25%,85% 15%,68% 40%,100% 50%,68% 60%,85% 85%,58% 75%,50% 100%,42% 75%,15% 85%,32% 60%,0% 50%,32% 40%,15% 15%,42% 25%)}:not(.shaped) .shaped[data-shape=triangle],:not(.shaped)>[data-shape=triangle],:not(:has(.shaped))[data-shape=triangle]{--border-radius:0;--clip-path:polygon(round 0.5rem,50% 0%,100% 87%,0% 87%)}:not(.shaped) .shaped[data-shape=pentagon],:not(.shaped)>[data-shape=pentagon],:not(:has(.shaped))[data-shape=pentagon]{--border-radius:0;--clip-path:polygon(round 0.375rem,50% 0%,97.5% 35%,79.5% 95%,20.5% 95%,2.5% 35%)}:not(.shaped) .shaped[data-shape=octagon],:not(.shaped)>[data-shape=octagon],:not(:has(.shaped))[data-shape=octagon]{--border-radius:0;--clip-path:polygon(round 0.25rem,30% 0%,70% 0%,100% 30%,100% 70%,70% 100%,30% 100%,0% 70%,0% 30%)}:not(.shaped) .shaped[data-shape=cross],:not(.shaped)>[data-shape=cross],:not(:has(.shaped))[data-shape=cross]{--border-radius:0;--clip-path:polygon(round 0.375rem,35% 0%,65% 0%,65% 35%,100% 35%,100% 65%,65% 65%,65% 100%,35% 100%,35% 65%,0% 65%,0% 35%,35% 35%)}:not(.shaped) .shaped[data-shape=arrow],:not(.shaped)>[data-shape=arrow],:not(:has(.shaped))[data-shape=arrow]{--border-radius:0;--clip-path:polygon(round 0.375rem,0% 20%,60% 20%,60% 0%,100% 50%,60% 100%,60% 80%,0% 80%)}:not(.shaped) .shaped[data-shape=egg],:not(.shaped)>[data-shape=egg],:not(:has(.shaped))[data-shape=egg]{--border-radius:50% 50% 50% 50%/60% 60% 40% 40%;--clip-path:none}:not(.shaped) .shaped[data-shape=tear],:not(.shaped)>[data-shape=tear],:not(:has(.shaped))[data-shape=tear]{--border-radius:50cqmin 50cqmin 5rem 50cqmin;--clip-path:none;border-end-end-radius:5rem;border-end-start-radius:50cqmin;border-start-end-radius:50cqmin;border-start-start-radius:50cqmin}:not(.shaped) .shaped[data-shape=wavy],:not(.shaped)>[data-shape=wavy],:not(:has(.shaped))[data-shape=wavy]{--border-radius:calc(var(--icon-size, 100%) * 0.5)}}";
833
833
  async function D() {
834
834
  try {
835
- await ce(ze), console.log("[Veela/Core] Core styles loaded");
835
+ await le(Qe), console.log("[Veela/Core] Core styles loaded");
836
836
  } catch (e) {
837
837
  console.warn("[Veela/Core] Failed to load core styles:", e);
838
838
  }
839
839
  }
840
- var ke = "@layer ux-animation{}";
841
- async function He() {
840
+ var et = "@layer ux-animation{}";
841
+ async function tt() {
842
842
  try {
843
- await ce(ke), console.log("[Veela/Advanced] Advanced styles loaded");
843
+ await le(et), console.log("[Veela/Advanced] Advanced styles loaded");
844
844
  } catch (e) {
845
845
  console.warn("[Veela/Advanced] Failed to load advanced styles:", e);
846
846
  }
847
847
  }
848
- var q = null;
849
- async function $e(e) {
850
- if (q === e) {
848
+ var W = null;
849
+ async function ht(e) {
850
+ if (W === e) {
851
851
  console.log(`[Veela] Variant '${e}' already loaded`);
852
852
  return;
853
853
  }
@@ -856,23 +856,23 @@ async function $e(e) {
856
856
  await D();
857
857
  break;
858
858
  case "advanced":
859
- await D(), await He();
859
+ await D(), await tt();
860
860
  break;
861
861
  default:
862
862
  console.warn(`[Veela] Unknown variant: ${e}, using basic`), await D();
863
863
  break;
864
864
  }
865
- q = e;
865
+ W = e;
866
866
  }
867
- function Fe() {
868
- return q;
867
+ function ft() {
868
+ return W;
869
869
  }
870
- function Ue(e) {
871
- return q === e;
870
+ function yt(e) {
871
+ return W === e;
872
872
  }
873
873
  export {
874
- $e as default,
875
- Fe as getLoadedVariant,
876
- Ue as isVariantLoaded,
877
- $e as loadVeelaVariant
874
+ ht as default,
875
+ ft as getLoadedVariant,
876
+ yt as isVariantLoaded,
877
+ ht as loadVeelaVariant
878
878
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fest-lib/veela",
3
3
  "description": "Veela CSS framework and runtime loaders (fest-lib)",
4
- "version": "0.1.2",
4
+ "version": "0.1.4",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "sideEffects": true,