@wix/himalaya-cli 0.1963.0 → 0.1965.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 +133 -59
  2. package/package.json +2 -2
package/dist/cli.mjs CHANGED
@@ -3964,7 +3964,6 @@ 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";
3968
3967
  init_define_HHP_CATALOG();
3969
3968
  ICON_VIEW_BOX = 24;
3970
3969
  ICON_STROKE_WIDTH = 2;
@@ -24998,20 +24997,35 @@ async function bootBundleWorker(bundleJs, opts) {
24998
24997
  }
24999
24998
  };
25000
24999
  const clone = (v2) => JSON.parse(serialize2(v2));
25001
- const findNonFinite = (v2, at2, out2, seen) => {
25002
- if (typeof v2 === "number") {
25003
- if (!Number.isFinite(v2)) out2.push(`${at2 || "(root)"} = ${String(v2)}`);
25004
- return;
25005
- }
25006
- if (!v2 || typeof v2 !== "object" || seen.has(v2)) return;
25007
- seen.add(v2);
25008
- if (Array.isArray(v2)) {
25009
- v2.forEach((x2, i2) => findNonFinite(x2, `${at2}[${i2}]`, out2, seen));
25010
- return;
25011
- }
25012
- for (const [k3, val] of Object.entries(v2)) {
25013
- findNonFinite(val, at2 ? `${at2}.${k3}` : k3, out2, seen);
25014
- }
25000
+ const findNonFinite = (root, out2, seen) => {
25001
+ const path2 = [];
25002
+ const spell = () => {
25003
+ let at2 = "";
25004
+ for (const seg2 of path2) at2 = typeof seg2 === "number" ? `${at2}[${seg2}]` : at2 ? `${at2}.${seg2}` : seg2;
25005
+ return at2;
25006
+ };
25007
+ const walk6 = (v2) => {
25008
+ if (typeof v2 === "number") {
25009
+ if (!Number.isFinite(v2)) out2.push(`${spell() || "(root)"} = ${String(v2)}`);
25010
+ return;
25011
+ }
25012
+ if (!v2 || typeof v2 !== "object" || seen.has(v2)) return;
25013
+ seen.add(v2);
25014
+ if (Array.isArray(v2)) {
25015
+ v2.forEach((x2, i2) => {
25016
+ path2.push(i2);
25017
+ walk6(x2);
25018
+ path2.pop();
25019
+ });
25020
+ return;
25021
+ }
25022
+ for (const [k3, val] of Object.entries(v2)) {
25023
+ path2.push(k3);
25024
+ walk6(val);
25025
+ path2.pop();
25026
+ }
25027
+ };
25028
+ walk6(root);
25015
25029
  };
25016
25030
  const applyResult = (def2, next) => {
25017
25031
  if (!next || typeof next !== "object" || Array.isArray(next)) return;
@@ -25166,7 +25180,7 @@ async function bootBundleWorker(bundleJs, opts) {
25166
25180
  getStateJson: () => serialize2(def2.state),
25167
25181
  stateDefects: () => {
25168
25182
  const out2 = [];
25169
- findNonFinite(def2.state, "", out2, /* @__PURE__ */ new Set());
25183
+ findNonFinite(def2.state, out2, /* @__PURE__ */ new Set());
25170
25184
  return out2;
25171
25185
  },
25172
25186
  actionNames: () => Object.keys(def2.actions ?? {}),
@@ -32477,6 +32491,7 @@ __export(validate_descriptor_exports, {
32477
32491
  nativeRequiredFindings: () => nativeRequiredFindings,
32478
32492
  navLogicBundleUrl: () => navLogicBundleUrl,
32479
32493
  nodeVmEvaluator: () => nodeVmEvaluator,
32494
+ nodeVmScriptCompiles: () => nodeVmScriptCompiles,
32480
32495
  nondeterministicServices: () => nondeterministicServices,
32481
32496
  nondeterministicServicesOrNull: () => nondeterministicServicesOrNull,
32482
32497
  pathCrossesOpaqueAuthorJson: () => pathCrossesOpaqueAuthorJson,
@@ -32512,8 +32527,29 @@ __export(validate_descriptor_exports, {
32512
32527
  });
32513
32528
  import { readFileSync as readFileSync21, existsSync as existsSync20, readdirSync as readdirSync15, statSync as statSync6 } from "node:fs";
32514
32529
  import { resolve as resolve20 } from "node:path";
32515
- import { createContext, runInContext } from "node:vm";
32530
+ import { createContext, Script } from "node:vm";
32516
32531
  import { createRequire } from "node:module";
32532
+ function nodeVmScriptCompiles() {
32533
+ return scriptCompiles;
32534
+ }
32535
+ function compiledScript(code3, filename) {
32536
+ const key4 = filename ?? "";
32537
+ let byName3 = compiledScripts.get(code3);
32538
+ let script2 = byName3?.get(key4);
32539
+ if (!script2) {
32540
+ script2 = new Script(code3, filename === void 0 ? {} : { filename });
32541
+ scriptCompiles += 1;
32542
+ }
32543
+ if (byName3) compiledScripts.delete(code3);
32544
+ else {
32545
+ if (compiledScripts.size >= COMPILED_SCRIPT_ENTRIES) compiledScripts.delete(compiledScripts.keys().next().value);
32546
+ byName3 = /* @__PURE__ */ new Map();
32547
+ }
32548
+ if (!byName3.has(key4) && byName3.size >= COMPILED_SCRIPT_NAMES) byName3.clear();
32549
+ byName3.set(key4, script2);
32550
+ compiledScripts.set(code3, byName3);
32551
+ return script2;
32552
+ }
32517
32553
  async function loadAllowedComponents(appDir3) {
32518
32554
  const modPath = resolve20(appDir3, "components.ts");
32519
32555
  if (!existsSync20(modPath)) return void 0;
@@ -32642,7 +32678,7 @@ function discoverNativeActions(appDir3) {
32642
32678
  searched: roots2.map(({ searched }) => searched)
32643
32679
  };
32644
32680
  }
32645
- var navigationCompiler, nodeVmEvaluator, navContractMemo, appServicesContextMemo, NATIVE_SCRATCH_DIRS, BUILD_OUTPUT_DIR, VANISHED, vanished, NATIVE_SOURCE_ROOTS, PLAYER_HOST_SEARCHED;
32681
+ 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;
32646
32682
  var init_validate_descriptor = __esm({
32647
32683
  "../../core/dev-server/src/validate-descriptor.ts"() {
32648
32684
  init_define_HHP_CATALOG();
@@ -32657,20 +32693,24 @@ var init_validate_descriptor = __esm({
32657
32693
  navigationCompiler = createRequire(import.meta.url);
32658
32694
  setDeclaredNavigationAnalyzer((source2) => literalTargets(source2, navigationCompiler("typescript")));
32659
32695
  setFixedNavigationAnalyzer((source2) => fixedNavigations(source2, navigationCompiler("typescript")));
32696
+ COMPILED_SCRIPT_ENTRIES = 8;
32697
+ COMPILED_SCRIPT_NAMES = 4;
32698
+ compiledScripts = /* @__PURE__ */ new Map();
32699
+ scriptCompiles = 0;
32660
32700
  nodeVmEvaluator = {
32661
32701
  evaluatesSandboxDirectly: true,
32662
32702
  run(code3, sandbox, opts) {
32663
32703
  const context = createContext(sandbox);
32664
32704
  if (opts.deviceParity) {
32665
- runInContext(allowlistSweepSource(Object.keys(sandbox)), context, { filename: "himi-sweep.js" });
32705
+ compiledScript(allowlistSweepSource(Object.keys(sandbox)), "himi-sweep.js").runInContext(context);
32666
32706
  }
32667
32707
  const pins = pinnedIntrinsicsSource(opts);
32668
32708
  if (pins) {
32669
- const pinned = runInContext(`(${pins})(Date, Math)`, context, { timeout: opts.timeoutMs, filename: "himi-pins.js" });
32709
+ const pinned = compiledScript(`(${pins})(Date, Math)`, "himi-pins.js").runInContext(context, { timeout: opts.timeoutMs });
32670
32710
  if (pinned.Date) sandbox.Date = pinned.Date;
32671
32711
  if (pinned.Math) sandbox.Math = pinned.Math;
32672
32712
  }
32673
- runInContext(code3, context, { timeout: opts.timeoutMs, filename: opts.filename });
32713
+ compiledScript(code3, opts.filename).runInContext(context, { timeout: opts.timeoutMs });
32674
32714
  }
32675
32715
  };
32676
32716
  setDefaultEvaluator(nodeVmEvaluator);
@@ -46395,7 +46435,6 @@ function shouldRevealError(args) {
46395
46435
  var EMAIL_RE, URL_HOST_RE, INTEGER_RE, NUMBER_RE, AUTHORED_PATTERN_LIMIT, authoredPatterns;
46396
46436
  var init_validation = __esm({
46397
46437
  "../../core/ts/src/validation.ts"() {
46398
- "use strict";
46399
46438
  init_define_HHP_CATALOG();
46400
46439
  EMAIL_RE = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,}$/;
46401
46440
  URL_HOST_RE = /^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(:[0-9]+)?$/;
@@ -97001,7 +97040,7 @@ async function incrementalUpdate({ originalData: e2, xrefInfo: t2, changes: n2,
97001
97040
  for (const e3 of m2) j2 = writeString(e3, j2, w2);
97002
97041
  return w2;
97003
97042
  }
97004
- 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;
97043
+ 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;
97005
97044
  var init_pdf_worker_min = __esm({
97006
97045
  "../../node_modules/pdfjs-dist/legacy/build/pdf.worker.min.mjs?url"() {
97007
97046
  init_define_HHP_CATALOG();
@@ -130124,7 +130163,7 @@ var init_pdf_worker_min = __esm({
130124
130163
  this.usehref = e2.usehref || "";
130125
130164
  }
130126
130165
  };
130127
- Script = class extends StringObject {
130166
+ Script2 = class extends StringObject {
130128
130167
  constructor(e2) {
130129
130168
  super(ff, "script");
130130
130169
  this.binding = e2.binding || "";
@@ -131210,7 +131249,7 @@ var init_pdf_worker_min = __esm({
131210
131249
  return new RefElement(e2);
131211
131250
  }
131212
131251
  static script(e2) {
131213
- return new Script(e2);
131252
+ return new Script2(e2);
131214
131253
  }
131215
131254
  static setProperty(e2) {
131216
131255
  return new SetProperty(e2);
@@ -160583,6 +160622,7 @@ __export(screen_crawl_exports, {
160583
160622
  rootOnAppear: () => rootOnAppear,
160584
160623
  snapshot: () => snapshot3,
160585
160624
  snapshotState: () => snapshotState,
160625
+ stateOnlyCheckCounts: () => stateOnlyCheckCounts,
160586
160626
  structuralSignature: () => structuralSignature,
160587
160627
  unverifiableNodes: () => unverifiableNodes,
160588
160628
  workerArgs: () => workerArgs
@@ -161463,17 +161503,23 @@ function guardRepeatedCalls(call, onLoop, limit = REPEATED_CALL_LIMIT) {
161463
161503
  throw new Error(message5);
161464
161504
  };
161465
161505
  }
161506
+ function stateOnlyCheckCounts() {
161507
+ return { computed: stateOnlyComputes, replayed: stateOnlyRecomputesSkipped };
161508
+ }
161466
161509
  function snapshot3(w2) {
161467
- const state = {};
161510
+ const { state, json: json9 } = snapshotPieces(w2);
161468
161511
  const defects = {};
161469
161512
  for (const [name, h2] of Object.entries(w2.handles)) {
161470
- state[name] = h2.getState();
161471
161513
  const d2 = h2.stateDefects();
161472
161514
  if (d2.length) defects[name] = d2;
161473
161515
  }
161474
- return { state, defects };
161516
+ return { state, defects, stateJson: json9 };
161475
161517
  }
161476
161518
  function snapshotState(w2) {
161519
+ const { state, json: json9 } = snapshotPieces(w2);
161520
+ return { state, json: json9() };
161521
+ }
161522
+ function snapshotPieces(w2) {
161477
161523
  const state = {};
161478
161524
  const pieces = [];
161479
161525
  for (const [name, h2] of Object.entries(w2.handles)) {
@@ -161486,13 +161532,18 @@ function snapshotState(w2) {
161486
161532
  pieces.push([name, void 0]);
161487
161533
  }
161488
161534
  }
161489
- const parts = [];
161490
- for (const [name, text32] of pieces) {
161491
- if (!Object.hasOwn(state, name)) continue;
161492
- const value2 = text32 ?? JSON.stringify(state[name]);
161493
- if (value2 !== void 0) parts.push(`${JSON.stringify(name)}:${value2}`);
161494
- }
161495
- return { state, json: `{${parts.join(",")}}` };
161535
+ let joined;
161536
+ const json9 = () => {
161537
+ if (joined !== void 0) return joined;
161538
+ const parts = [];
161539
+ for (const [name, text32] of pieces) {
161540
+ if (!Object.hasOwn(state, name)) continue;
161541
+ const value2 = text32 ?? JSON.stringify(state[name]);
161542
+ if (value2 !== void 0) parts.push(`${JSON.stringify(name)}:${value2}`);
161543
+ }
161544
+ return joined = `{${parts.join(",")}}`;
161545
+ };
161546
+ return { state, json: json9 };
161496
161547
  }
161497
161548
  async function bootScreenWorker(opts) {
161498
161549
  const input = {
@@ -161825,7 +161876,7 @@ async function crawlSingleScreenJourney(opts) {
161825
161876
  }
161826
161877
  receipt.scope = { screen: opts.screenId, componentId: declared.componentId, actionId: declared.actionId, hookKey: declared.key, control: declared.control?.type ?? null };
161827
161878
  if (opts.captureInputEvidence) receipt.declaredPayload = JSON.parse(JSON.stringify({ ...declared.params ?? {}, ...declared.args ?? {} }));
161828
- const state = snapshot3(worker).state;
161879
+ const state = snapshotState(worker).state;
161829
161880
  const site = effectiveSiteFor(declared, state);
161830
161881
  if (!site) {
161831
161882
  receipt.reason = "no-row-value";
@@ -161846,7 +161897,7 @@ async function crawlSingleScreenJourney(opts) {
161846
161897
  continue;
161847
161898
  }
161848
161899
  const mark = { wix: worker.calls.length, host: worker.hostCalls.length };
161849
- const beforeState = opts.captureInputEvidence ? JSON.stringify(snapshot3(worker).state) : "";
161900
+ const beforeState = opts.captureInputEvidence ? snapshotState(worker).json : "";
161850
161901
  const params = { ...site.params ?? {}, ...site.args ?? {}, ...step.params ?? {} };
161851
161902
  if (opts.captureInputEvidence) receipt.payload = JSON.parse(JSON.stringify(params));
161852
161903
  try {
@@ -161859,12 +161910,12 @@ async function crawlSingleScreenJourney(opts) {
161859
161910
  fail19(`journey "${opts.journey.name}" step ${step.action} threw: ${errText(error)}`, step);
161860
161911
  }
161861
161912
  if (opts.captureInputEvidence) {
161862
- stepFrames.push({ receipt, before: beforeState, after: JSON.stringify(snapshot3(worker).state) });
161913
+ stepFrames.push({ receipt, before: beforeState, after: snapshotState(worker).json });
161863
161914
  }
161864
161915
  const stepEffect = effectSince(worker, mark, site.actionId, site.componentId);
161865
161916
  if (stepEffect) effects.push(stepEffect);
161866
161917
  }
161867
- const settled = snapshot3(worker);
161918
+ const settled = snapshotState(worker);
161868
161919
  if (worker.errors.length) {
161869
161920
  for (const error of worker.errors) fail19(`journey "${opts.journey.name}" worker error: ${error.service}: ${error.message}`);
161870
161921
  }
@@ -162082,7 +162133,7 @@ async function crawlScreenInner(opts) {
162082
162133
  }
162083
162134
  }
162084
162135
  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;
162085
- const check = (trigger, state, errors, defects = {}) => {
162136
+ const check = (trigger, state, errors, defects = {}, stateJson) => {
162086
162137
  for (const [svc, paths2] of Object.entries(defects)) {
162087
162138
  for (const p2 of paths2) {
162088
162139
  findings.push({
@@ -162127,10 +162178,27 @@ async function crawlScreenInner(opts) {
162127
162178
  });
162128
162179
  }
162129
162180
  }
162181
+ for (const f2 of stateOnlyFindings(state, stateJson)) findings.push({ ...f2, trigger });
162182
+ };
162183
+ const stateOnlyMemo = /* @__PURE__ */ new Map();
162184
+ const stateOnlyFindings = (state, stateJson) => {
162185
+ if (stateJson !== void 0 && Object.getPrototypeOf(state) !== Object.prototype) stateJson = void 0;
162186
+ if (stateJson !== void 0) {
162187
+ const hit = stateOnlyMemo.get(stateJson);
162188
+ if (hit) {
162189
+ stateOnlyMemo.delete(stateJson);
162190
+ stateOnlyMemo.set(stateJson, hit);
162191
+ stateOnlyRecomputesSkipped += 1;
162192
+ return hit;
162193
+ }
162194
+ }
162195
+ stateOnlyComputes += 1;
162196
+ const findings2 = [];
162197
+ const trigger = "boot";
162130
162198
  const provider = new FakeServiceProvider(state);
162131
162199
  for (const tree of descriptorTrees(descriptor, provider)) {
162132
162200
  scanTreeValues(tree, (at2, field, d2) => {
162133
- findings.push({
162201
+ findings2.push({
162134
162202
  screen: screenId,
162135
162203
  trigger,
162136
162204
  invariant: d2.kind,
@@ -162144,7 +162212,7 @@ async function crawlScreenInner(opts) {
162144
162212
  }, opts.l10nKeys);
162145
162213
  }
162146
162214
  for (const r3 of renderedNameGaps(descriptor, state)) {
162147
- findings.push({
162215
+ findings2.push({
162148
162216
  screen: screenId,
162149
162217
  trigger,
162150
162218
  invariant: "unnamed-control",
@@ -162161,7 +162229,7 @@ async function crawlScreenInner(opts) {
162161
162229
  for (const ref of collectServiceBindings(descriptor)) {
162162
162230
  if (opts.appServices?.has(ref.svc) && !(ref.svc in state)) continue;
162163
162231
  if (!(ref.svc in state)) {
162164
- findings.push({
162232
+ findings2.push({
162165
162233
  screen: screenId,
162166
162234
  trigger,
162167
162235
  invariant: "binding-unresolved",
@@ -162175,7 +162243,7 @@ async function crawlScreenInner(opts) {
162175
162243
  const first2 = ref.path.split(/[.[]/)[0];
162176
162244
  if (first2 && pathValue(state[ref.svc], first2) === void 0) {
162177
162245
  const optional4 = ref.collapseWhenEmpty === true;
162178
- findings.push({
162246
+ findings2.push({
162179
162247
  screen: screenId,
162180
162248
  trigger,
162181
162249
  invariant: "binding-unresolved",
@@ -162187,7 +162255,7 @@ async function crawlScreenInner(opts) {
162187
162255
  }
162188
162256
  }
162189
162257
  for (const m2 of missingItemFields(descriptor, state)) {
162190
- findings.push({
162258
+ findings2.push({
162191
162259
  screen: screenId,
162192
162260
  trigger,
162193
162261
  invariant: "item-field-missing",
@@ -162206,7 +162274,7 @@ async function crawlScreenInner(opts) {
162206
162274
  const after = { ...resolved3.params ?? {}, ...resolved3.args ?? {} };
162207
162275
  for (const [k3, v2] of bound2) {
162208
162276
  if (!(k3 in after)) {
162209
- findings.push({
162277
+ findings2.push({
162210
162278
  screen: screenId,
162211
162279
  trigger,
162212
162280
  invariant: "nav-param-dropped",
@@ -162220,6 +162288,11 @@ async function crawlScreenInner(opts) {
162220
162288
  }
162221
162289
  }
162222
162290
  }
162291
+ if (stateJson !== void 0) {
162292
+ if (stateOnlyMemo.size >= STATE_ONLY_MEMO_ENTRIES) stateOnlyMemo.delete(stateOnlyMemo.keys().next().value);
162293
+ stateOnlyMemo.set(stateJson, findings2);
162294
+ }
162295
+ return findings2;
162223
162296
  };
162224
162297
  const reportDeadLifecycle = (d2) => {
162225
162298
  findings.push({
@@ -162393,10 +162466,8 @@ async function crawlScreenInner(opts) {
162393
162466
  errors.push({ service: parsed.service, message: `${parsed.action}: ${errText(e2)}`, ...e2.stack ? { stack: e2.stack } : {}, argless: workerArgs(dispatched).length === 0 });
162394
162467
  }
162395
162468
  exercised += 1;
162396
- const { state, defects } = snapshot3(w2);
162397
- let afterJson;
162398
- const afterStateJson = () => afterJson ??= JSON.stringify(state);
162399
- check(trigger, state, errors, defects);
162469
+ const { state, defects, stateJson: afterStateJson } = snapshot3(w2);
162470
+ check(trigger, state, errors, defects, afterStateJson());
162400
162471
  reportDenied(w2.deniedCapabilities.slice(deniedBefore), trigger);
162401
162472
  const navCountBefore = navEdges.length;
162402
162473
  drainWorkerEdges(w2, `worker:${site.actionId}`, !!site.itemsPath && carriesItemToken(site));
@@ -162695,7 +162766,7 @@ async function bootAndSnapshotState(opts) {
162695
162766
  }
162696
162767
  try {
162697
162768
  for (let i2 = 0; i2 < 20; i2++) await yieldMacrotask();
162698
- return snapshot3(w2).state;
162769
+ return snapshotState(w2).state;
162699
162770
  } finally {
162700
162771
  w2.dispose();
162701
162772
  }
@@ -162774,7 +162845,7 @@ async function crawlScreenDeep(opts, deep) {
162774
162845
  threwAt = "unreachable";
162775
162846
  break;
162776
162847
  }
162777
- const state2 = snapshot3(w2).state;
162848
+ const state2 = snapshotState(w2).state;
162778
162849
  const effective = effectiveSiteFor(site, state2);
162779
162850
  if (!effective) {
162780
162851
  threwAt = "unreachable";
@@ -162806,7 +162877,7 @@ async function crawlScreenDeep(opts, deep) {
162806
162877
  await handle.dispatch(parsed.action, ...workerArgs(interaction?.fired ?? effective));
162807
162878
  if (site.componentId === "topbar.search") {
162808
162879
  if (site.key === "onCancel") {
162809
- searchText = updatedSearchText(state2, snapshot3(w2).state, sites, "");
162880
+ searchText = updatedSearchText(state2, snapshotState(w2).state, sites, "");
162810
162881
  sentSearchText = "";
162811
162882
  } else {
162812
162883
  const value2 = { ...(interaction?.fired ?? effective).params ?? {}, ...(interaction?.fired ?? effective).args ?? {} }.value;
@@ -162816,7 +162887,7 @@ async function crawlScreenDeep(opts, deep) {
162816
162887
  }
162817
162888
  }
162818
162889
  } else {
162819
- const next = snapshot3(w2).state;
162890
+ const next = snapshotState(w2).state;
162820
162891
  searchText = updatedSearchText(state2, next, sites, searchText);
162821
162892
  sentSearchText = updatedSearchText(state2, next, sites, sentSearchText);
162822
162893
  }
@@ -163054,7 +163125,7 @@ async function crawlScreenRelations(opts) {
163054
163125
  const w2 = await boot();
163055
163126
  try {
163056
163127
  if (w2.errors.length) return null;
163057
- let prev = snapshot3(w2).state;
163128
+ let prev = snapshotState(w2).state;
163058
163129
  const bootState = prev;
163059
163130
  let searchText = null;
163060
163131
  let sentSearchText = null;
@@ -163080,7 +163151,7 @@ async function crawlScreenRelations(opts) {
163080
163151
  await h2.dispatch(parsed.action, ...workerArgs(interaction?.fired ?? eff));
163081
163152
  if (site.componentId === "topbar.search") {
163082
163153
  if (site.key === "onCancel") {
163083
- searchText = updatedSearchText(prev, snapshot3(w2).state, sites, "");
163154
+ searchText = updatedSearchText(prev, snapshotState(w2).state, sites, "");
163084
163155
  sentSearchText = "";
163085
163156
  } else {
163086
163157
  const value2 = { ...(interaction?.fired ?? eff).params ?? {}, ...(interaction?.fired ?? eff).args ?? {} }.value;
@@ -163095,7 +163166,7 @@ async function crawlScreenRelations(opts) {
163095
163166
  }
163096
163167
  for (let k3 = 0; k3 < 20; k3++) await yieldMacrotask();
163097
163168
  if (w2.errors.length) return null;
163098
- const next = snapshot3(w2).state;
163169
+ const next = snapshotState(w2).state;
163099
163170
  if (site.componentId !== "topbar.search") {
163100
163171
  searchText = updatedSearchText(prev, next, sites, searchText);
163101
163172
  sentSearchText = updatedSearchText(prev, next, sites, sentSearchText);
@@ -163348,7 +163419,7 @@ async function crawlAppServices(opts) {
163348
163419
  hint: "only a returned _nav from a user gesture is honoured (RFC 0074 \xA77)"
163349
163420
  });
163350
163421
  }
163351
- const state = snapshot3(w2).state;
163422
+ const state = snapshotState(w2).state;
163352
163423
  launchedState = state;
163353
163424
  const hooksRun = [];
163354
163425
  {
@@ -163529,7 +163600,7 @@ function dedupeAppFindings(findings) {
163529
163600
  return true;
163530
163601
  });
163531
163602
  }
163532
- 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;
163603
+ 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;
163533
163604
  var init_screen_crawl = __esm({
163534
163605
  "../../core/dev-server/src/screen-crawl.ts"() {
163535
163606
  init_define_HHP_CATALOG();
@@ -163617,6 +163688,9 @@ var init_screen_crawl = __esm({
163617
163688
  REPEATER_TEMPLATE_KEYS = /* @__PURE__ */ new Set(["items", "pages"]);
163618
163689
  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?"';
163619
163690
  REPEATED_CALL_LIMIT = 50;
163691
+ STATE_ONLY_MEMO_ENTRIES = 8;
163692
+ stateOnlyComputes = 0;
163693
+ stateOnlyRecomputesSkipped = 0;
163620
163694
  UNBINDABLE_ROW = Symbol("unbindable-row");
163621
163695
  APP_SERVICES_SCREEN = "(app services)";
163622
163696
  APP_HOOKS = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1963.0",
3
+ "version": "0.1965.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": "21004ad6909e648e12ae552e1c18ffd430ea649efa998a168c1563b8"
85
+ "falconPackageHash": "a7a9236dc20796bd789fab13417e1e62d4b42f06fb18d0a738703f06"
86
86
  }