@lumencast/runtime 0.10.0 → 0.11.0

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 (44) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/{broadcast-L5wm2I6J.js → broadcast-DtHoU_fS.js} +3 -3
  3. package/dist/{broadcast-L5wm2I6J.js.map → broadcast-DtHoU_fS.js.map} +1 -1
  4. package/dist/{control-eEUG7unp.js → control-B9frEbNG.js} +4 -4
  5. package/dist/{control-eEUG7unp.js.map → control-B9frEbNG.js.map} +1 -1
  6. package/dist/{index-Clrya_9l.js → index-Dz27r92m.js} +378 -332
  7. package/dist/index-Dz27r92m.js.map +1 -0
  8. package/dist/index.d.ts +1 -0
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.html +1 -1
  11. package/dist/index.js +5 -0
  12. package/dist/index.js.map +1 -1
  13. package/dist/lumencast.js +22 -18
  14. package/dist/mount.d.ts.map +1 -1
  15. package/dist/mount.js +11 -0
  16. package/dist/mount.js.map +1 -1
  17. package/dist/render/primitives/index.d.ts.map +1 -1
  18. package/dist/render/primitives/index.js +6 -0
  19. package/dist/render/primitives/index.js.map +1 -1
  20. package/dist/render/primitives/meet-peer-slot.d.ts +29 -0
  21. package/dist/render/primitives/meet-peer-slot.d.ts.map +1 -0
  22. package/dist/render/primitives/meet-peer-slot.js +46 -0
  23. package/dist/render/primitives/meet-peer-slot.js.map +1 -0
  24. package/dist/state/reserved-leaves.d.ts +37 -0
  25. package/dist/state/reserved-leaves.d.ts.map +1 -0
  26. package/dist/state/reserved-leaves.js +96 -0
  27. package/dist/state/reserved-leaves.js.map +1 -0
  28. package/dist/{status-pill-elORkMrh.js → status-pill-B2vBTwRC.js} +2 -2
  29. package/dist/{status-pill-elORkMrh.js.map → status-pill-B2vBTwRC.js.map} +1 -1
  30. package/dist/{test-7q_KJkdX.js → test-DD2SBDku.js} +4 -4
  31. package/dist/{test-7q_KJkdX.js.map → test-DD2SBDku.js.map} +1 -1
  32. package/dist/{tree-BMxx5170.js → tree-CgU_sUwI.js} +213 -197
  33. package/dist/tree-CgU_sUwI.js.map +1 -0
  34. package/dist/types.d.ts +12 -0
  35. package/dist/types.d.ts.map +1 -1
  36. package/package.json +4 -4
  37. package/src/index.ts +12 -0
  38. package/src/mount.ts +12 -0
  39. package/src/render/primitives/index.ts +6 -0
  40. package/src/render/primitives/meet-peer-slot.tsx +55 -0
  41. package/src/state/reserved-leaves.ts +121 -0
  42. package/src/types.ts +12 -0
  43. package/dist/index-Clrya_9l.js.map +0 -1
  44. package/dist/tree-BMxx5170.js.map +0 -1
@@ -1,12 +1,12 @@
1
1
  import { jsx as f, jsxs as I, Fragment as Q } from "react/jsx-runtime";
2
2
  import { useSignals as xt } from "@preact/signals-react/runtime";
3
- import { motion as U, useMotionValue as L, useTransform as be, animate as jt } from "framer-motion";
4
- import { createContext as st, useContext as K, useRef as tt, useState as vt, useEffect as Y, useMemo as Ut } from "react";
5
- import { e as S, r as at, m as lt, t as et, a as Kt, s as ke, w as Vt, F as we, c as Rt, b as Zt } from "./index-Clrya_9l.js";
6
- import { checkHostAllowed as Jt } from "@lumencast/protocol";
3
+ import { motion as U, useMotionValue as L, useTransform as be, animate as _t } from "framer-motion";
4
+ import { createContext as st, useContext as K, useRef as tt, useState as vt, useEffect as Y, useMemo as Kt } from "react";
5
+ import { e as S, r as at, m as lt, t as et, a as Vt, s as ke, w as Zt, F as we, c as Tt, b as Jt } from "./index-Dz27r92m.js";
6
+ import { checkHostAllowed as Qt } from "@lumencast/protocol";
7
7
  import { effect as xe } from "@preact/signals-react";
