@wix/himalaya-cli 0.1978.0 → 0.1980.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.
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;
@@ -15763,8 +15764,8 @@ function tsExtResolvePlugin() {
15763
15764
  setup(b3) {
15764
15765
  b3.onResolve({ filter: /\.js$/ }, (args) => {
15765
15766
  if (args.kind === "entry-point" || !args.path.startsWith(".")) return void 0;
15766
- const ts42 = resolve11(args.resolveDir, args.path.replace(/\.js$/, ".ts"));
15767
- return existsSync13(ts42) ? { path: ts42 } : void 0;
15767
+ const ts43 = resolve11(args.resolveDir, args.path.replace(/\.js$/, ".ts"));
15768
+ return existsSync13(ts43) ? { path: ts43 } : void 0;
15768
15769
  });
15769
15770
  }
15770
15771
  };
@@ -16560,7 +16561,7 @@ function bundleFor(file2) {
16560
16561
  const match = /^tier5-src\/([^/]+)\//.exec(file2);
16561
16562
  return match?.[1] ?? "_shared";
16562
16563
  }
16563
- function toIssue(ts42, contentDir2, diagnostic) {
16564
+ function toIssue(ts43, contentDir2, diagnostic) {
16564
16565
  const file2 = diagnostic.file ? relativeFile(contentDir2, diagnostic.file.fileName) : void 0;
16565
16566
  const position = diagnostic.file && diagnostic.start !== void 0 ? diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start) : void 0;
16566
16567
  return {
@@ -16568,13 +16569,13 @@ function toIssue(ts42, contentDir2, diagnostic) {
16568
16569
  ...file2 ? { file: file2 } : {},
16569
16570
  ...position ? { line: position.line + 1, column: position.character + 1 } : {},
16570
16571
  code: `TS${diagnostic.code}`,
16571
- message: ts42.flattenDiagnosticMessageText(diagnostic.messageText, "\n")
16572
+ message: ts43.flattenDiagnosticMessageText(diagnostic.messageText, "\n")
16572
16573
  };
16573
16574
  }
16574
- function confinedHost(ts42, contentDir2, options2) {
16575
+ function confinedHost(ts43, contentDir2, options2) {
16575
16576
  if (!buildConfinementRequired()) return void 0;
16576
- const host = ts42.createCompilerHost(options2);
16577
- const libDir = resolve13(ts42.getDefaultLibFilePath(options2), "..");
16577
+ const host = ts43.createCompilerHost(options2);
16578
+ const libDir = resolve13(ts43.getDefaultLibFilePath(options2), "..");
16578
16579
  const allows = confinementMatcher(contentDir2, [libDir]);
16579
16580
  const getSourceFile = host.getSourceFile.bind(host);
16580
16581
  const readFile26 = host.readFile.bind(host);
@@ -16686,13 +16687,13 @@ function recordingHost(base2, spellings) {
16686
16687
  }
16687
16688
  return { host, answers: () => h2.digest("hex") };
16688
16689
  }
16689
- function programKey(ts42, spellings, rootNames, options2, answers2) {
16690
+ function programKey(ts43, spellings, rootNames, options2, answers2) {
16690
16691
  const opts = JSON.stringify(options2, (_key, value2) => typeof value2 === "string" ? tokenized(spellings, value2) : value2);
16691
- return digest(["tier5-typecheck-v1", ts42.version, opts, ...rootNames.map((name) => tokenized(spellings, name)), answers2()].join("\n"));
16692
+ return digest(["tier5-typecheck-v1", ts43.version, opts, ...rootNames.map((name) => tokenized(spellings, name)), answers2()].join("\n"));
16692
16693
  }
16693
16694
  async function typecheckContentWorkers(contentDir2, options2) {
16694
16695
  if (!existsSync14(resolve13(contentDir2, "tier5-src"))) return [];
16695
- const ts42 = await compiler2();
16696
+ const ts43 = await compiler2();
16696
16697
  const config = {
16697
16698
  compilerOptions: {
16698
16699
  ...CONTENT_WORKER_COMPILER_OPTIONS,
@@ -16702,29 +16703,29 @@ async function typecheckContentWorkers(contentDir2, options2) {
16702
16703
  // The deployed authoring runtime stages TypeScript 6, which requires an explicit
16703
16704
  // acknowledgement for this compatibility `baseUrl`; the repository's TypeScript 5 lane
16704
16705
  // rejects that 6.0 value, so keep it specific to the compiler that needs it.
16705
- ...Number.parseInt(ts42.versionMajorMinor, 10) >= 6 ? { ignoreDeprecations: "6.0" } : {}
16706
+ ...Number.parseInt(ts43.versionMajorMinor, 10) >= 6 ? { ignoreDeprecations: "6.0" } : {}
16706
16707
  },
16707
16708
  include: ["tier5-src/*/index.ts", "tier5-src/_shared/**/*.ts"]
16708
16709
  };
16709
- const parsed = ts42.parseJsonConfigFileContent(config, ts42.sys, contentDir2);
16710
+ const parsed = ts43.parseJsonConfigFileContent(config, ts43.sys, contentDir2);
16710
16711
  if (parsed.fileNames.length === 0) return [];
16711
- const contentIssues = (diagnostics) => diagnostics.filter((diagnostic) => diagnostic.category === ts42.DiagnosticCategory.Error && belongsToContentWorkers(contentDir2, diagnostic)).map((diagnostic) => toIssue(ts42, contentDir2, diagnostic));
16712
- const host = confinedHost(ts42, contentDir2, parsed.options) ?? ts42.createCompilerHost(parsed.options);
16712
+ const contentIssues = (diagnostics) => diagnostics.filter((diagnostic) => diagnostic.category === ts43.DiagnosticCategory.Error && belongsToContentWorkers(contentDir2, diagnostic)).map((diagnostic) => toIssue(ts43, contentDir2, diagnostic));
16713
+ const host = confinedHost(ts43, contentDir2, parsed.options) ?? ts43.createCompilerHost(parsed.options);
16713
16714
  const spellings = contentDirSpellings(contentDir2);
16714
16715
  const recorder = recordingHost(host, spellings);
16715
- const program = ts42.createProgram({
16716
+ const program = ts43.createProgram({
16716
16717
  rootNames: parsed.fileNames,
16717
16718
  options: parsed.options,
16718
16719
  host: recorder.host
16719
16720
  });
16720
- const key4 = programKey(ts42, spellings, parsed.fileNames, parsed.options, recorder.answers);
16721
+ const key4 = programKey(ts43, spellings, parsed.fileNames, parsed.options, recorder.answers);
16721
16722
  let checked = checkedPrograms.get(key4);
16722
16723
  if (checked) {
16723
16724
  checkedPrograms.delete(key4);
16724
16725
  checkedPrograms.set(key4, checked);
16725
16726
  } else {
16726
16727
  checkerRuns++;
16727
- checked = contentIssues(ts42.getPreEmitDiagnostics(program)).map((issue3) => ({ ...issue3, message: tokenized(spellings, issue3.message) }));
16728
+ checked = contentIssues(ts43.getPreEmitDiagnostics(program)).map((issue3) => ({ ...issue3, message: tokenized(spellings, issue3.message) }));
16728
16729
  checkedPrograms.set(key4, checked);
16729
16730
  if (checkedPrograms.size > CHECKED_PROGRAMS_MAX) checkedPrograms.delete(checkedPrograms.keys().next().value);
16730
16731
  }
@@ -31796,22 +31797,22 @@ var init_pixels = __esm({
31796
31797
  });
31797
31798
 
31798
31799
  // ../../core/dev-server/src/declared-navigation-ast.ts
31799
- function fixedNavigations(bundleJs, ts42) {
31800
- literalTargets(bundleJs, ts42);
31800
+ function fixedNavigations(bundleJs, ts43) {
31801
+ literalTargets(bundleJs, ts43);
31801
31802
  return fixedCache.get(bundleJs) ?? /* @__PURE__ */ new Map();
31802
31803
  }
31803
- function literalTargets(bundleJs, ts42) {
31804
- const name = (n2) => n2 && (ts42.isIdentifier(n2) || ts42.isStringLiteral(n2) || ts42.isNoSubstitutionTemplateLiteral(n2)) ? n2.text : void 0;
31804
+ function literalTargets(bundleJs, ts43) {
31805
+ const name = (n2) => n2 && (ts43.isIdentifier(n2) || ts43.isStringLiteral(n2) || ts43.isNoSubstitutionTemplateLiteral(n2)) ? n2.text : void 0;
31805
31806
  const object16 = (n2) => {
31806
- while (n2 && ts42.isParenthesizedExpression(n2)) n2 = n2.expression;
31807
- return n2 && ts42.isObjectLiteralExpression(n2) ? n2 : void 0;
31807
+ while (n2 && ts43.isParenthesizedExpression(n2)) n2 = n2.expression;
31808
+ return n2 && ts43.isObjectLiteralExpression(n2) ? n2 : void 0;
31808
31809
  };
31809
31810
  const property3 = (o2, key4) => o2?.properties.find((p2) => name(p2.name) === key4);
31810
- const initializer = (p2) => p2 && ts42.isPropertyAssignment(p2) ? p2.initializer : void 0;
31811
- const callable = (n2) => !!n2 && (ts42.isArrowFunction(n2) || ts42.isFunctionExpression(n2) || ts42.isFunctionDeclaration(n2) || ts42.isMethodDeclaration(n2));
31811
+ const initializer = (p2) => p2 && ts43.isPropertyAssignment(p2) ? p2.initializer : void 0;
31812
+ const callable = (n2) => !!n2 && (ts43.isArrowFunction(n2) || ts43.isFunctionExpression(n2) || ts43.isFunctionDeclaration(n2) || ts43.isMethodDeclaration(n2));
31812
31813
  const cached3 = cache.get(bundleJs);
31813
31814
  if (cached3) return cached3;
31814
- const file2 = ts42.createSourceFile("himi-bundle.js", bundleJs, ts42.ScriptTarget.Latest, true, ts42.ScriptKind.JS);
31815
+ const file2 = ts43.createSourceFile("himi-bundle.js", bundleJs, ts43.ScriptTarget.Latest, true, ts43.ScriptKind.JS);
31815
31816
  const symbols = /* @__PURE__ */ new Map();
31816
31817
  const note = (key4, fn2) => {
31817
31818
  if (!key4) return;
@@ -31819,16 +31820,16 @@ function literalTargets(bundleJs, ts42) {
31819
31820
  symbols.set(key4, { count: (prior?.count ?? 0) + 1, fn: fn2 });
31820
31821
  };
31821
31822
  const declarations = (node4) => {
31822
- if (ts42.isFunctionDeclaration(node4)) note(name(node4.name), node4);
31823
- else if (ts42.isVariableDeclaration(node4)) note(name(node4.name), callable(node4.initializer) ? node4.initializer : void 0);
31824
- else if (ts42.isParameter(node4)) note(name(node4.name));
31825
- else if (ts42.isBindingElement(node4)) note(name(node4.name));
31826
- ts42.forEachChild(node4, declarations);
31823
+ if (ts43.isFunctionDeclaration(node4)) note(name(node4.name), node4);
31824
+ else if (ts43.isVariableDeclaration(node4)) note(name(node4.name), callable(node4.initializer) ? node4.initializer : void 0);
31825
+ else if (ts43.isParameter(node4)) note(name(node4.name));
31826
+ else if (ts43.isBindingElement(node4)) note(name(node4.name));
31827
+ ts43.forEachChild(node4, declarations);
31827
31828
  };
31828
31829
  declarations(file2);
31829
31830
  const resolve141 = (node4) => {
31830
31831
  if (callable(node4)) return node4;
31831
- if (node4 && ts42.isIdentifier(node4)) {
31832
+ if (node4 && ts43.isIdentifier(node4)) {
31832
31833
  const symbol = symbols.get(node4.text);
31833
31834
  if (symbol?.count === 1) return symbol.fn;
31834
31835
  }
@@ -31842,9 +31843,9 @@ function literalTargets(bundleJs, ts42) {
31842
31843
  const nav = {};
31843
31844
  for (const p2 of o2.properties) {
31844
31845
  const key4 = name(p2.name);
31845
- if (!ts42.isPropertyAssignment(p2) || !key4 || !NAV_KEYS.has(key4)) return void 0;
31846
- if (ts42.isStringLiteralLike(p2.initializer) && p2.initializer.text) nav[key4] = p2.initializer.text;
31847
- else if (key4 === "reset" && p2.initializer.kind === ts42.SyntaxKind.TrueKeyword) nav[key4] = true;
31846
+ if (!ts43.isPropertyAssignment(p2) || !key4 || !NAV_KEYS.has(key4)) return void 0;
31847
+ if (ts43.isStringLiteralLike(p2.initializer) && p2.initializer.text) nav[key4] = p2.initializer.text;
31848
+ else if (key4 === "reset" && p2.initializer.kind === ts43.SyntaxKind.TrueKeyword) nav[key4] = true;
31848
31849
  else return void 0;
31849
31850
  }
31850
31851
  const { screenId, presentation, tab, reset } = nav;
@@ -31855,75 +31856,75 @@ function literalTargets(bundleJs, ts42) {
31855
31856
  };
31856
31857
  const assigned = /* @__PURE__ */ new Set();
31857
31858
  const assignedNames = (n2) => {
31858
- if (ts42.isIdentifier(n2)) assigned.add(n2.text);
31859
- else ts42.forEachChild(n2, assignedNames);
31859
+ if (ts43.isIdentifier(n2)) assigned.add(n2.text);
31860
+ else ts43.forEachChild(n2, assignedNames);
31860
31861
  };
31861
31862
  const assignments = (n2) => {
31862
- if (ts42.isBinaryExpression(n2) && n2.operatorToken.kind >= ts42.SyntaxKind.FirstAssignment && n2.operatorToken.kind <= ts42.SyntaxKind.LastAssignment) assignedNames(n2.left);
31863
- else if ((ts42.isPrefixUnaryExpression(n2) || ts42.isPostfixUnaryExpression(n2)) && (n2.operator === ts42.SyntaxKind.PlusPlusToken || n2.operator === ts42.SyntaxKind.MinusMinusToken)) assignedNames(n2.operand);
31864
- else if ((ts42.isForOfStatement(n2) || ts42.isForInStatement(n2)) && !ts42.isVariableDeclarationList(n2.initializer)) assignedNames(n2.initializer);
31865
- ts42.forEachChild(n2, assignments);
31863
+ if (ts43.isBinaryExpression(n2) && n2.operatorToken.kind >= ts43.SyntaxKind.FirstAssignment && n2.operatorToken.kind <= ts43.SyntaxKind.LastAssignment) assignedNames(n2.left);
31864
+ else if ((ts43.isPrefixUnaryExpression(n2) || ts43.isPostfixUnaryExpression(n2)) && (n2.operator === ts43.SyntaxKind.PlusPlusToken || n2.operator === ts43.SyntaxKind.MinusMinusToken)) assignedNames(n2.operand);
31865
+ else if ((ts43.isForOfStatement(n2) || ts43.isForInStatement(n2)) && !ts43.isVariableDeclarationList(n2.initializer)) assignedNames(n2.initializer);
31866
+ ts43.forEachChild(n2, assignments);
31866
31867
  };
31867
31868
  assignments(file2);
31868
31869
  const plain5 = (fn2) => {
31869
- const modifiers = ts42.canHaveModifiers(fn2) ? ts42.getModifiers(fn2) ?? [] : [];
31870
- return !fn2.asteriskToken && !modifiers.some((m2) => m2.kind === ts42.SyntaxKind.AsyncKeyword);
31870
+ const modifiers = ts43.canHaveModifiers(fn2) ? ts43.getModifiers(fn2) ?? [] : [];
31871
+ return !fn2.asteriskToken && !modifiers.some((m2) => m2.kind === ts43.SyntaxKind.AsyncKeyword);
31871
31872
  };
31872
31873
  const plainParams = (fn2) => {
31873
31874
  const names2 = /* @__PURE__ */ new Set();
31874
31875
  for (const p2 of fn2.parameters) {
31875
- if (!ts42.isIdentifier(p2.name) || p2.initializer || p2.dotDotDotToken) return void 0;
31876
+ if (!ts43.isIdentifier(p2.name) || p2.initializer || p2.dotDotDotToken) return void 0;
31876
31877
  names2.add(p2.name.text);
31877
31878
  }
31878
31879
  return names2;
31879
31880
  };
31880
31881
  const provenSafe = (expr, params) => {
31881
- while (ts42.isParenthesizedExpression(expr)) expr = expr.expression;
31882
- if (ts42.isStringLiteral(expr) || ts42.isNoSubstitutionTemplateLiteral(expr) || ts42.isNumericLiteral(expr)) return true;
31883
- if (expr.kind === ts42.SyntaxKind.TrueKeyword || expr.kind === ts42.SyntaxKind.FalseKeyword || expr.kind === ts42.SyntaxKind.NullKeyword) return true;
31884
- if (ts42.isIdentifier(expr)) return params.has(expr.text);
31885
- if (ts42.isArrayLiteralExpression(expr)) {
31886
- return expr.elements.every((e2) => !ts42.isSpreadElement(e2) && !ts42.isOmittedExpression(e2) && provenSafe(e2, params));
31887
- }
31888
- if (ts42.isObjectLiteralExpression(expr)) return expr.properties.every((p2) => safeProperty(p2, params));
31882
+ while (ts43.isParenthesizedExpression(expr)) expr = expr.expression;
31883
+ if (ts43.isStringLiteral(expr) || ts43.isNoSubstitutionTemplateLiteral(expr) || ts43.isNumericLiteral(expr)) return true;
31884
+ if (expr.kind === ts43.SyntaxKind.TrueKeyword || expr.kind === ts43.SyntaxKind.FalseKeyword || expr.kind === ts43.SyntaxKind.NullKeyword) return true;
31885
+ if (ts43.isIdentifier(expr)) return params.has(expr.text);
31886
+ if (ts43.isArrayLiteralExpression(expr)) {
31887
+ return expr.elements.every((e2) => !ts43.isSpreadElement(e2) && !ts43.isOmittedExpression(e2) && provenSafe(e2, params));
31888
+ }
31889
+ if (ts43.isObjectLiteralExpression(expr)) return expr.properties.every((p2) => safeProperty(p2, params));
31889
31890
  return false;
31890
31891
  };
31891
31892
  const safeProperty = (p2, params) => {
31892
- if (ts42.isSpreadAssignment(p2)) return provenSafe(p2.expression, params);
31893
- if (ts42.isPropertyAssignment(p2)) return !ts42.isComputedPropertyName(p2.name) && provenSafe(p2.initializer, params);
31894
- if (ts42.isShorthandPropertyAssignment(p2)) return params.has(p2.name.text) && !p2.objectAssignmentInitializer;
31893
+ if (ts43.isSpreadAssignment(p2)) return provenSafe(p2.expression, params);
31894
+ if (ts43.isPropertyAssignment(p2)) return !ts43.isComputedPropertyName(p2.name) && provenSafe(p2.initializer, params);
31895
+ if (ts43.isShorthandPropertyAssignment(p2)) return params.has(p2.name.text) && !p2.objectAssignmentInitializer;
31895
31896
  return false;
31896
31897
  };
31897
31898
  const isNavigateHelper = (callee) => {
31898
- if (!ts42.isIdentifier(callee) || !/^navigate[0-9]*$/.test(callee.text) || assigned.has(callee.text)) return false;
31899
+ if (!ts43.isIdentifier(callee) || !/^navigate[0-9]*$/.test(callee.text) || assigned.has(callee.text)) return false;
31899
31900
  const symbol = symbols.get(callee.text);
31900
31901
  const helper = symbol?.count === 1 ? symbol.fn : void 0;
31901
31902
  if (!helper?.body || !plain5(helper) || helper.parameters.length !== 2 || !plainParams(helper)) return false;
31902
31903
  const [stateParam, navParam] = helper.parameters.map((p2) => name(p2.name));
31903
- const body = ts42.isBlock(helper.body) ? helper.body.statements.length === 1 && ts42.isReturnStatement(helper.body.statements[0]) ? helper.body.statements[0].expression : void 0 : helper.body;
31904
+ const body = ts43.isBlock(helper.body) ? helper.body.statements.length === 1 && ts43.isReturnStatement(helper.body.statements[0]) ? helper.body.statements[0].expression : void 0 : helper.body;
31904
31905
  const o2 = object16(body);
31905
31906
  if (!o2 || o2.properties.length !== 2 || !stateParam || !navParam) return false;
31906
31907
  const [spread, nav] = o2.properties;
31907
- return ts42.isSpreadAssignment(spread) && ts42.isIdentifier(spread.expression) && spread.expression.text === stateParam && ts42.isPropertyAssignment(nav) && name(nav.name) === "_nav" && ts42.isIdentifier(nav.initializer) && nav.initializer.text === navParam;
31908
+ return ts43.isSpreadAssignment(spread) && ts43.isIdentifier(spread.expression) && spread.expression.text === stateParam && ts43.isPropertyAssignment(nav) && name(nav.name) === "_nav" && ts43.isIdentifier(nav.initializer) && nav.initializer.text === navParam;
31908
31909
  };
31909
31910
  const fixedOf = (fn2) => {
31910
31911
  const params = plainParams(fn2);
31911
31912
  if (!fn2.body || !plain5(fn2) || !params) return void 0;
31912
31913
  let result = void 0;
31913
- if (ts42.isBlock(fn2.body)) {
31914
+ if (ts43.isBlock(fn2.body)) {
31914
31915
  const [only, ...rest] = fn2.body.statements;
31915
- if (!only || rest.length > 0 || !ts42.isReturnStatement(only)) return void 0;
31916
+ if (!only || rest.length > 0 || !ts43.isReturnStatement(only)) return void 0;
31916
31917
  result = only.expression;
31917
31918
  } else result = fn2.body;
31918
- while (result && ts42.isParenthesizedExpression(result)) result = result.expression;
31919
+ while (result && ts43.isParenthesizedExpression(result)) result = result.expression;
31919
31920
  let navNode;
31920
- if (result && ts42.isObjectLiteralExpression(result)) {
31921
+ if (result && ts43.isObjectLiteralExpression(result)) {
31921
31922
  const props2 = result.properties;
31922
31923
  const lastProp = props2[props2.length - 1];
31923
- if (!lastProp || !ts42.isPropertyAssignment(lastProp) || ts42.isComputedPropertyName(lastProp.name) || name(lastProp.name) !== "_nav") return void 0;
31924
+ if (!lastProp || !ts43.isPropertyAssignment(lastProp) || ts43.isComputedPropertyName(lastProp.name) || name(lastProp.name) !== "_nav") return void 0;
31924
31925
  if (!props2.slice(0, -1).every((p2) => safeProperty(p2, params))) return void 0;
31925
31926
  navNode = lastProp.initializer;
31926
- } else if (result && ts42.isCallExpression(result) && result.arguments.length === 2 && isNavigateHelper(result.expression)) {
31927
+ } else if (result && ts43.isCallExpression(result) && result.arguments.length === 2 && isNavigateHelper(result.expression)) {
31927
31928
  if (!provenSafe(result.arguments[0], params)) return void 0;
31928
31929
  navNode = result.arguments[1];
31929
31930
  }
@@ -31933,58 +31934,58 @@ function literalTargets(bundleJs, ts42) {
31933
31934
  return { nav, line: position.line + 1, column: position.character };
31934
31935
  };
31935
31936
  const visit = (node4) => {
31936
- if (ts42.isCallExpression(node4)) {
31937
- const callee = ts42.isPropertyAccessExpression(node4.expression) ? node4.expression.name.text : name(node4.expression);
31937
+ if (ts43.isCallExpression(node4)) {
31938
+ const callee = ts43.isPropertyAccessExpression(node4.expression) ? node4.expression.name.text : name(node4.expression);
31938
31939
  const service = node4.arguments[0];
31939
- if (callee && /^defineService[0-9]*$/.test(callee) && service && ts42.isStringLiteralLike(service)) {
31940
+ if (callee && /^defineService[0-9]*$/.test(callee) && service && ts43.isStringLiteralLike(service)) {
31940
31941
  const actions = object16(initializer(property3(object16(node4.arguments[1]), "actions")));
31941
31942
  for (const member of actions?.properties ?? []) {
31942
31943
  const action = name(member.name);
31943
- const fn2 = ts42.isMethodDeclaration(member) ? member : resolve141(ts42.isShorthandPropertyAssignment(member) ? member.name : initializer(member));
31944
+ const fn2 = ts43.isMethodDeclaration(member) ? member : resolve141(ts43.isShorthandPropertyAssignment(member) ? member.name : initializer(member));
31944
31945
  if (!action || !fn2?.body) continue;
31945
31946
  const targets = [];
31946
31947
  const target = (expr) => {
31947
31948
  const sid = initializer(property3(object16(expr), "screenId"));
31948
- if (!sid || !ts42.isStringLiteralLike(sid)) return;
31949
+ if (!sid || !ts43.isStringLiteralLike(sid)) return;
31949
31950
  const position = file2.getLineAndCharacterOfPosition(sid.getStart(file2));
31950
31951
  targets.push({ screenId: sid.text, line: position.line + 1, column: position.character });
31951
31952
  };
31952
31953
  const returned = (expr) => {
31953
31954
  if (!expr) return;
31954
- if (ts42.isParenthesizedExpression(expr) || ts42.isAwaitExpression(expr)) {
31955
+ if (ts43.isParenthesizedExpression(expr) || ts43.isAwaitExpression(expr)) {
31955
31956
  returned(expr.expression);
31956
31957
  return;
31957
31958
  }
31958
- if (ts42.isConditionalExpression(expr)) {
31959
+ if (ts43.isConditionalExpression(expr)) {
31959
31960
  returned(expr.whenTrue);
31960
31961
  returned(expr.whenFalse);
31961
31962
  return;
31962
31963
  }
31963
- if (ts42.isObjectLiteralExpression(expr)) {
31964
+ if (ts43.isObjectLiteralExpression(expr)) {
31964
31965
  target(initializer(property3(expr, "_nav")));
31965
31966
  return;
31966
31967
  }
31967
- if (ts42.isCallExpression(expr)) {
31968
- const called = ts42.isPropertyAccessExpression(expr.expression) ? expr.expression.name.text : name(expr.expression);
31968
+ if (ts43.isCallExpression(expr)) {
31969
+ const called = ts43.isPropertyAccessExpression(expr.expression) ? expr.expression.name.text : name(expr.expression);
31969
31970
  if (called && /^navigate[0-9]*$/.test(called)) target(expr.arguments[1]);
31970
31971
  }
31971
31972
  };
31972
- if (ts42.isBlock(fn2.body)) {
31973
+ if (ts43.isBlock(fn2.body)) {
31973
31974
  const returns = (part7) => {
31974
31975
  if (callable(part7)) return;
31975
- if (ts42.isReturnStatement(part7)) returned(part7.expression);
31976
- else ts42.forEachChild(part7, returns);
31976
+ if (ts43.isReturnStatement(part7)) returned(part7.expression);
31977
+ else ts43.forEachChild(part7, returns);
31977
31978
  };
31978
31979
  returns(fn2.body);
31979
31980
  } else returned(fn2.body);
31980
31981
  results.set("tier5." + service.text + "." + action, targets);
31981
- const ref = ts42.isShorthandPropertyAssignment(member) ? member.name : initializer(member);
31982
- const always = ref && ts42.isIdentifier(ref) && assigned.has(ref.text) ? void 0 : fixedOf(fn2);
31982
+ const ref = ts43.isShorthandPropertyAssignment(member) ? member.name : initializer(member);
31983
+ const always = ref && ts43.isIdentifier(ref) && assigned.has(ref.text) ? void 0 : fixedOf(fn2);
31983
31984
  if (always) fixed.set("tier5." + service.text + "." + action, always);
31984
31985
  }
31985
31986
  }
31986
31987
  }
31987
- ts42.forEachChild(node4, visit);
31988
+ ts43.forEachChild(node4, visit);
31988
31989
  };
31989
31990
  visit(file2);
31990
31991
  cache.set(bundleJs, results);
@@ -150774,7 +150775,7 @@ var init_renderNode = __esm({
150774
150775
  const on4 = selected.includes(c2.id);
150775
150776
  const chipStyle = { display: "flex", flex: "none", whiteSpace: "nowrap", gap: 6, alignItems: "center", fontFamily: bodyFont(ctx), fontWeight: 500, fontSize: pxToRem(13), border: `1px solid ${on4 ? "transparent" : C2("border", "#ddd")}`, background: on4 ? C2("accentPrimary", "#116DFF") : "transparent", color: on4 ? C2("textOnAccent", "#fff") : C2("textSecondary", "#666"), padding: "6px 12px", borderRadius: 999 };
150776
150777
  const inner = /* @__PURE__ */ jsxs12(Fragment5, { children: [
150777
- isolateRun(asText2(c2.label), ctx),
150778
+ isolateRun(asFinalTextL10n(c2.label, ctx), ctx),
150778
150779
  c2.count != null && /* @__PURE__ */ jsxs12(Fragment5, { children: [
150779
150780
  " ",
150780
150781
  /* @__PURE__ */ jsx16("span", { style: { ...on4 ? {} : { opacity: 0.7 }, fontSize: pxToRem(11) }, children: c2.count })
@@ -159168,23 +159169,35 @@ function pinsSingleLanguage(locale) {
159168
159169
  return !locale.translations?.some((target) => target !== tag2);
159169
159170
  }
159170
159171
  function pinnedLanguageSwap(locale, appDir3) {
159171
- if (!pinsSingleLanguage(locale)) return void 0;
159172
- if (!isSupportedLocale(locale.default)) return void 0;
159173
- const directory = join38(appDir3, "l10n");
159174
- const path2 = join38(directory, `${locale.default}.json`);
159175
- const outside = relative10(directory, path2);
159176
- if (outside.startsWith("..") || isAbsolute4(outside)) return void 0;
159177
- const map2 = existsSync42(path2) ? sourceMap(parseCatalog(readFileSync46(path2, "utf8"))) : /* @__PURE__ */ new Map();
159172
+ const pinned = pinnedCatalog(locale, appDir3);
159173
+ if (!pinned) return void 0;
159174
+ const { tag: tag2, map: map2 } = pinned;
159178
159175
  return (descriptor, workerSource) => {
159179
159176
  translateWith(descriptor, map2);
159180
159177
  const onAppear = descriptor?.payload?.modifiers?.onAppear;
159181
159178
  if (typeof onAppear?.actionId !== "string" || !onAppear.actionId.startsWith("tier5.")) return;
159182
159179
  const params = onAppear.params ??= {};
159183
- params.locale ??= locale.default;
159180
+ params.locale ??= tag2;
159184
159181
  const textCopy = workerSource === void 0 || params.textCopy !== void 0 ? void 0 : textCopyFor(workerSource, map2);
159185
159182
  if (textCopy) params.textCopy = textCopy;
159186
159183
  };
159187
159184
  }
159185
+ function pinnedWorkerParams(locale, appDir3, workerSource) {
159186
+ const pinned = pinnedCatalog(locale, appDir3);
159187
+ if (!pinned) return void 0;
159188
+ const textCopy = textCopyFor(workerSource, pinned.map);
159189
+ return { locale: pinned.tag, ...textCopy ? { textCopy } : {} };
159190
+ }
159191
+ function pinnedCatalog(locale, appDir3) {
159192
+ if (!pinsSingleLanguage(locale)) return void 0;
159193
+ if (!isSupportedLocale(locale.default)) return void 0;
159194
+ const directory = join38(appDir3, "l10n");
159195
+ const path2 = join38(directory, `${locale.default}.json`);
159196
+ const outside = relative10(directory, path2);
159197
+ if (outside.startsWith("..") || isAbsolute4(outside)) return void 0;
159198
+ const map2 = existsSync42(path2) ? sourceMap(parseCatalog(readFileSync46(path2, "utf8"))) : /* @__PURE__ */ new Map();
159199
+ return { tag: locale.default, map: map2 };
159200
+ }
159188
159201
  function textCopyFor(workerSource, map2) {
159189
159202
  const found = {};
159190
159203
  for (const [source2, translation] of [...map2].sort(([a3], [b3]) => a3 < b3 ? -1 : a3 > b3 ? 1 : 0)) {
@@ -167172,9 +167185,9 @@ function stateOf(view) {
167172
167185
  build: b3 && view.live ? { ok: b3.ok, ms: b3.ms, screens: b3.screens, at: b3.at, run: view.live.runId } : null
167173
167186
  };
167174
167187
  }
167175
- function frameFor(state, prev, ts42, v2, key4) {
167176
- if (key4 || !prev) return { ts: ts42, v: v2, key: true, ...state };
167177
- const f2 = { ts: ts42, v: v2 };
167188
+ function frameFor(state, prev, ts43, v2, key4) {
167189
+ if (key4 || !prev) return { ts: ts43, v: v2, key: true, ...state };
167190
+ const f2 = { ts: ts43, v: v2 };
167178
167191
  if (!same2(state.step, prev.step)) f2.step = state.step;
167179
167192
  if (!same2(state.now, prev.now)) f2.now = state.now;
167180
167193
  const screens = {};
@@ -188375,15 +188388,15 @@ function loadMemory2(dir) {
188375
188388
  for (const t2 of m2.timeline) {
188376
188389
  if (!isObj3(t2)) continue;
188377
188390
  const file2 = historyName(t2.sha, t2.ext);
188378
- const ts42 = str7(t2.ts);
188391
+ const ts43 = str7(t2.ts);
188379
188392
  const id = str7(t2.id);
188380
- if (file2 && ts42 && id) timeline.push({ ts: ts42, id, file: file2 });
188393
+ if (file2 && ts43 && id) timeline.push({ ts: ts43, id, file: file2 });
188381
188394
  }
188382
188395
  return { createdAt: str7(m2.createdAt), shots, timeline };
188383
188396
  }
188384
- function captionAt(entries, ts42) {
188397
+ function captionAt(entries, ts43) {
188385
188398
  let best = null;
188386
- for (const e2 of entries) if (e2.ts <= ts42) best = e2;
188399
+ for (const e2 of entries) if (e2.ts <= ts43) best = e2;
188387
188400
  return best ? best.message : null;
188388
188401
  }
188389
188402
  function thin(items, max) {
@@ -188503,13 +188516,13 @@ function duration(ms2) {
188503
188516
  const m2 = Math.round(ms2 / 6e4);
188504
188517
  return m2 < 60 ? `${m2} min` : `${Math.floor(m2 / 60)} h ${m2 % 60} min`;
188505
188518
  }
188506
- function utcDay(ts42) {
188507
- const d2 = new Date(ts42);
188519
+ function utcDay(ts43) {
188520
+ const d2 = new Date(ts43);
188508
188521
  return Number.isNaN(d2.getTime()) ? "" : `${d2.toUTCString().slice(0, 16)} (UTC)`;
188509
188522
  }
188510
- function sinceStart(start2, ts42) {
188523
+ function sinceStart(start2, ts43) {
188511
188524
  if (!start2) return "";
188512
- const s5 = Math.max(0, Math.round((Date.parse(ts42) - Date.parse(start2)) / 1e3));
188525
+ const s5 = Math.max(0, Math.round((Date.parse(ts43) - Date.parse(start2)) / 1e3));
188513
188526
  const h2 = Math.floor(s5 / 3600);
188514
188527
  const m2 = Math.floor(s5 % 3600 / 60);
188515
188528
  const sec = String(s5 % 60).padStart(2, "0");
@@ -188519,7 +188532,7 @@ function renderReel(plan, images) {
188519
188532
  const img = (f2, alt, cls = "") => f2 && images.has(f2) ? `<img class="${cls}" src="${images.get(f2)}" alt="${escapeHtml(alt)}">` : "";
188520
188533
  const count3 = (n2) => escapeHtml(String(Number.isSafeInteger(n2) && n2 >= 0 ? n2 : 0));
188521
188534
  const accent = ACCENT2.test(plan.accent) ? plan.accent : DEFAULT_ACCENT;
188522
- const clock = (ts42) => sinceStart(plan.startedAt, ts42);
188535
+ const clock = (ts43) => sinceStart(plan.startedAt, ts43);
188523
188536
  const frames = plan.frames.filter((f2) => images.has(f2.file));
188524
188537
  const flip = frames.length ? `<section class="flip"><div class="phone">${frames.map((f2, i2) => `<img class="fr${i2 === 0 ? " on" : ""}" src="${images.get(f2.file)}" alt="${escapeHtml(plan.focusId ?? "")} at ${clock(f2.ts)}">`).join("")}</div>
188525
188538
  <div class="flipcap"><div class="t" id="ft">${frames[0] ? clock(frames[0].ts) : ""}</div><div id="fc">${escapeHtml(frames[0]?.caption ?? "")}</div><div class="bar"><div id="fb"></div></div></div></section>` : `<p class="muted">No screen versions were recorded \u2014 open the build board with <code>himi studio</code> before building to capture them.</p>`;
@@ -189607,13 +189620,13 @@ async function initCommand(ctx) {
189607
189620
  io2.error(JSON.stringify({ ok: false, code: "invalid_locale", error: `--locale "${localeFlag2}" is not supported`, hint: `choose one of ${SUPPORTED_LOCALES2.join(", ")}` }));
189608
189621
  return 2;
189609
189622
  }
189610
- const appLocale2 = localeFlag2 ?? migrationLocale2(resolve51(parentDir, name));
189623
+ const appLocale3 = localeFlag2 ?? migrationLocale2(resolve51(parentDir, name));
189611
189624
  const appLanguages = migrationLanguages2(resolve51(parentDir, name));
189612
189625
  const localeApplied = (dir) => {
189613
- if (appLocale2 === void 0) return {};
189614
- const config = applyAppLocale2(dir, appLocale2, appLanguages);
189615
- const restored = restoreTemplateCatalogs2(dir, template, [appLocale2, ...appLanguages]);
189616
- return { locale: { tag: appLocale2, config, ...restored.length ? { catalogs: restored } : {}, ...config === "written" && appLanguages.length ? { translations: appLanguages } : {}, from: localeFlag2 === void 0 ? "one-app manifest" : "--locale" } };
189626
+ if (appLocale3 === void 0) return {};
189627
+ const config = applyAppLocale2(dir, appLocale3, appLanguages);
189628
+ const restored = restoreTemplateCatalogs2(dir, template, [appLocale3, ...appLanguages]);
189629
+ return { locale: { tag: appLocale3, config, ...restored.length ? { catalogs: restored } : {}, ...config === "written" && appLanguages.length ? { translations: appLanguages } : {}, from: localeFlag2 === void 0 ? "one-app manifest" : "--locale" } };
189617
189630
  };
189618
189631
  const base44Applied = (dir) => {
189619
189632
  if (base44AppId === void 0) return {};
@@ -211997,6 +212010,7 @@ function generateScreens(input) {
211997
212010
  page: { label: label4, screenId, layoutItemId },
211998
212011
  taken: taken2,
211999
212012
  hasScreen: (id) => !input.takenScreenIds || input.takenScreenIds.has(id),
212013
+ workerCopy: (module) => input.workerCopy?.(module) ?? {},
212000
212014
  action: (action) => controlAction(input, screenId, action, () => {
212001
212015
  if (input.hasModule && !input.hasModule(MODULES.memberAction.file)) return false;
212002
212016
  const svc = memberActionService(screenId);
@@ -212498,7 +212512,7 @@ function addNavigation(out2, plan, taken2, pageIconOf) {
212498
212512
  out2.routes.push({ layoutItemId: "(more)", label: "More", screenId, kind: "generated" });
212499
212513
  out2.tabs.push({ layoutItemId: "(more)", label: "More", screenId });
212500
212514
  }
212501
- var TEMPLATE_HOME_SCREEN, TEMPLATE_SCREEN_PARAM_KEYS, SYSTEM_ALL_PRODUCTS_ID, collectionParams, TEMPLATE_PARAMS, countOf2, SCREEN_ADAPTATIONS, FALLBACK_TARGETS, BOTTOM_TABS_BEFORE_MORE, TEMPLATE_VERTICALS, PAGE_TYPE_ICONS, HOME_TAB_ICON, TEMPLATE_FALLBACKS, MODULES, obj19, arr3, str15, node3, text10, vstack, hstack, inset, youtubeIdOf, DIRECT_VIDEO_FILE, UNREAD_IMAGE_RATIO, REPEATER_COLUMNS_MAX, BUSINESS_CHAT_SCREEN, SUBSCRIPTIONS_MAX, selectedPlanIds, MEMBERS_RAIL, PROGRAMS_DEFAULT_LIMIT, PROGRAMS_INLINE_MAX, PODCAST_INLINE, GALLERIES_INLINE_MAX, GALLERIES_LIST_INLINE, BLOG_HERO_MAX, BLOG_SEARCH_POSTS, EVENT_SCHEDULE_INLINE, SHOP_ALL, SERVICES_INLINE, UPCOMING_INLINE, CALENDAR_INLINE, UPCOMING_SESSIONS_INLINE, UPCOMING_INTERVALS, HISTORY_INLINE, PRODUCTS_INLINE, GROUP_FEED_POSTS_MAX, POST_ACTION_LABELS, postActionsGap, NEWSFEED_GROUPS_MAX, LOYALTY_TIERS_INLINE, VIDEOS_INLINE_DEFAULT, VIDEOS_INLINE_MAX, WISHLIST_INLINE, EVENTS_RAIL_INLINE, SOCIAL_NETWORKS, HANDLERS, memberActionService, MERGED_PAGES_BUNDLE, hasCtaButton, chevron;
212515
+ var TEMPLATE_HOME_SCREEN, TEMPLATE_SCREEN_PARAM_KEYS, SYSTEM_ALL_PRODUCTS_ID, collectionParams, faqHiddenCategories, TEMPLATE_PARAMS, countOf2, SCREEN_ADAPTATIONS, FALLBACK_TARGETS, BOTTOM_TABS_BEFORE_MORE, TEMPLATE_VERTICALS, PAGE_TYPE_ICONS, HOME_TAB_ICON, TEMPLATE_FALLBACKS, MODULES, obj19, arr3, str15, node3, text10, vstack, hstack, inset, youtubeIdOf, DIRECT_VIDEO_FILE, UNREAD_IMAGE_RATIO, REPEATER_COLUMNS_MAX, BUSINESS_CHAT_SCREEN, SUBSCRIPTIONS_MAX, selectedPlanIds, MEMBERS_RAIL, PROGRAMS_DEFAULT_LIMIT, PROGRAMS_INLINE_MAX, PODCAST_INLINE, GALLERIES_INLINE_MAX, GALLERIES_LIST_INLINE, BLOG_HERO_MAX, BLOG_SEARCH_POSTS, EVENT_SCHEDULE_INLINE, SHOP_ALL, SERVICES_INLINE, UPCOMING_INLINE, CALENDAR_INLINE, UPCOMING_SESSIONS_INLINE, UPCOMING_INTERVALS, HISTORY_INLINE, PRODUCTS_INLINE, GROUP_FEED_POSTS_MAX, POST_ACTION_LABELS, postActionsGap, NEWSFEED_GROUPS_MAX, LOYALTY_TIERS_INLINE, VIDEOS_INLINE_DEFAULT, VIDEOS_INLINE_MAX, WISHLIST_INLINE, EVENTS_RAIL_INLINE, SOCIAL_NETWORKS, HANDLERS, memberActionService, MERGED_PAGES_BUNDLE, hasCtaButton, chevron;
212502
212516
  var init_generate = __esm({
212503
212517
  "src/one-app/generate.ts"() {
212504
212518
  init_define_HHP_CATALOG();
@@ -212528,6 +212542,7 @@ var init_generate = __esm({
212528
212542
  const id = str15(obj19(st2.collection).id).trim();
212529
212543
  return id && id !== SYSTEM_ALL_PRODUCTS_ID ? { categoryId: id } : {};
212530
212544
  };
212545
+ faqHiddenCategories = (st2) => Object.entries(obj19(st2.categories)).filter(([id, shown3]) => id.trim() && shown3 === false).map(([id]) => id.trim());
212531
212546
  TEMPLATE_PARAMS = {
212532
212547
  groups_feed_section: (_section, st2) => ({
212533
212548
  ...str15(st2.sectionTitle).trim() ? { title: str15(st2.sectionTitle).trim() } : {},
@@ -212562,10 +212577,12 @@ var init_generate = __esm({
212562
212577
  return chosen ? [`the source shows the feed of only its ${chosen} chosen group(s); the template screen takes no group selection and shows every group`] : [];
212563
212578
  },
212564
212579
  faq_list_section: (st2) => {
212565
- const limit = countOf2(obj19(st2.questions).NumberOfFAQs);
212580
+ const limit = countOf2(obj19(st2.questions).NumberOfFAQs), hidden = faqHiddenCategories(st2).length;
212566
212581
  return [
212567
212582
  ...limit !== void 0 ? [`the source shows ${limit} question(s); himi_faq lists every question`] : [],
212568
- ...Object.keys(obj19(st2.categories)).length ? ["the source limits its questions to chosen categories; himi_faq takes no category selection and lists every category"] : []
212583
+ ...hidden ? [`the source hides ${hidden} categor${hidden === 1 ? "y" : "ies"}; himi_faq takes no category selection and lists every category`] : [],
212584
+ // The chips reach himi_faq only from an inline section's View All; opened as a page it has the screen's own layout.
212585
+ obj19(st2.questions).showCategories !== false ? "the source shows its categories as filter chips; himi_faq opened as a page lists every category under its heading" : "the source shows one list with no categories; himi_faq opened as a page lists every category under its heading"
212569
212586
  ];
212570
212587
  },
212571
212588
  newBlog_postlist_carousel_full_section: (st2) => blogCarouselScreenGaps(st2),
@@ -213208,25 +213225,32 @@ var init_generate = __esm({
213208
213225
  children2.push(ctx.recipe("blog-categories", { svc, id, blogScreen: "himi_blog" }), ...ctx.optionalRecipe("section-error", { svc, id, action: "load" }));
213209
213226
  return vstack(`${id}.box`, children2, 12, { ...inset(16, 16), onAppear: { actionId: `tier5.${svc}.load`, params: {} } });
213210
213227
  },
213211
- // The FAQ: questions grouped by category as disclosure rows, with the source's own settings. What the recipe has no control for is reported.
213228
+ // The FAQ as the source's section shows it: its category chips (All first unless turned off) over the chosen chip's questions as
213229
+ // disclosure rows, its categories turned off left out, its limit, and View All opening the FAQ screen with the same filters on the
213230
+ // chosen chip. The settings and their defaults are the One App FAQ module's own (`settings-reader.ts` of wix-one-app-faq-app).
213212
213231
  faq_list_section: (id, s5, st2, index, ctx, sectionId) => {
213213
213232
  const q4 = obj19(st2.questions);
213214
213233
  const limit = countOf2(q4.NumberOfFAQs);
213234
+ const showCategories = q4.showCategories !== false;
213235
+ const hiddenCategoryIds = faqHiddenCategories(st2);
213236
+ const viewAll = limit !== void 0 && ctx.hasScreen("himi_faq");
213215
213237
  const options2 = {
213216
213238
  ...limit !== void 0 ? { limit } : {},
213217
- showCategories: q4.showCategories !== false,
213218
- firstOpen: q4.showFirsAnswerOpen === true,
213219
- oneAtATime: q4.showOneAnswetAtATime === true,
213220
- showSearch: q4.showSearchBar !== false
213239
+ showCategories,
213240
+ ...showCategories ? { categoryFilter: true, allChip: q4.ShowAllCategoriesLabel !== false } : {},
213241
+ ...hiddenCategoryIds.length ? { hiddenCategoryIds } : {},
213242
+ firstOpen: q4.showFirstAnswerOpen === true,
213243
+ oneAtATime: q4.showOneAnswerAtATime !== false,
213244
+ showSearch: q4.showSearchBar !== false,
213245
+ ...viewAll ? { viewAllScreen: "himi_faq" } : {}
213221
213246
  };
213222
- if (Object.keys(obj19(st2.categories)).length) ctx.gap(sectionId, "faq_list_section", "the source limits its questions to chosen categories; the section lists every category");
213223
- if (q4.ShowAllCategoriesLabel === true && q4.showCategories !== false) ctx.gap(sectionId, "faq_list_section", "the source has an All-categories filter; the section shows every category's questions under its own heading, with no filter");
213247
+ if (limit !== void 0 && !viewAll) ctx.gap(sectionId, "faq_list_section", "the source offers View All for every question; this scaffold has no himi_faq screen, so the button is left out");
213224
213248
  const svc = ctx.uses("faq", `faq${index}`, options2);
213225
213249
  const children2 = [];
213226
213250
  const title = str15(s5.title).trim();
213227
213251
  if (s5.showTitle === true && title) children2.push(text10(`${id}.title`, title, "title3", {}, inset(0, 0, 0)));
213228
- children2.push(ctx.recipe("faq-list", { svc, id }));
213229
- return vstack(`${id}.box`, children2, 12, { ...inset(16, 16), onAppear: { actionId: `tier5.${svc}.load`, params: {} } });
213252
+ children2.push(ctx.recipe("faq-list", { svc, id, viewAllLabel: "View All" }));
213253
+ return vstack(`${id}.box`, children2, 12, { ...inset(16, 16), onAppear: { actionId: `tier5.${svc}.load`, params: ctx.workerCopy(MODULES.faq.file) } });
213230
213254
  },
213231
213255
  // The groups the source chose (or all), as rows that open the group, with the source's own View All button.
213232
213256
  groups_list_section: groupsSection("groups-list", "groups_list_section"),
@@ -266682,20 +266706,20 @@ __export(input_evidence_isolation_exports, {
266682
266706
  });
266683
266707
  async function installInputEvidenceIsolation(dir) {
266684
266708
  const { lstatSync: lstatSync45, readdirSync: readdirSync69, readlinkSync: readlinkSync4, realpathSync: realpathSync28 } = await import("node:fs");
266685
- const { dirname: dirname96, isAbsolute: isAbsolute25, join: join229, relative: relative41, resolve: resolve141, sep: sep38 } = await import("node:path");
266709
+ const { dirname: dirname96, isAbsolute: isAbsolute26, join: join229, relative: relative41, resolve: resolve141, sep: sep38 } = await import("node:path");
266686
266710
  const root = resolve141(dir);
266687
266711
  const privateDir = join229(root, ".himi");
266688
266712
  const privateReal = join229(realpathSync28(root), ".himi") + sep38;
266689
266713
  const within2 = (base2, path2) => {
266690
266714
  const rel2 = relative41(base2, path2);
266691
- return !!rel2 && rel2 !== ".." && !rel2.startsWith(`..${sep38}`) && !isAbsolute25(rel2);
266715
+ return !!rel2 && rel2 !== ".." && !rel2.startsWith(`..${sep38}`) && !isAbsolute26(rel2);
266692
266716
  };
266693
266717
  const recording = join229(dir, "dev", "net-mocks.json");
266694
266718
  const isAllowedLink = (path2) => {
266695
266719
  try {
266696
266720
  if (path2 === recording) {
266697
266721
  const link4 = readlinkSync4(path2);
266698
- if (isAbsolute25(link4)) return false;
266722
+ if (isAbsolute26(link4)) return false;
266699
266723
  const target = resolve141(dirname96(path2), link4);
266700
266724
  if (!within2(privateDir, target)) return false;
266701
266725
  if (realpathSync28(path2) !== join229(realpathSync28(root), relative41(root, target))) return false;
@@ -268621,6 +268645,8 @@ var init_widgets_plan = __esm({
268621
268645
  // src/one-app/generate-cli.ts
268622
268646
  import { existsSync as existsSync130, mkdirSync as mkdirSync59, readdirSync as readdirSync56, readFileSync as readFileSync154, rmSync as rmSync37, writeFileSync as writeFileSync61 } from "node:fs";
268623
268647
  import { dirname as dirname74, join as join164, resolve as resolve101 } from "node:path";
268648
+ import ts36 from "typescript";
268649
+ import { relative as relativePath, isAbsolute as isAbsolute21 } from "node:path";
268624
268650
  function removeStaleGeneratedWorkers(contentDir2, current) {
268625
268651
  const root = join164(contentDir2, "tier5-src");
268626
268652
  if (!existsSync130(root)) return;
@@ -268749,7 +268775,8 @@ async function runOneAppGenerate(args, io2) {
268749
268775
  let result;
268750
268776
  try {
268751
268777
  const topBarDefault = readTopBarDefault(options2.contentDir);
268752
- result = generateScreens({ raw, pages: pages2, business, opaquePngs, imageRatios, navigation, homeInvite, takenScreenIds: taken2, ...homeScreenId ? { homeScreenId } : {}, ...topBarDefault ? { topBarDefault } : {}, recipe: (name, values) => readRecipe(options2.contentDir, name, values), recipeNodes: (name, values) => readRecipeNodes(options2.contentDir, name, values), hasModule: (file2) => existsSync130(join164(options2.contentDir, "tier5-src", "_shared", `${file2}.ts`)), customWidget: (key4) => readWidgetComponent(options2.contentDir, key4) });
268778
+ const workerCopy = sectionWorkerCopy(options2.contentDir, await appLocale2(options2.contentDir));
268779
+ result = generateScreens({ raw, pages: pages2, business, opaquePngs, imageRatios, navigation, homeInvite, takenScreenIds: taken2, workerCopy, ...homeScreenId ? { homeScreenId } : {}, ...topBarDefault ? { topBarDefault } : {}, recipe: (name, values) => readRecipe(options2.contentDir, name, values), recipeNodes: (name, values) => readRecipeNodes(options2.contentDir, name, values), hasModule: (file2) => existsSync130(join164(options2.contentDir, "tier5-src", "_shared", `${file2}.ts`)), customWidget: (key4) => readWidgetComponent(options2.contentDir, key4) });
268753
268780
  } catch (error) {
268754
268781
  if (error instanceof RecipeError) return report6(io2, false, { code: "recipe_unavailable", error: error.message });
268755
268782
  throw error;
@@ -268877,6 +268904,62 @@ async function runOneAppGenerate(args, io2) {
268877
268904
  }
268878
268905
  return report6(io2, true, { ...body, next: `himi template screens --upsert --from ${shellArg(options2.out)}` + (result.tabs.length ? ` && himi one-app apply-navigation --evidence-dir ${shellArg(options2.evidenceDir)} --content ${shellArg(options2.contentDir)} --tabs ${shellArg(tabsFileOf(options2.out))}` : "") });
268879
268906
  }
268907
+ async function appLocale2(contentDir2) {
268908
+ try {
268909
+ const locale = (await loadAppConfigModule(contentDir2))?.locale;
268910
+ return locale && typeof locale === "object" ? locale : void 0;
268911
+ } catch {
268912
+ return void 0;
268913
+ }
268914
+ }
268915
+ function sectionWorkerCopy(contentDir2, locale) {
268916
+ const done = /* @__PURE__ */ new Map();
268917
+ return (module) => {
268918
+ const hit = done.get(module);
268919
+ if (hit) return hit;
268920
+ let params = {};
268921
+ if (/^[a-z0-9-]+$/.test(module)) {
268922
+ try {
268923
+ const source2 = readFileSync154(join164(contentDir2, "tier5-src", "_shared", `${module}.ts`), "utf8");
268924
+ params = pinnedWorkerParams(locale, contentDir2, source2) ?? keyedWorkerCopy(contentDir2, locale, source2);
268925
+ } catch {
268926
+ params = {};
268927
+ }
268928
+ }
268929
+ done.set(module, params);
268930
+ return params;
268931
+ };
268932
+ }
268933
+ function keyedWorkerCopy(contentDir2, locale, source2) {
268934
+ const tag2 = locale?.default ?? "en";
268935
+ const others = (locale?.translations ?? []).filter((t2) => t2 !== tag2);
268936
+ if (!others.length || pinsSingleLanguage(locale) || !isSupportedLocale(tag2)) return {};
268937
+ const directory = join164(contentDir2, "l10n");
268938
+ const path2 = join164(directory, `${tag2}.json`);
268939
+ const outside = relativePath(directory, path2);
268940
+ if (outside.startsWith("..") || isAbsolute21(outside)) return {};
268941
+ let keyed;
268942
+ try {
268943
+ keyed = keyMap(parseCatalog(readFileSync154(path2, "utf8")), { sourceFallback: true });
268944
+ } catch {
268945
+ return {};
268946
+ }
268947
+ const params = {};
268948
+ for (const key4 of copyParamKeys(source2).sort()) if (keyed.has(key4)) params[key4] = `$t:${key4}`;
268949
+ return params;
268950
+ }
268951
+ function copyParamKeys(source2) {
268952
+ const keys2 = /* @__PURE__ */ new Set();
268953
+ const visit = (node4) => {
268954
+ if (ts36.isCallExpression(node4) && ts36.isIdentifier(node4.expression) && node4.expression.text === "copyParam") {
268955
+ const [key4] = node4.arguments;
268956
+ if (key4 && ts36.isStringLiteralLike(key4)) keys2.add(key4.text);
268957
+ }
268958
+ ts36.forEachChild(node4, visit);
268959
+ };
268960
+ visit(ts36.createSourceFile("module.ts", source2, ts36.ScriptTarget.Latest, true));
268961
+ return [...keys2];
268962
+ }
268880
268963
  var GENERATE_USAGE, idsFile, homeFile, shellArg, generatedPagesFile;
268881
268964
  var init_generate_cli = __esm({
268882
268965
  "src/one-app/generate-cli.ts"() {
@@ -268899,6 +268982,10 @@ var init_generate_cli = __esm({
268899
268982
  init_custom_widget_component();
268900
268983
  init_widgets_plan();
268901
268984
  init_home_topbar();
268985
+ init_pinned_language();
268986
+ init_l10n_catalog();
268987
+ init_locale();
268988
+ init_app_config_loader();
268902
268989
  GENERATE_USAGE = "himi one-app generate --evidence-dir <.himi/one-app> --content <app-dir> [--out <screens.json>]";
268903
268990
  idsFile = (out2) => `${out2}.ids.json`;
268904
268991
  homeFile = (out2) => `${out2}.home.json`;
@@ -271431,8 +271518,8 @@ __export(validate_design_exports, {
271431
271518
  });
271432
271519
  import { randomBytes as randomBytes22 } from "node:crypto";
271433
271520
  import { closeSync as closeSync12, constants as constants10, existsSync as existsSync137, lstatSync as lstatSync37, openSync as openSync11, readFileSync as readFileSync161, realpathSync as realpathSync21, renameSync as renameSync22, unlinkSync as unlinkSync9, writeFileSync as writeFileSync64 } from "node:fs";
271434
- import { dirname as dirname76, isAbsolute as isAbsolute21, join as join172, relative as relative31, resolve as resolve105, sep as sep33, win32 } from "node:path";
271435
- import ts36 from "typescript";
271521
+ import { dirname as dirname76, isAbsolute as isAbsolute22, join as join172, relative as relative31, resolve as resolve105, sep as sep33, win32 } from "node:path";
271522
+ import ts37 from "typescript";
271436
271523
  function readColorToken(tokens2, name) {
271437
271524
  const entry = obj24(tokens2.colors)?.[name];
271438
271525
  if (typeof entry === "string") return { value: entry, origin: "token" };
@@ -271603,11 +271690,11 @@ function tokensLocation(contentDir2) {
271603
271690
  }
271604
271691
  function literalPolicyValue(expression) {
271605
271692
  const node4 = unwrap(expression);
271606
- if (ts36.isStringLiteralLike(node4)) return node4.text;
271607
- if (!ts36.isObjectLiteralExpression(node4)) throw new Error("The app idiom policy is computed and cannot be checked.");
271693
+ if (ts37.isStringLiteralLike(node4)) return node4.text;
271694
+ if (!ts37.isObjectLiteralExpression(node4)) throw new Error("The app idiom policy is computed and cannot be checked.");
271608
271695
  const value2 = {};
271609
271696
  for (const property3 of node4.properties) {
271610
- if (!ts36.isPropertyAssignment(property3) || !property3.name || !ts36.isIdentifier(property3.name) && !ts36.isStringLiteral(property3.name)) {
271697
+ if (!ts37.isPropertyAssignment(property3) || !property3.name || !ts37.isIdentifier(property3.name) && !ts37.isStringLiteral(property3.name)) {
271611
271698
  throw new Error("The app idiom policy is computed and cannot be checked.");
271612
271699
  }
271613
271700
  value2[property3.name.text] = literalPolicyValue(property3.initializer);
@@ -271620,7 +271707,7 @@ function activeIdiomNames(contentDir2, tokens2) {
271620
271707
  for (const name of ["config.ts", "config.js", "himi.config.ts"]) {
271621
271708
  const file2 = join172(contentDir2, name);
271622
271709
  if (!existsSync137(file2)) continue;
271623
- const source2 = ts36.createSourceFile(file2, readFileSync161(file2, "utf8"), ts36.ScriptTarget.Latest, true);
271710
+ const source2 = ts37.createSourceFile(file2, readFileSync161(file2, "utf8"), ts37.ScriptTarget.Latest, true);
271624
271711
  const app2 = defineAppLiteral(source2);
271625
271712
  if (!app2) throw new Error("The app config cannot be inspected for active idiom overlays.");
271626
271713
  const field = lookup(app2, "idiom");
@@ -271650,13 +271737,13 @@ function activeIdiomNames(contentDir2, tokens2) {
271650
271737
  return /* @__PURE__ */ new Set();
271651
271738
  }
271652
271739
  function writableTokensPath(contentDir2, location) {
271653
- if (isAbsolute21(location) || win32.isAbsolute(location) || location.split(/[\\/]/).includes("..")) {
271740
+ if (isAbsolute22(location) || win32.isAbsolute(location) || location.split(/[\\/]/).includes("..")) {
271654
271741
  throw new Error("--fix requires a token path inside the content directory without traversal.");
271655
271742
  }
271656
271743
  const root = realpathSync21(contentDir2);
271657
271744
  const path2 = resolve105(root, location);
271658
271745
  const rel2 = relative31(root, path2);
271659
- if (!rel2 || rel2 === ".." || rel2.startsWith(`..${sep33}`) || isAbsolute21(rel2)) {
271746
+ if (!rel2 || rel2 === ".." || rel2.startsWith(`..${sep33}`) || isAbsolute22(rel2)) {
271660
271747
  throw new Error("--fix requires a token path inside the content directory.");
271661
271748
  }
271662
271749
  let current = root;
@@ -271669,7 +271756,7 @@ function writableTokensPath(contentDir2, location) {
271669
271756
  }
271670
271757
  }
271671
271758
  const real = relative31(root, realpathSync21(path2));
271672
- if (!real || real === ".." || real.startsWith(`..${sep33}`) || isAbsolute21(real)) {
271759
+ if (!real || real === ".." || real.startsWith(`..${sep33}`) || isAbsolute22(real)) {
271673
271760
  throw new Error("--fix cannot write outside the content directory.");
271674
271761
  }
271675
271762
  return path2;
@@ -271869,7 +271956,7 @@ function safeEvidencePath(contentDir2, name) {
271869
271956
  const dir = realDirIn(root, ".himi/one-app");
271870
271957
  if (!dir) throw new Error("The design evidence directory is not a regular directory.");
271871
271958
  const real = relative31(root, realpathSync21(dir));
271872
- if (!real || real === ".." || real.startsWith(`..${sep33}`) || isAbsolute21(real)) {
271959
+ if (!real || real === ".." || real.startsWith(`..${sep33}`) || isAbsolute22(real)) {
271873
271960
  throw new Error("The design evidence directory is outside the content directory.");
271874
271961
  }
271875
271962
  const path2 = join172(dir, name);
@@ -277632,57 +277719,57 @@ var init_preview_assets_generated = __esm({
277632
277719
  init_define_HHP_CATALOG();
277633
277720
  init_preview_assets_format();
277634
277721
  PREVIEW_ASSET_MANIFEST = [
277635
- { key: "assets/DashboardHost-BFWXnAss.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 2985, sha256: "cf99e0a75ed7745ca99a5eceef93dc3c5505a2b790ef622709d711346b40843c" },
277636
- { key: "assets/DevDrawer-CBRKIBaX.js", contentType: "application/javascript; charset=utf-8", offset: 2993, length: 16783, sha256: "3c615630091f1b1c41b7360d87422898cbcbe5b1152a7ef8e7eb6b75e08e536f" },
277637
- { key: "assets/IdiomCompare-Cr9PaP3O.js", contentType: "application/javascript; charset=utf-8", offset: 19776, length: 1926, sha256: "9eedaf8aab48332365d623af04f264c8642e77710b52ed6d4a9096ea03ed917b" },
277638
- { key: "assets/LightboxViewer-CiQxUwD_.js", contentType: "application/javascript; charset=utf-8", offset: 21702, length: 15970, sha256: "13ac13ae0c5fa6dff478d4cb1443aaf7b5228f59edae3712c1b50c59dc9b7e75" },
277639
- { key: "assets/OfflineReadingBar-BvuruzO3.js", contentType: "application/javascript; charset=utf-8", offset: 37672, length: 1761, sha256: "01a49758ee894bb4c792f6ce66b38ec54c311767555c868809dcbc9d3adfa383" },
277640
- { key: "assets/PhonePreviewControl-BYo9DxSn.js", contentType: "application/javascript; charset=utf-8", offset: 39433, length: 37851, sha256: "2dcc4d8377c7e304cf4b6b0c84d0a8b71314604f81685fd95a6ee08c5f2dbd27" },
277641
- { key: "assets/SchemeCompare-2cgeSN07.js", contentType: "application/javascript; charset=utf-8", offset: 77284, length: 1858, sha256: "17a25bf664d535f14fe50c529b2b37f9b5e09f7bc5b57c7b7d7403edad00a790" },
277642
- { key: "assets/TopBandLayer-DU4dvX97.js", contentType: "application/javascript; charset=utf-8", offset: 79142, length: 1275, sha256: "42ab0e3af6d060b39895e962ce8059f88b930417c371628885f2f6f8294bc420" },
277643
- { key: "assets/TopBarSearchStates-CTCtEND6.js", contentType: "application/javascript; charset=utf-8", offset: 80417, length: 4069, sha256: "be239d3ddd3adbdb6a2029d5578e37aa8d76971ee4c8464af8d97d5a921ee989" },
277644
- { key: "assets/WixFrogTelemetrySink-CPPs6ZjE.js", contentType: "application/javascript; charset=utf-8", offset: 84486, length: 3586, sha256: "3035c25be9e12ab7a7a985f01ffe0a78dea6b7ef6ee1f0d9edb486bee849f95c" },
277722
+ { key: "assets/DashboardHost-CmxkZdxD.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 2985, sha256: "889534c4a1e70a4c83ffdd04dc4a17e6ca62ad8c5d84b6fa90fdccb006bc135e" },
277723
+ { key: "assets/DevDrawer-B5CbOJ5l.js", contentType: "application/javascript; charset=utf-8", offset: 2993, length: 16783, sha256: "a60a7c31c5b09d0b2b756b7b4988ce5039662f73817356392ddd1ceedd493230" },
277724
+ { key: "assets/IdiomCompare-Dm6eQkgH.js", contentType: "application/javascript; charset=utf-8", offset: 19776, length: 1926, sha256: "3acb56c1bb50f7114ceaa43d92571e5ab1dccd0b9283fba3ad6102149e151163" },
277725
+ { key: "assets/LightboxViewer-BeDlB9da.js", contentType: "application/javascript; charset=utf-8", offset: 21702, length: 15970, sha256: "886a5fba6e7677f721cc9e45397a841d1cb4cdb8d01119f4f55f69ec0c4db53d" },
277726
+ { key: "assets/OfflineReadingBar-CmzHoKy8.js", contentType: "application/javascript; charset=utf-8", offset: 37672, length: 1761, sha256: "e92947ed0ca2103dbd62a2f6daf8f0d65ee0e0cdd736dd498705800cd4de9e01" },
277727
+ { key: "assets/PhonePreviewControl-DSCr1Ceu.js", contentType: "application/javascript; charset=utf-8", offset: 39433, length: 37851, sha256: "55ef0a5d07044ac940d0148de5d9350a756b862863d8e6f72aa839f58eb7e874" },
277728
+ { key: "assets/SchemeCompare-BZOqzbSJ.js", contentType: "application/javascript; charset=utf-8", offset: 77284, length: 1858, sha256: "bd8d7b2cf1cb00b851096a06fb621eae6b61d6ee41f92c39f1894c94aac12a1e" },
277729
+ { key: "assets/TopBandLayer-BPoqM6MV.js", contentType: "application/javascript; charset=utf-8", offset: 79142, length: 1275, sha256: "a2b91d6557a104dd0dcc396407d82e1a2c2e7ec528ca83f559a916bed2387a5a" },
277730
+ { key: "assets/TopBarSearchStates-FnmS57SO.js", contentType: "application/javascript; charset=utf-8", offset: 80417, length: 4069, sha256: "0e538ff04858d79a93c715fa335c3e9645299a65e27033923a6c80966c820dbf" },
277731
+ { key: "assets/WixFrogTelemetrySink-C0SSAHLb.js", contentType: "application/javascript; charset=utf-8", offset: 84486, length: 3586, sha256: "9552aa5ae26583c013b00c3ac7e05c80621864cc07ed067c8a008bac79bb9522" },
277645
277732
  { key: "assets/calendar-ics-BvfIYWjG.js", contentType: "application/javascript; charset=utf-8", offset: 88072, length: 2192, sha256: "1636167041e9829ceccd3544297b86b8475c38bd2f759c4dbc17c813dc6e9254" },
277646
277733
  { key: "assets/catalog-B4UJpy5D.js", contentType: "application/javascript; charset=utf-8", offset: 90264, length: 35626, sha256: "90111ffcf2d13eff399836acafd1f2b387859440a29dcd4a0afd8370915992cb" },
277647
- { key: "assets/catalogFontFaces-DfnSVyg6.js", contentType: "application/javascript; charset=utf-8", offset: 125890, length: 1111, sha256: "36c641e53886bebf5df6754e094a3fbd44810970a50318511772c0a81a8f5884" },
277734
+ { key: "assets/catalogFontFaces-CuMGTd7j.js", contentType: "application/javascript; charset=utf-8", offset: 125890, length: 1111, sha256: "4687d31be8096624653437cd02a910cd5f0c1d7519eec51ed3e5a003cae30ff0" },
277648
277735
  { key: "assets/contacts-vcard-BcohPQ0m.js", contentType: "application/javascript; charset=utf-8", offset: 127001, length: 2567, sha256: "c4ff75e96cd909bbb9182c5dc78794fcebc65139fbddef2537711d774fb33ad0" },
277649
- { key: "assets/files-transfer-_WvgegEe.js", contentType: "application/javascript; charset=utf-8", offset: 129568, length: 9311, sha256: "6aa311a2730b12d49b9f388e998e08f9146c9bb44d91dbc4c02fe73366e213a7" },
277736
+ { key: "assets/files-transfer-BNlfwh5F.js", contentType: "application/javascript; charset=utf-8", offset: 129568, length: 9311, sha256: "52661386c152ea5f2a4bf3702af015d7399c5d1bf003a79b1571ea8a7fede5d7" },
277650
277737
  { key: "assets/frogActionMap-DzUppDSb.js", contentType: "application/javascript; charset=utf-8", offset: 138879, length: 1172, sha256: "6d59e1dd1c68aaeb2d9927693f6e107c354cc82a611979679c137277f29e14c9" },
277651
- { key: "assets/frogApiRules-BJuOtkyC.js", contentType: "application/javascript; charset=utf-8", offset: 140051, length: 2207, sha256: "e1b91653f7fe10e15007c315d3b4519572dde2e5c2fdecb847f79045cafaedee" },
277738
+ { key: "assets/frogApiRules-vYwkTwg7.js", contentType: "application/javascript; charset=utf-8", offset: 140051, length: 2207, sha256: "134b592aa0004033ba599330512b742e9d7a5e5fee05475f433e34e3edd22659" },
277652
277739
  { key: "assets/frogScreenMap-LM0nfzDQ.js", contentType: "application/javascript; charset=utf-8", offset: 142258, length: 1096, sha256: "991b931a02a029c9c4514f0ccbdc8a07f4cf2168ea3e23ffe5e244327fa05141" },
277653
277740
  { key: "assets/frogScreenNavArgs-mIYDwUYX.js", contentType: "application/javascript; charset=utf-8", offset: 143354, length: 780, sha256: "6c9e52135322e0a752b57ef6f360d71400cb77414b4f29d480230ae174201230" },
277654
277741
  { key: "assets/glassPreviewBrowser-OVmIRgHt.js", contentType: "application/javascript; charset=utf-8", offset: 144134, length: 6800, sha256: "3671697a4f66a1f5f68610fab57d590630be70be934f59675ef1bda9a96e6fe3" },
277655
277742
  { key: "assets/godot-pack-cache-Cuhrw41M.js", contentType: "application/javascript; charset=utf-8", offset: 150934, length: 1626, sha256: "70b16367b8938ebd6eb8494a2b472171dd2acdcb452c52f35f140eb8ede9c0b7" },
277656
277743
  { key: "assets/image-preparation-Cj4gldm6.js", contentType: "application/javascript; charset=utf-8", offset: 152560, length: 2704, sha256: "32944ea587c2f3b84389b66b50a850437560238f1c8d33b6275973ee04eee865" },
277657
- { key: "assets/index-LhGl2_B0.js", contentType: "application/javascript; charset=utf-8", offset: 155264, length: 1748690, sha256: "98b4866b9750654886e49efa4f261339390d62c8c25e3d07b7740c60ab739b94" },
277658
- { key: "assets/jsx-runtime-CdvZGgm7.js", contentType: "application/javascript; charset=utf-8", offset: 1903954, length: 7751, sha256: "42a78b508d0f309f6a4a6efbb8669015211b3c26574c5b0929884c4d9d20b806" },
277659
- { key: "assets/network-watches-DqkZgFzj.js", contentType: "application/javascript; charset=utf-8", offset: 1911705, length: 1299, sha256: "ba0b454891f8d16a75d9cf85009003914d0214c70e40b1a5cb08919795f1bdbb" },
277660
- { key: "assets/on-device-ml-D5QGvW8P.js", contentType: "application/javascript; charset=utf-8", offset: 1913004, length: 10531, sha256: "914ea54d973624e7bc82d1847444f26084ac16d69be3051b4b5938b1e35beced" },
277661
- { key: "assets/pdf-uN3Sa_xI.js", contentType: "application/javascript; charset=utf-8", offset: 1923535, length: 488215, sha256: "c8bb518bde682f10e6ec491dce590312b268015da3ec73d5abe284e1e99863c8" },
277662
- { key: "assets/pdf.worker.min-BGnVRhRG.js", contentType: "application/javascript; charset=utf-8", offset: 2411750, length: 90, sha256: "521a0e528916d678d7588b2cddf3dadd3bb959a6d62426382f61c77a82017e35" },
277663
- { key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset: 2411840, length: 1317034, sha256: "a33cfe728c584fdba4fcc1fd54bcdc2f9f2f13889ddbb5b2bd1d0f8cbe49b84e" },
277664
- { key: "assets/pdfDocument-Cnasm9sO.js", contentType: "application/javascript; charset=utf-8", offset: 3728874, length: 3836, sha256: "d3dec2afdde087e59e8f2bb89dcdedf223fee59c3791b72698d1d6278ea3cd7e" },
277665
- { key: "assets/pdfFetch-Cc8i1I1h.js", contentType: "application/javascript; charset=utf-8", offset: 3732710, length: 2266, sha256: "1d21ad008921942217c9eac0c35b1713773b9d89c71e3ab4412781f7bb88f463" },
277666
- { key: "assets/scrollLinkedRuntime-DlYkes99.js", contentType: "application/javascript; charset=utf-8", offset: 3734976, length: 2278, sha256: "31c58640d6d9deb691b2cede38841b0bc779b5d51d0a62a03e41cf58682e5066" },
277667
- { key: "assets/webviewBridgeHost-CSgiK-ts.js", contentType: "application/javascript; charset=utf-8", offset: 3737254, length: 9946, sha256: "2ef215ce5eecfdf29928262dec67563a4bdf56dacabb2162f7fc6d48e06681f8" },
277668
- { key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 3747200, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
277669
- { key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 3751810, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
277670
- { key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 4240394, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
277671
- { key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 4331318, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
277672
- { key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 4422302, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
277673
- { key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 4513282, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
277674
- { key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 4604154, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
277675
- { key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 4695134, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
277676
- { key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 4803770, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
277677
- { key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 4912854, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
277678
- { key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 5021902, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
277679
- { key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 5129602, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
277680
- { key: "himi-sw.js", contentType: "application/javascript; charset=utf-8", offset: 5217710, length: 6818, sha256: "835250c3d8004f27c2b67f9b471984351ba6df07b916d97e33b43c691200a18c" },
277681
- { key: "index.html", contentType: "text/html; charset=utf-8", offset: 5224528, length: 4924, sha256: "9f5356ccfce2de439865b014382ed3fa8c159372d57f46d19014764dda91e98b" },
277682
- { key: "ios-glass-preview.css", contentType: "text/css; charset=utf-8", offset: 5229452, length: 15585, sha256: "98ec60ef8f9568532f0746d1092b5c76f1c52d718365c586c8bade8f62c7c5eb" },
277683
- { key: "kit-tab-bar.css", contentType: "text/css; charset=utf-8", offset: 5245037, length: 1171, sha256: "9e2c3a0faaf05d5471badf167a4d3bdf1c4e6dd65c432eea6d254158bfd99585" },
277684
- { key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 5246208, length: 24303, sha256: "7ee3dbacf4e6da69c1c7085a2423e33e2adaec933cd897fb2ee2391e3277c3ae" },
277685
- { key: "t5-worker-frame.html", contentType: "text/html; charset=utf-8", offset: 5270511, length: 24320, sha256: "d24f399a1fcfa7f696a0d96aadbc983d2624b45712dae9a15545f6914dbb9506" }
277744
+ { key: "assets/index-FRd-7j3m.js", contentType: "application/javascript; charset=utf-8", offset: 155264, length: 1748692, sha256: "0c2c957076b5ad228c7b559f8ac063f9d540861e8f6f91b5a5fd26b640d5f31b" },
277745
+ { key: "assets/jsx-runtime-CdvZGgm7.js", contentType: "application/javascript; charset=utf-8", offset: 1903956, length: 7751, sha256: "42a78b508d0f309f6a4a6efbb8669015211b3c26574c5b0929884c4d9d20b806" },
277746
+ { key: "assets/network-watches-BzUbqhPs.js", contentType: "application/javascript; charset=utf-8", offset: 1911707, length: 1299, sha256: "cf0363d66dfdc46653dc8992ffa25f85fb19b7cde8e907c7c6bf12908cd45430" },
277747
+ { key: "assets/on-device-ml-D5QGvW8P.js", contentType: "application/javascript; charset=utf-8", offset: 1913006, length: 10531, sha256: "914ea54d973624e7bc82d1847444f26084ac16d69be3051b4b5938b1e35beced" },
277748
+ { key: "assets/pdf-C3rJCYHp.js", contentType: "application/javascript; charset=utf-8", offset: 1923537, length: 488215, sha256: "4a6f910bf580b4fbc462abad75f9f9a8274914d66d468efef11bb741e11f834e" },
277749
+ { key: "assets/pdf.worker.min-BGnVRhRG.js", contentType: "application/javascript; charset=utf-8", offset: 2411752, length: 90, sha256: "521a0e528916d678d7588b2cddf3dadd3bb959a6d62426382f61c77a82017e35" },
277750
+ { key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset: 2411842, length: 1317034, sha256: "a33cfe728c584fdba4fcc1fd54bcdc2f9f2f13889ddbb5b2bd1d0f8cbe49b84e" },
277751
+ { key: "assets/pdfDocument-BmbO2Yaw.js", contentType: "application/javascript; charset=utf-8", offset: 3728876, length: 3836, sha256: "a0837b0f9fc9094c5495a07b9fcd2c57c7ac36f67b5ed48e8d2870ce49b4ddf5" },
277752
+ { key: "assets/pdfFetch-Cc8i1I1h.js", contentType: "application/javascript; charset=utf-8", offset: 3732712, length: 2266, sha256: "1d21ad008921942217c9eac0c35b1713773b9d89c71e3ab4412781f7bb88f463" },
277753
+ { key: "assets/scrollLinkedRuntime-BpoAtRvM.js", contentType: "application/javascript; charset=utf-8", offset: 3734978, length: 2278, sha256: "ee71bdc237e882ff884c811b72463b9780bf7e9433af2ef386035b19033637eb" },
277754
+ { key: "assets/webviewBridgeHost-Bo9Y7eGN.js", contentType: "application/javascript; charset=utf-8", offset: 3737256, length: 9946, sha256: "d0133d20239da06edddcb54e975dc8673fee5857fe1e7e454a609364d484a9ee" },
277755
+ { key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 3747202, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
277756
+ { key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 3751812, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
277757
+ { key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 4240396, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
277758
+ { key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 4331320, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
277759
+ { key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 4422304, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
277760
+ { key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 4513284, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
277761
+ { key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 4604156, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
277762
+ { key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 4695136, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
277763
+ { key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 4803772, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
277764
+ { key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 4912856, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
277765
+ { key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 5021904, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
277766
+ { key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 5129604, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
277767
+ { key: "himi-sw.js", contentType: "application/javascript; charset=utf-8", offset: 5217712, length: 6818, sha256: "835250c3d8004f27c2b67f9b471984351ba6df07b916d97e33b43c691200a18c" },
277768
+ { key: "index.html", contentType: "text/html; charset=utf-8", offset: 5224530, length: 4924, sha256: "1258caf3d295ce00f7c9597262d495277b110871709ecf719dd0ecb77f19e354" },
277769
+ { key: "ios-glass-preview.css", contentType: "text/css; charset=utf-8", offset: 5229454, length: 15585, sha256: "98ec60ef8f9568532f0746d1092b5c76f1c52d718365c586c8bade8f62c7c5eb" },
277770
+ { key: "kit-tab-bar.css", contentType: "text/css; charset=utf-8", offset: 5245039, length: 1171, sha256: "9e2c3a0faaf05d5471badf167a4d3bdf1c4e6dd65c432eea6d254158bfd99585" },
277771
+ { key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 5246210, length: 24303, sha256: "7ee3dbacf4e6da69c1c7085a2423e33e2adaec933cd897fb2ee2391e3277c3ae" },
277772
+ { key: "t5-worker-frame.html", contentType: "text/html; charset=utf-8", offset: 5270513, length: 24320, sha256: "d24f399a1fcfa7f696a0d96aadbc983d2624b45712dae9a15545f6914dbb9506" }
277686
277773
  ];
277687
277774
  }
277688
277775
  });
@@ -285996,11 +286083,11 @@ var init_redact = __esm({
285996
286083
  // src/iap-config-edit.ts
285997
286084
  import { existsSync as existsSync151, readFileSync as readFileSync178 } from "node:fs";
285998
286085
  import { basename as basename42, join as join188 } from "node:path";
285999
- import ts37 from "typescript";
286086
+ import ts38 from "typescript";
286000
286087
  function bindPurchasesAppInConfig(source2, options2) {
286001
286088
  const fileName = options2.fileName ?? "config.ts";
286002
- const kind = fileName.endsWith(".ts") ? ts37.ScriptKind.TS : ts37.ScriptKind.JS;
286003
- const file2 = ts37.createSourceFile(fileName, source2, ts37.ScriptTarget.Latest, true, kind);
286089
+ const kind = fileName.endsWith(".ts") ? ts38.ScriptKind.TS : ts38.ScriptKind.JS;
286090
+ const file2 = ts38.createSourceFile(fileName, source2, ts38.ScriptTarget.Latest, true, kind);
286004
286091
  const wanted = `wixIap: { purchasesAppId: ${JSON.stringify(options2.purchasesAppId)} }`;
286005
286092
  const unchanged = (result) => ({ source: source2, changed: false, applied: [], conflicts: [], instructions: [], ...result });
286006
286093
  const app2 = defineAppLiteral(file2);
@@ -286028,7 +286115,7 @@ function siteFinding(app2, siteId, fileName) {
286028
286115
  if (login2.kind !== "member") return { instruction: `${fileName} does not write auth as a WixConsumerAuthProvider({ \u2026 }) call it can read, so ${check}` };
286029
286116
  const found = lookup(login2.literal, "siteId");
286030
286117
  const value2 = found.kind === "written" ? unwrap(found.node.initializer) : void 0;
286031
- if (!value2 || !ts37.isStringLiteralLike(value2)) return { instruction: `auth's siteId is not written as a literal, so ${check}` };
286118
+ if (!value2 || !ts38.isStringLiteralLike(value2)) return { instruction: `auth's siteId is not written as a literal, so ${check}` };
286032
286119
  if (value2.text.toLowerCase() === siteId.toLowerCase()) return {};
286033
286120
  return { conflict: `auth's siteId is "${value2.text}", but the purchases app is registered on site "${siteId}". A build bakes the binding only when they match, so ${fileName} was not edited.` };
286034
286121
  }
@@ -286039,7 +286126,7 @@ function bundleFinding(app2, { bundleId, storeBundleId }, fileName) {
286039
286126
  }
286040
286127
  const found = lookup(app2, "bundleId");
286041
286128
  const value2 = found.kind === "written" ? unwrap(found.node.initializer) : void 0;
286042
- if (!value2 || !ts37.isStringLiteralLike(value2)) {
286129
+ if (!value2 || !ts38.isStringLiteralLike(value2)) {
286043
286130
  return { instruction: `${fileName} does not write bundleId as a literal: make sure this app builds bundle ${JSON.stringify(bundleId)}, the one the purchases app is registered for.` };
286044
286131
  }
286045
286132
  if (value2.text === bundleId || defaultProdBundleId(value2.text) === bundleId) return {};
@@ -286049,23 +286136,23 @@ function bindingFinding2(app2, file2, purchasesAppId, wanted, fileName) {
286049
286136
  const wixIap = lookup(app2, "wixIap");
286050
286137
  if (wixIap.kind === "absent") return { splice: appendProperties(app2, file2, [`${wanted},`]), applied: "wixIap.purchasesAppId" };
286051
286138
  const literal4 = wixIap.kind === "written" ? unwrap(wixIap.node.initializer) : void 0;
286052
- if (!literal4 || !ts37.isObjectLiteralExpression(literal4)) return { instruction: `${fileName} computes wixIap, so it was not edited: it must evaluate to ${wanted}.` };
286139
+ if (!literal4 || !ts38.isObjectLiteralExpression(literal4)) return { instruction: `${fileName} computes wixIap, so it was not edited: it must evaluate to ${wanted}.` };
286053
286140
  const current = lookup(literal4, "purchasesAppId");
286054
286141
  if (current.kind === "absent") return { splice: appendProperties(literal4, file2, [`purchasesAppId: ${JSON.stringify(purchasesAppId)},`]), applied: "wixIap.purchasesAppId" };
286055
286142
  const value2 = current.kind === "written" ? unwrap(current.node.initializer) : void 0;
286056
- if (!value2 || !ts37.isStringLiteralLike(value2)) return { instruction: `${fileName} computes wixIap.purchasesAppId, so it was not edited: it must evaluate to ${JSON.stringify(purchasesAppId)}.` };
286143
+ if (!value2 || !ts38.isStringLiteralLike(value2)) return { instruction: `${fileName} computes wixIap.purchasesAppId, so it was not edited: it must evaluate to ${JSON.stringify(purchasesAppId)}.` };
286057
286144
  if (value2.text === purchasesAppId) return {};
286058
286145
  return { conflict: `${fileName} already binds purchases app "${value2.text}", but this site's purchases app for the bundle is "${purchasesAppId}". Nothing was changed; fix whichever is stale.` };
286059
286146
  }
286060
286147
  function capabilityFinding(app2, fileName) {
286061
286148
  const capabilities = lookup(app2, "capabilities");
286062
286149
  const list5 = capabilities.kind === "written" ? unwrap(capabilities.node.initializer) : void 0;
286063
- if (capabilities.kind !== "absent" && (!list5 || !ts37.isArrayLiteralExpression(list5))) {
286150
+ if (capabilities.kind !== "absent" && (!list5 || !ts38.isArrayLiteralExpression(list5))) {
286064
286151
  return { instruction: `Add "iap" to capabilities: the purchases app is baked only into a build that declares it, and ${fileName} does not list capabilities inline.` };
286065
286152
  }
286066
286153
  if (!list5) return { instruction: `Add capabilities: ["iap"] (with the app's other capabilities) to ${fileName}: the purchases app is baked only into a build that declares it.` };
286067
286154
  const elements2 = list5.elements;
286068
- if (elements2.some((e2) => ts37.isStringLiteralLike(e2) && e2.text === "iap")) return {};
286155
+ if (elements2.some((e2) => ts38.isStringLiteralLike(e2) && e2.text === "iap")) return {};
286069
286156
  const last = elements2[elements2.length - 1];
286070
286157
  return {
286071
286158
  splice: last ? { at: last.end, end: last.end, text: ', "iap"' } : { at: list5.getStart(), end: list5.end, text: '["iap"]' },
@@ -303922,7 +304009,7 @@ var init_header_badges_cli = __esm({
303922
304009
 
303923
304010
  // src/site-analyze/velo-source.ts
303924
304011
  import path from "node:path";
303925
- import ts38 from "typescript";
304012
+ import ts39 from "typescript";
303926
304013
  function applySourceEdits(source2, edits) {
303927
304014
  const chunks = [];
303928
304015
  let cursor = 0;
@@ -303940,13 +304027,13 @@ function redactVeloSource(source2, knownSecrets = []) {
303940
304027
  /\b(?:IST\.[\w.-]+|eyJ[\w-]+\.[\w-]+\.[\w-]+|(?:sk|rk)_(?:live|test)_[\w-]+|gh[pousr]_[\w]+|github_pat_[\w]+|AKIA[A-Z0-9]{16})\b/g,
303941
304028
  REDACTED2
303942
304029
  ).replace(/\b(?:Bearer|Basic)\s+[A-Za-z0-9._~+/=-]+/gi, REDACTED2).replace(/\b([a-z][a-z0-9+.-]*:\/\/)[^\s/'"`]+:[^\s/'"`]+@/gi, "$1[REDACTED]@").replace(/([?&](?:api[-_]?key|token|secret|password|signature)=)[^&#\s'"`]+/gi, "$1[REDACTED]");
303943
- const parsed = ts38.createSourceFile("backend.ts", source2, ts38.ScriptTarget.Latest, true);
304030
+ const parsed = ts39.createSourceFile("backend.ts", source2, ts39.ScriptTarget.Latest, true);
303944
304031
  const comments = /* @__PURE__ */ new Map();
303945
304032
  const visitComments = (node4) => {
303946
304033
  for (const range of [
303947
- ...ts38.getLeadingCommentRanges(source2, node4.pos) ?? [],
303948
- ...ts38.getTrailingCommentRanges(source2, node4.pos) ?? [],
303949
- ...ts38.getTrailingCommentRanges(source2, node4.end) ?? []
304034
+ ...ts39.getLeadingCommentRanges(source2, node4.pos) ?? [],
304035
+ ...ts39.getTrailingCommentRanges(source2, node4.pos) ?? [],
304036
+ ...ts39.getTrailingCommentRanges(source2, node4.end) ?? []
303950
304037
  ]) comments.set(range.pos, range.end);
303951
304038
  for (const child3 of node4.getChildren(parsed)) visitComments(child3);
303952
304039
  };
@@ -303965,22 +304052,22 @@ function redactVeloSource(source2, knownSecrets = []) {
303965
304052
  if (/^["'`][A-Za-z0-9_+/=-]{24,}["'`]$/.test(token)) return JSON.stringify(REDACTED2);
303966
304053
  return token;
303967
304054
  };
303968
- const clean4 = ts38.createSourceFile("backend.ts", source2, ts38.ScriptTarget.Latest, true);
304055
+ const clean4 = ts39.createSourceFile("backend.ts", source2, ts39.ScriptTarget.Latest, true);
303969
304056
  const masks = [];
303970
304057
  const collectMasks = (node4) => {
303971
304058
  const start2 = node4.getStart(clean4);
303972
- if (ts38.isRegularExpressionLiteral(node4)) {
304059
+ if (ts39.isRegularExpressionLiteral(node4)) {
303973
304060
  masks.push({ start: start2, end: node4.end, text: " ".repeat(node4.end - start2) });
303974
- } else if (ts38.isStringLiteral(node4) || ts38.isTemplateLiteralToken(node4)) {
304061
+ } else if (ts39.isStringLiteral(node4) || ts39.isTemplateLiteralToken(node4)) {
303975
304062
  masks.push({ start: start2, end: node4.end, text: source2.slice(start2, node4.end).replace(/;/g, " ") });
303976
304063
  }
303977
- ts38.forEachChild(node4, collectMasks);
304064
+ ts39.forEachChild(node4, collectMasks);
303978
304065
  };
303979
304066
  collectMasks(clean4);
303980
304067
  const assignmentContext = applySourceEdits(source2, masks);
303981
304068
  const edits = [];
303982
304069
  const visitLiterals = (node4) => {
303983
- if (ts38.isStringLiteral(node4) || ts38.isNoSubstitutionTemplateLiteral(node4) || ts38.isTemplateExpression(node4)) {
304070
+ if (ts39.isStringLiteral(node4) || ts39.isNoSubstitutionTemplateLiteral(node4) || ts39.isTemplateExpression(node4)) {
303984
304071
  const start2 = node4.getStart(clean4);
303985
304072
  const text32 = source2.slice(start2, node4.end);
303986
304073
  const redacted = redactLiteral(text32, start2);
@@ -303989,7 +304076,7 @@ function redactVeloSource(source2, knownSecrets = []) {
303989
304076
  return;
303990
304077
  }
303991
304078
  }
303992
- ts38.forEachChild(node4, visitLiterals);
304079
+ ts39.forEachChild(node4, visitLiterals);
303993
304080
  };
303994
304081
  visitLiterals(clean4);
303995
304082
  return applySourceEdits(source2, edits);
@@ -304028,19 +304115,19 @@ function selectVeloSource(files, request2, knownSecrets = []) {
304028
304115
  selected.set(file2.path, { source: excerpt, sourceTruncated: excerpt.length < redacted.length });
304029
304116
  remaining -= excerpt.length;
304030
304117
  const dependencies = [];
304031
- const parsed = ts38.createSourceFile(file2.path, file2.content, ts38.ScriptTarget.Latest, true);
304118
+ const parsed = ts39.createSourceFile(file2.path, file2.content, ts39.ScriptTarget.Latest, true);
304032
304119
  const specifiers = [];
304033
304120
  const collectImports = (node4) => {
304034
304121
  let specifier;
304035
- if (ts38.isImportDeclaration(node4) || ts38.isExportDeclaration(node4)) {
304122
+ if (ts39.isImportDeclaration(node4) || ts39.isExportDeclaration(node4)) {
304036
304123
  specifier = node4.moduleSpecifier;
304037
- } else if (ts38.isImportEqualsDeclaration(node4) && ts38.isExternalModuleReference(node4.moduleReference)) {
304124
+ } else if (ts39.isImportEqualsDeclaration(node4) && ts39.isExternalModuleReference(node4.moduleReference)) {
304038
304125
  specifier = node4.moduleReference.expression;
304039
- } else if (ts38.isCallExpression(node4) && (node4.expression.kind === ts38.SyntaxKind.ImportKeyword || ts38.isIdentifier(node4.expression) && node4.expression.text === "require")) {
304126
+ } else if (ts39.isCallExpression(node4) && (node4.expression.kind === ts39.SyntaxKind.ImportKeyword || ts39.isIdentifier(node4.expression) && node4.expression.text === "require")) {
304040
304127
  specifier = node4.arguments[0];
304041
304128
  }
304042
- if (specifier && ts38.isStringLiteralLike(specifier)) specifiers.push(specifier.text);
304043
- ts38.forEachChild(node4, collectImports);
304129
+ if (specifier && ts39.isStringLiteralLike(specifier)) specifiers.push(specifier.text);
304130
+ ts39.forEachChild(node4, collectImports);
304044
304131
  };
304045
304132
  collectImports(parsed);
304046
304133
  for (const specifier of specifiers) {
@@ -304072,13 +304159,13 @@ var init_velo_source = __esm({
304072
304159
  });
304073
304160
 
304074
304161
  // src/one-app/widget-velo.ts
304075
- import ts39 from "typescript";
304162
+ import ts40 from "typescript";
304076
304163
  function analyzeVeloSource(source2) {
304077
- const file2 = ts39.createSourceFile("page.js", source2, ts39.ScriptTarget.Latest, true, ts39.ScriptKind.JS);
304164
+ const file2 = ts40.createSourceFile("page.js", source2, ts40.ScriptTarget.Latest, true, ts40.ScriptKind.JS);
304078
304165
  const result = { imports: [], mobileCalls: [], onPress: 0, onClick: 0, data: [], backendImports: [], parseErrors: file2.parseDiagnostics?.length ?? 0 };
304079
304166
  const bindings = /* @__PURE__ */ new Map();
304080
304167
  for (const statement of file2.statements) {
304081
- if (!ts39.isImportDeclaration(statement) || !ts39.isStringLiteral(statement.moduleSpecifier)) continue;
304168
+ if (!ts40.isImportDeclaration(statement) || !ts40.isStringLiteral(statement.moduleSpecifier)) continue;
304082
304169
  const module = statement.moduleSpecifier.text.slice(0, MAX_LITERAL);
304083
304170
  const names2 = [];
304084
304171
  const clause = statement.importClause;
@@ -304087,11 +304174,11 @@ function analyzeVeloSource(source2) {
304087
304174
  bindings.set(clause.name.text, { module, member: "*" });
304088
304175
  }
304089
304176
  const named5 = clause?.namedBindings;
304090
- if (named5 && ts39.isNamespaceImport(named5)) {
304177
+ if (named5 && ts40.isNamespaceImport(named5)) {
304091
304178
  names2.push("*");
304092
304179
  bindings.set(named5.name.text, { module, member: "*" });
304093
304180
  }
304094
- if (named5 && ts39.isNamedImports(named5)) for (const el2 of named5.elements) {
304181
+ if (named5 && ts40.isNamedImports(named5)) for (const el2 of named5.elements) {
304095
304182
  const imported = (el2.propertyName ?? el2.name).text;
304096
304183
  names2.push(imported);
304097
304184
  bindings.set(el2.name.text, { module, member: imported });
@@ -304100,19 +304187,19 @@ function analyzeVeloSource(source2) {
304100
304187
  if (/^backend\//.test(module) && result.backendImports.length < MAX_ITEMS2) result.backendImports.push({ module, names: names2.filter((n2) => n2 !== "*" && n2 !== "default") });
304101
304188
  }
304102
304189
  const resolveCallee = (callee) => {
304103
- if (ts39.isIdentifier(callee)) {
304190
+ if (ts40.isIdentifier(callee)) {
304104
304191
  const b3 = bindings.get(callee.text);
304105
304192
  return b3 && b3.member !== "*" ? b3 : void 0;
304106
304193
  }
304107
- if (ts39.isPropertyAccessExpression(callee)) {
304194
+ if (ts40.isPropertyAccessExpression(callee)) {
304108
304195
  const member = callee.name.text;
304109
304196
  const target = callee.expression;
304110
- if (ts39.isIdentifier(target)) {
304197
+ if (ts40.isIdentifier(target)) {
304111
304198
  const b3 = bindings.get(target.text);
304112
304199
  if (!b3) return void 0;
304113
304200
  return { module: b3.module, member: b3.member === "*" ? member : `${b3.member}.${member}` };
304114
304201
  }
304115
- if (ts39.isPropertyAccessExpression(target) && ts39.isIdentifier(target.expression)) {
304202
+ if (ts40.isPropertyAccessExpression(target) && ts40.isIdentifier(target.expression)) {
304116
304203
  const b3 = bindings.get(target.expression.text);
304117
304204
  if (!b3) return void 0;
304118
304205
  return { module: b3.module, member: `${b3.member === "*" ? "" : `${b3.member}.`}${target.name.text}.${member}` };
@@ -304121,9 +304208,9 @@ function analyzeVeloSource(source2) {
304121
304208
  return void 0;
304122
304209
  };
304123
304210
  const visit = (node4) => {
304124
- if (ts39.isCallExpression(node4)) {
304211
+ if (ts40.isCallExpression(node4)) {
304125
304212
  const callee = node4.expression;
304126
- if (ts39.isPropertyAccessExpression(callee)) {
304213
+ if (ts40.isPropertyAccessExpression(callee)) {
304127
304214
  if (callee.name.text === "onPress") result.onPress++;
304128
304215
  else if (callee.name.text === "onClick") result.onClick++;
304129
304216
  }
@@ -304139,23 +304226,23 @@ function analyzeVeloSource(source2) {
304139
304226
  }
304140
304227
  }
304141
304228
  }
304142
- ts39.forEachChild(node4, visit);
304229
+ ts40.forEachChild(node4, visit);
304143
304230
  };
304144
304231
  visit(file2);
304145
304232
  return result;
304146
304233
  }
304147
304234
  function backendExportNames(stub) {
304148
- const file2 = ts39.createSourceFile("backend.js", stub, ts39.ScriptTarget.Latest, true, ts39.ScriptKind.JS);
304235
+ const file2 = ts40.createSourceFile("backend.js", stub, ts40.ScriptTarget.Latest, true, ts40.ScriptKind.JS);
304149
304236
  const names2 = /* @__PURE__ */ new Set();
304150
304237
  const visit = (node4) => {
304151
- if (ts39.isBinaryExpression(node4) && node4.operatorToken.kind === ts39.SyntaxKind.EqualsToken && ts39.isPropertyAccessExpression(node4.left) && ts39.isIdentifier(node4.left.expression) && node4.left.expression.text === "exports") names2.add(node4.left.name.text);
304152
- if ((ts39.isFunctionDeclaration(node4) || ts39.isVariableStatement(node4)) && ts39.canHaveModifiers(node4) && ts39.getModifiers(node4)?.some((m2) => m2.kind === ts39.SyntaxKind.ExportKeyword)) {
304153
- if (ts39.isFunctionDeclaration(node4) && node4.name) names2.add(node4.name.text);
304154
- if (ts39.isVariableStatement(node4)) {
304155
- for (const d2 of node4.declarationList.declarations) if (ts39.isIdentifier(d2.name)) names2.add(d2.name.text);
304238
+ if (ts40.isBinaryExpression(node4) && node4.operatorToken.kind === ts40.SyntaxKind.EqualsToken && ts40.isPropertyAccessExpression(node4.left) && ts40.isIdentifier(node4.left.expression) && node4.left.expression.text === "exports") names2.add(node4.left.name.text);
304239
+ if ((ts40.isFunctionDeclaration(node4) || ts40.isVariableStatement(node4)) && ts40.canHaveModifiers(node4) && ts40.getModifiers(node4)?.some((m2) => m2.kind === ts40.SyntaxKind.ExportKeyword)) {
304240
+ if (ts40.isFunctionDeclaration(node4) && node4.name) names2.add(node4.name.text);
304241
+ if (ts40.isVariableStatement(node4)) {
304242
+ for (const d2 of node4.declarationList.declarations) if (ts40.isIdentifier(d2.name)) names2.add(d2.name.text);
304156
304243
  }
304157
304244
  }
304158
- ts39.forEachChild(node4, visit);
304245
+ ts40.forEachChild(node4, visit);
304159
304246
  };
304160
304247
  visit(file2);
304161
304248
  return [...names2].slice(0, MAX_ITEMS2);
@@ -304171,7 +304258,7 @@ var init_widget_velo = __esm({
304171
304258
  MAX_ITEMS2 = 200;
304172
304259
  literal3 = (node4) => {
304173
304260
  if (!node4) return void 0;
304174
- if (ts39.isStringLiteral(node4) || ts39.isNoSubstitutionTemplateLiteral(node4)) return node4.text.slice(0, MAX_LITERAL);
304261
+ if (ts40.isStringLiteral(node4) || ts40.isNoSubstitutionTemplateLiteral(node4)) return node4.text.slice(0, MAX_LITERAL);
304175
304262
  return void 0;
304176
304263
  };
304177
304264
  }
@@ -304875,7 +304962,7 @@ var init_widget_inspect = __esm({
304875
304962
  // src/one-app/widget-tests.ts
304876
304963
  import { createHash as createHash106 } from "node:crypto";
304877
304964
  import { mkdirSync as mkdirSync72, readFileSync as readFileSync202, writeFileSync as writeFileSync83 } from "node:fs";
304878
- import { isAbsolute as isAbsolute22, join as join214, relative as relative38, resolve as resolve132 } from "node:path";
304965
+ import { isAbsolute as isAbsolute23, join as join214, relative as relative38, resolve as resolve132 } from "node:path";
304879
304966
  function runWidgetTests(options2) {
304880
304967
  const content = resolve132(options2.contentDir);
304881
304968
  const stamp = (options2.now?.() ?? (/* @__PURE__ */ new Date()).toISOString()).replace(/[^0-9A-Za-z]/g, "");
@@ -304885,7 +304972,7 @@ function runWidgetTests(options2) {
304885
304972
  const files = options2.files.map((f2) => {
304886
304973
  const abs = resolve132(content, f2);
304887
304974
  const rel2 = relative38(content, abs);
304888
- return rel2.startsWith("..") || isAbsolute22(rel2) ? abs : rel2;
304975
+ return rel2.startsWith("..") || isAbsolute23(rel2) ? abs : rel2;
304889
304976
  });
304890
304977
  const child3 = invokeNodeTests({ contentDir: content, evidenceDir: options2.evidenceDir, files, imports: options2.imports, reportPath: reportAbs, timeoutMs: options2.timeoutMs });
304891
304978
  const args = child3.args;
@@ -308008,7 +308095,7 @@ var init_analyze2 = __esm({
308008
308095
  // src/site-analyze/site-pages-apply.ts
308009
308096
  import { existsSync as existsSync173, readFileSync as readFileSync206 } from "node:fs";
308010
308097
  import { join as join218 } from "node:path";
308011
- import ts40 from "typescript";
308098
+ import ts41 from "typescript";
308012
308099
  function packageScreenIds(dir) {
308013
308100
  const dev = join218(dir, "dev", "index.ts");
308014
308101
  const config = join218(dir, "config.ts");
@@ -308021,20 +308108,20 @@ function packageScreenIds(dir) {
308021
308108
  }
308022
308109
  }
308023
308110
  function spliceWebsiteDrawer(source2, site, fileName = "config.ts") {
308024
- const file2 = ts40.createSourceFile(fileName, source2, ts40.ScriptTarget.Latest, true, ts40.ScriptKind.TS);
308111
+ const file2 = ts41.createSourceFile(fileName, source2, ts41.ScriptTarget.Latest, true, ts41.ScriptKind.TS);
308025
308112
  const objectOf2 = (literal4, name) => {
308026
308113
  if (!literal4) return void 0;
308027
308114
  const found = lookup(literal4, name);
308028
308115
  const value2 = found.kind === "written" ? unwrap(found.node.initializer) : void 0;
308029
- return value2 && ts40.isObjectLiteralExpression(value2) ? value2 : void 0;
308116
+ return value2 && ts41.isObjectLiteralExpression(value2) ? value2 : void 0;
308030
308117
  };
308031
308118
  const navigation = objectOf2(defineAppLiteral(file2), "navigation");
308032
308119
  if (!navigation) return { refused: "config.ts has no `navigation: { \u2026 }` object literal in its defineApp call" };
308033
308120
  const drawer = objectOf2(navigation, "drawer");
308034
308121
  const itemsProp = drawer ? lookup(drawer, "items") : void 0;
308035
308122
  const items = itemsProp?.kind === "written" ? unwrap(itemsProp.node.initializer) : void 0;
308036
- if (!items || !ts40.isArrayLiteralExpression(items)) return { refused: "`navigation.drawer.items` is not an array literal this step can rewrite" };
308037
- const commentAt = (pos) => (ts40.getLeadingCommentRanges(source2, pos) ?? []).length > 0;
308123
+ if (!items || !ts41.isArrayLiteralExpression(items)) return { refused: "`navigation.drawer.items` is not an array literal this step can rewrite" };
308124
+ const commentAt = (pos) => (ts41.getLeadingCommentRanges(source2, pos) ?? []).length > 0;
308038
308125
  if (items.elements.some((element) => commentAt(element.pos)) || commentAt(items.elements.end)) {
308039
308126
  return { refused: "`navigation.drawer.items` has comments between its rows, which rewriting the drawer would drop" };
308040
308127
  }
@@ -308123,7 +308210,7 @@ var init_customer_build = __esm({
308123
308210
 
308124
308211
  // src/site-analyze/apply.ts
308125
308212
  import { existsSync as existsSync174, readFileSync as readFileSync207, writeFileSync as writeFileSync85, copyFileSync as copyFileSync5, mkdirSync as mkdirSync74, realpathSync as realpathSync26, statSync as statSync57 } from "node:fs";
308126
- import { dirname as dirname94, isAbsolute as isAbsolute23, join as join219, resolve as resolve136, sep as sep36 } from "node:path";
308213
+ import { dirname as dirname94, isAbsolute as isAbsolute24, join as join219, resolve as resolve136, sep as sep36 } from "node:path";
308127
308214
  import { spawnSync as spawnSync15 } from "node:child_process";
308128
308215
  function inRepoBakeRefusal(repoRoot2, shell) {
308129
308216
  if (isBrandable(repoRoot2, shell)) return null;
@@ -308464,7 +308551,7 @@ function buildMergedContract(options2) {
308464
308551
  const branding = merged.branding ?? {};
308465
308552
  const staged = [];
308466
308553
  const contained = (root, rel2) => {
308467
- if (isAbsolute23(rel2)) return void 0;
308554
+ if (isAbsolute24(rel2)) return void 0;
308468
308555
  const full = resolve136(root, rel2);
308469
308556
  return full.startsWith(resolve136(root) + sep36) ? full : void 0;
308470
308557
  };
@@ -311042,7 +311129,7 @@ __export(check_report_exports, {
311042
311129
  import { createHash as createHash108, randomUUID as randomUUID20 } from "node:crypto";
311043
311130
  import { request as httpRequest2 } from "node:http";
311044
311131
  import { createConnection } from "node:net";
311045
- import { isAbsolute as isAbsolute24, relative as relative39, resolve as resolve138 } from "node:path";
311132
+ import { isAbsolute as isAbsolute25, relative as relative39, resolve as resolve138 } from "node:path";
311046
311133
  function credentialValue(value2) {
311047
311134
  const v2 = value2.trim();
311048
311135
  if (!v2 || /^(?:[01]|true|false|yes|no|on|off|null|none|undefined)$/i.test(v2)) return null;
@@ -311134,9 +311221,9 @@ function boundedText(value2, secrets) {
311134
311221
  return clean4.length <= MAX_TEXT4 ? clean4 : `${clean4.slice(0, MAX_TEXT4 - 1)}\u2026`;
311135
311222
  }
311136
311223
  function contentRelative(file2, contentDir2) {
311137
- const rel2 = isAbsolute24(file2) ? relative39(resolve138(contentDir2), file2) : file2;
311224
+ const rel2 = isAbsolute25(file2) ? relative39(resolve138(contentDir2), file2) : file2;
311138
311225
  const normal = rel2.split(/[\\/]+/).filter((part7) => part7 && part7 !== ".");
311139
- if (!normal.length || isAbsolute24(rel2) || normal.includes("..")) return void 0;
311226
+ if (!normal.length || isAbsolute25(rel2) || normal.includes("..")) return void 0;
311140
311227
  const joined = normal.join("/");
311141
311228
  return joined.length <= 256 ? joined : void 0;
311142
311229
  }
@@ -313118,7 +313205,7 @@ __export(ext_impl_exports, {
313118
313205
  });
313119
313206
  import { existsSync as existsSync181, mkdirSync as mkdirSync78, readFileSync as readFileSync212, writeFileSync as writeFileSync90 } from "node:fs";
313120
313207
  import { join as join228 } from "node:path";
313121
- import ts41 from "typescript";
313208
+ import ts42 from "typescript";
313122
313209
  async function runExt(ctx) {
313123
313210
  const { pos, flags, io: io2, print } = ctx;
313124
313211
  const fail19 = (code3, error, extra = {}, exit = 1) => {
@@ -313232,7 +313319,7 @@ function loadModelFor(extDir) {
313232
313319
  return { ok: true, model: iface.model };
313233
313320
  }
313234
313321
  function addExtensionToConfigSource(source2, name) {
313235
- const file2 = ts41.createSourceFile("config.ts", source2, ts41.ScriptTarget.ES2022, true, ts41.ScriptKind.TS);
313322
+ const file2 = ts42.createSourceFile("config.ts", source2, ts42.ScriptTarget.ES2022, true, ts42.ScriptKind.TS);
313236
313323
  const app2 = defineAppLiteral(file2);
313237
313324
  if (!app2) throw new Error("config.ts has no defineApp({ \u2026 }) literal");
313238
313325
  const existing = declaredExtensionsNode(app2);
@@ -313250,7 +313337,7 @@ function addExtensionToConfigSource(source2, name) {
313250
313337
  }
313251
313338
  function declaredExtensionsNode(app2) {
313252
313339
  for (const p2 of app2.properties) {
313253
- if (ts41.isPropertyAssignment(p2) && p2.name && (ts41.isIdentifier(p2.name) || ts41.isStringLiteral(p2.name)) && p2.name.text === "extensions" && ts41.isArrayLiteralExpression(p2.initializer)) return p2.initializer;
313340
+ if (ts42.isPropertyAssignment(p2) && p2.name && (ts42.isIdentifier(p2.name) || ts42.isStringLiteral(p2.name)) && p2.name.text === "extensions" && ts42.isArrayLiteralExpression(p2.initializer)) return p2.initializer;
313254
313341
  }
313255
313342
  return void 0;
313256
313343
  }