@workflow/web 4.1.9 → 4.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (21) hide show
  1. package/build/client/assets/{encryption-5eom23r0.js → encryption-Bd25Keng.js} +21 -2
  2. package/build/client/assets/{entry.client-BWsSsWQm.js → entry.client-DtOpLtMQ.js} +1 -1
  3. package/build/client/assets/{highlighted-body-B3W2YXNL-9Gx_xbQ8.js → highlighted-body-B3W2YXNL-qwkBshMM.js} +2 -2
  4. package/build/client/assets/{home-D6JmZfUp.js → home-BwM2ND3E.js} +4 -3
  5. package/build/client/assets/index-7hulCzI_.js +275 -0
  6. package/build/client/assets/{index-DQa-BExo.js → index-BsV8i_Jn.js} +20 -20
  7. package/build/client/assets/manifest-7155e3b4.js +1 -0
  8. package/build/client/assets/{mermaid-3ZIDBTTL-CjHrXABH.js → mermaid-3ZIDBTTL-ZIVWJOga.js} +266 -250
  9. package/build/client/assets/{root--_OYilvb.js → root-B9F5GRJi.js} +2 -2
  10. package/build/client/assets/{run-detail-BeA7fQfA.js → run-detail-2uFavmKZ.js} +18 -16
  11. package/build/client/assets/{workflow-graph-viewer-BNsGQIfR.js → workflow-graph-viewer-Dv4c6IRL.js} +3 -3
  12. package/build/server/assets/{app-BEUod6Qu.js → app-B2JDIan2.js} +2 -2
  13. package/build/server/assets/{highlighted-body-B3W2YXNL-CDACB73g.js → highlighted-body-B3W2YXNL-B94lzYCW.js} +2 -2
  14. package/build/server/assets/{index-sVIARIAL.js → index-U5RLwYV5.js} +3 -3
  15. package/build/server/assets/{mermaid-3ZIDBTTL-jCjKhJD2.js → mermaid-3ZIDBTTL-CbeG5Tzv.js} +2 -2
  16. package/build/server/assets/{server-build-JwomDvSn.js → server-build-DUwThcMX.js} +2882 -1434
  17. package/build/server/assets/{token-9ZMCuQFa.js → token-CYpoZN9a.js} +2 -2
  18. package/build/server/assets/{token-util--ZOQJ_0a.js → token-util-BvFOCYE8.js} +2 -2
  19. package/build/server/index.js +1 -1
  20. package/package.json +8 -8
  21. package/build/client/assets/manifest-3243993f.js +0 -1
@@ -1,9 +1,9 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/highlighted-body-B3W2YXNL-9Gx_xbQ8.js","assets/index-DQa-BExo.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/encryption-Bd25Keng.js","assets/index-7hulCzI_.js","assets/index-BsV8i_Jn.js","assets/highlighted-body-B3W2YXNL-qwkBshMM.js"])))=>i.map(i=>d[i]);
2
2
  var __defProp = Object.defineProperty;
3
3
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
4
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
- var _a2;
6
- import { r as reactExports, j as jsxRuntimeExports, f as reactDomExports, H as React, R as ReactExports, C as ReactDOM, I as getDefaultExportFromCjs } from "./index-DQa-BExo.js";
5
+ var _a2, _b;
6
+ import { r as reactExports, j as jsxRuntimeExports, f as reactDomExports, I as React, R as ReactExports, D as ReactDOM, g as getDefaultExportFromCjs } from "./index-BsV8i_Jn.js";
7
7
  function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
