ryugi-artifacts 1.48.1 → 1.48.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +3 -3
- package/dist/server.cjs +1 -1
- package/dist/viewer/ArtboardLayout-z40_eGKH.js +12 -0
- package/dist/viewer/index.js +2 -2
- package/dist/viewer/index3.css +8 -0
- package/dist/viewer-lib/core.js +1 -1
- package/dist/viewer-lib/document.js +1 -1
- package/dist/viewer-lib/index.js +957 -893
- package/dist/viewer-lib/{stylex-C87PWRry.css → stylex-CM17SXYo.css} +8 -0
- package/dist/viewer-lib/types/src/viewer/components/CommentLayer.d.ts +3 -1
- package/dist/viewer-lib/types/src/viewer/components/Labels.d.ts +3 -1
- package/dist/viewer-lib/types/src/viewer/hooks/usePanZoom.d.ts +3 -0
- package/package.json +1 -1
- package/dist/viewer/ArtboardLayout-KQmamERB.js +0 -12
package/dist/viewer-lib/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import './stylex-
|
|
1
|
+
import './stylex-CM17SXYo.css';
|
|
2
2
|
import './index-DLyi-yDq.css';
|
|
3
3
|
import { C as e, D as t, E as n, O as r, S as i, T as a, _ as o, a as s, b as c, c as l, f as u, g as d, h as f, i as p, k as m, l as h, m as g, n as _, o as v, p as y, r as b, s as x, t as S, u as C, v as w, w as T, x as E, y as D } from "./PreviewView-Dhif0ukY.js";
|
|
4
|
-
import { $ as O, At as k, Ct as A, Dt as j, Et as ee, Ft as
|
|
4
|
+
import { $ as O, At as k, Ct as A, Dt as j, Et as ee, Ft as M, H as te, It as N, Mt as ne, Nt as re, Ot as ie, P as ae, Pt as P, Q as F, R as I, S as oe, St as L, Tt as R, U as z, W as se, X as ce, Y as le, _t as ue, a as de, at as fe, bt as pe, dt as B, f as me, ft as he, gt as ge, ht as _e, i as ve, it as V, jt as H, kt as U, l as ye, lt as be, m as xe, mt as Se, n as Ce, ot as we, q as Te, r as Ee, rt as De, s as Oe, st as ke, t as Ae, tt as je, vt as Me, wt as Ne, x as Pe, xt as Fe, y as Ie, yt as Le } from "./motion-BkUMioN-.js";
|
|
5
5
|
import { a as Re, c as ze, d as Be, f as Ve, h as He, i as W, l as Ue, m as We, n as Ge, o as G, p as Ke, r as qe, s as Je, t as Ye, u as Xe } from "./i18n-C0ysopzN.js";
|
|
6
6
|
import { a as Ze, c as Qe, d as $e, f as et, h as tt, l as nt, m as rt, n as it, o as at, p as ot, t as st, u as ct } from "./WarningsBadge-5iaPvvwB.js";
|
|
7
7
|
import { t as lt } from "./tokens.stylex-CTBTXJt7.js";
|
|
@@ -77,10 +77,10 @@ var Hn = {
|
|
|
77
77
|
}, Un = () => ({
|
|
78
78
|
version: 1,
|
|
79
79
|
threads: []
|
|
80
|
-
}), Wn = (e) =>
|
|
80
|
+
}), Wn = (e) => P(e, Hn), Gn = (e, t, n, r, i, a) => H(e, t, n, r, i, a, Hn);
|
|
81
81
|
function Kn(e, t, n, r, i) {
|
|
82
82
|
if (t.op !== "create") return j(e, t, n, r, i);
|
|
83
|
-
let a =
|
|
83
|
+
let a = ne(t.anchor, "human", t.text, n, r, i);
|
|
84
84
|
if (t.anchor.verdict !== "pass") return {
|
|
85
85
|
...e,
|
|
86
86
|
threads: [...e.threads, a]
|
|
@@ -104,7 +104,7 @@ function Kn(e, t, n, r, i) {
|
|
|
104
104
|
function qn(e, t, n, r, i) {
|
|
105
105
|
if (t.op === "resolve" && e.threads.find((e) => e.id === t.threadId)?.anchor.verdict === "reject") throw Error("a reject closes only when your human partner passes the group");
|
|
106
106
|
if (t.op === "add") {
|
|
107
|
-
let a =
|
|
107
|
+
let a = ne(t.anchor, "agent", t.text, n, r, { name: i });
|
|
108
108
|
return {
|
|
109
109
|
file: {
|
|
110
110
|
...e,
|
|
@@ -114,7 +114,7 @@ function qn(e, t, n, r, i) {
|
|
|
114
114
|
messageId: a.messages[0].id
|
|
115
115
|
};
|
|
116
116
|
}
|
|
117
|
-
return
|
|
117
|
+
return R(e, t, n, r, i);
|
|
118
118
|
}
|
|
119
119
|
//#endregion
|
|
120
120
|
//#region src/viewer/components/TypeIcon.tsx
|
|
@@ -1089,7 +1089,7 @@ function Er({ threads: e, page: t, stale: n, numbers: r, openId: i, tab: a, onTa
|
|
|
1089
1089
|
children: [
|
|
1090
1090
|
/* @__PURE__ */ Z("span", {
|
|
1091
1091
|
className: "xo2rkog x1s688f",
|
|
1092
|
-
children: t ?
|
|
1092
|
+
children: t ? Se(t).label : ""
|
|
1093
1093
|
}),
|
|
1094
1094
|
e.status === "resolved" ? /* @__PURE__ */ Z("span", { children: l("common.resolved") }) : null,
|
|
1095
1095
|
/* @__PURE__ */ Z("span", {
|
|
@@ -1202,69 +1202,73 @@ function Nr({ point: e, width: t, height: n, children: r }) {
|
|
|
1202
1202
|
children: r
|
|
1203
1203
|
});
|
|
1204
1204
|
}
|
|
1205
|
-
function Pr({ view: e,
|
|
1206
|
-
let { t:
|
|
1207
|
-
return /* @__PURE__ */
|
|
1205
|
+
function Pr({ view: e, overlayRef: t, page: n, boards: r, width: i, height: a, threads: o, stale: s, numbers: c, showResolved: l, draft: u, openId: d, actions: f, agent: p, onOpen: m, onSubmit: h, onCancelDraft: g }) {
|
|
1206
|
+
let { t: _ } = Re(), v = o.filter((e) => e.anchor.page === n && e.anchor.verdict !== "pass" && e.messages.some((e) => !e.deleted) && (l || e.status === "open" || e.id === d)), y = o.find((e) => e.id === d), b = y ? yr(y.anchor, r) : null, x = u ? yr(u, r) : null;
|
|
1207
|
+
return /* @__PURE__ */ Z("div", {
|
|
1208
1208
|
"data-chrome": "comments",
|
|
1209
1209
|
className: "x10l6tqk x10a8y8t x47corl xb3r6kr x1q8xho0",
|
|
1210
|
-
children:
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
className: "x10l6tqk xgd8bvy x1fgtraw x1717udv xrvj5dj x1ku5rj1 x983p9h xdh2fpr x1y0btm7 xexa23x x7grq7f x8r4el6 xqfszdh x1j6dyjg x1s688f x105ttfm x67bb7w x1ypdohk",
|
|
1242
|
-
style: {
|
|
1243
|
-
left: jr(e, b).x,
|
|
1244
|
-
top: jr(e, b).y
|
|
1245
|
-
}
|
|
1246
|
-
}), /* @__PURE__ */ Q(Nr, {
|
|
1247
|
-
height: i,
|
|
1248
|
-
point: jr(e, b),
|
|
1249
|
-
width: r,
|
|
1250
|
-
children: [
|
|
1251
|
-
/* @__PURE__ */ Z("div", {
|
|
1252
|
-
className: "x78zum5 x6s0dn4 x17d4w8g x889kno xqin4a2 x1j6dyjg xddlp02 xb3r6kr xuxw1ft xlyipyv",
|
|
1253
|
-
children: g("comments.anchoredTo", { label: xr(l) })
|
|
1254
|
-
}),
|
|
1255
|
-
/* @__PURE__ */ Z(me, {
|
|
1256
|
-
autoFocus: !0,
|
|
1257
|
-
placeholder: g("comments.addPlaceholder"),
|
|
1258
|
-
onCancel: h,
|
|
1259
|
-
onSubmit: m
|
|
1260
|
-
}),
|
|
1261
|
-
/* @__PURE__ */ Z("div", {
|
|
1262
|
-
className: "xqin4a2 x1a8lsjc x1k6wstc xc7n51q xqfszdh",
|
|
1263
|
-
children: g("comments.sendHint")
|
|
1210
|
+
children: /* @__PURE__ */ Q("div", {
|
|
1211
|
+
ref: t,
|
|
1212
|
+
className: "x10l6tqk x10a8y8t",
|
|
1213
|
+
children: [
|
|
1214
|
+
v.map((t) => {
|
|
1215
|
+
let n = yr(t.anchor, r);
|
|
1216
|
+
if (!n) return null;
|
|
1217
|
+
let i = jr(e, n), a = t.messages[0]?.author;
|
|
1218
|
+
return /* @__PURE__ */ Z("button", {
|
|
1219
|
+
"aria-label": _("comments.pin", { number: c.get(t.id) ?? "" }),
|
|
1220
|
+
"data-verdict": t.anchor.verdict,
|
|
1221
|
+
type: "button",
|
|
1222
|
+
onClick: () => m(t.id === d ? null : t.id),
|
|
1223
|
+
...G(Ar.pin, a === "agent" && Ar.agent, t.anchor.verdict === "reject" && Ar.reject, t.status === "resolved" && Ar.resolved, s.has(t.id) && Ar.stale, t.id === d && Ar.open),
|
|
1224
|
+
style: {
|
|
1225
|
+
left: i.x,
|
|
1226
|
+
top: i.y
|
|
1227
|
+
},
|
|
1228
|
+
children: c.get(t.id)
|
|
1229
|
+
}, t.id);
|
|
1230
|
+
}),
|
|
1231
|
+
y ? /* @__PURE__ */ Z(Nr, {
|
|
1232
|
+
height: a,
|
|
1233
|
+
point: b ? jr(e, b) : null,
|
|
1234
|
+
width: i,
|
|
1235
|
+
children: /* @__PURE__ */ Z(be, {
|
|
1236
|
+
actions: f,
|
|
1237
|
+
agent: p,
|
|
1238
|
+
label: `#${c.get(y.id)} ${xr(y.anchor)}${s.has(y.id) ? ` · ${Sr(y.anchor)}` : ""}`,
|
|
1239
|
+
thread: y,
|
|
1240
|
+
onClose: () => m(null)
|
|
1264
1241
|
})
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1242
|
+
}) : null,
|
|
1243
|
+
u && x ? /* @__PURE__ */ Q(St, { children: [/* @__PURE__ */ Z("span", {
|
|
1244
|
+
className: "x10l6tqk xgd8bvy x1fgtraw x1717udv xrvj5dj x1ku5rj1 x983p9h xdh2fpr x1y0btm7 xexa23x x7grq7f x8r4el6 xqfszdh x1j6dyjg x1s688f x105ttfm x67bb7w x1ypdohk",
|
|
1245
|
+
style: {
|
|
1246
|
+
left: jr(e, x).x,
|
|
1247
|
+
top: jr(e, x).y
|
|
1248
|
+
}
|
|
1249
|
+
}), /* @__PURE__ */ Q(Nr, {
|
|
1250
|
+
height: a,
|
|
1251
|
+
point: jr(e, x),
|
|
1252
|
+
width: i,
|
|
1253
|
+
children: [
|
|
1254
|
+
/* @__PURE__ */ Z("div", {
|
|
1255
|
+
className: "x78zum5 x6s0dn4 x17d4w8g x889kno xqin4a2 x1j6dyjg xddlp02 xb3r6kr xuxw1ft xlyipyv",
|
|
1256
|
+
children: _("comments.anchoredTo", { label: xr(u) })
|
|
1257
|
+
}),
|
|
1258
|
+
/* @__PURE__ */ Z(B, {
|
|
1259
|
+
autoFocus: !0,
|
|
1260
|
+
placeholder: _("comments.addPlaceholder"),
|
|
1261
|
+
onCancel: g,
|
|
1262
|
+
onSubmit: h
|
|
1263
|
+
}),
|
|
1264
|
+
/* @__PURE__ */ Z("div", {
|
|
1265
|
+
className: "xqin4a2 x1a8lsjc x1k6wstc xc7n51q xqfszdh",
|
|
1266
|
+
children: _("comments.sendHint")
|
|
1267
|
+
})
|
|
1268
|
+
]
|
|
1269
|
+
})] }) : null
|
|
1270
|
+
]
|
|
1271
|
+
})
|
|
1268
1272
|
});
|
|
1269
1273
|
}
|
|
1270
1274
|
//#endregion
|
|
@@ -4905,7 +4909,7 @@ function fl(e, t, n, r, i, a, o, s, c, l) {
|
|
|
4905
4909
|
read: 0,
|
|
4906
4910
|
scripts: 31,
|
|
4907
4911
|
openBrackets: []
|
|
4908
|
-
}, j = 0, ee = x && o.unspacedCursive !== "none" && il(h),
|
|
4912
|
+
}, j = 0, ee = x && o.unspacedCursive !== "none" && il(h), M = !x, te = null, N = null, ne = null, re = null, ie = o.unfitHyphenRetreat === "full-width-or-first";
|
|
4909
4913
|
for (let r = t, i = b; r < n; r++, i++) {
|
|
4910
4914
|
let s = d[r], l = p[r], u = l & 15, b = 0, E = 0, D = null;
|
|
4911
4915
|
switch (u) {
|
|
@@ -4915,7 +4919,7 @@ function fl(e, t, n, r, i, a, o, s, c, l) {
|
|
|
4915
4919
|
break;
|
|
4916
4920
|
}
|
|
4917
4921
|
let d = o.measureTextWithFollowingSpace && w ? cl(e, r, n) : null, _ = d === "", v = _ ? js(s, S) : As(s, S);
|
|
4918
|
-
|
|
4922
|
+
ne = s, re = v;
|
|
4919
4923
|
let y = d === null || _ ? 0 : ll(s + d, S, T);
|
|
4920
4924
|
if (k !== null && v.spaceKerning !== Is) {
|
|
4921
4925
|
let e = r > t && el(p[r - 1] & 15), a = r + 1 < n && el(p[r + 1] & 15);
|
|
@@ -4925,17 +4929,17 @@ function fl(e, t, n, r, i, a, o, s, c, l) {
|
|
|
4925
4929
|
}
|
|
4926
4930
|
}
|
|
4927
4931
|
b = dl(s, v, S, C, _ ? T : 0, y);
|
|
4928
|
-
let O = null,
|
|
4932
|
+
let O = null, M = Os;
|
|
4929
4933
|
if (x && (E = Gc(s, u, o.graphemeTable), ee && (O = sl(h, f[r] - m, f[r] - m + s.length, o.graphemeTable, o.unspacedCursive === "run" ? A : null), O !== null && (b -= O.length * a)), o.letterSpacesGlyphs)) {
|
|
4930
|
-
|
|
4931
|
-
for (let e = 0; e <
|
|
4934
|
+
M = v.extraSpacings ??= Qc(s) ? ks(s, S) : Os;
|
|
4935
|
+
for (let e = 0; e < M.length; e++) b += M[e] * a;
|
|
4932
4936
|
}
|
|
4933
4937
|
if (!c || l & 128 || s.length === 1) break;
|
|
4934
|
-
let
|
|
4935
|
-
if (D =
|
|
4936
|
-
if (
|
|
4938
|
+
let N = uc(s, v, S, C, a === 0 ? Xc.test(s) ? "pair-context" : v.width < o.prefixFitMinWidth ? "sum-graphemes" : o.cutWordFit : "segment-prefixes", _ ? T : null);
|
|
4939
|
+
if (D = N.advances, D === null) break;
|
|
4940
|
+
if (N.lineStartExtras !== null && ((te ??= Array(n - t).fill(null))[r - t] = N.lineStartExtras), y !== 0 && (D = D.slice(), D[D.length - 1] = D[D.length - 1] + y), M.length !== 0) {
|
|
4937
4941
|
D = D.slice();
|
|
4938
|
-
for (let e = 0; e <
|
|
4942
|
+
for (let e = 0; e < M.length; e++) D[e] = D[e] + M[e] * a;
|
|
4939
4943
|
}
|
|
4940
4944
|
if (O !== null) {
|
|
4941
4945
|
D = D.slice();
|
|
@@ -4958,43 +4962,43 @@ function fl(e, t, n, r, i, a, o, s, c, l) {
|
|
|
4958
4962
|
break;
|
|
4959
4963
|
}
|
|
4960
4964
|
}
|
|
4961
|
-
u !== 0 && u !== 1 && u !== 2 && (
|
|
4965
|
+
u !== 0 && u !== 1 && u !== 2 && (M = !1), u !== 0 && u !== 3 && (ne = null), _[i] = l & -129 | (x && E > 0 ? 16 : 0), g[i] = Kc(b, E, a), v[i] = D, y !== null && (y[r - t] = s), u !== 0 && s.charCodeAt(0) === 173 ? (N ??= Es(r - t), N[r - t] = ie ? 0 : ul(e, r, n, ne, re, S, C, o.lineFitEpsilon)) : N !== null && (N[r - t] = 0);
|
|
4962
4966
|
}
|
|
4963
|
-
let
|
|
4967
|
+
let ae = Ys(N === null ? "-" : o.hyphenFromPrimaryFont ? xs(S) : "‐", S, C) + (a === 0 ? 0 : a * (o.letterSpaceDiscretionaryHyphen ? 2 : 1)), P = {
|
|
4964
4968
|
widthTrims: null,
|
|
4965
4969
|
lineStartExtras: null,
|
|
4966
4970
|
lineEndTrims: null,
|
|
4967
4971
|
overflowLineEndTrims: null
|
|
4968
4972
|
};
|
|
4969
4973
|
if (o.hanKerning && Ic(h)) {
|
|
4970
|
-
|
|
4971
|
-
let r =
|
|
4974
|
+
P = Wc(S, e, t, n);
|
|
4975
|
+
let r = P.widthTrims;
|
|
4972
4976
|
if (r !== null) for (let e = 0; e < r.length; e++) g[b + e] = g[b + e] - r[e];
|
|
4973
4977
|
}
|
|
4974
|
-
let
|
|
4978
|
+
let F = P.lineStartExtras;
|
|
4975
4979
|
if (o.kernsAcrossCanvasWords && S.measuredKana && S.kanaKerning !== null && Ps.test(h)) {
|
|
4976
4980
|
let r = Ks(S);
|
|
4977
|
-
r !== null && (
|
|
4981
|
+
r !== null && (F = pl(F, g, b, e, t, n, S, r));
|
|
4978
4982
|
}
|
|
4979
|
-
let
|
|
4980
|
-
o.hangsIdeographicSpace && h.includes(" ") && (
|
|
4981
|
-
let
|
|
4983
|
+
let I = P.lineEndTrims;
|
|
4984
|
+
o.hangsIdeographicSpace && h.includes(" ") && (I = ml(I, e, S, a, ae, t, n));
|
|
4985
|
+
let oe = {
|
|
4982
4986
|
widths: g,
|
|
4983
4987
|
segmentFlags: _,
|
|
4984
|
-
simpleLineWalkFastPath:
|
|
4985
|
-
simpleLineCountFastPath:
|
|
4988
|
+
simpleLineWalkFastPath: M && !e.hasUnbroken,
|
|
4989
|
+
simpleLineCountFastPath: M,
|
|
4986
4990
|
breakableFitAdvances: v,
|
|
4987
4991
|
letterSpacing: a,
|
|
4988
|
-
discretionaryHyphenWidth:
|
|
4989
|
-
discretionaryHyphenContexts:
|
|
4990
|
-
breakableLineStartExtras:
|
|
4991
|
-
lineStartExtras:
|
|
4992
|
-
lineEndTrims:
|
|
4993
|
-
overflowLineEndTrims:
|
|
4992
|
+
discretionaryHyphenWidth: ae,
|
|
4993
|
+
discretionaryHyphenContexts: N,
|
|
4994
|
+
breakableLineStartExtras: te,
|
|
4995
|
+
lineStartExtras: F,
|
|
4996
|
+
lineEndTrims: I,
|
|
4997
|
+
overflowLineEndTrims: P.overflowLineEndTrims,
|
|
4994
4998
|
tabStopAdvance: D,
|
|
4995
4999
|
minimumTabAdvance: O
|
|
4996
5000
|
};
|
|
4997
|
-
return y !== null && (
|
|
5001
|
+
return y !== null && (oe.segments = y), oe;
|
|
4998
5002
|
}
|
|
4999
5003
|
function pl(e, t, n, r, i, a, o, s) {
|
|
5000
5004
|
let { normalized: c, starts: l, flags: u } = r;
|
|
@@ -5115,10 +5119,10 @@ function El(e, t, n, r, i, a) {
|
|
|
5115
5119
|
return u < l;
|
|
5116
5120
|
}
|
|
5117
5121
|
function Dl(e, t, n, r, i, a = !1) {
|
|
5118
|
-
let { widths: o, segmentFlags: s, breakableFitAdvances: c, discretionaryHyphenWidth: l, letterSpacing: u, lineStartExtras: d, lineEndTrims: f, overflowLineEndTrims: p, tabStopAdvance: m, minimumTabAdvance: h } = e, g = o.length, _ = e.items, v = _ === void 0 ? null : _.hyphenWidths, y = _ === void 0 ? null : _.hyphenRooms, b = _ === void 0 ? null : _.itemEndHalts, x = _ === void 0 ? null : _.insideExtras, S = _ === void 0 ? null : _.fillExtras, C = _ === void 0 ? null : _.openingEdges, w = _ === void 0 ? null : _.emptyObjectSpaces, T = _ === void 0 ? null : _.emptyObjectReturns, E = Zs(), D = 16 | (E.hangTabs ? 32 : 0), O = _ !== void 0 && E.hangsSpacesPerTextFrame, k = E.testsHyphenBeforeAtomic, A = E.zeroWidthGlueTakesLine, j = E.tabsInAppUnits, ee = E.paddedOpeningFit,
|
|
5122
|
+
let { widths: o, segmentFlags: s, breakableFitAdvances: c, discretionaryHyphenWidth: l, letterSpacing: u, lineStartExtras: d, lineEndTrims: f, overflowLineEndTrims: p, tabStopAdvance: m, minimumTabAdvance: h } = e, g = o.length, _ = e.items, v = _ === void 0 ? null : _.hyphenWidths, y = _ === void 0 ? null : _.hyphenRooms, b = _ === void 0 ? null : _.itemEndHalts, x = _ === void 0 ? null : _.insideExtras, S = _ === void 0 ? null : _.fillExtras, C = _ === void 0 ? null : _.openingEdges, w = _ === void 0 ? null : _.emptyObjectSpaces, T = _ === void 0 ? null : _.emptyObjectReturns, E = Zs(), D = 16 | (E.hangTabs ? 32 : 0), O = _ !== void 0 && E.hangsSpacesPerTextFrame, k = E.testsHyphenBeforeAtomic, A = E.zeroWidthGlueTakesLine, j = E.tabsInAppUnits, ee = E.paddedOpeningFit, M = E.hardBreakItemRetreat, te = Math.max(0, n), N = te + E.lineFitEpsilon, ne = e.discretionaryHyphenContexts !== null, re = E.unfitHyphenRetreat === "reduced-width", ie = re ? l : 0, ae = ne && E.unfitHyphenRetreat === "full-width-or-first", P = E.unfitHyphenRetreat === "full-width", F = null;
|
|
5119
5123
|
for (;;) {
|
|
5120
|
-
let n = t.segmentIndex, E = t.graphemeIndex,
|
|
5121
|
-
if ((s[n] & 15) == 8) t.segmentIndex = n + 1, t.graphemeIndex = 0,
|
|
5124
|
+
let n = t.segmentIndex, E = t.graphemeIndex, I = 0, oe = !1, L = n, R = E, z = -1, se = 0, ce = -1, le = 0, ue = -1, de = 0, fe = !1, pe = 0, B = 0, me = !0, he = !1, ge = -1, _e = 0, ve = 0, V = !1, H = null;
|
|
5125
|
+
if ((s[n] & 15) == 8) t.segmentIndex = n + 1, t.graphemeIndex = 0, H = d === null ? 0 : d[n];
|
|
5122
5126
|
else {
|
|
5123
5127
|
decided: {
|
|
5124
5128
|
let t;
|
|
@@ -5127,133 +5131,133 @@ function Dl(e, t, n, r, i, a = !1) {
|
|
|
5127
5131
|
t = g;
|
|
5128
5132
|
break;
|
|
5129
5133
|
}
|
|
5130
|
-
let i, a = 0,
|
|
5131
|
-
if (
|
|
5134
|
+
let i, a = 0, P = s[r], F = P & 15;
|
|
5135
|
+
if (F === 8) {
|
|
5132
5136
|
t = r + 1;
|
|
5133
5137
|
break;
|
|
5134
5138
|
}
|
|
5135
|
-
let
|
|
5136
|
-
u !== 0 && (
|
|
5137
|
-
let
|
|
5138
|
-
if (
|
|
5139
|
-
if (
|
|
5139
|
+
let H = !!(P & 16), U = !!(1 << F & hl), ye = r === n ? E : 0, be = u !== 0 && oe && !me && !he ? u : 0, xe = 0;
|
|
5140
|
+
u !== 0 && (H || F === 7 || F === 5 || F === 9 || C !== null && C[r] !== 0) && (xe = be, he = !H), F !== 2 && F !== 6 && (me = !1);
|
|
5141
|
+
let Se = F === 5 ? _ === void 0 ? yl(I + xe, m, h, j) : bl(e, _, r, oe ? I + xe : d === null ? 0 : d[r], j) : o[r], Ce = xe + Se, we = f === null ? 0 : f[r];
|
|
5142
|
+
if (F === 3 && ye === 0) {
|
|
5143
|
+
if (oe) {
|
|
5140
5144
|
let e = l, t = !0;
|
|
5141
|
-
_ !== void 0 && (
|
|
5145
|
+
_ !== void 0 && (ne && r > n && (s[r - 1] & 15) == 9 && (ce = r, le = I), O && ue === r && (ue = r + 1, de = Math.max(de, Math.min(I, te))), v !== null && (e = v[r]), t = k || r + 1 === g || (s[r + 1] & 15) != 9 || C !== null && C[r + 1] !== 0), L = r + 1, R = 0, r + 1 < g && (s[r + 1] & 15) != 8 && (z = r + 1, se = I + e, ne && ((t ? se : I) <= N || ae && ce < 0) && (ce = z, le = se));
|
|
5142
5146
|
}
|
|
5143
5147
|
continue;
|
|
5144
5148
|
}
|
|
5145
|
-
let
|
|
5146
|
-
if (u !== 0 && !
|
|
5147
|
-
else if (
|
|
5148
|
-
let e =
|
|
5149
|
-
e !== 0 && (
|
|
5149
|
+
let Te = 0;
|
|
5150
|
+
if (u !== 0 && !H && !U && F !== 7) Te = be + Se;
|
|
5151
|
+
else if (U ? F === 5 : Se !== 0 || F === 7) {
|
|
5152
|
+
let e = Se + (H ? u : 0);
|
|
5153
|
+
e !== 0 && (Te = xe + e);
|
|
5150
5154
|
}
|
|
5151
|
-
let
|
|
5152
|
-
if (O &&
|
|
5153
|
-
|
|
5155
|
+
let Ee = !!(1 << F & D);
|
|
5156
|
+
if (O && F === 2 && ue === r && (Ee = !0), Ee && (ue !== r && (de = I - B + xe, fe = !1, _ !== void 0 && r > n && (s[r - 1] & 15) == 9 && (fe = Tl(s, g, r, D), fe || (z = r, se = I - B)), pe = 0), ue = r + 1, C !== null && (de += C[r], pe += C[r])), !oe && F === 6 && !A) {
|
|
5157
|
+
L = r + 1, R = 0;
|
|
5154
5158
|
continue;
|
|
5155
5159
|
}
|
|
5156
|
-
if (
|
|
5157
|
-
let e =
|
|
5160
|
+
if (oe) {
|
|
5161
|
+
let e = Ee ? de - pe : I + Te, t = e - we > N;
|
|
5158
5162
|
if (_ !== void 0) {
|
|
5159
5163
|
let n = !1;
|
|
5160
|
-
if (w !== null &&
|
|
5161
|
-
let e =
|
|
5162
|
-
n = e <=
|
|
5164
|
+
if (w !== null && F === 9 && Se === 0 && e > N) {
|
|
5165
|
+
let e = ue === r ? de : I, t = w[r];
|
|
5166
|
+
n = e <= N || !(t >= 0 && e - t > N || T[r] === 1);
|
|
5163
5167
|
}
|
|
5164
|
-
let i =
|
|
5165
|
-
t = (t || i) && !(
|
|
5168
|
+
let i = Te < 0 && I - B > N;
|
|
5169
|
+
t = (t || i) && !(Ee && fe) && !n, O && !t && ue === r && F === 9 && Se === 0 && (ue = r + 1, de = Math.max(de, Math.min(I + Ce, te)));
|
|
5166
5170
|
}
|
|
5167
5171
|
if (t) {
|
|
5168
|
-
let t =
|
|
5169
|
-
if (
|
|
5170
|
-
|
|
5172
|
+
let t = I - B;
|
|
5173
|
+
if (U && (Ee || F !== 5) && (t <= N || z < 0 && (F === 1 || F === 2) || F === 2 && (s[r - 1] & 15) == 9)) {
|
|
5174
|
+
ve = Ee ? de : t, I += Ce, ge = r + 1, _e = 0;
|
|
5171
5175
|
break decided;
|
|
5172
5176
|
}
|
|
5173
|
-
if (
|
|
5174
|
-
|
|
5177
|
+
if (F === 5 && !Ee && z < 0) {
|
|
5178
|
+
ge = r, _e = 0, ve = ue === r && r > n ? de : t;
|
|
5175
5179
|
break decided;
|
|
5176
5180
|
}
|
|
5177
|
-
let l = !!(
|
|
5178
|
-
if (
|
|
5179
|
-
|
|
5181
|
+
let l = !!(P & 32);
|
|
5182
|
+
if (F === 9 && l && ue === r && (ee === "start" ? de - pe / 2 <= N && I - pe / 2 > N : ee === "placed" && de - pe + Se - we <= N)) {
|
|
5183
|
+
ue = r + 1, de += Se, pe += Se, I += Ce, L = r + 1, R = 0;
|
|
5180
5184
|
continue;
|
|
5181
5185
|
}
|
|
5182
|
-
if (l &&
|
|
5183
|
-
|
|
5186
|
+
if (l && z >= 0 && (L = z, R = 0), !l || z >= 0) {
|
|
5187
|
+
V = !0;
|
|
5184
5188
|
break decided;
|
|
5185
5189
|
}
|
|
5186
|
-
if (p !== null && e - p[r] <=
|
|
5187
|
-
|
|
5190
|
+
if (p !== null && e - p[r] <= N) {
|
|
5191
|
+
I += Ce, L = r + 1, R = 0, B = p[r], b !== null && b[r] !== 0 && (I -= B, B = 0);
|
|
5188
5192
|
continue;
|
|
5189
5193
|
}
|
|
5190
|
-
if (
|
|
5194
|
+
if (F === 9 && M !== "item" && r + 1 < g && (s[r + 1] & 15) == 8) {
|
|
5191
5195
|
let e = s[r - 1], t = e & 15, i = t === 4 ? c[r - 1] : null;
|
|
5192
5196
|
if (i !== null) {
|
|
5193
|
-
let e = i.length, t = i[0], a =
|
|
5197
|
+
let e = i.length, t = i[0], a = M !== "fit" || I <= N ? 1 : t > 0 ? Math.min(e, Math.ceil((I - N) / t)) : e, o = C !== null && C[n] !== 0 ? n + 1 : n;
|
|
5194
5198
|
if (r - 1 > o || e - a > E) {
|
|
5195
|
-
|
|
5199
|
+
ge = r - 1, _e = e - a, ve = de;
|
|
5196
5200
|
break decided;
|
|
5197
5201
|
}
|
|
5198
5202
|
}
|
|
5199
5203
|
let a = t === 0 || t === 7 ? c[r - 1] : null, l = e & 16 ? u : 0;
|
|
5200
5204
|
if (a !== null && (r - 1 > n || a.length - 1 > E)) {
|
|
5201
|
-
|
|
5205
|
+
ge = r - 1, _e = a.length - 1, ve = I - a[_e] - l;
|
|
5202
5206
|
break decided;
|
|
5203
5207
|
}
|
|
5204
5208
|
if (a === null && (t === 0 || t === 7) && r - 1 > n) {
|
|
5205
|
-
|
|
5209
|
+
ge = r - 1, _e = 0, ve = I - o[r - 1] - l;
|
|
5206
5210
|
break decided;
|
|
5207
5211
|
}
|
|
5208
5212
|
if (i !== null || t !== 4 && t !== 5) {
|
|
5209
|
-
|
|
5213
|
+
I += Ce, L = r + 1, R = 0, B = 0;
|
|
5210
5214
|
continue;
|
|
5211
5215
|
}
|
|
5212
5216
|
}
|
|
5213
5217
|
if (c[r] === null) {
|
|
5214
|
-
|
|
5218
|
+
V = !0;
|
|
5215
5219
|
break decided;
|
|
5216
5220
|
}
|
|
5217
|
-
i = 0, a =
|
|
5221
|
+
i = 0, a = xe;
|
|
5218
5222
|
} else {
|
|
5219
|
-
|
|
5223
|
+
P & 64 && !U && z !== r && (z = r, se = I), ne && !U && !(P & 32) && r > n && !gl(s[r - 1] & 15) && (!re || I + (y === null ? l : y[r]) <= N) && (ce = r, le = I), L = r + 1, R = 0, b !== null && e > N && b[r] !== 0 ? (I += Ce - we, B = 0) : (I += Ce, Te !== 0 && !Ee && (B = e > N && F !== 9 ? we : 0)), U && (r + 1 === g || !(s[r + 1] & 32)) && (z = r + 1, se = Ee ? de : F === 5 ? I : I - Ce - B), ne && U && se + (y === null || z < 0 ? ie : y[z]) <= N && (ce = z, le = se);
|
|
5220
5224
|
continue;
|
|
5221
5225
|
}
|
|
5222
|
-
} else if (
|
|
5226
|
+
} else if (ye > 0) i = ye;
|
|
5223
5227
|
else {
|
|
5224
|
-
let e = d === null ? 0 : d[r], t = p !== null &&
|
|
5225
|
-
if (
|
|
5228
|
+
let e = d === null ? 0 : d[r], t = p !== null && Te + e - p[r] <= N ? p[r] : we;
|
|
5229
|
+
if (Te + e - t > N && c[r] !== null && !Ee) i = 0;
|
|
5226
5230
|
else {
|
|
5227
|
-
|
|
5231
|
+
oe = !0, L = r + 1, R = 0, I = Se + e, Ee && (de += e), B = Te + e > N && F !== 9 ? t : 0, b !== null && B !== 0 && b[r] !== 0 && (I -= B, B = 0), U && (r + 1 === g || !(s[r + 1] & 32)) && (z = r + 1, se = Ee ? de : F === 5 ? I : I - Ce), ne && U && se + (y === null || z < 0 ? ie : y[z]) <= N && (ce = z, le = se);
|
|
5228
5232
|
continue;
|
|
5229
5233
|
}
|
|
5230
5234
|
}
|
|
5231
5235
|
let De = c[r], Oe = De.length;
|
|
5232
5236
|
for (let t = i; t < Oe; t++) {
|
|
5233
5237
|
let n = De[t];
|
|
5234
|
-
if (
|
|
5235
|
-
let e =
|
|
5236
|
-
if (e + u >
|
|
5237
|
-
|
|
5238
|
+
if (oe) {
|
|
5239
|
+
let e = I + (n + (t > i ? u : a));
|
|
5240
|
+
if (e + u > N) break decided;
|
|
5241
|
+
I = e, L = r, R = t + 1;
|
|
5238
5242
|
} else {
|
|
5239
|
-
|
|
5243
|
+
oe = !0, L = r, R = t + 1;
|
|
5240
5244
|
let i = e.breakableLineStartExtras?.[r] ?? null;
|
|
5241
|
-
|
|
5245
|
+
I = i === null ? n : n + i[t], (t > 0 ? x !== null : S !== null) && (I += t > 0 ? x[r] : S[r]);
|
|
5242
5246
|
}
|
|
5243
5247
|
}
|
|
5244
|
-
|
|
5248
|
+
oe && L === r && R === Oe && (L = r + 1, R = 0);
|
|
5245
5249
|
}
|
|
5246
|
-
|
|
5250
|
+
ge = t, _e = 0, z === t && R === 0 ? (ve = se, V = !0) : ve = I - B;
|
|
5247
5251
|
}
|
|
5248
|
-
if (
|
|
5249
|
-
|
|
5250
|
-
let r =
|
|
5251
|
-
|
|
5252
|
+
if (oe) {
|
|
5253
|
+
V && ce >= 0 && z === L && R === 0 && El(e, n, L, se, N, P) ? (ge = ce, _e = 0, ve = le) : ge < 0 && (ge = L, _e = R, ve = z === L && R === 0 ? se : _ !== void 0 && ue === L && R === 0 ? de : I - B), t.segmentIndex = ge, t.graphemeIndex = _e;
|
|
5254
|
+
let r = _e === 0 && ue >= 0 && (ge === ue || ge === ue + 1) && (ue === g || (s[ue] & 15) == 8), i = (r ? I - B : ve) + xl(e, C, D, n, E, ge, _e);
|
|
5255
|
+
H = r ? Math.max(de, Math.min(i, te)) : i;
|
|
5252
5256
|
}
|
|
5253
5257
|
}
|
|
5254
|
-
if (
|
|
5258
|
+
if (H === null || (F = H, i !== null && (i.lineCount++, H > i.maxLineWidth && (i.maxLineWidth = H)), r?.(H, n, E, t.segmentIndex, t.graphemeIndex), a || !Cl(e, t))) break;
|
|
5255
5259
|
}
|
|
5256
|
-
return
|
|
5260
|
+
return F;
|
|
5257
5261
|
}
|
|
5258
5262
|
function Ol(e, t, n) {
|
|
5259
5263
|
let { widths: r, segmentFlags: i, breakableFitAdvances: a, lineStartExtras: o, lineEndTrims: s, overflowLineEndTrims: c } = e, l = Math.max(0, n) + Zs().lineFitEpsilon, u = t.segmentIndex, d = a[u], f = o === null ? r[u] : r[u] + o[u], p = s === null ? 0 : s[u], m = c !== null && f - c[u] <= l ? c[u] : p, h, g = 0;
|
|
@@ -5580,71 +5584,75 @@ function Gl({ active: e, board: t, contentBase: n, fontsVersion: i, id: a, inter
|
|
|
5580
5584
|
})]
|
|
5581
5585
|
});
|
|
5582
5586
|
}
|
|
5583
|
-
function Kl({ view: e, boards: t, groups: n, allBoards: r, contentBase: i, versions: a, pending: o, playing: s, onExpand: c, onTogglePlay: u, onReplay: d, parameters: f, activeParameters: m, onToggleParameters: h, verdicts: g }) {
|
|
5584
|
-
let
|
|
5585
|
-
|
|
5587
|
+
function Kl({ view: e, boards: t, groups: n, allBoards: r, contentBase: i, versions: a, pending: o, playing: s, onExpand: c, onTogglePlay: u, onReplay: d, parameters: f, activeParameters: m, onToggleParameters: h, verdicts: g, overlayRef: _ }) {
|
|
5588
|
+
let v = Ul(), [y, S] = X(() => /* @__PURE__ */ new Set()), C = q((e, t) => {
|
|
5589
|
+
S((n) => {
|
|
5586
5590
|
if (n.has(e) === t) return n;
|
|
5587
5591
|
let r = new Set(n);
|
|
5588
5592
|
return t ? r.add(e) : r.delete(e), r;
|
|
5589
5593
|
});
|
|
5590
|
-
}, []),
|
|
5591
|
-
return /* @__PURE__ */
|
|
5594
|
+
}, []), w = Vl(l(p, e.k), zl), T = Vl(l(b, e.k), Rl);
|
|
5595
|
+
return /* @__PURE__ */ Z("div", {
|
|
5592
5596
|
className: "x10l6tqk x10a8y8t x47corl xb3r6kr",
|
|
5593
|
-
children:
|
|
5594
|
-
|
|
5595
|
-
|
|
5596
|
-
|
|
5597
|
-
|
|
5598
|
-
|
|
5599
|
-
|
|
5600
|
-
|
|
5601
|
-
|
|
5602
|
-
|
|
5603
|
-
|
|
5604
|
-
|
|
5605
|
-
|
|
5606
|
-
|
|
5607
|
-
|
|
5608
|
-
|
|
5609
|
-
|
|
5610
|
-
|
|
5611
|
-
|
|
5612
|
-
|
|
5613
|
-
|
|
5614
|
-
|
|
5615
|
-
|
|
5616
|
-
|
|
5617
|
-
|
|
5618
|
-
|
|
5619
|
-
|
|
5620
|
-
|
|
5621
|
-
|
|
5622
|
-
|
|
5623
|
-
|
|
5624
|
-
|
|
5625
|
-
|
|
5626
|
-
|
|
5627
|
-
|
|
5628
|
-
|
|
5629
|
-
|
|
5630
|
-
|
|
5631
|
-
|
|
5632
|
-
|
|
5633
|
-
|
|
5634
|
-
|
|
5635
|
-
|
|
5636
|
-
|
|
5637
|
-
|
|
5638
|
-
|
|
5639
|
-
|
|
5640
|
-
|
|
5641
|
-
|
|
5642
|
-
|
|
5643
|
-
|
|
5644
|
-
|
|
5645
|
-
|
|
5646
|
-
|
|
5647
|
-
|
|
5597
|
+
children: /* @__PURE__ */ Q("div", {
|
|
5598
|
+
ref: _,
|
|
5599
|
+
className: "x10l6tqk x10a8y8t",
|
|
5600
|
+
children: [w !== null && n.map(([t, n]) => {
|
|
5601
|
+
let i = n.boards.map((e) => r[e]).filter((e) => !!e);
|
|
5602
|
+
if (i.length === 0) return null;
|
|
5603
|
+
let a = Math.min(...i.map((e) => e.x)), o = Math.min(...i.map((e) => e.y)), s = g?.states[t];
|
|
5604
|
+
return /* @__PURE__ */ Q("div", {
|
|
5605
|
+
"data-chrome": s ? "group-label" : void 0,
|
|
5606
|
+
"data-group-label": t,
|
|
5607
|
+
...{
|
|
5608
|
+
0: { className: "x10l6tqk x78zum5 x6s0dn4 x17d4w8g x1hj3fc7 x4z9k3i x1s688f xo2rkog xuxw1ft" },
|
|
5609
|
+
1: { className: "x10l6tqk x78zum5 x6s0dn4 x17d4w8g x1hj3fc7 x4z9k3i x1s688f xo2rkog xuxw1ft x67bb7w" }
|
|
5610
|
+
}[!!s | 0],
|
|
5611
|
+
style: {
|
|
5612
|
+
left: e.x + a * e.k,
|
|
5613
|
+
top: e.y + o * e.k - (T !== null && n.boards.some((e) => y.has(e)) ? 24 * T : 0),
|
|
5614
|
+
transform: `scale(${w}) translateY(calc(-100% - ${Bl}px))`
|
|
5615
|
+
},
|
|
5616
|
+
children: [
|
|
5617
|
+
/* @__PURE__ */ Z("span", {
|
|
5618
|
+
className: "xm9j1uf x12oqio5 x19ckca5 xs0jrwl x1fao0z8 x1j6dyjg xk50ysn xd4r4e8",
|
|
5619
|
+
children: t
|
|
5620
|
+
}),
|
|
5621
|
+
n.title,
|
|
5622
|
+
s && g && /* @__PURE__ */ Z(Ll, {
|
|
5623
|
+
canJudge: g.canJudge,
|
|
5624
|
+
evidenceAt: g.evidenceAt(t),
|
|
5625
|
+
verdict: s,
|
|
5626
|
+
onPass: () => g.pass(t),
|
|
5627
|
+
onReject: () => g.startReject(t),
|
|
5628
|
+
onUndo: () => g.undoPass(t)
|
|
5629
|
+
})
|
|
5630
|
+
]
|
|
5631
|
+
}, t);
|
|
5632
|
+
}), T !== null && t.map(([t, n]) => {
|
|
5633
|
+
let r = x(n, e);
|
|
5634
|
+
if (!r) return null;
|
|
5635
|
+
let l = ut(a, n.file) && !o.has(t);
|
|
5636
|
+
return /* @__PURE__ */ Z(Gl, {
|
|
5637
|
+
active: m === t,
|
|
5638
|
+
board: n,
|
|
5639
|
+
contentBase: i,
|
|
5640
|
+
fontsVersion: v,
|
|
5641
|
+
id: t,
|
|
5642
|
+
interactive: l && ft(n, a),
|
|
5643
|
+
modified: f?.[t],
|
|
5644
|
+
playing: s.has(t),
|
|
5645
|
+
ready: l,
|
|
5646
|
+
rect: r,
|
|
5647
|
+
scale: T,
|
|
5648
|
+
onExpand: c,
|
|
5649
|
+
onReplay: d,
|
|
5650
|
+
onStacked: C,
|
|
5651
|
+
onToggleParameters: h,
|
|
5652
|
+
onTogglePlay: u
|
|
5653
|
+
}, t);
|
|
5654
|
+
})]
|
|
5655
|
+
})
|
|
5648
5656
|
});
|
|
5649
5657
|
}
|
|
5650
5658
|
//#endregion
|
|
@@ -6885,7 +6893,7 @@ var Nu = {
|
|
|
6885
6893
|
right: 24,
|
|
6886
6894
|
bottom: 24,
|
|
6887
6895
|
left: 24
|
|
6888
|
-
}, Pu = .01, Fu = 420, Iu = s(.2, 0, 0, 1),
|
|
6896
|
+
}, Pu = .01, Fu = 420, Iu = 1.1, Lu = s(.2, 0, 0, 1), Ru = () => typeof matchMedia == "function" && matchMedia("(prefers-reduced-motion: reduce)").matches, zu = `[data-chrome]${[
|
|
6889
6897
|
"board-label",
|
|
6890
6898
|
"group-label",
|
|
6891
6899
|
"video-controls",
|
|
@@ -6893,72 +6901,102 @@ var Nu = {
|
|
|
6893
6901
|
"reject",
|
|
6894
6902
|
"parameters"
|
|
6895
6903
|
].map((e) => `:not([data-chrome="${e}"])`).join("")}`;
|
|
6896
|
-
function
|
|
6904
|
+
function Bu(e, t) {
|
|
6905
|
+
let n = t.k / e.k;
|
|
6906
|
+
return {
|
|
6907
|
+
x: t.x - e.x * n,
|
|
6908
|
+
y: t.y - e.y * n,
|
|
6909
|
+
scale: n
|
|
6910
|
+
};
|
|
6911
|
+
}
|
|
6912
|
+
function Vu(e, t, n) {
|
|
6913
|
+
let { x: r, y: i, scale: a } = Bu(e, t);
|
|
6914
|
+
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 > Iu || a < 1 / Iu;
|
|
6915
|
+
}
|
|
6916
|
+
function Hu(e, t, n, r) {
|
|
6897
6917
|
for (let i = e; i && i !== t; i = i.parentElement) {
|
|
6898
6918
|
let { overflowX: e, overflowY: t } = getComputedStyle(i);
|
|
6899
6919
|
if (r && /auto|scroll/.test(t) && i.scrollHeight > i.clientHeight || n && /auto|scroll/.test(e) && i.scrollWidth > i.clientWidth) return !0;
|
|
6900
6920
|
}
|
|
6901
6921
|
return !1;
|
|
6902
6922
|
}
|
|
6903
|
-
function
|
|
6923
|
+
function Uu(e) {
|
|
6904
6924
|
let t = Y(null), n = Y(null), [r, i] = X({
|
|
6905
6925
|
x: 0,
|
|
6906
6926
|
y: 0,
|
|
6907
6927
|
k: .5
|
|
6908
|
-
}), [a, o] = X(!1), [s, c] = X(!1), l = Y(null), d = Y(/* @__PURE__ */ new Map()), f = Y(r), p = Y(null), m = Y(!1), [_, b] = X(!1), x = Y(void 0), S =
|
|
6909
|
-
|
|
6910
|
-
|
|
6911
|
-
|
|
6912
|
-
e
|
|
6913
|
-
|
|
6914
|
-
|
|
6915
|
-
|
|
6916
|
-
|
|
6917
|
-
|
|
6928
|
+
}), [a, o] = X(!1), [s, c] = X(!1), l = Y(null), d = Y(/* @__PURE__ */ new Map()), f = Y(r), p = Y(null), m = Y(!1), [_, b] = X(!1), x = Y(void 0), S = Y(r), C = Y(/* @__PURE__ */ new Set()), w = Y({
|
|
6929
|
+
width: 0,
|
|
6930
|
+
height: 0
|
|
6931
|
+
}), T = q(() => {
|
|
6932
|
+
let { x: e, y: t, k: r } = f.current, i = n.current;
|
|
6933
|
+
i && (i.style.transform = `translate(${e}px, ${t}px) scale(${r})`, i.style.setProperty("--zoom", String(r)));
|
|
6934
|
+
let a = Bu(S.current, f.current), o = a.x === 0 && a.y === 0 && a.scale === 1 ? "" : `translate(${a.x}px, ${a.y}px) scale(${a.scale})`;
|
|
6935
|
+
for (let e of C.current) e.style.transform = o;
|
|
6936
|
+
}, []), E = q((e) => {
|
|
6937
|
+
n.current = e, T();
|
|
6938
|
+
}, [T]), D = q((e) => {
|
|
6939
|
+
if (e) return e.style.transformOrigin = "0 0", C.current.add(e), T(), () => {
|
|
6940
|
+
C.current.delete(e);
|
|
6941
|
+
};
|
|
6942
|
+
}, [T]);
|
|
6943
|
+
yt(() => {
|
|
6944
|
+
S.current = r, T();
|
|
6945
|
+
}, [r, T]);
|
|
6946
|
+
let O = q((e) => {
|
|
6947
|
+
n.current && (n.current.style.willChange = e);
|
|
6948
|
+
for (let t of C.current) t.style.willChange = e;
|
|
6949
|
+
}, []), k = q(() => {
|
|
6950
|
+
x.current === void 0 && (b(!0), O("transform")), clearTimeout(x.current), x.current = setTimeout(() => {
|
|
6951
|
+
x.current = void 0, O(""), b(!1), i(f.current);
|
|
6918
6952
|
}, 150);
|
|
6919
|
-
}, []),
|
|
6920
|
-
f.current =
|
|
6921
|
-
|
|
6953
|
+
}, [O]), A = q((e) => {
|
|
6954
|
+
f.current = e, T(), Vu(S.current, e, w.current) && i(e);
|
|
6955
|
+
}, [T]), j = q((e) => {
|
|
6956
|
+
f.current = typeof e == "function" ? e(f.current) : e, k(), !m.current && (m.current = !0, p.current = requestAnimationFrame(() => {
|
|
6957
|
+
m.current = !1, p.current = null, A(f.current);
|
|
6922
6958
|
}));
|
|
6923
|
-
}, [
|
|
6924
|
-
p.current !== null && cancelAnimationFrame(p.current), p.current = null, m.current = !1, f.current = e, t &&
|
|
6925
|
-
}, [
|
|
6959
|
+
}, [k, A]), ee = q((e, t = !1) => {
|
|
6960
|
+
p.current !== null && cancelAnimationFrame(p.current), p.current = null, m.current = !1, f.current = e, t && k(), T(), i(e);
|
|
6961
|
+
}, [k, T]);
|
|
6926
6962
|
J(() => () => {
|
|
6927
6963
|
p.current !== null && cancelAnimationFrame(p.current), clearTimeout(x.current);
|
|
6928
6964
|
}, []);
|
|
6929
|
-
let
|
|
6930
|
-
|
|
6965
|
+
let M = q((e) => ee(e), [ee]), te = Y(null), N = q(() => {
|
|
6966
|
+
te.current !== null && cancelAnimationFrame(te.current), te.current = null;
|
|
6931
6967
|
}, []);
|
|
6932
|
-
J(() =>
|
|
6933
|
-
let [
|
|
6968
|
+
J(() => N, [N]);
|
|
6969
|
+
let [ne, re] = X(() => ({
|
|
6934
6970
|
width: typeof innerWidth == "number" ? innerWidth : 0,
|
|
6935
6971
|
height: typeof innerHeight == "number" ? innerHeight : 0
|
|
6936
6972
|
}));
|
|
6937
6973
|
J(() => {
|
|
6938
6974
|
let e = t.current;
|
|
6939
6975
|
if (!e || typeof ResizeObserver != "function") return;
|
|
6940
|
-
let n = new ResizeObserver(() =>
|
|
6976
|
+
let n = new ResizeObserver(() => re((t) => t.width === e.clientWidth && t.height === e.clientHeight ? t : {
|
|
6941
6977
|
width: e.clientWidth,
|
|
6942
6978
|
height: e.clientHeight
|
|
6943
6979
|
}));
|
|
6944
6980
|
return n.observe(e), () => n.disconnect();
|
|
6945
|
-
}, [])
|
|
6946
|
-
|
|
6981
|
+
}, []), yt(() => {
|
|
6982
|
+
w.current = ne;
|
|
6983
|
+
}, [ne]);
|
|
6984
|
+
let ie = q((e, t) => j((n) => ({
|
|
6947
6985
|
...n,
|
|
6948
6986
|
x: n.x + e,
|
|
6949
6987
|
y: n.y + t
|
|
6950
|
-
})), [
|
|
6951
|
-
e.zoom ?
|
|
6952
|
-
}, [
|
|
6988
|
+
})), [j]), ae = q((e) => {
|
|
6989
|
+
e.zoom ? j((t) => y(t, Math.exp(-e.deltaY * Pu), e.x, e.y)) : ie(-e.deltaX, -e.deltaY);
|
|
6990
|
+
}, [ie, j]);
|
|
6953
6991
|
J(() => {
|
|
6954
6992
|
let e = t.current;
|
|
6955
6993
|
if (!e) return;
|
|
6956
6994
|
let n = (t) => {
|
|
6957
6995
|
let n = t.target, r = t.ctrlKey || t.metaKey;
|
|
6958
|
-
if (n?.closest?.(
|
|
6959
|
-
t.preventDefault(),
|
|
6996
|
+
if (n?.closest?.(zu) || !r && Hu(n, e, t.deltaX, t.deltaY)) return;
|
|
6997
|
+
t.preventDefault(), N();
|
|
6960
6998
|
let i = e.getBoundingClientRect(), a = t.deltaMode === 1 ? 16 : t.deltaMode === 2 ? e.clientHeight : 1;
|
|
6961
|
-
|
|
6999
|
+
ae({
|
|
6962
7000
|
deltaX: t.deltaX * a,
|
|
6963
7001
|
deltaY: t.deltaY * a,
|
|
6964
7002
|
x: t.clientX - i.left,
|
|
@@ -6971,7 +7009,7 @@ function Bu(e) {
|
|
|
6971
7009
|
return e.addEventListener("wheel", n, { passive: !1 }), window.addEventListener("wheel", r, { passive: !1 }), () => {
|
|
6972
7010
|
e.removeEventListener("wheel", n), window.removeEventListener("wheel", r);
|
|
6973
7011
|
};
|
|
6974
|
-
}, [
|
|
7012
|
+
}, [ae, N]), J(() => {
|
|
6975
7013
|
let e = (e) => e.target?.closest?.("input, textarea, select, [contenteditable], [data-chrome]"), t = (t) => {
|
|
6976
7014
|
t.code === "Space" && !e(t) && (t.preventDefault(), o(!0));
|
|
6977
7015
|
}, n = (e) => {
|
|
@@ -6981,16 +7019,16 @@ function Bu(e) {
|
|
|
6981
7019
|
window.removeEventListener("keydown", t), window.removeEventListener("keyup", n), window.removeEventListener("blur", r);
|
|
6982
7020
|
};
|
|
6983
7021
|
}, []);
|
|
6984
|
-
let
|
|
7022
|
+
let P = e === "hand" || a, F = q((e) => {
|
|
6985
7023
|
let t = e.pointerType === "touch", n = e.button === 1;
|
|
6986
|
-
(t || (
|
|
7024
|
+
(t || (P || n) && (e.button === 0 || n)) && e.currentTarget.contains(e.target) && (e.target.closest("[data-chrome]") || (N(), e.currentTarget.setPointerCapture(e.pointerId), l.current = {
|
|
6987
7025
|
x: e.clientX,
|
|
6988
7026
|
y: e.clientY
|
|
6989
7027
|
}, t && d.current.set(e.pointerId, {
|
|
6990
7028
|
x: e.clientX,
|
|
6991
7029
|
y: e.clientY
|
|
6992
7030
|
}), c(!0)));
|
|
6993
|
-
}, [
|
|
7031
|
+
}, [P, N]), I = q((e) => {
|
|
6994
7032
|
if (e.pointerType === "touch" && !d.current.has(e.pointerId)) return;
|
|
6995
7033
|
if (d.current.has(e.pointerId)) {
|
|
6996
7034
|
let t = [...d.current.values()];
|
|
@@ -7000,7 +7038,7 @@ function Bu(e) {
|
|
|
7000
7038
|
});
|
|
7001
7039
|
let n = [...d.current.values()];
|
|
7002
7040
|
if (t.length >= 2) {
|
|
7003
|
-
|
|
7041
|
+
j((e) => h(e, [t[0], t[1]], [n[0], n[1]]));
|
|
7004
7042
|
return;
|
|
7005
7043
|
}
|
|
7006
7044
|
}
|
|
@@ -7008,72 +7046,79 @@ function Bu(e) {
|
|
|
7008
7046
|
t && (l.current = {
|
|
7009
7047
|
x: e.clientX,
|
|
7010
7048
|
y: e.clientY
|
|
7011
|
-
},
|
|
7049
|
+
}, j((n) => ({
|
|
7012
7050
|
...n,
|
|
7013
7051
|
x: n.x + e.clientX - t.x,
|
|
7014
7052
|
y: n.y + e.clientY - t.y
|
|
7015
7053
|
})));
|
|
7016
|
-
}, [
|
|
7054
|
+
}, [j]), oe = q((e) => {
|
|
7017
7055
|
e ? d.current.delete(e.pointerId) : d.current.clear();
|
|
7018
7056
|
let t = [...d.current.values()][0];
|
|
7019
7057
|
l.current = t ? { ...t } : null, t || c(!1);
|
|
7020
|
-
}, []),
|
|
7058
|
+
}, []), L = () => {
|
|
7021
7059
|
let e = t.current;
|
|
7022
7060
|
return {
|
|
7023
7061
|
cx: (e?.clientWidth ?? 0) / 2,
|
|
7024
7062
|
cy: (e?.clientHeight ?? 0) / 2
|
|
7025
7063
|
};
|
|
7026
|
-
}
|
|
7064
|
+
}, R = q((e, n = Nu, r = {}) => {
|
|
7065
|
+
let i = t.current;
|
|
7066
|
+
if (!i || !e) return;
|
|
7067
|
+
let a = v(e, {
|
|
7068
|
+
width: i.clientWidth,
|
|
7069
|
+
height: i.clientHeight
|
|
7070
|
+
}, n);
|
|
7071
|
+
if (N(), !r.animate || Ru()) {
|
|
7072
|
+
ee(a);
|
|
7073
|
+
return;
|
|
7074
|
+
}
|
|
7075
|
+
let o = f.current, s = performance.now(), c = () => {
|
|
7076
|
+
let e = Math.min(1, (performance.now() - s) / Fu);
|
|
7077
|
+
e === 1 ? ee(a, !0) : (k(), A(u(o, a, Lu(e)))), te.current = e === 1 ? null : requestAnimationFrame(c);
|
|
7078
|
+
};
|
|
7079
|
+
te.current = requestAnimationFrame(c);
|
|
7080
|
+
}, [
|
|
7081
|
+
N,
|
|
7082
|
+
ee,
|
|
7083
|
+
k,
|
|
7084
|
+
A
|
|
7085
|
+
]), z = q((e) => {
|
|
7086
|
+
let { cx: t, cy: n } = L();
|
|
7087
|
+
j((r) => y(r, e, t, n));
|
|
7088
|
+
}, [j]), se = q((e) => {
|
|
7089
|
+
let { cx: t, cy: n } = L();
|
|
7090
|
+
j((r) => g(r, e, t, n));
|
|
7091
|
+
}, [j]);
|
|
7027
7092
|
return {
|
|
7028
7093
|
viewportRef: t,
|
|
7029
|
-
worldRef:
|
|
7094
|
+
worldRef: E,
|
|
7095
|
+
overlayRef: D,
|
|
7030
7096
|
view: r,
|
|
7097
|
+
viewNow: q(() => f.current, []),
|
|
7031
7098
|
gesturing: _,
|
|
7032
7099
|
scaling: _,
|
|
7033
|
-
size:
|
|
7034
|
-
place:
|
|
7035
|
-
fit:
|
|
7036
|
-
|
|
7037
|
-
|
|
7038
|
-
|
|
7039
|
-
|
|
7040
|
-
|
|
7041
|
-
}, n);
|
|
7042
|
-
if (k(), !r.animate || Lu()) {
|
|
7043
|
-
E(a);
|
|
7044
|
-
return;
|
|
7045
|
-
}
|
|
7046
|
-
let o = f.current, s = performance.now(), c = () => {
|
|
7047
|
-
let e = Math.min(1, (performance.now() - s) / Fu);
|
|
7048
|
-
E(e === 1 ? a : u(o, a, Iu(e)), !0), O.current = e === 1 ? null : requestAnimationFrame(c);
|
|
7049
|
-
};
|
|
7050
|
-
O.current = requestAnimationFrame(c);
|
|
7051
|
-
}, [k, E]),
|
|
7052
|
-
zoomBy: q((e) => {
|
|
7053
|
-
let { cx: t, cy: n } = ae();
|
|
7054
|
-
T((r) => y(r, e, t, n));
|
|
7055
|
-
}, [T]),
|
|
7056
|
-
zoomTo: q((e) => {
|
|
7057
|
-
let { cx: t, cy: n } = ae();
|
|
7058
|
-
T((r) => g(r, e, t, n));
|
|
7059
|
-
}, [T]),
|
|
7060
|
-
panBy: ee,
|
|
7061
|
-
wheelAt: te,
|
|
7062
|
-
panning: ne,
|
|
7100
|
+
size: ne,
|
|
7101
|
+
place: M,
|
|
7102
|
+
fit: R,
|
|
7103
|
+
zoomBy: z,
|
|
7104
|
+
zoomTo: se,
|
|
7105
|
+
panBy: ie,
|
|
7106
|
+
wheelAt: ae,
|
|
7107
|
+
panning: P,
|
|
7063
7108
|
setSpaceHeld: o,
|
|
7064
|
-
cursor: s ? "grabbing" :
|
|
7065
|
-
hand: s ? "pinch" :
|
|
7109
|
+
cursor: s ? "grabbing" : P ? "grab" : e === "comment" ? xu : "default",
|
|
7110
|
+
hand: s ? "pinch" : P ? "open" : null,
|
|
7066
7111
|
handlers: {
|
|
7067
|
-
onPointerDown:
|
|
7068
|
-
onPointerMove:
|
|
7069
|
-
onPointerUp:
|
|
7070
|
-
onPointerCancel:
|
|
7112
|
+
onPointerDown: F,
|
|
7113
|
+
onPointerMove: I,
|
|
7114
|
+
onPointerUp: oe,
|
|
7115
|
+
onPointerCancel: oe
|
|
7071
7116
|
}
|
|
7072
7117
|
};
|
|
7073
7118
|
}
|
|
7074
7119
|
//#endregion
|
|
7075
7120
|
//#region src/viewer/lib/selection.ts
|
|
7076
|
-
function
|
|
7121
|
+
function Wu({ boards: e, frames: t, targets: n, details: r }) {
|
|
7077
7122
|
let i = /* @__PURE__ */ new Map();
|
|
7078
7123
|
for (let [n, r] of Object.entries(t)) {
|
|
7079
7124
|
let t = e[n];
|
|
@@ -7115,15 +7160,15 @@ function Vu({ boards: e, frames: t, targets: n, details: r }) {
|
|
|
7115
7160
|
nodes: [...i.values()]
|
|
7116
7161
|
};
|
|
7117
7162
|
}
|
|
7118
|
-
var
|
|
7119
|
-
function
|
|
7120
|
-
let n = e.selected.filter((e) =>
|
|
7163
|
+
var Gu = (e) => e.id.length <= Qe.id && e.board.length <= Qe.board && e.file.length <= Qe.file && e.tag.length <= Qe.tag && e.path.length <= Qe.path && e.name.length <= Qe.name, Ku = (e) => new TextEncoder().encode(JSON.stringify(e)).length;
|
|
7164
|
+
function qu(e, t = nt) {
|
|
7165
|
+
let n = e.selected.filter((e) => Gu(e) && e.text.length <= Qe.text && e.html.length <= Qe.html), r = e.tweaks.filter((e) => Gu(e) && e.from.length <= Qe.from && e.value.length <= Qe.value), i = {
|
|
7121
7166
|
...e,
|
|
7122
7167
|
selected: n,
|
|
7123
7168
|
tweaks: r,
|
|
7124
|
-
nodes: e.nodes.filter(
|
|
7169
|
+
nodes: e.nodes.filter(Gu).slice(0, ct)
|
|
7125
7170
|
};
|
|
7126
|
-
for (let e =
|
|
7171
|
+
for (let e = Ku(i); e > t && i.nodes.length; e = Ku(i)) i = {
|
|
7127
7172
|
...i,
|
|
7128
7173
|
nodes: i.nodes.slice(0, Math.floor(i.nodes.length * Math.min(.95, t / e)))
|
|
7129
7174
|
};
|
|
@@ -7131,9 +7176,9 @@ function Wu(e, t = nt) {
|
|
|
7131
7176
|
}
|
|
7132
7177
|
//#endregion
|
|
7133
7178
|
//#region src/viewer/hooks/useSelectionSync.ts
|
|
7134
|
-
var
|
|
7135
|
-
function
|
|
7136
|
-
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 = bt(() => JSON.parse(u), [u]), f = bt(() =>
|
|
7179
|
+
var Ju = crypto.randomUUID();
|
|
7180
|
+
function Yu({ artifact: e, boards: t, live: n, inspector: r, send: i }) {
|
|
7181
|
+
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 = bt(() => JSON.parse(u), [u]), f = bt(() => Wu({
|
|
7137
7182
|
boards: t ?? {},
|
|
7138
7183
|
frames: o,
|
|
7139
7184
|
targets: d.map(([e, t]) => ({
|
|
@@ -7151,10 +7196,10 @@ function Ku({ artifact: e, boards: t, live: n, inspector: r, send: i }) {
|
|
|
7151
7196
|
if (!e || !i || !n) return;
|
|
7152
7197
|
let t = setTimeout(() => {
|
|
7153
7198
|
let t = l !== a.current;
|
|
7154
|
-
a.current = l, i(
|
|
7199
|
+
a.current = l, i(qu({
|
|
7155
7200
|
type: "selection",
|
|
7156
7201
|
artifact: e,
|
|
7157
|
-
tab:
|
|
7202
|
+
tab: Ju,
|
|
7158
7203
|
human: t,
|
|
7159
7204
|
...f
|
|
7160
7205
|
}));
|
|
@@ -7170,15 +7215,15 @@ function Ku({ artifact: e, boards: t, live: n, inspector: r, send: i }) {
|
|
|
7170
7215
|
}
|
|
7171
7216
|
//#endregion
|
|
7172
7217
|
//#region src/shared/verdicts.ts
|
|
7173
|
-
var
|
|
7174
|
-
function
|
|
7175
|
-
let r = e.filter((e) => e.anchor.group === t && e.anchor.verdict && e.messages.some((e) => !e.deleted)).sort((e, t) =>
|
|
7218
|
+
var Xu = (e) => e.messages[0]?.at ?? e.statusAt;
|
|
7219
|
+
function Zu(e, t, n) {
|
|
7220
|
+
let r = e.filter((e) => e.anchor.group === t && e.anchor.verdict && e.messages.some((e) => !e.deleted)).sort((e, t) => Xu(e) < Xu(t) ? -1 : +(Xu(e) > Xu(t))), i = r.filter((e) => e.anchor.verdict === "reject" && e.status === "open").length, a = r.at(-1);
|
|
7176
7221
|
if (!a) return {
|
|
7177
7222
|
state: "pending",
|
|
7178
7223
|
evidenceUpdated: !1,
|
|
7179
7224
|
rejectThreads: i
|
|
7180
7225
|
};
|
|
7181
|
-
let o =
|
|
7226
|
+
let o = Xu(a);
|
|
7182
7227
|
return n.has(a.id) ? {
|
|
7183
7228
|
state: "pending",
|
|
7184
7229
|
at: o,
|
|
@@ -7196,11 +7241,11 @@ function Ju(e, t, n) {
|
|
|
7196
7241
|
rejectThreads: i
|
|
7197
7242
|
};
|
|
7198
7243
|
}
|
|
7199
|
-
function
|
|
7244
|
+
function Qu(e, t, n) {
|
|
7200
7245
|
return Object.entries(e).filter(([, e]) => e.verify === !0 && e.boards.some((e) => t[e]?.page === n));
|
|
7201
7246
|
}
|
|
7202
|
-
function
|
|
7203
|
-
let a =
|
|
7247
|
+
function $u(e, t, n, r, i) {
|
|
7248
|
+
let a = Qu(e, t, n), o = a.map(([e]) => [e, Zu(r, e, i).state]), s = o.find(([, e]) => e !== "pass")?.[0];
|
|
7204
7249
|
return {
|
|
7205
7250
|
passed: o.filter(([, e]) => e === "pass").length,
|
|
7206
7251
|
total: a.length,
|
|
@@ -7209,14 +7254,14 @@ function Xu(e, t, n, r, i) {
|
|
|
7209
7254
|
}
|
|
7210
7255
|
//#endregion
|
|
7211
7256
|
//#region src/viewer/hooks/useVerdicts.ts
|
|
7212
|
-
function
|
|
7213
|
-
let [o, s] = X(null), c = bt(() => e?.groups ?? {}, [e]), l = bt(() => e?.boards ?? {}, [e]), u = bt(() => Object.fromEntries(
|
|
7257
|
+
function ed({ canvas: e, page: t, threads: n, stale: r, versions: i, comment: a }) {
|
|
7258
|
+
let [o, s] = X(null), c = bt(() => e?.groups ?? {}, [e]), l = bt(() => e?.boards ?? {}, [e]), u = bt(() => Object.fromEntries(Qu(c, l, t).map(([e]) => [e, Zu(n, e, r)])), [
|
|
7214
7259
|
c,
|
|
7215
7260
|
l,
|
|
7216
7261
|
t,
|
|
7217
7262
|
n,
|
|
7218
7263
|
r
|
|
7219
|
-
]), d = bt(() =>
|
|
7264
|
+
]), d = bt(() => $u(c, l, t, n, r), [
|
|
7220
7265
|
c,
|
|
7221
7266
|
l,
|
|
7222
7267
|
t,
|
|
@@ -7272,7 +7317,7 @@ function Zu({ canvas: e, page: t, threads: n, stale: r, versions: i, comment: a
|
|
|
7272
7317
|
}
|
|
7273
7318
|
//#endregion
|
|
7274
7319
|
//#region src/viewer/inspector/InspectionOutline.tsx
|
|
7275
|
-
function
|
|
7320
|
+
function td({ board: e, rect: t, view: n, name: r, nodeId: i, selected: a }) {
|
|
7276
7321
|
return t.width <= 0 || t.height <= 0 ? null : /* @__PURE__ */ Q("div", {
|
|
7277
7322
|
"aria-hidden": "true",
|
|
7278
7323
|
"data-outline": "",
|
|
@@ -7311,7 +7356,7 @@ function Qu({ board: e, rect: t, view: n, name: r, nodeId: i, selected: a }) {
|
|
|
7311
7356
|
}
|
|
7312
7357
|
//#endregion
|
|
7313
7358
|
//#region src/viewer/inspector/Layers.tsx
|
|
7314
|
-
var
|
|
7359
|
+
var nd = {
|
|
7315
7360
|
Frame: hn,
|
|
7316
7361
|
Column: un,
|
|
7317
7362
|
Row: Dn,
|
|
@@ -7320,21 +7365,21 @@ var $u = {
|
|
|
7320
7365
|
Text: An,
|
|
7321
7366
|
Image: vn,
|
|
7322
7367
|
Button: Cn
|
|
7323
|
-
},
|
|
7324
|
-
function
|
|
7325
|
-
let [s, c] = X([]), l = Y(null), u = Y(null), d = Y(!1), f = n && t[n.boardId] ?
|
|
7368
|
+
}, rd = (e, t, n) => `${encodeURIComponent(e)}:${encodeURIComponent(t)}:${n}`;
|
|
7369
|
+
function id({ boards: e, frames: t, selection: n, targets: r, playing: i, select: a, hoverNode: o }) {
|
|
7370
|
+
let [s, c] = X([]), l = Y(null), u = Y(null), d = Y(!1), f = n && t[n.boardId] ? rd(n.boardId, t[n.boardId].session, n.node.id) : null, p = r ? r.flatMap((e) => t[e.boardId] ? [rd(e.boardId, t[e.boardId].session, e.id)] : []) : f ? [f] : [], m = p.join("|"), { treeData: h, byKey: g } = bt(() => {
|
|
7326
7371
|
let n = new Set(m ? m.split("|") : []), r = /* @__PURE__ */ new Map(), a = [];
|
|
7327
7372
|
for (let [o, s] of e) {
|
|
7328
7373
|
let e = t[o];
|
|
7329
7374
|
if (!e?.nodes[0]) continue;
|
|
7330
7375
|
let c = new Map(e.nodes.map((e) => [e.id, e])), l = i.has(o), u = (t, i) => {
|
|
7331
|
-
let a =
|
|
7376
|
+
let a = rd(o, e.session, t.id);
|
|
7332
7377
|
r.set(a, {
|
|
7333
7378
|
boardId: o,
|
|
7334
7379
|
node: t,
|
|
7335
7380
|
parentKey: i
|
|
7336
7381
|
});
|
|
7337
|
-
let d = i === null ? "Frame" : t.kind, f = i === null ? s.title || o : t.name, p =
|
|
7382
|
+
let d = i === null ? "Frame" : t.kind, f = i === null ? s.title || o : t.name, p = nd[d];
|
|
7338
7383
|
return {
|
|
7339
7384
|
key: a,
|
|
7340
7385
|
disabled: l,
|
|
@@ -7463,14 +7508,14 @@ function td({ boards: e, frames: t, selection: n, targets: r, playing: i, select
|
|
|
7463
7508
|
}
|
|
7464
7509
|
//#endregion
|
|
7465
7510
|
//#region src/viewer/inspector/Properties.tsx
|
|
7466
|
-
var
|
|
7511
|
+
var ad = (e) => Number.isFinite(parseFloat(e)) ? Math.round(parseFloat(e) * 100) / 100 : 0, od = (e) => e.map(([e, t]) => ({
|
|
7467
7512
|
value: e,
|
|
7468
7513
|
label: t
|
|
7469
|
-
})),
|
|
7514
|
+
})), sd = (e) => {
|
|
7470
7515
|
let t = e.match(/^rgba?\(([\d.]+),\s*([\d.]+),\s*([\d.]+)(?:,\s*([\d.]+))?\)$/);
|
|
7471
7516
|
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;
|
|
7472
7517
|
};
|
|
7473
|
-
function
|
|
7518
|
+
function cd({ label: e, children: t, controlId: n }) {
|
|
7474
7519
|
return /* @__PURE__ */ Q("div", {
|
|
7475
7520
|
...G($.field),
|
|
7476
7521
|
children: [n ? /* @__PURE__ */ Z("label", {
|
|
@@ -7486,7 +7531,7 @@ function ad({ label: e, children: t, controlId: n }) {
|
|
|
7486
7531
|
})]
|
|
7487
7532
|
});
|
|
7488
7533
|
}
|
|
7489
|
-
function
|
|
7534
|
+
function ld({ label: e, property: t, node: n, change: r, unit: i = "px", max: a, min: o = 0, step: s = 1, sizing: c }) {
|
|
7490
7535
|
let l = vt(), u = /* @__PURE__ */ Z(Mt, {
|
|
7491
7536
|
controls: !1,
|
|
7492
7537
|
id: l,
|
|
@@ -7496,12 +7541,12 @@ function od({ label: e, property: t, node: n, change: r, unit: i = "px", max: a,
|
|
|
7496
7541
|
step: s,
|
|
7497
7542
|
style: { width: "100%" },
|
|
7498
7543
|
suffix: i || void 0,
|
|
7499
|
-
value:
|
|
7544
|
+
value: ad(n.css[t]),
|
|
7500
7545
|
onChange: (e) => {
|
|
7501
7546
|
e !== null && r(t, String(e) + i);
|
|
7502
7547
|
}
|
|
7503
7548
|
});
|
|
7504
|
-
return /* @__PURE__ */ Z(
|
|
7549
|
+
return /* @__PURE__ */ Z(cd, {
|
|
7505
7550
|
controlId: l,
|
|
7506
7551
|
label: e,
|
|
7507
7552
|
children: c ? /* @__PURE__ */ Q("div", {
|
|
@@ -7516,14 +7561,14 @@ function od({ label: e, property: t, node: n, change: r, unit: i = "px", max: a,
|
|
|
7516
7561
|
}) : u
|
|
7517
7562
|
});
|
|
7518
7563
|
}
|
|
7519
|
-
function
|
|
7564
|
+
function ud({ label: e, property: t, values: n, node: r, change: i }) {
|
|
7520
7565
|
let a = vt(), o = r.css[t], s = n.some(([e]) => e === o) ? n : [...n, [o, o]];
|
|
7521
|
-
return /* @__PURE__ */ Z(
|
|
7566
|
+
return /* @__PURE__ */ Z(cd, {
|
|
7522
7567
|
controlId: a,
|
|
7523
7568
|
label: e,
|
|
7524
7569
|
children: /* @__PURE__ */ Z(Vt, {
|
|
7525
7570
|
id: a,
|
|
7526
|
-
options:
|
|
7571
|
+
options: od(s),
|
|
7527
7572
|
size: "small",
|
|
7528
7573
|
style: { width: "100%" },
|
|
7529
7574
|
value: o,
|
|
@@ -7533,7 +7578,7 @@ function sd({ label: e, property: t, values: n, node: r, change: i }) {
|
|
|
7533
7578
|
})
|
|
7534
7579
|
});
|
|
7535
7580
|
}
|
|
7536
|
-
function
|
|
7581
|
+
function dd({ node: e, change: t }) {
|
|
7537
7582
|
let n = {
|
|
7538
7583
|
node: e,
|
|
7539
7584
|
change: t
|
|
@@ -7546,7 +7591,7 @@ function cd({ node: e, change: t }) {
|
|
|
7546
7591
|
...G($.sectionTitle),
|
|
7547
7592
|
children: W("inspector.size")
|
|
7548
7593
|
}),
|
|
7549
|
-
/* @__PURE__ */ Z(
|
|
7594
|
+
/* @__PURE__ */ Z(ld, {
|
|
7550
7595
|
...n,
|
|
7551
7596
|
label: W("inspector.width"),
|
|
7552
7597
|
property: "width",
|
|
@@ -7559,15 +7604,15 @@ function cd({ node: e, change: t }) {
|
|
|
7559
7604
|
id: r,
|
|
7560
7605
|
size: "small",
|
|
7561
7606
|
value: e.widthMode,
|
|
7562
|
-
options:
|
|
7607
|
+
options: od([
|
|
7563
7608
|
["fixed", W("inspector.fixed")],
|
|
7564
7609
|
["fill", W("inspector.fill")],
|
|
7565
7610
|
["hug", W("inspector.hug")]
|
|
7566
7611
|
]),
|
|
7567
|
-
onChange: (n) => t("width", n === "fill" ? "100%" : n === "hug" ? "max-content" : `${
|
|
7612
|
+
onChange: (n) => t("width", n === "fill" ? "100%" : n === "hug" ? "max-content" : `${ad(e.css.width) || e.rect.width}px`)
|
|
7568
7613
|
})] })
|
|
7569
7614
|
}),
|
|
7570
|
-
/* @__PURE__ */ Z(
|
|
7615
|
+
/* @__PURE__ */ Z(ld, {
|
|
7571
7616
|
...n,
|
|
7572
7617
|
label: W("inspector.height"),
|
|
7573
7618
|
property: "height",
|
|
@@ -7580,11 +7625,11 @@ function cd({ node: e, change: t }) {
|
|
|
7580
7625
|
id: i,
|
|
7581
7626
|
size: "small",
|
|
7582
7627
|
value: e.heightMode,
|
|
7583
|
-
options:
|
|
7584
|
-
onChange: (n) => t("height", n === "hug" ? "auto" : `${
|
|
7628
|
+
options: od([["hug", W("inspector.hug")], ["fixed", W("inspector.fixed")]]),
|
|
7629
|
+
onChange: (n) => t("height", n === "hug" ? "auto" : `${ad(e.css.height) || e.rect.height}px`)
|
|
7585
7630
|
})] })
|
|
7586
7631
|
}),
|
|
7587
|
-
/* @__PURE__ */ Z(
|
|
7632
|
+
/* @__PURE__ */ Z(ud, {
|
|
7588
7633
|
...n,
|
|
7589
7634
|
label: W("inspector.position"),
|
|
7590
7635
|
property: "position",
|
|
@@ -7596,7 +7641,7 @@ function cd({ node: e, change: t }) {
|
|
|
7596
7641
|
["sticky", W("inspector.sticky")]
|
|
7597
7642
|
]
|
|
7598
7643
|
}),
|
|
7599
|
-
/* @__PURE__ */ Z(
|
|
7644
|
+
/* @__PURE__ */ Z(ld, {
|
|
7600
7645
|
...n,
|
|
7601
7646
|
label: W("inspector.grow"),
|
|
7602
7647
|
max: 100,
|
|
@@ -7612,7 +7657,7 @@ function cd({ node: e, change: t }) {
|
|
|
7612
7657
|
...G($.sectionTitle),
|
|
7613
7658
|
children: W("inspector.layout")
|
|
7614
7659
|
}),
|
|
7615
|
-
/* @__PURE__ */ Z(
|
|
7660
|
+
/* @__PURE__ */ Z(ud, {
|
|
7616
7661
|
...n,
|
|
7617
7662
|
label: W("inspector.layout"),
|
|
7618
7663
|
property: "display",
|
|
@@ -7625,7 +7670,7 @@ function cd({ node: e, change: t }) {
|
|
|
7625
7670
|
["none", W("inspector.hidden")]
|
|
7626
7671
|
]
|
|
7627
7672
|
}),
|
|
7628
|
-
(e.css.display === "flex" || e.css.display === "inline-flex") && /* @__PURE__ */ Q(St, { children: [/* @__PURE__ */ Z(
|
|
7673
|
+
(e.css.display === "flex" || e.css.display === "inline-flex") && /* @__PURE__ */ Q(St, { children: [/* @__PURE__ */ Z(cd, {
|
|
7629
7674
|
label: W("inspector.direction"),
|
|
7630
7675
|
children: /* @__PURE__ */ Z(Bt, {
|
|
7631
7676
|
block: !0,
|
|
@@ -7656,14 +7701,14 @@ function cd({ node: e, change: t }) {
|
|
|
7656
7701
|
}],
|
|
7657
7702
|
onChange: (e) => t("flex-direction", e)
|
|
7658
7703
|
})
|
|
7659
|
-
}), /* @__PURE__ */ Z(
|
|
7704
|
+
}), /* @__PURE__ */ Z(cd, {
|
|
7660
7705
|
label: W("inspector.align"),
|
|
7661
7706
|
children: /* @__PURE__ */ Z(Bt, {
|
|
7662
7707
|
block: !0,
|
|
7663
7708
|
"aria-label": W("inspector.align"),
|
|
7664
7709
|
size: "small",
|
|
7665
7710
|
value: e.css["align-items"],
|
|
7666
|
-
options:
|
|
7711
|
+
options: od([
|
|
7667
7712
|
["flex-start", W("inspector.start")],
|
|
7668
7713
|
["center", W("inspector.center")],
|
|
7669
7714
|
["stretch", W("inspector.fill")]
|
|
@@ -7671,12 +7716,12 @@ function cd({ node: e, change: t }) {
|
|
|
7671
7716
|
onChange: (e) => t("align-items", e)
|
|
7672
7717
|
})
|
|
7673
7718
|
})] }),
|
|
7674
|
-
/* @__PURE__ */ Z(
|
|
7719
|
+
/* @__PURE__ */ Z(ld, {
|
|
7675
7720
|
...n,
|
|
7676
7721
|
label: W("inspector.gap"),
|
|
7677
7722
|
property: "gap"
|
|
7678
7723
|
}),
|
|
7679
|
-
/* @__PURE__ */ Z(
|
|
7724
|
+
/* @__PURE__ */ Z(ld, {
|
|
7680
7725
|
...n,
|
|
7681
7726
|
label: W("inspector.padding"),
|
|
7682
7727
|
property: "padding"
|
|
@@ -7690,18 +7735,18 @@ function cd({ node: e, change: t }) {
|
|
|
7690
7735
|
...G($.sectionTitle),
|
|
7691
7736
|
children: W("inspector.appearance")
|
|
7692
7737
|
}),
|
|
7693
|
-
/* @__PURE__ */ Z(
|
|
7738
|
+
/* @__PURE__ */ Z(cd, {
|
|
7694
7739
|
label: W("inspector.fill"),
|
|
7695
7740
|
children: /* @__PURE__ */ Z(Et, {
|
|
7696
7741
|
alpha: !0,
|
|
7697
7742
|
recent: !1,
|
|
7698
7743
|
size: "small",
|
|
7699
7744
|
trigger: "field",
|
|
7700
|
-
value:
|
|
7745
|
+
value: sd(e.css["background-color"]),
|
|
7701
7746
|
onChange: (e) => t("background-color", e)
|
|
7702
7747
|
})
|
|
7703
7748
|
}),
|
|
7704
|
-
/* @__PURE__ */ Z(
|
|
7749
|
+
/* @__PURE__ */ Z(ld, {
|
|
7705
7750
|
...n,
|
|
7706
7751
|
label: W("inspector.opacity"),
|
|
7707
7752
|
max: 1,
|
|
@@ -7709,12 +7754,12 @@ function cd({ node: e, change: t }) {
|
|
|
7709
7754
|
step: .1,
|
|
7710
7755
|
unit: ""
|
|
7711
7756
|
}),
|
|
7712
|
-
/* @__PURE__ */ Z(
|
|
7757
|
+
/* @__PURE__ */ Z(ld, {
|
|
7713
7758
|
...n,
|
|
7714
7759
|
label: W("inspector.radius"),
|
|
7715
7760
|
property: "border-radius"
|
|
7716
7761
|
}),
|
|
7717
|
-
/* @__PURE__ */ Z(
|
|
7762
|
+
/* @__PURE__ */ Z(ud, {
|
|
7718
7763
|
...n,
|
|
7719
7764
|
label: W("inspector.border"),
|
|
7720
7765
|
property: "border-style",
|
|
@@ -7759,26 +7804,26 @@ function cd({ node: e, change: t }) {
|
|
|
7759
7804
|
items: [{
|
|
7760
7805
|
key: "typography",
|
|
7761
7806
|
title: W("inspector.typography"),
|
|
7762
|
-
children: /* @__PURE__ */ Q(St, { children: [/* @__PURE__ */ Z(
|
|
7807
|
+
children: /* @__PURE__ */ Q(St, { children: [/* @__PURE__ */ Z(ld, {
|
|
7763
7808
|
...n,
|
|
7764
7809
|
label: W("inspector.fontSize"),
|
|
7765
7810
|
min: 1,
|
|
7766
7811
|
property: "font-size"
|
|
7767
|
-
}), /* @__PURE__ */ Z(
|
|
7812
|
+
}), /* @__PURE__ */ Z(cd, {
|
|
7768
7813
|
label: W("inspector.color"),
|
|
7769
7814
|
children: /* @__PURE__ */ Z(Et, {
|
|
7770
7815
|
alpha: !0,
|
|
7771
7816
|
recent: !1,
|
|
7772
7817
|
size: "small",
|
|
7773
7818
|
trigger: "field",
|
|
7774
|
-
value:
|
|
7819
|
+
value: sd(e.css.color),
|
|
7775
7820
|
onChange: (e) => t("color", e)
|
|
7776
7821
|
})
|
|
7777
7822
|
})] })
|
|
7778
7823
|
}, {
|
|
7779
7824
|
key: "effects",
|
|
7780
7825
|
title: W("inspector.effects"),
|
|
7781
|
-
children: /* @__PURE__ */ Z(
|
|
7826
|
+
children: /* @__PURE__ */ Z(cd, {
|
|
7782
7827
|
label: W("inspector.shadow"),
|
|
7783
7828
|
children: /* @__PURE__ */ Z(jt, {
|
|
7784
7829
|
"aria-label": W("inspector.shadow"),
|
|
@@ -7804,11 +7849,11 @@ function cd({ node: e, change: t }) {
|
|
|
7804
7849
|
}
|
|
7805
7850
|
//#endregion
|
|
7806
7851
|
//#region src/viewer/inspector/InspectorPanel.tsx
|
|
7807
|
-
var
|
|
7852
|
+
var fd = [
|
|
7808
7853
|
"Properties",
|
|
7809
7854
|
"Code",
|
|
7810
7855
|
"Tweaks"
|
|
7811
|
-
],
|
|
7856
|
+
], pd = gt(function({ boards: e, frames: t, selection: n, targets: r, playing: i, select: a, hoverNode: o, change: s, reset: c, enabled: l, onClose: u }) {
|
|
7812
7857
|
let [d, f] = X("Properties"), [p, m] = X(""), h = n?.node, g = Object.entries(t).flatMap(([e, t]) => t.tweaks.map((t) => ({
|
|
7813
7858
|
...t,
|
|
7814
7859
|
boardId: e
|
|
@@ -7831,7 +7876,7 @@ var ld = [
|
|
|
7831
7876
|
value: d,
|
|
7832
7877
|
variant: "rounded",
|
|
7833
7878
|
onValueChange: (e) => {
|
|
7834
|
-
|
|
7879
|
+
fd.includes(e) && f(e);
|
|
7835
7880
|
},
|
|
7836
7881
|
children: [
|
|
7837
7882
|
/* @__PURE__ */ Q("header", {
|
|
@@ -7841,7 +7886,7 @@ var ld = [
|
|
|
7841
7886
|
"aria-label": W("inspector.views"),
|
|
7842
7887
|
className: G($.tabs).className,
|
|
7843
7888
|
style: { alignSelf: "center" },
|
|
7844
|
-
children: [/* @__PURE__ */ Z(Wt, {}),
|
|
7889
|
+
children: [/* @__PURE__ */ Z(Wt, {}), fd.map((e) => /* @__PURE__ */ Q(Jt, {
|
|
7845
7890
|
style: { position: "relative" },
|
|
7846
7891
|
value: e,
|
|
7847
7892
|
children: [W(`inspector.tab.${e}`), e === "Tweaks" && g.length > 0 && /* @__PURE__ */ Z(an, {
|
|
@@ -7859,7 +7904,7 @@ var ld = [
|
|
|
7859
7904
|
onClick: u
|
|
7860
7905
|
})]
|
|
7861
7906
|
}),
|
|
7862
|
-
/* @__PURE__ */ Z(
|
|
7907
|
+
/* @__PURE__ */ Z(id, {
|
|
7863
7908
|
boards: e,
|
|
7864
7909
|
frames: t,
|
|
7865
7910
|
hoverNode: o,
|
|
@@ -7913,7 +7958,7 @@ var ld = [
|
|
|
7913
7958
|
/* @__PURE__ */ Z(Kt, {
|
|
7914
7959
|
value: "Properties",
|
|
7915
7960
|
...G($.panelBodyPanel),
|
|
7916
|
-
children: h && l ? /* @__PURE__ */ Z(
|
|
7961
|
+
children: h && l ? /* @__PURE__ */ Z(dd, {
|
|
7917
7962
|
change: s,
|
|
7918
7963
|
node: h
|
|
7919
7964
|
}, `${n.boardId}:${t[n.boardId]?.session}:${h.id}`) : /* @__PURE__ */ Z("p", {
|
|
@@ -8054,17 +8099,17 @@ var ld = [
|
|
|
8054
8099
|
})
|
|
8055
8100
|
})
|
|
8056
8101
|
});
|
|
8057
|
-
}),
|
|
8058
|
-
process.env.NODE_ENV !== "production" && (
|
|
8059
|
-
function
|
|
8060
|
-
let t = K.useContext(
|
|
8102
|
+
}), md = /*#__PURE__*/ K.createContext(void 0);
|
|
8103
|
+
process.env.NODE_ENV !== "production" && (md.displayName = "FieldsetRootContext");
|
|
8104
|
+
function hd(e = !1) {
|
|
8105
|
+
let t = K.useContext(md);
|
|
8061
8106
|
if (!t && !e) throw Error(process.env.NODE_ENV === "production" ? De(86) : "Base UI: FieldsetRootContext is missing. Fieldset parts must be placed within <Fieldset.Root>.");
|
|
8062
8107
|
return t;
|
|
8063
8108
|
}
|
|
8064
8109
|
//#endregion
|
|
8065
8110
|
//#region node_modules/.pnpm/@base-ui+react@1.9.0_@types+react@19.3.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/@base-ui/react/internals/labelable-provider/LabelableProvider.mjs
|
|
8066
|
-
var
|
|
8067
|
-
let t =
|
|
8111
|
+
var gd = function(e) {
|
|
8112
|
+
let t = se(), [n, r] = K.useState(t), [i, a] = K.useState(), [o, s] = K.useState([]), c = n === void 0 ? t : n, l = fe(() => /* @__PURE__ */ new Map()), { messageIds: u } = z(), d = V((e, t) => {
|
|
8068
8113
|
let n = l.current;
|
|
8069
8114
|
t === void 0 ? n.delete(e) : n.set(e, t), r((e) => {
|
|
8070
8115
|
if (n.size === 0) return e;
|
|
@@ -8075,7 +8120,7 @@ var pd = function(e) {
|
|
|
8075
8120
|
}
|
|
8076
8121
|
return t;
|
|
8077
8122
|
});
|
|
8078
|
-
}), f =
|
|
8123
|
+
}), f = V(() => {
|
|
8079
8124
|
l.current.size === 0 && r(t);
|
|
8080
8125
|
}), p = K.useCallback((e) => {
|
|
8081
8126
|
let t = e["aria-describedby"] ? e["aria-describedby"].split(" ") : [];
|
|
@@ -8102,24 +8147,24 @@ var pd = function(e) {
|
|
|
8102
8147
|
s,
|
|
8103
8148
|
p
|
|
8104
8149
|
]);
|
|
8105
|
-
return /*#__PURE__*/ Z(
|
|
8150
|
+
return /*#__PURE__*/ Z(te.Provider, {
|
|
8106
8151
|
value: m,
|
|
8107
8152
|
children: e.children
|
|
8108
8153
|
});
|
|
8109
8154
|
};
|
|
8110
|
-
process.env.NODE_ENV !== "production" && (
|
|
8155
|
+
process.env.NODE_ENV !== "production" && (gd.displayName = "LabelableProvider");
|
|
8111
8156
|
//#endregion
|
|
8112
8157
|
//#region node_modules/.pnpm/@base-ui+react@1.9.0_@types+react@19.3.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/@base-ui/react/utils/useRegisteredLabelId.mjs
|
|
8113
|
-
function
|
|
8114
|
-
let n =
|
|
8158
|
+
function _d(e, t) {
|
|
8159
|
+
let n = se(e);
|
|
8115
8160
|
return ke(() => (t(n), () => {
|
|
8116
8161
|
t((e) => e === n ? void 0 : e);
|
|
8117
8162
|
}), [n, t]), n;
|
|
8118
8163
|
}
|
|
8119
8164
|
//#endregion
|
|
8120
8165
|
//#region node_modules/.pnpm/@base-ui+react@1.9.0_@types+react@19.3.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/@base-ui/react/internals/labelable-provider/useLabel.mjs
|
|
8121
|
-
function
|
|
8122
|
-
let { id: t, fallbackControlId: n, native: r = !1, setLabelId: i, focusControl: a } = e, { controlId: o, setLabelId: s } =
|
|
8166
|
+
function vd(e = {}) {
|
|
8167
|
+
let { id: t, fallbackControlId: n, native: r = !1, setLabelId: i, focusControl: a } = e, { controlId: o, setLabelId: s } = z(), c = _d(t, V((e) => {
|
|
8123
8168
|
s(e), i?.(e);
|
|
8124
8169
|
})), l = o ?? n;
|
|
8125
8170
|
function u(e) {
|
|
@@ -8128,8 +8173,8 @@ function hd(e = {}) {
|
|
|
8128
8173
|
return;
|
|
8129
8174
|
}
|
|
8130
8175
|
if (!l) return;
|
|
8131
|
-
let t =
|
|
8132
|
-
|
|
8176
|
+
let t = yd(e.currentTarget, l);
|
|
8177
|
+
ae(t) && bd(t);
|
|
8133
8178
|
}
|
|
8134
8179
|
function d(e) {
|
|
8135
8180
|
let t = Pe(e.nativeEvent);
|
|
@@ -8147,21 +8192,21 @@ function hd(e = {}) {
|
|
|
8147
8192
|
}
|
|
8148
8193
|
};
|
|
8149
8194
|
}
|
|
8150
|
-
function
|
|
8195
|
+
function yd(e, t) {
|
|
8151
8196
|
let n = e.getRootNode();
|
|
8152
|
-
for (;
|
|
8197
|
+
for (; I(n);) {
|
|
8153
8198
|
let e = n.getElementById(t);
|
|
8154
8199
|
if (e) return e;
|
|
8155
8200
|
n = n.host.getRootNode();
|
|
8156
8201
|
}
|
|
8157
|
-
return
|
|
8202
|
+
return oe(e).getElementById(t);
|
|
8158
8203
|
}
|
|
8159
|
-
function
|
|
8204
|
+
function bd(e) {
|
|
8160
8205
|
e.focus({ focusVisible: !0 });
|
|
8161
8206
|
}
|
|
8162
8207
|
//#endregion
|
|
8163
8208
|
//#region node_modules/.pnpm/@base-ui+react@1.9.0_@types+react@19.3.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/@base-ui/react/field/utils/getCombinedFieldValidityData.mjs
|
|
8164
|
-
function
|
|
8209
|
+
function xd(e, t) {
|
|
8165
8210
|
return {
|
|
8166
8211
|
...e,
|
|
8167
8212
|
state: {
|
|
@@ -8172,35 +8217,35 @@ function vd(e, t) {
|
|
|
8172
8217
|
}
|
|
8173
8218
|
//#endregion
|
|
8174
8219
|
//#region node_modules/.pnpm/@base-ui+react@1.9.0_@types+react@19.3.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/@base-ui/react/field/root/useFieldValidation.mjs
|
|
8175
|
-
var
|
|
8176
|
-
function
|
|
8220
|
+
var Sd = Object.keys(F);
|
|
8221
|
+
function Cd(e, t) {
|
|
8177
8222
|
return e.matches(":disabled") ? !1 : !t || e.form === t || e.form === null && !e.hasAttribute("form");
|
|
8178
8223
|
}
|
|
8179
|
-
function
|
|
8224
|
+
function wd(e, t) {
|
|
8180
8225
|
let n = null;
|
|
8181
|
-
for (let r of e.keys()) if (
|
|
8226
|
+
for (let r of e.keys()) if (Cd(r, t)) {
|
|
8182
8227
|
if (!r.validity.valid) return r;
|
|
8183
8228
|
n ??= r;
|
|
8184
8229
|
}
|
|
8185
8230
|
return n;
|
|
8186
8231
|
}
|
|
8187
|
-
function
|
|
8232
|
+
function Td(e) {
|
|
8188
8233
|
return {
|
|
8189
|
-
...
|
|
8234
|
+
...F,
|
|
8190
8235
|
valid: !e,
|
|
8191
8236
|
customError: e
|
|
8192
8237
|
};
|
|
8193
8238
|
}
|
|
8194
|
-
function
|
|
8239
|
+
function Ed(e) {
|
|
8195
8240
|
return e && e.validationMessage ? [e.validationMessage] : [];
|
|
8196
8241
|
}
|
|
8197
|
-
function
|
|
8198
|
-
let { elementRef: t, formRef: n } =
|
|
8242
|
+
function Dd(e) {
|
|
8243
|
+
let { elementRef: t, formRef: n } = Te(), { 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 } = z(), h = ye(), g = K.useRef(null), _ = fe(() => /* @__PURE__ */ new Map()).current, v = K.useRef(0), y = K.useRef(null), b = K.useCallback((e, t) => (_.set(e, t), () => {
|
|
8199
8244
|
_.delete(e);
|
|
8200
|
-
}), [_]), x =
|
|
8201
|
-
let e =
|
|
8245
|
+
}), [_]), x = V(() => {
|
|
8246
|
+
let e = wd(_, t.current);
|
|
8202
8247
|
return e && _.get(e)?.controlRef.current || null;
|
|
8203
|
-
}), S =
|
|
8248
|
+
}), S = V(async (e, o = !1) => {
|
|
8204
8249
|
v.current += 1;
|
|
8205
8250
|
let m = v.current;
|
|
8206
8251
|
function b(e, t = s) {
|
|
@@ -8208,7 +8253,7 @@ function wd(e) {
|
|
|
8208
8253
|
if (r == null) return;
|
|
8209
8254
|
let i = n.current.fields.get(r);
|
|
8210
8255
|
if (!i) return;
|
|
8211
|
-
let a =
|
|
8256
|
+
let a = xd(e, t);
|
|
8212
8257
|
n.current.fields.set(r, {
|
|
8213
8258
|
...i,
|
|
8214
8259
|
validityData: a
|
|
@@ -8241,48 +8286,48 @@ function wd(e) {
|
|
|
8241
8286
|
b(i, n), r(i);
|
|
8242
8287
|
}
|
|
8243
8288
|
function T(e) {
|
|
8244
|
-
let t =
|
|
8245
|
-
for (let e of
|
|
8289
|
+
let t = Sd.reduce((t, n) => (t[n] = e.validity[n], t), {}), n = !1;
|
|
8290
|
+
for (let e of Sd) if (e !== "valid") {
|
|
8246
8291
|
if (e === "valueMissing" && t[e]) n = !0;
|
|
8247
8292
|
else if (t[e]) return t;
|
|
8248
8293
|
}
|
|
8249
8294
|
return n && !c.current && (t.valid = !0, t.valueMissing = !1), t;
|
|
8250
8295
|
}
|
|
8251
8296
|
function E() {
|
|
8252
|
-
return _.size > 0 ?
|
|
8297
|
+
return _.size > 0 ? wd(_, t.current) : g.current;
|
|
8253
8298
|
}
|
|
8254
8299
|
let D = E();
|
|
8255
8300
|
function O() {
|
|
8256
|
-
return D = E(), D?.willValidate ? T(D) :
|
|
8301
|
+
return D = E(), D?.willValidate ? T(D) : Td(!1);
|
|
8257
8302
|
}
|
|
8258
8303
|
if (o) {
|
|
8259
8304
|
if (l.valid !== !1 || !D) return;
|
|
8260
8305
|
if (!D.validity.valueMissing) {
|
|
8261
8306
|
C();
|
|
8262
|
-
let e = E(), t = e?.validity.customError ?
|
|
8263
|
-
w(
|
|
8307
|
+
let e = E(), t = e?.validity.customError ? Ed(e) : [];
|
|
8308
|
+
w(Td(t.length > 0), t, !1);
|
|
8264
8309
|
return;
|
|
8265
8310
|
}
|
|
8266
|
-
for (let e of
|
|
8311
|
+
for (let e of Sd) if (e !== "valid" && e !== "valueMissing" && e !== "customError" && D.validity[e]) return;
|
|
8267
8312
|
}
|
|
8268
8313
|
h.clear(), C();
|
|
8269
|
-
let k = O(), A =
|
|
8314
|
+
let k = O(), A = Ed(D), j = u();
|
|
8270
8315
|
if (A.length === 0 || j) {
|
|
8271
8316
|
let t = Array.from(n.current.fields.values()).reduce((e, t) => (t.name && (e[t.name] = t.getValue()), e), {}), r = i(e, t), o;
|
|
8272
8317
|
if (typeof r == "object" && r && "then" in r) {
|
|
8273
8318
|
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;
|
|
8274
8319
|
k = O();
|
|
8275
8320
|
} else o = r;
|
|
8276
|
-
A = o ? [].concat(o).filter(Boolean) : [], A.length > 0 ? (k.valid = !1, k.customError = !0, D?.willValidate && S(D, A.join("\n"))) : A =
|
|
8321
|
+
A = o ? [].concat(o).filter(Boolean) : [], A.length > 0 ? (k.valid = !1, k.customError = !0, D?.willValidate && S(D, A.join("\n"))) : A = Ed(D);
|
|
8277
8322
|
}
|
|
8278
8323
|
w(k, A);
|
|
8279
|
-
}), C =
|
|
8324
|
+
}), C = V((e, t = !1) => {
|
|
8280
8325
|
if (h.clear(), v.current += 1, t) return;
|
|
8281
8326
|
let n = u();
|
|
8282
8327
|
n && e !== "" && o ? h.start(o, () => {
|
|
8283
8328
|
S(e);
|
|
8284
8329
|
}) : S(e, !n);
|
|
8285
|
-
}), w = K.useCallback((e, t = {}) =>
|
|
8330
|
+
}), w = K.useCallback((e, t = {}) => xe(m(t), l.valid === !1 && !l.disabled && !e ? { "aria-invalid": !0 } : je), [
|
|
8286
8331
|
m,
|
|
8287
8332
|
l.disabled,
|
|
8288
8333
|
l.valid
|
|
@@ -8306,15 +8351,15 @@ function wd(e) {
|
|
|
8306
8351
|
}
|
|
8307
8352
|
//#endregion
|
|
8308
8353
|
//#region node_modules/.pnpm/@base-ui+react@1.9.0_@types+react@19.3.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
|
|
8309
|
-
function
|
|
8310
|
-
let { change: t, commit: n, invalid: r, markedDirtyRef: i, name: a, setRegisteredFieldName: o, registeredFieldIdRef: s, setValidityData: c, validityData: l } = e, { formRef: u } =
|
|
8354
|
+
function Od(e) {
|
|
8355
|
+
let { change: t, commit: n, invalid: r, markedDirtyRef: i, name: a, setRegisteredFieldName: o, registeredFieldIdRef: s, setValidityData: c, validityData: l } = e, { formRef: u } = Te(), d = K.useRef(null), f = K.useRef(null), p = K.useRef(!1), m = V(() => {
|
|
8311
8356
|
let e = f.current;
|
|
8312
8357
|
if (e) return e.getValue ? e.getValue() : e.value;
|
|
8313
8358
|
});
|
|
8314
8359
|
function h(e) {
|
|
8315
8360
|
return e.value === void 0 ? m() : e.value;
|
|
8316
8361
|
}
|
|
8317
|
-
let g =
|
|
8362
|
+
let g = V(() => {
|
|
8318
8363
|
let e = f.current;
|
|
8319
8364
|
i.current = !0, n(e ? h(e) : l.value);
|
|
8320
8365
|
});
|
|
@@ -8324,7 +8369,7 @@ function Td(e) {
|
|
|
8324
8369
|
getValue: m,
|
|
8325
8370
|
name: a ?? e.name,
|
|
8326
8371
|
controlRef: e.controlRef,
|
|
8327
|
-
validityData:
|
|
8372
|
+
validityData: xd(l, r),
|
|
8328
8373
|
validate: g
|
|
8329
8374
|
});
|
|
8330
8375
|
}
|
|
@@ -8346,7 +8391,7 @@ function Td(e) {
|
|
|
8346
8391
|
getValue: m,
|
|
8347
8392
|
name: a ?? e.name,
|
|
8348
8393
|
controlRef: e.controlRef,
|
|
8349
|
-
validityData:
|
|
8394
|
+
validityData: xd(l, r),
|
|
8350
8395
|
validate: g
|
|
8351
8396
|
}));
|
|
8352
8397
|
}, [
|
|
@@ -8363,7 +8408,7 @@ function Td(e) {
|
|
|
8363
8408
|
let t = f.current?.id;
|
|
8364
8409
|
t && e.delete(t);
|
|
8365
8410
|
};
|
|
8366
|
-
}, [u]), [g,
|
|
8411
|
+
}, [u]), [g, V((e, n) => {
|
|
8367
8412
|
if (!n) {
|
|
8368
8413
|
d.current === e && (d.current = null, t(void 0, !0), v(), f.current = null, o(void 0), s.current = void 0);
|
|
8369
8414
|
return;
|
|
@@ -8374,121 +8419,121 @@ function Td(e) {
|
|
|
8374
8419
|
}
|
|
8375
8420
|
//#endregion
|
|
8376
8421
|
//#region node_modules/.pnpm/@base-ui+react@1.9.0_@types+react@19.3.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/@base-ui/react/field/root/FieldRoot.mjs
|
|
8377
|
-
var
|
|
8378
|
-
let { errors: n, validationMode: r, submitCountRef: i } =
|
|
8422
|
+
var kd = /*#__PURE__*/ K.forwardRef(function(e, t) {
|
|
8423
|
+
let { errors: n, validationMode: r, submitCountRef: i } = Te(), { 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 = hd(!0)?.disabled, y = V(s || (() => null)), b = v || d, [x, S] = K.useState(!1), [C, w] = K.useState(!1), [T, E] = K.useState(!1), [D, k] = K.useState(!1), A = K.useRef(void 0), j = p ?? C, ee = m ?? x, M = K.useRef(j), te = K.useRef(void 0), [N, ne] = K.useState(), re = u ?? N;
|
|
8379
8424
|
ke(() => {
|
|
8380
|
-
p !== void 0 && (
|
|
8425
|
+
p !== void 0 && (M.current = p);
|
|
8381
8426
|
}, [p]);
|
|
8382
|
-
let
|
|
8383
|
-
p === void 0 && (e && (
|
|
8384
|
-
}),
|
|
8427
|
+
let ie = V((e) => {
|
|
8428
|
+
p === void 0 && (e && (M.current = !0), w(e));
|
|
8429
|
+
}), ae = V((e) => {
|
|
8385
8430
|
m === void 0 && S(e);
|
|
8386
|
-
}),
|
|
8387
|
-
state:
|
|
8431
|
+
}), P = V(() => l === "onChange" || l === "onSubmit" && i.current > 0), I = re && Object.hasOwn(n, re) ? n[re] : null, oe = !!(Array.isArray(I) ? I.length : I), L = f === !0 || oe, [R, z] = K.useState({
|
|
8432
|
+
state: F,
|
|
8388
8433
|
error: "",
|
|
8389
8434
|
errors: [],
|
|
8390
8435
|
value: null,
|
|
8391
8436
|
initialValue: null
|
|
8392
|
-
}),
|
|
8437
|
+
}), se = !L && (b ? null : R.state.valid), ce = K.useMemo(() => ({
|
|
8393
8438
|
disabled: b,
|
|
8394
8439
|
touched: ee,
|
|
8395
8440
|
dirty: j,
|
|
8396
|
-
valid:
|
|
8441
|
+
valid: se,
|
|
8397
8442
|
filled: T,
|
|
8398
8443
|
focused: D
|
|
8399
8444
|
}), [
|
|
8400
8445
|
b,
|
|
8401
8446
|
ee,
|
|
8402
8447
|
j,
|
|
8403
|
-
|
|
8448
|
+
se,
|
|
8404
8449
|
T,
|
|
8405
8450
|
D
|
|
8406
|
-
]),
|
|
8407
|
-
setValidityData:
|
|
8451
|
+
]), ue = Dd({
|
|
8452
|
+
setValidityData: z,
|
|
8408
8453
|
validate: y,
|
|
8409
|
-
validityData:
|
|
8454
|
+
validityData: R,
|
|
8410
8455
|
validationDebounceTime: c,
|
|
8411
|
-
invalid:
|
|
8412
|
-
markedDirtyRef:
|
|
8413
|
-
state:
|
|
8414
|
-
shouldValidateOnChange:
|
|
8456
|
+
invalid: L,
|
|
8457
|
+
markedDirtyRef: M,
|
|
8458
|
+
state: ce,
|
|
8459
|
+
shouldValidateOnChange: P,
|
|
8415
8460
|
validationMode: l,
|
|
8416
|
-
registeredFieldIdRef:
|
|
8417
|
-
}), [
|
|
8418
|
-
change:
|
|
8419
|
-
commit:
|
|
8420
|
-
invalid:
|
|
8421
|
-
markedDirtyRef:
|
|
8461
|
+
registeredFieldIdRef: te
|
|
8462
|
+
}), [de, fe] = Od({
|
|
8463
|
+
change: ue.change,
|
|
8464
|
+
commit: ue.commit,
|
|
8465
|
+
invalid: L,
|
|
8466
|
+
markedDirtyRef: M,
|
|
8422
8467
|
name: u,
|
|
8423
|
-
setRegisteredFieldName:
|
|
8424
|
-
registeredFieldIdRef:
|
|
8425
|
-
setValidityData:
|
|
8426
|
-
validityData:
|
|
8468
|
+
setRegisteredFieldName: ne,
|
|
8469
|
+
registeredFieldIdRef: te,
|
|
8470
|
+
setValidityData: z,
|
|
8471
|
+
validityData: R
|
|
8427
8472
|
});
|
|
8428
|
-
K.useImperativeHandle(h, () => ({ validate:
|
|
8473
|
+
K.useImperativeHandle(h, () => ({ validate: de }), [de]);
|
|
8429
8474
|
let pe = K.useMemo(() => ({
|
|
8430
|
-
invalid:
|
|
8431
|
-
name:
|
|
8432
|
-
validityData:
|
|
8433
|
-
setValidityData:
|
|
8475
|
+
invalid: L,
|
|
8476
|
+
name: re,
|
|
8477
|
+
validityData: R,
|
|
8478
|
+
setValidityData: z,
|
|
8434
8479
|
disabled: b,
|
|
8435
|
-
setTouched:
|
|
8436
|
-
setDirty:
|
|
8480
|
+
setTouched: ae,
|
|
8481
|
+
setDirty: ie,
|
|
8437
8482
|
setFilled: E,
|
|
8438
8483
|
setFocused: k,
|
|
8439
8484
|
focusOwnerRef: A,
|
|
8440
8485
|
validationMode: l,
|
|
8441
|
-
shouldValidateOnChange:
|
|
8442
|
-
state:
|
|
8486
|
+
shouldValidateOnChange: P,
|
|
8487
|
+
state: ce,
|
|
8443
8488
|
registerFieldControl: fe,
|
|
8444
|
-
validation:
|
|
8489
|
+
validation: ue
|
|
8445
8490
|
}), [
|
|
8446
|
-
|
|
8447
|
-
|
|
8448
|
-
|
|
8491
|
+
L,
|
|
8492
|
+
re,
|
|
8493
|
+
R,
|
|
8449
8494
|
b,
|
|
8450
|
-
oe,
|
|
8451
8495
|
ae,
|
|
8496
|
+
ie,
|
|
8452
8497
|
E,
|
|
8453
8498
|
k,
|
|
8454
8499
|
l,
|
|
8455
|
-
|
|
8456
|
-
|
|
8500
|
+
P,
|
|
8501
|
+
ce,
|
|
8457
8502
|
fe,
|
|
8458
|
-
|
|
8459
|
-
]),
|
|
8503
|
+
ue
|
|
8504
|
+
]), B = me("div", e, {
|
|
8460
8505
|
ref: t,
|
|
8461
|
-
state:
|
|
8506
|
+
state: ce,
|
|
8462
8507
|
props: _,
|
|
8463
8508
|
stateAttributesMapping: O
|
|
8464
8509
|
});
|
|
8465
|
-
return /*#__PURE__*/ Z(
|
|
8510
|
+
return /*#__PURE__*/ Z(le.Provider, {
|
|
8466
8511
|
value: pe,
|
|
8467
|
-
children:
|
|
8512
|
+
children: B
|
|
8468
8513
|
});
|
|
8469
8514
|
});
|
|
8470
|
-
process.env.NODE_ENV !== "production" && (
|
|
8471
|
-
var
|
|
8472
|
-
return /*#__PURE__*/ Z(
|
|
8515
|
+
process.env.NODE_ENV !== "production" && (kd.displayName = "FieldRootInner");
|
|
8516
|
+
var Ad = /*#__PURE__*/ K.forwardRef(function(e, t) {
|
|
8517
|
+
return /*#__PURE__*/ Z(gd, { children: /*#__PURE__*/ Z(kd, {
|
|
8473
8518
|
...e,
|
|
8474
8519
|
ref: t
|
|
8475
8520
|
}) });
|
|
8476
8521
|
});
|
|
8477
|
-
process.env.NODE_ENV !== "production" && (
|
|
8522
|
+
process.env.NODE_ENV !== "production" && (Ad.displayName = "FieldRoot");
|
|
8478
8523
|
//#endregion
|
|
8479
8524
|
//#region node_modules/.pnpm/@base-ui+react@1.9.0_@types+react@19.3.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/@base-ui/react/field/item/FieldItemContext.mjs
|
|
8480
|
-
var
|
|
8481
|
-
process.env.NODE_ENV !== "production" && (
|
|
8482
|
-
function
|
|
8483
|
-
return K.useContext(
|
|
8525
|
+
var jd = /*#__PURE__*/ K.createContext({ disabled: !1 });
|
|
8526
|
+
process.env.NODE_ENV !== "production" && (jd.displayName = "FieldItemContext");
|
|
8527
|
+
function Md() {
|
|
8528
|
+
return K.useContext(jd);
|
|
8484
8529
|
}
|
|
8485
8530
|
//#endregion
|
|
8486
8531
|
//#region node_modules/.pnpm/@base-ui+react@1.9.0_@types+react@19.3.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/@base-ui/react/field/label/FieldLabel.mjs
|
|
8487
|
-
var
|
|
8488
|
-
let { render: n, className: r, style: i, id: a, nativeLabel: o = !0, ...s } = e, c =
|
|
8532
|
+
var Nd = /*#__PURE__*/ K.forwardRef(function(e, t) {
|
|
8533
|
+
let { render: n, className: r, style: i, id: a, nativeLabel: o = !0, ...s } = e, c = ce(!1), l = Md(), { labelId: u } = z(), d = {
|
|
8489
8534
|
...c.state,
|
|
8490
8535
|
disabled: c.disabled || l.disabled
|
|
8491
|
-
}, f = K.useRef(null), p =
|
|
8536
|
+
}, f = K.useRef(null), p = vd({
|
|
8492
8537
|
id: u ?? a,
|
|
8493
8538
|
native: o
|
|
8494
8539
|
});
|
|
@@ -8497,39 +8542,39 @@ var Ad = /*#__PURE__*/ K.forwardRef(function(e, t) {
|
|
|
8497
8542
|
let e = f.current.tagName === "LABEL";
|
|
8498
8543
|
if (o) {
|
|
8499
8544
|
if (!e) {
|
|
8500
|
-
let e =
|
|
8545
|
+
let e = we.captureOwnerStack?.() || "";
|
|
8501
8546
|
Oe(`<Field.Label> expected a <label> element because the \`nativeLabel\` prop is true. Rendering a non-<label> disables native label association, so \`htmlFor\` will not work. Use a real <label> in the \`render\` prop, or set \`nativeLabel\` to \`false\`.${e}`);
|
|
8502
8547
|
}
|
|
8503
8548
|
} else if (e) {
|
|
8504
|
-
let e =
|
|
8549
|
+
let e = we.captureOwnerStack?.() || "";
|
|
8505
8550
|
Oe(`<Field.Label> expected a non-<label> element because the \`nativeLabel\` prop is false. Rendering a <label> assumes native label behavior while Base UI treats it as non-native, which can cause unexpected pointer behavior. Use a non-<label> in the \`render\` prop, or set \`nativeLabel\` to \`true\`.${e}`);
|
|
8506
8551
|
}
|
|
8507
|
-
}, [o]),
|
|
8552
|
+
}, [o]), me("label", e, {
|
|
8508
8553
|
ref: [t, f],
|
|
8509
8554
|
state: d,
|
|
8510
8555
|
props: [p, s],
|
|
8511
8556
|
stateAttributesMapping: O
|
|
8512
8557
|
});
|
|
8513
8558
|
});
|
|
8514
|
-
process.env.NODE_ENV !== "production" && (
|
|
8515
|
-
var
|
|
8559
|
+
process.env.NODE_ENV !== "production" && (Nd.displayName = "FieldLabel");
|
|
8560
|
+
var Pd = (e, t) => ({
|
|
8516
8561
|
left: t.x + (e.x + e.w) * t.k + 12,
|
|
8517
8562
|
top: t.y + e.y * t.k
|
|
8518
8563
|
});
|
|
8519
|
-
function
|
|
8520
|
-
let r =
|
|
8564
|
+
function Fd(e, t, n) {
|
|
8565
|
+
let r = Pd(e, t);
|
|
8521
8566
|
return {
|
|
8522
8567
|
x: Math.min(Math.max(12, r.left), Math.max(12, n.width - 352 - 12)) - r.left,
|
|
8523
8568
|
y: Math.min(Math.max(60, r.top), Math.max(60, n.height - 604 - 12)) - r.top
|
|
8524
8569
|
};
|
|
8525
8570
|
}
|
|
8526
|
-
function
|
|
8527
|
-
return /* @__PURE__ */ Q(
|
|
8571
|
+
function Id({ control: e, value: t, change: n, id: r, width: i }) {
|
|
8572
|
+
return /* @__PURE__ */ Q(Ad, {
|
|
8528
8573
|
style: {
|
|
8529
8574
|
width: i ?? "100%",
|
|
8530
8575
|
flexShrink: 0
|
|
8531
8576
|
},
|
|
8532
|
-
children: [/* @__PURE__ */ Z(
|
|
8577
|
+
children: [/* @__PURE__ */ Z(Nd, {
|
|
8533
8578
|
className: "x10l6tqk x1i1rx1s xjm9jq1 x1717udv xkdpibf xb3r6kr xzpqnlu xuxw1ft xc342km",
|
|
8534
8579
|
children: e.label
|
|
8535
8580
|
}), /* @__PURE__ */ Z(Mt, {
|
|
@@ -8547,7 +8592,7 @@ function Nd({ control: e, value: t, change: n, id: r, width: i }) {
|
|
|
8547
8592
|
})]
|
|
8548
8593
|
});
|
|
8549
8594
|
}
|
|
8550
|
-
function
|
|
8595
|
+
function Ld({ control: e, value: t, change: n }) {
|
|
8551
8596
|
let r = vt(), i = e.type === "enum" && e.options.length <= 3, a = i ? "fieldset" : "div", o;
|
|
8552
8597
|
o = e.type === "color" ? /* @__PURE__ */ Q("div", {
|
|
8553
8598
|
className: "x78zum5 x6s0dn4 x167g77z xeuugli",
|
|
@@ -8602,14 +8647,14 @@ function Pd({ control: e, value: t, change: n }) {
|
|
|
8602
8647
|
step: e.step,
|
|
8603
8648
|
value: t,
|
|
8604
8649
|
onChange: n
|
|
8605
|
-
}), /* @__PURE__ */ Z(
|
|
8650
|
+
}), /* @__PURE__ */ Z(Id, {
|
|
8606
8651
|
change: n,
|
|
8607
8652
|
control: e,
|
|
8608
8653
|
id: `${r}-number`,
|
|
8609
8654
|
value: t,
|
|
8610
8655
|
width: 48
|
|
8611
8656
|
})]
|
|
8612
|
-
}) : e.type === "number" ? /* @__PURE__ */ Z(
|
|
8657
|
+
}) : e.type === "number" ? /* @__PURE__ */ Z(Id, {
|
|
8613
8658
|
change: n,
|
|
8614
8659
|
control: e,
|
|
8615
8660
|
id: r,
|
|
@@ -8687,7 +8732,7 @@ function Pd({ control: e, value: t, change: n }) {
|
|
|
8687
8732
|
})]
|
|
8688
8733
|
});
|
|
8689
8734
|
}
|
|
8690
|
-
function
|
|
8735
|
+
function Rd({ boardId: e, title: t, state: n, anchor: r, onChange: i, onReset: a, onClose: o }) {
|
|
8691
8736
|
let s = Y(null), c = vt(), [l, u] = X(!1), [d, f] = X("schema"), p = W(d === "schema" ? "parameters.schema" : "parameters.currentValues"), m = JSON.stringify(d === "schema" ? n.schema : n.values, null, 2), h = /* @__PURE__ */ new Map();
|
|
8692
8737
|
for (let e of Object.entries(n.schema?.controls ?? {})) {
|
|
8693
8738
|
let t = e[1].section || W("parameters.controls");
|
|
@@ -8707,7 +8752,7 @@ function Fd({ boardId: e, title: t, state: n, anchor: r, onChange: i, onReset: a
|
|
|
8707
8752
|
maxHeight: r ? `min(604px, calc(100% - ${Math.max(0, r.top)}px - 12px))` : "min(604px, calc(100vh - 112px))"
|
|
8708
8753
|
},
|
|
8709
8754
|
onKeyDown: (e) => {
|
|
8710
|
-
e.stopPropagation(), e.key === "Escape" && !e.defaultPrevented && !
|
|
8755
|
+
e.stopPropagation(), e.key === "Escape" && !e.defaultPrevented && !he(e.nativeEvent) && o();
|
|
8711
8756
|
},
|
|
8712
8757
|
children: [
|
|
8713
8758
|
/* @__PURE__ */ Q("header", {
|
|
@@ -8769,7 +8814,7 @@ function Fd({ boardId: e, title: t, state: n, anchor: r, onChange: i, onReset: a
|
|
|
8769
8814
|
children: [/* @__PURE__ */ Z("h3", {
|
|
8770
8815
|
className: "x1k6wstc xh88oxj x1bo0w0s xdj266r xwoyzhm",
|
|
8771
8816
|
children: e
|
|
8772
|
-
}), t.map(([e, t]) => /* @__PURE__ */ Z(
|
|
8817
|
+
}), t.map(([e, t]) => /* @__PURE__ */ Z(Ld, {
|
|
8773
8818
|
change: (t) => i(e, t),
|
|
8774
8819
|
control: t,
|
|
8775
8820
|
value: n.values[e]
|
|
@@ -8827,7 +8872,7 @@ function Fd({ boardId: e, title: t, state: n, anchor: r, onChange: i, onReset: a
|
|
|
8827
8872
|
"data-chrome": "parameter-declaration",
|
|
8828
8873
|
className: [{ className: "x78zum5 xdt5ytf xh8yej3 x5yr21d x2lwn1j xo2rkog xqfszdh" }.className, "rt-dialog"].filter(Boolean).join(" "),
|
|
8829
8874
|
onKeyDown: (e) => {
|
|
8830
|
-
e.stopPropagation(), e.key === "Escape" && !e.defaultPrevented && !
|
|
8875
|
+
e.stopPropagation(), e.key === "Escape" && !e.defaultPrevented && !he(e.nativeEvent) && u(!1);
|
|
8831
8876
|
},
|
|
8832
8877
|
children: [
|
|
8833
8878
|
/* @__PURE__ */ Q("header", {
|
|
@@ -8919,7 +8964,7 @@ function Fd({ boardId: e, title: t, state: n, anchor: r, onChange: i, onReset: a
|
|
|
8919
8964
|
}
|
|
8920
8965
|
//#endregion
|
|
8921
8966
|
//#region src/viewer/verdicts/RejectComposer.tsx
|
|
8922
|
-
function
|
|
8967
|
+
function zd({ group: e, left: t, top: n, onSubmit: r, onCancel: i }) {
|
|
8923
8968
|
let { t: a } = Re();
|
|
8924
8969
|
return /* @__PURE__ */ Q("div", {
|
|
8925
8970
|
"data-chrome": "reject",
|
|
@@ -8946,7 +8991,7 @@ function Id({ group: e, left: t, top: n, onSubmit: r, onCancel: i }) {
|
|
|
8946
8991
|
})
|
|
8947
8992
|
]
|
|
8948
8993
|
}),
|
|
8949
|
-
/* @__PURE__ */ Z(
|
|
8994
|
+
/* @__PURE__ */ Z(B, {
|
|
8950
8995
|
autoFocus: !0,
|
|
8951
8996
|
placeholder: a("verdict.reasonPlaceholder"),
|
|
8952
8997
|
onCancel: i,
|
|
@@ -8961,7 +9006,7 @@ function Id({ group: e, left: t, top: n, onSubmit: r, onCancel: i }) {
|
|
|
8961
9006
|
}
|
|
8962
9007
|
//#endregion
|
|
8963
9008
|
//#region src/viewer/components/PhoneArtboardBar.tsx
|
|
8964
|
-
function
|
|
9009
|
+
function Bd({ pages: e, page: t, onPageChange: n }) {
|
|
8965
9010
|
if (e.length < 2) return null;
|
|
8966
9011
|
let r = e.find((e) => e.id === t);
|
|
8967
9012
|
return /* @__PURE__ */ Z(Ot, {
|
|
@@ -8983,7 +9028,7 @@ function Ld({ pages: e, page: t, onPageChange: n }) {
|
|
|
8983
9028
|
})
|
|
8984
9029
|
});
|
|
8985
9030
|
}
|
|
8986
|
-
function
|
|
9031
|
+
function Vd({ title: e, pages: t, page: n, onPageChange: r, actions: i, live: a }) {
|
|
8987
9032
|
return /* @__PURE__ */ Q("header", {
|
|
8988
9033
|
"data-chrome": !0,
|
|
8989
9034
|
className: "x2lah0s xdd8jsf x78zum5 x6s0dn4 x883omv x1hr3lfm xso031l x1q0q8m5 xtrfj0v x1rozbrz xo2rkog xqfszdh xif65rj",
|
|
@@ -8992,7 +9037,7 @@ function Rd({ title: e, pages: t, page: n, onPageChange: r, actions: i, live: a
|
|
|
8992
9037
|
className: "xeuugli xb3r6kr xuxw1ft xlyipyv x1s688f",
|
|
8993
9038
|
children: e
|
|
8994
9039
|
}),
|
|
8995
|
-
/* @__PURE__ */ Z(
|
|
9040
|
+
/* @__PURE__ */ Z(Bd, {
|
|
8996
9041
|
page: n,
|
|
8997
9042
|
pages: t,
|
|
8998
9043
|
onPageChange: r
|
|
@@ -9011,7 +9056,7 @@ function Rd({ title: e, pages: t, page: n, onPageChange: r, actions: i, live: a
|
|
|
9011
9056
|
}
|
|
9012
9057
|
//#endregion
|
|
9013
9058
|
//#region src/viewer/components/ghost.ts
|
|
9014
|
-
var
|
|
9059
|
+
var Hd = { ghost: {
|
|
9015
9060
|
k1xSpc: "xrvj5dj",
|
|
9016
9061
|
kgQiWS: "x1ku5rj1",
|
|
9017
9062
|
kmuXW: "x2lah0s",
|
|
@@ -9027,9 +9072,9 @@ var zd = { ghost: {
|
|
|
9027
9072
|
kIyJzY: "xgdialr",
|
|
9028
9073
|
k3aq6I: "x19kf12q",
|
|
9029
9074
|
$$css: !0
|
|
9030
|
-
} },
|
|
9031
|
-
function
|
|
9032
|
-
if (!e ||
|
|
9075
|
+
} }, Ud = 120, Wd = .5, Gd = 110, Kd = .4, qd = .25;
|
|
9076
|
+
function Jd(e, t, n) {
|
|
9077
|
+
if (!e || de()) return {
|
|
9033
9078
|
done: Promise.resolve(),
|
|
9034
9079
|
cancel: () => {}
|
|
9035
9080
|
};
|
|
@@ -9042,8 +9087,8 @@ function Gd(e, t, n) {
|
|
|
9042
9087
|
cancel: () => r.cancel()
|
|
9043
9088
|
};
|
|
9044
9089
|
}
|
|
9045
|
-
function
|
|
9046
|
-
let { viewportRef: l, view: u, place: d, handlers: f } =
|
|
9090
|
+
function Yd({ id: e, board: t, sandbox: n = "allow-scripts", src: i, siblings: a, origin: o, onOpen: s, onClose: c }) {
|
|
9091
|
+
let { viewportRef: l, view: u, place: d, handlers: f } = Uu("hand"), p = Y(null), m = Y(null), h = Y(null), g = Y(null), [_, v] = X(null), y = Y(null), b = Y(u);
|
|
9047
9092
|
b.current = u;
|
|
9048
9093
|
let x = Y(!1), S = Y(null), C = Y(!1), w = a.indexOf(e), T = w > 0 ? a[w - 1] : void 0, E = w >= 0 ? a[w + 1] : void 0, D = () => ({
|
|
9049
9094
|
width: l.current?.clientWidth ?? t.w,
|
|
@@ -9063,13 +9108,13 @@ function Kd({ id: e, board: t, sandbox: n = "allow-scripts", src: i, siblings: a
|
|
|
9063
9108
|
if (d(i), b.current = i, !x.current) {
|
|
9064
9109
|
x.current = !0;
|
|
9065
9110
|
let e = O(o);
|
|
9066
|
-
e &&
|
|
9067
|
-
duration:
|
|
9068
|
-
easing:
|
|
9069
|
-
}),
|
|
9111
|
+
e && ve(p.current, [{ transform: e }, { transform: "none" }], {
|
|
9112
|
+
duration: Ee.duration,
|
|
9113
|
+
easing: Ee.easing
|
|
9114
|
+
}), ve(m.current, [{ opacity: 0 }, { opacity: 1 }], {
|
|
9070
9115
|
duration: 200,
|
|
9071
9116
|
easing: Ae
|
|
9072
|
-
}), k().forEach((e, t) => void
|
|
9117
|
+
}), k().forEach((e, t) => void ve(e, [{
|
|
9073
9118
|
opacity: 0,
|
|
9074
9119
|
transform: `translateY(${t ? 12 : -8}px)`
|
|
9075
9120
|
}, {
|
|
@@ -9082,15 +9127,15 @@ function Kd({ id: e, board: t, sandbox: n = "allow-scripts", src: i, siblings: a
|
|
|
9082
9127
|
}));
|
|
9083
9128
|
} else if (S.current) {
|
|
9084
9129
|
let { dir: t, leaving: n } = S.current;
|
|
9085
|
-
S.current = null, n(),
|
|
9130
|
+
S.current = null, n(), ve(p.current, [{
|
|
9086
9131
|
transform: `translateX(${t * e * .35}px)`,
|
|
9087
9132
|
opacity: 0
|
|
9088
9133
|
}, {
|
|
9089
9134
|
transform: "none",
|
|
9090
9135
|
opacity: 1
|
|
9091
9136
|
}], {
|
|
9092
|
-
duration:
|
|
9093
|
-
easing:
|
|
9137
|
+
duration: Ee.duration,
|
|
9138
|
+
easing: Ee.easing
|
|
9094
9139
|
});
|
|
9095
9140
|
}
|
|
9096
9141
|
}, [
|
|
@@ -9103,10 +9148,10 @@ function Kd({ id: e, board: t, sandbox: n = "allow-scripts", src: i, siblings: a
|
|
|
9103
9148
|
]);
|
|
9104
9149
|
let A = () => {
|
|
9105
9150
|
let e = p.current?.style.transform || "none";
|
|
9106
|
-
v(null),
|
|
9107
|
-
duration:
|
|
9108
|
-
easing:
|
|
9109
|
-
}), [m.current, ...k()].forEach((e) => void
|
|
9151
|
+
v(null), ve(p.current, [{ transform: e }, { transform: "none" }], {
|
|
9152
|
+
duration: Ee.duration,
|
|
9153
|
+
easing: Ee.easing
|
|
9154
|
+
}), [m.current, ...k()].forEach((e) => void ve(e, [{ opacity: Number(e?.style.opacity || 1) }, { opacity: 1 }], {
|
|
9110
9155
|
duration: 200,
|
|
9111
9156
|
easing: Ae
|
|
9112
9157
|
}));
|
|
@@ -9115,23 +9160,23 @@ function Kd({ id: e, board: t, sandbox: n = "allow-scripts", src: i, siblings: a
|
|
|
9115
9160
|
C.current = !0;
|
|
9116
9161
|
let e = p.current?.style.transform || "none", t = O(o), n = {
|
|
9117
9162
|
duration: 100,
|
|
9118
|
-
easing:
|
|
9163
|
+
easing: Ce
|
|
9119
9164
|
};
|
|
9120
9165
|
await Promise.all([
|
|
9121
|
-
t ?
|
|
9166
|
+
t ? Jd(p.current, [{ transform: e }, { transform: t }], {
|
|
9122
9167
|
duration: 240,
|
|
9123
|
-
easing:
|
|
9124
|
-
}).done :
|
|
9125
|
-
|
|
9168
|
+
easing: Ce
|
|
9169
|
+
}).done : Jd(p.current, [{ opacity: 1 }, { opacity: 0 }], n).done,
|
|
9170
|
+
Jd(m.current, [{ opacity: Number(m.current?.style.opacity || 1) }, { opacity: 0 }], {
|
|
9126
9171
|
duration: 240,
|
|
9127
|
-
easing:
|
|
9172
|
+
easing: Ce
|
|
9128
9173
|
}).done,
|
|
9129
|
-
...k().map((e) =>
|
|
9174
|
+
...k().map((e) => Jd(e, [{ opacity: Number(e?.style.opacity || 1) }, { opacity: 0 }], n).done)
|
|
9130
9175
|
]), c();
|
|
9131
9176
|
}, ee = async (e, t) => {
|
|
9132
9177
|
if (!t || C.current) return;
|
|
9133
9178
|
C.current = !0;
|
|
9134
|
-
let n = p.current?.style.transform || "none", r =
|
|
9179
|
+
let n = p.current?.style.transform || "none", r = Jd(p.current, [{
|
|
9135
9180
|
transform: n,
|
|
9136
9181
|
opacity: 1
|
|
9137
9182
|
}, {
|
|
@@ -9139,13 +9184,13 @@ function Kd({ id: e, board: t, sandbox: n = "allow-scripts", src: i, siblings: a
|
|
|
9139
9184
|
opacity: 0
|
|
9140
9185
|
}], {
|
|
9141
9186
|
duration: 180,
|
|
9142
|
-
easing:
|
|
9187
|
+
easing: Ce
|
|
9143
9188
|
});
|
|
9144
9189
|
await r.done, S.current = {
|
|
9145
9190
|
dir: e,
|
|
9146
9191
|
leaving: r.cancel
|
|
9147
9192
|
}, C.current = !1, v(null), s(t);
|
|
9148
|
-
},
|
|
9193
|
+
}, M = (e) => {
|
|
9149
9194
|
let t = y.current;
|
|
9150
9195
|
if (C.current || t?.mode === "dismiss" || t?.mode === "swipe" || (t && (t.mode = "pan"), f.onPointerDown(e), t)) return;
|
|
9151
9196
|
[
|
|
@@ -9161,7 +9206,7 @@ function Kd({ id: e, board: t, sandbox: n = "allow-scripts", src: i, siblings: a
|
|
|
9161
9206
|
mode: "pending",
|
|
9162
9207
|
track: n
|
|
9163
9208
|
};
|
|
9164
|
-
},
|
|
9209
|
+
}, te = (e) => {
|
|
9165
9210
|
let n = y.current;
|
|
9166
9211
|
if (!n || n.id !== e.pointerId) return f.onPointerMove(e);
|
|
9167
9212
|
n.track.add(e.clientX, e.clientY, performance.now());
|
|
@@ -9177,18 +9222,18 @@ function Kd({ id: e, board: t, sandbox: n = "allow-scripts", src: i, siblings: a
|
|
|
9177
9222
|
dx: r,
|
|
9178
9223
|
dy: i
|
|
9179
9224
|
});
|
|
9180
|
-
},
|
|
9225
|
+
}, N = (e) => {
|
|
9181
9226
|
let t = y.current;
|
|
9182
9227
|
if (!t || t.id !== e.pointerId || (y.current = null, t.mode === "pan" || t.mode === "pending")) return f.onPointerUp(e);
|
|
9183
9228
|
let n = t.track.velocity(performance.now()), r = e.clientX - t.x, i = e.clientY - t.y;
|
|
9184
|
-
if (t.mode === "dismiss") return i >
|
|
9185
|
-
let a = n.x < -.4 ? 1 : n.x >
|
|
9229
|
+
if (t.mode === "dismiss") return i > Ud && n.y > -.4 || n.y > Wd ? void j() : A();
|
|
9230
|
+
let a = n.x < -.4 ? 1 : n.x > Kd ? -1 : 0, o = r < -110 ? 1 : r > Gd ? -1 : 0, s = a === 0 ? o : o === 0 || o === a ? a : 0, c = s === 1 ? E : s === -1 ? T : void 0;
|
|
9186
9231
|
c && s ? ee(s, c) : A();
|
|
9187
|
-
}, { width:
|
|
9232
|
+
}, { width: ne, height: re } = D(), ie, ae = 1, P = 1;
|
|
9188
9233
|
if (_?.axis === "y") {
|
|
9189
9234
|
let e = Math.max(0, _.dy), t = 1 - Math.min(e / 900, .3);
|
|
9190
|
-
|
|
9191
|
-
} else _?.axis === "x" && (
|
|
9235
|
+
ie = `translate(${_.dx * .6 + (1 - t) * ne / 2}px, ${e + (1 - t) * re / 2}px) scale(${t})`, ae = 1 - Math.min(e / 420, .85), P = Math.max(0, 1 - e / Ud);
|
|
9236
|
+
} else _?.axis === "x" && (ie = `translateX(${_.dx > 0 && !T || _.dx < 0 && !E ? _.dx * qd : _.dx}px)`);
|
|
9192
9237
|
return /* @__PURE__ */ Q("div", {
|
|
9193
9238
|
"data-phone-board": !0,
|
|
9194
9239
|
className: "xixxii4 x10a8y8t x68pp3s x78zum5 xdt5ytf xo2rkog xqfszdh",
|
|
@@ -9196,18 +9241,18 @@ function Kd({ id: e, board: t, sandbox: n = "allow-scripts", src: i, siblings: a
|
|
|
9196
9241
|
/* @__PURE__ */ Z("div", {
|
|
9197
9242
|
ref: m,
|
|
9198
9243
|
className: "x10l6tqk x10a8y8t x184qs1t",
|
|
9199
|
-
style: _ ? { opacity:
|
|
9244
|
+
style: _ ? { opacity: ae } : void 0
|
|
9200
9245
|
}),
|
|
9201
9246
|
/* @__PURE__ */ Q("header", {
|
|
9202
9247
|
ref: h,
|
|
9203
9248
|
className: "x1n2onr6 x2lah0s xdd8jsf x78zum5 x6s0dn4 x195vfkc x135b78x xv54qhq xso031l x1q0q8m5 xtrfj0v x1rozbrz",
|
|
9204
|
-
style: _ ? { opacity:
|
|
9249
|
+
style: _ ? { opacity: P } : void 0,
|
|
9205
9250
|
children: [
|
|
9206
9251
|
/* @__PURE__ */ Z("button", {
|
|
9207
9252
|
"aria-label": W("phone.backToCanvas"),
|
|
9208
9253
|
type: "button",
|
|
9209
9254
|
onClick: () => void j(),
|
|
9210
|
-
...G(
|
|
9255
|
+
...G(Hd.ghost),
|
|
9211
9256
|
children: /* @__PURE__ */ Z(nn, { size: 22 })
|
|
9212
9257
|
}),
|
|
9213
9258
|
/* @__PURE__ */ Q("span", {
|
|
@@ -9233,9 +9278,9 @@ function Kd({ id: e, board: t, sandbox: n = "allow-scripts", src: i, siblings: a
|
|
|
9233
9278
|
/* @__PURE__ */ Z("div", {
|
|
9234
9279
|
"data-board-body": !0,
|
|
9235
9280
|
ref: l,
|
|
9236
|
-
onPointerDown:
|
|
9237
|
-
onPointerMove:
|
|
9238
|
-
onPointerUp:
|
|
9281
|
+
onPointerDown: M,
|
|
9282
|
+
onPointerMove: te,
|
|
9283
|
+
onPointerUp: N,
|
|
9239
9284
|
onPointerCancel: (e) => {
|
|
9240
9285
|
let t = y.current;
|
|
9241
9286
|
t?.id === e.pointerId && ((t.mode === "dismiss" || t.mode === "swipe") && A(), y.current = null), f.onPointerCancel(e);
|
|
@@ -9245,7 +9290,7 @@ function Kd({ id: e, board: t, sandbox: n = "allow-scripts", src: i, siblings: a
|
|
|
9245
9290
|
"data-board-stage": !0,
|
|
9246
9291
|
ref: p,
|
|
9247
9292
|
className: "x10l6tqk x10a8y8t x1hj3fc7",
|
|
9248
|
-
style:
|
|
9293
|
+
style: ie ? { transform: ie } : void 0,
|
|
9249
9294
|
children: /* @__PURE__ */ Z("div", {
|
|
9250
9295
|
className: "x10l6tqk xu96u03 x13vifvy x1hj3fc7",
|
|
9251
9296
|
style: {
|
|
@@ -9275,14 +9320,14 @@ function Kd({ id: e, board: t, sandbox: n = "allow-scripts", src: i, siblings: a
|
|
|
9275
9320
|
a.length > 1 ? /* @__PURE__ */ Q("div", {
|
|
9276
9321
|
ref: g,
|
|
9277
9322
|
className: "x1n2onr6 x2lah0s x78zum5 x6s0dn4 xdqyycr x1iorvi4 xe1blv6 x178xt8z x13fuv20 xxu5053 x1rozbrz",
|
|
9278
|
-
style: _ ? { opacity:
|
|
9323
|
+
style: _ ? { opacity: P } : void 0,
|
|
9279
9324
|
children: [
|
|
9280
9325
|
/* @__PURE__ */ Z("button", {
|
|
9281
9326
|
"aria-label": W("phone.previousBoard"),
|
|
9282
9327
|
disabled: !T,
|
|
9283
9328
|
type: "button",
|
|
9284
9329
|
onClick: () => void ee(-1, T),
|
|
9285
|
-
...G(
|
|
9330
|
+
...G(Hd.ghost),
|
|
9286
9331
|
children: /* @__PURE__ */ Z(nn, { size: 20 })
|
|
9287
9332
|
}),
|
|
9288
9333
|
/* @__PURE__ */ Z("span", {
|
|
@@ -9300,7 +9345,7 @@ function Kd({ id: e, board: t, sandbox: n = "allow-scripts", src: i, siblings: a
|
|
|
9300
9345
|
disabled: !E,
|
|
9301
9346
|
type: "button",
|
|
9302
9347
|
onClick: () => void ee(1, E),
|
|
9303
|
-
...G(
|
|
9348
|
+
...G(Hd.ghost),
|
|
9304
9349
|
children: /* @__PURE__ */ Z(rn, { size: 20 })
|
|
9305
9350
|
})
|
|
9306
9351
|
]
|
|
@@ -9310,13 +9355,13 @@ function Kd({ id: e, board: t, sandbox: n = "allow-scripts", src: i, siblings: a
|
|
|
9310
9355
|
}
|
|
9311
9356
|
//#endregion
|
|
9312
9357
|
//#region src/viewer/lib/questions.ts
|
|
9313
|
-
var
|
|
9358
|
+
var Xd = (e) => ({
|
|
9314
9359
|
minX: e.x,
|
|
9315
9360
|
minY: e.y,
|
|
9316
9361
|
maxX: e.x + e.w,
|
|
9317
9362
|
maxY: e.y + e.h
|
|
9318
9363
|
});
|
|
9319
|
-
function
|
|
9364
|
+
function Zd(e, t, n) {
|
|
9320
9365
|
let r = t.pages[n];
|
|
9321
9366
|
if (!r) return [];
|
|
9322
9367
|
let i = /* @__PURE__ */ new Set(), a = [];
|
|
@@ -9328,7 +9373,7 @@ function Jd(e, t, n) {
|
|
|
9328
9373
|
id: t,
|
|
9329
9374
|
title: o.title ?? t,
|
|
9330
9375
|
boards: c,
|
|
9331
|
-
bounds:
|
|
9376
|
+
bounds: Xd(s)
|
|
9332
9377
|
});
|
|
9333
9378
|
}
|
|
9334
9379
|
}
|
|
@@ -9336,7 +9381,7 @@ function Jd(e, t, n) {
|
|
|
9336
9381
|
id: t,
|
|
9337
9382
|
title: r.title ?? t,
|
|
9338
9383
|
boards: [t],
|
|
9339
|
-
bounds:
|
|
9384
|
+
bounds: Xd(r)
|
|
9340
9385
|
});
|
|
9341
9386
|
a.sort((e, t) => e.bounds.minY - t.bounds.minY || e.bounds.minX - t.bounds.minX);
|
|
9342
9387
|
let o = Object.entries(e.notes ?? {}).filter(([e, t]) => t.page === n && t.kind === "title" && r.notes[e]).map(([e, t]) => ({
|
|
@@ -9355,25 +9400,25 @@ function Jd(e, t, n) {
|
|
|
9355
9400
|
let c = (e) => o.find((t) => t.id === e)?.rect.y ?? -Infinity;
|
|
9356
9401
|
return [...s.values()].sort((e, t) => c(t.id) - c(e.id));
|
|
9357
9402
|
}
|
|
9358
|
-
var
|
|
9359
|
-
function
|
|
9360
|
-
let n =
|
|
9403
|
+
var Qd = (e) => e.flatMap((e) => e.questions);
|
|
9404
|
+
function $d(e, t) {
|
|
9405
|
+
let n = Qd(e);
|
|
9361
9406
|
if (t) {
|
|
9362
9407
|
let r = e.find((e) => e.id === t)?.questions[0] ?? n.find((e) => e.id === t) ?? n.find((e) => e.boards.includes(t));
|
|
9363
9408
|
if (r) return r;
|
|
9364
9409
|
}
|
|
9365
9410
|
return n[0] ?? null;
|
|
9366
9411
|
}
|
|
9367
|
-
function
|
|
9412
|
+
function ef(e, t, n) {
|
|
9368
9413
|
let r = e.findIndex((e) => e.id === t);
|
|
9369
9414
|
return r === -1 ? null : e[r + n] ?? null;
|
|
9370
9415
|
}
|
|
9371
|
-
var
|
|
9372
|
-
function
|
|
9373
|
-
let { t: d } = Re(), f =
|
|
9416
|
+
var tf = .66, nf = (e, t, n) => e.id === t?.id ? "current" : n[e.id]?.state === "pass" ? "pass" : n[e.id]?.state === "reject" ? "reject" : "open";
|
|
9417
|
+
function rf({ rounds: e, current: t, previous: n, next: r, pages: i, page: a, onPageChange: o, onPick: s, snap: c, onSnap: l, verdicts: u = {} }) {
|
|
9418
|
+
let { t: d } = Re(), f = Qd(e), p = t ? f.findIndex((e) => e.id === t.id) : -1;
|
|
9374
9419
|
return /* @__PURE__ */ Z(it, {
|
|
9375
9420
|
snap: c,
|
|
9376
|
-
snaps: [78,
|
|
9421
|
+
snaps: [78, tf],
|
|
9377
9422
|
header: /* @__PURE__ */ Q("div", {
|
|
9378
9423
|
className: "x78zum5 x6s0dn4 x17d4w8g x1xijbu4 xsag5q8",
|
|
9379
9424
|
children: [
|
|
@@ -9382,7 +9427,7 @@ function ef({ rounds: e, current: t, previous: n, next: r, pages: i, page: a, on
|
|
|
9382
9427
|
disabled: !n,
|
|
9383
9428
|
type: "button",
|
|
9384
9429
|
onClick: () => n && s(n),
|
|
9385
|
-
...G(
|
|
9430
|
+
...G(Hd.ghost),
|
|
9386
9431
|
children: /* @__PURE__ */ Z(nn, { size: 20 })
|
|
9387
9432
|
}),
|
|
9388
9433
|
/* @__PURE__ */ Q("span", {
|
|
@@ -9415,7 +9460,7 @@ function ef({ rounds: e, current: t, previous: n, next: r, pages: i, page: a, on
|
|
|
9415
9460
|
"data-progress": !0,
|
|
9416
9461
|
className: "x78zum5 x1ed6fcf",
|
|
9417
9462
|
children: f.map((e) => {
|
|
9418
|
-
let n =
|
|
9463
|
+
let n = nf(e, t, u);
|
|
9419
9464
|
return /* @__PURE__ */ Z("span", {
|
|
9420
9465
|
"data-mark": n,
|
|
9421
9466
|
...{
|
|
@@ -9437,7 +9482,7 @@ function ef({ rounds: e, current: t, previous: n, next: r, pages: i, page: a, on
|
|
|
9437
9482
|
disabled: !r,
|
|
9438
9483
|
type: "button",
|
|
9439
9484
|
onClick: () => r && s(r),
|
|
9440
|
-
...G(
|
|
9485
|
+
...G(Hd.ghost),
|
|
9441
9486
|
children: /* @__PURE__ */ Z(rn, { size: 20 })
|
|
9442
9487
|
})
|
|
9443
9488
|
]
|
|
@@ -9448,7 +9493,7 @@ function ef({ rounds: e, current: t, previous: n, next: r, pages: i, page: a, on
|
|
|
9448
9493
|
className: "xwxc41k xqfszdh",
|
|
9449
9494
|
children: [i.length > 1 ? /* @__PURE__ */ Z("div", {
|
|
9450
9495
|
className: "x78zum5 x13a6bvl x1hr3lfm x12ulsxz",
|
|
9451
|
-
children: /* @__PURE__ */ Z(
|
|
9496
|
+
children: /* @__PURE__ */ Z(Bd, {
|
|
9452
9497
|
page: a,
|
|
9453
9498
|
pages: i,
|
|
9454
9499
|
onPageChange: o
|
|
@@ -9485,138 +9530,139 @@ function ef({ rounds: e, current: t, previous: n, next: r, pages: i, page: a, on
|
|
|
9485
9530
|
}
|
|
9486
9531
|
//#endregion
|
|
9487
9532
|
//#region src/viewer/layouts/PhoneArtboard.tsx
|
|
9488
|
-
var
|
|
9533
|
+
var af = {
|
|
9489
9534
|
top: 16,
|
|
9490
9535
|
right: 16,
|
|
9491
9536
|
bottom: 94,
|
|
9492
9537
|
left: 16
|
|
9493
|
-
},
|
|
9494
|
-
function
|
|
9495
|
-
let { viewportRef: h, worldRef: g,
|
|
9538
|
+
}, of = 8, sf = /* @__PURE__ */ new Set(), cf = () => {}, lf = [];
|
|
9539
|
+
function uf({ id: e, canvas: t, layout: n, warnings: i, pending: a, contentBase: o, boardPort: s, boardPath: c, versions: l, live: u, loaded: d, agent: f, comments: p, actions: m }) {
|
|
9540
|
+
let { viewportRef: h, worldRef: g, overlayRef: _, view: v, viewNow: y, size: b, gesturing: x, fit: S, handlers: C } = Uu("hand"), [T, E] = X(null), [D, O] = X(78), [k, A] = X(null), j = Y(null), ee = q((e, t = !1) => e ? (E(e.id), S(e.bounds, af, { animate: t }), !0) : !1, [S]), { page: M, changePage: te } = Yl({
|
|
9496
9541
|
canvas: t,
|
|
9497
9542
|
layout: n,
|
|
9498
9543
|
fitPage: q((e) => {
|
|
9499
9544
|
let r = n?.pages[e];
|
|
9500
|
-
return !t || !r ? !1 : (
|
|
9545
|
+
return !t || !r ? !1 : (ee($d(Zd(t, n, e), t.focus?.target)) || (E(null), r.bounds && S(r.bounds, af)), !0);
|
|
9501
9546
|
}, [
|
|
9502
9547
|
t,
|
|
9503
9548
|
n,
|
|
9504
|
-
|
|
9505
|
-
|
|
9549
|
+
S,
|
|
9550
|
+
ee
|
|
9506
9551
|
]),
|
|
9507
9552
|
startAtFocus: !0
|
|
9508
|
-
}),
|
|
9553
|
+
}), N = bt(() => t && n && M ? Zd(t, n, M) : [], [
|
|
9509
9554
|
t,
|
|
9510
9555
|
n,
|
|
9511
|
-
|
|
9512
|
-
]), ne = bt(() =>
|
|
9513
|
-
|
|
9514
|
-
},
|
|
9556
|
+
M
|
|
9557
|
+
]), ne = bt(() => Qd(N), [N]), re = ne.find((e) => e.id === T) ?? null, ie = (e) => {
|
|
9558
|
+
ee(e, !0), O(78);
|
|
9559
|
+
}, ae = t?.boards ?? {}, P = bt(() => Object.entries(t?.boards ?? {}).filter(([, e]) => e.page === M), [t, M]), F = Object.entries(t?.groups ?? {}).filter(([, e]) => e.boards.some((e) => ae[e]?.page === M)), I = Object.entries(t?.notes ?? {}).filter(([, e]) => e.page === M), oe = bt(() => new Set(a), [a]), L = du({
|
|
9515
9560
|
contentBase: o,
|
|
9516
9561
|
boardPort: s,
|
|
9517
9562
|
boardPath: c
|
|
9518
|
-
}),
|
|
9519
|
-
|
|
9520
|
-
|
|
9521
|
-
|
|
9522
|
-
]),
|
|
9523
|
-
boards:
|
|
9563
|
+
}), R = bt(() => L ? oe : new Set(P.map(([e]) => e)), [
|
|
9564
|
+
L,
|
|
9565
|
+
oe,
|
|
9566
|
+
P
|
|
9567
|
+
]), z = au({
|
|
9568
|
+
boards: P,
|
|
9524
9569
|
versions: l,
|
|
9525
|
-
pending:
|
|
9526
|
-
view:
|
|
9527
|
-
viewport:
|
|
9528
|
-
active:
|
|
9529
|
-
gesturing:
|
|
9530
|
-
}),
|
|
9570
|
+
pending: R,
|
|
9571
|
+
view: v,
|
|
9572
|
+
viewport: b,
|
|
9573
|
+
active: sf,
|
|
9574
|
+
gesturing: x
|
|
9575
|
+
}), se = _u(P, v, b), ce = bt(() => new Set(p?.stale ?? []), [p]), le = ed({
|
|
9531
9576
|
canvas: t,
|
|
9532
|
-
page:
|
|
9533
|
-
threads: p?.comments.threads ??
|
|
9534
|
-
stale:
|
|
9577
|
+
page: M,
|
|
9578
|
+
threads: p?.comments.threads ?? lf,
|
|
9579
|
+
stale: ce,
|
|
9535
9580
|
versions: l
|
|
9536
9581
|
}), ue = (e) => {
|
|
9537
|
-
let t = h.current.getBoundingClientRect(), n = (e.clientX - t.left -
|
|
9538
|
-
return
|
|
9582
|
+
let t = h.current.getBoundingClientRect(), n = y(), r = (e.clientX - t.left - n.x) / n.k, i = (e.clientY - t.top - n.y) / n.k;
|
|
9583
|
+
return P.find(([, e]) => r >= e.x && r <= e.x + e.w && i >= e.y && i <= e.y + e.h)?.[0] ?? null;
|
|
9539
9584
|
}, de = (e) => {
|
|
9540
|
-
|
|
9585
|
+
C.onPointerDown(e);
|
|
9541
9586
|
let t = !e.currentTarget.contains(e.target) || e.target.closest("[data-chrome]");
|
|
9542
|
-
|
|
9587
|
+
j.current = j.current || t ? null : {
|
|
9543
9588
|
pointer: e.pointerId,
|
|
9544
9589
|
x: e.clientX,
|
|
9545
9590
|
y: e.clientY
|
|
9546
9591
|
};
|
|
9547
|
-
},
|
|
9548
|
-
|
|
9549
|
-
let t =
|
|
9550
|
-
t && (t.pointer !== e.pointerId || Math.hypot(e.clientX - t.x, e.clientY - t.y) >
|
|
9551
|
-
},
|
|
9552
|
-
|
|
9553
|
-
let t =
|
|
9554
|
-
if (
|
|
9592
|
+
}, fe = (e) => {
|
|
9593
|
+
C.onPointerMove(e);
|
|
9594
|
+
let t = j.current;
|
|
9595
|
+
t && (t.pointer !== e.pointerId || Math.hypot(e.clientX - t.x, e.clientY - t.y) > of) && (j.current = null);
|
|
9596
|
+
}, pe = (e) => {
|
|
9597
|
+
C.onPointerUp(e);
|
|
9598
|
+
let t = j.current;
|
|
9599
|
+
if (j.current = null, t?.pointer !== e.pointerId) return;
|
|
9555
9600
|
let n = ue(e);
|
|
9556
|
-
n &&
|
|
9557
|
-
},
|
|
9558
|
-
x:
|
|
9559
|
-
y:
|
|
9560
|
-
w:
|
|
9561
|
-
h:
|
|
9562
|
-
} : void 0,
|
|
9601
|
+
n && A(n);
|
|
9602
|
+
}, B = k ? ae[k] : void 0, me = h.current?.getBoundingClientRect(), he = B && me ? {
|
|
9603
|
+
x: me.left + v.x + B.x * v.k,
|
|
9604
|
+
y: me.top + v.y + B.y * v.k,
|
|
9605
|
+
w: B.w * v.k,
|
|
9606
|
+
h: B.h * v.k
|
|
9607
|
+
} : void 0, ge = (e) => !t?.groups?.[e.id], _e = k ? N.find((e) => e.questions.some((e) => e.boards.includes(k))) : void 0, ve = _e?.questions.find((e) => e.boards.includes(k)), V = k ? ve ? ge(ve) ? _e.questions.filter(ge).map((e) => e.id) : ve.boards : [k] : [];
|
|
9563
9608
|
return /* @__PURE__ */ Q("div", {
|
|
9564
9609
|
className: "xixxii4 x10a8y8t x78zum5 xdt5ytf x184qs1t",
|
|
9565
9610
|
children: [
|
|
9566
|
-
/* @__PURE__ */ Z(
|
|
9611
|
+
/* @__PURE__ */ Z(Vd, {
|
|
9567
9612
|
actions: m,
|
|
9568
9613
|
live: u,
|
|
9569
|
-
page:
|
|
9614
|
+
page: M,
|
|
9570
9615
|
pages: t?.pages ?? [],
|
|
9571
9616
|
title: t?.title || e,
|
|
9572
|
-
onPageChange:
|
|
9617
|
+
onPageChange: te
|
|
9573
9618
|
}),
|
|
9574
9619
|
/* @__PURE__ */ Q("div", {
|
|
9575
9620
|
ref: h,
|
|
9576
9621
|
className: "x1n2onr6 x98rzlu x2lwn1j xb3r6kr x5ve5x3 x87ps6o xqfszdh xo2rkog",
|
|
9577
9622
|
onPointerDown: de,
|
|
9578
|
-
onPointerMove:
|
|
9579
|
-
onPointerUp:
|
|
9623
|
+
onPointerMove: fe,
|
|
9624
|
+
onPointerUp: pe,
|
|
9580
9625
|
onPointerCancel: (e) => {
|
|
9581
|
-
|
|
9626
|
+
C.onPointerCancel(e), j.current = null;
|
|
9582
9627
|
},
|
|
9583
9628
|
children: [t && n ? /* @__PURE__ */ Q(w, {
|
|
9584
9629
|
resetKey: t,
|
|
9585
9630
|
children: [/* @__PURE__ */ Z(ht, {
|
|
9586
9631
|
agent: f,
|
|
9587
|
-
boardBase:
|
|
9588
|
-
boardSandbox:
|
|
9589
|
-
boards:
|
|
9632
|
+
boardBase: L?.base,
|
|
9633
|
+
boardSandbox: L?.sandbox,
|
|
9634
|
+
boards: P,
|
|
9590
9635
|
contentBase: o,
|
|
9591
|
-
culled:
|
|
9592
|
-
frameLoaded:
|
|
9593
|
-
frameRef:
|
|
9594
|
-
gesturing:
|
|
9595
|
-
images:
|
|
9636
|
+
culled: se,
|
|
9637
|
+
frameLoaded: cf,
|
|
9638
|
+
frameRef: z.frameRef,
|
|
9639
|
+
gesturing: x,
|
|
9640
|
+
images: z.images,
|
|
9596
9641
|
inspecting: !1,
|
|
9597
9642
|
live: u,
|
|
9598
|
-
notes:
|
|
9599
|
-
pending:
|
|
9600
|
-
phases:
|
|
9601
|
-
playing:
|
|
9643
|
+
notes: I,
|
|
9644
|
+
pending: R,
|
|
9645
|
+
phases: z.phases,
|
|
9646
|
+
playing: sf,
|
|
9602
9647
|
replays: {},
|
|
9603
9648
|
versions: l,
|
|
9604
|
-
view:
|
|
9649
|
+
view: v,
|
|
9605
9650
|
worldRef: g,
|
|
9606
9651
|
writing: u ? t.writing : void 0
|
|
9607
9652
|
}), /* @__PURE__ */ Z(Kl, {
|
|
9608
|
-
allBoards:
|
|
9609
|
-
boards:
|
|
9653
|
+
allBoards: ae,
|
|
9654
|
+
boards: P,
|
|
9610
9655
|
contentBase: o,
|
|
9611
|
-
groups:
|
|
9612
|
-
|
|
9613
|
-
|
|
9656
|
+
groups: F,
|
|
9657
|
+
overlayRef: _,
|
|
9658
|
+
pending: oe,
|
|
9659
|
+
playing: sf,
|
|
9614
9660
|
verdicts: le,
|
|
9615
9661
|
versions: l,
|
|
9616
|
-
view:
|
|
9617
|
-
onExpand:
|
|
9662
|
+
view: v,
|
|
9663
|
+
onExpand: A,
|
|
9618
9664
|
onReplay: () => {},
|
|
9619
|
-
onTogglePlay:
|
|
9665
|
+
onTogglePlay: A
|
|
9620
9666
|
})]
|
|
9621
9667
|
}) : /* @__PURE__ */ Z("div", {
|
|
9622
9668
|
className: "x10l6tqk x10a8y8t xrvj5dj x1ku5rj1 xggk2y7 x1bo0w0s xif65rj x2b8uid",
|
|
@@ -9624,333 +9670,347 @@ function sf({ id: e, canvas: t, layout: n, warnings: i, pending: a, contentBase:
|
|
|
9624
9670
|
}), ne.length > 0 ? /* @__PURE__ */ Z("div", {
|
|
9625
9671
|
"data-chrome": !0,
|
|
9626
9672
|
className: "x10l6tqk x10a8y8t x1n327nk x47corl",
|
|
9627
|
-
children: /* @__PURE__ */ Z(
|
|
9628
|
-
current:
|
|
9629
|
-
next:
|
|
9630
|
-
page:
|
|
9673
|
+
children: /* @__PURE__ */ Z(rf, {
|
|
9674
|
+
current: re,
|
|
9675
|
+
next: T ? ef(ne, T, 1) : null,
|
|
9676
|
+
page: M,
|
|
9631
9677
|
pages: t?.pages ?? [],
|
|
9632
|
-
previous:
|
|
9633
|
-
rounds:
|
|
9634
|
-
snap:
|
|
9678
|
+
previous: T ? ef(ne, T, -1) : null,
|
|
9679
|
+
rounds: N,
|
|
9680
|
+
snap: D,
|
|
9635
9681
|
verdicts: le.states,
|
|
9636
|
-
onPageChange:
|
|
9637
|
-
onPick:
|
|
9638
|
-
onSnap:
|
|
9682
|
+
onPageChange: te,
|
|
9683
|
+
onPick: ie,
|
|
9684
|
+
onSnap: O
|
|
9639
9685
|
})
|
|
9640
9686
|
}) : null]
|
|
9641
9687
|
}),
|
|
9642
|
-
|
|
9643
|
-
board:
|
|
9644
|
-
id:
|
|
9645
|
-
origin:
|
|
9646
|
-
sandbox: r(
|
|
9647
|
-
siblings:
|
|
9648
|
-
src: `${r(
|
|
9649
|
-
onClose: () =>
|
|
9650
|
-
onOpen:
|
|
9688
|
+
k && B ? /* @__PURE__ */ Z(Yd, {
|
|
9689
|
+
board: B,
|
|
9690
|
+
id: k,
|
|
9691
|
+
origin: he,
|
|
9692
|
+
sandbox: r(B) ? void 0 : L?.sandbox,
|
|
9693
|
+
siblings: V,
|
|
9694
|
+
src: `${r(B) ? o : L?.base ?? o}${B.file}?v=${l[B.file] ?? 0}`,
|
|
9695
|
+
onClose: () => A(null),
|
|
9696
|
+
onOpen: A
|
|
9651
9697
|
}) : null
|
|
9652
9698
|
]
|
|
9653
9699
|
});
|
|
9654
9700
|
}
|
|
9655
9701
|
//#endregion
|
|
9656
9702
|
//#region src/viewer/layouts/ArtboardView.tsx
|
|
9657
|
-
function
|
|
9658
|
-
return Me("(max-width: 640px)") ? /* @__PURE__ */ Z(
|
|
9703
|
+
function df(e) {
|
|
9704
|
+
return Me("(max-width: 640px)") ? /* @__PURE__ */ Z(uf, { ...e }) : /* @__PURE__ */ Z(ff, { ...e });
|
|
9659
9705
|
}
|
|
9660
|
-
function
|
|
9661
|
-
let [v, y] = X("select"), { viewportRef: b, worldRef: x,
|
|
9706
|
+
function ff({ id: e, artifact: t, canvas: n, layout: i, warnings: a, pending: o, contentBase: s, boardPort: c, boardPath: l, versions: u, live: d, loaded: f, send: p, agent: m, comments: h, comment: g, actions: _ }) {
|
|
9707
|
+
let [v, y] = X("select"), { viewportRef: b, worldRef: x, overlayRef: S, view: C, viewNow: T, gesturing: E, size: D, fit: O, zoomBy: k, zoomTo: A, cursor: j, hand: ee, handlers: M, panBy: te, wheelAt: N, panning: ne, setSpaceHeld: re } = Uu(v), [ie, ae] = X(!1), [P] = X(() => new URLSearchParams(location.search).has("debug")), [F, I] = X("open"), oe = (e) => e && i?.pages[e]?.bounds || null, { page: L, changePage: R } = Yl({
|
|
9662
9708
|
canvas: n,
|
|
9663
9709
|
layout: i,
|
|
9664
9710
|
fitPage: q((e) => {
|
|
9665
9711
|
let t = i?.pages[e]?.bounds;
|
|
9666
|
-
return t ? (
|
|
9667
|
-
}, [i,
|
|
9668
|
-
}), [
|
|
9669
|
-
J(() =>
|
|
9670
|
-
let
|
|
9671
|
-
|
|
9672
|
-
},
|
|
9673
|
-
|
|
9712
|
+
return t ? (O(t), !0) : !1;
|
|
9713
|
+
}, [i, O])
|
|
9714
|
+
}), [z, se] = X(null), [ce, le] = X(() => /* @__PURE__ */ new Set()), [ue, de] = X({}), fe = gu(e), [pe, B] = X(null), me = Y(null);
|
|
9715
|
+
J(() => B(null), [L, e]);
|
|
9716
|
+
let ge = () => {
|
|
9717
|
+
B(null), me.current?.focus();
|
|
9718
|
+
}, _e = (e, t) => {
|
|
9719
|
+
me.current = t;
|
|
9674
9720
|
let r = n?.boards[e], i = b.current;
|
|
9675
|
-
if (
|
|
9676
|
-
let e =
|
|
9721
|
+
if (pe !== e && !z && r && i) {
|
|
9722
|
+
let e = Fd(r, T(), {
|
|
9677
9723
|
width: i.clientWidth,
|
|
9678
9724
|
height: i.clientHeight
|
|
9679
9725
|
});
|
|
9680
|
-
(e.x || e.y) &&
|
|
9726
|
+
(e.x || e.y) && te(e.x, e.y);
|
|
9681
9727
|
}
|
|
9682
|
-
|
|
9683
|
-
},
|
|
9684
|
-
enabled: !
|
|
9685
|
-
mode:
|
|
9686
|
-
playing:
|
|
9728
|
+
B((t) => t === e ? null : e);
|
|
9729
|
+
}, ve = v === "select" && !z && !ne, V = v === "comment", H = ju({
|
|
9730
|
+
enabled: !z && (v === "select" || V || ie),
|
|
9731
|
+
mode: V ? "comment" : "select",
|
|
9732
|
+
playing: ce,
|
|
9687
9733
|
onInput: (e, t) => {
|
|
9688
9734
|
let r = n?.boards[e];
|
|
9689
|
-
|
|
9690
|
-
|
|
9691
|
-
|
|
9692
|
-
|
|
9693
|
-
|
|
9694
|
-
|
|
9695
|
-
|
|
9696
|
-
|
|
9735
|
+
if (r) {
|
|
9736
|
+
if (t.type === "ryugi:inspect:wheel") {
|
|
9737
|
+
let e = T();
|
|
9738
|
+
N({
|
|
9739
|
+
...t,
|
|
9740
|
+
x: e.x + (r.x + t.x) * e.k,
|
|
9741
|
+
y: e.y + (r.y + t.y) * e.k
|
|
9742
|
+
});
|
|
9743
|
+
} else t.type === "ryugi:inspect:pan" ? te(t.deltaX, t.deltaY) : t.type === "ryugi:inspect:drag" ? V ? U.onFrameDrag(e, t) : ve && Re.drag(t.phase, r.x + t.x, r.y + t.y, t.append, t.id ? {
|
|
9744
|
+
boardId: e,
|
|
9745
|
+
id: t.id
|
|
9746
|
+
} : void 0) : t.code === "Space" ? re(t.down) : t.down && De(t);
|
|
9747
|
+
}
|
|
9697
9748
|
}
|
|
9698
9749
|
});
|
|
9699
|
-
|
|
9750
|
+
Yu({
|
|
9700
9751
|
artifact: t,
|
|
9701
9752
|
boards: n?.boards,
|
|
9702
9753
|
live: d,
|
|
9703
|
-
inspector:
|
|
9754
|
+
inspector: H,
|
|
9704
9755
|
send: p
|
|
9705
9756
|
});
|
|
9706
|
-
let
|
|
9757
|
+
let U = Xl({
|
|
9707
9758
|
comments: h,
|
|
9708
9759
|
comment: g,
|
|
9709
|
-
page:
|
|
9760
|
+
page: L,
|
|
9710
9761
|
boards: n?.boards ?? {},
|
|
9711
|
-
inspector:
|
|
9712
|
-
}),
|
|
9762
|
+
inspector: H
|
|
9763
|
+
}), ye = ed({
|
|
9713
9764
|
canvas: n,
|
|
9714
|
-
page:
|
|
9715
|
-
threads:
|
|
9716
|
-
stale:
|
|
9765
|
+
page: L,
|
|
9766
|
+
threads: U.threads,
|
|
9767
|
+
stale: U.stale,
|
|
9717
9768
|
versions: u,
|
|
9718
9769
|
comment: g
|
|
9719
|
-
}),
|
|
9720
|
-
let e =
|
|
9721
|
-
e &&
|
|
9770
|
+
}), be = ye.rejecting ? ye.origin(ye.rejecting) : null, xe = () => {
|
|
9771
|
+
let e = ye.progress.next && L ? i?.pages[L]?.groups[ye.progress.next] : void 0;
|
|
9772
|
+
e && O({
|
|
9722
9773
|
minX: e.x,
|
|
9723
9774
|
minY: e.y,
|
|
9724
9775
|
maxX: e.x + e.w,
|
|
9725
9776
|
maxY: e.y + e.h
|
|
9726
9777
|
});
|
|
9727
|
-
}, xe = (e) => {
|
|
9728
|
-
(e !== "comment" || g) && (e === "comment" && v === "select" && H.commentSelection(), e !== "comment" && H.close(), y(e));
|
|
9729
9778
|
}, Se = (e) => {
|
|
9730
|
-
|
|
9731
|
-
|
|
9732
|
-
|
|
9779
|
+
(e !== "comment" || g) && (e === "comment" && v === "select" && U.commentSelection(), e !== "comment" && U.close(), y(e));
|
|
9780
|
+
}, Ce = (e) => {
|
|
9781
|
+
let t = U.threads.find((t) => t.id === e), r = t && yr(t.anchor, n?.boards ?? {}), i = b.current, a = T();
|
|
9782
|
+
r && i && te(i.clientWidth / 2 - (a.x + r.x * a.k), i.clientHeight / 2 - (a.y + r.y * a.k)), U.setOpenId(e);
|
|
9783
|
+
}, we = q(() => ae(!1), []);
|
|
9733
9784
|
J(() => {
|
|
9734
|
-
|
|
9735
|
-
}, [
|
|
9736
|
-
let
|
|
9785
|
+
z && re(!1);
|
|
9786
|
+
}, [z, re]);
|
|
9787
|
+
let Te = bt(() => new Set(o), [o]), Ee = n?.pages ?? [];
|
|
9737
9788
|
J(() => {
|
|
9738
9789
|
document.title = n?.title || e;
|
|
9739
9790
|
}, [n?.title, e]), $e("artboard");
|
|
9740
|
-
function
|
|
9741
|
-
if ("target" in e && (e.defaultPrevented ||
|
|
9791
|
+
function De(e) {
|
|
9792
|
+
if ("target" in e && (e.defaultPrevented || he(e) || e.target?.closest?.("input, textarea, select, [contenteditable], [data-chrome=\"parameters\"]"))) return;
|
|
9742
9793
|
let t = () => {
|
|
9743
9794
|
"preventDefault" in e && e.preventDefault();
|
|
9744
9795
|
}, n = e.metaKey || e.ctrlKey;
|
|
9745
|
-
e.key === "Escape" &&
|
|
9796
|
+
e.key === "Escape" && V ? U.close() || Se("select") : e.key === "Escape" ? pe ? ge() : (se(null), H.clearSelection(), Re.reset()) : n && (e.key === "=" || e.key === "+") ? (t(), k(1.25)) : n && e.key === "-" ? (t(), k(.8)) : e.shiftKey && e.code === "Digit1" ? O(oe(L)) : e.shiftKey && e.code === "Digit0" ? A(1) : !n && !e.shiftKey && e.key.toLowerCase() === "v" ? (t(), Se("select")) : !n && !e.shiftKey && e.key.toLowerCase() === "h" ? (t(), Se("hand")) : !n && !e.shiftKey && e.key.toLowerCase() === "c" && (t(), Se("comment"));
|
|
9746
9797
|
}
|
|
9747
|
-
J(() => (window.addEventListener("keydown",
|
|
9748
|
-
let
|
|
9798
|
+
J(() => (window.addEventListener("keydown", De), () => window.removeEventListener("keydown", De)));
|
|
9799
|
+
let Oe = n?.boards ?? {}, ke = bt(() => Object.entries(n?.boards ?? {}).filter(([, e]) => e.page === L), [n, L]), Ae = Object.entries(n?.groups ?? {}).filter(([, e]) => e.boards.some((e) => Oe[e]?.page === L)), je = Object.entries(n?.notes ?? {}).filter(([, e]) => e.page === L), Me = z ? Oe[z] : void 0, Ne = Object.fromEntries(Object.entries(fe.states).flatMap(([e, t]) => {
|
|
9749
9800
|
let n = Object.keys(t.schema?.controls ?? {}).length, r = Object.entries(t.schema?.controls ?? {}).some(([e, n]) => t.values[e] !== n.default);
|
|
9750
9801
|
return n || t.error ? [[e, r]] : [];
|
|
9751
|
-
})),
|
|
9752
|
-
anchor: e ?
|
|
9753
|
-
boardId:
|
|
9754
|
-
state:
|
|
9755
|
-
title:
|
|
9756
|
-
onChange: (e, t) =>
|
|
9757
|
-
onClose:
|
|
9758
|
-
onReset: () =>
|
|
9759
|
-
}) : null,
|
|
9802
|
+
})), Pe = pe ? fe.states[pe] : void 0, Fe = pe ? Oe[pe] : void 0, Ie = (e) => pe && Pe && Fe && (Pe.schema || Pe.error) ? /* @__PURE__ */ Z(Rd, {
|
|
9803
|
+
anchor: e ? Pd(Fe, C) : void 0,
|
|
9804
|
+
boardId: pe,
|
|
9805
|
+
state: Pe,
|
|
9806
|
+
title: Fe.title ?? pe,
|
|
9807
|
+
onChange: (e, t) => fe.change(pe, e, t),
|
|
9808
|
+
onClose: ge,
|
|
9809
|
+
onReset: () => fe.reset(pe)
|
|
9810
|
+
}) : null, Le = Me ? (u[Me.file] ?? 0) > 0 && !Te.has(z) : !1, Re = Mu(ke, H, C.k, [
|
|
9760
9811
|
v,
|
|
9761
|
-
|
|
9762
|
-
|
|
9812
|
+
z,
|
|
9813
|
+
L,
|
|
9763
9814
|
ne
|
|
9764
|
-
]),
|
|
9765
|
-
let t = b.current.getBoundingClientRect();
|
|
9815
|
+
]), ze = (e) => {
|
|
9816
|
+
let t = b.current.getBoundingClientRect(), n = T();
|
|
9766
9817
|
return {
|
|
9767
|
-
x: (e.clientX - t.left -
|
|
9768
|
-
y: (e.clientY - t.top -
|
|
9818
|
+
x: (e.clientX - t.left - n.x) / n.k,
|
|
9819
|
+
y: (e.clientY - t.top - n.y) / n.k
|
|
9769
9820
|
};
|
|
9770
|
-
},
|
|
9771
|
-
...
|
|
9772
|
-
...[
|
|
9773
|
-
...
|
|
9774
|
-
...Object.entries(
|
|
9775
|
-
...
|
|
9821
|
+
}, Be = Re.marquee, Ve = bt(() => /* @__PURE__ */ new Set([
|
|
9822
|
+
...ce,
|
|
9823
|
+
...[z, pe].filter((e) => !!e),
|
|
9824
|
+
...H.selectedTargets.map((e) => e.boardId),
|
|
9825
|
+
...Object.entries(H.frames).filter(([, e]) => e.tweaks.length > 0).map(([e]) => e),
|
|
9826
|
+
...Be ? ke.filter(([, e]) => e.x < Be.x + Be.width && e.x + e.w > Be.x && e.y < Be.y + Be.height && e.y + e.h > Be.y).map(([e]) => e) : []
|
|
9776
9827
|
]), [
|
|
9777
|
-
|
|
9778
|
-
F,
|
|
9828
|
+
ce,
|
|
9779
9829
|
z,
|
|
9780
|
-
|
|
9781
|
-
|
|
9782
|
-
|
|
9783
|
-
|
|
9784
|
-
|
|
9830
|
+
pe,
|
|
9831
|
+
H.selectedTargets,
|
|
9832
|
+
H.frames,
|
|
9833
|
+
Be,
|
|
9834
|
+
ke
|
|
9835
|
+
]), He = du({
|
|
9785
9836
|
contentBase: s,
|
|
9786
9837
|
boardPort: c,
|
|
9787
9838
|
boardPath: l
|
|
9788
|
-
}),
|
|
9789
|
-
|
|
9790
|
-
|
|
9791
|
-
|
|
9792
|
-
]),
|
|
9793
|
-
boards:
|
|
9839
|
+
}), Ue = bt(() => He ? Te : new Set(ke.map(([e]) => e)), [
|
|
9840
|
+
He,
|
|
9841
|
+
Te,
|
|
9842
|
+
ke
|
|
9843
|
+
]), We = au({
|
|
9844
|
+
boards: ke,
|
|
9794
9845
|
versions: u,
|
|
9795
|
-
pending:
|
|
9796
|
-
view:
|
|
9797
|
-
viewport:
|
|
9798
|
-
active:
|
|
9799
|
-
gesturing:
|
|
9800
|
-
}),
|
|
9846
|
+
pending: Ue,
|
|
9847
|
+
view: C,
|
|
9848
|
+
viewport: D,
|
|
9849
|
+
active: Ve,
|
|
9850
|
+
gesturing: E
|
|
9851
|
+
}), Ge = _u(ke, C, D), G = bt(() => {
|
|
9801
9852
|
let e = /* @__PURE__ */ new Map();
|
|
9802
9853
|
return (t) => (e.has(t) || e.set(t, (e) => {
|
|
9803
|
-
|
|
9854
|
+
fe.refFor(t)(e), H.refFor(t)(e), We.frameRef(t)(e);
|
|
9804
9855
|
}), e.get(t));
|
|
9805
9856
|
}, [
|
|
9806
|
-
|
|
9807
|
-
|
|
9808
|
-
|
|
9809
|
-
]),
|
|
9810
|
-
|
|
9811
|
-
}, [
|
|
9857
|
+
fe.refFor,
|
|
9858
|
+
H.refFor,
|
|
9859
|
+
We.frameRef
|
|
9860
|
+
]), Ke = q((e) => {
|
|
9861
|
+
fe.loaded(e), H.loaded(e);
|
|
9862
|
+
}, [fe.loaded, H.loaded]);
|
|
9812
9863
|
return /* @__PURE__ */ Q("div", {
|
|
9813
9864
|
className: "x78zum5 xh8yej3 x5yr21d xb3r6kr",
|
|
9814
9865
|
children: [
|
|
9815
9866
|
/* @__PURE__ */ Q("div", {
|
|
9816
9867
|
ref: b,
|
|
9817
9868
|
className: "x98rzlu xeuugli x1n2onr6 xh8yej3 x5yr21d xb3r6kr x5ve5x3 x87ps6o x184qs1t xqfszdh xo2rkog",
|
|
9818
|
-
style: { cursor:
|
|
9869
|
+
style: { cursor: j },
|
|
9819
9870
|
onClickCapture: (e) => {
|
|
9820
|
-
!
|
|
9871
|
+
!z && (V || ne) && e.target.closest("[data-video-surface]") && e.stopPropagation();
|
|
9821
9872
|
},
|
|
9822
9873
|
onPointerCancel: (e) => {
|
|
9823
|
-
|
|
9874
|
+
M.onPointerCancel(e), Re.reset();
|
|
9824
9875
|
},
|
|
9825
9876
|
onPointerDown: (e) => {
|
|
9826
|
-
if (
|
|
9827
|
-
let t =
|
|
9828
|
-
e.currentTarget.setPointerCapture(e.pointerId),
|
|
9877
|
+
if (M.onPointerDown(e), V && !ne && !z && e.button === 0 && e.pointerType !== "touch" && e.currentTarget.contains(e.target) && !e.target.closest("[data-chrome]") && (e.preventDefault(), U.onCanvasClick(ze(e))), !ve || e.pointerType === "touch" || e.button !== 0 || !e.currentTarget.contains(e.target) || e.target.closest("[data-chrome], [data-video-surface]")) return;
|
|
9878
|
+
let t = ze(e);
|
|
9879
|
+
e.currentTarget.setPointerCapture(e.pointerId), Re.drag("start", t.x, t.y, e.shiftKey || e.metaKey || e.ctrlKey);
|
|
9829
9880
|
},
|
|
9830
9881
|
onPointerMove: (e) => {
|
|
9831
|
-
if (
|
|
9882
|
+
if (M.onPointerMove(e), Re.dragging()) {
|
|
9832
9883
|
e.buttons === 1 && e.currentTarget.setPointerCapture(e.pointerId);
|
|
9833
|
-
let t =
|
|
9834
|
-
|
|
9884
|
+
let t = ze(e);
|
|
9885
|
+
Re.drag("move", t.x, t.y);
|
|
9835
9886
|
}
|
|
9836
9887
|
},
|
|
9837
9888
|
onPointerUp: (e) => {
|
|
9838
|
-
if (
|
|
9839
|
-
let t =
|
|
9840
|
-
|
|
9889
|
+
if (M.onPointerUp(e), Re.dragging()) {
|
|
9890
|
+
let t = ze(e);
|
|
9891
|
+
Re.drag("end", t.x, t.y);
|
|
9841
9892
|
}
|
|
9842
9893
|
},
|
|
9843
9894
|
children: [
|
|
9844
9895
|
/* @__PURE__ */ Z(ti, {
|
|
9845
|
-
hand:
|
|
9896
|
+
hand: ee,
|
|
9846
9897
|
viewport: b
|
|
9847
9898
|
}),
|
|
9848
|
-
|
|
9849
|
-
counts:
|
|
9850
|
-
culled:
|
|
9851
|
-
gesturing:
|
|
9899
|
+
P && /* @__PURE__ */ Z(Rr, {
|
|
9900
|
+
counts: We.counts,
|
|
9901
|
+
culled: Ge.size,
|
|
9902
|
+
gesturing: E
|
|
9852
9903
|
}),
|
|
9853
9904
|
n && i && /* @__PURE__ */ Q(w, {
|
|
9854
9905
|
resetKey: n,
|
|
9855
9906
|
children: [
|
|
9856
9907
|
/* @__PURE__ */ Z(ht, {
|
|
9857
9908
|
agent: m,
|
|
9858
|
-
boardBase:
|
|
9859
|
-
boardSandbox:
|
|
9860
|
-
boards:
|
|
9909
|
+
boardBase: He?.base,
|
|
9910
|
+
boardSandbox: He?.sandbox,
|
|
9911
|
+
boards: ke,
|
|
9861
9912
|
contentBase: s,
|
|
9862
|
-
culled:
|
|
9863
|
-
frameLoaded:
|
|
9864
|
-
frameRef:
|
|
9865
|
-
gesturing:
|
|
9866
|
-
images:
|
|
9867
|
-
inspecting:
|
|
9913
|
+
culled: Ge,
|
|
9914
|
+
frameLoaded: Ke,
|
|
9915
|
+
frameRef: G,
|
|
9916
|
+
gesturing: E,
|
|
9917
|
+
images: We.images,
|
|
9918
|
+
inspecting: ve || V && !z && !ne,
|
|
9868
9919
|
live: d,
|
|
9869
|
-
notes:
|
|
9870
|
-
pending:
|
|
9871
|
-
phases:
|
|
9872
|
-
playing:
|
|
9920
|
+
notes: je,
|
|
9921
|
+
pending: Ue,
|
|
9922
|
+
phases: We.phases,
|
|
9923
|
+
playing: ce,
|
|
9873
9924
|
replays: ue,
|
|
9874
9925
|
versions: u,
|
|
9875
|
-
view:
|
|
9926
|
+
view: C,
|
|
9876
9927
|
worldRef: x,
|
|
9877
9928
|
writing: d ? n.writing : void 0,
|
|
9878
|
-
onExpand:
|
|
9929
|
+
onExpand: se
|
|
9879
9930
|
}),
|
|
9880
9931
|
/* @__PURE__ */ Z(Kl, {
|
|
9881
|
-
activeParameters:
|
|
9882
|
-
allBoards:
|
|
9883
|
-
boards:
|
|
9932
|
+
activeParameters: pe,
|
|
9933
|
+
allBoards: Oe,
|
|
9934
|
+
boards: ke,
|
|
9884
9935
|
contentBase: s,
|
|
9885
|
-
groups:
|
|
9886
|
-
|
|
9887
|
-
|
|
9888
|
-
|
|
9889
|
-
|
|
9936
|
+
groups: Ae,
|
|
9937
|
+
overlayRef: S,
|
|
9938
|
+
parameters: Ne,
|
|
9939
|
+
pending: Te,
|
|
9940
|
+
playing: ce,
|
|
9941
|
+
verdicts: ye,
|
|
9890
9942
|
versions: u,
|
|
9891
|
-
view:
|
|
9892
|
-
onExpand:
|
|
9943
|
+
view: C,
|
|
9944
|
+
onExpand: se,
|
|
9893
9945
|
onReplay: (e) => de((t) => ({
|
|
9894
9946
|
...t,
|
|
9895
9947
|
[e]: (t[e] ?? 0) + 1
|
|
9896
9948
|
})),
|
|
9897
|
-
onToggleParameters:
|
|
9949
|
+
onToggleParameters: _e,
|
|
9898
9950
|
onTogglePlay: (e) => le((t) => mt(t, e))
|
|
9899
9951
|
}),
|
|
9900
|
-
|
|
9901
|
-
|
|
9902
|
-
|
|
9903
|
-
|
|
9904
|
-
|
|
9905
|
-
|
|
9952
|
+
ye.rejecting && be && /* @__PURE__ */ Z("div", {
|
|
9953
|
+
ref: S,
|
|
9954
|
+
className: "x10l6tqk xu96u03 x13vifvy xnalus7 xqtp20y xk3oba8",
|
|
9955
|
+
children: /* @__PURE__ */ Z(zd, {
|
|
9956
|
+
group: ye.rejecting,
|
|
9957
|
+
left: C.x + be.x * C.k,
|
|
9958
|
+
top: C.y + be.y * C.k + 8,
|
|
9959
|
+
onCancel: ye.cancelReject,
|
|
9960
|
+
onSubmit: ye.submitReject
|
|
9961
|
+
})
|
|
9906
9962
|
}),
|
|
9907
|
-
|
|
9908
|
-
actions:
|
|
9963
|
+
V && /* @__PURE__ */ Z(Pr, {
|
|
9964
|
+
actions: U.actions,
|
|
9909
9965
|
agent: m,
|
|
9910
|
-
boards:
|
|
9911
|
-
draft:
|
|
9912
|
-
height:
|
|
9913
|
-
numbers:
|
|
9914
|
-
openId:
|
|
9915
|
-
|
|
9916
|
-
|
|
9917
|
-
|
|
9918
|
-
|
|
9919
|
-
|
|
9966
|
+
boards: Oe,
|
|
9967
|
+
draft: U.draft,
|
|
9968
|
+
height: D.height,
|
|
9969
|
+
numbers: U.numbers,
|
|
9970
|
+
openId: U.openId,
|
|
9971
|
+
overlayRef: S,
|
|
9972
|
+
page: L,
|
|
9973
|
+
showResolved: F === "all",
|
|
9974
|
+
stale: U.stale,
|
|
9975
|
+
threads: U.threads,
|
|
9976
|
+
view: C,
|
|
9920
9977
|
width: b.current?.clientWidth ?? 0,
|
|
9921
|
-
onCancelDraft:
|
|
9922
|
-
onOpen:
|
|
9923
|
-
onSubmit:
|
|
9978
|
+
onCancelDraft: U.cancelDraft,
|
|
9979
|
+
onOpen: U.setOpenId,
|
|
9980
|
+
onSubmit: U.submit
|
|
9924
9981
|
})
|
|
9925
9982
|
]
|
|
9926
9983
|
}),
|
|
9927
|
-
|
|
9928
|
-
|
|
9929
|
-
|
|
9930
|
-
|
|
9931
|
-
|
|
9984
|
+
/* @__PURE__ */ Q("div", {
|
|
9985
|
+
ref: S,
|
|
9986
|
+
className: "x10l6tqk xu96u03 x13vifvy xnalus7 xqtp20y",
|
|
9987
|
+
children: [(ve || V) && !Re.marquee && H.hover && Oe[H.hover.boardId] && /* @__PURE__ */ Z(td, {
|
|
9988
|
+
board: Oe[H.hover.boardId],
|
|
9989
|
+
rect: H.hover.rect,
|
|
9990
|
+
view: C,
|
|
9991
|
+
nodeId: H.hover.id ? `${H.hover.boardId}#${H.hover.id}` : void 0
|
|
9992
|
+
}), !z && H.targets.map((e) => Oe[e.boardId] && /* @__PURE__ */ Z(td, {
|
|
9993
|
+
selected: !0,
|
|
9994
|
+
board: Oe[e.boardId],
|
|
9995
|
+
name: e.name,
|
|
9996
|
+
rect: e.rect,
|
|
9997
|
+
view: C
|
|
9998
|
+
}, `${e.boardId}:${e.id}`))]
|
|
9932
9999
|
}),
|
|
9933
|
-
|
|
9934
|
-
selected: !0,
|
|
9935
|
-
board: U[e.boardId],
|
|
9936
|
-
name: e.name,
|
|
9937
|
-
rect: e.rect,
|
|
9938
|
-
view: S
|
|
9939
|
-
}, `${e.boardId}:${e.id}`)),
|
|
9940
|
-
Ie.selecting && /* @__PURE__ */ Z("div", {
|
|
10000
|
+
Re.selecting && /* @__PURE__ */ Z("div", {
|
|
9941
10001
|
"aria-hidden": "true",
|
|
9942
10002
|
"data-selection-capture": "",
|
|
9943
10003
|
className: "x10l6tqk x13vifvy x3m8u43 x1ey2m1c xu96u03 x1w0boku x5ve5x3"
|
|
9944
10004
|
}),
|
|
9945
|
-
|
|
10005
|
+
Re.marquee && /* @__PURE__ */ Z("div", {
|
|
9946
10006
|
"aria-hidden": "true",
|
|
9947
10007
|
"data-marquee": "",
|
|
9948
10008
|
className: "x10l6tqk x47corl x1w0boku x9f619 xmkeg23 x1y0btm7 x5kefyr xbzdn4w",
|
|
9949
10009
|
style: {
|
|
9950
|
-
left:
|
|
9951
|
-
top:
|
|
9952
|
-
width:
|
|
9953
|
-
height:
|
|
10010
|
+
left: C.x + Re.marquee.x * C.k,
|
|
10011
|
+
top: C.y + Re.marquee.y * C.k,
|
|
10012
|
+
width: Re.marquee.width * C.k,
|
|
10013
|
+
height: Re.marquee.height * C.k
|
|
9954
10014
|
}
|
|
9955
10015
|
}),
|
|
9956
10016
|
(!n || !i) && /* @__PURE__ */ Z("div", {
|
|
@@ -9959,81 +10019,85 @@ function lf({ id: e, artifact: t, canvas: n, layout: i, warnings: a, pending: o,
|
|
|
9959
10019
|
}),
|
|
9960
10020
|
/* @__PURE__ */ Z(ql, {
|
|
9961
10021
|
commenting: !!g,
|
|
9962
|
-
page:
|
|
9963
|
-
pages:
|
|
10022
|
+
page: L,
|
|
10023
|
+
pages: Ee,
|
|
9964
10024
|
tool: v,
|
|
9965
|
-
onPageChange:
|
|
9966
|
-
onToolChange:
|
|
10025
|
+
onPageChange: R,
|
|
10026
|
+
onToolChange: Se
|
|
9967
10027
|
}),
|
|
9968
10028
|
/* @__PURE__ */ Z(Jl, {
|
|
9969
10029
|
actions: _,
|
|
9970
|
-
inspectorOpen:
|
|
10030
|
+
inspectorOpen: ie,
|
|
9971
10031
|
live: d,
|
|
9972
|
-
verify:
|
|
10032
|
+
verify: ye.progress,
|
|
9973
10033
|
warnings: a,
|
|
9974
|
-
zoom:
|
|
9975
|
-
onActualSize: () =>
|
|
9976
|
-
onFit: () =>
|
|
9977
|
-
onNextVerify:
|
|
9978
|
-
onToggleInspector: () =>
|
|
9979
|
-
onZoomIn: () =>
|
|
9980
|
-
onZoomOut: () =>
|
|
10034
|
+
zoom: C.k,
|
|
10035
|
+
onActualSize: () => A(1),
|
|
10036
|
+
onFit: () => O(oe(L)),
|
|
10037
|
+
onNextVerify: xe,
|
|
10038
|
+
onToggleInspector: () => ae((e) => !e),
|
|
10039
|
+
onZoomIn: () => k(1.25),
|
|
10040
|
+
onZoomOut: () => k(.8)
|
|
9981
10041
|
}),
|
|
9982
|
-
!
|
|
9983
|
-
|
|
9984
|
-
|
|
9985
|
-
|
|
9986
|
-
|
|
9987
|
-
|
|
9988
|
-
|
|
9989
|
-
|
|
9990
|
-
|
|
9991
|
-
|
|
10042
|
+
!z && pe && /* @__PURE__ */ Z("div", {
|
|
10043
|
+
ref: S,
|
|
10044
|
+
className: "x10l6tqk xu96u03 x13vifvy xnalus7 xqtp20y x52sccv",
|
|
10045
|
+
children: Ie(!0)
|
|
10046
|
+
}),
|
|
10047
|
+
z && Me && Le && /* @__PURE__ */ Z(zr, {
|
|
10048
|
+
board: Me,
|
|
10049
|
+
frameRef: fe.refFor(z, "expanded"),
|
|
10050
|
+
id: z,
|
|
10051
|
+
interactive: Me.interactive === !0,
|
|
10052
|
+
parameters: pe === z ? Ie(!1) : void 0,
|
|
10053
|
+
sandbox: r(Me) ? void 0 : He?.sandbox,
|
|
10054
|
+
src: `${r(Me) ? s : He?.base ?? s}${Me.file}?v=${u[Me.file] ?? 0}`,
|
|
10055
|
+
parameterAction: Ne[z] === void 0 ? void 0 : /* @__PURE__ */ Z(At, {
|
|
9992
10056
|
config: { "aria-hidden": !0 },
|
|
9993
10057
|
children: /* @__PURE__ */ Z(Tt, {
|
|
9994
|
-
"aria-expanded":
|
|
10058
|
+
"aria-expanded": pe === z,
|
|
9995
10059
|
icon: On,
|
|
9996
10060
|
size: "small",
|
|
9997
10061
|
type: "text",
|
|
9998
|
-
onClick: (e) =>
|
|
10062
|
+
onClick: (e) => _e(z, e.currentTarget),
|
|
9999
10063
|
children: W("chrome.parameters")
|
|
10000
10064
|
})
|
|
10001
10065
|
}),
|
|
10002
|
-
onClose: () =>
|
|
10003
|
-
onFrameLoad: () =>
|
|
10066
|
+
onClose: () => se(null),
|
|
10067
|
+
onFrameLoad: () => fe.loaded(z, "expanded")
|
|
10004
10068
|
})
|
|
10005
10069
|
]
|
|
10006
10070
|
}),
|
|
10007
|
-
|
|
10008
|
-
numbers:
|
|
10009
|
-
openId:
|
|
10010
|
-
page:
|
|
10011
|
-
stale:
|
|
10012
|
-
tab:
|
|
10013
|
-
threads:
|
|
10014
|
-
onClose: () =>
|
|
10015
|
-
onOpen:
|
|
10016
|
-
onTab:
|
|
10071
|
+
V && /* @__PURE__ */ Z(Er, {
|
|
10072
|
+
numbers: U.numbers,
|
|
10073
|
+
openId: U.openId,
|
|
10074
|
+
page: L,
|
|
10075
|
+
stale: U.stale,
|
|
10076
|
+
tab: F,
|
|
10077
|
+
threads: U.threads,
|
|
10078
|
+
onClose: () => Se("select"),
|
|
10079
|
+
onOpen: Ce,
|
|
10080
|
+
onTab: I
|
|
10017
10081
|
}),
|
|
10018
|
-
|
|
10019
|
-
boards:
|
|
10020
|
-
change:
|
|
10021
|
-
enabled: !
|
|
10022
|
-
frames:
|
|
10023
|
-
hoverNode:
|
|
10024
|
-
playing:
|
|
10025
|
-
reset:
|
|
10026
|
-
select:
|
|
10027
|
-
selection:
|
|
10028
|
-
targets:
|
|
10029
|
-
onClose:
|
|
10082
|
+
ie && !V && /* @__PURE__ */ Z(pd, {
|
|
10083
|
+
boards: ke,
|
|
10084
|
+
change: H.change,
|
|
10085
|
+
enabled: !z,
|
|
10086
|
+
frames: H.frames,
|
|
10087
|
+
hoverNode: H.hoverNode,
|
|
10088
|
+
playing: ce,
|
|
10089
|
+
reset: H.reset,
|
|
10090
|
+
select: H.select,
|
|
10091
|
+
selection: H.selection,
|
|
10092
|
+
targets: H.targets,
|
|
10093
|
+
onClose: we
|
|
10030
10094
|
})
|
|
10031
10095
|
]
|
|
10032
10096
|
});
|
|
10033
10097
|
}
|
|
10034
10098
|
//#endregion
|
|
10035
10099
|
//#region src/viewer/hooks/useHtmlData.ts
|
|
10036
|
-
function
|
|
10100
|
+
function pf(e, { live: t, revision: n, load: r, send: i }) {
|
|
10037
10101
|
let [a, o] = X(null);
|
|
10038
10102
|
return J(() => {
|
|
10039
10103
|
let t = !1;
|
|
@@ -10062,12 +10126,12 @@ function uf(e, { live: t, revision: n, load: r, send: i }) {
|
|
|
10062
10126
|
}
|
|
10063
10127
|
//#endregion
|
|
10064
10128
|
//#region src/viewer/layouts/HtmlView.tsx
|
|
10065
|
-
function
|
|
10066
|
-
let { data: r, send: i } =
|
|
10129
|
+
function mf({ id: e, feed: t, actions: n }) {
|
|
10130
|
+
let { data: r, send: i } = pf(e, t);
|
|
10067
10131
|
J(() => {
|
|
10068
10132
|
document.title = r?.title || e;
|
|
10069
10133
|
}, [r?.title, e]), $e("html");
|
|
10070
|
-
let a = r?.found && !r.warnings.includes("index.html not found"), o = a ? `${r.contentBase}index.html?v=${r.version}` : null, { frameRef: s, src: c, onLoad: l } =
|
|
10134
|
+
let a = r?.found && !r.warnings.includes("index.html not found"), o = a ? `${r.contentBase}index.html?v=${r.version}` : null, { frameRef: s, src: c, onLoad: l } = ge(o, {
|
|
10071
10135
|
onError: (t) => i({
|
|
10072
10136
|
type: "runtime-error",
|
|
10073
10137
|
artifact: `html/${e}`,
|
|
@@ -10088,7 +10152,7 @@ function df({ id: e, feed: t, actions: n }) {
|
|
|
10088
10152
|
a && c ? /* @__PURE__ */ Z("iframe", {
|
|
10089
10153
|
allow: "clipboard-write",
|
|
10090
10154
|
ref: s,
|
|
10091
|
-
sandbox:
|
|
10155
|
+
sandbox: _e,
|
|
10092
10156
|
src: c,
|
|
10093
10157
|
title: r.title,
|
|
10094
10158
|
onLoad: l,
|
|
@@ -10104,29 +10168,29 @@ function df({ id: e, feed: t, actions: n }) {
|
|
|
10104
10168
|
}
|
|
10105
10169
|
//#endregion
|
|
10106
10170
|
//#region src/viewer/lib/artifact-list.ts
|
|
10107
|
-
function
|
|
10171
|
+
function hf(e, t = Date.now()) {
|
|
10108
10172
|
let n = new Intl.RelativeTimeFormat(qe.language, { numeric: "always" }), r = Math.floor(Math.max(0, t - e) / 6e4);
|
|
10109
10173
|
return r === 0 ? qe.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");
|
|
10110
10174
|
}
|
|
10111
10175
|
//#endregion
|
|
10112
10176
|
//#region src/viewer/lib/error-text.ts
|
|
10113
|
-
function
|
|
10177
|
+
function gf(e, t) {
|
|
10114
10178
|
return typeof e == "string" && qe.exists(`errors.${e}`) ? qe.t(`errors.${e}`) : t;
|
|
10115
10179
|
}
|
|
10116
|
-
var
|
|
10180
|
+
var _f = (e) => typeof e == "object" && !!e && [
|
|
10117
10181
|
"private",
|
|
10118
10182
|
"public",
|
|
10119
10183
|
"total",
|
|
10120
10184
|
"publishes"
|
|
10121
10185
|
].includes(e.kind) && typeof e.max == "number";
|
|
10122
|
-
function
|
|
10186
|
+
function vf({ kind: e, max: t }) {
|
|
10123
10187
|
return qe.t(`planLimit.${e}`, { max: t });
|
|
10124
10188
|
}
|
|
10125
|
-
function
|
|
10126
|
-
return e.code === "plan_limit" &&
|
|
10189
|
+
function yf(e, t) {
|
|
10190
|
+
return e.code === "plan_limit" && _f(e.limit) ? vf(e.limit) : gf(e.code, typeof e.error == "string" ? e.error : t);
|
|
10127
10191
|
}
|
|
10128
10192
|
//#endregion
|
|
10129
10193
|
//#region src/viewer/lib/version.ts
|
|
10130
|
-
var
|
|
10194
|
+
var bf = "1.48.2";
|
|
10131
10195
|
//#endregion
|
|
10132
|
-
export { D as ARTIFACT_LOCATOR_SOURCE, n as ARTIFACT_TYPES,
|
|
10196
|
+
export { D as ARTIFACT_LOCATOR_SOURCE, n as ARTIFACT_TYPES, df as ArtboardView, Yn as ArtifactThumbnail, t as BOARD_TYPES, w as CanvasErrorBoundary, er as EmbeddedCanvas, Je as HTML_LANG, _e as HTML_SANDBOX, mf as HtmlView, ue as PHONE_QUERY, S as PreviewView, nr as PublicationStatus, L as RailSwitch, ar as RyugiMark, ot as TYPE_GLYPHS, rt as TYPE_ICON_VIEWBOX, Ye as Trans, Jn as TypeIcon, bf as VIEWER_VERSION, d as ViewerProvider, A as anchorBlockIds, Ne as applyAgentOp, R as applyAgentThreadOp, qn as applyBoardAgentOp, Kn as applyBoardHumanOp, ee as applyHumanOp, j as applyThreadOp, Hn as boardAnchors, lr as boardCommentsFromMessage, cr as boardCommentsFromPayload, m as cloudErrorDetails, et as createRelayConnection, Ge as createViewerI18n, ie as documentAnchors, Un as emptyBoardComments, U as emptyComments, gf as errorText, qe as i18n, c as isArtifactAddress, E as isArtifactId, i as isArtifactLocator, e as isArtifactType, r as isMediaBoard, T as isMintedArtifactId, k as isObject, _f as isPlanLimit, Xe as isVisibility, Gn as mergeBoardComments, H as mergeComments, a as mintArtifactId, ne as openThread, Be as ownLink, pr as pageLink, ze as parseAcceptLanguage, re as parseComments, vf as planLimitMessage, Ve as publishState, Ke as publishing, Vn as readBoardAnchor, Le as readCloudHeader, We as readPublication, hf as relativeUpdatedAt, pe as reportCloudHeader, Ue as resolveLocale, yf as responseErrorText, Wn as savedBoardComments, P as savedComments, He as syncNote, W as t, tt as typeFaviconHref, M as unreadThreads, fr as useCanvasData, Fe as useCloudHeader, Me as useMedia, mr as usePageQuery, ge as useSandboxFrame, f as useSystemTheme, Re as useTranslation, $e as useTypeFavicon, N as waitingOn };
|