@pygmalionjs/pygmalion 0.2.12 → 0.2.14

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.
@@ -1,6 +1,6 @@
1
- import { jsxs as O, jsx as w } from "react/jsx-runtime";
2
- import { b as V, m as He, v as Ke, c as qe, i as Ge, g as Le, e as K, d as Ve, a as Je, f as We, h as Qe, j as Xe, k as Ye, l as Ze, n as et, o as tt, p as nt, q as rt, r as ot, t as Y, S as st, A as it, u as ve, w as at, x as ct, y as lt, z as dt, B as ft, C as ut, D as pt, E as Ie } from "./App-B0w9z2Br.js";
3
- import { G as $n, H as Mn, I as Tn, J as Dn, K as kn, L as zn, M as _n, O as Fn, P as jn, Q as Bn, R as Un, T as Hn, U as Kn, V as qn, W as Gn, X as Ln, Y as Vn } from "./App-B0w9z2Br.js";
1
+ import { jsxs as A, jsx as w } from "react/jsx-runtime";
2
+ import { b as L, m as He, v as Ke, c as qe, i as Ge, g as Le, e as H, d as Ve, a as Je, f as We, h as Qe, j as Xe, k as Ye, l as Ze, n as et, o as tt, p as nt, q as rt, r as ot, t as st, u as Y, S as it, A as at, w as ve, x as ct, y as lt, z as dt, B as ft, C as ut, D as pt, E as ht, G as Ie } from "./App-CiSnd2mV.js";
3
+ import { H as Mn, I as Tn, J as Dn, K as kn, L as zn, M as _n, O as Fn, P as Bn, Q as jn, R as Un, T as Hn, U as Kn, V as qn, W as Gn, X as Ln, Y as Vn, Z as Jn } from "./App-CiSnd2mV.js";
4
4
  import { createElement as xe, useMemo as Pe, useState as te, useRef as Ee, useCallback as Z, useEffect as ee } from "react";
5
5
  function pe(e, t = /* @__PURE__ */ new Set()) {
6
6
  if (e == null || typeof e == "string" || typeof e == "boolean" || typeof e == "number" && Number.isFinite(e))
@@ -18,7 +18,7 @@ function pe(e, t = /* @__PURE__ */ new Set()) {
18
18
  }
19
19
  return t.delete(e), r;
20
20
  }
