ryugi-artifacts 1.64.0 → 1.65.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.
@@ -7531,7 +7531,7 @@ var hf = {
7531
7531
  right: 24,
7532
7532
  bottom: 24,
7533
7533
  left: 24
7534
- }, gf = .01, _f = 420, vf = 1.1, yf = l(.2, 0, 0, 1), bf = () => typeof matchMedia == "function" && matchMedia("(prefers-reduced-motion: reduce)").matches, xf = `[data-chrome]${[
7534
+ }, gf = .01, _f = 20, vf = 420, yf = 1.1, bf = l(.2, 0, 0, 1), xf = () => typeof matchMedia == "function" && matchMedia("(prefers-reduced-motion: reduce)").matches, Sf = `[data-chrome]${[
7535
7535
  "board-label",
7536
7536
  "group-label",
7537
7537
  "video-controls",
@@ -7539,7 +7539,7 @@ var hf = {
7539
7539
  "reject",
7540
7540
  "parameters"
7541
7541
  ].map((e) => `:not([data-chrome="${e}"])`).join("")}`;
7542
- function Sf(e, t) {
7542
+ function Cf(e, t) {
7543
7543
  let n = t.k / e.k;
7544
7544
  return {
7545
7545
  x: t.x - e.x * n,
@@ -7547,18 +7547,18 @@ function Sf(e, t) {
7547
7547
  scale: n
7548
7548
  };
7549
7549
  }
7550
- function Cf(e, t, n) {
7551
- let { x: r, y: i, scale: a } = Sf(e, t);
7552
- return Math.max(Math.abs(r), Math.abs(i), Math.abs(n.width * (a - 1) + r), Math.abs(n.height * (a - 1) + i)) > 160 || a > vf || a < 1 / vf;
7550
+ function wf(e, t, n) {
7551
+ let { x: r, y: i, scale: a } = Cf(e, t);
7552
+ return Math.max(Math.abs(r), Math.abs(i), Math.abs(n.width * (a - 1) + r), Math.abs(n.height * (a - 1) + i)) > 160 || a > yf || a < 1 / yf;
7553
7553
  }
7554
- function wf(e, t, n, r) {
7554
+ function Tf(e, t, n, r) {
7555
7555
  for (let i = e; i && i !== t; i = i.parentElement) {
7556
7556
  let { overflowX: e, overflowY: t } = getComputedStyle(i);
7557
7557
  if (r && /auto|scroll/.test(t) && i.scrollHeight > i.clientHeight || n && /auto|scroll/.test(e) && i.scrollWidth > i.clientWidth) return !0;
7558
7558
  }
7559
7559
  return !1;
7560
7560
  }
7561
- function Tf(e) {
7561
+ function Ef(e) {
7562
7562
  let t = Y(null), n = Y(null), [i, a] = X({
7563
7563
  x: 0,
7564
7564
  y: 0,
@@ -7569,7 +7569,7 @@ function Tf(e) {
7569
7569
  }), T = K(() => {
7570
7570
  let { x: e, y: t, k: r } = g.current, i = n.current;
7571
7571
  i && (i.style.transform = `translate(${e}px, ${t}px) scale(${r})`, i.style.setProperty("--zoom", String(r)));
7572
- let a = Sf(S.current, g.current), o = a.x === 0 && a.y === 0 && a.scale === 1 ? "" : `translate(${a.x}px, ${a.y}px) scale(${a.scale})`;
7572
+ let a = Cf(S.current, g.current), o = a.x === 0 && a.y === 0 && a.scale === 1 ? "" : `translate(${a.x}px, ${a.y}px) scale(${a.scale})`;
7573
7573
  for (let e of C.current) e.style.transform = o;
7574
7574
  }, []), E = K((e) => {
7575
7575
  n.current = e, T();
@@ -7589,7 +7589,7 @@ function Tf(e) {
7589
7589
  x.current = void 0, O(""), b(!1), a(g.current);
7590
7590
  }, 150);
7591
7591
  }, [O]), A = K((e) => {
7592
- g.current = e, T(), Cf(S.current, e, w.current) && a(e);
7592
+ g.current = e, T(), wf(S.current, e, w.current) && a(e);
7593
7593
  }, [T]), j = K((e) => {
7594
7594
  g.current = typeof e == "function" ? e(g.current) : e, k(), !v.current && (v.current = !0, _.current = requestAnimationFrame(() => {
7595
7595
  v.current = !1, _.current = null, A(g.current);
@@ -7624,14 +7624,17 @@ function Tf(e) {
7624
7624
  x: n.x + e,
7625
7625
  y: n.y + t
7626
7626
  })), [j]), oe = K((e) => {
7627
- e.zoom ? j((t) => d(t, Math.exp(-e.deltaY * gf), e.x, e.y)) : ae(-e.deltaX, -e.deltaY);
7627
+ if (e.zoom) {
7628
+ let t = Math.max(-20, Math.min(_f, e.deltaY));
7629
+ j((n) => d(n, Math.exp(-t * gf), e.x, e.y));
7630
+ } else ae(-e.deltaX, -e.deltaY);
7628
7631
  }, [ae, j]);
7629
7632
  q(() => {
7630
7633
  let e = t.current;
7631
7634
  if (!e) return;
7632
7635
  let n = (t) => {
7633
7636
  let n = t.target, r = t.ctrlKey || t.metaKey;
7634
- if (n?.closest?.(xf) || !r && wf(n, e, t.deltaX, t.deltaY)) return;
7637
+ if (n?.closest?.(Sf) || !r && Tf(n, e, t.deltaX, t.deltaY)) return;
7635
7638
  t.preventDefault(), M();
7636
7639
  let i = e.getBoundingClientRect(), a = t.deltaMode === 1 ? 16 : t.deltaMode === 2 ? e.clientHeight : 1;
7637
7640
  oe({
@@ -7706,13 +7709,13 @@ function Tf(e) {
7706
7709
  width: a.clientWidth,
7707
7710
  height: a.clientHeight
7708
7711
  }, n);
7709
- if (M(), !i.animate || bf()) {
7712
+ if (M(), !i.animate || xf()) {
7710
7713
  ee(o);
7711
7714
  return;
7712
7715
  }
7713
7716
  let s = g.current, c = performance.now(), l = () => {
7714
- let e = Math.min(1, (performance.now() - c) / _f);
7715
- e === 1 ? ee(o, !0) : (k(), A(m(s, o, yf(e)))), ne.current = e === 1 ? null : requestAnimationFrame(l);
7717
+ let e = Math.min(1, (performance.now() - c) / vf);
7718
+ e === 1 ? ee(o, !0) : (k(), A(m(s, o, bf(e)))), ne.current = e === 1 ? null : requestAnimationFrame(l);
7716
7719
  };
7717
7720
  ne.current = requestAnimationFrame(l);
7718
7721
  }, [
@@ -7755,7 +7758,7 @@ function Tf(e) {
7755
7758
  };
7756
7759
  }
7757
7760
  // src/viewer/lib/selection.ts
7758
- function Ef({ boards: e, frames: t, targets: n, details: r }) {
7761
+ function Df({ boards: e, frames: t, targets: n, details: r }) {
7759
7762
  let i = /* @__PURE__ */ new Map();
7760
7763
  for (let [n, r] of Object.entries(t)) {
7761
7764
  let t = e[n];
@@ -7797,24 +7800,24 @@ function Ef({ boards: e, frames: t, targets: n, details: r }) {
7797
7800
  nodes: [...i.values()]
7798
7801
  };
7799
7802
  }
7800
- var Df = (e) => e.id.length <= Gt.id && e.board.length <= Gt.board && e.file.length <= Gt.file && e.tag.length <= Gt.tag && e.path.length <= Gt.path && e.name.length <= Gt.name, Of = (e) => new TextEncoder().encode(JSON.stringify(e)).length;
7801
- function kf(e, t = Bt) {
7802
- let n = e.selected.filter((e) => Df(e) && e.text.length <= Gt.text && e.html.length <= Gt.html), r = e.tweaks.filter((e) => Df(e) && e.from.length <= Gt.from && e.value.length <= Gt.value), i = {
7803
+ var Of = (e) => e.id.length <= Gt.id && e.board.length <= Gt.board && e.file.length <= Gt.file && e.tag.length <= Gt.tag && e.path.length <= Gt.path && e.name.length <= Gt.name, kf = (e) => new TextEncoder().encode(JSON.stringify(e)).length;
7804
+ function Af(e, t = Bt) {
7805
+ let n = e.selected.filter((e) => Of(e) && e.text.length <= Gt.text && e.html.length <= Gt.html), r = e.tweaks.filter((e) => Of(e) && e.from.length <= Gt.from && e.value.length <= Gt.value), i = {
7803
7806
  ...e,
7804
7807
  selected: n,
7805
7808
  tweaks: r,
7806
- nodes: e.nodes.filter(Df).slice(0, Ft)
7809
+ nodes: e.nodes.filter(Of).slice(0, Ft)
7807
7810
  };
7808
- for (let e = Of(i); e > t && i.nodes.length; e = Of(i)) i = {
7811
+ for (let e = kf(i); e > t && i.nodes.length; e = kf(i)) i = {
7809
7812
  ...i,
7810
7813
  nodes: i.nodes.slice(0, Math.floor(i.nodes.length * Math.min(.95, t / e)))
7811
7814
  };
7812
7815
  return i;
7813
7816
  }
7814
7817
  // src/viewer/hooks/useSelectionSync.ts
7815
- var Af = crypto.randomUUID();
7816
- function jf({ artifact: e, boards: t, live: n, inspector: r, send: i }) {
7817
- let a = Y(0), { frames: o, selectedTargets: s, details: c, revision: l } = r, u = JSON.stringify(s.map(({ boardId: e, id: t }) => [e, t])), d = J(() => JSON.parse(u), [u]), f = J(() => Ef({
7818
+ var jf = crypto.randomUUID();
7819
+ function Mf({ artifact: e, boards: t, live: n, inspector: r, send: i }) {
7820
+ let a = Y(0), { frames: o, selectedTargets: s, details: c, revision: l } = r, u = JSON.stringify(s.map(({ boardId: e, id: t }) => [e, t])), d = J(() => JSON.parse(u), [u]), f = J(() => Df({
7818
7821
  boards: t ?? {},
7819
7822
  frames: o,
7820
7823
  targets: d.map(([e, t]) => ({
@@ -7832,10 +7835,10 @@ function jf({ artifact: e, boards: t, live: n, inspector: r, send: i }) {
7832
7835
  if (!e || !i || !n) return;
7833
7836
  let t = setTimeout(() => {
7834
7837
  let t = l !== a.current;
7835
- a.current = l, i(kf({
7838
+ a.current = l, i(Af({
7836
7839
  type: "selection",
7837
7840
  artifact: e,
7838
- tab: Af,
7841
+ tab: jf,
7839
7842
  human: t,
7840
7843
  ...f
7841
7844
  }));
@@ -7850,7 +7853,7 @@ function jf({ artifact: e, boards: t, live: n, inspector: r, send: i }) {
7850
7853
  ]);
7851
7854
  }
7852
7855
  // src/viewer/hooks/useVerdicts.ts
7853
- function Mf({ canvas: e, page: t, threads: n, stale: r, versions: i, comment: a }) {
7856
+ function Nf({ canvas: e, page: t, threads: n, stale: r, versions: i, comment: a }) {
7854
7857
  let [o, s] = X(null), c = J(() => e?.groups ?? {}, [e]), l = J(() => e?.boards ?? {}, [e]), u = J(() => Object.fromEntries(j(c, l, t).map(([e]) => [e, ee(n, e, r)])), [
7855
7858
  c,
7856
7859
  l,
@@ -7912,7 +7915,7 @@ function Mf({ canvas: e, page: t, threads: n, stale: r, versions: i, comment: a
7912
7915
  };
7913
7916
  }
7914
7917
  // src/viewer/inspector/InspectionOutline.tsx
7915
- function Nf({ board: e, rect: t, view: n, name: r, nodeId: i, selected: a }) {
7918
+ function Pf({ board: e, rect: t, view: n, name: r, nodeId: i, selected: a }) {
7916
7919
  return t.width <= 0 || t.height <= 0 ? null : /* @__PURE__ */ Q("div", {
7917
7920
  "aria-hidden": "true",
7918
7921
  "data-outline": "",
@@ -7950,7 +7953,7 @@ function Nf({ board: e, rect: t, view: n, name: r, nodeId: i, selected: a }) {
7950
7953
  });
7951
7954
  }
7952
7955
  // src/viewer/inspector/Layers.tsx
7953
- var Pf = {
7956
+ var Ff = {
7954
7957
  Frame: gr,
7955
7958
  Column: lr,
7956
7959
  Row: Nr,
@@ -7959,21 +7962,21 @@ var Pf = {
7959
7962
  Text: Ir,
7960
7963
  Image: yr,
7961
7964
  Button: Dr
7962
- }, Ff = (e, t, n) => `${encodeURIComponent(e)}:${encodeURIComponent(t)}:${n}`;
7963
- function If({ boards: e, frames: t, selection: n, targets: r, playing: i, select: a, hoverNode: o }) {
7964
- let [s, c] = X([]), l = Y(null), u = Y(null), d = Y(!1), f = n && t[n.boardId] ? Ff(n.boardId, t[n.boardId].session, n.node.id) : null, p = r ? r.flatMap((e) => t[e.boardId] ? [Ff(e.boardId, t[e.boardId].session, e.id)] : []) : f ? [f] : [], m = p.join("|"), { treeData: h, byKey: g } = J(() => {
7965
+ }, If = (e, t, n) => `${encodeURIComponent(e)}:${encodeURIComponent(t)}:${n}`;
7966
+ function Lf({ boards: e, frames: t, selection: n, targets: r, playing: i, select: a, hoverNode: o }) {
7967
+ let [s, c] = X([]), l = Y(null), u = Y(null), d = Y(!1), f = n && t[n.boardId] ? If(n.boardId, t[n.boardId].session, n.node.id) : null, p = r ? r.flatMap((e) => t[e.boardId] ? [If(e.boardId, t[e.boardId].session, e.id)] : []) : f ? [f] : [], m = p.join("|"), { treeData: h, byKey: g } = J(() => {
7965
7968
  let n = new Set(m ? m.split("|") : []), r = /* @__PURE__ */ new Map(), a = [];
7966
7969
  for (let [o, s] of e) {
7967
7970
  let e = t[o];
7968
7971
  if (!e?.nodes[0]) continue;
7969
7972
  let c = new Map(e.nodes.map((e) => [e.id, e])), l = i.has(o), u = (t, i) => {
7970
- let a = Ff(o, e.session, t.id);
7973
+ let a = If(o, e.session, t.id);
7971
7974
  r.set(a, {
7972
7975
  boardId: o,
7973
7976
  node: t,
7974
7977
  parentKey: i
7975
7978
  });
7976
- let d = i === null ? "Frame" : t.kind, f = i === null ? s.title || o : t.name, p = Pf[d];
7979
+ let d = i === null ? "Frame" : t.kind, f = i === null ? s.title || o : t.name, p = Ff[d];
7977
7980
  return {
7978
7981
  key: a,
7979
7982
  disabled: l,
@@ -8101,14 +8104,14 @@ function If({ boards: e, frames: t, selection: n, targets: r, playing: i, select
8101
8104
  ] });
8102
8105
  }
8103
8106
  // src/viewer/inspector/Properties.tsx
8104
- var Lf = (e) => Number.isFinite(parseFloat(e)) ? Math.round(parseFloat(e) * 100) / 100 : 0, Rf = (e) => e.map(([e, t]) => ({
8107
+ var Rf = (e) => Number.isFinite(parseFloat(e)) ? Math.round(parseFloat(e) * 100) / 100 : 0, zf = (e) => e.map(([e, t]) => ({
8105
8108
  value: e,
8106
8109
  label: t
8107
- })), zf = (e) => {
8110
+ })), Bf = (e) => {
8108
8111
  let t = e.match(/^rgba?\(([\d.]+),\s*([\d.]+),\s*([\d.]+)(?:,\s*([\d.]+))?\)$/);
8109
8112
  return t ? "#" + t.slice(1).filter((e) => e !== void 0).map((e, t) => Math.round(Number(e) * (t === 3 ? 255 : 1)).toString(16).padStart(2, "0")).join("") : e;
8110
8113
  };
8111
- function Bf({ label: e, children: t, controlId: n }) {
8114
+ function Vf({ label: e, children: t, controlId: n }) {
8112
8115
  return /* @__PURE__ */ Q("div", {
8113
8116
  ...W($.field),
8114
8117
  children: [n ? /* @__PURE__ */ Z("label", {
@@ -8124,7 +8127,7 @@ function Bf({ label: e, children: t, controlId: n }) {
8124
8127
  })]
8125
8128
  });
8126
8129
  }
8127
- function Vf({ label: e, property: t, node: n, change: r, unit: i = "px", max: a, min: o = 0, step: s = 1, sizing: c }) {
8130
+ function Hf({ label: e, property: t, node: n, change: r, unit: i = "px", max: a, min: o = 0, step: s = 1, sizing: c }) {
8128
8131
  let l = _n(), u = /* @__PURE__ */ Z(kn, {
8129
8132
  controls: !1,
8130
8133
  id: l,
@@ -8134,12 +8137,12 @@ function Vf({ label: e, property: t, node: n, change: r, unit: i = "px", max: a,
8134
8137
  step: s,
8135
8138
  style: { width: "100%" },
8136
8139
  suffix: i || void 0,
8137
- value: Lf(n.css[t]),
8140
+ value: Rf(n.css[t]),
8138
8141
  onChange: (e) => {
8139
8142
  e !== null && r(t, String(e) + i);
8140
8143
  }
8141
8144
  });
8142
- return /* @__PURE__ */ Z(Bf, {
8145
+ return /* @__PURE__ */ Z(Vf, {
8143
8146
  controlId: l,
8144
8147
  label: e,
8145
8148
  children: c ? /* @__PURE__ */ Q("div", {
@@ -8154,14 +8157,14 @@ function Vf({ label: e, property: t, node: n, change: r, unit: i = "px", max: a,
8154
8157
  }) : u
8155
8158
  });
8156
8159
  }
8157
- function Hf({ label: e, property: t, values: n, node: r, change: i }) {
8160
+ function Uf({ label: e, property: t, values: n, node: r, change: i }) {
8158
8161
  let a = _n(), o = r.css[t], s = n.some(([e]) => e === o) ? n : [...n, [o, o]];
8159
- return /* @__PURE__ */ Z(Bf, {
8162
+ return /* @__PURE__ */ Z(Vf, {
8160
8163
  controlId: a,
8161
8164
  label: e,
8162
8165
  children: /* @__PURE__ */ Z(Rn, {
8163
8166
  id: a,
8164
- options: Rf(s),
8167
+ options: zf(s),
8165
8168
  size: "small",
8166
8169
  style: { width: "100%" },
8167
8170
  value: o,
@@ -8171,7 +8174,7 @@ function Hf({ label: e, property: t, values: n, node: r, change: i }) {
8171
8174
  })
8172
8175
  });
8173
8176
  }
8174
- function Uf({ node: e, change: t }) {
8177
+ function Wf({ node: e, change: t }) {
8175
8178
  let n = {
8176
8179
  node: e,
8177
8180
  change: t
@@ -8184,7 +8187,7 @@ function Uf({ node: e, change: t }) {
8184
8187
  ...W($.sectionTitle),
8185
8188
  children: U("inspector.size")
8186
8189
  }),
8187
- /* @__PURE__ */ Z(Vf, {
8190
+ /* @__PURE__ */ Z(Hf, {
8188
8191
  ...n,
8189
8192
  label: U("inspector.width"),
8190
8193
  property: "width",
@@ -8197,15 +8200,15 @@ function Uf({ node: e, change: t }) {
8197
8200
  id: r,
8198
8201
  size: "small",
8199
8202
  value: e.widthMode,
8200
- options: Rf([
8203
+ options: zf([
8201
8204
  ["fixed", U("inspector.fixed")],
8202
8205
  ["fill", U("inspector.fill")],
8203
8206
  ["hug", U("inspector.hug")]
8204
8207
  ]),
8205
- onChange: (n) => t("width", n === "fill" ? "100%" : n === "hug" ? "max-content" : `${Lf(e.css.width) || e.rect.width}px`)
8208
+ onChange: (n) => t("width", n === "fill" ? "100%" : n === "hug" ? "max-content" : `${Rf(e.css.width) || e.rect.width}px`)
8206
8209
  })] })
8207
8210
  }),
8208
- /* @__PURE__ */ Z(Vf, {
8211
+ /* @__PURE__ */ Z(Hf, {
8209
8212
  ...n,
8210
8213
  label: U("inspector.height"),
8211
8214
  property: "height",
@@ -8218,11 +8221,11 @@ function Uf({ node: e, change: t }) {
8218
8221
  id: i,
8219
8222
  size: "small",
8220
8223
  value: e.heightMode,
8221
- options: Rf([["hug", U("inspector.hug")], ["fixed", U("inspector.fixed")]]),
8222
- onChange: (n) => t("height", n === "hug" ? "auto" : `${Lf(e.css.height) || e.rect.height}px`)
8224
+ options: zf([["hug", U("inspector.hug")], ["fixed", U("inspector.fixed")]]),
8225
+ onChange: (n) => t("height", n === "hug" ? "auto" : `${Rf(e.css.height) || e.rect.height}px`)
8223
8226
  })] })
8224
8227
  }),
8225
- /* @__PURE__ */ Z(Hf, {
8228
+ /* @__PURE__ */ Z(Uf, {
8226
8229
  ...n,
8227
8230
  label: U("inspector.position"),
8228
8231
  property: "position",
@@ -8234,7 +8237,7 @@ function Uf({ node: e, change: t }) {
8234
8237
  ["sticky", U("inspector.sticky")]
8235
8238
  ]
8236
8239
  }),
8237
- /* @__PURE__ */ Z(Vf, {
8240
+ /* @__PURE__ */ Z(Hf, {
8238
8241
  ...n,
8239
8242
  label: U("inspector.grow"),
8240
8243
  max: 100,
@@ -8250,7 +8253,7 @@ function Uf({ node: e, change: t }) {
8250
8253
  ...W($.sectionTitle),
8251
8254
  children: U("inspector.layout")
8252
8255
  }),
8253
- /* @__PURE__ */ Z(Hf, {
8256
+ /* @__PURE__ */ Z(Uf, {
8254
8257
  ...n,
8255
8258
  label: U("inspector.layout"),
8256
8259
  property: "display",
@@ -8263,7 +8266,7 @@ function Uf({ node: e, change: t }) {
8263
8266
  ["none", U("inspector.hidden")]
8264
8267
  ]
8265
8268
  }),
8266
- (e.css.display === "flex" || e.css.display === "inline-flex") && /* @__PURE__ */ Q(yn, { children: [/* @__PURE__ */ Z(Bf, {
8269
+ (e.css.display === "flex" || e.css.display === "inline-flex") && /* @__PURE__ */ Q(yn, { children: [/* @__PURE__ */ Z(Vf, {
8267
8270
  label: U("inspector.direction"),
8268
8271
  children: /* @__PURE__ */ Z(Ln, {
8269
8272
  block: !0,
@@ -8294,14 +8297,14 @@ function Uf({ node: e, change: t }) {
8294
8297
  }],
8295
8298
  onChange: (e) => t("flex-direction", e)
8296
8299
  })
8297
- }), /* @__PURE__ */ Z(Bf, {
8300
+ }), /* @__PURE__ */ Z(Vf, {
8298
8301
  label: U("inspector.align"),
8299
8302
  children: /* @__PURE__ */ Z(Ln, {
8300
8303
  block: !0,
8301
8304
  "aria-label": U("inspector.align"),
8302
8305
  size: "small",
8303
8306
  value: e.css["align-items"],
8304
- options: Rf([
8307
+ options: zf([
8305
8308
  ["flex-start", U("inspector.start")],
8306
8309
  ["center", U("inspector.center")],
8307
8310
  ["stretch", U("inspector.fill")]
@@ -8309,12 +8312,12 @@ function Uf({ node: e, change: t }) {
8309
8312
  onChange: (e) => t("align-items", e)
8310
8313
  })
8311
8314
  })] }),
8312
- /* @__PURE__ */ Z(Vf, {
8315
+ /* @__PURE__ */ Z(Hf, {
8313
8316
  ...n,
8314
8317
  label: U("inspector.gap"),
8315
8318
  property: "gap"
8316
8319
  }),
8317
- /* @__PURE__ */ Z(Vf, {
8320
+ /* @__PURE__ */ Z(Hf, {
8318
8321
  ...n,
8319
8322
  label: U("inspector.padding"),
8320
8323
  property: "padding"
@@ -8328,18 +8331,18 @@ function Uf({ node: e, change: t }) {
8328
8331
  ...W($.sectionTitle),
8329
8332
  children: U("inspector.appearance")
8330
8333
  }),
8331
- /* @__PURE__ */ Z(Bf, {
8334
+ /* @__PURE__ */ Z(Vf, {
8332
8335
  label: U("inspector.fill"),
8333
8336
  children: /* @__PURE__ */ Z(Cn, {
8334
8337
  alpha: !0,
8335
8338
  recent: !1,
8336
8339
  size: "small",
8337
8340
  trigger: "field",
8338
- value: zf(e.css["background-color"]),
8341
+ value: Bf(e.css["background-color"]),
8339
8342
  onChange: (e) => t("background-color", e)
8340
8343
  })
8341
8344
  }),
8342
- /* @__PURE__ */ Z(Vf, {
8345
+ /* @__PURE__ */ Z(Hf, {
8343
8346
  ...n,
8344
8347
  label: U("inspector.opacity"),
8345
8348
  max: 1,
@@ -8347,12 +8350,12 @@ function Uf({ node: e, change: t }) {
8347
8350
  step: .1,
8348
8351
  unit: ""
8349
8352
  }),
8350
- /* @__PURE__ */ Z(Vf, {
8353
+ /* @__PURE__ */ Z(Hf, {
8351
8354
  ...n,
8352
8355
  label: U("inspector.radius"),
8353
8356
  property: "border-radius"
8354
8357
  }),
8355
- /* @__PURE__ */ Z(Hf, {
8358
+ /* @__PURE__ */ Z(Uf, {
8356
8359
  ...n,
8357
8360
  label: U("inspector.border"),
8358
8361
  property: "border-style",
@@ -8397,26 +8400,26 @@ function Uf({ node: e, change: t }) {
8397
8400
  items: [{
8398
8401
  key: "typography",
8399
8402
  title: U("inspector.typography"),
8400
- children: /* @__PURE__ */ Q(yn, { children: [/* @__PURE__ */ Z(Vf, {
8403
+ children: /* @__PURE__ */ Q(yn, { children: [/* @__PURE__ */ Z(Hf, {
8401
8404
  ...n,
8402
8405
  label: U("inspector.fontSize"),
8403
8406
  min: 1,
8404
8407
  property: "font-size"
8405
- }), /* @__PURE__ */ Z(Bf, {
8408
+ }), /* @__PURE__ */ Z(Vf, {
8406
8409
  label: U("inspector.color"),
8407
8410
  children: /* @__PURE__ */ Z(Cn, {
8408
8411
  alpha: !0,
8409
8412
  recent: !1,
8410
8413
  size: "small",
8411
8414
  trigger: "field",
8412
- value: zf(e.css.color),
8415
+ value: Bf(e.css.color),
8413
8416
  onChange: (e) => t("color", e)
8414
8417
  })
8415
8418
  })] })
8416
8419
  }, {
8417
8420
  key: "effects",
8418
8421
  title: U("inspector.effects"),
8419
- children: /* @__PURE__ */ Z(Bf, {
8422
+ children: /* @__PURE__ */ Z(Vf, {
8420
8423
  label: U("inspector.shadow"),
8421
8424
  children: /* @__PURE__ */ Z(On, {
8422
8425
  "aria-label": U("inspector.shadow"),
@@ -8441,11 +8444,11 @@ function Uf({ node: e, change: t }) {
8441
8444
  ] });
8442
8445
  }
8443
8446
  // src/viewer/inspector/InspectorPanel.tsx
8444
- var Wf = [
8447
+ var Gf = [
8445
8448
  "Properties",
8446
8449
  "Code",
8447
8450
  "Tweaks"
8448
- ], Gf = hn(function({ boards: e, frames: t, selection: n, targets: r, playing: i, select: a, hoverNode: o, change: s, reset: c, enabled: l, onClose: u, embedded: d }) {
8451
+ ], Kf = hn(function({ boards: e, frames: t, selection: n, targets: r, playing: i, select: a, hoverNode: o, change: s, reset: c, enabled: l, onClose: u, embedded: d }) {
8449
8452
  let [f, p] = X("Properties"), [m, h] = X(""), g = n?.node, _ = Object.entries(t).flatMap(([e, t]) => t.tweaks.map((t) => ({
8450
8453
  ...t,
8451
8454
  boardId: e
@@ -8468,7 +8471,7 @@ var Wf = [
8468
8471
  value: f,
8469
8472
  variant: "rounded",
8470
8473
  onValueChange: (e) => {
8471
- Wf.includes(e) && p(e);
8474
+ Gf.includes(e) && p(e);
8472
8475
  },
8473
8476
  children: [
8474
8477
  /* @__PURE__ */ Q("header", {
@@ -8478,7 +8481,7 @@ var Wf = [
8478
8481
  "aria-label": U("inspector.views"),
8479
8482
  className: W($.tabs).className,
8480
8483
  style: { alignSelf: "center" },
8481
- children: [/* @__PURE__ */ Z(Vn, {}), Wf.map((e) => /* @__PURE__ */ Q(Gn, {
8484
+ children: [/* @__PURE__ */ Z(Vn, {}), Gf.map((e) => /* @__PURE__ */ Q(Gn, {
8482
8485
  style: { position: "relative" },
8483
8486
  value: e,
8484
8487
  children: [U(`inspector.tab.${e}`), e === "Tweaks" && _.length > 0 && /* @__PURE__ */ Z(ir, {
@@ -8496,7 +8499,7 @@ var Wf = [
8496
8499
  onClick: u
8497
8500
  })]
8498
8501
  }),
8499
- /* @__PURE__ */ Z(If, {
8502
+ /* @__PURE__ */ Z(Lf, {
8500
8503
  boards: e,
8501
8504
  frames: t,
8502
8505
  hoverNode: o,
@@ -8550,7 +8553,7 @@ var Wf = [
8550
8553
  /* @__PURE__ */ Z(Un, {
8551
8554
  value: "Properties",
8552
8555
  ...W($.panelBodyPanel),
8553
- children: g && l ? /* @__PURE__ */ Z(Uf, {
8556
+ children: g && l ? /* @__PURE__ */ Z(Wf, {
8554
8557
  change: s,
8555
8558
  node: g
8556
8559
  }, `${n.boardId}:${t[n.boardId]?.session}:${g.id}`) : /* @__PURE__ */ Z("p", {
@@ -8693,7 +8696,7 @@ var Wf = [
8693
8696
  });
8694
8697
  });
8695
8698
  // src/viewer/split/useSplitBoard.ts
8696
- function Kf(e, t, n) {
8699
+ function qf(e, t, n) {
8697
8700
  if (n.board) {
8698
8701
  let t = e.boards[n.board];
8699
8702
  return t ? {
@@ -8715,7 +8718,7 @@ function Kf(e, t, n) {
8715
8718
  let r = e.pages[0]?.id;
8716
8719
  return r && t?.pages[r]?.bounds || null;
8717
8720
  }
8718
- function qf({ canvas: e, layout: t, fit: n, threads: r, stale: i }) {
8721
+ function Jf({ canvas: e, layout: t, fit: n, threads: r, stale: i }) {
8719
8722
  let a = Y({
8720
8723
  canvas: e,
8721
8724
  layout: t,
@@ -8733,7 +8736,7 @@ function qf({ canvas: e, layout: t, fit: n, threads: r, stale: i }) {
8733
8736
  o.current = null;
8734
8737
  let t = 0, n = requestAnimationFrame(() => {
8735
8738
  t = requestAnimationFrame(() => {
8736
- let { canvas: t, layout: n, fit: r } = a.current, i = t && Kf(t, n, e);
8739
+ let { canvas: t, layout: n, fit: r } = a.current, i = t && qf(t, n, e);
8737
8740
  i && r(i);
8738
8741
  });
8739
8742
  });
@@ -8774,15 +8777,15 @@ function qf({ canvas: e, layout: t, fit: n, threads: r, stale: i }) {
8774
8777
  }, []);
8775
8778
  }
8776
8779
  // ../../node_modules/.pnpm/@base-ui+react@1.9.0_@types+react@19.3.0_date-fns@4.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/@base-ui/react/fieldset/root/FieldsetRootContext.mjs
8777
- var Jf = /*#__PURE__*/ G.createContext(void 0);
8778
- process.env.NODE_ENV !== "production" && (Jf.displayName = "FieldsetRootContext");
8779
- function Yf(e = !1) {
8780
- let t = G.useContext(Jf);
8780
+ var Yf = /*#__PURE__*/ G.createContext(void 0);
8781
+ process.env.NODE_ENV !== "production" && (Yf.displayName = "FieldsetRootContext");
8782
+ function Xf(e = !1) {
8783
+ let t = G.useContext(Yf);
8781
8784
  if (!t && !e) throw Error(process.env.NODE_ENV === "production" ? H(86) : "Base UI: FieldsetRootContext is missing. Fieldset parts must be placed within <Fieldset.Root>.");
8782
8785
  return t;
8783
8786
  }
8784
8787
  // ../../node_modules/.pnpm/@base-ui+react@1.9.0_@types+react@19.3.0_date-fns@4.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/@base-ui/react/internals/labelable-provider/LabelableProvider.mjs
8785
- var Xf = function(e) {
8788
+ var Zf = function(e) {
8786
8789
  let t = Je(), [n, r] = G.useState(t), [i, a] = G.useState(), [o, s] = G.useState([]), c = n === void 0 ? t : n, l = tt(() => /* @__PURE__ */ new Map()), { messageIds: u } = ze(), d = me((e, t) => {
8787
8790
  let n = l.current;
8788
8791
  t === void 0 ? n.delete(e) : n.set(e, t), r((e) => {
@@ -8826,17 +8829,17 @@ var Xf = function(e) {
8826
8829
  children: e.children
8827
8830
  });
8828
8831
  };
8829
- process.env.NODE_ENV !== "production" && (Xf.displayName = "LabelableProvider");
8832
+ process.env.NODE_ENV !== "production" && (Zf.displayName = "LabelableProvider");
8830
8833
  // ../../node_modules/.pnpm/@base-ui+react@1.9.0_@types+react@19.3.0_date-fns@4.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/@base-ui/react/utils/useRegisteredLabelId.mjs
8831
- function Zf(e, t) {
8834
+ function Qf(e, t) {
8832
8835
  let n = Je(e);
8833
8836
  return _e(() => (t(n), () => {
8834
8837
  t((e) => e === n ? void 0 : e);
8835
8838
  }), [n, t]), n;
8836
8839
  }
8837
8840
  // ../../node_modules/.pnpm/@base-ui+react@1.9.0_@types+react@19.3.0_date-fns@4.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/@base-ui/react/internals/labelable-provider/useLabel.mjs
8838
- function Qf(e = {}) {
8839
- let { id: t, fallbackControlId: n, native: r = !1, setLabelId: i, focusControl: a } = e, { controlId: o, setLabelId: s } = ze(), c = Zf(t, me((e) => {
8841
+ function $f(e = {}) {
8842
+ let { id: t, fallbackControlId: n, native: r = !1, setLabelId: i, focusControl: a } = e, { controlId: o, setLabelId: s } = ze(), c = Qf(t, me((e) => {
8840
8843
  s(e), i?.(e);
8841
8844
  })), l = o ?? n;
8842
8845
  function u(e) {
@@ -8845,8 +8848,8 @@ function Qf(e = {}) {
8845
8848
  return;
8846
8849
  }
8847
8850
  if (!l) return;
8848
- let t = $f(e.currentTarget, l);
8849
- We(t) && ep(t);
8851
+ let t = ep(e.currentTarget, l);
8852
+ We(t) && tp(t);
8850
8853
  }
8851
8854
  function d(e) {
8852
8855
  let t = ae(e.nativeEvent);
@@ -8864,7 +8867,7 @@ function Qf(e = {}) {
8864
8867
  }
8865
8868
  };
8866
8869
  }
8867
- function $f(e, t) {
8870
+ function ep(e, t) {
8868
8871
  let n = e.getRootNode();
8869
8872
  for (; pe(n);) {
8870
8873
  let e = n.getElementById(t);
@@ -8873,11 +8876,11 @@ function $f(e, t) {
8873
8876
  }
8874
8877
  return E(e).getElementById(t);
8875
8878
  }
8876
- function ep(e) {
8879
+ function tp(e) {
8877
8880
  e.focus({ focusVisible: !0 });
8878
8881
  }
8879
8882
  // ../../node_modules/.pnpm/@base-ui+react@1.9.0_@types+react@19.3.0_date-fns@4.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/@base-ui/react/field/utils/getCombinedFieldValidityData.mjs
8880
- function tp(e, t) {
8883
+ function np(e, t) {
8881
8884
  return {
8882
8885
  ...e,
8883
8886
  state: {
@@ -8887,33 +8890,33 @@ function tp(e, t) {
8887
8890
  };
8888
8891
  }
8889
8892
  // ../../node_modules/.pnpm/@base-ui+react@1.9.0_@types+react@19.3.0_date-fns@4.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/@base-ui/react/field/root/useFieldValidation.mjs
8890
- var np = Object.keys(ye);
8891
- function rp(e, t) {
8893
+ var rp = Object.keys(ye);
8894
+ function ip(e, t) {
8892
8895
  return e.matches(":disabled") ? !1 : !t || e.form === t || e.form === null && !e.hasAttribute("form");
8893
8896
  }
8894
- function ip(e, t) {
8897
+ function ap(e, t) {
8895
8898
  let n = null;
8896
- for (let r of e.keys()) if (rp(r, t)) {
8899
+ for (let r of e.keys()) if (ip(r, t)) {
8897
8900
  if (!r.validity.valid) return r;
8898
8901
  n ??= r;
8899
8902
  }
8900
8903
  return n;
8901
8904
  }
8902
- function ap(e) {
8905
+ function op(e) {
8903
8906
  return {
8904
8907
  ...ye,
8905
8908
  valid: !e,
8906
8909
  customError: e
8907
8910
  };
8908
8911
  }
8909
- function op(e) {
8912
+ function sp(e) {
8910
8913
  return e && e.validationMessage ? [e.validationMessage] : [];
8911
8914
  }
8912
- function sp(e) {
8915
+ function cp(e) {
8913
8916
  let { elementRef: t, formRef: n } = Ve(), { setValidityData: r, validate: i, validityData: a, validationDebounceTime: o, invalid: s, markedDirtyRef: c, state: l, shouldValidateOnChange: u, validationMode: d, registeredFieldIdRef: f } = e, { controlId: p, getDescriptionProps: m } = ze(), h = N(), g = G.useRef(null), _ = tt(() => /* @__PURE__ */ new Map()).current, v = G.useRef(0), y = G.useRef(null), b = G.useCallback((e, t) => (_.set(e, t), () => {
8914
8917
  _.delete(e);
8915
8918
  }), [_]), x = me(() => {
8916
- let e = ip(_, t.current);
8919
+ let e = ap(_, t.current);
8917
8920
  return e && _.get(e)?.controlRef.current || null;
8918
8921
  }), S = me(async (e, o = !1) => {
8919
8922
  v.current += 1;
@@ -8923,7 +8926,7 @@ function sp(e) {
8923
8926
  if (r == null) return;
8924
8927
  let i = n.current.fields.get(r);
8925
8928
  if (!i) return;
8926
- let a = tp(e, t);
8929
+ let a = np(e, t);
8927
8930
  n.current.fields.set(r, {
8928
8931
  ...i,
8929
8932
  validityData: a
@@ -8956,39 +8959,39 @@ function sp(e) {
8956
8959
  b(i, n), r(i);
8957
8960
  }
8958
8961
  function T(e) {
8959
- let t = np.reduce((t, n) => (t[n] = e.validity[n], t), {}), n = !1;
8960
- for (let e of np) if (e !== "valid") {
8962
+ let t = rp.reduce((t, n) => (t[n] = e.validity[n], t), {}), n = !1;
8963
+ for (let e of rp) if (e !== "valid") {
8961
8964
  if (e === "valueMissing" && t[e]) n = !0;
8962
8965
  else if (t[e]) return t;
8963
8966
  }
8964
8967
  return n && !c.current && (t.valid = !0, t.valueMissing = !1), t;
8965
8968
  }
8966
8969
  function E() {
8967
- return _.size > 0 ? ip(_, t.current) : g.current;
8970
+ return _.size > 0 ? ap(_, t.current) : g.current;
8968
8971
  }
8969
8972
  let D = E();
8970
8973
  function O() {
8971
- return D = E(), D?.willValidate ? T(D) : ap(!1);
8974
+ return D = E(), D?.willValidate ? T(D) : op(!1);
8972
8975
  }
8973
8976
  if (o) {
8974
8977
  if (l.valid !== !1 || !D) return;
8975
8978
  if (!D.validity.valueMissing) {
8976
8979
  C();
8977
- let e = E(), t = e?.validity.customError ? op(e) : [];
8978
- w(ap(t.length > 0), t, !1);
8980
+ let e = E(), t = e?.validity.customError ? sp(e) : [];
8981
+ w(op(t.length > 0), t, !1);
8979
8982
  return;
8980
8983
  }
8981
- for (let e of np) if (e !== "valid" && e !== "valueMissing" && e !== "customError" && D.validity[e]) return;
8984
+ for (let e of rp) if (e !== "valid" && e !== "valueMissing" && e !== "customError" && D.validity[e]) return;
8982
8985
  }
8983
8986
  h.clear(), C();
8984
- let k = O(), A = op(D), j = u();
8987
+ let k = O(), A = sp(D), j = u();
8985
8988
  if (A.length === 0 || j) {
8986
8989
  let t = Array.from(n.current.fields.values()).reduce((e, t) => (t.name && (e[t.name] = t.getValue()), e), {}), r = i(e, t), o;
8987
8990
  if (typeof r == "object" && r && "then" in r) {
8988
8991
  if (k.valid === !1 ? w(k, A) : d !== "onSubmit" && a.state.customError || (k.valid = null, w(k, A)), o = await r, m !== v.current) return;
8989
8992
  k = O();
8990
8993
  } else o = r;
8991
- A = o ? [].concat(o).filter(Boolean) : [], A.length > 0 ? (k.valid = !1, k.customError = !0, D?.willValidate && S(D, A.join("\n"))) : A = op(D);
8994
+ A = o ? [].concat(o).filter(Boolean) : [], A.length > 0 ? (k.valid = !1, k.customError = !0, D?.willValidate && S(D, A.join("\n"))) : A = sp(D);
8992
8995
  }
8993
8996
  w(k, A);
8994
8997
  }), w = me((e, t = !1) => {
@@ -9020,7 +9023,7 @@ function sp(e) {
9020
9023
  ]);
9021
9024
  }
9022
9025
  // ../../node_modules/.pnpm/@base-ui+react@1.9.0_@types+react@19.3.0_date-fns@4.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/@base-ui/react/internals/field-register-control/useFieldControlRegistration.mjs
9023
- function cp(e) {
9026
+ function lp(e) {
9024
9027
  let { change: t, commit: n, invalid: r, markedDirtyRef: i, name: a, setRegisteredFieldName: o, registeredFieldIdRef: s, setValidityData: c, validityData: l } = e, { formRef: u } = Ve(), d = G.useRef(null), f = G.useRef(null), p = G.useRef(!1), m = me(() => {
9025
9028
  let e = f.current;
9026
9029
  if (e) return e.getValue ? e.getValue() : e.value;
@@ -9038,7 +9041,7 @@ function cp(e) {
9038
9041
  getValue: m,
9039
9042
  name: a ?? e.name,
9040
9043
  controlRef: e.controlRef,
9041
- validityData: tp(l, r),
9044
+ validityData: np(l, r),
9042
9045
  validate: g
9043
9046
  });
9044
9047
  }
@@ -9060,7 +9063,7 @@ function cp(e) {
9060
9063
  getValue: m,
9061
9064
  name: a ?? e.name,
9062
9065
  controlRef: e.controlRef,
9063
- validityData: tp(l, r),
9066
+ validityData: np(l, r),
9064
9067
  validate: g
9065
9068
  }));
9066
9069
  }, [
@@ -9087,8 +9090,8 @@ function cp(e) {
9087
9090
  })];
9088
9091
  }
9089
9092
  // ../../node_modules/.pnpm/@base-ui+react@1.9.0_@types+react@19.3.0_date-fns@4.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/@base-ui/react/field/root/FieldRoot.mjs
9090
- var lp = /*#__PURE__*/ G.forwardRef(function(e, t) {
9091
- let { errors: n, validationMode: r, submitCountRef: i } = Ve(), { render: a, className: o, validate: s, validationDebounceTime: c = 0, validationMode: l = r, name: u, disabled: d = !1, invalid: f, dirty: p, touched: m, actionsRef: h, style: g, ..._ } = e, v = Yf(!0)?.disabled, y = me(s || (() => null)), b = v || d, [x, S] = G.useState(!1), [C, w] = G.useState(!1), [T, E] = G.useState(!1), [D, O] = G.useState(!1), k = G.useRef(void 0), A = p ?? C, j = m ?? x, ee = G.useRef(A), te = G.useRef(void 0), [ne, M] = G.useState(), re = u ?? ne;
9093
+ var up = /*#__PURE__*/ G.forwardRef(function(e, t) {
9094
+ let { errors: n, validationMode: r, submitCountRef: i } = Ve(), { render: a, className: o, validate: s, validationDebounceTime: c = 0, validationMode: l = r, name: u, disabled: d = !1, invalid: f, dirty: p, touched: m, actionsRef: h, style: g, ..._ } = e, v = Xf(!0)?.disabled, y = me(s || (() => null)), b = v || d, [x, S] = G.useState(!1), [C, w] = G.useState(!1), [T, E] = G.useState(!1), [D, O] = G.useState(!1), k = G.useRef(void 0), A = p ?? C, j = m ?? x, ee = G.useRef(A), te = G.useRef(void 0), [ne, M] = G.useState(), re = u ?? ne;
9092
9095
  _e(() => {
9093
9096
  p !== void 0 && (ee.current = p);
9094
9097
  }, [p]);
@@ -9116,7 +9119,7 @@ var lp = /*#__PURE__*/ G.forwardRef(function(e, t) {
9116
9119
  F,
9117
9120
  T,
9118
9121
  D
9119
- ]), fe = sp({
9122
+ ]), fe = cp({
9120
9123
  setValidityData: ue,
9121
9124
  validate: y,
9122
9125
  validityData: le,
@@ -9127,7 +9130,7 @@ var lp = /*#__PURE__*/ G.forwardRef(function(e, t) {
9127
9130
  shouldValidateOnChange: oe,
9128
9131
  validationMode: l,
9129
9132
  registeredFieldIdRef: te
9130
- }), [pe, I] = cp({
9133
+ }), [pe, I] = lp({
9131
9134
  change: fe.change,
9132
9135
  commit: fe.commit,
9133
9136
  invalid: P,
@@ -9180,26 +9183,26 @@ var lp = /*#__PURE__*/ G.forwardRef(function(e, t) {
9180
9183
  children: R
9181
9184
  });
9182
9185
  });
9183
- process.env.NODE_ENV !== "production" && (lp.displayName = "FieldRootInner");
9184
- var up = /*#__PURE__*/ G.forwardRef(function(e, t) {
9185
- return /*#__PURE__*/ Z(Xf, { children: /*#__PURE__*/ Z(lp, {
9186
+ process.env.NODE_ENV !== "production" && (up.displayName = "FieldRootInner");
9187
+ var dp = /*#__PURE__*/ G.forwardRef(function(e, t) {
9188
+ return /*#__PURE__*/ Z(Zf, { children: /*#__PURE__*/ Z(up, {
9186
9189
  ...e,
9187
9190
  ref: t
9188
9191
  }) });
9189
9192
  });
9190
- process.env.NODE_ENV !== "production" && (up.displayName = "FieldRoot");
9193
+ process.env.NODE_ENV !== "production" && (dp.displayName = "FieldRoot");
9191
9194
  // ../../node_modules/.pnpm/@base-ui+react@1.9.0_@types+react@19.3.0_date-fns@4.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/@base-ui/react/field/item/FieldItemContext.mjs
9192
- var dp = /*#__PURE__*/ G.createContext({ disabled: !1 });
9193
- process.env.NODE_ENV !== "production" && (dp.displayName = "FieldItemContext");
9194
- function fp() {
9195
- return G.useContext(dp);
9195
+ var fp = /*#__PURE__*/ G.createContext({ disabled: !1 });
9196
+ process.env.NODE_ENV !== "production" && (fp.displayName = "FieldItemContext");
9197
+ function pp() {
9198
+ return G.useContext(fp);
9196
9199
  }
9197
9200
  // ../../node_modules/.pnpm/@base-ui+react@1.9.0_@types+react@19.3.0_date-fns@4.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/@base-ui/react/field/label/FieldLabel.mjs
9198
- var pp = /*#__PURE__*/ G.forwardRef(function(e, t) {
9199
- let { render: n, className: r, style: i, id: a, nativeLabel: o = !0, ...s } = e, c = Ne(!1), l = fp(), { labelId: u } = ze(), d = {
9201
+ var mp = /*#__PURE__*/ G.forwardRef(function(e, t) {
9202
+ let { render: n, className: r, style: i, id: a, nativeLabel: o = !0, ...s } = e, c = Ne(!1), l = pp(), { labelId: u } = ze(), d = {
9200
9203
  ...c.state,
9201
9204
  disabled: c.disabled || l.disabled
9202
- }, f = G.useRef(null), p = Qf({
9205
+ }, f = G.useRef(null), p = $f({
9203
9206
  id: u ?? a,
9204
9207
  native: o
9205
9208
  });
@@ -9222,25 +9225,25 @@ var pp = /*#__PURE__*/ G.forwardRef(function(e, t) {
9222
9225
  stateAttributesMapping: Ce
9223
9226
  });
9224
9227
  });
9225
- process.env.NODE_ENV !== "production" && (pp.displayName = "FieldLabel");
9226
- var mp = (e, t) => ({
9228
+ process.env.NODE_ENV !== "production" && (mp.displayName = "FieldLabel");
9229
+ var hp = (e, t) => ({
9227
9230
  left: t.x + (e.x + e.w) * t.k + 12,
9228
9231
  top: t.y + e.y * t.k
9229
9232
  });
9230
- function hp(e, t, n) {
9231
- let r = mp(e, t);
9233
+ function gp(e, t, n) {
9234
+ let r = hp(e, t);
9232
9235
  return {
9233
9236
  x: Math.min(Math.max(12, r.left), Math.max(12, n.width - 352 - 12)) - r.left,
9234
9237
  y: Math.min(Math.max(60, r.top), Math.max(60, n.height - 604 - 12)) - r.top
9235
9238
  };
9236
9239
  }
9237
- function gp({ control: e, value: t, change: n, id: r, width: i }) {
9238
- return /* @__PURE__ */ Q(up, {
9240
+ function _p({ control: e, value: t, change: n, id: r, width: i }) {
9241
+ return /* @__PURE__ */ Q(dp, {
9239
9242
  style: {
9240
9243
  width: i ?? "100%",
9241
9244
  flexShrink: 0
9242
9245
  },
9243
- children: [/* @__PURE__ */ Z(pp, {
9246
+ children: [/* @__PURE__ */ Z(mp, {
9244
9247
  className: "x10l6tqk x1i1rx1s xjm9jq1 x1717udv xkdpibf xb3r6kr xzpqnlu xuxw1ft xc342km",
9245
9248
  children: e.label
9246
9249
  }), /* @__PURE__ */ Z(kn, {
@@ -9258,7 +9261,7 @@ function gp({ control: e, value: t, change: n, id: r, width: i }) {
9258
9261
  })]
9259
9262
  });
9260
9263
  }
9261
- function _p({ control: e, value: t, change: n }) {
9264
+ function vp({ control: e, value: t, change: n }) {
9262
9265
  let r = _n(), i = e.type === "enum" && e.options.length <= 3, a = i ? "fieldset" : "div", o;
9263
9266
  o = e.type === "color" ? /* @__PURE__ */ Q("div", {
9264
9267
  className: "x78zum5 x6s0dn4 x167g77z xeuugli",
@@ -9313,14 +9316,14 @@ function _p({ control: e, value: t, change: n }) {
9313
9316
  step: e.step,
9314
9317
  value: t,
9315
9318
  onChange: n
9316
- }), /* @__PURE__ */ Z(gp, {
9319
+ }), /* @__PURE__ */ Z(_p, {
9317
9320
  change: n,
9318
9321
  control: e,
9319
9322
  id: `${r}-number`,
9320
9323
  value: t,
9321
9324
  width: 48
9322
9325
  })]
9323
- }) : e.type === "number" ? /* @__PURE__ */ Z(gp, {
9326
+ }) : e.type === "number" ? /* @__PURE__ */ Z(_p, {
9324
9327
  change: n,
9325
9328
  control: e,
9326
9329
  id: r,
@@ -9398,7 +9401,7 @@ function _p({ control: e, value: t, change: n }) {
9398
9401
  })]
9399
9402
  });
9400
9403
  }
9401
- function vp({ boardId: e, title: t, state: n, anchor: r, onChange: i, onReset: a, onClose: o }) {
9404
+ function yp({ boardId: e, title: t, state: n, anchor: r, onChange: i, onReset: a, onClose: o }) {
9402
9405
  let s = Y(null), c = _n(), [l, u] = X(!1), [d, f] = X("schema"), p = U(d === "schema" ? "parameters.schema" : "parameters.currentValues"), m = JSON.stringify(d === "schema" ? n.schema : n.values, null, 2), h = /* @__PURE__ */ new Map();
9403
9406
  for (let e of Object.entries(n.schema?.controls ?? {})) {
9404
9407
  let t = e[1].section || U("parameters.controls");
@@ -9480,7 +9483,7 @@ function vp({ boardId: e, title: t, state: n, anchor: r, onChange: i, onReset: a
9480
9483
  children: [/* @__PURE__ */ Z("h3", {
9481
9484
  className: "x1k6wstc xh88oxj x1bo0w0s xdj266r xwoyzhm",
9482
9485
  children: e
9483
- }), t.map(([e, t]) => /* @__PURE__ */ Z(_p, {
9486
+ }), t.map(([e, t]) => /* @__PURE__ */ Z(vp, {
9484
9487
  change: (t) => i(e, t),
9485
9488
  control: t,
9486
9489
  value: n.values[e]
@@ -9629,7 +9632,7 @@ function vp({ boardId: e, title: t, state: n, anchor: r, onChange: i, onReset: a
9629
9632
  });
9630
9633
  }
9631
9634
  // src/viewer/verdicts/RejectComposer.tsx
9632
- function yp({ group: e, left: t, top: n, onSubmit: r, onCancel: i }) {
9635
+ function bp({ group: e, left: t, top: n, onSubmit: r, onCancel: i }) {
9633
9636
  let { t: a } = mt();
9634
9637
  return /* @__PURE__ */ Q("div", {
9635
9638
  "data-chrome": "reject",
@@ -9670,7 +9673,7 @@ function yp({ group: e, left: t, top: n, onSubmit: r, onCancel: i }) {
9670
9673
  });
9671
9674
  }
9672
9675
  // src/viewer/components/ghost.ts
9673
- var bp = { ghost: {
9676
+ var xp = { ghost: {
9674
9677
  k1xSpc: "xrvj5dj",
9675
9678
  kgQiWS: "x1ku5rj1",
9676
9679
  kmuXW: "x2lah0s",
@@ -9686,8 +9689,8 @@ var bp = { ghost: {
9686
9689
  kIyJzY: "xgdialr",
9687
9690
  k3aq6I: "x19kf12q",
9688
9691
  $$css: !0
9689
- } }, xp = 120, Sp = .5, Cp = 110, wp = .4, Tp = .25;
9690
- function Ep(e, t, n) {
9692
+ } }, Sp = 120, Cp = .5, wp = 110, Tp = .4, Ep = .25;
9693
+ function Dp(e, t, n) {
9691
9694
  if (!e || et()) return {
9692
9695
  done: Promise.resolve(),
9693
9696
  cancel: () => {}
@@ -9701,8 +9704,8 @@ function Ep(e, t, n) {
9701
9704
  cancel: () => r.cancel()
9702
9705
  };
9703
9706
  }
9704
- function Dp({ id: e, board: t, sandbox: n = "allow-scripts", src: r, siblings: i, origin: a, choice: o, onChoose: s, onOpen: c, onClose: l }) {
9705
- let { viewportRef: u, view: d, place: f, handlers: p } = Tf("hand"), m = Y(null), h = Y(null), g = Y(null), _ = Y(null), [v, y] = X(null), b = Y(null), x = Y(d);
9707
+ function Op({ id: e, board: t, sandbox: n = "allow-scripts", src: r, siblings: i, origin: a, choice: o, onChoose: s, onOpen: c, onClose: l }) {
9708
+ let { viewportRef: u, view: d, place: f, handlers: p } = Ef("hand"), m = Y(null), h = Y(null), g = Y(null), _ = Y(null), [v, y] = X(null), b = Y(null), x = Y(d);
9706
9709
  x.current = d;
9707
9710
  let S = Y(!1), C = Y(null), w = Y(!1), T = i.indexOf(e), E = T > 0 ? i[T - 1] : void 0, D = T >= 0 ? i[T + 1] : void 0, O = () => ({
9708
9711
  width: u.current?.clientWidth ?? t.w,
@@ -9777,20 +9780,20 @@ function Dp({ id: e, board: t, sandbox: n = "allow-scripts", src: r, siblings: i
9777
9780
  easing: Te
9778
9781
  };
9779
9782
  await Promise.all([
9780
- t ? Ep(m.current, [{ transform: e }, { transform: t }], {
9783
+ t ? Dp(m.current, [{ transform: e }, { transform: t }], {
9781
9784
  duration: 240,
9782
9785
  easing: Te
9783
- }).done : Ep(m.current, [{ opacity: 1 }, { opacity: 0 }], n).done,
9784
- Ep(h.current, [{ opacity: Number(h.current?.style.opacity || 1) }, { opacity: 0 }], {
9786
+ }).done : Dp(m.current, [{ opacity: 1 }, { opacity: 0 }], n).done,
9787
+ Dp(h.current, [{ opacity: Number(h.current?.style.opacity || 1) }, { opacity: 0 }], {
9785
9788
  duration: 240,
9786
9789
  easing: Te
9787
9790
  }).done,
9788
- ...A().map((e) => Ep(e, [{ opacity: Number(e?.style.opacity || 1) }, { opacity: 0 }], n).done)
9791
+ ...A().map((e) => Dp(e, [{ opacity: Number(e?.style.opacity || 1) }, { opacity: 0 }], n).done)
9789
9792
  ]), l();
9790
9793
  }, te = async (e, t) => {
9791
9794
  if (!t || w.current) return;
9792
9795
  w.current = !0;
9793
- let n = m.current?.style.transform || "none", r = Ep(m.current, [{
9796
+ let n = m.current?.style.transform || "none", r = Dp(m.current, [{
9794
9797
  transform: n,
9795
9798
  opacity: 1
9796
9799
  }, {
@@ -9840,14 +9843,14 @@ function Dp({ id: e, board: t, sandbox: n = "allow-scripts", src: r, siblings: i
9840
9843
  let t = b.current;
9841
9844
  if (!t || t.id !== e.pointerId || (b.current = null, t.mode === "pan" || t.mode === "pending")) return p.onPointerUp(e);
9842
9845
  let n = t.track.velocity(performance.now()), r = e.clientX - t.x, i = e.clientY - t.y;
9843
- if (t.mode === "dismiss") return i > xp && n.y > -.4 || n.y > Sp ? void ee() : j();
9844
- let a = n.x < -.4 ? 1 : n.x > wp ? -1 : 0, o = r < -110 ? 1 : r > Cp ? -1 : 0, s = a === 0 ? o : o === 0 || o === a ? a : 0, c = s === 1 ? D : s === -1 ? E : void 0;
9846
+ if (t.mode === "dismiss") return i > Sp && n.y > -.4 || n.y > Cp ? void ee() : j();
9847
+ let a = n.x < -.4 ? 1 : n.x > Tp ? -1 : 0, o = r < -110 ? 1 : r > wp ? -1 : 0, s = a === 0 ? o : o === 0 || o === a ? a : 0, c = s === 1 ? D : s === -1 ? E : void 0;
9845
9848
  c && s ? te(s, c) : j();
9846
9849
  }, { width: ie, height: ae } = O(), oe, se = 1, N = 1;
9847
9850
  if (v?.axis === "y") {
9848
9851
  let e = Math.max(0, v.dy), t = 1 - Math.min(e / 900, .3);
9849
- oe = `translate(${v.dx * .6 + (1 - t) * ie / 2}px, ${e + (1 - t) * ae / 2}px) scale(${t})`, se = 1 - Math.min(e / 420, .85), N = Math.max(0, 1 - e / xp);
9850
- } else v?.axis === "x" && (oe = `translateX(${v.dx > 0 && !E || v.dx < 0 && !D ? v.dx * Tp : v.dx}px)`);
9852
+ oe = `translate(${v.dx * .6 + (1 - t) * ie / 2}px, ${e + (1 - t) * ae / 2}px) scale(${t})`, se = 1 - Math.min(e / 420, .85), N = Math.max(0, 1 - e / Sp);
9853
+ } else v?.axis === "x" && (oe = `translateX(${v.dx > 0 && !E || v.dx < 0 && !D ? v.dx * Ep : v.dx}px)`);
9851
9854
  return /* @__PURE__ */ Q("div", {
9852
9855
  "data-phone-board": !0,
9853
9856
  className: "xixxii4 x10a8y8t x68pp3s x78zum5 xdt5ytf xo2rkog xqfszdh",
@@ -9866,7 +9869,7 @@ function Dp({ id: e, board: t, sandbox: n = "allow-scripts", src: r, siblings: i
9866
9869
  "aria-label": U("phone.backToCanvas"),
9867
9870
  type: "button",
9868
9871
  onClick: () => void ee(),
9869
- ...W(bp.ghost),
9872
+ ...W(xp.ghost),
9870
9873
  children: /* @__PURE__ */ Z(er, { size: 22 })
9871
9874
  }),
9872
9875
  /* @__PURE__ */ Q("span", {
@@ -9963,7 +9966,7 @@ function Dp({ id: e, board: t, sandbox: n = "allow-scripts", src: r, siblings: i
9963
9966
  disabled: !E,
9964
9967
  type: "button",
9965
9968
  onClick: () => void te(-1, E),
9966
- ...W(bp.ghost),
9969
+ ...W(xp.ghost),
9967
9970
  children: /* @__PURE__ */ Z(er, { size: 20 })
9968
9971
  }),
9969
9972
  /* @__PURE__ */ Z("span", {
@@ -9981,7 +9984,7 @@ function Dp({ id: e, board: t, sandbox: n = "allow-scripts", src: r, siblings: i
9981
9984
  disabled: !D,
9982
9985
  type: "button",
9983
9986
  onClick: () => void te(1, D),
9984
- ...W(bp.ghost),
9987
+ ...W(xp.ghost),
9985
9988
  children: /* @__PURE__ */ Z(tr, { size: 20 })
9986
9989
  })
9987
9990
  ]
@@ -9990,13 +9993,13 @@ function Dp({ id: e, board: t, sandbox: n = "allow-scripts", src: r, siblings: i
9990
9993
  });
9991
9994
  }
9992
9995
  // src/viewer/lib/questions.ts
9993
- var Op = (e) => ({
9996
+ var kp = (e) => ({
9994
9997
  minX: e.x,
9995
9998
  minY: e.y,
9996
9999
  maxX: e.x + e.w,
9997
10000
  maxY: e.y + e.h
9998
10001
  });
9999
- function kp(e, t, n) {
10002
+ function Ap(e, t, n) {
10000
10003
  let r = t.pages[n];
10001
10004
  if (!r) return [];
10002
10005
  let i = /* @__PURE__ */ new Set(), a = [];
@@ -10008,7 +10011,7 @@ function kp(e, t, n) {
10008
10011
  id: t,
10009
10012
  title: o.title ?? t,
10010
10013
  boards: c,
10011
- bounds: Op(s)
10014
+ bounds: kp(s)
10012
10015
  });
10013
10016
  }
10014
10017
  }
@@ -10016,7 +10019,7 @@ function kp(e, t, n) {
10016
10019
  id: t,
10017
10020
  title: r.title ?? t,
10018
10021
  boards: [t],
10019
- bounds: Op(r)
10022
+ bounds: kp(r)
10020
10023
  });
10021
10024
  a.sort((e, t) => e.bounds.minY - t.bounds.minY || e.bounds.minX - t.bounds.minX);
10022
10025
  let o = P(e, t, n), s = /* @__PURE__ */ new Map();
@@ -10031,25 +10034,25 @@ function kp(e, t, n) {
10031
10034
  let c = (e) => o.find((t) => t.id === e)?.rect.y ?? -Infinity;
10032
10035
  return [...s.values()].sort((e, t) => c(t.id) - c(e.id));
10033
10036
  }
10034
- var Ap = (e) => e.flatMap((e) => e.questions);
10035
- function jp(e, t) {
10036
- let n = Ap(e);
10037
+ var jp = (e) => e.flatMap((e) => e.questions);
10038
+ function Mp(e, t) {
10039
+ let n = jp(e);
10037
10040
  if (t) {
10038
10041
  let r = e.find((e) => e.id === t)?.questions[0] ?? n.find((e) => e.id === t) ?? n.find((e) => e.boards.includes(t));
10039
10042
  if (r) return r;
10040
10043
  }
10041
10044
  return n[0] ?? null;
10042
10045
  }
10043
- function Mp(e, t, n) {
10046
+ function Np(e, t, n) {
10044
10047
  let r = e.findIndex((e) => e.id === t);
10045
10048
  return r === -1 ? null : e[r + n] ?? null;
10046
10049
  }
10047
- var Np = .66, Pp = (e, t, n) => e.id === t?.id ? "current" : n[e.id]?.state === "pass" ? "pass" : n[e.id]?.state === "reject" ? "reject" : "open";
10048
- function Fp({ rounds: e, current: t, previous: n, next: r, pages: i, page: a, onPageChange: o, onPick: s, snap: c, onSnap: l, verdicts: u = {}, chose: d = {} }) {
10049
- let { t: f } = mt(), p = Ap(e), m = t ? p.findIndex((e) => e.id === t.id) : -1;
10050
+ var Pp = .66, Fp = (e, t, n) => e.id === t?.id ? "current" : n[e.id]?.state === "pass" ? "pass" : n[e.id]?.state === "reject" ? "reject" : "open";
10051
+ function Ip({ rounds: e, current: t, previous: n, next: r, pages: i, page: a, onPageChange: o, onPick: s, snap: c, onSnap: l, verdicts: u = {}, chose: d = {} }) {
10052
+ let { t: f } = mt(), p = jp(e), m = t ? p.findIndex((e) => e.id === t.id) : -1;
10050
10053
  return /* @__PURE__ */ Z(je, {
10051
10054
  snap: c,
10052
- snaps: [78, Np],
10055
+ snaps: [78, Pp],
10053
10056
  header: /* @__PURE__ */ Q("div", {
10054
10057
  className: "x78zum5 x6s0dn4 x17d4w8g x1xijbu4 xsag5q8",
10055
10058
  children: [
@@ -10058,7 +10061,7 @@ function Fp({ rounds: e, current: t, previous: n, next: r, pages: i, page: a, on
10058
10061
  disabled: !n,
10059
10062
  type: "button",
10060
10063
  onClick: () => n && s(n),
10061
- ...W(bp.ghost),
10064
+ ...W(xp.ghost),
10062
10065
  children: /* @__PURE__ */ Z(er, { size: 20 })
10063
10066
  }),
10064
10067
  /* @__PURE__ */ Q("span", {
@@ -10095,7 +10098,7 @@ function Fp({ rounds: e, current: t, previous: n, next: r, pages: i, page: a, on
10095
10098
  "data-progress": !0,
10096
10099
  className: "x78zum5 x1ed6fcf",
10097
10100
  children: p.map((e) => {
10098
- let n = Pp(e, t, u);
10101
+ let n = Fp(e, t, u);
10099
10102
  return /* @__PURE__ */ Z("span", {
10100
10103
  "data-mark": n,
10101
10104
  ...{
@@ -10125,7 +10128,7 @@ function Fp({ rounds: e, current: t, previous: n, next: r, pages: i, page: a, on
10125
10128
  disabled: !r,
10126
10129
  type: "button",
10127
10130
  onClick: () => r && s(r),
10128
- ...W(bp.ghost),
10131
+ ...W(xp.ghost),
10129
10132
  children: /* @__PURE__ */ Z(tr, { size: 20 })
10130
10133
  })
10131
10134
  ]
@@ -10172,19 +10175,19 @@ function Fp({ rounds: e, current: t, previous: n, next: r, pages: i, page: a, on
10172
10175
  });
10173
10176
  }
10174
10177
  // src/viewer/layouts/PhoneArtboard.tsx
10175
- var Ip = {
10178
+ var Lp = {
10176
10179
  top: 16,
10177
10180
  right: 16,
10178
10181
  bottom: 94,
10179
10182
  left: 16
10180
- }, Lp = 8, Rp = /* @__PURE__ */ new Set(), zp = () => {}, Bp = [];
10181
- function Vp({ id: e, artifact: t, canvas: n, layout: r, warnings: a, pending: o, contentBase: s, boardPort: c, boardPath: l, versions: u, live: d, loaded: f, agent: p, agentSessions: m, comment: h, comments: g, actions: _ }) {
10182
- let { viewportRef: v, worldRef: y, overlayRef: b, view: x, viewNow: S, size: C, gesturing: w, fit: T, handlers: E } = Tf("hand"), [D, O] = X(null), [k, A] = X(78), [j, ee] = X(null), te = Y(null), ne = K((e, t = !1) => e ? (O(e.id), T(e.bounds, Ip, { animate: t }), !0) : !1, [T]), { page: M, changePage: re } = wd({
10183
+ }, Rp = 8, zp = /* @__PURE__ */ new Set(), Bp = () => {}, Vp = [];
10184
+ function Hp({ id: e, artifact: t, canvas: n, layout: r, warnings: a, pending: o, contentBase: s, boardPort: c, boardPath: l, versions: u, live: d, loaded: f, agent: p, agentSessions: m, comment: h, comments: g, actions: _ }) {
10185
+ let { viewportRef: v, worldRef: y, overlayRef: b, view: x, viewNow: S, size: C, gesturing: w, fit: T, handlers: E } = Ef("hand"), [D, O] = X(null), [k, A] = X(78), [j, ee] = X(null), te = Y(null), ne = K((e, t = !1) => e ? (O(e.id), T(e.bounds, Lp, { animate: t }), !0) : !1, [T]), { page: M, changePage: re } = wd({
10183
10186
  canvas: n,
10184
10187
  layout: r,
10185
10188
  fitPage: K((e) => {
10186
10189
  let t = r?.pages[e];
10187
- return !n || !t ? !1 : (ne(jp(kp(n, r, e), n.focus?.target)) || (O(null), t.bounds && T(t.bounds, Ip)), !0);
10190
+ return !n || !t ? !1 : (ne(Mp(Ap(n, r, e), n.focus?.target)) || (O(null), t.bounds && T(t.bounds, Lp)), !0);
10188
10191
  }, [
10189
10192
  n,
10190
10193
  r,
@@ -10192,11 +10195,11 @@ function Vp({ id: e, artifact: t, canvas: n, layout: r, warnings: a, pending: o,
10192
10195
  ne
10193
10196
  ]),
10194
10197
  startAtFocus: !0
10195
- }), ie = J(() => n && r && M ? kp(n, r, M) : [], [
10198
+ }), ie = J(() => n && r && M ? Ap(n, r, M) : [], [
10196
10199
  n,
10197
10200
  r,
10198
10201
  M
10199
- ]), ae = J(() => Ap(ie), [ie]), oe = ae.find((e) => e.id === D) ?? null, se = (e) => {
10202
+ ]), ae = J(() => jp(ie), [ie]), oe = ae.find((e) => e.id === D) ?? null, se = (e) => {
10200
10203
  ne(e, !0), A(78);
10201
10204
  }, N = n?.boards ?? {}, P = J(() => Object.entries(n?.boards ?? {}).filter(([, e]) => e.page === M), [n, M]), ce = Object.entries(n?.groups ?? {}).filter(([, e]) => e.boards.some((e) => N[e]?.page === M)), le = Object.entries(n?.notes ?? {}).filter(([, e]) => e.page === M), ue = J(() => new Set(o), [o]), F = Bd({
10202
10205
  contentBase: s,
@@ -10212,19 +10215,19 @@ function Vp({ id: e, artifact: t, canvas: n, layout: r, warnings: a, pending: o,
10212
10215
  pending: de,
10213
10216
  view: x,
10214
10217
  viewport: C,
10215
- active: Rp,
10218
+ active: zp,
10216
10219
  gesturing: w
10217
- }), pe = Yd(P, x, C), I = J(() => new Set(g?.stale ?? []), [g]), L = Mf({
10220
+ }), pe = Yd(P, x, C), I = J(() => new Set(g?.stale ?? []), [g]), L = Nf({
10218
10221
  canvas: n,
10219
10222
  page: M,
10220
- threads: g?.comments.threads ?? Bp,
10223
+ threads: g?.comments.threads ?? Vp,
10221
10224
  stale: I,
10222
10225
  versions: u
10223
10226
  }), R = Jd({
10224
10227
  canvas: n,
10225
10228
  layout: r,
10226
10229
  page: M,
10227
- threads: g?.comments.threads ?? Bp,
10230
+ threads: g?.comments.threads ?? Vp,
10228
10231
  listening: g?.listening === !0,
10229
10232
  comment: d === !1 ? void 0 : h
10230
10233
  }), me = Object.fromEntries(ae.flatMap((e) => {
@@ -10244,7 +10247,7 @@ function Vp({ id: e, artifact: t, canvas: n, layout: r, warnings: a, pending: o,
10244
10247
  }, _e = (e) => {
10245
10248
  E.onPointerMove(e);
10246
10249
  let t = te.current;
10247
- t && (t.pointer !== e.pointerId || Math.hypot(e.clientX - t.x, e.clientY - t.y) > Lp) && (te.current = null);
10250
+ t && (t.pointer !== e.pointerId || Math.hypot(e.clientX - t.x, e.clientY - t.y) > Rp) && (te.current = null);
10248
10251
  }, ve = (e) => {
10249
10252
  E.onPointerUp(e);
10250
10253
  let t = te.current;
@@ -10288,7 +10291,7 @@ function Vp({ id: e, artifact: t, canvas: n, layout: r, warnings: a, pending: o,
10288
10291
  boards: P,
10289
10292
  contentBase: s,
10290
10293
  culled: pe,
10291
- frameLoaded: zp,
10294
+ frameLoaded: Bp,
10292
10295
  frameRef: fe.frameRef,
10293
10296
  gesturing: w,
10294
10297
  images: fe.images,
@@ -10297,7 +10300,7 @@ function Vp({ id: e, artifact: t, canvas: n, layout: r, warnings: a, pending: o,
10297
10300
  notes: le,
10298
10301
  pending: de,
10299
10302
  phases: fe.phases,
10300
- playing: Rp,
10303
+ playing: zp,
10301
10304
  replays: {},
10302
10305
  versions: u,
10303
10306
  view: x,
@@ -10311,7 +10314,7 @@ function Vp({ id: e, artifact: t, canvas: n, layout: r, warnings: a, pending: o,
10311
10314
  groups: ce,
10312
10315
  overlayRef: b,
10313
10316
  pending: ue,
10314
- playing: Rp,
10317
+ playing: zp,
10315
10318
  verdicts: L,
10316
10319
  versions: u,
10317
10320
  view: x,
@@ -10333,13 +10336,13 @@ function Vp({ id: e, artifact: t, canvas: n, layout: r, warnings: a, pending: o,
10333
10336
  summary: R.current,
10334
10337
  onSubmit: R.submit,
10335
10338
  onWithdraw: R.withdraw
10336
- }), /* @__PURE__ */ Z(Fp, {
10339
+ }), /* @__PURE__ */ Z(Ip, {
10337
10340
  chose: me,
10338
10341
  current: oe,
10339
- next: D ? Mp(ae, D, 1) : null,
10342
+ next: D ? Np(ae, D, 1) : null,
10340
10343
  page: M,
10341
10344
  pages: n?.pages ?? [],
10342
- previous: D ? Mp(ae, D, -1) : null,
10345
+ previous: D ? Np(ae, D, -1) : null,
10343
10346
  rounds: ie,
10344
10347
  snap: k,
10345
10348
  verdicts: L.states,
@@ -10349,7 +10352,7 @@ function Vp({ id: e, artifact: t, canvas: n, layout: r, warnings: a, pending: o,
10349
10352
  })]
10350
10353
  }) : null]
10351
10354
  }),
10352
- j && z ? /* @__PURE__ */ Z(Dp, {
10355
+ j && z ? /* @__PURE__ */ Z(Op, {
10353
10356
  board: z,
10354
10357
  choice: R.boardChoice(j),
10355
10358
  id: j,
@@ -10365,11 +10368,11 @@ function Vp({ id: e, artifact: t, canvas: n, layout: r, warnings: a, pending: o,
10365
10368
  });
10366
10369
  }
10367
10370
  // src/viewer/layouts/ArtboardView.tsx
10368
- function Hp(e) {
10369
- return re(se("(max-width: 640px)")) ? /* @__PURE__ */ Z(Vp, { ...e }) : /* @__PURE__ */ Z(Up, { ...e });
10371
+ function Up(e) {
10372
+ return re(se("(max-width: 640px)")) ? /* @__PURE__ */ Z(Hp, { ...e }) : /* @__PURE__ */ Z(Wp, { ...e });
10370
10373
  }
10371
- function Up({ id: e, artifact: t, canvas: n, layout: r, warnings: a, pending: s, contentBase: c, backlinks: l, boardPort: u, boardPath: d, versions: f, live: p, loaded: m, send: h, agent: g, agentSessions: _, comments: v, comment: y, actions: b }) {
10372
- let [x, S] = X("select"), { viewportRef: C, worldRef: w, overlayRef: T, view: E, viewNow: D, gesturing: O, size: A, fit: ee, zoomBy: ne, zoomTo: M, cursor: re, hand: ie, handlers: ae, panBy: oe, wheelAt: se, panning: N, setSpaceHeld: P, place: ce } = Tf(x), [le, ue] = X(!1), [F] = X(() => new URLSearchParams(location.search).has("debug")), [de, fe] = X("open"), pe = (e) => e && r?.pages[e]?.bounds || null, { page: I, changePage: L } = wd({
10374
+ function Wp({ id: e, artifact: t, canvas: n, layout: r, warnings: a, pending: s, contentBase: c, backlinks: l, boardPort: u, boardPath: d, versions: f, live: p, loaded: m, send: h, agent: g, agentSessions: _, comments: v, comment: y, actions: b }) {
10375
+ let [x, S] = X("select"), { viewportRef: C, worldRef: w, overlayRef: T, view: E, viewNow: D, gesturing: O, size: A, fit: ee, zoomBy: ne, zoomTo: M, cursor: re, hand: ie, handlers: ae, panBy: oe, wheelAt: se, panning: N, setSpaceHeld: P, place: ce } = Ef(x), [le, ue] = X(!1), [F] = X(() => new URLSearchParams(location.search).has("debug")), [de, fe] = X("open"), pe = (e) => e && r?.pages[e]?.bounds || null, { page: I, changePage: L } = wd({
10373
10376
  canvas: n,
10374
10377
  layout: r,
10375
10378
  fitPage: K((e) => {
@@ -10392,7 +10395,7 @@ function Up({ id: e, artifact: t, canvas: n, layout: r, warnings: a, pending: s,
10392
10395
  be.current = t;
10393
10396
  let r = n?.boards[e], i = C.current;
10394
10397
  if (B !== e && !R && r && i) {
10395
- let e = hp(r, D(), {
10398
+ let e = gp(r, D(), {
10396
10399
  width: i.clientWidth,
10397
10400
  height: i.clientHeight
10398
10401
  });
@@ -10420,7 +10423,7 @@ function Up({ id: e, artifact: t, canvas: n, layout: r, warnings: a, pending: s,
10420
10423
  }
10421
10424
  }
10422
10425
  });
10423
- jf({
10426
+ Mf({
10424
10427
  artifact: t,
10425
10428
  boards: n?.boards,
10426
10429
  live: p,
@@ -10433,7 +10436,7 @@ function Up({ id: e, artifact: t, canvas: n, layout: r, warnings: a, pending: s,
10433
10436
  page: I,
10434
10437
  boards: n?.boards ?? {},
10435
10438
  inspector: V
10436
- }), Te = Mf({
10439
+ }), Te = Nf({
10437
10440
  canvas: n,
10438
10441
  page: I,
10439
10442
  threads: H.threads,
@@ -10463,7 +10466,7 @@ function Up({ id: e, artifact: t, canvas: n, layout: r, warnings: a, pending: s,
10463
10466
  x === "comment" && ke("select"), ue(e === "inspector");
10464
10467
  }
10465
10468
  }), je = j(n?.groups ?? {}, n?.boards ?? {}, I).map(([e]) => e), Me = J(() => [...H.stale], [H.stale]);
10466
- qf({
10469
+ Jf({
10467
10470
  canvas: n,
10468
10471
  layout: r,
10469
10472
  fit: (e) => ee(e),
@@ -10502,8 +10505,8 @@ function Up({ id: e, artifact: t, canvas: n, layout: r, warnings: a, pending: s,
10502
10505
  let Be = n?.boards ?? {}, Ve = J(() => Object.entries(n?.boards ?? {}).filter(([, e]) => e.page === I), [n, I]), He = Object.entries(n?.groups ?? {}).filter(([, e]) => e.boards.some((e) => Be[e]?.page === I)), Ue = Object.entries(n?.notes ?? {}).filter(([, e]) => e.page === I), We = J(() => Object.fromEntries(Object.entries(n?.notes ?? {}).flatMap(([e, t]) => n && t.kind === "title" ? [[e, o(n, e)]] : [])), [n]), Ge = R ? Be[R] : void 0, Ke = Object.fromEntries(Object.entries(z.states).flatMap(([e, t]) => {
10503
10506
  let n = Object.keys(t.schema?.controls ?? {}).length, r = Object.entries(t.schema?.controls ?? {}).some(([e, n]) => t.values[e] !== n.default);
10504
10507
  return n || t.error ? [[e, r]] : [];
10505
- })), qe = B ? z.states[B] : void 0, Je = B ? Be[B] : void 0, Ye = (e) => B && qe && Je && (qe.schema || qe.error) ? /* @__PURE__ */ Z(vp, {
10506
- anchor: e ? mp(Je, E) : void 0,
10508
+ })), qe = B ? z.states[B] : void 0, Je = B ? Be[B] : void 0, Ye = (e) => B && qe && Je && (qe.schema || qe.error) ? /* @__PURE__ */ Z(yp, {
10509
+ anchor: e ? hp(Je, E) : void 0,
10507
10510
  boardId: B,
10508
10511
  state: qe,
10509
10512
  title: Je.title ?? B,
@@ -10662,7 +10665,7 @@ function Up({ id: e, artifact: t, canvas: n, layout: r, warnings: a, pending: s,
10662
10665
  Te.rejecting && Oe && /* @__PURE__ */ Z("div", {
10663
10666
  ref: T,
10664
10667
  className: "x10l6tqk xu96u03 x13vifvy xnalus7 xqtp20y xk3oba8",
10665
- children: /* @__PURE__ */ Z(yp, {
10668
+ children: /* @__PURE__ */ Z(bp, {
10666
10669
  group: Te.rejecting,
10667
10670
  left: E.x + Oe.x * E.k,
10668
10671
  top: E.y + Oe.y * E.k + 8,
@@ -10694,12 +10697,12 @@ function Up({ id: e, artifact: t, canvas: n, layout: r, warnings: a, pending: s,
10694
10697
  /* @__PURE__ */ Q("div", {
10695
10698
  ref: T,
10696
10699
  className: "x10l6tqk xu96u03 x13vifvy xnalus7 xqtp20y",
10697
- children: [(Ce || we) && !Ze.marquee && V.hover && Be[V.hover.boardId] && /* @__PURE__ */ Z(Nf, {
10700
+ children: [(Ce || we) && !Ze.marquee && V.hover && Be[V.hover.boardId] && /* @__PURE__ */ Z(Pf, {
10698
10701
  board: Be[V.hover.boardId],
10699
10702
  rect: V.hover.rect,
10700
10703
  view: E,
10701
10704
  nodeId: V.hover.id ? `${V.hover.boardId}#${V.hover.id}` : void 0
10702
- }), !R && V.targets.map((e) => Be[e.boardId] && /* @__PURE__ */ Z(Nf, {
10705
+ }), !R && V.targets.map((e) => Be[e.boardId] && /* @__PURE__ */ Z(Pf, {
10703
10706
  selected: !0,
10704
10707
  board: Be[e.boardId],
10705
10708
  name: e.name,
@@ -10786,7 +10789,7 @@ function Up({ id: e, artifact: t, canvas: n, layout: r, warnings: a, pending: s,
10786
10789
  onOpen: Pe,
10787
10790
  onTab: fe
10788
10791
  }),
10789
- inspector: /* @__PURE__ */ Z(Gf, {
10792
+ inspector: /* @__PURE__ */ Z(Kf, {
10790
10793
  embedded: !0,
10791
10794
  boards: Ve,
10792
10795
  change: V.change,
@@ -10836,7 +10839,7 @@ function Up({ id: e, artifact: t, canvas: n, layout: r, warnings: a, pending: s,
10836
10839
  });
10837
10840
  }
10838
10841
  // src/viewer/hooks/useHtmlData.ts
10839
- function Wp(e, { live: t, revision: n, load: r, send: i }) {
10842
+ function Gp(e, { live: t, revision: n, load: r, send: i }) {
10840
10843
  let [a, o] = X(null);
10841
10844
  return q(() => {
10842
10845
  let t = !1;
@@ -10864,8 +10867,8 @@ function Wp(e, { live: t, revision: n, load: r, send: i }) {
10864
10867
  };
10865
10868
  }
10866
10869
  // src/viewer/layouts/HtmlView.tsx
10867
- function Gp({ id: e, feed: t, actions: n }) {
10868
- let { data: r, send: i } = Wp(e, t);
10870
+ function Kp({ id: e, feed: t, actions: n }) {
10871
+ let { data: r, send: i } = Gp(e, t);
10869
10872
  q(() => {
10870
10873
  document.title = r?.title || e;
10871
10874
  }, [r?.title, e]), Jt("html");
@@ -10905,23 +10908,23 @@ function Gp({ id: e, feed: t, actions: n }) {
10905
10908
  });
10906
10909
  }
10907
10910
  // src/viewer/lib/artifact-list.ts
10908
- function Kp(e, t = Date.now()) {
10911
+ function qp(e, t = Date.now()) {
10909
10912
  let n = new Intl.RelativeTimeFormat(Dt.language, { numeric: "always" }), r = Math.floor(Math.max(0, t - e) / 6e4);
10910
10913
  return r === 0 ? Dt.t("time.justNow") : r < 60 ? n.format(-r, "minute") : r < 1440 ? n.format(-Math.floor(r / 60), "hour") : n.format(-Math.floor(r / 1440), "day");
10911
10914
  }
10912
10915
  // src/viewer/lib/error-text.ts
10913
- function qp(e, t) {
10916
+ function Jp(e, t) {
10914
10917
  return typeof e == "string" && Dt.exists(`errors.${e}`) ? Dt.t(`errors.${e}`) : t;
10915
10918
  }
10916
- var Jp = (e) => typeof e == "object" && !!e && ft.includes(e.kind) && typeof e.max == "number";
10917
- function Yp({ kind: t, max: n }) {
10919
+ var Yp = (e) => typeof e == "object" && !!e && ft.includes(e.kind) && typeof e.max == "number";
10920
+ function Xp({ kind: t, max: n }) {
10918
10921
  return Dt.t(`planLimit.${t}`, { max: t === "storage" ? e(n) : n });
10919
10922
  }
10920
- function Xp(e, t) {
10921
- return e.code === "plan_limit" && Jp(e.limit) ? Yp(e.limit) : qp(e.code, typeof e.error == "string" ? e.error : t);
10923
+ function Zp(e, t) {
10924
+ return e.code === "plan_limit" && Yp(e.limit) ? Xp(e.limit) : Jp(e.code, typeof e.error == "string" ? e.error : t);
10922
10925
  }
10923
10926
  // src/viewer/lib/version.ts
10924
- var Zp = "1.64.0", Qp = {
10927
+ var Qp = "1.65.0", $p = {
10925
10928
  path: (e, t) => `/a/${t}`,
10926
10929
  refId: (e) => e.to,
10927
10930
  frameSrc: (e, t) => `/a/${t}/view`,
@@ -10929,7 +10932,7 @@ var Zp = "1.64.0", Qp = {
10929
10932
  aloneHref: (e, t) => `/a/${t}`
10930
10933
  };
10931
10934
  // src/viewer/split/SplitNotice.tsx
10932
- function $p({ bar: e, onStep: t }) {
10935
+ function em({ bar: e, onStep: t }) {
10933
10936
  let { t: n } = mt();
10934
10937
  return e ? e.kind === "notice" ? /* @__PURE__ */ Q("div", {
10935
10938
  "data-split-notice": !0,
@@ -10973,7 +10976,7 @@ function $p({ bar: e, onStep: t }) {
10973
10976
  }) : null;
10974
10977
  }
10975
10978
  // src/viewer/split/useDocumentHeader.ts
10976
- function em(e) {
10979
+ function tm(e) {
10977
10980
  let [t, n] = X(null), r = Y(null), i = Y(e);
10978
10981
  return i.current = e, q(() => D((e, t) => {
10979
10982
  let a = i.current();
@@ -11003,7 +11006,7 @@ function em(e) {
11003
11006
  };
11004
11007
  }
11005
11008
  // src/viewer/split/useSplitRouting.ts
11006
- function tm({ artboard: e, side: t, document: n, focus: r, host: i, show: a, navigate: o }) {
11009
+ function nm({ artboard: e, side: t, document: n, focus: r, host: i, show: a, navigate: o }) {
11007
11010
  let s = Y({
11008
11011
  document: null,
11009
11012
  artboard: null,
@@ -11101,31 +11104,31 @@ function tm({ artboard: e, side: t, document: n, focus: r, host: i, show: a, nav
11101
11104
  };
11102
11105
  }
11103
11106
  // src/viewer/split/SplitShell.tsx
11104
- var nm = [
11107
+ var rm = [
11105
11108
  "document",
11106
11109
  "artboard",
11107
11110
  "whiteboard"
11108
- ], rm = {
11111
+ ], im = {
11109
11112
  document: mr,
11110
11113
  artboard: Sr,
11111
11114
  whiteboard: kr
11112
- }, im = .25, am = .75, om = {
11115
+ }, am = .25, om = .75, sm = {
11113
11116
  position: "absolute",
11114
11117
  visibility: "hidden"
11115
- }, sm = 240, cm = 180, lm = 320, um = [{
11118
+ }, cm = 240, lm = 180, um = 320, dm = [{
11116
11119
  opacity: 0,
11117
11120
  transform: "translateX(48px)"
11118
11121
  }, {
11119
11122
  opacity: 1,
11120
11123
  transform: "none"
11121
- }], dm = [{
11124
+ }], fm = [{
11122
11125
  opacity: 1,
11123
11126
  transform: "none"
11124
11127
  }, {
11125
11128
  opacity: 0,
11126
11129
  transform: "translateX(48px)"
11127
- }], fm = [{ transform: "translateX(100%)" }, { transform: "none" }], pm = [{ transform: "none" }, { transform: "translateX(100%)" }];
11128
- function mm(e, t) {
11130
+ }], pm = [{ transform: "translateX(100%)" }, { transform: "none" }], mm = [{ transform: "none" }, { transform: "translateX(100%)" }];
11131
+ function hm(e, t) {
11129
11132
  let [n, r] = X(null);
11130
11133
  return q(() => {
11131
11134
  if (!t || !e.title) return;
@@ -11140,7 +11143,7 @@ function mm(e, t) {
11140
11143
  };
11141
11144
  }, [e, t]), n?.id === t ? n.text : t;
11142
11145
  }
11143
- function hm({ type: e, id: t, split: n, host: r, fill: i = !1 }) {
11146
+ function gm({ type: e, id: t, split: n, host: r, fill: i = !1 }) {
11144
11147
  let { t: a } = mt(), o = se(I), [s, c] = X(n?.with ?? ""), [l] = X(() => ({
11145
11148
  type: e,
11146
11149
  id: t
@@ -11150,12 +11153,13 @@ function hm({ type: e, id: t, split: n, host: r, fill: i = !1 }) {
11150
11153
  }, m = Y({
11151
11154
  group: n?.group,
11152
11155
  board: n?.board,
11153
- frame: n?.frame
11156
+ frame: n?.frame,
11157
+ page: n?.page
11154
11158
  }).current, h = Y(l.type), [g, _] = X(l.type), [v, y] = X(!!n), [b, S] = X(() => x(l.type, u)), [C, w] = X(.58), [T, E] = X(!1), O = Y(null), k = Y({
11155
11159
  document: null,
11156
11160
  artboard: null,
11157
11161
  whiteboard: null
11158
- }), j = Y(null), ee = Y(v), te = Y([]), ne = Y({}), re = Y(null), ie = Y(!1), ae = tm({
11162
+ }), j = Y(null), ee = Y(v), te = Y([]), ne = Y({}), re = Y(null), ie = Y(!1), ae = nm({
11159
11163
  artboard: p[u],
11160
11164
  side: u,
11161
11165
  document: p.document,
@@ -11174,10 +11178,11 @@ function hm({ type: e, id: t, split: n, host: r, fill: i = !1 }) {
11174
11178
  Object.assign(m, {
11175
11179
  group: n.group,
11176
11180
  board: n.board,
11177
- frame: n.frame
11181
+ frame: n.frame,
11182
+ page: n.page
11178
11183
  }), d(a), c(n.with), y(!0), S(x(l.type, a)), history.replaceState(history.state, "", `${location.pathname}${t.search}`);
11179
11184
  }
11180
- }), oe = mm(r, s), N = em(() => ae.window("document")), P = () => {
11185
+ }), oe = hm(r, s), N = tm(() => ae.window("document")), P = () => {
11181
11186
  let e = h.current, t = v ? o ? b : null : e;
11182
11187
  for (let n of f) {
11183
11188
  let r = k.current[n];
@@ -11185,7 +11190,7 @@ function hm({ type: e, id: t, split: n, host: r, fill: i = !1 }) {
11185
11190
  let i = n === e ? "primary" : "secondary";
11186
11191
  r.dataset.role = i, r.style.order = i === "primary" ? "0" : "2", r.style.flex = !v || o ? "1 1 auto" : i === "primary" ? `0 0 ${C * 100}%` : "1 1 0";
11187
11192
  let a = t !== null && t !== n;
11188
- r.style.position = a ? om.position : "", r.style.inset = a ? "0" : "", r.style.visibility = a ? om.visibility : "";
11193
+ r.style.position = a ? sm.position : "", r.style.inset = a ? "0" : "", r.style.visibility = a ? sm.visibility : "";
11189
11194
  let s = r.querySelector(":scope > header");
11190
11195
  s && (s.style.display = i === "primary" ? "none" : "");
11191
11196
  }
@@ -11204,24 +11209,24 @@ function hm({ type: e, id: t, split: n, host: r, fill: i = !1 }) {
11204
11209
  kind: "chrome",
11205
11210
  hosted: ie.current
11206
11211
  }), e.kind !== "title") return;
11207
- let n = nm.find((e) => ae.window(e) === t);
11212
+ let n = rm.find((e) => ae.window(e) === t);
11208
11213
  n && (ne.current[n] = e.title, n === h.current && (document.title = e.title));
11209
11214
  }), []), vn(() => {
11210
11215
  for (let e of te.current.splice(0)) e.cancel();
11211
11216
  let e = P(), t = ee.current, n = j.current;
11212
11217
  if (ee.current = v, j.current = e, et()) return;
11213
11218
  let r = k.current[x(h.current, u)];
11214
- if (v && !t && !o) L(r, um, {
11215
- duration: sm,
11219
+ if (v && !t && !o) L(r, dm, {
11220
+ duration: cm,
11216
11221
  easing: Pe
11217
11222
  }), L(k.current[h.current], [{ flexBasis: "100%" }, { flexBasis: `${C * 100}%` }], {
11218
- duration: sm,
11223
+ duration: cm,
11219
11224
  easing: Pe
11220
11225
  });
11221
11226
  else if (o && e && n && e !== n && e !== h.current) {
11222
11227
  let t = k.current[n];
11223
- t && (t.style.visibility = ""), L(k.current[e], fm, {
11224
- duration: sm,
11228
+ t && (t.style.visibility = ""), L(k.current[e], pm, {
11229
+ duration: cm,
11225
11230
  easing: Pe
11226
11231
  }).then(() => {
11227
11232
  t && j.current !== n && (t.style.visibility = "hidden");
@@ -11234,7 +11239,7 @@ function hm({ type: e, id: t, split: n, host: r, fill: i = !1 }) {
11234
11239
  }, le = async (e, t, n) => {
11235
11240
  if (!e || et()) return n();
11236
11241
  let r = e.animate(t, {
11237
- duration: cm,
11242
+ duration: lm,
11238
11243
  easing: Te,
11239
11244
  fill: "forwards"
11240
11245
  });
@@ -11244,7 +11249,7 @@ function hm({ type: e, id: t, split: n, host: r, fill: i = !1 }) {
11244
11249
  h.current = x(h.current, u), P(), ce(h.current, !0), !et() && f.forEach((t, n) => {
11245
11250
  let r = k.current[t], i = e[n] - (r?.getBoundingClientRect().left ?? 0);
11246
11251
  r && i && L(r, [{ transform: `translateX(${i}px)` }, { transform: "none" }], {
11247
- duration: lm,
11252
+ duration: um,
11248
11253
  easing: Pe
11249
11254
  });
11250
11255
  });
@@ -11256,10 +11261,10 @@ function hm({ type: e, id: t, split: n, host: r, fill: i = !1 }) {
11256
11261
  };
11257
11262
  if (!t || !n || et()) return r();
11258
11263
  let i = {
11259
- duration: cm,
11264
+ duration: lm,
11260
11265
  easing: Te,
11261
11266
  fill: "forwards"
11262
- }, a = [t.animate([{ flexBasis: `${C * 100}%` }, { flexBasis: "100%" }], i), n.animate(dm, i)];
11267
+ }, a = [t.animate([{ flexBasis: `${C * 100}%` }, { flexBasis: "100%" }], i), n.animate(fm, i)];
11263
11268
  Promise.all(a.map((e) => e.finished.catch(() => void 0))).then(() => {
11264
11269
  t.style.flex = "1 1 auto", n.style.display = "none", re.current && (re.current.style.display = "none");
11265
11270
  for (let e of a) e.cancel();
@@ -11267,14 +11272,14 @@ function hm({ type: e, id: t, split: n, host: r, fill: i = !1 }) {
11267
11272
  });
11268
11273
  }, de = () => {
11269
11274
  let e = k.current[b], t = k.current[h.current];
11270
- t && e && !et() && (t.style.visibility = "", e.style.zIndex = "1"), le(e, pm, () => {
11275
+ t && e && !et() && (t.style.visibility = "", e.style.zIndex = "1"), le(e, mm, () => {
11271
11276
  e && (e.style.zIndex = ""), S(h.current);
11272
11277
  });
11273
11278
  }, fe = (e) => {
11274
11279
  let t = O.current?.getBoundingClientRect();
11275
11280
  if (!t?.width) return;
11276
11281
  let n = (e.clientX - t.left) / t.width;
11277
- w(Math.min(am, Math.max(im, n)));
11282
+ w(Math.min(om, Math.max(am, n)));
11278
11283
  };
11279
11284
  return /* @__PURE__ */ Q("div", {
11280
11285
  ref: O,
@@ -11284,7 +11289,7 @@ function hm({ type: e, id: t, split: n, host: r, fill: i = !1 }) {
11284
11289
  }[!!i | 0],
11285
11290
  children: [f.map((e) => {
11286
11291
  if (!p[e] || !v && e !== g) return null;
11287
- let t = rm[e];
11292
+ let t = im[e];
11288
11293
  return /* @__PURE__ */ Q("section", {
11289
11294
  "data-split-pane": e,
11290
11295
  ref: (t) => {
@@ -11355,7 +11360,7 @@ function hm({ type: e, id: t, split: n, host: r, fill: i = !1 }) {
11355
11360
  ]
11356
11361
  }), /* @__PURE__ */ Q("div", {
11357
11362
  className: "x1n2onr6 x98rzlu x2lwn1j",
11358
- children: [e === "document" && /* @__PURE__ */ Z($p, {
11363
+ children: [e === "document" && /* @__PURE__ */ Z(em, {
11359
11364
  bar: ae.bar,
11360
11365
  onStep: ae.step
11361
11366
  }), /* @__PURE__ */ Z("iframe", {
@@ -11386,5 +11391,5 @@ function hm({ type: e, id: t, split: n, host: r, fill: i = !1 }) {
11386
11391
  });
11387
11392
  }
11388
11393
  // src/viewer/whiteboard/LazyReadOnlyWhiteboard.ts
11389
- var gm = mn(() => import("./ReadOnlyWhiteboard-B889mK_6.js").then(({ ReadOnlyWhiteboard: e }) => ({ default: e })));
11390
- export { Et as ARTIFACT_LOCATOR_SOURCE, ht as ARTIFACT_TYPES, Hp as ArtboardView, ii as ArtifactThumbnail, Nt as BOARD_TYPES, i as CanvasErrorBoundary, dt as ENTRY_FILE, pi as EmbeddedCanvas, At as HTML_LANG, fe as HTML_SANDBOX, Gp as HtmlView, gm as LazyReadOnlyWhiteboard, b as MAIN_PORTS, Mt as MAX_ARTIFACT_BYTES, I as PHONE_QUERY, ft as PLAN_LIMIT_KINDS, _ as PreviewView, hi as PublicationStatus, Ot as RELAY_DAILY_LIMIT, gt as RELAY_REJECTED_CODE, qe as RailSwitch, vi as RyugiMark, hm as SplitShell, Wt as TYPE_GLYPHS, Ht as TYPE_ICON_VIEWBOX, kt as Trans, ri as TypeIcon, Zp as VIEWER_VERSION, y as ViewerProvider, Oe as anchorBlockIds, he as applyAgentOp, Be as applyAgentThreadOp, ni as applyBoardAgentOp, ti as applyBoardHumanOp, Ye as applyHumanOp, ve as applyThreadOp, Yr as boardAnchors, Si as boardCommentsFromMessage, xi as boardCommentsFromPayload, t as cloudErrorDetails, Qp as cloudSplitFrames, Lt as createRelayConnection, Tt as createViewerI18n, Me as documentAnchors, le as dropPendingAnchor, Xr as emptyBoardComments, $e as emptyComments, qp as errorText, e as formatBytes, T as holdEmbedAnchor, Dt as i18n, oe as inSplit, wt as isArtifactAddress, bt as isArtifactId, yt as isArtifactLocator, pt as isArtifactType, zr as isChoiceRecord, st as isMediaBoard, jt as isMintedArtifactId, B as isObject, Jp as isPlanLimit, lt as isVisibility, Qr as mergeBoardComments, Se as mergeComments, Pt as mintArtifactId, D as onSplitMessage, Ue as openThread, ct as ownLink, ln as pageLink, _t as parseAcceptLanguage, Fe as parseComments, ke as parseSplit, w as pendingAnchor, Yp as planLimitMessage, ut as publishState, St as publishing, Jr as readBoardAnchor, be as readCloudHeader, ie as readEmbedAnchor, ot as readPublication, Kp as relativeUpdatedAt, Ct as relayRejection, Ze as reportCloudHeader, vt as resolveLocale, Xp as responseErrorText, Ae as restoreAnchorSoon, Zr as savedBoardComments, Ee as savedComments, xt as syncNote, U as t, zt as typeFaviconHref, V as unreadThreads, Ti as useCanvasData, Re as useCloudHeader, se as useMedia, sn as usePageQuery, de as useSandboxFrame, n as useSystemTheme, mt as useTranslation, Jt as useTypeFavicon, R as waitingOn };
11394
+ var _m = mn(() => import("./ReadOnlyWhiteboard-B889mK_6.js").then(({ ReadOnlyWhiteboard: e }) => ({ default: e })));
11395
+ export { Et as ARTIFACT_LOCATOR_SOURCE, ht as ARTIFACT_TYPES, Up as ArtboardView, ii as ArtifactThumbnail, Nt as BOARD_TYPES, i as CanvasErrorBoundary, dt as ENTRY_FILE, pi as EmbeddedCanvas, At as HTML_LANG, fe as HTML_SANDBOX, Kp as HtmlView, _m as LazyReadOnlyWhiteboard, b as MAIN_PORTS, Mt as MAX_ARTIFACT_BYTES, I as PHONE_QUERY, ft as PLAN_LIMIT_KINDS, _ as PreviewView, hi as PublicationStatus, Ot as RELAY_DAILY_LIMIT, gt as RELAY_REJECTED_CODE, qe as RailSwitch, vi as RyugiMark, gm as SplitShell, Wt as TYPE_GLYPHS, Ht as TYPE_ICON_VIEWBOX, kt as Trans, ri as TypeIcon, Qp as VIEWER_VERSION, y as ViewerProvider, Oe as anchorBlockIds, he as applyAgentOp, Be as applyAgentThreadOp, ni as applyBoardAgentOp, ti as applyBoardHumanOp, Ye as applyHumanOp, ve as applyThreadOp, Yr as boardAnchors, Si as boardCommentsFromMessage, xi as boardCommentsFromPayload, t as cloudErrorDetails, $p as cloudSplitFrames, Lt as createRelayConnection, Tt as createViewerI18n, Me as documentAnchors, le as dropPendingAnchor, Xr as emptyBoardComments, $e as emptyComments, Jp as errorText, e as formatBytes, T as holdEmbedAnchor, Dt as i18n, oe as inSplit, wt as isArtifactAddress, bt as isArtifactId, yt as isArtifactLocator, pt as isArtifactType, zr as isChoiceRecord, st as isMediaBoard, jt as isMintedArtifactId, B as isObject, Yp as isPlanLimit, lt as isVisibility, Qr as mergeBoardComments, Se as mergeComments, Pt as mintArtifactId, D as onSplitMessage, Ue as openThread, ct as ownLink, ln as pageLink, _t as parseAcceptLanguage, Fe as parseComments, ke as parseSplit, w as pendingAnchor, Xp as planLimitMessage, ut as publishState, St as publishing, Jr as readBoardAnchor, be as readCloudHeader, ie as readEmbedAnchor, ot as readPublication, qp as relativeUpdatedAt, Ct as relayRejection, Ze as reportCloudHeader, vt as resolveLocale, Zp as responseErrorText, Ae as restoreAnchorSoon, Zr as savedBoardComments, Ee as savedComments, xt as syncNote, U as t, zt as typeFaviconHref, V as unreadThreads, Ti as useCanvasData, Re as useCloudHeader, se as useMedia, sn as usePageQuery, de as useSandboxFrame, n as useSystemTheme, mt as useTranslation, Jt as useTypeFavicon, R as waitingOn };