perchai-cli 2.4.42 → 2.4.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/perch.mjs +800 -625
  2. package/package.json +1 -1
package/dist/perch.mjs CHANGED
@@ -5267,9 +5267,9 @@ var require_xlsx = __commonJS({
5267
5267
  }
5268
5268
  return o;
5269
5269
  }
5270
- var fs15;
5270
+ var fs17;
5271
5271
  function get_fs() {
5272
- return fs15 || (fs15 = __require("fs"));
5272
+ return fs17 || (fs17 = __require("fs"));
5273
5273
  }
5274
5274
  function parse(file, options) {
5275
5275
  if (file[0] == 80 && file[1] == 75) return parse_zip2(file, options);
@@ -5545,7 +5545,7 @@ var require_xlsx = __commonJS({
5545
5545
  }
5546
5546
  function read_file(filename2, options) {
5547
5547
  get_fs();
5548
- return parse(fs15.readFileSync(filename2), options);
5548
+ return parse(fs17.readFileSync(filename2), options);
5549
5549
  }
5550
5550
  function read(blob, options) {
5551
5551
  var type = options && options.type;
@@ -5822,7 +5822,7 @@ var require_xlsx = __commonJS({
5822
5822
  }
5823
5823
  return o;
5824
5824
  }
5825
- function find2(cfb, path15) {
5825
+ function find2(cfb, path17) {
5826
5826
  var UCFullPaths = cfb.FullPaths.map(function(x) {
5827
5827
  return x.toUpperCase();
5828
5828
  });
@@ -5831,11 +5831,11 @@ var require_xlsx = __commonJS({
5831
5831
  return y[y.length - (x.slice(-1) == "/" ? 2 : 1)];
5832
5832
  });
5833
5833
  var k = false;
5834
- if (path15.charCodeAt(0) === 47) {
5834
+ if (path17.charCodeAt(0) === 47) {
5835
5835
  k = true;
5836
- path15 = UCFullPaths[0].slice(0, -1) + path15;
5837
- } else k = path15.indexOf("/") !== -1;
5838
- var UCPath = path15.toUpperCase();
5836
+ path17 = UCFullPaths[0].slice(0, -1) + path17;
5837
+ } else k = path17.indexOf("/") !== -1;
5838
+ var UCPath = path17.toUpperCase();
5839
5839
  var w = k === true ? UCFullPaths.indexOf(UCPath) : UCPaths.indexOf(UCPath);
5840
5840
  if (w !== -1) return cfb.FileIndex[w];
5841
5841
  var m = !UCPath.match(chr1);
@@ -5871,7 +5871,7 @@ var require_xlsx = __commonJS({
5871
5871
  function write_file(cfb, filename2, options) {
5872
5872
  get_fs();
5873
5873
  var o = _write(cfb, options);
5874
- fs15.writeFileSync(filename2, o);
5874
+ fs17.writeFileSync(filename2, o);
5875
5875
  }
5876
5876
  function a2s2(o) {
5877
5877
  var out = new Array(o.length);
@@ -5883,7 +5883,7 @@ var require_xlsx = __commonJS({
5883
5883
  switch (options && options.type || "buffer") {
5884
5884
  case "file":
5885
5885
  get_fs();
5886
- fs15.writeFileSync(options.filename, o);
5886
+ fs17.writeFileSync(options.filename, o);
5887
5887
  return o;
5888
5888
  case "binary":
5889
5889
  return typeof o == "string" ? o : a2s2(o);
@@ -6816,11 +6816,11 @@ var require_xlsx = __commonJS({
6816
6816
  }
6817
6817
  throw new Error("cannot save file " + fname);
6818
6818
  }
6819
- function read_binary(path15) {
6820
- if (typeof _fs !== "undefined") return _fs.readFileSync(path15);
6821
- if (typeof Deno !== "undefined") return Deno.readFileSync(path15);
6819
+ function read_binary(path17) {
6820
+ if (typeof _fs !== "undefined") return _fs.readFileSync(path17);
6821
+ if (typeof Deno !== "undefined") return Deno.readFileSync(path17);
6822
6822
  if (typeof $ !== "undefined" && typeof File !== "undefined" && typeof Folder !== "undefined") try {
6823
- var infile = File(path15);
6823
+ var infile = File(path17);
6824
6824
  infile.open("r");
6825
6825
  infile.encoding = "binary";
6826
6826
  var data = infile.read();
@@ -6829,7 +6829,7 @@ var require_xlsx = __commonJS({
6829
6829
  } catch (e) {
6830
6830
  if (!e.message || !e.message.match(/onstruct/)) throw e;
6831
6831
  }
6832
- throw new Error("Cannot access file " + path15);
6832
+ throw new Error("Cannot access file " + path17);
6833
6833
  }
6834
6834
  function keys2(o) {
6835
6835
  var ks = Object.keys(o), o2 = [];
@@ -7106,16 +7106,16 @@ var require_xlsx = __commonJS({
7106
7106
  for (var i = 0; i < k.length; ++i) if (k[i].slice(-1) != "/") o.push(k[i].replace(/^Root Entry[\/]/, ""));
7107
7107
  return o.sort();
7108
7108
  }
7109
- function zip_add_file(zip, path15, content) {
7109
+ function zip_add_file(zip, path17, content) {
7110
7110
  if (zip.FullPaths) {
7111
7111
  if (typeof content == "string") {
7112
7112
  var res;
7113
7113
  if (has_buf) res = Buffer_from(content);
7114
7114
  else res = utf8decode(content);
7115
- return CFB.utils.cfb_add(zip, path15, res);
7115
+ return CFB.utils.cfb_add(zip, path17, res);
7116
7116
  }
7117
- CFB.utils.cfb_add(zip, path15, content);
7118
- } else zip.file(path15, content);
7117
+ CFB.utils.cfb_add(zip, path17, content);
7118
+ } else zip.file(path17, content);
7119
7119
  }
7120
7120
  function zip_new() {
7121
7121
  return CFB.utils.cfb_new();
@@ -7132,11 +7132,11 @@ var require_xlsx = __commonJS({
7132
7132
  }
7133
7133
  throw new Error("Unrecognized type " + o.type);
7134
7134
  }
7135
- function resolve_path(path15, base) {
7136
- if (path15.charAt(0) == "/") return path15.slice(1);
7135
+ function resolve_path(path17, base) {
7136
+ if (path17.charAt(0) == "/") return path17.slice(1);
7137
7137
  var result2 = base.split("/");
7138
7138
  if (base.slice(-1) != "/") result2.pop();
7139
- var target = path15.split("/");
7139
+ var target = path17.split("/");
7140
7140
  while (target.length !== 0) {
7141
7141
  var step = target.shift();
7142
7142
  if (step === "..") result2.pop();
@@ -10805,9 +10805,9 @@ var require_xlsx = __commonJS({
10805
10805
  cell.isst = blob.read_shift(4);
10806
10806
  return cell;
10807
10807
  }
10808
- function write_LabelSst(R, C, v, os6) {
10808
+ function write_LabelSst(R, C, v, os8) {
10809
10809
  var o = new_buf(10);
10810
- write_XLSCell(R, C, os6, o);
10810
+ write_XLSCell(R, C, os8, o);
10811
10811
  o.write_shift(4, v);
10812
10812
  return o;
10813
10813
  }
@@ -10820,10 +10820,10 @@ var require_xlsx = __commonJS({
10820
10820
  cell.val = str;
10821
10821
  return cell;
10822
10822
  }
10823
- function write_Label(R, C, v, os6, opts) {
10823
+ function write_Label(R, C, v, os8, opts) {
10824
10824
  var b8 = !opts || opts.biff == 8;
10825
10825
  var o = new_buf(6 + 2 + +b8 + (1 + b8) * v.length);
10826
- write_XLSCell(R, C, os6, o);
10826
+ write_XLSCell(R, C, os8, o);
10827
10827
  o.write_shift(2, v.length);
10828
10828
  if (b8) o.write_shift(1, 1);
10829
10829
  o.write_shift((1 + b8) * v.length, v, b8 ? "utf16le" : "sbcs");
@@ -10977,9 +10977,9 @@ var require_xlsx = __commonJS({
10977
10977
  cell.t = val === true || val === false ? "b" : "e";
10978
10978
  return cell;
10979
10979
  }
10980
- function write_BoolErr(R, C, v, os6, opts, t) {
10980
+ function write_BoolErr(R, C, v, os8, opts, t) {
10981
10981
  var o = new_buf(8);
10982
- write_XLSCell(R, C, os6, o);
10982
+ write_XLSCell(R, C, os8, o);
10983
10983
  write_Bes(v, t, o);
10984
10984
  return o;
10985
10985
  }
@@ -10990,9 +10990,9 @@ var require_xlsx = __commonJS({
10990
10990
  cell.val = xnum;
10991
10991
  return cell;
10992
10992
  }
10993
- function write_Number(R, C, v, os6) {
10993
+ function write_Number(R, C, v, os8) {
10994
10994
  var o = new_buf(14);
10995
- write_XLSCell(R, C, os6, o);
10995
+ write_XLSCell(R, C, os8, o);
10996
10996
  write_Xnum(v, o);
10997
10997
  return o;
10998
10998
  }
@@ -17815,8 +17815,8 @@ var require_xlsx = __commonJS({
17815
17815
  var cbf = parse_XLSCellParsedFormula(blob, end - blob.l, opts);
17816
17816
  return { cell, val: val[0], formula: cbf, shared: flags >> 3 & 1, tt: val[1] };
17817
17817
  }
17818
- function write_Formula(cell, R, C, opts, os6) {
17819
- var o1 = write_XLSCell(R, C, os6);
17818
+ function write_Formula(cell, R, C, opts, os8) {
17819
+ var o1 = write_XLSCell(R, C, os8);
17820
17820
  var o2 = write_FormulaValue(cell.v);
17821
17821
  var o3 = new_buf(6);
17822
17822
  var flags = 1 | 32;
@@ -19395,8 +19395,8 @@ var require_xlsx = __commonJS({
19395
19395
  break;
19396
19396
  }
19397
19397
  var v = writetag("v", escapexml(vv)), o = { r: ref };
19398
- var os6 = get_cell_style(opts.cellXfs, cell, opts);
19399
- if (os6 !== 0) o.s = os6;
19398
+ var os8 = get_cell_style(opts.cellXfs, cell, opts);
19399
+ if (os8 !== 0) o.s = os8;
19400
19400
  switch (cell.t) {
19401
19401
  case "n":
19402
19402
  break;
@@ -23211,8 +23211,8 @@ var require_xlsx = __commonJS({
23211
23211
  p = escapexlml(cell.v || "");
23212
23212
  break;
23213
23213
  }
23214
- var os6 = get_cell_style(opts.cellXfs, cell, opts);
23215
- attr["ss:StyleID"] = "s" + (21 + os6);
23214
+ var os8 = get_cell_style(opts.cellXfs, cell, opts);
23215
+ attr["ss:StyleID"] = "s" + (21 + os8);
23216
23216
  attr["ss:Index"] = addr.c + 1;
23217
23217
  var _v = cell.v != null ? p : "";
23218
23218
  var m = cell.t == "z" ? "" : '<Data ss:Type="' + t + '">' + _v + "</Data>";
@@ -29047,32 +29047,32 @@ var require_xlsx = __commonJS({
29047
29047
  });
29048
29048
  }
29049
29049
  function write_ws_biff8_cell(ba, cell, R, C, opts) {
29050
- var os6 = 16 + get_cell_style(opts.cellXfs, cell, opts);
29050
+ var os8 = 16 + get_cell_style(opts.cellXfs, cell, opts);
29051
29051
  if (cell.v == null && !cell.bf) {
29052
- write_biff_rec(ba, 513, write_XLSCell(R, C, os6));
29052
+ write_biff_rec(ba, 513, write_XLSCell(R, C, os8));
29053
29053
  return;
29054
29054
  }
29055
- if (cell.bf) write_biff_rec(ba, 6, write_Formula(cell, R, C, opts, os6));
29055
+ if (cell.bf) write_biff_rec(ba, 6, write_Formula(cell, R, C, opts, os8));
29056
29056
  else switch (cell.t) {
29057
29057
  case "d":
29058
29058
  case "n":
29059
29059
  var v = cell.t == "d" ? datenum(parseDate3(cell.v)) : cell.v;
29060
- write_biff_rec(ba, 515, write_Number(R, C, v, os6, opts));
29060
+ write_biff_rec(ba, 515, write_Number(R, C, v, os8, opts));
29061
29061
  break;
29062
29062
  case "b":
29063
29063
  case "e":
29064
- write_biff_rec(ba, 517, write_BoolErr(R, C, cell.v, os6, opts, cell.t));
29064
+ write_biff_rec(ba, 517, write_BoolErr(R, C, cell.v, os8, opts, cell.t));
29065
29065
  break;
29066
29066
  /* TODO: codepage, sst */
29067
29067
  case "s":
29068
29068
  case "str":
29069
29069
  if (opts.bookSST) {
29070
29070
  var isst = get_sst_id(opts.Strings, cell.v, opts.revStrings);
29071
- write_biff_rec(ba, 253, write_LabelSst(R, C, isst, os6, opts));
29072
- } else write_biff_rec(ba, 516, write_Label(R, C, (cell.v || "").slice(0, 255), os6, opts));
29071
+ write_biff_rec(ba, 253, write_LabelSst(R, C, isst, os8, opts));
29072
+ } else write_biff_rec(ba, 516, write_Label(R, C, (cell.v || "").slice(0, 255), os8, opts));
29073
29073
  break;
29074
29074
  default:
29075
- write_biff_rec(ba, 513, write_XLSCell(R, C, os6));
29075
+ write_biff_rec(ba, 513, write_XLSCell(R, C, os8));
29076
29076
  }
29077
29077
  }
29078
29078
  function write_ws_biff8(idx, opts, wb) {
@@ -31790,19 +31790,19 @@ var require_xlsx = __commonJS({
31790
31790
  }
31791
31791
  return !wbrels || wbrels.length === 0 ? null : wbrels;
31792
31792
  }
31793
- function safe_parse_sheet(zip, path15, relsPath, sheet, idx, sheetRels, sheets, stype, opts, wb, themes, styles6) {
31793
+ function safe_parse_sheet(zip, path17, relsPath, sheet, idx, sheetRels, sheets, stype, opts, wb, themes, styles6) {
31794
31794
  try {
31795
- sheetRels[sheet] = parse_rels(getzipstr(zip, relsPath, true), path15);
31796
- var data = getzipdata(zip, path15);
31795
+ sheetRels[sheet] = parse_rels(getzipstr(zip, relsPath, true), path17);
31796
+ var data = getzipdata(zip, path17);
31797
31797
  var _ws;
31798
31798
  switch (stype) {
31799
31799
  case "sheet":
31800
- _ws = parse_ws(data, path15, idx, opts, sheetRels[sheet], wb, themes, styles6);
31800
+ _ws = parse_ws(data, path17, idx, opts, sheetRels[sheet], wb, themes, styles6);
31801
31801
  break;
31802
31802
  case "chart":
31803
- _ws = parse_cs(data, path15, idx, opts, sheetRels[sheet], wb, themes, styles6);
31803
+ _ws = parse_cs(data, path17, idx, opts, sheetRels[sheet], wb, themes, styles6);
31804
31804
  if (!_ws || !_ws["!drawel"]) break;
31805
- var dfile = resolve_path(_ws["!drawel"].Target, path15);
31805
+ var dfile = resolve_path(_ws["!drawel"].Target, path17);
31806
31806
  var drelsp = get_rels_path(dfile);
31807
31807
  var draw = parse_drawing(getzipstr(zip, dfile, true), parse_rels(getzipstr(zip, drelsp, true), dfile));
31808
31808
  var chartp = resolve_path(draw, dfile);
@@ -31810,10 +31810,10 @@ var require_xlsx = __commonJS({
31810
31810
  _ws = parse_chart(getzipstr(zip, chartp, true), chartp, opts, parse_rels(getzipstr(zip, crelsp, true), chartp), wb, _ws);
31811
31811
  break;
31812
31812
  case "macro":
31813
- _ws = parse_ms(data, path15, idx, opts, sheetRels[sheet], wb, themes, styles6);
31813
+ _ws = parse_ms(data, path17, idx, opts, sheetRels[sheet], wb, themes, styles6);
31814
31814
  break;
31815
31815
  case "dialog":
31816
- _ws = parse_ds(data, path15, idx, opts, sheetRels[sheet], wb, themes, styles6);
31816
+ _ws = parse_ds(data, path17, idx, opts, sheetRels[sheet], wb, themes, styles6);
31817
31817
  break;
31818
31818
  default:
31819
31819
  throw new Error("Unrecognized sheet type " + stype);
@@ -31823,13 +31823,13 @@ var require_xlsx = __commonJS({
31823
31823
  if (sheetRels && sheetRels[sheet]) keys2(sheetRels[sheet]).forEach(function(n) {
31824
31824
  var dfile2 = "";
31825
31825
  if (sheetRels[sheet][n].Type == RELS.CMNT) {
31826
- dfile2 = resolve_path(sheetRels[sheet][n].Target, path15);
31826
+ dfile2 = resolve_path(sheetRels[sheet][n].Target, path17);
31827
31827
  var comments = parse_cmnt(getzipdata(zip, dfile2, true), dfile2, opts);
31828
31828
  if (!comments || !comments.length) return;
31829
31829
  sheet_insert_comments(_ws, comments, false);
31830
31830
  }
31831
31831
  if (sheetRels[sheet][n].Type == RELS.TCMNT) {
31832
- dfile2 = resolve_path(sheetRels[sheet][n].Target, path15);
31832
+ dfile2 = resolve_path(sheetRels[sheet][n].Target, path17);
31833
31833
  tcomments = tcomments.concat(parse_tcmnt_xml(getzipdata(zip, dfile2, true), opts));
31834
31834
  }
31835
31835
  });
@@ -31933,7 +31933,7 @@ var require_xlsx = __commonJS({
31933
31933
  if (opts.bookDeps && dir.calcchain) deps = parse_cc(getzipdata(zip, strip_front_slash(dir.calcchain)), dir.calcchain, opts);
31934
31934
  var i = 0;
31935
31935
  var sheetRels = {};
31936
- var path15, relsPath;
31936
+ var path17, relsPath;
31937
31937
  {
31938
31938
  var wbsheets = wb.Sheets;
31939
31939
  props.Worksheets = wbsheets.length;
@@ -31958,15 +31958,15 @@ var require_xlsx = __commonJS({
31958
31958
  wsloop: for (i = 0; i != props.Worksheets; ++i) {
31959
31959
  var stype = "sheet";
31960
31960
  if (wbrels && wbrels[i]) {
31961
- path15 = "xl/" + wbrels[i][1].replace(/[\/]?xl\//, "");
31962
- if (!safegetzipfile(zip, path15)) path15 = wbrels[i][1];
31963
- if (!safegetzipfile(zip, path15)) path15 = wbrelsfile.replace(/_rels\/.*$/, "") + wbrels[i][1];
31961
+ path17 = "xl/" + wbrels[i][1].replace(/[\/]?xl\//, "");
31962
+ if (!safegetzipfile(zip, path17)) path17 = wbrels[i][1];
31963
+ if (!safegetzipfile(zip, path17)) path17 = wbrelsfile.replace(/_rels\/.*$/, "") + wbrels[i][1];
31964
31964
  stype = wbrels[i][2];
31965
31965
  } else {
31966
- path15 = "xl/worksheets/sheet" + (i + 1 - nmode) + "." + wbext;
31967
- path15 = path15.replace(/sheet0\./, "sheet.");
31966
+ path17 = "xl/worksheets/sheet" + (i + 1 - nmode) + "." + wbext;
31967
+ path17 = path17.replace(/sheet0\./, "sheet.");
31968
31968
  }
31969
- relsPath = path15.replace(/^(.*)(\/)([^\/]*)$/, "$1/_rels/$3.rels");
31969
+ relsPath = path17.replace(/^(.*)(\/)([^\/]*)$/, "$1/_rels/$3.rels");
31970
31970
  if (opts && opts.sheets != null) switch (typeof opts.sheets) {
31971
31971
  case "number":
31972
31972
  if (i != opts.sheets) continue wsloop;
@@ -31984,7 +31984,7 @@ var require_xlsx = __commonJS({
31984
31984
  if (!snjseen) continue wsloop;
31985
31985
  }
31986
31986
  }
31987
- safe_parse_sheet(zip, path15, relsPath, props.SheetNames[i], i, sheetRels, sheets, stype, opts, wb, themes, styles6);
31987
+ safe_parse_sheet(zip, path17, relsPath, props.SheetNames[i], i, sheetRels, sheets, stype, opts, wb, themes, styles6);
31988
31988
  }
31989
31989
  out = {
31990
31990
  Directory: dir,
@@ -32873,7 +32873,7 @@ var require_xlsx = __commonJS({
32873
32873
  return out;
32874
32874
  }
32875
32875
  var qreg = /"/g;
32876
- function make_csv_row(sheet, r, R, cols, fs15, rs, FS, o) {
32876
+ function make_csv_row(sheet, r, R, cols, fs17, rs, FS, o) {
32877
32877
  var isempty = true;
32878
32878
  var row = [], txt = "", rr = encode_row(R);
32879
32879
  for (var C = r.s.c; C <= r.e.c; ++C) {
@@ -32883,7 +32883,7 @@ var require_xlsx = __commonJS({
32883
32883
  else if (val.v != null) {
32884
32884
  isempty = false;
32885
32885
  txt = "" + (o.rawNumbers && val.t == "n" ? val.v : format_cell(val, null, o));
32886
- for (var i = 0, cc = 0; i !== txt.length; ++i) if ((cc = txt.charCodeAt(i)) === fs15 || cc === rs || cc === 34 || o.forceQuotes) {
32886
+ for (var i = 0, cc = 0; i !== txt.length; ++i) if ((cc = txt.charCodeAt(i)) === fs17 || cc === rs || cc === 34 || o.forceQuotes) {
32887
32887
  txt = '"' + txt.replace(qreg, '""') + '"';
32888
32888
  break;
32889
32889
  }
@@ -32903,7 +32903,7 @@ var require_xlsx = __commonJS({
32903
32903
  var o = opts == null ? {} : opts;
32904
32904
  if (sheet == null || sheet["!ref"] == null) return "";
32905
32905
  var r = safe_decode_range(sheet["!ref"]);
32906
- var FS = o.FS !== void 0 ? o.FS : ",", fs15 = FS.charCodeAt(0);
32906
+ var FS = o.FS !== void 0 ? o.FS : ",", fs17 = FS.charCodeAt(0);
32907
32907
  var RS = o.RS !== void 0 ? o.RS : "\n", rs = RS.charCodeAt(0);
32908
32908
  var endregex = new RegExp((FS == "|" ? "\\|" : FS) + "+$");
32909
32909
  var row = "", cols = [];
@@ -32914,7 +32914,7 @@ var require_xlsx = __commonJS({
32914
32914
  var w = 0;
32915
32915
  for (var R = r.s.r; R <= r.e.r; ++R) {
32916
32916
  if ((rowinfo[R] || {}).hidden) continue;
32917
- row = make_csv_row(sheet, r, R, cols, fs15, rs, FS, o);
32917
+ row = make_csv_row(sheet, r, R, cols, fs17, rs, FS, o);
32918
32918
  if (row == null) {
32919
32919
  continue;
32920
32920
  }
@@ -33186,7 +33186,7 @@ var require_xlsx = __commonJS({
33186
33186
  return stream;
33187
33187
  }
33188
33188
  var r = safe_decode_range(sheet["!ref"]);
33189
- var FS = o.FS !== void 0 ? o.FS : ",", fs15 = FS.charCodeAt(0);
33189
+ var FS = o.FS !== void 0 ? o.FS : ",", fs17 = FS.charCodeAt(0);
33190
33190
  var RS = o.RS !== void 0 ? o.RS : "\n", rs = RS.charCodeAt(0);
33191
33191
  var endregex = new RegExp((FS == "|" ? "\\|" : FS) + "+$");
33192
33192
  var row = "", cols = [];
@@ -33204,7 +33204,7 @@ var require_xlsx = __commonJS({
33204
33204
  while (R <= r.e.r) {
33205
33205
  ++R;
33206
33206
  if ((rowinfo[R - 1] || {}).hidden) continue;
33207
- row = make_csv_row(sheet, r, R - 1, cols, fs15, rs, FS, o);
33207
+ row = make_csv_row(sheet, r, R - 1, cols, fs17, rs, FS, o);
33208
33208
  if (row != null) {
33209
33209
  if (o.strip) row = row.replace(endregex, "");
33210
33210
  if (row || o.blankrows !== false) return stream.push((w++ ? RS : "") + row);
@@ -47774,8 +47774,8 @@ var require_html2canvas = __commonJS({
47774
47774
  return BezierCurve2;
47775
47775
  })()
47776
47776
  );
47777
- var isBezierCurve = function(path15) {
47778
- return path15.type === 1;
47777
+ var isBezierCurve = function(path17) {
47778
+ return path17.type === 1;
47779
47779
  };
47780
47780
  var BoundCurves = (
47781
47781
  /** @class */
@@ -47903,8 +47903,8 @@ var require_html2canvas = __commonJS({
47903
47903
  var ClipEffect = (
47904
47904
  /** @class */
47905
47905
  /* @__PURE__ */ (function() {
47906
- function ClipEffect2(path15, target) {
47907
- this.path = path15;
47906
+ function ClipEffect2(path17, target) {
47907
+ this.path = path17;
47908
47908
  this.target = target;
47909
47909
  this.type = 1;
47910
47910
  }
@@ -47939,8 +47939,8 @@ var require_html2canvas = __commonJS({
47939
47939
  }
47940
47940
  return false;
47941
47941
  };
47942
- var transformPath = function(path15, deltaX, deltaY, deltaW, deltaH) {
47943
- return path15.map(function(point, index) {
47942
+ var transformPath = function(path17, deltaX, deltaY, deltaW, deltaH) {
47943
+ return path17.map(function(point, index) {
47944
47944
  switch (index) {
47945
47945
  case 0:
47946
47946
  return point.add(deltaX, deltaY);
@@ -48207,42 +48207,42 @@ var require_html2canvas = __commonJS({
48207
48207
  }
48208
48208
  };
48209
48209
  var createStrokePathFromCurves = function(outer1, outer2) {
48210
- var path15 = [];
48210
+ var path17 = [];
48211
48211
  if (isBezierCurve(outer1)) {
48212
- path15.push(outer1.subdivide(0.5, false));
48212
+ path17.push(outer1.subdivide(0.5, false));
48213
48213
  } else {
48214
- path15.push(outer1);
48214
+ path17.push(outer1);
48215
48215
  }
48216
48216
  if (isBezierCurve(outer2)) {
48217
- path15.push(outer2.subdivide(0.5, true));
48217
+ path17.push(outer2.subdivide(0.5, true));
48218
48218
  } else {
48219
- path15.push(outer2);
48219
+ path17.push(outer2);
48220
48220
  }
48221
- return path15;
48221
+ return path17;
48222
48222
  };
48223
48223
  var createPathFromCurves = function(outer1, inner1, outer2, inner2) {
48224
- var path15 = [];
48224
+ var path17 = [];
48225
48225
  if (isBezierCurve(outer1)) {
48226
- path15.push(outer1.subdivide(0.5, false));
48226
+ path17.push(outer1.subdivide(0.5, false));
48227
48227
  } else {
48228
- path15.push(outer1);
48228
+ path17.push(outer1);
48229
48229
  }
48230
48230
  if (isBezierCurve(outer2)) {
48231
- path15.push(outer2.subdivide(0.5, true));
48231
+ path17.push(outer2.subdivide(0.5, true));
48232
48232
  } else {
48233
- path15.push(outer2);
48233
+ path17.push(outer2);
48234
48234
  }
48235
48235
  if (isBezierCurve(inner2)) {
48236
- path15.push(inner2.subdivide(0.5, true).reverse());
48236
+ path17.push(inner2.subdivide(0.5, true).reverse());
48237
48237
  } else {
48238
- path15.push(inner2);
48238
+ path17.push(inner2);
48239
48239
  }
48240
48240
  if (isBezierCurve(inner1)) {
48241
- path15.push(inner1.subdivide(0.5, false).reverse());
48241
+ path17.push(inner1.subdivide(0.5, false).reverse());
48242
48242
  } else {
48243
- path15.push(inner1);
48243
+ path17.push(inner1);
48244
48244
  }
48245
- return path15;
48245
+ return path17;
48246
48246
  };
48247
48247
  var paddingBox = function(element) {
48248
48248
  var bounds = element.bounds;
@@ -48282,10 +48282,10 @@ var require_html2canvas = __commonJS({
48282
48282
  var backgroundImageSize = calculateBackgroundSize(getBackgroundValueForIndex(container.styles.backgroundSize, index), intrinsicSize, backgroundPositioningArea);
48283
48283
  var sizeWidth = backgroundImageSize[0], sizeHeight = backgroundImageSize[1];
48284
48284
  var position2 = getAbsoluteValueForTuple(getBackgroundValueForIndex(container.styles.backgroundPosition, index), backgroundPositioningArea.width - sizeWidth, backgroundPositioningArea.height - sizeHeight);
48285
- var path15 = calculateBackgroundRepeatPath(getBackgroundValueForIndex(container.styles.backgroundRepeat, index), position2, backgroundImageSize, backgroundPositioningArea, backgroundPaintingArea);
48285
+ var path17 = calculateBackgroundRepeatPath(getBackgroundValueForIndex(container.styles.backgroundRepeat, index), position2, backgroundImageSize, backgroundPositioningArea, backgroundPaintingArea);
48286
48286
  var offsetX = Math.round(backgroundPositioningArea.left + position2[0]);
48287
48287
  var offsetY = Math.round(backgroundPositioningArea.top + position2[1]);
48288
- return [path15, offsetX, offsetY, sizeWidth, sizeHeight];
48288
+ return [path17, offsetX, offsetY, sizeWidth, sizeHeight];
48289
48289
  };
48290
48290
  var isAuto = function(token) {
48291
48291
  return isIdentToken(token) && token.value === BACKGROUND_SIZE.AUTO;
@@ -48666,8 +48666,8 @@ var require_html2canvas = __commonJS({
48666
48666
  CanvasRenderer2.prototype.renderReplacedElement = function(container, curves, image3) {
48667
48667
  if (image3 && container.intrinsicWidth > 0 && container.intrinsicHeight > 0) {
48668
48668
  var box = contentBox(container);
48669
- var path15 = calculatePaddingBoxPath(curves);
48670
- this.path(path15);
48669
+ var path17 = calculatePaddingBoxPath(curves);
48670
+ this.path(path17);
48671
48671
  this.ctx.save();
48672
48672
  this.ctx.clip();
48673
48673
  this.ctx.drawImage(image3, 0, 0, container.intrinsicWidth, container.intrinsicHeight, box.left, box.top, box.width, box.height);
@@ -49001,8 +49001,8 @@ var require_html2canvas = __commonJS({
49001
49001
  }
49002
49002
  });
49003
49003
  };
49004
- CanvasRenderer2.prototype.renderRepeat = function(path15, pattern, offsetX, offsetY) {
49005
- this.path(path15);
49004
+ CanvasRenderer2.prototype.renderRepeat = function(path17, pattern, offsetX, offsetY) {
49005
+ this.path(path17);
49006
49006
  this.ctx.fillStyle = pattern;
49007
49007
  this.ctx.translate(offsetX, offsetY);
49008
49008
  this.ctx.fill();
@@ -49029,7 +49029,7 @@ var require_html2canvas = __commonJS({
49029
49029
  case 0:
49030
49030
  index = container.styles.backgroundImage.length - 1;
49031
49031
  _loop_1 = function(backgroundImage3) {
49032
- var image3, url, _c, path15, x, y, width, height, pattern, _d, path15, x, y, width, height, _e, lineLength, x0, x1, y0, y1, canvas, ctx, gradient_1, pattern, _f, path15, left, top_1, width, height, position2, x, y, _g, rx, ry, radialGradient_1, midX, midY, f2, invF;
49032
+ var image3, url, _c, path17, x, y, width, height, pattern, _d, path17, x, y, width, height, _e, lineLength, x0, x1, y0, y1, canvas, ctx, gradient_1, pattern, _f, path17, left, top_1, width, height, position2, x, y, _g, rx, ry, radialGradient_1, midX, midY, f2, invF;
49033
49033
  return __generator2(this, function(_h) {
49034
49034
  switch (_h.label) {
49035
49035
  case 0:
@@ -49053,14 +49053,14 @@ var require_html2canvas = __commonJS({
49053
49053
  image3.width,
49054
49054
  image3.height,
49055
49055
  image3.width / image3.height
49056
- ]), path15 = _c[0], x = _c[1], y = _c[2], width = _c[3], height = _c[4];
49056
+ ]), path17 = _c[0], x = _c[1], y = _c[2], width = _c[3], height = _c[4];
49057
49057
  pattern = this_1.ctx.createPattern(this_1.resizeImage(image3, width, height), "repeat");
49058
- this_1.renderRepeat(path15, pattern, x, y);
49058
+ this_1.renderRepeat(path17, pattern, x, y);
49059
49059
  }
49060
49060
  return [3, 6];
49061
49061
  case 5:
49062
49062
  if (isLinearGradient(backgroundImage3)) {
49063
- _d = calculateBackgroundRendering(container, index, [null, null, null]), path15 = _d[0], x = _d[1], y = _d[2], width = _d[3], height = _d[4];
49063
+ _d = calculateBackgroundRendering(container, index, [null, null, null]), path17 = _d[0], x = _d[1], y = _d[2], width = _d[3], height = _d[4];
49064
49064
  _e = calculateGradientDirection(backgroundImage3.angle, width, height), lineLength = _e[0], x0 = _e[1], x1 = _e[2], y0 = _e[3], y1 = _e[4];
49065
49065
  canvas = document.createElement("canvas");
49066
49066
  canvas.width = width;
@@ -49074,14 +49074,14 @@ var require_html2canvas = __commonJS({
49074
49074
  ctx.fillRect(0, 0, width, height);
49075
49075
  if (width > 0 && height > 0) {
49076
49076
  pattern = this_1.ctx.createPattern(canvas, "repeat");
49077
- this_1.renderRepeat(path15, pattern, x, y);
49077
+ this_1.renderRepeat(path17, pattern, x, y);
49078
49078
  }
49079
49079
  } else if (isRadialGradient(backgroundImage3)) {
49080
49080
  _f = calculateBackgroundRendering(container, index, [
49081
49081
  null,
49082
49082
  null,
49083
49083
  null
49084
- ]), path15 = _f[0], left = _f[1], top_1 = _f[2], width = _f[3], height = _f[4];
49084
+ ]), path17 = _f[0], left = _f[1], top_1 = _f[2], width = _f[3], height = _f[4];
49085
49085
  position2 = backgroundImage3.position.length === 0 ? [FIFTY_PERCENT] : backgroundImage3.position;
49086
49086
  x = getAbsoluteValue(position2[0], width);
49087
49087
  y = getAbsoluteValue(position2[position2.length - 1], height);
@@ -49091,7 +49091,7 @@ var require_html2canvas = __commonJS({
49091
49091
  processColorStops(backgroundImage3.stops, rx * 2).forEach(function(colorStop) {
49092
49092
  return radialGradient_1.addColorStop(colorStop.stop, asString(colorStop.color));
49093
49093
  });
49094
- this_1.path(path15);
49094
+ this_1.path(path17);
49095
49095
  this_1.ctx.fillStyle = radialGradient_1;
49096
49096
  if (rx !== ry) {
49097
49097
  midX = container.bounds.left + 0.5 * container.bounds.width;
@@ -52739,7 +52739,7 @@ var require_es_promise_constructor = __commonJS({
52739
52739
  var IS_PURE = require_is_pure();
52740
52740
  var IS_NODE = require_environment_is_node();
52741
52741
  var globalThis2 = require_global_this();
52742
- var path15 = require_path();
52742
+ var path17 = require_path();
52743
52743
  var call = require_function_call();
52744
52744
  var defineBuiltIn = require_define_built_in();
52745
52745
  var setPrototypeOf = require_object_set_prototype_of();
@@ -52989,7 +52989,7 @@ var require_es_promise_constructor = __commonJS({
52989
52989
  $2({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
52990
52990
  Promise: PromiseConstructor
52991
52991
  });
52992
- PromiseWrapper = path15.Promise;
52992
+ PromiseWrapper = path17.Promise;
52993
52993
  setToStringTag(PromiseConstructor, PROMISE, false, true);
52994
52994
  setSpecies(PROMISE);
52995
52995
  }
@@ -56483,7 +56483,7 @@ var require_es_number_constructor = __commonJS({
56483
56483
  var IS_PURE = require_is_pure();
56484
56484
  var DESCRIPTORS = require_descriptors();
56485
56485
  var globalThis2 = require_global_this();
56486
- var path15 = require_path();
56486
+ var path17 = require_path();
56487
56487
  var uncurryThis = require_function_uncurry_this();
56488
56488
  var isForced = require_is_forced();
56489
56489
  var hasOwn = require_has_own_property();
@@ -56499,7 +56499,7 @@ var require_es_number_constructor = __commonJS({
56499
56499
  var trim = require_string_trim().trim;
56500
56500
  var NUMBER = "Number";
56501
56501
  var NativeNumber = globalThis2[NUMBER];
56502
- var PureNumberNamespace = path15[NUMBER];
56502
+ var PureNumberNamespace = path17[NUMBER];
56503
56503
  var NumberPrototype = NativeNumber.prototype;
56504
56504
  var TypeError2 = globalThis2.TypeError;
56505
56505
  var stringSlice = uncurryThis("".slice);
@@ -56571,8 +56571,8 @@ var require_es_number_constructor = __commonJS({
56571
56571
  }
56572
56572
  }
56573
56573
  };
56574
- if (IS_PURE && PureNumberNamespace) copyConstructorProperties(path15[NUMBER], PureNumberNamespace);
56575
- if (FORCED || IS_PURE) copyConstructorProperties(path15[NUMBER], NativeNumber);
56574
+ if (IS_PURE && PureNumberNamespace) copyConstructorProperties(path17[NUMBER], PureNumberNamespace);
56575
+ if (FORCED || IS_PURE) copyConstructorProperties(path17[NUMBER], NativeNumber);
56576
56576
  }
56577
56577
  });
56578
56578
 
@@ -58687,8 +58687,8 @@ var require_lib2 = __commonJS({
58687
58687
  }
58688
58688
  }, {
58689
58689
  key: "parsePath",
58690
- value: function parsePath(path15) {
58691
- var points = toNumbers(path15);
58690
+ value: function parsePath(path17) {
58691
+ var points = toNumbers(path17);
58692
58692
  var len = points.length;
58693
58693
  var pathPoints = [];
58694
58694
  for (var i = 0; i < len; i += 2) {
@@ -60189,10 +60189,10 @@ var require_lib2 = __commonJS({
60189
60189
  var PathParser = /* @__PURE__ */ (function(_SVGPathData) {
60190
60190
  _inherits__default["default"](PathParser2, _SVGPathData);
60191
60191
  var _super = _createSuper$I(PathParser2);
60192
- function PathParser2(path15) {
60192
+ function PathParser2(path17) {
60193
60193
  var _this;
60194
60194
  _classCallCheck__default["default"](this, PathParser2);
60195
- _this = _super.call(this, path15.replace(/([+\-.])\s+/gm, "$1").replace(/[^MmZzLlHhVvCcSsQqTtAae\d\s.,+-].*/g, ""));
60195
+ _this = _super.call(this, path17.replace(/([+\-.])\s+/gm, "$1").replace(/[^MmZzLlHhVvCcSsQqTtAae\d\s.,+-].*/g, ""));
60196
60196
  _this.control = null;
60197
60197
  _this.start = null;
60198
60198
  _this.current = null;
@@ -60520,7 +60520,7 @@ var require_lib2 = __commonJS({
60520
60520
  }
60521
60521
  _createClass__default["default"](PathElement2, [{
60522
60522
  key: "path",
60523
- value: function path15(ctx) {
60523
+ value: function path17(ctx) {
60524
60524
  var pathParser = this.pathParser;
60525
60525
  var boundingBox = new BoundingBox();
60526
60526
  pathParser.reset();
@@ -61644,7 +61644,7 @@ var require_lib2 = __commonJS({
61644
61644
  }
61645
61645
  _createClass__default["default"](RectElement2, [{
61646
61646
  key: "path",
61647
- value: function path15(ctx) {
61647
+ value: function path17(ctx) {
61648
61648
  var x = this.getAttribute("x").getPixels("x");
61649
61649
  var y = this.getAttribute("y").getPixels("y");
61650
61650
  var width = this.getStyle("width", false, true).getPixels("x");
@@ -61724,7 +61724,7 @@ var require_lib2 = __commonJS({
61724
61724
  }
61725
61725
  _createClass__default["default"](CircleElement2, [{
61726
61726
  key: "path",
61727
- value: function path15(ctx) {
61727
+ value: function path17(ctx) {
61728
61728
  var cx = this.getAttribute("cx").getPixels("x");
61729
61729
  var cy = this.getAttribute("cy").getPixels("y");
61730
61730
  var r = this.getAttribute("r").getPixels();
@@ -61780,7 +61780,7 @@ var require_lib2 = __commonJS({
61780
61780
  }
61781
61781
  _createClass__default["default"](EllipseElement2, [{
61782
61782
  key: "path",
61783
- value: function path15(ctx) {
61783
+ value: function path17(ctx) {
61784
61784
  var KAPPA = 4 * ((Math.sqrt(2) - 1) / 3);
61785
61785
  var rx = this.getAttribute("rx").getPixels("x");
61786
61786
  var ry = this.getAttribute("ry").getPixels("y");
@@ -61847,7 +61847,7 @@ var require_lib2 = __commonJS({
61847
61847
  }
61848
61848
  }, {
61849
61849
  key: "path",
61850
- value: function path15(ctx) {
61850
+ value: function path17(ctx) {
61851
61851
  var _this$getPoints = this.getPoints(), _this$getPoints2 = _slicedToArray__default["default"](_this$getPoints, 2), _this$getPoints2$ = _this$getPoints2[0], x0 = _this$getPoints2$.x, y0 = _this$getPoints2$.y, _this$getPoints2$2 = _this$getPoints2[1], x1 = _this$getPoints2$2.x, y1 = _this$getPoints2$2.y;
61852
61852
  if (ctx) {
61853
61853
  ctx.beginPath();
@@ -61905,7 +61905,7 @@ var require_lib2 = __commonJS({
61905
61905
  }
61906
61906
  _createClass__default["default"](PolylineElement2, [{
61907
61907
  key: "path",
61908
- value: function path15(ctx) {
61908
+ value: function path17(ctx) {
61909
61909
  var points = this.points;
61910
61910
  var _points = _slicedToArray__default["default"](points, 1), _points$ = _points[0], x0 = _points$.x, y0 = _points$.y;
61911
61911
  var boundingBox = new BoundingBox(x0, y0);
@@ -61979,7 +61979,7 @@ var require_lib2 = __commonJS({
61979
61979
  }
61980
61980
  _createClass__default["default"](PolygonElement2, [{
61981
61981
  key: "path",
61982
- value: function path15(ctx) {
61982
+ value: function path17(ctx) {
61983
61983
  var boundingBox = _get__default["default"](_getPrototypeOf__default["default"](PolygonElement2.prototype), "path", this).call(this, ctx);
61984
61984
  var _this$points = _slicedToArray__default["default"](this.points, 1), _this$points$ = _this$points[0], x = _this$points$.x, y = _this$points$.y;
61985
61985
  if (ctx) {
@@ -63230,7 +63230,7 @@ var require_lib2 = __commonJS({
63230
63230
  }
63231
63231
  }, {
63232
63232
  key: "path",
63233
- value: function path15(ctx) {
63233
+ value: function path17(ctx) {
63234
63234
  var dataArray = this.dataArray;
63235
63235
  if (ctx) {
63236
63236
  ctx.beginPath();
@@ -63259,7 +63259,7 @@ var require_lib2 = __commonJS({
63259
63259
  }
63260
63260
  break;
63261
63261
  case PathParser.ARC: {
63262
- var _points = _slicedToArray__default["default"](points, 8), cx = _points[0], cy = _points[1], rx = _points[2], ry = _points[3], theta = _points[4], dTheta = _points[5], psi = _points[6], fs15 = _points[7];
63262
+ var _points = _slicedToArray__default["default"](points, 8), cx = _points[0], cy = _points[1], rx = _points[2], ry = _points[3], theta = _points[4], dTheta = _points[5], psi = _points[6], fs17 = _points[7];
63263
63263
  var r = rx > ry ? rx : ry;
63264
63264
  var scaleX = rx > ry ? 1 : rx / ry;
63265
63265
  var scaleY = rx > ry ? ry / rx : 1;
@@ -63267,7 +63267,7 @@ var require_lib2 = __commonJS({
63267
63267
  ctx.translate(cx, cy);
63268
63268
  ctx.rotate(psi);
63269
63269
  ctx.scale(scaleX, scaleY);
63270
- ctx.arc(0, 0, r, theta, theta + dTheta, Boolean(1 - fs15));
63270
+ ctx.arc(0, 0, r, theta, theta + dTheta, Boolean(1 - fs17));
63271
63271
  ctx.scale(1 / scaleX, 1 / scaleY);
63272
63272
  ctx.rotate(-psi);
63273
63273
  ctx.translate(-cx, -cy);
@@ -63447,13 +63447,13 @@ var require_lib2 = __commonJS({
63447
63447
  }
63448
63448
  }, {
63449
63449
  key: "parsePathData",
63450
- value: function parsePathData(path15) {
63450
+ value: function parsePathData(path17) {
63451
63451
  this.pathLength = -1;
63452
- if (!path15) {
63452
+ if (!path17) {
63453
63453
  return [];
63454
63454
  }
63455
63455
  var pathCommands = [];
63456
- var pathParser = path15.pathParser;
63456
+ var pathParser = path17.pathParser;
63457
63457
  pathParser.reset();
63458
63458
  while (!pathParser.isEnd()) {
63459
63459
  var current = pathParser.current;
@@ -64259,7 +64259,7 @@ var require_lib2 = __commonJS({
64259
64259
  }
64260
64260
  }, {
64261
64261
  key: "path",
64262
- value: function path15(ctx) {
64262
+ value: function path17(ctx) {
64263
64263
  var element = this.element;
64264
64264
  if (element) {
64265
64265
  element.path(ctx);
@@ -76218,7 +76218,6 @@ function getToolDisplayName(toolName) {
76218
76218
  var NON_MODULE_TOOL_OWNERS, TOOL_RISK, TOOL_DISPLAY_NAMES;
76219
76219
  var init_catalog = __esm({
76220
76220
  "features/perchTerminal/runtime/toolSystem/catalog.ts"() {
76221
- "use strict";
76222
76221
  init_toolNames();
76223
76222
  NON_MODULE_TOOL_OWNERS = {
76224
76223
  [TOOL_NAMES.listSources]: "lane",
@@ -86341,14 +86340,14 @@ function extractOne(tc, ts) {
86341
86340
  }
86342
86341
  if (tc.toolName === "readLocalFile" || tc.toolName === "readLocalSourceFile") {
86343
86342
  const content = String(parsed?.content ?? tc.result ?? "").trim();
86344
- const path15 = String(tc.input?.path ?? "");
86343
+ const path17 = String(tc.input?.path ?? "");
86345
86344
  return {
86346
86345
  id: `ev-${tc.toolCallId}-fileread`,
86347
86346
  type: "fileRead",
86348
86347
  toolName: tc.toolName,
86349
- title: `readFile: ${path15 || "local file"}`,
86348
+ title: `readFile: ${path17 || "local file"}`,
86350
86349
  excerpt: truncate2(content, RICH_EXCERPT_CHARS),
86351
- workspacePath: path15 || null,
86350
+ workspacePath: path17 || null,
86352
86351
  timestamp: ts,
86353
86352
  ok: tc.ok
86354
86353
  };
@@ -86437,8 +86436,8 @@ function serializeThreadEvidenceForPrompt(items) {
86437
86436
  "The following tool results from prior turns are available for this turn. Treat them as already-completed work. Do not repeat searches, reads, drafts, or deliveries unless the user explicitly asks to redo them.",
86438
86437
  ...recent.map((item, idx) => {
86439
86438
  const status = item.ok ? "ok" : "failed";
86440
- const path15 = item.workspacePath ? ` path=${item.workspacePath}` : "";
86441
- return `[E${idx + 1}] ${item.type} via ${item.toolName} (${status}): ${item.title}${path15}
86439
+ const path17 = item.workspacePath ? ` path=${item.workspacePath}` : "";
86440
+ return `[E${idx + 1}] ${item.type} via ${item.toolName} (${status}): ${item.title}${path17}
86442
86441
  ${item.excerpt}`;
86443
86442
  })
86444
86443
  ].join("\n");
@@ -94657,13 +94656,13 @@ function __disposeResources(env4) {
94657
94656
  }
94658
94657
  return next();
94659
94658
  }
94660
- function __rewriteRelativeImportExtension(path15, preserveJsx) {
94661
- if (typeof path15 === "string" && /^\.\.?\//.test(path15)) {
94662
- return path15.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) {
94659
+ function __rewriteRelativeImportExtension(path17, preserveJsx) {
94660
+ if (typeof path17 === "string" && /^\.\.?\//.test(path17)) {
94661
+ return path17.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) {
94663
94662
  return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js";
94664
94663
  });
94665
94664
  }
94666
- return path15;
94665
+ return path17;
94667
94666
  }
94668
94667
  var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default;
94669
94668
  var init_tslib_es6 = __esm({
@@ -104185,8 +104184,8 @@ var require_main2 = __commonJS({
104185
104184
  });
104186
104185
 
104187
104186
  // node_modules/iceberg-js/dist/index.mjs
104188
- function buildUrl(baseUrl, path15, query) {
104189
- const url = new URL(path15, baseUrl);
104187
+ function buildUrl(baseUrl, path17, query) {
104188
+ const url = new URL(path17, baseUrl);
104190
104189
  if (query) {
104191
104190
  for (const [key, value] of Object.entries(query)) {
104192
104191
  if (value !== void 0) {
@@ -104216,12 +104215,12 @@ function createFetchClient(options) {
104216
104215
  return {
104217
104216
  async request({
104218
104217
  method,
104219
- path: path15,
104218
+ path: path17,
104220
104219
  query,
104221
104220
  body,
104222
104221
  headers
104223
104222
  }) {
104224
- const url = buildUrl(options.baseUrl, path15, query);
104223
+ const url = buildUrl(options.baseUrl, path17, query);
104225
104224
  const authHeaders = await buildAuthHeaders(options.auth);
104226
104225
  const res = await fetchFn(url, {
104227
104226
  method,
@@ -105119,7 +105118,7 @@ var init_dist3 = __esm({
105119
105118
  * @param path The relative file path. Should be of the format `folder/subfolder/filename.png`. The bucket must already exist before attempting to upload.
105120
105119
  * @param fileBody The body of the file to be stored in the bucket.
105121
105120
  */
105122
- async uploadOrUpdate(method, path15, fileBody, fileOptions) {
105121
+ async uploadOrUpdate(method, path17, fileBody, fileOptions) {
105123
105122
  var _this = this;
105124
105123
  return _this.handleOperation(async () => {
105125
105124
  let body;
@@ -105143,7 +105142,7 @@ var init_dist3 = __esm({
105143
105142
  if ((typeof ReadableStream !== "undefined" && body instanceof ReadableStream || body && typeof body === "object" && "pipe" in body && typeof body.pipe === "function") && !options.duplex) options.duplex = "half";
105144
105143
  }
105145
105144
  if (fileOptions === null || fileOptions === void 0 ? void 0 : fileOptions.headers) for (const [key, value] of Object.entries(fileOptions.headers)) headers = setHeader(headers, key, value);
105146
- const cleanPath = _this._removeEmptyFolders(path15);
105145
+ const cleanPath = _this._removeEmptyFolders(path17);
105147
105146
  const _path = _this._getFinalPath(cleanPath);
105148
105147
  const data = await (method == "PUT" ? put : post)(_this.fetch, `${_this.url}/object/${_path}`, body, _objectSpread22({ headers }, (options === null || options === void 0 ? void 0 : options.duplex) ? { duplex: options.duplex } : {}));
105149
105148
  return {
@@ -105205,8 +105204,8 @@ var init_dist3 = __esm({
105205
105204
  * - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
105206
105205
  * - For React Native, using either `Blob`, `File` or `FormData` does not work as intended. Upload file using `ArrayBuffer` from base64 file data instead, see example below.
105207
105206
  */
105208
- async upload(path15, fileBody, fileOptions) {
105209
- return this.uploadOrUpdate("POST", path15, fileBody, fileOptions);
105207
+ async upload(path17, fileBody, fileOptions) {
105208
+ return this.uploadOrUpdate("POST", path17, fileBody, fileOptions);
105210
105209
  }
105211
105210
  /**
105212
105211
  * Upload a file with a token generated from `createSignedUploadUrl`.
@@ -105246,9 +105245,9 @@ var init_dist3 = __esm({
105246
105245
  * - `objects` table permissions: none
105247
105246
  * - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
105248
105247
  */
105249
- async uploadToSignedUrl(path15, token, fileBody, fileOptions) {
105248
+ async uploadToSignedUrl(path17, token, fileBody, fileOptions) {
105250
105249
  var _this3 = this;
105251
- const cleanPath = _this3._removeEmptyFolders(path15);
105250
+ const cleanPath = _this3._removeEmptyFolders(path17);
105252
105251
  const _path = _this3._getFinalPath(cleanPath);
105253
105252
  const url = new URL(_this3.url + `/object/upload/sign/${_path}`);
105254
105253
  url.searchParams.set("token", token);
@@ -105317,10 +105316,10 @@ var init_dist3 = __esm({
105317
105316
  * - `objects` table permissions: `insert`
105318
105317
  * - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
105319
105318
  */
105320
- async createSignedUploadUrl(path15, options) {
105319
+ async createSignedUploadUrl(path17, options) {
105321
105320
  var _this4 = this;
105322
105321
  return _this4.handleOperation(async () => {
105323
- let _path = _this4._getFinalPath(path15);
105322
+ let _path = _this4._getFinalPath(path17);
105324
105323
  const headers = _objectSpread22({}, _this4.headers);
105325
105324
  if (options === null || options === void 0 ? void 0 : options.upsert) headers["x-upsert"] = "true";
105326
105325
  const data = await post(_this4.fetch, `${_this4.url}/object/upload/sign/${_path}`, {}, { headers });
@@ -105329,7 +105328,7 @@ var init_dist3 = __esm({
105329
105328
  if (!token) throw new StorageError("No token returned by API");
105330
105329
  return {
105331
105330
  signedUrl: url.toString(),
105332
- path: path15,
105331
+ path: path17,
105333
105332
  token
105334
105333
  };
105335
105334
  });
@@ -105389,8 +105388,8 @@ var init_dist3 = __esm({
105389
105388
  * - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
105390
105389
  * - For React Native, using either `Blob`, `File` or `FormData` does not work as intended. Update file using `ArrayBuffer` from base64 file data instead, see example below.
105391
105390
  */
105392
- async update(path15, fileBody, fileOptions) {
105393
- return this.uploadOrUpdate("PUT", path15, fileBody, fileOptions);
105391
+ async update(path17, fileBody, fileOptions) {
105392
+ return this.uploadOrUpdate("PUT", path17, fileBody, fileOptions);
105394
105393
  }
105395
105394
  /**
105396
105395
  * Moves an existing file to a new path in the same bucket.
@@ -105541,10 +105540,10 @@ var init_dist3 = __esm({
105541
105540
  * - `objects` table permissions: `select`
105542
105541
  * - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
105543
105542
  */
105544
- async createSignedUrl(path15, expiresIn, options) {
105543
+ async createSignedUrl(path17, expiresIn, options) {
105545
105544
  var _this8 = this;
105546
105545
  return _this8.handleOperation(async () => {
105547
- let _path = _this8._getFinalPath(path15);
105546
+ let _path = _this8._getFinalPath(path17);
105548
105547
  const hasTransform = typeof (options === null || options === void 0 ? void 0 : options.transform) === "object" && options.transform !== null && Object.keys(options.transform).length > 0;
105549
105548
  let data = await post(_this8.fetch, `${_this8.url}/object/sign/${_path}`, _objectSpread22({ expiresIn }, hasTransform ? { transform: options.transform } : {}), { headers: _this8.headers });
105550
105549
  const query = new URLSearchParams();
@@ -105680,13 +105679,13 @@ var init_dist3 = __esm({
105680
105679
  * - `objects` table permissions: `select`
105681
105680
  * - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
105682
105681
  */
105683
- download(path15, options, parameters) {
105682
+ download(path17, options, parameters) {
105684
105683
  const renderPath = typeof (options === null || options === void 0 ? void 0 : options.transform) === "object" && options.transform !== null && Object.keys(options.transform).length > 0 ? "render/image/authenticated" : "object";
105685
105684
  const query = new URLSearchParams();
105686
105685
  if (options === null || options === void 0 ? void 0 : options.transform) this.applyTransformOptsToQuery(query, options.transform);
105687
105686
  if ((options === null || options === void 0 ? void 0 : options.cacheNonce) != null) query.set("cacheNonce", String(options.cacheNonce));
105688
105687
  const queryString = query.toString();
105689
- const _path = this._getFinalPath(path15);
105688
+ const _path = this._getFinalPath(path17);
105690
105689
  const downloadFn = () => get(this.fetch, `${this.url}/${renderPath}/${_path}${queryString ? `?${queryString}` : ""}`, {
105691
105690
  headers: this.headers,
105692
105691
  noResolveJson: true
@@ -105717,9 +105716,9 @@ var init_dist3 = __esm({
105717
105716
  * }
105718
105717
  * ```
105719
105718
  */
105720
- async info(path15) {
105719
+ async info(path17) {
105721
105720
  var _this10 = this;
105722
- const _path = _this10._getFinalPath(path15);
105721
+ const _path = _this10._getFinalPath(path17);
105723
105722
  return _this10.handleOperation(async () => {
105724
105723
  return recursiveToCamel(await get(_this10.fetch, `${_this10.url}/object/info/${_path}`, { headers: _this10.headers }));
105725
105724
  });
@@ -105740,9 +105739,9 @@ var init_dist3 = __esm({
105740
105739
  * .exists('folder/avatar1.png')
105741
105740
  * ```
105742
105741
  */
105743
- async exists(path15) {
105742
+ async exists(path17) {
105744
105743
  var _this11 = this;
105745
- const _path = _this11._getFinalPath(path15);
105744
+ const _path = _this11._getFinalPath(path17);
105746
105745
  try {
105747
105746
  await head(_this11.fetch, `${_this11.url}/object/${_path}`, { headers: _this11.headers });
105748
105747
  return {
@@ -105821,8 +105820,8 @@ var init_dist3 = __esm({
105821
105820
  * - `objects` table permissions: none
105822
105821
  * - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
105823
105822
  */
105824
- getPublicUrl(path15, options) {
105825
- const _path = this._getFinalPath(path15);
105823
+ getPublicUrl(path17, options) {
105824
+ const _path = this._getFinalPath(path17);
105826
105825
  const query = new URLSearchParams();
105827
105826
  if (options === null || options === void 0 ? void 0 : options.download) query.set("download", options.download === true ? "" : options.download);
105828
105827
  if (options === null || options === void 0 ? void 0 : options.transform) this.applyTransformOptsToQuery(query, options.transform);
@@ -105961,10 +105960,10 @@ var init_dist3 = __esm({
105961
105960
  * - `objects` table permissions: `select`
105962
105961
  * - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
105963
105962
  */
105964
- async list(path15, options, parameters) {
105963
+ async list(path17, options, parameters) {
105965
105964
  var _this13 = this;
105966
105965
  return _this13.handleOperation(async () => {
105967
- const body = _objectSpread22(_objectSpread22(_objectSpread22({}, DEFAULT_SEARCH_OPTIONS), options), {}, { prefix: path15 || "" });
105966
+ const body = _objectSpread22(_objectSpread22(_objectSpread22({}, DEFAULT_SEARCH_OPTIONS), options), {}, { prefix: path17 || "" });
105968
105967
  return await post(_this13.fetch, `${_this13.url}/object/list/${_this13.bucketId}`, body, { headers: _this13.headers }, parameters);
105969
105968
  });
105970
105969
  }
@@ -106029,11 +106028,11 @@ var init_dist3 = __esm({
106029
106028
  if (typeof Buffer !== "undefined") return Buffer.from(data).toString("base64");
106030
106029
  return btoa(data);
106031
106030
  }
106032
- _getFinalPath(path15) {
106033
- return `${this.bucketId}/${path15.replace(/^\/+/, "")}`;
106031
+ _getFinalPath(path17) {
106032
+ return `${this.bucketId}/${path17.replace(/^\/+/, "")}`;
106034
106033
  }
106035
- _removeEmptyFolders(path15) {
106036
- return path15.replace(/^\/|\/$/g, "").replace(/\/+/g, "/");
106034
+ _removeEmptyFolders(path17) {
106035
+ return path17.replace(/^\/|\/$/g, "").replace(/\/+/g, "/");
106037
106036
  }
106038
106037
  /** Modifies the `query`, appending values the from `transform` */
106039
106038
  applyTransformOptsToQuery(query, transform) {
@@ -117511,9 +117510,9 @@ function fetchClaudeCodeMessages(option, opts, model) {
117511
117510
  signal: providerAbort.signal
117512
117511
  }).finally(providerAbort.clear);
117513
117512
  }
117514
- function claudeCodeEndpoint(path15) {
117513
+ function claudeCodeEndpoint(path17) {
117515
117514
  const base = (envVar("CLAUDE_CODE_BASE_URL") ?? envVar("CLAUDE_CODE_BACKEND_BASE_URL") ?? "https://api.anthropic.com").replace(/\/$/, "");
117516
- const endpoint = base.endsWith(`/v1/${path15}`) || base.endsWith(`/${path15}`) ? base : `${base}/v1/${path15}`;
117515
+ const endpoint = base.endsWith(`/v1/${path17}`) || base.endsWith(`/${path17}`) ? base : `${base}/v1/${path17}`;
117517
117516
  const url = new URL(endpoint);
117518
117517
  url.searchParams.set("beta", "true");
117519
117518
  return url.toString();
@@ -117767,9 +117766,9 @@ function parseCodexToolCallItem(item, index) {
117767
117766
  rawArgumentsText
117768
117767
  };
117769
117768
  }
117770
- function codexEndpoint(path15) {
117769
+ function codexEndpoint(path17) {
117771
117770
  const base = (envVar("CODEX_BACKEND_BASE_URL") ?? envVar("CODEX_OAUTH_BASE_URL") ?? "https://chatgpt.com/backend-api/codex").replace(/\/$/, "");
117772
- const endpoint = base.endsWith(`/${path15}`) ? base : `${base}/${path15}`;
117771
+ const endpoint = base.endsWith(`/${path17}`) ? base : `${base}/${path17}`;
117773
117772
  const url = new URL(endpoint);
117774
117773
  url.searchParams.set("client_version", codexClientVersion());
117775
117774
  return url.toString();
@@ -125393,8 +125392,8 @@ var require_dist2 = __commonJS({
125393
125392
  return this.status === 419;
125394
125393
  }
125395
125394
  };
125396
- function buildUrl2(baseUrl, path15, query) {
125397
- const url = new URL(path15, baseUrl);
125395
+ function buildUrl2(baseUrl, path17, query) {
125396
+ const url = new URL(path17, baseUrl);
125398
125397
  if (query) {
125399
125398
  for (const [key, value] of Object.entries(query)) {
125400
125399
  if (value !== void 0) {
@@ -125424,12 +125423,12 @@ var require_dist2 = __commonJS({
125424
125423
  return {
125425
125424
  async request({
125426
125425
  method,
125427
- path: path15,
125426
+ path: path17,
125428
125427
  query,
125429
125428
  body,
125430
125429
  headers
125431
125430
  }) {
125432
- const url = buildUrl2(options.baseUrl, path15, query);
125431
+ const url = buildUrl2(options.baseUrl, path17, query);
125433
125432
  const authHeaders = await buildAuthHeaders2(options.auth);
125434
125433
  const res = await fetchFn(url, {
125435
125434
  method,
@@ -126370,7 +126369,7 @@ var require_dist3 = __commonJS({
126370
126369
  * @param path The relative file path. Should be of the format `folder/subfolder/filename.png`. The bucket must already exist before attempting to upload.
126371
126370
  * @param fileBody The body of the file to be stored in the bucket.
126372
126371
  */
126373
- async uploadOrUpdate(method, path15, fileBody, fileOptions) {
126372
+ async uploadOrUpdate(method, path17, fileBody, fileOptions) {
126374
126373
  var _this = this;
126375
126374
  return _this.handleOperation(async () => {
126376
126375
  let body;
@@ -126394,7 +126393,7 @@ var require_dist3 = __commonJS({
126394
126393
  if ((typeof ReadableStream !== "undefined" && body instanceof ReadableStream || body && typeof body === "object" && "pipe" in body && typeof body.pipe === "function") && !options.duplex) options.duplex = "half";
126395
126394
  }
126396
126395
  if (fileOptions === null || fileOptions === void 0 ? void 0 : fileOptions.headers) for (const [key, value] of Object.entries(fileOptions.headers)) headers = setHeader2(headers, key, value);
126397
- const cleanPath = _this._removeEmptyFolders(path15);
126396
+ const cleanPath = _this._removeEmptyFolders(path17);
126398
126397
  const _path = _this._getFinalPath(cleanPath);
126399
126398
  const data = await (method == "PUT" ? put2 : post2)(_this.fetch, `${_this.url}/object/${_path}`, body, _objectSpread24({ headers }, (options === null || options === void 0 ? void 0 : options.duplex) ? { duplex: options.duplex } : {}));
126400
126399
  return {
@@ -126456,8 +126455,8 @@ var require_dist3 = __commonJS({
126456
126455
  * - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
126457
126456
  * - For React Native, using either `Blob`, `File` or `FormData` does not work as intended. Upload file using `ArrayBuffer` from base64 file data instead, see example below.
126458
126457
  */
126459
- async upload(path15, fileBody, fileOptions) {
126460
- return this.uploadOrUpdate("POST", path15, fileBody, fileOptions);
126458
+ async upload(path17, fileBody, fileOptions) {
126459
+ return this.uploadOrUpdate("POST", path17, fileBody, fileOptions);
126461
126460
  }
126462
126461
  /**
126463
126462
  * Upload a file with a token generated from `createSignedUploadUrl`.
@@ -126497,9 +126496,9 @@ var require_dist3 = __commonJS({
126497
126496
  * - `objects` table permissions: none
126498
126497
  * - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
126499
126498
  */
126500
- async uploadToSignedUrl(path15, token, fileBody, fileOptions) {
126499
+ async uploadToSignedUrl(path17, token, fileBody, fileOptions) {
126501
126500
  var _this3 = this;
126502
- const cleanPath = _this3._removeEmptyFolders(path15);
126501
+ const cleanPath = _this3._removeEmptyFolders(path17);
126503
126502
  const _path = _this3._getFinalPath(cleanPath);
126504
126503
  const url = new URL(_this3.url + `/object/upload/sign/${_path}`);
126505
126504
  url.searchParams.set("token", token);
@@ -126568,10 +126567,10 @@ var require_dist3 = __commonJS({
126568
126567
  * - `objects` table permissions: `insert`
126569
126568
  * - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
126570
126569
  */
126571
- async createSignedUploadUrl(path15, options) {
126570
+ async createSignedUploadUrl(path17, options) {
126572
126571
  var _this4 = this;
126573
126572
  return _this4.handleOperation(async () => {
126574
- let _path = _this4._getFinalPath(path15);
126573
+ let _path = _this4._getFinalPath(path17);
126575
126574
  const headers = _objectSpread24({}, _this4.headers);
126576
126575
  if (options === null || options === void 0 ? void 0 : options.upsert) headers["x-upsert"] = "true";
126577
126576
  const data = await post2(_this4.fetch, `${_this4.url}/object/upload/sign/${_path}`, {}, { headers });
@@ -126580,7 +126579,7 @@ var require_dist3 = __commonJS({
126580
126579
  if (!token) throw new StorageError2("No token returned by API");
126581
126580
  return {
126582
126581
  signedUrl: url.toString(),
126583
- path: path15,
126582
+ path: path17,
126584
126583
  token
126585
126584
  };
126586
126585
  });
@@ -126640,8 +126639,8 @@ var require_dist3 = __commonJS({
126640
126639
  * - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
126641
126640
  * - For React Native, using either `Blob`, `File` or `FormData` does not work as intended. Update file using `ArrayBuffer` from base64 file data instead, see example below.
126642
126641
  */
126643
- async update(path15, fileBody, fileOptions) {
126644
- return this.uploadOrUpdate("PUT", path15, fileBody, fileOptions);
126642
+ async update(path17, fileBody, fileOptions) {
126643
+ return this.uploadOrUpdate("PUT", path17, fileBody, fileOptions);
126645
126644
  }
126646
126645
  /**
126647
126646
  * Moves an existing file to a new path in the same bucket.
@@ -126792,10 +126791,10 @@ var require_dist3 = __commonJS({
126792
126791
  * - `objects` table permissions: `select`
126793
126792
  * - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
126794
126793
  */
126795
- async createSignedUrl(path15, expiresIn, options) {
126794
+ async createSignedUrl(path17, expiresIn, options) {
126796
126795
  var _this8 = this;
126797
126796
  return _this8.handleOperation(async () => {
126798
- let _path = _this8._getFinalPath(path15);
126797
+ let _path = _this8._getFinalPath(path17);
126799
126798
  const hasTransform = typeof (options === null || options === void 0 ? void 0 : options.transform) === "object" && options.transform !== null && Object.keys(options.transform).length > 0;
126800
126799
  let data = await post2(_this8.fetch, `${_this8.url}/object/sign/${_path}`, _objectSpread24({ expiresIn }, hasTransform ? { transform: options.transform } : {}), { headers: _this8.headers });
126801
126800
  const query = new URLSearchParams();
@@ -126931,13 +126930,13 @@ var require_dist3 = __commonJS({
126931
126930
  * - `objects` table permissions: `select`
126932
126931
  * - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
126933
126932
  */
126934
- download(path15, options, parameters) {
126933
+ download(path17, options, parameters) {
126935
126934
  const renderPath = typeof (options === null || options === void 0 ? void 0 : options.transform) === "object" && options.transform !== null && Object.keys(options.transform).length > 0 ? "render/image/authenticated" : "object";
126936
126935
  const query = new URLSearchParams();
126937
126936
  if (options === null || options === void 0 ? void 0 : options.transform) this.applyTransformOptsToQuery(query, options.transform);
126938
126937
  if ((options === null || options === void 0 ? void 0 : options.cacheNonce) != null) query.set("cacheNonce", String(options.cacheNonce));
126939
126938
  const queryString = query.toString();
126940
- const _path = this._getFinalPath(path15);
126939
+ const _path = this._getFinalPath(path17);
126941
126940
  const downloadFn = () => get3(this.fetch, `${this.url}/${renderPath}/${_path}${queryString ? `?${queryString}` : ""}`, {
126942
126941
  headers: this.headers,
126943
126942
  noResolveJson: true
@@ -126968,9 +126967,9 @@ var require_dist3 = __commonJS({
126968
126967
  * }
126969
126968
  * ```
126970
126969
  */
126971
- async info(path15) {
126970
+ async info(path17) {
126972
126971
  var _this10 = this;
126973
- const _path = _this10._getFinalPath(path15);
126972
+ const _path = _this10._getFinalPath(path17);
126974
126973
  return _this10.handleOperation(async () => {
126975
126974
  return recursiveToCamel2(await get3(_this10.fetch, `${_this10.url}/object/info/${_path}`, { headers: _this10.headers }));
126976
126975
  });
@@ -126991,9 +126990,9 @@ var require_dist3 = __commonJS({
126991
126990
  * .exists('folder/avatar1.png')
126992
126991
  * ```
126993
126992
  */
126994
- async exists(path15) {
126993
+ async exists(path17) {
126995
126994
  var _this11 = this;
126996
- const _path = _this11._getFinalPath(path15);
126995
+ const _path = _this11._getFinalPath(path17);
126997
126996
  try {
126998
126997
  await head2(_this11.fetch, `${_this11.url}/object/${_path}`, { headers: _this11.headers });
126999
126998
  return {
@@ -127072,8 +127071,8 @@ var require_dist3 = __commonJS({
127072
127071
  * - `objects` table permissions: none
127073
127072
  * - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
127074
127073
  */
127075
- getPublicUrl(path15, options) {
127076
- const _path = this._getFinalPath(path15);
127074
+ getPublicUrl(path17, options) {
127075
+ const _path = this._getFinalPath(path17);
127077
127076
  const query = new URLSearchParams();
127078
127077
  if (options === null || options === void 0 ? void 0 : options.download) query.set("download", options.download === true ? "" : options.download);
127079
127078
  if (options === null || options === void 0 ? void 0 : options.transform) this.applyTransformOptsToQuery(query, options.transform);
@@ -127212,10 +127211,10 @@ var require_dist3 = __commonJS({
127212
127211
  * - `objects` table permissions: `select`
127213
127212
  * - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
127214
127213
  */
127215
- async list(path15, options, parameters) {
127214
+ async list(path17, options, parameters) {
127216
127215
  var _this13 = this;
127217
127216
  return _this13.handleOperation(async () => {
127218
- const body = _objectSpread24(_objectSpread24(_objectSpread24({}, DEFAULT_SEARCH_OPTIONS2), options), {}, { prefix: path15 || "" });
127217
+ const body = _objectSpread24(_objectSpread24(_objectSpread24({}, DEFAULT_SEARCH_OPTIONS2), options), {}, { prefix: path17 || "" });
127219
127218
  return await post2(_this13.fetch, `${_this13.url}/object/list/${_this13.bucketId}`, body, { headers: _this13.headers }, parameters);
127220
127219
  });
127221
127220
  }
@@ -127280,11 +127279,11 @@ var require_dist3 = __commonJS({
127280
127279
  if (typeof Buffer !== "undefined") return Buffer.from(data).toString("base64");
127281
127280
  return btoa(data);
127282
127281
  }
127283
- _getFinalPath(path15) {
127284
- return `${this.bucketId}/${path15.replace(/^\/+/, "")}`;
127282
+ _getFinalPath(path17) {
127283
+ return `${this.bucketId}/${path17.replace(/^\/+/, "")}`;
127285
127284
  }
127286
- _removeEmptyFolders(path15) {
127287
- return path15.replace(/^\/|\/$/g, "").replace(/\/+/g, "/");
127285
+ _removeEmptyFolders(path17) {
127286
+ return path17.replace(/^\/|\/$/g, "").replace(/\/+/g, "/");
127288
127287
  }
127289
127288
  /** Modifies the `query`, appending values the from `transform` */
127290
127289
  applyTransformOptsToQuery(query, transform) {
@@ -138318,11 +138317,11 @@ async function pickFolder(request) {
138318
138317
  if (result2.ok) notifyApprovedRootsChanged();
138319
138318
  return result2;
138320
138319
  }
138321
- async function approveFolderAccess(path15, options) {
138320
+ async function approveFolderAccess(path17, options) {
138322
138321
  const bridge = getDesktopBridge();
138323
138322
  if (!bridge) return { ok: false, error: LOCAL_WORKSPACE_ACCESS_UNAVAILABLE };
138324
138323
  const result2 = await bridge.approveFolderAccess({
138325
- path: path15,
138324
+ path: path17,
138326
138325
  permissionMode: currentPermissionMode(),
138327
138326
  grantedVia: options?.grantedVia ?? null
138328
138327
  });
@@ -138768,6 +138767,7 @@ function offSandboxEvent(runId, handler) {
138768
138767
  var LOCAL_WORKSPACE_ACCESS_UNAVAILABLE;
138769
138768
  var init_bridge = __esm({
138770
138769
  "features/perchTerminal/desktop/bridge.ts"() {
138770
+ "use strict";
138771
138771
  LOCAL_WORKSPACE_ACCESS_UNAVAILABLE = "Local workspace access is unavailable. Open Perch Desktop or update the app.";
138772
138772
  }
138773
138773
  });
@@ -139347,8 +139347,8 @@ function wrapReason(ex) {
139347
139347
  return new UnknownErrorException(ex.message, ex.toString());
139348
139348
  }
139349
139349
  async function node_utils_fetchData(url) {
139350
- const fs15 = process.getBuiltinModule("fs");
139351
- const data = await fs15.promises.readFile(url);
139350
+ const fs17 = process.getBuiltinModule("fs");
139351
+ const data = await fs17.promises.readFile(url);
139352
139352
  return new Uint8Array(data);
139353
139353
  }
139354
139354
  function applyBoundingBox(ctx, bbox) {
@@ -139749,7 +139749,7 @@ function compileType3Glyph(imgData) {
139749
139749
  return null;
139750
139750
  }
139751
139751
  const steps = new Int32Array([0, width1, -1, 0, -width1, 0, 0, 0, 1]);
139752
- const path15 = new Path2D();
139752
+ const path17 = new Path2D();
139753
139753
  for (i = 0; count && i <= height; i++) {
139754
139754
  let p = i * width1;
139755
139755
  const end = p + width;
@@ -139759,7 +139759,7 @@ function compileType3Glyph(imgData) {
139759
139759
  if (p === end) {
139760
139760
  continue;
139761
139761
  }
139762
- path15.moveTo(p % width1, i);
139762
+ path17.moveTo(p % width1, i);
139763
139763
  const p0 = p;
139764
139764
  let type = points[p];
139765
139765
  do {
@@ -139775,7 +139775,7 @@ function compileType3Glyph(imgData) {
139775
139775
  type = pp & 51 * type >> 4;
139776
139776
  points[p] &= type >> 2 | type << 2;
139777
139777
  }
139778
- path15.lineTo(p % width1, p / width1 | 0);
139778
+ path17.lineTo(p % width1, p / width1 | 0);
139779
139779
  if (!points[p]) {
139780
139780
  --count;
139781
139781
  }
@@ -139788,7 +139788,7 @@ function compileType3Glyph(imgData) {
139788
139788
  c.save();
139789
139789
  c.scale(1 / width, -1 / height);
139790
139790
  c.translate(0, -height);
139791
- c.fill(path15);
139791
+ c.fill(path17);
139792
139792
  c.beginPath();
139793
139793
  c.restore();
139794
139794
  };
@@ -149375,11 +149375,11 @@ var init_pdf = __esm({
149375
149375
  } catch (ex) {
149376
149376
  warn(`getPathGenerator - ignoring character: "${ex}".`);
149377
149377
  }
149378
- const path15 = new Path2D(cmds || "");
149378
+ const path17 = new Path2D(cmds || "");
149379
149379
  if (!this.fontExtraProperties) {
149380
149380
  objs.delete(objId);
149381
149381
  }
149382
- return this.compiledGlyphs[character] = path15;
149382
+ return this.compiledGlyphs[character] = path17;
149383
149383
  }
149384
149384
  };
149385
149385
  CallbackKind = {
@@ -151390,9 +151390,9 @@ var init_pdf = __esm({
151390
151390
  x,
151391
151391
  y,
151392
151392
  fontSize,
151393
- path: path15
151393
+ path: path17
151394
151394
  } of paths) {
151395
- newPath.addPath(path15, new DOMMatrix(transform).preMultiplySelf(invTransf).translate(x, y).scale(fontSize, -fontSize));
151395
+ newPath.addPath(path17, new DOMMatrix(transform).preMultiplySelf(invTransf).translate(x, y).scale(fontSize, -fontSize));
151396
151396
  }
151397
151397
  ctx.clip(newPath);
151398
151398
  ctx.beginPath();
@@ -151472,9 +151472,9 @@ var init_pdf = __esm({
151472
151472
  nextLine() {
151473
151473
  this.moveText(0, this.current.leading);
151474
151474
  }
151475
- #getScaledPath(path15, currentTransform, transform) {
151475
+ #getScaledPath(path17, currentTransform, transform) {
151476
151476
  const newPath = new Path2D();
151477
- newPath.addPath(path15, new DOMMatrix(transform).invertSelf().multiplySelf(currentTransform));
151477
+ newPath.addPath(path17, new DOMMatrix(transform).invertSelf().multiplySelf(currentTransform));
151478
151478
  return newPath;
151479
151479
  }
151480
151480
  paintChar(character, x, y, patternFillTransform, patternStrokeTransform) {
@@ -151487,9 +151487,9 @@ var init_pdf = __esm({
151487
151487
  const isAddToPathSet = !!(textRenderingMode & TextRenderingMode.ADD_TO_PATH_FLAG);
151488
151488
  const patternFill = current.patternFill && !font.missingFile;
151489
151489
  const patternStroke = current.patternStroke && !font.missingFile;
151490
- let path15;
151490
+ let path17;
151491
151491
  if (font.disableFontFace || isAddToPathSet || patternFill || patternStroke) {
151492
- path15 = font.getPathGenerator(this.commonObjs, character);
151492
+ path17 = font.getPathGenerator(this.commonObjs, character);
151493
151493
  }
151494
151494
  if (font.disableFontFace || patternFill || patternStroke) {
151495
151495
  ctx.save();
@@ -151499,19 +151499,19 @@ var init_pdf = __esm({
151499
151499
  if (patternFillTransform) {
151500
151500
  const currentTransform = ctx.getTransform();
151501
151501
  ctx.setTransform(...patternFillTransform);
151502
- ctx.fill(this.#getScaledPath(path15, currentTransform, patternFillTransform));
151502
+ ctx.fill(this.#getScaledPath(path17, currentTransform, patternFillTransform));
151503
151503
  } else {
151504
- ctx.fill(path15);
151504
+ ctx.fill(path17);
151505
151505
  }
151506
151506
  }
151507
151507
  if (fillStrokeMode === TextRenderingMode.STROKE || fillStrokeMode === TextRenderingMode.FILL_STROKE) {
151508
151508
  if (patternStrokeTransform) {
151509
151509
  const currentTransform = ctx.getTransform();
151510
151510
  ctx.setTransform(...patternStrokeTransform);
151511
- ctx.stroke(this.#getScaledPath(path15, currentTransform, patternStrokeTransform));
151511
+ ctx.stroke(this.#getScaledPath(path17, currentTransform, patternStrokeTransform));
151512
151512
  } else {
151513
151513
  ctx.lineWidth /= fontSize;
151514
- ctx.stroke(path15);
151514
+ ctx.stroke(path17);
151515
151515
  }
151516
151516
  }
151517
151517
  ctx.restore();
@@ -151530,7 +151530,7 @@ var init_pdf = __esm({
151530
151530
  x,
151531
151531
  y,
151532
151532
  fontSize,
151533
- path: path15
151533
+ path: path17
151534
151534
  });
151535
151535
  }
151536
151536
  }
@@ -153545,10 +153545,10 @@ var init_pdf = __esm({
153545
153545
  this._readableStream = null;
153546
153546
  this._readCapability = Promise.withResolvers();
153547
153547
  this._headersCapability = Promise.withResolvers();
153548
- const fs15 = process.getBuiltinModule("fs");
153549
- fs15.promises.lstat(this._url).then((stat2) => {
153548
+ const fs17 = process.getBuiltinModule("fs");
153549
+ fs17.promises.lstat(this._url).then((stat2) => {
153550
153550
  this._contentLength = stat2.size;
153551
- this._setReadableStream(fs15.createReadStream(this._url));
153551
+ this._setReadableStream(fs17.createReadStream(this._url));
153552
153552
  this._headersCapability.resolve();
153553
153553
  }, (error) => {
153554
153554
  if (error.code === "ENOENT") {
@@ -153643,8 +153643,8 @@ var init_pdf = __esm({
153643
153643
  this._readCapability = Promise.withResolvers();
153644
153644
  const source = stream.source;
153645
153645
  this._isStreamingSupported = !source.disableStream;
153646
- const fs15 = process.getBuiltinModule("fs");
153647
- this._setReadableStream(fs15.createReadStream(this._url, {
153646
+ const fs17 = process.getBuiltinModule("fs");
153647
+ this._setReadableStream(fs17.createReadStream(this._url, {
153648
153648
  start,
153649
153649
  end: end - 1
153650
153650
  }));
@@ -163868,13 +163868,13 @@ var init_pdf = __esm({
163868
163868
  const root2 = this.#createSVG();
163869
163869
  const defs = _DrawLayer._svgFactory.createElement("defs");
163870
163870
  root2.append(defs);
163871
- const path15 = _DrawLayer._svgFactory.createElement("path");
163872
- defs.append(path15);
163871
+ const path17 = _DrawLayer._svgFactory.createElement("path");
163872
+ defs.append(path17);
163873
163873
  const pathId = `path_p${this.pageIndex}_${id}`;
163874
- path15.setAttribute("id", pathId);
163875
- path15.setAttribute("vector-effect", "non-scaling-stroke");
163874
+ path17.setAttribute("id", pathId);
163875
+ path17.setAttribute("vector-effect", "non-scaling-stroke");
163876
163876
  if (isPathUpdatable) {
163877
- this.#toUpdate.set(id, path15);
163877
+ this.#toUpdate.set(id, path17);
163878
163878
  }
163879
163879
  const clipPathId = hasClip ? this.#createClipPath(defs, pathId) : null;
163880
163880
  const use = _DrawLayer._svgFactory.createElement("use");
@@ -163892,11 +163892,11 @@ var init_pdf = __esm({
163892
163892
  const root2 = this.#createSVG();
163893
163893
  const defs = _DrawLayer._svgFactory.createElement("defs");
163894
163894
  root2.append(defs);
163895
- const path15 = _DrawLayer._svgFactory.createElement("path");
163896
- defs.append(path15);
163895
+ const path17 = _DrawLayer._svgFactory.createElement("path");
163896
+ defs.append(path17);
163897
163897
  const pathId = `path_p${this.pageIndex}_${id}`;
163898
- path15.setAttribute("id", pathId);
163899
- path15.setAttribute("vector-effect", "non-scaling-stroke");
163898
+ path17.setAttribute("id", pathId);
163899
+ path17.setAttribute("vector-effect", "non-scaling-stroke");
163900
163900
  let maskId;
163901
163901
  if (mustRemoveSelfIntersections) {
163902
163902
  const mask = _DrawLayer._svgFactory.createElement("mask");
@@ -163943,7 +163943,7 @@ var init_pdf = __esm({
163943
163943
  root: root2,
163944
163944
  bbox,
163945
163945
  rootClass,
163946
- path: path15
163946
+ path: path17
163947
163947
  } = properties;
163948
163948
  const element = typeof elementOrId === "number" ? this.#mapping.get(elementOrId) : elementOrId;
163949
163949
  if (!element) {
@@ -163963,10 +163963,10 @@ var init_pdf = __esm({
163963
163963
  classList.toggle(className, value);
163964
163964
  }
163965
163965
  }
163966
- if (path15) {
163966
+ if (path17) {
163967
163967
  const defs = element.firstChild;
163968
163968
  const pathElement = defs.firstChild;
163969
- this.#updateProperties(pathElement, path15);
163969
+ this.#updateProperties(pathElement, path17);
163970
163970
  }
163971
163971
  }
163972
163972
  updateParent(id, layer) {
@@ -164923,8 +164923,8 @@ var init_tap = __esm({
164923
164923
  });
164924
164924
 
164925
164925
  // node_modules/underscore/modules/toPath.js
164926
- function toPath(path15) {
164927
- return isArray_default(path15) ? path15 : [path15];
164926
+ function toPath(path17) {
164927
+ return isArray_default(path17) ? path17 : [path17];
164928
164928
  }
164929
164929
  var init_toPath = __esm({
164930
164930
  "node_modules/underscore/modules/toPath.js"() {
@@ -164935,8 +164935,8 @@ var init_toPath = __esm({
164935
164935
  });
164936
164936
 
164937
164937
  // node_modules/underscore/modules/_toPath.js
164938
- function toPath2(path15) {
164939
- return _.toPath(path15);
164938
+ function toPath2(path17) {
164939
+ return _.toPath(path17);
164940
164940
  }
164941
164941
  var init_toPath2 = __esm({
164942
164942
  "node_modules/underscore/modules/_toPath.js"() {
@@ -164946,11 +164946,11 @@ var init_toPath2 = __esm({
164946
164946
  });
164947
164947
 
164948
164948
  // node_modules/underscore/modules/_deepGet.js
164949
- function deepGet(obj2, path15) {
164950
- var length = path15.length;
164949
+ function deepGet(obj2, path17) {
164950
+ var length = path17.length;
164951
164951
  for (var i = 0; i < length; i++) {
164952
164952
  if (obj2 == null) return void 0;
164953
- obj2 = obj2[path15[i]];
164953
+ obj2 = obj2[path17[i]];
164954
164954
  }
164955
164955
  return length ? obj2 : void 0;
164956
164956
  }
@@ -164960,8 +164960,8 @@ var init_deepGet = __esm({
164960
164960
  });
164961
164961
 
164962
164962
  // node_modules/underscore/modules/get.js
164963
- function get2(object2, path15, defaultValue) {
164964
- var value = deepGet(object2, toPath2(path15));
164963
+ function get2(object2, path17, defaultValue) {
164964
+ var value = deepGet(object2, toPath2(path17));
164965
164965
  return isUndefined(value) ? defaultValue : value;
164966
164966
  }
164967
164967
  var init_get = __esm({
@@ -164973,11 +164973,11 @@ var init_get = __esm({
164973
164973
  });
164974
164974
 
164975
164975
  // node_modules/underscore/modules/has.js
164976
- function has2(obj2, path15) {
164977
- path15 = toPath2(path15);
164978
- var length = path15.length;
164976
+ function has2(obj2, path17) {
164977
+ path17 = toPath2(path17);
164978
+ var length = path17.length;
164979
164979
  for (var i = 0; i < length; i++) {
164980
- var key = path15[i];
164980
+ var key = path17[i];
164981
164981
  if (!has(obj2, key)) return false;
164982
164982
  obj2 = obj2[key];
164983
164983
  }
@@ -165014,10 +165014,10 @@ var init_matcher = __esm({
165014
165014
  });
165015
165015
 
165016
165016
  // node_modules/underscore/modules/property.js
165017
- function property(path15) {
165018
- path15 = toPath2(path15);
165017
+ function property(path17) {
165018
+ path17 = toPath2(path17);
165019
165019
  return function(obj2) {
165020
- return deepGet(obj2, path15);
165020
+ return deepGet(obj2, path17);
165021
165021
  };
165022
165022
  }
165023
165023
  var init_property = __esm({
@@ -165126,8 +165126,8 @@ var init_noop = __esm({
165126
165126
  // node_modules/underscore/modules/propertyOf.js
165127
165127
  function propertyOf(obj2) {
165128
165128
  if (obj2 == null) return noop;
165129
- return function(path15) {
165130
- return get2(obj2, path15);
165129
+ return function(path17) {
165130
+ return get2(obj2, path17);
165131
165131
  };
165132
165132
  }
165133
165133
  var init_propertyOf = __esm({
@@ -165321,14 +165321,14 @@ var init_template = __esm({
165321
165321
  });
165322
165322
 
165323
165323
  // node_modules/underscore/modules/result.js
165324
- function result(obj2, path15, fallback) {
165325
- path15 = toPath2(path15);
165326
- var length = path15.length;
165324
+ function result(obj2, path17, fallback) {
165325
+ path17 = toPath2(path17);
165326
+ var length = path17.length;
165327
165327
  if (!length) {
165328
165328
  return isFunction_default(fallback) ? fallback.call(obj2) : fallback;
165329
165329
  }
165330
165330
  for (var i = 0; i < length; i++) {
165331
- var prop = obj2 == null ? void 0 : obj2[path15[i]];
165331
+ var prop = obj2 == null ? void 0 : obj2[path17[i]];
165332
165332
  if (prop === void 0) {
165333
165333
  prop = fallback;
165334
165334
  i = length;
@@ -166011,14 +166011,14 @@ var init_invoke = __esm({
166011
166011
  init_map();
166012
166012
  init_deepGet();
166013
166013
  init_toPath2();
166014
- invoke_default = restArguments(function(obj2, path15, args) {
166014
+ invoke_default = restArguments(function(obj2, path17, args) {
166015
166015
  var contextPath, func;
166016
- if (isFunction_default(path15)) {
166017
- func = path15;
166016
+ if (isFunction_default(path17)) {
166017
+ func = path17;
166018
166018
  } else {
166019
- path15 = toPath2(path15);
166020
- contextPath = path15.slice(0, -1);
166021
- path15 = path15[path15.length - 1];
166019
+ path17 = toPath2(path17);
166020
+ contextPath = path17.slice(0, -1);
166021
+ path17 = path17[path17.length - 1];
166022
166022
  }
166023
166023
  return map(obj2, function(context) {
166024
166024
  var method = func;
@@ -166027,7 +166027,7 @@ var init_invoke = __esm({
166027
166027
  context = deepGet(context, contextPath);
166028
166028
  }
166029
166029
  if (context == null) return void 0;
166030
- method = context[path15];
166030
+ method = context[path17];
166031
166031
  }
166032
166032
  return method == null ? method : method.apply(context, args);
166033
166033
  });
@@ -175493,8 +175493,8 @@ var require_utils2 = __commonJS({
175493
175493
  var result2 = transform[inputType][outputType](input);
175494
175494
  return result2;
175495
175495
  };
175496
- exports2.resolve = function(path15) {
175497
- var parts = path15.split("/");
175496
+ exports2.resolve = function(path17) {
175497
+ var parts = path17.split("/");
175498
175498
  var result2 = [];
175499
175499
  for (var index = 0; index < parts.length; index++) {
175500
175500
  var part = parts[index];
@@ -181347,18 +181347,18 @@ var require_object = __commonJS({
181347
181347
  var object2 = new ZipObject(name, zipObjectContent, o);
181348
181348
  this.files[name] = object2;
181349
181349
  };
181350
- var parentFolder = function(path15) {
181351
- if (path15.slice(-1) === "/") {
181352
- path15 = path15.substring(0, path15.length - 1);
181350
+ var parentFolder = function(path17) {
181351
+ if (path17.slice(-1) === "/") {
181352
+ path17 = path17.substring(0, path17.length - 1);
181353
181353
  }
181354
- var lastSlash = path15.lastIndexOf("/");
181355
- return lastSlash > 0 ? path15.substring(0, lastSlash) : "";
181354
+ var lastSlash = path17.lastIndexOf("/");
181355
+ return lastSlash > 0 ? path17.substring(0, lastSlash) : "";
181356
181356
  };
181357
- var forceTrailingSlash = function(path15) {
181358
- if (path15.slice(-1) !== "/") {
181359
- path15 += "/";
181357
+ var forceTrailingSlash = function(path17) {
181358
+ if (path17.slice(-1) !== "/") {
181359
+ path17 += "/";
181360
181360
  }
181361
- return path15;
181361
+ return path17;
181362
181362
  };
181363
181363
  var folderAdd = function(name, createFolders) {
181364
181364
  createFolders = typeof createFolders !== "undefined" ? createFolders : defaults.createFolders;
@@ -182396,27 +182396,27 @@ var require_zipfile = __commonJS({
182396
182396
  };
182397
182397
  });
182398
182398
  }
182399
- function splitPath(path15) {
182400
- var lastIndex = path15.lastIndexOf("/");
182399
+ function splitPath(path17) {
182400
+ var lastIndex = path17.lastIndexOf("/");
182401
182401
  if (lastIndex === -1) {
182402
- return { dirname: "", basename: path15 };
182402
+ return { dirname: "", basename: path17 };
182403
182403
  } else {
182404
182404
  return {
182405
- dirname: path15.substring(0, lastIndex),
182406
- basename: path15.substring(lastIndex + 1)
182405
+ dirname: path17.substring(0, lastIndex),
182406
+ basename: path17.substring(lastIndex + 1)
182407
182407
  };
182408
182408
  }
182409
182409
  }
182410
182410
  function joinPath() {
182411
- var nonEmptyPaths = Array.prototype.filter.call(arguments, function(path15) {
182412
- return path15;
182411
+ var nonEmptyPaths = Array.prototype.filter.call(arguments, function(path17) {
182412
+ return path17;
182413
182413
  });
182414
182414
  var relevantPaths = [];
182415
- nonEmptyPaths.forEach(function(path15) {
182416
- if (/^\//.test(path15)) {
182417
- relevantPaths = [path15];
182415
+ nonEmptyPaths.forEach(function(path17) {
182416
+ if (/^\//.test(path17)) {
182417
+ relevantPaths = [path17];
182418
182418
  } else {
182419
- relevantPaths.push(path15);
182419
+ relevantPaths.push(path17);
182420
182420
  }
182421
182421
  });
182422
182422
  return relevantPaths.join("/");
@@ -189808,9 +189808,9 @@ var require_office_xml_reader = __commonJS({
189808
189808
  return collapseAlternateContent(document2)[0];
189809
189809
  });
189810
189810
  }
189811
- function readXmlFromZipFile(docxFile, path15) {
189812
- if (docxFile.exists(path15)) {
189813
- return docxFile.read(path15, "utf-8").then(stripUtf8Bom).then(read);
189811
+ function readXmlFromZipFile(docxFile, path17) {
189812
+ if (docxFile.exists(path17)) {
189813
+ return docxFile.read(path17, "utf-8").then(stripUtf8Bom).then(read);
189814
189814
  } else {
189815
189815
  return promises.resolve(null);
189816
189816
  }
@@ -191574,10 +191574,10 @@ var require_body_reader = __commonJS({
191574
191574
  }
191575
191575
  }
191576
191576
  function findEmbeddedImageFile(relationshipId) {
191577
- var path15 = uris.uriToZipEntryName("word", relationships.findTargetByRelationshipId(relationshipId));
191577
+ var path17 = uris.uriToZipEntryName("word", relationships.findTargetByRelationshipId(relationshipId));
191578
191578
  return {
191579
- path: path15,
191580
- read: docxFile.read.bind(docxFile, path15)
191579
+ path: path17,
191580
+ read: docxFile.read.bind(docxFile, path17)
191581
191581
  };
191582
191582
  }
191583
191583
  function readImage(imageFile, altText) {
@@ -191814,12 +191814,12 @@ var require_content_types_reader = __commonJS({
191814
191814
  }
191815
191815
  function contentTypes(overrides, extensionDefaults) {
191816
191816
  return {
191817
- findContentType: function(path15) {
191818
- var overrideContentType = overrides[path15];
191817
+ findContentType: function(path17) {
191818
+ var overrideContentType = overrides[path17];
191819
191819
  if (overrideContentType) {
191820
191820
  return overrideContentType;
191821
191821
  } else {
191822
- var pathParts = path15.split(".");
191822
+ var pathParts = path17.split(".");
191823
191823
  var extension2 = pathParts[pathParts.length - 1];
191824
191824
  if (extensionDefaults.hasOwnProperty(extension2)) {
191825
191825
  return extensionDefaults[extension2];
@@ -192062,12 +192062,12 @@ var require_comments_reader = __commonJS({
192062
192062
  var require_path_is_absolute = __commonJS({
192063
192063
  "node_modules/path-is-absolute/index.js"(exports2, module2) {
192064
192064
  "use strict";
192065
- function posix(path15) {
192066
- return path15.charAt(0) === "/";
192065
+ function posix(path17) {
192066
+ return path17.charAt(0) === "/";
192067
192067
  }
192068
- function win32(path15) {
192068
+ function win32(path17) {
192069
192069
  var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;
192070
- var result2 = splitDeviceRe.exec(path15);
192070
+ var result2 = splitDeviceRe.exec(path17);
192071
192071
  var device = result2[1] || "";
192072
192072
  var isUnc = Boolean(device && device.charAt(1) !== ":");
192073
192073
  return Boolean(result2[2] || isUnc);
@@ -192081,9 +192081,9 @@ var require_path_is_absolute = __commonJS({
192081
192081
  // node_modules/mammoth/lib/docx/files.js
192082
192082
  var require_files = __commonJS({
192083
192083
  "node_modules/mammoth/lib/docx/files.js"(exports2) {
192084
- var fs15 = __require("fs");
192084
+ var fs17 = __require("fs");
192085
192085
  var url = __require("url");
192086
- var os6 = __require("os");
192086
+ var os8 = __require("os");
192087
192087
  var dirname2 = __require("path").dirname;
192088
192088
  var resolvePath2 = __require("path").resolve;
192089
192089
  var isAbsolutePath2 = require_path_is_absolute();
@@ -192101,19 +192101,19 @@ var require_files = __commonJS({
192101
192101
  }
192102
192102
  var base = options.relativeToFile ? dirname2(options.relativeToFile) : null;
192103
192103
  function read(uri, encoding) {
192104
- return resolveUri(uri).then(function(path15) {
192105
- return readFile4(path15, encoding).caught(function(error) {
192104
+ return resolveUri(uri).then(function(path17) {
192105
+ return readFile4(path17, encoding).caught(function(error) {
192106
192106
  var message = "could not open external image: '" + uri + "' (document directory: '" + base + "')\n" + error.message;
192107
192107
  return promises.reject(new Error(message));
192108
192108
  });
192109
192109
  });
192110
192110
  }
192111
192111
  function resolveUri(uri) {
192112
- var path15 = uriToPath(uri);
192113
- if (isAbsolutePath2(path15)) {
192114
- return promises.resolve(path15);
192112
+ var path17 = uriToPath(uri);
192113
+ if (isAbsolutePath2(path17)) {
192114
+ return promises.resolve(path17);
192115
192115
  } else if (base) {
192116
- return promises.resolve(resolvePath2(base, path15));
192116
+ return promises.resolve(resolvePath2(base, path17));
192117
192117
  } else {
192118
192118
  return promises.reject(new Error("could not find external image '" + uri + "', path of input document is unknown"));
192119
192119
  }
@@ -192122,18 +192122,18 @@ var require_files = __commonJS({
192122
192122
  read
192123
192123
  };
192124
192124
  }
192125
- var readFile4 = promises.promisify(fs15.readFile.bind(fs15));
192125
+ var readFile4 = promises.promisify(fs17.readFile.bind(fs17));
192126
192126
  function uriToPath(uriString, platform3) {
192127
192127
  if (!platform3) {
192128
- platform3 = os6.platform();
192128
+ platform3 = os8.platform();
192129
192129
  }
192130
192130
  var uri = url.parse(uriString);
192131
192131
  if (isLocalFileUri(uri) || isRelativeUri(uri)) {
192132
- var path15 = decodeURIComponent(uri.path);
192133
- if (platform3 === "win32" && /^\/[a-z]:/i.test(path15)) {
192134
- return path15.slice(1);
192132
+ var path17 = decodeURIComponent(uri.path);
192133
+ if (platform3 === "win32" && /^\/[a-z]:/i.test(path17)) {
192134
+ return path17.slice(1);
192135
192135
  } else {
192136
- return path15;
192136
+ return path17;
192137
192137
  }
192138
192138
  } else {
192139
192139
  throw new Error("Could not convert URI to path: " + uriString);
@@ -192333,18 +192333,18 @@ var require_docx_reader = __commonJS({
192333
192333
  readElement: contentTypesReader.readContentTypesFromXml,
192334
192334
  defaultValue: contentTypesReader.defaultContentTypes
192335
192335
  });
192336
- function readNumberingFromZipFile(zipFile, path15, styles6) {
192336
+ function readNumberingFromZipFile(zipFile, path17, styles6) {
192337
192337
  return xmlFileReader({
192338
- filename: path15,
192338
+ filename: path17,
192339
192339
  readElement: function(element) {
192340
192340
  return numberingXml.readNumberingXml(element, { styles: styles6 });
192341
192341
  },
192342
192342
  defaultValue: numberingXml.defaultNumbering
192343
192343
  })(zipFile);
192344
192344
  }
192345
- function readStylesFromZipFile(zipFile, path15) {
192345
+ function readStylesFromZipFile(zipFile, path17) {
192346
192346
  return xmlFileReader({
192347
- filename: path15,
192347
+ filename: path17,
192348
192348
  readElement: stylesReader.readStylesXml,
192349
192349
  defaultValue: stylesReader.defaultStyles
192350
192350
  })(zipFile);
@@ -192375,10 +192375,10 @@ var require_style_map = __commonJS({
192375
192375
  });
192376
192376
  }
192377
192377
  function updateRelationships(docxFile) {
192378
- var path15 = "word/_rels/document.xml.rels";
192378
+ var path17 = "word/_rels/document.xml.rels";
192379
192379
  var relationshipsUri = "http://schemas.openxmlformats.org/package/2006/relationships";
192380
192380
  var relationshipElementName = "{" + relationshipsUri + "}Relationship";
192381
- return docxFile.read(path15, "utf8").then(xml.readString).then(function(relationshipsContainer) {
192381
+ return docxFile.read(path17, "utf8").then(xml.readString).then(function(relationshipsContainer) {
192382
192382
  var relationships = relationshipsContainer.children;
192383
192383
  addOrUpdateElement(relationships, relationshipElementName, "Id", {
192384
192384
  "Id": "rMammothStyleMap",
@@ -192386,21 +192386,21 @@ var require_style_map = __commonJS({
192386
192386
  "Target": styleMapAbsolutePath
192387
192387
  });
192388
192388
  var namespaces = { "": relationshipsUri };
192389
- return docxFile.write(path15, xml.writeString(relationshipsContainer, namespaces));
192389
+ return docxFile.write(path17, xml.writeString(relationshipsContainer, namespaces));
192390
192390
  });
192391
192391
  }
192392
192392
  function updateContentTypes(docxFile) {
192393
- var path15 = "[Content_Types].xml";
192393
+ var path17 = "[Content_Types].xml";
192394
192394
  var contentTypesUri = "http://schemas.openxmlformats.org/package/2006/content-types";
192395
192395
  var overrideName = "{" + contentTypesUri + "}Override";
192396
- return docxFile.read(path15, "utf8").then(xml.readString).then(function(typesElement) {
192396
+ return docxFile.read(path17, "utf8").then(xml.readString).then(function(typesElement) {
192397
192397
  var children = typesElement.children;
192398
192398
  addOrUpdateElement(children, overrideName, "PartName", {
192399
192399
  "PartName": styleMapAbsolutePath,
192400
192400
  "ContentType": "text/prs.mammoth.style-map"
192401
192401
  });
192402
192402
  var namespaces = { "": contentTypesUri };
192403
- return docxFile.write(path15, xml.writeString(typesElement, namespaces));
192403
+ return docxFile.write(path17, xml.writeString(typesElement, namespaces));
192404
192404
  });
192405
192405
  }
192406
192406
  function addOrUpdateElement(elements, name, identifyingAttribute, attributes) {
@@ -193088,9 +193088,9 @@ var require_document_to_html = __commonJS({
193088
193088
  };
193089
193089
  var paths = [];
193090
193090
  if (run.highlight !== null) {
193091
- var path15 = findHtmlPath({ type: "highlight", color: run.highlight });
193092
- if (path15) {
193093
- paths.push(path15);
193091
+ var path17 = findHtmlPath({ type: "highlight", color: run.highlight });
193092
+ if (path17) {
193093
+ paths.push(path17);
193094
193094
  }
193095
193095
  }
193096
193096
  if (run.isSmallCaps) {
@@ -193125,15 +193125,15 @@ var require_document_to_html = __commonJS({
193125
193125
  messages.push(unrecognisedStyleWarning("run", run));
193126
193126
  }
193127
193127
  paths.push(stylePath);
193128
- paths.forEach(function(path16) {
193129
- nodes = path16.wrap.bind(path16, nodes);
193128
+ paths.forEach(function(path18) {
193129
+ nodes = path18.wrap.bind(path18, nodes);
193130
193130
  });
193131
193131
  return nodes();
193132
193132
  }
193133
193133
  function findHtmlPathForRunProperty(elementType, defaultTagName) {
193134
- var path15 = findHtmlPath({ type: elementType });
193135
- if (path15) {
193136
- return path15;
193134
+ var path17 = findHtmlPath({ type: elementType });
193135
+ if (path17) {
193136
+ return path17;
193137
193137
  } else if (defaultTagName) {
193138
193138
  return htmlPaths.element(defaultTagName, {}, { fresh: false });
193139
193139
  } else {
@@ -194835,11 +194835,11 @@ var require_options_reader = __commonJS({
194835
194835
  // node_modules/mammoth/lib/unzip.js
194836
194836
  var require_unzip = __commonJS({
194837
194837
  "node_modules/mammoth/lib/unzip.js"(exports2) {
194838
- var fs15 = __require("fs");
194838
+ var fs17 = __require("fs");
194839
194839
  var promises = require_promises();
194840
194840
  var zipfile = require_zipfile();
194841
194841
  exports2.openZip = openZip;
194842
- var readFile4 = promises.promisify(fs15.readFile);
194842
+ var readFile4 = promises.promisify(fs17.readFile);
194843
194843
  function openZip(options) {
194844
194844
  if (options.path) {
194845
194845
  return readFile4(options.path).then(zipfile.openArrayBuffer);
@@ -195557,8 +195557,8 @@ function decodeBase64ToBuffer(value) {
195557
195557
  function fileNameFromLocalId(localSourceId) {
195558
195558
  const sep = localSourceId.lastIndexOf("::");
195559
195559
  if (sep >= 0) {
195560
- const path15 = localSourceId.slice(sep + 2);
195561
- return path15.split("/").pop() ?? path15;
195560
+ const path17 = localSourceId.slice(sep + 2);
195561
+ return path17.split("/").pop() ?? path17;
195562
195562
  }
195563
195563
  return localSourceId;
195564
195564
  }
@@ -195927,7 +195927,7 @@ function normalizeInputPath(pathValue) {
195927
195927
  }
195928
195928
  function expandHomePath(pathValue, roots) {
195929
195929
  if (!pathValue?.startsWith("~/")) return pathValue;
195930
- const homePrefix = roots.map((root2) => root2.path.replace(/\\/g, "/")).find((path15) => /^\/Users\/[^/]+/.test(path15))?.match(/^\/Users\/[^/]+/)?.[0];
195930
+ const homePrefix = roots.map((root2) => root2.path.replace(/\\/g, "/")).find((path17) => /^\/Users\/[^/]+/.test(path17))?.match(/^\/Users\/[^/]+/)?.[0];
195931
195931
  return homePrefix ? `${homePrefix}${pathValue.slice(1)}` : pathValue;
195932
195932
  }
195933
195933
  function normalizeRelativePath(pathValue) {
@@ -207213,62 +207213,62 @@ var init_initPacks = __esm({
207213
207213
  });
207214
207214
 
207215
207215
  // lib/perchManagedAgents/runtime.ts
207216
- function validateJsonSchema(value, schema, path15 = "") {
207216
+ function validateJsonSchema(value, schema, path17 = "") {
207217
207217
  const errors = [];
207218
207218
  if (schema.type === "object" && value != null && typeof value === "object" && !Array.isArray(value)) {
207219
207219
  const obj2 = value;
207220
207220
  if (schema.required) {
207221
207221
  for (const key of schema.required) {
207222
- if (!(key in obj2)) errors.push(`${path15 || "root"}: missing required field "${key}"`);
207222
+ if (!(key in obj2)) errors.push(`${path17 || "root"}: missing required field "${key}"`);
207223
207223
  }
207224
207224
  }
207225
207225
  if (schema.additionalProperties === false && schema.properties) {
207226
207226
  const allowed = new Set(Object.keys(schema.properties));
207227
207227
  for (const key of Object.keys(obj2)) {
207228
- if (!allowed.has(key)) errors.push(`${path15 || "root"}: unexpected field "${key}"`);
207228
+ if (!allowed.has(key)) errors.push(`${path17 || "root"}: unexpected field "${key}"`);
207229
207229
  }
207230
207230
  }
207231
207231
  if (schema.properties) {
207232
207232
  for (const [key, subSchema] of Object.entries(schema.properties)) {
207233
207233
  if (key in obj2) {
207234
- errors.push(...validateJsonSchema(obj2[key], subSchema, `${path15}.${key}`));
207234
+ errors.push(...validateJsonSchema(obj2[key], subSchema, `${path17}.${key}`));
207235
207235
  }
207236
207236
  }
207237
207237
  }
207238
207238
  } else if (schema.type === "array" && Array.isArray(value)) {
207239
207239
  if (schema.maxItems != null && value.length > schema.maxItems) {
207240
- errors.push(`${path15 || "root"}: array exceeds maxItems (${value.length} > ${schema.maxItems})`);
207240
+ errors.push(`${path17 || "root"}: array exceeds maxItems (${value.length} > ${schema.maxItems})`);
207241
207241
  }
207242
207242
  if (schema.items) {
207243
207243
  for (let i = 0; i < Math.min(value.length, 10); i += 1) {
207244
- errors.push(...validateJsonSchema(value[i], schema.items, `${path15}[${i}]`));
207244
+ errors.push(...validateJsonSchema(value[i], schema.items, `${path17}[${i}]`));
207245
207245
  }
207246
207246
  }
207247
207247
  } else if (schema.type === "string" && typeof value === "string") {
207248
207248
  if (schema.maxLength != null && value.length > schema.maxLength) {
207249
- errors.push(`${path15 || "root"}: string exceeds maxLength (${value.length} > ${schema.maxLength})`);
207249
+ errors.push(`${path17 || "root"}: string exceeds maxLength (${value.length} > ${schema.maxLength})`);
207250
207250
  }
207251
207251
  if (schema.pattern) {
207252
207252
  try {
207253
207253
  if (!new RegExp(schema.pattern).test(value)) {
207254
- errors.push(`${path15 || "root"}: string does not match pattern "${schema.pattern}"`);
207254
+ errors.push(`${path17 || "root"}: string does not match pattern "${schema.pattern}"`);
207255
207255
  }
207256
207256
  } catch {
207257
207257
  }
207258
207258
  }
207259
207259
  } else if (schema.type === "number" && typeof value !== "number") {
207260
- errors.push(`${path15 || "root"}: expected number, got ${typeof value}`);
207260
+ errors.push(`${path17 || "root"}: expected number, got ${typeof value}`);
207261
207261
  } else if (schema.type === "boolean" && typeof value !== "boolean") {
207262
- errors.push(`${path15 || "root"}: expected boolean, got ${typeof value}`);
207262
+ errors.push(`${path17 || "root"}: expected boolean, got ${typeof value}`);
207263
207263
  } else if (schema.type === "string" && typeof value !== "string" && value != null) {
207264
- errors.push(`${path15 || "root"}: expected string, got ${typeof value}`);
207264
+ errors.push(`${path17 || "root"}: expected string, got ${typeof value}`);
207265
207265
  } else if (schema.type === "object" && (value == null || typeof value !== "object" || Array.isArray(value))) {
207266
- if (value != null) errors.push(`${path15 || "root"}: expected object, got ${typeof value}`);
207266
+ if (value != null) errors.push(`${path17 || "root"}: expected object, got ${typeof value}`);
207267
207267
  } else if (schema.type === "array" && !Array.isArray(value) && value != null) {
207268
- errors.push(`${path15 || "root"}: expected array, got ${typeof value}`);
207268
+ errors.push(`${path17 || "root"}: expected array, got ${typeof value}`);
207269
207269
  }
207270
207270
  if (schema.enum && !schema.enum.includes(value)) {
207271
- errors.push(`${path15 || "root"}: value not in enum [${schema.enum.join(", ")}]`);
207271
+ errors.push(`${path17 || "root"}: value not in enum [${schema.enum.join(", ")}]`);
207272
207272
  }
207273
207273
  return errors;
207274
207274
  }
@@ -211627,12 +211627,12 @@ var init_fileSystem = __esm({
211627
211627
  classification: { native: false },
211628
211628
  handler: async (args, ctx) => {
211629
211629
  const pattern = args.pattern ? String(args.pattern) : void 0;
211630
- const path15 = args.path ? String(args.path) : void 0;
211630
+ const path17 = args.path ? String(args.path) : void 0;
211631
211631
  const maxResults = typeof args.maxResults === "number" ? args.maxResults : void 0;
211632
211632
  return listWorkspaceFilesGlob({
211633
211633
  workspaceRoot: effectiveWorkspaceRoot(ctx),
211634
211634
  pattern,
211635
- path: path15,
211635
+ path: path17,
211636
211636
  maxResults,
211637
211637
  fsAccessOverride: ctx.fsAccessOverride
211638
211638
  });
@@ -211643,14 +211643,14 @@ var init_fileSystem = __esm({
211643
211643
  classification: { native: false },
211644
211644
  handler: async (args, ctx) => {
211645
211645
  const query = String(args.query ?? "");
211646
- const path15 = args.path ? String(args.path) : void 0;
211646
+ const path17 = args.path ? String(args.path) : void 0;
211647
211647
  const include = args.include ? String(args.include) : void 0;
211648
211648
  const caseSensitive = typeof args.caseSensitive === "boolean" ? args.caseSensitive : void 0;
211649
211649
  const maxResults = typeof args.maxResults === "number" ? args.maxResults : void 0;
211650
211650
  return searchWorkspaceFilesGrep({
211651
211651
  workspaceRoot: effectiveWorkspaceRoot(ctx),
211652
211652
  query,
211653
- path: path15,
211653
+ path: path17,
211654
211654
  include,
211655
211655
  caseSensitive,
211656
211656
  maxResults,
@@ -211713,24 +211713,24 @@ var init_fileSystem = __esm({
211713
211713
  name: TOOL_NAMES.createDirectory,
211714
211714
  classification: { native: false },
211715
211715
  handler: async (args, ctx) => {
211716
- const path15 = String(args.path ?? "");
211717
- return createDirectory({ path: resolveWorkspacePath(ctx, path15), fsAccessOverride: ctx.fsAccessOverride });
211716
+ const path17 = String(args.path ?? "");
211717
+ return createDirectory({ path: resolveWorkspacePath(ctx, path17), fsAccessOverride: ctx.fsAccessOverride });
211718
211718
  }
211719
211719
  };
211720
211720
  deleteLocalFileTool = {
211721
211721
  name: TOOL_NAMES.deleteLocalFile,
211722
211722
  classification: { native: false },
211723
211723
  handler: async (args, ctx) => {
211724
- const path15 = String(args.path ?? "");
211725
- return deleteLocalFile({ path: resolveWorkspacePath(ctx, path15), fsAccessOverride: ctx.fsAccessOverride });
211724
+ const path17 = String(args.path ?? "");
211725
+ return deleteLocalFile({ path: resolveWorkspacePath(ctx, path17), fsAccessOverride: ctx.fsAccessOverride });
211726
211726
  }
211727
211727
  };
211728
211728
  printFileTool = {
211729
211729
  name: TOOL_NAMES.printFile,
211730
211730
  classification: { native: false },
211731
211731
  handler: async (args, ctx) => {
211732
- const path15 = String(args.path ?? "");
211733
- return printFile({ path: resolveWorkspacePath(ctx, path15), fsAccessOverride: ctx.fsAccessOverride });
211732
+ const path17 = String(args.path ?? "");
211733
+ return printFile({ path: resolveWorkspacePath(ctx, path17), fsAccessOverride: ctx.fsAccessOverride });
211734
211734
  }
211735
211735
  };
211736
211736
  statPathTool = {
@@ -215050,11 +215050,11 @@ function extractEvidenceFromToolResult(input) {
215050
215050
  const createdAt = (/* @__PURE__ */ new Date()).toISOString();
215051
215051
  const result2 = input.result;
215052
215052
  if (input.toolName === TOOL_NAMES.readLocalFile) {
215053
- const path15 = stringValue6(result2.relativePath);
215053
+ const path17 = stringValue6(result2.relativePath);
215054
215054
  return [{
215055
215055
  source: input.toolName,
215056
- title: path15 ? `Read ${path15}` : "Read local file",
215057
- path: path15,
215056
+ title: path17 ? `Read ${path17}` : "Read local file",
215057
+ path: path17,
215058
215058
  snippet: stringValue6(result2.content)?.slice(0, 500),
215059
215059
  metadata: pickMetadata(result2, ["sizeBytes", "executionHost"]),
215060
215060
  createdAt
@@ -215115,11 +215115,11 @@ function extractEvidenceFromToolResult(input) {
215115
215115
  }];
215116
215116
  }
215117
215117
  if (input.toolName === TOOL_NAMES.statPath) {
215118
- const path15 = stringValue6(result2.relativePath);
215118
+ const path17 = stringValue6(result2.relativePath);
215119
215119
  return [{
215120
215120
  source: input.toolName,
215121
- title: path15 ? `Stat ${path15}` : "Path metadata",
215122
- path: path15,
215121
+ title: path17 ? `Stat ${path17}` : "Path metadata",
215122
+ path: path17,
215123
215123
  summary: summarizeStat(result2),
215124
215124
  metadata: pickMetadata(result2, ["exists", "isFile", "isDirectory", "sizeBytes", "modifiedAt", "executionHost"]),
215125
215125
  createdAt
@@ -217686,8 +217686,8 @@ function sourceReadFamilyForToolCall(toolName, args) {
217686
217686
  }
217687
217687
  }
217688
217688
  if (toolName === TOOL_NAMES.readLocalFile) {
217689
- const path15 = typeof record.path === "string" ? record.path.trim() : "";
217690
- return path15 ? `${toolName}:${path15}` : null;
217689
+ const path17 = typeof record.path === "string" ? record.path.trim() : "";
217690
+ return path17 ? `${toolName}:${path17}` : null;
217691
217691
  }
217692
217692
  if (toolName === TOOL_NAMES.readLocalSourceFile) {
217693
217693
  const source = typeof record.localSourceId === "string" ? record.localSourceId.trim() : typeof record.sourceId === "string" ? record.sourceId.trim() : typeof record.path === "string" ? record.path.trim() : "";
@@ -218369,13 +218369,13 @@ function extractProviderReasoning(value) {
218369
218369
  fields: Array.from(new Set(fields))
218370
218370
  };
218371
218371
  }
218372
- function visit(value, path15, chunks, fields, seen) {
218372
+ function visit(value, path17, chunks, fields, seen) {
218373
218373
  if (!value || typeof value !== "object") return;
218374
218374
  if (seen.has(value)) return;
218375
218375
  seen.add(value);
218376
218376
  if (Array.isArray(value)) {
218377
218377
  value.forEach(
218378
- (item, index) => visit(item, `${path15}[${index}]`, chunks, fields, seen)
218378
+ (item, index) => visit(item, `${path17}[${index}]`, chunks, fields, seen)
218379
218379
  );
218380
218380
  return;
218381
218381
  }
@@ -218384,23 +218384,23 @@ function visit(value, path15, chunks, fields, seen) {
218384
218384
  const maybe = obj2[key];
218385
218385
  if (typeof maybe === "string" && maybe.trim()) {
218386
218386
  chunks.push(maybe);
218387
- fields.push(`${path15}.${key}`);
218387
+ fields.push(`${path17}.${key}`);
218388
218388
  }
218389
218389
  }
218390
218390
  const type = typeof obj2.type === "string" ? obj2.type.toLowerCase() : "";
218391
218391
  if ((type === "thinking" || type === "reasoning") && typeof obj2.content === "string" && obj2.content.trim()) {
218392
218392
  chunks.push(obj2.content);
218393
- fields.push(`${path15}.content[type=${type}]`);
218393
+ fields.push(`${path17}.content[type=${type}]`);
218394
218394
  }
218395
218395
  if ((type === "thinking" || type === "reasoning") && typeof obj2.text === "string" && obj2.text.trim()) {
218396
218396
  chunks.push(obj2.text);
218397
- fields.push(`${path15}.text[type=${type}]`);
218397
+ fields.push(`${path17}.text[type=${type}]`);
218398
218398
  }
218399
218399
  for (const [key, child] of Object.entries(obj2)) {
218400
218400
  if (key.toLowerCase().includes("api") || key.toLowerCase().includes("authorization"))
218401
218401
  continue;
218402
218402
  if (typeof child === "object" && child !== null)
218403
- visit(child, `${path15}.${key}`, chunks, fields, seen);
218403
+ visit(child, `${path17}.${key}`, chunks, fields, seen);
218404
218404
  }
218405
218405
  }
218406
218406
  var REASONING_KEYS;
@@ -227511,8 +227511,8 @@ async function resolveLocalSelectedSourceBundleForTurn(input) {
227511
227511
  function extractFileNameFromId(localSourceId) {
227512
227512
  const sep = localSourceId.lastIndexOf("::");
227513
227513
  if (sep >= 0) {
227514
- const path15 = localSourceId.slice(sep + 2);
227515
- return path15.split("/").pop() ?? path15;
227514
+ const path17 = localSourceId.slice(sep + 2);
227515
+ return path17.split("/").pop() ?? path17;
227516
227516
  }
227517
227517
  return localSourceId;
227518
227518
  }
@@ -230732,7 +230732,7 @@ function buildSeatbeltProfile(workspaceRoot) {
230732
230732
  home,
230733
230733
  "/Users/Shared",
230734
230734
  "/Volumes"
230735
- ])).map((path15) => `(subpath ${seatbeltString(path15)})`).join("\n ");
230735
+ ])).map((path17) => `(subpath ${seatbeltString(path17)})`).join("\n ");
230736
230736
  return `
230737
230737
  (version 1)
230738
230738
  (allow default)
@@ -233111,6 +233111,172 @@ var init_learningMemory = __esm({
233111
233111
  }
233112
233112
  });
233113
233113
 
233114
+ // features/perchTerminal/runtime/cliHost/cliUpdateCheck.ts
233115
+ import fs12 from "node:fs";
233116
+ import os3 from "node:os";
233117
+ import path14 from "node:path";
233118
+ function compareCliVersions(a, b2) {
233119
+ const ma = SEMVER_RE.exec(a);
233120
+ const mb = SEMVER_RE.exec(b2);
233121
+ if (!ma || !mb) return null;
233122
+ for (let i = 1; i <= 3; i += 1) {
233123
+ const da = Number(ma[i]);
233124
+ const db = Number(mb[i]);
233125
+ if (da !== db) return da < db ? -1 : 1;
233126
+ }
233127
+ return 0;
233128
+ }
233129
+ function updateNoticeLine(installed, latest) {
233130
+ if (!latest) return null;
233131
+ const cmp = compareCliVersions(installed, latest);
233132
+ if (cmp === null || cmp >= 0) return null;
233133
+ return `Update available: v${installed} \u2192 v${latest} \xB7 run: npm i -g perchai-cli@latest`;
233134
+ }
233135
+ function shouldRefresh(checkedAt, now23, ttlMs = CACHE_TTL_MS2) {
233136
+ if (checkedAt === null) return true;
233137
+ return now23 - checkedAt >= ttlMs;
233138
+ }
233139
+ function updateChecksDisabled(env4 = process.env) {
233140
+ return Boolean(env4.CI || env4.PERCH_NO_UPDATE_NOTIFIER || env4.NO_UPDATE_NOTIFIER);
233141
+ }
233142
+ function cacheFile() {
233143
+ const override = process.env.PERCH_UPDATE_CACHE_FILE?.trim();
233144
+ if (override) return override;
233145
+ return path14.join(os3.homedir(), ".perch", "update-check.json");
233146
+ }
233147
+ function readCache() {
233148
+ try {
233149
+ const raw = fs12.readFileSync(cacheFile(), "utf8");
233150
+ const parsed = JSON.parse(raw);
233151
+ if (typeof parsed.latestVersion === "string" && typeof parsed.checkedAt === "number") {
233152
+ return { latestVersion: parsed.latestVersion, checkedAt: parsed.checkedAt };
233153
+ }
233154
+ } catch {
233155
+ }
233156
+ return null;
233157
+ }
233158
+ function writeCache(cache3) {
233159
+ try {
233160
+ const file = cacheFile();
233161
+ fs12.mkdirSync(path14.dirname(file), { recursive: true });
233162
+ fs12.writeFileSync(file, JSON.stringify(cache3));
233163
+ } catch {
233164
+ }
233165
+ }
233166
+ async function fetchLatestVersion() {
233167
+ const controller = new AbortController();
233168
+ const timer = setTimeout(() => controller.abort(), FETCH_TIMEOUT_MS);
233169
+ if (typeof timer.unref === "function") timer.unref();
233170
+ try {
233171
+ const response = await fetch(REGISTRY_LATEST_URL, {
233172
+ signal: controller.signal,
233173
+ headers: { accept: "application/json" }
233174
+ });
233175
+ if (!response.ok) return null;
233176
+ const body = await response.json();
233177
+ return typeof body.version === "string" ? body.version : null;
233178
+ } catch {
233179
+ return null;
233180
+ } finally {
233181
+ clearTimeout(timer);
233182
+ }
233183
+ }
233184
+ async function refreshCacheInBackground() {
233185
+ const latest = await fetchLatestVersion();
233186
+ if (latest) writeCache({ latestVersion: latest, checkedAt: Date.now() });
233187
+ }
233188
+ function resolveUpdateNotice(installedVersion) {
233189
+ if (updateChecksDisabled()) return null;
233190
+ const cache3 = readCache();
233191
+ if (shouldRefresh(cache3?.checkedAt ?? null, Date.now())) {
233192
+ void refreshCacheInBackground();
233193
+ }
233194
+ return updateNoticeLine(installedVersion, cache3?.latestVersion ?? null);
233195
+ }
233196
+ var REGISTRY_LATEST_URL, CACHE_TTL_MS2, FETCH_TIMEOUT_MS, SEMVER_RE;
233197
+ var init_cliUpdateCheck = __esm({
233198
+ "features/perchTerminal/runtime/cliHost/cliUpdateCheck.ts"() {
233199
+ "use strict";
233200
+ REGISTRY_LATEST_URL = "https://registry.npmjs.org/perchai-cli/latest";
233201
+ CACHE_TTL_MS2 = 24 * 60 * 60 * 1e3;
233202
+ FETCH_TIMEOUT_MS = 3e3;
233203
+ SEMVER_RE = /^(\d+)\.(\d+)\.(\d+)$/;
233204
+ }
233205
+ });
233206
+
233207
+ // features/perchTerminal/runtime/cliHost/cliAnalytics.ts
233208
+ import { randomUUID as randomUUID2 } from "node:crypto";
233209
+ import fs13 from "node:fs";
233210
+ import os4 from "node:os";
233211
+ import path15 from "node:path";
233212
+ function stateDir() {
233213
+ return process.env.PERCH_CLI_TELEMETRY_DIR?.trim() || path15.join(os4.homedir(), ".perch");
233214
+ }
233215
+ function telemetryDisabled(env4 = process.env) {
233216
+ return Boolean(env4.CI || env4.PERCH_NO_TELEMETRY || env4.DO_NOT_TRACK);
233217
+ }
233218
+ function resolveMachineId(dir = stateDir()) {
233219
+ const file = path15.join(dir, "machine-id");
233220
+ try {
233221
+ const existing = fs13.readFileSync(file, "utf8").trim();
233222
+ if (existing) return existing;
233223
+ } catch {
233224
+ }
233225
+ const id = randomUUID2();
233226
+ try {
233227
+ fs13.mkdirSync(dir, { recursive: true });
233228
+ fs13.writeFileSync(file, id);
233229
+ } catch {
233230
+ }
233231
+ return id;
233232
+ }
233233
+ function claimFirstRun(dir = stateDir()) {
233234
+ const file = path15.join(dir, "cli-first-run");
233235
+ try {
233236
+ if (fs13.existsSync(file)) return false;
233237
+ fs13.mkdirSync(dir, { recursive: true });
233238
+ fs13.writeFileSync(file, (/* @__PURE__ */ new Date()).toISOString());
233239
+ return true;
233240
+ } catch {
233241
+ return false;
233242
+ }
233243
+ }
233244
+ async function postCapture(event, properties) {
233245
+ const controller = new AbortController();
233246
+ const timer = setTimeout(() => controller.abort(), FETCH_TIMEOUT_MS2);
233247
+ if (typeof timer.unref === "function") timer.unref();
233248
+ try {
233249
+ await fetch(`${POSTHOG_HOST.replace(/\/$/, "")}/i/v0/e/`, {
233250
+ method: "POST",
233251
+ signal: controller.signal,
233252
+ headers: { "content-type": "application/json" },
233253
+ body: JSON.stringify({
233254
+ api_key: POSTHOG_KEY,
233255
+ event,
233256
+ distinct_id: resolveMachineId(),
233257
+ properties: { ...properties, $lib: "perch-cli" }
233258
+ })
233259
+ });
233260
+ } catch {
233261
+ } finally {
233262
+ clearTimeout(timer);
233263
+ }
233264
+ }
233265
+ function captureCliFirstRun(version4) {
233266
+ if (!POSTHOG_KEY || telemetryDisabled()) return;
233267
+ if (!claimFirstRun()) return;
233268
+ void postCapture("cli_first_run", { version: version4, platform: process.platform });
233269
+ }
233270
+ var POSTHOG_KEY, POSTHOG_HOST, FETCH_TIMEOUT_MS2;
233271
+ var init_cliAnalytics = __esm({
233272
+ "features/perchTerminal/runtime/cliHost/cliAnalytics.ts"() {
233273
+ "use strict";
233274
+ POSTHOG_KEY = ""?.trim() || "";
233275
+ POSTHOG_HOST = "https://us.i.posthog.com"?.trim() || "https://us.i.posthog.com";
233276
+ FETCH_TIMEOUT_MS2 = 2500;
233277
+ }
233278
+ });
233279
+
233114
233280
  // node_modules/react/cjs/react.production.js
233115
233281
  var require_react_production = __commonJS({
233116
233282
  "node_modules/react/cjs/react.production.js"(exports2) {
@@ -234722,7 +234888,7 @@ __export(base_exports, {
234722
234888
  synchronizedOutput: () => synchronizedOutput
234723
234889
  });
234724
234890
  import process2 from "node:process";
234725
- import os3 from "node:os";
234891
+ import os5 from "node:os";
234726
234892
  var ESC, OSC, BEL, SEP, isTerminalApp, isWindows2, isTmux, cwdFunction, wrapOsc, cursorTo, cursorMove, cursorUp, cursorDown, cursorForward, cursorBackward, cursorLeft, cursorSavePosition, cursorRestorePosition, cursorGetPosition, cursorNextLine, cursorPrevLine, cursorHide, cursorShow, eraseLines, eraseEndLine, eraseStartLine, eraseLine, eraseDown, eraseUp, eraseScreen, scrollUp, scrollDown, clearScreen, clearViewport, isOldWindows, clearTerminal, enterAlternativeScreen, exitAlternativeScreen, beginSynchronizedOutput, endSynchronizedOutput, synchronizedOutput, beep, link, image, iTerm, ConEmu, setCwd;
234727
234893
  var init_base = __esm({
234728
234894
  "node_modules/ansi-escapes/base.js"() {
@@ -234805,7 +234971,7 @@ var init_base = __esm({
234805
234971
  if (isBrowser || !isWindows2) {
234806
234972
  return false;
234807
234973
  }
234808
- const parts = os3.release().split(".");
234974
+ const parts = os5.release().split(".");
234809
234975
  const major = Number(parts[0]);
234810
234976
  const build2 = Number(parts[2] ?? 0);
234811
234977
  if (major < 10) {
@@ -237329,7 +237495,7 @@ var init_wrap_ansi = __esm({
237329
237495
  // node_modules/terminal-size/index.js
237330
237496
  import process3 from "node:process";
237331
237497
  import { execFileSync } from "node:child_process";
237332
- import fs12 from "node:fs";
237498
+ import fs14 from "node:fs";
237333
237499
  import tty from "node:tty";
237334
237500
  function terminalSize() {
237335
237501
  const { env: env4, stdout, stderr } = process3;
@@ -237385,7 +237551,7 @@ var init_terminal_size = __esm({
237385
237551
  return true;
237386
237552
  }
237387
237553
  try {
237388
- const statContents = fs12.readFileSync("/proc/self/stat", "utf8");
237554
+ const statContents = fs14.readFileSync("/proc/self/stat", "utf8");
237389
237555
  const closingParenthesisIndex = statContents.lastIndexOf(") ");
237390
237556
  if (closingParenthesisIndex === -1) {
237391
237557
  return false;
@@ -237406,8 +237572,8 @@ var init_terminal_size = __esm({
237406
237572
  };
237407
237573
  devTty = () => {
237408
237574
  try {
237409
- const flags = process3.platform === "darwin" ? fs12.constants.O_EVTONLY | fs12.constants.O_NONBLOCK : fs12.constants.O_NONBLOCK;
237410
- const { columns, rows } = tty.WriteStream(fs12.openSync("/dev/tty", flags));
237575
+ const flags = process3.platform === "darwin" ? fs14.constants.O_EVTONLY | fs14.constants.O_NONBLOCK : fs14.constants.O_NONBLOCK;
237576
+ const { columns, rows } = tty.WriteStream(fs14.openSync("/dev/tty", flags));
237411
237577
  return { columns, rows };
237412
237578
  } catch {
237413
237579
  }
@@ -246179,10 +246345,10 @@ var require_react_reconciler_development = __commonJS({
246179
246345
  fiber = fiber.next, id--;
246180
246346
  return fiber;
246181
246347
  }
246182
- function copyWithSetImpl(obj2, path15, index, value) {
246183
- if (index >= path15.length) return value;
246184
- var key = path15[index], updated = isArrayImpl(obj2) ? obj2.slice() : assign({}, obj2);
246185
- updated[key] = copyWithSetImpl(obj2[key], path15, index + 1, value);
246348
+ function copyWithSetImpl(obj2, path17, index, value) {
246349
+ if (index >= path17.length) return value;
246350
+ var key = path17[index], updated = isArrayImpl(obj2) ? obj2.slice() : assign({}, obj2);
246351
+ updated[key] = copyWithSetImpl(obj2[key], path17, index + 1, value);
246186
246352
  return updated;
246187
246353
  }
246188
246354
  function copyWithRename(obj2, oldPath, newPath) {
@@ -246209,11 +246375,11 @@ var require_react_reconciler_development = __commonJS({
246209
246375
  );
246210
246376
  return updated;
246211
246377
  }
246212
- function copyWithDeleteImpl(obj2, path15, index) {
246213
- var key = path15[index], updated = isArrayImpl(obj2) ? obj2.slice() : assign({}, obj2);
246214
- if (index + 1 === path15.length)
246378
+ function copyWithDeleteImpl(obj2, path17, index) {
246379
+ var key = path17[index], updated = isArrayImpl(obj2) ? obj2.slice() : assign({}, obj2);
246380
+ if (index + 1 === path17.length)
246215
246381
  return isArrayImpl(updated) ? updated.splice(key, 1) : delete updated[key], updated;
246216
- updated[key] = copyWithDeleteImpl(obj2[key], path15, index + 1);
246382
+ updated[key] = copyWithDeleteImpl(obj2[key], path17, index + 1);
246217
246383
  return updated;
246218
246384
  }
246219
246385
  function shouldSuspendImpl() {
@@ -259490,29 +259656,29 @@ var require_react_reconciler_development = __commonJS({
259490
259656
  var didWarnAboutNestedUpdates = false;
259491
259657
  var didWarnAboutFindNodeInStrictMode = {};
259492
259658
  var overrideHookState = null, overrideHookStateDeletePath = null, overrideHookStateRenamePath = null, overrideProps = null, overridePropsDeletePath = null, overridePropsRenamePath = null, scheduleUpdate = null, scheduleRetry = null, setErrorHandler = null, setSuspenseHandler = null;
259493
- overrideHookState = function(fiber, id, path15, value) {
259659
+ overrideHookState = function(fiber, id, path17, value) {
259494
259660
  id = findHook(fiber, id);
259495
- null !== id && (path15 = copyWithSetImpl(id.memoizedState, path15, 0, value), id.memoizedState = path15, id.baseState = path15, fiber.memoizedProps = assign({}, fiber.memoizedProps), path15 = enqueueConcurrentRenderForLane(fiber, 2), null !== path15 && scheduleUpdateOnFiber(path15, fiber, 2));
259661
+ null !== id && (path17 = copyWithSetImpl(id.memoizedState, path17, 0, value), id.memoizedState = path17, id.baseState = path17, fiber.memoizedProps = assign({}, fiber.memoizedProps), path17 = enqueueConcurrentRenderForLane(fiber, 2), null !== path17 && scheduleUpdateOnFiber(path17, fiber, 2));
259496
259662
  };
259497
- overrideHookStateDeletePath = function(fiber, id, path15) {
259663
+ overrideHookStateDeletePath = function(fiber, id, path17) {
259498
259664
  id = findHook(fiber, id);
259499
- null !== id && (path15 = copyWithDeleteImpl(id.memoizedState, path15, 0), id.memoizedState = path15, id.baseState = path15, fiber.memoizedProps = assign({}, fiber.memoizedProps), path15 = enqueueConcurrentRenderForLane(fiber, 2), null !== path15 && scheduleUpdateOnFiber(path15, fiber, 2));
259665
+ null !== id && (path17 = copyWithDeleteImpl(id.memoizedState, path17, 0), id.memoizedState = path17, id.baseState = path17, fiber.memoizedProps = assign({}, fiber.memoizedProps), path17 = enqueueConcurrentRenderForLane(fiber, 2), null !== path17 && scheduleUpdateOnFiber(path17, fiber, 2));
259500
259666
  };
259501
259667
  overrideHookStateRenamePath = function(fiber, id, oldPath, newPath) {
259502
259668
  id = findHook(fiber, id);
259503
259669
  null !== id && (oldPath = copyWithRename(id.memoizedState, oldPath, newPath), id.memoizedState = oldPath, id.baseState = oldPath, fiber.memoizedProps = assign({}, fiber.memoizedProps), oldPath = enqueueConcurrentRenderForLane(fiber, 2), null !== oldPath && scheduleUpdateOnFiber(oldPath, fiber, 2));
259504
259670
  };
259505
- overrideProps = function(fiber, path15, value) {
259506
- fiber.pendingProps = copyWithSetImpl(fiber.memoizedProps, path15, 0, value);
259671
+ overrideProps = function(fiber, path17, value) {
259672
+ fiber.pendingProps = copyWithSetImpl(fiber.memoizedProps, path17, 0, value);
259507
259673
  fiber.alternate && (fiber.alternate.pendingProps = fiber.pendingProps);
259508
- path15 = enqueueConcurrentRenderForLane(fiber, 2);
259509
- null !== path15 && scheduleUpdateOnFiber(path15, fiber, 2);
259674
+ path17 = enqueueConcurrentRenderForLane(fiber, 2);
259675
+ null !== path17 && scheduleUpdateOnFiber(path17, fiber, 2);
259510
259676
  };
259511
- overridePropsDeletePath = function(fiber, path15) {
259512
- fiber.pendingProps = copyWithDeleteImpl(fiber.memoizedProps, path15, 0);
259677
+ overridePropsDeletePath = function(fiber, path17) {
259678
+ fiber.pendingProps = copyWithDeleteImpl(fiber.memoizedProps, path17, 0);
259513
259679
  fiber.alternate && (fiber.alternate.pendingProps = fiber.pendingProps);
259514
- path15 = enqueueConcurrentRenderForLane(fiber, 2);
259515
- null !== path15 && scheduleUpdateOnFiber(path15, fiber, 2);
259680
+ path17 = enqueueConcurrentRenderForLane(fiber, 2);
259681
+ null !== path17 && scheduleUpdateOnFiber(path17, fiber, 2);
259516
259682
  };
259517
259683
  overridePropsRenamePath = function(fiber, oldPath, newPath) {
259518
259684
  fiber.pendingProps = copyWithRename(
@@ -269234,8 +269400,8 @@ var require_backend = __commonJS({
269234
269400
  }
269235
269401
  return false;
269236
269402
  }
269237
- function utils_getInObject(object2, path15) {
269238
- return path15.reduce(function(reduced, attr) {
269403
+ function utils_getInObject(object2, path17) {
269404
+ return path17.reduce(function(reduced, attr) {
269239
269405
  if (reduced) {
269240
269406
  if (utils_hasOwnProperty.call(reduced, attr)) {
269241
269407
  return reduced[attr];
@@ -269247,11 +269413,11 @@ var require_backend = __commonJS({
269247
269413
  return null;
269248
269414
  }, object2);
269249
269415
  }
269250
- function deletePathInObject(object2, path15) {
269251
- var length = path15.length;
269252
- var last2 = path15[length - 1];
269416
+ function deletePathInObject(object2, path17) {
269417
+ var length = path17.length;
269418
+ var last2 = path17[length - 1];
269253
269419
  if (object2 != null) {
269254
- var parent = utils_getInObject(object2, path15.slice(0, length - 1));
269420
+ var parent = utils_getInObject(object2, path17.slice(0, length - 1));
269255
269421
  if (parent) {
269256
269422
  if (src_isArray(parent)) {
269257
269423
  parent.splice(last2, 1);
@@ -269277,11 +269443,11 @@ var require_backend = __commonJS({
269277
269443
  }
269278
269444
  }
269279
269445
  }
269280
- function utils_setInObject(object2, path15, value) {
269281
- var length = path15.length;
269282
- var last2 = path15[length - 1];
269446
+ function utils_setInObject(object2, path17, value) {
269447
+ var length = path17.length;
269448
+ var last2 = path17[length - 1];
269283
269449
  if (object2 != null) {
269284
- var parent = utils_getInObject(object2, path15.slice(0, length - 1));
269450
+ var parent = utils_getInObject(object2, path17.slice(0, length - 1));
269285
269451
  if (parent) {
269286
269452
  parent[last2] = value;
269287
269453
  }
@@ -269814,8 +269980,8 @@ var require_backend = __commonJS({
269814
269980
  unserializable: /* @__PURE__ */ Symbol("unserializable")
269815
269981
  };
269816
269982
  var LEVEL_THRESHOLD = 2;
269817
- function createDehydrated(type, inspectable, data, cleaned, path15) {
269818
- cleaned.push(path15);
269983
+ function createDehydrated(type, inspectable, data, cleaned, path17) {
269984
+ cleaned.push(path17);
269819
269985
  var dehydrated = {
269820
269986
  inspectable,
269821
269987
  type,
@@ -269833,13 +269999,13 @@ var require_backend = __commonJS({
269833
269999
  }
269834
270000
  return dehydrated;
269835
270001
  }
269836
- function dehydrate(data, cleaned, unserializable, path15, isPathAllowed) {
270002
+ function dehydrate(data, cleaned, unserializable, path17, isPathAllowed) {
269837
270003
  var level = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : 0;
269838
270004
  var type = getDataType(data);
269839
270005
  var isPathAllowedCheck;
269840
270006
  switch (type) {
269841
270007
  case "html_element":
269842
- cleaned.push(path15);
270008
+ cleaned.push(path17);
269843
270009
  return {
269844
270010
  inspectable: false,
269845
270011
  preview_short: formatDataForPreview(data, false),
@@ -269848,7 +270014,7 @@ var require_backend = __commonJS({
269848
270014
  type
269849
270015
  };
269850
270016
  case "function":
269851
- cleaned.push(path15);
270017
+ cleaned.push(path17);
269852
270018
  return {
269853
270019
  inspectable: false,
269854
270020
  preview_short: formatDataForPreview(data, false),
@@ -269857,14 +270023,14 @@ var require_backend = __commonJS({
269857
270023
  type
269858
270024
  };
269859
270025
  case "string":
269860
- isPathAllowedCheck = isPathAllowed(path15);
270026
+ isPathAllowedCheck = isPathAllowed(path17);
269861
270027
  if (isPathAllowedCheck) {
269862
270028
  return data;
269863
270029
  } else {
269864
270030
  return data.length <= 500 ? data : data.slice(0, 500) + "...";
269865
270031
  }
269866
270032
  case "bigint":
269867
- cleaned.push(path15);
270033
+ cleaned.push(path17);
269868
270034
  return {
269869
270035
  inspectable: false,
269870
270036
  preview_short: formatDataForPreview(data, false),
@@ -269873,7 +270039,7 @@ var require_backend = __commonJS({
269873
270039
  type
269874
270040
  };
269875
270041
  case "symbol":
269876
- cleaned.push(path15);
270042
+ cleaned.push(path17);
269877
270043
  return {
269878
270044
  inspectable: false,
269879
270045
  preview_short: formatDataForPreview(data, false),
@@ -269882,9 +270048,9 @@ var require_backend = __commonJS({
269882
270048
  type
269883
270049
  };
269884
270050
  case "react_element": {
269885
- isPathAllowedCheck = isPathAllowed(path15);
270051
+ isPathAllowedCheck = isPathAllowed(path17);
269886
270052
  if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
269887
- cleaned.push(path15);
270053
+ cleaned.push(path17);
269888
270054
  return {
269889
270055
  inspectable: true,
269890
270056
  preview_short: formatDataForPreview(data, false),
@@ -269901,19 +270067,19 @@ var require_backend = __commonJS({
269901
270067
  preview_long: formatDataForPreview(data, true),
269902
270068
  name: getDisplayNameForReactElement(data) || "Unknown"
269903
270069
  };
269904
- unserializableValue.key = dehydrate(data.key, cleaned, unserializable, path15.concat(["key"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
270070
+ unserializableValue.key = dehydrate(data.key, cleaned, unserializable, path17.concat(["key"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
269905
270071
  if (data.$$typeof === REACT_LEGACY_ELEMENT_TYPE) {
269906
- unserializableValue.ref = dehydrate(data.ref, cleaned, unserializable, path15.concat(["ref"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
270072
+ unserializableValue.ref = dehydrate(data.ref, cleaned, unserializable, path17.concat(["ref"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
269907
270073
  }
269908
- unserializableValue.props = dehydrate(data.props, cleaned, unserializable, path15.concat(["props"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
269909
- unserializable.push(path15);
270074
+ unserializableValue.props = dehydrate(data.props, cleaned, unserializable, path17.concat(["props"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
270075
+ unserializable.push(path17);
269910
270076
  return unserializableValue;
269911
270077
  }
269912
270078
  case "react_lazy": {
269913
- isPathAllowedCheck = isPathAllowed(path15);
270079
+ isPathAllowedCheck = isPathAllowed(path17);
269914
270080
  var payload = data._payload;
269915
270081
  if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
269916
- cleaned.push(path15);
270082
+ cleaned.push(path17);
269917
270083
  var inspectable = payload !== null && hydration_typeof(payload) === "object" && (payload._status === 1 || payload._status === 2 || payload.status === "fulfilled" || payload.status === "rejected");
269918
270084
  return {
269919
270085
  inspectable,
@@ -269930,13 +270096,13 @@ var require_backend = __commonJS({
269930
270096
  preview_long: formatDataForPreview(data, true),
269931
270097
  name: "lazy()"
269932
270098
  };
269933
- _unserializableValue._payload = dehydrate(payload, cleaned, unserializable, path15.concat(["_payload"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
269934
- unserializable.push(path15);
270099
+ _unserializableValue._payload = dehydrate(payload, cleaned, unserializable, path17.concat(["_payload"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
270100
+ unserializable.push(path17);
269935
270101
  return _unserializableValue;
269936
270102
  }
269937
270103
  case "array_buffer":
269938
270104
  case "data_view":
269939
- cleaned.push(path15);
270105
+ cleaned.push(path17);
269940
270106
  return {
269941
270107
  inspectable: false,
269942
270108
  preview_short: formatDataForPreview(data, false),
@@ -269946,21 +270112,21 @@ var require_backend = __commonJS({
269946
270112
  type
269947
270113
  };
269948
270114
  case "array":
269949
- isPathAllowedCheck = isPathAllowed(path15);
270115
+ isPathAllowedCheck = isPathAllowed(path17);
269950
270116
  if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
269951
- return createDehydrated(type, true, data, cleaned, path15);
270117
+ return createDehydrated(type, true, data, cleaned, path17);
269952
270118
  }
269953
270119
  var arr = [];
269954
270120
  for (var i = 0; i < data.length; i++) {
269955
- arr[i] = dehydrateKey(data, i, cleaned, unserializable, path15.concat([i]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
270121
+ arr[i] = dehydrateKey(data, i, cleaned, unserializable, path17.concat([i]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
269956
270122
  }
269957
270123
  return arr;
269958
270124
  case "html_all_collection":
269959
270125
  case "typed_array":
269960
270126
  case "iterator":
269961
- isPathAllowedCheck = isPathAllowed(path15);
270127
+ isPathAllowedCheck = isPathAllowed(path17);
269962
270128
  if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
269963
- return createDehydrated(type, true, data, cleaned, path15);
270129
+ return createDehydrated(type, true, data, cleaned, path17);
269964
270130
  } else {
269965
270131
  var _unserializableValue2 = {
269966
270132
  unserializable: true,
@@ -269972,13 +270138,13 @@ var require_backend = __commonJS({
269972
270138
  name: typeof data.constructor !== "function" || typeof data.constructor.name !== "string" || data.constructor.name === "Object" ? "" : data.constructor.name
269973
270139
  };
269974
270140
  Array.from(data).forEach(function(item, i2) {
269975
- return _unserializableValue2[i2] = dehydrate(item, cleaned, unserializable, path15.concat([i2]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
270141
+ return _unserializableValue2[i2] = dehydrate(item, cleaned, unserializable, path17.concat([i2]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
269976
270142
  });
269977
- unserializable.push(path15);
270143
+ unserializable.push(path17);
269978
270144
  return _unserializableValue2;
269979
270145
  }
269980
270146
  case "opaque_iterator":
269981
- cleaned.push(path15);
270147
+ cleaned.push(path17);
269982
270148
  return {
269983
270149
  inspectable: false,
269984
270150
  preview_short: formatDataForPreview(data, false),
@@ -269987,7 +270153,7 @@ var require_backend = __commonJS({
269987
270153
  type
269988
270154
  };
269989
270155
  case "date":
269990
- cleaned.push(path15);
270156
+ cleaned.push(path17);
269991
270157
  return {
269992
270158
  inspectable: false,
269993
270159
  preview_short: formatDataForPreview(data, false),
@@ -269996,7 +270162,7 @@ var require_backend = __commonJS({
269996
270162
  type
269997
270163
  };
269998
270164
  case "regexp":
269999
- cleaned.push(path15);
270165
+ cleaned.push(path17);
270000
270166
  return {
270001
270167
  inspectable: false,
270002
270168
  preview_short: formatDataForPreview(data, false),
@@ -270005,9 +270171,9 @@ var require_backend = __commonJS({
270005
270171
  type
270006
270172
  };
270007
270173
  case "thenable":
270008
- isPathAllowedCheck = isPathAllowed(path15);
270174
+ isPathAllowedCheck = isPathAllowed(path17);
270009
270175
  if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
270010
- cleaned.push(path15);
270176
+ cleaned.push(path17);
270011
270177
  return {
270012
270178
  inspectable: data.status === "fulfilled" || data.status === "rejected",
270013
270179
  preview_short: formatDataForPreview(data, false),
@@ -270028,8 +270194,8 @@ var require_backend = __commonJS({
270028
270194
  preview_long: formatDataForPreview(data, true),
270029
270195
  name: "fulfilled Thenable"
270030
270196
  };
270031
- _unserializableValue3.value = dehydrate(data.value, cleaned, unserializable, path15.concat(["value"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
270032
- unserializable.push(path15);
270197
+ _unserializableValue3.value = dehydrate(data.value, cleaned, unserializable, path17.concat(["value"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
270198
+ unserializable.push(path17);
270033
270199
  return _unserializableValue3;
270034
270200
  }
270035
270201
  case "rejected": {
@@ -270040,12 +270206,12 @@ var require_backend = __commonJS({
270040
270206
  preview_long: formatDataForPreview(data, true),
270041
270207
  name: "rejected Thenable"
270042
270208
  };
270043
- _unserializableValue4.reason = dehydrate(data.reason, cleaned, unserializable, path15.concat(["reason"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
270044
- unserializable.push(path15);
270209
+ _unserializableValue4.reason = dehydrate(data.reason, cleaned, unserializable, path17.concat(["reason"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
270210
+ unserializable.push(path17);
270045
270211
  return _unserializableValue4;
270046
270212
  }
270047
270213
  default:
270048
- cleaned.push(path15);
270214
+ cleaned.push(path17);
270049
270215
  return {
270050
270216
  inspectable: false,
270051
270217
  preview_short: formatDataForPreview(data, false),
@@ -270055,21 +270221,21 @@ var require_backend = __commonJS({
270055
270221
  };
270056
270222
  }
270057
270223
  case "object":
270058
- isPathAllowedCheck = isPathAllowed(path15);
270224
+ isPathAllowedCheck = isPathAllowed(path17);
270059
270225
  if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
270060
- return createDehydrated(type, true, data, cleaned, path15);
270226
+ return createDehydrated(type, true, data, cleaned, path17);
270061
270227
  } else {
270062
270228
  var object2 = {};
270063
270229
  getAllEnumerableKeys(data).forEach(function(key) {
270064
270230
  var name = key.toString();
270065
- object2[name] = dehydrateKey(data, key, cleaned, unserializable, path15.concat([name]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
270231
+ object2[name] = dehydrateKey(data, key, cleaned, unserializable, path17.concat([name]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
270066
270232
  });
270067
270233
  return object2;
270068
270234
  }
270069
270235
  case "class_instance": {
270070
- isPathAllowedCheck = isPathAllowed(path15);
270236
+ isPathAllowedCheck = isPathAllowed(path17);
270071
270237
  if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
270072
- return createDehydrated(type, true, data, cleaned, path15);
270238
+ return createDehydrated(type, true, data, cleaned, path17);
270073
270239
  }
270074
270240
  var value = {
270075
270241
  unserializable: true,
@@ -270081,15 +270247,15 @@ var require_backend = __commonJS({
270081
270247
  };
270082
270248
  getAllEnumerableKeys(data).forEach(function(key) {
270083
270249
  var keyAsString = key.toString();
270084
- value[keyAsString] = dehydrate(data[key], cleaned, unserializable, path15.concat([keyAsString]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
270250
+ value[keyAsString] = dehydrate(data[key], cleaned, unserializable, path17.concat([keyAsString]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
270085
270251
  });
270086
- unserializable.push(path15);
270252
+ unserializable.push(path17);
270087
270253
  return value;
270088
270254
  }
270089
270255
  case "error": {
270090
- isPathAllowedCheck = isPathAllowed(path15);
270256
+ isPathAllowedCheck = isPathAllowed(path17);
270091
270257
  if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
270092
- return createDehydrated(type, true, data, cleaned, path15);
270258
+ return createDehydrated(type, true, data, cleaned, path17);
270093
270259
  }
270094
270260
  var _value = {
270095
270261
  unserializable: true,
@@ -270099,22 +270265,22 @@ var require_backend = __commonJS({
270099
270265
  preview_long: formatDataForPreview(data, true),
270100
270266
  name: data.name
270101
270267
  };
270102
- _value.message = dehydrate(data.message, cleaned, unserializable, path15.concat(["message"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
270103
- _value.stack = dehydrate(data.stack, cleaned, unserializable, path15.concat(["stack"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
270268
+ _value.message = dehydrate(data.message, cleaned, unserializable, path17.concat(["message"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
270269
+ _value.stack = dehydrate(data.stack, cleaned, unserializable, path17.concat(["stack"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
270104
270270
  if ("cause" in data) {
270105
- _value.cause = dehydrate(data.cause, cleaned, unserializable, path15.concat(["cause"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
270271
+ _value.cause = dehydrate(data.cause, cleaned, unserializable, path17.concat(["cause"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
270106
270272
  }
270107
270273
  getAllEnumerableKeys(data).forEach(function(key) {
270108
270274
  var keyAsString = key.toString();
270109
- _value[keyAsString] = dehydrate(data[key], cleaned, unserializable, path15.concat([keyAsString]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
270275
+ _value[keyAsString] = dehydrate(data[key], cleaned, unserializable, path17.concat([keyAsString]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
270110
270276
  });
270111
- unserializable.push(path15);
270277
+ unserializable.push(path17);
270112
270278
  return _value;
270113
270279
  }
270114
270280
  case "infinity":
270115
270281
  case "nan":
270116
270282
  case "undefined":
270117
- cleaned.push(path15);
270283
+ cleaned.push(path17);
270118
270284
  return {
270119
270285
  type
270120
270286
  };
@@ -270122,10 +270288,10 @@ var require_backend = __commonJS({
270122
270288
  return data;
270123
270289
  }
270124
270290
  }
270125
- function dehydrateKey(parent, key, cleaned, unserializable, path15, isPathAllowed) {
270291
+ function dehydrateKey(parent, key, cleaned, unserializable, path17, isPathAllowed) {
270126
270292
  var level = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : 0;
270127
270293
  try {
270128
- return dehydrate(parent[key], cleaned, unserializable, path15, isPathAllowed, level);
270294
+ return dehydrate(parent[key], cleaned, unserializable, path17, isPathAllowed, level);
270129
270295
  } catch (error) {
270130
270296
  var preview = "";
270131
270297
  if (hydration_typeof(error) === "object" && error !== null && typeof error.stack === "string") {
@@ -270133,7 +270299,7 @@ var require_backend = __commonJS({
270133
270299
  } else if (typeof error === "string") {
270134
270300
  preview = error;
270135
270301
  }
270136
- cleaned.push(path15);
270302
+ cleaned.push(path17);
270137
270303
  return {
270138
270304
  inspectable: false,
270139
270305
  preview_short: "[Exception]",
@@ -270143,8 +270309,8 @@ var require_backend = __commonJS({
270143
270309
  };
270144
270310
  }
270145
270311
  }
270146
- function fillInPath(object2, data, path15, value) {
270147
- var target = getInObject(object2, path15);
270312
+ function fillInPath(object2, data, path17, value) {
270313
+ var target = getInObject(object2, path17);
270148
270314
  if (target != null) {
270149
270315
  if (!target[meta.unserializable]) {
270150
270316
  delete target[meta.inspectable];
@@ -270159,9 +270325,9 @@ var require_backend = __commonJS({
270159
270325
  }
270160
270326
  if (value !== null && data.unserializable.length > 0) {
270161
270327
  var unserializablePath = data.unserializable[0];
270162
- var isMatch2 = unserializablePath.length === path15.length;
270163
- for (var i = 0; i < path15.length; i++) {
270164
- if (path15[i] !== unserializablePath[i]) {
270328
+ var isMatch2 = unserializablePath.length === path17.length;
270329
+ for (var i = 0; i < path17.length; i++) {
270330
+ if (path17[i] !== unserializablePath[i]) {
270165
270331
  isMatch2 = false;
270166
270332
  break;
270167
270333
  }
@@ -270170,13 +270336,13 @@ var require_backend = __commonJS({
270170
270336
  upgradeUnserializable(value, value);
270171
270337
  }
270172
270338
  }
270173
- setInObject(object2, path15, value);
270339
+ setInObject(object2, path17, value);
270174
270340
  }
270175
270341
  function hydrate(object2, cleaned, unserializable) {
270176
- cleaned.forEach(function(path15) {
270177
- var length = path15.length;
270178
- var last2 = path15[length - 1];
270179
- var parent = getInObject(object2, path15.slice(0, length - 1));
270342
+ cleaned.forEach(function(path17) {
270343
+ var length = path17.length;
270344
+ var last2 = path17[length - 1];
270345
+ var parent = getInObject(object2, path17.slice(0, length - 1));
270180
270346
  if (!parent || !parent.hasOwnProperty(last2)) {
270181
270347
  return;
270182
270348
  }
@@ -270202,10 +270368,10 @@ var require_backend = __commonJS({
270202
270368
  parent[last2] = replaced;
270203
270369
  }
270204
270370
  });
270205
- unserializable.forEach(function(path15) {
270206
- var length = path15.length;
270207
- var last2 = path15[length - 1];
270208
- var parent = getInObject(object2, path15.slice(0, length - 1));
270371
+ unserializable.forEach(function(path17) {
270372
+ var length = path17.length;
270373
+ var last2 = path17[length - 1];
270374
+ var parent = getInObject(object2, path17.slice(0, length - 1));
270209
270375
  if (!parent || !parent.hasOwnProperty(last2)) {
270210
270376
  return;
270211
270377
  }
@@ -270326,11 +270492,11 @@ var require_backend = __commonJS({
270326
270492
  return gte(version4, FIRST_DEVTOOLS_BACKEND_LOCKSTEP_VER);
270327
270493
  }
270328
270494
  function cleanForBridge(data, isPathAllowed) {
270329
- var path15 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
270495
+ var path17 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
270330
270496
  if (data !== null) {
270331
270497
  var cleanedPaths = [];
270332
270498
  var unserializablePaths = [];
270333
- var cleanedData = dehydrate(data, cleanedPaths, unserializablePaths, path15, isPathAllowed);
270499
+ var cleanedData = dehydrate(data, cleanedPaths, unserializablePaths, path17, isPathAllowed);
270334
270500
  return {
270335
270501
  data: cleanedData,
270336
270502
  cleaned: cleanedPaths,
@@ -270340,18 +270506,18 @@ var require_backend = __commonJS({
270340
270506
  return null;
270341
270507
  }
270342
270508
  }
270343
- function copyWithDelete(obj2, path15) {
270509
+ function copyWithDelete(obj2, path17) {
270344
270510
  var index = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0;
270345
- var key = path15[index];
270511
+ var key = path17[index];
270346
270512
  var updated = shared_isArray(obj2) ? obj2.slice() : utils_objectSpread({}, obj2);
270347
- if (index + 1 === path15.length) {
270513
+ if (index + 1 === path17.length) {
270348
270514
  if (shared_isArray(updated)) {
270349
270515
  updated.splice(key, 1);
270350
270516
  } else {
270351
270517
  delete updated[key];
270352
270518
  }
270353
270519
  } else {
270354
- updated[key] = copyWithDelete(obj2[key], path15, index + 1);
270520
+ updated[key] = copyWithDelete(obj2[key], path17, index + 1);
270355
270521
  }
270356
270522
  return updated;
270357
270523
  }
@@ -270372,14 +270538,14 @@ var require_backend = __commonJS({
270372
270538
  }
270373
270539
  return updated;
270374
270540
  }
270375
- function copyWithSet(obj2, path15, value) {
270541
+ function copyWithSet(obj2, path17, value) {
270376
270542
  var index = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0;
270377
- if (index >= path15.length) {
270543
+ if (index >= path17.length) {
270378
270544
  return value;
270379
270545
  }
270380
- var key = path15[index];
270546
+ var key = path17[index];
270381
270547
  var updated = shared_isArray(obj2) ? obj2.slice() : utils_objectSpread({}, obj2);
270382
- updated[key] = copyWithSet(obj2[key], path15, value, index + 1);
270548
+ updated[key] = copyWithSet(obj2[key], path17, value, index + 1);
270383
270549
  return updated;
270384
270550
  }
270385
270551
  function getEffectDurations(root2) {
@@ -271655,12 +271821,12 @@ var require_backend = __commonJS({
271655
271821
  }
271656
271822
  });
271657
271823
  bridge_defineProperty(_this, "overrideValueAtPath", function(_ref) {
271658
- var id = _ref.id, path15 = _ref.path, rendererID = _ref.rendererID, type = _ref.type, value = _ref.value;
271824
+ var id = _ref.id, path17 = _ref.path, rendererID = _ref.rendererID, type = _ref.type, value = _ref.value;
271659
271825
  switch (type) {
271660
271826
  case "context":
271661
271827
  _this.send("overrideContext", {
271662
271828
  id,
271663
- path: path15,
271829
+ path: path17,
271664
271830
  rendererID,
271665
271831
  wasForwarded: true,
271666
271832
  value
@@ -271669,7 +271835,7 @@ var require_backend = __commonJS({
271669
271835
  case "hooks":
271670
271836
  _this.send("overrideHookState", {
271671
271837
  id,
271672
- path: path15,
271838
+ path: path17,
271673
271839
  rendererID,
271674
271840
  wasForwarded: true,
271675
271841
  value
@@ -271678,7 +271844,7 @@ var require_backend = __commonJS({
271678
271844
  case "props":
271679
271845
  _this.send("overrideProps", {
271680
271846
  id,
271681
- path: path15,
271847
+ path: path17,
271682
271848
  rendererID,
271683
271849
  wasForwarded: true,
271684
271850
  value
@@ -271687,7 +271853,7 @@ var require_backend = __commonJS({
271687
271853
  case "state":
271688
271854
  _this.send("overrideState", {
271689
271855
  id,
271690
- path: path15,
271856
+ path: path17,
271691
271857
  rendererID,
271692
271858
  wasForwarded: true,
271693
271859
  value
@@ -272025,12 +272191,12 @@ var require_backend = __commonJS({
272025
272191
  }
272026
272192
  });
272027
272193
  agent_defineProperty(_this, "copyElementPath", function(_ref5) {
272028
- var id = _ref5.id, path15 = _ref5.path, rendererID = _ref5.rendererID;
272194
+ var id = _ref5.id, path17 = _ref5.path, rendererID = _ref5.rendererID;
272029
272195
  var renderer2 = _this._rendererInterfaces[rendererID];
272030
272196
  if (renderer2 == null) {
272031
272197
  console.warn('Invalid renderer id "'.concat(rendererID, '" for element "').concat(id, '"'));
272032
272198
  } else {
272033
- var value = renderer2.getSerializedElementValueByPath(id, path15);
272199
+ var value = renderer2.getSerializedElementValueByPath(id, path17);
272034
272200
  if (value != null) {
272035
272201
  _this._bridge.send("saveToClipboard", value);
272036
272202
  } else {
@@ -272039,12 +272205,12 @@ var require_backend = __commonJS({
272039
272205
  }
272040
272206
  });
272041
272207
  agent_defineProperty(_this, "deletePath", function(_ref6) {
272042
- var hookID = _ref6.hookID, id = _ref6.id, path15 = _ref6.path, rendererID = _ref6.rendererID, type = _ref6.type;
272208
+ var hookID = _ref6.hookID, id = _ref6.id, path17 = _ref6.path, rendererID = _ref6.rendererID, type = _ref6.type;
272043
272209
  var renderer2 = _this._rendererInterfaces[rendererID];
272044
272210
  if (renderer2 == null) {
272045
272211
  console.warn('Invalid renderer id "'.concat(rendererID, '" for element "').concat(id, '"'));
272046
272212
  } else {
272047
- renderer2.deletePath(type, id, hookID, path15);
272213
+ renderer2.deletePath(type, id, hookID, path17);
272048
272214
  }
272049
272215
  });
272050
272216
  agent_defineProperty(_this, "getBackendVersion", function() {
@@ -272081,12 +272247,12 @@ var require_backend = __commonJS({
272081
272247
  }
272082
272248
  });
272083
272249
  agent_defineProperty(_this, "inspectElement", function(_ref9) {
272084
- var forceFullData = _ref9.forceFullData, id = _ref9.id, path15 = _ref9.path, rendererID = _ref9.rendererID, requestID = _ref9.requestID;
272250
+ var forceFullData = _ref9.forceFullData, id = _ref9.id, path17 = _ref9.path, rendererID = _ref9.rendererID, requestID = _ref9.requestID;
272085
272251
  var renderer2 = _this._rendererInterfaces[rendererID];
272086
272252
  if (renderer2 == null) {
272087
272253
  console.warn('Invalid renderer id "'.concat(rendererID, '" for element "').concat(id, '"'));
272088
272254
  } else {
272089
- _this._bridge.send("inspectedElement", renderer2.inspectElement(requestID, id, path15, forceFullData));
272255
+ _this._bridge.send("inspectedElement", renderer2.inspectElement(requestID, id, path17, forceFullData));
272090
272256
  if (_this._persistedSelectionMatch === null || _this._persistedSelectionMatch.id !== id) {
272091
272257
  _this._persistedSelection = null;
272092
272258
  _this._persistedSelectionMatch = null;
@@ -272120,15 +272286,15 @@ var require_backend = __commonJS({
272120
272286
  }
272121
272287
  for (var rendererID in _this._rendererInterfaces) {
272122
272288
  var renderer2 = _this._rendererInterfaces[rendererID];
272123
- var path15 = null;
272289
+ var path17 = null;
272124
272290
  if (suspendedByPathIndex !== null && rendererPath !== null) {
272125
272291
  var suspendedByPathRendererIndex = suspendedByPathIndex - suspendedByOffset;
272126
272292
  var rendererHasRequestedSuspendedByPath = renderer2.getElementAttributeByPath(id, ["suspendedBy", suspendedByPathRendererIndex]) !== void 0;
272127
272293
  if (rendererHasRequestedSuspendedByPath) {
272128
- path15 = ["suspendedBy", suspendedByPathRendererIndex].concat(rendererPath);
272294
+ path17 = ["suspendedBy", suspendedByPathRendererIndex].concat(rendererPath);
272129
272295
  }
272130
272296
  }
272131
- var inspectedRootsPayload = renderer2.inspectElement(requestID, id, path15, forceFullData);
272297
+ var inspectedRootsPayload = renderer2.inspectElement(requestID, id, path17, forceFullData);
272132
272298
  switch (inspectedRootsPayload.type) {
272133
272299
  case "hydrated-path":
272134
272300
  inspectedRootsPayload.path[1] += suspendedByOffset;
@@ -272222,20 +272388,20 @@ var require_backend = __commonJS({
272222
272388
  }
272223
272389
  });
272224
272390
  agent_defineProperty(_this, "overrideValueAtPath", function(_ref15) {
272225
- var hookID = _ref15.hookID, id = _ref15.id, path15 = _ref15.path, rendererID = _ref15.rendererID, type = _ref15.type, value = _ref15.value;
272391
+ var hookID = _ref15.hookID, id = _ref15.id, path17 = _ref15.path, rendererID = _ref15.rendererID, type = _ref15.type, value = _ref15.value;
272226
272392
  var renderer2 = _this._rendererInterfaces[rendererID];
272227
272393
  if (renderer2 == null) {
272228
272394
  console.warn('Invalid renderer id "'.concat(rendererID, '" for element "').concat(id, '"'));
272229
272395
  } else {
272230
- renderer2.overrideValueAtPath(type, id, hookID, path15, value);
272396
+ renderer2.overrideValueAtPath(type, id, hookID, path17, value);
272231
272397
  }
272232
272398
  });
272233
272399
  agent_defineProperty(_this, "overrideContext", function(_ref16) {
272234
- var id = _ref16.id, path15 = _ref16.path, rendererID = _ref16.rendererID, wasForwarded = _ref16.wasForwarded, value = _ref16.value;
272400
+ var id = _ref16.id, path17 = _ref16.path, rendererID = _ref16.rendererID, wasForwarded = _ref16.wasForwarded, value = _ref16.value;
272235
272401
  if (!wasForwarded) {
272236
272402
  _this.overrideValueAtPath({
272237
272403
  id,
272238
- path: path15,
272404
+ path: path17,
272239
272405
  rendererID,
272240
272406
  type: "context",
272241
272407
  value
@@ -272243,11 +272409,11 @@ var require_backend = __commonJS({
272243
272409
  }
272244
272410
  });
272245
272411
  agent_defineProperty(_this, "overrideHookState", function(_ref17) {
272246
- var id = _ref17.id, hookID = _ref17.hookID, path15 = _ref17.path, rendererID = _ref17.rendererID, wasForwarded = _ref17.wasForwarded, value = _ref17.value;
272412
+ var id = _ref17.id, hookID = _ref17.hookID, path17 = _ref17.path, rendererID = _ref17.rendererID, wasForwarded = _ref17.wasForwarded, value = _ref17.value;
272247
272413
  if (!wasForwarded) {
272248
272414
  _this.overrideValueAtPath({
272249
272415
  id,
272250
- path: path15,
272416
+ path: path17,
272251
272417
  rendererID,
272252
272418
  type: "hooks",
272253
272419
  value
@@ -272255,11 +272421,11 @@ var require_backend = __commonJS({
272255
272421
  }
272256
272422
  });
272257
272423
  agent_defineProperty(_this, "overrideProps", function(_ref18) {
272258
- var id = _ref18.id, path15 = _ref18.path, rendererID = _ref18.rendererID, wasForwarded = _ref18.wasForwarded, value = _ref18.value;
272424
+ var id = _ref18.id, path17 = _ref18.path, rendererID = _ref18.rendererID, wasForwarded = _ref18.wasForwarded, value = _ref18.value;
272259
272425
  if (!wasForwarded) {
272260
272426
  _this.overrideValueAtPath({
272261
272427
  id,
272262
- path: path15,
272428
+ path: path17,
272263
272429
  rendererID,
272264
272430
  type: "props",
272265
272431
  value
@@ -272267,11 +272433,11 @@ var require_backend = __commonJS({
272267
272433
  }
272268
272434
  });
272269
272435
  agent_defineProperty(_this, "overrideState", function(_ref19) {
272270
- var id = _ref19.id, path15 = _ref19.path, rendererID = _ref19.rendererID, wasForwarded = _ref19.wasForwarded, value = _ref19.value;
272436
+ var id = _ref19.id, path17 = _ref19.path, rendererID = _ref19.rendererID, wasForwarded = _ref19.wasForwarded, value = _ref19.value;
272271
272437
  if (!wasForwarded) {
272272
272438
  _this.overrideValueAtPath({
272273
272439
  id,
272274
- path: path15,
272440
+ path: path17,
272275
272441
  rendererID,
272276
272442
  type: "state",
272277
272443
  value
@@ -272338,12 +272504,12 @@ var require_backend = __commonJS({
272338
272504
  _this._bridge.send("stopInspectingHost", selected);
272339
272505
  });
272340
272506
  agent_defineProperty(_this, "storeAsGlobal", function(_ref23) {
272341
- var count = _ref23.count, id = _ref23.id, path15 = _ref23.path, rendererID = _ref23.rendererID;
272507
+ var count = _ref23.count, id = _ref23.id, path17 = _ref23.path, rendererID = _ref23.rendererID;
272342
272508
  var renderer2 = _this._rendererInterfaces[rendererID];
272343
272509
  if (renderer2 == null) {
272344
272510
  console.warn('Invalid renderer id "'.concat(rendererID, '" for element "').concat(id, '"'));
272345
272511
  } else {
272346
- renderer2.storeAsGlobal(id, path15, count);
272512
+ renderer2.storeAsGlobal(id, path17, count);
272347
272513
  }
272348
272514
  });
272349
272515
  agent_defineProperty(_this, "updateHookSettings", function(settings) {
@@ -272360,12 +272526,12 @@ var require_backend = __commonJS({
272360
272526
  var rendererID = +rendererIDString;
272361
272527
  var renderer2 = _this._rendererInterfaces[rendererID];
272362
272528
  if (_this._lastSelectedRendererID === rendererID) {
272363
- var path15 = renderer2.getPathForElement(_this._lastSelectedElementID);
272364
- if (path15 !== null) {
272365
- renderer2.setTrackedPath(path15);
272529
+ var path17 = renderer2.getPathForElement(_this._lastSelectedElementID);
272530
+ if (path17 !== null) {
272531
+ renderer2.setTrackedPath(path17);
272366
272532
  _this._persistedSelection = {
272367
272533
  rendererID,
272368
- path: path15
272534
+ path: path17
272369
272535
  };
272370
272536
  }
272371
272537
  }
@@ -272440,11 +272606,11 @@ var require_backend = __commonJS({
272440
272606
  var rendererID = _this._lastSelectedRendererID;
272441
272607
  var id = _this._lastSelectedElementID;
272442
272608
  var renderer2 = _this._rendererInterfaces[rendererID];
272443
- var path15 = renderer2 != null ? renderer2.getPathForElement(id) : null;
272444
- if (path15 !== null) {
272609
+ var path17 = renderer2 != null ? renderer2.getPathForElement(id) : null;
272610
+ if (path17 !== null) {
272445
272611
  storage_sessionStorageSetItem(SESSION_STORAGE_LAST_SELECTION_KEY, JSON.stringify({
272446
272612
  rendererID,
272447
- path: path15
272613
+ path: path17
272448
272614
  }));
272449
272615
  } else {
272450
272616
  storage_sessionStorageRemoveItem(SESSION_STORAGE_LAST_SELECTION_KEY);
@@ -273153,7 +273319,7 @@ var require_backend = __commonJS({
273153
273319
  hasElementWithId: function hasElementWithId() {
273154
273320
  return false;
273155
273321
  },
273156
- inspectElement: function inspectElement(requestID, id, path15) {
273322
+ inspectElement: function inspectElement(requestID, id, path17) {
273157
273323
  return {
273158
273324
  id,
273159
273325
  responseID: requestID,
@@ -278404,9 +278570,9 @@ var require_backend = __commonJS({
278404
278570
  }
278405
278571
  return null;
278406
278572
  }
278407
- function getElementAttributeByPath(id, path15) {
278573
+ function getElementAttributeByPath(id, path17) {
278408
278574
  if (isMostRecentlyInspectedElement(id)) {
278409
- return utils_getInObject(mostRecentlyInspectedElement, path15);
278575
+ return utils_getInObject(mostRecentlyInspectedElement, path17);
278410
278576
  }
278411
278577
  return void 0;
278412
278578
  }
@@ -279113,9 +279279,9 @@ var require_backend = __commonJS({
279113
279279
  function isMostRecentlyInspectedElementCurrent(id) {
279114
279280
  return isMostRecentlyInspectedElement(id) && !hasElementUpdatedSinceLastInspected;
279115
279281
  }
279116
- function mergeInspectedPaths(path15) {
279282
+ function mergeInspectedPaths(path17) {
279117
279283
  var current = currentlyInspectedPaths;
279118
- path15.forEach(function(key) {
279284
+ path17.forEach(function(key) {
279119
279285
  if (!current[key]) {
279120
279286
  current[key] = {};
279121
279287
  }
@@ -279123,21 +279289,21 @@ var require_backend = __commonJS({
279123
279289
  });
279124
279290
  }
279125
279291
  function createIsPathAllowed(key, secondaryCategory) {
279126
- return function isPathAllowed(path15) {
279292
+ return function isPathAllowed(path17) {
279127
279293
  switch (secondaryCategory) {
279128
279294
  case "hooks":
279129
- if (path15.length === 1) {
279295
+ if (path17.length === 1) {
279130
279296
  return true;
279131
279297
  }
279132
- if (path15[path15.length - 2] === "hookSource" && path15[path15.length - 1] === "fileName") {
279298
+ if (path17[path17.length - 2] === "hookSource" && path17[path17.length - 1] === "fileName") {
279133
279299
  return true;
279134
279300
  }
279135
- if (path15[path15.length - 1] === "subHooks" || path15[path15.length - 2] === "subHooks") {
279301
+ if (path17[path17.length - 1] === "subHooks" || path17[path17.length - 2] === "subHooks") {
279136
279302
  return true;
279137
279303
  }
279138
279304
  break;
279139
279305
  case "suspendedBy":
279140
- if (path15.length < 5) {
279306
+ if (path17.length < 5) {
279141
279307
  return true;
279142
279308
  }
279143
279309
  break;
@@ -279148,8 +279314,8 @@ var require_backend = __commonJS({
279148
279314
  if (!current) {
279149
279315
  return false;
279150
279316
  }
279151
- for (var i = 0; i < path15.length; i++) {
279152
- current = current[path15[i]];
279317
+ for (var i = 0; i < path17.length; i++) {
279318
+ current = current[path17[i]];
279153
279319
  if (!current) {
279154
279320
  return false;
279155
279321
  }
@@ -279203,38 +279369,38 @@ var require_backend = __commonJS({
279203
279369
  break;
279204
279370
  }
279205
279371
  }
279206
- function storeAsGlobal(id, path15, count) {
279372
+ function storeAsGlobal(id, path17, count) {
279207
279373
  if (isMostRecentlyInspectedElement(id)) {
279208
- var value = utils_getInObject(mostRecentlyInspectedElement, path15);
279374
+ var value = utils_getInObject(mostRecentlyInspectedElement, path17);
279209
279375
  var key = "$reactTemp".concat(count);
279210
279376
  window[key] = value;
279211
279377
  console.log(key);
279212
279378
  console.log(value);
279213
279379
  }
279214
279380
  }
279215
- function getSerializedElementValueByPath(id, path15) {
279381
+ function getSerializedElementValueByPath(id, path17) {
279216
279382
  if (isMostRecentlyInspectedElement(id)) {
279217
- var valueToCopy = utils_getInObject(mostRecentlyInspectedElement, path15);
279383
+ var valueToCopy = utils_getInObject(mostRecentlyInspectedElement, path17);
279218
279384
  return serializeToString(valueToCopy);
279219
279385
  }
279220
279386
  }
279221
- function inspectElement(requestID, id, path15, forceFullData) {
279222
- if (path15 !== null) {
279223
- mergeInspectedPaths(path15);
279387
+ function inspectElement(requestID, id, path17, forceFullData) {
279388
+ if (path17 !== null) {
279389
+ mergeInspectedPaths(path17);
279224
279390
  }
279225
279391
  if (isMostRecentlyInspectedElement(id) && !forceFullData) {
279226
279392
  if (!hasElementUpdatedSinceLastInspected) {
279227
- if (path15 !== null) {
279393
+ if (path17 !== null) {
279228
279394
  var secondaryCategory = null;
279229
- if (path15[0] === "hooks" || path15[0] === "suspendedBy") {
279230
- secondaryCategory = path15[0];
279395
+ if (path17[0] === "hooks" || path17[0] === "suspendedBy") {
279396
+ secondaryCategory = path17[0];
279231
279397
  }
279232
279398
  return {
279233
279399
  id,
279234
279400
  responseID: requestID,
279235
279401
  type: "hydrated-path",
279236
- path: path15,
279237
- value: cleanForBridge(utils_getInObject(mostRecentlyInspectedElement, path15), createIsPathAllowed(null, secondaryCategory), path15)
279402
+ path: path17,
279403
+ value: cleanForBridge(utils_getInObject(mostRecentlyInspectedElement, path17), createIsPathAllowed(null, secondaryCategory), path17)
279238
279404
  };
279239
279405
  } else {
279240
279406
  return {
@@ -279423,7 +279589,7 @@ var require_backend = __commonJS({
279423
279589
  console.groupEnd();
279424
279590
  }
279425
279591
  }
279426
- function deletePath(type, id, hookID, path15) {
279592
+ function deletePath(type, id, hookID, path17) {
279427
279593
  var devtoolsInstance = idToDevToolsInstanceMap.get(id);
279428
279594
  if (devtoolsInstance === void 0) {
279429
279595
  console.warn('Could not find DevToolsInstance with id "'.concat(id, '"'));
@@ -279437,12 +279603,12 @@ var require_backend = __commonJS({
279437
279603
  var instance = fiber.stateNode;
279438
279604
  switch (type) {
279439
279605
  case "context":
279440
- path15 = path15.slice(1);
279606
+ path17 = path17.slice(1);
279441
279607
  switch (fiber.tag) {
279442
279608
  case ClassComponent:
279443
- if (path15.length === 0) {
279609
+ if (path17.length === 0) {
279444
279610
  } else {
279445
- deletePathInObject(instance.context, path15);
279611
+ deletePathInObject(instance.context, path17);
279446
279612
  }
279447
279613
  instance.forceUpdate();
279448
279614
  break;
@@ -279452,21 +279618,21 @@ var require_backend = __commonJS({
279452
279618
  break;
279453
279619
  case "hooks":
279454
279620
  if (typeof overrideHookStateDeletePath === "function") {
279455
- overrideHookStateDeletePath(fiber, hookID, path15);
279621
+ overrideHookStateDeletePath(fiber, hookID, path17);
279456
279622
  }
279457
279623
  break;
279458
279624
  case "props":
279459
279625
  if (instance === null) {
279460
279626
  if (typeof overridePropsDeletePath === "function") {
279461
- overridePropsDeletePath(fiber, path15);
279627
+ overridePropsDeletePath(fiber, path17);
279462
279628
  }
279463
279629
  } else {
279464
- fiber.pendingProps = copyWithDelete(instance.props, path15);
279630
+ fiber.pendingProps = copyWithDelete(instance.props, path17);
279465
279631
  instance.forceUpdate();
279466
279632
  }
279467
279633
  break;
279468
279634
  case "state":
279469
- deletePathInObject(instance.state, path15);
279635
+ deletePathInObject(instance.state, path17);
279470
279636
  instance.forceUpdate();
279471
279637
  break;
279472
279638
  }
@@ -279522,7 +279688,7 @@ var require_backend = __commonJS({
279522
279688
  }
279523
279689
  }
279524
279690
  }
279525
- function overrideValueAtPath(type, id, hookID, path15, value) {
279691
+ function overrideValueAtPath(type, id, hookID, path17, value) {
279526
279692
  var devtoolsInstance = idToDevToolsInstanceMap.get(id);
279527
279693
  if (devtoolsInstance === void 0) {
279528
279694
  console.warn('Could not find DevToolsInstance with id "'.concat(id, '"'));
@@ -279536,13 +279702,13 @@ var require_backend = __commonJS({
279536
279702
  var instance = fiber.stateNode;
279537
279703
  switch (type) {
279538
279704
  case "context":
279539
- path15 = path15.slice(1);
279705
+ path17 = path17.slice(1);
279540
279706
  switch (fiber.tag) {
279541
279707
  case ClassComponent:
279542
- if (path15.length === 0) {
279708
+ if (path17.length === 0) {
279543
279709
  instance.context = value;
279544
279710
  } else {
279545
- utils_setInObject(instance.context, path15, value);
279711
+ utils_setInObject(instance.context, path17, value);
279546
279712
  }
279547
279713
  instance.forceUpdate();
279548
279714
  break;
@@ -279552,18 +279718,18 @@ var require_backend = __commonJS({
279552
279718
  break;
279553
279719
  case "hooks":
279554
279720
  if (typeof overrideHookState === "function") {
279555
- overrideHookState(fiber, hookID, path15, value);
279721
+ overrideHookState(fiber, hookID, path17, value);
279556
279722
  }
279557
279723
  break;
279558
279724
  case "props":
279559
279725
  switch (fiber.tag) {
279560
279726
  case ClassComponent:
279561
- fiber.pendingProps = copyWithSet(instance.props, path15, value);
279727
+ fiber.pendingProps = copyWithSet(instance.props, path17, value);
279562
279728
  instance.forceUpdate();
279563
279729
  break;
279564
279730
  default:
279565
279731
  if (typeof overrideProps === "function") {
279566
- overrideProps(fiber, path15, value);
279732
+ overrideProps(fiber, path17, value);
279567
279733
  }
279568
279734
  break;
279569
279735
  }
@@ -279571,7 +279737,7 @@ var require_backend = __commonJS({
279571
279737
  case "state":
279572
279738
  switch (fiber.tag) {
279573
279739
  case ClassComponent:
279574
- utils_setInObject(instance.state, path15, value);
279740
+ utils_setInObject(instance.state, path17, value);
279575
279741
  instance.forceUpdate();
279576
279742
  break;
279577
279743
  }
@@ -279857,14 +280023,14 @@ var require_backend = __commonJS({
279857
280023
  var trackedPathMatchInstance = null;
279858
280024
  var trackedPathMatchDepth = -1;
279859
280025
  var mightBeOnTrackedPath = false;
279860
- function setTrackedPath(path15) {
279861
- if (path15 === null) {
280026
+ function setTrackedPath(path17) {
280027
+ if (path17 === null) {
279862
280028
  trackedPathMatchFiber = null;
279863
280029
  trackedPathMatchInstance = null;
279864
280030
  trackedPathMatchDepth = -1;
279865
280031
  mightBeOnTrackedPath = false;
279866
280032
  }
279867
- trackedPath = path15;
280033
+ trackedPath = path17;
279868
280034
  }
279869
280035
  function updateTrackedPathStateBeforeMount(fiber, fiberInstance) {
279870
280036
  if (trackedPath === null || !mightBeOnTrackedPath) {
@@ -280632,9 +280798,9 @@ var require_backend = __commonJS({
280632
280798
  }
280633
280799
  var currentlyInspectedElementID = null;
280634
280800
  var currentlyInspectedPaths = {};
280635
- function mergeInspectedPaths(path15) {
280801
+ function mergeInspectedPaths(path17) {
280636
280802
  var current = currentlyInspectedPaths;
280637
- path15.forEach(function(key) {
280803
+ path17.forEach(function(key) {
280638
280804
  if (!current[key]) {
280639
280805
  current[key] = {};
280640
280806
  }
@@ -280642,13 +280808,13 @@ var require_backend = __commonJS({
280642
280808
  });
280643
280809
  }
280644
280810
  function createIsPathAllowed(key) {
280645
- return function isPathAllowed(path15) {
280811
+ return function isPathAllowed(path17) {
280646
280812
  var current = currentlyInspectedPaths[key];
280647
280813
  if (!current) {
280648
280814
  return false;
280649
280815
  }
280650
- for (var i = 0; i < path15.length; i++) {
280651
- current = current[path15[i]];
280816
+ for (var i = 0; i < path17.length; i++) {
280817
+ current = current[path17[i]];
280652
280818
  if (!current) {
280653
280819
  return false;
280654
280820
  }
@@ -280698,24 +280864,24 @@ var require_backend = __commonJS({
280698
280864
  break;
280699
280865
  }
280700
280866
  }
280701
- function storeAsGlobal(id, path15, count) {
280867
+ function storeAsGlobal(id, path17, count) {
280702
280868
  var inspectedElement = inspectElementRaw(id);
280703
280869
  if (inspectedElement !== null) {
280704
- var value = utils_getInObject(inspectedElement, path15);
280870
+ var value = utils_getInObject(inspectedElement, path17);
280705
280871
  var key = "$reactTemp".concat(count);
280706
280872
  window[key] = value;
280707
280873
  console.log(key);
280708
280874
  console.log(value);
280709
280875
  }
280710
280876
  }
280711
- function getSerializedElementValueByPath(id, path15) {
280877
+ function getSerializedElementValueByPath(id, path17) {
280712
280878
  var inspectedElement = inspectElementRaw(id);
280713
280879
  if (inspectedElement !== null) {
280714
- var valueToCopy = utils_getInObject(inspectedElement, path15);
280880
+ var valueToCopy = utils_getInObject(inspectedElement, path17);
280715
280881
  return serializeToString(valueToCopy);
280716
280882
  }
280717
280883
  }
280718
- function inspectElement(requestID, id, path15, forceFullData) {
280884
+ function inspectElement(requestID, id, path17, forceFullData) {
280719
280885
  if (forceFullData || currentlyInspectedElementID !== id) {
280720
280886
  currentlyInspectedElementID = id;
280721
280887
  currentlyInspectedPaths = {};
@@ -280728,8 +280894,8 @@ var require_backend = __commonJS({
280728
280894
  type: "not-found"
280729
280895
  };
280730
280896
  }
280731
- if (path15 !== null) {
280732
- mergeInspectedPaths(path15);
280897
+ if (path17 !== null) {
280898
+ mergeInspectedPaths(path17);
280733
280899
  }
280734
280900
  updateSelectedElement(id);
280735
280901
  inspectedElement.context = cleanForBridge(inspectedElement.context, createIsPathAllowed("context"));
@@ -280932,10 +281098,10 @@ var require_backend = __commonJS({
280932
281098
  console.groupEnd();
280933
281099
  }
280934
281100
  }
280935
- function getElementAttributeByPath(id, path15) {
281101
+ function getElementAttributeByPath(id, path17) {
280936
281102
  var inspectedElement = inspectElementRaw(id);
280937
281103
  if (inspectedElement !== null) {
280938
- return utils_getInObject(inspectedElement, path15);
281104
+ return utils_getInObject(inspectedElement, path17);
280939
281105
  }
280940
281106
  return void 0;
280941
281107
  }
@@ -280952,14 +281118,14 @@ var require_backend = __commonJS({
280952
281118
  }
280953
281119
  return element.type;
280954
281120
  }
280955
- function deletePath(type, id, hookID, path15) {
281121
+ function deletePath(type, id, hookID, path17) {
280956
281122
  var internalInstance = idToInternalInstanceMap.get(id);
280957
281123
  if (internalInstance != null) {
280958
281124
  var publicInstance = internalInstance._instance;
280959
281125
  if (publicInstance != null) {
280960
281126
  switch (type) {
280961
281127
  case "context":
280962
- deletePathInObject(publicInstance.context, path15);
281128
+ deletePathInObject(publicInstance.context, path17);
280963
281129
  forceUpdate(publicInstance);
280964
281130
  break;
280965
281131
  case "hooks":
@@ -280967,12 +281133,12 @@ var require_backend = __commonJS({
280967
281133
  case "props":
280968
281134
  var element = internalInstance._currentElement;
280969
281135
  internalInstance._currentElement = legacy_renderer_objectSpread(legacy_renderer_objectSpread({}, element), {}, {
280970
- props: copyWithDelete(element.props, path15)
281136
+ props: copyWithDelete(element.props, path17)
280971
281137
  });
280972
281138
  forceUpdate(publicInstance);
280973
281139
  break;
280974
281140
  case "state":
280975
- deletePathInObject(publicInstance.state, path15);
281141
+ deletePathInObject(publicInstance.state, path17);
280976
281142
  forceUpdate(publicInstance);
280977
281143
  break;
280978
281144
  }
@@ -281006,14 +281172,14 @@ var require_backend = __commonJS({
281006
281172
  }
281007
281173
  }
281008
281174
  }
281009
- function overrideValueAtPath(type, id, hookID, path15, value) {
281175
+ function overrideValueAtPath(type, id, hookID, path17, value) {
281010
281176
  var internalInstance = idToInternalInstanceMap.get(id);
281011
281177
  if (internalInstance != null) {
281012
281178
  var publicInstance = internalInstance._instance;
281013
281179
  if (publicInstance != null) {
281014
281180
  switch (type) {
281015
281181
  case "context":
281016
- utils_setInObject(publicInstance.context, path15, value);
281182
+ utils_setInObject(publicInstance.context, path17, value);
281017
281183
  forceUpdate(publicInstance);
281018
281184
  break;
281019
281185
  case "hooks":
@@ -281021,12 +281187,12 @@ var require_backend = __commonJS({
281021
281187
  case "props":
281022
281188
  var element = internalInstance._currentElement;
281023
281189
  internalInstance._currentElement = legacy_renderer_objectSpread(legacy_renderer_objectSpread({}, element), {}, {
281024
- props: copyWithSet(element.props, path15, value)
281190
+ props: copyWithSet(element.props, path17, value)
281025
281191
  });
281026
281192
  forceUpdate(publicInstance);
281027
281193
  break;
281028
281194
  case "state":
281029
- utils_setInObject(publicInstance.state, path15, value);
281195
+ utils_setInObject(publicInstance.state, path17, value);
281030
281196
  forceUpdate(publicInstance);
281031
281197
  break;
281032
281198
  }
@@ -281071,7 +281237,7 @@ var require_backend = __commonJS({
281071
281237
  }
281072
281238
  function setTraceUpdatesEnabled(enabled) {
281073
281239
  }
281074
- function setTrackedPath(path15) {
281240
+ function setTrackedPath(path17) {
281075
281241
  }
281076
281242
  function getOwnersList(id) {
281077
281243
  return null;
@@ -282326,8 +282492,8 @@ var init_devtools = __esm({
282326
282492
 
282327
282493
  // node_modules/ink/build/reconciler.js
282328
282494
  async function loadPackageJson() {
282329
- const fs15 = await import("node:fs");
282330
- const content = fs15.readFileSync(new URL("../package.json", import.meta.url), "utf8");
282495
+ const fs17 = await import("node:fs");
282496
+ const content = fs17.readFileSync(new URL("../package.json", import.meta.url), "utf8");
282331
282497
  return JSON.parse(content);
282332
282498
  }
282333
282499
  var import_react_reconciler, import_constants8, Scheduler, import_react, diff, cleanupYogaNode, currentUpdatePriority, currentRootNode, packageJson, reconciler_default;
@@ -282937,7 +283103,7 @@ var init_ansi_styles2 = __esm({
282937
283103
 
282938
283104
  // node_modules/ink/node_modules/chalk/source/vendor/supports-color/index.js
282939
283105
  import process5 from "node:process";
282940
- import os4 from "node:os";
283106
+ import os6 from "node:os";
282941
283107
  import tty2 from "node:tty";
282942
283108
  function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process5.argv) {
282943
283109
  const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
@@ -282995,7 +283161,7 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
282995
283161
  return min2;
282996
283162
  }
282997
283163
  if (process5.platform === "win32") {
282998
- const osRelease = os4.release().split(".");
283164
+ const osRelease = os6.release().split(".");
282999
283165
  if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
283000
283166
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
283001
283167
  }
@@ -285358,7 +285524,7 @@ var init_Text = __esm({
285358
285524
  });
285359
285525
 
285360
285526
  // node_modules/ink/build/components/ErrorOverview.js
285361
- import * as fs13 from "node:fs";
285527
+ import * as fs15 from "node:fs";
285362
285528
  import { cwd } from "node:process";
285363
285529
  function ErrorOverview({ error }) {
285364
285530
  const stack = error.stack ? error.stack.split("\n").slice(1) : void 0;
@@ -285366,8 +285532,8 @@ function ErrorOverview({ error }) {
285366
285532
  const filePath = cleanupPath(origin?.file);
285367
285533
  let excerpt;
285368
285534
  let lineWidth = 0;
285369
- if (filePath && origin?.line && fs13.existsSync(filePath)) {
285370
- const sourceCode = fs13.readFileSync(filePath, "utf8");
285535
+ if (filePath && origin?.line && fs15.existsSync(filePath)) {
285536
+ const sourceCode = fs15.readFileSync(filePath, "utf8");
285371
285537
  excerpt = dist_default3(sourceCode, origin.line);
285372
285538
  if (excerpt) {
285373
285539
  for (const { line } of excerpt) {
@@ -285468,8 +285634,8 @@ var init_ErrorOverview = __esm({
285468
285634
  init_dist7();
285469
285635
  init_Box();
285470
285636
  init_Text();
285471
- cleanupPath = (path15) => {
285472
- return path15?.replace(`file://${cwd()}/`, "");
285637
+ cleanupPath = (path17) => {
285638
+ return path17?.replace(`file://${cwd()}/`, "");
285473
285639
  };
285474
285640
  stackUtils = new import_stack_utils.default({
285475
285641
  cwd: cwd(),
@@ -287388,10 +287554,10 @@ __export(perch_cli_exports, {
287388
287554
  runPerchCli: () => runPerchCli,
287389
287555
  workerEventToCliRow: () => workerEventToCliRow
287390
287556
  });
287391
- import fs14 from "node:fs";
287557
+ import fs16 from "node:fs";
287392
287558
  import { createHash as createHash4 } from "node:crypto";
287393
- import os5 from "node:os";
287394
- import path14 from "node:path";
287559
+ import os7 from "node:os";
287560
+ import path16 from "node:path";
287395
287561
  import readline from "node:readline/promises";
287396
287562
  import { fileURLToPath, pathToFileURL } from "node:url";
287397
287563
  import { execFile as execFile3 } from "node:child_process";
@@ -287917,6 +288083,8 @@ async function runInkInteractivePerchCli(writer, deps, options) {
287917
288083
  await syncInteractiveCliThreadScope(state, connection);
287918
288084
  };
287919
288085
  const runTurn = deps.runCliTurn ?? runPerchCliTurn;
288086
+ const updateNotice = resolveUpdateNotice(CLI_PACKAGE_VERSION);
288087
+ captureCliFirstRun(CLI_PACKAGE_VERSION);
287920
288088
  const instance = Ink2.render(
287921
288089
  React11.createElement(function PerchInkApp() {
287922
288090
  const app = Ink2.useApp();
@@ -288760,6 +288928,11 @@ async function runInkInteractivePerchCli(writer, deps, options) {
288760
288928
  React11.createElement(Ink2.Text, { color: "#7a6f66" }, "perch \xB7 field terminal"),
288761
288929
  React11.createElement(Ink2.Text, { color: "#7a6f66" }, `v${CLI_PACKAGE_VERSION}`)
288762
288930
  ),
288931
+ updateNotice ? React11.createElement(
288932
+ Ink2.Box,
288933
+ { width: PERCH_SPLASH_WIDTH, marginBottom: 1 },
288934
+ React11.createElement(Ink2.Text, { color: CLI_BRAND.bronzeGlint }, updateNotice)
288935
+ ) : null,
288763
288936
  ...PERCH_SPLASH_SCENE.map(
288764
288937
  (line, index) => React11.createElement(
288765
288938
  Ink2.Box,
@@ -289264,12 +289437,12 @@ async function persistCliThreadState(input) {
289264
289437
  updatedAt: (/* @__PURE__ */ new Date()).toISOString()
289265
289438
  };
289266
289439
  const filePath = cliThreadStatePath(input.threadId, input.threadScopeKey);
289267
- await fs14.promises.mkdir(path14.dirname(filePath), { recursive: true, mode: 448 });
289268
- await fs14.promises.writeFile(filePath, JSON.stringify(payload, null, 2), { mode: 384 });
289440
+ await fs16.promises.mkdir(path16.dirname(filePath), { recursive: true, mode: 448 });
289441
+ await fs16.promises.writeFile(filePath, JSON.stringify(payload, null, 2), { mode: 384 });
289269
289442
  }
289270
289443
  async function readCliThreadState(threadId, threadScopeKey) {
289271
289444
  try {
289272
- const raw = await fs14.promises.readFile(cliThreadStatePath(threadId, threadScopeKey), "utf8");
289445
+ const raw = await fs16.promises.readFile(cliThreadStatePath(threadId, threadScopeKey), "utf8");
289273
289446
  const parsed = JSON.parse(raw);
289274
289447
  if (parsed.version !== 1 || parsed.threadId !== threadId) return null;
289275
289448
  return {
@@ -289285,11 +289458,11 @@ async function readCliThreadState(threadId, threadScopeKey) {
289285
289458
  }
289286
289459
  }
289287
289460
  async function deleteCliThreadState(threadId, threadScopeKey) {
289288
- await fs14.promises.rm(cliThreadStatePath(threadId, threadScopeKey), { force: true }).catch(() => void 0);
289461
+ await fs16.promises.rm(cliThreadStatePath(threadId, threadScopeKey), { force: true }).catch(() => void 0);
289289
289462
  }
289290
289463
  function cliThreadStatePath(threadId, threadScopeKey) {
289291
- const base = process.env.PERCH_CLI_STATE_DIR?.trim() || path14.join(os5.homedir(), ".perch", "threads");
289292
- return path14.join(base, safeCliThreadScopeKey(threadScopeKey), `${safeCliThreadId(threadId)}.json`);
289464
+ const base = process.env.PERCH_CLI_STATE_DIR?.trim() || path16.join(os7.homedir(), ".perch", "threads");
289465
+ return path16.join(base, safeCliThreadScopeKey(threadScopeKey), `${safeCliThreadId(threadId)}.json`);
289293
289466
  }
289294
289467
  async function resolveCliThreadScopeKey(connection) {
289295
289468
  const session = await readStoredCliAuthSession().catch(() => null);
@@ -290168,20 +290341,20 @@ function writeAPScenarioResult(result2, json, writer) {
290168
290341
  }
290169
290342
  function resolveFolderPath(input) {
290170
290343
  const resolved = resolvePath(input);
290171
- const stat2 = fs14.existsSync(resolved) ? fs14.statSync(resolved) : null;
290344
+ const stat2 = fs16.existsSync(resolved) ? fs16.statSync(resolved) : null;
290172
290345
  if (!stat2?.isDirectory()) throw new Error(`Folder does not exist: ${resolved}`);
290173
290346
  return resolved;
290174
290347
  }
290175
290348
  function resolveExistingDirectory(input) {
290176
290349
  const resolved = resolvePath(input);
290177
- const stat2 = fs14.existsSync(resolved) ? fs14.statSync(resolved) : null;
290350
+ const stat2 = fs16.existsSync(resolved) ? fs16.statSync(resolved) : null;
290178
290351
  if (!stat2?.isDirectory()) throw new Error(`Directory does not exist: ${resolved}`);
290179
290352
  return resolved;
290180
290353
  }
290181
290354
  function resolvePath(input) {
290182
290355
  if (input === "~") return process.env.HOME ?? input;
290183
- if (input.startsWith("~/")) return path14.join(process.env.HOME ?? "", input.slice(2));
290184
- return path14.resolve(input);
290356
+ if (input.startsWith("~/")) return path16.join(process.env.HOME ?? "", input.slice(2));
290357
+ return path16.resolve(input);
290185
290358
  }
290186
290359
  function requireCliAppUrl(input) {
290187
290360
  const resolved = resolveCliAppUrl(input, null);
@@ -290215,16 +290388,16 @@ function parseExpectation(input) {
290215
290388
  return { key, value: rawValue };
290216
290389
  }
290217
290390
  function readCliPackageVersion() {
290218
- const scriptDir = path14.dirname(fileURLToPath(import.meta.url));
290391
+ const scriptDir = path16.dirname(fileURLToPath(import.meta.url));
290219
290392
  const candidates = [
290220
- path14.resolve(scriptDir, "../packages/cli/package.json"),
290221
- path14.resolve(scriptDir, "../package.json"),
290222
- path14.resolve(process.cwd(), "packages/cli/package.json"),
290223
- path14.resolve(process.cwd(), "package.json")
290393
+ path16.resolve(scriptDir, "../packages/cli/package.json"),
290394
+ path16.resolve(scriptDir, "../package.json"),
290395
+ path16.resolve(process.cwd(), "packages/cli/package.json"),
290396
+ path16.resolve(process.cwd(), "package.json")
290224
290397
  ];
290225
290398
  for (const candidate of candidates) {
290226
290399
  try {
290227
- const raw = fs14.readFileSync(candidate, "utf8");
290400
+ const raw = fs16.readFileSync(candidate, "utf8");
290228
290401
  const parsed = JSON.parse(raw);
290229
290402
  if (typeof parsed.version === "string" && parsed.version.trim()) {
290230
290403
  return parsed.version.trim();
@@ -290237,7 +290410,7 @@ function readCliPackageVersion() {
290237
290410
  function shortCwd(cwd2) {
290238
290411
  const home = process.env.HOME;
290239
290412
  if (home && cwd2 === home) return "~";
290240
- if (home && cwd2.startsWith(`${home}${path14.sep}`)) {
290413
+ if (home && cwd2.startsWith(`${home}${path16.sep}`)) {
290241
290414
  return `~/${cwd2.slice(home.length + 1)}`;
290242
290415
  }
290243
290416
  return cwd2;
@@ -290271,6 +290444,8 @@ var init_perch_cli = __esm({
290271
290444
  init_sharedSlashCommands();
290272
290445
  init_toolDefinitions();
290273
290446
  init_nodeLocalBridge();
290447
+ init_cliUpdateCheck();
290448
+ init_cliAnalytics();
290274
290449
  init_agentSkillRegistry();
290275
290450
  execFileAsync3 = promisify3(execFile3);
290276
290451
  DEFAULT_CLI_LOGIN_APP_URL = "https://app.perchai.app";