8
8
  return function handleEvent(event) {
9
9
  originalEventHandler == null ? void 0 : originalEventHandler(event);
@@ -200,13 +200,13 @@ function mergeProps$1(slotProps, childProps) {
200
200
  return { ...slotProps, ...overrideProps };
201
201
  }
202
202
  function getElementRef$2(element2) {
203
- var _a3, _b;
203
+ var _a3, _b2;
204
204
  let getter = (_a3 = Object.getOwnPropertyDescriptor(element2.props, "ref")) == null ? void 0 : _a3.get;
205
205
  let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
206
206
  if (mayWarn) {
207
207
  return element2.ref;
208
208
  }
209
- getter = (_b = Object.getOwnPropertyDescriptor(element2, "ref")) == null ? void 0 : _b.get;
209
+ getter = (_b2 = Object.getOwnPropertyDescriptor(element2, "ref")) == null ? void 0 : _b2.get;
210
210
  mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
211
211
  if (mayWarn) {
212
212
  return element2.props.ref;
@@ -2443,7 +2443,7 @@ var CONTENT_NAME$1 = "PopperContent";
2443
2443
  var [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME$1);
2444
2444
  var PopperContent = reactExports.forwardRef(
2445
2445
  (props, forwardedRef) => {
2446
- var _a3, _b, _c, _d, _e2, _f;
2446
+ var _a3, _b2, _c, _d, _e2, _f;
2447
2447
  const {
2448
2448
  __scopePopper,
2449
2449
  side = "bottom",
@@ -2523,7 +2523,7 @@ var PopperContent = reactExports.forwardRef(
2523
2523
  }
2524
2524
  }, [isPositioned, handlePlaced]);
2525
2525
  const arrowX = (_a3 = middlewareData.arrow) == null ? void 0 : _a3.x;
2526
- const arrowY = (_b = middlewareData.arrow) == null ? void 0 : _b.y;
2526
+ const arrowY = (_b2 = middlewareData.arrow) == null ? void 0 : _b2.y;
2527
2527
  const cannotCenterArrow = ((_c = middlewareData.arrow) == null ? void 0 : _c.centerOffset) !== 0;
2528
2528
  const [contentZIndex, setContentZIndex] = reactExports.useState();
2529
2529
  useLayoutEffect2(() => {
@@ -2646,7 +2646,7 @@ var transformOrigin = (options) => ({
2646
2646
  name: "transformOrigin",
2647
2647
  options,
2648
2648
  fn(data) {
2649
- var _a3, _b, _c;
2649
+ var _a3, _b2, _c;
2650
2650
  const { placement, rects, middlewareData } = data;
2651
2651
  const cannotCenterArrow = ((_a3 = middlewareData.arrow) == null ? void 0 : _a3.centerOffset) !== 0;
2652
2652
  const isArrowHidden = cannotCenterArrow;
@@ -2654,7 +2654,7 @@ var transformOrigin = (options) => ({
2654
2654
  const arrowHeight = isArrowHidden ? 0 : options.arrowHeight;
2655
2655
  const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);
2656
2656
  const noArrowAlign = { start: "0%", center: "50%", end: "100%" }[placedAlign];
2657
- const arrowXCenter = (((_b = middlewareData.arrow) == null ? void 0 : _b.x) ?? 0) + arrowWidth / 2;
2657
+ const arrowXCenter = (((_b2 = middlewareData.arrow) == null ? void 0 : _b2.x) ?? 0) + arrowWidth / 2;
2658
2658
  const arrowYCenter = (((_c = middlewareData.arrow) == null ? void 0 : _c.y) ?? 0) + arrowHeight / 2;
2659
2659
  let x2 = "";
2660
2660
  let y2 = "";
@@ -2792,13 +2792,13 @@ function getAnimationName(styles2) {
2792
2792
  return (styles2 == null ? void 0 : styles2.animationName) || "none";
2793
2793
  }
2794
2794
  function getElementRef$1(element2) {
2795
- var _a3, _b;
2795
+ var _a3, _b2;
2796
2796
  let getter = (_a3 = Object.getOwnPropertyDescriptor(element2.props, "ref")) == null ? void 0 : _a3.get;
2797
2797
  let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
2798
2798
  if (mayWarn) {
2799
2799
  return element2.ref;
2800
2800
  }
2801
- getter = (_b = Object.getOwnPropertyDescriptor(element2, "ref")) == null ? void 0 : _b.get;
2801
+ getter = (_b2 = Object.getOwnPropertyDescriptor(element2, "ref")) == null ? void 0 : _b2.get;
2802
2802
  mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
2803
2803
  if (mayWarn) {
2804
2804
  return element2.props.ref;
@@ -10060,44 +10060,6 @@ const __vitePreload = function preload(baseModule, deps, importerUrl) {
10060
10060
  return baseModule().catch(handlePreloadError);
10061
10061
  });
10062
10062
  };
10063
- function decode64(string2) {
10064
- const binaryString = asciiToBinary(string2);
10065
- const arraybuffer = new ArrayBuffer(binaryString.length);
10066
- const dv = new DataView(arraybuffer);
10067
- for (let i = 0; i < arraybuffer.byteLength; i++) {
10068
- dv.setUint8(i, binaryString.charCodeAt(i));
10069
- }
10070
- return arraybuffer;
10071
- }
10072
- const KEY_STRING = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
10073
- function asciiToBinary(data) {
10074
- if (data.length % 4 === 0) {
10075
- data = data.replace(/==?$/, "");
10076
- }
10077
- let output = "";
10078
- let buffer = 0;
10079
- let accumulatedBits = 0;
10080
- for (let i = 0; i < data.length; i++) {
10081
- buffer <<= 6;
10082
- buffer |= KEY_STRING.indexOf(data[i]);
10083
- accumulatedBits += 6;
10084
- if (accumulatedBits === 24) {
10085
- output += String.fromCharCode((buffer & 16711680) >> 16);
10086
- output += String.fromCharCode((buffer & 65280) >> 8);
10087
- output += String.fromCharCode(buffer & 255);
10088
- buffer = accumulatedBits = 0;
10089
- }
10090
- }
10091
- if (accumulatedBits === 12) {
10092
- buffer >>= 4;
10093
- output += String.fromCharCode(buffer);
10094
- } else if (accumulatedBits === 18) {
10095
- buffer >>= 2;
10096
- output += String.fromCharCode((buffer & 65280) >> 8);
10097
- output += String.fromCharCode(buffer & 255);
10098
- }
10099
- return output;
10100
- }
10101
10063
  const UNDEFINED = -1;
10102
10064
  const HOLE = -2;
10103
10065
  const NAN = -3;
@@ -10105,6 +10067,38 @@ const POSITIVE_INFINITY = -4;
10105
10067
  const NEGATIVE_INFINITY = -5;
10106
10068
  const NEGATIVE_ZERO = -6;
10107
10069
  const SPARSE = -7;
10070
+ const MAX_ARRAY_LEN = 2 ** 32 - 1;
10071
+ const MAX_ARRAY_INDEX = MAX_ARRAY_LEN - 1;
10072
+ function is_valid_array_index(n) {
10073
+ if (!Number.isInteger(n)) return false;
10074
+ if (n < 0) return false;
10075
+ if (n > MAX_ARRAY_INDEX) return false;
10076
+ return true;
10077
+ }
10078
+ function is_valid_array_len(n) {
10079
+ if (!Number.isInteger(n)) return false;
10080
+ if (n < 0) return false;
10081
+ if (n > MAX_ARRAY_LEN) return false;
10082
+ return true;
10083
+ }
10084
+ function decode_native(base642) {
10085
+ return Uint8Array.fromBase64(base642).buffer;
10086
+ }
10087
+ function decode_buffer(base642) {
10088
+ return Uint8Array.from(Buffer.from(base642, "base64")).buffer;
10089
+ }
10090
+ function decode_legacy(base642) {
10091
+ const binary_string = atob(base642);
10092
+ const len = binary_string.length;
10093
+ const array2 = new Uint8Array(len);
10094
+ for (let i = 0; i < len; i++) {
10095
+ array2[i] = binary_string.charCodeAt(i);
10096
+ }
10097
+ return array2.buffer;
10098
+ }
10099
+ const native = typeof Uint8Array.fromBase64 === "function";
10100
+ const buffer = typeof process === "object" && ((_a2 = process.versions) == null ? void 0 : _a2.node) !== void 0;
10101
+ const decode64 = native ? decode_native : buffer ? decode_buffer : decode_legacy;
10108
10102
  function parse$4(serialized, revivers) {
10109
10103
  return unflatten(JSON.parse(serialized), revivers);
10110
10104
  }
@@ -10171,9 +10165,14 @@ function unflatten(parsed, revivers) {
10171
10165
  case "RegExp":
10172
10166
  hydrated[index2] = new RegExp(value[1], value[2]);
10173
10167
  break;
10174
- case "Object":
10175
- hydrated[index2] = Object(value[1]);
10168
+ case "Object": {
10169
+ const wrapped_index = value[1];
10170
+ if (typeof values[wrapped_index] === "object" && values[wrapped_index][0] !== "BigInt") {
10171
+ throw new Error("Invalid input");
10172
+ }
10173
+ hydrated[index2] = Object(hydrate(wrapped_index));
10176
10174
  break;
10175
+ }
10177
10176
  case "BigInt":
10178
10177
  hydrated[index2] = BigInt(value[1]);
10179
10178
  break;
@@ -10181,6 +10180,9 @@ function unflatten(parsed, revivers) {
10181
10180
  const obj = /* @__PURE__ */ Object.create(null);
10182
10181
  hydrated[index2] = obj;
10183
10182
  for (let i = 1; i < value.length; i += 2) {
10183
+ if (value[i] === "__proto__") {
10184
+ throw new Error("Cannot parse an object with a `__proto__` property");
10185
+ }
10184
10186
  obj[value[i]] = hydrate(value[i + 1]);
10185
10187
  }
10186
10188
  break;
@@ -10189,19 +10191,20 @@ function unflatten(parsed, revivers) {
10189
10191
  case "Uint8ClampedArray":
10190
10192
  case "Int16Array":
10191
10193
  case "Uint16Array":
10194
+ case "Float16Array":
10192
10195
  case "Int32Array":
10193
10196
  case "Uint32Array":
10194
10197
  case "Float32Array":
10195
10198
  case "Float64Array":
10196
10199
  case "BigInt64Array":
10197
- case "BigUint64Array": {
10200
+ case "BigUint64Array":
10201
+ case "DataView": {
10198
10202
  if (values[value[1]][0] !== "ArrayBuffer") {
10199
10203
  throw new Error("Invalid data");
10200
10204
  }
10201
10205
  const TypedArrayConstructor = globalThis[type];
10202
- const buffer = hydrate(value[1]);
10203
- const typedArray = new TypedArrayConstructor(buffer);
10204
- hydrated[index2] = value[2] !== void 0 ? typedArray.subarray(value[2], value[3]) : typedArray;
10206
+ const buffer2 = hydrate(value[1]);
10207
+ hydrated[index2] = value[2] !== void 0 ? new TypedArrayConstructor(buffer2, value[2], value[3]) : new TypedArrayConstructor(buffer2);
10205
10208
  break;
10206
10209
  }
10207
10210
  case "ArrayBuffer": {
@@ -10240,12 +10243,21 @@ function unflatten(parsed, revivers) {
10240
10243
  }
10241
10244
  } else if (value[0] === SPARSE) {
10242
10245
  const len = value[1];
10243
- const array2 = new Array(len);
10246
+ if (!is_valid_array_len(len)) {
10247
+ throw new Error("Invalid input");
10248
+ }
10249
+ const array2 = [];
10244
10250
  hydrated[index2] = array2;
10251
+ array2[MAX_ARRAY_INDEX] = void 0;
10252
+ delete array2[MAX_ARRAY_INDEX];
10245
10253
  for (let i = 2; i < value.length; i += 2) {
10246
10254
  const idx = value[i];
10255
+ if (!is_valid_array_index(idx) || idx >= len) {
10256
+ throw new Error("Invalid input");
10257
+ }
10247
10258
  array2[idx] = hydrate(value[i + 1]);
10248
10259
  }
10260
+ array2.length = len;
10249
10261
  } else {
10250
10262
  const array2 = new Array(value.length);
10251
10263
  hydrated[index2] = array2;
@@ -10340,9 +10352,9 @@ function hydrateData(value, revivers) {
10340
10352
  async function hydrateDataWithKey(value, revivers, key) {
10341
10353
  if (value instanceof Uint8Array && isEncryptedData(value) && key) {
10342
10354
  const { decrypt } = await __vitePreload(async () => {
10343
- const { decrypt: decrypt2 } = await import("./encryption-5eom23r0.js");
10355
+ const { decrypt: decrypt2 } = await import("./encryption-Bd25Keng.js");
10344
10356
  return { decrypt: decrypt2 };
10345
- }, true ? [] : void 0);
10357
+ }, true ? __vite__mapDeps([0,1,2]) : void 0);
10346
10358
  const { payload } = decodeFormatPrefix(value);
10347
10359
  const decrypted = await decrypt(key, payload);
10348
10360
  return hydrateData(decrypted, revivers);
@@ -10580,10 +10592,10 @@ function $constructor(name2, initializer2, params) {
10580
10592
  Object.defineProperty(_2, "init", { value: init });
10581
10593
  Object.defineProperty(_2, Symbol.hasInstance, {
10582
10594
  value: (inst) => {
10583
- var _a3, _b;
10595
+ var _a3, _b2;
10584
10596
  if ((params == null ? void 0 : params.Parent) && inst instanceof params.Parent)
10585
10597
  return true;
10586
- return (_b = (_a3 = inst == null ? void 0 : inst._zod) == null ? void 0 : _a3.traits) == null ? void 0 : _b.has(name2);
10598
+ return (_b2 = (_a3 = inst == null ? void 0 : inst._zod) == null ? void 0 : _a3.traits) == null ? void 0 : _b2.has(name2);
10587
10599
  }
10588
10600
  });
10589
10601
  Object.defineProperty(_2, "name", { value: name2 });
@@ -10966,10 +10978,10 @@ function unwrapMessage(message) {
10966
10978
  return typeof message === "string" ? message : message == null ? void 0 : message.message;
10967
10979
  }
10968
10980
  function finalizeIssue(iss, ctx, config2) {
10969
- var _a3, _b, _c, _d, _e2, _f;
10981
+ var _a3, _b2, _c, _d, _e2, _f;
10970
10982
  const full = { ...iss, path: iss.path ?? [] };
10971
10983
  if (!iss.message) {
10972
- const message = unwrapMessage((_c = (_b = (_a3 = iss.inst) == null ? void 0 : _a3._zod.def) == null ? void 0 : _b.error) == null ? void 0 : _c.call(_b, iss)) ?? unwrapMessage((_d = ctx == null ? void 0 : ctx.error) == null ? void 0 : _d.call(ctx, iss)) ?? unwrapMessage((_e2 = config2.customError) == null ? void 0 : _e2.call(config2, iss)) ?? unwrapMessage((_f = config2.localeError) == null ? void 0 : _f.call(config2, iss)) ?? "Invalid input";
10984
+ const message = unwrapMessage((_c = (_b2 = (_a3 = iss.inst) == null ? void 0 : _a3._zod.def) == null ? void 0 : _b2.error) == null ? void 0 : _c.call(_b2, iss)) ?? unwrapMessage((_d = ctx == null ? void 0 : ctx.error) == null ? void 0 : _d.call(ctx, iss)) ?? unwrapMessage((_e2 = config2.customError) == null ? void 0 : _e2.call(config2, iss)) ?? unwrapMessage((_f = config2.localeError) == null ? void 0 : _f.call(config2, iss)) ?? "Invalid input";
10973
10985
  full.message = message;
10974
10986
  }
10975
10987
  delete full.inst;
@@ -11453,7 +11465,7 @@ const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEqual
11453
11465
  };
11454
11466
  });
11455
11467
  const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
11456
- var _a3, _b;
11468
+ var _a3, _b2;
11457
11469
  $ZodCheck.init(inst, def);
11458
11470
  inst._zod.onattach.push((inst2) => {
11459
11471
  const bag = inst2._zod.bag;
@@ -11479,7 +11491,7 @@ const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringForma
11479
11491
  });
11480
11492
  });
11481
11493
  else
11482
- (_b = inst._zod).check ?? (_b.check = () => {
11494
+ (_b2 = inst._zod).check ?? (_b2.check = () => {
11483
11495
  });
11484
11496
  });
11485
11497
  const $ZodCheckRegex = /* @__PURE__ */ $constructor("$ZodCheckRegex", (inst, def) => {
@@ -12212,10 +12224,10 @@ function handlePropertyResult(result, final, key, input, isOptionalOut) {
12212
12224
  }
12213
12225
  }
12214
12226
  function normalizeDef(def) {
12215
- var _a3, _b, _c, _d;
12227
+ var _a3, _b2, _c, _d;
12216
12228
  const keys2 = Object.keys(def.shape);
12217
12229
  for (const k2 of keys2) {
12218
- if (!((_d = (_c = (_b = (_a3 = def.shape) == null ? void 0 : _a3[k2]) == null ? void 0 : _b._zod) == null ? void 0 : _c.traits) == null ? void 0 : _d.has("$ZodType"))) {
12230
+ if (!((_d = (_c = (_b2 = (_a3 = def.shape) == null ? void 0 : _a3[k2]) == null ? void 0 : _b2._zod) == null ? void 0 : _c.traits) == null ? void 0 : _d.has("$ZodType"))) {
12219
12231
  throw new Error(`Invalid element at key "${k2}": expected a Zod schema`);
12220
12232
  }
12221
12233
  }
@@ -13019,12 +13031,12 @@ const $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) =>
13019
13031
  defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
13020
13032
  defineLazy(inst._zod, "values", () => def.innerType._zod.values);
13021
13033
  defineLazy(inst._zod, "optin", () => {
13022
- var _a3, _b;
13023
- return (_b = (_a3 = def.innerType) == null ? void 0 : _a3._zod) == null ? void 0 : _b.optin;
13034
+ var _a3, _b2;
13035
+ return (_b2 = (_a3 = def.innerType) == null ? void 0 : _a3._zod) == null ? void 0 : _b2.optin;
13024
13036
  });
13025
13037
  defineLazy(inst._zod, "optout", () => {
13026
- var _a3, _b;
13027
- return (_b = (_a3 = def.innerType) == null ? void 0 : _a3._zod) == null ? void 0 : _b.optout;
13038
+ var _a3, _b2;
13039
+ return (_b2 = (_a3 = def.innerType) == null ? void 0 : _a3._zod) == null ? void 0 : _b2.optout;
13028
13040
  });
13029
13041
  inst._zod.parse = (payload, ctx) => {
13030
13042
  if (ctx.direction === "backward") {
@@ -13090,20 +13102,20 @@ const $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
13090
13102
  $ZodType.init(inst, def);
13091
13103
  defineLazy(inst._zod, "innerType", () => def.getter());
13092
13104
  defineLazy(inst._zod, "pattern", () => {
13093
- var _a3, _b;
13094
- return (_b = (_a3 = inst._zod.innerType) == null ? void 0 : _a3._zod) == null ? void 0 : _b.pattern;
13105
+ var _a3, _b2;
13106
+ return (_b2 = (_a3 = inst._zod.innerType) == null ? void 0 : _a3._zod) == null ? void 0 : _b2.pattern;
13095
13107
  });
13096
13108
  defineLazy(inst._zod, "propValues", () => {
13097
- var _a3, _b;
13098
- return (_b = (_a3 = inst._zod.innerType) == null ? void 0 : _a3._zod) == null ? void 0 : _b.propValues;
13109
+ var _a3, _b2;
13110
+ return (_b2 = (_a3 = inst._zod.innerType) == null ? void 0 : _a3._zod) == null ? void 0 : _b2.propValues;
13099
13111
  });
13100
13112
  defineLazy(inst._zod, "optin", () => {
13101
- var _a3, _b;
13102
- return ((_b = (_a3 = inst._zod.innerType) == null ? void 0 : _a3._zod) == null ? void 0 : _b.optin) ?? void 0;
13113
+ var _a3, _b2;
13114
+ return ((_b2 = (_a3 = inst._zod.innerType) == null ? void 0 : _a3._zod) == null ? void 0 : _b2.optin) ?? void 0;
13103
13115
  });
13104
13116
  defineLazy(inst._zod, "optout", () => {
13105
- var _a3, _b;
13106
- return ((_b = (_a3 = inst._zod.innerType) == null ? void 0 : _a3._zod) == null ? void 0 : _b.optout) ?? void 0;
13117
+ var _a3, _b2;
13118
+ return ((_b2 = (_a3 = inst._zod.innerType) == null ? void 0 : _a3._zod) == null ? void 0 : _b2.optout) ?? void 0;
13107
13119
  });
13108
13120
  inst._zod.parse = (payload, ctx) => {
13109
13121
  const inner = inst._zod.innerType;
@@ -13745,8 +13757,8 @@ function initializeContext(params) {
13745
13757
  external: (params == null ? void 0 : params.external) ?? void 0
13746
13758
  };
13747
13759
  }
13748
- function process(schema, ctx, _params = { path: [], schemaPath: [] }) {
13749
- var _a4, _b;
13760
+ function process$1(schema, ctx, _params = { path: [], schemaPath: [] }) {
13761
+ var _a4, _b2;
13750
13762
  var _a3;
13751
13763
  const def = schema._zod.def;
13752
13764
  const seen2 = ctx.seen.get(schema);
@@ -13760,7 +13772,7 @@ function process(schema, ctx, _params = { path: [], schemaPath: [] }) {
13760
13772
  }
13761
13773
  const result = { schema: {}, count: 1, cycle: void 0, path: _params.path };
13762
13774
  ctx.seen.set(schema, result);
13763
- const overrideSchema = (_b = (_a4 = schema._zod).toJSONSchema) == null ? void 0 : _b.call(_a4);
13775
+ const overrideSchema = (_b2 = (_a4 = schema._zod).toJSONSchema) == null ? void 0 : _b2.call(_a4);
13764
13776
  if (overrideSchema) {
13765
13777
  result.schema = overrideSchema;
13766
13778
  } else {
@@ -13783,7 +13795,7 @@ function process(schema, ctx, _params = { path: [], schemaPath: [] }) {
13783
13795
  if (parent) {
13784
13796
  if (!result.ref)
13785
13797
  result.ref = parent;
13786
- process(parent, ctx, params);
13798
+ process$1(parent, ctx, params);
13787
13799
  ctx.seen.get(parent).isParent = true;
13788
13800
  }
13789
13801
  }
@@ -13801,7 +13813,7 @@ function process(schema, ctx, _params = { path: [], schemaPath: [] }) {
13801
13813
  return _result.schema;
13802
13814
  }
13803
13815
  function extractDefs(ctx, schema) {
13804
- var _a3, _b, _c, _d;
13816
+ var _a3, _b2, _c, _d;
13805
13817
  const root2 = ctx.seen.get(schema);
13806
13818
  if (!root2)
13807
13819
  throw new Error("Unprocessed schema. This is a bug in Zod.");
@@ -13856,7 +13868,7 @@ function extractDefs(ctx, schema) {
13856
13868
  for (const entry of ctx.seen.entries()) {
13857
13869
  const seen2 = entry[1];
13858
13870
  if (seen2.cycle) {
13859
- throw new Error(`Cycle detected: #/${(_b = seen2.cycle) == null ? void 0 : _b.join("/")}/<root>
13871
+ throw new Error(`Cycle detected: #/${(_b2 = seen2.cycle) == null ? void 0 : _b2.join("/")}/<root>
13860
13872
 
13861
13873
  Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);
13862
13874
  }
@@ -13893,7 +13905,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13893
13905
  }
13894
13906
  }
13895
13907
  function finalize(ctx, schema) {
13896
- var _a3, _b, _c;
13908
+ var _a3, _b2, _c;
13897
13909
  const root2 = ctx.seen.get(schema);
13898
13910
  if (!root2)
13899
13911
  throw new Error("Unprocessed schema. This is a bug in Zod.");
@@ -13972,7 +13984,7 @@ function finalize(ctx, schema) {
13972
13984
  } else if (ctx.target === "openapi-3.0") ;
13973
13985
  else ;
13974
13986
  if ((_a3 = ctx.external) == null ? void 0 : _a3.uri) {
13975
- const id = (_b = ctx.external.registry.get(schema)) == null ? void 0 : _b.id;
13987
+ const id = (_b2 = ctx.external.registry.get(schema)) == null ? void 0 : _b2.id;
13976
13988
  if (!id)
13977
13989
  throw new Error("Schema is missing an `id` property");
13978
13990
  result.$id = ctx.external.uri(id);
@@ -14066,14 +14078,14 @@ function isTransforming(_schema, _ctx) {
14066
14078
  }
14067
14079
  const createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
14068
14080
  const ctx = initializeContext({ ...params, processors });
14069
- process(schema, ctx);
14081
+ process$1(schema, ctx);
14070
14082
  extractDefs(ctx, schema);
14071
14083
  return finalize(ctx, schema);
14072
14084
  };
14073
14085
  const createStandardJSONSchemaMethod = (schema, io2, processors = {}) => (params) => {
14074
14086
  const { libraryOptions, target: target2 } = params ?? {};
14075
14087
  const ctx = initializeContext({ ...libraryOptions ?? {}, target: target2, io: io2, processors });
14076
- process(schema, ctx);
14088
+ process$1(schema, ctx);
14077
14089
  extractDefs(ctx, schema);
14078
14090
  return finalize(ctx, schema);
14079
14091
  };
@@ -14265,7 +14277,7 @@ const arrayProcessor = (schema, ctx, _json, params) => {
14265
14277
  if (typeof maximum === "number")
14266
14278
  json.maxItems = maximum;
14267
14279
  json.type = "array";
14268
- json.items = process(def.element, ctx, { ...params, path: [...params.path, "items"] });
14280
+ json.items = process$1(def.element, ctx, { ...params, path: [...params.path, "items"] });
14269
14281
  };
14270
14282
  const objectProcessor = (schema, ctx, _json, params) => {
14271
14283
  var _a3;
@@ -14275,7 +14287,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
14275
14287
  json.properties = {};
14276
14288
  const shape = def.shape;
14277
14289
  for (const key in shape) {
14278
- json.properties[key] = process(shape[key], ctx, {
14290
+ json.properties[key] = process$1(shape[key], ctx, {
14279
14291
  ...params,
14280
14292
  path: [...params.path, "properties", key]
14281
14293
  });
@@ -14298,7 +14310,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
14298
14310
  if (ctx.io === "output")
14299
14311
  json.additionalProperties = false;
14300
14312
  } else if (def.catchall) {
14301
- json.additionalProperties = process(def.catchall, ctx, {
14313
+ json.additionalProperties = process$1(def.catchall, ctx, {
14302
14314
  ...params,
14303
14315
  path: [...params.path, "additionalProperties"]
14304
14316
  });
@@ -14307,7 +14319,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
14307
14319
  const unionProcessor = (schema, ctx, json, params) => {
14308
14320
  const def = schema._zod.def;
14309
14321
  const isExclusive = def.inclusive === false;
14310
- const options = def.options.map((x2, i) => process(x2, ctx, {
14322
+ const options = def.options.map((x2, i) => process$1(x2, ctx, {
14311
14323
  ...params,
14312
14324
  path: [...params.path, isExclusive ? "oneOf" : "anyOf", i]
14313
14325
  }));
@@ -14319,11 +14331,11 @@ const unionProcessor = (schema, ctx, json, params) => {
14319
14331
  };
14320
14332
  const intersectionProcessor = (schema, ctx, json, params) => {
14321
14333
  const def = schema._zod.def;
14322
- const a2 = process(def.left, ctx, {
14334
+ const a2 = process$1(def.left, ctx, {
14323
14335
  ...params,
14324
14336
  path: [...params.path, "allOf", 0]
14325
14337
  });
14326
- const b2 = process(def.right, ctx, {
14338
+ const b2 = process$1(def.right, ctx, {
14327
14339
  ...params,
14328
14340
  path: [...params.path, "allOf", 1]
14329
14341
  });
@@ -14342,7 +14354,7 @@ const recordProcessor = (schema, ctx, _json, params) => {
14342
14354
  const keyBag = keyType._zod.bag;
14343
14355
  const patterns = keyBag == null ? void 0 : keyBag.patterns;
14344
14356
  if (def.mode === "loose" && patterns && patterns.size > 0) {
14345
- const valueSchema = process(def.valueType, ctx, {
14357
+ const valueSchema = process$1(def.valueType, ctx, {
14346
14358
  ...params,
14347
14359
  path: [...params.path, "patternProperties", "*"]
14348
14360
  });
@@ -14352,12 +14364,12 @@ const recordProcessor = (schema, ctx, _json, params) => {
14352
14364
  }
14353
14365
  } else {
14354
14366
  if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") {
14355
- json.propertyNames = process(def.keyType, ctx, {
14367
+ json.propertyNames = process$1(def.keyType, ctx, {
14356
14368
  ...params,
14357
14369
  path: [...params.path, "propertyNames"]
14358
14370
  });
14359
14371
  }
14360
- json.additionalProperties = process(def.valueType, ctx, {
14372
+ json.additionalProperties = process$1(def.valueType, ctx, {
14361
14373
  ...params,
14362
14374
  path: [...params.path, "additionalProperties"]
14363
14375
  });
@@ -14372,7 +14384,7 @@ const recordProcessor = (schema, ctx, _json, params) => {
14372
14384
  };
14373
14385
  const nullableProcessor = (schema, ctx, json, params) => {
14374
14386
  const def = schema._zod.def;
14375
- const inner = process(def.innerType, ctx, params);
14387
+ const inner = process$1(def.innerType, ctx, params);
14376
14388
  const seen2 = ctx.seen.get(schema);
14377
14389
  if (ctx.target === "openapi-3.0") {
14378
14390
  seen2.ref = def.innerType;
@@ -14383,20 +14395,20 @@ const nullableProcessor = (schema, ctx, json, params) => {
14383
14395
  };
14384
14396
  const nonoptionalProcessor = (schema, ctx, _json, params) => {
14385
14397
  const def = schema._zod.def;
14386
- process(def.innerType, ctx, params);
14398
+ process$1(def.innerType, ctx, params);
14387
14399
  const seen2 = ctx.seen.get(schema);
14388
14400
  seen2.ref = def.innerType;
14389
14401
  };
14390
14402
  const defaultProcessor = (schema, ctx, json, params) => {
14391
14403
  const def = schema._zod.def;
14392
- process(def.innerType, ctx, params);
14404
+ process$1(def.innerType, ctx, params);
14393
14405
  const seen2 = ctx.seen.get(schema);
14394
14406
  seen2.ref = def.innerType;
14395
14407
  json.default = JSON.parse(JSON.stringify(def.defaultValue));
14396
14408
  };
14397
14409
  const prefaultProcessor = (schema, ctx, json, params) => {
14398
14410
  const def = schema._zod.def;
14399
- process(def.innerType, ctx, params);
14411
+ process$1(def.innerType, ctx, params);
14400
14412
  const seen2 = ctx.seen.get(schema);
14401
14413
  seen2.ref = def.innerType;
14402
14414
  if (ctx.io === "input")
@@ -14404,7 +14416,7 @@ const prefaultProcessor = (schema, ctx, json, params) => {
14404
14416
  };
14405
14417
  const catchProcessor = (schema, ctx, json, params) => {
14406
14418
  const def = schema._zod.def;
14407
- process(def.innerType, ctx, params);
14419
+ process$1(def.innerType, ctx, params);
14408
14420
  const seen2 = ctx.seen.get(schema);
14409
14421
  seen2.ref = def.innerType;
14410
14422
  let catchValue;
@@ -14418,26 +14430,26 @@ const catchProcessor = (schema, ctx, json, params) => {
14418
14430
  const pipeProcessor = (schema, ctx, _json, params) => {
14419
14431
  const def = schema._zod.def;
14420
14432
  const innerType = ctx.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
14421
- process(innerType, ctx, params);
14433
+ process$1(innerType, ctx, params);
14422
14434
  const seen2 = ctx.seen.get(schema);
14423
14435
  seen2.ref = innerType;
14424
14436
  };
14425
14437
  const readonlyProcessor = (schema, ctx, json, params) => {
14426
14438
  const def = schema._zod.def;
14427
- process(def.innerType, ctx, params);
14439
+ process$1(def.innerType, ctx, params);
14428
14440
  const seen2 = ctx.seen.get(schema);
14429
14441
  seen2.ref = def.innerType;
14430
14442
  json.readOnly = true;
14431
14443
  };
14432
14444
  const optionalProcessor = (schema, ctx, _json, params) => {
14433
14445
  const def = schema._zod.def;
14434
- process(def.innerType, ctx, params);
14446
+ process$1(def.innerType, ctx, params);
14435
14447
  const seen2 = ctx.seen.get(schema);
14436
14448
  seen2.ref = def.innerType;
14437
14449
  };
14438
14450
  const lazyProcessor = (schema, ctx, _json, params) => {
14439
14451
  const innerType = schema._zod.innerType;
14440
- process(innerType, ctx, params);
14452
+ process$1(innerType, ctx, params);
14441
14453
  const seen2 = ctx.seen.get(schema);
14442
14454
  seen2.ref = innerType;
14443
14455
  };
@@ -15334,7 +15346,10 @@ const HookConflictEventSchema = BaseEventSchema.extend({
15334
15346
  eventType: literal("hook_conflict"),
15335
15347
  correlationId: string$2(),
15336
15348
  eventData: object({
15337
- token: string$2()
15349
+ token: string$2(),
15350
+ // TODO: Make this required once all persisted hook_conflict events and
15351
+ // remote World implementations always include the active hook owner's run ID.
15352
+ conflictingRunId: string$2().optional()
15338
15353
  })
15339
15354
  });
15340
15355
  const WaitCreatedEventSchema = BaseEventSchema.extend({
@@ -15810,9 +15825,9 @@ async function hydrateResourceIOWithKey(resource, key) {
15810
15825
  return { hydrateDataWithKey: hydrateDataWithKey3 };
15811
15826
  }, true ? void 0 : void 0);
15812
15827
  const { importKey } = await __vitePreload(async () => {
15813
- const { importKey: importKey2 } = await import("./encryption-5eom23r0.js");
15828
+ const { importKey: importKey2 } = await import("./encryption-Bd25Keng.js");
15814
15829
  return { importKey: importKey2 };
15815
- }, true ? [] : void 0);
15830
+ }, true ? __vite__mapDeps([0,1,2]) : void 0);
15816
15831
  const cryptoKey = await importKey(key);
15817
15832
  const revivers = getRevivers();
15818
15833
  async function decryptField(value, rev, k2) {
@@ -15864,60 +15879,6 @@ function hasEncryptedFields(resource) {
15864
15879
  }
15865
15880
  return false;
15866
15881
  }
15867
- const KEYFRAMES = `@keyframes wf-spinner-fade{0%{opacity:1}100%{opacity:.15}}`;
15868
- function Spinner({ size: size2 = 14, color: color5 }) {
15869
- const config2 = size2 <= 12 ? {
15870
- angle: 45,
15871
- delays: [-875, -750, -625, -500, -375, -250, -125, 0],
15872
- duration: 1e3,
15873
- lineW: 3,
15874
- lineH: 1.5
15875
- } : size2 <= 16 ? {
15876
- angle: 36,
15877
- delays: [-900, -800, -700, -600, -500, -400, -300, -200, -100, 0],
15878
- duration: 1e3,
15879
- lineW: 4,
15880
- lineH: 1.5
15881
- } : {
15882
- angle: 30,
15883
- delays: [
15884
- -1100,
15885
- -1e3,
15886
- -900,
15887
- -800,
15888
- -700,
15889
- -600,
15890
- -500,
15891
- -400,
15892
- -300,
15893
- -200,
15894
- -100,
15895
- 0
15896
- ],
15897
- duration: 1200,
15898
- lineW: size2 * 0.24,
15899
- lineH: size2 * 0.08
15900
- };
15901
- return jsxRuntimeExports.jsxs("span", { style: {
15902
- display: "inline-flex",
15903
- position: "relative",
15904
- width: size2,
15905
- height: size2
15906
- }, children: [jsxRuntimeExports.jsx("style", { dangerouslySetInnerHTML: { __html: KEYFRAMES } }), config2.delays.map((delay, i) => jsxRuntimeExports.jsx("span", { style: {
15907
- position: "absolute",
15908
- left: "50%",
15909
- top: "50%",
15910
- width: config2.lineW,
15911
- height: config2.lineH,
15912
- marginLeft: -config2.lineW / 2,
15913
- marginTop: -config2.lineH / 2,
15914
- borderRadius: 1,
15915
- backgroundColor: color5 ?? "var(--ds-gray-700)",
15916
- transform: `rotate(${i * config2.angle}deg) translate(${size2 * 0.36}px)`,
15917
- animation: `wf-spinner-fade ${config2.duration}ms linear infinite`,
15918
- animationDelay: `${delay}ms`
15919
- } }, delay))] });
15920
- }
15921
15882
  function __insertCSS(code2) {
15922
15883
  if (typeof document == "undefined") return;
15923
15884
  let head = document.head || document.getElementsByTagName("head")[0];
@@ -17007,6 +16968,60 @@ const ToastContext = reactExports.createContext(defaultAdapter);
17007
16968
  function useToast() {
17008
16969
  return reactExports.useContext(ToastContext);
17009
16970
  }
16971
+ const KEYFRAMES = `@keyframes wf-spinner-fade{0%{opacity:1}100%{opacity:.15}}`;
16972
+ function Spinner({ size: size2 = 14, color: color5 }) {
16973
+ const config2 = size2 <= 12 ? {
16974
+ angle: 45,
16975
+ delays: [-875, -750, -625, -500, -375, -250, -125, 0],
16976
+ duration: 1e3,
16977
+ lineW: 3,
16978
+ lineH: 1.5
16979
+ } : size2 <= 16 ? {
16980
+ angle: 36,
16981
+ delays: [-900, -800, -700, -600, -500, -400, -300, -200, -100, 0],
16982
+ duration: 1e3,
16983
+ lineW: 4,
16984
+ lineH: 1.5
16985
+ } : {
16986
+ angle: 30,
16987
+ delays: [
16988
+ -1100,
16989
+ -1e3,
16990
+ -900,
16991
+ -800,
16992
+ -700,
16993
+ -600,
16994
+ -500,
16995
+ -400,
16996
+ -300,
16997
+ -200,
16998
+ -100,
16999
+ 0
17000
+ ],
17001
+ duration: 1200,
17002
+ lineW: size2 * 0.24,
17003
+ lineH: size2 * 0.08
17004
+ };
17005
+ return jsxRuntimeExports.jsxs("span", { style: {
17006
+ display: "inline-flex",
17007
+ position: "relative",
17008
+ width: size2,
17009
+ height: size2
17010
+ }, children: [jsxRuntimeExports.jsx("style", { dangerouslySetInnerHTML: { __html: KEYFRAMES } }), config2.delays.map((delay, i) => jsxRuntimeExports.jsx("span", { style: {
17011
+ position: "absolute",
17012
+ left: "50%",
17013
+ top: "50%",
17014
+ width: config2.lineW,
17015
+ height: config2.lineH,
17016
+ marginLeft: -config2.lineW / 2,
17017
+ marginTop: -config2.lineH / 2,
17018
+ borderRadius: 1,
17019
+ backgroundColor: color5 ?? "var(--ds-gray-700)",
17020
+ transform: `rotate(${i * config2.angle}deg) translate(${size2 * 0.36}px)`,
17021
+ animation: `wf-spinner-fade ${config2.duration}ms linear infinite`,
17022
+ animationDelay: `${delay}ms`
17023
+ } }, delay))] });
17024
+ }
17010
17025
  var __create = Object.create;
17011
17026
  var __defProp2 = Object.defineProperty;
17012
17027
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -18574,8 +18589,8 @@ const deserializer = ($2, _2) => {
18574
18589
  case "ArrayBuffer":
18575
18590
  return as(new Uint8Array(value).buffer, value);
18576
18591
  case "DataView": {
18577
- const { buffer } = new Uint8Array(value);
18578
- return as(new DataView(buffer), value);
18592
+ const { buffer: buffer2 } = new Uint8Array(value);
18593
+ return as(new DataView(buffer2), value);
18579
18594
  }
18580
18595
  }
18581
18596
  return as(new env[type](value), index2);
@@ -23158,8 +23173,8 @@ class Tokenizer {
23158
23173
  }
23159
23174
  //Errors
23160
23175
  _err(code2, cpOffset = 0) {
23161
- var _a3, _b;
23162
- (_b = (_a3 = this.handler).onParseError) === null || _b === void 0 ? void 0 : _b.call(_a3, this.preprocessor.getError(code2, cpOffset));
23176
+ var _a3, _b2;
23177
+ (_b2 = (_a3 = this.handler).onParseError) === null || _b2 === void 0 ? void 0 : _b2.call(_a3, this.preprocessor.getError(code2, cpOffset));
23163
23178
  }
23164
23179
  // NOTE: `offset` may never run across line boundaries.
23165
23180
  getCurrentLocation(offset2) {
@@ -23302,12 +23317,12 @@ class Tokenizer {
23302
23317
  }
23303
23318
  _leaveAttrName() {
23304
23319
  var _a3;
23305
- var _b;
23320
+ var _b2;
23306
23321
  const token = this.currentToken;
23307
23322
  if (getTokenAttr(token, this.currentAttr.name) === null) {
23308
23323
  token.attrs.push(this.currentAttr);
23309
23324
  if (token.location && this.currentLocation) {
23310
- const attrLocations = (_a3 = (_b = token.location).attrs) !== null && _a3 !== void 0 ? _a3 : _b.attrs = /* @__PURE__ */ Object.create(null);
23325
+ const attrLocations = (_a3 = (_b2 = token.location).attrs) !== null && _a3 !== void 0 ? _a3 : _b2.attrs = /* @__PURE__ */ Object.create(null);
23311
23326
  attrLocations[this.currentAttr.name] = this.currentLocation;
23312
23327
  this._leaveAttrValue();
23313
23328
  }
@@ -26652,18 +26667,18 @@ class Parser {
26652
26667
  //Stack events
26653
26668
  /** @internal */
26654
26669
  onItemPush(node2, tid, isTop) {
26655
- var _a3, _b;
26656
- (_b = (_a3 = this.treeAdapter).onItemPush) === null || _b === void 0 ? void 0 : _b.call(_a3, node2);
26670
+ var _a3, _b2;
26671
+ (_b2 = (_a3 = this.treeAdapter).onItemPush) === null || _b2 === void 0 ? void 0 : _b2.call(_a3, node2);
26657
26672
  if (isTop && this.openElements.stackTop > 0)
26658
26673
  this._setContextModes(node2, tid);
26659
26674
  }
26660
26675
  /** @internal */
26661
26676
  onItemPop(node2, isTop) {
26662
- var _a3, _b;
26677
+ var _a3, _b2;
26663
26678
  if (this.options.sourceCodeLocationInfo) {
26664
26679
  this._setEndLocation(node2, this.currentToken);
26665
26680
  }
26666
- (_b = (_a3 = this.treeAdapter).onItemPop) === null || _b === void 0 ? void 0 : _b.call(_a3, node2, this.openElements.current);
26681
+ (_b2 = (_a3 = this.treeAdapter).onItemPop) === null || _b2 === void 0 ? void 0 : _b2.call(_a3, node2, this.openElements.current);
26667
26682
  if (isTop) {
26668
26683
  let current;
26669
26684
  let currentTagId;
@@ -32366,27 +32381,27 @@ function tokenizeWwwAutolink(effects, ok2, nok) {
32366
32381
  }
32367
32382
  function tokenizeProtocolAutolink(effects, ok2, nok) {
32368
32383
  const self2 = this;
32369
- let buffer = "";
32384
+ let buffer2 = "";
32370
32385
  let seen2 = false;
32371
32386
  return protocolStart;
32372
32387
  function protocolStart(code2) {
32373
32388
  if ((code2 === 72 || code2 === 104) && previousProtocol.call(self2, self2.previous) && !previousUnbalanced(self2.events)) {
32374
32389
  effects.enter("literalAutolink");
32375
32390
  effects.enter("literalAutolinkHttp");
32376
- buffer += String.fromCodePoint(code2);
32391
+ buffer2 += String.fromCodePoint(code2);
32377
32392
  effects.consume(code2);
32378
32393
  return protocolPrefixInside;
32379
32394
  }
32380
32395
  return nok(code2);
32381
32396
  }
32382
32397
  function protocolPrefixInside(code2) {
32383
- if (asciiAlpha(code2) && buffer.length < 5) {
32384
- buffer += String.fromCodePoint(code2);
32398
+ if (asciiAlpha(code2) && buffer2.length < 5) {
32399
+ buffer2 += String.fromCodePoint(code2);
32385
32400
  effects.consume(code2);
32386
32401
  return protocolPrefixInside;
32387
32402
  }
32388
32403
  if (code2 === 58) {
32389
- const protocol = buffer.toLowerCase();
32404
+ const protocol = buffer2.toLowerCase();
32390
32405
  if (protocol === "http" || protocol === "https") {
32391
32406
  effects.consume(code2);
32392
32407
  return protocolSlashesInside;
@@ -34316,7 +34331,7 @@ function tokenizeHtmlFlow(effects, ok2, nok) {
34316
34331
  const self2 = this;
34317
34332
  let marker2;
34318
34333
  let closingTag;
34319
- let buffer;
34334
+ let buffer2;
34320
34335
  let index2;
34321
34336
  let markerB;
34322
34337
  return start;
@@ -34346,7 +34361,7 @@ function tokenizeHtmlFlow(effects, ok2, nok) {
34346
34361
  }
34347
34362
  if (asciiAlpha(code2)) {
34348
34363
  effects.consume(code2);
34349
- buffer = String.fromCharCode(code2);
34364
+ buffer2 = String.fromCharCode(code2);
34350
34365
  return tagName;
34351
34366
  }
34352
34367
  return nok(code2);
@@ -34391,7 +34406,7 @@ function tokenizeHtmlFlow(effects, ok2, nok) {
34391
34406
  function tagCloseStart(code2) {
34392
34407
  if (asciiAlpha(code2)) {
34393
34408
  effects.consume(code2);
34394
- buffer = String.fromCharCode(code2);
34409
+ buffer2 = String.fromCharCode(code2);
34395
34410
  return tagName;
34396
34411
  }
34397
34412
  return nok(code2);
@@ -34399,12 +34414,12 @@ function tokenizeHtmlFlow(effects, ok2, nok) {
34399
34414
  function tagName(code2) {
34400
34415
  if (code2 === null || code2 === 47 || code2 === 62 || markdownLineEndingOrSpace(code2)) {
34401
34416
  const slash = code2 === 47;
34402
- const name2 = buffer.toLowerCase();
34417
+ const name2 = buffer2.toLowerCase();
34403
34418
  if (!slash && !closingTag && htmlRawNames.includes(name2)) {
34404
34419
  marker2 = 1;
34405
34420
  return self2.interrupt ? ok2(code2) : continuation(code2);
34406
34421
  }
34407
- if (htmlBlockNames.includes(buffer.toLowerCase())) {
34422
+ if (htmlBlockNames.includes(buffer2.toLowerCase())) {
34408
34423
  marker2 = 6;
34409
34424
  if (slash) {
34410
34425
  effects.consume(code2);
@@ -34417,7 +34432,7 @@ function tokenizeHtmlFlow(effects, ok2, nok) {
34417
34432
  }
34418
34433
  if (code2 === 45 || asciiAlphanumeric(code2)) {
34419
34434
  effects.consume(code2);
34420
- buffer += String.fromCharCode(code2);
34435
+ buffer2 += String.fromCharCode(code2);
34421
34436
  return tagName;
34422
34437
  }
34423
34438
  return nok(code2);
@@ -34584,23 +34599,23 @@ function tokenizeHtmlFlow(effects, ok2, nok) {
34584
34599
  function continuationRawTagOpen(code2) {
34585
34600
  if (code2 === 47) {
34586
34601
  effects.consume(code2);
34587
- buffer = "";
34602
+ buffer2 = "";
34588
34603
  return continuationRawEndTag;
34589
34604
  }
34590
34605
  return continuation(code2);
34591
34606
  }
34592
34607
  function continuationRawEndTag(code2) {
34593
34608
  if (code2 === 62) {
34594
- const name2 = buffer.toLowerCase();
34609
+ const name2 = buffer2.toLowerCase();
34595
34610
  if (htmlRawNames.includes(name2)) {
34596
34611
  effects.consume(code2);
34597
34612
  return continuationClose;
34598
34613
  }
34599
34614
  return continuation(code2);
34600
34615
  }
34601
- if (asciiAlpha(code2) && buffer.length < 8) {
34616
+ if (asciiAlpha(code2) && buffer2.length < 8) {
34602
34617
  effects.consume(code2);
34603
- buffer += String.fromCharCode(code2);
34618
+ buffer2 += String.fromCharCode(code2);
34604
34619
  return continuationRawEndTag;
34605
34620
  }
34606
34621
  return continuation(code2);
@@ -38470,7 +38485,7 @@ function postprocess(events) {
38470
38485
  const search = /[\0\t\n\r]/g;
38471
38486
  function preprocess() {
38472
38487
  let column = 1;
38473
- let buffer = "";
38488
+ let buffer2 = "";
38474
38489
  let start = true;
38475
38490
  let atCarriageReturn;
38476
38491
  return preprocessor;
@@ -38481,9 +38496,9 @@ function preprocess() {
38481
38496
  let startPosition;
38482
38497
  let endPosition;
38483
38498
  let code2;
38484
- value = buffer + (typeof value === "string" ? value.toString() : new TextDecoder(encoding || void 0).decode(value));
38499
+ value = buffer2 + (typeof value === "string" ? value.toString() : new TextDecoder(encoding || void 0).decode(value));
38485
38500
  startPosition = 0;
38486
- buffer = "";
38501
+ buffer2 = "";
38487
38502
  if (start) {
38488
38503
  if (value.charCodeAt(0) === 65279) {
38489
38504
  startPosition++;
@@ -38496,7 +38511,7 @@ function preprocess() {
38496
38511
  endPosition = match && match.index !== void 0 ? match.index : value.length;
38497
38512
  code2 = value.charCodeAt(endPosition);
38498
38513
  if (!match) {
38499
- buffer = value.slice(startPosition);
38514
+ buffer2 = value.slice(startPosition);
38500
38515
  break;
38501
38516
  }
38502
38517
  if (code2 === 10 && startPosition === endPosition && atCarriageReturn) {
@@ -38538,7 +38553,7 @@ function preprocess() {
38538
38553
  }
38539
38554
  if (end) {
38540
38555
  if (atCarriageReturn) chunks.push(-5);
38541
- if (buffer) chunks.push(buffer);
38556
+ if (buffer2) chunks.push(buffer2);
38542
38557
  chunks.push(null);
38543
38558
  }
38544
38559
  return chunks;
@@ -38565,26 +38580,26 @@ function compiler(options) {
38565
38580
  characterEscape: onenterdata,
38566
38581
  characterReference: onenterdata,
38567
38582
  codeFenced: opener(codeFlow),
38568
- codeFencedFenceInfo: buffer,
38569
- codeFencedFenceMeta: buffer,
38570
- codeIndented: opener(codeFlow, buffer),
38571
- codeText: opener(codeText2, buffer),
38583
+ codeFencedFenceInfo: buffer2,
38584
+ codeFencedFenceMeta: buffer2,
38585
+ codeIndented: opener(codeFlow, buffer2),
38586
+ codeText: opener(codeText2, buffer2),
38572
38587
  codeTextData: onenterdata,
38573
38588
  data: onenterdata,
38574
38589
  codeFlowValue: onenterdata,
38575
38590
  definition: opener(definition2),
38576
- definitionDestinationString: buffer,
38577
- definitionLabelString: buffer,
38578
- definitionTitleString: buffer,
38591
+ definitionDestinationString: buffer2,
38592
+ definitionLabelString: buffer2,
38593
+ definitionTitleString: buffer2,
38579
38594
  emphasis: opener(emphasis2),
38580
38595
  hardBreakEscape: opener(hardBreak2),
38581
38596
  hardBreakTrailing: opener(hardBreak2),
38582
- htmlFlow: opener(html2, buffer),
38597
+ htmlFlow: opener(html2, buffer2),
38583
38598
  htmlFlowData: onenterdata,
38584
- htmlText: opener(html2, buffer),
38599
+ htmlText: opener(html2, buffer2),
38585
38600
  htmlTextData: onenterdata,
38586
38601
  image: opener(image2),
38587
- label: buffer,
38602
+ label: buffer2,
38588
38603
  link: opener(link2),
38589
38604
  listItem: opener(listItem2),
38590
38605
  listItemValue: onenterlistitemvalue,
@@ -38592,9 +38607,9 @@ function compiler(options) {
38592
38607
  listUnordered: opener(list2),
38593
38608
  paragraph: opener(paragraph2),
38594
38609
  reference: onenterreference,
38595
- referenceString: buffer,
38596
- resourceDestinationString: buffer,
38597
- resourceTitleString: buffer,
38610
+ referenceString: buffer2,
38611
+ resourceDestinationString: buffer2,
38612
+ resourceTitleString: buffer2,
38598
38613
  setextHeading: opener(heading2),
38599
38614
  strong: opener(strong2),
38600
38615
  thematicBreak: opener(thematicBreak2)
@@ -38665,7 +38680,7 @@ function compiler(options) {
38665
38680
  config: config2,
38666
38681
  enter,
38667
38682
  exit: exit2,
38668
- buffer,
38683
+ buffer: buffer2,
38669
38684
  resume,
38670
38685
  data
38671
38686
  };
@@ -38809,7 +38824,7 @@ function compiler(options) {
38809
38824
  if (and) and.call(this, token);
38810
38825
  }
38811
38826
  }
38812
- function buffer() {
38827
+ function buffer2() {
38813
38828
  this.stack.push({
38814
38829
  type: "fragment",
38815
38830
  children: []
@@ -39284,8 +39299,9 @@ function hardBreak(state, node2) {
39284
39299
  function code(state, node2) {
39285
39300
  const value = node2.value ? node2.value + "\n" : "";
39286
39301
  const properties2 = {};
39287
- if (node2.lang) {
39288
- properties2.className = ["language-" + node2.lang];
39302
+ const language = node2.lang ? node2.lang.split(/\s+/) : [];
39303
+ if (language.length > 0) {
39304
+ properties2.className = ["language-" + language[0]];
39289
39305
  }
39290
39306
  let result = {
39291
39307
  type: "element",
@@ -41757,7 +41773,7 @@ ${c}` : c;
41757
41773
  }
41758
41774
  }
41759
41775
  list(e) {
41760
- var _a3, _b;
41776
+ var _a3, _b2;
41761
41777
  let t = this.rules.block.list.exec(e);
41762
41778
  if (t) {
41763
41779
  let n = t[1].trim(), r2 = n.length > 1, i = { type: "list", raw: "", ordered: r2, start: r2 ? +n.slice(0, -1) : "", loose: false, items: [] };
@@ -41796,7 +41812,7 @@ ${c}` : c;
41796
41812
  i.raw = i.raw.trimEnd();
41797
41813
  for (let l of i.items) {
41798
41814
  if (this.lexer.state.top = false, l.tokens = this.lexer.blockTokens(l.text, []), l.task) {
41799
- if (l.text = l.text.replace(this.rules.other.listReplaceTask, ""), ((_a3 = l.tokens[0]) == null ? void 0 : _a3.type) === "text" || ((_b = l.tokens[0]) == null ? void 0 : _b.type) === "paragraph") {
41815
+ if (l.text = l.text.replace(this.rules.other.listReplaceTask, ""), ((_a3 = l.tokens[0]) == null ? void 0 : _a3.type) === "text" || ((_b2 = l.tokens[0]) == null ? void 0 : _b2.type) === "paragraph") {
41800
41816
  l.tokens[0].raw = l.tokens[0].raw.replace(this.rules.other.listReplaceTask, ""), l.tokens[0].text = l.tokens[0].text.replace(this.rules.other.listReplaceTask, "");
41801
41817
  for (let c = this.lexer.inlineQueue.length - 1; c >= 0; c--) if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[c].src)) {
41802
41818
  this.lexer.inlineQueue[c].src = this.lexer.inlineQueue[c].src.replace(this.rules.other.listReplaceTask, "");
@@ -42020,10 +42036,10 @@ var x = class u2 {
42020
42036
  return this.inlineQueue = [], this.tokens;
42021
42037
  }
42022
42038
  blockTokens(e, t = [], n = false) {
42023
- var _a3, _b, _c;
42039
+ var _a3, _b2, _c;
42024
42040
  for (this.options.pedantic && (e = e.replace(m.tabCharGlobal, " ").replace(m.spaceLine, "")); e; ) {
42025
42041
  let r2;
42026
- if ((_b = (_a3 = this.options.extensions) == null ? void 0 : _a3.block) == null ? void 0 : _b.some((s2) => (r2 = s2.call({ lexer: this }, e, t)) ? (e = e.substring(r2.raw.length), t.push(r2), true) : false)) continue;
42042
+ if ((_b2 = (_a3 = this.options.extensions) == null ? void 0 : _a3.block) == null ? void 0 : _b2.some((s2) => (r2 = s2.call({ lexer: this }, e, t)) ? (e = e.substring(r2.raw.length), t.push(r2), true) : false)) continue;
42027
42043
  if (r2 = this.tokenizer.space(e)) {
42028
42044
  e = e.substring(r2.raw.length);
42029
42045
  let s2 = t.at(-1);
@@ -42119,7 +42135,7 @@ var x = class u2 {
42119
42135
  return this.inlineQueue.push({ src: e, tokens: t }), t;
42120
42136
  }
42121
42137
  inlineTokens(e, t = []) {
42122
- var _a3, _b, _c, _d, _e2;
42138
+ var _a3, _b2, _c, _d, _e2;
42123
42139
  let n = e, r2 = null;
42124
42140
  if (this.tokens.links) {
42125
42141
  let o = Object.keys(this.tokens.links);
@@ -42128,7 +42144,7 @@ var x = class u2 {
42128
42144
  for (; (r2 = this.tokenizer.rules.inline.anyPunctuation.exec(n)) != null; ) n = n.slice(0, r2.index) + "++" + n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
42129
42145
  let i;
42130
42146
  for (; (r2 = this.tokenizer.rules.inline.blockSkip.exec(n)) != null; ) i = r2[2] ? r2[2].length : 0, n = n.slice(0, r2.index + i) + "[" + "a".repeat(r2[0].length - i - 2) + "]" + n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
42131
- n = ((_b = (_a3 = this.options.hooks) == null ? void 0 : _a3.emStrongMask) == null ? void 0 : _b.call({ lexer: this }, n)) ?? n;
42147
+ n = ((_b2 = (_a3 = this.options.hooks) == null ? void 0 : _a3.emStrongMask) == null ? void 0 : _b2.call({ lexer: this }, n)) ?? n;
42132
42148
  let s2 = false, a2 = "";
42133
42149
  for (; e; ) {
42134
42150
  s2 || (a2 = ""), s2 = false;
@@ -42365,11 +42381,11 @@ var b = class u3 {
42365
42381
  return new u3(t).parseInline(e);
42366
42382
  }
42367
42383
  parse(e) {
42368
- var _a3, _b;
42384
+ var _a3, _b2;
42369
42385
  let t = "";
42370
42386
  for (let n = 0; n < e.length; n++) {
42371
42387
  let r2 = e[n];
42372
- if ((_b = (_a3 = this.options.extensions) == null ? void 0 : _a3.renderers) == null ? void 0 : _b[r2.type]) {
42388
+ if ((_b2 = (_a3 = this.options.extensions) == null ? void 0 : _a3.renderers) == null ? void 0 : _b2[r2.type]) {
42373
42389
  let s2 = r2, a2 = this.options.extensions.renderers[s2.type].call({ parser: this }, s2);
42374
42390
  if (a2 !== false || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "def", "paragraph", "text"].includes(s2.type)) {
42375
42391
  t += a2 || "";
@@ -42436,11 +42452,11 @@ var b = class u3 {
42436
42452
  return t;
42437
42453
  }
42438
42454
  parseInline(e, t = this.renderer) {
42439
- var _a3, _b;
42455
+ var _a3, _b2;
42440
42456
  let n = "";
42441
42457
  for (let r2 = 0; r2 < e.length; r2++) {
42442
42458
  let i = e[r2];
42443
- if ((_b = (_a3 = this.options.extensions) == null ? void 0 : _a3.renderers) == null ? void 0 : _b[i.type]) {
42459
+ if ((_b2 = (_a3 = this.options.extensions) == null ? void 0 : _a3.renderers) == null ? void 0 : _b2[i.type]) {
42444
42460
  let a2 = this.options.extensions.renderers[i.type].call({ parser: this }, i);
42445
42461
  if (a2 !== false || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(i.type)) {
42446
42462
  n += a2 || "";
@@ -42503,7 +42519,7 @@ var b = class u3 {
42503
42519
  return n;
42504
42520
  }
42505
42521
  };
42506
- var P = (_a2 = class {
42522
+ var P = (_b = class {
42507
42523
  constructor(e) {
42508
42524
  __publicField(this, "options");
42509
42525
  __publicField(this, "block");
@@ -42527,7 +42543,7 @@ var P = (_a2 = class {
42527
42543
  provideParser() {
42528
42544
  return this.block ? b.parse : b.parseInline;
42529
42545
  }
42530
- }, __publicField(_a2, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), __publicField(_a2, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), _a2);
42546
+ }, __publicField(_b, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), __publicField(_b, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), _b);
42531
42547
  var B = class {
42532
42548
  constructor(...e) {
42533
42549
  __publicField(this, "defaults", M());
@@ -42543,7 +42559,7 @@ var B = class {
42543
42559
  this.use(...e);
42544
42560
  }
42545
42561
  walkTokens(e, t) {
42546
- var _a3, _b;
42562
+ var _a3, _b2;
42547
42563
  let n = [];
42548
42564
  for (let r2 of e) switch (n = n.concat(t.call(this, r2)), r2.type) {
42549
42565
  case "table": {
@@ -42559,7 +42575,7 @@ var B = class {
42559
42575
  }
42560
42576
  default: {
42561
42577
  let i = r2;
42562
- ((_b = (_a3 = this.defaults.extensions) == null ? void 0 : _a3.childTokens) == null ? void 0 : _b[i.type]) ? this.defaults.extensions.childTokens[i.type].forEach((s2) => {
42578
+ ((_b2 = (_a3 = this.defaults.extensions) == null ? void 0 : _a3.childTokens) == null ? void 0 : _b2[i.type]) ? this.defaults.extensions.childTokens[i.type].forEach((s2) => {
42563
42579
  let a2 = i[s2].flat(1 / 0);
42564
42580
  n = n.concat(this.walkTokens(a2, t));
42565
42581
  }) : i.tokens && (n = n.concat(this.walkTokens(i.tokens, t)));
@@ -42823,7 +42839,7 @@ var tn = f("block", "before:content-[counter(line)]", "before:inline-block", "be
42823
42839
  var et = ({ className: e, language: t, style: o, isIncomplete: n, ...s2 }) => jsxRuntimeExports.jsx("div", { className: f("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2", e), "data-incomplete": n || void 0, "data-language": t, "data-streamdown": "code-block", style: { contentVisibility: "auto", containIntrinsicSize: "auto 200px", ...o }, ...s2 });
42824
42840
  var Se = reactExports.createContext({ code: "" }), de = () => reactExports.useContext(Se);
42825
42841
  var ot = ({ language: e }) => jsxRuntimeExports.jsx("div", { className: "flex h-8 items-center text-muted-foreground text-xs", "data-language": e, "data-streamdown": "code-block-header", children: jsxRuntimeExports.jsx("span", { className: "ml-1 font-mono lowercase", children: e }) });
42826
- var cn$1 = /\n+$/, dn = reactExports.lazy(() => __vitePreload(() => import("./highlighted-body-B3W2YXNL-9Gx_xbQ8.js"), true ? __vite__mapDeps([0,1]) : void 0).then((e) => ({ default: e.HighlightedCodeBlockBody }))), rt = ({ code: e, language: t, className: o, children: n, isIncomplete: s2 = false, ...r2 }) => {
42842
+ var cn$1 = /\n+$/, dn = reactExports.lazy(() => __vitePreload(() => import("./highlighted-body-B3W2YXNL-qwkBshMM.js"), true ? __vite__mapDeps([3,2]) : void 0).then((e) => ({ default: e.HighlightedCodeBlockBody }))), rt = ({ code: e, language: t, className: o, children: n, isIncomplete: s2 = false, ...r2 }) => {
42827
42843
  let i = reactExports.useMemo(() => e.replace(cn$1, ""), [e]), c = reactExports.useMemo(() => ({ bg: "transparent", fg: "inherit", tokens: i.split(`
42828
42844
  `).map((a2) => [{ content: a2, color: "inherit", bgColor: "transparent", htmlStyle: {}, offset: 0 }]) }), [i]);
42829
42845
  return jsxRuntimeExports.jsx(Se.Provider, { value: { code: e }, children: jsxRuntimeExports.jsxs(et, { isIncomplete: s2, language: t, children: [jsxRuntimeExports.jsx(ot, { language: t }), n ? jsxRuntimeExports.jsx("div", { className: "pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end", children: jsxRuntimeExports.jsx("div", { className: "pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur", "data-streamdown": "code-block-actions", children: n }) }) : null, jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: jsxRuntimeExports.jsx(Qe, { className: o, language: t, result: c, ...r2 }), children: jsxRuntimeExports.jsx(dn, { className: o, code: i, language: t, raw: c, ...r2 }) })] }) });
@@ -45568,13 +45584,13 @@ function mergeProps(slotProps, childProps) {
45568
45584
  return { ...slotProps, ...overrideProps };
45569
45585
  }
45570
45586
  function getElementRef(element2) {
45571
- var _a3, _b;
45587
+ var _a3, _b2;
45572
45588
  let getter = (_a3 = Object.getOwnPropertyDescriptor(element2.props, "ref")) == null ? void 0 : _a3.get;
45573
45589
  let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
45574
45590
  if (mayWarn) {
45575
45591
  return element2.ref;
45576
45592
  }
45577
- getter = (_b = Object.getOwnPropertyDescriptor(element2, "ref")) == null ? void 0 : _b.get;
45593
+ getter = (_b2 = Object.getOwnPropertyDescriptor(element2, "ref")) == null ? void 0 : _b2.get;
45578
45594
  mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
45579
45595
  if (mayWarn) {
45580
45596
  return element2.props.ref;
@@ -46396,15 +46412,15 @@ currentExtensions[0] = (dateString) => {
46396
46412
  currentExtensions[1] = (epochSec) => {
46397
46413
  return new Date(Math.round(epochSec * 1e3));
46398
46414
  };
46399
- currentExtensions[2] = (buffer) => {
46415
+ currentExtensions[2] = (buffer2) => {
46400
46416
  let value = BigInt(0);
46401
- for (let i = 0, l = buffer.byteLength; i < l; i++) {
46402
- value = BigInt(buffer[i]) + (value << BigInt(8));
46417
+ for (let i = 0, l = buffer2.byteLength; i < l; i++) {
46418
+ value = BigInt(buffer2[i]) + (value << BigInt(8));
46403
46419
  }
46404
46420
  return value;
46405
46421
  };
46406
- currentExtensions[3] = (buffer) => {
46407
- return BigInt(-1) - currentExtensions[2](buffer);
46422
+ currentExtensions[3] = (buffer2) => {
46423
+ return BigInt(-1) - currentExtensions[2](buffer2);
46408
46424
  };
46409
46425
  currentExtensions[4] = (fraction) => {
46410
46426
  return +(fraction[1] + "e" + fraction[0]);
@@ -46591,19 +46607,19 @@ function registerTypedArray(TypedArray, tag) {
46591
46607
  if (!littleEndian && bytesPerElement == 1)
46592
46608
  continue;
46593
46609
  let sizeShift = bytesPerElement == 2 ? 1 : bytesPerElement == 4 ? 2 : bytesPerElement == 8 ? 3 : 0;
46594
- currentExtensions[littleEndian ? tag : tag - 4] = bytesPerElement == 1 || littleEndian == isLittleEndianMachine$1 ? (buffer) => {
46610
+ currentExtensions[littleEndian ? tag : tag - 4] = bytesPerElement == 1 || littleEndian == isLittleEndianMachine$1 ? (buffer2) => {
46595
46611
  if (!TypedArray)
46596
46612
  throw new Error("Could not find typed array for code " + tag);
46597
46613
  if (!currentDecoder.copyBuffers) {
46598
- if (bytesPerElement === 1 || bytesPerElement === 2 && !(buffer.byteOffset & 1) || bytesPerElement === 4 && !(buffer.byteOffset & 3) || bytesPerElement === 8 && !(buffer.byteOffset & 7))
46599
- return new TypedArray(buffer.buffer, buffer.byteOffset, buffer.byteLength >> sizeShift);
46614
+ if (bytesPerElement === 1 || bytesPerElement === 2 && !(buffer2.byteOffset & 1) || bytesPerElement === 4 && !(buffer2.byteOffset & 3) || bytesPerElement === 8 && !(buffer2.byteOffset & 7))
46615
+ return new TypedArray(buffer2.buffer, buffer2.byteOffset, buffer2.byteLength >> sizeShift);
46600
46616
  }
46601
- return new TypedArray(Uint8Array.prototype.slice.call(buffer, 0).buffer);
46602
- } : (buffer) => {
46617
+ return new TypedArray(Uint8Array.prototype.slice.call(buffer2, 0).buffer);
46618
+ } : (buffer2) => {
46603
46619
  if (!TypedArray)
46604
46620
  throw new Error("Could not find typed array for code " + tag);
46605
- let dv = new DataView(buffer.buffer, buffer.byteOffset, buffer.byteLength);
46606
- let elements = buffer.length >> sizeShift;
46621
+ let dv = new DataView(buffer2.buffer, buffer2.byteOffset, buffer2.byteLength);
46622
+ let elements = buffer2.length >> sizeShift;
46607
46623
  let ta = new TypedArray(elements);
46608
46624
  let method = dv[dvMethod];
46609
46625
  for (let i = 0; i < elements; i++) {
@@ -47552,8 +47568,8 @@ class Encoder extends Decoder {
47552
47568
  }
47553
47569
  }
47554
47570
  }
47555
- useBuffer(buffer) {
47556
- target = buffer;
47571
+ useBuffer(buffer2) {
47572
+ target = buffer2;
47557
47573
  targetView = new DataView(target.buffer, target.byteOffset, target.byteLength);
47558
47574
  position = 0;
47559
47575
  }
@@ -47819,13 +47835,13 @@ function typedArrayEncoder(tag, size2) {
47819
47835
  encode: function writeExtBuffer(typedArray, encode2) {
47820
47836
  let length = typedArray.byteLength;
47821
47837
  let offset2 = typedArray.byteOffset || 0;
47822
- let buffer = typedArray.buffer || typedArray;
47823
- encode2(hasNodeBuffer ? Buffer$1.from(buffer, offset2, length) : new Uint8Array(buffer, offset2, length));
47838
+ let buffer2 = typedArray.buffer || typedArray;
47839
+ encode2(hasNodeBuffer ? Buffer$1.from(buffer2, offset2, length) : new Uint8Array(buffer2, offset2, length));
47824
47840
  }
47825
47841
  };
47826
47842
  }
47827
- function writeBuffer(buffer, makeRoom) {
47828
- let length = buffer.byteLength;
47843
+ function writeBuffer(buffer2, makeRoom) {
47844
+ let length = buffer2.byteLength;
47829
47845
  if (length < 24) {
47830
47846
  target[position++] = 64 + length;
47831
47847
  } else if (length < 256) {
@@ -47843,7 +47859,7 @@ function writeBuffer(buffer, makeRoom) {
47843
47859
  if (position + length >= target.length) {
47844
47860
  makeRoom(position + length);
47845
47861
  }
47846
- target.set(buffer.buffer ? buffer : new Uint8Array(buffer), position);
47862
+ target.set(buffer2.buffer ? buffer2 : new Uint8Array(buffer2), position);
47847
47863
  position += length;
47848
47864
  }
47849
47865
  function insertIds(serialized, idsToInsert) {
@@ -47896,8 +47912,8 @@ async function rpc(method, params) {
47896
47912
  });
47897
47913
  if (!res.ok) {
47898
47914
  try {
47899
- const buffer2 = await res.arrayBuffer();
47900
- const errorBody = decode(new Uint8Array(buffer2));
47915
+ const buffer22 = await res.arrayBuffer();
47916
+ const errorBody = decode(new Uint8Array(buffer22));
47901
47917
  if ((_a3 = errorBody == null ? void 0 : errorBody.error) == null ? void 0 : _a3.message) {
47902
47918
  throw new Error(errorBody.error.message);
47903
47919
  }
@@ -47910,8 +47926,8 @@ async function rpc(method, params) {
47910
47926
  `RPC call ${method} failed: ${res.status} ${res.statusText}`
47911
47927
  );
47912
47928
  }
47913
- const buffer = await res.arrayBuffer();
47914
- return decode(new Uint8Array(buffer));
47929
+ const buffer2 = await res.arrayBuffer();
47930
+ return decode(new Uint8Array(buffer2));
47915
47931
  }
47916
47932
  async function fetchRuns(worldEnv, params) {
47917
47933
  return rpc("fetchRuns", { worldEnv, params });