@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.
- package/dist/veela.js +308 -308
- 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 (
|
|
202
|
-
String(
|
|
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
|
|
207
|
+
function he() {
|
|
208
208
|
const e = globalThis;
|
|
209
209
|
if (typeof e.HTMLElement == "function") return;
|
|
210
210
|
const t = class {
|
|
211
|
-
},
|
|
212
|
-
typeof e[
|
|
211
|
+
}, a = (n) => {
|
|
212
|
+
typeof e[n] != "function" && (e[n] = t);
|
|
213
213
|
};
|
|
214
|
-
|
|
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
|
|
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
|
|
221
|
-
return !Number.isNaN(
|
|
220
|
+
const a = parseFloat(t[0][0]);
|
|
221
|
+
return !Number.isNaN(a) && Number.isFinite(a) ? a : null;
|
|
222
222
|
};
|
|
223
|
-
|
|
224
|
-
var
|
|
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
|
-
|
|
227
|
+
ye.forEach((e) => e?.()), await new Promise((e) => requestAnimationFrame(e));
|
|
228
228
|
});
|
|
229
229
|
var ge = {};
|
|
230
|
-
function v(e, t,
|
|
231
|
-
e?.addEventListener?.(t,
|
|
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,
|
|
233
|
+
return () => r?.deref?.()?.removeEventListener?.(t, a, n);
|
|
234
234
|
}
|
|
235
|
-
var
|
|
236
|
-
const e = typeof matchMedia < "u" ? matchMedia("(orientation: landscape)")?.matches : !1, t = typeof window < "u" ? window.visualViewport : null,
|
|
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
|
|
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 :
|
|
255
|
-
"--avail-height": e ?
|
|
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
|
-
...
|
|
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
|
-
...
|
|
268
|
+
...a
|
|
269
269
|
};
|
|
270
|
-
},
|
|
271
|
-
const r = new Set([...
|
|
272
|
-
for (const
|
|
273
|
-
const p = Array.from(
|
|
274
|
-
p.push(...Array.from(
|
|
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
|
-
|
|
276
|
+
n({
|
|
277
277
|
target: h,
|
|
278
278
|
type: "attributes",
|
|
279
279
|
attributeName: d,
|
|
280
280
|
oldValue: h?.getAttribute?.(d)
|
|
281
|
-
},
|
|
281
|
+
}, c);
|
|
282
282
|
});
|
|
283
283
|
});
|
|
284
|
-
} else
|
|
284
|
+
} else i.target?.matches?.(t) && i.attributeName && r.has(i.attributeName) && n(i, c);
|
|
285
285
|
});
|
|
286
|
-
return
|
|
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((
|
|
294
|
-
target:
|
|
293
|
+
}), [...e.querySelectorAll(t)].map((o) => r.forEach((c) => n({
|
|
294
|
+
target: o,
|
|
295
295
|
type: "attributes",
|
|
296
|
-
attributeName:
|
|
297
|
-
oldValue:
|
|
298
|
-
},
|
|
299
|
-
},
|
|
296
|
+
attributeName: c,
|
|
297
|
+
oldValue: o?.getAttribute?.(c)
|
|
298
|
+
}, s))), s;
|
|
299
|
+
}, xe = (e, t = "*", a = (n, r) => {
|
|
300
300
|
}) => {
|
|
301
|
-
const
|
|
302
|
-
const
|
|
303
|
-
return
|
|
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
|
|
306
|
-
(
|
|
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:
|
|
314
|
+
addedNodes: l,
|
|
315
315
|
removedNodes: f
|
|
316
|
-
},
|
|
317
|
-
},
|
|
316
|
+
}, u);
|
|
317
|
+
}, s = (d) => {
|
|
318
318
|
r({
|
|
319
|
-
addedNodes: [d?.target].filter((
|
|
320
|
-
removedNodes: [d?.relatedTarget].filter((
|
|
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
|
-
},
|
|
324
|
+
}, o = (d) => {
|
|
325
325
|
r({
|
|
326
|
-
addedNodes: [d?.relatedTarget].filter((
|
|
327
|
-
removedNodes: [d?.target].filter((
|
|
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
|
-
},
|
|
331
|
+
}, c = (d) => {
|
|
332
332
|
r({
|
|
333
|
-
addedNodes: [d?.target].filter((
|
|
334
|
-
removedNodes: [d?.relatedTarget || document?.activeElement].filter((
|
|
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
|
-
},
|
|
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",
|
|
344
|
-
e.removeEventListener("pointerover",
|
|
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",
|
|
348
|
-
e.removeEventListener("pointerover",
|
|
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",
|
|
352
|
-
e.removeEventListener("pointerdown",
|
|
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",
|
|
356
|
-
e.removeEventListener("focusin",
|
|
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,
|
|
359
|
-
for (const
|
|
360
|
-
}),
|
|
361
|
-
(e?.element ?? e) instanceof Node && p.observe(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 &&
|
|
366
|
+
return h.length > 0 && a?.({
|
|
367
367
|
addedNodes: h,
|
|
368
368
|
removedNodes: []
|
|
369
369
|
}, p), p;
|
|
370
|
-
},
|
|
371
|
-
|
|
372
|
-
var ee = (e, t,
|
|
373
|
-
e[0][e[1]] = e[1] == "innerHTML" ? `@import url("${t}") ${
|
|
374
|
-
},
|
|
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 (
|
|
376
|
+
if (a == null) {
|
|
377
377
|
e.getPropertyValue(t) !== "" && e.removeProperty(t);
|
|
378
378
|
return;
|
|
379
379
|
}
|
|
380
|
-
e.getPropertyValue(t) !==
|
|
380
|
+
e.getPropertyValue(t) !== a && e.setProperty(t, a, n);
|
|
381
381
|
}
|
|
382
|
-
},
|
|
382
|
+
}, Ee = (e, t, a, n = "") => {
|
|
383
383
|
if (!e || !t) return e;
|
|
384
|
-
const r =
|
|
385
|
-
if (!
|
|
386
|
-
let
|
|
387
|
-
if (
|
|
388
|
-
return
|
|
389
|
-
if (
|
|
390
|
-
const
|
|
391
|
-
if (
|
|
392
|
-
if (
|
|
393
|
-
} else if (
|
|
394
|
-
return
|
|
395
|
-
}
|
|
396
|
-
if (typeof
|
|
397
|
-
const
|
|
398
|
-
return
|
|
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(
|
|
401
|
-
if (typeof
|
|
402
|
-
const
|
|
403
|
-
if (typeof
|
|
404
|
-
const p = CSS.number(
|
|
405
|
-
return
|
|
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(
|
|
407
|
+
return b(s, r, c, n), e;
|
|
408
408
|
}
|
|
409
|
-
return b(
|
|
410
|
-
},
|
|
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 =
|
|
413
|
-
if (!
|
|
414
|
-
let
|
|
415
|
-
return typeof
|
|
416
|
-
},
|
|
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 (
|
|
418
|
+
if (S.has(e)) return S.get(e);
|
|
419
419
|
if (e instanceof Blob || e instanceof File) {
|
|
420
|
-
if (
|
|
420
|
+
if (E.has(e)) return E.get(e);
|
|
421
421
|
const t = URL.createObjectURL(e);
|
|
422
|
-
return
|
|
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 (
|
|
430
|
-
const
|
|
431
|
-
return
|
|
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
|
|
433
|
+
return S.set(e, t), t;
|
|
434
434
|
}
|
|
435
435
|
if (typeof e == "string") {
|
|
436
|
-
const t = new Blob([e], { type: "text/css" }),
|
|
437
|
-
return
|
|
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(),
|
|
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 (
|
|
445
|
-
const t = e?.text?.()?.then?.((
|
|
446
|
-
return
|
|
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 (
|
|
454
|
-
const
|
|
455
|
-
return L.set(e,
|
|
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,
|
|
461
|
-
const r =
|
|
462
|
-
return t?.[0] && (t[0].fetchPriority = "high"), t &&
|
|
463
|
-
t?.[0] &&
|
|
464
|
-
})?.catch?.((
|
|
465
|
-
console.warn("Failed to load style sheet:",
|
|
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
|
-
},
|
|
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
|
-
},
|
|
475
|
-
const
|
|
476
|
-
if (typeof HTMLHeadElement < "u" &&
|
|
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"],
|
|
479
|
-
}, m = /* @__PURE__ */ new Map(),
|
|
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 (
|
|
484
|
-
const
|
|
485
|
-
return
|
|
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
|
-
},
|
|
488
|
-
if (!
|
|
489
|
-
return typeof e == "string" &&
|
|
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
|
|
491
|
+
return C(e, void 0, t || ""), null;
|
|
492
492
|
if (typeof e == "string" && m?.has?.(e)) {
|
|
493
|
-
const
|
|
494
|
-
return typeof document < "u" && document.adoptedStyleSheets && !document.adoptedStyleSheets.includes(
|
|
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) &&
|
|
497
|
-
const
|
|
498
|
-
return typeof document < "u" && document.adoptedStyleSheets && !document.adoptedStyleSheets.includes(
|
|
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
|
|
502
|
-
if (typeof document < "u" && document.adoptedStyleSheets && !document.adoptedStyleSheets.includes(
|
|
503
|
-
const
|
|
504
|
-
return m.set(e,
|
|
505
|
-
} else
|
|
506
|
-
if (m.set(
|
|
507
|
-
if (Q(
|
|
508
|
-
return $(
|
|
509
|
-
const r = t ? `@layer ${t} { ${
|
|
510
|
-
return te(
|
|
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
|
|
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
|
|
519
|
-
return
|
|
520
|
-
},
|
|
521
|
-
const
|
|
522
|
-
return new Map(
|
|
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:
|
|
525
|
-
mixinSet:
|
|
526
|
-
behaviorSet:
|
|
527
|
-
}),
|
|
528
|
-
typeof t == "string" && (t =
|
|
529
|
-
const
|
|
530
|
-
|
|
531
|
-
const
|
|
532
|
-
r?.has?.(t) || (
|
|
533
|
-
}, _ = /* @__PURE__ */ new Set(),
|
|
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),
|
|
536
|
-
for (const
|
|
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((
|
|
541
|
-
},
|
|
542
|
-
e.forEach((
|
|
543
|
-
},
|
|
544
|
-
for (const t of _)
|
|
545
|
-
},
|
|
546
|
-
|
|
547
|
-
}),
|
|
548
|
-
if (!
|
|
549
|
-
const
|
|
550
|
-
|
|
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
|
-
|
|
553
|
+
De(typeof document < "u" ? document : null);
|
|
554
554
|
var J = class {
|
|
555
555
|
constructor(e = null) {
|
|
556
|
-
e &&
|
|
556
|
+
e && Ye(e, this);
|
|
557
557
|
}
|
|
558
|
-
connect(e, t,
|
|
558
|
+
connect(e, t, a) {
|
|
559
559
|
return this;
|
|
560
560
|
}
|
|
561
|
-
disconnect(e, t,
|
|
561
|
+
disconnect(e, t, a) {
|
|
562
562
|
return this;
|
|
563
563
|
}
|
|
564
564
|
storeForElement(e) {
|
|
565
|
-
return
|
|
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
|
|
571
|
+
return T?.get?.(this);
|
|
572
572
|
}
|
|
573
573
|
get storage() {
|
|
574
|
-
return
|
|
574
|
+
return I?.get?.(this.name || "");
|
|
575
575
|
}
|
|
576
576
|
get name() {
|
|
577
|
-
return
|
|
577
|
+
return z?.get?.(this);
|
|
578
578
|
}
|
|
579
579
|
};
|
|
580
580
|
function F(e, t) {
|
|
581
|
-
const
|
|
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:
|
|
584
|
-
top:
|
|
583
|
+
left: a,
|
|
584
|
+
top: n,
|
|
585
585
|
right: r,
|
|
586
|
-
bottom:
|
|
587
|
-
width: r -
|
|
588
|
-
height:
|
|
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
|
-
},
|
|
600
|
+
}, B = {
|
|
601
601
|
start: "junction-resize:start",
|
|
602
602
|
move: "junction-resize:move",
|
|
603
603
|
end: "junction-resize:end"
|
|
604
|
-
},
|
|
605
|
-
const
|
|
606
|
-
r.push(
|
|
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
|
|
609
|
-
if (
|
|
610
|
-
for (const r of
|
|
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
|
-
|
|
615
|
-
}
|
|
616
|
-
},
|
|
617
|
-
const
|
|
618
|
-
return Number.isFinite(
|
|
619
|
-
},
|
|
620
|
-
const
|
|
621
|
-
if (!
|
|
622
|
-
const r = e.querySelector(
|
|
623
|
-
return r instanceof HTMLElement ? r :
|
|
624
|
-
},
|
|
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
|
|
632
|
-
|
|
633
|
-
let r = !1,
|
|
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
|
-
},
|
|
636
|
+
}, o = {
|
|
637
637
|
x: 0,
|
|
638
638
|
y: 0
|
|
639
639
|
};
|
|
640
|
-
const
|
|
640
|
+
const c = (l) => {
|
|
641
641
|
const f = t.getBoundingClientRect();
|
|
642
642
|
return {
|
|
643
|
-
x:
|
|
644
|
-
y:
|
|
643
|
+
x: l.clientX - f.left,
|
|
644
|
+
y: l.clientY - f.top
|
|
645
645
|
};
|
|
646
|
-
},
|
|
647
|
-
const
|
|
648
|
-
if (
|
|
649
|
-
|
|
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
|
-
|
|
653
|
-
}, p = (
|
|
654
|
-
|
|
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: { ...
|
|
658
|
-
b: { ...
|
|
657
|
+
a: { ...s },
|
|
658
|
+
b: { ...o },
|
|
659
659
|
host: t
|
|
660
660
|
}
|
|
661
|
-
})),
|
|
662
|
-
},
|
|
661
|
+
})), i()));
|
|
662
|
+
}, g = (l) => {
|
|
663
663
|
if (!r) return;
|
|
664
|
-
|
|
665
|
-
const f = F(
|
|
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: { ...
|
|
670
|
-
b: { ...
|
|
669
|
+
a: { ...s },
|
|
670
|
+
b: { ...o },
|
|
671
671
|
box: f,
|
|
672
672
|
host: t
|
|
673
673
|
}
|
|
674
674
|
}));
|
|
675
|
-
}, h = (
|
|
675
|
+
}, h = (l) => {
|
|
676
676
|
if (!r) return;
|
|
677
677
|
r = !1;
|
|
678
678
|
try {
|
|
679
|
-
t.releasePointerCapture(
|
|
679
|
+
t.releasePointerCapture(l.pointerId);
|
|
680
680
|
} catch {
|
|
681
681
|
}
|
|
682
|
-
const f = F(
|
|
682
|
+
const f = F(s, o);
|
|
683
683
|
t.dispatchEvent(new CustomEvent(P.end, {
|
|
684
684
|
bubbles: !0,
|
|
685
685
|
detail: {
|
|
686
|
-
a: { ...
|
|
687
|
-
b: { ...
|
|
686
|
+
a: { ...s },
|
|
687
|
+
b: { ...o },
|
|
688
688
|
box: f,
|
|
689
689
|
host: t
|
|
690
690
|
}
|
|
691
691
|
}));
|
|
692
|
-
}, d = (
|
|
693
|
-
r && h(
|
|
694
|
-
},
|
|
692
|
+
}, d = (l) => {
|
|
693
|
+
r && h(l);
|
|
694
|
+
}, u = (l) => {
|
|
695
695
|
if (r) {
|
|
696
|
-
r = !1,
|
|
696
|
+
r = !1, a.style.display = "none";
|
|
697
697
|
try {
|
|
698
|
-
t.releasePointerCapture(
|
|
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
|
|
708
|
-
|
|
709
|
-
}),
|
|
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
|
-
},
|
|
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",
|
|
723
|
-
const
|
|
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
|
|
726
|
-
let r = !1,
|
|
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 !==
|
|
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:
|
|
735
|
-
baseY:
|
|
734
|
+
baseX: c,
|
|
735
|
+
baseY: i
|
|
736
736
|
}
|
|
737
737
|
}))));
|
|
738
|
-
},
|
|
738
|
+
}, g = (d) => {
|
|
739
739
|
if (!r) return;
|
|
740
|
-
const
|
|
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:
|
|
746
|
-
dy:
|
|
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
|
-
|
|
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:
|
|
763
|
-
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
|
|
769
|
-
t.style.transform =
|
|
770
|
-
}),
|
|
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
|
-
},
|
|
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
|
|
784
|
-
let
|
|
785
|
-
const
|
|
786
|
-
|
|
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:
|
|
791
|
-
height:
|
|
790
|
+
width: o,
|
|
791
|
+
height: c
|
|
792
792
|
}
|
|
793
793
|
}))));
|
|
794
|
-
}, h = (
|
|
795
|
-
if (!
|
|
796
|
-
const
|
|
797
|
-
t.style.width = `${
|
|
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:
|
|
801
|
+
width: l,
|
|
802
802
|
height: f
|
|
803
803
|
}
|
|
804
804
|
}));
|
|
805
|
-
}, d = (
|
|
806
|
-
if (
|
|
807
|
-
|
|
805
|
+
}, d = (u) => {
|
|
806
|
+
if (n) {
|
|
807
|
+
n = !1;
|
|
808
808
|
try {
|
|
809
|
-
|
|
809
|
+
a.releasePointerCapture(u.pointerId);
|
|
810
810
|
} catch {
|
|
811
811
|
}
|
|
812
|
-
t.dispatchEvent(new CustomEvent(
|
|
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
|
|
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
|
|
830
|
-
new
|
|
831
|
-
new
|
|
832
|
-
var
|
|
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
|
|
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
|
|
841
|
-
async function
|
|
840
|
+
var et = "@layer ux-animation{}";
|
|
841
|
+
async function tt() {
|
|
842
842
|
try {
|
|
843
|
-
await
|
|
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
|
|
849
|
-
async function
|
|
850
|
-
if (
|
|
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
|
|
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
|
-
|
|
865
|
+
W = e;
|
|
866
866
|
}
|
|
867
|
-
function
|
|
868
|
-
return
|
|
867
|
+
function ft() {
|
|
868
|
+
return W;
|
|
869
869
|
}
|
|
870
|
-
function
|
|
871
|
-
return
|
|
870
|
+
function yt(e) {
|
|
871
|
+
return W === e;
|
|
872
872
|
}
|
|
873
873
|
export {
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
874
|
+
ht as default,
|
|
875
|
+
ft as getLoadedVariant,
|
|
876
|
+
yt as isVariantLoaded,
|
|
877
|
+
ht as loadVeelaVariant
|
|
878
878
|
};
|