21
- function ht(e) {
21
+ function mt(e) {
22
22
  return JSON.stringify(
23
23
  pe({
24
24
  version: 1,
@@ -42,11 +42,11 @@ function ht(e) {
42
42
  function z(e) {
43
43
  return [...new Set([...e].map((t) => t == null ? void 0 : t.trim()).filter(Boolean))].sort((t, r) => t.localeCompare(r));
44
44
  }
45
- function mt(e, t) {
45
+ function gt(e, t) {
46
46
  var n;
47
47
  return ((n = e.id) == null ? void 0 : n.trim()) || `edge:${t + 1}`;
48
48
  }
49
- function gt(e) {
49
+ function yt(e) {
50
50
  const t = [...e.screens].sort((n, o) => n.id.localeCompare(o.id)), r = t[0].id;
51
51
  return {
52
52
  id: `story:${r}`,
@@ -66,7 +66,7 @@ function gt(e) {
66
66
  states: z(t.map((n) => n.state))
67
67
  };
68
68
  }
69
- function Ne(e) {
69
+ function Re(e) {
70
70
  return [
71
71
  e.code,
72
72
  e.edgeId,
@@ -75,8 +75,8 @@ function Ne(e) {
75
75
  e.scenarioId
76
76
  ].join(":");
77
77
  }
78
- function yt(e) {
79
- var g, I;
78
+ function wt(e) {
79
+ var v, g;
80
80
  const t = [], r = [], n = /* @__PURE__ */ new Map();
81
81
  for (const i of e.screens) {
82
82
  const l = i.id.trim();
@@ -96,7 +96,7 @@ function yt(e) {
96
96
  for (const i of r) {
97
97
  let l;
98
98
  try {
99
- if (l = (e.recipeKey ?? ht)(i), !l.trim()) throw new Error("Recipe keys cannot be empty.");
99
+ if (l = (e.recipeKey ?? mt)(i), !l.trim()) throw new Error("Recipe keys cannot be empty.");
100
100
  } catch (y) {
101
101
  s.add(i.id), t.push({
102
102
  code: "invalid-recipe",
@@ -108,7 +108,7 @@ function yt(e) {
108
108
  const f = o.get(l);
109
109
  f ? f.screens.push(i) : o.set(l, { recipeKey: l, screens: [i] });
110
110
  }
111
- const a = [...o.values()].map(gt).sort((i, l) => i.id.localeCompare(l.id)), c = {};
111
+ const a = [...o.values()].map(yt).sort((i, l) => i.id.localeCompare(l.id)), c = {};
112
112
  for (const i of a)
113
113
  for (const l of i.screenIds) c[l] = i.id;
114
114
  const d = new Map(a.map((i) => [i.id, i])), h = /* @__PURE__ */ new Map();
@@ -137,11 +137,11 @@ function yt(e) {
137
137
  const f = b.get(l);
138
138
  f ? f.push(i.id) : b.set(l, [i.id]);
139
139
  }
140
- const P = (i, l, f) => {
141
- const y = i.trim(), D = c[y] ?? (d.has(y) ? y : null);
142
- if (D) return D;
143
- const H = z(b.get(y) ?? []);
144
- return H.length === 1 ? H[0] : H.length > 1 ? (t.push({
140
+ const x = (i, l, f) => {
141
+ const y = i.trim(), T = c[y] ?? (d.has(y) ? y : null);
142
+ if (T) return T;
143
+ const D = z(b.get(y) ?? []);
144
+ return D.length === 1 ? D[0] : D.length > 1 ? (t.push({
145
145
  code: f === "source" ? "ambiguous-edge-source" : "ambiguous-edge-target",
146
146
  severity: "error",
147
147
  message: `Storyboard edge "${l}" references an ambiguous ${f} route.`,
@@ -154,18 +154,18 @@ function yt(e) {
154
154
  edgeId: l,
155
155
  screenId: y || void 0
156
156
  }), null);
157
- }, E = [], m = /* @__PURE__ */ new Map(), N = [
157
+ }, P = [], m = /* @__PURE__ */ new Map(), E = [
158
158
  ["explicit", e.explicitEdges ?? []],
159
159
  ["inferred", e.inferredEdges ?? []]
160
160
  ];
161
161
  let p = 0;
162
- for (const [i, l] of N)
162
+ for (const [i, l] of E)
163
163
  for (const f of l) {
164
- const y = mt(f, p);
164
+ const y = gt(f, p);
165
165
  p += 1;
166
- const D = P(f.from, y, "source"), H = P(f.to, y, "target");
167
- if (!D || !H || D === H) continue;
168
- const de = `${D}\0${H}`, X = m.get(de);
166
+ const T = x(f.from, y, "source"), D = x(f.to, y, "target");
167
+ if (!T || !D || T === D) continue;
168
+ const Q = `${T}\0${D}`, X = m.get(Q);
169
169
  if (X) {
170
170
  if (!X.sourceEdgeIds.includes(y)) {
171
171
  const be = {
@@ -175,34 +175,34 @@ function yt(e) {
175
175
  y
176
176
  ])
177
177
  };
178
- m.set(de, be);
179
- const Se = E.indexOf(X);
180
- Se >= 0 && (E[Se] = be);
178
+ m.set(Q, be);
179
+ const Se = P.indexOf(X);
180
+ Se >= 0 && (P[Se] = be);
181
181
  }
182
182
  continue;
183
183
  }
184
184
  const we = {
185
185
  id: y,
186
- from: D,
187
- to: H,
188
- kind: ((g = f.kind) == null ? void 0 : g.trim()) || void 0,
189
- label: ((I = f.label) == null ? void 0 : I.trim()) || void 0,
186
+ from: T,
187
+ to: D,
188
+ kind: ((v = f.kind) == null ? void 0 : v.trim()) || void 0,
189
+ label: ((g = f.label) == null ? void 0 : g.trim()) || void 0,
190
190
  origin: i,
191
191
  sourceEdgeIds: [y]
192
192
  };
193
- m.set(de, we), E.push(we);
193
+ m.set(Q, we), P.push(we);
194
194
  }
195
- E.sort(
195
+ P.sort(
196
196
  (i, l) => `${i.from}:${i.to}:${i.id}`.localeCompare(`${l.from}:${l.to}:${l.id}`)
197
197
  );
198
- const $ = /* @__PURE__ */ new Map(), R = /* @__PURE__ */ new Map();
199
- for (const i of E) {
200
- const l = R.get(i.from);
201
- l ? l.push(i) : R.set(i.from, [i]);
202
- const f = $.get(i.to);
203
- f ? f.push(i) : $.set(i.to, [i]);
198
+ const O = /* @__PURE__ */ new Map(), N = /* @__PURE__ */ new Map();
199
+ for (const i of P) {
200
+ const l = N.get(i.from);
201
+ l ? l.push(i) : N.set(i.from, [i]);
202
+ const f = O.get(i.to);
203
+ f ? f.push(i) : O.set(i.to, [i]);
204
204
  }
205
- const T = [];
205
+ const M = [];
206
206
  for (const i of e.startScreenIds ?? []) {
207
207
  const l = i.trim(), f = c[l] ?? (d.has(l) ? l : null);
208
208
  if (!f) {
@@ -214,25 +214,25 @@ function yt(e) {
214
214
  });
215
215
  continue;
216
216
  }
217
- T.push(f);
217
+ M.push(f);
218
218
  }
219
- const M = new Set(T);
220
- let A = z(T);
221
- A.length || (A = u.filter((i) => {
219
+ const $ = new Set(M);
220
+ let C = z(M);
221
+ C.length || (C = u.filter((i) => {
222
222
  var l;
223
- return (((l = $.get(i.id)) == null ? void 0 : l.length) ?? 0) === 0;
224
- }).map((i) => i.id).sort((i, l) => i.localeCompare(l))), !A.length && u.length && (A = [u[0].id]);
225
- const S = /* @__PURE__ */ new Set(), C = [...A];
226
- for (; C.length; ) {
227
- const i = C.shift();
223
+ return (((l = O.get(i.id)) == null ? void 0 : l.length) ?? 0) === 0;
224
+ }).map((i) => i.id).sort((i, l) => i.localeCompare(l))), !C.length && u.length && (C = [u[0].id]);
225
+ const S = /* @__PURE__ */ new Set(), R = [...C];
226
+ for (; R.length; ) {
227
+ const i = R.shift();
228
228
  if (!S.has(i)) {
229
229
  S.add(i);
230
- for (const l of R.get(i) ?? []) C.push(l.to);
230
+ for (const l of N.get(i) ?? []) R.push(l.to);
231
231
  }
232
232
  }
233
233
  const F = u.filter((i) => {
234
234
  var f, y;
235
- const l = (((f = $.get(i.id)) == null ? void 0 : f.length) ?? 0) === 0 && (((y = R.get(i.id)) == null ? void 0 : y.length) ?? 0) === 0 && !M.has(i.id);
235
+ const l = (((f = O.get(i.id)) == null ? void 0 : f.length) ?? 0) === 0 && (((y = N.get(i.id)) == null ? void 0 : y.length) ?? 0) === 0 && !$.has(i.id);
236
236
  return !S.has(i.id) || l && u.length > 1;
237
237
  });
238
238
  for (const i of F)
@@ -244,24 +244,24 @@ function yt(e) {
244
244
  screenId: l,
245
245
  nodeId: i.id
246
246
  });
247
- const B = /* @__PURE__ */ new Map();
247
+ const j = /* @__PURE__ */ new Map();
248
248
  for (const i of u)
249
249
  for (const l of i.sourceKeys) {
250
- const f = B.get(l) ?? {
250
+ const f = j.get(l) ?? {
251
251
  nodeIds: /* @__PURE__ */ new Set(),
252
252
  screenIds: /* @__PURE__ */ new Set()
253
253
  };
254
254
  f.nodeIds.add(i.id);
255
255
  for (const y of i.screenIds) f.screenIds.add(y);
256
- B.set(l, f);
256
+ j.set(l, f);
257
257
  }
258
- const W = [...B.entries()].map(([i, l]) => ({
258
+ const J = [...j.entries()].map(([i, l]) => ({
259
259
  sourceKey: i,
260
260
  nodeIds: [...l.nodeIds].sort((f, y) => f.localeCompare(y)),
261
261
  screenIds: [...l.screenIds].sort((f, y) => f.localeCompare(y)),
262
262
  shared: l.nodeIds.size > 1
263
- })).sort((i, l) => i.sourceKey.localeCompare(l.sourceKey)), q = u.map((i) => {
264
- const l = [...R.get(i.id) ?? []].sort(
263
+ })).sort((i, l) => i.sourceKey.localeCompare(l.sourceKey)), K = u.map((i) => {
264
+ const l = [...N.get(i.id) ?? []].sort(
265
265
  (f, y) => f.id.localeCompare(y.id)
266
266
  );
267
267
  return {
@@ -269,14 +269,14 @@ function yt(e) {
269
269
  edgeIds: l.map((f) => f.id),
270
270
  targetNodeIds: z(l.map((f) => f.to))
271
271
  };
272
- }).filter((i) => i.targetNodeIds.length > 1).sort((i, l) => i.nodeId.localeCompare(l.nodeId)), G = new Set(
272
+ }).filter((i) => i.targetNodeIds.length > 1).sort((i, l) => i.nodeId.localeCompare(l.nodeId)), q = new Set(
273
273
  u.flatMap((i) => i.scenarioIds)
274
- ), x = new Set(
274
+ ), I = new Set(
275
275
  (e.nonVisualScenarioIds ?? []).map((i) => i.trim())
276
- ), j = z(
276
+ ), B = z(
277
277
  (e.scenarios ?? []).map((i) => i.id)
278
- ), k = j.filter(
279
- (i) => !G.has(i) && !x.has(i)
278
+ ), k = B.filter(
279
+ (i) => !q.has(i) && !I.has(i)
280
280
  );
281
281
  for (const i of k)
282
282
  t.push({
@@ -286,53 +286,53 @@ function yt(e) {
286
286
  scenarioId: i
287
287
  });
288
288
  t.sort(
289
- (i, l) => Ne(i).localeCompare(Ne(l))
289
+ (i, l) => Re(i).localeCompare(Re(l))
290
290
  );
291
- const Q = z(
291
+ const W = z(
292
292
  F.flatMap((i) => i.screenIds)
293
- ), v = {
293
+ ), ne = {
294
294
  screens: r.length,
295
295
  canonicalNodes: u.length,
296
296
  mergedScreens: Math.max(0, r.length - u.length),
297
- edges: E.length,
297
+ edges: P.length,
298
298
  connectedNodes: u.length - F.length,
299
- disconnectedScreens: Q,
300
- codeScenarios: j.length,
301
- representedScenarios: j.filter(
302
- (i) => G.has(i)
299
+ disconnectedScreens: W,
300
+ codeScenarios: B.length,
301
+ representedScenarios: B.filter(
302
+ (i) => q.has(i)
303
303
  ).length,
304
304
  missingScenarios: k,
305
- complete: Q.length === 0 && k.length === 0 && !t.some((i) => i.severity === "error") && s.size === 0
305
+ complete: W.length === 0 && k.length === 0 && !t.some((i) => i.severity === "error") && s.size === 0
306
306
  };
307
307
  return {
308
308
  version: 1,
309
309
  nodes: u,
310
- edges: E,
310
+ edges: P,
311
311
  aliases: Object.fromEntries(
312
312
  Object.entries(c).sort(([i], [l]) => i.localeCompare(l))
313
313
  ),
314
- sourceGroups: W,
315
- startNodeIds: A,
316
- branches: q,
314
+ sourceGroups: J,
315
+ startNodeIds: C,
316
+ branches: K,
317
317
  warnings: t,
318
- coverage: v
318
+ coverage: ne
319
319
  };
320
320
  }
321
- function wt(e) {
321
+ function bt(e) {
322
322
  return e ? JSON.parse(JSON.stringify(e)) : void 0;
323
323
  }
324
- function oe(e) {
325
- if (Array.isArray(e)) return e.map(oe);
324
+ function se(e) {
325
+ if (Array.isArray(e)) return e.map(se);
326
326
  if (e && typeof e == "object") {
327
- const t = Object.entries(e).filter(([, r]) => r !== void 0).sort(([r], [n]) => r.localeCompare(n)).map(([r, n]) => [r, oe(n)]).filter(([, r]) => r !== void 0);
327
+ const t = Object.entries(e).filter(([, r]) => r !== void 0).sort(([r], [n]) => r.localeCompare(n)).map(([r, n]) => [r, se(n)]).filter(([, r]) => r !== void 0);
328
328
  return t.length ? Object.fromEntries(t) : void 0;
329
329
  }
330
330
  return e;
331
331
  }
332
- function Ce(e) {
333
- return JSON.stringify(oe(e ?? null));
332
+ function Ne(e) {
333
+ return JSON.stringify(se(e ?? null));
334
334
  }
335
- function bt(e) {
335
+ function St(e) {
336
336
  return !!(e && typeof e == "object" && !Array.isArray(e));
337
337
  }
338
338
  function U(e) {
@@ -363,7 +363,7 @@ function ye(e, t) {
363
363
  }
364
364
  return o === n.length;
365
365
  }
366
- function Re(e, t) {
366
+ function Ce(e, t) {
367
367
  const r = U(e);
368
368
  if (!r) return [];
369
369
  const n = t.get(r);
@@ -373,7 +373,7 @@ function Re(e, t) {
373
373
  )
374
374
  ].sort((o, s) => o.localeCompare(s));
375
375
  }
376
- function St(e) {
376
+ function vt(e) {
377
377
  var r;
378
378
  const t = /* @__PURE__ */ new Map();
379
379
  for (const n of e ?? []) {
@@ -387,29 +387,29 @@ function St(e) {
387
387
  }
388
388
  return [...t.values()].sort((n, o) => n.id.localeCompare(o.id));
389
389
  }
390
- function vt(e, t, r) {
390
+ function It(e, t, r) {
391
391
  return (e ?? []).flatMap((n, o) => {
392
- var u, b, P;
392
+ var u, b, x;
393
393
  const s = (u = n.from) == null ? void 0 : u.trim(), a = (b = n.to) == null ? void 0 : b.trim();
394
394
  if (!s || !a || n.unresolvedTarget) return [];
395
- const c = r.has(s) ? [s] : Re(s, t), d = r.has(a) ? [a] : Re(a, t);
395
+ const c = r.has(s) ? [s] : Ce(s, t), d = r.has(a) ? [a] : Ce(a, t);
396
396
  if (!c.length || !d.length) return [];
397
- const h = ((P = n.id) == null ? void 0 : P.trim()) || `discovery-edge:${o + 1}`;
397
+ const h = ((x = n.id) == null ? void 0 : x.trim()) || `discovery-edge:${o + 1}`;
398
398
  return c.flatMap(
399
- (E, m) => d.map((N, p) => {
400
- var $, R;
399
+ (P, m) => d.map((E, p) => {
400
+ var O, N;
401
401
  return {
402
402
  id: c.length === 1 && d.length === 1 ? h : `${h}:${m + 1}:${p + 1}`,
403
- from: E,
404
- to: N,
405
- kind: (($ = n.kind) == null ? void 0 : $.trim()) || void 0,
406
- label: ((R = n.label) == null ? void 0 : R.trim()) || void 0
403
+ from: P,
404
+ to: E,
405
+ kind: ((O = n.kind) == null ? void 0 : O.trim()) || void 0,
406
+ label: ((N = n.label) == null ? void 0 : N.trim()) || void 0
407
407
  };
408
408
  })
409
409
  );
410
410
  });
411
411
  }
412
- function It(e, t, r) {
412
+ function xt(e, t, r) {
413
413
  const n = U(e.route);
414
414
  if (!n) return [];
415
415
  const o = t.filter(
@@ -419,10 +419,10 @@ function It(e, t, r) {
419
419
  }
420
420
  );
421
421
  if (!o.length) return [];
422
- const s = Ce(
422
+ const s = Ne(
423
423
  He(r, e.environment)
424
424
  ), a = o.filter(
425
- (c) => Ce(c.environment) === s
425
+ (c) => Ne(c.environment) === s
426
426
  );
427
427
  return [
428
428
  ...new Set(
@@ -433,7 +433,7 @@ function It(e, t, r) {
433
433
  )
434
434
  ].sort((c, d) => c.localeCompare(d));
435
435
  }
436
- function xt(e, t) {
436
+ function Pt(e, t) {
437
437
  const r = e.some((s) => s.importKind != null), n = t.candidates ?? [], o = ze(t);
438
438
  return e.filter(
439
439
  (s) => r ? s.importKind === "screens" : !!s.route
@@ -455,7 +455,7 @@ function xt(e, t) {
455
455
  scenario: s.scenario,
456
456
  state: s.state,
457
457
  scenarioId: s.scenarioId,
458
- scenarioIds: It(s, n, o),
458
+ scenarioIds: xt(s, n, o),
459
459
  interactions: s.interactions,
460
460
  environment: s.environment,
461
461
  preset: s.preset,
@@ -463,7 +463,7 @@ function xt(e, t) {
463
463
  sourcePath: [...s.sourcePaths ?? []].filter(Boolean).sort((a, c) => a.localeCompare(c))[0]
464
464
  }));
465
465
  }
466
- function le(e, t) {
466
+ function de(e, t) {
467
467
  var c, d, h, u;
468
468
  const r = (((c = e.interactions) == null ? void 0 : c.length) ?? 0) - (((d = t.interactions) == null ? void 0 : d.length) ?? 0);
469
469
  if (r !== 0) return r;
@@ -472,7 +472,7 @@ function le(e, t) {
472
472
  const s = !e.environment && !e.preset ? 0 : 1, a = !t.environment && !t.preset ? 0 : 1;
473
473
  return s !== a ? s - a : e.id.localeCompare(t.id);
474
474
  }
475
- function Pt(e) {
475
+ function Et(e) {
476
476
  const t = /* @__PURE__ */ new Map();
477
477
  for (const r of e) {
478
478
  const n = U(r.route);
@@ -482,14 +482,14 @@ function Pt(e) {
482
482
  }
483
483
  return new Map(
484
484
  [...t.entries()].map(([r, n]) => {
485
- const o = [...n].sort(le);
485
+ const o = [...n].sort(de);
486
486
  return [r, o[0].id];
487
487
  })
488
488
  );
489
489
  }
490
- function Et(e) {
490
+ function Rt(e) {
491
491
  return e.action === "wait" ? null : JSON.stringify(
492
- oe({
492
+ se({
493
493
  action: e.action,
494
494
  selector: e.selector,
495
495
  text: e.text,
@@ -504,7 +504,7 @@ function Et(e) {
504
504
  );
505
505
  }
506
506
  function ke(e) {
507
- return (e.interactions ?? []).map(Et).filter((t) => t != null);
507
+ return (e.interactions ?? []).map(Rt).filter((t) => t != null);
508
508
  }
509
509
  function Nt(e, t) {
510
510
  return e.length < t.length && e.every((r, n) => r === t[n]);
@@ -519,7 +519,7 @@ function Ct(e, t) {
519
519
  }
520
520
  return [...r.values()].flatMap((n) => {
521
521
  if (n.length < 2) return [];
522
- const o = U(n[0].route), s = t.get(o), a = n.find((c) => c.id === s) ?? [...n].sort(le)[0];
522
+ const o = U(n[0].route), s = t.get(o), a = n.find((c) => c.id === s) ?? [...n].sort(de)[0];
523
523
  return n.filter((c) => c.id !== a.id).sort((c, d) => c.id.localeCompare(d.id)).map((c) => ({
524
524
  id: `discovery-variant:${encodeURIComponent(a.id)}:${encodeURIComponent(c.id)}`,
525
525
  from: a.id,
@@ -528,7 +528,7 @@ function Ct(e, t) {
528
528
  }));
529
529
  });
530
530
  }
531
- function Rt(e, t) {
531
+ function At(e, t) {
532
532
  const r = /* @__PURE__ */ new Map();
533
533
  for (const n of e) {
534
534
  const o = U(n.route);
@@ -546,19 +546,19 @@ function Rt(e, t) {
546
546
  const h = s.get(d.id);
547
547
  if (!h.length) return [];
548
548
  const b = o.filter(
549
- (P) => Nt(
550
- s.get(P.id),
549
+ (x) => Nt(
550
+ s.get(x.id),
551
551
  h
552
552
  )
553
- ).sort((P, E) => {
554
- const m = s.get(E.id).length - s.get(P.id).length;
553
+ ).sort((x, P) => {
554
+ const m = s.get(P.id).length - s.get(x.id).length;
555
555
  if (m !== 0) return m;
556
- const N = P.flow && P.flow === d.flow ? 0 : 1, p = E.flow && E.flow === d.flow ? 0 : 1;
557
- if (N !== p) return N - p;
558
- const $ = P.section && P.section === d.section ? 0 : 1, R = E.section && E.section === d.section ? 0 : 1;
559
- if ($ !== R) return $ - R;
560
- const T = P.id === a ? 0 : 1, M = E.id === a ? 0 : 1;
561
- return T !== M ? T - M : le(P, E);
556
+ const E = x.flow && x.flow === d.flow ? 0 : 1, p = P.flow && P.flow === d.flow ? 0 : 1;
557
+ if (E !== p) return E - p;
558
+ const O = x.section && x.section === d.section ? 0 : 1, N = P.section && P.section === d.section ? 0 : 1;
559
+ if (O !== N) return O - N;
560
+ const M = x.id === a ? 0 : 1, $ = P.id === a ? 0 : 1;
561
+ return M !== $ ? M - $ : de(x, P);
562
562
  })[0];
563
563
  return b ? [
564
564
  {
@@ -578,7 +578,7 @@ function Rt(e, t) {
578
578
  });
579
579
  });
580
580
  }
581
- function At(e) {
581
+ function Ot(e) {
582
582
  var r;
583
583
  const t = /* @__PURE__ */ new Map();
584
584
  for (const n of e) {
@@ -597,7 +597,7 @@ function At(e) {
597
597
  }
598
598
  return s.size < 2 ? [] : [...s.values()].flatMap((a) => {
599
599
  const c = [...a].sort(
600
- le
600
+ de
601
601
  )[0];
602
602
  return c.id === o.id ? [] : [
603
603
  {
@@ -610,7 +610,7 @@ function At(e) {
610
610
  });
611
611
  });
612
612
  }
613
- function Ot(e, t, r) {
613
+ function $t(e, t, r) {
614
614
  const n = new Set(
615
615
  (t.routes ?? []).map((o) => U(o.path)).filter((o) => !!o)
616
616
  );
@@ -632,91 +632,91 @@ function Ot(e, t, r) {
632
632
  } : o;
633
633
  });
634
634
  }
635
- function $t(e, t) {
636
- var h, u, b, P, E;
635
+ function Mt(e, t) {
636
+ var h, u, b, x, P;
637
637
  const r = new Set(e.map((m) => m.id)), n = new Map(
638
- e.map((m, N) => [m.id, N])
638
+ e.map((m, E) => [m.id, E])
639
639
  ), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map();
640
640
  for (const m of r)
641
641
  o.set(m, /* @__PURE__ */ new Set()), s.set(m, /* @__PURE__ */ new Set()), a.set(m, /* @__PURE__ */ new Set());
642
642
  for (const m of t)
643
- !r.has(m.from) || !r.has(m.to) || ((h = o.get(m.to)) == null || h.add(m.from), (u = s.get(m.from)) == null || u.add(m.to), (b = a.get(m.from)) == null || b.add(m.to), (P = a.get(m.to)) == null || P.add(m.from));
643
+ !r.has(m.from) || !r.has(m.to) || ((h = o.get(m.to)) == null || h.add(m.from), (u = s.get(m.from)) == null || u.add(m.to), (b = a.get(m.from)) == null || b.add(m.to), (x = a.get(m.to)) == null || x.add(m.from));
644
644
  const c = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set();
645
645
  for (const m of r) {
646
646
  if (d.has(m)) continue;
647
- const N = [], p = [m];
647
+ const E = [], p = [m];
648
648
  for (; p.length; ) {
649
649
  const S = p.shift();
650
650
  if (!d.has(S)) {
651
- d.add(S), N.push(S);
652
- for (const C of a.get(S) ?? [])
653
- d.has(C) || p.push(C);
651
+ d.add(S), E.push(S);
652
+ for (const R of a.get(S) ?? [])
653
+ d.has(R) || p.push(R);
654
654
  }
655
655
  }
656
- if (N.length === 1 && (((E = a.get(N[0])) == null ? void 0 : E.size) ?? 0) === 0)
656
+ if (E.length === 1 && (((P = a.get(E[0])) == null ? void 0 : P.size) ?? 0) === 0)
657
657
  continue;
658
- const $ = N.filter((S) => {
659
- var C;
660
- return (((C = o.get(S)) == null ? void 0 : C.size) ?? 0) === 0;
658
+ const O = E.filter((S) => {
659
+ var R;
660
+ return (((R = o.get(S)) == null ? void 0 : R.size) ?? 0) === 0;
661
661
  }).sort(
662
- (S, C) => (n.get(S) ?? Number.MAX_SAFE_INTEGER) - (n.get(C) ?? Number.MAX_SAFE_INTEGER) || S.localeCompare(C)
663
- ), R = [...N].sort(
664
- (S, C) => (n.get(S) ?? Number.MAX_SAFE_INTEGER) - (n.get(C) ?? Number.MAX_SAFE_INTEGER) || S.localeCompare(C)
662
+ (S, R) => (n.get(S) ?? Number.MAX_SAFE_INTEGER) - (n.get(R) ?? Number.MAX_SAFE_INTEGER) || S.localeCompare(R)
663
+ ), N = [...E].sort(
664
+ (S, R) => (n.get(S) ?? Number.MAX_SAFE_INTEGER) - (n.get(R) ?? Number.MAX_SAFE_INTEGER) || S.localeCompare(R)
665
665
  )[0];
666
- if (!R) continue;
667
- const T = [R], M = /* @__PURE__ */ new Set(), A = (S) => {
668
- const C = [S];
669
- for (; C.length; ) {
670
- const F = C.shift();
671
- if (!M.has(F)) {
672
- M.add(F);
673
- for (const B of s.get(F) ?? [])
674
- M.has(B) || C.push(B);
666
+ if (!N) continue;
667
+ const M = [N], $ = /* @__PURE__ */ new Set(), C = (S) => {
668
+ const R = [S];
669
+ for (; R.length; ) {
670
+ const F = R.shift();
671
+ if (!$.has(F)) {
672
+ $.add(F);
673
+ for (const j of s.get(F) ?? [])
674
+ $.has(j) || R.push(j);
675
675
  }
676
676
  }
677
677
  };
678
- A(R);
679
- for (const S of $)
680
- M.has(S) || (T.push(S), A(S));
681
- for (const S of T)
678
+ C(N);
679
+ for (const S of O)
680
+ $.has(S) || (M.push(S), C(S));
681
+ for (const S of M)
682
682
  c.add(S);
683
683
  }
684
684
  return [...c].sort(
685
- (m, N) => (n.get(m) ?? Number.MAX_SAFE_INTEGER) - (n.get(N) ?? Number.MAX_SAFE_INTEGER) || m.localeCompare(N)
685
+ (m, E) => (n.get(m) ?? Number.MAX_SAFE_INTEGER) - (n.get(E) ?? Number.MAX_SAFE_INTEGER) || m.localeCompare(E)
686
686
  );
687
687
  }
688
688
  function ze(e) {
689
689
  var t, r;
690
- return wt(
690
+ return bt(
691
691
  (r = (t = e.scenarios) == null ? void 0 : t.find(
692
692
  (n) => n.id === "environment:baseline"
693
693
  )) == null ? void 0 : r.environment
694
694
  );
695
695
  }
696
- function Mt(e) {
697
- const t = xt(
696
+ function Tt(e) {
697
+ const t = Pt(
698
698
  e.pages,
699
699
  e.manifest
700
- ), r = Pt(t), n = Ot(
700
+ ), r = Et(t), n = $t(
701
701
  t,
702
702
  e.manifest,
703
703
  r
704
704
  ), s = [
705
- ...vt(
705
+ ...It(
706
706
  e.manifest.edges,
707
707
  r,
708
708
  new Set(n.map((a) => a.id))
709
709
  ),
710
710
  ...Ct(n, r),
711
- ...Rt(n, r),
712
- ...At(n)
711
+ ...At(n, r),
712
+ ...Ot(n)
713
713
  ];
714
- return yt({
714
+ return wt({
715
715
  screens: n,
716
716
  assets: e.assets,
717
- scenarios: St(e.manifest.routes),
717
+ scenarios: vt(e.manifest.routes),
718
718
  inferredEdges: s,
719
- startScreenIds: $t(n, s)
719
+ startScreenIds: Mt(n, s)
720
720
  });
721
721
  }
722
722
  async function _e(e) {
@@ -728,39 +728,39 @@ async function _e(e) {
728
728
  if (!r.ok)
729
729
  throw new Error(`Storyboard discovery failed (${r.status})`);
730
730
  const n = await r.json();
731
- if (!bt(n))
731
+ if (!St(n))
732
732
  throw new Error("Storyboard discovery returned an invalid manifest.");
733
733
  return {
734
734
  manifest: n,
735
735
  baselineEnvironment: ze(n),
736
- graph: Mt({
736
+ graph: Tt({
737
737
  manifest: n,
738
738
  pages: e.pages,
739
739
  assets: e.assets
740
740
  })
741
741
  };
742
742
  }
743
- async function mn(e) {
744
- V(null);
743
+ async function gn(e) {
744
+ L(null);
745
745
  try {
746
746
  const t = await _e(e);
747
- return V(t.graph), t;
747
+ return L(t.graph), t;
748
748
  } catch (t) {
749
- throw V(null), t;
749
+ throw L(null), t;
750
750
  }
751
751
  }
752
- const Tt = "pygmalion-preview", Dt = "unknown", kt = 512, zt = 2048, _t = 8 * 1024 * 1024, Ft = 128 * 1024 * 1024, jt = /* @__PURE__ */ new Set([
752
+ const Dt = "pygmalion-preview", kt = "unknown", zt = 512, _t = 2048, Ft = 8 * 1024 * 1024, Bt = 128 * 1024 * 1024, jt = /* @__PURE__ */ new Set([
753
753
  "__proto__",
754
754
  "constructor",
755
755
  "prototype"
756
756
  ]);
757
- function J(e, t) {
757
+ function V(e, t) {
758
758
  const r = e.trim();
759
759
  if (!r && t != null) return t;
760
- if (re(r)) return r;
760
+ if (oe(r)) return r;
761
761
  throw new TypeError("Preview identity must be a non-empty bounded string.");
762
762
  }
763
- function Bt(e) {
763
+ function Ut(e) {
764
764
  const t = e ?? 1;
765
765
  if (!Number.isSafeInteger(t) || t < 1)
766
766
  throw new TypeError(
@@ -787,7 +787,7 @@ function he(e, t = /* @__PURE__ */ new Set()) {
787
787
  }
788
788
  return t.delete(e), r;
789
789
  }
790
- function Ut(e) {
790
+ function Ht(e) {
791
791
  let t = 2166136261, r = 2654435769;
792
792
  for (let n = 0; n < e.length; n += 1) {
793
793
  const o = e.charCodeAt(n);
@@ -795,11 +795,11 @@ function Ut(e) {
795
795
  }
796
796
  return `${(t >>> 0).toString(16).padStart(8, "0")}${(r >>> 0).toString(16).padStart(8, "0")}`;
797
797
  }
798
- function Ht(e) {
798
+ function Kt(e) {
799
799
  if (!Array.isArray(e))
800
800
  throw new TypeError("Preview recipes must be an array.");
801
801
  const t = /* @__PURE__ */ new Set(), r = e.map(({ id: n, recipe: o }) => {
802
- const s = J(n);
802
+ const s = V(n);
803
803
  if (t.has(s))
804
804
  throw new TypeError(`Duplicate preview recipe identity: ${s}`);
805
805
  return t.add(s), {
@@ -807,21 +807,21 @@ function Ht(e) {
807
807
  recipe: he(o)
808
808
  };
809
809
  });
810
- return Ut(JSON.stringify(r));
810
+ return Ht(JSON.stringify(r));
811
811
  }
812
- function gn({
812
+ function yn({
813
813
  sourceRevision: e,
814
814
  recipes: t,
815
815
  recipeVersion: r,
816
- scope: n = Tt
816
+ scope: n = Dt
817
817
  }) {
818
- const o = J(n), s = J(
818
+ const o = V(n), s = V(
819
819
  e,
820
- Dt
821
- ), a = Bt(r), c = Ht(t);
820
+ kt
821
+ ), a = Ut(r), c = Kt(t);
822
822
  return `${o}:${encodeURIComponent(s)}:recipe-v${a}:${c}`;
823
823
  }
824
- function yn(e) {
824
+ function wn(e) {
825
825
  return {
826
826
  route: e.route,
827
827
  path: e.path,
@@ -848,7 +848,7 @@ function yn(e) {
848
848
  assertions: e.assertions
849
849
  };
850
850
  }
851
- function Kt({
851
+ function qt({
852
852
  endpoint: e,
853
853
  fetcher: t,
854
854
  captureBaseUrl: r
@@ -877,7 +877,7 @@ function Kt({
877
877
  return h.ok ? h.json().catch(() => null) : null;
878
878
  };
879
879
  }
880
- function se(e) {
880
+ function ie(e) {
881
881
  if (!e || typeof e != "object" || Array.isArray(e)) return !1;
882
882
  const t = Object.getPrototypeOf(e);
883
883
  return t === Object.prototype || t === null;
@@ -885,10 +885,10 @@ function se(e) {
885
885
  function Fe(e) {
886
886
  return new TextEncoder().encode(e).byteLength;
887
887
  }
888
- function re(e) {
889
- return typeof e == "string" && e.length > 0 && e.length <= kt && e === e.trim() && !jt.has(e);
888
+ function oe(e) {
889
+ return typeof e == "string" && e.length > 0 && e.length <= zt && e === e.trim() && !jt.has(e);
890
890
  }
891
- function qt(e) {
891
+ function Gt(e) {
892
892
  const t = /(?:expression\s*\(|-moz-binding\s*:|(?:^|[;{])\s*behavior\s*:)/i;
893
893
  for (const r of e.matchAll(/<style\b[^>]*>([\s\S]*?)<\/style\s*>/gi))
894
894
  if (t.test(r[1] ?? "")) return !0;
@@ -898,14 +898,14 @@ function qt(e) {
898
898
  if (t.test(r[1] ?? r[2] ?? r[3] ?? "")) return !0;
899
899
  return !1;
900
900
  }
901
- function Gt(e) {
902
- return typeof e != "string" || e.length === 0 || Fe(e) > _t ? !1 : !(/<\s*(?:script|iframe|object|embed|applet|portal)\b/i.test(e) || /<\s*meta\b[^>]*http-equiv\s*=\s*["']?\s*refresh\b/i.test(e) || /\s(?:on[a-z][\w:-]*|srcdoc)\s*=/i.test(e) || /\s(?:href|src|action|formaction|xlink:href)\s*=\s*(?:"\s*|'?\s*)(?:javascript|vbscript|data\s*:\s*text\/html)\s*:/i.test(
901
+ function Lt(e) {
902
+ return typeof e != "string" || e.length === 0 || Fe(e) > Ft ? !1 : !(/<\s*(?:script|iframe|object|embed|applet|portal)\b/i.test(e) || /<\s*meta\b[^>]*http-equiv\s*=\s*["']?\s*refresh\b/i.test(e) || /\s(?:on[a-z][\w:-]*|srcdoc)\s*=/i.test(e) || /\s(?:href|src|action|formaction|xlink:href)\s*=\s*(?:"\s*|'?\s*)(?:javascript|vbscript|data\s*:\s*text\/html)\s*:/i.test(
903
903
  e
904
- ) || qt(e));
904
+ ) || Gt(e));
905
905
  }
906
- function Lt(e) {
906
+ function Vt(e) {
907
907
  const t = [];
908
- if (!se(e) || e.version !== 1)
908
+ if (!ie(e) || e.version !== 1)
909
909
  return {
910
910
  valid: !1,
911
911
  artifact: null,
@@ -913,16 +913,16 @@ function Lt(e) {
913
913
  "Preview artifact must be a version 1, version 2, or version 3 bundle."
914
914
  ]
915
915
  };
916
- if (re(e.namespace) || t.push("Preview artifact namespace is invalid."), e.sourceRevision != null && !re(e.sourceRevision) && t.push("Preview artifact source revision is invalid."), !se(e.snapshots))
916
+ if (oe(e.namespace) || t.push("Preview artifact namespace is invalid."), e.sourceRevision != null && !oe(e.sourceRevision) && t.push("Preview artifact source revision is invalid."), !ie(e.snapshots))
917
917
  t.push("Preview artifact snapshots must be a record.");
918
918
  else {
919
919
  const r = Object.entries(e.snapshots);
920
- r.length > zt && t.push("Preview artifact has too many frames.");
920
+ r.length > _t && t.push("Preview artifact has too many frames.");
921
921
  for (const [n, o] of r)
922
- (!re(n) || !Gt(o)) && t.push(`Preview artifact frame "${n}" is invalid.`);
922
+ (!oe(n) || !Lt(o)) && t.push(`Preview artifact frame "${n}" is invalid.`);
923
923
  }
924
924
  try {
925
- Fe(JSON.stringify(e)) > Ft && t.push("Preview artifact exceeds the bundle byte limit.");
925
+ Fe(JSON.stringify(e)) > Bt && t.push("Preview artifact exceeds the bundle byte limit.");
926
926
  } catch {
927
927
  t.push("Preview artifact is not serializable.");
928
928
  }
@@ -932,35 +932,35 @@ function Lt(e) {
932
932
  errors: t
933
933
  };
934
934
  }
935
- function Vt(e, t) {
936
- const r = se(e) && e.version === 3 ? (() => {
935
+ function Jt(e, t) {
936
+ const r = ie(e) && e.version === 3 ? (() => {
937
937
  const n = Ke(e);
938
938
  return {
939
939
  valid: n.valid,
940
940
  artifact: n.valid ? e : null,
941
941
  errors: n.errors
942
942
  };
943
- })() : se(e) && e.version === 2 ? (() => {
943
+ })() : ie(e) && e.version === 2 ? (() => {
944
944
  const n = qe(e);
945
945
  return {
946
946
  valid: n.valid,
947
947
  artifact: n.valid ? e : null,
948
948
  errors: n.errors
949
949
  };
950
- })() : Lt(e);
950
+ })() : Vt(e);
951
951
  return !r.valid || !r.artifact ? {
952
952
  valid: !1,
953
953
  artifact: null,
954
954
  reason: "invalid-bundle",
955
955
  errors: r.errors
956
- } : t && r.artifact.namespace !== J(t.namespace) ? {
956
+ } : t && r.artifact.namespace !== V(t.namespace) ? {
957
957
  valid: !1,
958
958
  artifact: null,
959
959
  reason: "namespace-mismatch",
960
960
  errors: [
961
961
  "Preview artifact namespace does not match the runtime namespace."
962
962
  ]
963
- } : t && r.artifact.sourceRevision !== J(t.sourceRevision) ? {
963
+ } : t && r.artifact.sourceRevision !== V(t.sourceRevision) ? {
964
964
  valid: !1,
965
965
  artifact: null,
966
966
  reason: "revision-mismatch",
@@ -973,15 +973,15 @@ function Vt(e, t) {
973
973
  errors: []
974
974
  };
975
975
  }
976
- async function Jt({
976
+ async function Wt({
977
977
  namespace: e,
978
978
  sourceRevision: t,
979
979
  transport: r,
980
980
  signal: n
981
981
  }) {
982
982
  const o = {
983
- namespace: J(e),
984
- sourceRevision: J(t)
983
+ namespace: V(e),
984
+ sourceRevision: V(t)
985
985
  };
986
986
  let s;
987
987
  try {
@@ -992,7 +992,7 @@ async function Jt({
992
992
  }
993
993
  if (s == null)
994
994
  return { status: "unavailable", artifact: null };
995
- const a = Vt(s, o);
995
+ const a = Jt(s, o);
996
996
  return a.valid ? { status: "accepted", artifact: a.artifact } : {
997
997
  status: "rejected",
998
998
  artifact: null,
@@ -1000,20 +1000,20 @@ async function Jt({
1000
1000
  errors: a.errors
1001
1001
  };
1002
1002
  }
1003
- const ie = "var(--pygmalion-catalog-surface, #ffffff)", ae = "var(--pygmalion-catalog-canvas, #f5f5f5)", me = "var(--pygmalion-catalog-border, #e5e7eb)", ce = "var(--pygmalion-catalog-text, #202124)", _ = "var(--pygmalion-catalog-muted, #6b7280)", Wt = "var(--pygmalion-catalog-header, #11182f)", Qt = "var(--pygmalion-catalog-accent, #7c6cf2)";
1004
- function wn({
1003
+ const ae = "var(--pygmalion-catalog-surface, #ffffff)", ce = "var(--pygmalion-catalog-canvas, #f5f5f5)", me = "var(--pygmalion-catalog-border, #e5e7eb)", le = "var(--pygmalion-catalog-text, #202124)", _ = "var(--pygmalion-catalog-muted, #6b7280)", Qt = "var(--pygmalion-catalog-header, #11182f)", Xt = "var(--pygmalion-catalog-accent, #7c6cf2)";
1004
+ function bn({
1005
1005
  title: e,
1006
1006
  eyebrow: t,
1007
1007
  description: r,
1008
1008
  version: n,
1009
1009
  meta: o,
1010
1010
  children: s,
1011
- headerBackground: a = Wt,
1011
+ headerBackground: a = Qt,
1012
1012
  headerColor: c = "#ffffff",
1013
- bodyBackground: d = ie,
1013
+ bodyBackground: d = ae,
1014
1014
  bodyGap: h = 40
1015
1015
  }) {
1016
- return /* @__PURE__ */ O(
1016
+ return /* @__PURE__ */ A(
1017
1017
  "section",
1018
1018
  {
1019
1019
  "data-pygmalion-catalog-document": "",
@@ -1025,12 +1025,12 @@ function wn({
1025
1025
  maxWidth: "none",
1026
1026
  flexDirection: "column",
1027
1027
  overflow: "visible",
1028
- color: ce,
1028
+ color: le,
1029
1029
  background: d,
1030
1030
  fontFamily: "Inter, ui-sans-serif, system-ui, sans-serif"
1031
1031
  },
1032
1032
  children: [
1033
- /* @__PURE__ */ O(
1033
+ /* @__PURE__ */ A(
1034
1034
  "header",
1035
1035
  {
1036
1036
  style: {
@@ -1044,7 +1044,7 @@ function wn({
1044
1044
  background: a
1045
1045
  },
1046
1046
  children: [
1047
- /* @__PURE__ */ O("div", { style: { display: "flex", flexDirection: "column", gap: 10 }, children: [
1047
+ /* @__PURE__ */ A("div", { style: { display: "flex", flexDirection: "column", gap: 10 }, children: [
1048
1048
  t ? /* @__PURE__ */ w(
1049
1049
  "div",
1050
1050
  {
@@ -1085,7 +1085,7 @@ function wn({
1085
1085
  }
1086
1086
  ) : null
1087
1087
  ] }),
1088
- n || o ? /* @__PURE__ */ O(
1088
+ n || o ? /* @__PURE__ */ A(
1089
1089
  "div",
1090
1090
  {
1091
1091
  style: {
@@ -1125,14 +1125,14 @@ function wn({
1125
1125
  }
1126
1126
  );
1127
1127
  }
1128
- function bn({
1128
+ function Sn({
1129
1129
  title: e,
1130
1130
  count: t,
1131
1131
  description: r,
1132
1132
  children: n,
1133
1133
  tone: o = "tinted"
1134
1134
  }) {
1135
- return /* @__PURE__ */ O(
1135
+ return /* @__PURE__ */ A(
1136
1136
  "section",
1137
1137
  {
1138
1138
  "data-pygmalion-catalog-section": "",
@@ -1144,10 +1144,10 @@ function bn({
1144
1144
  alignItems: "flex-start",
1145
1145
  gap: 18,
1146
1146
  padding: o === "tinted" ? 24 : 0,
1147
- background: o === "tinted" ? ae : "transparent"
1147
+ background: o === "tinted" ? ce : "transparent"
1148
1148
  },
1149
1149
  children: [
1150
- /* @__PURE__ */ O("header", { style: { display: "flex", alignItems: "baseline", gap: 8 }, children: [
1150
+ /* @__PURE__ */ A("header", { style: { display: "flex", alignItems: "baseline", gap: 8 }, children: [
1151
1151
  /* @__PURE__ */ w(
1152
1152
  "h2",
1153
1153
  {
@@ -1168,7 +1168,7 @@ function bn({
1168
1168
  }
1169
1169
  );
1170
1170
  }
1171
- function Sn({
1171
+ function vn({
1172
1172
  rows: e,
1173
1173
  columns: t,
1174
1174
  cornerLabel: r,
@@ -1187,10 +1187,10 @@ function Sn({
1187
1187
  display: "inline-block",
1188
1188
  width: "max-content",
1189
1189
  padding: a ? 16 : 0,
1190
- border: a ? `1px dashed ${Qt}` : void 0,
1190
+ border: a ? `1px dashed ${Xt}` : void 0,
1191
1191
  borderRadius: a ? 4 : void 0
1192
1192
  },
1193
- children: /* @__PURE__ */ O(
1193
+ children: /* @__PURE__ */ A(
1194
1194
  "table",
1195
1195
  {
1196
1196
  style: {
@@ -1199,7 +1199,7 @@ function Sn({
1199
1199
  borderSpacing: 0
1200
1200
  },
1201
1201
  children: [
1202
- /* @__PURE__ */ w("thead", { children: /* @__PURE__ */ O("tr", { children: [
1202
+ /* @__PURE__ */ w("thead", { children: /* @__PURE__ */ A("tr", { children: [
1203
1203
  /* @__PURE__ */ w(
1204
1204
  "th",
1205
1205
  {
@@ -1230,7 +1230,7 @@ function Sn({
1230
1230
  d
1231
1231
  ))
1232
1232
  ] }) }),
1233
- /* @__PURE__ */ w("tbody", { children: e.map((d) => /* @__PURE__ */ O("tr", { children: [
1233
+ /* @__PURE__ */ w("tbody", { children: e.map((d) => /* @__PURE__ */ A("tr", { children: [
1234
1234
  /* @__PURE__ */ w(
1235
1235
  "th",
1236
1236
  {
@@ -1265,14 +1265,14 @@ function Sn({
1265
1265
  }
1266
1266
  );
1267
1267
  }
1268
- function Xt(e) {
1268
+ function Yt(e) {
1269
1269
  return e.normalize("NFKD").replace(/[\u0300-\u036f]/g, "").replace(/[^\p{L}\p{N}]+/gu, "-").replace(/^-+|-+$/g, "").toLowerCase() || "page";
1270
1270
  }
1271
- function je(e, t, r = "PygmalionCatalog") {
1272
- const n = (o) => Xt(o).replace(/-/g, "_");
1271
+ function Be(e, t, r = "PygmalionCatalog") {
1272
+ const n = (o) => Yt(o).replace(/-/g, "_");
1273
1273
  return `${r}_${n(e)}_${n(t)}`;
1274
1274
  }
1275
- function Be(e, t) {
1275
+ function je(e, t) {
1276
1276
  return {
1277
1277
  id: e.id,
1278
1278
  name: e.name,
@@ -1291,17 +1291,17 @@ function Ue(e) {
1291
1291
  t.add(r.id);
1292
1292
  }
1293
1293
  }
1294
- function Yt(e, t, r) {
1294
+ function Zt(e, t, r) {
1295
1295
  return typeof e == "function" ? e(t, r) : e;
1296
1296
  }
1297
- function Zt({
1297
+ function en({
1298
1298
  page: e,
1299
1299
  items: t,
1300
1300
  renderPreview: r,
1301
1301
  secondaryLabel: n,
1302
1302
  minimumColumnWidth: o
1303
1303
  }) {
1304
- return /* @__PURE__ */ O(
1304
+ return /* @__PURE__ */ A(
1305
1305
  "section",
1306
1306
  {
1307
1307
  "data-pygmalion-catalog-page": e.id,
@@ -1311,14 +1311,14 @@ function Zt({
1311
1311
  display: "inline-block",
1312
1312
  width: "max-content",
1313
1313
  padding: 32,
1314
- color: ce,
1315
- background: ae,
1314
+ color: le,
1315
+ background: ce,
1316
1316
  fontFamily: "Inter, ui-sans-serif, system-ui, sans-serif"
1317
1317
  },
1318
1318
  children: [
1319
- /* @__PURE__ */ O("header", { style: { marginBottom: 24 }, children: [
1319
+ /* @__PURE__ */ A("header", { style: { marginBottom: 24 }, children: [
1320
1320
  /* @__PURE__ */ w("h1", { style: { margin: 0, fontSize: 24, lineHeight: 1.35 }, children: e.name }),
1321
- /* @__PURE__ */ O("p", { style: { margin: "6px 0 0", color: _, fontSize: 13 }, children: [
1321
+ /* @__PURE__ */ A("p", { style: { margin: "6px 0 0", color: _, fontSize: 13 }, children: [
1322
1322
  t.length,
1323
1323
  " assets"
1324
1324
  ] })
@@ -1331,7 +1331,7 @@ function Zt({
1331
1331
  gridTemplateColumns: "repeat(6, max-content)",
1332
1332
  gap: 16
1333
1333
  },
1334
- children: t.map((s) => /* @__PURE__ */ O(
1334
+ children: t.map((s) => /* @__PURE__ */ A(
1335
1335
  "article",
1336
1336
  {
1337
1337
  "data-pygmalion-catalog-item": s.id,
@@ -1341,7 +1341,7 @@ function Zt({
1341
1341
  padding: 16,
1342
1342
  border: `1px solid ${me}`,
1343
1343
  borderRadius: 12,
1344
- background: ie
1344
+ background: ae
1345
1345
  },
1346
1346
  children: [
1347
1347
  /* @__PURE__ */ w(
@@ -1398,7 +1398,7 @@ function Zt({
1398
1398
  }
1399
1399
  );
1400
1400
  }
1401
- function vn(e) {
1401
+ function In(e) {
1402
1402
  Ue(e.items);
1403
1403
  const t = /* @__PURE__ */ new Map();
1404
1404
  for (const o of e.items) {
@@ -1412,7 +1412,7 @@ function vn(e) {
1412
1412
  t.set(s.id, {
1413
1413
  page: s,
1414
1414
  items: [o],
1415
- registryName: je(
1415
+ registryName: Be(
1416
1416
  e.kind,
1417
1417
  s.id,
1418
1418
  e.registryPrefix
@@ -1422,7 +1422,7 @@ function vn(e) {
1422
1422
  const r = {}, n = [];
1423
1423
  for (const o of t.values()) {
1424
1424
  const s = () => /* @__PURE__ */ w(
1425
- Zt,
1425
+ en,
1426
1426
  {
1427
1427
  page: o.page,
1428
1428
  items: o.items,
@@ -1435,7 +1435,7 @@ function vn(e) {
1435
1435
  component: s,
1436
1436
  children: "none"
1437
1437
  };
1438
- const a = Yt(e.frame, o.page, o.items);
1438
+ const a = Zt(e.frame, o.page, o.items);
1439
1439
  n.push({
1440
1440
  ...o.page,
1441
1441
  componentName: o.registryName,
@@ -1448,12 +1448,12 @@ function vn(e) {
1448
1448
  registry: r,
1449
1449
  collection: {
1450
1450
  expectedCount: e.expectedCount ?? e.items.length,
1451
- assets: e.items.map((o) => Be(o, e.pageFor(o).id)),
1451
+ assets: e.items.map((o) => je(o, e.pageFor(o).id)),
1452
1452
  pages: n
1453
1453
  }
1454
1454
  };
1455
1455
  }
1456
- function en(e, t = 60) {
1456
+ function tn(e, t = 60) {
1457
1457
  const r = Object.entries((e == null ? void 0 : e.props) ?? {}).filter(([, c]) => c.length > 0).sort(([c, d], [h, u]) => u.length - d.length || c.localeCompare(h)), n = r[0], o = r[1], s = Math.max(1, (n == null ? void 0 : n[1].length) ?? 1), a = o == null ? void 0 : o[1].slice(0, Math.max(1, Math.floor(t / s)));
1458
1458
  return {
1459
1459
  row: n,
@@ -1462,7 +1462,7 @@ function en(e, t = 60) {
1462
1462
  additional: r.slice(2)
1463
1463
  };
1464
1464
  }
1465
- function tn(e, t, r, n) {
1465
+ function nn(e, t, r, n) {
1466
1466
  return {
1467
1467
  ...e.defaultProps,
1468
1468
  ...Object.fromEntries(t.fixed),
@@ -1470,14 +1470,14 @@ function tn(e, t, r, n) {
1470
1470
  ...t.column && n ? { [t.column[0]]: n } : {}
1471
1471
  };
1472
1472
  }
1473
- function nn({
1473
+ function rn({
1474
1474
  item: e,
1475
1475
  entry: t,
1476
1476
  maxVariantCells: r
1477
1477
  }) {
1478
1478
  var c, d;
1479
1479
  if (!t)
1480
- return /* @__PURE__ */ O(
1480
+ return /* @__PURE__ */ A(
1481
1481
  "section",
1482
1482
  {
1483
1483
  "data-pygmalion-catalog-component": e.id,
@@ -1487,8 +1487,8 @@ function nn({
1487
1487
  display: "inline-block",
1488
1488
  width: "max-content",
1489
1489
  padding: 32,
1490
- color: ce,
1491
- background: ae
1490
+ color: le,
1491
+ background: ce
1492
1492
  },
1493
1493
  children: [
1494
1494
  /* @__PURE__ */ w("strong", { children: e.name }),
@@ -1496,8 +1496,8 @@ function nn({
1496
1496
  ]
1497
1497
  }
1498
1498
  );
1499
- const n = en(t, r), o = ((c = n.row) == null ? void 0 : c[1]) ?? [void 0], s = ((d = n.column) == null ? void 0 : d[1]) ?? [void 0], a = t.component;
1500
- return /* @__PURE__ */ O(
1499
+ const n = tn(t, r), o = ((c = n.row) == null ? void 0 : c[1]) ?? [void 0], s = ((d = n.column) == null ? void 0 : d[1]) ?? [void 0], a = t.component;
1500
+ return /* @__PURE__ */ A(
1501
1501
  "section",
1502
1502
  {
1503
1503
  "data-pygmalion-catalog-component": e.id,
@@ -1507,12 +1507,12 @@ function nn({
1507
1507
  display: "inline-block",
1508
1508
  width: "max-content",
1509
1509
  padding: 32,
1510
- color: ce,
1511
- background: ae,
1510
+ color: le,
1511
+ background: ce,
1512
1512
  fontFamily: "Inter, ui-sans-serif, system-ui, sans-serif"
1513
1513
  },
1514
1514
  children: [
1515
- /* @__PURE__ */ O("header", { style: { marginBottom: 24 }, children: [
1515
+ /* @__PURE__ */ A("header", { style: { marginBottom: 24 }, children: [
1516
1516
  /* @__PURE__ */ w("h1", { style: { margin: 0, fontSize: 24 }, children: e.name }),
1517
1517
  e.sourcePath ? /* @__PURE__ */ w("p", { style: { margin: "6px 0 0", color: _, fontSize: 12 }, children: e.sourcePath }) : null
1518
1518
  ] }),
@@ -1526,11 +1526,11 @@ function nn({
1526
1526
  },
1527
1527
  children: o.flatMap(
1528
1528
  (h) => s.map((u) => {
1529
- const b = tn(t, n, h, u), P = [
1529
+ const b = nn(t, n, h, u), x = [
1530
1530
  n.row && h ? `${n.row[0]}=${h}` : "",
1531
1531
  n.column && u ? `${n.column[0]}=${u}` : ""
1532
1532
  ].filter(Boolean).join(" · ");
1533
- return /* @__PURE__ */ O(
1533
+ return /* @__PURE__ */ A(
1534
1534
  "article",
1535
1535
  {
1536
1536
  style: {
@@ -1538,10 +1538,10 @@ function nn({
1538
1538
  padding: 16,
1539
1539
  border: `1px solid ${me}`,
1540
1540
  borderRadius: 10,
1541
- background: ie
1541
+ background: ae
1542
1542
  },
1543
1543
  children: [
1544
- P ? /* @__PURE__ */ w("div", { style: { marginBottom: 12, color: _, fontSize: 11 }, children: P }) : null,
1544
+ x ? /* @__PURE__ */ w("div", { style: { marginBottom: 12, color: _, fontSize: 11 }, children: x }) : null,
1545
1545
  /* @__PURE__ */ w("div", { style: { display: "flex", minHeight: 44, alignItems: "center" }, children: xe(
1546
1546
  a,
1547
1547
  b,
@@ -1555,16 +1555,16 @@ function nn({
1555
1555
  )
1556
1556
  }
1557
1557
  ),
1558
- n.additional.map(([h, u]) => /* @__PURE__ */ O("section", { style: { marginTop: 20 }, children: [
1558
+ n.additional.map(([h, u]) => /* @__PURE__ */ A("section", { style: { marginTop: 20 }, children: [
1559
1559
  /* @__PURE__ */ w("h2", { style: { margin: "0 0 10px", color: _, fontSize: 12 }, children: h }),
1560
- /* @__PURE__ */ w("div", { style: { display: "flex", flexWrap: "wrap", gap: 12 }, children: u.map((b) => /* @__PURE__ */ O(
1560
+ /* @__PURE__ */ w("div", { style: { display: "flex", flexWrap: "wrap", gap: 12 }, children: u.map((b) => /* @__PURE__ */ A(
1561
1561
  "article",
1562
1562
  {
1563
1563
  style: {
1564
1564
  padding: 16,
1565
1565
  border: `1px solid ${me}`,
1566
1566
  borderRadius: 10,
1567
- background: ie
1567
+ background: ae
1568
1568
  },
1569
1569
  children: [
1570
1570
  /* @__PURE__ */ w("div", { style: { marginBottom: 12, color: _, fontSize: 11 }, children: b }),
@@ -1582,16 +1582,16 @@ function nn({
1582
1582
  }
1583
1583
  );
1584
1584
  }
1585
- function In(e) {
1585
+ function xn(e) {
1586
1586
  Ue(e.items);
1587
1587
  const t = {}, r = [], n = [], o = e.maxVariantCells ?? 60;
1588
1588
  for (const s of e.items) {
1589
- const a = je(
1589
+ const a = Be(
1590
1590
  e.kind,
1591
1591
  s.id,
1592
1592
  e.registryPrefix
1593
1593
  ), c = e.registry[s.name], d = () => /* @__PURE__ */ w(
1594
- nn,
1594
+ rn,
1595
1595
  {
1596
1596
  item: s,
1597
1597
  entry: c,
@@ -1608,7 +1608,7 @@ function In(e) {
1608
1608
  width: 1,
1609
1609
  height: 1,
1610
1610
  frameSizeMode: "content"
1611
- }), n.push(Be(s, s.id));
1611
+ }), n.push(je(s, s.id));
1612
1612
  }
1613
1613
  return {
1614
1614
  registry: t,
@@ -1619,9 +1619,9 @@ function In(e) {
1619
1619
  }
1620
1620
  };
1621
1621
  }
1622
- const Ae = /^[a-f0-9]{64}$/, rn = /^\/__pygmalion-qa\/artifacts\/[A-Za-z0-9_-]{8,120}\.png$/, on = /^p\d+$/;
1622
+ const Ae = /^[a-f0-9]{64}$/, on = /^\/__pygmalion-qa\/artifacts\/[A-Za-z0-9_-]{8,120}\.png$/, sn = /^p\d+$/;
1623
1623
  function ge(e) {
1624
- return typeof e == "string" && rn.test(e) ? e : void 0;
1624
+ return typeof e == "string" && on.test(e) ? e : void 0;
1625
1625
  }
1626
1626
  function Oe(e, t) {
1627
1627
  const r = new URL(e, t);
@@ -1641,7 +1641,7 @@ function $e(e) {
1641
1641
  const t = e;
1642
1642
  return !Number.isSafeInteger(t.width) || !Number.isSafeInteger(t.height) || Number(t.width) < 1 || Number(t.height) < 1 || Number(t.width) > 65536 || Number(t.height) > 65536 ? null : { width: Number(t.width), height: Number(t.height) };
1643
1643
  }
1644
- function sn(e) {
1644
+ function an(e) {
1645
1645
  if (!e || typeof e != "object" || Array.isArray(e)) return null;
1646
1646
  const t = e, r = $e(t.before), n = $e(t.after);
1647
1647
  if (!r || !n || !Number.isSafeInteger(t.changedPixels) || !Number.isSafeInteger(t.totalPixels) || Number(t.changedPixels) < 0 || Number(t.totalPixels) < 1 || Number(t.changedPixels) > Number(t.totalPixels) || typeof t.threshold != "number" || !Number.isFinite(t.threshold) || t.threshold < 0 || t.threshold > 1)
@@ -1658,7 +1658,7 @@ function sn(e) {
1658
1658
  heatmapUrl: o
1659
1659
  };
1660
1660
  }
1661
- function an(e, t) {
1661
+ function cn(e, t) {
1662
1662
  if (!e || typeof e != "object" || Array.isArray(e)) return null;
1663
1663
  const r = e;
1664
1664
  if (typeof r.id != "string" || !r.id) return null;
@@ -1666,7 +1666,7 @@ function an(e, t) {
1666
1666
  if (!o) return null;
1667
1667
  const s = fe(r.after);
1668
1668
  if (t === "changed" && !s) return null;
1669
- const a = s ? sn(r.pixelDiff) : null;
1669
+ const a = s ? an(r.pixelDiff) : null;
1670
1670
  return {
1671
1671
  id: r.id,
1672
1672
  before: o,
@@ -1678,7 +1678,7 @@ function an(e, t) {
1678
1678
  ...a ? { pixelDiff: a } : {}
1679
1679
  };
1680
1680
  }
1681
- function cn(e, t = []) {
1681
+ function ln(e, t = []) {
1682
1682
  const r = new Set(t), n = r.size > 0, o = /* @__PURE__ */ new Set(), s = [
1683
1683
  ...e.styles.map((a) => a.affectedFrames ?? []),
1684
1684
  ...e.texts.map((a) => a.affectedFrames ?? []),
@@ -1686,7 +1686,7 @@ function cn(e, t = []) {
1686
1686
  ];
1687
1687
  for (const a of s)
1688
1688
  for (const c of a) {
1689
- if (n && on.test(c.id) && !r.has(c.id))
1689
+ if (n && sn.test(c.id) && !r.has(c.id))
1690
1690
  throw new Error(
1691
1691
  `"Impact Screen"${c.name}"This internal editor ID (${c.id}) is used. A canonical screen ID is required.`
1692
1692
  );
@@ -1706,7 +1706,7 @@ async function Me(e, t, r) {
1706
1706
  );
1707
1707
  if (typeof o.baselineId != "string" || !o.baselineId)
1708
1708
  throw new Error("Pygmalion visual QA response has no baselineId");
1709
- const s = Array.isArray(o.frames) ? o.frames.map((u) => an(u, r.phase)).filter((u) => u != null) : [], a = Array.isArray(o.failures) ? o.failures.map((u) => {
1709
+ const s = Array.isArray(o.frames) ? o.frames.map((u) => cn(u, r.phase)).filter((u) => u != null) : [], a = Array.isArray(o.failures) ? o.failures.map((u) => {
1710
1710
  if (!u || typeof u != "object" || Array.isArray(u)) return null;
1711
1711
  const b = u;
1712
1712
  return typeof b.id == "string" && typeof b.error == "string" ? { id: b.id, error: b.error } : null;
@@ -1723,46 +1723,46 @@ const ue = {
1723
1723
  mirror: "/__pygmalion-dev-control",
1724
1724
  sessions: "/__pygmalion-design-session",
1725
1725
  inspect: "/__pygmalion-inspect"
1726
- }, ln = "pygmalion.designSessionId", dn = "/__pygmalion-qa", ne = /* @__PURE__ */ new Map();
1726
+ }, dn = "pygmalion.designSessionId", fn = "/__pygmalion-qa", re = /* @__PURE__ */ new Map();
1727
1727
  function Te() {
1728
1728
  var e;
1729
1729
  return typeof window < "u" && ((e = window.crypto) != null && e.randomUUID) ? window.crypto.randomUUID() : `pygmalion-${Date.now()}-${Math.random().toString(36).slice(2)}`;
1730
1730
  }
1731
- function fn(e, t) {
1731
+ function un(e, t) {
1732
1732
  if (e) return e;
1733
- const r = ne.get(t);
1733
+ const r = re.get(t);
1734
1734
  if (r) return r;
1735
1735
  try {
1736
1736
  const n = window.localStorage.getItem(t);
1737
1737
  if (n)
1738
- return ne.set(t, n), n;
1738
+ return re.set(t, n), n;
1739
1739
  const o = Te();
1740
- return window.localStorage.setItem(t, o), ne.set(t, o), o;
1740
+ return window.localStorage.setItem(t, o), re.set(t, o), o;
1741
1741
  } catch {
1742
1742
  const n = Te();
1743
- return ne.set(t, n), n;
1743
+ return re.set(t, n), n;
1744
1744
  }
1745
1745
  }
1746
- async function L(e) {
1746
+ async function G(e) {
1747
1747
  const t = await e.json();
1748
1748
  if (!e.ok) throw new Error(t.error ?? `Pygmalion request failed (${e.status})`);
1749
1749
  return t;
1750
1750
  }
1751
- function xn(e = {}) {
1752
- var G, x, j, k, Q;
1751
+ function Pn(e = {}) {
1752
+ var I, B, k, W, ne;
1753
1753
  const {
1754
1754
  sessionId: t,
1755
- sessionStorageKey: r = ln,
1755
+ sessionStorageKey: r = dn,
1756
1756
  autoStart: n = !0,
1757
1757
  fetcher: o = fetch,
1758
1758
  formatApplyMessage: s
1759
- } = e, a = ((G = e.endpoints) == null ? void 0 : G.mirror) ?? ue.mirror, c = ((x = e.endpoints) == null ? void 0 : x.sessions) ?? ue.sessions, d = ((j = e.endpoints) == null ? void 0 : j.inspect) ?? ue.inspect, h = e.visualQa != null, u = ((k = e.visualQa) == null ? void 0 : k.endpoint) ?? dn, b = JSON.stringify(((Q = e.visualQa) == null ? void 0 : Q.eligibleFrameIds) ?? []), P = Pe(
1759
+ } = e, a = ((I = e.endpoints) == null ? void 0 : I.mirror) ?? ue.mirror, c = ((B = e.endpoints) == null ? void 0 : B.sessions) ?? ue.sessions, d = ((k = e.endpoints) == null ? void 0 : k.inspect) ?? ue.inspect, h = e.visualQa != null, u = ((W = e.visualQa) == null ? void 0 : W.endpoint) ?? fn, b = JSON.stringify(((ne = e.visualQa) == null ? void 0 : ne.eligibleFrameIds) ?? []), x = Pe(
1760
1760
  () => JSON.parse(b),
1761
1761
  [b]
1762
- ), E = Pe(
1763
- () => fn(t, r),
1762
+ ), P = Pe(
1763
+ () => un(t, r),
1764
1764
  [t, r]
1765
- ), [m, N] = te({
1765
+ ), [m, E] = te({
1766
1766
  state: "idle",
1767
1767
  commit: null,
1768
1768
  shortCommit: null,
@@ -1771,67 +1771,67 @@ function xn(e = {}) {
1771
1771
  warning: null,
1772
1772
  error: null,
1773
1773
  appOrigin: null
1774
- }), [p, $] = te(null), [R, T] = te(null), M = Ee(null), A = Ee(null), S = Z(
1774
+ }), [p, O] = te(null), [N, M] = te(null), $ = Ee(null), C = Ee(null), S = Z(
1775
1775
  async (v = !0) => {
1776
- if (M.current) return M.current;
1776
+ if ($.current) return $.current;
1777
1777
  const g = (async () => {
1778
- N((I) => ({ ...I, state: "syncing", error: null }));
1778
+ E((i) => ({ ...i, state: "syncing", error: null }));
1779
1779
  try {
1780
- let I = await o(`${a}/${v ? "refresh" : "status"}`, {
1780
+ let i = await o(`${a}/${v ? "refresh" : "status"}`, {
1781
1781
  method: v ? "POST" : "GET"
1782
- }), i = await L(I);
1783
- const l = Date.now();
1784
- for (; !v && i.state === "syncing" && Date.now() - l < 12e4; )
1785
- await new Promise((D) => window.setTimeout(D, 500)), I = await o(`${a}/status`), i = await L(I);
1786
- if (i.state !== "ready" || !i.appOrigin || !i.commit)
1787
- throw new Error(i.error ?? "Pygmalion could not prepare the source preview");
1788
- const f = await L(
1782
+ }), l = await G(i);
1783
+ const f = Date.now();
1784
+ for (; !v && l.state === "syncing" && Date.now() - f < 12e4; )
1785
+ await new Promise((D) => window.setTimeout(D, 500)), i = await o(`${a}/status`), l = await G(i);
1786
+ if (l.state !== "ready" || !l.appOrigin || !l.commit)
1787
+ throw new Error(l.error ?? "Pygmalion could not prepare the source preview");
1788
+ const y = await G(
1789
1789
  await o(`${c}/open`, {
1790
1790
  method: "POST",
1791
1791
  headers: { "content-type": "application/json" },
1792
- body: JSON.stringify({ sessionId: E, baseDevSha: i.commit })
1792
+ body: JSON.stringify({ sessionId: P, baseDevSha: l.commit })
1793
1793
  })
1794
1794
  );
1795
- if (!f.ok || !f.session)
1796
- throw new Error(f.error ?? "Pygmalion could not open the design session");
1797
- let y = f.session;
1798
- if (y.branchName) {
1799
- const D = await L(
1795
+ if (!y.ok || !y.session)
1796
+ throw new Error(y.error ?? "Pygmalion could not open the design session");
1797
+ let T = y.session;
1798
+ if (T.branchName) {
1799
+ const D = await G(
1800
1800
  await o(`${c}/check`, {
1801
1801
  method: "POST",
1802
1802
  headers: { "content-type": "application/json" },
1803
- body: JSON.stringify({ sessionId: y.id })
1803
+ body: JSON.stringify({ sessionId: T.id })
1804
1804
  })
1805
1805
  );
1806
1806
  if (!D.ok || !D.session)
1807
1807
  throw new Error(D.error ?? "Pygmalion could not check the design session");
1808
- y = D.session;
1808
+ T = D.session;
1809
1809
  }
1810
- N(i), $(y), T(y.appOrigin ?? i.appOrigin);
1811
- } catch (I) {
1812
- N((i) => ({
1813
- ...i,
1810
+ E(l), O(T), M(T.appOrigin ?? l.appOrigin);
1811
+ } catch (i) {
1812
+ E((l) => ({
1813
+ ...l,
1814
1814
  state: "error",
1815
- error: I instanceof Error ? I.message : String(I)
1815
+ error: i instanceof Error ? i.message : String(i)
1816
1816
  }));
1817
1817
  }
1818
1818
  })();
1819
- M.current = g;
1819
+ $.current = g;
1820
1820
  try {
1821
1821
  await g;
1822
1822
  } finally {
1823
- M.current === g && (M.current = null);
1823
+ $.current === g && ($.current = null);
1824
1824
  }
1825
1825
  },
1826
- [o, a, c, E]
1827
- ), C = Z(
1826
+ [o, a, c, P]
1827
+ ), R = Z(
1828
1828
  async (v) => {
1829
- var f;
1829
+ var y;
1830
1830
  if (!p) throw new Error("Pygmalion design session is not ready");
1831
- const g = A.current;
1831
+ const g = C.current;
1832
1832
  if (g && (g.sessionId !== p.id || g.baseDevSha !== p.baseDevSha || g.revision !== p.revision || g.fingerprint !== JSON.stringify(v)))
1833
1833
  throw new Error("The code diff you checked is out of date. Please check the diff for the current changes again.");
1834
- const I = await L(
1834
+ const i = await G(
1835
1835
  await o(`${c}/apply-visual`, {
1836
1836
  method: "POST",
1837
1837
  headers: { "content-type": "application/json" },
@@ -1844,44 +1844,44 @@ function xn(e = {}) {
1844
1844
  })
1845
1845
  })
1846
1846
  );
1847
- if (!I.ok || !I.session)
1848
- throw new Error(I.error ?? "Pygmalion could not apply the visual changes");
1849
- $(I.session), I.session.appOrigin && T(I.session.appOrigin);
1850
- const i = I.applied ?? v.styles.length + v.texts.length + v.operations.length;
1851
- let l;
1852
- if (g != null && g.qaBaselineId && ((f = g.qaFrameIds) != null && f.length) && I.session.appOrigin)
1847
+ if (!i.ok || !i.session)
1848
+ throw new Error(i.error ?? "Pygmalion could not apply the visual changes");
1849
+ O(i.session), i.session.appOrigin && M(i.session.appOrigin);
1850
+ const l = i.applied ?? v.styles.length + v.texts.length + v.operations.length;
1851
+ let f;
1852
+ if (g != null && g.qaBaselineId && ((y = g.qaFrameIds) != null && y.length) && i.session.appOrigin)
1853
1853
  try {
1854
- l = await Me(o, u, {
1854
+ f = await Me(o, u, {
1855
1855
  phase: "changed",
1856
1856
  baselineId: g.qaBaselineId,
1857
- basePath: Oe(I.session.appOrigin, window.location.origin),
1857
+ basePath: Oe(i.session.appOrigin, window.location.origin),
1858
1858
  frameIds: g.qaFrameIds
1859
1859
  });
1860
- } catch (y) {
1861
- const D = y instanceof Error ? y.message : String(y);
1862
- l = {
1860
+ } catch (T) {
1861
+ const D = T instanceof Error ? T.message : String(T);
1862
+ f = {
1863
1863
  phase: "changed",
1864
1864
  baselineId: g.qaBaselineId,
1865
1865
  complete: !1,
1866
1866
  frames: [],
1867
- failures: g.qaFrameIds.map((H) => ({ id: H, error: D }))
1867
+ failures: g.qaFrameIds.map((Q) => ({ id: Q, error: D }))
1868
1868
  };
1869
1869
  }
1870
- return A.current = null, {
1871
- applied: i,
1872
- branch: I.session.branchName ?? void 0,
1873
- integration: I.session.integration.state,
1874
- message: s == null ? void 0 : s(I.session, i),
1875
- ...l ? { qa: l } : {}
1870
+ return C.current = null, {
1871
+ applied: l,
1872
+ branch: i.session.branchName ?? void 0,
1873
+ integration: i.session.integration.state,
1874
+ message: s == null ? void 0 : s(i.session, l),
1875
+ ...f ? { qa: f } : {}
1876
1876
  };
1877
1877
  },
1878
1878
  [o, s, u, p, c]
1879
1879
  ), F = Z(
1880
1880
  async (v) => {
1881
- var f;
1881
+ var y;
1882
1882
  if (!p) throw new Error("Pygmalion design session is not ready");
1883
- A.current = null;
1884
- const g = await L(
1883
+ C.current = null;
1884
+ const g = await G(
1885
1885
  await o(`${c}/preview-visual`, {
1886
1886
  method: "POST",
1887
1887
  headers: { "content-type": "application/json" },
@@ -1895,47 +1895,47 @@ function xn(e = {}) {
1895
1895
  );
1896
1896
  if (!g.ok || !Number.isSafeInteger(g.revision))
1897
1897
  throw new Error(g.error ?? "Pygmalion could not preview the visual changes");
1898
- const I = h ? cn(v, P) : [];
1899
- let i;
1900
- const l = p.appOrigin ?? m.appOrigin;
1901
- if (I.length > 0) {
1902
- if (!l)
1898
+ const i = h ? ln(v, x) : [];
1899
+ let l;
1900
+ const f = p.appOrigin ?? m.appOrigin;
1901
+ if (i.length > 0) {
1902
+ if (!f)
1903
1903
  throw new Error("Impact screen QA baseline preview not ready");
1904
- if (i = await Me(o, u, {
1904
+ if (l = await Me(o, u, {
1905
1905
  phase: "baseline",
1906
- basePath: Oe(l, window.location.origin),
1907
- frameIds: I
1908
- }), !i.complete)
1906
+ basePath: Oe(f, window.location.origin),
1907
+ frameIds: i
1908
+ }), !l.complete)
1909
1909
  throw new Error(
1910
- ((f = i.failures[0]) == null ? void 0 : f.error) ?? `Failed to capture ${I.length - i.frames.length} affected frames`
1910
+ ((y = l.failures[0]) == null ? void 0 : y.error) ?? `Failed to capture ${i.length - l.frames.length} affected frames`
1911
1911
  );
1912
1912
  }
1913
- return A.current = {
1913
+ return C.current = {
1914
1914
  sessionId: p.id,
1915
1915
  baseDevSha: p.baseDevSha,
1916
1916
  revision: g.revision,
1917
1917
  fingerprint: JSON.stringify(v),
1918
- ...i ? { qaBaselineId: i.baselineId, qaFrameIds: I } : {}
1918
+ ...l ? { qaBaselineId: l.baselineId, qaFrameIds: i } : {}
1919
1919
  }, {
1920
1920
  revision: g.revision,
1921
1921
  files: Array.isArray(g.files) ? g.files : [],
1922
1922
  affectedFiles: Array.isArray(g.affectedFiles) ? g.affectedFiles : [],
1923
- ...i ? { qa: i } : {}
1923
+ ...l ? { qa: l } : {}
1924
1924
  };
1925
1925
  },
1926
1926
  [
1927
1927
  o,
1928
1928
  m.appOrigin,
1929
- P,
1929
+ x,
1930
1930
  u,
1931
1931
  p,
1932
1932
  c,
1933
1933
  h
1934
1934
  ]
1935
- ), B = Z(
1935
+ ), j = Z(
1936
1936
  async (v) => {
1937
1937
  if (v.length === 0) return { files: [] };
1938
- const g = await L(
1938
+ const g = await G(
1939
1939
  await o(`${d}/impact`, {
1940
1940
  method: "POST",
1941
1941
  headers: { "content-type": "application/json" },
@@ -1947,10 +1947,10 @@ function xn(e = {}) {
1947
1947
  return { files: Array.isArray(g.files) ? g.files : [] };
1948
1948
  },
1949
1949
  [o, d]
1950
- ), W = Z(async () => {
1950
+ ), J = Z(async () => {
1951
1951
  if (!(p != null && p.canRevert) || !p.headSha)
1952
1952
  throw new Error("There are no reversible changes applied");
1953
- const v = await L(
1953
+ const v = await G(
1954
1954
  await o(`${c}/revert-visual`, {
1955
1955
  method: "POST",
1956
1956
  headers: { "content-type": "application/json" },
@@ -1964,7 +1964,7 @@ function xn(e = {}) {
1964
1964
  );
1965
1965
  if (!v.ok || v.reverted !== !0 || !v.operation || v.operation.kind !== "visual-revert" || !v.session)
1966
1966
  throw new Error(v.error ?? "Pygmalion could not revert the last visual change");
1967
- return A.current = null, $(v.session), v.session.appOrigin && T(v.session.appOrigin), {
1967
+ return C.current = null, O(v.session), v.session.appOrigin && M(v.session.appOrigin), {
1968
1968
  reverted: !0,
1969
1969
  operation: v.operation,
1970
1970
  session: v.session
@@ -1973,36 +1973,37 @@ function xn(e = {}) {
1973
1973
  ee(() => {
1974
1974
  n && S(!1);
1975
1975
  }, [n, S]);
1976
- const q = (p == null ? void 0 : p.appOrigin) ?? m.appOrigin ?? R;
1976
+ const K = (p == null ? void 0 : p.appOrigin) ?? m.appOrigin ?? N, q = (p == null ? void 0 : p.headSha) ?? (p == null ? void 0 : p.baseDevSha) ?? m.commit ?? "pending";
1977
1977
  return {
1978
1978
  mirror: m,
1979
1979
  session: p,
1980
- ready: R != null,
1981
- appOrigin: q,
1982
- previewRevision: `${(p == null ? void 0 : p.headSha) ?? (p == null ? void 0 : p.baseDevSha) ?? m.commit ?? "pending"}:${(p == null ? void 0 : p.revision) ?? 0}`,
1980
+ ready: N != null,
1981
+ appOrigin: K,
1982
+ previewRevision: `${q}:${(p == null ? void 0 : p.revision) ?? 0}`,
1983
+ previewSourceRevision: q,
1983
1984
  refresh: S,
1984
1985
  previewVisual: F,
1985
- inspectImpact: B,
1986
- applyVisual: C,
1987
- revertLastVisual: W
1986
+ inspectImpact: j,
1987
+ applyVisual: R,
1988
+ revertLastVisual: J
1988
1989
  };
1989
1990
  }
1990
- const Pn = {
1991
- editor: K,
1991
+ const En = {
1992
+ editor: H,
1992
1993
  getObserverTree: Le,
1993
1994
  isObservableProp: Ge
1994
1995
  };
1995
- function En(e) {
1996
- K.navigateToPageByName(e);
1996
+ function Rn(e) {
1997
+ H.navigateToPageByName(e);
1997
1998
  }
1998
1999
  function Nn() {
1999
- K.openPreview();
2000
+ H.openPreview();
2000
2001
  }
2001
2002
  function Cn() {
2002
2003
  const e = ve.entries.length > 0;
2003
- return e && ve.discardPending(), K.resetCurrentEdits() || e;
2004
+ return e && ve.discardPending(), H.resetCurrentEdits() || e;
2004
2005
  }
2005
- function Rn({
2006
+ function An({
2006
2007
  registry: e,
2007
2008
  tokens: t,
2008
2009
  initialPages: r,
@@ -2015,100 +2016,101 @@ function Rn({
2015
2016
  previewArtifactEndpoint: h,
2016
2017
  previewConcurrency: u,
2017
2018
  previewOpen: b,
2018
- onPreviewOpenChange: P,
2019
- flowCanvas: E,
2019
+ onPreviewOpenChange: x,
2020
+ flowCanvas: P,
2020
2021
  onApply: m,
2021
- onDesignChange: N,
2022
+ onDesignChange: E,
2022
2023
  onInspectApply: p,
2023
- onInspectPreview: $,
2024
- onInspectImpact: R,
2025
- storyboardDiscovery: T = !0,
2026
- storyboardDiscoveryEndpoint: M = st
2024
+ onInspectPreview: O,
2025
+ onInspectImpact: N,
2026
+ storyboardDiscovery: M = !0,
2027
+ storyboardDiscoveryEndpoint: $ = it
2027
2028
  }) {
2028
- const [A, S] = te(!T), [C, F] = te();
2029
+ const [C, S] = te(!M), [R, F] = te();
2029
2030
  n && (n.assertComplete(), Ve(n));
2030
- const B = e ?? (n == null ? void 0 : n.getRegistry()), W = t ?? (n == null ? void 0 : n.getTokens()), q = r ?? (n == null ? void 0 : n.getInitialPages());
2031
- B && Je(B), W && We(W), at(o ?? null), s != null && Qe(s), a != null && Xe(a), Ye(c);
2032
- const G = C ?? d;
2033
- return G && q && A && Ze(G, {
2031
+ const j = e ?? (n == null ? void 0 : n.getRegistry()), J = t ?? (n == null ? void 0 : n.getTokens()), K = r ?? (n == null ? void 0 : n.getInitialPages());
2032
+ j && Je(j), J && We(J), ct(o ?? null), s != null && Qe(s), a != null && Xe(a), Ye(c);
2033
+ const q = R ?? d;
2034
+ return q && K && C && Ze(q, {
2034
2035
  namespace: c ?? "",
2035
- previewRevision: lt(),
2036
- appOrigin: ct(),
2036
+ previewRevision: dt(),
2037
+ appOrigin: lt(),
2037
2038
  baselineEnvironment: et(),
2038
- pages: q.flatMap(
2039
- (x) => x.route && x.importPageId ? [
2039
+ allowStaleIdentity: R == null && !!h,
2040
+ pages: K.flatMap(
2041
+ (I) => I.route && I.importPageId ? [
2040
2042
  {
2041
- canonicalId: x.importPageId,
2042
- route: x.route,
2043
- width: x.width,
2044
- height: x.height,
2045
- environment: x.environment,
2046
- preset: x.preset,
2047
- interactions: x.interactions,
2048
- assertions: x.assertions
2043
+ canonicalId: I.importPageId,
2044
+ route: I.route,
2045
+ width: I.width,
2046
+ height: I.height,
2047
+ environment: I.environment,
2048
+ preset: I.preset,
2049
+ interactions: I.interactions,
2050
+ assertions: I.assertions
2049
2051
  }
2050
2052
  ] : []
2051
2053
  )
2052
- }), u != null && tt(u), dt(P ?? null), E != null && nt(E), ft(m ?? null), ut(p ?? null), rt($ ?? null), pt(R ?? null), q && K.initPagesFromComponents(q), ee(() => {
2053
- Ie(N ?? null);
2054
- const x = ot(K);
2054
+ }), u != null && tt(u), ft(x ?? null), P != null && nt(P), ut(m ?? null), pt(p ?? null), rt(O ?? null), ht(N ?? null), K && H.initPagesFromComponents(K), ee(() => {
2055
+ Ie(E ?? null);
2056
+ const I = ot(H);
2055
2057
  return () => {
2056
- x(), Ie(null);
2058
+ I(), Ie(null);
2057
2059
  };
2058
- }, [N]), ee(() => {
2059
- if (F(void 0), !A || !h || !(c != null && c.trim()) || !(a != null && a.trim()))
2060
+ }, [E]), ee(() => {
2061
+ if (F(void 0), !C || !h || !(c != null && c.trim()) || !(a != null && a.trim()))
2060
2062
  return;
2061
- const x = new AbortController();
2062
- return Jt({
2063
+ const I = new AbortController();
2064
+ return Wt({
2063
2065
  namespace: c,
2064
- sourceRevision: a,
2065
- transport: Kt({
2066
+ sourceRevision: st(a),
2067
+ transport: qt({
2066
2068
  endpoint: h,
2067
2069
  captureBaseUrl: s
2068
2070
  }),
2069
- signal: x.signal
2070
- }).then((j) => {
2071
- !x.signal.aborted && j.status === "accepted" && F(j.artifact);
2072
- }), () => x.abort();
2071
+ signal: I.signal
2072
+ }).then((B) => {
2073
+ !I.signal.aborted && B.status === "accepted" && F(B.artifact);
2074
+ }), () => I.abort();
2073
2075
  }, [
2074
2076
  h,
2075
2077
  c,
2076
2078
  a,
2077
2079
  s,
2078
- A
2080
+ C
2079
2081
  ]), ee(() => {
2080
- let x = !0;
2081
- if (!T)
2082
+ let I = !0;
2083
+ if (!M)
2082
2084
  return Y(void 0), S(!0), () => {
2083
- x = !1;
2085
+ I = !1;
2084
2086
  };
2085
- const j = new AbortController();
2086
- return S(!1), Y(void 0), V(null), _e({
2087
- endpoint: M,
2088
- signal: j.signal,
2089
- pages: K.pages.map((k) => ({
2087
+ const B = new AbortController();
2088
+ return S(!1), Y(void 0), L(null), _e({
2089
+ endpoint: $,
2090
+ signal: B.signal,
2091
+ pages: H.pages.map((k) => ({
2090
2092
  ...k,
2091
2093
  id: k.importPageId ?? k.id,
2092
2094
  importKind: k.importKind
2093
2095
  })),
2094
2096
  assets: (n == null ? void 0 : n.getAssets("screens")) ?? []
2095
2097
  }).then((k) => {
2096
- x && (Y(k.baselineEnvironment), V(k.graph));
2098
+ I && (Y(k.baselineEnvironment), L(k.graph));
2097
2099
  }).catch(() => {
2098
- x && (Y(void 0), V(null));
2100
+ I && (Y(void 0), L(null));
2099
2101
  }).finally(() => {
2100
- x && S(!0);
2102
+ I && S(!0);
2101
2103
  }), () => {
2102
- x = !1, j.abort(), Y(void 0), V(null);
2104
+ I = !1, B.abort(), Y(void 0), L(null);
2103
2105
  };
2104
2106
  }, [
2105
2107
  n,
2106
2108
  r,
2107
- T,
2108
- M
2109
+ M,
2110
+ $
2109
2111
  ]), ee(() => {
2110
- b == null || b === K.previewOpen || (b ? K.openPreview({ notifyHost: !1 }) : K.closePreview({ notifyHost: !1 }));
2111
- }, [b]), A ? /* @__PURE__ */ w(it, {}) : /* @__PURE__ */ w(
2112
+ b == null || b === H.previewOpen || (b ? H.openPreview({ notifyHost: !1 }) : H.closePreview({ notifyHost: !1 }));
2113
+ }, [b]), C ? /* @__PURE__ */ w(at, {}) : /* @__PURE__ */ w(
2112
2114
  "div",
2113
2115
  {
2114
2116
  "data-pygmalion-storyboard-loading": "",
@@ -2127,59 +2129,59 @@ function Rn({
2127
2129
  );
2128
2130
  }
2129
2131
  export {
2130
- $n as DESIGN_IMPORT_KINDS,
2131
- wn as PygmalionCatalogDocument,
2132
- Sn as PygmalionCatalogMatrix,
2133
- bn as PygmalionCatalogSection,
2134
- Rn as PygmalionEditor,
2135
- st as STORYBOARD_ENVIRONMENT_CONTROL,
2136
- Mn as STORYBOARD_ENVIRONMENT_QUERY,
2137
- Pn as __debug,
2138
- Tn as applyTokenOverride,
2139
- Jt as bootstrapPreviewArtifact,
2140
- Dn as clearPygmalionPreviewCache,
2141
- In as createDesignComponentCatalog,
2142
- en as createDesignComponentVariantMatrix,
2143
- vn as createDesignGalleryCatalog,
2144
- kn as createDesignImportController,
2145
- zn as createDesignScreenCollection,
2146
- Kt as createPreviewArtifactHttpTransport,
2147
- gn as createPreviewCacheNamespace,
2148
- Ht as createPreviewRecipeFingerprint,
2149
- yn as createStoryboardCaptureRecipeIdentity,
2150
- yt as createStoryboardGraph,
2151
- Mt as createStoryboardGraphFromDiscovery,
2152
- _n as createStoryboardGraphViewModel,
2153
- Fn as createStoryboardRouteUrl,
2154
- Xt as designCatalogKey,
2155
- je as designCatalogRegistryName,
2132
+ Mn as DESIGN_IMPORT_KINDS,
2133
+ bn as PygmalionCatalogDocument,
2134
+ vn as PygmalionCatalogMatrix,
2135
+ Sn as PygmalionCatalogSection,
2136
+ An as PygmalionEditor,
2137
+ it as STORYBOARD_ENVIRONMENT_CONTROL,
2138
+ Tn as STORYBOARD_ENVIRONMENT_QUERY,
2139
+ En as __debug,
2140
+ Dn as applyTokenOverride,
2141
+ Wt as bootstrapPreviewArtifact,
2142
+ kn as clearPygmalionPreviewCache,
2143
+ xn as createDesignComponentCatalog,
2144
+ tn as createDesignComponentVariantMatrix,
2145
+ In as createDesignGalleryCatalog,
2146
+ zn as createDesignImportController,
2147
+ _n as createDesignScreenCollection,
2148
+ qt as createPreviewArtifactHttpTransport,
2149
+ yn as createPreviewCacheNamespace,
2150
+ Kt as createPreviewRecipeFingerprint,
2151
+ wn as createStoryboardCaptureRecipeIdentity,
2152
+ wt as createStoryboardGraph,
2153
+ Tt as createStoryboardGraphFromDiscovery,
2154
+ Fn as createStoryboardGraphViewModel,
2155
+ Bn as createStoryboardRouteUrl,
2156
+ Yt as designCatalogKey,
2157
+ Be as designCatalogRegistryName,
2156
2158
  jn as expandDesignScreenCasesViewports,
2157
- Bn as expandDesignScreenCollectionViewports,
2158
- Un as getRecommendedPygmalionPreviewConcurrency,
2159
+ Un as expandDesignScreenCollectionViewports,
2160
+ Hn as getRecommendedPygmalionPreviewConcurrency,
2159
2161
  et as getStoryboardBaselineEnvironment,
2160
2162
  ze as getStoryboardDiscoveryBaselineEnvironment,
2161
- Hn as getStoryboardGraph,
2163
+ Kn as getStoryboardGraph,
2162
2164
  _e as loadStoryboardDiscovery,
2163
- Kn as mergeScreenPresets,
2165
+ qn as mergeScreenPresets,
2164
2166
  He as mergeStoryboardEnvironment,
2165
- mn as publishStoryboardDiscovery,
2166
- En as pygmalionNavigate,
2167
+ gn as publishStoryboardDiscovery,
2168
+ Rn as pygmalionNavigate,
2167
2169
  Nn as pygmalionOpenPreview,
2168
2170
  Cn as pygmalionResetCurrentEdits,
2169
- qn as reconstructRoutePreviewArtifactScreenshotV3,
2170
- Gn as reconstructRoutePreviewArtifactSnapshotV3,
2171
- Ln as resetTokenOverrides,
2172
- xt as resolveStoryboardScreenCases,
2171
+ Gn as reconstructRoutePreviewArtifactScreenshotV3,
2172
+ Ln as reconstructRoutePreviewArtifactSnapshotV3,
2173
+ Vn as resetTokenOverrides,
2174
+ Pt as resolveStoryboardScreenCases,
2173
2175
  Je as setComponentRegistry,
2174
2176
  Qe as setPygmalionAppOrigin,
2175
2177
  tt as setPygmalionPreviewConcurrency,
2176
2178
  Xe as setPygmalionPreviewRevision,
2177
2179
  Y as setStoryboardBaselineEnvironment,
2178
- V as setStoryboardGraph,
2180
+ L as setStoryboardGraph,
2179
2181
  We as setTokens,
2180
- ht as storyboardScreenRecipeKey,
2181
- Vn as subscribeStoryboardGraph,
2182
- xn as usePygmalionProject,
2183
- Vt as validatePreviewArtifactBundle,
2182
+ mt as storyboardScreenRecipeKey,
2183
+ Jn as subscribeStoryboardGraph,
2184
+ Pn as usePygmalionProject,
2185
+ Jt as validatePreviewArtifactBundle,
2184
2186
  Ke as validateRoutePreviewArtifactV3Browser
2185
2187
  };