@nine-lab/nine-mu 0.1.178 → 0.1.180

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/nine-mu.js CHANGED
@@ -9,7 +9,7 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
9
9
  var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
10
10
  var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
11
11
  var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
12
- var _mcpClient, _onAction, _onStatus, _onMessage, _owner, _routeUrl, _NineChatManager_instances, connect_fn, fetchRoutes_fn, pushMessage_fn, updateStatus_fn, callTool_fn, getRoutes_fn, _getSourcePath, _service, _routes, _diffPopup, _packageName, _routesPath, _connectorUrl, _manager, _$nineChatMessage, _NineChat_instances, initInteractions_fn, initActions_fn, render_fn, _makeMenuHandler, _sourceGenHandler, _showDiff, _asisEditorView, _tobeEditorView, _asisEditorEl, _tobeEditorEl, _languageCompartment, _isScrollSyncActive, _initCodeMirror, _setupScrollSync, _applyDiffDecorations, _dialog, _diffView, _asisBackup, _host, _NineDiffPopup_instances, render_fn2, handleConfirm_fn, handleCancel_fn, _message, _data, _unique, _init, _message2, _init2, _progressData, _progressElements, _animationIntervals, _ProgressMessage_instances, updateCurrentActiveProgress_fn, renderProgress_fn, updateProgressItemVisuals_fn, startAnimation_fn, updateProgressItem_fn, _renderer, _init3;
12
+ var _mcpClient, _onAction, _onStatus, _onMessage, _owner, _routeUrl, _NineChatManager_instances, connect_fn, fetchRoutes_fn, pushMessage_fn, updateStatus_fn, callTool_fn, getRoutes_fn, _chatHistory, _getSourcePath, _service, _routes, _diffPopup, _packageName, _routesPath, _connectorUrl, _manager, _$nineChatMessage, _NineChat_instances, initInteractions_fn, initActions_fn, render_fn, _makeMenuHandler, _sourceGenHandler, _showDiff, _asisEditorView, _tobeEditorView, _asisEditorEl, _tobeEditorEl, _languageCompartment, _isScrollSyncActive, _initCodeMirror, _setupScrollSync, _applyDiffDecorations, _dialog, _diffView, _asisBackup, _host, _NineDiffPopup_instances, render_fn2, handleConfirm_fn, handleCancel_fn, _message, _data, _unique, _init, _message2, _init2, _progressData, _progressElements, _animationIntervals, _ProgressMessage_instances, updateCurrentActiveProgress_fn, renderProgress_fn, updateProgressItemVisuals_fn, startAnimation_fn, updateProgressItem_fn, _renderer, _init3;
13
13
  import { trace as trace$1, api, nine } from "@nine-lab/nine-util";
