@wix/himalaya-cli 0.1962.0 → 0.1964.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli.mjs +135 -57
  2. package/package.json +2 -2
package/dist/cli.mjs CHANGED
@@ -3964,6 +3964,7 @@ var init_himi_package = __esm({
3964
3964
  var ICON_VIEW_BOX, ICON_STROKE_WIDTH, ICON_FALLBACK, ICON_CATALOG, ICON_NORMALIZED_INDEX, ICON_NAMES;
3965
3965
  var init_icon_catalog_generated = __esm({
3966
3966
  "../../core/ts/src/icon-catalog.generated.ts"() {
3967
+ "use strict";
3967
3968
  init_define_HHP_CATALOG();
3968
3969
  ICON_VIEW_BOX = 24;
3969
3970
  ICON_STROKE_WIDTH = 2;
@@ -24997,20 +24998,35 @@ async function bootBundleWorker(bundleJs, opts) {
24997
24998
  }
24998
24999
  };
24999
25000
  const clone = (v2) => JSON.parse(serialize2(v2));
25000
- const findNonFinite = (v2, at2, out2, seen) => {
25001
- if (typeof v2 === "number") {
25002
- if (!Number.isFinite(v2)) out2.push(`${at2 || "(root)"} = ${String(v2)}`);
25003
- return;
25004
- }
25005
- if (!v2 || typeof v2 !== "object" || seen.has(v2)) return;
25006
- seen.add(v2);
25007
- if (Array.isArray(v2)) {
25008
- v2.forEach((x2, i2) => findNonFinite(x2, `${at2}[${i2}]`, out2, seen));
25009
- return;
25010
- }
25011
- for (const [k3, val] of Object.entries(v2)) {
25012
- findNonFinite(val, at2 ? `${at2}.${k3}` : k3, out2, seen);
25013
- }
25001
+ const findNonFinite = (root, out2, seen) => {
25002
+ const path2 = [];
25003
+ const spell = () => {
25004
+ let at2 = "";
25005
+ for (const seg2 of path2) at2 = typeof seg2 === "number" ? `${at2}[${seg2}]` : at2 ? `${at2}.${seg2}` : seg2;
25006
+ return at2;
25007
+ };
25008
+ const walk6 = (v2) => {
25009
+ if (typeof v2 === "number") {
25010
+ if (!Number.isFinite(v2)) out2.push(`${spell() || "(root)"} = ${String(v2)}`);
25011
+ return;
25012
+ }
25013
+ if (!v2 || typeof v2 !== "object" || seen.has(v2)) return;
25014
+ seen.add(v2);
25015
+ if (Array.isArray(v2)) {
25016
+ v2.forEach((x2, i2) => {
25017
+ path2.push(i2);
25018
+ walk6(x2);
25019
+ path2.pop();
25020
+ });
25021
+ return;
25022
+ }
25023
+ for (const [k3, val] of Object.entries(v2)) {
25024
+ path2.push(k3);
25025
+ walk6(val);
25026
+ path2.pop();
25027
+ }
25028
+ };
25029
+ walk6(root);
25014
25030
  };
25015
25031
  const applyResult = (def2, next) => {
25016
25032
  if (!next || typeof next !== "object" || Array.isArray(next)) return;
@@ -25165,7 +25181,7 @@ async function bootBundleWorker(bundleJs, opts) {
25165
25181
  getStateJson: () => serialize2(def2.state),
25166
25182
  stateDefects: () => {
25167
25183
  const out2 = [];
25168
- findNonFinite(def2.state, "", out2, /* @__PURE__ */ new Set());
25184
+ findNonFinite(def2.state, out2, /* @__PURE__ */ new Set());
25169
25185
  return out2;
25170
25186
  },
25171
25187
  actionNames: () => Object.keys(def2.actions ?? {}),
@@ -32476,6 +32492,7 @@ __export(validate_descriptor_exports, {
32476
32492
  nativeRequiredFindings: () => nativeRequiredFindings,
32477
32493
  navLogicBundleUrl: () => navLogicBundleUrl,
32478
32494
  nodeVmEvaluator: () => nodeVmEvaluator,
32495
+ nodeVmScriptCompiles: () => nodeVmScriptCompiles,
32479
32496
  nondeterministicServices: () => nondeterministicServices,
32480
32497
  nondeterministicServicesOrNull: () => nondeterministicServicesOrNull,
32481
32498
  pathCrossesOpaqueAuthorJson: () => pathCrossesOpaqueAuthorJson,
@@ -32511,8 +32528,29 @@ __export(validate_descriptor_exports, {
32511
32528
  });
32512
32529
  import { readFileSync as readFileSync21, existsSync as existsSync20, readdirSync as readdirSync15, statSync as statSync6 } from "node:fs";
32513
32530
  import { resolve as resolve20 } from "node:path";
32514
- import { createContext, runInContext } from "node:vm";
32531
+ import { createContext, Script } from "node:vm";
32515
32532
  import { createRequire } from "node:module";
32533
+ function nodeVmScriptCompiles() {
32534
+ return scriptCompiles;
32535
+ }
32536
+ function compiledScript(code3, filename) {
32537
+ const key4 = filename ?? "";
32538
+ let byName3 = compiledScripts.get(code3);
32539
+ let script2 = byName3?.get(key4);
32540
+ if (!script2) {
32541
+ script2 = new Script(code3, filename === void 0 ? {} : { filename });
32542
+ scriptCompiles += 1;
32543
+ }
32544
+ if (byName3) compiledScripts.delete(code3);
32545
+ else {
32546
+ if (compiledScripts.size >= COMPILED_SCRIPT_ENTRIES) compiledScripts.delete(compiledScripts.keys().next().value);
32547
+ byName3 = /* @__PURE__ */ new Map();
32548
+ }
32549
+ if (!byName3.has(key4) && byName3.size >= COMPILED_SCRIPT_NAMES) byName3.clear();
32550
+ byName3.set(key4, script2);
32551
+ compiledScripts.set(code3, byName3);
32552
+ return script2;
32553
+ }
32516
32554
  async function loadAllowedComponents(appDir3) {
32517
32555
  const modPath = resolve20(appDir3, "components.ts");
32518
32556
  if (!existsSync20(modPath)) return void 0;
@@ -32641,7 +32679,7 @@ function discoverNativeActions(appDir3) {
32641
32679
  searched: roots2.map(({ searched }) => searched)
32642
32680
  };
32643
32681
  }
32644
- var navigationCompiler, nodeVmEvaluator, navContractMemo, appServicesContextMemo, NATIVE_SCRATCH_DIRS, BUILD_OUTPUT_DIR, VANISHED, vanished, NATIVE_SOURCE_ROOTS, PLAYER_HOST_SEARCHED;
32682
+ var navigationCompiler, COMPILED_SCRIPT_ENTRIES, COMPILED_SCRIPT_NAMES, compiledScripts, scriptCompiles, nodeVmEvaluator, navContractMemo, appServicesContextMemo, NATIVE_SCRATCH_DIRS, BUILD_OUTPUT_DIR, VANISHED, vanished, NATIVE_SOURCE_ROOTS, PLAYER_HOST_SEARCHED;
32645
32683
  var init_validate_descriptor = __esm({
32646
32684
  "../../core/dev-server/src/validate-descriptor.ts"() {
32647
32685
  init_define_HHP_CATALOG();
@@ -32656,20 +32694,24 @@ var init_validate_descriptor = __esm({
32656
32694
  navigationCompiler = createRequire(import.meta.url);
32657
32695
  setDeclaredNavigationAnalyzer((source2) => literalTargets(source2, navigationCompiler("typescript")));
32658
32696
  setFixedNavigationAnalyzer((source2) => fixedNavigations(source2, navigationCompiler("typescript")));
32697
+ COMPILED_SCRIPT_ENTRIES = 8;
32698
+ COMPILED_SCRIPT_NAMES = 4;
32699
+ compiledScripts = /* @__PURE__ */ new Map();
32700
+ scriptCompiles = 0;
32659
32701
  nodeVmEvaluator = {
32660
32702
  evaluatesSandboxDirectly: true,
32661
32703
  run(code3, sandbox, opts) {
32662
32704
  const context = createContext(sandbox);
32663
32705
  if (opts.deviceParity) {
32664
- runInContext(allowlistSweepSource(Object.keys(sandbox)), context, { filename: "himi-sweep.js" });
32706
+ compiledScript(allowlistSweepSource(Object.keys(sandbox)), "himi-sweep.js").runInContext(context);
32665
32707
  }
32666
32708
  const pins = pinnedIntrinsicsSource(opts);
32667
32709
  if (pins) {
32668
- const pinned = runInContext(`(${pins})(Date, Math)`, context, { timeout: opts.timeoutMs, filename: "himi-pins.js" });
32710
+ const pinned = compiledScript(`(${pins})(Date, Math)`, "himi-pins.js").runInContext(context, { timeout: opts.timeoutMs });
32669
32711
  if (pinned.Date) sandbox.Date = pinned.Date;
32670
32712
  if (pinned.Math) sandbox.Math = pinned.Math;
32671
32713
  }
32672
- runInContext(code3, context, { timeout: opts.timeoutMs, filename: opts.filename });
32714
+ compiledScript(code3, opts.filename).runInContext(context, { timeout: opts.timeoutMs });
32673
32715
  }
32674
32716
  };
32675
32717
  setDefaultEvaluator(nodeVmEvaluator);
@@ -46394,6 +46436,7 @@ function shouldRevealError(args) {
46394
46436
  var EMAIL_RE, URL_HOST_RE, INTEGER_RE, NUMBER_RE, AUTHORED_PATTERN_LIMIT, authoredPatterns;
46395
46437
  var init_validation = __esm({
46396
46438
  "../../core/ts/src/validation.ts"() {
46439
+ "use strict";
46397
46440
  init_define_HHP_CATALOG();
46398
46441
  EMAIL_RE = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,}$/;
46399
46442
  URL_HOST_RE = /^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(:[0-9]+)?$/;
@@ -96999,7 +97042,7 @@ async function incrementalUpdate({ originalData: e2, xrefInfo: t2, changes: n2,
96999
97042
  for (const e3 of m2) j2 = writeString(e3, j2, w2);
97000
97043
  return w2;
97001
97044
  }
97002
- var e, t, n, a, r, s, i, o, l2, f, c, h, u, m, p, d, g, b2, w, j, k, y, q, v, S, x, C, T, O, R, D, H, M, N, _, E, z, L, U, W, X, K2, G, V2, $, Y, J, Q, Z, ee, te, ne, ae, re, se, ie, oe, le, fe, ce, he, ue, me, pe, de, ge, be, we, je, ke, ye, qe, ve, Se, Ae, xe, Ce, Ie, Fe, Te, Oe, Re, Be, De, He, Me, Ne, Pe, _e, Ee, ze, Le, Ue, We, Xe, Ke, Ge, Ve, $e, Ye, Je, Qe, Ze, et, tt, nt, rt, st, it, ot, lt, ft, ct, ht, ut, mt, pt, dt, gt, bt, wt, jt, kt, yt, qt, vt, St, At, xt, Ct, It, Ft, Tt, Ot, Rt, Bt, Dt, Ht, Mt, Nt, Pt, _t, Et, zt, Lt, Ut, Wt, Xt, Kt, Gt, Vt, $t, Yt, Jt, Qt, Zt, en, tn, nn, an, rn, sn, on, ln, PasswordException2, UnknownErrorException2, InvalidPDFException2, ResponseException2, FormatError2, AbortException2, FeatureTest2, Util2, fn, cn, makeArr2, makeMap2, makeObj2, makeSet2, hn, un, mn, pn, dn, Name, Cmd, nonSerializable, Dict, Ref, RefSet, RefMap, BaseStream, gn, bn, wn, jn, kn, yn, qn, vn, MissingDataException, ParserEOFException, XRefEntryException, XRefParseException, Sn, An, xn, Cn, QCMS, In, Fn, Tn, On, Rn, Bn, Dn, Hn, Mn, Nn, ColorSpace, AlternateCS, PatternCS, IndexedCS, DeviceGrayCS, DeviceRgbCS, DeviceRgbaCS, DeviceCmykCS, CalGrayCS, CalRGBCS, LabCS, IccColorSpace, CmykICCBasedCS, Stream, StringStream, NullStream, ChunkedStream, ChunkedStreamManager, ImageResizer, Pn, DecodeStream, StreamsSequenceStream, ColorSpaceUtils, JpegError, DNLMarkerError, EOIMarkerError, _n, En, zn, Ln, Un, Wn, Xn, Kn, Gn, JpegImage, JpegStream, Vn, NullOptimizer, QueueOptimizer, OperatorList, CheckedOperatorList, $n, Yn, Jn, Qn, Zn, ea, ta, Pattern, BaseShading, RadialAxialShading, FunctionBasedShading, MeshStreamReader, na, MeshShading, DummyShading, aa, BinaryCMapStream, BinaryCMapReader, Ascii85Stream, AsciiHexStream, ra, BrotliStream, sa, WasmImage, Jbig2Error, JBig2CCITTFaxImage, CCITTFaxStream, ia, oa, la, fa, ca, FlateStream, Jbig2Stream, ha, JpxError, JpxImage, JpxStream, LZWStream, PredictorStream, RunLengthStream, Parser, ua, Lexer, Linearization, ma, pa, CMap, IdentityCMap, CMapFactory, da, ga, ba, wa, ja, ka, ya, qa, va, Sa, Aa, xa, Ca, Ia, Fa, Ta, Oa, Ra, Ba, Da, Ha, Ma, DataBuilder, Na, Pa, _a2, Ea, za, CFFParser, CFF, CFFHeader, CFFStrings, CFFIndex, CFFDict, La, CFFTopDict, Ua, CFFPrivateDict, Wa, CFFCharset, CFFEncoding, CFFFDSelect, CFFOffsetTracker, CFFCompiler, Xa, Ka, Ga, Va, $a, Ya, Ja, Qa, Za, er, tr, nr, GlyfTable, Glyph2, GlyphHeader, Contour, SimpleGlyph, CompositeGlyph, ToUnicodeMap, IdentityToUnicodeMap, CFFFont, CSS_FONT_INFO2, SYSTEM_FONT_INFO2, FONT_INFO2, PATTERN_INFO2, InfoUtils2, Commands, CompiledFont, TrueTypeCompiled, Type2Compiled, FontRendererFactory, ar, rr, OpenTypeFileBuilder, sr, ir, or, lr, fr, cr, hr, ur, mr, pr, dr, Type1CharString, Type1Parser, Type1Font, gr, br, wr, jr, fonts_Glyph, kr, Font, ErrorFont, yr, qr, vr, Sr, Ar, xr, Cr, Ir, Fr, Tr, Or, Rr, Dr, Hr, Mr, Nr, Pr, _r, Er, zr, Lr, Ur, Wr, Xr, Kr, Gr, Vr, $r, Yr, Jr, Qr, Zr, es, ts8, ns, as, rs, ss, is, os, ls, fs, Token, lexer_Lexer, cs, hs, us, ms, ps, ds, gs, bs, ws, js, ks, ys, qs, vs, PsNode, PsProgram, PsBlock, PsNumber, PsOperator, PsIf, PsIfElse, PsArgNode, PsConstNode, PsUnaryNode, PsBinaryNode, PsTernaryNode, ast_Parser, Ss, PSStackToTree, As, xs, Cs, Is, Fs, Ts, Os, Rs, Bs, Ds, Hs, Ms, Ns, _s, Es, zs, Ls, Us, Ws, Xs, Ks, Gs, Vs, $s, Ys, Js, Qs, Zs, ei, ti, ni, ai, ri, si, ii, oi, li, fi, ci, hi, ui, mi, pi, PsJsCompiler, PSStackBasedInterpreter, di, gi, bi, wi, ji, ki, yi, qi, vi, Si, PsWasmCompiler, BaseLocalCache, LocalImageCache, LocalColorSpaceCache, LocalFunctionCache, LocalGStateCache, LocalTilingPatternCache, RegionalImageCache, GlobalColorSpaceCache, GlobalImageCache, Ai, xi, Ci, Ii, PDFFunctionFactory, PDFFunction, Fi, Ti, Oi, Ri, Bi, Di, Hi, Mi, Ni, Pi, _i, Ei, zi, Wi, MurmurHash3_642, PDFImage, Xi, Ki, Gi, Vi, TimeSlotManager, PartialEvaluator, TranslatedFont, StateManager, TextState, EvalState, EvaluatorPreprocessor, DefaultAppearanceEvaluator, AppearanceStreamEvaluator, FakeUnicodeFont, $i, Yi, NameOrNumberTree, NameTree, NumberTree, FileSpec, Ji, Qi, Zi, eo, to, no, ao, XMLParserBase, SimpleDOMNode, SimpleXMLParser, MetadataParser, ro, so, io, oo, lo, fo, StructTreeRoot, StructElementNode, StructElement, StructTreePage, co, Catalog, ObjectLoader, ho, uo, mo, po, go, bo, wo, jo, ko, yo, qo, vo, So, Ao, xo, Co, Io, Fo, Oo, Ro, Bo, Do, Ho, Mo, No, Po, _o, Eo, zo, Lo, Uo, Wo, Xo, Ko, Go, Vo, $o, Yo, Jo, Qo, Zo, el, tl, nl, al, rl, sl, il, ol, ll, fl, cl, hl, ul, ml, pl, dl, gl, bl, wl, jl, kl, yl, ql, vl, Sl, Al, xl, Cl, Il, Fl, Tl, HTMLResult, FontFinder, FontInfo2, FontSelector, TextMeasure, Rl, Bl, Dl, Hl, Ml, Nl, Pl, _l, El, zl, Ll, Wl, Xl, Kl, Gl, Vl, $l, Yl, Jl, Ql, Zl, ef, tf, nf, af, rf, sf, of, XFAObject, XFAObjectArray, XFAAttribute, XmlObject, ContentObject, OptionObject, StringObject, IntegerObject, Option01, Option10, lf, ff, cf, hf, uf, AppearanceFilter, Arc, Area, Assist, Barcode, Bind, BindItems, Bookend, BooleanElement, Border, Break, BreakAfter, BreakBefore, Button, Calculate, Caption, Certificate, Certificates, CheckButton, ChoiceList, Color, Comb, Connect, ContentArea, Corner, DateElement, DateTime, DateTimeEdit, Decimal, DefaultUi, Desc, DigestMethod, DigestMethods, Draw, Edge, Encoding, Encodings, Encrypt, EncryptData, Encryption, EncryptionMethod, EncryptionMethods, Event2, ExData, ExObject, ExclGroup, Execute, Extras, Field, Fill, Filter, Float, template_Font, Format, Handler, Hyphenation, Image2, ImageEdit, Integer, Issuers, Items, Keep, KeyUsage, Line, Linear, LockDocument, Manifest, Margin, Mdp, Medium, Message, NumericEdit, Occur, Oid, Oids, Overflow, PageArea, PageSet, Para, PasswordEdit, template_Pattern, Picture, Proto, Radial, Reason, Reasons, Rectangle, RefElement, Script, SetProperty, SignData, Signature, Signing, Solid, Speak, Stipple, Subform, SubformSet, SubjectDN, SubjectDNs, Submit, Template, Text, TextEdit, Time, TimeStamp, ToolTip, Traversal, Traverse, Ui, Validate, Value, Variables, TemplateNamespace, mf, Binder, DataHandler, pf, Acrobat, Acrobat7, ADBE_JSConsole, ADBE_JSDebugger, AddSilentPrint, AddViewerPreferences, AdjustData, AdobeExtensionLevel, Agent, AlwaysEmbed, Amd, config_Area, Attributes, AutoSave, Base, BatchOutput, BehaviorOverride, Cache, Change, Common, Compress, CompressLogicalStructure, CompressObjectStream, Compression, Config, Conformance, ContentCopy, Copies, Creator, CurrentPage, Data, Debug, DefaultTypeface, Destination, DocumentAssembly, Driver, DuplexOption, DynamicRender, Embed, config_Encrypt, config_Encryption, EncryptionLevel, Enforce, Equate, EquateRange, Exclude, ExcludeNS, FlipLabel, config_FontInfo, FormFieldFilling, GroupParent, IfEmpty, IncludeXDPContent, IncrementalLoad, IncrementalMerge, Interactive, Jog, LabelPrinter, Layout, Level, Linearized, Locale, LocaleSet, Log, MapElement, MediumInfo, config_Message, Messaging, Mode, ModifyAnnots, MsgId, NameAttr, NeverEmbed, NumberOfCopies, OpenAction, Output, OutputBin, OutputXSL, Overprint, Packets, PageOffset, PageRange, Pagination, PaginationOverride, Part, Pcl, Pdf, Pdfa, Permissions, PickTrayByPDFSize, config_Picture, PlaintextMetadata, Presence, Present, Print, PrintHighQuality, PrintScaling, PrinterName, Producer, Ps, Range2, Record, Relevant, Rename, RenderPolicy, RunScripts, config_Script, ScriptModel, Severity, SilentPrint, Staple, StartNode, StartPage, SubmitFormat, SubmitUrl, SubsetBelow, SuppressBanner, Tagged, config_Template, Threshold, To, TemplateCache, Trace, Transform, Type, Uri, config_Validate, ValidateApprovalSignatures, ValidationMessaging, Version, VersionControl, ViewerPreferences, WebClient, Whitespace, Window, Xdc, Xdp, Xsl, Zpl, ConfigNamespace, df, ConnectionSet, EffectiveInputPolicy, EffectiveOutputPolicy, Operation, RootElement, SoapAction, SoapAddress, connection_set_Uri, WsdlAddress, WsdlConnection, XmlConnection, XsdConnection, ConnectionSetNamespace, gf, datasets_Data, Datasets, DatasetsNamespace, bf, CalendarSymbols, CurrencySymbol, CurrencySymbols, DatePattern, DatePatterns, DateTimeSymbols, Day, DayNames, Era, EraNames, locale_set_Locale, locale_set_LocaleSet, Meridiem, MeridiemNames, Month, MonthNames, NumberPattern, NumberPatterns, NumberSymbol, NumberSymbols, TimePattern, TimePatterns, TypeFace, TypeFaces, LocaleSetNamespace, wf, signature_Signature, SignatureNamespace, jf, Stylesheet, StylesheetNamespace, kf, xdp_Xdp, XdpNamespace, yf, qf, vf, Sf, Af, xf, Cf, If, XhtmlObject, A, B, Body, Br, Html, I, Li, Ol, P, Span, Sub, Sup, Ul, XhtmlNamespace, Ff, UnknownNamespace, Root, Empty, Builder, XFAParser, XFAFactory, AnnotationFactory, Annotation, AnnotationBorderStyle, MarkupAnnotation, WidgetAnnotation, TextWidgetAnnotation, ButtonWidgetAnnotation, ChoiceWidgetAnnotation, SignatureWidgetAnnotation, TextAnnotation, LinkAnnotation, PopupAnnotation, FreeTextAnnotation, LineAnnotation, SquareAnnotation, CircleAnnotation, PolylineAnnotation, PolygonAnnotation, CaretAnnotation, InkAnnotation, HighlightAnnotation, UnderlineAnnotation, SquigglyAnnotation, StrikeOutAnnotation, StampAnnotation, FileAttachmentAnnotation, MediaAnnotation, RichMediaAnnotation, ScreenAnnotation, SoundAnnotation, Tf, DatasetXMLParser, DatasetReader, SingleIntersector, Of, Intersector, Word64, Rf, Bf, DecryptStream, Df, Hf, ARCFourCipher, NullCipher, AESBaseCipher, AES128Cipher, AES256Cipher, PDFBase, PDF17, PDF20, CipherTransform, CipherTransformFactory, XRef, Mf, Page, Nf, Pf, _f, PDFDocument, BasePdfManager, LocalPdfManager, NetworkPdfManager, Ef, zf, Lf, Uf, Wf, Xf, Kf, Gf, Vf, $f, MessageHandler2, PageData, DocumentData, XRefWrapper, PDFEditor, BasePDFStream2, BasePDFStreamReader2, BasePDFStreamRangeReader2, PDFWorkerStream, PDFWorkerStreamReader, PDFWorkerStreamRangeReader, WorkerTask, WorkerMessageHandler;
97045
+ var e, t, n, a, r, s, i, o, l2, f, c, h, u, m, p, d, g, b2, w, j, k, y, q, v, S, x, C, T, O, R, D, H, M, N, _, E, z, L, U, W, X, K2, G, V2, $, Y, J, Q, Z, ee, te, ne, ae, re, se, ie, oe, le, fe, ce, he, ue, me, pe, de, ge, be, we, je, ke, ye, qe, ve, Se, Ae, xe, Ce, Ie, Fe, Te, Oe, Re, Be, De, He, Me, Ne, Pe, _e, Ee, ze, Le, Ue, We, Xe, Ke, Ge, Ve, $e, Ye, Je, Qe, Ze, et, tt, nt, rt, st, it, ot, lt, ft, ct, ht, ut, mt, pt, dt, gt, bt, wt, jt, kt, yt, qt, vt, St, At, xt, Ct, It, Ft, Tt, Ot, Rt, Bt, Dt, Ht, Mt, Nt, Pt, _t, Et, zt, Lt, Ut, Wt, Xt, Kt, Gt, Vt, $t, Yt, Jt, Qt, Zt, en, tn, nn, an, rn, sn, on, ln, PasswordException2, UnknownErrorException2, InvalidPDFException2, ResponseException2, FormatError2, AbortException2, FeatureTest2, Util2, fn, cn, makeArr2, makeMap2, makeObj2, makeSet2, hn, un, mn, pn, dn, Name, Cmd, nonSerializable, Dict, Ref, RefSet, RefMap, BaseStream, gn, bn, wn, jn, kn, yn, qn, vn, MissingDataException, ParserEOFException, XRefEntryException, XRefParseException, Sn, An, xn, Cn, QCMS, In, Fn, Tn, On, Rn, Bn, Dn, Hn, Mn, Nn, ColorSpace, AlternateCS, PatternCS, IndexedCS, DeviceGrayCS, DeviceRgbCS, DeviceRgbaCS, DeviceCmykCS, CalGrayCS, CalRGBCS, LabCS, IccColorSpace, CmykICCBasedCS, Stream, StringStream, NullStream, ChunkedStream, ChunkedStreamManager, ImageResizer, Pn, DecodeStream, StreamsSequenceStream, ColorSpaceUtils, JpegError, DNLMarkerError, EOIMarkerError, _n, En, zn, Ln, Un, Wn, Xn, Kn, Gn, JpegImage, JpegStream, Vn, NullOptimizer, QueueOptimizer, OperatorList, CheckedOperatorList, $n, Yn, Jn, Qn, Zn, ea, ta, Pattern, BaseShading, RadialAxialShading, FunctionBasedShading, MeshStreamReader, na, MeshShading, DummyShading, aa, BinaryCMapStream, BinaryCMapReader, Ascii85Stream, AsciiHexStream, ra, BrotliStream, sa, WasmImage, Jbig2Error, JBig2CCITTFaxImage, CCITTFaxStream, ia, oa, la, fa, ca, FlateStream, Jbig2Stream, ha, JpxError, JpxImage, JpxStream, LZWStream, PredictorStream, RunLengthStream, Parser, ua, Lexer, Linearization, ma, pa, CMap, IdentityCMap, CMapFactory, da, ga, ba, wa, ja, ka, ya, qa, va, Sa, Aa, xa, Ca, Ia, Fa, Ta, Oa, Ra, Ba, Da, Ha, Ma, DataBuilder, Na, Pa, _a2, Ea, za, CFFParser, CFF, CFFHeader, CFFStrings, CFFIndex, CFFDict, La, CFFTopDict, Ua, CFFPrivateDict, Wa, CFFCharset, CFFEncoding, CFFFDSelect, CFFOffsetTracker, CFFCompiler, Xa, Ka, Ga, Va, $a, Ya, Ja, Qa, Za, er, tr, nr, GlyfTable, Glyph2, GlyphHeader, Contour, SimpleGlyph, CompositeGlyph, ToUnicodeMap, IdentityToUnicodeMap, CFFFont, CSS_FONT_INFO2, SYSTEM_FONT_INFO2, FONT_INFO2, PATTERN_INFO2, InfoUtils2, Commands, CompiledFont, TrueTypeCompiled, Type2Compiled, FontRendererFactory, ar, rr, OpenTypeFileBuilder, sr, ir, or, lr, fr, cr, hr, ur, mr, pr, dr, Type1CharString, Type1Parser, Type1Font, gr, br, wr, jr, fonts_Glyph, kr, Font, ErrorFont, yr, qr, vr, Sr, Ar, xr, Cr, Ir, Fr, Tr, Or, Rr, Dr, Hr, Mr, Nr, Pr, _r, Er, zr, Lr, Ur, Wr, Xr, Kr, Gr, Vr, $r, Yr, Jr, Qr, Zr, es, ts8, ns, as, rs, ss, is, os, ls, fs, Token, lexer_Lexer, cs, hs, us, ms, ps, ds, gs, bs, ws, js, ks, ys, qs, vs, PsNode, PsProgram, PsBlock, PsNumber, PsOperator, PsIf, PsIfElse, PsArgNode, PsConstNode, PsUnaryNode, PsBinaryNode, PsTernaryNode, ast_Parser, Ss, PSStackToTree, As, xs, Cs, Is, Fs, Ts, Os, Rs, Bs, Ds, Hs, Ms, Ns, _s, Es, zs, Ls, Us, Ws, Xs, Ks, Gs, Vs, $s, Ys, Js, Qs, Zs, ei, ti, ni, ai, ri, si, ii, oi, li, fi, ci, hi, ui, mi, pi, PsJsCompiler, PSStackBasedInterpreter, di, gi, bi, wi, ji, ki, yi, qi, vi, Si, PsWasmCompiler, BaseLocalCache, LocalImageCache, LocalColorSpaceCache, LocalFunctionCache, LocalGStateCache, LocalTilingPatternCache, RegionalImageCache, GlobalColorSpaceCache, GlobalImageCache, Ai, xi, Ci, Ii, PDFFunctionFactory, PDFFunction, Fi, Ti, Oi, Ri, Bi, Di, Hi, Mi, Ni, Pi, _i, Ei, zi, Wi, MurmurHash3_642, PDFImage, Xi, Ki, Gi, Vi, TimeSlotManager, PartialEvaluator, TranslatedFont, StateManager, TextState, EvalState, EvaluatorPreprocessor, DefaultAppearanceEvaluator, AppearanceStreamEvaluator, FakeUnicodeFont, $i, Yi, NameOrNumberTree, NameTree, NumberTree, FileSpec, Ji, Qi, Zi, eo, to, no, ao, XMLParserBase, SimpleDOMNode, SimpleXMLParser, MetadataParser, ro, so, io, oo, lo, fo, StructTreeRoot, StructElementNode, StructElement, StructTreePage, co, Catalog, ObjectLoader, ho, uo, mo, po, go, bo, wo, jo, ko, yo, qo, vo, So, Ao, xo, Co, Io, Fo, Oo, Ro, Bo, Do, Ho, Mo, No, Po, _o, Eo, zo, Lo, Uo, Wo, Xo, Ko, Go, Vo, $o, Yo, Jo, Qo, Zo, el, tl, nl, al, rl, sl, il, ol, ll, fl, cl, hl, ul, ml, pl, dl, gl, bl, wl, jl, kl, yl, ql, vl, Sl, Al, xl, Cl, Il, Fl, Tl, HTMLResult, FontFinder, FontInfo2, FontSelector, TextMeasure, Rl, Bl, Dl, Hl, Ml, Nl, Pl, _l, El, zl, Ll, Wl, Xl, Kl, Gl, Vl, $l, Yl, Jl, Ql, Zl, ef, tf, nf, af, rf, sf, of, XFAObject, XFAObjectArray, XFAAttribute, XmlObject, ContentObject, OptionObject, StringObject, IntegerObject, Option01, Option10, lf, ff, cf, hf, uf, AppearanceFilter, Arc, Area, Assist, Barcode, Bind, BindItems, Bookend, BooleanElement, Border, Break, BreakAfter, BreakBefore, Button, Calculate, Caption, Certificate, Certificates, CheckButton, ChoiceList, Color, Comb, Connect, ContentArea, Corner, DateElement, DateTime, DateTimeEdit, Decimal, DefaultUi, Desc, DigestMethod, DigestMethods, Draw, Edge, Encoding, Encodings, Encrypt, EncryptData, Encryption, EncryptionMethod, EncryptionMethods, Event2, ExData, ExObject, ExclGroup, Execute, Extras, Field, Fill, Filter, Float, template_Font, Format, Handler, Hyphenation, Image2, ImageEdit, Integer, Issuers, Items, Keep, KeyUsage, Line, Linear, LockDocument, Manifest, Margin, Mdp, Medium, Message, NumericEdit, Occur, Oid, Oids, Overflow, PageArea, PageSet, Para, PasswordEdit, template_Pattern, Picture, Proto, Radial, Reason, Reasons, Rectangle, RefElement, Script2, SetProperty, SignData, Signature, Signing, Solid, Speak, Stipple, Subform, SubformSet, SubjectDN, SubjectDNs, Submit, Template, Text, TextEdit, Time, TimeStamp, ToolTip, Traversal, Traverse, Ui, Validate, Value, Variables, TemplateNamespace, mf, Binder, DataHandler, pf, Acrobat, Acrobat7, ADBE_JSConsole, ADBE_JSDebugger, AddSilentPrint, AddViewerPreferences, AdjustData, AdobeExtensionLevel, Agent, AlwaysEmbed, Amd, config_Area, Attributes, AutoSave, Base, BatchOutput, BehaviorOverride, Cache, Change, Common, Compress, CompressLogicalStructure, CompressObjectStream, Compression, Config, Conformance, ContentCopy, Copies, Creator, CurrentPage, Data, Debug, DefaultTypeface, Destination, DocumentAssembly, Driver, DuplexOption, DynamicRender, Embed, config_Encrypt, config_Encryption, EncryptionLevel, Enforce, Equate, EquateRange, Exclude, ExcludeNS, FlipLabel, config_FontInfo, FormFieldFilling, GroupParent, IfEmpty, IncludeXDPContent, IncrementalLoad, IncrementalMerge, Interactive, Jog, LabelPrinter, Layout, Level, Linearized, Locale, LocaleSet, Log, MapElement, MediumInfo, config_Message, Messaging, Mode, ModifyAnnots, MsgId, NameAttr, NeverEmbed, NumberOfCopies, OpenAction, Output, OutputBin, OutputXSL, Overprint, Packets, PageOffset, PageRange, Pagination, PaginationOverride, Part, Pcl, Pdf, Pdfa, Permissions, PickTrayByPDFSize, config_Picture, PlaintextMetadata, Presence, Present, Print, PrintHighQuality, PrintScaling, PrinterName, Producer, Ps, Range2, Record, Relevant, Rename, RenderPolicy, RunScripts, config_Script, ScriptModel, Severity, SilentPrint, Staple, StartNode, StartPage, SubmitFormat, SubmitUrl, SubsetBelow, SuppressBanner, Tagged, config_Template, Threshold, To, TemplateCache, Trace, Transform, Type, Uri, config_Validate, ValidateApprovalSignatures, ValidationMessaging, Version, VersionControl, ViewerPreferences, WebClient, Whitespace, Window, Xdc, Xdp, Xsl, Zpl, ConfigNamespace, df, ConnectionSet, EffectiveInputPolicy, EffectiveOutputPolicy, Operation, RootElement, SoapAction, SoapAddress, connection_set_Uri, WsdlAddress, WsdlConnection, XmlConnection, XsdConnection, ConnectionSetNamespace, gf, datasets_Data, Datasets, DatasetsNamespace, bf, CalendarSymbols, CurrencySymbol, CurrencySymbols, DatePattern, DatePatterns, DateTimeSymbols, Day, DayNames, Era, EraNames, locale_set_Locale, locale_set_LocaleSet, Meridiem, MeridiemNames, Month, MonthNames, NumberPattern, NumberPatterns, NumberSymbol, NumberSymbols, TimePattern, TimePatterns, TypeFace, TypeFaces, LocaleSetNamespace, wf, signature_Signature, SignatureNamespace, jf, Stylesheet, StylesheetNamespace, kf, xdp_Xdp, XdpNamespace, yf, qf, vf, Sf, Af, xf, Cf, If, XhtmlObject, A, B, Body, Br, Html, I, Li, Ol, P, Span, Sub, Sup, Ul, XhtmlNamespace, Ff, UnknownNamespace, Root, Empty, Builder, XFAParser, XFAFactory, AnnotationFactory, Annotation, AnnotationBorderStyle, MarkupAnnotation, WidgetAnnotation, TextWidgetAnnotation, ButtonWidgetAnnotation, ChoiceWidgetAnnotation, SignatureWidgetAnnotation, TextAnnotation, LinkAnnotation, PopupAnnotation, FreeTextAnnotation, LineAnnotation, SquareAnnotation, CircleAnnotation, PolylineAnnotation, PolygonAnnotation, CaretAnnotation, InkAnnotation, HighlightAnnotation, UnderlineAnnotation, SquigglyAnnotation, StrikeOutAnnotation, StampAnnotation, FileAttachmentAnnotation, MediaAnnotation, RichMediaAnnotation, ScreenAnnotation, SoundAnnotation, Tf, DatasetXMLParser, DatasetReader, SingleIntersector, Of, Intersector, Word64, Rf, Bf, DecryptStream, Df, Hf, ARCFourCipher, NullCipher, AESBaseCipher, AES128Cipher, AES256Cipher, PDFBase, PDF17, PDF20, CipherTransform, CipherTransformFactory, XRef, Mf, Page, Nf, Pf, _f, PDFDocument, BasePdfManager, LocalPdfManager, NetworkPdfManager, Ef, zf, Lf, Uf, Wf, Xf, Kf, Gf, Vf, $f, MessageHandler2, PageData, DocumentData, XRefWrapper, PDFEditor, BasePDFStream2, BasePDFStreamReader2, BasePDFStreamRangeReader2, PDFWorkerStream, PDFWorkerStreamReader, PDFWorkerStreamRangeReader, WorkerTask, WorkerMessageHandler;
97003
97046
  var init_pdf_worker_min = __esm({
97004
97047
  "../../node_modules/pdfjs-dist/legacy/build/pdf.worker.min.mjs?url"() {
97005
97048
  init_define_HHP_CATALOG();
@@ -130122,7 +130165,7 @@ var init_pdf_worker_min = __esm({
130122
130165
  this.usehref = e2.usehref || "";
130123
130166
  }
130124
130167
  };
130125
- Script = class extends StringObject {
130168
+ Script2 = class extends StringObject {
130126
130169
  constructor(e2) {
130127
130170
  super(ff, "script");
130128
130171
  this.binding = e2.binding || "";
@@ -131208,7 +131251,7 @@ var init_pdf_worker_min = __esm({
131208
131251
  return new RefElement(e2);
131209
131252
  }
131210
131253
  static script(e2) {
131211
- return new Script(e2);
131254
+ return new Script2(e2);
131212
131255
  }
131213
131256
  static setProperty(e2) {
131214
131257
  return new SetProperty(e2);
@@ -160581,6 +160624,7 @@ __export(screen_crawl_exports, {
160581
160624
  rootOnAppear: () => rootOnAppear,
160582
160625
  snapshot: () => snapshot3,
160583
160626
  snapshotState: () => snapshotState,
160627
+ stateOnlyCheckCounts: () => stateOnlyCheckCounts,
160584
160628
  structuralSignature: () => structuralSignature,
160585
160629
  unverifiableNodes: () => unverifiableNodes,
160586
160630
  workerArgs: () => workerArgs
@@ -161461,17 +161505,23 @@ function guardRepeatedCalls(call, onLoop, limit = REPEATED_CALL_LIMIT) {
161461
161505
  throw new Error(message5);
161462
161506
  };
161463
161507
  }
161508
+ function stateOnlyCheckCounts() {
161509
+ return { computed: stateOnlyComputes, replayed: stateOnlyRecomputesSkipped };
161510
+ }
161464
161511
  function snapshot3(w2) {
161465
- const state = {};
161512
+ const { state, json: json9 } = snapshotPieces(w2);
161466
161513
  const defects = {};
161467
161514
  for (const [name, h2] of Object.entries(w2.handles)) {
161468
- state[name] = h2.getState();
161469
161515
  const d2 = h2.stateDefects();
161470
161516
  if (d2.length) defects[name] = d2;
161471
161517
  }
161472
- return { state, defects };
161518
+ return { state, defects, stateJson: json9 };
161473
161519
  }
161474
161520
  function snapshotState(w2) {
161521
+ const { state, json: json9 } = snapshotPieces(w2);
161522
+ return { state, json: json9() };
161523
+ }
161524
+ function snapshotPieces(w2) {
161475
161525
  const state = {};
161476
161526
  const pieces = [];
161477
161527
  for (const [name, h2] of Object.entries(w2.handles)) {
@@ -161484,13 +161534,18 @@ function snapshotState(w2) {
161484
161534
  pieces.push([name, void 0]);
161485
161535
  }
161486
161536
  }
161487
- const parts = [];
161488
- for (const [name, text32] of pieces) {
161489
- if (!Object.hasOwn(state, name)) continue;
161490
- const value2 = text32 ?? JSON.stringify(state[name]);
161491
- if (value2 !== void 0) parts.push(`${JSON.stringify(name)}:${value2}`);
161492
- }
161493
- return { state, json: `{${parts.join(",")}}` };
161537
+ let joined;
161538
+ const json9 = () => {
161539
+ if (joined !== void 0) return joined;
161540
+ const parts = [];
161541
+ for (const [name, text32] of pieces) {
161542
+ if (!Object.hasOwn(state, name)) continue;
161543
+ const value2 = text32 ?? JSON.stringify(state[name]);
161544
+ if (value2 !== void 0) parts.push(`${JSON.stringify(name)}:${value2}`);
161545
+ }
161546
+ return joined = `{${parts.join(",")}}`;
161547
+ };
161548
+ return { state, json: json9 };
161494
161549
  }
161495
161550
  async function bootScreenWorker(opts) {
161496
161551
  const input = {
@@ -161823,7 +161878,7 @@ async function crawlSingleScreenJourney(opts) {
161823
161878
  }
161824
161879
  receipt.scope = { screen: opts.screenId, componentId: declared.componentId, actionId: declared.actionId, hookKey: declared.key, control: declared.control?.type ?? null };
161825
161880
  if (opts.captureInputEvidence) receipt.declaredPayload = JSON.parse(JSON.stringify({ ...declared.params ?? {}, ...declared.args ?? {} }));
161826
- const state = snapshot3(worker).state;
161881
+ const state = snapshotState(worker).state;
161827
161882
  const site = effectiveSiteFor(declared, state);
161828
161883
  if (!site) {
161829
161884
  receipt.reason = "no-row-value";
@@ -161844,7 +161899,7 @@ async function crawlSingleScreenJourney(opts) {
161844
161899
  continue;
161845
161900
  }
161846
161901
  const mark = { wix: worker.calls.length, host: worker.hostCalls.length };
161847
- const beforeState = opts.captureInputEvidence ? JSON.stringify(snapshot3(worker).state) : "";
161902
+ const beforeState = opts.captureInputEvidence ? snapshotState(worker).json : "";
161848
161903
  const params = { ...site.params ?? {}, ...site.args ?? {}, ...step.params ?? {} };
161849
161904
  if (opts.captureInputEvidence) receipt.payload = JSON.parse(JSON.stringify(params));
161850
161905
  try {
@@ -161857,12 +161912,12 @@ async function crawlSingleScreenJourney(opts) {
161857
161912
  fail19(`journey "${opts.journey.name}" step ${step.action} threw: ${errText(error)}`, step);
161858
161913
  }
161859
161914
  if (opts.captureInputEvidence) {
161860
- stepFrames.push({ receipt, before: beforeState, after: JSON.stringify(snapshot3(worker).state) });
161915
+ stepFrames.push({ receipt, before: beforeState, after: snapshotState(worker).json });
161861
161916
  }
161862
161917
  const stepEffect = effectSince(worker, mark, site.actionId, site.componentId);
161863
161918
  if (stepEffect) effects.push(stepEffect);
161864
161919
  }
161865
- const settled = snapshot3(worker);
161920
+ const settled = snapshotState(worker);
161866
161921
  if (worker.errors.length) {
161867
161922
  for (const error of worker.errors) fail19(`journey "${opts.journey.name}" worker error: ${error.service}: ${error.message}`);
161868
161923
  }
@@ -162080,7 +162135,7 @@ async function crawlScreenInner(opts) {
162080
162135
  }
162081
162136
  }
162082
162137
  const boot = (skipAppear = false, skipBootSnapshot = false) => bundleJs ? bootScreenWorker({ bundleJs, descriptor, wixCall, screenId, inputOverride: opts.inputOverride, budgetMs: opts.budgetMs, clock: opts.clock, seed: opts.seed, skipAppear, skipBootSnapshot, localDbSchema: opts.localDbSchema, l10n: opts.l10n, base44Data: opts.base44Data, capabilitySuccess: opts.capabilitySuccess === true, ...opts.evaluator ? { evaluator: opts.evaluator } : {} }) : null;
162083
- const check = (trigger, state, errors, defects = {}) => {
162138
+ const check = (trigger, state, errors, defects = {}, stateJson) => {
162084
162139
  for (const [svc, paths2] of Object.entries(defects)) {
162085
162140
  for (const p2 of paths2) {
162086
162141
  findings.push({
@@ -162125,10 +162180,27 @@ async function crawlScreenInner(opts) {
162125
162180
  });
162126
162181
  }
162127
162182
  }
162183
+ for (const f2 of stateOnlyFindings(state, stateJson)) findings.push({ ...f2, trigger });
162184
+ };
162185
+ const stateOnlyMemo = /* @__PURE__ */ new Map();
162186
+ const stateOnlyFindings = (state, stateJson) => {
162187
+ if (stateJson !== void 0 && Object.getPrototypeOf(state) !== Object.prototype) stateJson = void 0;
162188
+ if (stateJson !== void 0) {
162189
+ const hit = stateOnlyMemo.get(stateJson);
162190
+ if (hit) {
162191
+ stateOnlyMemo.delete(stateJson);
162192
+ stateOnlyMemo.set(stateJson, hit);
162193
+ stateOnlyRecomputesSkipped += 1;
162194
+ return hit;
162195
+ }
162196
+ }
162197
+ stateOnlyComputes += 1;
162198
+ const findings2 = [];
162199
+ const trigger = "boot";
162128
162200
  const provider = new FakeServiceProvider(state);
162129
162201
  for (const tree of descriptorTrees(descriptor, provider)) {
162130
162202
  scanTreeValues(tree, (at2, field, d2) => {
162131
- findings.push({
162203
+ findings2.push({
162132
162204
  screen: screenId,
162133
162205
  trigger,
162134
162206
  invariant: d2.kind,
@@ -162142,7 +162214,7 @@ async function crawlScreenInner(opts) {
162142
162214
  }, opts.l10nKeys);
162143
162215
  }
162144
162216
  for (const r3 of renderedNameGaps(descriptor, state)) {
162145
- findings.push({
162217
+ findings2.push({
162146
162218
  screen: screenId,
162147
162219
  trigger,
162148
162220
  invariant: "unnamed-control",
@@ -162159,7 +162231,7 @@ async function crawlScreenInner(opts) {
162159
162231
  for (const ref of collectServiceBindings(descriptor)) {
162160
162232
  if (opts.appServices?.has(ref.svc) && !(ref.svc in state)) continue;
162161
162233
  if (!(ref.svc in state)) {
162162
- findings.push({
162234
+ findings2.push({
162163
162235
  screen: screenId,
162164
162236
  trigger,
162165
162237
  invariant: "binding-unresolved",
@@ -162173,7 +162245,7 @@ async function crawlScreenInner(opts) {
162173
162245
  const first2 = ref.path.split(/[.[]/)[0];
162174
162246
  if (first2 && pathValue(state[ref.svc], first2) === void 0) {
162175
162247
  const optional4 = ref.collapseWhenEmpty === true;
162176
- findings.push({
162248
+ findings2.push({
162177
162249
  screen: screenId,
162178
162250
  trigger,
162179
162251
  invariant: "binding-unresolved",
@@ -162185,7 +162257,7 @@ async function crawlScreenInner(opts) {
162185
162257
  }
162186
162258
  }
162187
162259
  for (const m2 of missingItemFields(descriptor, state)) {
162188
- findings.push({
162260
+ findings2.push({
162189
162261
  screen: screenId,
162190
162262
  trigger,
162191
162263
  invariant: "item-field-missing",
@@ -162204,7 +162276,7 @@ async function crawlScreenInner(opts) {
162204
162276
  const after = { ...resolved3.params ?? {}, ...resolved3.args ?? {} };
162205
162277
  for (const [k3, v2] of bound2) {
162206
162278
  if (!(k3 in after)) {
162207
- findings.push({
162279
+ findings2.push({
162208
162280
  screen: screenId,
162209
162281
  trigger,
162210
162282
  invariant: "nav-param-dropped",
@@ -162218,6 +162290,11 @@ async function crawlScreenInner(opts) {
162218
162290
  }
162219
162291
  }
162220
162292
  }
162293
+ if (stateJson !== void 0) {
162294
+ if (stateOnlyMemo.size >= STATE_ONLY_MEMO_ENTRIES) stateOnlyMemo.delete(stateOnlyMemo.keys().next().value);
162295
+ stateOnlyMemo.set(stateJson, findings2);
162296
+ }
162297
+ return findings2;
162221
162298
  };
162222
162299
  const reportDeadLifecycle = (d2) => {
162223
162300
  findings.push({
@@ -162391,10 +162468,8 @@ async function crawlScreenInner(opts) {
162391
162468
  errors.push({ service: parsed.service, message: `${parsed.action}: ${errText(e2)}`, ...e2.stack ? { stack: e2.stack } : {}, argless: workerArgs(dispatched).length === 0 });
162392
162469
  }
162393
162470
  exercised += 1;
162394
- const { state, defects } = snapshot3(w2);
162395
- let afterJson;
162396
- const afterStateJson = () => afterJson ??= JSON.stringify(state);
162397
- check(trigger, state, errors, defects);
162471
+ const { state, defects, stateJson: afterStateJson } = snapshot3(w2);
162472
+ check(trigger, state, errors, defects, afterStateJson());
162398
162473
  reportDenied(w2.deniedCapabilities.slice(deniedBefore), trigger);
162399
162474
  const navCountBefore = navEdges.length;
162400
162475
  drainWorkerEdges(w2, `worker:${site.actionId}`, !!site.itemsPath && carriesItemToken(site));
@@ -162693,7 +162768,7 @@ async function bootAndSnapshotState(opts) {
162693
162768
  }
162694
162769
  try {
162695
162770
  for (let i2 = 0; i2 < 20; i2++) await yieldMacrotask();
162696
- return snapshot3(w2).state;
162771
+ return snapshotState(w2).state;
162697
162772
  } finally {
162698
162773
  w2.dispose();
162699
162774
  }
@@ -162772,7 +162847,7 @@ async function crawlScreenDeep(opts, deep) {
162772
162847
  threwAt = "unreachable";
162773
162848
  break;
162774
162849
  }
162775
- const state2 = snapshot3(w2).state;
162850
+ const state2 = snapshotState(w2).state;
162776
162851
  const effective = effectiveSiteFor(site, state2);
162777
162852
  if (!effective) {
162778
162853
  threwAt = "unreachable";
@@ -162804,7 +162879,7 @@ async function crawlScreenDeep(opts, deep) {
162804
162879
  await handle.dispatch(parsed.action, ...workerArgs(interaction?.fired ?? effective));
162805
162880
  if (site.componentId === "topbar.search") {
162806
162881
  if (site.key === "onCancel") {
162807
- searchText = updatedSearchText(state2, snapshot3(w2).state, sites, "");
162882
+ searchText = updatedSearchText(state2, snapshotState(w2).state, sites, "");
162808
162883
  sentSearchText = "";
162809
162884
  } else {
162810
162885
  const value2 = { ...(interaction?.fired ?? effective).params ?? {}, ...(interaction?.fired ?? effective).args ?? {} }.value;
@@ -162814,7 +162889,7 @@ async function crawlScreenDeep(opts, deep) {
162814
162889
  }
162815
162890
  }
162816
162891
  } else {
162817
- const next = snapshot3(w2).state;
162892
+ const next = snapshotState(w2).state;
162818
162893
  searchText = updatedSearchText(state2, next, sites, searchText);
162819
162894
  sentSearchText = updatedSearchText(state2, next, sites, sentSearchText);
162820
162895
  }
@@ -163052,7 +163127,7 @@ async function crawlScreenRelations(opts) {
163052
163127
  const w2 = await boot();
163053
163128
  try {
163054
163129
  if (w2.errors.length) return null;
163055
- let prev = snapshot3(w2).state;
163130
+ let prev = snapshotState(w2).state;
163056
163131
  const bootState = prev;
163057
163132
  let searchText = null;
163058
163133
  let sentSearchText = null;
@@ -163078,7 +163153,7 @@ async function crawlScreenRelations(opts) {
163078
163153
  await h2.dispatch(parsed.action, ...workerArgs(interaction?.fired ?? eff));
163079
163154
  if (site.componentId === "topbar.search") {
163080
163155
  if (site.key === "onCancel") {
163081
- searchText = updatedSearchText(prev, snapshot3(w2).state, sites, "");
163156
+ searchText = updatedSearchText(prev, snapshotState(w2).state, sites, "");
163082
163157
  sentSearchText = "";
163083
163158
  } else {
163084
163159
  const value2 = { ...(interaction?.fired ?? eff).params ?? {}, ...(interaction?.fired ?? eff).args ?? {} }.value;
@@ -163093,7 +163168,7 @@ async function crawlScreenRelations(opts) {
163093
163168
  }
163094
163169
  for (let k3 = 0; k3 < 20; k3++) await yieldMacrotask();
163095
163170
  if (w2.errors.length) return null;
163096
- const next = snapshot3(w2).state;
163171
+ const next = snapshotState(w2).state;
163097
163172
  if (site.componentId !== "topbar.search") {
163098
163173
  searchText = updatedSearchText(prev, next, sites, searchText);
163099
163174
  sentSearchText = updatedSearchText(prev, next, sites, sentSearchText);
@@ -163346,7 +163421,7 @@ async function crawlAppServices(opts) {
163346
163421
  hint: "only a returned _nav from a user gesture is honoured (RFC 0074 \xA77)"
163347
163422
  });
163348
163423
  }
163349
- const state = snapshot3(w2).state;
163424
+ const state = snapshotState(w2).state;
163350
163425
  launchedState = state;
163351
163426
  const hooksRun = [];
163352
163427
  {
@@ -163527,7 +163602,7 @@ function dedupeAppFindings(findings) {
163527
163602
  return true;
163528
163603
  });
163529
163604
  }
163530
- var ACTION_KEYS, UNTRACKED_ITEMS, NESTED_ITEMS_SEP, REJECT_ALL_MESSAGE, POLL_STOP_LITERAL, WIX_DATA_QUERY, WIX_DATA_ANY, CAPABILITY_ACTION, detached, CRAWL_PRINCIPAL, CRAWL_CLOCK, MEMBER_IDENTITY_ACTION, BLANK_WHEN_BOUND, CONTROL_ROLES, NAME_KEYS, A11Y_ROWS_PER_LIST, A11Y_LIST_DEPTH, ITEM_PATH_RE, UNOBSERVED_COPY_KEYS, LABEL_NEEDS_HANDLER, REPEATER_TEMPLATE_KEYS, STALE_SNAPSHOT_HINT, REPEATED_CALL_LIMIT, UNBINDABLE_ROW, APP_SERVICES_SCREEN, APP_HOOKS, APP_TICK_LIMIT;
163605
+ var ACTION_KEYS, UNTRACKED_ITEMS, NESTED_ITEMS_SEP, REJECT_ALL_MESSAGE, POLL_STOP_LITERAL, WIX_DATA_QUERY, WIX_DATA_ANY, CAPABILITY_ACTION, detached, CRAWL_PRINCIPAL, CRAWL_CLOCK, MEMBER_IDENTITY_ACTION, BLANK_WHEN_BOUND, CONTROL_ROLES, NAME_KEYS, A11Y_ROWS_PER_LIST, A11Y_LIST_DEPTH, ITEM_PATH_RE, UNOBSERVED_COPY_KEYS, LABEL_NEEDS_HANDLER, REPEATER_TEMPLATE_KEYS, STALE_SNAPSHOT_HINT, REPEATED_CALL_LIMIT, STATE_ONLY_MEMO_ENTRIES, stateOnlyComputes, stateOnlyRecomputesSkipped, UNBINDABLE_ROW, APP_SERVICES_SCREEN, APP_HOOKS, APP_TICK_LIMIT;
163531
163606
  var init_screen_crawl = __esm({
163532
163607
  "../../core/dev-server/src/screen-crawl.ts"() {
163533
163608
  init_define_HHP_CATALOG();
@@ -163615,6 +163690,9 @@ var init_screen_crawl = __esm({
163615
163690
  REPEATER_TEMPLATE_KEYS = /* @__PURE__ */ new Set(["items", "pages"]);
163616
163691
  STALE_SNAPSHOT_HINT = 'if every path already does, look for a stale-snapshot write-back: `return s` (or `{ ...s }`) after an await or from an early-return guard writes back the state as it was BEFORE the await, loading flag included \u2014 to change nothing, return `undefined` instead (not `null` or `{}`); see `himi docs tier-5-add-a-screen`, "Should this result be committed at all?"';
163617
163692
  REPEATED_CALL_LIMIT = 50;
163693
+ STATE_ONLY_MEMO_ENTRIES = 8;
163694
+ stateOnlyComputes = 0;
163695
+ stateOnlyRecomputesSkipped = 0;
163618
163696
  UNBINDABLE_ROW = Symbol("unbindable-row");
163619
163697
  APP_SERVICES_SCREEN = "(app services)";
163620
163698
  APP_HOOKS = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1962.0",
3
+ "version": "0.1964.0",
4
4
  "type": "module",
5
5
  "description": "himi — the Himalaya authoring CLI. Build a Tier-5 content package on your own machine, push it to the production serve as a draft, preview it on web + Himi Player, and read worker logs back — the remote dev loop. Wraps @himalaya/serve-cli for transport.",
6
6
  "keywords": [
@@ -82,5 +82,5 @@
82
82
  "artifactId": "himalaya-cli"
83
83
  }
84
84
  },
85
- "falconPackageHash": "5b8c3faf4ce9cd1a96e6f2e8c355fbe576727b87c0d8602a7fd8f41e"
85
+ "falconPackageHash": "0af4ddc6c97123a700b77b6702ef72b43fdb222eb303e6944dc3d533"
86
86
  }