8
8
  function ve({ resolved: t, children: e, establishesContainingBlock: n }) {
9
- const i = t.direction ?? "vertical", r = Tt(t.gap, 0), a = t.wrap === !0, o = Tt(t.crossGap, 0), s = t.align ?? "stretch", l = t.justify ?? "flex-start", c = i === "horizontal", u = {
9
+ const i = t.direction ?? "vertical", r = Ct(t.gap, 0), a = t.wrap === !0, o = Ct(t.crossGap, 0), s = t.align ?? "stretch", l = t.justify ?? "flex-start", c = i === "horizontal", u = {
10
10
  display: "flex",
11
11
  flexDirection: c ? "row" : "column",
12
12
  alignItems: s,
@@ -18,7 +18,7 @@ function ve({ resolved: t, children: e, establishesContainingBlock: n }) {
18
18
  };
19
19
  return a ? (u.flexWrap = "wrap", c ? (u.columnGap = r, u.rowGap = o) : (u.rowGap = r, u.columnGap = o)) : u.gap = r, /* @__PURE__ */ f("div", { style: u, children: e });
20
20
  }
21
- function Tt(t, e) {
21
+ function Ct(t, e) {
22
22
  return typeof t == "number" && Number.isFinite(t) ? t : e;
23
23
  }
24
24
  function $e({ resolved: t, children: e, establishesContainingBlock: n }) {
@@ -39,10 +39,10 @@ function $e({ resolved: t, children: e, establishesContainingBlock: n }) {
39
39
  }
40
40
  );
41
41
  }
42
- const Se = 64, Me = /^[#a-zA-Z0-9(),.% ]{1,64}$/, Ae = /^#(?:[0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/, q = String.raw`\d{1,3}(?:\.\d{1,4})?`, Qt = String.raw`(?:0|1|0?\.\d{1,4}|${q}%)`, j = String.raw`[ ]{0,4}`, Fe = new RegExp(
43
- `^rgba?\\(${j}(${q})(%?)${j},${j}(${q})(%?)${j},${j}(${q})(%?)${j}(?:,${j}${Qt}${j})?\\)$`
44
- ), _e = new RegExp(
45
- `^hsla?\\(${j}(${q})(?:deg)?${j},${j}(${q})%${j},${j}(${q})%${j}(?:,${j}${Qt}${j})?\\)$`
42
+ const Se = 64, Me = /^[#a-zA-Z0-9(),.% ]{1,64}$/, Ae = /^#(?:[0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/, q = String.raw`\d{1,3}(?:\.\d{1,4})?`, te = String.raw`(?:0|1|0?\.\d{1,4}|${q}%)`, j = String.raw`[ ]{0,4}`, Fe = new RegExp(
43
+ `^rgba?\\(${j}(${q})(%?)${j},${j}(${q})(%?)${j},${j}(${q})(%?)${j}(?:,${j}${te}${j})?\\)$`
44
+ ), Re = new RegExp(
45
+ `^hsla?\\(${j}(${q})(?:deg)?${j},${j}(${q})%${j},${j}(${q})%${j}(?:,${j}${te}${j})?\\)$`
46
46
  ), je = new Set(
47
47
  "aliceblue antiquewhite aqua aquamarine azure beige bisque black blanchedalmond blue blueviolet brown burlywood cadetblue chartreuse chocolate coral cornflowerblue cornsilk crimson cyan darkblue darkcyan darkgoldenrod darkgray darkgreen darkgrey darkkhaki darkmagenta darkolivegreen darkorange darkorchid darkred darksalmon darkseagreen darkslateblue darkslategray darkslategrey darkturquoise darkviolet deeppink deepskyblue dimgray dimgrey dodgerblue firebrick floralwhite forestgreen fuchsia gainsboro ghostwhite gold goldenrod gray green greenyellow grey honeydew hotpink indianred indigo ivory khaki lavender lavenderblush lawngreen lemonchiffon lightblue lightcoral lightcyan lightgoldenrodyellow lightgray lightgreen lightgrey lightpink lightsalmon lightseagreen lightskyblue lightslategray lightslategrey lightsteelblue lightyellow lime limegreen linen magenta maroon mediumaquamarine mediumblue mediumorchid mediumpurple mediumseagreen mediumslateblue mediumspringgreen mediumturquoise mediumvioletred midnightblue mintcream mistyrose moccasin navajowhite navy oldlace olive olivedrab orange orangered orchid palegoldenrod palegreen paleturquoise palevioletred papayawhip peachpuff peru pink plum powderblue purple rebeccapurple red rosybrown royalblue saddlebrown salmon sandybrown seagreen seashell sienna silver skyblue slateblue slategray slategrey snow springgreen steelblue tan teal thistle tomato turquoise violet wheat white whitesmoke yellow yellowgreen transparent currentcolor".split(" ")
48
48
  );
@@ -64,7 +64,7 @@ function D(t) {
64
64
  return n;
65
65
  }
66
66
  if (n.startsWith("hsl")) {
67
- const i = _e.exec(n);
67
+ const i = Re.exec(n);
68
68
  return !i || Number(i[1]) > 360 || Number(i[2]) > 100 || Number(i[3]) > 100 ? null : n;
69
69
  }
70
70
  return je.has(n) ? n : null;
@@ -76,17 +76,17 @@ function B(t, e) {
76
76
  "rejected unsafe colour : not a strict hex/rgb()/hsl()/named colour"
77
77
  );
78
78
  }
79
- const te = st(void 0);
80
- function pr({
79
+ const ee = st(void 0);
80
+ function hr({
81
81
  hosts: t,
82
82
  children: e
83
83
  }) {
84
- return /* @__PURE__ */ f(te.Provider, { value: t, children: e });
84
+ return /* @__PURE__ */ f(ee.Provider, { value: t, children: e });
85
85
  }
86
86
  function nt() {
87
- return K(te);
87
+ return K(ee);
88
88
  }
89
- function hr(t) {
89
+ function gr(t) {
90
90
  const n = t.assets?.allowedHosts;
91
91
  if (!Array.isArray(n)) return;
92
92
  const i = n.filter((r) => typeof r == "string");
@@ -94,11 +94,11 @@ function hr(t) {
94
94
  }
95
95
  function $t(t, e, n, i) {
96
96
  if (typeof t != "string" || t.length === 0) return;
97
- const r = Jt(t, e);
97
+ const r = Qt(t, e);
98
98
  if (r.allowed) return t;
99
99
  S(i, n, r.reason ?? "asset host/scheme rejected");
100
100
  }
101
- const Re = /* @__PURE__ */ new Set([
101
+ const _e = /* @__PURE__ */ new Set([
102
102
  "normal",
103
103
  "multiply",
104
104
  "screen",
@@ -119,14 +119,14 @@ const Re = /* @__PURE__ */ new Set([
119
119
  "plus-lighter"
120
120
  ]);
121
121
  function X(t) {
122
- return typeof t == "string" && Re.has(t) ? t : void 0;
122
+ return typeof t == "string" && _e.has(t) ? t : void 0;
123
123
  }
124
124
  const Te = /* @__PURE__ */ new Set(["cover", "contain", "fill", "none", "scale-down"]);
125
125
  function Ce(t) {
126
126
  return typeof t == "string" && Te.has(t) ? t : void 0;
127
127
  }
128
128
  let ft = 0;
129
- function Ct() {
129
+ function Ot() {
130
130
  return ft = (ft + 1) % 1e6, `lumen-grad-${ft.toString(36)}`;
131
131
  }
132
132
  function Oe(t) {
@@ -136,12 +136,12 @@ function Oe(t) {
136
136
  return { defs: [], ref: s, mixBlendMode: e };
137
137
  }
138
138
  if (t.kind === "image") {
139
- const s = Ct(), l = Pe(t.objectFit);
139
+ const s = Ot(), l = Ne(t.objectFit);
140
140
  return { defs: [
141
141
  /* @__PURE__ */ f("pattern", { id: s, patternContentUnits: "objectBoundingBox", width: "1", height: "1", children: /* @__PURE__ */ f("image", { href: t.src, width: "1", height: "1", preserveAspectRatio: l }) }, s)
142
142
  ], ref: `url(#${s})`, mixBlendMode: e };
143
143
  }
144
- const n = Ct();
144
+ const n = Ot();
145
145
  if (t.kind === "linear-gradient") {
146
146
  let s, l, c, u;
147
147
  const d = t.transform;
@@ -188,7 +188,7 @@ function Oe(t) {
188
188
  )) }, n)
189
189
  ], ref: `url(#${n})`, mixBlendMode: e };
190
190
  }
191
- function Ne(t) {
191
+ function Pe(t) {
192
192
  switch (t) {
193
193
  case "contain":
194
194
  case "scale-down":
@@ -202,7 +202,7 @@ function Ne(t) {
202
202
  return "cover";
203
203
  }
204
204
  }
205
- function Pe(t) {
205
+ function Ne(t) {
206
206
  switch (t) {
207
207
  case "contain":
208
208
  case "scale-down":
@@ -226,7 +226,7 @@ function Ee(t, e) {
226
226
  const r = { backgroundImage: i.join(", ") }, a = n.map((s) => X(s.blendMode) ?? "normal");
227
227
  a.some((s) => s !== "normal") && (r.backgroundBlendMode = a.join(", "));
228
228
  const o = t.find((s) => s.kind === "image");
229
- return o && (r.backgroundSize = Ne(o.objectFit), r.backgroundPosition = "center", r.backgroundRepeat = "no-repeat"), r;
229
+ return o && (r.backgroundSize = Pe(o.objectFit), r.backgroundPosition = "center", r.backgroundRepeat = "no-repeat"), r;
230
230
  }
231
231
  function De(t) {
232
232
  return `url("${t.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}")`;
@@ -296,16 +296,16 @@ function Le(t, e, n) {
296
296
  }
297
297
  return i;
298
298
  }
299
- function ee(t, e, n) {
299
+ function ne(t, e, n) {
300
300
  if (!Array.isArray(t)) return [];
301
301
  if (e !== void 0)
302
302
  for (const i of t)
303
- Ot(i) || S(
303
+ Pt(i) || S(
304
304
  n,
305
305
  `${e}.kind`,
306
306
  "fill kind is not renderable by this runtime ; layer dropped (angular/diamond gradients land with LSML 1.2)"
307
307
  );
308
- return t.filter(Ot).map((i) => {
308
+ return t.filter(Pt).map((i) => {
309
309
  let r = i;
310
310
  if (r.blendMode !== void 0 && X(r.blendMode) === void 0) {
311
311
  S(
@@ -330,12 +330,12 @@ function ee(t, e, n) {
330
330
  return { ...r, objectFit: a };
331
331
  });
332
332
  }
333
- function Ot(t) {
333
+ function Pt(t) {
334
334
  if (typeof t != "object" || t === null) return !1;
335
335
  const e = t.kind;
336
336
  return e === "solid" || e === "linear-gradient" || e === "radial-gradient" ? !0 : e === "image" && typeof t.src == "string";
337
337
  }
338
- function ne(t, e, n, i) {
338
+ function re(t, e, n, i) {
339
339
  return t.filter((r) => r.kind !== "image" ? !0 : $t(r.src, e, `${n}.src`, i) !== void 0);
340
340
  }
341
341
  function ze({
@@ -347,8 +347,8 @@ function ze({
347
347
  }) {
348
348
  const a = O(t.x, 0), o = O(t.y, 0), s = Nt(t.width), l = Nt(t.height), c = O(t.opacity, 1), u = O(t.scale, 1), d = O(t.rotate, O(t.rotation, 0)), h = t.flipY === !0, g = O(t.radius, 0), m = t.background, A = m === void 0 ? void 0 : D(m);
349
349
  m !== void 0 && A === null && B("frame.background", e);
350
- const x = nt(), F = ne(
351
- ee(t.backgrounds, "frame.backgrounds", e),
350
+ const x = nt(), F = re(
351
+ ne(t.backgrounds, "frame.backgrounds", e),
352
352
  x,
353
353
  "frame.backgrounds",
354
354
  e
@@ -424,7 +424,7 @@ function We(t, e) {
424
424
  function Nt(t) {
425
425
  if (typeof t == "number" && Number.isFinite(t) || typeof t == "string" && t.length > 0) return t;
426
426
  }
427
- const qe = /* @__PURE__ */ new Set(["none", "uppercase", "lowercase", "capitalize"]), Ge = /* @__PURE__ */ new Set(["none", "underline", "line-through"]), Ie = /* @__PURE__ */ new Set(["normal", "italic", "oblique"]), Ye = 1e3, Xe = 100, Pt = 1e3, Ue = /^[a-zA-Z0-9 ,.'"_-]{1,256}$/;
427
+ const qe = /* @__PURE__ */ new Set(["none", "uppercase", "lowercase", "capitalize"]), Ge = /* @__PURE__ */ new Set(["none", "underline", "line-through"]), Ie = /* @__PURE__ */ new Set(["normal", "italic", "oblique"]), Ye = 1e3, Xe = 100, Et = 1e3, Ue = /^[a-zA-Z0-9 ,.'"_-]{1,256}$/;
428
428
  function Ke(t) {
429
429
  if (typeof t != "string") return null;
430
430
  const e = t.trim();
@@ -468,16 +468,16 @@ function Ze(t, e) {
468
468
  return typeof t == "number" && Number.isFinite(t) ? t : e;
469
469
  }
470
470
  function Je(t, e) {
471
- const n = Et(
471
+ const n = Dt(
472
472
  t.lineHeight,
473
473
  0,
474
474
  Xe,
475
475
  "text.lineHeight",
476
476
  e
477
- ), i = Et(
477
+ ), i = Dt(
478
478
  t.letterSpacing,
479
- -Pt,
480
- Pt,
479
+ -Et,
480
+ Et,
481
481
  "text.letterSpacing",
482
482
  e
483
483
  ), r = dt(
@@ -513,7 +513,7 @@ function dt(t, e, n, i) {
513
513
  St(n, i);
514
514
  }
515
515
  }
516
- function Et(t, e, n, i, r) {
516
+ function Dt(t, e, n, i, r) {
517
517
  if (t !== void 0) {
518
518
  if (typeof t == "number" && Number.isFinite(t) && t >= e && t <= n) return t;
519
519
  St(i, r);
@@ -535,7 +535,7 @@ function St(t, e) {
535
535
  function tn({ resolved: t, nodeId: e, transitionFor: n, animateInitial: i }) {
536
536
  const r = nt(), a = $t(t.src, r, "image.src", e);
537
537
  if (!a) return null;
538
- const o = typeof t.alt == "string" ? t.alt : "", s = t.fit ?? "contain", l = t.position ?? "center", c = en(t.opacity, 1), u = Dt(t.width, "100%"), d = Dt(t.height, "100%"), h = at(n, ["opacity", "src"], i), g = lt({ opacity: c }, i, e);
538
+ const o = typeof t.alt == "string" ? t.alt : "", s = t.fit ?? "contain", l = t.position ?? "center", c = en(t.opacity, 1), u = Bt(t.width, "100%"), d = Bt(t.height, "100%"), h = at(n, ["opacity", "src"], i), g = lt({ opacity: c }, i, e);
539
539
  return /* @__PURE__ */ f(
540
540
  U.img,
541
541
  {
@@ -563,7 +563,7 @@ function tn({ resolved: t, nodeId: e, transitionFor: n, animateInitial: i }) {
563
563
  function en(t, e) {
564
564
  return typeof t == "number" && Number.isFinite(t) ? t : e;
565
565
  }
566
- function Dt(t, e) {
566
+ function Bt(t, e) {
567
567
  return typeof t == "number" && Number.isFinite(t) ? `${t}px` : typeof t == "string" && t.length > 0 ? t : e;
568
568
  }
569
569
  const nn = 8192, rn = 4e3, on = 64, sn = new Set("MmLlHhVvCcSsQqTtAaZz");
@@ -573,7 +573,7 @@ function pt(t) {
573
573
  function an(t) {
574
574
  return t === 32 || t === 9 || t === 13 || t === 10 || t === 44;
575
575
  }
576
- function Bt(t) {
576
+ function Lt(t) {
577
577
  if (typeof t != "string" || t.length === 0 || t.length > nn) return null;
578
578
  const e = t.trim();
579
579
  if (e.length === 0) return null;
@@ -627,7 +627,7 @@ function ln(t, e) {
627
627
  W(e, "shape.paths", "subpath cap exceeded ; remaining entries dropped");
628
628
  break;
629
629
  }
630
- const o = n[a], s = Bt(
630
+ const o = n[a], s = Lt(
631
631
  typeof o == "object" && o !== null ? o.data : void 0
632
632
  );
633
633
  if (s === null) {
@@ -639,7 +639,7 @@ function ln(t, e) {
639
639
  return r.length === 0 && n.length > 0 && W(e, "shape.paths", "no renderable subpath ; shape geometry omitted"), r;
640
640
  }
641
641
  if (i !== void 0) {
642
- const r = Bt(i);
642
+ const r = Lt(i);
643
643
  return r === null ? (W(e, "shape.pathData", "not a strict SVG path grammar (allowlist/caps)"), []) : [{ d: r, fillRule: "nonzero" }];
644
644
  }
645
645
  return W(e, "shape.paths", "geometry is path but neither pathData nor paths[] is present"), [];
@@ -719,32 +719,32 @@ function fn(t, e) {
719
719
  const n = t.props ?? {};
720
720
  return Mt(n, { fill: "white" }, e, "mask-cover");
721
721
  }
722
- const dn = 64, re = 1;
723
- function ie(t) {
722
+ const dn = 64, ie = 1;
723
+ function oe(t) {
724
724
  return t.props?.visible === !1;
725
725
  }
726
726
  function ot(t, e) {
727
727
  const n = t?.[e];
728
728
  return typeof n == "number" && Number.isFinite(n) ? n : 0;
729
729
  }
730
- function pn(t, e, n = re, i = dn) {
730
+ function pn(t, e, n = ie, i = dn) {
731
731
  if (t.kind !== "frame") return null;
732
- const r = se(t, e, n, i, "grp");
732
+ const r = ae(t, e, n, i, "grp");
733
733
  return r.length === 0 ? null : /* @__PURE__ */ f("g", { children: r }, "mask-group-cover");
734
734
  }
735
- function oe(t, e = re) {
735
+ function se(t, e = ie) {
736
736
  if (t.kind !== "frame") return !1;
737
737
  for (const n of t.children ?? [])
738
- if (!ie(n) && (ot(n.props, "blur") > 0 || n.kind === "frame" && e > 0 && oe(n, e - 1)))
738
+ if (!oe(n) && (ot(n.props, "blur") > 0 || n.kind === "frame" && e > 0 && se(n, e - 1)))
739
739
  return !0;
740
740
  return !1;
741
741
  }
742
- function se(t, e, n, i, r) {
742
+ function ae(t, e, n, i, r) {
743
743
  const a = t.children ?? [], o = [];
744
744
  let s = 0;
745
745
  for (let l = 0; l < a.length; l++) {
746
746
  const c = a[l];
747
- if (ie(c)) continue;
747
+ if (oe(c)) continue;
748
748
  if (s >= i) {
749
749
  S(
750
750
  e,
@@ -757,7 +757,7 @@ function se(t, e, n, i, r) {
757
757
  if (c.kind === "shape")
758
758
  u = Mt(c.props ?? {}, { fill: "white" }, c.id, `${r}-${l}`);
759
759
  else if (c.kind === "frame" && n > 0) {
760
- const m = se(c, e, n - 1, i, `${r}-${l}`);
760
+ const m = ae(c, e, n - 1, i, `${r}-${l}`);
761
761
  m.length > 0 && (u = /* @__PURE__ */ f("g", { children: m }, `${r}-${l}`));
762
762
  }
763
763
  if (u === null) continue;
@@ -777,19 +777,19 @@ function se(t, e, n, i, r) {
777
777
  return o;
778
778
  }
779
779
  function hn({ resolved: t, nodeId: e, transitionFor: n, animateInitial: i }) {
780
- const r = t.geometry ?? t.kind ?? "rect", a = gt(t.fill, "shape.fill", e) ?? "transparent", o = gt(t.stroke, "shape.stroke", e) ?? "transparent", s = rt(t.stroke_width, 0), l = rt(t.width, 100), c = rt(t.height, 100), u = rt(t.opacity, 1), d = typeof t.ariaLabel == "string" ? t.ariaLabel : void 0, h = at(n, ["opacity"], i), g = et(h), m = lt({ opacity: u }, i, e), A = nt(), x = ne(
781
- Le(ee(t.fills, "shape.fills", e), "shape.fills", e),
780
+ const r = t.geometry ?? t.kind ?? "rect", a = gt(t.fill, "shape.fill", e) ?? "transparent", o = gt(t.stroke, "shape.stroke", e) ?? "transparent", s = rt(t.stroke_width, 0), l = rt(t.width, 100), c = rt(t.height, 100), u = rt(t.opacity, 1), d = typeof t.ariaLabel == "string" ? t.ariaLabel : void 0, h = at(n, ["opacity"], i), g = et(h), m = lt({ opacity: u }, i, e), A = nt(), x = re(
781
+ Le(ne(t.fills, "shape.fills", e), "shape.fills", e),
782
782
  A,
783
783
  "shape.fills",
784
784
  e
785
- ), F = gn(t.strokes), k = x.map(Oe), y = k.flatMap((_) => _.defs), p = k.length > 0 ? k.map((_) => ({ ref: _.ref, mixBlendMode: _.mixBlendMode })) : [{ ref: a }], w = F.length > 0 ? F.map((_) => ({
786
- color: gt(_.color, "shape.strokes.color", e) ?? "transparent",
787
- width: _.width ?? 0
788
- })) : [{ color: o, width: s }], v = [...p].reverse(), $ = [...w].reverse(), R = r === "path" ? $.filter((_) => _.width > 0 && _.color !== "transparent") : $, V = (_, b, N, P) => Mt(
785
+ ), F = gn(t.strokes), k = x.map(Oe), y = k.flatMap((R) => R.defs), p = k.length > 0 ? k.map((R) => ({ ref: R.ref, mixBlendMode: R.mixBlendMode })) : [{ ref: a }], w = F.length > 0 ? F.map((R) => ({
786
+ color: gt(R.color, "shape.strokes.color", e) ?? "transparent",
787
+ width: R.width ?? 0
788
+ })) : [{ color: o, width: s }], v = [...p].reverse(), $ = [...w].reverse(), _ = r === "path" ? $.filter((R) => R.width > 0 && R.color !== "transparent") : $, V = (R, b, P, N) => Mt(
789
789
  t,
790
- { fill: _, stroke: b.color, strokeWidth: b.width, mixBlendMode: P },
790
+ { fill: R, stroke: b.color, strokeWidth: b.width, mixBlendMode: N },
791
791
  e,
792
- N
792
+ P
793
793
  );
794
794
  return /* @__PURE__ */ I(
795
795
  U.svg,
@@ -804,9 +804,9 @@ function hn({ resolved: t, nodeId: e, transitionFor: n, animateInitial: i }) {
804
804
  children: [
805
805
  y.length > 0 && /* @__PURE__ */ f("defs", { children: y }),
806
806
  v.map(
807
- (_, b) => V(_.ref, { color: "transparent", width: 0 }, `fill-${b}`, _.mixBlendMode)
807
+ (R, b) => V(R.ref, { color: "transparent", width: 0 }, `fill-${b}`, R.mixBlendMode)
808
808
  ),
809
- R.map((_, b) => V("none", _, `stroke-${b}`))
809
+ _.map((R, b) => V("none", R, `stroke-${b}`))
810
810
  ]
811
811
  }
812
812
  );
@@ -824,12 +824,12 @@ function gn(t) {
824
824
  function rt(t, e) {
825
825
  return typeof t == "number" && Number.isFinite(t) ? t : e;
826
826
  }
827
- function ae({
827
+ function At({
828
828
  peerLabel: t,
829
829
  objectFit: e,
830
830
  muted: n = !0
831
831
  }) {
832
- const i = Kt(), r = i?.resolvePeerStream, a = i?.subscribePeerStream, o = tt(null), [s, l] = vt(null);
832
+ const i = Vt(), r = i?.resolvePeerStream, a = i?.subscribePeerStream, o = tt(null), [s, l] = vt(null);
833
833
  return Y(() => {
834
834
  if (a !== void 0)
835
835
  return a(t, l);
@@ -871,7 +871,7 @@ function ae({
871
871
  function mn({ resolved: t, nodeId: e }) {
872
872
  const n = nt(), i = t.fit ?? "cover", r = typeof t.peerLabel == "string" && t.peerLabel.length > 0 ? t.peerLabel : "";
873
873
  if (r !== "")
874
- return /* @__PURE__ */ f(ae, { peerLabel: r, objectFit: i });
874
+ return /* @__PURE__ */ f(At, { peerLabel: r, objectFit: i });
875
875
  const a = $t(t.src, n, "media.src", e);
876
876
  if (!a) return null;
877
877
  const o = t.loop ?? !0, s = t.mute ?? !0, l = t.autoplay ?? !0;
@@ -906,15 +906,26 @@ function bn({ resolved: t }) {
906
906
  }
907
907
  );
908
908
  const n = typeof t.object_fit == "string" && t.object_fit.length > 0 ? t.object_fit : "cover", i = t.muted === void 0 ? !0 : t.muted !== !1;
909
- return /* @__PURE__ */ f(ae, { peerLabel: e, objectFit: n, muted: i });
909
+ return /* @__PURE__ */ f(At, { peerLabel: e, objectFit: n, muted: i });
910
910
  }
911
- const Lt = /* @__PURE__ */ new Set();
912
- function kn({ resolved: t, nodeId: e }) {
911
+ function kn({ resolved: t }) {
912
+ const e = typeof t["x-zab.slotRef"] == "string" && t["x-zab.slotRef"].length > 0 ? t["x-zab.slotRef"] : "";
913
+ return e === "" ? /* @__PURE__ */ f(
914
+ "div",
915
+ {
916
+ "aria-hidden": !0,
917
+ "data-lumencast-meet-peer-slot": !0,
918
+ style: { width: "100%", height: "100%", opacity: 0, pointerEvents: "none" }
919
+ }
920
+ ) : /* @__PURE__ */ f(At, { peerLabel: e, objectFit: "cover", muted: !0 });
921
+ }
922
+ const zt = /* @__PURE__ */ new Set();
923
+ function wn({ resolved: t, nodeId: e }) {
913
924
  const n = t.scene_id, i = t.scene_version;
914
925
  if (!n || !i)
915
926
  return S(e, "instance.scene_id", "missing scene_id or scene_version ; not rendered"), null;
916
927
  const r = `${n}:${i}`;
917
- Lt.has(r) || (Lt.add(r), S(
928
+ zt.has(r) || (zt.add(r), S(
918
929
  e,
919
930
  "instance",
920
931
  "scaffold render — async bundle fetch + __params.* injection are not yet wired (LSML 1.1 §4.9)"
@@ -937,24 +948,24 @@ function kn({ resolved: t, nodeId: e }) {
937
948
  }
938
949
  );
939
950
  }
940
- function wn({ resolved: t }) {
941
- const e = Ht(t.width, "100%"), n = Ht(t.height, "100%"), i = typeof t["x-zab.sourceKind"] == "string" ? t["x-zab.sourceKind"] : "", r = typeof t["x-zab.deviceRef"] == "string" ? t["x-zab.deviceRef"] : "", o = Kt()?.resolveCaptureDevice, s = tt(null), [l, c] = vt(null);
951
+ function xn({ resolved: t }) {
952
+ const e = Wt(t.width, "100%"), n = Wt(t.height, "100%"), i = typeof t["x-zab.sourceKind"] == "string" ? t["x-zab.sourceKind"] : "", r = typeof t["x-zab.deviceRef"] == "string" ? t["x-zab.deviceRef"] : "", o = Vt()?.resolveCaptureDevice, s = tt(null), [l, c] = vt(null);
942
953
  return Y(() => {
943
- if (!xn()) return;
954
+ if (!vn()) return;
944
955
  let u = !1, d = null;
945
956
  return (async () => {
946
957
  try {
947
- const h = await $n(i, r, o);
958
+ const h = await Sn(i, r, o);
948
959
  if (h === null) return;
949
960
  if (u) {
950
- zt(h);
961
+ Ht(h);
951
962
  return;
952
963
  }
953
964
  d = h, c(h);
954
965
  } catch {
955
966
  }
956
967
  })(), () => {
957
- u = !0, d !== null && zt(d);
968
+ u = !0, d !== null && Ht(d);
958
969
  };
959
970
  }, [i, r, o]), Y(() => {
960
971
  const u = s.current;
@@ -962,7 +973,7 @@ function wn({ resolved: t }) {
962
973
  return u.srcObject = l, () => {
963
974
  u !== null && (u.srcObject = null);
964
975
  };
965
- }, [l]), l !== null && vn(i) ? /* @__PURE__ */ f(
976
+ }, [l]), l !== null && $n(i) ? /* @__PURE__ */ f(
966
977
  "video",
967
978
  {
968
979
  ref: s,
@@ -981,13 +992,13 @@ function wn({ resolved: t }) {
981
992
  }
982
993
  );
983
994
  }
984
- function xn() {
995
+ function vn() {
985
996
  return typeof navigator < "u" && typeof navigator.mediaDevices?.getUserMedia == "function";
986
997
  }
987
- function vn(t) {
998
+ function $n(t) {
988
999
  return t === "media.webcam" || t === "media.screen" || t === "media.window";
989
1000
  }
990
- async function $n(t, e, n) {
1001
+ async function Sn(t, e, n) {
991
1002
  const i = navigator.mediaDevices, r = await n?.(e, t) ?? null, a = r?.deviceId, o = e.length > 0;
992
1003
  switch (t) {
993
1004
  case "media.webcam":
@@ -996,7 +1007,7 @@ async function $n(t, e, n) {
996
1007
  if (o && (typeof a != "string" || a.length === 0))
997
1008
  return null;
998
1009
  const s = t === "media.webcam" ? "video" : "audio";
999
- return i.getUserMedia({ [s]: Sn(a) });
1010
+ return i.getUserMedia({ [s]: Mn(a) });
1000
1011
  }
1001
1012
  case "media.screen":
1002
1013
  case "media.window": {
@@ -1014,16 +1025,16 @@ async function $n(t, e, n) {
1014
1025
  return null;
1015
1026
  }
1016
1027
  }
1017
- function Sn(t) {
1028
+ function Mn(t) {
1018
1029
  return typeof t == "string" && t.length > 0 ? { deviceId: { exact: t } } : !0;
1019
1030
  }
1020
- function zt(t) {
1031
+ function Ht(t) {
1021
1032
  for (const e of t.getTracks()) e.stop();
1022
1033
  }
1023
- function Ht(t, e) {
1034
+ function Wt(t, e) {
1024
1035
  return typeof t == "number" && Number.isFinite(t) ? `${t}px` : typeof t == "string" && t.length > 0 ? t : e;
1025
1036
  }
1026
- const Mn = {
1037
+ const An = {
1027
1038
  stack: ve,
1028
1039
  grid: $e,
1029
1040
  frame: ze,
@@ -1034,21 +1045,26 @@ const Mn = {
1034
1045
  // ADR 006 §3.3/§3.5 — the unified source kind : every exported source is a
1035
1046
  // `meet.peer` node rendered in `<video srcObject>` from the WebRTC viewer.
1036
1047
  "meet.peer": bn,
1037
- instance: kn,
1048
+ instance: wn,
1038
1049
  // RFC-0001 / ADR 004 — Zab vendor capture placeholder (transparent, inert).
1039
- "x-zab.capture": wn
1050
+ "x-zab.capture": xn,
1051
+ // ADR Blue 009 §3.1 (Amendment 2) — Zab vendor meet-peer SLOT placeholder.
1052
+ // Carries only a logical `x-zab.slotRef` ; the host's slot-aware peer-stream
1053
+ // registry resolves `slotRef → peer_label → MediaStream` (transparent when
1054
+ // unbound). Closes the kind→primitive gap that left it an unknown-kind drop.
1055
+ "x-zab.meet-peer": kn
1040
1056
  }, kt = st("");
1041
- function An({ prefix: t, children: e }) {
1057
+ function Fn({ prefix: t, children: e }) {
1042
1058
  const n = K(kt), i = n ? `${n}.${t}` : t;
1043
1059
  return /* @__PURE__ */ f(kt.Provider, { value: i, children: e });
1044
1060
  }
1045
- function At() {
1061
+ function Ft() {
1046
1062
  return K(kt);
1047
1063
  }
1048
1064
  function G(t, e) {
1049
1065
  return !t || e.startsWith("__") ? e : `${t}.${e}`;
1050
1066
  }
1051
- function Wt(t) {
1067
+ function qt(t) {
1052
1068
  switch (t) {
1053
1069
  case "fixed":
1054
1070
  return "0 0 auto";
@@ -1060,11 +1076,11 @@ function Wt(t) {
1060
1076
  return;
1061
1077
  }
1062
1078
  }
1063
- function Fn(t) {
1064
- const e = Wt(t?.x), n = Wt(t?.y);
1079
+ function Rn(t) {
1080
+ const e = qt(t?.x), n = qt(t?.y);
1065
1081
  return e === n && e !== void 0 ? e : e ?? n;
1066
1082
  }
1067
- function _n({
1083
+ function jn({
1068
1084
  visible: t,
1069
1085
  opacity: e,
1070
1086
  rotation: n,
@@ -1086,7 +1102,7 @@ function _n({
1086
1102
  const v = [];
1087
1103
  h && v.push(`rotate(${n}deg)`), g && v.push("scaleY(-1)"), k = v.join(" ");
1088
1104
  }
1089
- const y = m ? `blur(${r / 2}px)` : void 0, p = A ? Fn(a) : void 0;
1105
+ const y = m ? `blur(${r / 2}px)` : void 0, p = A ? Rn(a) : void 0;
1090
1106
  if (F && (d || k !== void 0 || y !== void 0)) {
1091
1107
  const v = { mixBlendMode: u };
1092
1108
  x && (v.position = "absolute", v.left = o.x, v.top = o.y), p !== void 0 && (v.flex = p);
@@ -1096,28 +1112,28 @@ function _n({
1096
1112
  const w = {};
1097
1113
  return d && (w.opacity = e), k !== void 0 && (w.transform = k), y !== void 0 && (w.filter = y), F && (w.mixBlendMode = u), x && (w.position = "absolute", w.left = o.x, w.top = o.y, typeof s?.w == "number" && (w.width = s.w), typeof s?.h == "number" && (w.height = s.h)), p !== void 0 && (w.flex = p), /* @__PURE__ */ f("div", { style: w, children: c });
1098
1114
  }
1099
- const jn = {
1115
+ const _n = {
1100
1116
  linear: "linear",
1101
1117
  "ease-in": "easeIn",
1102
1118
  "ease-out": "easeOut",
1103
1119
  "ease-in-out": "easeInOut"
1104
1120
  };
1105
- function Rn(t, e) {
1121
+ function Tn(t, e) {
1106
1122
  const n = t.steps;
1107
1123
  if (!Array.isArray(n) || n.length < 2) return;
1108
1124
  const i = n[0], r = n[n.length - 1];
1109
1125
  if (i.at !== 0 || r.at !== 1) return;
1110
1126
  const a = n.map((s) => s.at), o = {};
1111
- return qt(n, "opacity", o, e), qt(n, "filter", o, e), it(n, "scale", o), it(n, "translateX", o), it(n, "translateY", o), it(n, "rotate", o), {
1127
+ return Gt(n, "opacity", o, e), Gt(n, "filter", o, e), it(n, "scale", o), it(n, "translateX", o), it(n, "translateY", o), it(n, "rotate", o), {
1112
1128
  animate: o,
1113
1129
  transition: {
1114
1130
  duration: t.duration_ms / 1e3,
1115
- ease: jn[t.easing ?? "linear"],
1131
+ ease: _n[t.easing ?? "linear"],
1116
1132
  times: a
1117
1133
  }
1118
1134
  };
1119
1135
  }
1120
- function qt(t, e, n, i) {
1136
+ function Gt(t, e, n, i) {
1121
1137
  let r = !1;
1122
1138
  const a = [];
1123
1139
  let o;
@@ -1125,7 +1141,7 @@ function qt(t, e, n, i) {
1125
1141
  let l = s[e];
1126
1142
  if (e === "filter" && l !== void 0) {
1127
1143
  const c = ke(l);
1128
- c === null ? (Vt("keyframes.steps[].filter", i), l = void 0) : l = c;
1144
+ c === null ? (Zt("keyframes.steps[].filter", i), l = void 0) : l = c;
1129
1145
  }
1130
1146
  l !== void 0 ? (r = !0, o = l, a.push(l)) : a.push(o ?? (e === "opacity" ? 1 : we));
1131
1147
  }
@@ -1137,7 +1153,7 @@ function it(t, e, n) {
1137
1153
  let a;
1138
1154
  for (const o of t) {
1139
1155
  const s = o.transform?.[e];
1140
- typeof s == "number" ? (i = !0, a = s, r.push(s)) : r.push(a ?? Tn(e));
1156
+ typeof s == "number" ? (i = !0, a = s, r.push(s)) : r.push(a ?? Cn(e));
1141
1157
  }
1142
1158
  if (i)
1143
1159
  if (e === "rotate")
@@ -1147,28 +1163,28 @@ function it(t, e, n) {
1147
1163
  n[o] = r;
1148
1164
  }
1149
1165
  }
1150
- function Tn(t) {
1166
+ function Cn(t) {
1151
1167
  return t === "scale" ? 1 : 0;
1152
1168
  }
1153
- const Ft = st(0), Gt = 2e3;
1154
- function Cn(t, e) {
1169
+ const Rt = st(0), It = 2e3;
1170
+ function On(t, e) {
1155
1171
  if (e <= 0) return 0;
1156
1172
  const n = t * e;
1157
- return n > Gt ? Gt : n;
1173
+ return n > It ? It : n;
1158
1174
  }
1159
- function On({
1175
+ function Pn({
1160
1176
  keyframes: t,
1161
1177
  store: e,
1162
1178
  nodeId: n,
1163
1179
  children: i
1164
1180
  }) {
1165
1181
  xt();
1166
- const r = At(), a = K(Ft), o = tt(void 0), s = tt(0);
1182
+ const r = Ft(), a = K(Rt), o = tt(void 0), s = tt(0);
1167
1183
  if (t.key !== void 0) {
1168
1184
  const u = e.signal(G(r, t.key)).value;
1169
1185
  o.current !== u && (o.current = u, s.current += 1);
1170
1186
  }
1171
- const l = Rn(t, n);
1187
+ const l = Tn(t, n);
1172
1188
  if (!l)
1173
1189
  return /* @__PURE__ */ f(Q, { children: i });
1174
1190
  const c = a > 0 ? { ...l.transition, delay: a / 1e3 } : l.transition;
@@ -1176,7 +1192,7 @@ function On({
1176
1192
  U.div,
1177
1193
  {
1178
1194
  style: { position: "absolute", inset: 0 },
1179
- initial: Pn(l.animate),
1195
+ initial: En(l.animate),
1180
1196
  animate: l.animate,
1181
1197
  transition: c,
1182
1198
  children: [
@@ -1191,13 +1207,13 @@ function Nn() {
1191
1207
  return Y(() => {
1192
1208
  }, []), null;
1193
1209
  }
1194
- function Pn(t) {
1210
+ function En(t) {
1195
1211
  const e = {};
1196
1212
  for (const [n, i] of Object.entries(t))
1197
1213
  i.length > 0 && (e[n] = i[0]);
1198
1214
  return e;
1199
1215
  }
1200
- function En(t, e = (i) => requestAnimationFrame(i), n = (i) => cancelAnimationFrame(i)) {
1216
+ function Dn(t, e = (i) => requestAnimationFrame(i), n = (i) => cancelAnimationFrame(i)) {
1201
1217
  const i = /* @__PURE__ */ new Map();
1202
1218
  let r = null, a = !1;
1203
1219
  const o = () => {
@@ -1216,7 +1232,7 @@ function En(t, e = (i) => requestAnimationFrame(i), n = (i) => cancelAnimationFr
1216
1232
  }
1217
1233
  };
1218
1234
  }
1219
- const Dn = {
1235
+ const Bn = {
1220
1236
  aliceblue: 15792383,
1221
1237
  antiquewhite: 16444375,
1222
1238
  aqua: 65535,
@@ -1366,30 +1382,30 @@ const Dn = {
1366
1382
  yellow: 16776960,
1367
1383
  yellowgreen: 10145074
1368
1384
  };
1369
- function Bn(t) {
1385
+ function Ln(t) {
1370
1386
  const e = D(t);
1371
1387
  if (e === null) return null;
1372
- if (e.startsWith("#")) return Ln(e);
1388
+ if (e.startsWith("#")) return zn(e);
1373
1389
  if (e.startsWith("rgb")) {
1374
1390
  const r = e.slice(e.indexOf("(") + 1, -1).split(",").map((d) => d.trim());
1375
1391
  if (r.length < 3) return null;
1376
- const o = r[0].endsWith("%") ? 100 : 255, s = mt(r[0], o), l = mt(r[1], o), c = mt(r[2], o), u = r.length > 3 ? It(r[3]) : 1;
1392
+ const o = r[0].endsWith("%") ? 100 : 255, s = mt(r[0], o), l = mt(r[1], o), c = mt(r[2], o), u = r.length > 3 ? Yt(r[3]) : 1;
1377
1393
  return s === null || l === null || c === null || u === null ? null : [s, l, c, u];
1378
1394
  }
1379
1395
  if (e.startsWith("hsl")) {
1380
1396
  const r = e.slice(e.indexOf("(") + 1, -1).split(",").map((h) => h.trim());
1381
1397
  if (r.length < 3) return null;
1382
- const a = Number(r[0].replace("deg", "")), o = Number(r[1].replace("%", "")) / 100, s = Number(r[2].replace("%", "")) / 100, l = r.length > 3 ? It(r[3]) : 1;
1398
+ const a = Number(r[0].replace("deg", "")), o = Number(r[1].replace("%", "")) / 100, s = Number(r[2].replace("%", "")) / 100, l = r.length > 3 ? Yt(r[3]) : 1;
1383
1399
  if (![a, o, s].every(Number.isFinite) || l === null) return null;
1384
- const [c, u, d] = zn(a, o, s);
1400
+ const [c, u, d] = Hn(a, o, s);
1385
1401
  return [c, u, d, l];
1386
1402
  }
1387
1403
  if (e === "transparent") return [0, 0, 0, 0];
1388
1404
  if (e === "currentcolor") return null;
1389
- const n = Dn[e];
1405
+ const n = Bn[e];
1390
1406
  return n === void 0 ? null : [(n >> 16 & 255) / 255, (n >> 8 & 255) / 255, (n & 255) / 255, 1];
1391
1407
  }
1392
- function Ln(t) {
1408
+ function zn(t) {
1393
1409
  const e = t.slice(1);
1394
1410
  if (e.length === 3 || e.length === 4) {
1395
1411
  const n = parseInt(e[0] + e[0], 16), i = parseInt(e[1] + e[1], 16), r = parseInt(e[2] + e[2], 16), a = e.length === 4 ? parseInt(e[3] + e[3], 16) : 255;
@@ -1405,18 +1421,18 @@ function mt(t, e) {
1405
1421
  const n = Number(t.replace("%", ""));
1406
1422
  return Number.isFinite(n) ? T(n / e) : null;
1407
1423
  }
1408
- function It(t) {
1424
+ function Yt(t) {
1409
1425
  const e = t.endsWith("%"), n = Number(t.replace("%", ""));
1410
1426
  return Number.isFinite(n) ? T(e ? n / 100 : n) : null;
1411
1427
  }
1412
- function zn(t, e, n) {
1428
+ function Hn(t, e, n) {
1413
1429
  const i = (t % 360 + 360) % 360, r = (1 - Math.abs(2 * n - 1)) * e, a = i / 60, o = r * (1 - Math.abs(a % 2 - 1));
1414
1430
  let s = 0, l = 0, c = 0;
1415
1431
  a < 1 ? [s, l, c] = [r, o, 0] : a < 2 ? [s, l, c] = [o, r, 0] : a < 3 ? [s, l, c] = [0, r, o] : a < 4 ? [s, l, c] = [0, o, r] : a < 5 ? [s, l, c] = [o, 0, r] : [s, l, c] = [r, 0, o];
1416
1432
  const u = n - r / 2;
1417
1433
  return [T(s + u), T(l + u), T(c + u)];
1418
1434
  }
1419
- function Hn(t, e, n) {
1435
+ function Wn(t, e, n) {
1420
1436
  return [
1421
1437
  T(t[0] + n * (e[0] - t[0])),
1422
1438
  T(t[1] + n * (e[1] - t[1])),
@@ -1424,7 +1440,7 @@ function Hn(t, e, n) {
1424
1440
  T(t[3] + n * (e[3] - t[3]))
1425
1441
  ];
1426
1442
  }
1427
- function Yt(t) {
1443
+ function Xt(t) {
1428
1444
  const e = Math.round(T(t[0]) * 255), n = Math.round(T(t[1]) * 255), i = Math.round(T(t[2]) * 255), r = Math.round(T(t[3]) * 1e4) / 1e4;
1429
1445
  return `rgba(${e}, ${n}, ${i}, ${r})`;
1430
1446
  }
@@ -1436,7 +1452,7 @@ const le = {
1436
1452
  fill: "fill",
1437
1453
  background: "background"
1438
1454
  };
1439
- function Wn(t, e) {
1455
+ function qn(t, e) {
1440
1456
  switch (t) {
1441
1457
  case "opacity": {
1442
1458
  const n = H(e);
@@ -1461,11 +1477,11 @@ function Wn(t, e) {
1461
1477
  return n === null ? null : { rotate: n };
1462
1478
  }
1463
1479
  case "filter.blur": {
1464
- const n = Rt("blur", e);
1480
+ const n = Tt("blur", e);
1465
1481
  return n === null ? null : { blur: n };
1466
1482
  }
1467
1483
  case "filter.brightness": {
1468
- const n = Rt("brightness", e);
1484
+ const n = Tt("brightness", e);
1469
1485
  return n === null ? null : { brightness: n };
1470
1486
  }
1471
1487
  default:
@@ -1475,13 +1491,13 @@ function Wn(t, e) {
1475
1491
  function H(t) {
1476
1492
  return typeof t != "number" || !Number.isFinite(t) ? null : Object.is(t, -0) ? 0 : t;
1477
1493
  }
1478
- const qn = {
1494
+ const Gn = {
1479
1495
  kind: "spring",
1480
1496
  stiffness: 170,
1481
1497
  damping: 26,
1482
1498
  mass: 1
1483
1499
  };
1484
- function Gn(t) {
1500
+ function In(t) {
1485
1501
  switch (t) {
1486
1502
  case "opacity":
1487
1503
  return "opacity";
@@ -1498,12 +1514,12 @@ function Gn(t) {
1498
1514
  return le[t] ?? t;
1499
1515
  }
1500
1516
  }
1501
- const In = {};
1502
- function Yn(t, e, n) {
1503
- const i = t.animateBindings, r = K(Ft), a = L(1), o = L(0), s = L(0), l = L(1), c = L(1), u = L(0), d = L(0), h = L(1), g = be(
1517
+ const Yn = {};
1518
+ function Xn(t, e, n) {
1519
+ const i = t.animateBindings, r = K(Rt), a = L(1), o = L(0), s = L(0), l = L(1), c = L(1), u = L(0), d = L(0), h = L(1), g = be(
1504
1520
  [d, h],
1505
1521
  ([k, y]) => `blur(${k}px) brightness(${y})`
1506
- ), [m, A] = vt(In), x = tt({
1522
+ ), [m, A] = vt(Yn), x = tt({
1507
1523
  opacity: a,
1508
1524
  x: o,
1509
1525
  y: s,
@@ -1517,41 +1533,41 @@ function Yn(t, e, n) {
1517
1533
  if (!i || Object.keys(i).length === 0) return;
1518
1534
  const k = x.current, y = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Set();
1519
1535
  let v = !1;
1520
- const $ = (b, N) => {
1521
- const Z = e.transitionSignal(N).peek() ?? t.transitions?.[Gn(b)], J = et(Z ?? qn);
1536
+ const $ = (b, P) => {
1537
+ const Z = e.transitionSignal(P).peek() ?? t.transitions?.[In(b)], J = et(Z ?? Gn);
1522
1538
  return r > 0 && !w.has(b) ? { ...J, delay: r / 1e3 } : J;
1523
- }, R = (b, N, P) => {
1539
+ }, _ = (b, P, N) => {
1524
1540
  const Z = le[b], J = G(n, i[b]);
1525
1541
  if (Z !== void 0) {
1526
- const E = Bn(N);
1542
+ const E = Ln(P);
1527
1543
  if (E === null) {
1528
1544
  B(`bindAnimate.${b}`, t.id);
1529
1545
  return;
1530
1546
  }
1531
1547
  const z = p.get(b);
1532
- if (P || z === void 0) {
1533
- p.set(b, { current: E }), A((ut) => ({ ...ut, [Z]: Yt(E) }));
1548
+ if (N || z === void 0) {
1549
+ p.set(b, { current: E }), A((ut) => ({ ...ut, [Z]: Xt(E) }));
1534
1550
  return;
1535
1551
  }
1536
1552
  const ge = z.current, me = $(b, J);
1537
1553
  w.add(b), y.get(`color:${b}`)?.stop(), y.set(
1538
1554
  `color:${b}`,
1539
- jt(0, 1, {
1555
+ _t(0, 1, {
1540
1556
  ...me,
1541
1557
  onUpdate: (ut) => {
1542
- const _t = Hn(ge, E, ut);
1543
- z.current = _t, A((ye) => ({ ...ye, [Z]: Yt(_t) }));
1558
+ const jt = Wn(ge, E, ut);
1559
+ z.current = jt, A((ye) => ({ ...ye, [Z]: Xt(jt) }));
1544
1560
  }
1545
1561
  })
1546
1562
  );
1547
1563
  return;
1548
1564
  }
1549
- const ct = Wn(b, N);
1565
+ const ct = qn(b, P);
1550
1566
  if (ct === null) {
1551
- b.startsWith("filter.") ? Vt(`bindAnimate.${b}`, t.id) : Xn(b, t.id);
1567
+ b.startsWith("filter.") ? Zt(`bindAnimate.${b}`, t.id) : Un(b, t.id);
1552
1568
  return;
1553
1569
  }
1554
- if (P) {
1570
+ if (N) {
1555
1571
  for (const [E, z] of Object.entries(ct))
1556
1572
  k[E].jump(z);
1557
1573
  return;
@@ -1559,19 +1575,19 @@ function Yn(t, e, n) {
1559
1575
  const he = $(b, J);
1560
1576
  w.add(b);
1561
1577
  for (const [E, z] of Object.entries(ct))
1562
- y.set(E, jt(k[E], z, he));
1563
- }, V = En((b, N) => R(b, N, !1)), _ = Object.entries(i).map(
1564
- ([b, N]) => xe(() => {
1565
- const P = e.signal(G(n, N)).value;
1566
- P !== void 0 && (v ? V.push(b, P) : R(b, P, !0));
1578
+ y.set(E, _t(k[E], z, he));
1579
+ }, V = Dn((b, P) => _(b, P, !1)), R = Object.entries(i).map(
1580
+ ([b, P]) => xe(() => {
1581
+ const N = e.signal(G(n, P)).value;
1582
+ N !== void 0 && (v ? V.push(b, N) : _(b, N, !0));
1567
1583
  })
1568
1584
  );
1569
1585
  return v = !0, () => {
1570
- for (const b of _) b();
1586
+ for (const b of R) b();
1571
1587
  V.dispose();
1572
1588
  for (const b of y.values()) b.stop();
1573
1589
  };
1574
- }, [t, i, e, n, r]), { motionStyle: Ut(() => {
1590
+ }, [t, i, e, n, r]), { motionStyle: Kt(() => {
1575
1591
  if (!i) return null;
1576
1592
  const k = {};
1577
1593
  let y = !1;
@@ -1597,7 +1613,7 @@ function Yn(t, e, n) {
1597
1613
  return y ? (k.willChange = "transform, opacity, filter", k) : null;
1598
1614
  }, [i, a, o, s, l, c, u, g]), colorProps: m };
1599
1615
  }
1600
- function Xn(t, e) {
1616
+ function Un(t, e) {
1601
1617
  S(
1602
1618
  e,
1603
1619
  `bindAnimate.${t}`,
@@ -1606,16 +1622,16 @@ function Xn(t, e) {
1606
1622
  }
1607
1623
  const ce = /* @__PURE__ */ new Set(["alpha", "luminance"]), wt = 180, ue = /* @__PURE__ */ new Set(["intersect", "subtract", "union"]);
1608
1624
  let yt = 0;
1609
- function Un() {
1625
+ function Kn() {
1610
1626
  return yt = (yt + 1) % 1e6, `lumen-mask-${yt.toString(36)}`;
1611
1627
  }
1612
- function Kn(t) {
1628
+ function Vn(t) {
1613
1629
  return /^[A-Za-z0-9_:-]+$/.test(t) ? t : null;
1614
1630
  }
1615
1631
  function M(t) {
1616
1632
  return typeof t == "number" && Number.isFinite(t);
1617
1633
  }
1618
- function Vn(t, e) {
1634
+ function Zn(t, e) {
1619
1635
  if (typeof t != "object" || t === null) return null;
1620
1636
  const n = t;
1621
1637
  if (typeof n.type != "string" || !ce.has(n.type))
@@ -1649,10 +1665,10 @@ function Vn(t, e) {
1649
1665
  const l = n.size;
1650
1666
  return l && M(l.w) && M(l.h) && (o.size = { w: l.w, h: l.h }), o;
1651
1667
  }
1652
- function Zn(t, e, n, i, r, a = !1) {
1668
+ function Jn(t, e, n, i, r, a = !1) {
1653
1669
  if (!ce.has(t.type) || !ue.has(t.op))
1654
1670
  return S(n, "mask", "type/op outside the closed enum ; mask omitted (T4)"), null;
1655
- const o = Un(), s = t.position?.x, l = t.position?.y, c = t.size?.w, u = t.size?.h, d = {
1671
+ const o = Kn(), s = t.position?.x, l = t.position?.y, c = t.size?.w, u = t.size?.h, d = {
1656
1672
  ...M(s) ? { x: s } : {},
1657
1673
  ...M(l) ? { y: l } : {},
1658
1674
  ...M(c) ? { width: c } : {},
@@ -1660,7 +1676,7 @@ function Zn(t, e, n, i, r, a = !1) {
1660
1676
  };
1661
1677
  let h;
1662
1678
  if (t.source.kind === "image") {
1663
- const x = Jt(t.source.src, e);
1679
+ const x = Qt(t.source.src, e);
1664
1680
  if (!x.allowed)
1665
1681
  return S(
1666
1682
  n,
@@ -1689,7 +1705,7 @@ function Zn(t, e, n, i, r, a = !1) {
1689
1705
  const F = Object.keys(d).length > 0 ? d : M(r?.w) && M(r?.h) ? { x: 0, y: 0, width: r.w, height: r.h } : { width: "100%", height: "100%" };
1690
1706
  h = /* @__PURE__ */ f("image", { href: t.source.src, preserveAspectRatio: "none", ...F });
1691
1707
  } else {
1692
- const x = Kn(t.source.ref);
1708
+ const x = Vn(t.source.ref);
1693
1709
  if (x === null)
1694
1710
  return S(
1695
1711
  n,
@@ -1737,7 +1753,7 @@ function Zn(t, e, n, i, r, a = !1) {
1737
1753
  return { def: m, style: { mask: A, WebkitMask: A }, id: o, feather: a };
1738
1754
  }
1739
1755
  const fe = /* @__PURE__ */ new Map(), de = st(fe);
1740
- function gr(t) {
1756
+ function mr(t) {
1741
1757
  if (!t) return fe;
1742
1758
  const e = /* @__PURE__ */ new Map(), n = [t];
1743
1759
  for (; n.length > 0; ) {
@@ -1753,30 +1769,30 @@ function gr(t) {
1753
1769
  }
1754
1770
  return e;
1755
1771
  }
1756
- function mr({
1772
+ function yr({
1757
1773
  index: t,
1758
1774
  children: e
1759
1775
  }) {
1760
1776
  return /* @__PURE__ */ f(de.Provider, { value: t, children: e });
1761
1777
  }
1762
- function Jn() {
1778
+ function Qn() {
1763
1779
  return K(de);
1764
1780
  }
1765
1781
  function pe({ node: t, store: e }) {
1766
- return t.kind === "repeat" ? /* @__PURE__ */ f(rr, { node: t, store: e }) : /* @__PURE__ */ f(Qn, { node: t, store: e });
1782
+ return t.kind === "repeat" ? /* @__PURE__ */ f(ir, { node: t, store: e }) : /* @__PURE__ */ f(tr, { node: t, store: e });
1767
1783
  }
1768
- function Qn({ node: t, store: e }) {
1784
+ function tr({ node: t, store: e }) {
1769
1785
  xt();
1770
- const n = At(), i = nt(), r = Jn(), a = Ut(
1771
- () => ir(t, e, n),
1786
+ const n = Ft(), i = nt(), r = Qn(), a = Kt(
1787
+ () => or(t, e, n),
1772
1788
  // We re-build per render — signals re-render cheaply, and the
1773
1789
  // resolution itself is O(bindings) which is small. The memo is a
1774
1790
  // micro-optimisation to keep object identity stable across renders
1775
1791
  // when the inputs haven't changed.
1776
- [t, e, n, ...or(t, e, n)]
1777
- ), o = Yn(t, e, n);
1778
- Zt(t);
1779
- const s = Mn[t.kind];
1792
+ [t, e, n, ...sr(t, e, n)]
1793
+ ), o = Xn(t, e, n);
1794
+ Jt(t);
1795
+ const s = An[t.kind];
1780
1796
  if (!s)
1781
1797
  return S(t.id, "kind", "unknown render kind ; node not rendered"), null;
1782
1798
  const l = {};
@@ -1797,9 +1813,9 @@ function Qn({ node: t, store: e }) {
1797
1813
  // (frame.tsx) ; non-frames carry it on the wrapper, composed with rotation.
1798
1814
  flipY: t.kind === "frame" ? void 0 : a.flipY === !0,
1799
1815
  blur: typeof a.blur == "number" ? a.blur : void 0,
1800
- sizing: tr(a.sizing),
1801
- position: t.kind === "frame" ? void 0 : er(a),
1802
- size: t.kind === "frame" ? void 0 : Xt(a),
1816
+ sizing: er(a.sizing),
1817
+ position: t.kind === "frame" ? void 0 : nr(a),
1818
+ size: t.kind === "frame" ? void 0 : Ut(a),
1803
1819
  // ADR 002 §3.2 (D2 / #D) — `blendMode` is a universal prop on every
1804
1820
  // primitive ; the wrapper re-validates it against the closed enum
1805
1821
  // before applying `mix-blend-mode` (T4 runtime gate). Pass the raw
@@ -1810,7 +1826,7 @@ function Qn({ node: t, store: e }) {
1810
1826
  // hard-light showed the raw blue wave instead of compositing over the warm
1811
1827
  // gradient). Drop it here when it will be hoisted.
1812
1828
  blendMode: typeof a.blendMode == "string" && !d ? a.blendMode : void 0
1813
- }, g = t.children?.some(nr) ?? !1, m = Object.keys(o.colorProps).length > 0 ? { ...a, ...o.colorProps } : a, A = /* @__PURE__ */ f(
1829
+ }, g = t.children?.some(rr) ?? !1, m = Object.keys(o.colorProps).length > 0 ? { ...a, ...o.colorProps } : a, A = /* @__PURE__ */ f(
1814
1830
  s,
1815
1831
  {
1816
1832
  resolved: m,
@@ -1823,24 +1839,24 @@ function Qn({ node: t, store: e }) {
1823
1839
  );
1824
1840
  let x = null;
1825
1841
  if (a.mask !== void 0) {
1826
- const p = Vn(a.mask, t.id), w = ($) => {
1827
- const R = r.get($);
1828
- return R ? R.kind === "frame" ? pn(R, R.id) : fn(R, R.id) : null;
1842
+ const p = Zn(a.mask, t.id), w = ($) => {
1843
+ const _ = r.get($);
1844
+ return _ ? _.kind === "frame" ? pn(_, _.id) : fn(_, _.id) : null;
1829
1845
  };
1830
1846
  let v = !1;
1831
1847
  if (p) {
1832
1848
  const $ = p.source;
1833
1849
  if (($.kind === "group" || $.kind === "shape") && typeof $.ref == "string") {
1834
- const R = r.get($.ref);
1835
- v = R ? oe(R) : !1;
1850
+ const _ = r.get($.ref);
1851
+ v = _ ? se(_) : !1;
1836
1852
  }
1837
1853
  }
1838
- x = p ? Zn(p, i, t.id, w, Xt(a), v) : null;
1854
+ x = p ? Jn(p, i, t.id, w, Ut(a), v) : null;
1839
1855
  }
1840
1856
  const F = x !== null && x.style != null && "maskImage" in x.style;
1841
1857
  let k = A;
1842
1858
  x && F && (k = /* @__PURE__ */ f("div", { style: { width: "100%", height: "100%", ...x.style }, children: k }));
1843
- let y = /* @__PURE__ */ f(_n, { ...h, children: k });
1859
+ let y = /* @__PURE__ */ f(jn, { ...h, children: k });
1844
1860
  if (x && !F) {
1845
1861
  const p = x.feather ? wt : 0;
1846
1862
  y = /* @__PURE__ */ I(
@@ -1873,9 +1889,9 @@ function Qn({ node: t, store: e }) {
1873
1889
  }
1874
1890
  );
1875
1891
  }
1876
- return o.motionStyle && (y = /* @__PURE__ */ f(U.div, { "data-lumencast-bind-animate": t.id ?? "", style: o.motionStyle, children: y })), t.keyframes ? /* @__PURE__ */ f(On, { keyframes: t.keyframes, store: e, nodeId: t.id, children: y }) : y;
1892
+ return o.motionStyle && (y = /* @__PURE__ */ f(U.div, { "data-lumencast-bind-animate": t.id ?? "", style: o.motionStyle, children: y })), t.keyframes ? /* @__PURE__ */ f(Pn, { keyframes: t.keyframes, store: e, nodeId: t.id, children: y }) : y;
1877
1893
  }
1878
- function tr(t) {
1894
+ function er(t) {
1879
1895
  if (typeof t != "object" || t === null) return;
1880
1896
  const e = t, n = {};
1881
1897
  return (e.x === "fixed" || e.x === "hug" || e.x === "fill") && (n.x = e.x), (e.y === "fixed" || e.y === "hug" || e.y === "fill") && (n.y = e.y), n.x !== void 0 || n.y !== void 0 ? n : void 0;
@@ -1883,7 +1899,7 @@ function tr(t) {
1883
1899
  function C(t) {
1884
1900
  return typeof t == "number" && Number.isFinite(t) ? t : void 0;
1885
1901
  }
1886
- function er(t) {
1902
+ function nr(t) {
1887
1903
  let e = C(t.x), n = C(t.y);
1888
1904
  if (e === void 0 && n === void 0) {
1889
1905
  const i = t.position;
@@ -1892,7 +1908,7 @@ function er(t) {
1892
1908
  if (!(e === void 0 || n === void 0))
1893
1909
  return { x: e, y: n };
1894
1910
  }
1895
- function Xt(t) {
1911
+ function Ut(t) {
1896
1912
  let e = C(t.width), n = C(t.height);
1897
1913
  if (e === void 0 && n === void 0) {
1898
1914
  const i = t.size;
@@ -1901,26 +1917,26 @@ function Xt(t) {
1901
1917
  if (!(e === void 0 && n === void 0))
1902
1918
  return { w: e, h: n };
1903
1919
  }
1904
- function nr(t) {
1920
+ function rr(t) {
1905
1921
  if (t.kind === "frame") return !1;
1906
1922
  const e = t.props ?? {}, n = t.bindings ?? {}, i = e.position, r = C(e.x) !== void 0 || "x" in n || (i ? C(i.x) !== void 0 : !1), a = C(e.y) !== void 0 || "y" in n || (i ? C(i.y) !== void 0 : !1);
1907
1923
  return r && a;
1908
1924
  }
1909
- function rr({ node: t, store: e }) {
1925
+ function ir({ node: t, store: e }) {
1910
1926
  xt();
1911
- const n = At();
1912
- Zt(t);
1927
+ const n = Ft();
1928
+ Jt(t);
1913
1929
  const i = t.bindings?.items, r = i === void 0 ? [] : e.signal(G(n, i)).value ?? [];
1914
1930
  if (!Array.isArray(r)) return null;
1915
1931
  const a = t.children?.[0];
1916
1932
  if (!a) return null;
1917
1933
  const o = typeof t.stagger_ms == "number" ? t.stagger_ms : 0;
1918
1934
  return /* @__PURE__ */ f(Q, { children: r.map((s, l) => {
1919
- const c = Cn(l, o), u = /* @__PURE__ */ f(An, { prefix: `${i ?? ""}.${l}`, children: /* @__PURE__ */ f(pe, { node: a, store: e }) }, l);
1920
- return c <= 0 ? u : /* @__PURE__ */ f(Ft.Provider, { value: c, children: u }, l);
1935
+ const c = On(l, o), u = /* @__PURE__ */ f(Fn, { prefix: `${i ?? ""}.${l}`, children: /* @__PURE__ */ f(pe, { node: a, store: e }) }, l);
1936
+ return c <= 0 ? u : /* @__PURE__ */ f(Rt.Provider, { value: c, children: u }, l);
1921
1937
  }) });
1922
1938
  }
1923
- function ir(t, e, n) {
1939
+ function or(t, e, n) {
1924
1940
  const i = { ...t.props ?? {} };
1925
1941
  if (t.bindings)
1926
1942
  for (const [r, a] of Object.entries(t.bindings)) {
@@ -1929,7 +1945,7 @@ function ir(t, e, n) {
1929
1945
  }
1930
1946
  return i;
1931
1947
  }
1932
- function or(t, e, n) {
1948
+ function sr(t, e, n) {
1933
1949
  if (!t.bindings) return [];
1934
1950
  const i = [];
1935
1951
  for (const r of Object.values(t.bindings))
@@ -1937,10 +1953,10 @@ function or(t, e, n) {
1937
1953
  return i;
1938
1954
  }
1939
1955
  export {
1940
- pr as A,
1941
- mr as S,
1956
+ hr as A,
1957
+ yr as S,
1942
1958
  pe as T,
1943
- gr as b,
1944
- hr as r
1959
+ mr as b,
1960
+ gr as r
1945
1961
  };
1946
- //# sourceMappingURL=tree-BMxx5170.js.map
1962
+ //# sourceMappingURL=tree-CgU_sUwI.js.map