14
14
  class Trace extends trace$1.constructor {
15
15
  constructor() {
@@ -455,50 +455,50 @@ function formatError(error, _mapper) {
455
455
  }
456
456
  const _parse = (_Err) => (schema, value, _ctx, _params) => {
457
457
  const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
458
- const result = schema._zod.run({ value, issues: [] }, ctx);
459
- if (result instanceof Promise) {
458
+ const result2 = schema._zod.run({ value, issues: [] }, ctx);
459
+ if (result2 instanceof Promise) {
460
460
  throw new $ZodAsyncError();
461
461
  }
462
- if (result.issues.length) {
463
- const e = new ((_params == null ? void 0 : _params.Err) ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
462
+ if (result2.issues.length) {
463
+ const e = new ((_params == null ? void 0 : _params.Err) ?? _Err)(result2.issues.map((iss) => finalizeIssue(iss, ctx, config())));
464
464
  captureStackTrace(e, _params == null ? void 0 : _params.callee);
465
465
  throw e;
466
466
  }
467
- return result.value;
467
+ return result2.value;
468
468
  };
469
469
  const _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
470
470
  const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
471
- let result = schema._zod.run({ value, issues: [] }, ctx);
472
- if (result instanceof Promise)
473
- result = await result;
474
- if (result.issues.length) {
475
- const e = new ((params == null ? void 0 : params.Err) ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
471
+ let result2 = schema._zod.run({ value, issues: [] }, ctx);
472
+ if (result2 instanceof Promise)
473
+ result2 = await result2;
474
+ if (result2.issues.length) {
475
+ const e = new ((params == null ? void 0 : params.Err) ?? _Err)(result2.issues.map((iss) => finalizeIssue(iss, ctx, config())));
476
476
  captureStackTrace(e, params == null ? void 0 : params.callee);
477
477
  throw e;
478
478
  }
479
- return result.value;
479
+ return result2.value;
480
480
  };
481
481
  const _safeParse = (_Err) => (schema, value, _ctx) => {
482
482
  const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
483
- const result = schema._zod.run({ value, issues: [] }, ctx);
484
- if (result instanceof Promise) {
483
+ const result2 = schema._zod.run({ value, issues: [] }, ctx);
484
+ if (result2 instanceof Promise) {
485
485
  throw new $ZodAsyncError();
486
486
  }
487
- return result.issues.length ? {
487
+ return result2.issues.length ? {
488
488
  success: false,
489
- error: new (_Err ?? $ZodError)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
490
- } : { success: true, data: result.value };
489
+ error: new (_Err ?? $ZodError)(result2.issues.map((iss) => finalizeIssue(iss, ctx, config())))
490
+ } : { success: true, data: result2.value };
491
491
  };
492
492
  const safeParse$2 = /* @__PURE__ */ _safeParse($ZodRealError);
493
493
  const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
494
494
  const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
495
- let result = schema._zod.run({ value, issues: [] }, ctx);
496
- if (result instanceof Promise)
497
- result = await result;
498
- return result.issues.length ? {
495
+ let result2 = schema._zod.run({ value, issues: [] }, ctx);
496
+ if (result2 instanceof Promise)
497
+ result2 = await result2;
498
+ return result2.issues.length ? {
499
499
  success: false,
500
- error: new _Err(result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
501
- } : { success: true, data: result.value };
500
+ error: new _Err(result2.issues.map((iss) => finalizeIssue(iss, ctx, config())))
501
+ } : { success: true, data: result2.value };
502
502
  };
503
503
  const safeParseAsync$1 = /* @__PURE__ */ _safeParseAsync($ZodRealError);
504
504
  const cuid = /^[cC][^\s-]{8,}$/;
@@ -1043,13 +1043,13 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
1043
1043
  return payload;
1044
1044
  };
1045
1045
  inst._zod.run = (payload, ctx) => {
1046
- const result = inst._zod.parse(payload, ctx);
1047
- if (result instanceof Promise) {
1046
+ const result2 = inst._zod.parse(payload, ctx);
1047
+ if (result2 instanceof Promise) {
1048
1048
  if (ctx.async === false)
1049
1049
  throw new $ZodAsyncError();
1050
- return result.then((result2) => runChecks(result2, checks, ctx));
1050
+ return result2.then((result3) => runChecks(result3, checks, ctx));
1051
1051
  }
1052
- return runChecks(result, checks, ctx);
1052
+ return runChecks(result2, checks, ctx);
1053
1053
  };
1054
1054
  }
1055
1055
  inst["~standard"] = {
@@ -1451,11 +1451,11 @@ const $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => {
1451
1451
  return payload;
1452
1452
  };
1453
1453
  });
1454
- function handleArrayResult(result, final, index) {
1455
- if (result.issues.length) {
1456
- final.issues.push(...prefixIssues(index, result.issues));
1454
+ function handleArrayResult(result2, final, index) {
1455
+ if (result2.issues.length) {
1456
+ final.issues.push(...prefixIssues(index, result2.issues));
1457
1457
  }
1458
- final.value[index] = result.value;
1458
+ final.value[index] = result2.value;
1459
1459
  }
1460
1460
  const $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
1461
1461
  $ZodType.init(inst, def);
@@ -1474,14 +1474,14 @@ const $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
1474
1474
  const proms = [];
1475
1475
  for (let i = 0; i < input.length; i++) {
1476
1476
  const item = input[i];
1477
- const result = def.element._zod.run({
1477
+ const result2 = def.element._zod.run({
1478
1478
  value: item,
1479
1479
  issues: []
1480
1480
  }, ctx);
1481
- if (result instanceof Promise) {
1482
- proms.push(result.then((result2) => handleArrayResult(result2, payload, i)));
1481
+ if (result2 instanceof Promise) {
1482
+ proms.push(result2.then((result3) => handleArrayResult(result3, payload, i)));
1483
1483
  } else {
1484
- handleArrayResult(result, payload, i);
1484
+ handleArrayResult(result2, payload, i);
1485
1485
  }
1486
1486
  }
1487
1487
  if (proms.length) {
@@ -1490,28 +1490,28 @@ const $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
1490
1490
  return payload;
1491
1491
  };
1492
1492
  });
1493
- function handleObjectResult(result, final, key) {
1494
- if (result.issues.length) {
1495
- final.issues.push(...prefixIssues(key, result.issues));
1493
+ function handleObjectResult(result2, final, key) {
1494
+ if (result2.issues.length) {
1495
+ final.issues.push(...prefixIssues(key, result2.issues));
1496
1496
  }
1497
- final.value[key] = result.value;
1497
+ final.value[key] = result2.value;
1498
1498
  }
1499
- function handleOptionalObjectResult(result, final, key, input) {
1500
- if (result.issues.length) {
1499
+ function handleOptionalObjectResult(result2, final, key, input) {
1500
+ if (result2.issues.length) {
1501
1501
  if (input[key] === void 0) {
1502
1502
  if (key in input) {
1503
1503
  final.value[key] = void 0;
1504
1504
  } else {
1505
- final.value[key] = result.value;
1505
+ final.value[key] = result2.value;
1506
1506
  }
1507
1507
  } else {
1508
- final.issues.push(...prefixIssues(key, result.issues));
1508
+ final.issues.push(...prefixIssues(key, result2.issues));
1509
1509
  }
1510
- } else if (result.value === void 0) {
1510
+ } else if (result2.value === void 0) {
1511
1511
  if (key in input)
1512
1512
  final.value[key] = void 0;
1513
1513
  } else {
1514
- final.value[key] = result.value;
1514
+ final.value[key] = result2.value;
1515
1515
  }
1516
1516
  }
1517
1517
  const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
@@ -1677,9 +1677,9 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
1677
1677
  };
1678
1678
  });
1679
1679
  function handleUnionResults(results, final, inst, ctx) {
1680
- for (const result of results) {
1681
- if (result.issues.length === 0) {
1682
- final.value = result.value;
1680
+ for (const result2 of results) {
1681
+ if (result2.issues.length === 0) {
1682
+ final.value = result2.value;
1683
1683
  return final;
1684
1684
  }
1685
1685
  }
@@ -1687,7 +1687,7 @@ function handleUnionResults(results, final, inst, ctx) {
1687
1687
  code: "invalid_union",
1688
1688
  input: final.value,
1689
1689
  inst,
1690
- errors: results.map((result) => result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
1690
+ errors: results.map((result2) => result2.issues.map((iss) => finalizeIssue(iss, ctx, config())))
1691
1691
  });
1692
1692
  return final;
1693
1693
  }
@@ -1712,17 +1712,17 @@ const $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
1712
1712
  let async = false;
1713
1713
  const results = [];
1714
1714
  for (const option of def.options) {
1715
- const result = option._zod.run({
1715
+ const result2 = option._zod.run({
1716
1716
  value: payload.value,
1717
1717
  issues: []
1718
1718
  }, ctx);
1719
- if (result instanceof Promise) {
1720
- results.push(result);
1719
+ if (result2 instanceof Promise) {
1720
+ results.push(result2);
1721
1721
  async = true;
1722
1722
  } else {
1723
- if (result.issues.length === 0)
1724
- return result;
1725
- results.push(result);
1723
+ if (result2.issues.length === 0)
1724
+ return result2;
1725
+ results.push(result2);
1726
1726
  }
1727
1727
  }
1728
1728
  if (!async)
@@ -1855,21 +1855,21 @@ function mergeValues(a, b) {
1855
1855
  }
1856
1856
  return { valid: false, mergeErrorPath: [] };
1857
1857
  }
1858
- function handleIntersectionResults(result, left, right) {
1858
+ function handleIntersectionResults(result2, left, right) {
1859
1859
  if (left.issues.length) {
1860
- result.issues.push(...left.issues);
1860
+ result2.issues.push(...left.issues);
1861
1861
  }
1862
1862
  if (right.issues.length) {
1863
- result.issues.push(...right.issues);
1863
+ result2.issues.push(...right.issues);
1864
1864
  }
1865
- if (aborted(result))
1866
- return result;
1865
+ if (aborted(result2))
1866
+ return result2;
1867
1867
  const merged = mergeValues(left.value, right.value);
1868
1868
  if (!merged.valid) {
1869
1869
  throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(merged.mergeErrorPath)}`);
1870
1870
  }
1871
- result.value = merged.data;
1872
- return result;
1871
+ result2.value = merged.data;
1872
+ return result2;
1873
1873
  }
1874
1874
  const $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
1875
1875
  $ZodType.init(inst, def);
@@ -1890,19 +1890,19 @@ const $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
1890
1890
  payload.value = {};
1891
1891
  for (const key of values) {
1892
1892
  if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
1893
- const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
1894
- if (result instanceof Promise) {
1895
- proms.push(result.then((result2) => {
1896
- if (result2.issues.length) {
1897
- payload.issues.push(...prefixIssues(key, result2.issues));
1893
+ const result2 = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
1894
+ if (result2 instanceof Promise) {
1895
+ proms.push(result2.then((result3) => {
1896
+ if (result3.issues.length) {
1897
+ payload.issues.push(...prefixIssues(key, result3.issues));
1898
1898
  }
1899
- payload.value[key] = result2.value;
1899
+ payload.value[key] = result3.value;
1900
1900
  }));
1901
1901
  } else {
1902
- if (result.issues.length) {
1903
- payload.issues.push(...prefixIssues(key, result.issues));
1902
+ if (result2.issues.length) {
1903
+ payload.issues.push(...prefixIssues(key, result2.issues));
1904
1904
  }
1905
- payload.value[key] = result.value;
1905
+ payload.value[key] = result2.value;
1906
1906
  }
1907
1907
  }
1908
1908
  }
@@ -1942,19 +1942,19 @@ const $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
1942
1942
  payload.value[keyResult.value] = keyResult.value;
1943
1943
  continue;
1944
1944
  }
1945
- const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
1946
- if (result instanceof Promise) {
1947
- proms.push(result.then((result2) => {
1948
- if (result2.issues.length) {
1949
- payload.issues.push(...prefixIssues(key, result2.issues));
1945
+ const result2 = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
1946
+ if (result2 instanceof Promise) {
1947
+ proms.push(result2.then((result3) => {
1948
+ if (result3.issues.length) {
1949
+ payload.issues.push(...prefixIssues(key, result3.issues));
1950
1950
  }
1951
- payload.value[keyResult.value] = result2.value;
1951
+ payload.value[keyResult.value] = result3.value;
1952
1952
  }));
1953
1953
  } else {
1954
- if (result.issues.length) {
1955
- payload.issues.push(...prefixIssues(key, result.issues));
1954
+ if (result2.issues.length) {
1955
+ payload.issues.push(...prefixIssues(key, result2.issues));
1956
1956
  }
1957
- payload.value[keyResult.value] = result.value;
1957
+ payload.value[keyResult.value] = result2.value;
1958
1958
  }
1959
1959
  }
1960
1960
  }
@@ -2066,11 +2066,11 @@ const $ZodDefault = /* @__PURE__ */ $constructor("$ZodDefault", (inst, def) => {
2066
2066
  payload.value = def.defaultValue;
2067
2067
  return payload;
2068
2068
  }
2069
- const result = def.innerType._zod.run(payload, ctx);
2070
- if (result instanceof Promise) {
2071
- return result.then((result2) => handleDefaultResult(result2, def));
2069
+ const result2 = def.innerType._zod.run(payload, ctx);
2070
+ if (result2 instanceof Promise) {
2071
+ return result2.then((result3) => handleDefaultResult(result3, def));
2072
2072
  }
2073
- return handleDefaultResult(result, def);
2073
+ return handleDefaultResult(result2, def);
2074
2074
  };
2075
2075
  });
2076
2076
  function handleDefaultResult(payload, def) {
@@ -2097,11 +2097,11 @@ const $ZodNonOptional = /* @__PURE__ */ $constructor("$ZodNonOptional", (inst, d
2097
2097
  return v ? new Set([...v].filter((x) => x !== void 0)) : void 0;
2098
2098
  });
2099
2099
  inst._zod.parse = (payload, ctx) => {
2100
- const result = def.innerType._zod.run(payload, ctx);
2101
- if (result instanceof Promise) {
2102
- return result.then((result2) => handleNonOptionalResult(result2, inst));
2100
+ const result2 = def.innerType._zod.run(payload, ctx);
2101
+ if (result2 instanceof Promise) {
2102
+ return result2.then((result3) => handleNonOptionalResult(result3, inst));
2103
2103
  }
2104
- return handleNonOptionalResult(result, inst);
2104
+ return handleNonOptionalResult(result2, inst);
2105
2105
  };
2106
2106
  });
2107
2107
  function handleNonOptionalResult(payload, inst) {
@@ -2121,15 +2121,15 @@ const $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
2121
2121
  defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
2122
2122
  defineLazy(inst._zod, "values", () => def.innerType._zod.values);
2123
2123
  inst._zod.parse = (payload, ctx) => {
2124
- const result = def.innerType._zod.run(payload, ctx);
2125
- if (result instanceof Promise) {
2126
- return result.then((result2) => {
2127
- payload.value = result2.value;
2128
- if (result2.issues.length) {
2124
+ const result2 = def.innerType._zod.run(payload, ctx);
2125
+ if (result2 instanceof Promise) {
2126
+ return result2.then((result3) => {
2127
+ payload.value = result3.value;
2128
+ if (result3.issues.length) {
2129
2129
  payload.value = def.catchValue({
2130
2130
  ...payload,
2131
2131
  error: {
2132
- issues: result2.issues.map((iss) => finalizeIssue(iss, ctx, config()))
2132
+ issues: result3.issues.map((iss) => finalizeIssue(iss, ctx, config()))
2133
2133
  },
2134
2134
  input: payload.value
2135
2135
  });
@@ -2138,12 +2138,12 @@ const $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
2138
2138
  return payload;
2139
2139
  });
2140
2140
  }
2141
- payload.value = result.value;
2142
- if (result.issues.length) {
2141
+ payload.value = result2.value;
2142
+ if (result2.issues.length) {
2143
2143
  payload.value = def.catchValue({
2144
2144
  ...payload,
2145
2145
  error: {
2146
- issues: result.issues.map((iss) => finalizeIssue(iss, ctx, config()))
2146
+ issues: result2.issues.map((iss) => finalizeIssue(iss, ctx, config()))
2147
2147
  },
2148
2148
  input: payload.value
2149
2149
  });
@@ -2178,11 +2178,11 @@ const $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) =>
2178
2178
  defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
2179
2179
  defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
2180
2180
  inst._zod.parse = (payload, ctx) => {
2181
- const result = def.innerType._zod.run(payload, ctx);
2182
- if (result instanceof Promise) {
2183
- return result.then(handleReadonlyResult);
2181
+ const result2 = def.innerType._zod.run(payload, ctx);
2182
+ if (result2 instanceof Promise) {
2183
+ return result2.then(handleReadonlyResult);
2184
2184
  }
2185
- return handleReadonlyResult(result);
2185
+ return handleReadonlyResult(result2);
2186
2186
  };
2187
2187
  });
2188
2188
  function handleReadonlyResult(payload) {
@@ -2205,8 +2205,8 @@ const $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => {
2205
2205
  return;
2206
2206
  };
2207
2207
  });
2208
- function handleRefineResult(result, payload, input, inst) {
2209
- if (!result) {
2208
+ function handleRefineResult(result2, payload, input, inst) {
2209
+ if (!result2) {
2210
2210
  const _iss = {
2211
2211
  code: "custom",
2212
2212
  input,
@@ -2711,12 +2711,12 @@ function isZ4Schema(s) {
2711
2711
  }
2712
2712
  function safeParse$1(schema, data) {
2713
2713
  if (isZ4Schema(schema)) {
2714
- const result2 = safeParse$2(schema, data);
2715
- return result2;
2714
+ const result3 = safeParse$2(schema, data);
2715
+ return result3;
2716
2716
  }
2717
2717
  const v3Schema = schema;
2718
- const result = v3Schema.safeParse(data);
2719
- return result;
2718
+ const result2 = v3Schema.safeParse(data);
2719
+ return result2;
2720
2720
  }
2721
2721
  function getObjectShape(schema) {
2722
2722
  var _a2, _b;
@@ -4976,11 +4976,11 @@ function getMethodLiteral(schema) {
4976
4976
  return value;
4977
4977
  }
4978
4978
  function parseWithCompat(schema, data) {
4979
- const result = safeParse$1(schema, data);
4980
- if (!result.success) {
4981
- throw result.error;
4979
+ const result2 = safeParse$1(schema, data);
4980
+ if (!result2.success) {
4981
+ throw result2.error;
4982
4982
  }
4983
- return result.data;
4983
+ return result2.data;
4984
4984
  }
4985
4985
  const DEFAULT_REQUEST_TIMEOUT_MSEC = 6e4;
4986
4986
  class Protocol {
@@ -5057,12 +5057,12 @@ class Protocol {
5057
5057
  return await handleTaskResult();
5058
5058
  }
5059
5059
  if (isTerminal(task.status)) {
5060
- const result = await this._taskStore.getTaskResult(taskId, extra.sessionId);
5060
+ const result2 = await this._taskStore.getTaskResult(taskId, extra.sessionId);
5061
5061
  this._clearTaskQueue(taskId);
5062
5062
  return {
5063
- ...result,
5063
+ ...result2,
5064
5064
  _meta: {
5065
- ...result._meta,
5065
+ ...result2._meta,
5066
5066
  [RELATED_TASK_META_KEY]: {
5067
5067
  taskId
5068
5068
  }
@@ -5293,12 +5293,12 @@ class Protocol {
5293
5293
  if (taskCreationParams) {
5294
5294
  this.assertTaskHandlerCapability(request.method);
5295
5295
  }
5296
- }).then(() => handler(request, fullExtra)).then(async (result) => {
5296
+ }).then(() => handler(request, fullExtra)).then(async (result2) => {
5297
5297
  if (abortController.signal.aborted) {
5298
5298
  return;
5299
5299
  }
5300
5300
  const response = {
5301
- result,
5301
+ result: result2,
5302
5302
  jsonrpc: "2.0",
5303
5303
  id: request.id
5304
5304
  };
@@ -5384,9 +5384,9 @@ class Protocol {
5384
5384
  this._cleanupTimeout(messageId);
5385
5385
  let isTaskResponse = false;
5386
5386
  if (isJSONRPCResultResponse(response) && response.result && typeof response.result === "object") {
5387
- const result = response.result;
5388
- if (result.task && typeof result.task === "object") {
5389
- const task = result.task;
5387
+ const result2 = response.result;
5388
+ if (result2.task && typeof result2.task === "object") {
5389
+ const task = result2.task;
5390
5390
  if (typeof task.taskId === "string") {
5391
5391
  isTaskResponse = true;
5392
5392
  this._taskProgressTokens.set(task.taskId, messageId);
@@ -5445,8 +5445,8 @@ class Protocol {
5445
5445
  const { task } = options ?? {};
5446
5446
  if (!task) {
5447
5447
  try {
5448
- const result = await this.request(request, resultSchema, options);
5449
- yield { type: "result", result };
5448
+ const result2 = await this.request(request, resultSchema, options);
5449
+ yield { type: "result", result: result2 };
5450
5450
  } catch (error) {
5451
5451
  yield {
5452
5452
  type: "error",
@@ -5469,8 +5469,8 @@ class Protocol {
5469
5469
  yield { type: "taskStatus", task: task2 };
5470
5470
  if (isTerminal(task2.status)) {
5471
5471
  if (task2.status === "completed") {
5472
- const result = await this.getTaskResult({ taskId }, resultSchema, options);
5473
- yield { type: "result", result };
5472
+ const result2 = await this.getTaskResult({ taskId }, resultSchema, options);
5473
+ yield { type: "result", result: result2 };
5474
5474
  } else if (task2.status === "failed") {
5475
5475
  yield {
5476
5476
  type: "error",
@@ -5485,8 +5485,8 @@ class Protocol {
5485
5485
  return;
5486
5486
  }
5487
5487
  if (task2.status === "input_required") {
5488
- const result = await this.getTaskResult({ taskId }, resultSchema, options);
5489
- yield { type: "result", result };
5488
+ const result2 = await this.getTaskResult({ taskId }, resultSchema, options);
5489
+ yield { type: "result", result: result2 };
5490
5490
  return;
5491
5491
  }
5492
5492
  const pollInterval = task2.pollInterval ?? ((_a2 = this._options) == null ? void 0 : _a2.defaultTaskPollInterval) ?? 1e3;
@@ -5888,8 +5888,8 @@ class Protocol {
5888
5888
  }
5889
5889
  return task;
5890
5890
  },
5891
- storeTaskResult: async (taskId, status, result) => {
5892
- await taskStore.storeTaskResult(taskId, status, result, sessionId);
5891
+ storeTaskResult: async (taskId, status, result2) => {
5892
+ await taskStore.storeTaskResult(taskId, status, result2, sessionId);
5893
5893
  const task = await taskStore.getTask(taskId, sessionId);
5894
5894
  if (task) {
5895
5895
  const notification = TaskStatusNotificationSchema.parse({
@@ -5936,20 +5936,20 @@ function isPlainObject(value) {
5936
5936
  return value !== null && typeof value === "object" && !Array.isArray(value);
5937
5937
  }
5938
5938
  function mergeCapabilities(base2, additional) {
5939
- const result = { ...base2 };
5939
+ const result2 = { ...base2 };
5940
5940
  for (const key in additional) {
5941
5941
  const k = key;
5942
5942
  const addValue = additional[k];
5943
5943
  if (addValue === void 0)
5944
5944
  continue;
5945
- const baseValue = result[k];
5945
+ const baseValue = result2[k];
5946
5946
  if (isPlainObject(baseValue) && isPlainObject(addValue)) {
5947
- result[k] = { ...baseValue, ...addValue };
5947
+ result2[k] = { ...baseValue, ...addValue };
5948
5948
  } else {
5949
- result[k] = addValue;
5949
+ result2[k] = addValue;
5950
5950
  }
5951
5951
  }
5952
- return result;
5952
+ return result2;
5953
5953
  }
5954
5954
  function getDefaultExportFromCjs(x) {
5955
5955
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
@@ -7858,10 +7858,10 @@ function requireKeyword() {
7858
7858
  if (def.async && !schemaEnv.$async)
7859
7859
  throw new Error("async keyword in sync schema");
7860
7860
  }
7861
- function useKeyword(gen, keyword2, result) {
7862
- if (result === void 0)
7861
+ function useKeyword(gen, keyword2, result2) {
7862
+ if (result2 === void 0)
7863
7863
  throw new Error(`keyword "${keyword2}" failed to compile`);
7864
- return gen.scopeValue("keyword", typeof result == "function" ? { ref: result } : { ref: result, code: (0, codegen_1.stringify)(result) });
7864
+ return gen.scopeValue("keyword", typeof result2 == "function" ? { ref: result2 } : { ref: result2, code: (0, codegen_1.stringify)(result2) });
7865
7865
  }
7866
7866
  function validSchemaType(schema, schemaType, allowUndefined = false) {
7867
7867
  return !schemaType.length || schemaType.some((st) => st === "array" ? Array.isArray(schema) : st === "object" ? schema && typeof schema == "object" && !Array.isArray(schema) : typeof schema == st || allowUndefined && typeof schema == "undefined");
@@ -12802,17 +12802,17 @@ class ExperimentalClientTasks {
12802
12802
  const validator = clientInternal.getToolOutputValidator(params.name);
12803
12803
  for await (const message of stream) {
12804
12804
  if (message.type === "result" && validator) {
12805
- const result = message.result;
12806
- if (!result.structuredContent && !result.isError) {
12805
+ const result2 = message.result;
12806
+ if (!result2.structuredContent && !result2.isError) {
12807
12807
  yield {
12808
12808
  type: "error",
12809
12809
  error: new McpError(ErrorCode.InvalidRequest, `Tool ${params.name} has an output schema but did not return structured content`)
12810
12810
  };
12811
12811
  return;
12812
12812
  }
12813
- if (result.structuredContent) {
12813
+ if (result2.structuredContent) {
12814
12814
  try {
12815
- const validationResult = validator(result.structuredContent);
12815
+ const validationResult = validator(result2.structuredContent);
12816
12816
  if (!validationResult.valid) {
12817
12817
  yield {
12818
12818
  type: "error",
@@ -13001,20 +13001,20 @@ class Client extends Protocol {
13001
13001
  var _a2, _b, _c, _d, _e, _f;
13002
13002
  if (config2.tools && ((_b = (_a2 = this._serverCapabilities) == null ? void 0 : _a2.tools) == null ? void 0 : _b.listChanged)) {
13003
13003
  this._setupListChangedHandler("tools", ToolListChangedNotificationSchema, config2.tools, async () => {
13004
- const result = await this.listTools();
13005
- return result.tools;
13004
+ const result2 = await this.listTools();
13005
+ return result2.tools;
13006
13006
  });
13007
13007
  }
13008
13008
  if (config2.prompts && ((_d = (_c = this._serverCapabilities) == null ? void 0 : _c.prompts) == null ? void 0 : _d.listChanged)) {
13009
13009
  this._setupListChangedHandler("prompts", PromptListChangedNotificationSchema, config2.prompts, async () => {
13010
- const result = await this.listPrompts();
13011
- return result.prompts;
13010
+ const result2 = await this.listPrompts();
13011
+ return result2.prompts;
13012
13012
  });
13013
13013
  }
13014
13014
  if (config2.resources && ((_f = (_e = this._serverCapabilities) == null ? void 0 : _e.resources) == null ? void 0 : _f.listChanged)) {
13015
13015
  this._setupListChangedHandler("resources", ResourceListChangedNotificationSchema, config2.resources, async () => {
13016
- const result = await this.listResources();
13017
- return result.resources;
13016
+ const result2 = await this.listResources();
13017
+ return result2.resources;
13018
13018
  });
13019
13019
  }
13020
13020
  }
@@ -13085,16 +13085,16 @@ class Client extends Protocol {
13085
13085
  if (params.mode === "url" && !supportsUrlMode) {
13086
13086
  throw new McpError(ErrorCode.InvalidParams, "Client does not support URL-mode elicitation requests");
13087
13087
  }
13088
- const result = await Promise.resolve(handler(request, extra));
13088
+ const result2 = await Promise.resolve(handler(request, extra));
13089
13089
  if (params.task) {
13090
- const taskValidationResult = safeParse$1(CreateTaskResultSchema, result);
13090
+ const taskValidationResult = safeParse$1(CreateTaskResultSchema, result2);
13091
13091
  if (!taskValidationResult.success) {
13092
13092
  const errorMessage = taskValidationResult.error instanceof Error ? taskValidationResult.error.message : String(taskValidationResult.error);
13093
13093
  throw new McpError(ErrorCode.InvalidParams, `Invalid task creation result: ${errorMessage}`);
13094
13094
  }
13095
13095
  return taskValidationResult.data;
13096
13096
  }
13097
- const validationResult = safeParse$1(ElicitResultSchema, result);
13097
+ const validationResult = safeParse$1(ElicitResultSchema, result2);
13098
13098
  if (!validationResult.success) {
13099
13099
  const errorMessage = validationResult.error instanceof Error ? validationResult.error.message : String(validationResult.error);
13100
13100
  throw new McpError(ErrorCode.InvalidParams, `Invalid elicitation result: ${errorMessage}`);
@@ -13121,9 +13121,9 @@ class Client extends Protocol {
13121
13121
  throw new McpError(ErrorCode.InvalidParams, `Invalid sampling request: ${errorMessage}`);
13122
13122
  }
13123
13123
  const { params } = validatedRequest.data;
13124
- const result = await Promise.resolve(handler(request, extra));
13124
+ const result2 = await Promise.resolve(handler(request, extra));
13125
13125
  if (params.task) {
13126
- const taskValidationResult = safeParse$1(CreateTaskResultSchema, result);
13126
+ const taskValidationResult = safeParse$1(CreateTaskResultSchema, result2);
13127
13127
  if (!taskValidationResult.success) {
13128
13128
  const errorMessage = taskValidationResult.error instanceof Error ? taskValidationResult.error.message : String(taskValidationResult.error);
13129
13129
  throw new McpError(ErrorCode.InvalidParams, `Invalid task creation result: ${errorMessage}`);
@@ -13132,7 +13132,7 @@ class Client extends Protocol {
13132
13132
  }
13133
13133
  const hasTools = params.tools || params.toolChoice;
13134
13134
  const resultSchema = hasTools ? CreateMessageResultWithToolsSchema : CreateMessageResultSchema;
13135
- const validationResult = safeParse$1(resultSchema, result);
13135
+ const validationResult = safeParse$1(resultSchema, result2);
13136
13136
  if (!validationResult.success) {
13137
13137
  const errorMessage = validationResult.error instanceof Error ? validationResult.error.message : String(validationResult.error);
13138
13138
  throw new McpError(ErrorCode.InvalidParams, `Invalid sampling result: ${errorMessage}`);
@@ -13155,7 +13155,7 @@ class Client extends Protocol {
13155
13155
  return;
13156
13156
  }
13157
13157
  try {
13158
- const result = await this.request({
13158
+ const result2 = await this.request({
13159
13159
  method: "initialize",
13160
13160
  params: {
13161
13161
  protocolVersion: LATEST_PROTOCOL_VERSION,
@@ -13163,18 +13163,18 @@ class Client extends Protocol {
13163
13163
  clientInfo: this._clientInfo
13164
13164
  }
13165
13165
  }, InitializeResultSchema, options);
13166
- if (result === void 0) {
13167
- throw new Error(`Server sent invalid initialize result: ${result}`);
13166
+ if (result2 === void 0) {
13167
+ throw new Error(`Server sent invalid initialize result: ${result2}`);
13168
13168
  }
13169
- if (!SUPPORTED_PROTOCOL_VERSIONS.includes(result.protocolVersion)) {
13170
- throw new Error(`Server's protocol version is not supported: ${result.protocolVersion}`);
13169
+ if (!SUPPORTED_PROTOCOL_VERSIONS.includes(result2.protocolVersion)) {
13170
+ throw new Error(`Server's protocol version is not supported: ${result2.protocolVersion}`);
13171
13171
  }
13172
- this._serverCapabilities = result.capabilities;
13173
- this._serverVersion = result.serverInfo;
13172
+ this._serverCapabilities = result2.capabilities;
13173
+ this._serverVersion = result2.serverInfo;
13174
13174
  if (transport.setProtocolVersion) {
13175
- transport.setProtocolVersion(result.protocolVersion);
13175
+ transport.setProtocolVersion(result2.protocolVersion);
13176
13176
  }
13177
- this._instructions = result.instructions;
13177
+ this._instructions = result2.instructions;
13178
13178
  await this.notification({
13179
13179
  method: "notifications/initialized"
13180
13180
  });
@@ -13334,15 +13334,15 @@ class Client extends Protocol {
13334
13334
  if (this.isToolTaskRequired(params.name)) {
13335
13335
  throw new McpError(ErrorCode.InvalidRequest, `Tool "${params.name}" requires task-based execution. Use client.experimental.tasks.callToolStream() instead.`);
13336
13336
  }
13337
- const result = await this.request({ method: "tools/call", params }, resultSchema, options);
13337
+ const result2 = await this.request({ method: "tools/call", params }, resultSchema, options);
13338
13338
  const validator = this.getToolOutputValidator(params.name);
13339
13339
  if (validator) {
13340
- if (!result.structuredContent && !result.isError) {
13340
+ if (!result2.structuredContent && !result2.isError) {
13341
13341
  throw new McpError(ErrorCode.InvalidRequest, `Tool ${params.name} has an output schema but did not return structured content`);
13342
13342
  }
13343
- if (result.structuredContent) {
13343
+ if (result2.structuredContent) {
13344
13344
  try {
13345
- const validationResult = validator(result.structuredContent);
13345
+ const validationResult = validator(result2.structuredContent);
13346
13346
  if (!validationResult.valid) {
13347
13347
  throw new McpError(ErrorCode.InvalidParams, `Structured content does not match the tool's output schema: ${validationResult.errorMessage}`);
13348
13348
  }
@@ -13354,7 +13354,7 @@ class Client extends Protocol {
13354
13354
  }
13355
13355
  }
13356
13356
  }
13357
- return result;
13357
+ return result2;
13358
13358
  }
13359
13359
  isToolTask(toolName) {
13360
13360
  var _a2, _b, _c, _d;
@@ -13400,9 +13400,9 @@ class Client extends Protocol {
13400
13400
  return this._cachedToolOutputValidators.get(toolName);
13401
13401
  }
13402
13402
  async listTools(params, options) {
13403
- const result = await this.request({ method: "tools/list", params }, ListToolsResultSchema, options);
13404
- this.cacheToolMetadata(result.tools);
13405
- return result;
13403
+ const result2 = await this.request({ method: "tools/list", params }, ListToolsResultSchema, options);
13404
+ this.cacheToolMetadata(result2.tools);
13405
+ return result2;
13406
13406
  }
13407
13407
  /**
13408
13408
  * Set up a single list changed handler.
@@ -13512,11 +13512,23 @@ class NineChatManager {
13512
13512
  // UI에 메시지를 뿌려줄 콜백 추가
13513
13513
  __privateAdd(this, _owner);
13514
13514
  __privateAdd(this, _routeUrl);
13515
- __publicField(this, "handleChatSubmit", async (el) => {
13516
- const routes = await __privateMethod(this, _NineChatManager_instances, getRoutes_fn).call(this);
13517
- trace.log(routes);
13515
+ __publicField(this, "handleChatSubmit", async (v) => {
13516
+ const routes2 = await __privateMethod(this, _NineChatManager_instances, getRoutes_fn).call(this);
13517
+ return await __privateMethod(this, _NineChatManager_instances, callTool_fn).call(this, "system-brain", {
13518
+ user_input: v,
13519
+ routes: routes2,
13520
+ current_path: "/group_member/student_management"
13521
+ });
13522
+ });
13523
+ __privateAdd(this, _chatHistory, []);
13524
+ __publicField(this, "handleChatSubmit", async (v) => {
13525
+ __privateGet(this, _chatHistory).push({ role: "user", text: v });
13526
+ const formattedHistory = __privateGet(this, _chatHistory).map((chat) => {
13527
+ return chat.role === "user" ? `User: ${chat.text}` : `AI: ${chat.text}`;
13528
+ }).join("\n");
13518
13529
  return await __privateMethod(this, _NineChatManager_instances, callTool_fn).call(this, "system-brain", {
13519
- user_input: el.value.trim(),
13530
+ user_input: v,
13531
+ chat_history: formattedHistory,
13520
13532
  routes,
13521
13533
  current_path: "/group_member/student_management"
13522
13534
  });
@@ -13535,20 +13547,20 @@ class NineChatManager {
13535
13547
  }
13536
13548
  try {
13537
13549
  __privateMethod(this, _NineChatManager_instances, pushMessage_fn).call(this, "user", userInput);
13538
- const routes = await __privateMethod(this, _NineChatManager_instances, fetchRoutes_fn).call(this);
13550
+ const routes2 = await __privateMethod(this, _NineChatManager_instances, fetchRoutes_fn).call(this);
13539
13551
  const response = await __privateGet(this, _mcpClient).callTool({
13540
13552
  name: "system-brain",
13541
13553
  arguments: {
13542
13554
  user_input: userInput,
13543
- routes,
13555
+ routes: routes2,
13544
13556
  current_path: window.location.pathname
13545
13557
  // 실시간 경로 주입
13546
13558
  }
13547
13559
  });
13548
- const result = JSON.parse(response.content[0].text);
13549
- console.log("AI Response:", result);
13550
- __privateMethod(this, _NineChatManager_instances, pushMessage_fn).call(this, "assistant", result.message, result);
13551
- if (__privateGet(this, _onAction)) __privateGet(this, _onAction).call(this, result);
13560
+ const result2 = JSON.parse(response.content[0].text);
13561
+ console.log("AI Response:", result2);
13562
+ __privateMethod(this, _NineChatManager_instances, pushMessage_fn).call(this, "assistant", result2.message, result2);
13563
+ if (__privateGet(this, _onAction)) __privateGet(this, _onAction).call(this, result2);
13552
13564
  __privateMethod(this, _NineChatManager_instances, updateStatus_fn).call(this, "준비 완료");
13553
13565
  } catch (err) {
13554
13566
  trace.error("❌ Ask Error:", err);
@@ -13569,6 +13581,10 @@ class NineChatManager {
13569
13581
  return "";
13570
13582
  }
13571
13583
  }
13584
+ // 💡 이전 대화들을 저장할 메모리 창고
13585
+ addChatHistory(message) {
13586
+ __privateGet(this, _chatHistory).push({ role: "ai", text: result.message });
13587
+ }
13572
13588
  }
13573
13589
  _mcpClient = new WeakMap();
13574
13590
  _onAction = new WeakMap();
@@ -13597,15 +13613,15 @@ fetchRoutes_fn = async function() {
13597
13613
  const r = await fetch("/admin/prompts/data/routes.json");
13598
13614
  return r.ok ? await r.json() : [];
13599
13615
  };
13600
- pushMessage_fn = function(role, content2, result = null) {
13616
+ pushMessage_fn = function(role, content2, result2 = null) {
13601
13617
  var _a2;
13602
13618
  if (__privateGet(this, _onMessage)) {
13603
13619
  __privateGet(this, _onMessage).call(this, {
13604
13620
  role,
13605
13621
  content: content2,
13606
- intent: result == null ? void 0 : result.intent,
13607
- required_args: (_a2 = result == null ? void 0 : result.action) == null ? void 0 : _a2.required_args,
13608
- action: result == null ? void 0 : result.action
13622
+ intent: result2 == null ? void 0 : result2.intent,
13623
+ required_args: (_a2 = result2 == null ? void 0 : result2.action) == null ? void 0 : _a2.required_args,
13624
+ action: result2 == null ? void 0 : result2.action
13609
13625
  });
13610
13626
  }
13611
13627
  };
@@ -13623,6 +13639,7 @@ getRoutes_fn = async function(toolName, args = {}) {
13623
13639
  }
13624
13640
  return await res.json();
13625
13641
  };
13642
+ _chatHistory = new WeakMap();
13626
13643
  class NineMuService {
13627
13644
  constructor(connectorUrl) {
13628
13645
  __privateAdd(this, _getSourcePath, (menuUrl) => {
@@ -13649,11 +13666,11 @@ class NineMuService {
13649
13666
  currentRoutes
13650
13667
  })
13651
13668
  });
13652
- const result = await response.json();
13653
- if (!result.success) {
13654
- throw new Error(result.error || "소스 생성 중 서버 오류가 발생했습니다.");
13669
+ const result2 = await response.json();
13670
+ if (!result2.success) {
13671
+ throw new Error(result2.error || "소스 생성 중 서버 오류가 발생했습니다.");
13655
13672
  }
13656
- return result;
13673
+ return result2;
13657
13674
  } catch (error) {
13658
13675
  trace.error("NineMu Service Error:", error);
13659
13676
  throw error;
@@ -13686,11 +13703,11 @@ class NineMuService {
13686
13703
  })
13687
13704
  });
13688
13705
  trace.log(response);
13689
- const result = await response.json();
13690
- if (!result.success) {
13691
- throw new Error(result.error || "소스 생성 중 서버 오류가 발생했습니다.");
13706
+ const result2 = await response.json();
13707
+ if (!result2.success) {
13708
+ throw new Error(result2.error || "소스 생성 중 서버 오류가 발생했습니다.");
13692
13709
  }
13693
- return result;
13710
+ return result2;
13694
13711
  } catch (error) {
13695
13712
  trace.error("NineMu Service Error:", error);
13696
13713
  throw error;
@@ -13743,10 +13760,10 @@ class NineChat extends HTMLElement {
13743
13760
  const command2 = "";
13744
13761
  const targets = "";
13745
13762
  try {
13746
- const result = await __privateGet(this, _service).generateAll(command2, targets, __privateGet(this, _routes));
13763
+ const result2 = await __privateGet(this, _service).generateAll(command2, targets, __privateGet(this, _routes));
13747
13764
  $status.textContent = "✅ 완료";
13748
13765
  nine.alert("소스 생성 성공").rgb();
13749
- this.dispatchEvent(new CustomEvent("nine-mu-completed", { detail: result, bubbles: true }));
13766
+ this.dispatchEvent(new CustomEvent("nine-mu-completed", { detail: result2, bubbles: true }));
13750
13767
  } catch (err) {
13751
13768
  $status.textContent = "❌ 실패";
13752
13769
  nine.alert(err.message).rgb().shake();
@@ -13809,18 +13826,19 @@ initActions_fn = function() {
13809
13826
  target.setAttribute("disabled", "disabled");
13810
13827
  __privateGet(this, _$nineChatMessage).add("me", userInput);
13811
13828
  __privateGet(this, _$nineChatMessage).add("ing", "");
13829
+ const [result2, err] = await nine.safe(__privateGet(this, _manager).handleChatSubmit(target.value));
13812
13830
  setTimeout(() => {
13813
13831
  target.value = "";
13814
13832
  });
13815
- const [result, err] = await nine.safe(__privateGet(this, _manager).handleChatSubmit(target));
13816
13833
  target.removeAttribute("disabled");
13817
13834
  target.focus();
13818
13835
  if (err) {
13819
- console.error(err);
13836
+ trace.error(err);
13820
13837
  __privateGet(this, _$nineChatMessage).add("ai", err.message || "알 수 없는 오류가 발생했습니다. 다시 시도해주세요.");
13821
13838
  } else {
13822
- console.log(result);
13823
- __privateGet(this, _$nineChatMessage).add("ai", result.message);
13839
+ trace.log(result2);
13840
+ __privateGet(this, _manager).addChatHistory(result2.message);
13841
+ __privateGet(this, _$nineChatMessage).add("ai", result2.message);
13824
13842
  }
13825
13843
  }
13826
13844
  });
@@ -13830,7 +13848,7 @@ render_fn = function() {
13830
13848
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
13831
13849
  this.shadowRoot.innerHTML = `
13832
13850
  <style>
13833
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.177"}/dist/css/nine-mu.css";
13851
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.179"}/dist/css/nine-mu.css";
13834
13852
  ${customImport}
13835
13853
  </style>
13836
13854
  <div class="wrapper">
@@ -14143,16 +14161,16 @@ class TextLeaf extends Text {
14143
14161
  }
14144
14162
  sliceString(from, to = this.length, lineSep = "\n") {
14145
14163
  [from, to] = clip(this, from, to);
14146
- let result = "";
14164
+ let result2 = "";
14147
14165
  for (let pos = 0, i = 0; pos <= to && i < this.text.length; i++) {
14148
14166
  let line = this.text[i], end = pos + line.length;
14149
14167
  if (pos > from && i)
14150
- result += lineSep;
14168
+ result2 += lineSep;
14151
14169
  if (from < end && to > pos)
14152
- result += line.slice(Math.max(0, from - pos), to - pos);
14170
+ result2 += line.slice(Math.max(0, from - pos), to - pos);
14153
14171
  pos = end + 1;
14154
14172
  }
14155
- return result;
14173
+ return result2;
14156
14174
  }
14157
14175
  flatten(target) {
14158
14176
  for (let line of this.text)
@@ -14229,16 +14247,16 @@ class TextNode extends Text {
14229
14247
  }
14230
14248
  sliceString(from, to = this.length, lineSep = "\n") {
14231
14249
  [from, to] = clip(this, from, to);
14232
- let result = "";
14250
+ let result2 = "";
14233
14251
  for (let i = 0, pos = 0; i < this.children.length && pos <= to; i++) {
14234
14252
  let child = this.children[i], end = pos + child.length;
14235
14253
  if (pos > from && i)
14236
- result += lineSep;
14254
+ result2 += lineSep;
14237
14255
  if (from < end && to > pos)
14238
- result += child.sliceString(from - pos, to - pos, lineSep);
14256
+ result2 += child.sliceString(from - pos, to - pos, lineSep);
14239
14257
  pos = end + 1;
14240
14258
  }
14241
- return result;
14259
+ return result2;
14242
14260
  }
14243
14261
  flatten(target) {
14244
14262
  for (let child of this.children)
@@ -14547,21 +14565,21 @@ class ChangeDesc {
14547
14565
  The length of the document before the change.
14548
14566
  */
14549
14567
  get length() {
14550
- let result = 0;
14568
+ let result2 = 0;
14551
14569
  for (let i = 0; i < this.sections.length; i += 2)
14552
- result += this.sections[i];
14553
- return result;
14570
+ result2 += this.sections[i];
14571
+ return result2;
14554
14572
  }
14555
14573
  /**
14556
14574
  The length of the document after the change.
14557
14575
  */
14558
14576
  get newLength() {
14559
- let result = 0;
14577
+ let result2 = 0;
14560
14578
  for (let i = 0; i < this.sections.length; i += 2) {
14561
14579
  let ins = this.sections[i + 1];
14562
- result += ins < 0 ? this.sections[i] : ins;
14580
+ result2 += ins < 0 ? this.sections[i] : ins;
14563
14581
  }
14564
- return result;
14582
+ return result2;
14565
14583
  }
14566
14584
  /**
14567
14585
  False when there are actual changes in this set.
@@ -14671,12 +14689,12 @@ class ChangeDesc {
14671
14689
  @internal
14672
14690
  */
14673
14691
  toString() {
14674
- let result = "";
14692
+ let result2 = "";
14675
14693
  for (let i = 0; i < this.sections.length; ) {
14676
14694
  let len = this.sections[i++], ins = this.sections[i++];
14677
- result += (result ? " " : "") + len + (ins >= 0 ? ":" + ins : "");
14695
+ result2 += (result2 ? " " : "") + len + (ins >= 0 ? ":" + ins : "");
14678
14696
  }
14679
- return result;
14697
+ return result2;
14680
14698
  }
14681
14699
  /**
14682
14700
  Serialize this change desc to a JSON-representable value.
@@ -15744,16 +15762,16 @@ class Configuration {
15744
15762
  }
15745
15763
  }
15746
15764
  function flatten(extension, compartments, newCompartments) {
15747
- let result = [[], [], [], [], []];
15765
+ let result2 = [[], [], [], [], []];
15748
15766
  let seen = /* @__PURE__ */ new Map();
15749
15767
  function inner(ext, prec2) {
15750
15768
  let known = seen.get(ext);
15751
15769
  if (known != null) {
15752
15770
  if (known <= prec2)
15753
15771
  return;
15754
- let found = result[known].indexOf(ext);
15772
+ let found = result2[known].indexOf(ext);
15755
15773
  if (found > -1)
15756
- result[known].splice(found, 1);
15774
+ result2[known].splice(found, 1);
15757
15775
  if (ext instanceof CompartmentInstance)
15758
15776
  newCompartments.delete(ext.compartment);
15759
15777
  }
@@ -15770,11 +15788,11 @@ function flatten(extension, compartments, newCompartments) {
15770
15788
  } else if (ext instanceof PrecExtension) {
15771
15789
  inner(ext.inner, ext.prec);
15772
15790
  } else if (ext instanceof StateField) {
15773
- result[prec2].push(ext);
15791
+ result2[prec2].push(ext);
15774
15792
  if (ext.provides)
15775
15793
  inner(ext.provides, prec2);
15776
15794
  } else if (ext instanceof FacetProvider) {
15777
- result[prec2].push(ext);
15795
+ result2[prec2].push(ext);
15778
15796
  if (ext.facet.extensions)
15779
15797
  inner(ext.facet.extensions, Prec_.default);
15780
15798
  } else {
@@ -15785,7 +15803,7 @@ function flatten(extension, compartments, newCompartments) {
15785
15803
  }
15786
15804
  }
15787
15805
  inner(extension, Prec_.default);
15788
- return result.reduce((a, b) => a.concat(b));
15806
+ return result2.reduce((a, b) => a.concat(b));
15789
15807
  }
15790
15808
  function ensureAddr(state, addr) {
15791
15809
  if (addr & 1)
@@ -15895,13 +15913,13 @@ class StateEffect {
15895
15913
  static mapEffects(effects, mapping) {
15896
15914
  if (!effects.length)
15897
15915
  return effects;
15898
- let result = [];
15916
+ let result2 = [];
15899
15917
  for (let effect of effects) {
15900
15918
  let mapped = effect.map(mapping);
15901
15919
  if (mapped)
15902
- result.push(mapped);
15920
+ result2.push(mapped);
15903
15921
  }
15904
- return result;
15922
+ return result2;
15905
15923
  }
15906
15924
  }
15907
15925
  StateEffect.reconfigure = /* @__PURE__ */ StateEffect.define();
@@ -15999,7 +16017,7 @@ Transaction.userEvent = /* @__PURE__ */ Annotation.define();
15999
16017
  Transaction.addToHistory = /* @__PURE__ */ Annotation.define();
16000
16018
  Transaction.remote = /* @__PURE__ */ Annotation.define();
16001
16019
  function joinRanges(a, b) {
16002
- let result = [];
16020
+ let result2 = [];
16003
16021
  for (let iA = 0, iB = 0; ; ) {
16004
16022
  let from, to;
16005
16023
  if (iA < a.length && (iB == b.length || b[iB] >= a[iA])) {
@@ -16009,11 +16027,11 @@ function joinRanges(a, b) {
16009
16027
  from = b[iB++];
16010
16028
  to = b[iB++];
16011
16029
  } else
16012
- return result;
16013
- if (!result.length || result[result.length - 1] < from)
16014
- result.push(from, to);
16015
- else if (result[result.length - 1] < to)
16016
- result[result.length - 1] = to;
16030
+ return result2;
16031
+ if (!result2.length || result2[result2.length - 1] < from)
16032
+ result2.push(from, to);
16033
+ else if (result2[result2.length - 1] < to)
16034
+ result2[result2.length - 1] = to;
16017
16035
  }
16018
16036
  }
16019
16037
  function mergeTransaction(a, b, sequential) {
@@ -16063,23 +16081,23 @@ function resolveTransaction(state, specs, filter) {
16063
16081
  }
16064
16082
  function filterTransaction(tr) {
16065
16083
  let state = tr.startState;
16066
- let result = true;
16084
+ let result2 = true;
16067
16085
  for (let filter of state.facet(changeFilter)) {
16068
16086
  let value = filter(tr);
16069
16087
  if (value === false) {
16070
- result = false;
16088
+ result2 = false;
16071
16089
  break;
16072
16090
  }
16073
16091
  if (Array.isArray(value))
16074
- result = result === true ? value : joinRanges(result, value);
16092
+ result2 = result2 === true ? value : joinRanges(result2, value);
16075
16093
  }
16076
- if (result !== true) {
16094
+ if (result2 !== true) {
16077
16095
  let changes, back;
16078
- if (result === false) {
16096
+ if (result2 === false) {
16079
16097
  back = tr.changes.invertedDesc;
16080
16098
  changes = ChangeSet.empty(state.doc.length);
16081
16099
  } else {
16082
- let filtered = tr.changes.filter(result);
16100
+ let filtered = tr.changes.filter(result2);
16083
16101
  changes = filtered.changes;
16084
16102
  back = filtered.filtered.mapDesc(filtered.changes).invertedDesc;
16085
16103
  }
@@ -16247,14 +16265,14 @@ class EditorState {
16247
16265
  let changes = this.changes(result1.changes), ranges = [result1.range];
16248
16266
  let effects = asArray$1(result1.effects);
16249
16267
  for (let i = 1; i < sel.ranges.length; i++) {
16250
- let result = f(sel.ranges[i]);
16251
- let newChanges = this.changes(result.changes), newMapped = newChanges.map(changes);
16268
+ let result2 = f(sel.ranges[i]);
16269
+ let newChanges = this.changes(result2.changes), newMapped = newChanges.map(changes);
16252
16270
  for (let j = 0; j < i; j++)
16253
16271
  ranges[j] = ranges[j].map(newMapped);
16254
16272
  let mapBy = changes.mapDesc(newChanges, true);
16255
- ranges.push(result.range.map(mapBy));
16273
+ ranges.push(result2.range.map(mapBy));
16256
16274
  changes = changes.compose(newMapped);
16257
- effects = StateEffect.mapEffects(effects, newMapped).concat(StateEffect.mapEffects(asArray$1(result.effects), mapBy));
16275
+ effects = StateEffect.mapEffects(effects, newMapped).concat(StateEffect.mapEffects(asArray$1(result2.effects), mapBy));
16258
16276
  }
16259
16277
  return {
16260
16278
  changes,
@@ -16303,7 +16321,7 @@ class EditorState {
16303
16321
  not use `doc` or `selection`) to fields.
16304
16322
  */
16305
16323
  toJSON(fields) {
16306
- let result = {
16324
+ let result2 = {
16307
16325
  doc: this.sliceDoc(),
16308
16326
  selection: this.selection.toJSON()
16309
16327
  };
@@ -16311,9 +16329,9 @@ class EditorState {
16311
16329
  for (let prop in fields) {
16312
16330
  let value = fields[prop];
16313
16331
  if (value instanceof StateField && this.config.address[value.id] != null)
16314
- result[prop] = value.spec.toJSON(this.field(fields[prop]), this);
16332
+ result2[prop] = value.spec.toJSON(this.field(fields[prop]), this);
16315
16333
  }
16316
- return result;
16334
+ return result2;
16317
16335
  }
16318
16336
  /**
16319
16337
  Deserialize a state from its JSON representation. When custom
@@ -16417,9 +16435,9 @@ class EditorState {
16417
16435
  languageDataAt(name2, pos, side = -1) {
16418
16436
  let values = [];
16419
16437
  for (let provider of this.facet(languageData)) {
16420
- for (let result of provider(this, pos, side)) {
16421
- if (Object.prototype.hasOwnProperty.call(result, name2))
16422
- values.push(result[name2]);
16438
+ for (let result2 of provider(this, pos, side)) {
16439
+ if (Object.prototype.hasOwnProperty.call(result2, name2))
16440
+ values.push(result2[name2]);
16423
16441
  }
16424
16442
  }
16425
16443
  return values;
@@ -16482,22 +16500,22 @@ EditorState.transactionFilter = transactionFilter;
16482
16500
  EditorState.transactionExtender = transactionExtender;
16483
16501
  Compartment.reconfigure = /* @__PURE__ */ StateEffect.define();
16484
16502
  function combineConfig(configs, defaults2, combine = {}) {
16485
- let result = {};
16503
+ let result2 = {};
16486
16504
  for (let config2 of configs)
16487
16505
  for (let key of Object.keys(config2)) {
16488
- let value = config2[key], current = result[key];
16506
+ let value = config2[key], current = result2[key];
16489
16507
  if (current === void 0)
16490
- result[key] = value;
16508
+ result2[key] = value;
16491
16509
  else if (current === value || value === void 0) ;
16492
16510
  else if (Object.hasOwnProperty.call(combine, key))
16493
- result[key] = combine[key](current, value);
16511
+ result2[key] = combine[key](current, value);
16494
16512
  else
16495
16513
  throw new Error("Config merge conflict for field " + key);
16496
16514
  }
16497
16515
  for (let key in defaults2)
16498
- if (result[key] === void 0)
16499
- result[key] = defaults2[key];
16500
- return result;
16516
+ if (result2[key] === void 0)
16517
+ result2[key] = defaults2[key];
16518
+ return result2;
16501
16519
  }
16502
16520
  class RangeValue {
16503
16521
  /**
@@ -16824,12 +16842,12 @@ class RangeSet {
16824
16842
  static join(sets) {
16825
16843
  if (!sets.length)
16826
16844
  return RangeSet.empty;
16827
- let result = sets[sets.length - 1];
16845
+ let result2 = sets[sets.length - 1];
16828
16846
  for (let i = sets.length - 2; i >= 0; i--) {
16829
16847
  for (let layer2 = sets[i]; layer2 != RangeSet.empty; layer2 = layer2.nextLayer)
16830
- result = new RangeSet(layer2.chunkPos, layer2.chunk, result, Math.max(layer2.maxPoint, result.maxPoint));
16848
+ result2 = new RangeSet(layer2.chunkPos, layer2.chunk, result2, Math.max(layer2.maxPoint, result2.maxPoint));
16831
16849
  }
16832
- return result;
16850
+ return result2;
16833
16851
  }
16834
16852
  }
16835
16853
  RangeSet.empty = /* @__PURE__ */ new RangeSet([], [], null, -1);
@@ -16937,9 +16955,9 @@ class RangeSetBuilder {
16937
16955
  this.finishChunk(false);
16938
16956
  if (this.chunks.length == 0)
16939
16957
  return next;
16940
- let result = RangeSet.create(this.chunkPos, this.chunks, this.nextLayer ? this.nextLayer.finishInner(next) : next, this.setMaxPoint);
16958
+ let result2 = RangeSet.create(this.chunkPos, this.chunks, this.nextLayer ? this.nextLayer.finishInner(next) : next, this.setMaxPoint);
16941
16959
  this.from = null;
16942
- return result;
16960
+ return result2;
16943
16961
  }
16944
16962
  }
16945
16963
  function findSharedChunks(a, b, textDiff) {
@@ -18296,10 +18314,10 @@ var Direction = /* @__PURE__ */ (function(Direction2) {
18296
18314
  })(Direction || (Direction = {}));
18297
18315
  const LTR = Direction.LTR, RTL = Direction.RTL;
18298
18316
  function dec(str) {
18299
- let result = [];
18317
+ let result2 = [];
18300
18318
  for (let i = 0; i < str.length; i++)
18301
- result.push(1 << +str[i]);
18302
- return result;
18319
+ result2.push(1 << +str[i]);
18320
+ return result2;
18303
18321
  }
18304
18322
  const LowTypes = /* @__PURE__ */ dec("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008");
18305
18323
  const ArabicTypes = /* @__PURE__ */ dec("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333");
@@ -18812,13 +18830,13 @@ function getIsolatedRanges(view, line) {
18812
18830
  if (!isolates.length)
18813
18831
  return isolates;
18814
18832
  let sets = isolates.map((i) => i instanceof Function ? i(view) : i);
18815
- let result = [];
18833
+ let result2 = [];
18816
18834
  RangeSet.spans(sets, line.from, line.to, {
18817
18835
  point() {
18818
18836
  },
18819
18837
  span(fromDoc, toDoc, active, open) {
18820
18838
  let from = fromDoc - line.from, to = toDoc - line.from;
18821
- let level = result;
18839
+ let level = result2;
18822
18840
  for (let i = active.length - 1; i >= 0; i--, open--) {
18823
18841
  let direction = active[i].spec.bidiIsolate, update;
18824
18842
  if (direction == null)
@@ -18834,7 +18852,7 @@ function getIsolatedRanges(view, line) {
18834
18852
  }
18835
18853
  }
18836
18854
  });
18837
- return result;
18855
+ return result2;
18838
18856
  }
18839
18857
  const scrollMargins = /* @__PURE__ */ Facet.define();
18840
18858
  function getScrollMargins(view) {
@@ -18887,7 +18905,7 @@ class ChangedRange {
18887
18905
  static extendWithRanges(diff, ranges) {
18888
18906
  if (ranges.length == 0)
18889
18907
  return diff;
18890
- let result = [];
18908
+ let result2 = [];
18891
18909
  for (let dI = 0, rI = 0, off = 0; ; ) {
18892
18910
  let nextD = dI < diff.length ? diff[dI].fromB : 1e9;
18893
18911
  let nextR = rI < ranges.length ? ranges[rI] : 1e9;
@@ -18912,9 +18930,9 @@ class ChangedRange {
18912
18930
  break;
18913
18931
  }
18914
18932
  }
18915
- result.push(new ChangedRange(fromA, toA, fromB, toB));
18933
+ result2.push(new ChangedRange(fromA, toA, fromB, toB));
18916
18934
  }
18917
- return result;
18935
+ return result2;
18918
18936
  }
18919
18937
  }
18920
18938
  class ViewUpdate {
@@ -19190,9 +19208,9 @@ class DocTile extends CompositeTile {
19190
19208
  i = 0;
19191
19209
  } else {
19192
19210
  let end = pos + next.length;
19193
- let result = f(next, pos);
19194
- if (result !== void 0)
19195
- return result;
19211
+ let result2 = f(next, pos);
19212
+ if (result2 !== void 0)
19213
+ return result2;
19196
19214
  pos = end + next.breakAfter;
19197
19215
  }
19198
19216
  }
@@ -20537,7 +20555,7 @@ class DocView {
20537
20555
  return scan(tile, offset);
20538
20556
  }
20539
20557
  measureVisibleLineHeights(viewport) {
20540
- let result = [], { from, to } = viewport;
20558
+ let result2 = [], { from, to } = viewport;
20541
20559
  let contentWidth = this.view.contentDOM.clientWidth;
20542
20560
  let isWider = contentWidth > Math.max(this.view.scrollDOM.clientWidth, this.minWidth) + 1;
20543
20561
  let widest = -1, ltr = this.view.textDirection == Direction.LTR;
@@ -20555,8 +20573,8 @@ class DocView {
20555
20573
  scan(child, pos, childRect);
20556
20574
  } else if (pos >= from) {
20557
20575
  if (spaceAbove > 0)
20558
- result.push(-spaceAbove);
20559
- result.push(height + spaceAbove);
20576
+ result2.push(-spaceAbove);
20577
+ result2.push(height + spaceAbove);
20560
20578
  spaceAbove = 0;
20561
20579
  if (isWider) {
20562
20580
  let last = child.dom.lastChild;
@@ -20579,7 +20597,7 @@ class DocView {
20579
20597
  }
20580
20598
  };
20581
20599
  scan(this.tile, 0, null);
20582
- return result;
20600
+ return result2;
20583
20601
  }
20584
20602
  textDirectionAt(pos) {
20585
20603
  let { tile } = this.tile.resolveBlock(pos, 1);
@@ -21599,16 +21617,16 @@ function findDiff(a, b, preferredPos, preferredSide) {
21599
21617
  return { from, toA, toB };
21600
21618
  }
21601
21619
  function selectionPoints(view) {
21602
- let result = [];
21620
+ let result2 = [];
21603
21621
  if (view.root.activeElement != view.contentDOM)
21604
- return result;
21622
+ return result2;
21605
21623
  let { anchorNode, anchorOffset, focusNode, focusOffset } = view.observer.selectionRange;
21606
21624
  if (anchorNode) {
21607
- result.push(new DOMPoint(anchorNode, anchorOffset));
21625
+ result2.push(new DOMPoint(anchorNode, anchorOffset));
21608
21626
  if (focusNode != anchorNode || focusOffset != anchorOffset)
21609
- result.push(new DOMPoint(focusNode, focusOffset));
21627
+ result2.push(new DOMPoint(focusNode, focusOffset));
21610
21628
  }
21611
- return result;
21629
+ return result2;
21612
21630
  }
21613
21631
  function selectionFromPoints(points, base2) {
21614
21632
  if (points.length == 0)
@@ -21771,9 +21789,9 @@ function bindHandler(plugin, handler) {
21771
21789
  };
21772
21790
  }
21773
21791
  function computeHandlers(plugins) {
21774
- let result = /* @__PURE__ */ Object.create(null);
21792
+ let result2 = /* @__PURE__ */ Object.create(null);
21775
21793
  function record2(type2) {
21776
- return result[type2] || (result[type2] = { observers: [], handlers: [] });
21794
+ return result2[type2] || (result2[type2] = { observers: [], handlers: [] });
21777
21795
  }
21778
21796
  for (let plugin of plugins) {
21779
21797
  let spec = plugin.spec, handlers2 = spec && spec.plugin.domEventHandlers, observers2 = spec && spec.plugin.domEventObservers;
@@ -21794,7 +21812,7 @@ function computeHandlers(plugins) {
21794
21812
  record2(type2).handlers.push(handlers[type2]);
21795
21813
  for (let type2 in observers)
21796
21814
  record2(type2).observers.push(observers[type2]);
21797
- return result;
21815
+ return result2;
21798
21816
  }
21799
21817
  const PendingKeys = [
21800
21818
  { key: "Backspace", keyCode: 8, inputType: "deleteContentBackward" },
@@ -22537,11 +22555,11 @@ class HeightMap {
22537
22555
  return HeightMap.of(nodes);
22538
22556
  }
22539
22557
  // Again, these are base cases, and are overridden for branch and gap nodes.
22540
- decomposeLeft(_to, result) {
22541
- result.push(this);
22558
+ decomposeLeft(_to, result2) {
22559
+ result2.push(this);
22542
22560
  }
22543
- decomposeRight(_from, result) {
22544
- result.push(this);
22561
+ decomposeRight(_from, result2) {
22562
+ result2.push(this);
22545
22563
  }
22546
22564
  applyChanges(decorations2, oldDoc, oracle, changes) {
22547
22565
  let me = this, doc2 = oracle.doc;
@@ -22784,11 +22802,11 @@ class HeightMapGap extends HeightMap {
22784
22802
  }
22785
22803
  return HeightMap.of(nodes);
22786
22804
  }
22787
- decomposeLeft(to, result) {
22788
- result.push(new HeightMapGap(to - 1), null);
22805
+ decomposeLeft(to, result2) {
22806
+ result2.push(new HeightMapGap(to - 1), null);
22789
22807
  }
22790
- decomposeRight(from, result) {
22791
- result.push(null, new HeightMapGap(this.length - from - 1));
22808
+ decomposeRight(from, result2) {
22809
+ result2.push(null, new HeightMapGap(this.length - from - 1));
22792
22810
  }
22793
22811
  updateHeight(oracle, offset = 0, force = false, measured) {
22794
22812
  let end = offset + this.length;
@@ -22816,10 +22834,10 @@ class HeightMapGap extends HeightMap {
22816
22834
  }
22817
22835
  if (pos <= end)
22818
22836
  nodes.push(null, new HeightMapGap(end - pos).updateHeight(oracle, pos));
22819
- let result = HeightMap.of(nodes);
22820
- if (singleHeight < 0 || Math.abs(result.height - this.height) >= Epsilon || Math.abs(singleHeight - this.heightMetrics(oracle, offset).perLine) >= Epsilon)
22837
+ let result2 = HeightMap.of(nodes);
22838
+ if (singleHeight < 0 || Math.abs(result2.height - this.height) >= Epsilon || Math.abs(singleHeight - this.heightMetrics(oracle, offset).perLine) >= Epsilon)
22821
22839
  heightChangeFlag = true;
22822
- return replace(this, result);
22840
+ return replace(this, result2);
22823
22841
  } else if (force || this.outdated) {
22824
22842
  this.setHeight(oracle.heightForGap(offset, offset + this.length));
22825
22843
  this.outdated = false;
@@ -22879,43 +22897,43 @@ class HeightMapBranch extends HeightMap {
22879
22897
  return this.balanced(this.left.replace(from, to, nodes), this.right);
22880
22898
  if (from > this.left.length)
22881
22899
  return this.balanced(this.left, this.right.replace(from - rightStart, to - rightStart, nodes));
22882
- let result = [];
22900
+ let result2 = [];
22883
22901
  if (from > 0)
22884
- this.decomposeLeft(from, result);
22885
- let left = result.length;
22902
+ this.decomposeLeft(from, result2);
22903
+ let left = result2.length;
22886
22904
  for (let node of nodes)
22887
- result.push(node);
22905
+ result2.push(node);
22888
22906
  if (from > 0)
22889
- mergeGaps(result, left - 1);
22907
+ mergeGaps(result2, left - 1);
22890
22908
  if (to < this.length) {
22891
- let right = result.length;
22892
- this.decomposeRight(to, result);
22893
- mergeGaps(result, right);
22909
+ let right = result2.length;
22910
+ this.decomposeRight(to, result2);
22911
+ mergeGaps(result2, right);
22894
22912
  }
22895
- return HeightMap.of(result);
22913
+ return HeightMap.of(result2);
22896
22914
  }
22897
- decomposeLeft(to, result) {
22915
+ decomposeLeft(to, result2) {
22898
22916
  let left = this.left.length;
22899
22917
  if (to <= left)
22900
- return this.left.decomposeLeft(to, result);
22901
- result.push(this.left);
22918
+ return this.left.decomposeLeft(to, result2);
22919
+ result2.push(this.left);
22902
22920
  if (this.break) {
22903
22921
  left++;
22904
22922
  if (to >= left)
22905
- result.push(null);
22923
+ result2.push(null);
22906
22924
  }
22907
22925
  if (to > left)
22908
- this.right.decomposeLeft(to - left, result);
22926
+ this.right.decomposeLeft(to - left, result2);
22909
22927
  }
22910
- decomposeRight(from, result) {
22928
+ decomposeRight(from, result2) {
22911
22929
  let left = this.left.length, right = left + this.break;
22912
22930
  if (from >= right)
22913
- return this.right.decomposeRight(from - right, result);
22931
+ return this.right.decomposeRight(from - right, result2);
22914
22932
  if (from < left)
22915
- this.left.decomposeRight(from, result);
22933
+ this.left.decomposeRight(from, result2);
22916
22934
  if (this.break && from < right)
22917
- result.push(null);
22918
- result.push(this.right);
22935
+ result2.push(null);
22936
+ result2.push(this.right);
22919
22937
  }
22920
22938
  balanced(left, right) {
22921
22939
  if (left.size > 2 * right.size || right.size > 2 * left.size)
@@ -23288,13 +23306,13 @@ class ViewState {
23288
23306
  let measureContent = refresh || this.mustMeasureContent || this.contentDOMHeight != domRect.height;
23289
23307
  this.contentDOMHeight = domRect.height;
23290
23308
  this.mustMeasureContent = false;
23291
- let result = 0, bias = 0;
23309
+ let result2 = 0, bias = 0;
23292
23310
  if (domRect.width && domRect.height) {
23293
23311
  let { scaleX, scaleY } = getScale(dom, domRect);
23294
23312
  if (scaleX > 5e-3 && Math.abs(this.scaleX - scaleX) > 5e-3 || scaleY > 5e-3 && Math.abs(this.scaleY - scaleY) > 5e-3) {
23295
23313
  this.scaleX = scaleX;
23296
23314
  this.scaleY = scaleY;
23297
- result |= 16;
23315
+ result2 |= 16;
23298
23316
  refresh = measureContent = true;
23299
23317
  }
23300
23318
  }
@@ -23303,13 +23321,13 @@ class ViewState {
23303
23321
  if (this.paddingTop != paddingTop || this.paddingBottom != paddingBottom) {
23304
23322
  this.paddingTop = paddingTop;
23305
23323
  this.paddingBottom = paddingBottom;
23306
- result |= 16 | 2;
23324
+ result2 |= 16 | 2;
23307
23325
  }
23308
23326
  if (this.editorWidth != view.scrollDOM.clientWidth) {
23309
23327
  if (oracle.lineWrapping)
23310
23328
  measureContent = true;
23311
23329
  this.editorWidth = view.scrollDOM.clientWidth;
23312
- result |= 16;
23330
+ result2 |= 16;
23313
23331
  }
23314
23332
  let scrollParent = scrollableParents(this.view.contentDOM, false).y;
23315
23333
  if (scrollParent != this.scrollParent) {
@@ -23338,7 +23356,7 @@ class ViewState {
23338
23356
  if (this.contentDOMWidth != contentWidth || this.editorHeight != view.scrollDOM.clientHeight) {
23339
23357
  this.contentDOMWidth = domRect.width;
23340
23358
  this.editorHeight = view.scrollDOM.clientHeight;
23341
- result |= 16;
23359
+ result2 |= 16;
23342
23360
  }
23343
23361
  if (measureContent) {
23344
23362
  let lineHeights = view.docView.measureVisibleLineHeights(this.viewport);
@@ -23349,7 +23367,7 @@ class ViewState {
23349
23367
  refresh = lineHeight > 0 && oracle.refresh(whiteSpace, lineHeight, charWidth, textHeight, Math.max(5, contentWidth / charWidth), lineHeights);
23350
23368
  if (refresh) {
23351
23369
  view.docView.minWidth = 0;
23352
- result |= 16;
23370
+ result2 |= 16;
23353
23371
  }
23354
23372
  }
23355
23373
  if (dTop > 0 && dBottom > 0)
@@ -23362,25 +23380,25 @@ class ViewState {
23362
23380
  this.heightMap = (refresh ? HeightMap.empty().applyChanges(this.stateDeco, Text.empty, this.heightOracle, [new ChangedRange(0, 0, 0, view.state.doc.length)]) : this.heightMap).updateHeight(oracle, 0, refresh, new MeasuredHeights(vp.from, heights));
23363
23381
  }
23364
23382
  if (heightChangeFlag)
23365
- result |= 2;
23383
+ result2 |= 2;
23366
23384
  }
23367
23385
  let viewportChange = !this.viewportIsAppropriate(this.viewport, bias) || this.scrollTarget && (this.scrollTarget.range.head < this.viewport.from || this.scrollTarget.range.head > this.viewport.to);
23368
23386
  if (viewportChange) {
23369
- if (result & 2)
23370
- result |= this.updateScaler();
23387
+ if (result2 & 2)
23388
+ result2 |= this.updateScaler();
23371
23389
  this.viewport = this.getViewport(bias, this.scrollTarget);
23372
- result |= this.updateForViewport();
23390
+ result2 |= this.updateForViewport();
23373
23391
  }
23374
- if (result & 2 || viewportChange)
23392
+ if (result2 & 2 || viewportChange)
23375
23393
  this.updateViewportLines();
23376
23394
  if (this.lineGaps.length || this.viewport.to - this.viewport.from > 2e3 << 1)
23377
23395
  this.updateLineGaps(this.ensureLineGaps(refresh ? [] : this.lineGaps, view));
23378
- result |= this.computeVisibleRanges();
23396
+ result2 |= this.computeVisibleRanges();
23379
23397
  if (this.mustEnforceCursorAssoc) {
23380
23398
  this.mustEnforceCursorAssoc = false;
23381
23399
  view.docView.enforceCursorAssoc();
23382
23400
  }
23383
- return result;
23401
+ return result2;
23384
23402
  }
23385
23403
  get visibleTop() {
23386
23404
  return this.scaler.fromDOM(this.pixelViewport.top);
@@ -25577,10 +25595,10 @@ class EditorView {
25577
25595
  */
25578
25596
  static theme(spec, options) {
25579
25597
  let prefix = StyleModule.newName();
25580
- let result = [theme.of(prefix), styleModule.of(buildTheme(`.${prefix}`, spec))];
25598
+ let result2 = [theme.of(prefix), styleModule.of(buildTheme(`.${prefix}`, spec))];
25581
25599
  if (options && options.dark)
25582
- result.push(darkTheme.of(true));
25583
- return result;
25600
+ result2.push(darkTheme.of(true));
25601
+ return result2;
25584
25602
  }
25585
25603
  /**
25586
25604
  Create an extension that adds styles to the base theme. Like
@@ -25654,13 +25672,13 @@ class CachedOrder {
25654
25672
  static update(cache2, changes) {
25655
25673
  if (changes.empty && !cache2.some((c) => c.fresh))
25656
25674
  return cache2;
25657
- let result = [], lastDir = cache2.length ? cache2[cache2.length - 1].dir : Direction.LTR;
25675
+ let result2 = [], lastDir = cache2.length ? cache2[cache2.length - 1].dir : Direction.LTR;
25658
25676
  for (let i = Math.max(0, cache2.length - 10); i < cache2.length; i++) {
25659
25677
  let entry = cache2[i];
25660
25678
  if (entry.dir == lastDir && !changes.touchesRange(entry.from, entry.to))
25661
- result.push(new CachedOrder(changes.mapPos(entry.from, 1), changes.mapPos(entry.to, -1), entry.dir, entry.isolates, false, entry.order));
25679
+ result2.push(new CachedOrder(changes.mapPos(entry.from, 1), changes.mapPos(entry.to, -1), entry.dir, entry.isolates, false, entry.order));
25662
25680
  }
25663
- return result;
25681
+ return result2;
25664
25682
  }
25665
25683
  }
25666
25684
  function attrsFromFacet(view, facet, base2) {
@@ -25674,9 +25692,9 @@ function attrsFromFacet(view, facet, base2) {
25674
25692
  const currentPlatform = browser.mac ? "mac" : browser.windows ? "win" : browser.linux ? "linux" : "key";
25675
25693
  function normalizeKeyName(name2, platform) {
25676
25694
  const parts = name2.split(/-(?!$)/);
25677
- let result = parts[parts.length - 1];
25678
- if (result == "Space")
25679
- result = " ";
25695
+ let result2 = parts[parts.length - 1];
25696
+ if (result2 == "Space")
25697
+ result2 = " ";
25680
25698
  let alt, ctrl, shift2, meta2;
25681
25699
  for (let i = 0; i < parts.length - 1; ++i) {
25682
25700
  const mod = parts[i];
@@ -25697,14 +25715,14 @@ function normalizeKeyName(name2, platform) {
25697
25715
  throw new Error("Unrecognized modifier name: " + mod);
25698
25716
  }
25699
25717
  if (alt)
25700
- result = "Alt-" + result;
25718
+ result2 = "Alt-" + result2;
25701
25719
  if (ctrl)
25702
- result = "Ctrl-" + result;
25720
+ result2 = "Ctrl-" + result2;
25703
25721
  if (meta2)
25704
- result = "Meta-" + result;
25722
+ result2 = "Meta-" + result2;
25705
25723
  if (shift2)
25706
- result = "Shift-" + result;
25707
- return result;
25724
+ result2 = "Shift-" + result2;
25725
+ return result2;
25708
25726
  }
25709
25727
  function modifiers(name2, event, shift2) {
25710
25728
  if (event.altKey)
@@ -26291,16 +26309,16 @@ function matchRanges(view, maxLength) {
26291
26309
  let visible = view.visibleRanges;
26292
26310
  if (visible.length == 1 && visible[0].from == view.viewport.from && visible[0].to == view.viewport.to)
26293
26311
  return visible;
26294
- let result = [];
26312
+ let result2 = [];
26295
26313
  for (let { from, to } of visible) {
26296
26314
  from = Math.max(view.state.doc.lineAt(from).from, from - maxLength);
26297
26315
  to = Math.min(view.state.doc.lineAt(to).to, to + maxLength);
26298
- if (result.length && result[result.length - 1].to >= from)
26299
- result[result.length - 1].to = to;
26316
+ if (result2.length && result2[result2.length - 1].to >= from)
26317
+ result2[result2.length - 1].to = to;
26300
26318
  else
26301
- result.push({ from, to });
26319
+ result2.push({ from, to });
26302
26320
  }
26303
- return result;
26321
+ return result2;
26304
26322
  }
26305
26323
  class MatchDecorator {
26306
26324
  /**
@@ -27098,10 +27116,10 @@ class HoverPlugin {
27098
27116
  };
27099
27117
  if (open && "then" in open) {
27100
27118
  let pending = this.pending = { pos };
27101
- open.then((result) => {
27119
+ open.then((result2) => {
27102
27120
  if (this.pending == pending) {
27103
27121
  this.pending = null;
27104
- done(result);
27122
+ done(result2);
27105
27123
  }
27106
27124
  }, (e) => logException(view.state, e, "hover tooltip"));
27107
27125
  } else {
@@ -27445,7 +27463,7 @@ const dialogField = /* @__PURE__ */ StateField.define({
27445
27463
  });
27446
27464
  const openDialogEffect = /* @__PURE__ */ StateEffect.define();
27447
27465
  const closeDialogEffect = /* @__PURE__ */ StateEffect.define();
27448
- function createDialog(view, config2, result) {
27466
+ function createDialog(view, config2, result2) {
27449
27467
  let content2 = config2.content ? config2.content(view, () => done(null)) : null;
27450
27468
  if (!content2) {
27451
27469
  content2 = crelt("form");
@@ -27491,7 +27509,7 @@ function createDialog(view, config2, result) {
27491
27509
  function done(form) {
27492
27510
  if (panel.contains(panel.ownerDocument.activeElement))
27493
27511
  view.focus();
27494
- result(form);
27512
+ result2(form);
27495
27513
  }
27496
27514
  return {
27497
27515
  dom: panel,
@@ -27543,10 +27561,10 @@ const unfixGutters = /* @__PURE__ */ Facet.define({
27543
27561
  combine: (values) => values.some((x) => x)
27544
27562
  });
27545
27563
  function gutters(config2) {
27546
- let result = [
27564
+ let result2 = [
27547
27565
  gutterView
27548
27566
  ];
27549
- return result;
27567
+ return result2;
27550
27568
  }
27551
27569
  const gutterView = /* @__PURE__ */ ViewPlugin.fromClass(class {
27552
27570
  constructor(view) {
@@ -27880,12 +27898,12 @@ const lineNumberConfig = /* @__PURE__ */ Facet.define({
27880
27898
  combine(values) {
27881
27899
  return combineConfig(values, { formatNumber: String, domEventHandlers: {} }, {
27882
27900
  domEventHandlers(a, b) {
27883
- let result = Object.assign({}, a);
27901
+ let result2 = Object.assign({}, a);
27884
27902
  for (let event in b) {
27885
- let exists = result[event], add2 = b[event];
27886
- result[event] = exists ? (view, line, event2) => exists(view, line, event2) || add2(view, line, event2) : add2;
27903
+ let exists = result2[event], add2 = b[event];
27904
+ result2[event] = exists ? (view, line, event2) => exists(view, line, event2) || add2(view, line, event2) : add2;
27887
27905
  }
27888
- return result;
27906
+ return result2;
27889
27907
  }
27890
27908
  });
27891
27909
  }
@@ -27918,9 +27936,9 @@ const lineNumberGutter = /* @__PURE__ */ activeGutters.compute([lineNumberConfig
27918
27936
  },
27919
27937
  widgetMarker: (view, widget, block) => {
27920
27938
  for (let m of view.state.facet(lineNumberWidgetMarker)) {
27921
- let result = m(view, widget, block);
27922
- if (result)
27923
- return result;
27939
+ let result2 = m(view, widget, block);
27940
+ if (result2)
27941
+ return result2;
27924
27942
  }
27925
27943
  return null;
27926
27944
  },
@@ -28003,8 +28021,8 @@ class NodeProp {
28003
28021
  if (typeof match != "function")
28004
28022
  match = NodeType.match(match);
28005
28023
  return (type2) => {
28006
- let result = match(type2);
28007
- return result === void 0 ? null : [this, result];
28024
+ let result2 = match(type2);
28025
+ return result2 === void 0 ? null : [this, result2];
28008
28026
  };
28009
28027
  }
28010
28028
  }
@@ -28322,11 +28340,11 @@ class Tree {
28322
28340
  constructor.
28323
28341
  */
28324
28342
  get propValues() {
28325
- let result = [];
28343
+ let result2 = [];
28326
28344
  if (this.props)
28327
28345
  for (let id2 in this.props)
28328
- result.push([+id2, this.props[id2]]);
28329
- return result;
28346
+ result2.push([+id2, this.props[id2]]);
28347
+ return result2;
28330
28348
  }
28331
28349
  /**
28332
28350
  Balance the direct children of this tree, producing a copy of
@@ -28391,30 +28409,30 @@ class TreeBuffer {
28391
28409
  @internal
28392
28410
  */
28393
28411
  toString() {
28394
- let result = [];
28412
+ let result2 = [];
28395
28413
  for (let index = 0; index < this.buffer.length; ) {
28396
- result.push(this.childString(index));
28414
+ result2.push(this.childString(index));
28397
28415
  index = this.buffer[index + 3];
28398
28416
  }
28399
- return result.join(",");
28417
+ return result2.join(",");
28400
28418
  }
28401
28419
  /**
28402
28420
  @internal
28403
28421
  */
28404
28422
  childString(index) {
28405
28423
  let id2 = this.buffer[index], endIndex = this.buffer[index + 3];
28406
- let type2 = this.set.types[id2], result = type2.name;
28407
- if (/\W/.test(result) && !type2.isError)
28408
- result = JSON.stringify(result);
28424
+ let type2 = this.set.types[id2], result2 = type2.name;
28425
+ if (/\W/.test(result2) && !type2.isError)
28426
+ result2 = JSON.stringify(result2);
28409
28427
  index += 4;
28410
28428
  if (endIndex == index)
28411
- return result;
28429
+ return result2;
28412
28430
  let children = [];
28413
28431
  while (index < endIndex) {
28414
28432
  children.push(this.childString(index));
28415
28433
  index = this.buffer[index + 3];
28416
28434
  }
28417
- return result + "(" + children.join(",") + ")";
28435
+ return result2 + "(" + children.join(",") + ")";
28418
28436
  }
28419
28437
  /**
28420
28438
  @internal
@@ -28664,22 +28682,22 @@ class TreeNode extends BaseNode {
28664
28682
  }
28665
28683
  }
28666
28684
  function getChildren(node, type2, before, after) {
28667
- let cur2 = node.cursor(), result = [];
28685
+ let cur2 = node.cursor(), result2 = [];
28668
28686
  if (!cur2.firstChild())
28669
- return result;
28687
+ return result2;
28670
28688
  if (before != null)
28671
28689
  for (let found = false; !found; ) {
28672
28690
  found = cur2.type.is(before);
28673
28691
  if (!cur2.nextSibling())
28674
- return result;
28692
+ return result2;
28675
28693
  }
28676
28694
  for (; ; ) {
28677
28695
  if (after != null && cur2.type.is(after))
28678
- return result;
28696
+ return result2;
28679
28697
  if (cur2.type.is(type2))
28680
- result.push(cur2.node);
28698
+ result2.push(cur2.node);
28681
28699
  if (!cur2.nextSibling())
28682
- return after == null ? result : [];
28700
+ return after == null ? result2 : [];
28683
28701
  }
28684
28702
  }
28685
28703
  function matchNodeContext(node, context, i = context.length - 1) {
@@ -29126,14 +29144,14 @@ class TreeCursor {
29126
29144
  get node() {
29127
29145
  if (!this.buffer)
29128
29146
  return this._tree;
29129
- let cache2 = this.bufferNode, result = null, depth = 0;
29147
+ let cache2 = this.bufferNode, result2 = null, depth = 0;
29130
29148
  if (cache2 && cache2.context == this.buffer) {
29131
29149
  scan: for (let index = this.index, d = this.stack.length; d >= 0; ) {
29132
29150
  for (let c = cache2; c; c = c._parent)
29133
29151
  if (c.index == index) {
29134
29152
  if (index == this.index)
29135
29153
  return c;
29136
- result = c;
29154
+ result2 = c;
29137
29155
  depth = d + 1;
29138
29156
  break scan;
29139
29157
  }
@@ -29141,8 +29159,8 @@ class TreeCursor {
29141
29159
  }
29142
29160
  }
29143
29161
  for (let i = depth; i < this.stack.length; i++)
29144
- result = new BufferNode(this.buffer, result, this.stack[i]);
29145
- return this.bufferNode = new BufferNode(this.buffer, result, this.index);
29162
+ result2 = new BufferNode(this.buffer, result2, this.stack[i]);
29163
+ return this.bufferNode = new BufferNode(this.buffer, result2, this.index);
29146
29164
  }
29147
29165
  /**
29148
29166
  Get the [tree](#common.Tree) that represents the current node, if
@@ -29342,13 +29360,13 @@ function buildTree(data) {
29342
29360
  function findBufferSize(maxSize, inRepeat) {
29343
29361
  let fork = cursor.fork();
29344
29362
  let size = 0, start = 0, skip = 0, minStart = fork.end - maxBufferLength;
29345
- let result = { size: 0, start: 0, skip: 0 };
29363
+ let result2 = { size: 0, start: 0, skip: 0 };
29346
29364
  scan: for (let minPos = fork.pos - maxSize; fork.pos > minPos; ) {
29347
29365
  let nodeSize2 = fork.size;
29348
29366
  if (fork.id == inRepeat && nodeSize2 >= 0) {
29349
- result.size = size;
29350
- result.start = start;
29351
- result.skip = skip;
29367
+ result2.size = size;
29368
+ result2.start = start;
29369
+ result2.skip = skip;
29352
29370
  skip += 4;
29353
29371
  size += 4;
29354
29372
  fork.next();
@@ -29376,11 +29394,11 @@ function buildTree(data) {
29376
29394
  skip += localSkipped;
29377
29395
  }
29378
29396
  if (inRepeat < 0 || size == maxSize) {
29379
- result.size = size;
29380
- result.start = start;
29381
- result.skip = skip;
29397
+ result2.size = size;
29398
+ result2.start = start;
29399
+ result2.skip = skip;
29382
29400
  }
29383
- return result.size > 4 ? result : void 0;
29401
+ return result2.size > 4 ? result2 : void 0;
29384
29402
  }
29385
29403
  function copyToBuffer(bufferStart, buffer2, index) {
29386
29404
  let { id: id2, start, end, size } = cursor;
@@ -29548,11 +29566,11 @@ class TreeFragment {
29548
29566
  true.
29549
29567
  */
29550
29568
  static addTree(tree, fragments = [], partial2 = false) {
29551
- let result = [new TreeFragment(0, tree.length, tree, 0, false, partial2)];
29569
+ let result2 = [new TreeFragment(0, tree.length, tree, 0, false, partial2)];
29552
29570
  for (let f of fragments)
29553
29571
  if (f.to > tree.length)
29554
- result.push(f);
29555
- return result;
29572
+ result2.push(f);
29573
+ return result2;
29556
29574
  }
29557
29575
  /**
29558
29576
  Apply a set of edits to an array of fragments, removing or
@@ -29562,7 +29580,7 @@ class TreeFragment {
29562
29580
  static applyChanges(fragments, changes, minGap = 128) {
29563
29581
  if (!changes.length)
29564
29582
  return fragments;
29565
- let result = [];
29583
+ let result2 = [];
29566
29584
  let fI = 1, nextF = fragments.length ? fragments[0] : null;
29567
29585
  for (let cI = 0, pos = 0, off = 0; ; cI++) {
29568
29586
  let nextC = cI < changes.length ? changes[cI] : null;
@@ -29575,7 +29593,7 @@ class TreeFragment {
29575
29593
  cut = fFrom >= fTo ? null : new TreeFragment(fFrom, fTo, cut.tree, cut.offset + off, cI > 0, !!nextC);
29576
29594
  }
29577
29595
  if (cut)
29578
- result.push(cut);
29596
+ result2.push(cut);
29579
29597
  if (nextF.to > nextPos)
29580
29598
  break;
29581
29599
  nextF = fI < fragments.length ? fragments[fI++] : null;
@@ -29585,7 +29603,7 @@ class TreeFragment {
29585
29603
  pos = nextC.toA;
29586
29604
  off = nextC.toA - nextC.toB;
29587
29605
  }
29588
- return result;
29606
+ return result2;
29589
29607
  }
29590
29608
  }
29591
29609
  class Parser {
@@ -29840,13 +29858,13 @@ function tagHighlighter(tags2, options) {
29840
29858
  };
29841
29859
  }
29842
29860
  function highlightTags(highlighters, tags2) {
29843
- let result = null;
29861
+ let result2 = null;
29844
29862
  for (let highlighter of highlighters) {
29845
29863
  let value = highlighter.style(tags2);
29846
29864
  if (value)
29847
- result = result ? result + " " + value : value;
29865
+ result2 = result2 ? result2 + " " + value : value;
29848
29866
  }
29849
- return result;
29867
+ return result2;
29850
29868
  }
29851
29869
  function highlightTree(tree, highlighter, putStyle, from = 0, to = tree.length) {
29852
29870
  let builder = new HighlightBuilder(from, Array.isArray(highlighter) ? highlighter : [highlighter], putStyle);
@@ -30404,10 +30422,10 @@ class Language {
30404
30422
  return [{ from: 0, to: state.doc.length }];
30405
30423
  if (!lang || !lang.allowsNesting)
30406
30424
  return [];
30407
- let result = [];
30425
+ let result2 = [];
30408
30426
  let explore = (tree, from) => {
30409
30427
  if (tree.prop(languageDataProp) == this.data) {
30410
- result.push({ from, to: from + tree.length });
30428
+ result2.push({ from, to: from + tree.length });
30411
30429
  return;
30412
30430
  }
30413
30431
  let mount = tree.prop(NodeProp.mounted);
@@ -30415,14 +30433,14 @@ class Language {
30415
30433
  if (mount.tree.prop(languageDataProp) == this.data) {
30416
30434
  if (mount.overlay)
30417
30435
  for (let r of mount.overlay)
30418
- result.push({ from: r.from + from, to: r.to + from });
30436
+ result2.push({ from: r.from + from, to: r.to + from });
30419
30437
  else
30420
- result.push({ from, to: from + tree.length });
30438
+ result2.push({ from, to: from + tree.length });
30421
30439
  return;
30422
30440
  } else if (mount.overlay) {
30423
- let size = result.length;
30441
+ let size = result2.length;
30424
30442
  explore(mount.tree, mount.overlay[0].from + from);
30425
- if (result.length > size)
30443
+ if (result2.length > size)
30426
30444
  return;
30427
30445
  }
30428
30446
  }
@@ -30433,7 +30451,7 @@ class Language {
30433
30451
  }
30434
30452
  };
30435
30453
  explore(syntaxTree(state), 0);
30436
- return result;
30454
+ return result2;
30437
30455
  }
30438
30456
  /**
30439
30457
  Indicates whether this language allows nested languages. The
@@ -30892,25 +30910,25 @@ function getIndentUnit(state) {
30892
30910
  return unit.charCodeAt(0) == 9 ? state.tabSize * unit.length : unit.length;
30893
30911
  }
30894
30912
  function indentString(state, cols) {
30895
- let result = "", ts = state.tabSize, ch = state.facet(indentUnit)[0];
30913
+ let result2 = "", ts = state.tabSize, ch = state.facet(indentUnit)[0];
30896
30914
  if (ch == " ") {
30897
30915
  while (cols >= ts) {
30898
- result += " ";
30916
+ result2 += " ";
30899
30917
  cols -= ts;
30900
30918
  }
30901
30919
  ch = " ";
30902
30920
  }
30903
30921
  for (let i = 0; i < cols; i++)
30904
- result += ch;
30905
- return result;
30922
+ result2 += ch;
30923
+ return result2;
30906
30924
  }
30907
30925
  function getIndentation(context, pos) {
30908
30926
  if (context instanceof EditorState)
30909
30927
  context = new IndentContext(context);
30910
30928
  for (let service of context.state.facet(indentService)) {
30911
- let result = service(context, pos);
30912
- if (result !== void 0)
30913
- return result;
30929
+ let result2 = service(context, pos);
30930
+ if (result2 !== void 0)
30931
+ return result2;
30914
30932
  }
30915
30933
  let tree = syntaxTree(context.state);
30916
30934
  return tree.length >= pos ? syntaxIndentation(context, tree, pos) : null;
@@ -30960,11 +30978,11 @@ class IndentContext {
30960
30978
  */
30961
30979
  column(pos, bias = 1) {
30962
30980
  let { text, from } = this.lineAt(pos, bias);
30963
- let result = this.countColumn(text, pos - from);
30981
+ let result2 = this.countColumn(text, pos - from);
30964
30982
  let override = this.options.overrideIndentation ? this.options.overrideIndentation(from) : -1;
30965
30983
  if (override > -1)
30966
- result += override - this.countColumn(text, text.search(/\S|$/));
30967
- return result;
30984
+ result2 += override - this.countColumn(text, text.search(/\S|$/));
30985
+ return result2;
30968
30986
  }
30969
30987
  /**
30970
30988
  Find the column position (taking tabs into account) of the given
@@ -31842,9 +31860,9 @@ class HistEvent {
31842
31860
  static fromTransaction(tr, selection) {
31843
31861
  let effects = none$1;
31844
31862
  for (let invert of tr.startState.facet(invertedEffects)) {
31845
- let result = invert(tr);
31846
- if (result.length)
31847
- effects = effects.concat(result);
31863
+ let result2 = invert(tr);
31864
+ if (result2.length)
31865
+ effects = effects.concat(result2);
31848
31866
  }
31849
31867
  if (!effects.length && tr.changes.empty)
31850
31868
  return null;
@@ -31905,9 +31923,9 @@ function addMappingToBranch(branch, mapping) {
31905
31923
  while (length) {
31906
31924
  let event = mapEvent(branch[length - 1], mapping, selections);
31907
31925
  if (event.changes && !event.changes.empty || event.effects.length) {
31908
- let result = branch.slice(0, length);
31909
- result[length - 1] = event;
31910
- return result;
31926
+ let result2 = branch.slice(0, length);
31927
+ result2[length - 1] = event;
31928
+ return result2;
31911
31929
  } else {
31912
31930
  mapping = event.mapped;
31913
31931
  length--;
@@ -32923,13 +32941,13 @@ function toCharEnd(text, pos) {
32923
32941
  const gotoLine = (view) => {
32924
32942
  let { state } = view;
32925
32943
  let line = String(state.doc.lineAt(view.state.selection.main.head).number);
32926
- let { close, result } = showDialog(view, {
32944
+ let { close, result: result2 } = showDialog(view, {
32927
32945
  label: state.phrase("Go to line"),
32928
32946
  input: { type: "text", name: "line", value: line },
32929
32947
  focus: true,
32930
32948
  submitLabel: state.phrase("go")
32931
32949
  });
32932
- result.then((form) => {
32950
+ result2.then((form) => {
32933
32951
  let match = form && /^([+-])?(\d+)?(:\d+)?(%)?$/.exec(form.elements["line"].value);
32934
32952
  if (!match) {
32935
32953
  view.dispatch({ effects: close });
@@ -33276,16 +33294,16 @@ class RegExpQuery extends QueryType {
33276
33294
  prevMatch(state, curFrom, curTo) {
33277
33295
  return this.prevMatchInRange(state, 0, curFrom) || this.prevMatchInRange(state, curTo, state.doc.length);
33278
33296
  }
33279
- getReplacement(result) {
33297
+ getReplacement(result2) {
33280
33298
  return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g, (m, i) => {
33281
33299
  if (i == "&")
33282
- return result.match[0];
33300
+ return result2.match[0];
33283
33301
  if (i == "$")
33284
33302
  return "$";
33285
33303
  for (let l = i.length; l > 0; l--) {
33286
33304
  let n = +i.slice(0, l);
33287
- if (n > 0 && n < result.match.length)
33288
- return result.match[n] + i.slice(l);
33305
+ if (n > 0 && n < result2.match.length)
33306
+ return result2.match[n] + i.slice(l);
33289
33307
  }
33290
33308
  return m;
33291
33309
  });
@@ -34006,8 +34024,8 @@ class Stack {
34006
34024
  }
34007
34025
  nextStates = best;
34008
34026
  }
34009
- let result = [];
34010
- for (let i = 0; i < nextStates.length && result.length < 4; i += 2) {
34027
+ let result2 = [];
34028
+ for (let i = 0; i < nextStates.length && result2.length < 4; i += 2) {
34011
34029
  let s = nextStates[i + 1];
34012
34030
  if (s == this.state)
34013
34031
  continue;
@@ -34017,9 +34035,9 @@ class Stack {
34017
34035
  stack.shiftContext(nextStates[i], this.pos);
34018
34036
  stack.reducePos = this.pos;
34019
34037
  stack.score -= 200;
34020
- result.push(stack);
34038
+ result2.push(stack);
34021
34039
  }
34022
- return result;
34040
+ return result2;
34023
34041
  }
34024
34042
  // Force a reduce, if possible. Return false if that can't
34025
34043
  // be done.
@@ -34380,17 +34398,17 @@ class InputStream {
34380
34398
  units, since the library does not track lookbehind.
34381
34399
  */
34382
34400
  peek(offset) {
34383
- let idx = this.chunkOff + offset, pos, result;
34401
+ let idx = this.chunkOff + offset, pos, result2;
34384
34402
  if (idx >= 0 && idx < this.chunk.length) {
34385
34403
  pos = this.pos + offset;
34386
- result = this.chunk.charCodeAt(idx);
34404
+ result2 = this.chunk.charCodeAt(idx);
34387
34405
  } else {
34388
34406
  let resolved = this.resolveOffset(offset, 1);
34389
34407
  if (resolved == null)
34390
34408
  return -1;
34391
34409
  pos = resolved;
34392
34410
  if (pos >= this.chunk2Pos && pos < this.chunk2Pos + this.chunk2.length) {
34393
- result = this.chunk2.charCodeAt(pos - this.chunk2Pos);
34411
+ result2 = this.chunk2.charCodeAt(pos - this.chunk2Pos);
34394
34412
  } else {
34395
34413
  let i = this.rangeIndex, range = this.range;
34396
34414
  while (range.to <= pos)
@@ -34398,12 +34416,12 @@ class InputStream {
34398
34416
  this.chunk2 = this.input.chunk(this.chunk2Pos = pos);
34399
34417
  if (pos + this.chunk2.length > range.to)
34400
34418
  this.chunk2 = this.chunk2.slice(0, range.to - pos);
34401
- result = this.chunk2.charCodeAt(0);
34419
+ result2 = this.chunk2.charCodeAt(0);
34402
34420
  }
34403
34421
  }
34404
34422
  if (pos >= this.token.lookAhead)
34405
34423
  this.token.lookAhead = pos + 1;
34406
- return result;
34424
+ return result2;
34407
34425
  }
34408
34426
  /**
34409
34427
  Accept a token. By default, the end of the token is set to the
@@ -34516,14 +34534,14 @@ class InputStream {
34516
34534
  return this.chunk2.slice(from - this.chunk2Pos, to - this.chunk2Pos);
34517
34535
  if (from >= this.range.from && to <= this.range.to)
34518
34536
  return this.input.read(from, to);
34519
- let result = "";
34537
+ let result2 = "";
34520
34538
  for (let r of this.ranges) {
34521
34539
  if (r.from >= to)
34522
34540
  break;
34523
34541
  if (r.to > from)
34524
- result += this.input.read(Math.max(r.from, from), Math.min(r.to, to));
34542
+ result2 += this.input.read(Math.max(r.from, from), Math.min(r.to, to));
34525
34543
  }
34526
- return result;
34544
+ return result2;
34527
34545
  }
34528
34546
  }
34529
34547
  class TokenGroup {
@@ -34806,12 +34824,12 @@ class TokenCache {
34806
34824
  let { parser: parser2 } = stack.p;
34807
34825
  for (let i = 0; i < parser2.specialized.length; i++)
34808
34826
  if (parser2.specialized[i] == token.value) {
34809
- let result = parser2.specializers[i](this.stream.read(token.start, token.end), stack);
34810
- if (result >= 0 && stack.p.parser.dialect.allows(result >> 1)) {
34811
- if ((result & 1) == 0)
34812
- token.value = result >> 1;
34827
+ let result2 = parser2.specializers[i](this.stream.read(token.start, token.end), stack);
34828
+ if (result2 >= 0 && stack.p.parser.dialect.allows(result2 >> 1)) {
34829
+ if ((result2 & 1) == 0)
34830
+ token.value = result2 >> 1;
34813
34831
  else
34814
- token.extended = result >> 1;
34832
+ token.extended = result2 >> 1;
34815
34833
  break;
34816
34834
  }
34817
34835
  }
@@ -35313,28 +35331,28 @@ class LRParser extends Parser {
35313
35331
  4
35314
35332
  /* ParseState.DefaultReduce */
35315
35333
  );
35316
- let result = deflt ? action(deflt) : void 0;
35334
+ let result2 = deflt ? action(deflt) : void 0;
35317
35335
  for (let i = this.stateSlot(
35318
35336
  state,
35319
35337
  1
35320
35338
  /* ParseState.Actions */
35321
- ); result == null; i += 3) {
35339
+ ); result2 == null; i += 3) {
35322
35340
  if (this.data[i] == 65535) {
35323
35341
  if (this.data[i + 1] == 1)
35324
35342
  i = pair(this.data, i + 2);
35325
35343
  else
35326
35344
  break;
35327
35345
  }
35328
- result = action(pair(this.data, i + 1));
35346
+ result2 = action(pair(this.data, i + 1));
35329
35347
  }
35330
- return result;
35348
+ return result2;
35331
35349
  }
35332
35350
  /**
35333
35351
  Get the states that can follow this one through shift actions or
35334
35352
  goto jumps. @internal
35335
35353
  */
35336
35354
  nextStates(state) {
35337
- let result = [];
35355
+ let result2 = [];
35338
35356
  for (let i = this.stateSlot(
35339
35357
  state,
35340
35358
  1
@@ -35348,11 +35366,11 @@ class LRParser extends Parser {
35348
35366
  }
35349
35367
  if ((this.data[i + 2] & 65536 >> 16) == 0) {
35350
35368
  let value = this.data[i + 1];
35351
- if (!result.some((v, i2) => i2 & 1 && v == value))
35352
- result.push(this.data[i], value);
35369
+ if (!result2.some((v, i2) => i2 & 1 && v == value))
35370
+ result2.push(this.data[i], value);
35353
35371
  }
35354
35372
  }
35355
- return result;
35373
+ return result2;
35356
35374
  }
35357
35375
  /**
35358
35376
  Configure the parser. Returns a new parser instance that has the
@@ -35927,17 +35945,17 @@ class FuzzyMatcher {
35927
35945
  return chars.length == 2 ? null : this.result((any[0] ? -700 : 0) + -200 + -1100, any, word);
35928
35946
  }
35929
35947
  result(score2, positions, word) {
35930
- let result = [], i = 0;
35948
+ let result2 = [], i = 0;
35931
35949
  for (let pos of positions) {
35932
35950
  let to = pos + (this.astral ? codePointSize(codePointAt(word, pos)) : 1);
35933
- if (i && result[i - 1] == pos)
35934
- result[i - 1] = to;
35951
+ if (i && result2[i - 1] == pos)
35952
+ result2[i - 1] = to;
35935
35953
  else {
35936
- result[i++] = pos;
35937
- result[i++] = to;
35954
+ result2[i++] = pos;
35955
+ result2[i++] = to;
35938
35956
  }
35939
35957
  }
35940
- return this.ret(score2 - word.length, result);
35958
+ return this.ret(score2 - word.length, result2);
35941
35959
  }
35942
35960
  }
35943
35961
  class StrictMatcher {
@@ -36395,17 +36413,17 @@ function sortOptions(active, state) {
36395
36413
  option.score += sectionOrder[typeof section == "string" ? section : section.name];
36396
36414
  }
36397
36415
  }
36398
- let result = [], prev = null;
36416
+ let result2 = [], prev = null;
36399
36417
  let compare2 = conf.compareCompletions;
36400
36418
  for (let opt of options.sort((a, b) => b.score - a.score || compare2(a.completion, b.completion))) {
36401
36419
  let cur2 = opt.completion;
36402
36420
  if (!prev || prev.label != cur2.label || prev.detail != cur2.detail || prev.type != null && cur2.type != null && prev.type != cur2.type || prev.apply != cur2.apply || prev.boost != cur2.boost)
36403
- result.push(opt);
36421
+ result2.push(opt);
36404
36422
  else if (score(opt.completion) > score(prev))
36405
- result[result.length - 1] = opt;
36423
+ result2[result2.length - 1] = opt;
36406
36424
  prev = opt.completion;
36407
36425
  }
36408
- return result;
36426
+ return result2;
36409
36427
  }
36410
36428
  class CompletionDialog {
36411
36429
  constructor(options, attrs, tooltip, timestamp, selected, disabled) {
@@ -36517,14 +36535,14 @@ const baseAttrs = {
36517
36535
  };
36518
36536
  const noAttrs = {};
36519
36537
  function makeAttrs(id2, selected) {
36520
- let result = {
36538
+ let result2 = {
36521
36539
  "aria-autocomplete": "list",
36522
36540
  "aria-haspopup": "listbox",
36523
36541
  "aria-controls": id2
36524
36542
  };
36525
36543
  if (selected > -1)
36526
- result["aria-activedescendant"] = id2 + "-" + selected;
36527
- return result;
36544
+ result2["aria-activedescendant"] = id2 + "-" + selected;
36545
+ return result2;
36528
36546
  }
36529
36547
  const none = [];
36530
36548
  function getUpdateType(tr, conf) {
@@ -36591,10 +36609,10 @@ class ActiveSource {
36591
36609
  }
36592
36610
  }
36593
36611
  class ActiveResult extends ActiveSource {
36594
- constructor(source, explicit, limit2, result, from, to) {
36612
+ constructor(source, explicit, limit2, result2, from, to) {
36595
36613
  super(source, 3, explicit);
36596
36614
  this.limit = limit2;
36597
- this.result = result;
36615
+ this.result = result2;
36598
36616
  this.from = from;
36599
36617
  this.to = to;
36600
36618
  }
@@ -36605,29 +36623,29 @@ class ActiveResult extends ActiveSource {
36605
36623
  var _a2;
36606
36624
  if (!(type2 & 3))
36607
36625
  return this.map(tr.changes);
36608
- let result = this.result;
36609
- if (result.map && !tr.changes.empty)
36610
- result = result.map(result, tr.changes);
36626
+ let result2 = this.result;
36627
+ if (result2.map && !tr.changes.empty)
36628
+ result2 = result2.map(result2, tr.changes);
36611
36629
  let from = tr.changes.mapPos(this.from), to = tr.changes.mapPos(this.to, 1);
36612
36630
  let pos = cur(tr.state);
36613
- if (pos > to || !result || type2 & 2 && (cur(tr.startState) == this.from || pos < this.limit))
36631
+ if (pos > to || !result2 || type2 & 2 && (cur(tr.startState) == this.from || pos < this.limit))
36614
36632
  return new ActiveSource(
36615
36633
  this.source,
36616
36634
  type2 & 4 ? 1 : 0
36617
36635
  /* State.Inactive */
36618
36636
  );
36619
36637
  let limit2 = tr.changes.mapPos(this.limit);
36620
- if (checkValid(result.validFor, tr.state, from, to))
36621
- return new ActiveResult(this.source, this.explicit, limit2, result, from, to);
36622
- if (result.update && (result = result.update(result, from, to, new CompletionContext(tr.state, pos, false))))
36623
- return new ActiveResult(this.source, this.explicit, limit2, result, result.from, (_a2 = result.to) !== null && _a2 !== void 0 ? _a2 : cur(tr.state));
36638
+ if (checkValid(result2.validFor, tr.state, from, to))
36639
+ return new ActiveResult(this.source, this.explicit, limit2, result2, from, to);
36640
+ if (result2.update && (result2 = result2.update(result2, from, to, new CompletionContext(tr.state, pos, false))))
36641
+ return new ActiveResult(this.source, this.explicit, limit2, result2, result2.from, (_a2 = result2.to) !== null && _a2 !== void 0 ? _a2 : cur(tr.state));
36624
36642
  return new ActiveSource(this.source, 1, this.explicit);
36625
36643
  }
36626
36644
  map(mapping) {
36627
36645
  if (mapping.empty)
36628
36646
  return this;
36629
- let result = this.result.map ? this.result.map(this.result, mapping) : this.result;
36630
- if (!result)
36647
+ let result2 = this.result.map ? this.result.map(this.result, mapping) : this.result;
36648
+ if (!result2)
36631
36649
  return new ActiveSource(
36632
36650
  this.source,
36633
36651
  0
@@ -36664,16 +36682,16 @@ const completionState = /* @__PURE__ */ StateField.define({
36664
36682
  });
36665
36683
  function applyCompletion(view, option) {
36666
36684
  const apply = option.completion.apply || option.completion.label;
36667
- let result = view.state.field(completionState).active.find((a) => a.source == option.source);
36668
- if (!(result instanceof ActiveResult))
36685
+ let result2 = view.state.field(completionState).active.find((a) => a.source == option.source);
36686
+ if (!(result2 instanceof ActiveResult))
36669
36687
  return false;
36670
36688
  if (typeof apply == "string")
36671
36689
  view.dispatch({
36672
- ...insertCompletionText(view.state, apply, result.from, result.to),
36690
+ ...insertCompletionText(view.state, apply, result2.from, result2.to),
36673
36691
  annotations: pickedCompletion.of(option.completion)
36674
36692
  });
36675
36693
  else
36676
- apply(view, option.completion, result.from, result.to);
36694
+ apply(view, option.completion, result2.from, result2.to);
36677
36695
  return true;
36678
36696
  }
36679
36697
  const createTooltip = /* @__PURE__ */ completionTooltip(completionState, applyCompletion);
@@ -36795,9 +36813,9 @@ const completionPlugin = /* @__PURE__ */ ViewPlugin.fromClass(class {
36795
36813
  let context = new CompletionContext(state, pos, active.explicit, this.view);
36796
36814
  let pending = new RunningQuery(active, context);
36797
36815
  this.running.push(pending);
36798
- Promise.resolve(active.source(context)).then((result) => {
36816
+ Promise.resolve(active.source(context)).then((result2) => {
36799
36817
  if (!pending.context.aborted) {
36800
- pending.done = result || null;
36818
+ pending.done = result2 || null;
36801
36819
  this.scheduleAccept();
36802
36820
  }
36803
36821
  }, (err) => {
@@ -36884,8 +36902,8 @@ const commitCharacters = /* @__PURE__ */ Prec.highest(/* @__PURE__ */ EditorView
36884
36902
  if (!field || !field.open || field.open.disabled || field.open.selected < 0 || event.key.length > 1 || event.ctrlKey && !(windows && event.altKey) || event.metaKey)
36885
36903
  return false;
36886
36904
  let option = field.open.options[field.open.selected];
36887
- let result = field.active.find((a) => a.source == option.source);
36888
- let commitChars = option.completion.commitCharacters || result.result.commitCharacters;
36905
+ let result2 = field.active.find((a) => a.source == option.source);
36906
+ let commitChars = option.completion.commitCharacters || result2.result.commitCharacters;
36889
36907
  if (commitChars && commitChars.indexOf(event.key) > -1)
36890
36908
  applyCompletion(view, option);
36891
36909
  return false;
@@ -37680,9 +37698,9 @@ function findDiagnostic(diagnostics, diagnostic = null, after = 0) {
37680
37698
  }
37681
37699
  function hideTooltip(tr, tooltip) {
37682
37700
  let from = tooltip.pos, to = tooltip.end || from;
37683
- let result = tr.state.facet(lintConfig).hideOn(tr, from, to);
37684
- if (result != null)
37685
- return result;
37701
+ let result2 = tr.state.facet(lintConfig).hideOn(tr, from, to);
37702
+ if (result2 != null)
37703
+ return result2;
37686
37704
  let line = tr.startState.doc.lineAt(tooltip.pos);
37687
37705
  return !!(tr.effects.some((e) => e.is(setDiagnosticsEffect)) || tr.changes.touchesRange(line.from, Math.max(line.to, to)));
37688
37706
  }
@@ -40049,7 +40067,7 @@ class NineDiff extends HTMLElement {
40049
40067
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
40050
40068
  this.shadowRoot.innerHTML = `
40051
40069
  <style>
40052
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.177"}/dist/css/nine-mu.css";
40070
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.179"}/dist/css/nine-mu.css";
40053
40071
  ${customImport}
40054
40072
  </style>
40055
40073
 
@@ -40159,7 +40177,7 @@ render_fn2 = function() {
40159
40177
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
40160
40178
  this.shadowRoot.innerHTML = `
40161
40179
  <style>
40162
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.177"}/dist/css/nine-mu.css";
40180
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.179"}/dist/css/nine-mu.css";
40163
40181
  ${customImport}
40164
40182
  </style>
40165
40183
 
@@ -40486,7 +40504,7 @@ class ChatMessageBody extends HTMLElement {
40486
40504
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
40487
40505
  this.shadowRoot.innerHTML = `
40488
40506
  <style>
40489
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.177"}/dist/css/nine-mu.css";
40507
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.179"}/dist/css/nine-mu.css";
40490
40508
  ${customImport}
40491
40509
  </style>
40492
40510
 
@@ -40580,7 +40598,7 @@ if (!customElements.get("nine-chat-progress")) {
40580
40598
  customElements.define("nine-chat-progress", ProgressMessage);
40581
40599
  }
40582
40600
  const NineMu = {
40583
- version: "0.1.177",
40601
+ version: "0.1.179",
40584
40602
  init: (config2) => {
40585
40603
  trace$1.log("🛠️ Nine-Mu Engine initialized", config2);
40586
40604
  }