@wix/himalaya-cli 0.1754.0 → 0.1755.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
@@ -4272,10 +4272,10 @@ function parseZipEntries(buf) {
4272
4272
  }
4273
4273
  }
4274
4274
  if (eocd < 0) throw new Error("not a zip archive (no end-of-central-directory record)");
4275
- const count2 = u16(eocd + 10);
4275
+ const count3 = u16(eocd + 10);
4276
4276
  let p2 = u32(eocd + 16);
4277
4277
  const out2 = [];
4278
- for (let i2 = 0; i2 < count2; i2++) {
4278
+ for (let i2 = 0; i2 < count3; i2++) {
4279
4279
  if (p2 + 46 > buf.length || u32(p2) !== ZIP_CENTRAL_SIG) throw new Error("corrupt zip central directory");
4280
4280
  const method = u16(p2 + 10);
4281
4281
  const crc = u32(p2 + 16);
@@ -11008,8 +11008,8 @@ function componentShape(value2) {
11008
11008
  if (!isRecord(value2) || typeof value2.id !== "string" || !isRecord(value2.body)) return false;
11009
11009
  return typeof value2.body.package === "string" && typeof value2.body.type === "string" && isRecord(value2.body.props);
11010
11010
  }
11011
- function rotateRight(value2, count2) {
11012
- return value2 >>> count2 | value2 << 32 - count2;
11011
+ function rotateRight(value2, count3) {
11012
+ return value2 >>> count3 | value2 << 32 - count3;
11013
11013
  }
11014
11014
  function workerSubtreeSha256(raw) {
11015
11015
  const input = new TextEncoder().encode(raw);
@@ -21359,18 +21359,18 @@ function repairLoneSurrogateEscapes(json9) {
21359
21359
  return out2;
21360
21360
  }
21361
21361
  function measure(nodes2, limits) {
21362
- let count2 = 0;
21362
+ let count3 = 0;
21363
21363
  const work = [];
21364
21364
  for (let i2 = nodes2.length - 1; i2 >= 0; i2--) work.push([nodes2[i2], 1]);
21365
21365
  while (work.length) {
21366
21366
  const [n2, depth] = work.pop();
21367
21367
  if (!isObj(n2)) continue;
21368
21368
  if (depth > limits.maxDepth) return "too_deep";
21369
- count2++;
21369
+ count3++;
21370
21370
  const k3 = kids(n2);
21371
21371
  for (let i2 = k3.length - 1; i2 >= 0; i2--) work.push([k3[i2], depth + 1]);
21372
21372
  }
21373
- return count2 > limits.maxNodes ? "too_many_nodes" : null;
21373
+ return count3 > limits.maxNodes ? "too_many_nodes" : null;
21374
21374
  }
21375
21375
  function layoutRichContent(json9, limits = RICH_CONTENT_LIMITS2) {
21376
21376
  if (json9 === "") return { blocks: [] };
@@ -40674,8 +40674,8 @@ var init_store2 = __esm({
40674
40674
  `);
40675
40675
  }
40676
40676
  seedNotesIfEmpty() {
40677
- const count2 = this.db.prepare("SELECT COUNT(*) as c FROM notes").get();
40678
- if (count2.c > 0) return;
40677
+ const count3 = this.db.prepare("SELECT COUNT(*) as c FROM notes").get();
40678
+ if (count3.c > 0) return;
40679
40679
  const seedNotes = [
40680
40680
  {
40681
40681
  id: "n_001",
@@ -40715,8 +40715,8 @@ var init_store2 = __esm({
40715
40715
  }
40716
40716
  }
40717
40717
  seedProductsIfEmpty() {
40718
- const count2 = this.db.prepare("SELECT COUNT(*) as c FROM products").get();
40719
- if (count2.c > 0) return;
40718
+ const count3 = this.db.prepare("SELECT COUNT(*) as c FROM products").get();
40719
+ if (count3.c > 0) return;
40720
40720
  const now = Math.floor(Date.now() / 1e3);
40721
40721
  const seed2 = [
40722
40722
  { id: "p_001", sku: "MNT-CAP-01", title: "Summit cap", description: "Wool-blend beanie. Charcoal. One size, packs flat.", price_cents: 2900, currency: "USD", category: "apparel", inventory: 28, status: "active" },
@@ -46187,13 +46187,13 @@ function imagePreviewNodeId(node3) {
46187
46187
  const own6 = node3?.[PREVIEW_NODE_ID];
46188
46188
  return typeof own6 === "string" ? own6 : node3?.id;
46189
46189
  }
46190
- function imagePreviewPageKeys(items, templateId, count2 = items.length) {
46190
+ function imagePreviewPageKeys(items, templateId, count3 = items.length) {
46191
46191
  const keys2 = [], seen = /* @__PURE__ */ new Set();
46192
- for (let i2 = 0; i2 < count2; i2++) {
46192
+ for (let i2 = 0; i2 < count3; i2++) {
46193
46193
  const id = items[i2]?.id;
46194
46194
  const key4 = typeof id === "string" || typeof id === "number" ? String(id) : "";
46195
46195
  if (!key4 || seen.has(key4)) {
46196
- return imagePreviewRowKeys(items.map((item2, i3) => ({ ...item2 && typeof item2 === "object" ? item2 : { value: item2 }, __index: i3 })), templateId).slice(0, count2);
46196
+ return imagePreviewRowKeys(items.map((item2, i3) => ({ ...item2 && typeof item2 === "object" ? item2 : { value: item2 }, __index: i3 })), templateId).slice(0, count3);
46197
46197
  }
46198
46198
  seen.add(key4);
46199
46199
  keys2.push(key4);
@@ -46829,9 +46829,9 @@ function installImageNetworkReturns(doc = typeof document === "undefined" ? void
46829
46829
  failed3.delete(img);
46830
46830
  const source2 = img.getAttribute("src") ?? "";
46831
46831
  const tried = tries.get(img);
46832
- const count2 = tried?.source === source2 ? tried.count : 0;
46833
- if (count2 >= LIMIT) continue;
46834
- tries.set(img, { source: source2, count: count2 + 1 });
46832
+ const count3 = tried?.source === source2 ? tried.count : 0;
46833
+ if (count3 >= LIMIT) continue;
46834
+ tries.set(img, { source: source2, count: count3 + 1 });
46835
46835
  const srcset = img.getAttribute("srcset");
46836
46836
  if (srcset !== null) img.setAttribute("srcset", srcset);
46837
46837
  img.setAttribute("src", source2);
@@ -46847,9 +46847,9 @@ function useReloadOnNetworkReturn(failed3, reload) {
46847
46847
  if (!failed3 || !view) return;
46848
46848
  installImageNetworkReturns(view.document);
46849
46849
  const returned = () => {
46850
- const count2 = tries.current?.source === failed3 ? tries.current.count : 0;
46851
- if (count2 >= LIMIT) return;
46852
- tries.current = { source: failed3, count: count2 + 1 };
46850
+ const count3 = tries.current?.source === failed3 ? tries.current.count : 0;
46851
+ if (count3 >= LIMIT) return;
46852
+ tries.current = { source: failed3, count: count3 + 1 };
46853
46853
  latest.current();
46854
46854
  };
46855
46855
  view.addEventListener(RETURNED, returned);
@@ -47478,23 +47478,23 @@ var init_modifiers = __esm({
47478
47478
 
47479
47479
  // ../../core/web-renderer/src/liveWindow.ts
47480
47480
  import React6 from "react";
47481
- function liveWindowCurrent(current, count2) {
47482
- if (count2 <= 0 || !Number.isFinite(current)) return 0;
47483
- return Math.min(Math.max(Math.trunc(current), 0), count2 - 1);
47481
+ function liveWindowCurrent(current, count3) {
47482
+ if (count3 <= 0 || !Number.isFinite(current)) return 0;
47483
+ return Math.min(Math.max(Math.trunc(current), 0), count3 - 1);
47484
47484
  }
47485
- function liveWindowRange(current, count2, n2) {
47485
+ function liveWindowRange(current, count3, n2) {
47486
47486
  if (typeof n2 !== "number" || !Number.isFinite(n2) && n2 !== Infinity) return null;
47487
47487
  const w2 = Math.floor(n2);
47488
- if (!(w2 > 0) || count2 <= 0) return null;
47489
- const c2 = liveWindowCurrent(current, count2);
47490
- return { lo: Math.max(0, c2 - w2), hi: Math.min(count2 - 1, c2 + w2) };
47488
+ if (!(w2 > 0) || count3 <= 0) return null;
47489
+ const c2 = liveWindowCurrent(current, count3);
47490
+ return { lo: Math.max(0, c2 - w2), hi: Math.min(count3 - 1, c2 + w2) };
47491
47491
  }
47492
- function liveWindowMounted(i2, current, count2, n2) {
47493
- const r3 = liveWindowRange(current, count2, n2);
47492
+ function liveWindowMounted(i2, current, count3, n2) {
47493
+ const r3 = liveWindowRange(current, count3, n2);
47494
47494
  return r3 == null || i2 >= r3.lo && i2 <= r3.hi;
47495
47495
  }
47496
- function liveWindowActive(i2, current, count2, n2) {
47497
- return liveWindowRange(current, count2, n2) == null || i2 === liveWindowCurrent(current, count2);
47496
+ function liveWindowActive(i2, current, count3, n2) {
47497
+ return liveWindowRange(current, count3, n2) == null || i2 === liveWindowCurrent(current, count3);
47498
47498
  }
47499
47499
  function liveWindowFirstImage(page) {
47500
47500
  const stack = page && typeof page === "object" ? [page] : [];
@@ -47805,12 +47805,12 @@ var init_bindings2 = __esm({
47805
47805
  React7.useEffect(() => {
47806
47806
  if (revealAt >= 0) setSize((n2) => Math.max(n2, revealAt + 1));
47807
47807
  }, [revealAt]);
47808
- const count2 = on4 ? Math.min(Math.max(Math.ceil(size / per) * per, revealAt + 1), items.length) : items.length;
47808
+ const count3 = on4 ? Math.min(Math.max(Math.ceil(size / per) * per, revealAt + 1), items.length) : items.length;
47809
47809
  useImagePreviewCollection(ctx, (index) => {
47810
- if (on4 && index >= count2) setSize(Math.min(items.length, index + BOUND_LIST_WINDOW_STEP));
47810
+ if (on4 && index >= count3) setSize(Math.min(items.length, index + BOUND_LIST_WINDOW_STEP));
47811
47811
  });
47812
- const previewKeys = React7.useMemo(() => ctx.imagePreview ? imagePreviewPageKeys(items, template.id ?? "", count2) : void 0, [ctx.imagePreview, items, template.id, count2]);
47813
- const rows = items.slice(0, count2).map((item2, i2) => {
47812
+ const previewKeys = React7.useMemo(() => ctx.imagePreview ? imagePreviewPageKeys(items, template.id ?? "", count3) : void 0, [ctx.imagePreview, items, template.id, count3]);
47813
+ const rows = items.slice(0, count3).map((item2, i2) => {
47814
47814
  const id = item2?.id;
47815
47815
  const key4 = String(id ?? i2);
47816
47816
  if (tagRows && typeof id === "string" && id) {
@@ -47820,7 +47820,7 @@ var init_bindings2 = __esm({
47820
47820
  });
47821
47821
  return /* @__PURE__ */ jsxs2(Fragment, { children: [
47822
47822
  wrapRows ? wrapRows(rows) : rows,
47823
- count2 < items.length ? /* @__PURE__ */ jsx4(WindowGrowth, { style: markerStyle, onNear: () => setSize((n2) => Math.max(n2, count2) + BOUND_LIST_WINDOW_STEP) }, count2) : footer && pageCursor !== void 0 ? /* @__PURE__ */ jsx4(PageCycleContext.Provider, { value: pages2, children: footer }) : footer ?? null
47823
+ count3 < items.length ? /* @__PURE__ */ jsx4(WindowGrowth, { style: markerStyle, onNear: () => setSize((n2) => Math.max(n2, count3) + BOUND_LIST_WINDOW_STEP) }, count3) : footer && pageCursor !== void 0 ? /* @__PURE__ */ jsx4(PageCycleContext.Provider, { value: pages2, children: footer }) : footer ?? null
47824
47824
  ] });
47825
47825
  };
47826
47826
  ROW_SHELL_STYLE = { display: "contents" };
@@ -51628,10 +51628,10 @@ function sheetIsNonModal(modal) {
51628
51628
  function sheetPlacement(raw) {
51629
51629
  return raw === "inline" ? "inline" : "overlay";
51630
51630
  }
51631
- function drawerDragOutcome(index, count2, dy, dismissible) {
51632
- const at2 = Math.max(0, Math.min(index, Math.max(count2 - 1, 0)));
51633
- if (count2 <= 1) return dy >= DRAWER_SWIPE_DISMISS && dismissible ? -1 : at2;
51634
- if (dy <= -DRAWER_DETENT_DRAG) return Math.min(at2 + 1, count2 - 1);
51631
+ function drawerDragOutcome(index, count3, dy, dismissible) {
51632
+ const at2 = Math.max(0, Math.min(index, Math.max(count3 - 1, 0)));
51633
+ if (count3 <= 1) return dy >= DRAWER_SWIPE_DISMISS && dismissible ? -1 : at2;
51634
+ if (dy <= -DRAWER_DETENT_DRAG) return Math.min(at2 + 1, count3 - 1);
51635
51635
  if (dy >= DRAWER_DETENT_DRAG && at2 > 0) return at2 - 1;
51636
51636
  if (dy >= DRAWER_SWIPE_DISMISS && at2 === 0 && dismissible) return -1;
51637
51637
  return at2;
@@ -51672,12 +51672,12 @@ function sheetDetents(detents) {
51672
51672
  const kept = detents.filter((d2) => typeof d2 === "number" && d2 > 0 && d2 <= 1);
51673
51673
  return [...new Set(kept)].sort((a3, b3) => a3 - b3);
51674
51674
  }
51675
- function nextDetentIndex(index, count2) {
51676
- return count2 <= 1 ? 0 : (index + 1) % count2;
51675
+ function nextDetentIndex(index, count3) {
51676
+ return count3 <= 1 ? 0 : (index + 1) % count3;
51677
51677
  }
51678
- function detentAfterDrag(index, count2, dy) {
51679
- if (count2 <= 1 || Math.abs(dy) < DETENT_DRAG_THRESHOLD) return Math.max(0, Math.min(index, count2 - 1));
51680
- return Math.max(0, Math.min(count2 - 1, index + (dy < 0 ? 1 : -1)));
51678
+ function detentAfterDrag(index, count3, dy) {
51679
+ if (count3 <= 1 || Math.abs(dy) < DETENT_DRAG_THRESHOLD) return Math.max(0, Math.min(index, count3 - 1));
51680
+ return Math.max(0, Math.min(count3 - 1, index + (dy < 0 ? 1 : -1)));
51681
51681
  }
51682
51682
  function sheetEdge(edge) {
51683
51683
  return edge === "leading" || edge === "trailing" ? edge : "bottom";
@@ -52849,10 +52849,10 @@ function pdfPageCount(bytes2) {
52849
52849
  const n2 = c2 ? Number(c2[1]) : NaN;
52850
52850
  if (Number.isFinite(n2) && n2 > 0 && (scanned === null || n2 > scanned)) scanned = n2;
52851
52851
  }
52852
- const count2 = rooted ?? scanned;
52853
- if (count2 === null) return null;
52852
+ const count3 = rooted ?? scanned;
52853
+ if (count3 === null) return null;
52854
52854
  if (rooted !== null && scanned !== null && rooted !== scanned) return null;
52855
- return count2 <= PDF_MAX_PLAUSIBLE_PAGES ? count2 : null;
52855
+ return count3 <= PDF_MAX_PLAUSIBLE_PAGES ? count3 : null;
52856
52856
  }
52857
52857
  function pdfObjectSyntax(text30) {
52858
52858
  const out2 = text30.split("");
@@ -58960,10 +58960,10 @@ var init_pdf = __esm({
58960
58960
  // eslint-disable-next-line max-statements -- ok
58961
58961
  sumPrecise: function sumPrecise(items) {
58962
58962
  var numbers = [];
58963
- var count2 = 0;
58963
+ var count3 = 0;
58964
58964
  var state = MINUS_ZERO;
58965
58965
  iterate(items, function(n3) {
58966
- if (++count2 > MAX_SAFE_INTEGER) throw new $RangeError("Maximum allowed index exceeded");
58966
+ if (++count3 > MAX_SAFE_INTEGER) throw new $RangeError("Maximum allowed index exceeded");
58967
58967
  if (typeof n3 != "number") throw new $TypeError("Value is not a number");
58968
58968
  if (state !== NOT_A_NUMBER) {
58969
58969
  if (n3 !== n3) state = NOT_A_NUMBER;
@@ -71131,9 +71131,9 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
71131
71131
  if (!this.contentVisible) {
71132
71132
  return;
71133
71133
  }
71134
- const count2 = img.count;
71134
+ const count3 = img.count;
71135
71135
  img = this.getObject(opIdx, img.data, img);
71136
- img.count = count2;
71136
+ img.count = count3;
71137
71137
  const started = this.#beginKnockoutElement(this.current.fillAlpha);
71138
71138
  const ctx = this.ctx;
71139
71139
  const mask = this._createMaskCanvas(opIdx, img);
@@ -134198,8 +134198,8 @@ function PdfDocument({ src, nativeSrc, title, height, startPage, zoomPercent, st
134198
134198
  }
134199
134199
  loading = task;
134200
134200
  const document2 = await task.promise;
134201
- const count2 = await paintPdfDocument(document2, container, container.clientWidth || 600, startPageRef.current, zoomPercent, () => live4, onPageCount);
134202
- if (live4) setPages(count2);
134201
+ const count3 = await paintPdfDocument(document2, container, container.clientWidth || 600, startPageRef.current, zoomPercent, () => live4, onPageCount);
134202
+ if (live4) setPages(count3);
134203
134203
  })().catch(() => {
134204
134204
  if (live4) setFailedRequest(request2);
134205
134205
  });
@@ -135976,14 +135976,14 @@ function DataTableTotals({ totalsPath, totals, columns, ctx, td }) {
135976
135976
  if (totalsRow == null) return null;
135977
135977
  return /* @__PURE__ */ jsx14("tfoot", { children: /* @__PURE__ */ jsx14("tr", { children: dataTableCells(totalsRow, columns).map((cell3, ci2) => /* @__PURE__ */ jsx14("td", { style: { ...td, fontWeight: 600, borderTop: `1px solid ${ctx.color("border", "#e5e5e5")}`, textAlign: cellAlign(columns[ci2].align) }, children: txt(cell3, ctx) }, ci2)) }) });
135978
135978
  }
135979
- function resampleWaveform(samples, count2) {
135979
+ function resampleWaveform(samples, count3) {
135980
135980
  const clean3 = samples.map((n2) => Number.isFinite(n2) ? Math.min(Math.max(n2, 0), 1) : 0);
135981
- if (count2 <= 0 || clean3.length === 0) return [];
135982
- if (clean3.length <= count2) return clean3;
135981
+ if (count3 <= 0 || clean3.length === 0) return [];
135982
+ if (clean3.length <= count3) return clean3;
135983
135983
  const out2 = [];
135984
- for (let i2 = 0; i2 < count2; i2++) {
135985
- const lo2 = Math.floor(i2 * clean3.length / count2);
135986
- const hi2 = Math.min(Math.max(lo2 + 1, Math.floor((i2 + 1) * clean3.length / count2)), clean3.length);
135984
+ for (let i2 = 0; i2 < count3; i2++) {
135985
+ const lo2 = Math.floor(i2 * clean3.length / count3);
135986
+ const hi2 = Math.min(Math.max(lo2 + 1, Math.floor((i2 + 1) * clean3.length / count3)), clean3.length);
135987
135987
  let sum = 0;
135988
135988
  for (let j2 = lo2; j2 < hi2; j2++) sum += clean3[j2];
135989
135989
  out2.push(sum / (hi2 - lo2));
@@ -136001,8 +136001,8 @@ function voiceNoteSpokenDuration(ms2) {
136001
136001
  if (s5 === 0) return `${m2} minute${m2 === 1 ? "" : "s"}`;
136002
136002
  return `${m2} minute${m2 === 1 ? "" : "s"} ${s5} second${s5 === 1 ? "" : "s"}`;
136003
136003
  }
136004
- function resolvePagedIndex(value2, count2) {
136005
- if (count2 <= 0) return void 0;
136004
+ function resolvePagedIndex(value2, count3) {
136005
+ if (count3 <= 0) return void 0;
136006
136006
  let n2;
136007
136007
  if (typeof value2 === "number") n2 = value2;
136008
136008
  else if (typeof value2 === "string" && /^-?\d+$/.test(value2)) {
@@ -136010,7 +136010,7 @@ function resolvePagedIndex(value2, count2) {
136010
136010
  if (!Number.isFinite(n2)) n2 = value2.startsWith("-") ? -Number.MAX_SAFE_INTEGER : Number.MAX_SAFE_INTEGER;
136011
136011
  } else n2 = NaN;
136012
136012
  if (!Number.isInteger(n2)) return void 0;
136013
- return Math.max(0, Math.min(count2 - 1, n2));
136013
+ return Math.max(0, Math.min(count3 - 1, n2));
136014
136014
  }
136015
136015
  function rememberReported(echoes, index) {
136016
136016
  const now = Date.now();
@@ -136030,7 +136030,7 @@ function takesHoldOfRail(event) {
136030
136030
  }
136031
136031
  return true;
136032
136032
  }
136033
- function useBoundPageIndex(ctx, path2, count2, currentRef, move, echoes) {
136033
+ function useBoundPageIndex(ctx, path2, count3, currentRef, move, echoes) {
136034
136034
  const binding2 = typeof path2 === "string" && isBinding(path2) ? path2 : "";
136035
136035
  const value2 = useBoundValue(ctx, binding2);
136036
136036
  if (echoes) heldPageIndex.set(echoes, binding2 && typeof value2 === "number" ? value2 : void 0);
@@ -136038,7 +136038,7 @@ function useBoundPageIndex(ctx, path2, count2, currentRef, move, echoes) {
136038
136038
  const seen = React21.useRef(null);
136039
136039
  React21.useEffect(() => {
136040
136040
  if (!binding2) return;
136041
- const index = resolvePagedIndex(value2, count2);
136041
+ const index = resolvePagedIndex(value2, count3);
136042
136042
  if (index === void 0) {
136043
136043
  if (resolvePagedIndex(value2, Number.MAX_SAFE_INTEGER) === void 0) {
136044
136044
  seen.current = { binding: binding2, provider: ctx.provider, value: value2, clamped: false, index: -1 };
@@ -136048,7 +136048,7 @@ function useBoundPageIndex(ctx, path2, count2, currentRef, move, echoes) {
136048
136048
  const last = seen.current;
136049
136049
  if (last && last.binding === binding2 && last.provider === ctx.provider && last.value === value2 && !last.clamped) {
136050
136050
  const unbounded = resolvePagedIndex(value2, Number.MAX_SAFE_INTEGER);
136051
- if (unbounded !== index && shownBefore > count2 - 1) seen.current = { ...last, clamped: true, index };
136051
+ if (unbounded !== index && shownBefore > count3 - 1) seen.current = { ...last, clamped: true, index };
136052
136052
  return;
136053
136053
  }
136054
136054
  if (last && last.binding === binding2 && last.provider === ctx.provider && last.value === value2 && currentRef.current !== last.index) {
@@ -136067,9 +136067,9 @@ function useBoundPageIndex(ctx, path2, count2, currentRef, move, echoes) {
136067
136067
  pending2.length = 0;
136068
136068
  }
136069
136069
  if (index !== currentRef.current) move(index);
136070
- }, [binding2, ctx.provider, value2, count2]);
136070
+ }, [binding2, ctx.provider, value2, count3]);
136071
136071
  return (shown3 = currentRef.current) => {
136072
- const target = binding2 ? resolvePagedIndex(value2, count2) : void 0;
136072
+ const target = binding2 ? resolvePagedIndex(value2, count3) : void 0;
136073
136073
  if (target === void 0) return false;
136074
136074
  const last = seen.current;
136075
136075
  if (!(last && last.binding === binding2 && last.provider === ctx.provider && last.value === value2)) {
@@ -137646,10 +137646,10 @@ function renderInner(node3, ctx, boundMotion) {
137646
137646
  case "Agenda":
137647
137647
  return /* @__PURE__ */ jsx14(AgendaNode, { props: props2, ctx, wrap });
137648
137648
  case "PageControl": {
137649
- const count2 = props2.count ?? 0;
137649
+ const count3 = props2.count ?? 0;
137650
137650
  const cur = props2.currentIndex ?? 0;
137651
137651
  const accent = C2("accentPrimary", "#116DFF");
137652
- return /* @__PURE__ */ jsx14("div", { style: { display: "inline-flex", alignItems: "center", gap: 8, ...wrap }, children: Array.from({ length: count2 }).map((_2, i2) => /* @__PURE__ */ jsx14("span", { style: { width: i2 === cur ? 22 : 9, height: 9, borderRadius: 999, background: i2 === cur ? accent : C2("textTertiary", "#aab2bd"), transition: "width .2s" } }, i2)) });
137652
+ return /* @__PURE__ */ jsx14("div", { style: { display: "inline-flex", alignItems: "center", gap: 8, ...wrap }, children: Array.from({ length: count3 }).map((_2, i2) => /* @__PURE__ */ jsx14("span", { style: { width: i2 === cur ? 22 : 9, height: 9, borderRadius: 999, background: i2 === cur ? accent : C2("textTertiary", "#aab2bd"), transition: "width .2s" } }, i2)) });
137653
137653
  }
137654
137654
  // ───────────── pickers & inputs (RFC 0033) ─────────────
137655
137655
  case "WheelPicker":
@@ -137773,7 +137773,7 @@ function renderInner(node3, ctx, boundMotion) {
137773
137773
  case "RichContentEditor":
137774
137774
  return /* @__PURE__ */ jsx14(RichContentEditorNode, { props: props2, ctx, wrap, nodeId: node3.id });
137775
137775
  case "Skeleton": {
137776
- const count2 = typeof props2.count === "number" ? props2.count : 1;
137776
+ const count3 = typeof props2.count === "number" ? props2.count : 1;
137777
137777
  const base2 = C2("surfaceTertiary", "#f0f0f3");
137778
137778
  const motion = skeletonMotion(rowValue(props2.style, ctx), {
137779
137779
  motionDefaultsAnimate: motionDefaultsAnimate(ctx),
@@ -137786,8 +137786,8 @@ function renderInner(node3, ctx, boundMotion) {
137786
137786
  backgroundSize: "300% 100%",
137787
137787
  animation: `himalaya-shimmer ${motion === "shimmer" ? SKELETON_SHIMMER_PERIOD_MS : motionDefaultsDuration(ctx.kit, 1400)}ms linear infinite`
137788
137788
  }) : { background: base2 };
137789
- if (count2 <= 1) return /* @__PURE__ */ jsx14("div", { "data-hm-skeleton": "", style: { width: props2.width ?? "100%", height: props2.height ?? 16, borderRadius: props2.cornerRadius ?? 8, ...bar, flex: "none", ...wrap, ...shimmer ? bar : {} } });
137790
- return /* @__PURE__ */ jsx14("div", { "data-hm-skeleton": "", style: { display: "flex", flexDirection: "column", gap: 10, width: "100%", ...wrap }, children: Array.from({ length: count2 }).map((_2, i2) => /* @__PURE__ */ jsx14("div", { style: { height: props2.height ?? 16, width: `${100 - i2 * 8}%`, borderRadius: props2.cornerRadius ?? 8, ...bar } }, i2)) });
137789
+ if (count3 <= 1) return /* @__PURE__ */ jsx14("div", { "data-hm-skeleton": "", style: { width: props2.width ?? "100%", height: props2.height ?? 16, borderRadius: props2.cornerRadius ?? 8, ...bar, flex: "none", ...wrap, ...shimmer ? bar : {} } });
137790
+ return /* @__PURE__ */ jsx14("div", { "data-hm-skeleton": "", style: { display: "flex", flexDirection: "column", gap: 10, width: "100%", ...wrap }, children: Array.from({ length: count3 }).map((_2, i2) => /* @__PURE__ */ jsx14("div", { style: { height: props2.height ?? 16, width: `${100 - i2 * 8}%`, borderRadius: props2.cornerRadius ?? 8, ...bar } }, i2)) });
137791
137791
  }
137792
137792
  // ───────────── search & filter ─────────────
137793
137793
  case "SearchField":
@@ -139823,9 +139823,9 @@ var init_renderNode = __esm({
139823
139823
  const view = nav.from === rawUrl ? nav : { from: rawUrl, page: null, zoom: null };
139824
139824
  const src = plan?.mode === "direct" ? plan.src : settled?.url ?? null;
139825
139825
  const [canvasCount, setCanvasCount] = React21.useState(null);
139826
- const onPageCount = React21.useCallback((count2) => {
139827
- if (!Number.isInteger(count2) || count2 < 1) return;
139828
- setCanvasCount((cur) => cur?.from === src && cur.count === count2 ? cur : { from: src, count: count2 });
139826
+ const onPageCount = React21.useCallback((count3) => {
139827
+ if (!Number.isInteger(count3) || count3 < 1) return;
139828
+ setCanvasCount((cur) => cur?.from === src && cur.count === count3 ? cur : { from: src, count: count3 });
139829
139829
  }, [src]);
139830
139830
  const pageCount = canvasCount?.from === src ? canvasCount.count : fallbackPageCount;
139831
139831
  const onFallback = React21.useCallback(() => setFellBackFrom(src), [src]);
@@ -141707,9 +141707,9 @@ var init_renderNode = __esm({
141707
141707
  const d2 = drag.current;
141708
141708
  if (!d2 || d2.id !== ev.pointerId) return;
141709
141709
  drag.current = null;
141710
- const { index: at2, count: count2, dismissible: canClose } = dragState.current;
141710
+ const { index: at2, count: count3, dismissible: canClose } = dragState.current;
141711
141711
  const dy = ev.clientY - d2.y;
141712
- const next = ev.type === "pointerup" ? drawerDragOutcome(at2, count2, dy, canClose) : at2;
141712
+ const next = ev.type === "pointerup" ? drawerDragOutcome(at2, count3, dy, canClose) : at2;
141713
141713
  dragged.current = ev.type === "pointerup" && Math.abs(dy) >= DETENT_DRAG_THRESHOLD;
141714
141714
  if (next === -1) close();
141715
141715
  else if (next !== at2) toDetent(next, at2);
@@ -142187,8 +142187,8 @@ var init_renderNode = __esm({
142187
142187
  const overflow = (props2.showOverflow ?? props2.show_overflow) === false ? 0 : props2.overflowCount || Math.max(0, avatars.length - maxVisible);
142188
142188
  const shift = Math.round(size * (1 - (props2.overlapRatio ?? 0.67)));
142189
142189
  const caption = useBoundString(props2.caption, ctx).trim();
142190
- const count2 = shown3.length + overflow;
142191
- const countText = count2 > 0 ? `${count2} ${count2 === 1 ? "person" : "people"}` : "";
142190
+ const count3 = shown3.length + overflow;
142191
+ const countText = count3 > 0 ? `${count3} ${count3 === 1 ? "person" : "people"}` : "";
142192
142192
  const groupName = [caption, countText].filter(Boolean).join(", ");
142193
142193
  return /* @__PURE__ */ jsxs11("div", { role: "group", "aria-label": groupName || void 0, "data-a11y-value": countText || void 0, ...{ [SELF_RENDERED_LEAF]: true, [A11Y_PART]: "root" }, style: { width: "100%", ...wrap }, children: [
142194
142194
  /* @__PURE__ */ jsxs11("div", { role: "list", style: { display: "flex" }, children: [
@@ -142923,17 +142923,17 @@ var init_renderNode = __esm({
142923
142923
  }, [index, heights]);
142924
142924
  return /* @__PURE__ */ jsx14("div", { ref, style: { width: "100%" }, children: children2 });
142925
142925
  };
142926
- LiveWindowPage = ({ page, index, count: count2, current, liveWindow, ownerId, heights, ctx }) => {
142926
+ LiveWindowPage = ({ page, index, count: count3, current, liveWindow, ownerId, heights, ctx }) => {
142927
142927
  const outerActive = React21.useContext(PageActiveContext);
142928
- if (liveWindowRange(current, count2, liveWindow) == null) return /* @__PURE__ */ jsx14(Fragment4, { children: renderNode(page, ctx) });
142929
- if (liveWindowMounted(index, current, count2, liveWindow)) {
142930
- return /* @__PURE__ */ jsx14(PageActiveContext.Provider, { value: outerActive && liveWindowActive(index, current, count2, liveWindow), children: /* @__PURE__ */ jsx14(LiveWindowMeasured, { index, heights, children: renderNode(page, ctx) }) });
142928
+ if (liveWindowRange(current, count3, liveWindow) == null) return /* @__PURE__ */ jsx14(Fragment4, { children: renderNode(page, ctx) });
142929
+ if (liveWindowMounted(index, current, count3, liveWindow)) {
142930
+ return /* @__PURE__ */ jsx14(PageActiveContext.Provider, { value: outerActive && liveWindowActive(index, current, count3, liveWindow), children: /* @__PURE__ */ jsx14(LiveWindowMeasured, { index, heights, children: renderNode(page, ctx) }) });
142931
142931
  }
142932
142932
  const bg = normalize2(page ?? {}).modifiers?.background;
142933
142933
  const token = typeof bg === "string" ? bg : typeof bg?.token === "string" ? bg.token : void 0;
142934
142934
  const image = liveWindowFirstImage(page);
142935
142935
  const picture = image ? normalize2(image) : null;
142936
- const remembered = heights.map.get(index) ?? heights.map.get(liveWindowCurrent(current, count2));
142936
+ const remembered = heights.map.get(index) ?? heights.map.get(liveWindowCurrent(current, count3));
142937
142937
  return (
142938
142938
  // Hidden from assistive tech except as the page's position; the picture is inert (no id, no actions).
142939
142939
  /* @__PURE__ */ jsx14(
@@ -142942,7 +142942,7 @@ var init_renderNode = __esm({
142942
142942
  "data-component-id": liveWindowPlaceholderId(ownerId, index),
142943
142943
  "data-live-window-placeholder": "",
142944
142944
  role: "group",
142945
- "aria-label": `page ${index + 1} of ${count2}`,
142945
+ "aria-label": `page ${index + 1} of ${count3}`,
142946
142946
  style: { width: "100%", height: remembered ? remembered : "100%", minHeight: remembered ? remembered : "100%", position: "relative", overflow: "hidden", background: token && !isBinding(token) ? ctx.color(token, "transparent") : void 0 },
142947
142947
  children: picture ? /* @__PURE__ */ jsx14("div", { "aria-hidden": "true", style: { position: "absolute", inset: 0, pointerEvents: "none" }, children: renderNode({ type: picture.type, props: picture.props }, { ...ctx, onAction: null }) }) : null
142948
142948
  }
@@ -143601,7 +143601,7 @@ var init_renderNode = __esm({
143601
143601
  const parsedIndex = resolvePagedIndex(boundIndex, Number.MAX_SAFE_INTEGER) ?? NaN;
143602
143602
  const effectiveIndex = Number.isInteger(parsedIndex) ? parsedIndex : props2.currentIndex;
143603
143603
  const pages2 = items.filter((p2) => isNodeLike(p2) || p2?.type);
143604
- const count2 = pages2.length;
143604
+ const count3 = pages2.length;
143605
143605
  const [index, setIndex] = React21.useState(typeof effectiveIndex === "number" ? effectiveIndex : 0);
143606
143606
  const indexRef = React21.useRef(index);
143607
143607
  const { settled, scrolling } = useSettledPage(index);
@@ -143613,7 +143613,7 @@ var init_renderNode = __esm({
143613
143613
  const [focused, setFocused] = React21.useState(false);
143614
143614
  const paused = hovered || focused;
143615
143615
  const interval = typeof props2.autoplayIntervalMs === "number" && props2.autoplayIntervalMs > 0 ? props2.autoplayIntervalMs : 0;
143616
- const autoplay = interval > 0 && count2 > 1 && !ctx.reduceMotion();
143616
+ const autoplay = interval > 0 && count3 > 1 && !ctx.reduceMotion();
143617
143617
  const onChange = props2.onChange;
143618
143618
  const onChangeRef = React21.useRef(onChange);
143619
143619
  onChangeRef.current = onChange;
@@ -143627,7 +143627,7 @@ var init_renderNode = __esm({
143627
143627
  const carouselEchoes = React21.useRef([]);
143628
143628
  const carouselIndexBoundRaw = props2.currentIndexPath ?? props2.current_index_path;
143629
143629
  const carouselIndexBound = typeof carouselIndexBoundRaw === "string" && isBinding(carouselIndexBoundRaw) && !carouselIndexBoundRaw.startsWith("$item.");
143630
- useBoundPageIndex(ctx, carouselIndexBound ? carouselIndexBoundRaw : "", count2, indexRef, (index2) => {
143630
+ useBoundPageIndex(ctx, carouselIndexBound ? carouselIndexBoundRaw : "", count3, indexRef, (index2) => {
143631
143631
  endAutoScroll();
143632
143632
  indexRef.current = index2;
143633
143633
  setIndex(index2);
@@ -143641,15 +143641,15 @@ var init_renderNode = __esm({
143641
143641
  scrollCarouselTo(el2, index2);
143642
143642
  }, carouselEchoes);
143643
143643
  const placedIndex = !carouselIndexBound && Number.isInteger(parsedIndex) ? parsedIndex : void 0;
143644
- const requestedIndex = Math.max(0, Math.min(count2 - 1, placedIndex ?? (typeof props2.currentIndex === "number" ? props2.currentIndex : 0)));
143645
- const hasPages = count2 > 0;
143644
+ const requestedIndex = Math.max(0, Math.min(count3 - 1, placedIndex ?? (typeof props2.currentIndex === "number" ? props2.currentIndex : 0)));
143645
+ const hasPages = count3 > 0;
143646
143646
  useIsomorphicLayoutEffect3(() => {
143647
143647
  const el2 = trackRef.current;
143648
143648
  if (el2 && hasPages && indexRef.current > 0) el2.scrollLeft = carouselScrollLeft(el2, indexRef.current);
143649
143649
  }, [hasPages]);
143650
143650
  React21.useEffect(() => {
143651
143651
  if (carouselIndexBound && indexRef.current !== requestedIndex) {
143652
- const last = count2 - 1;
143652
+ const last = count3 - 1;
143653
143653
  if (last < 0 || indexRef.current <= last) return;
143654
143654
  endAutoScroll();
143655
143655
  indexRef.current = last;
@@ -143666,7 +143666,7 @@ var init_renderNode = __esm({
143666
143666
  indexRef.current = requestedIndex;
143667
143667
  setIndex(requestedIndex);
143668
143668
  if (trackRef.current) trackRef.current.scrollLeft = carouselScrollLeft(trackRef.current, requestedIndex);
143669
- }, [requestedIndex, count2, endAutoScroll]);
143669
+ }, [requestedIndex, count3, endAutoScroll]);
143670
143670
  React21.useEffect(() => {
143671
143671
  const el2 = trackRef.current;
143672
143672
  el2?.addEventListener("scrollend", settleAutoScroll);
@@ -143686,7 +143686,7 @@ var init_renderNode = __esm({
143686
143686
  }
143687
143687
  }, [ctx]);
143688
143688
  useImagePreviewCollection(ctx, (page) => {
143689
- if (page < 0 || page >= count2) return;
143689
+ if (page < 0 || page >= count3) return;
143690
143690
  endAutoScroll();
143691
143691
  pageTo(page);
143692
143692
  if (trackRef.current) trackRef.current.scrollLeft = carouselScrollLeft(trackRef.current, page);
@@ -143696,25 +143696,25 @@ var init_renderNode = __esm({
143696
143696
  endAutoScroll();
143697
143697
  const el2 = trackRef.current;
143698
143698
  if (!locked || !el2 || el2.clientWidth <= 0) return;
143699
- const page = Math.max(0, Math.min(count2 - 1, Math.round(Math.abs(el2.scrollLeft) / el2.clientWidth)));
143699
+ const page = Math.max(0, Math.min(count3 - 1, Math.round(Math.abs(el2.scrollLeft) / el2.clientWidth)));
143700
143700
  scrolling(page);
143701
143701
  pageTo(page);
143702
143702
  };
143703
143703
  React21.useEffect(() => {
143704
143704
  if (!autoplay || paused) return;
143705
143705
  const id = setInterval(() => {
143706
- const next = (indexRef.current + 1) % count2;
143706
+ const next = (indexRef.current + 1) % count3;
143707
143707
  endAutoScroll();
143708
143708
  autoScrollRef.current = { target: next, timer: setTimeout(endAutoScroll, CAROUSEL_SETTLE_MS) };
143709
143709
  pageTo(next);
143710
143710
  scrollCarouselTo(trackRef.current, next);
143711
143711
  }, interval);
143712
143712
  return () => clearInterval(id);
143713
- }, [autoplay, paused, interval, count2, pageTo, endAutoScroll]);
143713
+ }, [autoplay, paused, interval, count3, pageTo, endAutoScroll]);
143714
143714
  const onScroll = (e2) => {
143715
143715
  const el2 = e2.currentTarget;
143716
143716
  if (el2.clientWidth <= 0) return;
143717
- const page = Math.max(0, Math.min(count2 - 1, Math.round(Math.abs(el2.scrollLeft) / el2.clientWidth)));
143717
+ const page = Math.max(0, Math.min(count3 - 1, Math.round(Math.abs(el2.scrollLeft) / el2.clientWidth)));
143718
143718
  if (autoScrollRef.current) {
143719
143719
  if (page === autoScrollRef.current.target) endAutoScroll();
143720
143720
  return;
@@ -143773,15 +143773,15 @@ var init_renderNode = __esm({
143773
143773
  userTakesOver(event);
143774
143774
  if (event.target !== event.currentTarget || !["ArrowLeft", "ArrowRight", "Home", "End"].includes(event.key)) return;
143775
143775
  event.preventDefault();
143776
- const next = event.key === "Home" ? 0 : event.key === "End" ? count2 - 1 : Math.max(0, Math.min(count2 - 1, indexRef.current + (event.key === "ArrowRight" ? 1 : -1) * (event.currentTarget.ownerDocument.defaultView?.getComputedStyle(event.currentTarget).direction === "rtl" ? -1 : 1)));
143776
+ const next = event.key === "Home" ? 0 : event.key === "End" ? count3 - 1 : Math.max(0, Math.min(count3 - 1, indexRef.current + (event.key === "ArrowRight" ? 1 : -1) * (event.currentTarget.ownerDocument.defaultView?.getComputedStyle(event.currentTarget).direction === "rtl" ? -1 : 1)));
143777
143777
  if (trackRef.current) trackRef.current.scrollLeft = next * trackRef.current.clientWidth * (event.currentTarget.ownerDocument.defaultView?.getComputedStyle(event.currentTarget).direction === "rtl" ? -1 : 1);
143778
143778
  pageTo(next);
143779
143779
  },
143780
143780
  style: { display: "flex", overflowX: "auto", scrollSnapType: "x mandatory", width: "100%" },
143781
- children: pages2.map((pg, i2) => /* @__PURE__ */ jsx14("div", { style: { minWidth: "100%", scrollSnapAlign: "start" }, children: /* @__PURE__ */ jsx14(LiveWindowPage, { page: pg, index: i2, count: count2, current: settled, liveWindow: props2.liveWindow, ownerId: nodeId || "carousel", heights: pageHeights, ctx: pg.__itemScope ? { ...ctx, itemScope: pg.__itemScope, ...pg.__previewKey !== void 0 ? { imagePreviewRows: [...ctx.imagePreviewRows ?? [], pg.__previewKey] } : {} } : ctx }) }, pg?.id ?? i2))
143781
+ children: pages2.map((pg, i2) => /* @__PURE__ */ jsx14("div", { style: { minWidth: "100%", scrollSnapAlign: "start" }, children: /* @__PURE__ */ jsx14(LiveWindowPage, { page: pg, index: i2, count: count3, current: settled, liveWindow: props2.liveWindow, ownerId: nodeId || "carousel", heights: pageHeights, ctx: pg.__itemScope ? { ...ctx, itemScope: pg.__itemScope, ...pg.__previewKey !== void 0 ? { imagePreviewRows: [...ctx.imagePreviewRows ?? [], pg.__previewKey] } : {} } : ctx }) }, pg?.id ?? i2))
143782
143782
  }
143783
143783
  ),
143784
- count2 > 1 && /* @__PURE__ */ jsx14("div", { "aria-label": `Page ${index + 1} of ${count2}`, style: { display: "flex", gap: 6, justifyContent: "center", marginTop: 10 }, children: pages2.map((_2, i2) => /* @__PURE__ */ jsx14("span", { "aria-current": i2 === index ? "true" : void 0, style: { width: i2 === index ? 18 : 7, height: 7, borderRadius: 999, background: i2 === index ? C2("accentPrimary", "#116DFF") : C2("border", "#ccc") } }, i2)) })
143784
+ count3 > 1 && /* @__PURE__ */ jsx14("div", { "aria-label": `Page ${index + 1} of ${count3}`, style: { display: "flex", gap: 6, justifyContent: "center", marginTop: 10 }, children: pages2.map((_2, i2) => /* @__PURE__ */ jsx14("span", { "aria-current": i2 === index ? "true" : void 0, style: { width: i2 === index ? 18 : 7, height: 7, borderRadius: 999, background: i2 === index ? C2("accentPrimary", "#116DFF") : C2("border", "#ccc") } }, i2)) })
143785
143785
  ]
143786
143786
  }
143787
143787
  );
@@ -160047,11 +160047,11 @@ function resolveWixUrl(path2) {
160047
160047
  if (/^https?:\/\//i.test(path2)) return path2;
160048
160048
  return `${WIX_API2}${path2}`;
160049
160049
  }
160050
- function classifyHttp(status2, count2) {
160050
+ function classifyHttp(status2, count3) {
160051
160051
  if (status2 === 428) return "not-installed";
160052
160052
  if (status2 === 404) return "wrong-path";
160053
160053
  if (status2 && status2 >= 400) return "error";
160054
- return count2 > 0 ? "ok" : "empty";
160054
+ return count3 > 0 ? "ok" : "empty";
160055
160055
  }
160056
160056
  function makeTransport(fetchImpl, auth, timeoutMs = DEFAULT_TIMEOUT_MS2) {
160057
160057
  return async (method, path2, body) => {
@@ -161215,9 +161215,9 @@ function validateAmpersand(xmlData, i2) {
161215
161215
  i2++;
161216
161216
  return validateNumberAmpersand(xmlData, i2);
161217
161217
  }
161218
- let count2 = 0;
161219
- for (; i2 < xmlData.length; i2++, count2++) {
161220
- if (xmlData[i2].match(/\w/) && count2 < 20)
161218
+ let count3 = 0;
161219
+ for (; i2 < xmlData.length; i2++, count3++) {
161220
+ if (xmlData[i2].match(/\w/) && count3 < 20)
161221
161221
  continue;
161222
161222
  if (xmlData[i2] === ";")
161223
161223
  break;
@@ -164278,8 +164278,8 @@ var init_Matcher = __esm({
164278
164278
  const siblingKey = namespace ? `${namespace}:${tagName2}` : tagName2;
164279
164279
  const counter = siblings.get(siblingKey) || 0;
164280
164280
  let position = 0;
164281
- for (const count2 of siblings.values()) {
164282
- position += count2;
164281
+ for (const count3 of siblings.values()) {
164282
+ position += count3;
164283
164283
  }
164284
164284
  siblings.set(siblingKey, counter + 1);
164285
164285
  const node3 = {
@@ -172601,7 +172601,7 @@ function sinceStart(start2, ts32) {
172601
172601
  }
172602
172602
  function renderReel(plan, images) {
172603
172603
  const img = (f2, alt, cls = "") => f2 && images.has(f2) ? `<img class="${cls}" src="${images.get(f2)}" alt="${escapeHtml(alt)}">` : "";
172604
- const count2 = (n2) => escapeHtml(String(Number.isSafeInteger(n2) && n2 >= 0 ? n2 : 0));
172604
+ const count3 = (n2) => escapeHtml(String(Number.isSafeInteger(n2) && n2 >= 0 ? n2 : 0));
172605
172605
  const accent = ACCENT.test(plan.accent) ? plan.accent : DEFAULT_ACCENT;
172606
172606
  const clock = (ts32) => sinceStart(plan.startedAt, ts32);
172607
172607
  const frames = plan.frames.filter((f2) => images.has(f2.file));
@@ -172627,14 +172627,14 @@ figcaption{font-size:12px;color:var(--muted);margin-top:6px;word-break:break-all
172627
172627
  footer{margin-top:48px;font-size:12px;color:var(--muted)}
172628
172628
  </style></head><body><div class="wrap">
172629
172629
  <h1>${escapeHtml(plan.app)}</h1><div class="muted">The making of \u2014 every version of the app as it was built${plan.startedAt ? `, ${escapeHtml(utcDay(plan.startedAt))}` : ""}</div>
172630
- <div class="stats"><div><b>${duration(plan.stats.elapsedMs)}</b><span class="muted">from first picture to last</span></div><div><b>${count2(plan.stats.screens)}</b><span class="muted">screens</span></div><div><b>${count2(plan.stats.versions)}</b><span class="muted">versions rendered</span></div><div><b>${count2(plan.stats.postcards)}</b><span class="muted">postcards</span></div></div>
172630
+ <div class="stats"><div><b>${duration(plan.stats.elapsedMs)}</b><span class="muted">from first picture to last</span></div><div><b>${count3(plan.stats.screens)}</b><span class="muted">screens</span></div><div><b>${count3(plan.stats.versions)}</b><span class="muted">versions rendered</span></div><div><b>${count3(plan.stats.postcards)}</b><span class="muted">postcards</span></div></div>
172631
172631
  <h2>${escapeHtml(plan.focusId ?? "The app")}, version by version</h2>
172632
172632
  ${flip}
172633
172633
  <h2>Where it ended up</h2>
172634
172634
  <div class="grid">${plan.finals.map((f2) => `<figure>${img(f2.file, f2.id)}<figcaption>${escapeHtml(f2.id)}</figcaption></figure>`).join("")}</div>
172635
172635
  <h2>Postcards</h2>
172636
172636
  <ul class="log">${plan.postcards.map((c2) => `<li><div class="t">${clock(c2.ts)}</div><div><div>${escapeHtml(c2.message)}</div>${c2.step ? `<div class="s">step ${JOURNEY_STEPS.indexOf(c2.step) + 1} \xB7 ${escapeHtml(c2.step)}</div>` : ""}${c2.by ? `<div class="by">noted by ${escapeHtml(c2.by)}</div>` : ""}${c2.files.length ? `<div class="imgs">${c2.files.map((f2) => img(f2, c2.message)).join("")}</div>` : ""}</div></li>`).join("") || `<li class="muted">No postcards were journaled.</li>`}</ul>
172637
- <footer>Built with himi.${plan.dropped ? ` ${count2(plan.dropped)} pictures were left out to keep this file small.` : ""}</footer>
172637
+ <footer>Built with himi.${plan.dropped ? ` ${count3(plan.dropped)} pictures were left out to keep this file small.` : ""}</footer>
172638
172638
  </div>
172639
172639
  <script>
172640
172640
  (function(){var F=${data};var imgs=document.querySelectorAll(".phone img");if(imgs.length<2)return;var i=0;
@@ -177242,9 +177242,9 @@ function requireCommon() {
177242
177242
  }
177243
177243
  return target;
177244
177244
  }
177245
- function repeat(string7, count2) {
177245
+ function repeat(string7, count3) {
177246
177246
  let result = "";
177247
- for (let cycle = 0; cycle < count2; cycle += 1) {
177247
+ for (let cycle = 0; cycle < count3; cycle += 1) {
177248
177248
  result += string7;
177249
177249
  }
177250
177250
  return result;
@@ -178561,11 +178561,11 @@ function requireLoader() {
178561
178561
  }
178562
178562
  return false;
178563
178563
  }
178564
- function writeFoldedLines(state, count2) {
178565
- if (count2 === 1) {
178564
+ function writeFoldedLines(state, count3) {
178565
+ if (count3 === 1) {
178566
178566
  state.result += " ";
178567
- } else if (count2 > 1) {
178568
- state.result += common2.repeat("\n", count2 - 1);
178567
+ } else if (count3 > 1) {
178568
+ state.result += common2.repeat("\n", count3 - 1);
178569
178569
  }
178570
178570
  }
178571
178571
  function readPlainScalar(state, nodeIndent, withinFlowCollection) {
@@ -184838,13 +184838,13 @@ function logicalName(spec) {
184838
184838
  return (isAdoptedEntity(spec) ? spec.base44Name : spec.name) ?? "";
184839
184839
  }
184840
184840
  function exportNames(entities, app2) {
184841
- const count2 = /* @__PURE__ */ new Map();
184842
- for (const e2 of entities) count2.set(logicalName(e2), (count2.get(logicalName(e2)) ?? 0) + 1);
184841
+ const count3 = /* @__PURE__ */ new Map();
184842
+ for (const e2 of entities) count3.set(logicalName(e2), (count3.get(logicalName(e2)) ?? 0) + 1);
184843
184843
  const out2 = /* @__PURE__ */ new Map();
184844
184844
  const taken2 = /* @__PURE__ */ new Set();
184845
184845
  const ordered = [...entities].sort((a3, b3) => physicalEntityName(a3, app2) < physicalEntityName(b3, app2) ? -1 : 1);
184846
184846
  const preferred = (e2) => {
184847
- const n2 = (count2.get(logicalName(e2)) ?? 0) > 1 ? physicalEntityName(e2, app2) : logicalName(e2);
184847
+ const n2 = (count3.get(logicalName(e2)) ?? 0) > 1 ? physicalEntityName(e2, app2) : logicalName(e2);
184848
184848
  return UNEXPORTABLE.has(n2) ? `${n2}Entity` : n2;
184849
184849
  };
184850
184850
  for (const e2 of ordered) {
@@ -186212,8 +186212,8 @@ function readCannedResponses() {
186212
186212
  for (const [k3, v2] of Object.entries(parsed)) {
186213
186213
  if (!k3.startsWith("//")) byKey[k3] = v2;
186214
186214
  }
186215
- const count2 = Object.keys(byKey).length;
186216
- if (count2) return { byKey, count: count2, from: url.pathname.includes("web-renderer") ? "in-repo fixture" : "bundled fixture" };
186215
+ const count3 = Object.keys(byKey).length;
186216
+ if (count3) return { byKey, count: count3, from: url.pathname.includes("web-renderer") ? "in-repo fixture" : "bundled fixture" };
186217
186217
  } catch {
186218
186218
  }
186219
186219
  }
@@ -187595,7 +187595,7 @@ function isAttestationV2(value2) {
187595
187595
  const a3 = value2;
187596
187596
  const coverage2 = a3.coverage;
187597
187597
  const report9 = a3.report;
187598
- return a3.attestation === 2 && typeof a3.runId === "string" && ["himi-test", "himi-render", "himi-shots"].includes(a3.tool) && [a3.app, a3.contentDir, a3.gitDiffHash, a3.gitUntrackedHash, a3.releaseId, a3.releaseHash, a3.selfHash].every((item2) => typeof item2 === "string" && item2.length > 0) && stringRecord(a3.descriptorHashes) && stringRecord(a3.screenshots) && !!coverage2 && [coverage2.screens, coverage2.actionsDispatched, coverage2.uncoveredFns, coverage2.gaps].every((count2) => typeof count2 === "number" && Number.isFinite(count2) && count2 >= 0) && typeof report9?.ok === "boolean" && !!report9.counts && [report9.counts.errors, report9.counts.warnings, report9.counts.gaps].every((count2) => typeof count2 === "number" && Number.isFinite(count2) && count2 >= 0) && (a3.prev === null || typeof a3.prev === "string");
187598
+ return a3.attestation === 2 && typeof a3.runId === "string" && ["himi-test", "himi-render", "himi-shots"].includes(a3.tool) && [a3.app, a3.contentDir, a3.gitDiffHash, a3.gitUntrackedHash, a3.releaseId, a3.releaseHash, a3.selfHash].every((item2) => typeof item2 === "string" && item2.length > 0) && stringRecord(a3.descriptorHashes) && stringRecord(a3.screenshots) && !!coverage2 && [coverage2.screens, coverage2.actionsDispatched, coverage2.uncoveredFns, coverage2.gaps].every((count3) => typeof count3 === "number" && Number.isFinite(count3) && count3 >= 0) && typeof report9?.ok === "boolean" && !!report9.counts && [report9.counts.errors, report9.counts.warnings, report9.counts.gaps].every((count3) => typeof count3 === "number" && Number.isFinite(count3) && count3 >= 0) && (a3.prev === null || typeof a3.prev === "string");
187599
187599
  }
187600
187600
  function readLatestAttestation(contentDir2) {
187601
187601
  try {
@@ -193782,16 +193782,16 @@ async function readDeclarations(page, developerId, appId3, opts = {}) {
193782
193782
  const actioned = await page.evaluate(tabScript("^Actioned"));
193783
193783
  const countText = [...attention.tabs, ...actioned.tabs].map((t2) => /^Need attention \((\d+)\)/.exec(t2)?.[1]).find((n2) => n2 !== void 0);
193784
193784
  const plainTab = [...attention.tabs, ...actioned.tabs].some((t2) => t2 === "Need attention");
193785
- const count2 = countText !== void 0 ? Number(countText) : plainTab ? 0 : void 0;
193785
+ const count3 = countText !== void 0 ? Number(countText) : plainTab ? 0 : void 0;
193786
193786
  const attentionItems = attention.found ? parseDeclarationList(attention.text ?? "") : [];
193787
193787
  if (!attention.found)
193788
193788
  notes.push(`no Need attention tab (tabs: ${attention.tabs.join(", ") || "none"})`);
193789
193789
  if (!actioned.found)
193790
193790
  notes.push(`no Actioned tab (tabs: ${actioned.tabs.join(", ") || "none"})`);
193791
- const complete = count2 !== void 0 && attentionItems.length === count2;
193792
- if (count2 !== void 0 && !complete)
193793
- notes.push(`the Need attention tab says ${count2}, ${attentionItems.length} recognised: a declaration this tool doesn't know may be listed`);
193794
- return { needAttention: { ...count2 === void 0 ? {} : { count: count2 }, items: attentionItems }, actioned: { items: actioned.found ? parseDeclarationList(actioned.text ?? "") : [] }, complete, notes };
193791
+ const complete = count3 !== void 0 && attentionItems.length === count3;
193792
+ if (count3 !== void 0 && !complete)
193793
+ notes.push(`the Need attention tab says ${count3}, ${attentionItems.length} recognised: a declaration this tool doesn't know may be listed`);
193794
+ return { needAttention: { ...count3 === void 0 ? {} : { count: count3 }, items: attentionItems }, actioned: { items: actioned.found ? parseDeclarationList(actioned.text ?? "") : [] }, complete, notes };
193795
193795
  }
193796
193796
  function planDeclaration(form, answer) {
193797
193797
  const raw = answer.trim();
@@ -196379,10 +196379,10 @@ function readZip2(buf) {
196379
196379
  throw new ZipError("ZIP64 archives (over 4 GB or 65535 entries) aren't supported");
196380
196380
  const disk = buf.readUInt16LE(end2 + 4);
196381
196381
  const cdDisk = buf.readUInt16LE(end2 + 6);
196382
- const count2 = buf.readUInt16LE(end2 + 10);
196382
+ const count3 = buf.readUInt16LE(end2 + 10);
196383
196383
  const cdSize = buf.readUInt32LE(end2 + 12);
196384
196384
  const cdOffset = buf.readUInt32LE(end2 + 16);
196385
- if (disk !== 0 || cdDisk !== 0 || buf.readUInt16LE(end2 + 8) !== count2)
196385
+ if (disk !== 0 || cdDisk !== 0 || buf.readUInt16LE(end2 + 8) !== count3)
196386
196386
  throw new ZipError("multi-disk zip archives aren't supported");
196387
196387
  if (cdOffset + cdSize > end2)
196388
196388
  throw new ZipError("zip central directory is out of bounds");
@@ -196390,7 +196390,7 @@ function readZip2(buf) {
196390
196390
  const entries = [];
196391
196391
  const seen = /* @__PURE__ */ new Set();
196392
196392
  let p2 = cdOffset;
196393
- for (let n2 = 0; n2 < count2; n2++) {
196393
+ for (let n2 = 0; n2 < count3; n2++) {
196394
196394
  if (p2 + 46 > end2 || buf.readUInt32LE(p2) !== CENTRAL)
196395
196395
  throw new ZipError("zip central directory is damaged");
196396
196396
  const flags = buf.readUInt16LE(p2 + 8);
@@ -197960,13 +197960,13 @@ function edgeColor(image, edge) {
197960
197960
  let most = 0;
197961
197961
  let total = 0;
197962
197962
  const sum = [0, 0, 0];
197963
- for (const [key4, count2] of counts) {
197964
- if (count2 > most)
197965
- [best, most] = [key4, count2];
197966
- total += count2;
197967
- sum[0] += (key4 >> 16 & 255) * count2;
197968
- sum[1] += (key4 >> 8 & 255) * count2;
197969
- sum[2] += (key4 & 255) * count2;
197963
+ for (const [key4, count3] of counts) {
197964
+ if (count3 > most)
197965
+ [best, most] = [key4, count3];
197966
+ total += count3;
197967
+ sum[0] += (key4 >> 16 & 255) * count3;
197968
+ sum[1] += (key4 >> 8 & 255) * count3;
197969
+ sum[2] += (key4 & 255) * count3;
197970
197970
  }
197971
197971
  if (total && most * 4 < total)
197972
197972
  return [Math.round(sum[0] / total), Math.round(sum[1] / total), Math.round(sum[2] / total)];
@@ -198689,7 +198689,7 @@ function verifyJar(input) {
198689
198689
  throw new JarError(`the .SF's digest of the manifest section for ${name} doesn't match`);
198690
198690
  manifestByName.set(name, section3.attrs);
198691
198691
  }
198692
- let count2 = 0;
198692
+ let count3 = 0;
198693
198693
  for (const e2 of entries) {
198694
198694
  if (e2.name.endsWith("/") || isSignatureFile(e2.name))
198695
198695
  continue;
@@ -198698,12 +198698,12 @@ function verifyJar(input) {
198698
198698
  throw new JarError(`${e2.name} isn't signed`);
198699
198699
  if (expected !== b64(entryData(e2)))
198700
198700
  throw new JarError(`${e2.name} doesn't match its digest`);
198701
- count2++;
198701
+ count3++;
198702
198702
  }
198703
198703
  for (const name of manifestByName.keys())
198704
198704
  if (!byName3.has(name))
198705
198705
  throw new JarError(`the manifest names ${name}, which isn't in the zip`);
198706
- return { signer: signer2, entries: count2, signatureFile: sfName };
198706
+ return { signer: signer2, entries: count3, signatureFile: sfName };
198707
198707
  }
198708
198708
  var X509Certificate4, createHash49, createPublicKey4, sign3, verify, JarError, CRLF, CREATED_BY, b64;
198709
198709
  var init_jar = __esm({
@@ -200789,11 +200789,11 @@ var init_actions_console = __esm({
200789
200789
  if ((publicPending === void 0 || publicPending.length) && !input.productionOwner) {
200790
200790
  throw refuse6(`productionOwnerApprovalId is required: sending for review now also sends ${goingPublic}, which needs the owner's recorded yes, as promoting to production does`);
200791
200791
  }
200792
- const count2 = seen.overview.changes === null ? "the app's pending changes" : `${seen.overview.changes} change${seen.overview.changes === 1 ? "" : "s"}`;
200792
+ const count3 = seen.overview.changes === null ? "the app's pending changes" : `${seen.overview.changes} change${seen.overview.changes === 1 ? "" : "s"}`;
200793
200793
  return {
200794
200794
  changes: [
200795
200795
  ...hasDraft ? [change("update", `tracks/${input.track}/releases`, `confirm the draft release on ${where} (Edit release, Next, Save)`)] : [],
200796
- change("create", `review/${input.packageName}`, `send ${count2} to Google for review from the Publishing overview (Play Console app ${input.appId}, ${input.packageName})`)
200796
+ change("create", `review/${input.packageName}`, `send ${count3} to Google for review from the Publishing overview (Play Console app ${input.appId}, ${input.packageName})`)
200797
200797
  ],
200798
200798
  sideEffects: [
200799
200799
  input.production ? `Google reviews the changes (typically within 7 days); once approved the production release reaches users on Google Play, on owner approval ${input.productionOwner}` : "Google reviews the changes (typically within 7 days); once approved the closed test reaches its testers",
@@ -201930,6 +201930,98 @@ var init_text = __esm({
201930
201930
  }
201931
201931
  });
201932
201932
 
201933
+ // ../../node_modules/@wix/asc-core/dist/store-record/pool.js
201934
+ function poolStatusOf(input) {
201935
+ if (!isPlain(input))
201936
+ throw new Error("pool: expected a JSON object");
201937
+ const p2 = isPlain(input.pool) ? input.pool : input;
201938
+ const status2 = p2.status;
201939
+ if (typeof status2 !== "string" || !POOL_STATUSES.includes(status2))
201940
+ throw new Error(`pool: status must be one of ${POOL_STATUSES.join(", ")}, not ${JSON.stringify(status2)}`);
201941
+ const startedAt = p2.startedAt;
201942
+ if (typeof startedAt !== "string" || Number.isNaN(Date.parse(startedAt)))
201943
+ throw new Error(`pool: startedAt must be a date-time, not ${JSON.stringify(startedAt)}`);
201944
+ if (p2.source !== void 0 && p2.source !== "himi-serve")
201945
+ throw new Error(`pool: source must be "himi-serve", not ${JSON.stringify(p2.source)}`);
201946
+ if (p2.groupOnTrack !== void 0 && typeof p2.groupOnTrack !== "boolean")
201947
+ throw new Error("pool: groupOnTrack must be true or false");
201948
+ return {
201949
+ status: status2,
201950
+ installed: count2(p2.installed, "installed"),
201951
+ of: p2.of === void 0 ? POOL_TESTERS : count2(p2.of, "of"),
201952
+ startedAt,
201953
+ day: count2(p2.day, "day"),
201954
+ ...p2.groupOnTrack !== void 0 ? { groupOnTrack: p2.groupOnTrack } : {},
201955
+ source: "himi-serve"
201956
+ };
201957
+ }
201958
+ async function writePoolStatus(record5, appKey, pool2, opts = {}) {
201959
+ const checked = poolStatusOf(pool2);
201960
+ const at2 = opts.at ?? (/* @__PURE__ */ new Date()).toISOString();
201961
+ if (Number.isNaN(Date.parse(at2)))
201962
+ throw new Error(`pool: at must be a date-time, not ${JSON.stringify(at2)}`);
201963
+ return record5.updateSlot(appKey, CLOSED_TEST_PATH, CLOSED_TEST_SCHEMA, "live", (prev) => ({ ...prev ?? {}, pool: checked }), { at: at2, source: "himi-serve", read: POOL_READ });
201964
+ }
201965
+ function poolOf(closedTestFile) {
201966
+ const raw = isPlain(closedTestFile?.live?.data) ? closedTestFile.live.data.pool : void 0;
201967
+ try {
201968
+ return raw === void 0 ? void 0 : poolStatusOf(raw);
201969
+ } catch {
201970
+ return void 0;
201971
+ }
201972
+ }
201973
+ function closedTestReadiness(closedTestFile, productionAccessFile, now = Date.now()) {
201974
+ const nowMs = typeof now === "number" ? now : now.getTime();
201975
+ const reasons = [];
201976
+ const pool2 = poolOf(closedTestFile);
201977
+ const day = pool2?.day ?? 0;
201978
+ const installed3 = pool2?.installed ?? 0;
201979
+ const of2 = pool2?.of ?? POOL_TESTERS;
201980
+ if (!closedTestFile)
201981
+ reasons.push("no closed-test record (google/closed-test.json)");
201982
+ else if (!pool2)
201983
+ reasons.push("no pool status in the closed-test record (gplay-node record pool writes it)");
201984
+ else {
201985
+ if (day < POOL_DAYS)
201986
+ reasons.push(`day ${day} of ${POOL_DAYS}`);
201987
+ if (installed3 < POOL_TESTERS)
201988
+ reasons.push(`${installed3} of ${POOL_TESTERS} phones installed`);
201989
+ if (pool2.status === "stuck" || pool2.status === "failed")
201990
+ reasons.push(`pool ${pool2.status}`);
201991
+ }
201992
+ const access3 = isPlain(productionAccessFile?.live?.data) ? productionAccessFile.live.data : void 0;
201993
+ if (!productionAccessFile)
201994
+ reasons.push("no production access record (google/production-access.json; refresh --part policy reads it)");
201995
+ else if (!access3)
201996
+ reasons.push("the production access record has no live read (refresh --part policy reads it)");
201997
+ else if (access3.eligible !== true && access3.applied !== true && access3.granted !== true) {
201998
+ const at2 = productionAccessFile.live.fetchedAt;
201999
+ const hours = Math.max(0, Math.floor((nowMs - Date.parse(at2)) / 36e5));
202000
+ reasons.push(`the production access card does not say eligible (read ${Number.isNaN(hours) ? "at an unknown time" : `${hours}h ago`})`);
202001
+ }
202002
+ return { done: reasons.length === 0, day, installed: installed3, of: of2, reasons };
202003
+ }
202004
+ var POOL_STATUSES, POOL_TESTERS, POOL_DAYS, CLOSED_TEST_PATH, CLOSED_TEST_SCHEMA, PRODUCTION_ACCESS_PATH2, POOL_READ, isPlain, count2;
202005
+ var init_pool = __esm({
202006
+ "../../node_modules/@wix/asc-core/dist/store-record/pool.js"() {
202007
+ init_define_HHP_CATALOG();
202008
+ POOL_STATUSES = ["adding", "active", "ending", "archived", "stuck", "failed"];
202009
+ POOL_TESTERS = 12;
202010
+ POOL_DAYS = 14;
202011
+ CLOSED_TEST_PATH = "google/closed-test.json";
202012
+ CLOSED_TEST_SCHEMA = "google.closed-test@1";
202013
+ PRODUCTION_ACCESS_PATH2 = "google/production-access.json";
202014
+ POOL_READ = "pool";
202015
+ isPlain = (v2) => !!v2 && typeof v2 === "object" && !Array.isArray(v2);
202016
+ count2 = (v2, name) => {
202017
+ const n2 = typeof v2 === "string" && v2.trim() !== "" ? Number(v2) : v2;
202018
+ if (typeof n2 !== "number" || !Number.isInteger(n2) || n2 < 0)
202019
+ throw new Error(`pool: ${name} must be a whole number of 0 or more, not ${JSON.stringify(v2)}`);
202020
+ return n2;
202021
+ };
202022
+ }
202023
+ });
202024
+
201933
202025
  // ../../node_modules/@wix/asc-core/dist/store-record/sync.js
201934
202026
  import * as __ascBuiltin032 from "node:crypto";
201935
202027
  function describe(e2) {
@@ -202559,7 +202651,14 @@ var init_sync = __esm({
202559
202651
  var store_record_exports = {};
202560
202652
  __export(store_record_exports, {
202561
202653
  BLOB_TYPES: () => BLOB_TYPES,
202654
+ CLOSED_TEST_PATH: () => CLOSED_TEST_PATH,
202655
+ CLOSED_TEST_SCHEMA: () => CLOSED_TEST_SCHEMA,
202562
202656
  LIVE_PARTS: () => LIVE_PARTS,
202657
+ POOL_DAYS: () => POOL_DAYS,
202658
+ POOL_READ: () => POOL_READ,
202659
+ POOL_STATUSES: () => POOL_STATUSES,
202660
+ POOL_TESTERS: () => POOL_TESTERS,
202661
+ PRODUCTION_ACCESS_PATH: () => PRODUCTION_ACCESS_PATH2,
202563
202662
  SECRET_KEY: () => SECRET_KEY,
202564
202663
  SUPPORTED_MAJOR: () => SUPPORTED_MAJOR,
202565
202664
  SYNC_LIMITS: () => SYNC_LIMITS,
@@ -202567,6 +202666,7 @@ __export(store_record_exports, {
202567
202666
  ago: () => ago,
202568
202667
  appKeyOf: () => appKeyOf,
202569
202668
  canonicalJson: () => canonicalJson3,
202669
+ closedTestReadiness: () => closedTestReadiness,
202570
202670
  drift: () => drift,
202571
202671
  driftViewOf: () => driftViewOf,
202572
202672
  envelopeProblem: () => envelopeProblem,
@@ -202577,6 +202677,8 @@ __export(store_record_exports, {
202577
202677
  mergeLive: () => mergeLive,
202578
202678
  mergeOlderUnder: () => mergeOlderUnder,
202579
202679
  mergeRecordFiles: () => mergeRecordFiles,
202680
+ poolOf: () => poolOf,
202681
+ poolStatusOf: () => poolStatusOf,
202580
202682
  readKeyFor: () => readKeyFor,
202581
202683
  recordFileSha256: () => recordFileSha256,
202582
202684
  recordRoot: () => recordRoot,
@@ -202593,7 +202695,8 @@ __export(store_record_exports, {
202593
202695
  stripSecrets: () => stripSecrets,
202594
202696
  syncRecord: () => syncRecord,
202595
202697
  textDigest: () => textDigest,
202596
- writeKeyFor: () => writeKeyFor
202698
+ writeKeyFor: () => writeKeyFor,
202699
+ writePoolStatus: () => writePoolStatus
202597
202700
  });
202598
202701
  import * as __ascBuiltin033 from "node:crypto";
202599
202702
  import * as __ascBuiltin123 from "node:fs/promises";
@@ -202601,14 +202704,14 @@ import * as __ascBuiltin211 from "node:path";
202601
202704
  function unionById(older, newer2) {
202602
202705
  const seen = new Set(newer2.map(itemId2));
202603
202706
  const all = [...newer2, ...older.filter((x2) => !seen.has(itemId2(x2)))];
202604
- if (all.every((x2) => isPlain(x2) && typeof x2.at === "string"))
202707
+ if (all.every((x2) => isPlain2(x2) && typeof x2.at === "string"))
202605
202708
  return [...all].sort((x2, y2) => timeOf2(x2.at) - timeOf2(y2.at));
202606
202709
  if (all.every((x2) => typeof x2 === "string"))
202607
202710
  return [...all].sort();
202608
202711
  return all;
202609
202712
  }
202610
202713
  function mergeOlderUnder(older, newer2, collections2, deep = []) {
202611
- if (!isPlain(newer2) || !isPlain(older) || newer2.deleted === true)
202714
+ if (!isPlain2(newer2) || !isPlain2(older) || newer2.deleted === true)
202612
202715
  return newer2;
202613
202716
  const out2 = { ...older, ...newer2 };
202614
202717
  for (const k3 of /* @__PURE__ */ new Set([...collections2, ...deep])) {
@@ -202616,13 +202719,13 @@ function mergeOlderUnder(older, newer2, collections2, deep = []) {
202616
202719
  const b3 = newer2[k3];
202617
202720
  if (Array.isArray(a3) && Array.isArray(b3))
202618
202721
  out2[k3] = unionById(a3, b3);
202619
- else if (isPlain(a3) && isPlain(b3)) {
202722
+ else if (isPlain2(a3) && isPlain2(b3)) {
202620
202723
  const merged = { ...a3, ...b3 };
202621
202724
  if (deep.includes(k3)) {
202622
202725
  for (const id of Object.keys(b3)) {
202623
202726
  const ea2 = a3[id];
202624
202727
  const eb = b3[id];
202625
- if (!isPlain(ea2) || !isPlain(eb) || eb.deleted === true)
202728
+ if (!isPlain2(ea2) || !isPlain2(eb) || eb.deleted === true)
202626
202729
  continue;
202627
202730
  const entry = { ...ea2, ...eb };
202628
202731
  for (const f2 of Object.keys(eb))
@@ -202688,7 +202791,7 @@ async function readKeyFor(record5, oldKey, appKey) {
202688
202791
  const claimed = Object.entries(await record5.aliases()).some(([k3, v2]) => v2 === target && k3.startsWith(kind) && k3 !== oldKey);
202689
202792
  return claimed ? oldKey : target;
202690
202793
  }
202691
- var createHash55, chmod2, mkdir15, readdir6, readFile14, rename5, stat9, unlink4, join112, LOGS2, STORES, INDEX_SCHEMA, SYNC_STATE_SCHEMA, SHA256_RE2, isNotFound, resourceOf2, timeOf2, ITEM_IDS, isPlain, itemId2, OLD_KEY2, MAX_HOPS, StoreRecord, kindOf;
202794
+ var createHash55, chmod2, mkdir15, readdir6, readFile14, rename5, stat9, unlink4, join112, LOGS2, STORES, INDEX_SCHEMA, SYNC_STATE_SCHEMA, SHA256_RE2, isNotFound, resourceOf2, timeOf2, ITEM_IDS, isPlain2, itemId2, OLD_KEY2, MAX_HOPS, StoreRecord, kindOf;
202692
202795
  var init_store_record = __esm({
202693
202796
  "../../node_modules/@wix/asc-core/dist/store-record/index.js"() {
202694
202797
  init_define_HHP_CATALOG();
@@ -202706,6 +202809,7 @@ var init_store_record = __esm({
202706
202809
  init_blobs();
202707
202810
  init_secrets2();
202708
202811
  init_text();
202812
+ init_pool();
202709
202813
  init_canonical();
202710
202814
  init_sync();
202711
202815
  ({ createHash: createHash55 } = __ascBuiltin033);
@@ -202720,9 +202824,9 @@ var init_store_record = __esm({
202720
202824
  resourceOf2 = (schema2) => schema2.replace(/@\d+$/, "");
202721
202825
  timeOf2 = (iso) => iso === void 0 ? Number.NEGATIVE_INFINITY : Date.parse(iso) || Number.NEGATIVE_INFINITY;
202722
202826
  ITEM_IDS = ["jobId", "id", "locale", "language", "territory", "productId", "groupId", "email", "name"];
202723
- isPlain = (v2) => !!v2 && typeof v2 === "object" && !Array.isArray(v2);
202827
+ isPlain2 = (v2) => !!v2 && typeof v2 === "object" && !Array.isArray(v2);
202724
202828
  itemId2 = (v2) => {
202725
- if (isPlain(v2)) {
202829
+ if (isPlain2(v2)) {
202726
202830
  for (const k3 of ITEM_IDS)
202727
202831
  if (typeof v2[k3] === "string" || typeof v2[k3] === "number")
202728
202832
  return `${k3}:${String(v2[k3])}`;
@@ -202814,9 +202918,9 @@ var init_store_record = __esm({
202814
202918
  if (older === "replace" || prev === void 0 || prev === null)
202815
202919
  return { ...skip, outcome: "skipped" };
202816
202920
  const computed = asJson(compute(prev));
202817
- if (older.sameAs !== void 0 && isPlain(prev) && prev[older.sameAs] !== void 0) {
202921
+ if (older.sameAs !== void 0 && isPlain2(prev) && prev[older.sameAs] !== void 0) {
202818
202922
  const own6 = asJson(compute(void 0));
202819
- if (!isPlain(own6) || !sameData(own6[older.sameAs], prev[older.sameAs]))
202923
+ if (!isPlain2(own6) || !sameData(own6[older.sameAs], prev[older.sameAs]))
202820
202924
  return { ...skip, outcome: "skipped" };
202821
202925
  }
202822
202926
  const merged = asJson(mergeOlderUnder(computed, prev, older.merge, older.deep ?? []));
@@ -205646,7 +205750,7 @@ function parseBinary(b3) {
205646
205750
  throw badPlist("binary plist's top object is out of range");
205647
205751
  if (table + objectCount * BigInt(offsetSize) > BigInt(trailer))
205648
205752
  throw badPlist("binary plist's offset table is outside the file");
205649
- const count2 = Number(objectCount);
205753
+ const count3 = Number(objectCount);
205650
205754
  const tableAt = Number(table);
205651
205755
  let budget = MAX_OBJECTS;
205652
205756
  const active2 = /* @__PURE__ */ new Set();
@@ -205673,7 +205777,7 @@ function parseBinary(b3) {
205673
205777
  return b3.readUIntBE(at2, refSize);
205674
205778
  };
205675
205779
  const read2 = (index, depth) => {
205676
- if (index >= count2)
205780
+ if (index >= count3)
205677
205781
  throw badPlist("binary plist has a reference out of range");
205678
205782
  if (depth >= MAX_DEPTH)
205679
205783
  throw badPlist(`nested too deep (over ${MAX_DEPTH})`);
@@ -215250,10 +215354,10 @@ function lengthChecks(text30) {
215250
215354
  return checks;
215251
215355
  }
215252
215356
  function summarize4(checks, strict) {
215253
- const count2 = (s5) => checks.filter((c2) => c2.severity === s5).length;
215254
- const errors = count2("error");
215255
- const warnings = count2("warning");
215256
- return { errors, warnings, infos: count2("info"), blocking: errors + (strict ? warnings : 0) };
215357
+ const count3 = (s5) => checks.filter((c2) => c2.severity === s5).length;
215358
+ const errors = count3("error");
215359
+ const warnings = count3("warning");
215360
+ return { errors, warnings, infos: count3("info"), blocking: errors + (strict ? warnings : 0) };
215257
215361
  }
215258
215362
  var SPACE, phrase, marker2, OTHER_STORES, CONTENT_RULES, TOKEN, LABELS, COPYRIGHT_YEAR, AGE_RATING_BOOLEANS, AGE_RATING_LEVELS, LEVEL_VALUES, AGE_RATING_OPTIONAL, AGE_RATING_FIX, REQUIRED_IPAD, RANK3, ValidateApi;
215259
215363
  var init_validate2 = __esm({
@@ -234852,6 +234956,29 @@ async function readRecord3(ref, app2, clients) {
234852
234956
  return { drift: [], view: { source: "live", sourceNote: "read live from Google: the store record could not be read (see record.error).", record: { ...key4 ? { appKey: key4 } : {}, error: scrubSecrets(e2?.message ?? String(e2)) } } };
234853
234957
  }
234854
234958
  }
234959
+ async function readPool(ref, app2, nowMs) {
234960
+ try {
234961
+ const record5 = new StoreRecord(ref.root);
234962
+ const key4 = await recordReadKey(record5, app2.packageName, appKeyFor(app2, ref));
234963
+ const closed = await record5.read(key4, CLOSED_TEST_PATH);
234964
+ const pool2 = poolOf(closed);
234965
+ if (!pool2)
234966
+ return void 0;
234967
+ const access3 = await record5.read(key4, PRODUCTION_ACCESS_PATH2);
234968
+ const asOf = closed.live.fetched?.[POOL_READ] ?? closed.live.fetchedAt;
234969
+ const readiness2 = closedTestReadiness(closed, access3, nowMs);
234970
+ const ended = ["ending", "archived"].includes(pool2.status);
234971
+ const parts = [`pool: ${pool2.installed}/${pool2.of} phones, day ${pool2.day} of ${POOL_DAYS} (as of ${ago(asOf, nowMs)})`];
234972
+ if (pool2.status !== "active")
234973
+ parts.push(`pool ${pool2.status}`);
234974
+ if (ended && pool2.groupOnTrack)
234975
+ parts.push("group still on track: the owner removes the pool's tester group from the closed track");
234976
+ parts.push(readiness2.done ? "closed test done: 14 days at 12 or more phones and the production access card says eligible" : `closed test not done: ${readiness2.reasons.join("; ")}`);
234977
+ return { ...pool2, asOf, age: ago(asOf, nowMs), readiness: readiness2, line: parts.join("; ") };
234978
+ } catch (e2) {
234979
+ return { error: scrubSecrets(e2?.message ?? String(e2)) };
234980
+ }
234981
+ }
234855
234982
  function nothingLeft(r3) {
234856
234983
  if (!r3)
234857
234984
  return "Nothing is left to do.";
@@ -235022,6 +235149,7 @@ var init_store_android = __esm({
235022
235149
  }
235023
235150
  gaps.push(...todo(steps).map((s5) => `${s5.id}: ${s5.title}`));
235024
235151
  const complete = !error && !todo(steps).length && !signing && !fromRecord?.stale;
235152
+ const pool2 = ref ? await readPool(ref, app2, nowOf(clients)) : void 0;
235025
235153
  return ok2({
235026
235154
  platform: "android",
235027
235155
  packageName: app2.packageName,
@@ -235034,7 +235162,8 @@ var init_store_android = __esm({
235034
235162
  ...error ? { error } : {},
235035
235163
  complete,
235036
235164
  ...fromRecord ? fromRecord.view : {},
235037
- next: `${driftNote(fromRecord?.drift ?? [])}${error ? `This status is incomplete: Google could not be read (${error}).` : `${staleNote(fromRecord)}${signing ? "The host's signing path does not fit this package: fix the app's facts before store_plan." : !todo(steps).length ? nothingLeft(fromRecord) : "store_plan plans what it can of these as jobs; the rest is the owner's."}`}`
235165
+ ...pool2 ? { pool: pool2 } : {},
235166
+ next: `${driftNote(fromRecord?.drift ?? [])}${typeof pool2?.line === "string" ? `${pool2.line}. ` : ""}${error ? `This status is incomplete: Google could not be read (${error}).` : `${staleNote(fromRecord)}${signing ? "The host's signing path does not fit this package: fix the app's facts before store_plan." : !todo(steps).length ? nothingLeft(fromRecord) : "store_plan plans what it can of these as jobs; the rest is the owner's."}`}`
235038
235167
  });
235039
235168
  },
235040
235169
  async plan(google, ctx, appRef2, ref) {
@@ -235275,7 +235404,7 @@ async function recordAppleApplied(ctx, host, jobs) {
235275
235404
  return {};
235276
235405
  const warnings = [];
235277
235406
  let files = 0;
235278
- let count2 = 0;
235407
+ let count3 = 0;
235279
235408
  try {
235280
235409
  const record5 = new StoreRecord(ref.root);
235281
235410
  const api4 = await ctx.api({ readOnly: true });
@@ -235305,7 +235434,7 @@ async function recordAppleApplied(ctx, host, jobs) {
235305
235434
  }
235306
235435
  const out2 = await recordAppleJob(record5, job, { api: api4, ...now ? { now: () => new Date(now()) } : {}, ...appKey ? { appKey } : {} });
235307
235436
  files += out2.files.length;
235308
- count2++;
235437
+ count3++;
235309
235438
  warnings.push(...out2.warnings.map((w2) => `${job.id}: ${w2}`));
235310
235439
  } catch (e2) {
235311
235440
  warnings.push(`${label4}: ${e2?.message ?? String(e2)}`);
@@ -235314,7 +235443,7 @@ async function recordAppleApplied(ctx, host, jobs) {
235314
235443
  } catch (e2) {
235315
235444
  warnings.push(e2?.message ?? String(e2));
235316
235445
  }
235317
- return { ...count2 ? { record: { jobs: count2, files } } : {}, ...warnings.length ? { recordWarning: scrubSecrets(warnings.join("; ")) } : {} };
235446
+ return { ...count3 ? { record: { jobs: count3, files } } : {}, ...warnings.length ? { recordWarning: scrubSecrets(warnings.join("; ")) } : {} };
235318
235447
  }
235319
235448
  function connectView(r3) {
235320
235449
  if (r3.status !== "connected")
@@ -240561,16 +240690,16 @@ function authoredControls(raw) {
240561
240690
  const controls = /* @__PURE__ */ new Set();
240562
240691
  const byScreen = /* @__PURE__ */ new Map();
240563
240692
  const inviteDisabled = /* @__PURE__ */ new Set();
240564
- let count2 = 0;
240693
+ let count3 = 0;
240565
240694
  for (const [screenId, rawScreen] of Object.entries(screens)) {
240566
240695
  const screen = object11(rawScreen);
240567
240696
  const headerId = typeof screen?.headerId === "string" ? screen.headerId : void 0;
240568
240697
  const screenControls = /* @__PURE__ */ new Set();
240569
240698
  byScreen.set(screenId, screenControls);
240570
240699
  if (!headerId) continue;
240571
- count2++;
240700
+ count3++;
240572
240701
  const header2 = object11(headers2[headerId]);
240573
- if (!header2) return { controls, byScreen, inviteDisabled, screens: count2, error: `Authored header ${headerId} is missing for screen ${screenId}.` };
240702
+ if (!header2) return { controls, byScreen, inviteDisabled, screens: count3, error: `Authored header ${headerId} is missing for screen ${screenId}.` };
240574
240703
  const settings = object11(header2?.settings) ?? header2;
240575
240704
  const topBarSettings = object11(settings?.topBarSettings);
240576
240705
  const choice = (modern, legacy) => {
@@ -240583,7 +240712,7 @@ function authoredControls(raw) {
240583
240712
  const showCart = choice("showCartIcon", "showCartIconInTopBar");
240584
240713
  const showChat = choice("showChatIcon", "showChatIconInTopBar");
240585
240714
  if (showCart === void 0 || showChat === void 0) {
240586
- return { controls, byScreen, inviteDisabled, screens: count2, error: `Authored cart/chat settings are invalid for screen ${screenId} (header ${headerId}).` };
240715
+ return { controls, byScreen, inviteDisabled, screens: count3, error: `Authored cart/chat settings are invalid for screen ${screenId} (header ${headerId}).` };
240587
240716
  }
240588
240717
  if (showCart) {
240589
240718
  controls.add("cart");
@@ -240599,8 +240728,8 @@ function authoredControls(raw) {
240599
240728
  screenControls.add("invite");
240600
240729
  }
240601
240730
  }
240602
- if (!count2) return { controls, byScreen, inviteDisabled, screens: 0, error: "No screen references an authored header in raw-structure.json." };
240603
- return { controls, byScreen, inviteDisabled, screens: count2 };
240731
+ if (!count3) return { controls, byScreen, inviteDisabled, screens: 0, error: "No screen references an authored header in raw-structure.json." };
240732
+ return { controls, byScreen, inviteDisabled, screens: count3 };
240604
240733
  }
240605
240734
  function property(node3, name) {
240606
240735
  const item2 = node3?.properties.find((candidate) => ts19.isPropertyAssignment(candidate) && ((ts19.isIdentifier(candidate.name) || ts19.isStringLiteral(candidate.name)) && candidate.name.text === name));
@@ -242875,9 +243004,9 @@ function planDetail(p2) {
242875
243004
  const pricing = p2.pricing && typeof p2.pricing === "object" ? p2.pricing : void 0;
242876
243005
  const sub = pricing?.subscription && typeof pricing.subscription === "object" ? pricing.subscription : void 0;
242877
243006
  const cycleDur = sub?.cycleDuration && typeof sub.cycleDuration === "object" ? sub.cycleDuration : void 0;
242878
- const count2 = cycleDur?.count;
243007
+ const count3 = cycleDur?.count;
242879
243008
  const unit = str12(cycleDur?.unit ?? cycleDur?.period).toLowerCase();
242880
- const cycle = typeof count2 === "number" && unit ? `${count2} ${unit}` : str12(sub?.cycle ?? pricing?.cycle ?? p2.period ?? p2.billingPeriod);
243009
+ const cycle = typeof count3 === "number" && unit ? `${count3} ${unit}` : str12(sub?.cycle ?? pricing?.cycle ?? p2.period ?? p2.billingPeriod);
242881
243010
  const perks = asArr(p2.perks ?? p2.benefits).map((x2) => str12(x2) || str12(x2.name)).filter(Boolean);
242882
243011
  const bits = [cycle, perks.slice(0, 4).join("; ")].filter(Boolean);
242883
243012
  return bits.length ? bits.join(" \xB7 ") : void 0;
@@ -250977,6 +251106,68 @@ __export(store_relops_pool_exports, {
250977
251106
  STORE_RELOPS_POOL_USAGE: () => STORE_RELOPS_POOL_USAGE,
250978
251107
  runStoreRelopsPool: () => runStoreRelopsPool
250979
251108
  });
251109
+ function poolFromAnswer(op, body, held, at2) {
251110
+ if (typeof body.state !== "string") return void 0;
251111
+ if (op === "status") {
251112
+ if (held?.groupOnTrack === true && body.state !== "active") {
251113
+ const { source: _source, ...snapshot4 } = held;
251114
+ return { ...snapshot4, status: body.state };
251115
+ }
251116
+ return { status: body.state, installed: body.installed ?? 0, of: body.of ?? 12, day: body.day ?? 0, startedAt: body.addedAt ?? held?.startedAt ?? at2 };
251117
+ }
251118
+ if (op === "add") return { status: body.state, installed: 0, of: 12, day: 0, startedAt: at2 };
251119
+ return { status: body.state, installed: held?.installed ?? 0, of: held?.of ?? 12, day: held?.day ?? 0, startedAt: held?.startedAt ?? at2, groupOnTrack: true };
251120
+ }
251121
+ async function recordPool(op, app2, site, body, io2, deps, owner) {
251122
+ const env = deps.env ?? process.env;
251123
+ const at2 = new Date((deps.now ?? Date.now)()).toISOString();
251124
+ const out2 = { written: false };
251125
+ const warn4 = (line) => io2.error(`[himi store] warning: ${line}`);
251126
+ let lib;
251127
+ let record5;
251128
+ try {
251129
+ lib = await Promise.resolve().then(() => (init_store_record(), store_record_exports));
251130
+ const { storeRecordRootOf: storeRecordRootOf2 } = await Promise.resolve().then(() => (init_store_host(), store_host_exports));
251131
+ const root = storeRecordRootOf2(env);
251132
+ record5 = new lib.StoreRecord(root);
251133
+ const storeRecord = await Promise.resolve().then(() => (init_store_record2(), store_record_exports2));
251134
+ let pulled = storeRecord.storeRecordSyncOff(env);
251135
+ if (!pulled && owner.ok) {
251136
+ const pull = await storeRecord.pullStoreRecord({ app: app2, site, root, session: owner.session, ...deps.fetchImpl ? { fetchImpl: deps.fetchImpl } : {} });
251137
+ pulled = pull.ok;
251138
+ if (!pull.ok) {
251139
+ out2.syncWarning = `the store record of ${app2} was not read from Wix, so it was not pushed: ${pull.error}`;
251140
+ warn4(out2.syncWarning);
251141
+ }
251142
+ }
251143
+ const held = lib.poolOf(await record5.read(app2, lib.CLOSED_TEST_PATH));
251144
+ const pool2 = poolFromAnswer(op, body, held, at2);
251145
+ if (pool2) {
251146
+ try {
251147
+ await lib.writePoolStatus(record5, app2, pool2, { at: at2 });
251148
+ out2.written = true;
251149
+ } catch (e2) {
251150
+ out2.warning = `the pool status was not written into the store record of ${app2}: ${e2.message}`;
251151
+ warn4(out2.warning);
251152
+ }
251153
+ }
251154
+ if (out2.written && pulled) {
251155
+ const synced = await storeRecord.autoSyncStoreRecord({ identity: { himiAppId: app2, msid: site }, env, log: (l3) => io2.error(l3), deps: { session: async () => owner, ...deps.fetchImpl ? { fetchImpl: deps.fetchImpl } : {} } });
251156
+ out2.synced = synced.synced;
251157
+ if (synced.warning) out2.syncWarning = synced.warning;
251158
+ }
251159
+ } catch (e2) {
251160
+ out2.warning ??= `the store record of ${app2} was not read or written: ${e2.message}`;
251161
+ warn4(out2.warning);
251162
+ return out2;
251163
+ }
251164
+ try {
251165
+ out2.readiness = lib.closedTestReadiness(await record5.read(app2, lib.CLOSED_TEST_PATH), await record5.read(app2, lib.PRODUCTION_ACCESS_PATH), Date.parse(at2));
251166
+ } catch (e2) {
251167
+ warn4(`the closed test's readiness of ${app2} was not read: ${e2.message}`);
251168
+ }
251169
+ return out2;
251170
+ }
250980
251171
  function fail14(io2, code2, error, extra = {}) {
250981
251172
  io2.error(JSON.stringify({ ok: false, code: code2, error, ...extra }));
250982
251173
  return code2 === "invalid_usage" ? 2 : 1;
@@ -251025,29 +251216,53 @@ async function runStoreRelopsPool(pos, flags, io2, deps = {}) {
251025
251216
  );
251026
251217
  }
251027
251218
  if (all) {
251219
+ const json9 = flags.json === true || flags.json === "true";
251220
+ const records = [];
251221
+ for (const e2 of body.cancelled ?? []) {
251222
+ if (typeof e2?.app !== "string" || typeof e2?.site !== "string") continue;
251223
+ const s5 = e2.site.toLowerCase();
251224
+ records.push({ app: e2.app, site: s5, record: await recordPool("end", e2.app, s5, { state: typeof e2.state === "string" ? e2.state : "ending" }, io2, deps, owner) });
251225
+ }
251226
+ if (json9) {
251227
+ io2.log(JSON.stringify({ ok: true, op, all: true, ...body, records }));
251228
+ return 0;
251229
+ }
251028
251230
  io2.log(`Cancelled ${body.cancelled?.length ?? 0} Himi pool entr${body.cancelled?.length === 1 ? "y" : "ies"}.`);
251029
- for (const e2 of body.cancelled ?? []) io2.log(` ${e2.packageName} app ${e2.app} site ${e2.site}`);
251231
+ for (const e2 of body.cancelled ?? []) {
251232
+ io2.log(` ${e2.packageName} app ${e2.app} site ${e2.site}`);
251233
+ const ready2 = readinessLine(records.find((r3) => r3.app === e2.app && r3.site === String(e2.site).toLowerCase())?.record.readiness);
251234
+ if (ready2) io2.log(` ${ready2}`);
251235
+ }
251030
251236
  const left = body.notArchived ?? [];
251031
251237
  io2.log(left.length ? `${left.length} not archived after the wait; the daily sweep follows them (state "stuck" after 3 days).` : "Nothing left in the pool.");
251032
251238
  io2.log("Ask each owner to remove the pool's group from the closed track: himi store google testers pool-remove");
251033
251239
  return 0;
251034
251240
  }
251241
+ const rec = await recordPool(op, app2, site.toLowerCase(), body, io2, deps, owner);
251242
+ if (flags.json === true || flags.json === "true") {
251243
+ io2.log(JSON.stringify({ ok: true, op, app: app2, site: site.toLowerCase(), ...body, record: rec }));
251244
+ return 0;
251245
+ }
251246
+ const ready = readinessLine(rec.readiness);
251035
251247
  if (op === "add") {
251036
251248
  io2.log(`On the pool: ${body.packageName} (app ${app2}, site ${site}). Deadline ${body.deadline}.`);
251037
251249
  io2.log(`Owner's step: ${body.ownerStep}`);
251038
251250
  io2.log(`Owner's command (on their computer, with HIMI_POOL_TESTER_GROUP set): ${ownerCommand(OWNER_POOL_ADD, body.packageName)}`);
251251
+ if (ready) io2.log(ready);
251039
251252
  return 0;
251040
251253
  }
251041
251254
  if (op === "end") {
251042
251255
  io2.log(`Ended: ${body.packageName} is cancelled on the pool (state ${body.state}); the phones uninstall it.`);
251043
251256
  io2.log(`Owner's step: ${body.ownerStep}`);
251044
251257
  io2.log(`Owner's command (on their computer, with HIMI_POOL_TESTER_GROUP set): ${ownerCommand(OWNER_POOL_REMOVE, body.packageName)}`);
251258
+ if (ready) io2.log(ready);
251045
251259
  return 0;
251046
251260
  }
251047
251261
  io2.log(`${body.packageName ?? "(no entry)"}: ${body.installed}/${body.of} installed, day ${body.day} of ${body.days}, state ${body.state ?? "none"}${body.serviceStatus ? ` (service ${body.serviceStatus})` : ""}`);
251262
+ if (ready) io2.log(ready);
251048
251263
  return 0;
251049
251264
  }
251050
- var STORE_POOL_PATH, STORE_POOL_TEARDOWN_PATH, OWNER_POOL_ADD, ownerCommand, OWNER_POOL_REMOVE, STORE_RELOPS_POOL_USAGE, text22, SITE_RE9;
251265
+ var STORE_POOL_PATH, STORE_POOL_TEARDOWN_PATH, OWNER_POOL_ADD, ownerCommand, OWNER_POOL_REMOVE, STORE_RELOPS_POOL_USAGE, readinessLine, text22, SITE_RE9;
251051
251266
  var init_store_relops_pool = __esm({
251052
251267
  "src/store-relops-pool.ts"() {
251053
251268
  init_define_HHP_CATALOG();
@@ -251057,6 +251272,7 @@ var init_store_relops_pool = __esm({
251057
251272
  ownerCommand = (base2, pkg) => typeof pkg === "string" && pkg ? `${base2} --android-package ${pkg}` : base2;
251058
251273
  OWNER_POOL_REMOVE = "himi store google testers pool-remove --dir <app> --track alpha";
251059
251274
  STORE_RELOPS_POOL_USAGE = "himi store relops pool add|status|end --app <id> --site <msid> | himi store relops pool end --all-himi";
251275
+ readinessLine = (r3) => !r3 ? void 0 : r3.done ? "Closed test: done (14 days, 12 or more installed, production access eligible)." : `Closed test: not done: ${r3.reasons.join("; ")}.`;
251060
251276
  text22 = (v2) => typeof v2 === "string" && v2.trim() ? v2.trim() : void 0;
251061
251277
  SITE_RE9 = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
251062
251278
  }
@@ -260100,7 +260316,7 @@ function placeholder2(f2, i2) {
260100
260316
  }
260101
260317
  }
260102
260318
  function writeBase44SeedRows(opts) {
260103
- const { dir, app: app2, count: count2 = 8 } = opts;
260319
+ const { dir, app: app2, count: count3 = 8 } = opts;
260104
260320
  const path2 = join179(dir, BASE44_SEED_FILE);
260105
260321
  const owned = opts.entities.filter((s5) => !!s5 && typeof s5 === "object" && isOwnedEntity(s5) && (!opts.only || opts.only.includes(physicalEntityName(s5, app2)) || opts.only.includes(s5.name ?? "")));
260106
260322
  if (!owned.length) {
@@ -260125,8 +260341,8 @@ function writeBase44SeedRows(opts) {
260125
260341
  fieldless.push(name);
260126
260342
  continue;
260127
260343
  }
260128
- existing[name] = Array.from({ length: count2 }, (_2, i2) => Object.fromEntries((spec.fields ?? []).map((f2) => [f2.key, placeholder2(f2, i2)])));
260129
- entities[name] = count2;
260344
+ existing[name] = Array.from({ length: count3 }, (_2, i2) => Object.fromEntries((spec.fields ?? []).map((f2) => [f2.key, placeholder2(f2, i2)])));
260345
+ entities[name] = count3;
260130
260346
  }
260131
260347
  writeFileSync63(path2, `${JSON.stringify(existing, null, 2)}
260132
260348
  `);
@@ -260143,7 +260359,7 @@ ${(s5.fields ?? []).map((f2) => ` ${f2.key} (${f2.type}${f2.format ? `, ${f
260143
260359
  schema2,
260144
260360
  ``,
260145
260361
  `Rules:`,
260146
- ` - Keep the exact JSON shape: one key per entity name, an array of ${count2} row objects.`,
260362
+ ` - Keep the exact JSON shape: one key per entity name, an array of ${count3} row objects.`,
260147
260363
  ` - Use ONLY the field keys listed above and keep each value's JSON type; an enum field takes one of its listed values.`,
260148
260364
  ` - Make the content specific and plausible for this app's domain. No "Lorem ipsum", no "Sample item 1".`,
260149
260365
  ` - Leave any entity key already in the file that is not listed above untouched.`,
@@ -266746,8 +266962,8 @@ function composed2(id, s5, svc, nodes2) {
266746
266962
  function programsLimit(section3, settings) {
266747
266963
  const extra = obj8(section3.extraProps);
266748
266964
  const authored2 = extra.limit ?? settings.limit;
266749
- const count2 = countOf2(authored2);
266750
- if (count2 !== void 0) return count2;
266965
+ const count3 = countOf2(authored2);
266966
+ if (count3 !== void 0) return count3;
266751
266967
  if (settings.isInfinite === true || settings.infinite === true || settings.allowInfinite === true || extra.infinite === true || extra.allowInfinite === true) return void 0;
266752
266968
  if (authored2 === void 0 || authored2 === null) return PROGRAMS_DEFAULT_LIMIT;
266753
266969
  return void 0;
@@ -266796,8 +267012,8 @@ function blogOptions(st2) {
266796
267012
  const content = obj8(st2.contentSettings);
266797
267013
  const display = obj8(st2.displayOptions);
266798
267014
  const raw = content.postsPerCategory;
266799
- const count2 = typeof raw === "string" ? /^\d+$/.test(raw) ? Number(raw) : void 0 : Number.isSafeInteger(raw) ? raw : void 0;
266800
- const limit = count2 !== void 0 && count2 > 0 ? count2 : void 0;
267015
+ const count3 = typeof raw === "string" ? /^\d+$/.test(raw) ? Number(raw) : void 0 : Number.isSafeInteger(raw) ? raw : void 0;
267016
+ const limit = count3 !== void 0 && count3 > 0 ? count3 : void 0;
266801
267017
  const base2 = {
266802
267018
  ...str16(content.categoryId).trim() && str16(content.categoryId).trim() !== "all" ? { categoryId: str16(content.categoryId).trim() } : {},
266803
267019
  // Only the facts the source switches on; an absent key stays hidden.
@@ -267365,8 +267581,8 @@ var init_generate2 = __esm({
267365
267581
  stores_products_carousel_section: (_section, st2) => collectionParams(st2)
267366
267582
  };
267367
267583
  countOf2 = (value2) => {
267368
- const count2 = typeof value2 === "string" ? /^\d+$/.test(value2) ? Number(value2) : void 0 : Number.isSafeInteger(value2) ? value2 : void 0;
267369
- return count2 !== void 0 && count2 > 0 ? count2 : void 0;
267584
+ const count3 = typeof value2 === "string" ? /^\d+$/.test(value2) ? Number(value2) : void 0 : Number.isSafeInteger(value2) ? value2 : void 0;
267585
+ return count3 !== void 0 && count3 > 0 ? count3 : void 0;
267370
267586
  };
267371
267587
  SCREEN_ADAPTATIONS = {
267372
267588
  upcoming_bookings_section: (st2) => [
@@ -271989,13 +272205,13 @@ function duplicateMedia(look, probes) {
271989
272205
  const k3 = mediaKey(u2);
271990
272206
  counts.set(k3, (counts.get(k3) ?? 0) + 1);
271991
272207
  }
271992
- for (const [k3, count2] of counts) {
271993
- if (count2 < DUPLICATE_MEDIA_MIN || out2.length >= CAP4.perKind) continue;
272208
+ for (const [k3, count3] of counts) {
272209
+ if (count3 < DUPLICATE_MEDIA_MIN || out2.length >= CAP4.perKind) continue;
271994
272210
  out2.push({
271995
272211
  kind: "duplicate-media",
271996
272212
  value: k3.slice(0, 80),
271997
272213
  where: [where],
271998
- note: `the same image is used ${count2} times here \u2014 template filler, not ${count2} distinct photos; do not present it as the business's gallery`
272214
+ note: `the same image is used ${count3} times here \u2014 template filler, not ${count3} distinct photos; do not present it as the business's gallery`
271999
272215
  });
272000
272216
  }
272001
272217
  };
@@ -281168,11 +281384,11 @@ async function progressCommand2(ctx) {
281168
281384
  try {
281169
281385
  const entry = appendProgress2(dir, { message: message5, ...step ? { step } : {}, images });
281170
281386
  const notified = flags.notify === true ? await notifyDesktop2(`himi \xB7 ${appLabel2(dir) ?? "your app"}`, message5) : void 0;
281171
- const { count: count2 } = summarizeProgress2(readProgress2(dir).entries);
281387
+ const { count: count3 } = summarizeProgress2(readProgress2(dir).entries);
281172
281388
  const imageAttached = (entry.images?.length ?? 0) > 0;
281173
281389
  const handed = handover && isContentPackage ? (await Promise.resolve().then(() => (init_milestones(), milestones_exports))).afterHandoverPostcard(dir, { content: str3(flags.content) }) : null;
281174
281390
  const progressReminder = isContentPackage ? (await Promise.resolve().then(() => (init_milestones(), milestones_exports))).watchReminder(dir, { content: str3(flags.content) }) : void 0;
281175
- print({ ok: true, entry, journal: journal2, count: count2, imageAttached, ...imageNote ? { imageNote } : {}, ...notified === void 0 ? {} : { notified }, ...handed ? { makingOf: handed.makingOf, next: handed.next } : {}, ...hint, ...progressReminder ? { reminder: progressReminder } : {} });
281391
+ print({ ok: true, entry, journal: journal2, count: count3, imageAttached, ...imageNote ? { imageNote } : {}, ...notified === void 0 ? {} : { notified }, ...handed ? { makingOf: handed.makingOf, next: handed.next } : {}, ...hint, ...progressReminder ? { reminder: progressReminder } : {} });
281176
281392
  return 0;
281177
281393
  } catch (e2) {
281178
281394
  if (e2 instanceof ProgressError2) {
@@ -281717,7 +281933,7 @@ async function testCommand(ctx) {
281717
281933
  coverage: {
281718
281934
  screens: crawledScreens.size,
281719
281935
  actionsDispatched: result.actions.exercised,
281720
- uncoveredFns: (result.crawled ?? []).reduce((count2, screen) => count2 + (screen.uncoveredFunctions?.length ?? 0), 0),
281936
+ uncoveredFns: (result.crawled ?? []).reduce((count3, screen) => count3 + (screen.uncoveredFunctions?.length ?? 0), 0),
281721
281937
  gaps: ledger.length
281722
281938
  },
281723
281939
  report: {
@@ -287746,14 +287962,14 @@ async function seedCms(opts) {
287746
287962
  report9.ok = false;
287747
287963
  continue;
287748
287964
  }
287749
- const count2 = await countItems(call, id);
287750
- if (count2 === null && !force) {
287965
+ const count3 = await countItems(call, id);
287966
+ if (count3 === null && !force) {
287751
287967
  report9.skipped.push({ collection: id, reason: "could not read the current row count, so seeding might bury existing content. Re-run, or pass --force if you are sure." });
287752
287968
  report9.ok = false;
287753
287969
  continue;
287754
287970
  }
287755
- if (count2 !== null && count2 > 0 && !force) {
287756
- report9.skipped.push({ collection: id, reason: `already has ${count2} items \u2014 seeding an already-populated collection needs --force so real content is never buried under sample rows` });
287971
+ if (count3 !== null && count3 > 0 && !force) {
287972
+ report9.skipped.push({ collection: id, reason: `already has ${count3} items \u2014 seeding an already-populated collection needs --force so real content is never buried under sample rows` });
287757
287973
  continue;
287758
287974
  }
287759
287975
  let inserted = rows.length;
@@ -287886,7 +288102,7 @@ function placeholder(type2, key4, i2) {
287886
288102
  }
287887
288103
  }
287888
288104
  async function writeSeedRows(opts) {
287889
- const { app: app2, cms, dir, count: count2 = 8 } = opts;
288105
+ const { app: app2, cms, dir, count: count3 = 8 } = opts;
287890
288106
  const file2 = join171(dir, "cms-seed.json");
287891
288107
  const owned = (cms?.collections ?? []).filter((s5) => s5.id?.startsWith(namespacePrefix(app2)));
287892
288108
  if (!owned.length) {
@@ -287917,10 +288133,10 @@ async function writeSeedRows(opts) {
287917
288133
  const collections2 = {};
287918
288134
  for (const spec of owned) {
287919
288135
  existing[spec.id] = Array.from(
287920
- { length: count2 },
288136
+ { length: count3 },
287921
288137
  (_2, i2) => Object.fromEntries(spec.fields.map((f2) => [f2.key, placeholder(f2.type, f2.displayName || f2.key, i2)]))
287922
288138
  );
287923
- collections2[spec.id] = count2;
288139
+ collections2[spec.id] = count3;
287924
288140
  }
287925
288141
  writeFileSync56(file2, `${JSON.stringify(existing, null, 2)}
287926
288142
  `);
@@ -287935,7 +288151,7 @@ ${s5.fields.map((f2) => ` ${f2.key} (${f2.type})`).join("\n")}`
287935
288151
  schema2,
287936
288152
  ``,
287937
288153
  `Rules:`,
287938
- ` - Keep the exact same JSON shape: one key per collection id, an array of ${count2} row objects.`,
288154
+ ` - Keep the exact same JSON shape: one key per collection id, an array of ${count3} row objects.`,
287939
288155
  ` - Use ONLY the field keys listed above, and keep each value's JSON type (TEXT\u2192string, NUMBER\u2192number, BOOLEAN\u2192boolean, DATE/DATETIME\u2192ISO string, IMAGE/VIDEO/AUDIO/DOCUMENT\u2192an https URL).`,
287940
288156
  ` - Make the content specific and plausible for this app's domain \u2014 real-sounding names, sensible prices, varied categories. No "Lorem ipsum", no "Sample item 1".`,
287941
288157
  ` - Leave any collection key already in the file that is not listed above untouched.`,