@feedmepos/mf-miniprogram-v2 0.1.0-dev.29 → 0.1.0-dev.30

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.
@@ -208,15 +208,15 @@ ${f}` : f;
208
208
  `, 1)[0], T = !x.trim(), c = 0;
209
209
  if (this.options.pedantic ? (c = 2, f = x.trimStart()) : T ? c = e[1].length + 1 : (c = x.search(this.rules.other.nonSpaceChar), c = c > 4 ? 1 : c, f = x.slice(c), c += e[1].length), T && this.rules.other.blankLine.test(g) && (d += g + `
210
210
  `, t = t.substring(g.length + 1), i = !0), !i) {
211
- let y = this.rules.other.nextBulletRegex(c), w = this.rules.other.hrRegex(c), E = this.rules.other.fencesBeginRegex(c), v = this.rules.other.headingBeginRegex(c), R = this.rules.other.htmlBeginRegex(c), C = this.rules.other.blockquoteBeginRegex(c);
211
+ let y = this.rules.other.nextBulletRegex(c), k = this.rules.other.hrRegex(c), E = this.rules.other.fencesBeginRegex(c), v = this.rules.other.headingBeginRegex(c), R = this.rules.other.htmlBeginRegex(c), C = this.rules.other.blockquoteBeginRegex(c);
212
212
  for (; t; ) {
213
213
  let N = t.split(`
214
214
  `, 1)[0], H;
215
- if (g = N, this.options.pedantic ? (g = g.replace(this.rules.other.listReplaceNesting, " "), H = g) : H = g.replace(this.rules.other.tabCharGlobal, " "), E.test(g) || v.test(g) || R.test(g) || C.test(g) || y.test(g) || w.test(g)) break;
215
+ if (g = N, this.options.pedantic ? (g = g.replace(this.rules.other.listReplaceNesting, " "), H = g) : H = g.replace(this.rules.other.tabCharGlobal, " "), E.test(g) || v.test(g) || R.test(g) || C.test(g) || y.test(g) || k.test(g)) break;
216
216
  if (H.search(this.rules.other.nonSpaceChar) >= c || !g.trim()) f += `
217
217
  ` + H.slice(c);
218
218
  else {
219
- if (T || x.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || E.test(x) || v.test(x) || w.test(x)) break;
219
+ if (T || x.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || E.test(x) || v.test(x) || k.test(x)) break;
220
220
  f += `
221
221
  ` + g;
222
222
  }
@@ -585,7 +585,7 @@ ${f}` : f;
585
585
  }
586
586
  l || (a = ""), l = !1;
587
587
  let c;
588
- if ((g = (x = this.options.extensions) == null ? void 0 : x.inline) != null && g.some((w) => (c = w.call({ lexer: this }, e, n)) ? (e = e.substring(c.raw.length), n.push(c), !0) : !1)) continue;
588
+ if ((g = (x = this.options.extensions) == null ? void 0 : x.inline) != null && g.some((k) => (c = k.call({ lexer: this }, e, n)) ? (e = e.substring(c.raw.length), n.push(c), !0) : !1)) continue;
589
589
  if (c = this.tokenizer.escape(e)) {
590
590
  e = e.substring(c.raw.length), n.push(c);
591
591
  continue;
@@ -600,8 +600,8 @@ ${f}` : f;
600
600
  }
601
601
  if (c = this.tokenizer.reflink(e, this.tokens.links)) {
602
602
  e = e.substring(c.raw.length);
603
- let w = n.at(-1);
604
- c.type === "text" && (w == null ? void 0 : w.type) === "text" ? (w.raw += c.raw, w.text += c.text) : n.push(c);
603
+ let k = n.at(-1);
604
+ c.type === "text" && (k == null ? void 0 : k.type) === "text" ? (k.raw += c.raw, k.text += c.text) : n.push(c);
605
605
  continue;
606
606
  }
607
607
  if (c = this.tokenizer.emStrong(e, r, a)) {
@@ -630,15 +630,15 @@ ${f}` : f;
630
630
  }
631
631
  let y = e;
632
632
  if ((T = this.options.extensions) != null && T.startInline) {
633
- let w = 1 / 0, E = e.slice(1), v;
633
+ let k = 1 / 0, E = e.slice(1), v;
634
634
  this.options.extensions.startInline.forEach((R) => {
635
- v = R.call({ lexer: this }, E), typeof v == "number" && v >= 0 && (w = Math.min(w, v));
636
- }), w < 1 / 0 && w >= 0 && (y = e.substring(0, w + 1));
635
+ v = R.call({ lexer: this }, E), typeof v == "number" && v >= 0 && (k = Math.min(k, v));
636
+ }), k < 1 / 0 && k >= 0 && (y = e.substring(0, k + 1));
637
637
  }
638
638
  if (c = this.tokenizer.inlineText(y)) {
639
639
  e = e.substring(c.raw.length), c.raw.slice(-1) !== "_" && (a = c.raw.slice(-1)), l = !0;
640
- let w = n.at(-1);
641
- (w == null ? void 0 : w.type) === "text" ? (w.raw += c.raw, w.text += c.text) : n.push(c);
640
+ let k = n.at(-1);
641
+ (k == null ? void 0 : k.type) === "text" ? (k.raw += c.raw, k.text += c.text) : n.push(c);
642
642
  continue;
643
643
  }
644
644
  if (e) {
@@ -2167,7 +2167,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), O = L, fe = V), ne ==
2167
2167
  relevance: O.secondBest.relevance
2168
2168
  }), ye("after:highlightElement", { el: L, result: O, text: fe });
2169
2169
  }
2170
- function w(L) {
2170
+ function k(L) {
2171
2171
  a = Ns(a, L);
2172
2172
  }
2173
2173
  const E = () => {
@@ -2254,7 +2254,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), O = L, fe = V), ne ==
2254
2254
  highlightElement: y,
2255
2255
  // TODO: Remove with v12 API
2256
2256
  highlightBlock: he,
2257
- configure: w,
2257
+ configure: k,
2258
2258
  initHighlighting: E,
2259
2259
  initHighlightingOnLoad: v,
2260
2260
  registerLanguage: N,
@@ -2510,7 +2510,7 @@ function Wa() {
2510
2510
  t.DocumentFragment;
2511
2511
  const o = t.HTMLTemplateElement, l = t.Node, a = t.Element, i = t.NodeFilter, d = t.NamedNodeMap;
2512
2512
  d === void 0 && (t.NamedNodeMap || t.MozNamedAttrMap), t.HTMLFormElement;
2513
- const f = t.DOMParser, x = t.trustedTypes, g = a.prototype, T = Dt(g, "cloneNode"), c = Dt(g, "remove"), y = Dt(g, "nextSibling"), w = Dt(g, "childNodes"), E = Dt(g, "parentNode"), v = Dt(g, "shadowRoot"), R = Dt(g, "attributes"), C = l && l.prototype ? Dt(l.prototype, "nodeType") : null, N = l && l.prototype ? Dt(l.prototype, "nodeName") : null;
2513
+ const f = t.DOMParser, x = t.trustedTypes, g = a.prototype, T = Dt(g, "cloneNode"), c = Dt(g, "remove"), y = Dt(g, "nextSibling"), k = Dt(g, "childNodes"), E = Dt(g, "parentNode"), v = Dt(g, "shadowRoot"), R = Dt(g, "attributes"), C = l && l.prototype ? Dt(l.prototype, "nodeType") : null, N = l && l.prototype ? Dt(l.prototype, "nodeName") : null;
2514
2514
  if (typeof o == "function") {
2515
2515
  const Y = n.createElement("template");
2516
2516
  Y.content && Y.content.ownerDocument && (n = Y.content.ownerDocument);
@@ -2621,7 +2621,7 @@ function Wa() {
2621
2621
  const de = $e({}, ["audio", "video", "img", "source", "image", "track"]);
2622
2622
  let Oe = null;
2623
2623
  const Ge = $e({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Xe = "http://www.w3.org/1998/Math/MathML", yt = "http://www.w3.org/2000/svg", Q = "http://www.w3.org/1999/xhtml";
2624
- let Fe = Q, k = !1, U = null;
2624
+ let Fe = Q, w = !1, U = null;
2625
2625
  const Le = $e({}, [Xe, yt, Q], yr), We = ct(["mi", "mo", "mn", "ms", "mtext"]);
2626
2626
  let De = $e({}, We);
2627
2627
  const mn = ct(["annotation-xml"]);
@@ -2696,7 +2696,7 @@ function Wa() {
2696
2696
  throw Vt("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
2697
2697
  }
2698
2698
  }, cs = function(p) {
2699
- const A = w(p);
2699
+ const A = k(p);
2700
2700
  if (A) {
2701
2701
  const pe = [];
2702
2702
  yn(A, (we) => {
@@ -2757,7 +2757,7 @@ function Wa() {
2757
2757
  for (; A.length > 0; ) {
2758
2758
  const Z = A.pop();
2759
2759
  (C ? C(Z) : Z.nodeType) === Mt.element && Ni(Z);
2760
- const we = w(Z);
2760
+ const we = k(Z);
2761
2761
  if (we)
2762
2762
  for (let Pe = we.length - 1; Pe >= 0; --Pe)
2763
2763
  A.push(we[Pe]);
@@ -2780,7 +2780,7 @@ function Wa() {
2780
2780
  if (!A || !A.documentElement) {
2781
2781
  A = L.createDocument(Fe, "template", null);
2782
2782
  try {
2783
- A.documentElement.innerHTML = k ? re : pe;
2783
+ A.documentElement.innerHTML = w ? re : pe;
2784
2784
  } catch {
2785
2785
  }
2786
2786
  }
@@ -2838,7 +2838,7 @@ function Wa() {
2838
2838
  // select, etc.) regardless of whether the named child happens to
2839
2839
  // carry a numeric .length, which a typeof-based probe would miss
2840
2840
  // (e.g. HTMLSelectElement.length is a defined unsigned-long).
2841
- p.childNodes !== w(p);
2841
+ p.childNodes !== k(p);
2842
2842
  }, an = function(p) {
2843
2843
  if (!C || typeof p != "object" || p === null)
2844
2844
  return !1;
@@ -2867,7 +2867,7 @@ function Wa() {
2867
2867
  if (!Me[A] && hs(A) && (J.tagNameCheck instanceof RegExp && lt(J.tagNameCheck, A) || J.tagNameCheck instanceof Function && J.tagNameCheck(A)))
2868
2868
  return !1;
2869
2869
  if ($ && !b[A]) {
2870
- const Z = E(p), pe = w(p);
2870
+ const Z = E(p), pe = k(p);
2871
2871
  if (pe && Z) {
2872
2872
  const we = pe.length;
2873
2873
  for (let Pe = we - 1; Pe >= 0; --Pe) {
@@ -3004,7 +3004,7 @@ function Wa() {
3004
3004
  Dn(Z.shadow);
3005
3005
  continue;
3006
3006
  }
3007
- const pe = Z.node, Pe = (C ? C(pe) : pe.nodeType) === Mt.element, rt = w(pe);
3007
+ const pe = Z.node, Pe = (C ? C(pe) : pe.nodeType) === Mt.element, rt = k(pe);
3008
3008
  if (rt)
3009
3009
  for (let Je = rt.length - 1; Je >= 0; --Je)
3010
3010
  A.push({
@@ -3035,7 +3035,7 @@ function Wa() {
3035
3035
  };
3036
3036
  return e.sanitize = function(Y) {
3037
3037
  let p = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, A = null, Z = null, pe = null, we = null;
3038
- if (k = !Y, k && (Y = "<!-->"), typeof Y != "string" && !gn(Y) && (Y = Gl(Y), typeof Y != "string"))
3038
+ if (w = !Y, w && (Y = "<!-->"), typeof Y != "string" && !gn(Y) && (Y = Gl(Y), typeof Y != "string"))
3039
3039
  throw Vt("dirty is not a string, aborting");
3040
3040
  if (!e.isSupported)
3041
3041
  return Y;
@@ -3364,7 +3364,7 @@ function lc(t) {
3364
3364
  ],
3365
3365
  subLanguage: "graphql"
3366
3366
  }
3367
- }, w = {
3367
+ }, k = {
3368
3368
  className: "string",
3369
3369
  begin: "`",
3370
3370
  end: "`",
@@ -3423,7 +3423,7 @@ function lc(t) {
3423
3423
  T,
3424
3424
  c,
3425
3425
  y,
3426
- w,
3426
+ k,
3427
3427
  // Skip numbers when they are part of a variable name
3428
3428
  { match: /\$\d+/ },
3429
3429
  x
@@ -3633,7 +3633,7 @@ function lc(t) {
3633
3633
  T,
3634
3634
  c,
3635
3635
  y,
3636
- w,
3636
+ k,
3637
3637
  v,
3638
3638
  // Skip numbers when they are part of a variable name
3639
3639
  { match: /\$\d+/ },
@@ -3826,8 +3826,8 @@ function ei(t) {
3826
3826
  }, f = {
3827
3827
  className: "meta",
3828
3828
  begin: "@" + r
3829
- }, x = (y, w, E) => {
3830
- const v = y.contains.findIndex((R) => R.label === w);
3829
+ }, x = (y, k, E) => {
3830
+ const v = y.contains.findIndex((R) => R.label === k);
3831
3831
  if (v === -1)
3832
3832
  throw new Error("can not find mode to replace");
3833
3833
  y.contains.splice(v, 1, E);
@@ -4114,7 +4114,7 @@ function si(t) {
4114
4114
  ],
4115
4115
  subLanguage: "graphql"
4116
4116
  }
4117
- }, w = {
4117
+ }, k = {
4118
4118
  className: "string",
4119
4119
  begin: "`",
4120
4120
  end: "`",
@@ -4173,7 +4173,7 @@ function si(t) {
4173
4173
  T,
4174
4174
  c,
4175
4175
  y,
4176
- w,
4176
+ k,
4177
4177
  // Skip numbers when they are part of a variable name
4178
4178
  { match: /\$\d+/ },
4179
4179
  x
@@ -4383,7 +4383,7 @@ function si(t) {
4383
4383
  T,
4384
4384
  c,
4385
4385
  y,
4386
- w,
4386
+ k,
4387
4387
  v,
4388
4388
  // Skip numbers when they are part of a variable name
4389
4389
  { match: /\$\d+/ },
@@ -5806,7 +5806,7 @@ function ai(t) {
5806
5806
  "coproc",
5807
5807
  "function",
5808
5808
  "select"
5809
- ], w = [
5809
+ ], k = [
5810
5810
  "true",
5811
5811
  "false"
5812
5812
  ], E = { match: /(\/[a-z._-]+)+/ }, v = [
@@ -6034,7 +6034,7 @@ function ai(t) {
6034
6034
  keywords: {
6035
6035
  $pattern: /\b[a-z][a-z0-9._-]+\b/,
6036
6036
  keyword: y,
6037
- literal: w,
6037
+ literal: k,
6038
6038
  built_in: [
6039
6039
  ...v,
6040
6040
  ...R,
@@ -6155,7 +6155,7 @@ function ii(t) {
6155
6155
  contains: [T],
6156
6156
  illegal: "\\n",
6157
6157
  relevance: 0
6158
- }, w = [
6158
+ }, k = [
6159
6159
  r,
6160
6160
  {
6161
6161
  className: "meta",
@@ -6235,12 +6235,12 @@ function ii(t) {
6235
6235
  y,
6236
6236
  o,
6237
6237
  l
6238
- ], E = [...w];
6238
+ ], E = [...k];
6239
6239
  return E.pop(), E.push(a), T.contains = E, {
6240
6240
  name: "YAML",
6241
6241
  case_insensitive: !0,
6242
6242
  aliases: ["yml"],
6243
- contains: w
6243
+ contains: k
6244
6244
  };
6245
6245
  }
6246
6246
  function kc(t) {
@@ -6573,8 +6573,8 @@ function Pr(t) {
6573
6573
  if (!e) return null;
6574
6574
  const n = e.match(/^#([0-9a-f]{3,8})$/);
6575
6575
  if (n) {
6576
- const c = n[1] ?? "", y = (v) => parseInt(v.length === 1 ? v + v : v, 16), w = (v) => y(c.slice(v, v + 1)), E = (v) => y(c.slice(v, v + 2));
6577
- return c.length === 3 || c.length === 4 ? { r: w(0), g: w(1), b: w(2), a: c.length === 4 ? w(3) / 255 : 1 } : c.length === 6 || c.length === 8 ? { r: E(0), g: E(2), b: E(4), a: c.length === 8 ? E(6) / 255 : 1 } : null;
6576
+ const c = n[1] ?? "", y = (v) => parseInt(v.length === 1 ? v + v : v, 16), k = (v) => y(c.slice(v, v + 1)), E = (v) => y(c.slice(v, v + 2));
6577
+ return c.length === 3 || c.length === 4 ? { r: k(0), g: k(1), b: k(2), a: c.length === 4 ? k(3) / 255 : 1 } : c.length === 6 || c.length === 8 ? { r: E(0), g: E(2), b: E(4), a: c.length === 8 ? E(6) / 255 : 1 } : null;
6578
6578
  }
6579
6579
  const r = e.match(/^(rgba?|color)\(([^)]*)\)$/);
6580
6580
  if (!r) return null;
@@ -7258,9 +7258,9 @@ class td {
7258
7258
  let c = this.extractCommon(T[0], n, e, 0, r);
7259
7259
  if (T[0].oldPos + 1 >= i && c + 1 >= a)
7260
7260
  return l(this.buildValues(T[0].lastComponent, n, e));
7261
- let y = -1 / 0, w = 1 / 0;
7261
+ let y = -1 / 0, k = 1 / 0;
7262
7262
  const E = () => {
7263
- for (let v = Math.max(y, -d); v <= Math.min(w, d); v += 2) {
7263
+ for (let v = Math.max(y, -d); v <= Math.min(k, d); v += 2) {
7264
7264
  let R;
7265
7265
  const C = T[v - 1], N = T[v + 1];
7266
7266
  C && (T[v - 1] = void 0);
@@ -7276,7 +7276,7 @@ class td {
7276
7276
  }
7277
7277
  if (!re || H && C.oldPos < N.oldPos ? R = this.addToPath(N, !0, !1, 0, r) : R = this.addToPath(C, !1, !0, 1, r), c = this.extractCommon(R, n, e, v, r), R.oldPos + 1 >= i && c + 1 >= a)
7278
7278
  return l(this.buildValues(R.lastComponent, n, e)) || !0;
7279
- T[v] = R, R.oldPos + 1 >= i && (w = Math.min(w, v - 1)), c + 1 >= a && (y = Math.max(y, v + 1));
7279
+ T[v] = R, R.oldPos + 1 >= i && (k = Math.min(k, v - 1)), c + 1 >= a && (y = Math.max(y, v + 1));
7280
7280
  }
7281
7281
  d++;
7282
7282
  };
@@ -7411,15 +7411,15 @@ function ad(t) {
7411
7411
  var c;
7412
7412
  const y = {};
7413
7413
  y.hunks = [], n.push(y);
7414
- let w = !1;
7414
+ let k = !1;
7415
7415
  for (; r < e.length; ) {
7416
7416
  const E = e[r];
7417
7417
  if (l(E) || a(E))
7418
7418
  break;
7419
7419
  if (s(E)) {
7420
- if (w)
7420
+ if (k)
7421
7421
  return;
7422
- w = !0, y.isGit = !0;
7422
+ k = !0, y.isGit = !0;
7423
7423
  const v = d(E);
7424
7424
  for (v && (y.oldFileName = v.oldFileName, y.newFileName = v.newFileName), r++; r < e.length; ) {
7425
7425
  const R = e[r];
@@ -7444,9 +7444,9 @@ function ad(t) {
7444
7444
  }
7445
7445
  continue;
7446
7446
  } else if (o(E)) {
7447
- if (w)
7447
+ if (k)
7448
7448
  return;
7449
- w = !0;
7449
+ k = !0;
7450
7450
  const v = /^(?:Index:|diff(?: -r \w+)+)\s+/.exec(E);
7451
7451
  v && (y.index = E.substring(v[0].length).trim());
7452
7452
  }
@@ -7481,9 +7481,9 @@ function ad(t) {
7481
7481
  newFileName: R
7482
7482
  };
7483
7483
  }
7484
- const w = y.indexOf('"');
7485
- if (w > 0) {
7486
- const E = y.substring(0, w - 1), v = x(y.substring(w));
7484
+ const k = y.indexOf('"');
7485
+ if (k > 0) {
7486
+ const E = y.substring(0, k - 1), v = x(y.substring(k));
7487
7487
  return v === null ? null : {
7488
7488
  oldFileName: E,
7489
7489
  newFileName: v.fileName
@@ -7515,12 +7515,12 @@ function ad(t) {
7515
7515
  function x(c) {
7516
7516
  if (!c.startsWith('"'))
7517
7517
  return null;
7518
- let y = "", w = 1;
7519
- for (; w < c.length; ) {
7520
- if (c[w] === '"')
7521
- return { fileName: y, rawLength: w + 1 };
7522
- if (c[w] === "\\" && w + 1 < c.length)
7523
- switch (w++, c[w]) {
7518
+ let y = "", k = 1;
7519
+ for (; k < c.length; ) {
7520
+ if (c[k] === '"')
7521
+ return { fileName: y, rawLength: k + 1 };
7522
+ if (c[k] === "\\" && k + 1 < c.length)
7523
+ switch (k++, c[k]) {
7524
7524
  case "a":
7525
7525
  y += "\x07";
7526
7526
  break;
@@ -7557,13 +7557,13 @@ function ad(t) {
7557
7557
  case "5":
7558
7558
  case "6":
7559
7559
  case "7": {
7560
- if (w + 2 >= c.length || c[w + 1] < "0" || c[w + 1] > "7" || c[w + 2] < "0" || c[w + 2] > "7")
7560
+ if (k + 2 >= c.length || c[k + 1] < "0" || c[k + 1] > "7" || c[k + 2] < "0" || c[k + 2] > "7")
7561
7561
  return null;
7562
- const E = [parseInt(c.substring(w, w + 3), 8)];
7563
- for (w += 3; c[w] === "\\" && c[w + 1] >= "0" && c[w + 1] <= "7"; ) {
7564
- if (w + 3 >= c.length || c[w + 2] < "0" || c[w + 2] > "7" || c[w + 3] < "0" || c[w + 3] > "7")
7562
+ const E = [parseInt(c.substring(k, k + 3), 8)];
7563
+ for (k += 3; c[k] === "\\" && c[k + 1] >= "0" && c[k + 1] <= "7"; ) {
7564
+ if (k + 3 >= c.length || c[k + 2] < "0" || c[k + 2] > "7" || c[k + 3] < "0" || c[k + 3] > "7")
7565
7565
  return null;
7566
- E.push(parseInt(c.substring(w + 1, w + 4), 8)), w += 4;
7566
+ E.push(parseInt(c.substring(k + 1, k + 4), 8)), k += 4;
7567
7567
  }
7568
7568
  y += new TextDecoder("utf-8").decode(new Uint8Array(E));
7569
7569
  continue;
@@ -7572,22 +7572,22 @@ function ad(t) {
7572
7572
  return null;
7573
7573
  }
7574
7574
  else
7575
- y += c[w];
7576
- w++;
7575
+ y += c[k];
7576
+ k++;
7577
7577
  }
7578
7578
  return null;
7579
7579
  }
7580
7580
  function g(c) {
7581
7581
  const y = /^(---|\+\+\+)\s+/.exec(e[r]);
7582
7582
  if (y) {
7583
- const w = y[1], E = e[r].substring(3).trim().split(" ", 2), v = (E[1] || "").trim();
7583
+ const k = y[1], E = e[r].substring(3).trim().split(" ", 2), v = (E[1] || "").trim();
7584
7584
  let R = E[0];
7585
- R.startsWith('"') ? R = f(R) : R = R.replace(/\\\\/g, "\\"), w === "---" ? (c.oldFileName = R, c.oldHeader = v) : (c.newFileName = R, c.newHeader = v), r++;
7585
+ R.startsWith('"') ? R = f(R) : R = R.replace(/\\\\/g, "\\"), k === "---" ? (c.oldFileName = R, c.oldHeader = v) : (c.newFileName = R, c.newHeader = v), r++;
7586
7586
  }
7587
7587
  }
7588
7588
  function T() {
7589
7589
  var c;
7590
- const y = r, w = e[r++], E = w.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/), v = {
7590
+ const y = r, k = e[r++], E = k.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/), v = {
7591
7591
  oldStart: +E[1],
7592
7592
  oldLines: typeof E[2] > "u" ? 1 : +E[2],
7593
7593
  newStart: +E[3],
@@ -7639,17 +7639,17 @@ function id(t, e, n, r, s, o, l) {
7639
7639
  });
7640
7640
  }
7641
7641
  const g = [];
7642
- let T = 0, c = 0, y = [], w = 1, E = 1;
7642
+ let T = 0, c = 0, y = [], k = 1, E = 1;
7643
7643
  for (let v = 0; v < f.length; v++) {
7644
7644
  const R = f[v], C = R.lines || od(R.value);
7645
7645
  if (R.lines = C, R.added || R.removed) {
7646
7646
  if (!T) {
7647
7647
  const N = f[v - 1];
7648
- T = w, c = E, N && (y = i > 0 ? x(N.lines.slice(-i)) : [], T -= y.length, c -= y.length);
7648
+ T = k, c = E, N && (y = i > 0 ? x(N.lines.slice(-i)) : [], T -= y.length, c -= y.length);
7649
7649
  }
7650
7650
  for (const N of C)
7651
7651
  y.push((R.added ? "+" : "-") + N);
7652
- R.added ? E += C.length : w += C.length;
7652
+ R.added ? E += C.length : k += C.length;
7653
7653
  } else {
7654
7654
  if (T)
7655
7655
  if (C.length <= i * 2 && v < f.length - 2)
@@ -7661,14 +7661,14 @@ function id(t, e, n, r, s, o, l) {
7661
7661
  y.push(re);
7662
7662
  const H = {
7663
7663
  oldStart: T,
7664
- oldLines: w - T + N,
7664
+ oldLines: k - T + N,
7665
7665
  newStart: c,
7666
7666
  newLines: E - c + N,
7667
7667
  lines: y
7668
7668
  };
7669
7669
  g.push(H), T = 0, c = 0, y = [];
7670
7670
  }
7671
- w += C.length, E += C.length;
7671
+ k += C.length, E += C.length;
7672
7672
  }
7673
7673
  }
7674
7674
  for (const v of g)
@@ -7716,20 +7716,20 @@ const ld = { class: "diff-card my-[6px] min-w-0 max-w-full overflow-hidden round
7716
7716
  setup(t) {
7717
7717
  const e = t, n = ie(!1);
7718
7718
  function r(g, T, c, y) {
7719
- const w = T === 1 ? `${g}` : `${g},${T}`, E = y === 1 ? `${c}` : `${c},${y}`;
7720
- return `@@ -${w} +${E} @@`;
7719
+ const k = T === 1 ? `${g}` : `${g},${T}`, E = y === 1 ? `${c}` : `${c},${y}`;
7720
+ return `@@ -${k} +${E} @@`;
7721
7721
  }
7722
7722
  function s(g, T = 3) {
7723
7723
  return g.flatMap((c) => {
7724
- const y = [], w = [];
7724
+ const y = [], k = [];
7725
7725
  let E = c.oldStart, v = c.newStart;
7726
7726
  if (c.lines.forEach((C, N) => {
7727
7727
  y.push({ oldNumber: E, newNumber: v });
7728
7728
  const H = C[0] ?? " ";
7729
- (H === "+" || H === "-") && w.push(N), H !== "+" && H !== "\\" && E++, H !== "-" && H !== "\\" && v++;
7730
- }), !w.length) return [];
7729
+ (H === "+" || H === "-") && k.push(N), H !== "+" && H !== "\\" && E++, H !== "-" && H !== "\\" && v++;
7730
+ }), !k.length) return [];
7731
7731
  const R = [];
7732
- for (const C of w) {
7732
+ for (const C of k) {
7733
7733
  const N = Math.max(0, C - T), H = Math.min(c.lines.length - 1, C + T), re = R[R.length - 1];
7734
7734
  re && N <= re.end + 1 ? re.end = Math.max(re.end, H) : R.push({ start: N, end: H });
7735
7735
  }
@@ -7749,7 +7749,7 @@ const ld = { class: "diff-card my-[6px] min-w-0 max-w-full overflow-hidden round
7749
7749
  function o(g) {
7750
7750
  return g.map((T) => {
7751
7751
  let c = T.oldStart, y = T.newStart;
7752
- const w = T.lines.map((E) => {
7752
+ const k = T.lines.map((E) => {
7753
7753
  const v = E[0] ?? " ", R = E.slice(1);
7754
7754
  return v === "+" ? { kind: "added", oldNumber: null, newNumber: y++, marker: v, text: R } : v === "-" ? { kind: "removed", oldNumber: c++, newNumber: null, marker: v, text: R } : v === "\\" ? { kind: "meta", oldNumber: null, newNumber: null, marker: "", text: E } : {
7755
7755
  kind: "context",
@@ -7761,7 +7761,7 @@ const ld = { class: "diff-card my-[6px] min-w-0 max-w-full overflow-hidden round
7761
7761
  });
7762
7762
  return {
7763
7763
  header: r(T.oldStart, T.oldLines, T.newStart, T.newLines),
7764
- rows: w
7764
+ rows: k
7765
7765
  };
7766
7766
  });
7767
7767
  }
@@ -7789,7 +7789,7 @@ const ld = { class: "diff-card my-[6px] min-w-0 max-w-full overflow-hidden round
7789
7789
  type: "button",
7790
7790
  class: "flex w-full min-w-0 cursor-pointer items-center gap-[6px] border-0 bg-transparent px-[8px] py-[7px] text-left hover:bg-fm-color-neutral-gray-100",
7791
7791
  "aria-expanded": n.value,
7792
- onClick: T[0] || (T[0] = (w) => n.value = !n.value)
7792
+ onClick: T[0] || (T[0] = (k) => n.value = !n.value)
7793
7793
  }, [
7794
7794
  t.loading ? (m(), ve(c, {
7795
7795
  key: 0,
@@ -7814,8 +7814,8 @@ const ld = { class: "diff-card my-[6px] min-w-0 max-w-full overflow-hidden round
7814
7814
  }, null, 8, ["class"])
7815
7815
  ], 8, cd),
7816
7816
  n.value ? (m(), _("div", hd, [
7817
- a.value.length ? (m(!0), _(xe, { key: 0 }, Ee(a.value, (w, E) => (m(), _("details", {
7818
- key: w.file,
7817
+ a.value.length ? (m(!0), _(xe, { key: 0 }, Ee(a.value, (k, E) => (m(), _("details", {
7818
+ key: k.file,
7819
7819
  class: "diff-file border-b border-fm-color-neutral-gray-100 last:border-b-0",
7820
7820
  open: E === 0
7821
7821
  }, [
@@ -7833,16 +7833,16 @@ const ld = { class: "diff-card my-[6px] min-w-0 max-w-full overflow-hidden round
7833
7833
  }),
7834
7834
  h("span", {
7835
7835
  class: "min-w-0 flex-1 truncate font-mono text-[10px] leading-[16px] text-fm-color-typo-secondary",
7836
- title: w.file
7837
- }, I(w.file), 9, bd),
7836
+ title: k.file
7837
+ }, I(k.file), 9, bd),
7838
7838
  h("span", yd, [
7839
- h("span", vd, "+" + I(w.additions), 1),
7840
- h("span", xd, "-" + I(w.deletions), 1)
7839
+ h("span", vd, "+" + I(k.additions), 1),
7840
+ h("span", xd, "-" + I(k.deletions), 1)
7841
7841
  ])
7842
7842
  ]),
7843
7843
  h("div", _d, [
7844
- (m(!0), _(xe, null, Ee(w.hunks, (v, R) => (m(), _("div", {
7845
- key: `${w.file}-${R}`,
7844
+ (m(!0), _(xe, null, Ee(k.hunks, (v, R) => (m(), _("div", {
7845
+ key: `${k.file}-${R}`,
7846
7846
  class: "diff-hunk"
7847
7847
  }, [
7848
7848
  h("div", wd, [
@@ -7862,11 +7862,11 @@ const ld = { class: "diff-card my-[6px] min-w-0 max-w-full overflow-hidden round
7862
7862
  ])
7863
7863
  ], 2))), 128))
7864
7864
  ]))), 128)),
7865
- w.hunks.length === 0 ? (m(), _("div", Cd, " No textual changes to display. ")) : j("", !0)
7865
+ k.hunks.length === 0 ? (m(), _("div", Cd, " No textual changes to display. ")) : j("", !0)
7866
7866
  ])
7867
7867
  ], 8, md))), 128)) : (m(), _("div", Rd, [
7868
- (m(!0), _(xe, null, Ee(t.files, (w) => (m(), _("div", {
7869
- key: w,
7868
+ (m(!0), _(xe, null, Ee(t.files, (k) => (m(), _("div", {
7869
+ key: k,
7870
7870
  class: "flex min-w-0 items-center gap-[6px] py-[2px]"
7871
7871
  }, [
7872
7872
  W(y, {
@@ -7876,8 +7876,8 @@ const ld = { class: "diff-card my-[6px] min-w-0 max-w-full overflow-hidden round
7876
7876
  }),
7877
7877
  h("span", {
7878
7878
  class: "min-w-0 truncate font-mono text-[10px] leading-[16px] text-fm-color-typo-secondary",
7879
- title: w
7880
- }, I(w), 9, $d)
7879
+ title: k
7880
+ }, I(k), 9, $d)
7881
7881
  ]))), 128)),
7882
7882
  t.loading ? (m(), _("p", Id, " The readable diff will appear when the agent finishes this step. ")) : j("", !0)
7883
7883
  ]))
@@ -8082,7 +8082,7 @@ const Gd = { class: "flex h-full min-w-0 flex-col bg-fm-color-neutral-white" },
8082
8082
  }) : K.push(te);
8083
8083
  }
8084
8084
  return K;
8085
- }), w = F(() => {
8085
+ }), k = F(() => {
8086
8086
  for (let K = y.value.length - 1; K >= 0; K -= 1) {
8087
8087
  const te = y.value[K];
8088
8088
  if ((te == null ? void 0 : te.role) === "assistant" && te.parentId && !te.busy && (te.changedFiles.length > 0 || te.diffs.length > 0)) return te.parentId;
@@ -8159,7 +8159,7 @@ const Gd = { class: "flex h-full min-w-0 flex-col bg-fm-color-neutral-white" },
8159
8159
  (m(!0), _(xe, null, Ee(y.value, (he) => (m(), ve(ia, {
8160
8160
  key: he.key,
8161
8161
  message: he,
8162
- "can-undo": !t.chat.readOnly && he.parentId === w.value,
8162
+ "can-undo": !t.chat.readOnly && he.parentId === k.value,
8163
8163
  undoing: t.chat.checkpointSaving,
8164
8164
  onUndo: (L) => E(he)
8165
8165
  }, null, 8, ["message", "can-undo", "undoing", "onUndo"]))), 128)),
@@ -8416,34 +8416,34 @@ const Gd = { class: "flex h-full min-w-0 flex-col bg-fm-color-neutral-white" },
8416
8416
  class: "flex flex-col gap-4"
8417
8417
  }, [
8418
8418
  h("h4", pp, I(y.name), 1),
8419
- (m(!0), _(xe, null, Ee(y.fields, (w) => (m(), _("div", {
8420
- key: w.path,
8419
+ (m(!0), _(xe, null, Ee(y.fields, (k) => (m(), _("div", {
8420
+ key: k.path,
8421
8421
  class: "flex items-center gap-8",
8422
- title: w.hint
8422
+ title: k.hint
8423
8423
  }, [
8424
8424
  h("label", {
8425
- for: `bk-${w.path}`,
8425
+ for: `bk-${k.path}`,
8426
8426
  class: "w-[84px] shrink-0 fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
8427
8427
  }, [
8428
- Ke(I(w.label) + " ", 1),
8429
- l("colors", w.path) ? (m(), _("span", mp, "•")) : j("", !0)
8428
+ Ke(I(k.label) + " ", 1),
8429
+ l("colors", k.path) ? (m(), _("span", mp, "•")) : j("", !0)
8430
8430
  ], 8, hp),
8431
8431
  h("input", {
8432
8432
  type: "color",
8433
8433
  class: "brandkit-panel__swatch",
8434
- value: M(Cu)(M(r).state.colors[w.path] || ""),
8435
- "aria-label": `${y.name} ${w.label} color`,
8436
- onInput: (E) => a(w.path, E)
8434
+ value: M(Cu)(M(r).state.colors[k.path] || ""),
8435
+ "aria-label": `${y.name} ${k.label} color`,
8436
+ onInput: (E) => a(k.path, E)
8437
8437
  }, null, 40, gp),
8438
8438
  Yn(h("input", {
8439
- id: `bk-${w.path}`,
8440
- "onUpdate:modelValue": (E) => M(r).state.colors[w.path] = E,
8439
+ id: `bk-${k.path}`,
8440
+ "onUpdate:modelValue": (E) => M(r).state.colors[k.path] = E,
8441
8441
  type: "text",
8442
8442
  spellcheck: "false",
8443
8443
  placeholder: "#000000",
8444
- class: ke(["brandkit-panel__hex", { "brandkit-panel__hex--invalid": (M(r).state.colors[w.path] ?? "") !== "" && !M(ts)(M(r).state.colors[w.path] ?? "") }])
8444
+ class: ke(["brandkit-panel__hex", { "brandkit-panel__hex--invalid": (M(r).state.colors[k.path] ?? "") !== "" && !M(ts)(M(r).state.colors[k.path] ?? "") }])
8445
8445
  }, null, 10, bp), [
8446
- [Xn, M(r).state.colors[w.path]]
8446
+ [Xn, M(r).state.colors[k.path]]
8447
8447
  ])
8448
8448
  ], 8, fp))), 128))
8449
8449
  ]))), 128)),
@@ -8463,7 +8463,7 @@ const Gd = { class: "flex h-full min-w-0 flex-col bg-fm-color-neutral-white" },
8463
8463
  ], 8, xp),
8464
8464
  Yn(h("input", {
8465
8465
  id: `bk-font-${y.path}`,
8466
- "onUpdate:modelValue": (w) => M(r).state.fonts[y.path] = w,
8466
+ "onUpdate:modelValue": (k) => M(r).state.fonts[y.path] = k,
8467
8467
  type: "text",
8468
8468
  spellcheck: "false",
8469
8469
  placeholder: "'Poppins', system-ui, sans-serif",
@@ -8544,7 +8544,7 @@ const Gd = { class: "flex h-full min-w-0 flex-col bg-fm-color-neutral-white" },
8544
8544
  disabled: t.disabled,
8545
8545
  "aria-expanded": s.value,
8546
8546
  "aria-label": `Edit ${t.label} color, currently ${i.value}`,
8547
- onClick: c[0] || (c[0] = (w) => s.value = !s.value)
8547
+ onClick: c[0] || (c[0] = (k) => s.value = !s.value)
8548
8548
  }, [
8549
8549
  h("span", {
8550
8550
  class: ke(["color-field__swatch", { "color-field__swatch--empty": d.value }])
@@ -8572,21 +8572,21 @@ const Gd = { class: "flex h-full min-w-0 flex-col bg-fm-color-neutral-white" },
8572
8572
  title: "No color",
8573
8573
  "aria-label": `Clear ${t.label}`,
8574
8574
  disabled: t.disabled,
8575
- onClick: c[1] || (c[1] = (w) => x("transparent"))
8575
+ onClick: c[1] || (c[1] = (k) => x("transparent"))
8576
8576
  }, [...c[4] || (c[4] = [
8577
8577
  h("span", null, null, -1)
8578
8578
  ])], 10, Pp),
8579
- (m(!0), _(xe, null, Ee(t.presets, (w) => (m(), _("button", {
8580
- key: w.key,
8579
+ (m(!0), _(xe, null, Ee(t.presets, (k) => (m(), _("button", {
8580
+ key: k.key,
8581
8581
  type: "button",
8582
- class: ke(["color-field__preset", { "color-field__preset--selected": M(rr)(t.value, w.value) }]),
8583
- title: `${w.label} · ${w.value}`,
8584
- "aria-label": `Use ${w.label} for ${t.label}`,
8582
+ class: ke(["color-field__preset", { "color-field__preset--selected": M(rr)(t.value, k.value) }]),
8583
+ title: `${k.label} · ${k.value}`,
8584
+ "aria-label": `Use ${k.label} for ${t.label}`,
8585
8585
  disabled: t.disabled,
8586
- onClick: (E) => x(w.value)
8586
+ onClick: (E) => x(k.value)
8587
8587
  }, [
8588
8588
  h("span", {
8589
- style: It({ background: w.value })
8589
+ style: It({ background: k.value })
8590
8590
  }, null, 4)
8591
8591
  ], 10, Mp))), 128))
8592
8592
  ]),
@@ -8597,7 +8597,7 @@ const Gd = { class: "flex h-full min-w-0 flex-col bg-fm-color-neutral-white" },
8597
8597
  type: "color",
8598
8598
  class: "color-field__picker",
8599
8599
  "aria-label": `Custom ${t.label} color`,
8600
- onInput: c[2] || (c[2] = (w) => x(w.target.value))
8600
+ onInput: c[2] || (c[2] = (k) => x(k.target.value))
8601
8601
  }, null, 40, Dp),
8602
8602
  h("input", {
8603
8603
  value: t.value,
@@ -8607,7 +8607,7 @@ const Gd = { class: "flex h-full min-w-0 flex-col bg-fm-color-neutral-white" },
8607
8607
  placeholder: "#hex or rgb()",
8608
8608
  class: "color-field__text",
8609
8609
  "aria-label": `${t.label} value`,
8610
- onChange: c[3] || (c[3] = (w) => x(w.target.value))
8610
+ onChange: c[3] || (c[3] = (k) => x(k.target.value))
8611
8611
  }, null, 40, zp),
8612
8612
  M(f) ? (m(), _("button", {
8613
8613
  key: 0,
@@ -8675,13 +8675,13 @@ const Gd = { class: "flex h-full min-w-0 flex-col bg-fm-color-neutral-white" },
8675
8675
  }), y = F(() => {
8676
8676
  const B = Number(l.value);
8677
8677
  return Number.isFinite(B) ? Math.round(B * 100) : 100;
8678
- }), w = ie(!1), E = F(() => i.value ?? { top: "0px", right: "0px", bottom: "0px", left: "0px" }), v = F(() => {
8678
+ }), k = ie(!1), E = F(() => i.value ?? { top: "0px", right: "0px", bottom: "0px", left: "0px" }), v = F(() => {
8679
8679
  const B = E.value;
8680
8680
  return B.top === B.right && B.right === B.bottom && B.bottom === B.left;
8681
8681
  }), R = F(() => {
8682
8682
  var B;
8683
8683
  return ((B = qt(E.value.top)) == null ? void 0 : B.unit) ?? g.value;
8684
- }), C = F(() => n.spec.control === "box" && (w.value || !v.value)), N = F(() => n.spec.control === "box"), H = F(() => N.value ? R.value : T.value), re = F(() => {
8684
+ }), C = F(() => n.spec.control === "box" && (k.value || !v.value)), N = F(() => n.spec.control === "box"), H = F(() => N.value ? R.value : T.value), re = F(() => {
8685
8685
  var B;
8686
8686
  return N.value ? ((B = qt(E.value.top)) == null ? void 0 : B.value) ?? 0 : c.value ?? "";
8687
8687
  }), X = F(() => {
@@ -8765,10 +8765,10 @@ const Gd = { class: "flex h-full min-w-0 flex-col bg-fm-color-neutral-white" },
8765
8765
  }
8766
8766
  function kt() {
8767
8767
  if (!C.value) {
8768
- w.value = !0;
8768
+ k.value = !0;
8769
8769
  return;
8770
8770
  }
8771
- w.value = !1, r("update", E.value.top);
8771
+ k.value = !1, r("update", E.value.top);
8772
8772
  }
8773
8773
  function _t(B) {
8774
8774
  if (N.value) return oe(B, "all");
@@ -9026,7 +9026,7 @@ const Gd = { class: "flex h-full min-w-0 flex-col bg-fm-color-neutral-white" },
9026
9026
  const v = n.beforeValues[E] ?? "";
9027
9027
  return `Reset to ${(Bt(E).control === "color" ? ur(v) ?? v : v) || "unset"}`;
9028
9028
  }
9029
- function w(E) {
9029
+ function k(E) {
9030
9030
  return Jc(n.element, E) ? `${Bt(E).label} — CSS ignores this on an inline element; set Display to block or inline-block first` : Bt(E).label;
9031
9031
  }
9032
9032
  return (E, v) => {
@@ -9116,7 +9116,7 @@ const Gd = { class: "flex h-full min-w-0 flex-col bg-fm-color-neutral-white" },
9116
9116
  }, [
9117
9117
  h("div", Of, [
9118
9118
  h("span", {
9119
- title: w(N)
9119
+ title: k(N)
9120
9120
  }, I(M(Bt)(N).label), 9, Pf),
9121
9121
  l.value.has(N) ? (m(), _("button", {
9122
9122
  key: 0,
@@ -9223,7 +9223,7 @@ const Uf = { class: "relative flex h-full min-w-0 flex-col bg-fm-color-neutral-w
9223
9223
  },
9224
9224
  setup(t) {
9225
9225
  const e = t, n = ba(), r = ss(), s = ie(0), o = ie("iphone-15"), l = ie(yi(oa, !1)), a = ie(!1), i = ie(null), d = ie(null), f = ie(null), x = ie(1), g = ie([]), T = ie([]), c = ie(null), y = ie(!1);
9226
- let w = 1, E = 1, v = null;
9226
+ let k = 1, E = 1, v = null;
9227
9227
  const R = [
9228
9228
  { key: "iphone-se", label: "iPhone SE", width: 375, height: 667 },
9229
9229
  { key: "iphone-15", label: "iPhone 15", width: 393, height: 852 },
@@ -9362,7 +9362,7 @@ const Uf = { class: "relative flex h-full min-w-0 flex-col bg-fm-color-neutral-w
9362
9362
  }
9363
9363
  function B(u, b) {
9364
9364
  if (!a.value) return;
9365
- const P = w++, ee = {
9365
+ const P = k++, ee = {
9366
9366
  id: P,
9367
9367
  feedback: "",
9368
9368
  device: N.value,
@@ -9678,7 +9678,7 @@ ${Yu(u.map(Pt))}`;
9678
9678
  c.value ? (m(), _("p", Zf, I(c.value), 1)) : j("", !0),
9679
9679
  h("div", Yf, [
9680
9680
  (m(!0), _(xe, null, Ee(g.value, (Q) => {
9681
- var Fe, k, U, Le;
9681
+ var Fe, w, U, Le;
9682
9682
  return m(), _("div", {
9683
9683
  key: Q.id,
9684
9684
  class: ke(["flex min-w-0 flex-col gap-6 rounded-md border p-[8px]", i.value === Q.id ? "border-fm-color-primary" : "border-fm-color-neutral-gray-200"])
@@ -9705,7 +9705,7 @@ ${Yu(u.map(Pt))}`;
9705
9705
  ]),
9706
9706
  _: 2
9707
9707
  }, 1032, ["variant"])) : j("", !0),
9708
- (k = Q.payload) != null && k.element ? (m(), _("button", {
9708
+ (w = Q.payload) != null && w.element ? (m(), _("button", {
9709
9709
  key: 1,
9710
9710
  type: "button",
9711
9711
  class: ke(["preview__mini-icon-button", { "preview__mini-icon-button--active": He(Q.id) }]),
@@ -9941,13 +9941,13 @@ ${Yu(u.map(Pt))}`;
9941
9941
  const x = a ?? ((c) => new Promise((y) => setTimeout(y, c)));
9942
9942
  return { stream: async function* () {
9943
9943
  let c = s ?? 3e3, y = 0;
9944
- const w = d.signal ?? new AbortController().signal;
9945
- for (; !w.aborted; ) {
9944
+ const k = d.signal ?? new AbortController().signal;
9945
+ for (; !k.aborted; ) {
9946
9946
  y++;
9947
9947
  const E = d.headers instanceof Headers ? d.headers : new Headers(d.headers);
9948
9948
  f !== void 0 && E.set("Last-Event-ID", f);
9949
9949
  try {
9950
- const v = await fetch(i, { ...d, headers: E, signal: w });
9950
+ const v = await fetch(i, { ...d, headers: E, signal: k });
9951
9951
  if (!v.ok)
9952
9952
  throw new Error(`SSE failed: ${v.status} ${v.statusText}`);
9953
9953
  if (!v.body)
@@ -9960,7 +9960,7 @@ ${Yu(u.map(Pt))}`;
9960
9960
  } catch {
9961
9961
  }
9962
9962
  };
9963
- w.addEventListener("abort", N);
9963
+ k.addEventListener("abort", N);
9964
9964
  try {
9965
9965
  for (; ; ) {
9966
9966
  const { done: H, value: re } = await R.read();
@@ -10005,7 +10005,7 @@ ${Yu(u.map(Pt))}`;
10005
10005
  }
10006
10006
  }
10007
10007
  } finally {
10008
- w.removeEventListener("abort", N), R.releaseLock();
10008
+ k.removeEventListener("abort", N), R.releaseLock();
10009
10009
  }
10010
10010
  break;
10011
10011
  } catch (v) {
@@ -10358,13 +10358,13 @@ const Dh = () => ({
10358
10358
  ...y
10359
10359
  };
10360
10360
  }
10361
- const w = await c.text();
10361
+ const k = await c.text();
10362
10362
  let E;
10363
10363
  try {
10364
- E = JSON.parse(w);
10364
+ E = JSON.parse(k);
10365
10365
  } catch {
10366
10366
  }
10367
- const v = E ?? w;
10367
+ const v = E ?? k;
10368
10368
  let R = v;
10369
10369
  for (const C of s.error._fns)
10370
10370
  C && (R = await C(v, c, g, d));
@@ -11386,7 +11386,7 @@ function _m(t) {
11386
11386
  return t.type === "text" ? { kind: "text", id: t.id, text: t.text } : t.type === "reasoning" ? { kind: "reasoning", id: t.id, text: t.text } : t.type === "tool" ? { kind: "tool", id: t.id, tool: t.tool, state: t.state } : t.type === "file" ? { kind: "file", id: t.id, mime: t.mime, filename: t.filename, url: t.url } : null;
11387
11387
  }
11388
11388
  function wm() {
11389
- const t = ie("idle"), e = ie("No session selected"), n = ie(null), r = ie(!1), s = ie(null), o = ie(!1), l = ie(!1), a = ie(null), i = ie(null), d = ie(null), f = ie(!1), x = ie(!1), g = ie(0), T = ie(null), c = ie(!1), y = ie(!1), w = ie([]), E = qn({}), v = /* @__PURE__ */ new Map(), R = /* @__PURE__ */ new Set(), C = ie(da()), N = F(() => C.value.pending.map((S) => S.message)), H = ie(0);
11389
+ const t = ie("idle"), e = ie("No session selected"), n = ie(null), r = ie(!1), s = ie(null), o = ie(!1), l = ie(!1), a = ie(null), i = ie(null), d = ie(null), f = ie(!1), x = ie(!1), g = ie(0), T = ie(null), c = ie(!1), y = ie(!1), k = ie([]), E = qn({}), v = /* @__PURE__ */ new Map(), R = /* @__PURE__ */ new Set(), C = ie(da()), N = F(() => C.value.pending.map((S) => S.message)), H = ie(0);
11390
11390
  let re = null, X = 0, Se = 0, Te = !1;
11391
11391
  const K = mm(), te = /* @__PURE__ */ new Map();
11392
11392
  let ue = null, ye = null;
@@ -11416,7 +11416,7 @@ function wm() {
11416
11416
  }, ym));
11417
11417
  }
11418
11418
  function fe() {
11419
- V(), w.value = [];
11419
+ V(), k.value = [];
11420
11420
  for (const S of Object.keys(E)) delete E[S];
11421
11421
  v.clear(), R.clear(), H.value++;
11422
11422
  }
@@ -11440,10 +11440,10 @@ function wm() {
11440
11440
  diffs: [],
11441
11441
  busy: !0
11442
11442
  };
11443
- return E[S] = b, w.value.push(S), v.set(S, S), H.value++, b;
11443
+ return E[S] = b, k.value.push(S), v.set(S, S), H.value++, b;
11444
11444
  }
11445
11445
  function Be(S) {
11446
- return w.value.map(($) => E[$]).filter(($) => ($ == null ? void 0 : $.role) === "assistant" && $.parentId === S);
11446
+ return k.value.map(($) => E[$]).filter(($) => ($ == null ? void 0 : $.role) === "assistant" && $.parentId === S);
11447
11447
  }
11448
11448
  function Ne(S) {
11449
11449
  const $ = Be(S), G = $[$.length - 1];
@@ -11562,7 +11562,7 @@ function wm() {
11562
11562
  function ce() {
11563
11563
  let S = null;
11564
11564
  l.value = !1;
11565
- for (const G of w.value) {
11565
+ for (const G of k.value) {
11566
11566
  const u = E[G];
11567
11567
  (u == null ? void 0 : u.role) === "assistant" && (u.busy = !1);
11568
11568
  }
@@ -11657,7 +11657,7 @@ function wm() {
11657
11657
  );
11658
11658
  if (!u.ok) continue;
11659
11659
  const { label: b } = await u.json();
11660
- G && b && (e.value = b);
11660
+ G && b && b !== "Ready" && (e.value = b);
11661
11661
  } catch {
11662
11662
  }
11663
11663
  })(), () => {
@@ -11764,7 +11764,7 @@ function wm() {
11764
11764
  }
11765
11765
  function ge(S) {
11766
11766
  const { message: $ } = S;
11767
- E[$.key] = $, w.value.push($.key), H.value++;
11767
+ E[$.key] = $, k.value.push($.key), H.value++;
11768
11768
  }
11769
11769
  function _e(S, $) {
11770
11770
  S.failureText = Ze($), S.message.promptState = "failed", S.message.errorText = S.failureText, l.value = !1;
@@ -11901,7 +11901,7 @@ function wm() {
11901
11901
  checkpointError: T,
11902
11902
  checkpointSaving: c,
11903
11903
  canUnrevert: y,
11904
- messagesOrder: w,
11904
+ messagesOrder: k,
11905
11905
  messagesByKey: E,
11906
11906
  queuedMessages: N,
11907
11907
  revision: H,
@@ -12003,7 +12003,7 @@ function Om() {
12003
12003
  const O = await tt(`/api/projects/${t.value}`);
12004
12004
  return e.value = O, O.provisioningStatus === "not_started" ? i.value = "Project setup required" : O.provisioningStatus === "provisioning" ? i.value = "Setting up project" : O.provisioningStatus === "failed" ? i.value = "Project setup failed" : i.value = "Project ready", O;
12005
12005
  }
12006
- async function w() {
12006
+ async function k() {
12007
12007
  c(), a.value = !0, i.value = "Setting up project";
12008
12008
  try {
12009
12009
  const O = await tt(
@@ -12261,7 +12261,7 @@ function Om() {
12261
12261
  provisioningFailed: T,
12262
12262
  syncBusiness: c,
12263
12263
  refreshProject: y,
12264
- provisionProject: w,
12264
+ provisionProject: k,
12265
12265
  refreshSessions: E,
12266
12266
  refreshReleases: v,
12267
12267
  selectRelease: N,
@@ -12362,35 +12362,35 @@ const Pm = ["aria-label", "title"], Mm = { class: "flex flex-col gap-[4px]" }, L
12362
12362
  __name: "ControlPlaneView",
12363
12363
  setup(t) {
12364
12364
  const e = zr(), n = wm(), r = Om(), s = ba(), o = ie("workspace"), l = ie(!1), a = ie(yi(ga, !1)), i = ie(!1), d = ie(null), f = ie(Bf(Ar, bb)), x = ie(!1);
12365
- let g = null, T = null, c = null, y = "", w = "", E = null;
12366
- const v = F(() => r.sessions.find((k) => k.status === "active") ?? null), R = ie(!1), C = ie(!1), N = ie(!1), H = ie(!1), re = ie(!1), X = F(
12367
- () => r.sessions.find((k) => k.id === n.workspaceSessionId) ?? v.value
12365
+ let g = null, T = null, c = null, y = "", k = "", E = null;
12366
+ const v = F(() => r.sessions.find((w) => w.status === "active") ?? null), R = ie(!1), C = ie(!1), N = ie(!1), H = ie(!1), re = ie(!1), X = F(
12367
+ () => r.sessions.find((w) => w.id === n.workspaceSessionId) ?? v.value
12368
12368
  ), Se = F(
12369
12369
  () => X.value ? Q(X.value) : "Workspace"
12370
12370
  ), Te = F(() => {
12371
- const k = r.latestRelease;
12372
- return k ? k.is_live === 1 ? "Latest release is live" : k.build_status === "succeeded" ? "Release ready to go live" : k.build_status === "failed" ? "Build failed" : "Release build in progress" : "No release has been built yet";
12371
+ const w = r.latestRelease;
12372
+ return w ? w.is_live === 1 ? "Latest release is live" : w.build_status === "succeeded" ? "Release ready to go live" : w.build_status === "failed" ? "Build failed" : "Release build in progress" : "No release has been built yet";
12373
12373
  }), K = F(() => {
12374
- const k = r.latestRelease;
12375
- if (!k) return "Build the active session to create a release preview.";
12376
- const U = k.source_commit_sha.slice(0, 7), Le = k.build_status ? `Build ${k.build_status}` : "No build status";
12377
- return `${k.id} · ${Le} · ${U}`;
12374
+ const w = r.latestRelease;
12375
+ if (!w) return "Build the active session to create a release preview.";
12376
+ const U = w.source_commit_sha.slice(0, 7), Le = w.build_status ? `Build ${w.build_status}` : "No build status";
12377
+ return `${w.id} · ${Le} · ${U}`;
12378
12378
  }), te = F(() => {
12379
- var k;
12380
- return ((k = r.latestRelease) == null ? void 0 : k.build_status) ?? null;
12379
+ var w;
12380
+ return ((w = r.latestRelease) == null ? void 0 : w.build_status) ?? null;
12381
12381
  }), ue = F(() => {
12382
- var k;
12383
- return ((k = r.latestRelease) == null ? void 0 : k.build_logs_url) ?? null;
12384
- }), ye = F(() => r.releases.find((k) => k.is_live === 1) ?? null), he = F(() => Au()), L = F(() => {
12385
- var k;
12386
- return ((k = r.project) == null ? void 0 : k.provisioningError) ?? null;
12382
+ var w;
12383
+ return ((w = r.latestRelease) == null ? void 0 : w.build_logs_url) ?? null;
12384
+ }), ye = F(() => r.releases.find((w) => w.is_live === 1) ?? null), he = F(() => Au()), L = F(() => {
12385
+ var w;
12386
+ return ((w = r.project) == null ? void 0 : w.provisioningError) ?? null;
12387
12387
  }), V = F(() => r.busy || l.value), ne = F(() => !!(v.value && r.isProvisioned && !V.value && !n.agentBusy && !n.checkpointSaving && !r.checkpointBusy)), fe = F(() => {
12388
- const k = r.workspaceState;
12389
- return !X.value || X.value.status !== "active" ? "Read-only history" : k ? k.syncState === "unavailable" ? k.lastDurableCommitSha ? `Workspace unavailable · saved ${k.lastDurableCommitSha.slice(0, 7)}` : "Workspace unavailable" : k.syncState === "diverged" ? "Workspace diverged from main" : k.syncState === "behind" ? `${k.commitsBehindOrigin} commit${k.commitsBehindOrigin === 1 ? "" : "s"} behind main` : k.syncState === "uncommitted" ? `${k.statusCount} local change${k.statusCount === 1 ? "" : "s"} · awaiting save` : k.syncState === "unpushed" ? `${k.commitsAheadOrigin} local commit${k.commitsAheadOrigin === 1 ? "" : "s"} · not pushed` : k.syncState === "saving" || n.checkpointSaving || r.checkpointBusy ? "Saving checkpoint…" : k.syncState === "save_failed" ? "Save failed · retry scheduled" : k.lastDurableCommitSha ? `Saved to GitHub${k.lastPushedAt ? ` · ${Fe(k.lastPushedAt)}` : ""} · ${k.lastDurableCommitSha.slice(0, 7)}` : "No durable checkpoint yet" : "Checking save status…";
12388
+ const w = r.workspaceState;
12389
+ return !X.value || X.value.status !== "active" ? "Read-only history" : w ? n.status === "starting" && w.syncState === "unavailable" ? w.lastDurableCommitSha ? `Starting workspace · saved ${w.lastDurableCommitSha.slice(0, 7)}` : "Starting workspace" : w.syncState === "unavailable" ? w.lastDurableCommitSha ? `Workspace unavailable · saved ${w.lastDurableCommitSha.slice(0, 7)}` : "Workspace unavailable" : w.syncState === "diverged" ? "Workspace diverged from main" : w.syncState === "behind" ? `${w.commitsBehindOrigin} commit${w.commitsBehindOrigin === 1 ? "" : "s"} behind main` : w.syncState === "uncommitted" ? `${w.statusCount} local change${w.statusCount === 1 ? "" : "s"} · awaiting save` : w.syncState === "unpushed" ? `${w.commitsAheadOrigin} local commit${w.commitsAheadOrigin === 1 ? "" : "s"} · not pushed` : w.syncState === "saving" || n.checkpointSaving || r.checkpointBusy ? "Saving checkpoint…" : w.syncState === "save_failed" ? "Save failed · retry scheduled" : w.lastDurableCommitSha ? `Saved to GitHub${w.lastPushedAt ? ` · ${Fe(w.lastPushedAt)}` : ""} · ${w.lastDurableCommitSha.slice(0, 7)}` : "No durable checkpoint yet" : "Checking save status…";
12390
12390
  }), O = F(() => {
12391
12391
  var U;
12392
- const k = (U = r.workspaceState) == null ? void 0 : U.syncState;
12393
- return k === "synced" ? "success" : k === "save_failed" || k === "diverged" || k === "unavailable" ? "error" : k === "uncommitted" || k === "unpushed" || k === "behind" || k === "saving" ? "warning" : "neutral";
12392
+ const w = (U = r.workspaceState) == null ? void 0 : U.syncState;
12393
+ return n.status === "starting" && w === "unavailable" ? "warning" : w === "synced" ? "success" : w === "save_failed" || w === "diverged" || w === "unavailable" ? "error" : w === "uncommitted" || w === "unpushed" || w === "behind" || w === "saving" ? "warning" : "neutral";
12394
12394
  }), D = F(() => a.value || i.value), oe = F(() => ({
12395
12395
  "--workspace-chat-width": `${f.value}px`
12396
12396
  })), Be = [
@@ -12400,14 +12400,14 @@ const Pm = ["aria-label", "title"], Mm = { class: "flex flex-col gap-[4px]" }, L
12400
12400
  ];
12401
12401
  function Ne() {
12402
12402
  var U;
12403
- const k = ((U = d.value) == null ? void 0 : U.clientWidth) ?? 0;
12404
- return k ? Math.max(Wn, Math.min(Cr, k - yb)) : Cr;
12403
+ const w = ((U = d.value) == null ? void 0 : U.clientWidth) ?? 0;
12404
+ return w ? Math.max(Wn, Math.min(Cr, w - yb)) : Cr;
12405
12405
  }
12406
- function Ve(k) {
12407
- return Math.round(Math.min(Ne(), Math.max(Wn, k)));
12406
+ function Ve(w) {
12407
+ return Math.round(Math.min(Ne(), Math.max(Wn, w)));
12408
12408
  }
12409
- function et(k, U = !1) {
12410
- const Le = Ve(k);
12409
+ function et(w, U = !1) {
12410
+ const Le = Ve(w);
12411
12411
  f.value !== Le && (f.value = Le), U && Vn(Ar, String(Le));
12412
12412
  }
12413
12413
  function mt() {
@@ -12419,30 +12419,30 @@ const Pm = ["aria-label", "title"], Mm = { class: "flex flex-col gap-[4px]" }, L
12419
12419
  function kt() {
12420
12420
  g == null || g.disconnect(), g = null, !(!d.value || typeof ResizeObserver > "u") && (g = new ResizeObserver(() => et(f.value)), g.observe(d.value), et(f.value));
12421
12421
  }
12422
- function _t(k) {
12422
+ function _t(w) {
12423
12423
  var U, Le;
12424
- k.pointerType === "mouse" && k.button !== 0 || (T = {
12425
- startX: k.clientX,
12424
+ w.pointerType === "mouse" && w.button !== 0 || (T = {
12425
+ startX: w.clientX,
12426
12426
  startWidth: f.value
12427
- }, x.value = !0, y = document.body.style.cursor, w = document.body.style.userSelect, document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", (Le = (U = k.currentTarget).setPointerCapture) == null || Le.call(U, k.pointerId), window.addEventListener("pointermove", Ae), window.addEventListener("pointerup", it, { once: !0 }), window.addEventListener("pointercancel", it, { once: !0 }), k.preventDefault());
12427
+ }, x.value = !0, y = document.body.style.cursor, k = document.body.style.userSelect, document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", (Le = (U = w.currentTarget).setPointerCapture) == null || Le.call(U, w.pointerId), window.addEventListener("pointermove", Ae), window.addEventListener("pointerup", it, { once: !0 }), window.addEventListener("pointercancel", it, { once: !0 }), w.preventDefault());
12428
12428
  }
12429
- function Ae(k) {
12430
- T && et(T.startWidth + k.clientX - T.startX);
12429
+ function Ae(w) {
12430
+ T && et(T.startWidth + w.clientX - T.startX);
12431
12431
  }
12432
12432
  function it() {
12433
- T && (T = null, x.value = !1, document.body.style.cursor = y, document.body.style.userSelect = w, Vn(Ar, String(f.value)), window.removeEventListener("pointermove", Ae), window.removeEventListener("pointerup", it), window.removeEventListener("pointercancel", it));
12433
+ T && (T = null, x.value = !1, document.body.style.cursor = y, document.body.style.userSelect = k, Vn(Ar, String(f.value)), window.removeEventListener("pointermove", Ae), window.removeEventListener("pointerup", it), window.removeEventListener("pointercancel", it));
12434
12434
  }
12435
- function B(k) {
12436
- k.key === "ArrowLeft" || k.key === "ArrowRight" ? (k.preventDefault(), et(f.value + (k.key === "ArrowRight" ? 32 : -32), !0)) : k.key === "Home" ? (k.preventDefault(), et(Wn, !0)) : k.key === "End" && (k.preventDefault(), et(Ne(), !0));
12435
+ function B(w) {
12436
+ w.key === "ArrowLeft" || w.key === "ArrowRight" ? (w.preventDefault(), et(f.value + (w.key === "ArrowRight" ? 32 : -32), !0)) : w.key === "Home" ? (w.preventDefault(), et(Wn, !0)) : w.key === "End" && (w.preventDefault(), et(Ne(), !0));
12437
12437
  }
12438
- async function se(k = !1) {
12438
+ async function se(w = !1) {
12439
12439
  const U = X.value;
12440
12440
  if (!U || U.status !== "active") {
12441
12441
  r.workspaceState = null, r.checkpoints = [];
12442
12442
  return;
12443
12443
  }
12444
12444
  await Promise.all([
12445
- r.refreshWorkspaceState(U.id, k).catch(() => {
12445
+ r.refreshWorkspaceState(U.id, w).catch(() => {
12446
12446
  }),
12447
12447
  C.value ? r.refreshCheckpoints(U.id).catch(() => {
12448
12448
  }) : Promise.resolve()
@@ -12466,11 +12466,11 @@ const Pm = ["aria-label", "title"], Mm = { class: "flex flex-col gap-[4px]" }, L
12466
12466
  });
12467
12467
  return;
12468
12468
  }
12469
- const k = r.sessions[0];
12470
- if (k) {
12469
+ const w = r.sessions[0];
12470
+ if (w) {
12471
12471
  N.value = !0, await n.init({
12472
12472
  businessId: r.businessId,
12473
- sessionId: k.id,
12473
+ sessionId: w.id,
12474
12474
  readOnly: !0
12475
12475
  });
12476
12476
  return;
@@ -12488,8 +12488,8 @@ const Pm = ["aria-label", "title"], Mm = { class: "flex flex-col gap-[4px]" }, L
12488
12488
  () => J()
12489
12489
  ), $t(
12490
12490
  () => o.value,
12491
- (k) => {
12492
- k === "releases" && r.refreshReleases();
12491
+ (w) => {
12492
+ w === "releases" && r.refreshReleases();
12493
12493
  }
12494
12494
  ), $t(
12495
12495
  () => n.checkpointRevision,
@@ -12502,9 +12502,9 @@ const Pm = ["aria-label", "title"], Mm = { class: "flex flex-col gap-[4px]" }, L
12502
12502
  await En(), kt();
12503
12503
  }
12504
12504
  );
12505
- async function Me(k = "save") {
12505
+ async function Me(w = "save") {
12506
12506
  if (!r.isProvisioned) return;
12507
- const U = await r.createSession({ archiveCodeAction: k });
12507
+ const U = await r.createSession({ archiveCodeAction: w });
12508
12508
  o.value = "workspace", N.value = !1, H.value = !1, await n.init({ businessId: r.businessId, sessionId: U.sessionId }), await se().catch(() => {
12509
12509
  });
12510
12510
  }
@@ -12519,11 +12519,11 @@ const Pm = ["aria-label", "title"], Mm = { class: "flex flex-col gap-[4px]" }, L
12519
12519
  }
12520
12520
  l.value = !0, r.statusText = "Checking session changes";
12521
12521
  try {
12522
- const k = await r.sessionChanges(v.value.id, !0);
12523
- if (!k.workspaceExists) {
12522
+ const w = await r.sessionChanges(v.value.id, !0);
12523
+ if (!w.workspaceExists) {
12524
12524
  s.open({
12525
12525
  title: "Workspace is unavailable",
12526
- message: k.lastDurableCommitSha ? `The disposable workspace is no longer available. A new session can start from the last GitHub checkpoint ${k.lastDurableCommitSha.slice(0, 7)}; changes after it cannot be verified.` : "The disposable workspace is no longer available and no durable checkpoint is recorded. Cancel if an operator should investigate before starting over.",
12526
+ message: w.lastDurableCommitSha ? `The disposable workspace is no longer available. A new session can start from the last GitHub checkpoint ${w.lastDurableCommitSha.slice(0, 7)}; changes after it cannot be verified.` : "The disposable workspace is no longer available and no durable checkpoint is recorded. Cancel if an operator should investigate before starting over.",
12527
12527
  dismissAway: !0,
12528
12528
  primaryActions: { close: !0, text: "Start from saved code" },
12529
12529
  secondaryActions: { close: !0, text: "Cancel" }
@@ -12532,7 +12532,7 @@ const Pm = ["aria-label", "title"], Mm = { class: "flex flex-col gap-[4px]" }, L
12532
12532
  });
12533
12533
  return;
12534
12534
  }
12535
- if (!k.dirty) {
12535
+ if (!w.dirty) {
12536
12536
  await Me();
12537
12537
  return;
12538
12538
  }
@@ -12548,8 +12548,8 @@ const Pm = ["aria-label", "title"], Mm = { class: "flex flex-col gap-[4px]" }, L
12548
12548
  }).onSecondary(() => {
12549
12549
  Me("discard");
12550
12550
  });
12551
- } catch (k) {
12552
- r.statusText = Ze(k), s.open({
12551
+ } catch (w) {
12552
+ r.statusText = Ze(w), s.open({
12553
12553
  title: "Start a new session?",
12554
12554
  message: "The current code state could not be checked. Save changes to main before starting a new session, or cancel and try again.",
12555
12555
  dismissAway: !0,
@@ -12565,22 +12565,22 @@ const Pm = ["aria-label", "title"], Mm = { class: "flex flex-col gap-[4px]" }, L
12565
12565
  }
12566
12566
  async function pt() {
12567
12567
  if (!v.value) return;
12568
- const { checkpoint: k } = await r.commitSession(v.value.id);
12569
- await r.createRelease(k.id, v.value.id), o.value = "releases";
12568
+ const { checkpoint: w } = await r.commitSession(v.value.id);
12569
+ await r.createRelease(w.id, v.value.id), o.value = "releases";
12570
12570
  }
12571
12571
  async function je() {
12572
- const k = X.value;
12573
- !k || k.status !== "active" || await r.checkpointSession(k.id, {
12572
+ const w = X.value;
12573
+ !w || w.status !== "active" || await r.checkpointSession(w.id, {
12574
12574
  trigger: "manual",
12575
12575
  summary: "Manual workspace checkpoint"
12576
12576
  });
12577
12577
  }
12578
12578
  async function Ce() {
12579
- var k;
12580
- C.value = !C.value, C.value && ((k = X.value) == null ? void 0 : k.status) === "active" && await r.refreshCheckpoints(X.value.id).catch(() => {
12579
+ var w;
12580
+ C.value = !C.value, C.value && ((w = X.value) == null ? void 0 : w.status) === "active" && await r.refreshCheckpoints(X.value.id).catch(() => {
12581
12581
  });
12582
12582
  }
12583
- function St(k) {
12583
+ function St(w) {
12584
12584
  return {
12585
12585
  manual: "Manual save",
12586
12586
  turn_completed: "Agent turn",
@@ -12592,27 +12592,27 @@ const Pm = ["aria-label", "title"], Mm = { class: "flex flex-col gap-[4px]" }, L
12592
12592
  turn_unrevert: "Turn redo",
12593
12593
  restore: "Checkpoint restore",
12594
12594
  release: "Release build"
12595
- }[k.trigger];
12595
+ }[w.trigger];
12596
12596
  }
12597
- function He(k) {
12598
- return !!(k.verified_remote_sha || k.workspace_backup_key);
12597
+ function He(w) {
12598
+ return !!(w.verified_remote_sha || w.workspace_backup_key);
12599
12599
  }
12600
- function bt(k) {
12601
- return k.status === "pushed_verified" ? "success" : k.status === "failed" ? "error" : "warning";
12600
+ function bt(w) {
12601
+ return w.status === "pushed_verified" ? "success" : w.status === "failed" ? "error" : "warning";
12602
12602
  }
12603
- function nt(k) {
12604
- return k.context_status === "snapshotted" ? "Context saved" : k.context_status === "failed" ? "Context backup failed" : k.context_status === "unavailable" ? "Code only" : "Context pending";
12603
+ function nt(w) {
12604
+ return w.context_status === "snapshotted" ? "Context saved" : w.context_status === "failed" ? "Context backup failed" : w.context_status === "unavailable" ? "Code only" : "Context pending";
12605
12605
  }
12606
- function q(k) {
12606
+ function q(w) {
12607
12607
  const U = X.value;
12608
12608
  !U || U.status !== "active" || s.open({
12609
12609
  title: "Restore this checkpoint?",
12610
- message: `The current workspace will be saved first, then checkpoint ${k.id} will be restored as a new commit on main. Published releases are not changed.`,
12610
+ message: `The current workspace will be saved first, then checkpoint ${w.id} will be restored as a new commit on main. Published releases are not changed.`,
12611
12611
  dismissAway: !0,
12612
12612
  primaryActions: { close: !0, text: "Save & restore" },
12613
12613
  secondaryActions: { close: !0, text: "Cancel" }
12614
12614
  }).onPrimary(() => {
12615
- (async () => (await r.restoreCheckpoint(U.id, k.id), await n.init({ businessId: r.businessId, sessionId: U.id }), await se()))();
12615
+ (async () => (await r.restoreCheckpoint(U.id, w.id), await n.init({ businessId: r.businessId, sessionId: U.id }), await se()))();
12616
12616
  });
12617
12617
  }
12618
12618
  function le() {
@@ -12630,16 +12630,16 @@ const Pm = ["aria-label", "title"], Mm = { class: "flex flex-col gap-[4px]" }, L
12630
12630
  function Ye() {
12631
12631
  r.latestRelease && Tt(r.latestRelease);
12632
12632
  }
12633
- function Tt(k) {
12634
- const U = k.status === "rolled_back";
12633
+ function Tt(w) {
12634
+ const U = w.status === "rolled_back";
12635
12635
  s.open({
12636
12636
  title: U ? "Restore this previous release?" : "Publish this release?",
12637
- message: U ? `Release ${k.id} will immediately replace the current live release. Workspace code is not changed.` : `Release ${k.id} will go live on the merchant's public domain and immediately replace what customers currently see.`,
12637
+ message: U ? `Release ${w.id} will immediately replace the current live release. Workspace code is not changed.` : `Release ${w.id} will go live on the merchant's public domain and immediately replace what customers currently see.`,
12638
12638
  dismissAway: !0,
12639
12639
  primaryActions: { close: !0, text: U ? "Restore live release" : "Publish & set live" },
12640
12640
  secondaryActions: { close: !0, text: "Cancel" }
12641
12641
  }).onPrimary(() => {
12642
- G(k);
12642
+ G(w);
12643
12643
  });
12644
12644
  }
12645
12645
  function Ot() {
@@ -12653,42 +12653,42 @@ const Pm = ["aria-label", "title"], Mm = { class: "flex flex-col gap-[4px]" }, L
12653
12653
  r.rollbackToV1();
12654
12654
  });
12655
12655
  }
12656
- async function Pt(k) {
12657
- await r.selectRelease(k.id);
12656
+ async function Pt(w) {
12657
+ await r.selectRelease(w.id);
12658
12658
  }
12659
- async function S(k) {
12660
- await Pt(k), le();
12659
+ async function S(w) {
12660
+ await Pt(w), le();
12661
12661
  }
12662
- function $(k) {
12663
- k.build_logs_url && window.open(k.build_logs_url, "_blank", "noopener");
12662
+ function $(w) {
12663
+ w.build_logs_url && window.open(w.build_logs_url, "_blank", "noopener");
12664
12664
  }
12665
- async function G(k) {
12666
- await Pt(k), k.status === "rolled_back" ? await r.rollbackToRelease(k.id) : await r.publish(k.id);
12665
+ async function G(w) {
12666
+ await Pt(w), w.status === "rolled_back" ? await r.rollbackToRelease(w.id) : await r.publish(w.id);
12667
12667
  }
12668
- function u(k) {
12669
- return k.status === "rolled_back" ? "Restore live" : "Set live";
12668
+ function u(w) {
12669
+ return w.status === "rolled_back" ? "Restore live" : "Set live";
12670
12670
  }
12671
- async function b(k) {
12672
- R.value = !1, o.value = "workspace", N.value = !1, H.value = !1, await n.init({ businessId: r.businessId, sessionId: k.id, readOnly: k.status !== "active" }), await se().catch(() => {
12671
+ async function b(w) {
12672
+ R.value = !1, o.value = "workspace", N.value = !1, H.value = !1, await n.init({ businessId: r.businessId, sessionId: w.id, readOnly: w.status !== "active" }), await se().catch(() => {
12673
12673
  });
12674
12674
  }
12675
- async function P(k) {
12676
- R.value = !1, await r.resumeSession(k.id), o.value = "workspace", N.value = !1, H.value = !1, await n.init({ businessId: r.businessId, sessionId: k.id }), await se().catch(() => {
12675
+ async function P(w) {
12676
+ R.value = !1, await r.resumeSession(w.id), o.value = "workspace", N.value = !1, H.value = !1, await n.init({ businessId: r.businessId, sessionId: w.id }), await se().catch(() => {
12677
12677
  });
12678
12678
  }
12679
12679
  async function ee() {
12680
- const k = n.workspaceSessionId;
12681
- k && (await r.resumeSession(k), N.value = !1, H.value = !1, await n.init({ businessId: r.businessId, sessionId: k }), await se().catch(() => {
12680
+ const w = n.workspaceSessionId;
12681
+ w && (await r.resumeSession(w), N.value = !1, H.value = !1, await n.init({ businessId: r.businessId, sessionId: w }), await se().catch(() => {
12682
12682
  }));
12683
12683
  }
12684
- function de(k) {
12684
+ function de(w) {
12685
12685
  s.open({
12686
12686
  title: "Rename session",
12687
12687
  dialogComponent: Sh,
12688
12688
  dialogComponentProps: {
12689
- initialTitle: k.title,
12689
+ initialTitle: w.title,
12690
12690
  onSubmit: (U) => {
12691
- s.close(), U !== k.title && r.renameSession(k.id, U).catch(() => {
12691
+ s.close(), U !== w.title && r.renameSession(w.id, U).catch(() => {
12692
12692
  });
12693
12693
  },
12694
12694
  onClose: () => s.close()
@@ -12702,15 +12702,15 @@ const Pm = ["aria-label", "title"], Mm = { class: "flex flex-col gap-[4px]" }, L
12702
12702
  if (!re.value) {
12703
12703
  re.value = !0;
12704
12704
  try {
12705
- const k = n.workspaceSessionId;
12706
- if (!k) {
12705
+ const w = n.workspaceSessionId;
12706
+ if (!w) {
12707
12707
  H.value = !1, await J();
12708
12708
  return;
12709
12709
  }
12710
12710
  await r.refreshSessions().catch(() => {
12711
12711
  });
12712
- const U = r.sessions.find((Le) => Le.id === k);
12713
- H.value = !1, U && U.status !== "active" ? (N.value = !0, await n.init({ businessId: r.businessId, sessionId: k, readOnly: !0 })) : await n.init({ businessId: r.businessId, sessionId: k });
12712
+ const U = r.sessions.find((Le) => Le.id === w);
12713
+ H.value = !1, U && U.status !== "active" ? (N.value = !0, await n.init({ businessId: r.businessId, sessionId: w, readOnly: !0 })) : await n.init({ businessId: r.businessId, sessionId: w });
12714
12714
  } finally {
12715
12715
  re.value = !1;
12716
12716
  }
@@ -12727,8 +12727,8 @@ const Pm = ["aria-label", "title"], Mm = { class: "flex flex-col gap-[4px]" }, L
12727
12727
  onSuspend: Oe
12728
12728
  }), $t(
12729
12729
  () => n.disconnected,
12730
- async (k) => {
12731
- if (!k || n.readOnly) return;
12730
+ async (w) => {
12731
+ if (!w || n.readOnly) return;
12732
12732
  const U = n.workspaceSessionId;
12733
12733
  if (!U) return;
12734
12734
  await r.refreshSessions().catch(() => {
@@ -12737,19 +12737,19 @@ const Pm = ["aria-label", "title"], Mm = { class: "flex flex-col gap-[4px]" }, L
12737
12737
  Le && Le.status !== "active" && (N.value = !0, await n.init({ businessId: r.businessId, sessionId: U, readOnly: !0 }));
12738
12738
  }
12739
12739
  );
12740
- function Xe(k) {
12741
- return k.is_live === 1 ? "bg-fm-color-system-success-50" : k.id === r.activeReleaseId ? "bg-fm-color-primary-oats" : "bg-fm-color-neutral-white";
12740
+ function Xe(w) {
12741
+ return w.is_live === 1 ? "bg-fm-color-system-success-50" : w.id === r.activeReleaseId ? "bg-fm-color-primary-oats" : "bg-fm-color-neutral-white";
12742
12742
  }
12743
- function yt(k) {
12744
- return k.status === "active" ? "Active session" : k.status === "needs_attention" ? "Needs attention" : "Archived session";
12743
+ function yt(w) {
12744
+ return w.status === "active" ? "Active session" : w.status === "needs_attention" ? "Needs attention" : "Archived session";
12745
12745
  }
12746
- function Q(k) {
12746
+ function Q(w) {
12747
12747
  var U;
12748
- return ((U = k.title) == null ? void 0 : U.trim()) || yt(k);
12748
+ return ((U = w.title) == null ? void 0 : U.trim()) || yt(w);
12749
12749
  }
12750
- function Fe(k) {
12751
- if (!k) return "No timestamp";
12752
- const U = new Date(k);
12750
+ function Fe(w) {
12751
+ if (!w) return "No timestamp";
12752
+ const U = new Date(w);
12753
12753
  return Number.isNaN(U.getTime()) ? "No timestamp" : new Intl.DateTimeFormat(void 0, {
12754
12754
  month: "short",
12755
12755
  day: "numeric",
@@ -12757,7 +12757,7 @@ const Pm = ["aria-label", "title"], Mm = { class: "flex flex-col gap-[4px]" }, L
12757
12757
  minute: "2-digit"
12758
12758
  }).format(U);
12759
12759
  }
12760
- return (k, U) => {
12760
+ return (w, U) => {
12761
12761
  var mn, sn, Nn, Ft, On, Pn;
12762
12762
  const Le = ze("FmIcon"), We = ze("FmCircularProgress"), De = ze("FmButton");
12763
12763
  return m(), _("div", {
@@ -13397,7 +13397,7 @@ const Pm = ["aria-label", "title"], Mm = { class: "flex flex-col gap-[4px]" }, L
13397
13397
  ], 2);
13398
13398
  };
13399
13399
  }
13400
- }), Eb = /* @__PURE__ */ Nt(xb, [["__scopeId", "data-v-4ce29203"]]);
13400
+ }), Eb = /* @__PURE__ */ Nt(xb, [["__scopeId", "data-v-7c371ce3"]]);
13401
13401
  export {
13402
13402
  Eb as default
13403
13403
  };