@pygmalionjs/pygmalion 0.5.17 → 0.5.18
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-lib/pygmalion.js +482 -478
- package/dist-lib/types/editor/routePreview.d.ts +1 -0
- package/package.json +1 -1
package/dist-lib/pygmalion.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
var Kf = Object.defineProperty;
|
|
2
2
|
var Uf = (e, t, n) => t in e ? Kf(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
-
var
|
|
3
|
+
var dn = (e, t, n) => Uf(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import { jsx as s, jsxs as g, Fragment as Ue } from "react/jsx-runtime";
|
|
5
|
-
import { R as ti, u as qf, c as fa, b as Kc, g as Ze, d as Yf, m as Lt, e as f, f as
|
|
5
|
+
import { R as ti, u as qf, c as fa, b as Kc, g as Ze, d as Yf, m as Lt, e as f, f as Gt, r as hn, h as ys, i as Xn, j as ha, k as xn, l as Uc, n as mr, p as Gf, o as Kn, q as We, t as Xf, v as Jf, w as Qf, x as Zf, y as eh, z as th, A as nh, B as vs, C as rh, D as oh, E as ih, G as sh, H as ah, I as lh, S as ch, J as dh, K as uh, L as fh, M as hh, O as ph, P as mh, Q as gh, T as bh, U as qc, V as xh, W as wl, X as yh, Y as Yc, Z as vh, _ as wh, $ as Sh, a0 as Nh, a1 as Ih, a2 as Ch, a3 as Gc, a4 as $h, a5 as Ph, a6 as X, a7 as Sl, a8 as Nl, a9 as Mh, aa as Qi, ab as Eh, ac as Vo, ad as ws, ae as kh, af as Xc, ag as Ah, ah as Rh, ai as Th, aj as Fh, s as Lh, ak as Jc, al as Qc, am as Ss, an as Zc, ao as Dh, ap as zh, aq as Il, ar as _h, as as Oh, at as Cl, au as Bh, av as jh, aw as Wh, ax as Hh, ay as Vh, az as Kh, aA as Uh, aB as qh, aC as Yh, aD as Gh, aE as Xh, aF as Jh, a as Qh, aG as Zh, aH as ep, aI as tp, aJ as np, aK as rp, aL as op, aM as ip, aN as sp, aO as ap, aP as lp, aQ as cp, aR as dp, aS as Lr, aT as $l, aU as up, aV as fp, aW as hp, aX as pp, aY as Pl } from "./FrozenRoutePreview-CZOpvN6z.js";
|
|
6
6
|
import { aZ as m0, a_ as g0, a$ as b0, b0 as x0, b1 as y0, b2 as v0, b3 as w0, b4 as S0, b5 as N0, b6 as I0, b7 as C0, b8 as $0, b9 as P0, ba as M0, bb as E0 } from "./FrozenRoutePreview-CZOpvN6z.js";
|
|
7
|
-
import { useRef as Ie, useLayoutEffect as ni, useSyncExternalStore as Qe, useCallback as
|
|
7
|
+
import { useRef as Ie, useLayoutEffect as ni, useSyncExternalStore as Qe, useCallback as St, useReducer as ed, useEffect as se, memo as td, createElement as to, useState as Y, useMemo as Ft } from "react";
|
|
8
8
|
import { createPortal as mp } from "react-dom";
|
|
9
9
|
const pa = {
|
|
10
10
|
fullEnter: 0.75,
|
|
@@ -263,7 +263,7 @@ const Ap = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
263
263
|
getFrameTier: od,
|
|
264
264
|
subscribeFrameBitmapScale: ad,
|
|
265
265
|
subscribeFrameLod: ma
|
|
266
|
-
}, Symbol.toStringTag, { value: "Module" })), cd = /^sha256-[a-f0-9]{64}$/, Rp = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]),
|
|
266
|
+
}, Symbol.toStringTag, { value: "Module" })), cd = /^sha256-[a-f0-9]{64}$/, Rp = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]), fn = {
|
|
267
267
|
bundleBytes: 128 * 1024 * 1024,
|
|
268
268
|
snapshotBytes: 8 * 1024 * 1024,
|
|
269
269
|
bodyBytes: 8 * 1024 * 1024,
|
|
@@ -290,7 +290,7 @@ function Tp(e) {
|
|
|
290
290
|
}
|
|
291
291
|
}
|
|
292
292
|
function Zi(e) {
|
|
293
|
-
return typeof e == "string" && e.length > 0 && e.length <=
|
|
293
|
+
return typeof e == "string" && e.length > 0 && e.length <= fn.identifierLength && e === e.trim() && !Rp.has(e);
|
|
294
294
|
}
|
|
295
295
|
function Fp(e) {
|
|
296
296
|
const t = /(?:expression\s*\(|-moz-binding\s*:|(?:^|[;{])\s*behavior\s*:)/i;
|
|
@@ -303,14 +303,14 @@ function Fp(e) {
|
|
|
303
303
|
return !1;
|
|
304
304
|
}
|
|
305
305
|
function Lp(e) {
|
|
306
|
-
return typeof e != "string" || e.length === 0 ? "snapshot must be a non-empty string" : $i(e) >
|
|
306
|
+
return typeof e != "string" || e.length === 0 ? "snapshot must be a non-empty string" : $i(e) > fn.snapshotBytes ? "snapshot exceeds the byte limit" : /<\s*(?:script|iframe|object|embed|applet|portal)\b/i.test(e) ? "snapshot contains an active element" : /<\s*meta\b[^>]*http-equiv\s*=\s*["']?\s*refresh\b/i.test(e) ? "snapshot contains a refresh directive" : /\s(?:on[a-z][\w:-]*|srcdoc)\s*=/i.test(e) ? "snapshot contains an active attribute" : /\s(?:href|src|action|formaction|xlink:href)\s*=\s*(?:"\s*|'?\s*)(?:javascript|vbscript|data\s*:\s*text\/html)\s*:/i.test(
|
|
307
307
|
e
|
|
308
308
|
) ? "snapshot contains an active URL" : Fp(e) ? "snapshot contains an active style expression" : null;
|
|
309
309
|
}
|
|
310
310
|
function Al(e, t, n) {
|
|
311
311
|
if (!_n(e))
|
|
312
312
|
return n.push(`${t} assets must be a record.`), /* @__PURE__ */ new Set();
|
|
313
|
-
const r = /* @__PURE__ */ new Set(), o = t === "head" ?
|
|
313
|
+
const r = /* @__PURE__ */ new Set(), o = t === "head" ? fn.headAssetBytes : fn.stylesheetAssetBytes;
|
|
314
314
|
for (const [i, a] of Object.entries(e)) {
|
|
315
315
|
if (!cd.test(i) || typeof a != "string") {
|
|
316
316
|
n.push(`${t} asset "${i}" is invalid.`);
|
|
@@ -334,7 +334,7 @@ function Pi(e) {
|
|
|
334
334
|
errors: ["Route preview artifact must be a version 2 record."],
|
|
335
335
|
bytes: n
|
|
336
336
|
};
|
|
337
|
-
Zi(e.namespace) || t.push("Artifact namespace is invalid."), e.sourceRevision != null && !Zi(e.sourceRevision) && t.push("Artifact source revision is invalid."), n >
|
|
337
|
+
Zi(e.namespace) || t.push("Artifact namespace is invalid."), e.sourceRevision != null && !Zi(e.sourceRevision) && t.push("Artifact source revision is invalid."), n > fn.bundleBytes && t.push("Artifact exceeds the bundle byte limit.");
|
|
338
338
|
const r = _n(e.assets) ? e.assets : null;
|
|
339
339
|
r || t.push("Artifact assets must be a record.");
|
|
340
340
|
const o = Al(r == null ? void 0 : r.head, "head", t), i = Al(
|
|
@@ -342,10 +342,10 @@ function Pi(e) {
|
|
|
342
342
|
"stylesheet",
|
|
343
343
|
t
|
|
344
344
|
);
|
|
345
|
-
if (o.size + i.size >
|
|
345
|
+
if (o.size + i.size > fn.assetCount && t.push("Artifact has too many shared assets."), !_n(e.frames))
|
|
346
346
|
return t.push("Artifact frames must be a record."), { valid: !1, errors: t, bytes: n };
|
|
347
347
|
const a = Object.entries(e.frames);
|
|
348
|
-
a.length >
|
|
348
|
+
a.length > fn.frameCount && t.push("Artifact has too many frames.");
|
|
349
349
|
const l = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Set();
|
|
350
350
|
for (const [d, u] of a) {
|
|
351
351
|
if (!Zi(d)) {
|
|
@@ -367,11 +367,11 @@ function Pi(e) {
|
|
|
367
367
|
t.push(`Frame "${d}" document metadata is invalid.`);
|
|
368
368
|
continue;
|
|
369
369
|
}
|
|
370
|
-
if (p.doctype && !/^<!doctype\s+[^>]+>$/i.test(p.doctype) && t.push(`Frame "${d}" doctype is invalid.`), typeof u.body != "string" || $i(u.body) >
|
|
370
|
+
if (p.doctype && !/^<!doctype\s+[^>]+>$/i.test(p.doctype) && t.push(`Frame "${d}" doctype is invalid.`), typeof u.body != "string" || $i(u.body) > fn.bodyBytes) {
|
|
371
371
|
t.push(`Frame "${d}" body is invalid.`);
|
|
372
372
|
continue;
|
|
373
373
|
}
|
|
374
|
-
if (!Array.isArray(u.head) || u.head.length >
|
|
374
|
+
if (!Array.isArray(u.head) || u.head.length > fn.headReferencesPerFrame) {
|
|
375
375
|
t.push(`Frame "${d}" head references are invalid.`);
|
|
376
376
|
continue;
|
|
377
377
|
}
|
|
@@ -411,7 +411,7 @@ const fd = /^sha256-[a-f0-9]{64}$/, Dp = /^[A-Za-z][A-Za-z0-9]*(?:[-_.:][A-Za-z0
|
|
|
411
411
|
]), Bp = /* @__PURE__ */ new Set(["interaction", "assertion"]), hd = /* @__PURE__ */ new Set([
|
|
412
412
|
"image/png",
|
|
413
413
|
"image/webp"
|
|
414
|
-
]),
|
|
414
|
+
]), Et = {
|
|
415
415
|
bundleBytes: 256 * 1024 * 1024,
|
|
416
416
|
screenshotAssetBytes: 16 * 1024 * 1024,
|
|
417
417
|
screenshotAssetCount: 2048,
|
|
@@ -434,22 +434,22 @@ function Wp(e) {
|
|
|
434
434
|
return Number.POSITIVE_INFINITY;
|
|
435
435
|
}
|
|
436
436
|
}
|
|
437
|
-
function
|
|
437
|
+
function Mt(e) {
|
|
438
438
|
if (!e || typeof e != "object" || Array.isArray(e)) return !1;
|
|
439
439
|
const t = Object.getPrototypeOf(e);
|
|
440
440
|
return t === Object.prototype || t === null;
|
|
441
441
|
}
|
|
442
442
|
function Eo(e) {
|
|
443
|
-
return typeof e == "string" && e.length > 0 && e.length <=
|
|
443
|
+
return typeof e == "string" && e.length > 0 && e.length <= Et.identifierLength && e === e.trim() && !_p.has(e);
|
|
444
444
|
}
|
|
445
445
|
function pd(e) {
|
|
446
|
-
return
|
|
446
|
+
return Mt(e) && Number.isInteger(e.width) && Number(e.width) > 0 && Number(e.width) <= Et.viewportDimension && Number.isInteger(e.height) && Number(e.height) > 0 && Number(e.height) <= Et.viewportDimension;
|
|
447
447
|
}
|
|
448
448
|
function Hp(e, t) {
|
|
449
449
|
return pd(e) && e.width === t.width && e.height === t.height;
|
|
450
450
|
}
|
|
451
451
|
function Rl(e) {
|
|
452
|
-
return typeof e == "string" && e.length > 0 && e.length <=
|
|
452
|
+
return typeof e == "string" && e.length > 0 && e.length <= Et.tokenLength && Dp.test(e);
|
|
453
453
|
}
|
|
454
454
|
function es(e, t) {
|
|
455
455
|
return e == null || typeof e == "string" && e.length > 0 && e.length <= t && !/[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]/.test(e);
|
|
@@ -461,10 +461,10 @@ function Vp(e) {
|
|
|
461
461
|
return e.length / 4 * 3 - t;
|
|
462
462
|
}
|
|
463
463
|
function md(e) {
|
|
464
|
-
const t =
|
|
464
|
+
const t = Mt(e) ? e : {}, n = Mt(t.frames) ? t.frames : {}, r = {};
|
|
465
465
|
for (const [i, a] of Object.entries(n))
|
|
466
|
-
|
|
467
|
-
const o =
|
|
466
|
+
Mt(a) && a.snapshot !== void 0 && (r[i] = a.snapshot);
|
|
467
|
+
const o = Mt(t.assets) ? t.assets : {};
|
|
468
468
|
return {
|
|
469
469
|
version: 2,
|
|
470
470
|
namespace: t.namespace,
|
|
@@ -477,18 +477,18 @@ function md(e) {
|
|
|
477
477
|
};
|
|
478
478
|
}
|
|
479
479
|
function Kp(e, t) {
|
|
480
|
-
if (!
|
|
480
|
+
if (!Mt(e))
|
|
481
481
|
return t.push("Screenshot assets must be a record."), /* @__PURE__ */ new Map();
|
|
482
482
|
const n = /* @__PURE__ */ new Map();
|
|
483
483
|
for (const [r, o] of Object.entries(e)) {
|
|
484
|
-
if (!fd.test(r) || !
|
|
484
|
+
if (!fd.test(r) || !Mt(o)) {
|
|
485
485
|
t.push(`Screenshot asset "${r}" is invalid.`);
|
|
486
486
|
continue;
|
|
487
487
|
}
|
|
488
488
|
const i = Vp(o.data);
|
|
489
489
|
if (!hd.has(
|
|
490
490
|
o.mediaType
|
|
491
|
-
) || !Number.isInteger(o.width) || Number(o.width) <= 0 || Number(o.width) >
|
|
491
|
+
) || !Number.isInteger(o.width) || Number(o.width) <= 0 || Number(o.width) > Et.viewportDimension || !Number.isInteger(o.height) || Number(o.height) <= 0 || Number(o.height) > Et.viewportDimension || !Number.isInteger(o.byteLength) || Number(o.byteLength) <= 0 || Number(o.byteLength) > Et.screenshotAssetBytes || i !== o.byteLength) {
|
|
492
492
|
t.push(`Screenshot asset "${r}" metadata or data is invalid.`);
|
|
493
493
|
continue;
|
|
494
494
|
}
|
|
@@ -497,44 +497,44 @@ function Kp(e, t) {
|
|
|
497
497
|
o
|
|
498
498
|
);
|
|
499
499
|
}
|
|
500
|
-
return n.size >
|
|
500
|
+
return n.size > Et.screenshotAssetCount && t.push("Artifact has too many screenshot assets."), n;
|
|
501
501
|
}
|
|
502
502
|
function Up(e, t, n, r) {
|
|
503
|
-
if (!
|
|
503
|
+
if (!Mt(e)) {
|
|
504
504
|
r.push(`Frame "${t}" contains an invalid diagnostic.`);
|
|
505
505
|
return;
|
|
506
506
|
}
|
|
507
|
-
Rl(e.stage) || r.push(`Frame "${t}" diagnostic stage is invalid.`), Rl(e.code) || r.push(`Frame "${t}" diagnostic code is invalid.`), es(e.selector,
|
|
507
|
+
Rl(e.stage) || r.push(`Frame "${t}" diagnostic stage is invalid.`), Rl(e.code) || r.push(`Frame "${t}" diagnostic code is invalid.`), es(e.selector, Et.selectorLength) || r.push(`Frame "${t}" diagnostic selector is invalid.`), es(e.label, Et.labelLength) || r.push(`Frame "${t}" diagnostic label is invalid.`), es(e.message, Et.messageLength) || r.push(`Frame "${t}" diagnostic message is invalid.`), Hp(e.viewport, n) || r.push(`Frame "${t}" diagnostic viewport is invalid.`);
|
|
508
508
|
}
|
|
509
509
|
function qp(e) {
|
|
510
510
|
return typeof e == "string" && e.split(/[._:-]/).some((t) => Bp.has(t.toLowerCase()));
|
|
511
511
|
}
|
|
512
512
|
function Mi(e) {
|
|
513
513
|
const t = [], n = Wp(e);
|
|
514
|
-
if (!
|
|
514
|
+
if (!Mt(e) || e.version !== 3)
|
|
515
515
|
return {
|
|
516
516
|
valid: !1,
|
|
517
517
|
errors: ["Route preview artifact must be a version 3 record."],
|
|
518
518
|
bytes: n
|
|
519
519
|
};
|
|
520
|
-
Eo(e.namespace) || t.push("Artifact namespace is invalid."), e.sourceRevision != null && !Eo(e.sourceRevision) && t.push("Artifact source revision is invalid."), n >
|
|
521
|
-
const r =
|
|
520
|
+
Eo(e.namespace) || t.push("Artifact namespace is invalid."), e.sourceRevision != null && !Eo(e.sourceRevision) && t.push("Artifact source revision is invalid."), n > Et.bundleBytes && t.push("Artifact exceeds the bundle byte limit.");
|
|
521
|
+
const r = Mt(e.assets) ? e.assets : null;
|
|
522
522
|
r || t.push("Artifact assets must be a record.");
|
|
523
523
|
const o = Kp(
|
|
524
524
|
r == null ? void 0 : r.screenshots,
|
|
525
525
|
t
|
|
526
526
|
), i = Pi(md(e));
|
|
527
|
-
if (t.push(...i.errors.map((c) => `Snapshot data: ${c}`)), !
|
|
527
|
+
if (t.push(...i.errors.map((c) => `Snapshot data: ${c}`)), !Mt(e.frames))
|
|
528
528
|
return t.push("Artifact frames must be a record."), { valid: !1, errors: t, bytes: n };
|
|
529
529
|
const a = Object.entries(e.frames);
|
|
530
|
-
a.length >
|
|
530
|
+
a.length > Et.frameCount && t.push("Artifact has too many frames.");
|
|
531
531
|
const l = /* @__PURE__ */ new Set();
|
|
532
532
|
for (const [c, d] of a) {
|
|
533
533
|
if (!Eo(c)) {
|
|
534
534
|
t.push(`Frame identifier "${c}" is invalid.`);
|
|
535
535
|
continue;
|
|
536
536
|
}
|
|
537
|
-
if (!
|
|
537
|
+
if (!Mt(d) || !Op.has(d.status) || !pd(d.viewport)) {
|
|
538
538
|
t.push(`Frame "${c}" status or viewport is invalid.`);
|
|
539
539
|
continue;
|
|
540
540
|
}
|
|
@@ -543,7 +543,7 @@ function Mi(e) {
|
|
|
543
543
|
continue;
|
|
544
544
|
}
|
|
545
545
|
const u = d.diagnostics;
|
|
546
|
-
if (!Array.isArray(u) || u.length >
|
|
546
|
+
if (!Array.isArray(u) || u.length > Et.diagnosticCountPerFrame) {
|
|
547
547
|
t.push(`Frame "${c}" diagnostics are invalid.`);
|
|
548
548
|
continue;
|
|
549
549
|
}
|
|
@@ -552,7 +552,7 @@ function Mi(e) {
|
|
|
552
552
|
let p = !1;
|
|
553
553
|
if (d.screenshot !== void 0) {
|
|
554
554
|
const b = d.screenshot;
|
|
555
|
-
if (!
|
|
555
|
+
if (!Mt(b) || typeof b.hash != "string" || !fd.test(b.hash) || !hd.has(
|
|
556
556
|
b.mediaType
|
|
557
557
|
) || !Number.isInteger(b.width) || !Number.isInteger(b.height))
|
|
558
558
|
t.push(`Frame "${c}" screenshot reference is invalid.`);
|
|
@@ -565,7 +565,7 @@ function Mi(e) {
|
|
|
565
565
|
}
|
|
566
566
|
const m = d.snapshot !== void 0;
|
|
567
567
|
d.status === "ready" ? ((!m || !p) && t.push(`Frame "${c}" ready output is incomplete.`), u.length !== 0 && t.push(`Frame "${c}" ready output cannot contain diagnostics.`)) : d.status === "rendered-with-qa-failure" ? ((!m || !p) && t.push(`Frame "${c}" QA failure must preserve stable output.`), (u.length === 0 || !u.some(
|
|
568
|
-
(b) =>
|
|
568
|
+
(b) => Mt(b) ? qp(b.stage) : !1
|
|
569
569
|
)) && t.push(`Frame "${c}" QA failure requires a QA diagnostic.`)) : u.length === 0 && t.push(`Frame "${c}" capture error requires a diagnostic.`);
|
|
570
570
|
}
|
|
571
571
|
for (const c of o.keys())
|
|
@@ -622,10 +622,10 @@ function ba(e = {}) {
|
|
|
622
622
|
);
|
|
623
623
|
}
|
|
624
624
|
let vd = ba(), Kr = 0, Fl = 0, Uo = 0, ns = !1;
|
|
625
|
-
const
|
|
625
|
+
const Bt = [], mt = /* @__PURE__ */ new Map(), Ut = /* @__PURE__ */ new Map(), br = /* @__PURE__ */ new Set(), Vt = /* @__PURE__ */ new Map(), xr = /* @__PURE__ */ new Map(), bt = /* @__PURE__ */ new Map(), wd = /* @__PURE__ */ new Map(), xa = /* @__PURE__ */ new Map(), Ll = /* @__PURE__ */ new WeakMap(), On = /* @__PURE__ */ new Map(), ko = /* @__PURE__ */ new Map();
|
|
626
626
|
let Ao = 0, nm = 0, rs = !1;
|
|
627
627
|
const qo = [], oi = /* @__PURE__ */ new Map();
|
|
628
|
-
let
|
|
628
|
+
let Kt = 0, rn = 0, dr = bd, Is, Ur = null;
|
|
629
629
|
const qr = /* @__PURE__ */ new Map(), dt = /* @__PURE__ */ new Set(), ii = /* @__PURE__ */ new Set();
|
|
630
630
|
let ya = 0, va = 0;
|
|
631
631
|
const si = /* @__PURE__ */ new Set(), ai = /* @__PURE__ */ new Map(), wa = /* @__PURE__ */ new Map();
|
|
@@ -656,7 +656,7 @@ function As(e) {
|
|
|
656
656
|
function hr(e, t) {
|
|
657
657
|
e.set(t, (e.get(t) ?? 0) + 1);
|
|
658
658
|
}
|
|
659
|
-
function
|
|
659
|
+
function mn(e) {
|
|
660
660
|
if (ur > 0) {
|
|
661
661
|
e == null ? Ps = !0 : $s.add(e);
|
|
662
662
|
return;
|
|
@@ -693,7 +693,7 @@ function vr() {
|
|
|
693
693
|
hr(Na, i), fr(ci, i);
|
|
694
694
|
for (const i of [...si]) i();
|
|
695
695
|
}
|
|
696
|
-
if (r)
|
|
696
|
+
if (r) mn();
|
|
697
697
|
else if (o.length > 0) {
|
|
698
698
|
ya += 1;
|
|
699
699
|
for (const i of o)
|
|
@@ -744,14 +744,14 @@ function Ls() {
|
|
|
744
744
|
return Kr;
|
|
745
745
|
}
|
|
746
746
|
function Jn(e) {
|
|
747
|
-
return mt.has(e) || bt.has(e) ||
|
|
747
|
+
return mt.has(e) || bt.has(e) || Ut.has(e);
|
|
748
748
|
}
|
|
749
749
|
function Ei(e) {
|
|
750
750
|
var t;
|
|
751
|
-
return Jn(e) && ((t =
|
|
751
|
+
return Jn(e) && ((t = Vt.get(e)) == null ? void 0 : t.stale) !== !0;
|
|
752
752
|
}
|
|
753
753
|
function $a(e) {
|
|
754
|
-
return
|
|
754
|
+
return Vt.get(e) ?? null;
|
|
755
755
|
}
|
|
756
756
|
function Ds() {
|
|
757
757
|
return va;
|
|
@@ -774,7 +774,7 @@ function rm(e, t) {
|
|
|
774
774
|
dataUrl: `data:${r.mediaType};base64,${r.data}`
|
|
775
775
|
};
|
|
776
776
|
}
|
|
777
|
-
function
|
|
777
|
+
function gn(e, t) {
|
|
778
778
|
const n = e.trim();
|
|
779
779
|
return n ? xr.get(
|
|
780
780
|
Ir({
|
|
@@ -796,7 +796,7 @@ function zs(e, t) {
|
|
|
796
796
|
}
|
|
797
797
|
return n;
|
|
798
798
|
}
|
|
799
|
-
function
|
|
799
|
+
function vt(e, t) {
|
|
800
800
|
const n = zs(e, t);
|
|
801
801
|
if (n.length !== 0) {
|
|
802
802
|
yr();
|
|
@@ -808,7 +808,7 @@ function yt(e, t) {
|
|
|
808
808
|
}
|
|
809
809
|
}
|
|
810
810
|
function _s(e) {
|
|
811
|
-
return mt.has(e) || bt.has(e) ||
|
|
811
|
+
return mt.has(e) || bt.has(e) || Ut.has(e) || dt.has(e);
|
|
812
812
|
}
|
|
813
813
|
function Cr(e) {
|
|
814
814
|
const t = e == null ? void 0 : e.trim();
|
|
@@ -829,10 +829,10 @@ function Os(e, t = /* @__PURE__ */ new Set()) {
|
|
|
829
829
|
return t.delete(e), n;
|
|
830
830
|
}
|
|
831
831
|
let Pa = null, kd = !1;
|
|
832
|
-
const
|
|
832
|
+
const pn = /* @__PURE__ */ new Map();
|
|
833
833
|
let Un = 0;
|
|
834
834
|
function Bs(e) {
|
|
835
|
-
Un += 1, Pa = e,
|
|
835
|
+
Un += 1, Pa = e, pn.clear(), !e && xr.size > 0 && (xr.clear(), nn());
|
|
836
836
|
}
|
|
837
837
|
function Ad(e) {
|
|
838
838
|
kd = e;
|
|
@@ -860,12 +860,12 @@ function js(e, t, n = {}) {
|
|
|
860
860
|
const i = {
|
|
861
861
|
id: r,
|
|
862
862
|
...t ? { fingerprint: t } : {}
|
|
863
|
-
}, a = Ir(i), l =
|
|
863
|
+
}, a = Ir(i), l = pn.get(a);
|
|
864
864
|
if (l) return l;
|
|
865
|
-
const c =
|
|
865
|
+
const c = gn(r, t);
|
|
866
866
|
if (c.status === "exact" || c.status === "error" && !n.retry)
|
|
867
867
|
return Promise.resolve(c);
|
|
868
|
-
|
|
868
|
+
vt([i], { status: "generating" });
|
|
869
869
|
const d = Un;
|
|
870
870
|
let u;
|
|
871
871
|
try {
|
|
@@ -876,31 +876,31 @@ function js(e, t, n = {}) {
|
|
|
876
876
|
const p = Promise.resolve(u).then(
|
|
877
877
|
(m) => {
|
|
878
878
|
if (d !== Un)
|
|
879
|
-
return
|
|
879
|
+
return gn(r, t);
|
|
880
880
|
const b = (m == null ? void 0 : m.status) === "accepted" ? { status: "exact" } : (m == null ? void 0 : m.status) === "rejected" ? {
|
|
881
881
|
status: "error",
|
|
882
882
|
reason: "rejected",
|
|
883
883
|
message: m.message
|
|
884
884
|
} : {
|
|
885
885
|
status: "error",
|
|
886
|
-
reason: "unavailable",
|
|
886
|
+
reason: (m == null ? void 0 : m.status) === "unavailable" && m.notPrepared ? "not-prepared" : "unavailable",
|
|
887
887
|
message: ((m == null ? void 0 : m.status) === "unavailable" ? m.message : void 0) ?? "The exact preview endpoint returned no current capture."
|
|
888
888
|
};
|
|
889
|
-
return
|
|
889
|
+
return vt([i], b), b;
|
|
890
890
|
},
|
|
891
891
|
(m) => {
|
|
892
892
|
if (d !== Un)
|
|
893
|
-
return
|
|
893
|
+
return gn(r, t);
|
|
894
894
|
const x = {
|
|
895
895
|
status: "error",
|
|
896
896
|
reason: (m == null ? void 0 : m.pygmalionNotPrepared) === !0 ? "not-prepared" : "unavailable",
|
|
897
897
|
message: m instanceof Error && m.message ? m.message : "The exact preview request failed."
|
|
898
898
|
};
|
|
899
|
-
return
|
|
899
|
+
return vt([i], x), x;
|
|
900
900
|
}
|
|
901
901
|
);
|
|
902
|
-
return
|
|
903
|
-
|
|
902
|
+
return pn.set(a, p), p.finally(() => {
|
|
903
|
+
pn.get(a) === p && pn.delete(a);
|
|
904
904
|
}), p;
|
|
905
905
|
}
|
|
906
906
|
function Fd(e, t = {}) {
|
|
@@ -914,15 +914,15 @@ function Fd(e, t = {}) {
|
|
|
914
914
|
id: u,
|
|
915
915
|
...d.fingerprint ? { fingerprint: d.fingerprint } : {}
|
|
916
916
|
}, m = Ir(p);
|
|
917
|
-
if (i.has(m) ||
|
|
918
|
-
const b =
|
|
917
|
+
if (i.has(m) || pn.has(m)) continue;
|
|
918
|
+
const b = gn(
|
|
919
919
|
u,
|
|
920
920
|
d.fingerprint
|
|
921
921
|
);
|
|
922
922
|
b.status === "exact" || b.status === "generating" || b.status === "error" && !t.retry || (i.add(m), r.push(p), o.push(m));
|
|
923
923
|
}
|
|
924
924
|
if (r.length === 0) return null;
|
|
925
|
-
|
|
925
|
+
vt(r, { status: "generating" });
|
|
926
926
|
const a = Un;
|
|
927
927
|
let l;
|
|
928
928
|
try {
|
|
@@ -943,7 +943,7 @@ function Fd(e, t = {}) {
|
|
|
943
943
|
reason: "unavailable",
|
|
944
944
|
message: ((d == null ? void 0 : d.status) === "unavailable" ? d.message : void 0) ?? "The exact preview endpoint returned no current capture."
|
|
945
945
|
};
|
|
946
|
-
return
|
|
946
|
+
return vt(r, u), u;
|
|
947
947
|
},
|
|
948
948
|
(d) => {
|
|
949
949
|
if (a !== Un)
|
|
@@ -953,14 +953,14 @@ function Fd(e, t = {}) {
|
|
|
953
953
|
reason: "unavailable",
|
|
954
954
|
message: d instanceof Error && d.message ? d.message : "The exact preview request failed."
|
|
955
955
|
};
|
|
956
|
-
return
|
|
956
|
+
return vt(r, u), u;
|
|
957
957
|
}
|
|
958
958
|
);
|
|
959
959
|
for (const d of o)
|
|
960
|
-
|
|
960
|
+
pn.set(d, c);
|
|
961
961
|
return c.finally(() => {
|
|
962
962
|
for (const d of o)
|
|
963
|
-
|
|
963
|
+
pn.get(d) === c && pn.delete(d);
|
|
964
964
|
}), c;
|
|
965
965
|
}
|
|
966
966
|
function ki(e) {
|
|
@@ -1068,10 +1068,10 @@ function Ma(e) {
|
|
|
1068
1068
|
function di(e) {
|
|
1069
1069
|
const t = bt.get(e);
|
|
1070
1070
|
if (!t) return !1;
|
|
1071
|
-
bt.delete(e),
|
|
1071
|
+
bt.delete(e), Kt = Math.max(0, Kt - t.ownBytes);
|
|
1072
1072
|
for (const n of t.head) {
|
|
1073
1073
|
const r = Ma(n.kind), o = r.get(n.key);
|
|
1074
|
-
o && (o.references -= 1, !(o.references > 0) && (r.delete(n.key),
|
|
1074
|
+
o && (o.references -= 1, !(o.references > 0) && (r.delete(n.key), Kt = Math.max(0, Kt - o.bytes)));
|
|
1075
1075
|
}
|
|
1076
1076
|
return !0;
|
|
1077
1077
|
}
|
|
@@ -1117,7 +1117,7 @@ function cm(e, t, n, r) {
|
|
|
1117
1117
|
p.references += 1;
|
|
1118
1118
|
else {
|
|
1119
1119
|
const m = c.length * 2;
|
|
1120
|
-
d.set(u, { content: c, bytes: m, references: 1 }),
|
|
1120
|
+
d.set(u, { content: c, bytes: m, references: 1 }), Kt += m;
|
|
1121
1121
|
}
|
|
1122
1122
|
return { kind: l, key: u };
|
|
1123
1123
|
}), a = (o.body.length + o.document.doctype.length + o.document.htmlAttributes.length + o.document.headAttributes.length + o.document.bodyAttributes.length + i.reduce((l, c) => l + c.key.length, 0)) * 2;
|
|
@@ -1129,7 +1129,7 @@ function cm(e, t, n, r) {
|
|
|
1129
1129
|
head: i,
|
|
1130
1130
|
body: o.body,
|
|
1131
1131
|
shadow: null
|
|
1132
|
-
}),
|
|
1132
|
+
}), Kt += a, !0;
|
|
1133
1133
|
}
|
|
1134
1134
|
function dm(e, t) {
|
|
1135
1135
|
let n = Ll.get(e);
|
|
@@ -1193,7 +1193,7 @@ function um(e) {
|
|
|
1193
1193
|
}, e.shadow;
|
|
1194
1194
|
}
|
|
1195
1195
|
function jn(e) {
|
|
1196
|
-
const t =
|
|
1196
|
+
const t = Ut.get(e);
|
|
1197
1197
|
if (t) return um(t);
|
|
1198
1198
|
const n = bt.get(e);
|
|
1199
1199
|
return n ? (bt.delete(e), n.lastAccess = Date.now(), bt.set(e, n), lm(n)) : null;
|
|
@@ -1220,7 +1220,7 @@ function Ws(e, t) {
|
|
|
1220
1220
|
...x.fingerprint ? { fingerprint: x.fingerprint } : {}
|
|
1221
1221
|
};
|
|
1222
1222
|
if (w) {
|
|
1223
|
-
if (
|
|
1223
|
+
if (gn(v.id, v.fingerprint).status === "idle")
|
|
1224
1224
|
for (const S of zs([v], {
|
|
1225
1225
|
status: "outdated",
|
|
1226
1226
|
message: "Select this frame to generate the exact preview."
|
|
@@ -1274,7 +1274,7 @@ function Ws(e, t) {
|
|
|
1274
1274
|
const R = e.frames[w];
|
|
1275
1275
|
if (!R) continue;
|
|
1276
1276
|
const H = x.fingerprint != null && R.fingerprint === x.fingerprint, A = c && !(t.allowMatchingFrameIdentity && H) || x.fingerprint != null && !H;
|
|
1277
|
-
if (
|
|
1277
|
+
if (Vt.set(v, {
|
|
1278
1278
|
status: R.status,
|
|
1279
1279
|
diagnostics: R.diagnostics,
|
|
1280
1280
|
...A ? { stale: !0 } : {},
|
|
@@ -1284,34 +1284,34 @@ function Ws(e, t) {
|
|
|
1284
1284
|
)
|
|
1285
1285
|
}), dt.add(v), R.snapshot && m) {
|
|
1286
1286
|
const N = os(t.appOrigin, x.route);
|
|
1287
|
-
br.delete(v),
|
|
1287
|
+
br.delete(v), Ut.set(v, {
|
|
1288
1288
|
bundle: m,
|
|
1289
1289
|
frameId: w,
|
|
1290
1290
|
previewBase: N,
|
|
1291
1291
|
shadow: null
|
|
1292
1292
|
});
|
|
1293
1293
|
}
|
|
1294
|
-
nn({ key: v }),
|
|
1294
|
+
nn({ key: v }), mn(v), d(x, A), u += 1;
|
|
1295
1295
|
continue;
|
|
1296
1296
|
}
|
|
1297
|
-
if (Jn(v) && ((b =
|
|
1297
|
+
if (Jn(v) && ((b = Vt.get(v)) == null ? void 0 : b.stale) !== !0) {
|
|
1298
1298
|
d(x, !1);
|
|
1299
1299
|
continue;
|
|
1300
1300
|
}
|
|
1301
1301
|
if (e.version === 2) {
|
|
1302
1302
|
if (!e.frames[w]) continue;
|
|
1303
1303
|
const H = os(t.appOrigin, x.route);
|
|
1304
|
-
br.delete(v),
|
|
1304
|
+
br.delete(v), Ut.set(v, {
|
|
1305
1305
|
bundle: e,
|
|
1306
1306
|
frameId: w,
|
|
1307
1307
|
previewBase: H,
|
|
1308
1308
|
shadow: null
|
|
1309
|
-
}),
|
|
1309
|
+
}), Vt.set(v, {
|
|
1310
1310
|
status: "ready",
|
|
1311
1311
|
diagnostics: [],
|
|
1312
1312
|
...c ? { stale: !0 } : {},
|
|
1313
1313
|
screenshot: null
|
|
1314
|
-
}), dt.add(v), nn({ key: v }),
|
|
1314
|
+
}), dt.add(v), nn({ key: v }), mn(v), d(x, c), u += 1;
|
|
1315
1315
|
continue;
|
|
1316
1316
|
}
|
|
1317
1317
|
const S = e.snapshots[w];
|
|
@@ -1329,7 +1329,7 @@ function Ws(e, t) {
|
|
|
1329
1329
|
}
|
|
1330
1330
|
$ = $.replaceAll("__PYGMALION_PREVIEW_BASE__", R);
|
|
1331
1331
|
}
|
|
1332
|
-
Ti(v, $) ? (
|
|
1332
|
+
Ti(v, $) ? (Vt.set(v, {
|
|
1333
1333
|
status: "ready",
|
|
1334
1334
|
diagnostics: [],
|
|
1335
1335
|
...c ? { stale: !0 } : {},
|
|
@@ -1395,9 +1395,9 @@ async function fm() {
|
|
|
1395
1395
|
}
|
|
1396
1396
|
class hm {
|
|
1397
1397
|
constructor(t) {
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1398
|
+
dn(this, "pruneScheduled", !1);
|
|
1399
|
+
dn(this, "pruneInFlight", null);
|
|
1400
|
+
dn(this, "database");
|
|
1401
1401
|
this.database = t;
|
|
1402
1402
|
}
|
|
1403
1403
|
async read(t) {
|
|
@@ -1521,21 +1521,21 @@ function Qr() {
|
|
|
1521
1521
|
}
|
|
1522
1522
|
function mm() {
|
|
1523
1523
|
var e;
|
|
1524
|
-
for (let t =
|
|
1525
|
-
(e =
|
|
1524
|
+
for (let t = Bt.length - 1; t >= 0; t -= 1)
|
|
1525
|
+
(e = Bt[t]) != null && e.cancelled && Bt.splice(t, 1);
|
|
1526
1526
|
}
|
|
1527
1527
|
function gm() {
|
|
1528
|
-
if (mm(),
|
|
1528
|
+
if (mm(), Bt.length === 0) return null;
|
|
1529
1529
|
let e = 0, t = 0;
|
|
1530
|
-
for (let o = 1; o <
|
|
1531
|
-
const i =
|
|
1530
|
+
for (let o = 1; o < Bt.length; o += 1) {
|
|
1531
|
+
const i = Bt[o], a = Bt[e], l = Bt[t];
|
|
1532
1532
|
i.order < a.order && (e = o), (i.priority < l.priority || i.priority === l.priority && i.order < l.order) && (t = o);
|
|
1533
1533
|
}
|
|
1534
1534
|
const r = t !== e && Uo >= Yp ? e : t;
|
|
1535
|
-
return r === e ? Uo = 0 : Uo += 1,
|
|
1535
|
+
return r === e ? Uo = 0 : Uo += 1, Bt.splice(r, 1)[0] ?? null;
|
|
1536
1536
|
}
|
|
1537
1537
|
function bm() {
|
|
1538
|
-
for (; Kr < vd &&
|
|
1538
|
+
for (; Kr < vd && Bt.length > 0; ) {
|
|
1539
1539
|
const e = gm();
|
|
1540
1540
|
if (!e) break;
|
|
1541
1541
|
Kr += 1, Dl();
|
|
@@ -1545,7 +1545,7 @@ function bm() {
|
|
|
1545
1545
|
};
|
|
1546
1546
|
e.release = n, e.resolve(n);
|
|
1547
1547
|
}
|
|
1548
|
-
|
|
1548
|
+
Bt.length === 0 && (Uo = 0);
|
|
1549
1549
|
}
|
|
1550
1550
|
function Od(e = 0) {
|
|
1551
1551
|
let t;
|
|
@@ -1557,7 +1557,7 @@ function Od(e = 0) {
|
|
|
1557
1557
|
priority: Number.isFinite(e) ? e : 0,
|
|
1558
1558
|
release: null,
|
|
1559
1559
|
resolve: r
|
|
1560
|
-
}, Fl += 1,
|
|
1560
|
+
}, Fl += 1, Bt.push(t), Qr();
|
|
1561
1561
|
}),
|
|
1562
1562
|
updatePriority: (r) => {
|
|
1563
1563
|
if (t.cancelled || t.release) return;
|
|
@@ -1574,7 +1574,7 @@ function Bd(e) {
|
|
|
1574
1574
|
const t = Number.isFinite(e) ? Math.floor(e) : ba();
|
|
1575
1575
|
vd = Math.min(gd, Math.max(1, t)), Qr();
|
|
1576
1576
|
}
|
|
1577
|
-
function
|
|
1577
|
+
function Xt(e) {
|
|
1578
1578
|
var a;
|
|
1579
1579
|
const t = mt.get(e);
|
|
1580
1580
|
if (t)
|
|
@@ -1582,7 +1582,7 @@ function Jt(e) {
|
|
|
1582
1582
|
const n = bt.get(e);
|
|
1583
1583
|
if (n)
|
|
1584
1584
|
return bt.delete(e), n.lastAccess = Date.now(), bt.set(e, n), am(n);
|
|
1585
|
-
const r =
|
|
1585
|
+
const r = Ut.get(e);
|
|
1586
1586
|
if (!r) return null;
|
|
1587
1587
|
const o = ud(
|
|
1588
1588
|
r.bundle,
|
|
@@ -1593,31 +1593,31 @@ function Jt(e) {
|
|
|
1593
1593
|
o,
|
|
1594
1594
|
r.previewBase
|
|
1595
1595
|
);
|
|
1596
|
-
return ((a =
|
|
1596
|
+
return ((a = Vt.get(e)) == null ? void 0 : a.stale) !== !0 && Ai(i) && !br.has(e) && (br.add(e), Ra(e, i)), i;
|
|
1597
1597
|
}
|
|
1598
1598
|
function Aa(e, t, n = pr(e), r = Date.now()) {
|
|
1599
1599
|
var l, c, d;
|
|
1600
1600
|
const o = t.length * 2;
|
|
1601
1601
|
if (!e || !Ai(t) || o > ga)
|
|
1602
1602
|
return !1;
|
|
1603
|
-
|
|
1603
|
+
Ut.delete(e), di(e);
|
|
1604
1604
|
const i = mt.get(e);
|
|
1605
|
-
i && (
|
|
1605
|
+
i && (Kt -= i.bytes, mt.delete(e));
|
|
1606
1606
|
const a = Cr(n);
|
|
1607
1607
|
cm(e, t, a, r) || (mt.set(e, {
|
|
1608
1608
|
bytes: o,
|
|
1609
1609
|
value: t,
|
|
1610
1610
|
namespace: a,
|
|
1611
1611
|
lastAccess: r
|
|
1612
|
-
}),
|
|
1612
|
+
}), Kt += o), yr();
|
|
1613
1613
|
try {
|
|
1614
|
-
for (((l =
|
|
1614
|
+
for (((l = Vt.get(e)) == null ? void 0 : l.stale) === !0 && (Vt.delete(e), nn({ key: e })); mt.size + bt.size > Gp || Kt > Xp; ) {
|
|
1615
1615
|
const u = mt.keys().next().value, p = bt.keys().next().value, m = u ? ((c = mt.get(u)) == null ? void 0 : c.lastAccess) ?? Number.POSITIVE_INFINITY : Number.POSITIVE_INFINITY, b = p ? ((d = bt.get(p)) == null ? void 0 : d.lastAccess) ?? Number.POSITIVE_INFINITY : Number.POSITIVE_INFINITY, x = m <= b ? u : p;
|
|
1616
1616
|
if (!x) break;
|
|
1617
1617
|
const w = mt.get(x);
|
|
1618
|
-
w ? (
|
|
1618
|
+
w ? (Kt -= w.bytes, mt.delete(x)) : di(x), dt.delete(x), mn(x);
|
|
1619
1619
|
}
|
|
1620
|
-
dt.add(e),
|
|
1620
|
+
dt.add(e), mn(e);
|
|
1621
1621
|
} finally {
|
|
1622
1622
|
vr();
|
|
1623
1623
|
}
|
|
@@ -1648,8 +1648,8 @@ function Ti(e, t) {
|
|
|
1648
1648
|
return n && Ra(e, t), n;
|
|
1649
1649
|
}
|
|
1650
1650
|
function Wd(e) {
|
|
1651
|
-
if (
|
|
1652
|
-
const t =
|
|
1651
|
+
if (Ut.has(e)) return Promise.resolve(null);
|
|
1652
|
+
const t = Xt(e);
|
|
1653
1653
|
if (t) return Promise.resolve(t);
|
|
1654
1654
|
if (dt.has(e)) return Promise.resolve(null);
|
|
1655
1655
|
const n = qr.get(e);
|
|
@@ -1688,8 +1688,8 @@ function Wd(e) {
|
|
|
1688
1688
|
async function Ta(e) {
|
|
1689
1689
|
const t = [...new Set(e.filter(Boolean))], n = /* @__PURE__ */ new Map(), r = [];
|
|
1690
1690
|
for (const u of t) {
|
|
1691
|
-
if (
|
|
1692
|
-
const p =
|
|
1691
|
+
if (Ut.has(u)) continue;
|
|
1692
|
+
const p = Xt(u);
|
|
1693
1693
|
p ? n.set(u, p) : dt.has(u) || r.push(u);
|
|
1694
1694
|
}
|
|
1695
1695
|
if (!r.length) return n;
|
|
@@ -1698,7 +1698,7 @@ async function Ta(e) {
|
|
|
1698
1698
|
yr();
|
|
1699
1699
|
try {
|
|
1700
1700
|
r.forEach((u) => {
|
|
1701
|
-
dt.add(u),
|
|
1701
|
+
dt.add(u), mn(u);
|
|
1702
1702
|
});
|
|
1703
1703
|
} finally {
|
|
1704
1704
|
vr();
|
|
@@ -1731,7 +1731,7 @@ async function Ta(e) {
|
|
|
1731
1731
|
);
|
|
1732
1732
|
} catch {
|
|
1733
1733
|
u.forEach((m) => {
|
|
1734
|
-
dt.add(m),
|
|
1734
|
+
dt.add(m), mn(m);
|
|
1735
1735
|
});
|
|
1736
1736
|
continue;
|
|
1737
1737
|
}
|
|
@@ -1739,7 +1739,7 @@ async function Ta(e) {
|
|
|
1739
1739
|
u.map(async (m) => {
|
|
1740
1740
|
const b = p.get(m), x = jd(b, m);
|
|
1741
1741
|
if (dt.add(m), !x) {
|
|
1742
|
-
if (
|
|
1742
|
+
if (mn(m), b != null)
|
|
1743
1743
|
try {
|
|
1744
1744
|
await i.remove(m);
|
|
1745
1745
|
} catch {
|
|
@@ -1774,22 +1774,22 @@ async function Ta(e) {
|
|
|
1774
1774
|
function xm(e) {
|
|
1775
1775
|
const t = e ? Cr(e) : null;
|
|
1776
1776
|
if (!t)
|
|
1777
|
-
mt.clear(), bt.clear(), wd.clear(), xa.clear(),
|
|
1777
|
+
mt.clear(), bt.clear(), wd.clear(), xa.clear(), Ut.clear(), br.clear(), Vt.clear(), xr.clear(), Kt = 0;
|
|
1778
1778
|
else {
|
|
1779
1779
|
for (const [r, o] of mt)
|
|
1780
|
-
o.namespace === t && (mt.delete(r),
|
|
1780
|
+
o.namespace === t && (mt.delete(r), Kt -= o.bytes);
|
|
1781
1781
|
for (const [r, o] of [...bt])
|
|
1782
1782
|
o.namespace === t && di(r);
|
|
1783
|
-
for (const r of
|
|
1784
|
-
pr(r) === t && (
|
|
1785
|
-
for (const r of
|
|
1786
|
-
pr(r) === t &&
|
|
1783
|
+
for (const r of Ut.keys())
|
|
1784
|
+
pr(r) === t && (Ut.delete(r), br.delete(r));
|
|
1785
|
+
for (const r of Vt.keys())
|
|
1786
|
+
pr(r) === t && Vt.delete(r);
|
|
1787
1787
|
}
|
|
1788
1788
|
if (rn += 1, !t) dt.clear();
|
|
1789
1789
|
else
|
|
1790
1790
|
for (const r of dt)
|
|
1791
1791
|
pr(r) === t && dt.delete(r);
|
|
1792
|
-
nn(),
|
|
1792
|
+
nn(), mn();
|
|
1793
1793
|
const n = rn;
|
|
1794
1794
|
Ri().then(async (r) => {
|
|
1795
1795
|
if (!(!r || rn !== n))
|
|
@@ -1824,7 +1824,7 @@ function Fa(e, t, n) {
|
|
|
1824
1824
|
), i;
|
|
1825
1825
|
}
|
|
1826
1826
|
function ui(e, t, n, r = e) {
|
|
1827
|
-
const o =
|
|
1827
|
+
const o = Xt(e);
|
|
1828
1828
|
if (o) return Promise.resolve(o);
|
|
1829
1829
|
const i = ko.get(r);
|
|
1830
1830
|
if (i) {
|
|
@@ -1838,7 +1838,7 @@ function ui(e, t, n, r = e) {
|
|
|
1838
1838
|
promise: Promise.resolve(null)
|
|
1839
1839
|
};
|
|
1840
1840
|
return c.promise = Wd(e).then((d) => d || rn !== a ? d : Fa(l, c.priority, async () => {
|
|
1841
|
-
const u =
|
|
1841
|
+
const u = Xt(e);
|
|
1842
1842
|
if (u) return u;
|
|
1843
1843
|
const p = await n();
|
|
1844
1844
|
return p && rn === a && Ti(e, p), p;
|
|
@@ -1965,11 +1965,11 @@ const Vs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1965
1965
|
getRoutePreviewArtifactIdentityVersion: Pd,
|
|
1966
1966
|
getRoutePreviewArtifactKeyVersion: Cd,
|
|
1967
1967
|
getRoutePreviewArtifactOutcome: $a,
|
|
1968
|
-
getRoutePreviewArtifactResolution:
|
|
1968
|
+
getRoutePreviewArtifactResolution: gn,
|
|
1969
1969
|
getRoutePreviewArtifactRevision: Ds,
|
|
1970
1970
|
getRoutePreviewCacheNamespace: ka,
|
|
1971
1971
|
getRoutePreviewShadowArtifact: jn,
|
|
1972
|
-
getRoutePreviewSnapshot:
|
|
1972
|
+
getRoutePreviewSnapshot: Xt,
|
|
1973
1973
|
getRoutePreviewSnapshotKeyVersion: Fs,
|
|
1974
1974
|
getRoutePreviewSnapshotRevision: Rs,
|
|
1975
1975
|
hasExactRoutePreviewSnapshot: Ei,
|
|
@@ -1991,7 +1991,7 @@ const Vs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1991
1991
|
serializeRoutePreview: La,
|
|
1992
1992
|
setRoutePreviewArtifactEndpointConfigured: Ad,
|
|
1993
1993
|
setRoutePreviewArtifactFrameRequester: Bs,
|
|
1994
|
-
setRoutePreviewArtifactResolution:
|
|
1994
|
+
setRoutePreviewArtifactResolution: vt,
|
|
1995
1995
|
setRoutePreviewCacheNamespace: Dd,
|
|
1996
1996
|
setRoutePreviewConcurrency: Bd,
|
|
1997
1997
|
setRoutePreviewPersistenceForTests: pm,
|
|
@@ -2098,20 +2098,20 @@ function za(e) {
|
|
|
2098
2098
|
function wr() {
|
|
2099
2099
|
return Hd;
|
|
2100
2100
|
}
|
|
2101
|
-
function
|
|
2101
|
+
function bn(e, t) {
|
|
2102
2102
|
const n = t ?? e.id === f.activePageId;
|
|
2103
2103
|
return Lt(
|
|
2104
2104
|
e.environment,
|
|
2105
2105
|
n ? Rm() : void 0
|
|
2106
2106
|
);
|
|
2107
2107
|
}
|
|
2108
|
-
function
|
|
2108
|
+
function Wt(e, t, n = {
|
|
2109
2109
|
width: e.width ?? 390,
|
|
2110
2110
|
height: e.height ?? 600
|
|
2111
2111
|
}, r) {
|
|
2112
2112
|
const o = Lt(
|
|
2113
|
-
|
|
2114
|
-
|
|
2113
|
+
Gt(),
|
|
2114
|
+
bn(e, r)
|
|
2115
2115
|
);
|
|
2116
2116
|
return ki({
|
|
2117
2117
|
namespace: ka(),
|
|
@@ -2127,10 +2127,10 @@ function jt(e, t, n = {
|
|
|
2127
2127
|
}
|
|
2128
2128
|
const Tm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2129
2129
|
__proto__: null,
|
|
2130
|
-
pagePreviewEnvironment:
|
|
2131
|
-
routePreviewCacheKey:
|
|
2130
|
+
pagePreviewEnvironment: bn,
|
|
2131
|
+
routePreviewCacheKey: Wt
|
|
2132
2132
|
}, Symbol.toStringTag, { value: "Module" })), Fm = /* @__PURE__ */ new Set(), Yr = /* @__PURE__ */ new Map();
|
|
2133
|
-
let
|
|
2133
|
+
let Pt = [];
|
|
2134
2134
|
const Vd = 2;
|
|
2135
2135
|
function Kd(e, t) {
|
|
2136
2136
|
for (const r of [...Fm]) r();
|
|
@@ -2146,23 +2146,23 @@ function Kd(e, t) {
|
|
|
2146
2146
|
function _a(e, t = Vd) {
|
|
2147
2147
|
if (!e) return !1;
|
|
2148
2148
|
const n = Math.max(1, t);
|
|
2149
|
-
if (
|
|
2150
|
-
const r = [e,
|
|
2151
|
-
if (r.length ===
|
|
2149
|
+
if (Pt[0] === e && Pt.length <= n) return !1;
|
|
2150
|
+
const r = [e, ...Pt.filter((i) => i !== e)].slice(0, n);
|
|
2151
|
+
if (r.length === Pt.length && r.every((i, a) => i === Pt[a]))
|
|
2152
2152
|
return !1;
|
|
2153
|
-
const o =
|
|
2154
|
-
return
|
|
2153
|
+
const o = Pt;
|
|
2154
|
+
return Pt = r, Kd(o, r), !0;
|
|
2155
2155
|
}
|
|
2156
2156
|
function Lm(e) {
|
|
2157
|
-
if (
|
|
2158
|
-
const t =
|
|
2159
|
-
|
|
2157
|
+
if (!Pt.includes(e)) return;
|
|
2158
|
+
const t = Pt;
|
|
2159
|
+
Pt = Pt.filter((n) => n !== e), Kd(t, Pt);
|
|
2160
2160
|
}
|
|
2161
2161
|
function Oa(e) {
|
|
2162
|
-
return
|
|
2162
|
+
return Pt.includes(e);
|
|
2163
2163
|
}
|
|
2164
2164
|
function Ud() {
|
|
2165
|
-
return
|
|
2165
|
+
return Pt;
|
|
2166
2166
|
}
|
|
2167
2167
|
function Dm(e, t) {
|
|
2168
2168
|
let n = Yr.get(e);
|
|
@@ -2187,9 +2187,9 @@ function zm(e, t) {
|
|
|
2187
2187
|
route: e.route,
|
|
2188
2188
|
width: n,
|
|
2189
2189
|
height: r,
|
|
2190
|
-
key:
|
|
2190
|
+
key: Wt(e, t)
|
|
2191
2191
|
}, fi.set(e, i));
|
|
2192
|
-
const a =
|
|
2192
|
+
const a = Xt(i.key);
|
|
2193
2193
|
if (a != null) return a.length * 2;
|
|
2194
2194
|
const l = jn(i.key);
|
|
2195
2195
|
return l ? l.bodyHtml.length * 2 : 0;
|
|
@@ -2197,7 +2197,7 @@ function zm(e, t) {
|
|
|
2197
2197
|
function _m(e, t) {
|
|
2198
2198
|
var a;
|
|
2199
2199
|
if (e.route == null) return null;
|
|
2200
|
-
const n = fi.get(e), r = (n == null ? void 0 : n.key) ??
|
|
2200
|
+
const n = fi.get(e), r = (n == null ? void 0 : n.key) ?? Wt(e, t), o = (a = $a(r)) == null ? void 0 : a.screenshot;
|
|
2201
2201
|
if (!o) return null;
|
|
2202
2202
|
const i = e.width ?? 390;
|
|
2203
2203
|
return i > 0 ? o.width / i : null;
|
|
@@ -2222,7 +2222,7 @@ function qd() {
|
|
|
2222
2222
|
x: n.x ?? 0,
|
|
2223
2223
|
y: n.y ?? 0,
|
|
2224
2224
|
width: n.width ?? 390,
|
|
2225
|
-
height:
|
|
2225
|
+
height: hn(n)
|
|
2226
2226
|
},
|
|
2227
2227
|
pinned: n.id === f.activePageId || (t == null ? void 0 : t.kind) === "frame" && t.id === n.id || // Catalog sheets must stay mounted so their DOM bounds can be measured.
|
|
2228
2228
|
n.frameSizeMode === "content" || Oa(n.id),
|
|
@@ -2289,7 +2289,7 @@ const jm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2289
2289
|
CameraLayer: Yd,
|
|
2290
2290
|
__debugReadEditorFrames: Om
|
|
2291
2291
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2292
|
-
function
|
|
2292
|
+
function jt(e) {
|
|
2293
2293
|
return typeof e == "number" && Number.isFinite(e) ? Math.max(0, e) : 0;
|
|
2294
2294
|
}
|
|
2295
2295
|
function Us(e) {
|
|
@@ -2317,9 +2317,9 @@ function Gd(e) {
|
|
|
2317
2317
|
1,
|
|
2318
2318
|
Math.ceil(
|
|
2319
2319
|
Math.max(
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2320
|
+
jt(t.clientWidth),
|
|
2321
|
+
jt(t.offsetWidth),
|
|
2322
|
+
jt(t.scrollWidth),
|
|
2323
2323
|
n.width,
|
|
2324
2324
|
i - r
|
|
2325
2325
|
)
|
|
@@ -2329,9 +2329,9 @@ function Gd(e) {
|
|
|
2329
2329
|
1,
|
|
2330
2330
|
Math.ceil(
|
|
2331
2331
|
Math.max(
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2332
|
+
jt(t.clientHeight),
|
|
2333
|
+
jt(t.offsetHeight),
|
|
2334
|
+
jt(t.scrollHeight),
|
|
2335
2335
|
n.height,
|
|
2336
2336
|
a - o
|
|
2337
2337
|
)
|
|
@@ -2340,15 +2340,15 @@ function Gd(e) {
|
|
|
2340
2340
|
};
|
|
2341
2341
|
}
|
|
2342
2342
|
function Bl(e) {
|
|
2343
|
-
const t = e, n = Us(e), r =
|
|
2343
|
+
const t = e, n = Us(e), r = jt(t.offsetWidth), o = jt(t.offsetHeight), i = jt(t.clientWidth), a = jt(t.clientHeight);
|
|
2344
2344
|
return {
|
|
2345
2345
|
width: Math.max(
|
|
2346
2346
|
1,
|
|
2347
|
-
Math.ceil(r || i ||
|
|
2347
|
+
Math.ceil(r || i || jt(n.width))
|
|
2348
2348
|
),
|
|
2349
2349
|
height: Math.max(
|
|
2350
2350
|
1,
|
|
2351
|
-
Math.ceil(o || a ||
|
|
2351
|
+
Math.ceil(o || a || jt(n.height))
|
|
2352
2352
|
)
|
|
2353
2353
|
};
|
|
2354
2354
|
}
|
|
@@ -2426,7 +2426,7 @@ function qm() {
|
|
|
2426
2426
|
};
|
|
2427
2427
|
}
|
|
2428
2428
|
function Ym() {
|
|
2429
|
-
const e = Qe(ha,
|
|
2429
|
+
const e = Qe(ha, xn, xn), t = Qe(
|
|
2430
2430
|
Uc,
|
|
2431
2431
|
Xn,
|
|
2432
2432
|
Xn
|
|
@@ -2438,7 +2438,7 @@ function Ym() {
|
|
|
2438
2438
|
return { appOrigin: e, previewRevision: t, environmentControlRevision: n };
|
|
2439
2439
|
}
|
|
2440
2440
|
function Gm(e) {
|
|
2441
|
-
const { pageId: t, routePreviewKey: n, authoredRoutePreviewKey: r, canonicalId: o } = e, i = e.fingerprint ?? void 0, a = e.batchHydrated ?? !1, l =
|
|
2441
|
+
const { pageId: t, routePreviewKey: n, authoredRoutePreviewKey: r, canonicalId: o } = e, i = e.fingerprint ?? void 0, a = e.batchHydrated ?? !1, l = St(
|
|
2442
2442
|
(v) => {
|
|
2443
2443
|
const S = Id(
|
|
2444
2444
|
n,
|
|
@@ -2453,21 +2453,21 @@ function Gm(e) {
|
|
|
2453
2453
|
};
|
|
2454
2454
|
},
|
|
2455
2455
|
[n, o, i]
|
|
2456
|
-
), c =
|
|
2456
|
+
), c = St(
|
|
2457
2457
|
() => Cd(n) + Pd(o, i),
|
|
2458
2458
|
[n, o, i]
|
|
2459
2459
|
), d = Qe(
|
|
2460
2460
|
l,
|
|
2461
2461
|
c,
|
|
2462
2462
|
c
|
|
2463
|
-
), u =
|
|
2463
|
+
), u = St(
|
|
2464
2464
|
(v) => Dm(t, v),
|
|
2465
2465
|
[t]
|
|
2466
|
-
), p =
|
|
2466
|
+
), p = St(() => Oa(t), [t]), m = Qe(
|
|
2467
2467
|
u,
|
|
2468
2468
|
p,
|
|
2469
2469
|
() => !1
|
|
2470
|
-
), b =
|
|
2470
|
+
), b = St(
|
|
2471
2471
|
(v) => {
|
|
2472
2472
|
const S = Ts(
|
|
2473
2473
|
n,
|
|
@@ -2481,7 +2481,7 @@ function Gm(e) {
|
|
|
2481
2481
|
};
|
|
2482
2482
|
},
|
|
2483
2483
|
[n, r]
|
|
2484
|
-
), x =
|
|
2484
|
+
), x = St(
|
|
2485
2485
|
() => Fs(n) + Fs(r),
|
|
2486
2486
|
[n, r]
|
|
2487
2487
|
);
|
|
@@ -2527,7 +2527,7 @@ function Jd() {
|
|
|
2527
2527
|
}
|
|
2528
2528
|
const Zm = 2, eg = 18e4;
|
|
2529
2529
|
let tg = eg;
|
|
2530
|
-
const
|
|
2530
|
+
const Ht = [], qn = {
|
|
2531
2531
|
boots: 0,
|
|
2532
2532
|
reuses: 0,
|
|
2533
2533
|
parks: 0,
|
|
@@ -2551,7 +2551,7 @@ function qs(e) {
|
|
|
2551
2551
|
e.timer != null && clearTimeout(e.timer), e.iframe.remove(), qn.evictions += 1;
|
|
2552
2552
|
}
|
|
2553
2553
|
function Ba() {
|
|
2554
|
-
const e =
|
|
2554
|
+
const e = Ht.splice(0, Ht.length);
|
|
2555
2555
|
for (const t of e) qs(t);
|
|
2556
2556
|
}
|
|
2557
2557
|
function eu(e, t) {
|
|
@@ -2569,16 +2569,16 @@ function eu(e, t) {
|
|
|
2569
2569
|
return !0;
|
|
2570
2570
|
}
|
|
2571
2571
|
function tu(e) {
|
|
2572
|
-
return
|
|
2572
|
+
return Ht.some((t) => eu(t, e));
|
|
2573
2573
|
}
|
|
2574
2574
|
function rg(e) {
|
|
2575
2575
|
let t = -1, n = -1;
|
|
2576
|
-
for (let o = 0; o <
|
|
2577
|
-
const i =
|
|
2576
|
+
for (let o = 0; o < Ht.length; o += 1) {
|
|
2577
|
+
const i = Ht[o];
|
|
2578
2578
|
eu(i, e) && i.executed.length > n && (n = i.executed.length, t = o);
|
|
2579
2579
|
}
|
|
2580
2580
|
if (t < 0) return null;
|
|
2581
|
-
const [r] =
|
|
2581
|
+
const [r] = Ht.splice(t, 1);
|
|
2582
2582
|
return r.timer != null && clearTimeout(r.timer), qn.reuses += 1, { iframe: r.iframe, skip: r.executed.length };
|
|
2583
2583
|
}
|
|
2584
2584
|
function og(e, t, n) {
|
|
@@ -2593,10 +2593,10 @@ function og(e, t, n) {
|
|
|
2593
2593
|
timer: null
|
|
2594
2594
|
};
|
|
2595
2595
|
for (o.timer = setTimeout(() => {
|
|
2596
|
-
const l =
|
|
2597
|
-
l < 0 || (
|
|
2598
|
-
}, tg), (a = (i = o.timer) == null ? void 0 : i.unref) == null || a.call(i),
|
|
2599
|
-
const l =
|
|
2596
|
+
const l = Ht.indexOf(o);
|
|
2597
|
+
l < 0 || (Ht.splice(l, 1), qs(o));
|
|
2598
|
+
}, tg), (a = (i = o.timer) == null ? void 0 : i.unref) == null || a.call(i), Ht.push(o), qn.parks += 1; Ht.length > Zm; ) {
|
|
2599
|
+
const l = Ht.shift();
|
|
2600
2600
|
l && qs(l);
|
|
2601
2601
|
}
|
|
2602
2602
|
}
|
|
@@ -2773,7 +2773,7 @@ function Fi(e = {}) {
|
|
|
2773
2773
|
},
|
|
2774
2774
|
/** How many finished walks currently have an instance parked for reuse. */
|
|
2775
2775
|
debugWarmInstancesParked() {
|
|
2776
|
-
return
|
|
2776
|
+
return Ht.length;
|
|
2777
2777
|
}
|
|
2778
2778
|
};
|
|
2779
2779
|
}
|
|
@@ -2866,20 +2866,20 @@ function Li(e, t, n) {
|
|
|
2866
2866
|
const u = c.interactiveStateId ? (c.interactions ?? []).slice(((a = c.baseInteractions) == null ? void 0 : a.length) ?? 0) : [];
|
|
2867
2867
|
r.push({
|
|
2868
2868
|
screenId: l.screenId,
|
|
2869
|
-
cacheKey:
|
|
2869
|
+
cacheKey: Wt(c, n, void 0, !1),
|
|
2870
2870
|
width: c.width ?? 390,
|
|
2871
|
-
height:
|
|
2871
|
+
height: hn(c),
|
|
2872
2872
|
steps: [...l.steps ?? [], ...u],
|
|
2873
2873
|
assertions: c.assertions
|
|
2874
2874
|
});
|
|
2875
2875
|
}
|
|
2876
2876
|
return r.length === 0 ? null : {
|
|
2877
2877
|
id: e.id,
|
|
2878
|
-
url: mr(
|
|
2878
|
+
url: mr(xn(), e.route, {
|
|
2879
2879
|
...Lt(
|
|
2880
2880
|
Lt(
|
|
2881
2881
|
Gf(i),
|
|
2882
|
-
|
|
2882
|
+
Gt()
|
|
2883
2883
|
),
|
|
2884
2884
|
e.environment
|
|
2885
2885
|
) ?? {},
|
|
@@ -2985,7 +2985,7 @@ function lu(e, t, n) {
|
|
|
2985
2985
|
(p) => p.screenId === r
|
|
2986
2986
|
);
|
|
2987
2987
|
if (l < 0) return !1;
|
|
2988
|
-
const c =
|
|
2988
|
+
const c = Wt(e, n, t, !1), d = async (p) => {
|
|
2989
2989
|
const m = Kn();
|
|
2990
2990
|
if (!m) {
|
|
2991
2991
|
$n.controllerMissing += 1;
|
|
@@ -3441,7 +3441,7 @@ function Wl(e, t = Rg) {
|
|
|
3441
3441
|
n.push(e.slice(r, r + t));
|
|
3442
3442
|
return n;
|
|
3443
3443
|
}
|
|
3444
|
-
function
|
|
3444
|
+
function Jt(e, t) {
|
|
3445
3445
|
const n = e.trim();
|
|
3446
3446
|
if (!n && t != null) return t;
|
|
3447
3447
|
if (Go(n)) return n;
|
|
@@ -3486,7 +3486,7 @@ function gu(e) {
|
|
|
3486
3486
|
if (!Array.isArray(e))
|
|
3487
3487
|
throw new TypeError("Preview recipes must be an array.");
|
|
3488
3488
|
const t = /* @__PURE__ */ new Set(), n = e.map(({ id: r, recipe: o }) => {
|
|
3489
|
-
const i =
|
|
3489
|
+
const i = Jt(r);
|
|
3490
3490
|
if (t.has(i))
|
|
3491
3491
|
throw new TypeError(`Duplicate preview recipe identity: ${i}`);
|
|
3492
3492
|
return t.add(i), {
|
|
@@ -3500,8 +3500,8 @@ function Lg(e, t = {}) {
|
|
|
3500
3500
|
const n = Og(e), r = t.dependencyDigest;
|
|
3501
3501
|
return gu([
|
|
3502
3502
|
{
|
|
3503
|
-
id:
|
|
3504
|
-
recipe: r == null ? n : { recipe: n, dependencyDigest:
|
|
3503
|
+
id: Jt(e.id ?? "", "frame"),
|
|
3504
|
+
recipe: r == null ? n : { recipe: n, dependencyDigest: Jt(r) }
|
|
3505
3505
|
}
|
|
3506
3506
|
]);
|
|
3507
3507
|
}
|
|
@@ -3590,7 +3590,7 @@ function Kw({
|
|
|
3590
3590
|
recipeVersion: n,
|
|
3591
3591
|
scope: r = Cg
|
|
3592
3592
|
}) {
|
|
3593
|
-
const o =
|
|
3593
|
+
const o = Jt(r), i = Jt(
|
|
3594
3594
|
e,
|
|
3595
3595
|
$g
|
|
3596
3596
|
), a = Tg(n), l = gu(t);
|
|
@@ -3696,8 +3696,8 @@ async function Wg({
|
|
|
3696
3696
|
frames: o
|
|
3697
3697
|
}) {
|
|
3698
3698
|
const i = {
|
|
3699
|
-
namespace:
|
|
3700
|
-
sourceRevision:
|
|
3699
|
+
namespace: Jt(e),
|
|
3700
|
+
sourceRevision: Jt(t)
|
|
3701
3701
|
};
|
|
3702
3702
|
let a;
|
|
3703
3703
|
try {
|
|
@@ -3797,7 +3797,7 @@ function Ug(e, t, n = {}) {
|
|
|
3797
3797
|
artifact: null,
|
|
3798
3798
|
reason: "invalid-bundle",
|
|
3799
3799
|
errors: r.errors
|
|
3800
|
-
} : t && r.artifact.namespace !==
|
|
3800
|
+
} : t && r.artifact.namespace !== Jt(t.namespace) ? {
|
|
3801
3801
|
valid: !1,
|
|
3802
3802
|
artifact: null,
|
|
3803
3803
|
reason: "namespace-mismatch",
|
|
@@ -3807,7 +3807,7 @@ function Ug(e, t, n = {}) {
|
|
|
3807
3807
|
} : t && // A per-frame answer is judged frame by frame: the bundle names the last
|
|
3808
3808
|
// publish, not the revision every frame in it came from. Rejecting on that
|
|
3809
3809
|
// value would undo the point of asking per frame.
|
|
3810
|
-
!n.perFrameIdentity && r.artifact.sourceRevision !==
|
|
3810
|
+
!n.perFrameIdentity && r.artifact.sourceRevision !== Jt(t.sourceRevision) ? {
|
|
3811
3811
|
valid: !1,
|
|
3812
3812
|
artifact: null,
|
|
3813
3813
|
reason: "revision-mismatch",
|
|
@@ -3843,8 +3843,8 @@ async function Yg({
|
|
|
3843
3843
|
generate: i
|
|
3844
3844
|
}) {
|
|
3845
3845
|
const a = {
|
|
3846
|
-
namespace:
|
|
3847
|
-
sourceRevision:
|
|
3846
|
+
namespace: Jt(e),
|
|
3847
|
+
sourceRevision: Jt(t)
|
|
3848
3848
|
};
|
|
3849
3849
|
let l;
|
|
3850
3850
|
try {
|
|
@@ -4821,7 +4821,7 @@ function _u() {
|
|
|
4821
4821
|
for (const n of f.canvasPages) {
|
|
4822
4822
|
if (!n.section) continue;
|
|
4823
4823
|
const r = n.x ?? 0, o = n.y ?? 0;
|
|
4824
|
-
t(n.section, r, o, r + (n.width ?? 390), o +
|
|
4824
|
+
t(n.section, r, o, r + (n.width ?? 390), o + hn(n));
|
|
4825
4825
|
}
|
|
4826
4826
|
return e;
|
|
4827
4827
|
}
|
|
@@ -5533,8 +5533,8 @@ function _b(e, t) {
|
|
|
5533
5533
|
}
|
|
5534
5534
|
class Ob {
|
|
5535
5535
|
constructor() {
|
|
5536
|
-
|
|
5537
|
-
|
|
5536
|
+
dn(this, "sharedStyles", /* @__PURE__ */ new Map());
|
|
5537
|
+
dn(this, "overrideStyles", /* @__PURE__ */ new Map());
|
|
5538
5538
|
}
|
|
5539
5539
|
acquire(t, n, r, o, i, a) {
|
|
5540
5540
|
const l = xi(o);
|
|
@@ -6004,7 +6004,7 @@ function qb(e, t, n, r) {
|
|
|
6004
6004
|
return o || (Hu.has(e) || ea.has(e) || typeof OffscreenCanvas > "u" || typeof createImageBitmap > "u" || typeof fetch > "u" || !(n > 0) || !(r > 0) || (ea.add(e), Ub(e, t, n, r)), null);
|
|
6005
6005
|
}
|
|
6006
6006
|
function Yb(e, t) {
|
|
6007
|
-
const n =
|
|
6007
|
+
const n = St(
|
|
6008
6008
|
(o) => ma(e, o),
|
|
6009
6009
|
[e]
|
|
6010
6010
|
), r = Qe(
|
|
@@ -6015,7 +6015,7 @@ function Yb(e, t) {
|
|
|
6015
6015
|
return t ? "full" : r;
|
|
6016
6016
|
}
|
|
6017
6017
|
function Gb(e) {
|
|
6018
|
-
const t =
|
|
6018
|
+
const t = St(
|
|
6019
6019
|
(n) => ma(e, n),
|
|
6020
6020
|
[e]
|
|
6021
6021
|
);
|
|
@@ -6084,15 +6084,15 @@ const ex = We(function({
|
|
|
6084
6084
|
const { appOrigin: l, previewRevision: c } = Ym(), d = Ie(null), u = Ie(null), p = Ie(null), m = Ie(null), b = Ie(null), x = Ie(!1), w = Ie(qm()), v = Ie(
|
|
6085
6085
|
() => {
|
|
6086
6086
|
}
|
|
6087
|
-
), S = Ie(null), $ = Ie(!1), R = Ie(null), H = Ie(0), A = Ie(null), [N, T] = Y(null), [j, k] = Y(!1), z = (N == null ? void 0 : N.width) ?? t.width ?? 390, Z = (N == null ? void 0 : N.height) ??
|
|
6088
|
-
|
|
6089
|
-
|
|
6090
|
-
), q =
|
|
6087
|
+
), S = Ie(null), $ = Ie(!1), R = Ie(null), H = Ie(0), A = Ie(null), [N, T] = Y(null), [j, k] = Y(!1), z = (N == null ? void 0 : N.width) ?? t.width ?? 390, Z = (N == null ? void 0 : N.height) ?? hn(t), M = (N == null ? void 0 : N.x) ?? t.x ?? 0, W = (N == null ? void 0 : N.y) ?? t.y ?? 0, ee = Lt(
|
|
6088
|
+
Gt(),
|
|
6089
|
+
bn(t, n)
|
|
6090
|
+
), q = Wt(
|
|
6091
6091
|
t,
|
|
6092
6092
|
c,
|
|
6093
6093
|
void 0,
|
|
6094
6094
|
n
|
|
6095
|
-
), Me =
|
|
6095
|
+
), Me = Wt(
|
|
6096
6096
|
t,
|
|
6097
6097
|
c,
|
|
6098
6098
|
t.authoredFrameSize ?? {
|
|
@@ -6106,13 +6106,13 @@ const ex = We(function({
|
|
|
6106
6106
|
route: t.route,
|
|
6107
6107
|
width: t.width,
|
|
6108
6108
|
height: t.height,
|
|
6109
|
-
environment:
|
|
6109
|
+
environment: bn(t, n),
|
|
6110
6110
|
preset: t.preset,
|
|
6111
6111
|
interactions: t.interactions,
|
|
6112
6112
|
assertions: t.assertions
|
|
6113
6113
|
},
|
|
6114
6114
|
c,
|
|
6115
|
-
|
|
6115
|
+
Gt()
|
|
6116
6116
|
) : null, ne = Gm({
|
|
6117
6117
|
pageId: t.id,
|
|
6118
6118
|
routePreviewKey: q,
|
|
@@ -6130,7 +6130,7 @@ const ex = We(function({
|
|
|
6130
6130
|
ae.height * V / Math.max(1, ae.width)
|
|
6131
6131
|
)
|
|
6132
6132
|
) : 1
|
|
6133
|
-
), Re = a ?
|
|
6133
|
+
), Re = a ? gn(
|
|
6134
6134
|
t.importPageId ?? t.id,
|
|
6135
6135
|
fe ?? void 0
|
|
6136
6136
|
) : { status: "idle" }, le = Iu({
|
|
@@ -6139,9 +6139,9 @@ const ex = We(function({
|
|
|
6139
6139
|
captureStatus: I == null ? void 0 : I.status,
|
|
6140
6140
|
diagnostic: (mo = I == null ? void 0 : I.diagnostics[0]) == null ? void 0 : mo.message
|
|
6141
6141
|
}), [Le, De] = Y(
|
|
6142
|
-
() => a && !E ?
|
|
6142
|
+
() => a && !E ? Xt(q) : null
|
|
6143
6143
|
), [Ye, ot] = Y(!1), [F, de] = Y(!1), re = Ie(null), Ee = () => {
|
|
6144
|
-
!a || t.route == null || t.layersImported ||
|
|
6144
|
+
!a || t.route == null || t.layersImported || Pe || re.current == null && (re.current = setTimeout(() => {
|
|
6145
6145
|
re.current = null, _a(t.id);
|
|
6146
6146
|
}, 220));
|
|
6147
6147
|
}, O = () => {
|
|
@@ -6152,10 +6152,10 @@ const ex = We(function({
|
|
|
6152
6152
|
}, [t.layersImported, t.id]);
|
|
6153
6153
|
const [ve, we] = Y(!1), Q = n || r || ie || Ye || ve, ge = Yb(t.id, Q), Oe = Gb(t.id);
|
|
6154
6154
|
Zb(t.id, ge);
|
|
6155
|
-
const [B, K] = Y(null), [ke, J] = Y(0), [je, Ne] = Y([]), ze = Le ?? (P && !E ?
|
|
6156
|
-
detailActive:
|
|
6155
|
+
const [B, K] = Y(null), [ke, J] = Y(0), [je, Ne] = Y([]), ze = Le ?? (P && !E ? Xt(q) : null), tt = E != null || ze != null || (I == null ? void 0 : I.screenshot) != null, Pe = n, Se = a && Rd({
|
|
6156
|
+
detailActive: Pe,
|
|
6157
6157
|
previewIntended: ie
|
|
6158
|
-
}),
|
|
6158
|
+
}), $e = Ft(() => !r || t.route == null || !t.layersImported ? null : Me === q && ze != null ? ze : Xt(Me) ?? ze, [
|
|
6159
6159
|
Me,
|
|
6160
6160
|
P,
|
|
6161
6161
|
ze,
|
|
@@ -6164,7 +6164,7 @@ const ex = We(function({
|
|
|
6164
6164
|
q,
|
|
6165
6165
|
r
|
|
6166
6166
|
]), Ce = Km(
|
|
6167
|
-
|
|
6167
|
+
$e != null,
|
|
6168
6168
|
Um({
|
|
6169
6169
|
resizeDraftActive: N != null,
|
|
6170
6170
|
importedAtCommittedWidth: t.layerImportViewportWidth == null || t.layerImportViewportWidth === (t.width ?? 390),
|
|
@@ -6173,7 +6173,7 @@ const ex = We(function({
|
|
|
6173
6173
|
) === "responsive-preview", Ke = {
|
|
6174
6174
|
width: t.width ?? 390,
|
|
6175
6175
|
height: t.height ?? 600
|
|
6176
|
-
}, zt = f.provisionalLayerImportRevision(t.id) != null,
|
|
6176
|
+
}, zt = f.provisionalLayerImportRevision(t.id) != null, on = bg(
|
|
6177
6177
|
t,
|
|
6178
6178
|
Ke
|
|
6179
6179
|
);
|
|
@@ -6192,7 +6192,7 @@ const ex = We(function({
|
|
|
6192
6192
|
t.height,
|
|
6193
6193
|
c
|
|
6194
6194
|
]);
|
|
6195
|
-
const
|
|
6195
|
+
const Qt = xg(t);
|
|
6196
6196
|
se(() => {
|
|
6197
6197
|
t.route == null || t.interactiveStateId == null || t.layersImported || fu(t, c);
|
|
6198
6198
|
}, [
|
|
@@ -6240,7 +6240,7 @@ const ex = We(function({
|
|
|
6240
6240
|
}, [n, t.id, t.importLayers, t.layersImported, t.route]), se(() => {
|
|
6241
6241
|
var U, pe;
|
|
6242
6242
|
(U = m.current) == null || U.resolve(null), m.current = null, (pe = b.current) == null || pe.resolve(), b.current = null, ot(!1), we(!1), K(null), J(0), Ne([]), De(
|
|
6243
|
-
jn(q) ? null :
|
|
6243
|
+
jn(q) ? null : Xt(q)
|
|
6244
6244
|
), H.current += 1, $.current = !1, R.current = null, S.current = null, v.current(), v.current = () => {
|
|
6245
6245
|
}, f.resetPageDocumentHeight(t.id);
|
|
6246
6246
|
}, [q]), se(
|
|
@@ -6257,7 +6257,7 @@ const ex = We(function({
|
|
|
6257
6257
|
return;
|
|
6258
6258
|
}
|
|
6259
6259
|
De(
|
|
6260
|
-
jn(q) ? null :
|
|
6260
|
+
jn(q) ? null : Xt(q)
|
|
6261
6261
|
);
|
|
6262
6262
|
}, [P, a, q]), se(() => {
|
|
6263
6263
|
var Ae, me;
|
|
@@ -6277,7 +6277,7 @@ const ex = We(function({
|
|
|
6277
6277
|
pe = setTimeout(() => {
|
|
6278
6278
|
U && (K(null), J((ft) => ft + 1));
|
|
6279
6279
|
}, qe);
|
|
6280
|
-
}, Te =
|
|
6280
|
+
}, Te = Pe ? -1e4 : (((Ae = t.interactions) == null ? void 0 : Ae.length) ?? 0) + (((me = t.assertions) == null ? void 0 : me.length) ?? 0) + (t.preset ? 1 : 0);
|
|
6281
6281
|
return ui(
|
|
6282
6282
|
q,
|
|
6283
6283
|
Te,
|
|
@@ -6316,7 +6316,7 @@ const ex = We(function({
|
|
|
6316
6316
|
(ye == null ? void 0 : ye.key) === oe && (m.current = null, ye.resolve(null)), ot(!1);
|
|
6317
6317
|
};
|
|
6318
6318
|
}, [
|
|
6319
|
-
|
|
6319
|
+
Pe,
|
|
6320
6320
|
P,
|
|
6321
6321
|
t.layersImported,
|
|
6322
6322
|
t.route,
|
|
@@ -6330,7 +6330,7 @@ const ex = We(function({
|
|
|
6330
6330
|
const U = ze != null && Ei(q);
|
|
6331
6331
|
!a || !Td({
|
|
6332
6332
|
cacheHydrated: P,
|
|
6333
|
-
detailActive:
|
|
6333
|
+
detailActive: Pe,
|
|
6334
6334
|
hasRoute: t.route != null,
|
|
6335
6335
|
layersImported: !!t.layersImported,
|
|
6336
6336
|
hasExactArtifact: !!(E && !(I != null && I.stale)),
|
|
@@ -6341,7 +6341,7 @@ const ex = We(function({
|
|
|
6341
6341
|
fe ?? void 0
|
|
6342
6342
|
);
|
|
6343
6343
|
}, [
|
|
6344
|
-
|
|
6344
|
+
Pe,
|
|
6345
6345
|
P,
|
|
6346
6346
|
t.route,
|
|
6347
6347
|
t.layersImported,
|
|
@@ -6355,30 +6355,30 @@ const ex = We(function({
|
|
|
6355
6355
|
q,
|
|
6356
6356
|
a
|
|
6357
6357
|
]);
|
|
6358
|
-
const
|
|
6358
|
+
const _t = Ft(
|
|
6359
6359
|
() => (I == null ? void 0 : I.stale) !== !0 && (E != null ? wl({ bodyAttributes: E.bodyAttributes }) : wl({ snapshotHtml: ze })),
|
|
6360
6360
|
[ze, E, I == null ? void 0 : I.stale]
|
|
6361
|
-
),
|
|
6361
|
+
), xt = a && !P, Be = gg(
|
|
6362
6362
|
t.importPageId ?? t.id
|
|
6363
|
-
), He = yg(t.id), En = f.frozenPromotionRefused(t.id),
|
|
6363
|
+
), He = yg(t.id), En = f.frozenPromotionRefused(t.id), Ot = (_t || xt || Be || Qt) && !En && !t.layersImported && t.importLayers === !0 && t.route != null && // A replay that reported issues registers stale and cannot promote —
|
|
6364
6364
|
// fall back to the boot path instead of holding the frame on it.
|
|
6365
6365
|
je.length === 0;
|
|
6366
6366
|
se(() => {
|
|
6367
6367
|
if (t.route != null) {
|
|
6368
|
-
if (
|
|
6368
|
+
if (!Pe && !j) {
|
|
6369
6369
|
jl(t.id);
|
|
6370
6370
|
return;
|
|
6371
6371
|
}
|
|
6372
|
-
|
|
6372
|
+
Pe && pg(t.id);
|
|
6373
6373
|
}
|
|
6374
|
-
}, [
|
|
6375
|
-
if (
|
|
6374
|
+
}, [Pe, j, t.id, t.route]), se(() => () => jl(t.id), [t.id]), se(() => {
|
|
6375
|
+
if (!Pe || !P || // The live detail grant obeys the same contract as the render gate:
|
|
6376
6376
|
// while a promotable capture exists (or may still arrive), activation
|
|
6377
6377
|
// waits for the bootless promotion instead of booting the app. Granting
|
|
6378
6378
|
// here regardless was the bypass that let a live boot — against a dead
|
|
6379
6379
|
// backend, a cold dev server — deliver the import a healthy capture
|
|
6380
6380
|
// already covered.
|
|
6381
|
-
|
|
6381
|
+
Ot || t.route == null || t.layersImported || !tt || B)
|
|
6382
6382
|
return;
|
|
6383
6383
|
let U = !0;
|
|
6384
6384
|
const pe = `detail:${oe}`;
|
|
@@ -6402,9 +6402,9 @@ const ex = We(function({
|
|
|
6402
6402
|
(be == null ? void 0 : be.key) === pe && (b.current = null, be.resolve()), we(!1);
|
|
6403
6403
|
};
|
|
6404
6404
|
}, [
|
|
6405
|
-
|
|
6405
|
+
Pe,
|
|
6406
6406
|
P,
|
|
6407
|
-
|
|
6407
|
+
Ot,
|
|
6408
6408
|
tt,
|
|
6409
6409
|
t.importLayers,
|
|
6410
6410
|
t.layersImported,
|
|
@@ -6429,10 +6429,10 @@ const ex = We(function({
|
|
|
6429
6429
|
oe,
|
|
6430
6430
|
tt
|
|
6431
6431
|
]);
|
|
6432
|
-
const Zn = l.trim().length > 0, Bi = Zn && Wa(t, { detailActive:
|
|
6432
|
+
const Zn = l.trim().length > 0, Bi = Zn && Wa(t, { detailActive: Pe }) ? ja({
|
|
6433
6433
|
origin: l,
|
|
6434
6434
|
route: t.route ?? "",
|
|
6435
|
-
environment:
|
|
6435
|
+
environment: bn(t, n),
|
|
6436
6436
|
width: z,
|
|
6437
6437
|
height: Z
|
|
6438
6438
|
}) : null, D = async (U, pe, be) => {
|
|
@@ -6463,7 +6463,7 @@ const ex = We(function({
|
|
|
6463
6463
|
se(() => {
|
|
6464
6464
|
de(!1);
|
|
6465
6465
|
}, [oe]);
|
|
6466
|
-
const
|
|
6466
|
+
const sn = async () => {
|
|
6467
6467
|
if (!p.current) return null;
|
|
6468
6468
|
if ($.current) return R.current;
|
|
6469
6469
|
if (S.current) return S.current;
|
|
@@ -6501,7 +6501,7 @@ const ex = We(function({
|
|
|
6501
6501
|
const pe = p.current;
|
|
6502
6502
|
x.current = !0;
|
|
6503
6503
|
try {
|
|
6504
|
-
const be = await
|
|
6504
|
+
const be = await sn();
|
|
6505
6505
|
if (lt()) return !0;
|
|
6506
6506
|
if (be && !be.complete)
|
|
6507
6507
|
return f.setPageLayerImportError(
|
|
@@ -6538,20 +6538,20 @@ const ex = We(function({
|
|
|
6538
6538
|
const pe = U.clientX, be = U.clientY, Te = t.x ?? 0, Ae = t.y ?? 0;
|
|
6539
6539
|
let me = !1;
|
|
6540
6540
|
const ye = (ft) => {
|
|
6541
|
-
const
|
|
6542
|
-
if (!(!me && Math.hypot(
|
|
6541
|
+
const Nt = (ft.clientX - pe) / f.zoom, kt = (ft.clientY - be) / f.zoom;
|
|
6542
|
+
if (!(!me && Math.hypot(Nt, kt) < 3)) {
|
|
6543
6543
|
if (!me) {
|
|
6544
6544
|
if (!f.beginFrameTransform(t.id, "move")) return;
|
|
6545
6545
|
me = !0;
|
|
6546
6546
|
}
|
|
6547
|
-
f.moveFrame(t.id, Te +
|
|
6547
|
+
f.moveFrame(t.id, Te + Nt, Ae + kt, !1);
|
|
6548
6548
|
}
|
|
6549
6549
|
}, qe = () => {
|
|
6550
6550
|
if (window.removeEventListener("mousemove", ye), window.removeEventListener("mouseup", qe), !me) return;
|
|
6551
|
-
const ft = t.x ?? 0,
|
|
6551
|
+
const ft = t.x ?? 0, Nt = t.y ?? 0, kt = ft + (t.width ?? 390), kn = Nt + Z;
|
|
6552
6552
|
for (const [An, nt] of _u()) {
|
|
6553
|
-
const wn = nt.explicit ? 0 : zu, go = nt.x0 - wn, bo = nt.y0 - wn,
|
|
6554
|
-
if (An !== t.section && ft <
|
|
6553
|
+
const wn = nt.explicit ? 0 : zu, go = nt.x0 - wn, bo = nt.y0 - wn, an = nt.x1 + wn, Yt = nt.y1 + wn;
|
|
6554
|
+
if (An !== t.section && ft < an && kt > go && Nt < Yt && kn > bo) {
|
|
6555
6555
|
f.setPageSection(t.id, An);
|
|
6556
6556
|
break;
|
|
6557
6557
|
}
|
|
@@ -6572,8 +6572,8 @@ const ex = We(function({
|
|
|
6572
6572
|
}
|
|
6573
6573
|
A.current = nt, T(nt);
|
|
6574
6574
|
}
|
|
6575
|
-
},
|
|
6576
|
-
window.removeEventListener("mousemove", ft), window.removeEventListener("mouseup",
|
|
6575
|
+
}, Nt = () => {
|
|
6576
|
+
window.removeEventListener("mousemove", ft), window.removeEventListener("mouseup", Nt);
|
|
6577
6577
|
const kt = A.current;
|
|
6578
6578
|
A.current = null, qe && kt && f.resizeFrame(t.id, kt, {
|
|
6579
6579
|
recordHistory: !1,
|
|
@@ -6581,8 +6581,8 @@ const ex = We(function({
|
|
|
6581
6581
|
resizeHeight: ye
|
|
6582
6582
|
}), T(null);
|
|
6583
6583
|
};
|
|
6584
|
-
window.addEventListener("mousemove", ft), window.addEventListener("mouseup",
|
|
6585
|
-
}, yn = t.frameSizeMode === "content" ||
|
|
6584
|
+
window.addEventListener("mousemove", ft), window.addEventListener("mouseup", Nt);
|
|
6585
|
+
}, yn = t.frameSizeMode === "content" || Pe || j && ge !== "detached", st = xd({
|
|
6586
6586
|
hasRoute: t.route != null,
|
|
6587
6587
|
layersImported: !!t.layersImported,
|
|
6588
6588
|
cacheHydrated: P,
|
|
@@ -6595,21 +6595,21 @@ const ex = We(function({
|
|
|
6595
6595
|
t.id
|
|
6596
6596
|
), $r = !t.layersImported || Ve != null, ut = (
|
|
6597
6597
|
// No live origin means no prepared checkout — see liveOriginReady.
|
|
6598
|
-
Zn && a && (He || st === "live" || ve || (
|
|
6598
|
+
Zn && a && (He || st === "live" || ve || (Pe && !Ot || // Hover intent while the artifact cache is still hydrating — or a
|
|
6599
6599
|
// flow session owes this screen — must not warm-boot the app: the
|
|
6600
6600
|
// capture that makes the boot unnecessary may simply not have
|
|
6601
6601
|
// arrived yet. Intent prepares the frozen mount.
|
|
6602
|
-
ie && !
|
|
6602
|
+
ie && !_t && !xt && !Be && !Qt) && t.route != null && $r && // A viewport-variant session owes the resized screen its exact-width
|
|
6603
6603
|
// replay; the live re-measure stays parked unless the session fails.
|
|
6604
|
-
!
|
|
6604
|
+
!on)
|
|
6605
6605
|
), at = ub({
|
|
6606
6606
|
// Keep a frame being prepared at its canvas position. Preparing it elsewhere
|
|
6607
6607
|
// would move the iframe to another parent on open, reload it, and waste the
|
|
6608
6608
|
// work. A provisionally imported page shows its tree in the frame instead,
|
|
6609
6609
|
// so its live producer boots offscreen.
|
|
6610
|
-
active: (
|
|
6610
|
+
active: (Pe || ie) && Ve == null,
|
|
6611
6611
|
live: ut
|
|
6612
|
-
}),
|
|
6612
|
+
}), qt = !o && tt && // A live slot only outranks the capture while live can actually run. The
|
|
6613
6613
|
// frame the designer works in claims a slot as soon as it is active, so
|
|
6614
6614
|
// before a checkout exists that claim suppressed the static surface and the
|
|
6615
6615
|
// live route could not render either — the frame sat empty in front of the
|
|
@@ -6621,7 +6621,7 @@ const ex = We(function({
|
|
|
6621
6621
|
// Hover intent mounts the frozen DOM so the activation click promotes
|
|
6622
6622
|
// through D2 (~50ms) instead of waiting on a live boot; an activation
|
|
6623
6623
|
// that arrived without the hover mounts it here and promotes on mount.
|
|
6624
|
-
preparedForPromotion: ie ||
|
|
6624
|
+
preparedForPromotion: ie || Ot,
|
|
6625
6625
|
preferDom: vh() === "dom"
|
|
6626
6626
|
}), ji = t.layersImported && f.pageRequiresLiveSharedPreview(t), ho = tt && f.frozenPreviewMutations().some((U) => !!U.staleReason);
|
|
6627
6627
|
se(() => {
|
|
@@ -6654,7 +6654,7 @@ const ex = We(function({
|
|
|
6654
6654
|
H.current = U, de(!1), $.current = !1, R.current = null, S.current = null, (async () => {
|
|
6655
6655
|
var pe;
|
|
6656
6656
|
try {
|
|
6657
|
-
const be = await
|
|
6657
|
+
const be = await sn();
|
|
6658
6658
|
Yc(be), de(!0);
|
|
6659
6659
|
const Te = p.current;
|
|
6660
6660
|
if ((Te ? he(Te) : !1) && await new Promise((ye) => {
|
|
@@ -6728,10 +6728,10 @@ const ex = We(function({
|
|
|
6728
6728
|
"data-frame-id": t.id,
|
|
6729
6729
|
"data-canonical-frame-id": t.importPageId ?? t.id,
|
|
6730
6730
|
"data-frame-active": n || void 0,
|
|
6731
|
-
"data-frame-detail-active":
|
|
6731
|
+
"data-frame-detail-active": Pe || void 0,
|
|
6732
6732
|
"data-preview-state": st,
|
|
6733
6733
|
"data-pyg-static-surface": Zt,
|
|
6734
|
-
"data-pyg-static-route": String(
|
|
6734
|
+
"data-pyg-static-route": String(qt),
|
|
6735
6735
|
"data-pyg-has-snapshot": String(tt),
|
|
6736
6736
|
"data-pyg-artifact": String(E != null),
|
|
6737
6737
|
"data-pyg-live-slot": String(!!He),
|
|
@@ -6827,12 +6827,12 @@ const ex = We(function({
|
|
|
6827
6827
|
position: "absolute",
|
|
6828
6828
|
inset: 0,
|
|
6829
6829
|
// display:none prevents layout and makes reproduction inaccurate.
|
|
6830
|
-
visibility: F &&
|
|
6830
|
+
visibility: F && Pe ? "visible" : "hidden"
|
|
6831
6831
|
},
|
|
6832
6832
|
children: vn
|
|
6833
6833
|
}
|
|
6834
6834
|
),
|
|
6835
|
-
F &&
|
|
6835
|
+
F && Pe ? null : /* @__PURE__ */ s(
|
|
6836
6836
|
"div",
|
|
6837
6837
|
{
|
|
6838
6838
|
"data-preview-arriving": !0,
|
|
@@ -6891,11 +6891,11 @@ const ex = We(function({
|
|
|
6891
6891
|
// page imported, and the frame then shows the authored placeholder —
|
|
6892
6892
|
// one empty div — while a 453KB snapshot of the real screen sits
|
|
6893
6893
|
// unused beside it. Measured: layerImportCount 1, snapshot present.
|
|
6894
|
-
(t.layerImportCount == null || t.layerImportCount > 1) && yn && (
|
|
6894
|
+
(t.layerImportCount == null || t.layerImportCount > 1) && yn && (Pe || t.route == null || ji) ? Pe ? Ce && $e != null ? /* @__PURE__ */ s(
|
|
6895
6895
|
yh,
|
|
6896
6896
|
{
|
|
6897
6897
|
page: t,
|
|
6898
|
-
snapshot:
|
|
6898
|
+
snapshot: $e,
|
|
6899
6899
|
height: Z,
|
|
6900
6900
|
onDocumentHeightChange: (U) => {
|
|
6901
6901
|
f.setPageDocumentHeight(t.id, U);
|
|
@@ -6907,7 +6907,7 @@ const ex = We(function({
|
|
|
6907
6907
|
}
|
|
6908
6908
|
},
|
|
6909
6909
|
`responsive:${t.id}:${c}`
|
|
6910
|
-
) : /* @__PURE__ */ s(Yl, { node: t.root }) : /* @__PURE__ */ s(Gl, { root: t.root }) : t.route != null &&
|
|
6910
|
+
) : /* @__PURE__ */ s(Yl, { node: t.root }) : /* @__PURE__ */ s(Gl, { root: t.root }) : t.route != null && qt ? (
|
|
6911
6911
|
// A detached frame renders at most a screenshot: the frozen DOM
|
|
6912
6912
|
// preview stays unmounted until the tier reattaches.
|
|
6913
6913
|
(Zt === "screenshot" || ge === "detached") && xe ? /* @__PURE__ */ s(
|
|
@@ -6975,7 +6975,7 @@ const ex = We(function({
|
|
|
6975
6975
|
},
|
|
6976
6976
|
`snapshot:${q}`
|
|
6977
6977
|
) : null
|
|
6978
|
-
) : yn ? t.route == null || t.layersImported ?
|
|
6978
|
+
) : yn ? t.route == null || t.layersImported ? Pe ? /* @__PURE__ */ s(Yl, { node: t.root }) : /* @__PURE__ */ s(Gl, { root: t.root }) : /* @__PURE__ */ g(
|
|
6979
6979
|
"div",
|
|
6980
6980
|
{
|
|
6981
6981
|
role: "status",
|
|
@@ -7433,9 +7433,9 @@ ${l}` : l;
|
|
|
7433
7433
|
}
|
|
7434
7434
|
class fx {
|
|
7435
7435
|
constructor() {
|
|
7436
|
-
|
|
7437
|
-
|
|
7438
|
-
|
|
7436
|
+
dn(this, "status", "idle");
|
|
7437
|
+
dn(this, "pending", 0);
|
|
7438
|
+
dn(this, "message", "");
|
|
7439
7439
|
Ch(this);
|
|
7440
7440
|
}
|
|
7441
7441
|
setPending(t) {
|
|
@@ -7967,7 +7967,7 @@ function fs({
|
|
|
7967
7967
|
}
|
|
7968
7968
|
);
|
|
7969
7969
|
}
|
|
7970
|
-
function
|
|
7970
|
+
function $t({
|
|
7971
7971
|
label: e,
|
|
7972
7972
|
value: t,
|
|
7973
7973
|
min: n = 0,
|
|
@@ -8065,16 +8065,16 @@ function mc({
|
|
|
8065
8065
|
const J = Ie(n);
|
|
8066
8066
|
J.current = n;
|
|
8067
8067
|
const je = X.buildApplyPayload(), Ne = JSON.stringify(je), ze = Ex(je), tt = JSON.stringify(ze);
|
|
8068
|
-
function
|
|
8068
|
+
function Pe() {
|
|
8069
8069
|
var h;
|
|
8070
8070
|
(h = B.current) == null || h.cleanup(), B.current = null;
|
|
8071
8071
|
}
|
|
8072
|
-
const Se = !!e,
|
|
8072
|
+
const Se = !!e, $e = Se ? ((gl = e.current) == null ? void 0 : gl.contentDocument) ?? null : ((bl = t == null ? void 0 : t.current) == null ? void 0 : bl.ownerDocument) ?? null, Ce = ($e == null ? void 0 : $e.defaultView) ?? null, Ke = Ft(() => fa(Ze()), []), zt = Ft(
|
|
8073
8073
|
() => Object.entries(Ze()).filter(
|
|
8074
8074
|
([h, y]) => /^[A-Z][A-Za-z0-9_$]*$/.test(h) && !!y.importPath && Sl(h) != null
|
|
8075
8075
|
).sort(([h], [y]) => h.localeCompare(y)),
|
|
8076
8076
|
[]
|
|
8077
|
-
),
|
|
8077
|
+
), on = Ft(() => {
|
|
8078
8078
|
const h = vi(), y = {};
|
|
8079
8079
|
for (const [C, _] of Object.entries(Ix))
|
|
8080
8080
|
y[C] = h.filter((L) => _.test(L.name));
|
|
@@ -8124,18 +8124,18 @@ function mc({
|
|
|
8124
8124
|
y = !0;
|
|
8125
8125
|
};
|
|
8126
8126
|
}, [tt]), se(() => ge(), [a]), se(() => {
|
|
8127
|
-
|
|
8127
|
+
Pe(), S(null), R("original"), A("default"), T("item"), W(null), re(""), O(""), we(a ? Nl(a) ?? 0 : 0);
|
|
8128
8128
|
}, [a]), se(() => {
|
|
8129
|
-
|
|
8129
|
+
Pe();
|
|
8130
8130
|
const h = a != null && a.isConnected ? a : null;
|
|
8131
8131
|
if (h) {
|
|
8132
8132
|
if (v == null && $ === "original" && H === "default") {
|
|
8133
8133
|
window.requestAnimationFrame(() => ge());
|
|
8134
8134
|
return;
|
|
8135
8135
|
}
|
|
8136
|
-
return B.current = zx(h, { repeat: v, text: $, state: H }), ge(), () =>
|
|
8136
|
+
return B.current = zx(h, { repeat: v, text: $, state: H }), ge(), () => Pe();
|
|
8137
8137
|
}
|
|
8138
|
-
}, [a, v, $, H]), se(() => () =>
|
|
8138
|
+
}, [a, v, $, H]), se(() => () => Pe(), []), se(() => {
|
|
8139
8139
|
const h = [window];
|
|
8140
8140
|
Se && Ce && Ce !== window && h.push(Ce), !Se && (t != null && t.current) && h.push(t.current);
|
|
8141
8141
|
const y = () => ge();
|
|
@@ -8180,9 +8180,9 @@ function mc({
|
|
|
8180
8180
|
ne(!0);
|
|
8181
8181
|
const h = window.setTimeout(() => ne(!1), 1800);
|
|
8182
8182
|
return () => window.clearTimeout(h);
|
|
8183
|
-
}, [X.toastSeq]),
|
|
8183
|
+
}, [X.toastSeq]), !$e || !Ce)
|
|
8184
8184
|
return /* @__PURE__ */ s("div", { ref: r, className: "absolute inset-0 flex items-start justify-center pt-10", children: Se && /* @__PURE__ */ s("span", { className: "rounded bg-black/70 px-3 py-1.5 text-[12px] text-white", children: "Cross-origin applications cannot be inspected." }) });
|
|
8185
|
-
const
|
|
8185
|
+
const Qt = Se ? $e.body : (t == null ? void 0 : t.current) ?? null, _t = (h) => {
|
|
8186
8186
|
if (Se) {
|
|
8187
8187
|
const C = e.current;
|
|
8188
8188
|
if (!C) return null;
|
|
@@ -8193,10 +8193,10 @@ function mc({
|
|
|
8193
8193
|
}
|
|
8194
8194
|
const y = t == null ? void 0 : t.current;
|
|
8195
8195
|
if (!y) return null;
|
|
8196
|
-
for (const C of
|
|
8196
|
+
for (const C of $e.elementsFromPoint(h.clientX, h.clientY))
|
|
8197
8197
|
if (C.nodeType === 1 && y.contains(C) && C !== y) return C;
|
|
8198
8198
|
return null;
|
|
8199
|
-
},
|
|
8199
|
+
}, xt = (h) => {
|
|
8200
8200
|
var C;
|
|
8201
8201
|
if (Se) return { left: h.left, top: h.top, width: h.width, height: h.height };
|
|
8202
8202
|
const y = (C = r.current) == null ? void 0 : C.getBoundingClientRect();
|
|
@@ -8208,7 +8208,7 @@ function mc({
|
|
|
8208
8208
|
return C ? `${_}.${C}` : _;
|
|
8209
8209
|
}, He = (h) => {
|
|
8210
8210
|
const y = [];
|
|
8211
|
-
for (let C = h; C && C !==
|
|
8211
|
+
for (let C = h; C && C !== Qt && y.length < 8; C = C.parentElement)
|
|
8212
8212
|
y.unshift(C);
|
|
8213
8213
|
return y;
|
|
8214
8214
|
}, En = (h) => {
|
|
@@ -8217,11 +8217,11 @@ function mc({
|
|
|
8217
8217
|
return;
|
|
8218
8218
|
}
|
|
8219
8219
|
l(h), Oe.current = h.textContent ?? "", h.setAttribute("contenteditable", "plaintext-only"), h.isContentEditable || h.setAttribute("contenteditable", "true"), d(h), h.focus();
|
|
8220
|
-
const y =
|
|
8220
|
+
const y = $e.createRange();
|
|
8221
8221
|
y.selectNodeContents(h);
|
|
8222
8222
|
const C = Ce.getSelection();
|
|
8223
8223
|
C == null || C.removeAllRanges(), C == null || C.addRange(y);
|
|
8224
|
-
},
|
|
8224
|
+
}, Ot = (h, y) => {
|
|
8225
8225
|
var C;
|
|
8226
8226
|
lt && (X.recordStyle(
|
|
8227
8227
|
lt,
|
|
@@ -8272,17 +8272,17 @@ function mc({
|
|
|
8272
8272
|
} catch (L) {
|
|
8273
8273
|
X.toast(`Apply failed:${String(L).slice(0, 80)}`);
|
|
8274
8274
|
}
|
|
8275
|
-
}, D = a != null && a.isConnected ? a : null,
|
|
8275
|
+
}, D = a != null && a.isConnected ? a : null, sn = o != null && o.isConnected ? o : null, he = D != null && D.parentElement && D.parentElement !== Qt ? D.parentElement : null, lt = N === "container" && he ? he : D, te = D ? xt(D.getBoundingClientRect()) : null, G = he ? xt(he.getBoundingClientRect()) : null, er = N === "container" && lt && lt !== D ? xt(lt.getBoundingClientRect()) : null, yn = sn && sn !== D ? xt(sn.getBoundingClientRect()) : null, st = D ? Ce.getComputedStyle(D) : null, Ve = he ? Ce.getComputedStyle(he) : null, $r = lt ? Ce.getComputedStyle(lt) : null, ut = D ? Be(D) : "", at = D ? Ke(D) : null, qt = D ? Mh(D) : null, Zt = D ? X.structuralEditKind(D) : null, ji = D ? X.hasPendingValueEdit(D) : !1, ho = D ? X.structuralBlockReason(D, "insert") : "No elements are selected.", po = D ? X.structuralBlockReason(D, "remove") : "No elements are selected.", Pr = D ? X.structuralBlockReason(D, "move") : "No elements are selected.", vn = D && D.parentElement ? Array.from(D.parentElement.children).indexOf(D) : -1, mo = ((xl = D == null ? void 0 : D.parentElement) == null ? void 0 : xl.children.length) ?? 0, U = at ? Ze()[at.name] ?? null : null, pe = qt && /^[A-Z]/.test(qt.elementName) ? (at == null ? void 0 : at.name) ?? null : null, be = D ? X.componentInsertBlockReason(D, pe) : "No elements are selected.", Te = de.trim().toLocaleLowerCase(), Ae = zt.filter(
|
|
8276
8276
|
([h, y]) => !Te || h.toLocaleLowerCase().includes(Te) || y.importPath.toLocaleLowerCase().includes(Te)
|
|
8277
|
-
), me = Ae.find(([h]) => h === Ee) ?? Ae[0] ?? null, ye = (me == null ? void 0 : me[1]) ?? null, qe = me ? Sl(me[0]) : null,
|
|
8277
|
+
), me = Ae.find(([h]) => h === Ee) ?? Ae[0] ?? null, ye = (me == null ? void 0 : me[1]) ?? null, qe = me ? Sl(me[0]) : null, Nt = (D ? Nl(D) : null) ?? 0, kt = D ? Lx(D, (at == null ? void 0 : at.props) ?? null, U) : !1, kn = D ? Dx(D, (at == null ? void 0 : at.props) ?? null, U) : [], An = D ? Ju(D) : [], nt = { count: An.length }, wn = Me && D && sn && sn !== D ? [D, sn] : null, go = X.entries, bo = Object.entries((at == null ? void 0 : at.primitiveProps) ?? {}), an = je, Yt = go.reduce((h, y) => {
|
|
8278
8278
|
const C = h.find((_) => _.el === y.el);
|
|
8279
8279
|
return C ? (C.label = y.label, C.items.push(y)) : h.push({ id: y.id, el: y.el, label: y.label, items: [y] }), h;
|
|
8280
|
-
}, []), xo =
|
|
8280
|
+
}, []), xo = an.styles.length + an.texts.length + an.operations.length, yo = Vo() != null, Wi = yo && E !== Ne, wf = Yt.filter(
|
|
8281
8281
|
(h) => h.items.some((y) => !Qi(y))
|
|
8282
|
-
).length, Hi = v != null || $ !== "original" || H !== "default", Mr = Hi && D ? jx(D, Ce) : null, Ge = Ox(Ve), tr = Ge != null,
|
|
8282
|
+
).length, Hi = v != null || $ !== "original" || H !== "default", Mr = Hi && D ? jx(D, Ce) : null, Ge = Ox(Ve), tr = Ge != null, It = Bx(he), ln = j === "custom" ? z.minWidth != null || z.maxWidth != null ? {
|
|
8283
8283
|
...z.minWidth != null ? { minWidth: Math.max(0, Math.round(z.minWidth)) } : {},
|
|
8284
8284
|
...z.maxWidth != null ? { maxWidth: Math.max(0, Math.round(z.maxWidth)) } : {}
|
|
8285
|
-
} : null : ((yl = uc.find((h) => h.id === j)) == null ? void 0 : yl.media) ?? null, Vi = An.filter((h) => h.isConnected && Ce.getComputedStyle(h).getPropertyValue("display") !== "none").map((h, y) => ({ el: h, index: y, rect:
|
|
8285
|
+
} : null : ((yl = uc.find((h) => h.id === j)) == null ? void 0 : yl.media) ?? null, Vi = An.filter((h) => h.isConnected && Ce.getComputedStyle(h).getPropertyValue("display") !== "none").map((h, y) => ({ el: h, index: y, rect: xt(h.getBoundingClientRect()) })).filter(({ rect: h }) => h.width > 0 && h.height > 0), Ki = Vi.slice().sort((h, y) => h.rect.top - y.rect.top || h.rect.left - y.rect.left).reduce((h, y) => {
|
|
8286
8286
|
const C = h.find((_) => Math.abs(_.top - y.rect.top) < 6);
|
|
8287
8287
|
return C ? (C.top = Math.min(C.top, y.rect.top), C.bottom = Math.max(C.bottom, y.rect.top + y.rect.height), C.left = Math.min(C.left, y.rect.left), C.right = Math.max(C.right, y.rect.left + y.rect.width), C.items.push(y), C.items.sort((_, L) => _.rect.left - L.rect.left)) : h.push({
|
|
8288
8288
|
top: y.rect.top,
|
|
@@ -8305,33 +8305,33 @@ function mc({
|
|
|
8305
8305
|
width: Math.max(16, Math.min(h.right, C.right) - Math.max(h.left, C.left)),
|
|
8306
8306
|
height: Math.max(0, C.top - h.bottom)
|
|
8307
8307
|
};
|
|
8308
|
-
}),
|
|
8308
|
+
}), cn = Math.max(0, At(Ve, "column-gap", At(Ve, "gap"))), Er = Math.max(0, At(Ve, "row-gap", At(Ve, "gap"))), Ct = {
|
|
8309
8309
|
top: Math.max(0, At(Ve, "padding-top")),
|
|
8310
8310
|
right: Math.max(0, At(Ve, "padding-right")),
|
|
8311
8311
|
bottom: Math.max(0, At(Ve, "padding-bottom")),
|
|
8312
8312
|
left: Math.max(0, At(Ve, "padding-left"))
|
|
8313
|
-
}, If =
|
|
8313
|
+
}, If = Ct.left, Cf = Ct.top, kr = (Ve == null ? void 0 : Ve.getPropertyValue("justify-content")) || "normal", il = (Ve == null ? void 0 : Ve.getPropertyValue("align-items")) || "normal", Ui = (Ve == null ? void 0 : Ve.getPropertyValue("flex-direction")) || "row", $f = pc(Ui.includes("column") ? il : kr), Pf = pc(Ui.includes("column") ? kr : il), Mf = zo(
|
|
8314
8314
|
(he == null ? void 0 : he.style.getPropertyValue("width")) || (G && G.width >= window.innerWidth * 0.8 ? "100%" : ""),
|
|
8315
8315
|
(G == null ? void 0 : G.width) ?? 0
|
|
8316
8316
|
), Ef = zo(
|
|
8317
8317
|
(he == null ? void 0 : he.style.getPropertyValue("height")) || "",
|
|
8318
8318
|
(G == null ? void 0 : G.height) ?? 0
|
|
8319
|
-
), kf = zo((D == null ? void 0 : D.style.getPropertyValue("width")) || "", (te == null ? void 0 : te.width) ?? 0), Af = zo((D == null ? void 0 : D.style.getPropertyValue("height")) || "", (te == null ? void 0 : te.height) ?? 0), sl = (st == null ? void 0 : st.getPropertyValue("align-self")) || "auto", Rf = At(st, "order"), Ar = (D == null ? void 0 : D.style.getPropertyValue("grid-column")) || (st == null ? void 0 : st.getPropertyValue("grid-column")) || "auto", al = Number(((vl = /span\s+(\d+)/.exec(Ar)) == null ? void 0 : vl[1]) ?? 1), qi = (st == null ? void 0 : st.getPropertyValue("position")) === "absolute", nr = us(he, (te == null ? void 0 : te.width) ?? 240),
|
|
8319
|
+
), kf = zo((D == null ? void 0 : D.style.getPropertyValue("width")) || "", (te == null ? void 0 : te.width) ?? 0), Af = zo((D == null ? void 0 : D.style.getPropertyValue("height")) || "", (te == null ? void 0 : te.height) ?? 0), sl = (st == null ? void 0 : st.getPropertyValue("align-self")) || "auto", Rf = At(st, "order"), Ar = (D == null ? void 0 : D.style.getPropertyValue("grid-column")) || (st == null ? void 0 : st.getPropertyValue("grid-column")) || "auto", al = Number(((vl = /span\s+(\d+)/.exec(Ar)) == null ? void 0 : vl[1]) ?? 1), qi = (st == null ? void 0 : st.getPropertyValue("position")) === "absolute", nr = us(he, (te == null ? void 0 : te.width) ?? 240), yt = v ?? Math.max(1, nt.count), vo = Math.max(
|
|
8320
8320
|
0,
|
|
8321
|
-
((G == null ? void 0 : G.width) ?? 0) -
|
|
8321
|
+
((G == null ? void 0 : G.width) ?? 0) - Ct.left - Ct.right
|
|
8322
8322
|
), Tf = Math.max(
|
|
8323
8323
|
1,
|
|
8324
8324
|
Math.min(
|
|
8325
|
-
|
|
8326
|
-
Math.floor((vo +
|
|
8325
|
+
yt,
|
|
8326
|
+
Math.floor((vo + cn) / (nr + cn))
|
|
8327
8327
|
)
|
|
8328
|
-
), wo = Ge === "stack" ? 1 : Ge === "scroll" ?
|
|
8328
|
+
), wo = Ge === "stack" ? 1 : Ge === "scroll" ? yt : It ?? Tf, Ff = Ge === "scroll" ? 1 : Math.max(1, Math.ceil(yt / Math.max(1, wo))), ll = Ge === "stack" ? vo : Ge === "scroll" ? Math.max(nr, (te == null ? void 0 : te.width) ?? 0) : Math.max(
|
|
8329
8329
|
0,
|
|
8330
|
-
(vo -
|
|
8330
|
+
(vo - cn * Math.max(0, wo - 1)) / Math.max(1, wo)
|
|
8331
8331
|
), Yi = Math.max(
|
|
8332
8332
|
0,
|
|
8333
|
-
(vo -
|
|
8334
|
-
), cl = Math.max(80, Math.floor(Yi)), Lf = Yi < 160, dl = Ge === "grid" &&
|
|
8333
|
+
(vo - cn * Math.max(0, yt - 1)) / yt
|
|
8334
|
+
), cl = Math.max(80, Math.floor(Yi)), Lf = Yi < 160, dl = Ge === "grid" && It === yt, Df = Ge === "scroll" ? `${yt} items · horizontal scroll · ${Math.round(ll)}px cards` : `${yt} items · ${Ff} rows × ${wo} columns · about ${Math.round(ll)}px each`, zf = u === "cases" && !m && !!he && !!G && !!te, Rn = !!he && he.scrollWidth > he.clientWidth + 1 && !["auto", "scroll"].includes((Ve == null ? void 0 : Ve.getPropertyValue("overflow-x")) ?? ""), ul = [
|
|
8335
8335
|
v != null ? `${v} items` : null,
|
|
8336
8336
|
$ === "long" ? "long text" : $ === "extreme" ? "extreme text" : null,
|
|
8337
8337
|
H === "selected" ? "selection status" : H === "disabled" ? "inactive" : H === "loading" ? "loading status" : null
|
|
@@ -8354,7 +8354,7 @@ function mc({
|
|
|
8354
8354
|
h,
|
|
8355
8355
|
y,
|
|
8356
8356
|
Be(he),
|
|
8357
|
-
|
|
8357
|
+
ln,
|
|
8358
8358
|
J.current
|
|
8359
8359
|
);
|
|
8360
8360
|
}, rt = (h, y) => {
|
|
@@ -8364,7 +8364,7 @@ function mc({
|
|
|
8364
8364
|
h,
|
|
8365
8365
|
y,
|
|
8366
8366
|
Be(D),
|
|
8367
|
-
|
|
8367
|
+
ln,
|
|
8368
8368
|
J.current
|
|
8369
8369
|
), (C = B.current) == null || C.mirrorStyle(D, h, y));
|
|
8370
8370
|
}, Gi = (h) => {
|
|
@@ -8378,7 +8378,7 @@ function mc({
|
|
|
8378
8378
|
T("container"), X.toast(`${y.label}change to batch`);
|
|
8379
8379
|
}
|
|
8380
8380
|
}, Rr = (h) => {
|
|
8381
|
-
!he || !D || (Xe("display", "grid"), Xe("grid-template-columns", `repeat(${h}, minmax(0, 1fr))`), rt("width", "auto"), rt("min-width", "0"), X.toast(`Maximum ${h} per row · ${Ln(
|
|
8381
|
+
!he || !D || (Xe("display", "grid"), Xe("grid-template-columns", `repeat(${h}, minmax(0, 1fr))`), rt("width", "auto"), rt("min-width", "0"), X.toast(`Maximum ${h} per row · ${Ln(ln)}`));
|
|
8382
8382
|
}, Io = (h) => {
|
|
8383
8383
|
if (!he || !D) return;
|
|
8384
8384
|
const y = Math.max(
|
|
@@ -8390,10 +8390,10 @@ function mc({
|
|
|
8390
8390
|
)
|
|
8391
8391
|
)
|
|
8392
8392
|
);
|
|
8393
|
-
Xe("display", "grid"), Xe("grid-template-columns", `repeat(auto-fit, minmax(min(${y}px, 100%), 1fr))`), rt("width", "auto"), rt("min-width", "0"), X.toast(`Automatic columns · minimum ${y}px · ${Ln(
|
|
8393
|
+
Xe("display", "grid"), Xe("grid-template-columns", `repeat(auto-fit, minmax(min(${y}px, 100%), 1fr))`), rt("width", "auto"), rt("min-width", "0"), X.toast(`Automatic columns · minimum ${y}px · ${Ln(ln)}`);
|
|
8394
8394
|
}, Xi = (h, y) => {
|
|
8395
8395
|
if (!he) return;
|
|
8396
|
-
const C = he.style.getPropertyValue(h), _ = h === "column-gap" ?
|
|
8396
|
+
const C = he.style.getPropertyValue(h), _ = h === "column-gap" ? cn : h === "row-gap" ? Er : Ct[h.replace("padding-", "")];
|
|
8397
8397
|
let L = _;
|
|
8398
8398
|
const ce = h === "column-gap" || h === "padding-left" || h === "padding-right", ue = h === "padding-right" || h === "padding-bottom" ? -1 : 1;
|
|
8399
8399
|
W(h), h.startsWith("padding-") && q(!1), No(
|
|
@@ -8490,7 +8490,7 @@ function mc({
|
|
|
8490
8490
|
L,
|
|
8491
8491
|
ce,
|
|
8492
8492
|
Be(y),
|
|
8493
|
-
|
|
8493
|
+
ln,
|
|
8494
8494
|
J.current
|
|
8495
8495
|
), (_ = B.current) == null || _.mirrorStyle(y, L, ce);
|
|
8496
8496
|
X.toast(h === "wrap" ? "Change to multi-line content" : "Change to one line abbreviation");
|
|
@@ -8519,7 +8519,7 @@ function mc({
|
|
|
8519
8519
|
pointerEvents: "none"
|
|
8520
8520
|
}), rr = { lines: [], labels: [] };
|
|
8521
8521
|
if (wn) {
|
|
8522
|
-
const h =
|
|
8522
|
+
const h = xt(wn[0].getBoundingClientRect()), y = xt(wn[1].getBoundingClientRect()), C = h.left + h.width, _ = h.top + h.height, L = y.left + y.width, ce = y.top + y.height, ue = C <= y.left ? { from: C, to: y.left } : L <= h.left ? { from: L, to: h.left } : null, _e = _ <= y.top ? { from: _, to: y.top } : ce <= h.top ? { from: ce, to: h.top } : null;
|
|
8523
8523
|
if (ue && ue.to - ue.from > 0.5) {
|
|
8524
8524
|
const ht = ue.to - ue.from, Sn = Math.max(h.top, y.top), Nn = Math.min(_, ce), Fr = Nn > Sn ? (Sn + Nn) / 2 : (h.top + _ + y.top + ce) / 4;
|
|
8525
8525
|
rr.lines.push({ left: ue.from, top: Fr - 0.5, width: ht, height: 1 }), rr.labels.push({ x: ue.from + ht / 2, y: Fr, text: `${Math.round(ht)}px` });
|
|
@@ -8542,18 +8542,18 @@ function mc({
|
|
|
8542
8542
|
"data-inspect-layer": !0,
|
|
8543
8543
|
className: "absolute inset-0",
|
|
8544
8544
|
style: { cursor: "crosshair", pointerEvents: c ? "none" : "auto" },
|
|
8545
|
-
onMouseMove: (h) => i(
|
|
8545
|
+
onMouseMove: (h) => i(_t(h)),
|
|
8546
8546
|
onMouseLeave: () => i(null),
|
|
8547
8547
|
onWheel: (h) => {
|
|
8548
8548
|
var y;
|
|
8549
8549
|
Se ? Ce.scrollBy(h.deltaX, h.deltaY) : (y = t == null ? void 0 : t.current) == null || y.scrollBy(h.deltaX, h.deltaY);
|
|
8550
8550
|
},
|
|
8551
8551
|
onClick: (h) => {
|
|
8552
|
-
const y =
|
|
8552
|
+
const y = _t(h);
|
|
8553
8553
|
y && l(y);
|
|
8554
8554
|
},
|
|
8555
8555
|
onDoubleClick: (h) => {
|
|
8556
|
-
const y =
|
|
8556
|
+
const y = _t(h);
|
|
8557
8557
|
y && ds(y) && En(y);
|
|
8558
8558
|
}
|
|
8559
8559
|
}
|
|
@@ -8627,8 +8627,8 @@ function mc({
|
|
|
8627
8627
|
},
|
|
8628
8628
|
className: `rounded px-1.5 py-0.5 text-[10px] font-semibold text-white ${Rn ? "bg-[#f24822]" : "bg-[#9747ff]"}`,
|
|
8629
8629
|
children: [
|
|
8630
|
-
|
|
8631
|
-
|
|
8630
|
+
It ? `maximum${It}row/row` : `Automatic Placement Minimum${nr}px`,
|
|
8631
|
+
ln && ` · ${Ln(ln)}`
|
|
8632
8632
|
]
|
|
8633
8633
|
}
|
|
8634
8634
|
),
|
|
@@ -8645,7 +8645,7 @@ function mc({
|
|
|
8645
8645
|
top: h.top + 8,
|
|
8646
8646
|
zIndex: 13
|
|
8647
8647
|
},
|
|
8648
|
-
className: `flex h-[22px] w-[22px] items-center justify-center rounded-full border text-[12px] font-bold shadow-sm ${
|
|
8648
|
+
className: `flex h-[22px] w-[22px] items-center justify-center rounded-full border text-[12px] font-bold shadow-sm ${It === y + 1 ? "border-[#9747ff] bg-[#9747ff] text-white" : "border-[#c4b5fd] bg-white text-[#7c3aed] hover:bg-[#f5f3ff]"}`,
|
|
8649
8649
|
onClick: (C) => {
|
|
8650
8650
|
C.stopPropagation(), Rr(y + 1);
|
|
8651
8651
|
},
|
|
@@ -8674,8 +8674,8 @@ function mc({
|
|
|
8674
8674
|
{
|
|
8675
8675
|
type: "button",
|
|
8676
8676
|
"data-case-column-gap-handle": y,
|
|
8677
|
-
"aria-label": `column spacing${Math.round(
|
|
8678
|
-
title: `column spacing${Math.round(
|
|
8677
|
+
"aria-label": `column spacing${Math.round(cn)}px`,
|
|
8678
|
+
title: `column spacing${Math.round(cn)}px`,
|
|
8679
8679
|
style: {
|
|
8680
8680
|
position: "absolute",
|
|
8681
8681
|
left: h.left + h.width / 2,
|
|
@@ -8688,7 +8688,7 @@ function mc({
|
|
|
8688
8688
|
onPointerEnter: () => W("column-gap"),
|
|
8689
8689
|
onPointerLeave: () => W(null),
|
|
8690
8690
|
onPointerDown: (C) => Xi("column-gap", C),
|
|
8691
|
-
children: Math.round(
|
|
8691
|
+
children: Math.round(cn)
|
|
8692
8692
|
}
|
|
8693
8693
|
)
|
|
8694
8694
|
] }, `column-gap-${h.key}`)),
|
|
@@ -8734,32 +8734,32 @@ function mc({
|
|
|
8734
8734
|
[
|
|
8735
8735
|
{
|
|
8736
8736
|
side: "top",
|
|
8737
|
-
value:
|
|
8737
|
+
value: Ct.top,
|
|
8738
8738
|
left: G.left + G.width / 2,
|
|
8739
|
-
top: G.top + Math.max(
|
|
8739
|
+
top: G.top + Math.max(Ct.top / 2, 16),
|
|
8740
8740
|
cursor: "ns-resize",
|
|
8741
8741
|
className: "h-[18px] min-w-[26px] -translate-x-1/2 -translate-y-1/2"
|
|
8742
8742
|
},
|
|
8743
8743
|
{
|
|
8744
8744
|
side: "right",
|
|
8745
|
-
value:
|
|
8746
|
-
left: G.left + G.width - Math.max(
|
|
8745
|
+
value: Ct.right,
|
|
8746
|
+
left: G.left + G.width - Math.max(Ct.right / 2, 24),
|
|
8747
8747
|
top: G.top + G.height / 2,
|
|
8748
8748
|
cursor: "ew-resize",
|
|
8749
8749
|
className: "h-[26px] min-w-[20px] -translate-x-1/2 -translate-y-1/2"
|
|
8750
8750
|
},
|
|
8751
8751
|
{
|
|
8752
8752
|
side: "bottom",
|
|
8753
|
-
value:
|
|
8753
|
+
value: Ct.bottom,
|
|
8754
8754
|
left: G.left + G.width / 2,
|
|
8755
|
-
top: G.top + G.height - Math.max(
|
|
8755
|
+
top: G.top + G.height - Math.max(Ct.bottom / 2, 16),
|
|
8756
8756
|
cursor: "ns-resize",
|
|
8757
8757
|
className: "h-[18px] min-w-[26px] -translate-x-1/2 -translate-y-1/2"
|
|
8758
8758
|
},
|
|
8759
8759
|
{
|
|
8760
8760
|
side: "left",
|
|
8761
|
-
value:
|
|
8762
|
-
left: G.left + Math.max(
|
|
8761
|
+
value: Ct.left,
|
|
8762
|
+
left: G.left + Math.max(Ct.left / 2, 24),
|
|
8763
8763
|
top: G.top + G.height / 2,
|
|
8764
8764
|
cursor: "ew-resize",
|
|
8765
8765
|
className: "h-[26px] min-w-[20px] -translate-x-1/2 -translate-y-1/2"
|
|
@@ -8987,13 +8987,13 @@ function mc({
|
|
|
8987
8987
|
/* @__PURE__ */ s(fs, { active: u === "edit", onClick: () => p("edit"), children: "Edit" }),
|
|
8988
8988
|
/* @__PURE__ */ g(fs, { active: u === "source", onClick: () => p("source"), children: [
|
|
8989
8989
|
"Changes ",
|
|
8990
|
-
|
|
8990
|
+
Yt.length > 0 ? Yt.length : ""
|
|
8991
8991
|
] })
|
|
8992
8992
|
] })
|
|
8993
8993
|
] }),
|
|
8994
8994
|
!m && /* @__PURE__ */ s(Ue, { children: (!D || !st) && u !== "source" ? /* @__PURE__ */ g("div", { className: "flex min-h-0 flex-1 flex-col", children: [
|
|
8995
8995
|
/* @__PURE__ */ s("div", { className: "px-4 py-8 text-center text-[12px] leading-relaxed text-[#71717a]", children: "Select an element on the canvas." }),
|
|
8996
|
-
|
|
8996
|
+
Yt.length > 0 && /* @__PURE__ */ g(
|
|
8997
8997
|
"button",
|
|
8998
8998
|
{
|
|
8999
8999
|
type: "button",
|
|
@@ -9001,7 +9001,7 @@ function mc({
|
|
|
9001
9001
|
onClick: () => p("source"),
|
|
9002
9002
|
children: [
|
|
9003
9003
|
"Review ",
|
|
9004
|
-
|
|
9004
|
+
Yt.length,
|
|
9005
9005
|
" changes"
|
|
9006
9006
|
]
|
|
9007
9007
|
}
|
|
@@ -9037,7 +9037,7 @@ function mc({
|
|
|
9037
9037
|
/* @__PURE__ */ g("div", { className: `mt-1 text-[9px] ${Rn ? "text-[#9a3412]" : "text-[#64748b]"}`, children: [
|
|
9038
9038
|
ul.length > 0 ? ul.join(" · ") : "Current data",
|
|
9039
9039
|
" · ",
|
|
9040
|
-
Ln(
|
|
9040
|
+
Ln(ln)
|
|
9041
9041
|
] })
|
|
9042
9042
|
]
|
|
9043
9043
|
}
|
|
@@ -9106,7 +9106,7 @@ function mc({
|
|
|
9106
9106
|
className: `h-7 rounded-md text-[10px] font-semibold ${v === h ? "bg-[#0d99ff] text-white" : "bg-[#f4f4f5] text-[#52525b] hover:bg-[#e9e9ee]"}`,
|
|
9107
9107
|
onClick: () => {
|
|
9108
9108
|
if (h == null) {
|
|
9109
|
-
|
|
9109
|
+
Pe(), S(null), ge();
|
|
9110
9110
|
return;
|
|
9111
9111
|
}
|
|
9112
9112
|
So(h);
|
|
@@ -9186,7 +9186,7 @@ function mc({
|
|
|
9186
9186
|
Je,
|
|
9187
9187
|
{
|
|
9188
9188
|
title: "Screen scope · Breakpoint",
|
|
9189
|
-
action: /* @__PURE__ */ s("span", { className: "text-[10px] tabular-nums text-[#71717a]", children: Ln(
|
|
9189
|
+
action: /* @__PURE__ */ s("span", { className: "text-[10px] tabular-nums text-[#71717a]", children: Ln(ln) }),
|
|
9190
9190
|
children: [
|
|
9191
9191
|
/* @__PURE__ */ g("div", { className: "grid grid-cols-5 gap-1", children: [
|
|
9192
9192
|
uc.map((h) => /* @__PURE__ */ s(
|
|
@@ -9213,7 +9213,7 @@ function mc({
|
|
|
9213
9213
|
] }),
|
|
9214
9214
|
j === "custom" && /* @__PURE__ */ g("div", { className: "mt-1.5 grid grid-cols-2 gap-1", children: [
|
|
9215
9215
|
/* @__PURE__ */ s(
|
|
9216
|
-
|
|
9216
|
+
$t,
|
|
9217
9217
|
{
|
|
9218
9218
|
label: "Min",
|
|
9219
9219
|
value: z.minWidth ?? 0,
|
|
@@ -9224,7 +9224,7 @@ function mc({
|
|
|
9224
9224
|
}
|
|
9225
9225
|
),
|
|
9226
9226
|
/* @__PURE__ */ s(
|
|
9227
|
-
|
|
9227
|
+
$t,
|
|
9228
9228
|
{
|
|
9229
9229
|
label: "Max",
|
|
9230
9230
|
value: z.maxWidth ?? 0,
|
|
@@ -9261,15 +9261,15 @@ function mc({
|
|
|
9261
9261
|
"button",
|
|
9262
9262
|
{
|
|
9263
9263
|
type: "button",
|
|
9264
|
-
"aria-label": `Fit all ${
|
|
9264
|
+
"aria-label": `Fit all ${yt} items in one row`,
|
|
9265
9265
|
"aria-pressed": dl,
|
|
9266
9266
|
className: `w-full rounded-lg border px-3 py-2.5 text-left ${dl ? "border-[#7c3aed] bg-[#f5f3ff] text-[#5b21b6]" : "border-[#dedee3] bg-white text-[#27272a] hover:border-[#a78bfa] hover:bg-[#faf8ff]"}`,
|
|
9267
|
-
onClick: () => Rr(
|
|
9267
|
+
onClick: () => Rr(yt),
|
|
9268
9268
|
children: [
|
|
9269
9269
|
/* @__PURE__ */ g("span", { className: "flex items-center justify-between gap-2", children: [
|
|
9270
9270
|
/* @__PURE__ */ g("span", { className: "text-[11px] font-semibold", children: [
|
|
9271
9271
|
"Fit all ",
|
|
9272
|
-
|
|
9272
|
+
yt,
|
|
9273
9273
|
" items in one row"
|
|
9274
9274
|
] }),
|
|
9275
9275
|
/* @__PURE__ */ g("span", { className: "rounded bg-white/80 px-1.5 py-0.5 text-[9px] font-semibold", children: [
|
|
@@ -9289,16 +9289,16 @@ function mc({
|
|
|
9289
9289
|
{
|
|
9290
9290
|
key: "fixed",
|
|
9291
9291
|
title: "Can be opened fixed",
|
|
9292
|
-
detail: `${
|
|
9293
|
-
active: Ge === "grid" &&
|
|
9292
|
+
detail: `${It ?? yt} Columns`,
|
|
9293
|
+
active: Ge === "grid" && It != null,
|
|
9294
9294
|
icon: /* @__PURE__ */ s(_o, { mode: "grid" }),
|
|
9295
|
-
action: () => Rr(
|
|
9295
|
+
action: () => Rr(It ?? yt)
|
|
9296
9296
|
},
|
|
9297
9297
|
{
|
|
9298
9298
|
key: "auto",
|
|
9299
9299
|
title: "automatic line break",
|
|
9300
9300
|
detail: `Min W ${Math.round(nr)}`,
|
|
9301
|
-
active: Ge === "grid" &&
|
|
9301
|
+
active: Ge === "grid" && It == null,
|
|
9302
9302
|
icon: /* @__PURE__ */ s("span", { className: "text-[15px] leading-none", children: "↪" }),
|
|
9303
9303
|
action: () => Io()
|
|
9304
9304
|
},
|
|
@@ -9383,7 +9383,7 @@ function mc({
|
|
|
9383
9383
|
}
|
|
9384
9384
|
)
|
|
9385
9385
|
] }),
|
|
9386
|
-
Ge === "grid" &&
|
|
9386
|
+
Ge === "grid" && It != null && /* @__PURE__ */ g("div", { className: "mt-3 rounded-lg bg-[#f7f7f8] p-2.5", children: [
|
|
9387
9387
|
/* @__PURE__ */ g("div", { className: "flex items-center justify-between", children: [
|
|
9388
9388
|
/* @__PURE__ */ s("span", { className: "text-[10px] font-semibold text-[#52525b]", children: "Columns" }),
|
|
9389
9389
|
/* @__PURE__ */ s("span", { className: "text-[9px] text-[#71717a]", children: "How many per line" })
|
|
@@ -9394,32 +9394,32 @@ function mc({
|
|
|
9394
9394
|
{
|
|
9395
9395
|
type: "button",
|
|
9396
9396
|
"aria-label": `${h} items per row`,
|
|
9397
|
-
"aria-pressed":
|
|
9398
|
-
className: `h-8 rounded-md text-[10px] font-semibold ${
|
|
9397
|
+
"aria-pressed": It === h,
|
|
9398
|
+
className: `h-8 rounded-md text-[10px] font-semibold ${It === h ? "bg-[#18181b] text-white" : "bg-white text-[#52525b] hover:bg-[#e9e9ee]"}`,
|
|
9399
9399
|
onClick: () => Rr(h),
|
|
9400
9400
|
children: h
|
|
9401
9401
|
},
|
|
9402
9402
|
h
|
|
9403
9403
|
)),
|
|
9404
9404
|
/* @__PURE__ */ s(
|
|
9405
|
-
|
|
9405
|
+
$t,
|
|
9406
9406
|
{
|
|
9407
9407
|
label: "directly",
|
|
9408
|
-
value:
|
|
9408
|
+
value: It,
|
|
9409
9409
|
min: 1,
|
|
9410
9410
|
onCommit: (h) => Rr(Math.min(24, h))
|
|
9411
9411
|
}
|
|
9412
9412
|
)
|
|
9413
9413
|
] })
|
|
9414
9414
|
] }),
|
|
9415
|
-
Ge === "grid" &&
|
|
9415
|
+
Ge === "grid" && It == null && /* @__PURE__ */ g("div", { className: "mt-3 rounded-lg bg-[#f7f7f8] p-2.5", children: [
|
|
9416
9416
|
/* @__PURE__ */ g("div", { className: "flex items-center justify-between", children: [
|
|
9417
9417
|
/* @__PURE__ */ s("span", { className: "text-[10px] font-semibold text-[#52525b]", children: "Minimum width" }),
|
|
9418
9418
|
/* @__PURE__ */ s("span", { className: "text-[9px] text-[#71717a]", children: "Wrap when it becomes narrower than the width" })
|
|
9419
9419
|
] }),
|
|
9420
9420
|
/* @__PURE__ */ g("div", { className: "mt-1.5 grid grid-cols-[minmax(0,1fr)_auto] gap-1", children: [
|
|
9421
9421
|
/* @__PURE__ */ s(
|
|
9422
|
-
|
|
9422
|
+
$t,
|
|
9423
9423
|
{
|
|
9424
9424
|
label: "Min W",
|
|
9425
9425
|
value: nr,
|
|
@@ -9427,14 +9427,14 @@ function mc({
|
|
|
9427
9427
|
onCommit: Io
|
|
9428
9428
|
}
|
|
9429
9429
|
),
|
|
9430
|
-
|
|
9430
|
+
yt > 1 && /* @__PURE__ */ g(
|
|
9431
9431
|
"button",
|
|
9432
9432
|
{
|
|
9433
9433
|
type: "button",
|
|
9434
9434
|
className: "h-7 rounded-md bg-white px-2 text-[9px] font-semibold text-[#007be5] hover:bg-[#e5f4ff]",
|
|
9435
9435
|
onClick: () => Io(cl),
|
|
9436
9436
|
children: [
|
|
9437
|
-
|
|
9437
|
+
yt,
|
|
9438
9438
|
" items · ",
|
|
9439
9439
|
cl
|
|
9440
9440
|
]
|
|
@@ -9468,15 +9468,15 @@ function mc({
|
|
|
9468
9468
|
/* @__PURE__ */ s("div", { className: "text-[10px] text-[#71717a]", children: "Gap" }),
|
|
9469
9469
|
/* @__PURE__ */ g("div", { className: "mt-1 flex flex-col gap-1", children: [
|
|
9470
9470
|
Ge !== "stack" && /* @__PURE__ */ s(
|
|
9471
|
-
|
|
9471
|
+
$t,
|
|
9472
9472
|
{
|
|
9473
9473
|
label: "↔",
|
|
9474
|
-
value:
|
|
9474
|
+
value: cn,
|
|
9475
9475
|
onCommit: (h) => Xe("column-gap", `${h}px`)
|
|
9476
9476
|
}
|
|
9477
9477
|
),
|
|
9478
9478
|
Ge !== "scroll" && /* @__PURE__ */ s(
|
|
9479
|
-
|
|
9479
|
+
$t,
|
|
9480
9480
|
{
|
|
9481
9481
|
label: "↕",
|
|
9482
9482
|
value: Er,
|
|
@@ -9512,18 +9512,18 @@ function mc({
|
|
|
9512
9512
|
)
|
|
9513
9513
|
] }),
|
|
9514
9514
|
ee ? /* @__PURE__ */ g("div", { className: "mt-1 grid grid-cols-2 gap-1", children: [
|
|
9515
|
-
/* @__PURE__ */ s(
|
|
9516
|
-
/* @__PURE__ */ s(
|
|
9515
|
+
/* @__PURE__ */ s($t, { label: "↔", value: If, onCommit: (h) => Ji("left", h) }),
|
|
9516
|
+
/* @__PURE__ */ s($t, { label: "↕", value: Cf, onCommit: (h) => Ji("top", h) })
|
|
9517
9517
|
] }) : /* @__PURE__ */ s("div", { className: "mt-1 grid grid-cols-4 gap-1", children: [
|
|
9518
9518
|
["T", "top"],
|
|
9519
9519
|
["R", "right"],
|
|
9520
9520
|
["B", "bottom"],
|
|
9521
9521
|
["L", "left"]
|
|
9522
9522
|
].map(([h, y]) => /* @__PURE__ */ s(
|
|
9523
|
-
|
|
9523
|
+
$t,
|
|
9524
9524
|
{
|
|
9525
9525
|
label: h,
|
|
9526
|
-
value:
|
|
9526
|
+
value: Ct[y],
|
|
9527
9527
|
onCommit: (C) => Ji(y, C)
|
|
9528
9528
|
},
|
|
9529
9529
|
y
|
|
@@ -9585,7 +9585,7 @@ function mc({
|
|
|
9585
9585
|
] }),
|
|
9586
9586
|
/* @__PURE__ */ g("div", { className: "mt-1 grid grid-cols-2 gap-1", children: [
|
|
9587
9587
|
/* @__PURE__ */ s(
|
|
9588
|
-
|
|
9588
|
+
$t,
|
|
9589
9589
|
{
|
|
9590
9590
|
label: "Minimum W",
|
|
9591
9591
|
value: At(st, "min-width"),
|
|
@@ -9593,7 +9593,7 @@ function mc({
|
|
|
9593
9593
|
}
|
|
9594
9594
|
),
|
|
9595
9595
|
/* @__PURE__ */ s(
|
|
9596
|
-
|
|
9596
|
+
$t,
|
|
9597
9597
|
{
|
|
9598
9598
|
label: "Max W",
|
|
9599
9599
|
value: At(st, "max-width"),
|
|
@@ -9601,7 +9601,7 @@ function mc({
|
|
|
9601
9601
|
}
|
|
9602
9602
|
),
|
|
9603
9603
|
/* @__PURE__ */ s(
|
|
9604
|
-
|
|
9604
|
+
$t,
|
|
9605
9605
|
{
|
|
9606
9606
|
label: "Minimum H",
|
|
9607
9607
|
value: At(st, "min-height"),
|
|
@@ -9609,7 +9609,7 @@ function mc({
|
|
|
9609
9609
|
}
|
|
9610
9610
|
),
|
|
9611
9611
|
/* @__PURE__ */ s(
|
|
9612
|
-
|
|
9612
|
+
$t,
|
|
9613
9613
|
{
|
|
9614
9614
|
label: "max H",
|
|
9615
9615
|
value: At(st, "max-height"),
|
|
@@ -9618,7 +9618,7 @@ function mc({
|
|
|
9618
9618
|
)
|
|
9619
9619
|
] }),
|
|
9620
9620
|
/* @__PURE__ */ g("div", { className: `mt-1.5 grid gap-1 ${Ge === "grid" ? "grid-cols-[1fr_2fr]" : "grid-cols-1"}`, children: [
|
|
9621
|
-
/* @__PURE__ */ s(
|
|
9621
|
+
/* @__PURE__ */ s($t, { label: "order", value: Rf, min: -999, onCommit: (h) => rt("order", `${h}`) }),
|
|
9622
9622
|
Ge === "grid" && /* @__PURE__ */ g("div", { className: "grid grid-cols-5 gap-1", children: [
|
|
9623
9623
|
[1, 2, 3, 4].map((h) => /* @__PURE__ */ s(
|
|
9624
9624
|
"button",
|
|
@@ -9685,7 +9685,7 @@ function mc({
|
|
|
9685
9685
|
type: "button",
|
|
9686
9686
|
className: "h-9 rounded-md bg-[#f4f4f5] text-[10px] font-semibold text-[#52525b] hover:bg-[#e9e9ee]",
|
|
9687
9687
|
onClick: () => {
|
|
9688
|
-
|
|
9688
|
+
Pe(), S(null), R("original"), A("default"), ge();
|
|
9689
9689
|
},
|
|
9690
9690
|
children: "Reset case preview"
|
|
9691
9691
|
}
|
|
@@ -9696,7 +9696,7 @@ function mc({
|
|
|
9696
9696
|
type: "button",
|
|
9697
9697
|
className: "h-9 rounded-md bg-[#18181b] text-[10px] font-semibold text-white hover:bg-black",
|
|
9698
9698
|
onClick: () => {
|
|
9699
|
-
|
|
9699
|
+
Yt.length > 0 && !window.confirm("Reset all unapplied editor changes? This also clears undo and redo history.") || (Pe(), S(null), R("original"), A("default"), X.discardPending(), P(null), I(""), Re(""), X.toast("Reset all unapplied changes"), ge());
|
|
9700
9700
|
},
|
|
9701
9701
|
children: "Reset changes"
|
|
9702
9702
|
}
|
|
@@ -9857,7 +9857,7 @@ function mc({
|
|
|
9857
9857
|
] }),
|
|
9858
9858
|
/* @__PURE__ */ g("div", { children: [
|
|
9859
9859
|
"slot: children[",
|
|
9860
|
-
Math.min(ve,
|
|
9860
|
+
Math.min(ve, Nt),
|
|
9861
9861
|
"]"
|
|
9862
9862
|
] })
|
|
9863
9863
|
] }),
|
|
@@ -9867,10 +9867,10 @@ function mc({
|
|
|
9867
9867
|
"select",
|
|
9868
9868
|
{
|
|
9869
9869
|
"aria-label": "Component insertion location",
|
|
9870
|
-
value: Math.min(ve,
|
|
9870
|
+
value: Math.min(ve, Nt),
|
|
9871
9871
|
className: "h-8 min-w-0 rounded-md bg-[#f4f4f5] px-2 text-[10px] font-semibold text-[#52525b] outline-none focus:ring-1 focus:ring-inset focus:ring-[#0d99ff]",
|
|
9872
9872
|
onChange: (h) => we(Number(h.currentTarget.value)),
|
|
9873
|
-
children: Array.from({ length:
|
|
9873
|
+
children: Array.from({ length: Nt + 1 }, (h, y) => /* @__PURE__ */ s("option", { value: y, children: y === 0 ? "0 · First" : y === Nt ? `${y} · Last` : `${y} · After item ${y}` }, y))
|
|
9874
9874
|
}
|
|
9875
9875
|
)
|
|
9876
9876
|
] }),
|
|
@@ -9886,7 +9886,7 @@ function mc({
|
|
|
9886
9886
|
X.recordComponentInsert(
|
|
9887
9887
|
D,
|
|
9888
9888
|
h,
|
|
9889
|
-
Math.min(ve,
|
|
9889
|
+
Math.min(ve, Nt),
|
|
9890
9890
|
`${h} → ${ut}`,
|
|
9891
9891
|
pe,
|
|
9892
9892
|
J.current
|
|
@@ -9903,7 +9903,7 @@ function mc({
|
|
|
9903
9903
|
title: "Styles",
|
|
9904
9904
|
action: Hi ? /* @__PURE__ */ s("button", { type: "button", className: "text-[10px] font-semibold text-[#0d99ff]", onClick: () => p("cases"), children: "Back to cases" }) : void 0,
|
|
9905
9905
|
children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-1.5", children: (N === "container" ? Nx : Sx).map(({ label: h, prop: y, tokenGroup: C }) => {
|
|
9906
|
-
const _ = C ?
|
|
9906
|
+
const _ = C ? on[C] : [];
|
|
9907
9907
|
return /* @__PURE__ */ g("label", { className: "grid grid-cols-[56px_minmax(0,1fr)_82px] items-center gap-1.5 text-[10px] text-[#71717a]", children: [
|
|
9908
9908
|
/* @__PURE__ */ s("span", { className: "shrink-0", children: h }),
|
|
9909
9909
|
/* @__PURE__ */ s(
|
|
@@ -9913,10 +9913,10 @@ function mc({
|
|
|
9913
9913
|
defaultValue: $r.getPropertyValue(y),
|
|
9914
9914
|
className: "h-7 min-w-0 rounded-md bg-[#f4f4f5] px-2 text-[11px] text-[#18181b] outline-none focus:ring-1 focus:ring-inset focus:ring-[#0d99ff]",
|
|
9915
9915
|
onKeyDown: (L) => {
|
|
9916
|
-
L.key === "Enter" &&
|
|
9916
|
+
L.key === "Enter" && Ot(y, L.target.value);
|
|
9917
9917
|
},
|
|
9918
9918
|
onBlur: (L) => {
|
|
9919
|
-
L.currentTarget.value !== $r.getPropertyValue(y) &&
|
|
9919
|
+
L.currentTarget.value !== $r.getPropertyValue(y) && Ot(y, L.currentTarget.value);
|
|
9920
9920
|
}
|
|
9921
9921
|
},
|
|
9922
9922
|
`${Q}-${N}-${y}`
|
|
@@ -9928,7 +9928,7 @@ function mc({
|
|
|
9928
9928
|
value: "",
|
|
9929
9929
|
className: "h-7 min-w-0 rounded-md bg-[#f4f4f5] px-1.5 text-[10px] text-[#52525b] outline-none focus:ring-1 focus:ring-inset focus:ring-[#0d99ff]",
|
|
9930
9930
|
onChange: (L) => {
|
|
9931
|
-
L.target.value &&
|
|
9931
|
+
L.target.value && Ot(y, `var(${L.target.value})`);
|
|
9932
9932
|
},
|
|
9933
9933
|
children: [
|
|
9934
9934
|
/* @__PURE__ */ s("option", { value: "", children: "Token" }),
|
|
@@ -9944,14 +9944,14 @@ function mc({
|
|
|
9944
9944
|
}) })
|
|
9945
9945
|
}
|
|
9946
9946
|
),
|
|
9947
|
-
N === "item" && D &&
|
|
9947
|
+
N === "item" && D && qt && bo.length > 0 && /* @__PURE__ */ g(Je, { title: "Component props", children: [
|
|
9948
9948
|
/* @__PURE__ */ g("div", { className: "mb-2 rounded-md bg-[#f4f4f5] px-2 py-1.5 text-[9px] leading-relaxed text-[#71717a]", children: [
|
|
9949
9949
|
/* @__PURE__ */ g("div", { className: "truncate font-mono text-[#52525b]", children: [
|
|
9950
|
-
|
|
9950
|
+
qt.elementName,
|
|
9951
9951
|
" · ",
|
|
9952
|
-
|
|
9952
|
+
qt.componentFile,
|
|
9953
9953
|
":",
|
|
9954
|
-
|
|
9954
|
+
qt.sourceStart
|
|
9955
9955
|
] }),
|
|
9956
9956
|
"DOM properties are previewed immediately. Component-specific props, such as variant, are confirmed in HMR after changes are applied."
|
|
9957
9957
|
] }),
|
|
@@ -9966,7 +9966,7 @@ function mc({
|
|
|
9966
9966
|
y,
|
|
9967
9967
|
_e,
|
|
9968
9968
|
ut,
|
|
9969
|
-
|
|
9969
|
+
qt,
|
|
9970
9970
|
J.current
|
|
9971
9971
|
);
|
|
9972
9972
|
};
|
|
@@ -9989,7 +9989,7 @@ function mc({
|
|
|
9989
9989
|
y,
|
|
9990
9990
|
ue.currentTarget.value === "true",
|
|
9991
9991
|
ut,
|
|
9992
|
-
|
|
9992
|
+
qt,
|
|
9993
9993
|
J.current
|
|
9994
9994
|
),
|
|
9995
9995
|
children: [
|
|
@@ -10098,10 +10098,10 @@ function mc({
|
|
|
10098
10098
|
"button",
|
|
10099
10099
|
{
|
|
10100
10100
|
type: "button",
|
|
10101
|
-
disabled:
|
|
10101
|
+
disabled: Yt.length === 0,
|
|
10102
10102
|
className: "mt-1.5 h-8 w-full rounded-md border border-[#fecaca] bg-[#fff7f7] text-[10px] font-semibold text-[#b91c1c] hover:bg-[#fef2f2] disabled:border-[#e4e4e7] disabled:bg-[#f4f4f5] disabled:text-[#a1a1aa]",
|
|
10103
10103
|
onClick: () => {
|
|
10104
|
-
window.confirm("Reset all unapplied editor changes? This also clears undo and redo history.") && (
|
|
10104
|
+
window.confirm("Reset all unapplied editor changes? This also clears undo and redo history.") && (Pe(), S(null), R("original"), A("default"), X.discardPending(), P(null), I(""), Re(""), X.toast("Reset all unapplied changes"));
|
|
10105
10105
|
},
|
|
10106
10106
|
children: "Reset changes"
|
|
10107
10107
|
}
|
|
@@ -10255,7 +10255,7 @@ function mc({
|
|
|
10255
10255
|
}
|
|
10256
10256
|
),
|
|
10257
10257
|
/* @__PURE__ */ s(Je, { title: "Saveable changes", children: xo > 0 ? /* @__PURE__ */ g("div", { className: "flex flex-col gap-2", children: [
|
|
10258
|
-
|
|
10258
|
+
an.styles.map((h) => {
|
|
10259
10259
|
var y, C;
|
|
10260
10260
|
return /* @__PURE__ */ g(
|
|
10261
10261
|
"div",
|
|
@@ -10282,7 +10282,7 @@ function mc({
|
|
|
10282
10282
|
`${h.file}-${h.className}-${((y = h.media) == null ? void 0 : y.minWidth) ?? ""}-${((C = h.media) == null ? void 0 : C.maxWidth) ?? ""}`
|
|
10283
10283
|
);
|
|
10284
10284
|
}),
|
|
10285
|
-
|
|
10285
|
+
an.texts.map((h) => /* @__PURE__ */ g("div", { className: "rounded-md border border-[#e4e4e7] bg-[#fafafa] px-2.5 py-2", children: [
|
|
10286
10286
|
/* @__PURE__ */ s("div", { className: "truncate text-[10px] font-semibold text-[#27272a]", children: h.componentFile }),
|
|
10287
10287
|
/* @__PURE__ */ g("div", { className: "mt-1 truncate text-[10px] text-[#52525b]", children: [
|
|
10288
10288
|
'"',
|
|
@@ -10297,7 +10297,7 @@ function mc({
|
|
|
10297
10297
|
] })
|
|
10298
10298
|
] })
|
|
10299
10299
|
] }, `${h.componentFile}-${h.oldText}`)),
|
|
10300
|
-
|
|
10300
|
+
an.operations.map((h) => {
|
|
10301
10301
|
const y = Ax(h), C = h.scope === "instance" ? "This screen" : "Shared source", _ = h.affectedFrames.length > 0 ? h.affectedFrames.map((L) => L.name).join(", ") : "current element";
|
|
10302
10302
|
return /* @__PURE__ */ g(
|
|
10303
10303
|
"div",
|
|
@@ -10333,9 +10333,9 @@ function mc({
|
|
|
10333
10333
|
`${h.kind}-${h.identity.componentFile}-${h.identity.sourceStart}-${y.prop}`
|
|
10334
10334
|
);
|
|
10335
10335
|
}),
|
|
10336
|
-
|
|
10336
|
+
an.operations.some((h) => h.scope === "shared-source") && /* @__PURE__ */ s("p", { className: "text-[9px] leading-relaxed text-[#71717a]", children: le ? "Calculating every screen affected by the shared source." : "Affected screens are derived from the source dependency graph." })
|
|
10337
10337
|
] }) : /* @__PURE__ */ s("div", { className: "text-[11px] leading-relaxed text-[#a1a1aa]", children: "No changes can be saved yet. Items that only changed the screen are identified in the final changes below." }) }),
|
|
10338
|
-
/* @__PURE__ */ s(Je, { title: "Recent changes", children:
|
|
10338
|
+
/* @__PURE__ */ s(Je, { title: "Recent changes", children: Yt.length > 0 ? /* @__PURE__ */ s("div", { className: "flex flex-col gap-1.5", children: [...Yt].reverse().map((h) => {
|
|
10339
10339
|
const y = h.items.some(Qi), C = h.items.some((_) => !Qi(_));
|
|
10340
10340
|
return /* @__PURE__ */ g("div", { className: "rounded-md bg-[#f7f7f8] px-2.5 py-2 text-[10px] leading-relaxed text-[#52525b]", children: [
|
|
10341
10341
|
/* @__PURE__ */ g("div", { className: "mb-0.5 flex items-center gap-1", children: [
|
|
@@ -10450,7 +10450,7 @@ function gc() {
|
|
|
10450
10450
|
] });
|
|
10451
10451
|
}
|
|
10452
10452
|
const Wx = We(function({ onClose: t }) {
|
|
10453
|
-
const n = Qe(ha,
|
|
10453
|
+
const n = Qe(ha, xn, xn), r = f.activePage, o = Ie(null), i = Ie(null), [a, l] = Y(!1);
|
|
10454
10454
|
if (se(() => X.reset(), []), r.route != null) {
|
|
10455
10455
|
const c = () => {
|
|
10456
10456
|
if (!o.current) return;
|
|
@@ -10531,8 +10531,8 @@ const Wx = We(function({ onClose: t }) {
|
|
|
10531
10531
|
n,
|
|
10532
10532
|
r.route ?? "",
|
|
10533
10533
|
Lt(
|
|
10534
|
-
|
|
10535
|
-
|
|
10534
|
+
Gt(),
|
|
10535
|
+
bn(r, !0)
|
|
10536
10536
|
)
|
|
10537
10537
|
),
|
|
10538
10538
|
className: "h-full w-full border-0 bg-white"
|
|
@@ -13921,7 +13921,7 @@ const cv = We(function({
|
|
|
13921
13921
|
{ v: "fit", label: "Hug" },
|
|
13922
13922
|
{ v: "fixed", label: "Fixed" }
|
|
13923
13923
|
];
|
|
13924
|
-
function
|
|
13924
|
+
function wt({ label: e, value: t }) {
|
|
13925
13925
|
return /* @__PURE__ */ g("div", { className: "flex items-baseline justify-between gap-2 text-[11px]", children: [
|
|
13926
13926
|
/* @__PURE__ */ s("span", { className: "shrink-0 text-[#999]", children: e }),
|
|
13927
13927
|
/* @__PURE__ */ s("span", { className: "min-w-0 truncate text-right text-[#333]", title: t, children: t })
|
|
@@ -13936,32 +13936,32 @@ const mv = We(function({
|
|
|
13936
13936
|
const n = t.type === "component" ? Ze()[t.componentName] : void 0, r = Object.entries(t.componentProps ?? {});
|
|
13937
13937
|
return /* @__PURE__ */ g("div", { "data-read-only-inspector": "node", className: "min-h-0 flex-1 overflow-auto", children: [
|
|
13938
13938
|
/* @__PURE__ */ g(Fe, { title: t.name, children: [
|
|
13939
|
-
/* @__PURE__ */ s(
|
|
13940
|
-
t.domTag && /* @__PURE__ */ s(
|
|
13941
|
-
/* @__PURE__ */ s(
|
|
13942
|
-
/* @__PURE__ */ s(
|
|
13943
|
-
t.type === "text" && t.text && /* @__PURE__ */ s(
|
|
13939
|
+
/* @__PURE__ */ s(wt, { label: "Type", value: t.type }),
|
|
13940
|
+
t.domTag && /* @__PURE__ */ s(wt, { label: "Tag", value: t.domTag }),
|
|
13941
|
+
/* @__PURE__ */ s(wt, { label: "Width", value: kc(t.widthMode, t.width) }),
|
|
13942
|
+
/* @__PURE__ */ s(wt, { label: "Height", value: kc(t.heightMode, t.height) }),
|
|
13943
|
+
t.type === "text" && t.text && /* @__PURE__ */ s(wt, { label: "Text", value: t.text })
|
|
13944
13944
|
] }),
|
|
13945
13945
|
n && /* @__PURE__ */ g(Fe, { title: "Component", children: [
|
|
13946
|
-
/* @__PURE__ */ s(
|
|
13947
|
-
r.map(([o, i]) => /* @__PURE__ */ s(
|
|
13946
|
+
/* @__PURE__ */ s(wt, { label: "Name", value: t.componentName }),
|
|
13947
|
+
r.map(([o, i]) => /* @__PURE__ */ s(wt, { label: o, value: String(i) }, o))
|
|
13948
13948
|
] }),
|
|
13949
|
-
t.sourceComponent && /* @__PURE__ */ s(Fe, { title: "Source", children: /* @__PURE__ */ s(
|
|
13949
|
+
t.sourceComponent && /* @__PURE__ */ s(Fe, { title: "Source", children: /* @__PURE__ */ s(wt, { label: "Component", value: t.sourceComponent }) })
|
|
13950
13950
|
] });
|
|
13951
13951
|
}), gv = We(function({
|
|
13952
13952
|
section: t,
|
|
13953
13953
|
members: n
|
|
13954
13954
|
}) {
|
|
13955
13955
|
return /* @__PURE__ */ s("div", { "data-read-only-inspector": "section", className: "min-h-0 flex-1 overflow-auto", children: /* @__PURE__ */ g(Fe, { title: "Section", children: [
|
|
13956
|
-
/* @__PURE__ */ s(
|
|
13956
|
+
/* @__PURE__ */ s(wt, { label: "Name", value: t.name }),
|
|
13957
13957
|
/* @__PURE__ */ s(
|
|
13958
|
-
|
|
13958
|
+
wt,
|
|
13959
13959
|
{
|
|
13960
13960
|
label: "Bounds",
|
|
13961
13961
|
value: `${Math.round(t.x)}, ${Math.round(t.y)} · ${Math.round(t.width)} × ${Math.round(t.height)}`
|
|
13962
13962
|
}
|
|
13963
13963
|
),
|
|
13964
|
-
/* @__PURE__ */ s(
|
|
13964
|
+
/* @__PURE__ */ s(wt, { label: "Frames", value: String(n) })
|
|
13965
13965
|
] }) });
|
|
13966
13966
|
});
|
|
13967
13967
|
function bv({ node: e }) {
|
|
@@ -14309,16 +14309,16 @@ const Sv = We(function({ page: t }) {
|
|
|
14309
14309
|
onChange: (b) => r({ name: b.target.value })
|
|
14310
14310
|
}
|
|
14311
14311
|
) }) : /* @__PURE__ */ s("div", { "data-read-only-inspector": "frame", children: /* @__PURE__ */ g(Fe, { title: "Frame", children: [
|
|
14312
|
-
/* @__PURE__ */ s(
|
|
14312
|
+
/* @__PURE__ */ s(wt, { label: "Name", value: t.name }),
|
|
14313
14313
|
/* @__PURE__ */ s(
|
|
14314
|
-
|
|
14314
|
+
wt,
|
|
14315
14315
|
{
|
|
14316
14316
|
label: "Size",
|
|
14317
14317
|
value: `${Math.round(t.width ?? 390)} × ${Math.round(t.height ?? 600)}`
|
|
14318
14318
|
}
|
|
14319
14319
|
),
|
|
14320
|
-
t.route && /* @__PURE__ */ s(
|
|
14321
|
-
t.section && /* @__PURE__ */ s(
|
|
14320
|
+
t.route && /* @__PURE__ */ s(wt, { label: "Route", value: t.route }),
|
|
14321
|
+
t.section && /* @__PURE__ */ s(wt, { label: "Section", value: t.section })
|
|
14322
14322
|
] }) }),
|
|
14323
14323
|
/* @__PURE__ */ g(Fe, { title: "Preview", children: [
|
|
14324
14324
|
/* @__PURE__ */ g("div", { className: "flex gap-1.5", children: [
|
|
@@ -15069,7 +15069,7 @@ function Lv(e, t = {}) {
|
|
|
15069
15069
|
}
|
|
15070
15070
|
return { run: w, cancel: v };
|
|
15071
15071
|
}
|
|
15072
|
-
const Lc = "absolute z-20 flex flex-col overflow-hidden rounded-[13px] border border-[#e6e6e6] bg-white shadow-[0_2px_14px_rgba(0,0,0,.08)]", Dv = 600,
|
|
15072
|
+
const Lc = "absolute z-20 flex flex-col overflow-hidden rounded-[13px] border border-[#e6e6e6] bg-white shadow-[0_2px_14px_rgba(0,0,0,.08)]", Dv = 600, un = 200, en = 280, zv = 480, ps = "absolute bottom-11 left-1/2 z-40 w-44 -translate-x-1/2 rounded-xl bg-[#1e1e1e] p-1.5 text-[12px] shadow-[0_4px_20px_rgba(0,0,0,.25)]", Vr = (e) => `flex h-9 w-9 items-center justify-center rounded-lg ${e ? "bg-[#0d99ff] text-white" : "text-[#333] hover:bg-[#f5f5f5]"}`;
|
|
15073
15073
|
function zn({
|
|
15074
15074
|
icon: e,
|
|
15075
15075
|
label: t,
|
|
@@ -15111,8 +15111,8 @@ const _v = We(function({
|
|
|
15111
15111
|
Xn
|
|
15112
15112
|
), l = Qe(
|
|
15113
15113
|
ha,
|
|
15114
|
-
|
|
15115
|
-
|
|
15114
|
+
xn,
|
|
15115
|
+
xn
|
|
15116
15116
|
);
|
|
15117
15117
|
Qe(
|
|
15118
15118
|
za,
|
|
@@ -15137,17 +15137,17 @@ const _v = We(function({
|
|
|
15137
15137
|
x: F.x ?? 0,
|
|
15138
15138
|
y: F.y ?? 0,
|
|
15139
15139
|
width: F.width ?? 390,
|
|
15140
|
-
height:
|
|
15140
|
+
height: hn(F)
|
|
15141
15141
|
})) : [], m = f.pages.filter((F) => F.route != null).sort((F, de) => {
|
|
15142
15142
|
if (F.id === f.activePageId) return -1;
|
|
15143
15143
|
if (de.id === f.activePageId) return 1;
|
|
15144
15144
|
const re = (F.canvas ?? "default") === f.activeCanvas, Ee = (de.canvas ?? "default") === f.activeCanvas;
|
|
15145
15145
|
return re !== Ee ? re ? -1 : 1 : 0;
|
|
15146
|
-
}), b = m.map((F) =>
|
|
15146
|
+
}), b = m.map((F) => Wt(F, a)), x = [
|
|
15147
15147
|
...new Set(
|
|
15148
15148
|
m.flatMap((F) => [
|
|
15149
|
-
|
|
15150
|
-
|
|
15149
|
+
Wt(F, a),
|
|
15150
|
+
Wt(
|
|
15151
15151
|
F,
|
|
15152
15152
|
a,
|
|
15153
15153
|
F.authoredFrameSize ?? {
|
|
@@ -15174,7 +15174,7 @@ const _v = We(function({
|
|
|
15174
15174
|
if (!t || !$ || typeof document > "u") return;
|
|
15175
15175
|
const F = Kn();
|
|
15176
15176
|
if (!F) return;
|
|
15177
|
-
const de =
|
|
15177
|
+
const de = Gt(), re = n.current, Ee = re ? {
|
|
15178
15178
|
panX: f.panX,
|
|
15179
15179
|
panY: f.panY,
|
|
15180
15180
|
zoom: f.zoom,
|
|
@@ -15183,13 +15183,13 @@ const _v = We(function({
|
|
|
15183
15183
|
} : null, O = new Map(f.pages.map((B) => [B.id, B])), ve = [];
|
|
15184
15184
|
for (const B of f.pages) {
|
|
15185
15185
|
if (B.route == null || B.layersImported || fo(B.importPageId ?? B.id)) continue;
|
|
15186
|
-
const K =
|
|
15186
|
+
const K = Wt(B, a), ke = B.width ?? 390, J = hn(B), je = (((Oe = B.interactions) == null ? void 0 : Oe.length) ?? 0) > 0, Ne = B.importPageId ?? B.id, ze = Va(
|
|
15187
15187
|
{
|
|
15188
15188
|
canonicalId: Ne,
|
|
15189
15189
|
route: B.route,
|
|
15190
15190
|
width: B.width,
|
|
15191
15191
|
height: B.height,
|
|
15192
|
-
environment:
|
|
15192
|
+
environment: bn(B),
|
|
15193
15193
|
preset: B.preset,
|
|
15194
15194
|
interactions: B.interactions,
|
|
15195
15195
|
assertions: B.assertions
|
|
@@ -15206,7 +15206,7 @@ const _v = We(function({
|
|
|
15206
15206
|
}) ? ja({
|
|
15207
15207
|
origin: l,
|
|
15208
15208
|
route: B.route,
|
|
15209
|
-
environment:
|
|
15209
|
+
environment: bn(B),
|
|
15210
15210
|
width: ke,
|
|
15211
15211
|
height: J
|
|
15212
15212
|
}) : null,
|
|
@@ -15225,17 +15225,17 @@ const _v = We(function({
|
|
|
15225
15225
|
leaseInstance: async (B) => {
|
|
15226
15226
|
const K = O.get(B.pageId);
|
|
15227
15227
|
if (!K || K.route == null) return null;
|
|
15228
|
-
const ke = K.width ?? 390, J =
|
|
15228
|
+
const ke = K.width ?? 390, J = hn(K), je = mr(
|
|
15229
15229
|
l,
|
|
15230
15230
|
K.route,
|
|
15231
15231
|
Lt(
|
|
15232
15232
|
de,
|
|
15233
|
-
|
|
15233
|
+
bn(K)
|
|
15234
15234
|
)
|
|
15235
15235
|
);
|
|
15236
15236
|
if (B.groupKey != null) {
|
|
15237
|
-
const
|
|
15238
|
-
key:
|
|
15237
|
+
const Pe = B.groupKey, Se = await Q.lease({
|
|
15238
|
+
key: Pe,
|
|
15239
15239
|
url: je,
|
|
15240
15240
|
width: ke,
|
|
15241
15241
|
height: J
|
|
@@ -15246,25 +15246,25 @@ const _v = We(function({
|
|
|
15246
15246
|
iframe: Se.iframe,
|
|
15247
15247
|
release: () => Se.release(),
|
|
15248
15248
|
discard: () => {
|
|
15249
|
-
Q.discard(
|
|
15249
|
+
Q.discard(Pe), Se.release();
|
|
15250
15250
|
}
|
|
15251
15251
|
};
|
|
15252
15252
|
}
|
|
15253
15253
|
const Ne = document.createElement("iframe");
|
|
15254
15254
|
Ne.setAttribute("tabindex", "-1"), Ne.setAttribute("aria-hidden", "true"), Ne.setAttribute("data-pygmalion-sweep-instance", ""), Ne.style.position = "fixed", Ne.style.top = "0", Ne.style.left = "-20000px", Ne.style.border = "0", Ne.style.pointerEvents = "none", Ne.style.width = `${Math.round(ke)}px`, Ne.style.height = `${Math.round(J)}px`, document.body.appendChild(Ne);
|
|
15255
15255
|
try {
|
|
15256
|
-
await new Promise((
|
|
15257
|
-
const
|
|
15256
|
+
await new Promise((Pe, Se) => {
|
|
15257
|
+
const $e = () => {
|
|
15258
15258
|
Ne.removeEventListener("load", Ce), Ne.removeEventListener("error", Ke);
|
|
15259
15259
|
}, Ce = () => {
|
|
15260
|
-
|
|
15260
|
+
$e(), Pe();
|
|
15261
15261
|
}, Ke = () => {
|
|
15262
|
-
|
|
15262
|
+
$e(), Se(new Error(`The sweep preview failed to load ${je}.`));
|
|
15263
15263
|
};
|
|
15264
15264
|
Ne.addEventListener("load", Ce), Ne.addEventListener("error", Ke), Ne.src = je;
|
|
15265
15265
|
});
|
|
15266
|
-
} catch (
|
|
15267
|
-
throw Ne.remove(),
|
|
15266
|
+
} catch (Pe) {
|
|
15267
|
+
throw Ne.remove(), Pe;
|
|
15268
15268
|
}
|
|
15269
15269
|
let ze = !1;
|
|
15270
15270
|
const tt = () => {
|
|
@@ -15308,7 +15308,7 @@ const _v = We(function({
|
|
|
15308
15308
|
(K) => K.id === f.activePageId
|
|
15309
15309
|
);
|
|
15310
15310
|
return !B || B.route == null ? !1 : B.importLayers && !B.layersImported ? !0 : !B.layersImported && !Jn(
|
|
15311
|
-
|
|
15311
|
+
Wt(B, a)
|
|
15312
15312
|
);
|
|
15313
15313
|
}
|
|
15314
15314
|
});
|
|
@@ -15369,7 +15369,7 @@ const _v = We(function({
|
|
|
15369
15369
|
x: de.x ?? 0,
|
|
15370
15370
|
y: de.y ?? 0,
|
|
15371
15371
|
width: de.width ?? 390,
|
|
15372
|
-
height:
|
|
15372
|
+
height: hn(de)
|
|
15373
15373
|
}, ve = (de.canvas ?? "default") === f.activeCanvas ? Uh(O, Ee, {
|
|
15374
15374
|
panX: f.panX,
|
|
15375
15375
|
panY: f.panY,
|
|
@@ -15596,7 +15596,7 @@ const _v = We(function({
|
|
|
15596
15596
|
de.preventDefault();
|
|
15597
15597
|
const re = de.clientX, Ee = F === "left" ? ae : Re, O = (we) => {
|
|
15598
15598
|
const Q = F === "left" ? we.clientX - re : re - we.clientX, ge = Math.max(
|
|
15599
|
-
|
|
15599
|
+
un,
|
|
15600
15600
|
Math.min(zv, Ee + Q)
|
|
15601
15601
|
);
|
|
15602
15602
|
F === "left" ? xe(ge) : le(ge);
|
|
@@ -15816,10 +15816,10 @@ const _v = We(function({
|
|
|
15816
15816
|
{
|
|
15817
15817
|
type: "button",
|
|
15818
15818
|
"aria-label": "Minimum left panel width",
|
|
15819
|
-
"aria-pressed": ae ===
|
|
15820
|
-
title: `Minimum width · ${
|
|
15821
|
-
className: `h-5 rounded px-1.5 text-[8px] font-semibold ${ae ===
|
|
15822
|
-
onClick: () => xe(
|
|
15819
|
+
"aria-pressed": ae === un,
|
|
15820
|
+
title: `Minimum width · ${un}px`,
|
|
15821
|
+
className: `h-5 rounded px-1.5 text-[8px] font-semibold ${ae === un ? "bg-white text-[#333] shadow-sm" : "text-[#888] hover:text-[#333]"}`,
|
|
15822
|
+
onClick: () => xe(un),
|
|
15823
15823
|
children: "Min"
|
|
15824
15824
|
}
|
|
15825
15825
|
),
|
|
@@ -16022,10 +16022,10 @@ const _v = We(function({
|
|
|
16022
16022
|
{
|
|
16023
16023
|
type: "button",
|
|
16024
16024
|
"aria-label": "Minimum right panel width",
|
|
16025
|
-
"aria-pressed": Re ===
|
|
16026
|
-
title: `Minimum panel width · ${
|
|
16027
|
-
className: `flex h-5 w-5 items-center justify-center rounded text-[10px] ${Re ===
|
|
16028
|
-
onClick: () => le(
|
|
16025
|
+
"aria-pressed": Re === un,
|
|
16026
|
+
title: `Minimum panel width · ${un}px`,
|
|
16027
|
+
className: `flex h-5 w-5 items-center justify-center rounded text-[10px] ${Re === un ? "bg-[#f2f2f2] text-[#333]" : "text-[#999] hover:bg-[#f5f5f5]"}`,
|
|
16028
|
+
onClick: () => le(un),
|
|
16029
16029
|
children: "−"
|
|
16030
16030
|
}
|
|
16031
16031
|
),
|
|
@@ -16303,7 +16303,7 @@ function Wv(e, t, n, r = Ov) {
|
|
|
16303
16303
|
const o = /* @__PURE__ */ new Map();
|
|
16304
16304
|
return e.forEach((i, a) => {
|
|
16305
16305
|
if (!Wa(i)) return;
|
|
16306
|
-
const l = i.width ?? 390, c =
|
|
16306
|
+
const l = i.width ?? 390, c = hn(i), d = ja({
|
|
16307
16307
|
origin: t,
|
|
16308
16308
|
route: i.route ?? "",
|
|
16309
16309
|
environment: i.environment,
|
|
@@ -18089,7 +18089,7 @@ function s0(e = {}) {
|
|
|
18089
18089
|
refs: [],
|
|
18090
18090
|
defaultRef: null,
|
|
18091
18091
|
worktreeRef: null
|
|
18092
|
-
}), N = Ie(null), T = Ie(null), j =
|
|
18092
|
+
}), N = Ie(null), T = Ie(null), j = St(
|
|
18093
18093
|
async (I = !0, V) => {
|
|
18094
18094
|
if (V != null && N.current && await N.current.catch(() => {
|
|
18095
18095
|
}), N.current) return N.current;
|
|
@@ -18161,7 +18161,7 @@ function s0(e = {}) {
|
|
|
18161
18161
|
}
|
|
18162
18162
|
},
|
|
18163
18163
|
[o, a, l, b]
|
|
18164
|
-
), k =
|
|
18164
|
+
), k = St(async () => {
|
|
18165
18165
|
try {
|
|
18166
18166
|
const I = await tn(
|
|
18167
18167
|
await o(`${a}/refs`)
|
|
@@ -18174,7 +18174,7 @@ function s0(e = {}) {
|
|
|
18174
18174
|
} catch {
|
|
18175
18175
|
return H;
|
|
18176
18176
|
}
|
|
18177
|
-
}, [o, a, H]), z =
|
|
18177
|
+
}, [o, a, H]), z = St(
|
|
18178
18178
|
async (I, V) => {
|
|
18179
18179
|
if (v != null && v.branchName && !(V != null && V.discardEdits))
|
|
18180
18180
|
throw new Error(
|
|
@@ -18183,7 +18183,7 @@ function s0(e = {}) {
|
|
|
18183
18183
|
await j(!0, I), await k();
|
|
18184
18184
|
},
|
|
18185
18185
|
[k, j, v == null ? void 0 : v.branchName]
|
|
18186
|
-
), Z =
|
|
18186
|
+
), Z = St(
|
|
18187
18187
|
async (I) => {
|
|
18188
18188
|
var le;
|
|
18189
18189
|
if (!v) throw new Error("Pygmalion design session is not ready");
|
|
@@ -18235,7 +18235,7 @@ function s0(e = {}) {
|
|
|
18235
18235
|
};
|
|
18236
18236
|
},
|
|
18237
18237
|
[o, i, u, v, l]
|
|
18238
|
-
), M =
|
|
18238
|
+
), M = St(
|
|
18239
18239
|
async (I) => {
|
|
18240
18240
|
var le;
|
|
18241
18241
|
if (!v) throw new Error("Pygmalion design session is not ready");
|
|
@@ -18291,7 +18291,7 @@ function s0(e = {}) {
|
|
|
18291
18291
|
l,
|
|
18292
18292
|
d
|
|
18293
18293
|
]
|
|
18294
|
-
), W =
|
|
18294
|
+
), W = St(
|
|
18295
18295
|
async (I) => {
|
|
18296
18296
|
if (I.length === 0) return { files: [] };
|
|
18297
18297
|
const V = await tn(
|
|
@@ -18306,7 +18306,7 @@ function s0(e = {}) {
|
|
|
18306
18306
|
return { files: Array.isArray(V.files) ? V.files : [] };
|
|
18307
18307
|
},
|
|
18308
18308
|
[o, c]
|
|
18309
|
-
), ee =
|
|
18309
|
+
), ee = St(async () => {
|
|
18310
18310
|
if (!(v != null && v.canRevert) || !v.headSha)
|
|
18311
18311
|
throw new Error("There are no reversible changes applied");
|
|
18312
18312
|
const I = await tn(
|
|
@@ -18659,13 +18659,13 @@ function f0({
|
|
|
18659
18659
|
[F]
|
|
18660
18660
|
), Ee = p ?? Xn(), O = typeof (de == null ? void 0 : de.sourceRevision) == "string" ? de.sourceRevision : null, ve = O && Ee.startsWith("pending") ? Ee.replace(/^pending/, O) : Ee;
|
|
18661
18661
|
vf = ve;
|
|
18662
|
-
const we = u ??
|
|
18662
|
+
const we = u ?? xn(), Q = Ie([]), ge = Ie([]), Oe = Ft(
|
|
18663
18663
|
() => re.map((K) => ({
|
|
18664
18664
|
id: K.canonicalId,
|
|
18665
18665
|
fingerprint: Va(
|
|
18666
18666
|
K,
|
|
18667
18667
|
ve,
|
|
18668
|
-
|
|
18668
|
+
Gt()
|
|
18669
18669
|
)
|
|
18670
18670
|
})),
|
|
18671
18671
|
[re, ve, le]
|
|
@@ -18678,7 +18678,7 @@ function f0({
|
|
|
18678
18678
|
width: K.width ?? 390,
|
|
18679
18679
|
height: K.height ?? 600,
|
|
18680
18680
|
environment: Lt(
|
|
18681
|
-
|
|
18681
|
+
Gt(),
|
|
18682
18682
|
K.environment
|
|
18683
18683
|
),
|
|
18684
18684
|
preset: K.preset,
|
|
@@ -18693,7 +18693,7 @@ function f0({
|
|
|
18693
18693
|
previewRevision: ve,
|
|
18694
18694
|
// A capture only needs somewhere to fetch its assets — not the checkout.
|
|
18695
18695
|
appOrigin: $l(),
|
|
18696
|
-
baselineEnvironment:
|
|
18696
|
+
baselineEnvironment: Gt(),
|
|
18697
18697
|
allowStaleIdentity: !!x,
|
|
18698
18698
|
allowMatchingFrameIdentity: Le != null,
|
|
18699
18699
|
pages: re.map((K, ke) => {
|
|
@@ -18732,73 +18732,77 @@ function f0({
|
|
|
18732
18732
|
namespace: m,
|
|
18733
18733
|
previewRevision: p,
|
|
18734
18734
|
appOrigin: $l(),
|
|
18735
|
-
baselineEnvironment:
|
|
18735
|
+
baselineEnvironment: Gt(),
|
|
18736
18736
|
allowStaleIdentity: !0,
|
|
18737
18737
|
allowMatchingFrameIdentity: !0,
|
|
18738
|
-
pages: re.map((
|
|
18738
|
+
pages: re.map(($e, Ce) => {
|
|
18739
18739
|
var Ke;
|
|
18740
18740
|
return {
|
|
18741
|
-
|
|
18741
|
+
...$e,
|
|
18742
18742
|
fingerprint: (Ke = Oe[Ce]) == null ? void 0 : Ke.fingerprint
|
|
18743
18743
|
};
|
|
18744
18744
|
})
|
|
18745
18745
|
}), De(Se);
|
|
18746
|
-
}, Ne = (Se,
|
|
18746
|
+
}, Ne = (Se, $e, Ce) => Yg({
|
|
18747
18747
|
namespace: m,
|
|
18748
18748
|
sourceRevision: J,
|
|
18749
18749
|
transport: ke,
|
|
18750
18750
|
signal: Ce,
|
|
18751
18751
|
...Se.length ? { frames: Se } : {},
|
|
18752
|
-
|
|
18753
|
-
}), ze = (Se,
|
|
18754
|
-
const Ce = new Set(
|
|
18752
|
+
...$e ? {} : { generate: !1 }
|
|
18753
|
+
}), ze = (Se, $e) => {
|
|
18754
|
+
const Ce = new Set($e);
|
|
18755
18755
|
return Se.filter((Ke) => Ce.has(Ke.id));
|
|
18756
|
-
}, tt = (Se,
|
|
18756
|
+
}, tt = (Se, $e) => Se instanceof Error && Se.message ? Se.message : $e, Pe = new AbortController();
|
|
18757
18757
|
if (Bs(async (Se) => {
|
|
18758
|
-
var Ce, Ke, zt;
|
|
18759
|
-
const
|
|
18760
|
-
if (
|
|
18761
|
-
je(
|
|
18762
|
-
const
|
|
18763
|
-
if (Se.every((
|
|
18758
|
+
var Ce, Ke, zt, on;
|
|
18759
|
+
const $e = await Ne(Se, !0, Pe.signal);
|
|
18760
|
+
if ($e.status === "accepted") {
|
|
18761
|
+
je($e.artifact);
|
|
18762
|
+
const Qt = new Set(((Ce = $e.frameResolution) == null ? void 0 : Ce.exact) ?? []);
|
|
18763
|
+
if (Se.every((xt) => Qt.has(xt.id)))
|
|
18764
18764
|
return { status: "accepted" };
|
|
18765
|
-
const
|
|
18766
|
-
...((Ke =
|
|
18767
|
-
...((zt =
|
|
18765
|
+
const _t = [
|
|
18766
|
+
...((Ke = $e.frameResolution) == null ? void 0 : Ke.missing) ?? [],
|
|
18767
|
+
...((zt = $e.frameResolution) == null ? void 0 : zt.stale) ?? []
|
|
18768
18768
|
];
|
|
18769
18769
|
return {
|
|
18770
18770
|
status: "unavailable",
|
|
18771
|
-
message:
|
|
18771
|
+
message: _t.length ? `The exact preview endpoint did not return a current capture for ${_t.join(", ")}.` : "The exact preview endpoint returned no current capture."
|
|
18772
18772
|
};
|
|
18773
18773
|
}
|
|
18774
|
-
return
|
|
18774
|
+
return $e.status === "rejected" ? {
|
|
18775
18775
|
status: "rejected",
|
|
18776
|
-
message:
|
|
18776
|
+
message: $e.errors.join(" ") || "The preview artifact was rejected."
|
|
18777
18777
|
} : {
|
|
18778
18778
|
status: "unavailable",
|
|
18779
18779
|
message: tt(
|
|
18780
|
-
|
|
18780
|
+
$e.error,
|
|
18781
18781
|
"The exact preview endpoint is unavailable."
|
|
18782
|
-
)
|
|
18782
|
+
),
|
|
18783
|
+
// The endpoint says whether this is a wait or a defect. Carry the flag
|
|
18784
|
+
// rather than the wording: the frame badge decides on it, and a red
|
|
18785
|
+
// alert on every not-yet-prepared frame is how the real one gets ignored.
|
|
18786
|
+
...(on = $e.error) != null && on.pygmalionNotPrepared ? { notPrepared: !0 } : {}
|
|
18783
18787
|
};
|
|
18784
18788
|
}), Q.current.length) {
|
|
18785
18789
|
const Se = Q.current.filter((Ce) => {
|
|
18786
|
-
const Ke =
|
|
18790
|
+
const Ke = gn(
|
|
18787
18791
|
Ce.id,
|
|
18788
18792
|
Ce.fingerprint
|
|
18789
18793
|
).status;
|
|
18790
18794
|
return Ke !== "exact" && Ke !== "generating";
|
|
18791
18795
|
});
|
|
18792
|
-
|
|
18793
|
-
const
|
|
18794
|
-
const zt =
|
|
18796
|
+
vt(Se, { status: "checking" });
|
|
18797
|
+
const $e = (Ce) => Ce.filter((Ke) => {
|
|
18798
|
+
const zt = gn(
|
|
18795
18799
|
Ke.id,
|
|
18796
18800
|
Ke.fingerprint
|
|
18797
18801
|
).status;
|
|
18798
18802
|
return zt !== "generating" && zt !== "exact";
|
|
18799
18803
|
});
|
|
18800
18804
|
(async () => {
|
|
18801
|
-
var
|
|
18805
|
+
var Qt, _t, xt;
|
|
18802
18806
|
const Ce = ge.current.slice(
|
|
18803
18807
|
0,
|
|
18804
18808
|
Q.current.length
|
|
@@ -18809,15 +18813,15 @@ function f0({
|
|
|
18809
18813
|
(Be, He) => Ce[He] ? Ei(Ce[He]) : !1
|
|
18810
18814
|
).map((Be) => Be.id)
|
|
18811
18815
|
);
|
|
18812
|
-
|
|
18813
|
-
|
|
18816
|
+
vt(
|
|
18817
|
+
$e(
|
|
18814
18818
|
Se.filter((Be) => Ke.has(Be.id))
|
|
18815
18819
|
),
|
|
18816
18820
|
{ status: "exact" }
|
|
18817
18821
|
);
|
|
18818
|
-
const zt =
|
|
18822
|
+
const zt = $e(
|
|
18819
18823
|
Se.filter((Be) => !Ke.has(Be.id))
|
|
18820
|
-
),
|
|
18824
|
+
), on = [];
|
|
18821
18825
|
for (const Be of Wl(
|
|
18822
18826
|
zt
|
|
18823
18827
|
)) {
|
|
@@ -18830,14 +18834,14 @@ function f0({
|
|
|
18830
18834
|
});
|
|
18831
18835
|
if (K.signal.aborted) return;
|
|
18832
18836
|
if (He.status === "accepted") {
|
|
18833
|
-
|
|
18837
|
+
on.push(
|
|
18834
18838
|
...ze(Be, He.resolution.exact)
|
|
18835
18839
|
);
|
|
18836
|
-
const
|
|
18840
|
+
const Ot = ze(Be, [
|
|
18837
18841
|
...He.resolution.missing,
|
|
18838
18842
|
...He.resolution.stale
|
|
18839
18843
|
]);
|
|
18840
|
-
|
|
18844
|
+
vt($e(Ot), {
|
|
18841
18845
|
status: "outdated",
|
|
18842
18846
|
message: "Select this frame to generate the exact preview."
|
|
18843
18847
|
});
|
|
@@ -18847,14 +18851,14 @@ function f0({
|
|
|
18847
18851
|
He.error,
|
|
18848
18852
|
"The exact preview endpoint is unavailable."
|
|
18849
18853
|
);
|
|
18850
|
-
|
|
18854
|
+
vt($e(Be), {
|
|
18851
18855
|
status: "error",
|
|
18852
18856
|
reason: He.status === "rejected" ? "rejected" : "unavailable",
|
|
18853
18857
|
message: En
|
|
18854
18858
|
});
|
|
18855
18859
|
}
|
|
18856
18860
|
for (const Be of Wl(
|
|
18857
|
-
|
|
18861
|
+
$e(on)
|
|
18858
18862
|
)) {
|
|
18859
18863
|
const He = await Ne(
|
|
18860
18864
|
Be,
|
|
@@ -18863,15 +18867,15 @@ function f0({
|
|
|
18863
18867
|
);
|
|
18864
18868
|
if (K.signal.aborted) return;
|
|
18865
18869
|
if (He.status === "accepted") {
|
|
18866
|
-
je(He.artifact),
|
|
18867
|
-
ze(Be, ((
|
|
18870
|
+
je(He.artifact), vt(
|
|
18871
|
+
ze(Be, ((Qt = He.frameResolution) == null ? void 0 : Qt.exact) ?? []),
|
|
18868
18872
|
{ status: "exact" }
|
|
18869
18873
|
);
|
|
18870
|
-
const
|
|
18871
|
-
...((
|
|
18872
|
-
...((
|
|
18874
|
+
const Ot = ze(Be, [
|
|
18875
|
+
...((_t = He.frameResolution) == null ? void 0 : _t.missing) ?? [],
|
|
18876
|
+
...((xt = He.frameResolution) == null ? void 0 : xt.stale) ?? []
|
|
18873
18877
|
]);
|
|
18874
|
-
|
|
18878
|
+
vt($e(Ot), {
|
|
18875
18879
|
status: "outdated",
|
|
18876
18880
|
message: "Select this frame to generate the exact preview."
|
|
18877
18881
|
});
|
|
@@ -18881,7 +18885,7 @@ function f0({
|
|
|
18881
18885
|
He.error,
|
|
18882
18886
|
"The exact preview endpoint is unavailable."
|
|
18883
18887
|
);
|
|
18884
|
-
|
|
18888
|
+
vt($e(Be), {
|
|
18885
18889
|
status: "error",
|
|
18886
18890
|
reason: He.status === "rejected" ? "rejected" : "unavailable",
|
|
18887
18891
|
message: En
|
|
@@ -18889,8 +18893,8 @@ function f0({
|
|
|
18889
18893
|
}
|
|
18890
18894
|
})().catch((Ce) => {
|
|
18891
18895
|
if (K.signal.aborted) return;
|
|
18892
|
-
const Ke =
|
|
18893
|
-
|
|
18896
|
+
const Ke = $e(Se);
|
|
18897
|
+
vt(Ke, {
|
|
18894
18898
|
status: "error",
|
|
18895
18899
|
reason: "unavailable",
|
|
18896
18900
|
message: tt(
|
|
@@ -18901,7 +18905,7 @@ function f0({
|
|
|
18901
18905
|
});
|
|
18902
18906
|
}
|
|
18903
18907
|
return () => {
|
|
18904
|
-
Bs(null),
|
|
18908
|
+
Bs(null), Pe.abort(), K.abort();
|
|
18905
18909
|
};
|
|
18906
18910
|
}, [
|
|
18907
18911
|
x,
|
|
@@ -18947,14 +18951,14 @@ function f0({
|
|
|
18947
18951
|
const B = Ie(null);
|
|
18948
18952
|
return se(() => {
|
|
18949
18953
|
if (typeof document > "u" || !le) return;
|
|
18950
|
-
const K = u ??
|
|
18954
|
+
const K = u ?? xn();
|
|
18951
18955
|
if (!K) return;
|
|
18952
18956
|
const ke = `${K}|${p ?? Xn()}`;
|
|
18953
18957
|
return B.current != null && B.current !== ke && Ig(), B.current = ke, Vv({
|
|
18954
18958
|
editor: f,
|
|
18955
18959
|
getPages: () => f.pages,
|
|
18956
18960
|
appOrigin: K,
|
|
18957
|
-
baselineEnvironment:
|
|
18961
|
+
baselineEnvironment: Gt()
|
|
18958
18962
|
});
|
|
18959
18963
|
}, [u, le, p]), /* @__PURE__ */ s(_v, { previewIdentityReady: le });
|
|
18960
18964
|
}
|
|
@@ -19014,7 +19018,7 @@ export {
|
|
|
19014
19018
|
Em as getPreviewEnvironmentControls,
|
|
19015
19019
|
Rm as getPreviewEnvironmentOverride,
|
|
19016
19020
|
ba as getRecommendedPygmalionPreviewConcurrency,
|
|
19017
|
-
|
|
19021
|
+
Gt as getStoryboardBaselineEnvironment,
|
|
19018
19022
|
hf as getStoryboardDiscoveryBaselineEnvironment,
|
|
19019
19023
|
lo as getStoryboardGraph,
|
|
19020
19024
|
ab as getSurfaceClassifications,
|