@tanstack/query-devtools 5.32.1 → 5.37.1

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.
@@ -1,4 +1,4 @@
1
- // ../../node_modules/.pnpm/solid-js@1.8.14/node_modules/solid-js/dist/solid.js
1
+ // ../../node_modules/.pnpm/solid-js@1.8.17/node_modules/solid-js/dist/solid.js
2
2
  var sharedConfig = {
3
3
  context: void 0,
4
4
  registry: void 0
@@ -142,9 +142,11 @@ function createResource(pSource, pFetcher, pOptions) {
142
142
  pr = null;
143
143
  key !== void 0 && (resolved = true);
144
144
  if ((p === initP || v === initP) && options.onHydrated)
145
- queueMicrotask(() => options.onHydrated(key, {
146
- value: v
147
- }));
145
+ queueMicrotask(
146
+ () => options.onHydrated(key, {
147
+ value: v
148
+ })
149
+ );
148
150
  initP = NO_INIT;
149
151
  if (Transition && p && loadedUnderTransition) {
150
152
  Transition.promises.delete(p);
@@ -200,10 +202,12 @@ function createResource(pSource, pFetcher, pOptions) {
200
202
  }
201
203
  if (Transition && pr)
202
204
  Transition.promises.delete(pr);
203
- const p = initP !== NO_INIT ? initP : untrack(() => fetcher(lookup, {
204
- value: value(),
205
- refetching
206
- }));
205
+ const p = initP !== NO_INIT ? initP : untrack(
206
+ () => fetcher(lookup, {
207
+ value: value(),
208
+ refetching
209
+ })
210
+ );
207
211
  if (!isPromise(p)) {
208
212
  loadEnd(pr, p, void 0, lookup);
209
213
  return p;
@@ -222,7 +226,10 @@ function createResource(pSource, pFetcher, pOptions) {
222
226
  setState(resolved ? "refreshing" : "pending");
223
227
  trigger();
224
228
  }, false);
225
- return p.then((v) => loadEnd(p, v, void 0, lookup), (e) => loadEnd(p, void 0, castError(e), lookup));
229
+ return p.then(
230
+ (v) => loadEnd(p, v, void 0, lookup),
231
+ (e) => loadEnd(p, void 0, castError(e), lookup)
232
+ );
226
233
  }
227
234
  Object.defineProperties(read, {
228
235
  state: {
@@ -252,10 +259,13 @@ function createResource(pSource, pFetcher, pOptions) {
252
259
  createComputed(() => load(false));
253
260
  else
254
261
  load(false);
255
- return [read, {
256
- refetch: load,
257
- mutate: setValue
258
- }];
262
+ return [
263
+ read,
264
+ {
265
+ refetch: load,
266
+ mutate: setValue
267
+ }
268
+ ];
259
269
  }
260
270
  function batch(fn) {
261
271
  return runUpdates(fn, false);
@@ -287,7 +297,7 @@ function on(deps, fn, options) {
287
297
  input = deps();
288
298
  if (defer) {
289
299
  defer = false;
290
- return void 0;
300
+ return prevValue;
291
301
  }
292
302
  const result = untrack(() => fn(input, prevInput, prevValue));
293
303
  prevInput = input;
@@ -306,9 +316,6 @@ function onCleanup(fn) {
306
316
  Owner.cleanups.push(fn);
307
317
  return fn;
308
318
  }
309
- function getListener() {
310
- return Listener;
311
- }
312
319
  function getOwner() {
313
320
  return Owner;
314
321
  }
@@ -461,7 +468,11 @@ function updateComputation(node) {
461
468
  return;
462
469
  cleanNode(node);
463
470
  const time = ExecCount;
464
- runComputation(node, Transition && Transition.running && Transition.sources.has(node) ? node.tValue : node.value, time);
471
+ runComputation(
472
+ node,
473
+ Transition && Transition.running && Transition.sources.has(node) ? node.tValue : node.value,
474
+ time
475
+ );
465
476
  if (Transition && !Transition.running && Transition.sources.has(node)) {
466
477
  queueMicrotask(() => {
467
478
  runUpdates(() => {
@@ -839,13 +850,16 @@ function resolveChildren(children2) {
839
850
  function createProvider(id, options) {
840
851
  return function provider(props) {
841
852
  let res;
842
- createRenderEffect(() => res = untrack(() => {
843
- Owner.context = {
844
- ...Owner.context,
845
- [id]: props.value
846
- };
847
- return children(() => props.children);
848
- }), void 0);
853
+ createRenderEffect(
854
+ () => res = untrack(() => {
855
+ Owner.context = {
856
+ ...Owner.context,
857
+ [id]: props.value
858
+ };
859
+ return children(() => props.children);
860
+ }),
861
+ void 0
862
+ );
849
863
  return res;
850
864
  };
851
865
  }
@@ -1061,28 +1075,31 @@ function mergeProps(...sources) {
1061
1075
  sources[i] = typeof s === "function" ? (proxy = true, createMemo(s)) : s;
1062
1076
  }
1063
1077
  if (proxy) {
1064
- return new Proxy({
1065
- get(property) {
1066
- for (let i = sources.length - 1; i >= 0; i--) {
1067
- const v = resolveSource(sources[i])[property];
1068
- if (v !== void 0)
1069
- return v;
1070
- }
1071
- },
1072
- has(property) {
1073
- for (let i = sources.length - 1; i >= 0; i--) {
1074
- if (property in resolveSource(sources[i]))
1075
- return true;
1078
+ return new Proxy(
1079
+ {
1080
+ get(property) {
1081
+ for (let i = sources.length - 1; i >= 0; i--) {
1082
+ const v = resolveSource(sources[i])[property];
1083
+ if (v !== void 0)
1084
+ return v;
1085
+ }
1086
+ },
1087
+ has(property) {
1088
+ for (let i = sources.length - 1; i >= 0; i--) {
1089
+ if (property in resolveSource(sources[i]))
1090
+ return true;
1091
+ }
1092
+ return false;
1093
+ },
1094
+ keys() {
1095
+ const keys = [];
1096
+ for (let i = 0; i < sources.length; i++)
1097
+ keys.push(...Object.keys(resolveSource(sources[i])));
1098
+ return [...new Set(keys)];
1076
1099
  }
1077
- return false;
1078
1100
  },
1079
- keys() {
1080
- const keys = [];
1081
- for (let i = 0; i < sources.length; i++)
1082
- keys.push(...Object.keys(resolveSource(sources[i])));
1083
- return [...new Set(keys)];
1084
- }
1085
- }, propTraps);
1101
+ propTraps
1102
+ );
1086
1103
  }
1087
1104
  const sourcesMap = {};
1088
1105
  const defined = /* @__PURE__ */ Object.create(null);
@@ -1128,29 +1145,37 @@ function splitProps(props, ...keys) {
1128
1145
  if ($PROXY in props) {
1129
1146
  const blocked = new Set(keys.length > 1 ? keys.flat() : keys[0]);
1130
1147
  const res = keys.map((k) => {
1131
- return new Proxy({
1132
- get(property) {
1133
- return k.includes(property) ? props[property] : void 0;
1134
- },
1135
- has(property) {
1136
- return k.includes(property) && property in props;
1148
+ return new Proxy(
1149
+ {
1150
+ get(property) {
1151
+ return k.includes(property) ? props[property] : void 0;
1152
+ },
1153
+ has(property) {
1154
+ return k.includes(property) && property in props;
1155
+ },
1156
+ keys() {
1157
+ return k.filter((property) => property in props);
1158
+ }
1137
1159
  },
1138
- keys() {
1139
- return k.filter((property) => property in props);
1140
- }
1141
- }, propTraps);
1160
+ propTraps
1161
+ );
1142
1162
  });
1143
- res.push(new Proxy({
1144
- get(property) {
1145
- return blocked.has(property) ? void 0 : props[property];
1146
- },
1147
- has(property) {
1148
- return blocked.has(property) ? false : property in props;
1149
- },
1150
- keys() {
1151
- return Object.keys(props).filter((k) => !blocked.has(k));
1152
- }
1153
- }, propTraps));
1163
+ res.push(
1164
+ new Proxy(
1165
+ {
1166
+ get(property) {
1167
+ return blocked.has(property) ? void 0 : props[property];
1168
+ },
1169
+ has(property) {
1170
+ return blocked.has(property) ? false : property in props;
1171
+ },
1172
+ keys() {
1173
+ return Object.keys(props).filter((k) => !blocked.has(k));
1174
+ }
1175
+ },
1176
+ propTraps
1177
+ )
1178
+ );
1154
1179
  return res;
1155
1180
  }
1156
1181
  const otherObject = {};
@@ -1194,17 +1219,19 @@ function lazy(fn) {
1194
1219
  comp = s;
1195
1220
  }
1196
1221
  let Comp;
1197
- return createMemo(() => (Comp = comp()) && untrack(() => {
1198
- if (false)
1199
- ;
1200
- if (!ctx)
1201
- return Comp(props);
1202
- const c = sharedConfig.context;
1203
- setHydrateContext(ctx);
1204
- const r = Comp(props);
1205
- setHydrateContext(c);
1206
- return r;
1207
- }));
1222
+ return createMemo(
1223
+ () => (Comp = comp()) && untrack(() => {
1224
+ if (false)
1225
+ ;
1226
+ if (!ctx)
1227
+ return Comp(props);
1228
+ const c = sharedConfig.context;
1229
+ setHydrateContext(ctx);
1230
+ const r = Comp(props);
1231
+ setHydrateContext(c);
1232
+ return r;
1233
+ })
1234
+ );
1208
1235
  };
1209
1236
  wrap.preload = () => p || ((p = fn()).then((mod) => comp = () => mod.default), p);
1210
1237
  return wrap;
@@ -1232,60 +1259,120 @@ function Show(props) {
1232
1259
  const condition = createMemo(() => props.when, void 0, {
1233
1260
  equals: (a, b) => keyed ? a === b : !a === !b
1234
1261
  });
1235
- return createMemo(() => {
1236
- const c = condition();
1237
- if (c) {
1238
- const child = props.children;
1239
- const fn = typeof child === "function" && child.length > 0;
1240
- return fn ? untrack(() => child(keyed ? c : () => {
1241
- if (!untrack(condition))
1242
- throw narrowedError("Show");
1243
- return props.when;
1244
- })) : child;
1245
- }
1246
- return props.fallback;
1247
- }, void 0, void 0);
1262
+ return createMemo(
1263
+ () => {
1264
+ const c = condition();
1265
+ if (c) {
1266
+ const child = props.children;
1267
+ const fn = typeof child === "function" && child.length > 0;
1268
+ return fn ? untrack(
1269
+ () => child(
1270
+ keyed ? c : () => {
1271
+ if (!untrack(condition))
1272
+ throw narrowedError("Show");
1273
+ return props.when;
1274
+ }
1275
+ )
1276
+ ) : child;
1277
+ }
1278
+ return props.fallback;
1279
+ },
1280
+ void 0,
1281
+ void 0
1282
+ );
1248
1283
  }
1249
1284
  function Switch(props) {
1250
1285
  let keyed = false;
1251
1286
  const equals = (a, b) => (keyed ? a[1] === b[1] : !a[1] === !b[1]) && a[2] === b[2];
1252
- const conditions = children(() => props.children), evalConditions = createMemo(() => {
1253
- let conds = conditions();
1254
- if (!Array.isArray(conds))
1255
- conds = [conds];
1256
- for (let i = 0; i < conds.length; i++) {
1257
- const c = conds[i].when;
1258
- if (c) {
1259
- keyed = !!conds[i].keyed;
1260
- return [i, c, conds[i]];
1287
+ const conditions = children(() => props.children), evalConditions = createMemo(
1288
+ () => {
1289
+ let conds = conditions();
1290
+ if (!Array.isArray(conds))
1291
+ conds = [conds];
1292
+ for (let i = 0; i < conds.length; i++) {
1293
+ const c = conds[i].when;
1294
+ if (c) {
1295
+ keyed = !!conds[i].keyed;
1296
+ return [i, c, conds[i]];
1297
+ }
1261
1298
  }
1262
- }
1263
- return [-1];
1264
- }, void 0, {
1265
- equals
1266
- });
1267
- return createMemo(() => {
1268
- const [index, when, cond] = evalConditions();
1269
- if (index < 0)
1270
- return props.fallback;
1271
- const c = cond.children;
1272
- const fn = typeof c === "function" && c.length > 0;
1273
- return fn ? untrack(() => c(keyed ? when : () => {
1274
- if (untrack(evalConditions)[0] !== index)
1275
- throw narrowedError("Match");
1276
- return cond.when;
1277
- })) : c;
1278
- }, void 0, void 0);
1299
+ return [-1];
1300
+ },
1301
+ void 0,
1302
+ {
1303
+ equals
1304
+ }
1305
+ );
1306
+ return createMemo(
1307
+ () => {
1308
+ const [index, when, cond] = evalConditions();
1309
+ if (index < 0)
1310
+ return props.fallback;
1311
+ const c = cond.children;
1312
+ const fn = typeof c === "function" && c.length > 0;
1313
+ return fn ? untrack(
1314
+ () => c(
1315
+ keyed ? when : () => {
1316
+ if (untrack(evalConditions)[0] !== index)
1317
+ throw narrowedError("Match");
1318
+ return cond.when;
1319
+ }
1320
+ )
1321
+ ) : c;
1322
+ },
1323
+ void 0,
1324
+ void 0
1325
+ );
1279
1326
  }
1280
1327
  function Match(props) {
1281
1328
  return props;
1282
1329
  }
1283
1330
  var DEV = void 0;
1284
1331
 
1285
- // ../../node_modules/.pnpm/solid-js@1.8.14/node_modules/solid-js/web/dist/web.js
1286
- var booleans = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden", "indeterminate", "inert", "ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "seamless", "selected"];
1287
- var Properties = /* @__PURE__ */ new Set(["className", "value", "readOnly", "formNoValidate", "isMap", "noModule", "playsInline", ...booleans]);
1288
- var ChildProperties = /* @__PURE__ */ new Set(["innerHTML", "textContent", "innerText", "children"]);
1332
+ // ../../node_modules/.pnpm/solid-js@1.8.17/node_modules/solid-js/web/dist/web.js
1333
+ var booleans = [
1334
+ "allowfullscreen",
1335
+ "async",
1336
+ "autofocus",
1337
+ "autoplay",
1338
+ "checked",
1339
+ "controls",
1340
+ "default",
1341
+ "disabled",
1342
+ "formnovalidate",
1343
+ "hidden",
1344
+ "indeterminate",
1345
+ "inert",
1346
+ "ismap",
1347
+ "loop",
1348
+ "multiple",
1349
+ "muted",
1350
+ "nomodule",
1351
+ "novalidate",
1352
+ "open",
1353
+ "playsinline",
1354
+ "readonly",
1355
+ "required",
1356
+ "reversed",
1357
+ "seamless",
1358
+ "selected"
1359
+ ];
1360
+ var Properties = /* @__PURE__ */ new Set([
1361
+ "className",
1362
+ "value",
1363
+ "readOnly",
1364
+ "formNoValidate",
1365
+ "isMap",
1366
+ "noModule",
1367
+ "playsInline",
1368
+ ...booleans
1369
+ ]);
1370
+ var ChildProperties = /* @__PURE__ */ new Set([
1371
+ "innerHTML",
1372
+ "textContent",
1373
+ "innerText",
1374
+ "children"
1375
+ ]);
1289
1376
  var Aliases = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
1290
1377
  className: "class",
1291
1378
  htmlFor: "for"
@@ -1319,7 +1406,30 @@ function getPropAlias(prop, tagName) {
1319
1406
  const a = PropAliases[prop];
1320
1407
  return typeof a === "object" ? a[tagName] ? a["$"] : void 0 : a;
1321
1408
  }
1322
- var DelegatedEvents = /* @__PURE__ */ new Set(["beforeinput", "click", "dblclick", "contextmenu", "focusin", "focusout", "input", "keydown", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "pointerdown", "pointermove", "pointerout", "pointerover", "pointerup", "touchend", "touchmove", "touchstart"]);
1409
+ var DelegatedEvents = /* @__PURE__ */ new Set([
1410
+ "beforeinput",
1411
+ "click",
1412
+ "dblclick",
1413
+ "contextmenu",
1414
+ "focusin",
1415
+ "focusout",
1416
+ "input",
1417
+ "keydown",
1418
+ "keyup",
1419
+ "mousedown",
1420
+ "mousemove",
1421
+ "mouseout",
1422
+ "mouseover",
1423
+ "mouseup",
1424
+ "pointerdown",
1425
+ "pointermove",
1426
+ "pointerout",
1427
+ "pointerover",
1428
+ "pointerup",
1429
+ "touchend",
1430
+ "touchmove",
1431
+ "touchstart"
1432
+ ]);
1323
1433
  var SVGElements = /* @__PURE__ */ new Set([
1324
1434
  "altGlyph",
1325
1435
  "altGlyphDef",
@@ -1343,6 +1453,7 @@ var SVGElements = /* @__PURE__ */ new Set([
1343
1453
  "feDiffuseLighting",
1344
1454
  "feDisplacementMap",
1345
1455
  "feDistantLight",
1456
+ "feDropShadow",
1346
1457
  "feFlood",
1347
1458
  "feFuncA",
1348
1459
  "feFuncB",
@@ -1499,7 +1610,7 @@ function clearDelegatedEvents(document2 = window.document) {
1499
1610
  }
1500
1611
  }
1501
1612
  function setAttribute(node, name, value) {
1502
- if (sharedConfig.context)
1613
+ if (!!sharedConfig.context && node.isConnected)
1503
1614
  return;
1504
1615
  if (value == null)
1505
1616
  node.removeAttribute(name);
@@ -1507,7 +1618,7 @@ function setAttribute(node, name, value) {
1507
1618
  node.setAttribute(name, value);
1508
1619
  }
1509
1620
  function setAttributeNS(node, namespace, name, value) {
1510
- if (sharedConfig.context)
1621
+ if (!!sharedConfig.context && node.isConnected)
1511
1622
  return;
1512
1623
  if (value == null)
1513
1624
  node.removeAttributeNS(namespace, name);
@@ -1515,7 +1626,7 @@ function setAttributeNS(node, namespace, name, value) {
1515
1626
  node.setAttributeNS(namespace, name, value);
1516
1627
  }
1517
1628
  function className(node, value) {
1518
- if (sharedConfig.context)
1629
+ if (!!sharedConfig.context && node.isConnected)
1519
1630
  return;
1520
1631
  if (value == null)
1521
1632
  node.removeAttribute("class");
@@ -1580,9 +1691,13 @@ function style(node, value, prev) {
1580
1691
  function spread(node, props = {}, isSVG, skipChildren) {
1581
1692
  const prevProps = {};
1582
1693
  if (!skipChildren) {
1583
- createRenderEffect(() => prevProps.children = insertExpression(node, props.children, prevProps.children));
1694
+ createRenderEffect(
1695
+ () => prevProps.children = insertExpression(node, props.children, prevProps.children)
1696
+ );
1584
1697
  }
1585
- createRenderEffect(() => props.ref && props.ref(node));
1698
+ createRenderEffect(
1699
+ () => typeof props.ref === "function" ? use(props.ref, node) : props.ref = node
1700
+ );
1586
1701
  createRenderEffect(() => assign(node, props, isSVG, true, prevProps, true));
1587
1702
  return prevProps;
1588
1703
  }
@@ -1669,7 +1784,7 @@ function assignProp(node, prop, value, prev, isSVG, skipRef) {
1669
1784
  if (forceProp) {
1670
1785
  prop = prop.slice(5);
1671
1786
  isProp = true;
1672
- } else if (sharedConfig.context)
1787
+ } else if (!!sharedConfig.context && node.isConnected)
1673
1788
  return value;
1674
1789
  if (prop === "class" || prop === "className")
1675
1790
  className(node, value);
@@ -1715,7 +1830,8 @@ function eventHandler(e) {
1715
1830
  }
1716
1831
  }
1717
1832
  function insertExpression(parent, value, current, marker, unwrapArray) {
1718
- if (sharedConfig.context) {
1833
+ const hydrating = !!sharedConfig.context && parent.isConnected;
1834
+ if (hydrating) {
1719
1835
  !current && (current = [...parent.childNodes]);
1720
1836
  let cleaned = [];
1721
1837
  for (let i = 0; i < current.length; i++) {
@@ -1734,7 +1850,7 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
1734
1850
  const t = typeof value, multi = marker !== void 0;
1735
1851
  parent = multi && current[0] && current[0].parentNode || parent;
1736
1852
  if (t === "string" || t === "number") {
1737
- if (sharedConfig.context)
1853
+ if (hydrating)
1738
1854
  return current;
1739
1855
  if (t === "number")
1740
1856
  value = value.toString();
@@ -1752,7 +1868,7 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
1752
1868
  current = parent.textContent = value;
1753
1869
  }
1754
1870
  } else if (value == null || t === "boolean") {
1755
- if (sharedConfig.context)
1871
+ if (hydrating)
1756
1872
  return current;
1757
1873
  current = cleanChildren(parent, current, marker);
1758
1874
  } else if (t === "function") {
@@ -1770,7 +1886,7 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
1770
1886
  createRenderEffect(() => current = insertExpression(parent, array, current, marker, true));
1771
1887
  return () => current;
1772
1888
  }
1773
- if (sharedConfig.context) {
1889
+ if (hydrating) {
1774
1890
  if (!array.length)
1775
1891
  return current;
1776
1892
  if (marker === void 0)
@@ -1796,7 +1912,7 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
1796
1912
  }
1797
1913
  current = array;
1798
1914
  } else if (value.nodeType) {
1799
- if (sharedConfig.context && value.parentNode)
1915
+ if (hydrating && value.parentNode)
1800
1916
  return current = multi ? [value] : value;
1801
1917
  if (Array.isArray(current)) {
1802
1918
  if (multi)
@@ -1814,7 +1930,7 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
1814
1930
  function normalizeIncomingArray(normalized, array, current, unwrap) {
1815
1931
  let dynamic = false;
1816
1932
  for (let i = 0, len = array.length; i < len; i++) {
1817
- let item = array[i], prev = current && current[i], t;
1933
+ let item = array[i], prev = current && current[normalized.length], t;
1818
1934
  if (item == null || item === true || item === false)
1819
1935
  ;
1820
1936
  else if ((t = typeof item) === "object" && item.nodeType) {
@@ -1825,7 +1941,11 @@ function normalizeIncomingArray(normalized, array, current, unwrap) {
1825
1941
  if (unwrap) {
1826
1942
  while (typeof item === "function")
1827
1943
  item = item();
1828
- dynamic = normalizeIncomingArray(normalized, Array.isArray(item) ? item : [item], Array.isArray(prev) ? prev : [prev]) || dynamic;
1944
+ dynamic = normalizeIncomingArray(
1945
+ normalized,
1946
+ Array.isArray(item) ? item : [item],
1947
+ Array.isArray(prev) ? prev : [prev]
1948
+ ) || dynamic;
1829
1949
  } else {
1830
1950
  normalized.push(item);
1831
1951
  dynamic = true;
@@ -1875,39 +1995,41 @@ function createElement(tagName, isSVG = false) {
1875
1995
  return isSVG ? document.createElementNS(SVG_NAMESPACE, tagName) : document.createElement(tagName);
1876
1996
  }
1877
1997
  function Portal(props) {
1878
- const {
1879
- useShadow
1880
- } = props, marker = document.createTextNode(""), mount = () => props.mount || document.body, owner = getOwner();
1998
+ const { useShadow } = props, marker = document.createTextNode(""), mount = () => props.mount || document.body, owner = getOwner();
1881
1999
  let content;
1882
2000
  let hydrating = !!sharedConfig.context;
1883
- createEffect(() => {
1884
- if (hydrating)
1885
- getOwner().user = hydrating = false;
1886
- content || (content = runWithOwner(owner, () => createMemo(() => props.children)));
1887
- const el = mount();
1888
- if (el instanceof HTMLHeadElement) {
1889
- const [clean, setClean] = createSignal(false);
1890
- const cleanup = () => setClean(true);
1891
- createRoot((dispose2) => insert(el, () => !clean() ? content() : dispose2(), null));
1892
- onCleanup(cleanup);
1893
- } else {
1894
- const container = createElement(props.isSVG ? "g" : "div", props.isSVG), renderRoot = useShadow && container.attachShadow ? container.attachShadow({
1895
- mode: "open"
1896
- }) : container;
1897
- Object.defineProperty(container, "_$host", {
1898
- get() {
1899
- return marker.parentNode;
1900
- },
1901
- configurable: true
1902
- });
1903
- insert(renderRoot, content);
1904
- el.appendChild(container);
1905
- props.ref && props.ref(container);
1906
- onCleanup(() => el.removeChild(container));
2001
+ createEffect(
2002
+ () => {
2003
+ if (hydrating)
2004
+ getOwner().user = hydrating = false;
2005
+ content || (content = runWithOwner(owner, () => createMemo(() => props.children)));
2006
+ const el = mount();
2007
+ if (el instanceof HTMLHeadElement) {
2008
+ const [clean, setClean] = createSignal(false);
2009
+ const cleanup = () => setClean(true);
2010
+ createRoot((dispose2) => insert(el, () => !clean() ? content() : dispose2(), null));
2011
+ onCleanup(cleanup);
2012
+ } else {
2013
+ const container = createElement(props.isSVG ? "g" : "div", props.isSVG), renderRoot = useShadow && container.attachShadow ? container.attachShadow({
2014
+ mode: "open"
2015
+ }) : container;
2016
+ Object.defineProperty(container, "_$host", {
2017
+ get() {
2018
+ return marker.parentNode;
2019
+ },
2020
+ configurable: true
2021
+ });
2022
+ insert(renderRoot, content);
2023
+ el.appendChild(container);
2024
+ props.ref && props.ref(container);
2025
+ onCleanup(() => el.removeChild(container));
2026
+ }
2027
+ },
2028
+ void 0,
2029
+ {
2030
+ render: !hydrating
1907
2031
  }
1908
- }, void 0, {
1909
- render: !hydrating
1910
- });
2032
+ );
1911
2033
  return marker;
1912
2034
  }
1913
2035
  function Dynamic(props) {
@@ -1927,140 +2049,82 @@ function Dynamic(props) {
1927
2049
  });
1928
2050
  }
1929
2051
 
1930
- // ../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/double-indexed-kv.js
1931
- var DoubleIndexedKV = (
1932
- /** @class */
1933
- function() {
1934
- function DoubleIndexedKV2() {
1935
- this.keyToValue = /* @__PURE__ */ new Map();
1936
- this.valueToKey = /* @__PURE__ */ new Map();
1937
- }
1938
- DoubleIndexedKV2.prototype.set = function(key, value) {
1939
- this.keyToValue.set(key, value);
1940
- this.valueToKey.set(value, key);
1941
- };
1942
- DoubleIndexedKV2.prototype.getByKey = function(key) {
1943
- return this.keyToValue.get(key);
1944
- };
1945
- DoubleIndexedKV2.prototype.getByValue = function(value) {
1946
- return this.valueToKey.get(value);
1947
- };
1948
- DoubleIndexedKV2.prototype.clear = function() {
1949
- this.keyToValue.clear();
1950
- this.valueToKey.clear();
1951
- };
1952
- return DoubleIndexedKV2;
1953
- }()
1954
- );
2052
+ // ../../node_modules/.pnpm/superjson@2.2.1/node_modules/superjson/dist/double-indexed-kv.js
2053
+ var DoubleIndexedKV = class {
2054
+ constructor() {
2055
+ this.keyToValue = /* @__PURE__ */ new Map();
2056
+ this.valueToKey = /* @__PURE__ */ new Map();
2057
+ }
2058
+ set(key, value) {
2059
+ this.keyToValue.set(key, value);
2060
+ this.valueToKey.set(value, key);
2061
+ }
2062
+ getByKey(key) {
2063
+ return this.keyToValue.get(key);
2064
+ }
2065
+ getByValue(value) {
2066
+ return this.valueToKey.get(value);
2067
+ }
2068
+ clear() {
2069
+ this.keyToValue.clear();
2070
+ this.valueToKey.clear();
2071
+ }
2072
+ };
1955
2073
 
1956
- // ../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/registry.js
1957
- var Registry = (
1958
- /** @class */
1959
- function() {
1960
- function Registry2(generateIdentifier) {
1961
- this.generateIdentifier = generateIdentifier;
1962
- this.kv = new DoubleIndexedKV();
1963
- }
1964
- Registry2.prototype.register = function(value, identifier) {
1965
- if (this.kv.getByValue(value)) {
1966
- return;
1967
- }
1968
- if (!identifier) {
1969
- identifier = this.generateIdentifier(value);
1970
- }
1971
- this.kv.set(identifier, value);
1972
- };
1973
- Registry2.prototype.clear = function() {
1974
- this.kv.clear();
1975
- };
1976
- Registry2.prototype.getIdentifier = function(value) {
1977
- return this.kv.getByValue(value);
1978
- };
1979
- Registry2.prototype.getValue = function(identifier) {
1980
- return this.kv.getByKey(identifier);
1981
- };
1982
- return Registry2;
1983
- }()
1984
- );
2074
+ // ../../node_modules/.pnpm/superjson@2.2.1/node_modules/superjson/dist/registry.js
2075
+ var Registry = class {
2076
+ constructor(generateIdentifier) {
2077
+ this.generateIdentifier = generateIdentifier;
2078
+ this.kv = new DoubleIndexedKV();
2079
+ }
2080
+ register(value, identifier) {
2081
+ if (this.kv.getByValue(value)) {
2082
+ return;
2083
+ }
2084
+ if (!identifier) {
2085
+ identifier = this.generateIdentifier(value);
2086
+ }
2087
+ this.kv.set(identifier, value);
2088
+ }
2089
+ clear() {
2090
+ this.kv.clear();
2091
+ }
2092
+ getIdentifier(value) {
2093
+ return this.kv.getByValue(value);
2094
+ }
2095
+ getValue(identifier) {
2096
+ return this.kv.getByKey(identifier);
2097
+ }
2098
+ };
1985
2099
 
1986
- // ../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/class-registry.js
1987
- var __extends = /* @__PURE__ */ function() {
1988
- var extendStatics = function(d, b) {
1989
- extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
1990
- d2.__proto__ = b2;
1991
- } || function(d2, b2) {
1992
- for (var p in b2)
1993
- if (Object.prototype.hasOwnProperty.call(b2, p))
1994
- d2[p] = b2[p];
1995
- };
1996
- return extendStatics(d, b);
1997
- };
1998
- return function(d, b) {
1999
- if (typeof b !== "function" && b !== null)
2000
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
2001
- extendStatics(d, b);
2002
- function __() {
2003
- this.constructor = d;
2004
- }
2005
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
2006
- };
2007
- }();
2008
- var ClassRegistry = (
2009
- /** @class */
2010
- function(_super) {
2011
- __extends(ClassRegistry2, _super);
2012
- function ClassRegistry2() {
2013
- var _this = _super.call(this, function(c) {
2014
- return c.name;
2015
- }) || this;
2016
- _this.classToAllowedProps = /* @__PURE__ */ new Map();
2017
- return _this;
2018
- }
2019
- ClassRegistry2.prototype.register = function(value, options) {
2020
- if (typeof options === "object") {
2021
- if (options.allowProps) {
2022
- this.classToAllowedProps.set(value, options.allowProps);
2023
- }
2024
- _super.prototype.register.call(this, value, options.identifier);
2025
- } else {
2026
- _super.prototype.register.call(this, value, options);
2100
+ // ../../node_modules/.pnpm/superjson@2.2.1/node_modules/superjson/dist/class-registry.js
2101
+ var ClassRegistry = class extends Registry {
2102
+ constructor() {
2103
+ super((c) => c.name);
2104
+ this.classToAllowedProps = /* @__PURE__ */ new Map();
2105
+ }
2106
+ register(value, options) {
2107
+ if (typeof options === "object") {
2108
+ if (options.allowProps) {
2109
+ this.classToAllowedProps.set(value, options.allowProps);
2027
2110
  }
2028
- };
2029
- ClassRegistry2.prototype.getAllowedProps = function(value) {
2030
- return this.classToAllowedProps.get(value);
2031
- };
2032
- return ClassRegistry2;
2033
- }(Registry)
2034
- );
2035
-
2036
- // ../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/util.js
2037
- var __read = function(o, n) {
2038
- var m = typeof Symbol === "function" && o[Symbol.iterator];
2039
- if (!m)
2040
- return o;
2041
- var i = m.call(o), r, ar = [], e;
2042
- try {
2043
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
2044
- ar.push(r.value);
2045
- } catch (error) {
2046
- e = { error };
2047
- } finally {
2048
- try {
2049
- if (r && !r.done && (m = i["return"]))
2050
- m.call(i);
2051
- } finally {
2052
- if (e)
2053
- throw e.error;
2111
+ super.register(value, options.identifier);
2112
+ } else {
2113
+ super.register(value, options);
2054
2114
  }
2055
2115
  }
2056
- return ar;
2116
+ getAllowedProps(value) {
2117
+ return this.classToAllowedProps.get(value);
2118
+ }
2057
2119
  };
2120
+
2121
+ // ../../node_modules/.pnpm/superjson@2.2.1/node_modules/superjson/dist/util.js
2058
2122
  function valuesOfObj(record) {
2059
2123
  if ("values" in Object) {
2060
2124
  return Object.values(record);
2061
2125
  }
2062
- var values = [];
2063
- for (var key in record) {
2126
+ const values = [];
2127
+ for (const key in record) {
2064
2128
  if (record.hasOwnProperty(key)) {
2065
2129
  values.push(record[key]);
2066
2130
  }
@@ -2068,13 +2132,13 @@ function valuesOfObj(record) {
2068
2132
  return values;
2069
2133
  }
2070
2134
  function find(record, predicate) {
2071
- var values = valuesOfObj(record);
2135
+ const values = valuesOfObj(record);
2072
2136
  if ("find" in values) {
2073
2137
  return values.find(predicate);
2074
2138
  }
2075
- var valuesNotNever = values;
2076
- for (var i = 0; i < valuesNotNever.length; i++) {
2077
- var value = valuesNotNever[i];
2139
+ const valuesNotNever = values;
2140
+ for (let i = 0; i < valuesNotNever.length; i++) {
2141
+ const value = valuesNotNever[i];
2078
2142
  if (predicate(value)) {
2079
2143
  return value;
2080
2144
  }
@@ -2082,17 +2146,14 @@ function find(record, predicate) {
2082
2146
  return void 0;
2083
2147
  }
2084
2148
  function forEach(record, run) {
2085
- Object.entries(record).forEach(function(_a) {
2086
- var _b = __read(_a, 2), key = _b[0], value = _b[1];
2087
- return run(value, key);
2088
- });
2149
+ Object.entries(record).forEach(([key, value]) => run(value, key));
2089
2150
  }
2090
2151
  function includes(arr, value) {
2091
2152
  return arr.indexOf(value) !== -1;
2092
2153
  }
2093
2154
  function findArr(record, predicate) {
2094
- for (var i = 0; i < record.length; i++) {
2095
- var value = record[i];
2155
+ for (let i = 0; i < record.length; i++) {
2156
+ const value = record[i];
2096
2157
  if (predicate(value)) {
2097
2158
  return value;
2098
2159
  }
@@ -2100,39 +2161,27 @@ function findArr(record, predicate) {
2100
2161
  return void 0;
2101
2162
  }
2102
2163
 
2103
- // ../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/custom-transformer-registry.js
2104
- var CustomTransformerRegistry = (
2105
- /** @class */
2106
- function() {
2107
- function CustomTransformerRegistry2() {
2108
- this.transfomers = {};
2109
- }
2110
- CustomTransformerRegistry2.prototype.register = function(transformer) {
2111
- this.transfomers[transformer.name] = transformer;
2112
- };
2113
- CustomTransformerRegistry2.prototype.findApplicable = function(v) {
2114
- return find(this.transfomers, function(transformer) {
2115
- return transformer.isApplicable(v);
2116
- });
2117
- };
2118
- CustomTransformerRegistry2.prototype.findByName = function(name) {
2119
- return this.transfomers[name];
2120
- };
2121
- return CustomTransformerRegistry2;
2122
- }()
2123
- );
2124
-
2125
- // ../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/is.js
2126
- var getType = function(payload) {
2127
- return Object.prototype.toString.call(payload).slice(8, -1);
2128
- };
2129
- var isUndefined = function(payload) {
2130
- return typeof payload === "undefined";
2131
- };
2132
- var isNull = function(payload) {
2133
- return payload === null;
2164
+ // ../../node_modules/.pnpm/superjson@2.2.1/node_modules/superjson/dist/custom-transformer-registry.js
2165
+ var CustomTransformerRegistry = class {
2166
+ constructor() {
2167
+ this.transfomers = {};
2168
+ }
2169
+ register(transformer) {
2170
+ this.transfomers[transformer.name] = transformer;
2171
+ }
2172
+ findApplicable(v) {
2173
+ return find(this.transfomers, (transformer) => transformer.isApplicable(v));
2174
+ }
2175
+ findByName(name) {
2176
+ return this.transfomers[name];
2177
+ }
2134
2178
  };
2135
- var isPlainObject = function(payload) {
2179
+
2180
+ // ../../node_modules/.pnpm/superjson@2.2.1/node_modules/superjson/dist/is.js
2181
+ var getType = (payload) => Object.prototype.toString.call(payload).slice(8, -1);
2182
+ var isUndefined = (payload) => typeof payload === "undefined";
2183
+ var isNull = (payload) => payload === null;
2184
+ var isPlainObject = (payload) => {
2136
2185
  if (typeof payload !== "object" || payload === null)
2137
2186
  return false;
2138
2187
  if (payload === Object.prototype)
@@ -2141,77 +2190,39 @@ var isPlainObject = function(payload) {
2141
2190
  return true;
2142
2191
  return Object.getPrototypeOf(payload) === Object.prototype;
2143
2192
  };
2144
- var isEmptyObject = function(payload) {
2145
- return isPlainObject(payload) && Object.keys(payload).length === 0;
2146
- };
2147
- var isArray = function(payload) {
2148
- return Array.isArray(payload);
2149
- };
2150
- var isString = function(payload) {
2151
- return typeof payload === "string";
2152
- };
2153
- var isNumber = function(payload) {
2154
- return typeof payload === "number" && !isNaN(payload);
2155
- };
2156
- var isBoolean = function(payload) {
2157
- return typeof payload === "boolean";
2158
- };
2159
- var isRegExp = function(payload) {
2160
- return payload instanceof RegExp;
2161
- };
2162
- var isMap = function(payload) {
2163
- return payload instanceof Map;
2164
- };
2165
- var isSet = function(payload) {
2166
- return payload instanceof Set;
2167
- };
2168
- var isSymbol = function(payload) {
2169
- return getType(payload) === "Symbol";
2170
- };
2171
- var isDate = function(payload) {
2172
- return payload instanceof Date && !isNaN(payload.valueOf());
2173
- };
2174
- var isError = function(payload) {
2175
- return payload instanceof Error;
2176
- };
2177
- var isNaNValue = function(payload) {
2178
- return typeof payload === "number" && isNaN(payload);
2179
- };
2180
- var isPrimitive = function(payload) {
2181
- return isBoolean(payload) || isNull(payload) || isUndefined(payload) || isNumber(payload) || isString(payload) || isSymbol(payload);
2182
- };
2183
- var isBigint = function(payload) {
2184
- return typeof payload === "bigint";
2185
- };
2186
- var isInfinite = function(payload) {
2187
- return payload === Infinity || payload === -Infinity;
2188
- };
2189
- var isTypedArray = function(payload) {
2190
- return ArrayBuffer.isView(payload) && !(payload instanceof DataView);
2191
- };
2192
- var isURL = function(payload) {
2193
- return payload instanceof URL;
2194
- };
2193
+ var isEmptyObject = (payload) => isPlainObject(payload) && Object.keys(payload).length === 0;
2194
+ var isArray = (payload) => Array.isArray(payload);
2195
+ var isString = (payload) => typeof payload === "string";
2196
+ var isNumber = (payload) => typeof payload === "number" && !isNaN(payload);
2197
+ var isBoolean = (payload) => typeof payload === "boolean";
2198
+ var isRegExp = (payload) => payload instanceof RegExp;
2199
+ var isMap = (payload) => payload instanceof Map;
2200
+ var isSet = (payload) => payload instanceof Set;
2201
+ var isSymbol = (payload) => getType(payload) === "Symbol";
2202
+ var isDate = (payload) => payload instanceof Date && !isNaN(payload.valueOf());
2203
+ var isError = (payload) => payload instanceof Error;
2204
+ var isNaNValue = (payload) => typeof payload === "number" && isNaN(payload);
2205
+ var isPrimitive = (payload) => isBoolean(payload) || isNull(payload) || isUndefined(payload) || isNumber(payload) || isString(payload) || isSymbol(payload);
2206
+ var isBigint = (payload) => typeof payload === "bigint";
2207
+ var isInfinite = (payload) => payload === Infinity || payload === -Infinity;
2208
+ var isTypedArray = (payload) => ArrayBuffer.isView(payload) && !(payload instanceof DataView);
2209
+ var isURL = (payload) => payload instanceof URL;
2195
2210
 
2196
- // ../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/pathstringifier.js
2197
- var escapeKey = function(key) {
2198
- return key.replace(/\./g, "\\.");
2199
- };
2200
- var stringifyPath = function(path) {
2201
- return path.map(String).map(escapeKey).join(".");
2202
- };
2203
- var parsePath = function(string) {
2204
- var result = [];
2205
- var segment = "";
2206
- for (var i = 0; i < string.length; i++) {
2207
- var char = string.charAt(i);
2208
- var isEscapedDot = char === "\\" && string.charAt(i + 1) === ".";
2211
+ // ../../node_modules/.pnpm/superjson@2.2.1/node_modules/superjson/dist/pathstringifier.js
2212
+ var escapeKey = (key) => key.replace(/\./g, "\\.");
2213
+ var stringifyPath = (path) => path.map(String).map(escapeKey).join(".");
2214
+ var parsePath = (string) => {
2215
+ const result = [];
2216
+ let segment = "";
2217
+ for (let i = 0; i < string.length; i++) {
2218
+ let char = string.charAt(i);
2219
+ const isEscapedDot = char === "\\" && string.charAt(i + 1) === ".";
2209
2220
  if (isEscapedDot) {
2210
2221
  segment += ".";
2211
2222
  i++;
2212
2223
  continue;
2213
2224
  }
2214
- var isEndOfSegment = char === ".";
2225
+ const isEndOfSegment = char === ".";
2215
2226
  if (isEndOfSegment) {
2216
2227
  result.push(segment);
2217
2228
  segment = "";
@@ -2219,50 +2230,12 @@ var parsePath = function(string) {
2219
2230
  }
2220
2231
  segment += char;
2221
2232
  }
2222
- var lastSegment = segment;
2233
+ const lastSegment = segment;
2223
2234
  result.push(lastSegment);
2224
2235
  return result;
2225
2236
  };
2226
2237
 
2227
- // ../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/transformer.js
2228
- var __assign = function() {
2229
- __assign = Object.assign || function(t) {
2230
- for (var s, i = 1, n = arguments.length; i < n; i++) {
2231
- s = arguments[i];
2232
- for (var p in s)
2233
- if (Object.prototype.hasOwnProperty.call(s, p))
2234
- t[p] = s[p];
2235
- }
2236
- return t;
2237
- };
2238
- return __assign.apply(this, arguments);
2239
- };
2240
- var __read2 = function(o, n) {
2241
- var m = typeof Symbol === "function" && o[Symbol.iterator];
2242
- if (!m)
2243
- return o;
2244
- var i = m.call(o), r, ar = [], e;
2245
- try {
2246
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
2247
- ar.push(r.value);
2248
- } catch (error) {
2249
- e = { error };
2250
- } finally {
2251
- try {
2252
- if (r && !r.done && (m = i["return"]))
2253
- m.call(i);
2254
- } finally {
2255
- if (e)
2256
- throw e.error;
2257
- }
2258
- }
2259
- return ar;
2260
- };
2261
- var __spreadArray = function(to, from) {
2262
- for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
2263
- to[j] = from[i];
2264
- return to;
2265
- };
2238
+ // ../../node_modules/.pnpm/superjson@2.2.1/node_modules/superjson/dist/transformer.js
2266
2239
  function simpleTransformation(isApplicable, annotation, transform, untransform) {
2267
2240
  return {
2268
2241
  isApplicable,
@@ -2272,48 +2245,36 @@ function simpleTransformation(isApplicable, annotation, transform, untransform)
2272
2245
  };
2273
2246
  }
2274
2247
  var simpleRules = [
2275
- simpleTransformation(isUndefined, "undefined", function() {
2276
- return null;
2277
- }, function() {
2278
- return void 0;
2279
- }),
2280
- simpleTransformation(isBigint, "bigint", function(v) {
2281
- return v.toString();
2282
- }, function(v) {
2248
+ simpleTransformation(isUndefined, "undefined", () => null, () => void 0),
2249
+ simpleTransformation(isBigint, "bigint", (v) => v.toString(), (v) => {
2283
2250
  if (typeof BigInt !== "undefined") {
2284
2251
  return BigInt(v);
2285
2252
  }
2286
2253
  console.error("Please add a BigInt polyfill.");
2287
2254
  return v;
2288
2255
  }),
2289
- simpleTransformation(isDate, "Date", function(v) {
2290
- return v.toISOString();
2291
- }, function(v) {
2292
- return new Date(v);
2293
- }),
2294
- simpleTransformation(isError, "Error", function(v, superJson) {
2295
- var baseError = {
2256
+ simpleTransformation(isDate, "Date", (v) => v.toISOString(), (v) => new Date(v)),
2257
+ simpleTransformation(isError, "Error", (v, superJson) => {
2258
+ const baseError = {
2296
2259
  name: v.name,
2297
2260
  message: v.message
2298
2261
  };
2299
- superJson.allowedErrorProps.forEach(function(prop) {
2262
+ superJson.allowedErrorProps.forEach((prop) => {
2300
2263
  baseError[prop] = v[prop];
2301
2264
  });
2302
2265
  return baseError;
2303
- }, function(v, superJson) {
2304
- var e = new Error(v.message);
2266
+ }, (v, superJson) => {
2267
+ const e = new Error(v.message);
2305
2268
  e.name = v.name;
2306
2269
  e.stack = v.stack;
2307
- superJson.allowedErrorProps.forEach(function(prop) {
2270
+ superJson.allowedErrorProps.forEach((prop) => {
2308
2271
  e[prop] = v[prop];
2309
2272
  });
2310
2273
  return e;
2311
2274
  }),
2312
- simpleTransformation(isRegExp, "regexp", function(v) {
2313
- return "" + v;
2314
- }, function(regex) {
2315
- var body = regex.slice(1, regex.lastIndexOf("/"));
2316
- var flags = regex.slice(regex.lastIndexOf("/") + 1);
2275
+ simpleTransformation(isRegExp, "regexp", (v) => "" + v, (regex) => {
2276
+ const body = regex.slice(1, regex.lastIndexOf("/"));
2277
+ const flags = regex.slice(regex.lastIndexOf("/") + 1);
2317
2278
  return new RegExp(body, flags);
2318
2279
  }),
2319
2280
  simpleTransformation(
@@ -2321,21 +2282,11 @@ var simpleRules = [
2321
2282
  "set",
2322
2283
  // (sets only exist in es6+)
2323
2284
  // eslint-disable-next-line es5/no-es6-methods
2324
- function(v) {
2325
- return __spreadArray([], __read2(v.values()));
2326
- },
2327
- function(v) {
2328
- return new Set(v);
2329
- }
2285
+ (v) => [...v.values()],
2286
+ (v) => new Set(v)
2330
2287
  ),
2331
- simpleTransformation(isMap, "map", function(v) {
2332
- return __spreadArray([], __read2(v.entries()));
2333
- }, function(v) {
2334
- return new Map(v);
2335
- }),
2336
- simpleTransformation(function(v) {
2337
- return isNaNValue(v) || isInfinite(v);
2338
- }, "number", function(v) {
2288
+ simpleTransformation(isMap, "map", (v) => [...v.entries()], (v) => new Map(v)),
2289
+ simpleTransformation((v) => isNaNValue(v) || isInfinite(v), "number", (v) => {
2339
2290
  if (isNaNValue(v)) {
2340
2291
  return "NaN";
2341
2292
  }
@@ -2345,16 +2296,10 @@ var simpleRules = [
2345
2296
  return "-Infinity";
2346
2297
  }
2347
2298
  }, Number),
2348
- simpleTransformation(function(v) {
2349
- return v === 0 && 1 / v === -Infinity;
2350
- }, "number", function() {
2299
+ simpleTransformation((v) => v === 0 && 1 / v === -Infinity, "number", () => {
2351
2300
  return "-0";
2352
2301
  }, Number),
2353
- simpleTransformation(isURL, "URL", function(v) {
2354
- return v.toString();
2355
- }, function(v) {
2356
- return new URL(v);
2357
- })
2302
+ simpleTransformation(isURL, "URL", (v) => v.toString(), (v) => new URL(v))
2358
2303
  ];
2359
2304
  function compositeTransformation(isApplicable, annotation, transform, untransform) {
2360
2305
  return {
@@ -2364,19 +2309,17 @@ function compositeTransformation(isApplicable, annotation, transform, untransfor
2364
2309
  untransform
2365
2310
  };
2366
2311
  }
2367
- var symbolRule = compositeTransformation(function(s, superJson) {
2312
+ var symbolRule = compositeTransformation((s, superJson) => {
2368
2313
  if (isSymbol(s)) {
2369
- var isRegistered = !!superJson.symbolRegistry.getIdentifier(s);
2314
+ const isRegistered = !!superJson.symbolRegistry.getIdentifier(s);
2370
2315
  return isRegistered;
2371
2316
  }
2372
2317
  return false;
2373
- }, function(s, superJson) {
2374
- var identifier = superJson.symbolRegistry.getIdentifier(s);
2318
+ }, (s, superJson) => {
2319
+ const identifier = superJson.symbolRegistry.getIdentifier(s);
2375
2320
  return ["symbol", identifier];
2376
- }, function(v) {
2377
- return v.description;
2378
- }, function(_, a, superJson) {
2379
- var value = superJson.symbolRegistry.getValue(a[1]);
2321
+ }, (v) => v.description, (_, a, superJson) => {
2322
+ const value = superJson.symbolRegistry.getValue(a[1]);
2380
2323
  if (!value) {
2381
2324
  throw new Error("Trying to deserialize unknown symbol");
2382
2325
  }
@@ -2392,77 +2335,69 @@ var constructorToName = [
2392
2335
  Float32Array,
2393
2336
  Float64Array,
2394
2337
  Uint8ClampedArray
2395
- ].reduce(function(obj, ctor) {
2338
+ ].reduce((obj, ctor) => {
2396
2339
  obj[ctor.name] = ctor;
2397
2340
  return obj;
2398
2341
  }, {});
2399
- var typedArrayRule = compositeTransformation(isTypedArray, function(v) {
2400
- return ["typed-array", v.constructor.name];
2401
- }, function(v) {
2402
- return __spreadArray([], __read2(v));
2403
- }, function(v, a) {
2404
- var ctor = constructorToName[a[1]];
2342
+ var typedArrayRule = compositeTransformation(isTypedArray, (v) => ["typed-array", v.constructor.name], (v) => [...v], (v, a) => {
2343
+ const ctor = constructorToName[a[1]];
2405
2344
  if (!ctor) {
2406
2345
  throw new Error("Trying to deserialize unknown typed array");
2407
2346
  }
2408
2347
  return new ctor(v);
2409
2348
  });
2410
2349
  function isInstanceOfRegisteredClass(potentialClass, superJson) {
2411
- if (potentialClass === null || potentialClass === void 0 ? void 0 : potentialClass.constructor) {
2412
- var isRegistered = !!superJson.classRegistry.getIdentifier(potentialClass.constructor);
2350
+ if (potentialClass?.constructor) {
2351
+ const isRegistered = !!superJson.classRegistry.getIdentifier(potentialClass.constructor);
2413
2352
  return isRegistered;
2414
2353
  }
2415
2354
  return false;
2416
2355
  }
2417
- var classRule = compositeTransformation(isInstanceOfRegisteredClass, function(clazz, superJson) {
2418
- var identifier = superJson.classRegistry.getIdentifier(clazz.constructor);
2356
+ var classRule = compositeTransformation(isInstanceOfRegisteredClass, (clazz, superJson) => {
2357
+ const identifier = superJson.classRegistry.getIdentifier(clazz.constructor);
2419
2358
  return ["class", identifier];
2420
- }, function(clazz, superJson) {
2421
- var allowedProps = superJson.classRegistry.getAllowedProps(clazz.constructor);
2359
+ }, (clazz, superJson) => {
2360
+ const allowedProps = superJson.classRegistry.getAllowedProps(clazz.constructor);
2422
2361
  if (!allowedProps) {
2423
- return __assign({}, clazz);
2362
+ return { ...clazz };
2424
2363
  }
2425
- var result = {};
2426
- allowedProps.forEach(function(prop) {
2364
+ const result = {};
2365
+ allowedProps.forEach((prop) => {
2427
2366
  result[prop] = clazz[prop];
2428
2367
  });
2429
2368
  return result;
2430
- }, function(v, a, superJson) {
2431
- var clazz = superJson.classRegistry.getValue(a[1]);
2369
+ }, (v, a, superJson) => {
2370
+ const clazz = superJson.classRegistry.getValue(a[1]);
2432
2371
  if (!clazz) {
2433
2372
  throw new Error("Trying to deserialize unknown class - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564");
2434
2373
  }
2435
2374
  return Object.assign(Object.create(clazz.prototype), v);
2436
2375
  });
2437
- var customRule = compositeTransformation(function(value, superJson) {
2376
+ var customRule = compositeTransformation((value, superJson) => {
2438
2377
  return !!superJson.customTransformerRegistry.findApplicable(value);
2439
- }, function(value, superJson) {
2440
- var transformer = superJson.customTransformerRegistry.findApplicable(value);
2378
+ }, (value, superJson) => {
2379
+ const transformer = superJson.customTransformerRegistry.findApplicable(value);
2441
2380
  return ["custom", transformer.name];
2442
- }, function(value, superJson) {
2443
- var transformer = superJson.customTransformerRegistry.findApplicable(value);
2381
+ }, (value, superJson) => {
2382
+ const transformer = superJson.customTransformerRegistry.findApplicable(value);
2444
2383
  return transformer.serialize(value);
2445
- }, function(v, a, superJson) {
2446
- var transformer = superJson.customTransformerRegistry.findByName(a[1]);
2384
+ }, (v, a, superJson) => {
2385
+ const transformer = superJson.customTransformerRegistry.findByName(a[1]);
2447
2386
  if (!transformer) {
2448
2387
  throw new Error("Trying to deserialize unknown custom value");
2449
2388
  }
2450
2389
  return transformer.deserialize(v);
2451
2390
  });
2452
2391
  var compositeRules = [classRule, symbolRule, customRule, typedArrayRule];
2453
- var transformValue = function(value, superJson) {
2454
- var applicableCompositeRule = findArr(compositeRules, function(rule) {
2455
- return rule.isApplicable(value, superJson);
2456
- });
2392
+ var transformValue = (value, superJson) => {
2393
+ const applicableCompositeRule = findArr(compositeRules, (rule) => rule.isApplicable(value, superJson));
2457
2394
  if (applicableCompositeRule) {
2458
2395
  return {
2459
2396
  value: applicableCompositeRule.transform(value, superJson),
2460
2397
  type: applicableCompositeRule.annotation(value, superJson)
2461
2398
  };
2462
2399
  }
2463
- var applicableSimpleRule = findArr(simpleRules, function(rule) {
2464
- return rule.isApplicable(value, superJson);
2465
- });
2400
+ const applicableSimpleRule = findArr(simpleRules, (rule) => rule.isApplicable(value, superJson));
2466
2401
  if (applicableSimpleRule) {
2467
2402
  return {
2468
2403
  value: applicableSimpleRule.transform(value, superJson),
@@ -2472,10 +2407,10 @@ var transformValue = function(value, superJson) {
2472
2407
  return void 0;
2473
2408
  };
2474
2409
  var simpleRulesByAnnotation = {};
2475
- simpleRules.forEach(function(rule) {
2410
+ simpleRules.forEach((rule) => {
2476
2411
  simpleRulesByAnnotation[rule.annotation] = rule;
2477
2412
  });
2478
- var untransformValue = function(json, type, superJson) {
2413
+ var untransformValue = (json, type, superJson) => {
2479
2414
  if (isArray(type)) {
2480
2415
  switch (type[0]) {
2481
2416
  case "symbol":
@@ -2490,7 +2425,7 @@ var untransformValue = function(json, type, superJson) {
2490
2425
  throw new Error("Unknown transformation: " + type);
2491
2426
  }
2492
2427
  } else {
2493
- var transformation = simpleRulesByAnnotation[type];
2428
+ const transformation = simpleRulesByAnnotation[type];
2494
2429
  if (!transformation) {
2495
2430
  throw new Error("Unknown transformation: " + type);
2496
2431
  }
@@ -2498,9 +2433,9 @@ var untransformValue = function(json, type, superJson) {
2498
2433
  }
2499
2434
  };
2500
2435
 
2501
- // ../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/accessDeep.js
2502
- var getNthKey = function(value, n) {
2503
- var keys = value.keys();
2436
+ // ../../node_modules/.pnpm/superjson@2.2.1/node_modules/superjson/dist/accessDeep.js
2437
+ var getNthKey = (value, n) => {
2438
+ const keys = value.keys();
2504
2439
  while (n > 0) {
2505
2440
  keys.next();
2506
2441
  n--;
@@ -2518,16 +2453,16 @@ function validatePath(path) {
2518
2453
  throw new Error("constructor is not allowed as a property");
2519
2454
  }
2520
2455
  }
2521
- var getDeep = function(object, path) {
2456
+ var getDeep = (object, path) => {
2522
2457
  validatePath(path);
2523
- for (var i = 0; i < path.length; i++) {
2524
- var key = path[i];
2458
+ for (let i = 0; i < path.length; i++) {
2459
+ const key = path[i];
2525
2460
  if (isSet(object)) {
2526
2461
  object = getNthKey(object, +key);
2527
2462
  } else if (isMap(object)) {
2528
- var row = +key;
2529
- var type = +path[++i] === 0 ? "key" : "value";
2530
- var keyOfRow = getNthKey(object, row);
2463
+ const row = +key;
2464
+ const type = +path[++i] === 0 ? "key" : "value";
2465
+ const keyOfRow = getNthKey(object, row);
2531
2466
  switch (type) {
2532
2467
  case "key":
2533
2468
  object = keyOfRow;
@@ -2542,30 +2477,30 @@ var getDeep = function(object, path) {
2542
2477
  }
2543
2478
  return object;
2544
2479
  };
2545
- var setDeep = function(object, path, mapper) {
2480
+ var setDeep = (object, path, mapper) => {
2546
2481
  validatePath(path);
2547
2482
  if (path.length === 0) {
2548
2483
  return mapper(object);
2549
2484
  }
2550
- var parent = object;
2551
- for (var i = 0; i < path.length - 1; i++) {
2552
- var key = path[i];
2485
+ let parent = object;
2486
+ for (let i = 0; i < path.length - 1; i++) {
2487
+ const key = path[i];
2553
2488
  if (isArray(parent)) {
2554
- var index = +key;
2489
+ const index = +key;
2555
2490
  parent = parent[index];
2556
2491
  } else if (isPlainObject(parent)) {
2557
2492
  parent = parent[key];
2558
2493
  } else if (isSet(parent)) {
2559
- var row = +key;
2494
+ const row = +key;
2560
2495
  parent = getNthKey(parent, row);
2561
2496
  } else if (isMap(parent)) {
2562
- var isEnd = i === path.length - 2;
2497
+ const isEnd = i === path.length - 2;
2563
2498
  if (isEnd) {
2564
2499
  break;
2565
2500
  }
2566
- var row = +key;
2567
- var type = +path[++i] === 0 ? "key" : "value";
2568
- var keyOfRow = getNthKey(parent, row);
2501
+ const row = +key;
2502
+ const type = +path[++i] === 0 ? "key" : "value";
2503
+ const keyOfRow = getNthKey(parent, row);
2569
2504
  switch (type) {
2570
2505
  case "key":
2571
2506
  parent = keyOfRow;
@@ -2576,30 +2511,30 @@ var setDeep = function(object, path, mapper) {
2576
2511
  }
2577
2512
  }
2578
2513
  }
2579
- var lastKey = path[path.length - 1];
2514
+ const lastKey = path[path.length - 1];
2580
2515
  if (isArray(parent)) {
2581
2516
  parent[+lastKey] = mapper(parent[+lastKey]);
2582
2517
  } else if (isPlainObject(parent)) {
2583
2518
  parent[lastKey] = mapper(parent[lastKey]);
2584
2519
  }
2585
2520
  if (isSet(parent)) {
2586
- var oldValue = getNthKey(parent, +lastKey);
2587
- var newValue = mapper(oldValue);
2521
+ const oldValue = getNthKey(parent, +lastKey);
2522
+ const newValue = mapper(oldValue);
2588
2523
  if (oldValue !== newValue) {
2589
- parent["delete"](oldValue);
2524
+ parent.delete(oldValue);
2590
2525
  parent.add(newValue);
2591
2526
  }
2592
2527
  }
2593
2528
  if (isMap(parent)) {
2594
- var row = +path[path.length - 2];
2595
- var keyToRow = getNthKey(parent, row);
2596
- var type = +lastKey === 0 ? "key" : "value";
2529
+ const row = +path[path.length - 2];
2530
+ const keyToRow = getNthKey(parent, row);
2531
+ const type = +lastKey === 0 ? "key" : "value";
2597
2532
  switch (type) {
2598
2533
  case "key": {
2599
- var newKey = mapper(keyToRow);
2534
+ const newKey = mapper(keyToRow);
2600
2535
  parent.set(newKey, parent.get(keyToRow));
2601
2536
  if (newKey !== keyToRow) {
2602
- parent["delete"](keyToRow);
2537
+ parent.delete(keyToRow);
2603
2538
  }
2604
2539
  break;
2605
2540
  }
@@ -2612,77 +2547,40 @@ var setDeep = function(object, path, mapper) {
2612
2547
  return object;
2613
2548
  };
2614
2549
 
2615
- // ../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/plainer.js
2616
- var __read3 = function(o, n) {
2617
- var m = typeof Symbol === "function" && o[Symbol.iterator];
2618
- if (!m)
2619
- return o;
2620
- var i = m.call(o), r, ar = [], e;
2621
- try {
2622
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
2623
- ar.push(r.value);
2624
- } catch (error) {
2625
- e = { error };
2626
- } finally {
2627
- try {
2628
- if (r && !r.done && (m = i["return"]))
2629
- m.call(i);
2630
- } finally {
2631
- if (e)
2632
- throw e.error;
2633
- }
2634
- }
2635
- return ar;
2636
- };
2637
- var __spreadArray2 = function(to, from) {
2638
- for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
2639
- to[j] = from[i];
2640
- return to;
2641
- };
2642
- function traverse(tree, walker2, origin) {
2643
- if (origin === void 0) {
2644
- origin = [];
2645
- }
2550
+ // ../../node_modules/.pnpm/superjson@2.2.1/node_modules/superjson/dist/plainer.js
2551
+ function traverse(tree, walker2, origin = []) {
2646
2552
  if (!tree) {
2647
2553
  return;
2648
2554
  }
2649
2555
  if (!isArray(tree)) {
2650
- forEach(tree, function(subtree, key) {
2651
- return traverse(subtree, walker2, __spreadArray2(__spreadArray2([], __read3(origin)), __read3(parsePath(key))));
2652
- });
2556
+ forEach(tree, (subtree, key) => traverse(subtree, walker2, [...origin, ...parsePath(key)]));
2653
2557
  return;
2654
2558
  }
2655
- var _a = __read3(tree, 2), nodeValue = _a[0], children2 = _a[1];
2559
+ const [nodeValue, children2] = tree;
2656
2560
  if (children2) {
2657
- forEach(children2, function(child, key) {
2658
- traverse(child, walker2, __spreadArray2(__spreadArray2([], __read3(origin)), __read3(parsePath(key))));
2561
+ forEach(children2, (child, key) => {
2562
+ traverse(child, walker2, [...origin, ...parsePath(key)]);
2659
2563
  });
2660
2564
  }
2661
2565
  walker2(nodeValue, origin);
2662
2566
  }
2663
2567
  function applyValueAnnotations(plain, annotations, superJson) {
2664
- traverse(annotations, function(type, path) {
2665
- plain = setDeep(plain, path, function(v) {
2666
- return untransformValue(v, type, superJson);
2667
- });
2568
+ traverse(annotations, (type, path) => {
2569
+ plain = setDeep(plain, path, (v) => untransformValue(v, type, superJson));
2668
2570
  });
2669
2571
  return plain;
2670
2572
  }
2671
2573
  function applyReferentialEqualityAnnotations(plain, annotations) {
2672
2574
  function apply(identicalPaths, path) {
2673
- var object = getDeep(plain, parsePath(path));
2674
- identicalPaths.map(parsePath).forEach(function(identicalObjectPath) {
2675
- plain = setDeep(plain, identicalObjectPath, function() {
2676
- return object;
2677
- });
2575
+ const object = getDeep(plain, parsePath(path));
2576
+ identicalPaths.map(parsePath).forEach((identicalObjectPath) => {
2577
+ plain = setDeep(plain, identicalObjectPath, () => object);
2678
2578
  });
2679
2579
  }
2680
2580
  if (isArray(annotations)) {
2681
- var _a = __read3(annotations, 2), root = _a[0], other = _a[1];
2682
- root.forEach(function(identicalPath) {
2683
- plain = setDeep(plain, parsePath(identicalPath), function() {
2684
- return plain;
2685
- });
2581
+ const [root, other] = annotations;
2582
+ root.forEach((identicalPath) => {
2583
+ plain = setDeep(plain, parsePath(identicalPath), () => plain);
2686
2584
  });
2687
2585
  if (other) {
2688
2586
  forEach(other, apply);
@@ -2692,11 +2590,9 @@ function applyReferentialEqualityAnnotations(plain, annotations) {
2692
2590
  }
2693
2591
  return plain;
2694
2592
  }
2695
- var isDeep = function(object, superJson) {
2696
- return isPlainObject(object) || isArray(object) || isMap(object) || isSet(object) || isInstanceOfRegisteredClass(object, superJson);
2697
- };
2593
+ var isDeep = (object, superJson) => isPlainObject(object) || isArray(object) || isMap(object) || isSet(object) || isInstanceOfRegisteredClass(object, superJson);
2698
2594
  function addIdentity(object, path, identities) {
2699
- var existingSet = identities.get(object);
2595
+ const existingSet = identities.get(object);
2700
2596
  if (existingSet) {
2701
2597
  existingSet.push(path);
2702
2598
  } else {
@@ -2704,20 +2600,16 @@ function addIdentity(object, path, identities) {
2704
2600
  }
2705
2601
  }
2706
2602
  function generateReferentialEqualityAnnotations(identitites, dedupe) {
2707
- var result = {};
2708
- var rootEqualityPaths = void 0;
2709
- identitites.forEach(function(paths) {
2603
+ const result = {};
2604
+ let rootEqualityPaths = void 0;
2605
+ identitites.forEach((paths) => {
2710
2606
  if (paths.length <= 1) {
2711
2607
  return;
2712
2608
  }
2713
2609
  if (!dedupe) {
2714
- paths = paths.map(function(path) {
2715
- return path.map(String);
2716
- }).sort(function(a, b) {
2717
- return a.length - b.length;
2718
- });
2610
+ paths = paths.map((path) => path.map(String)).sort((a, b) => a.length - b.length);
2719
2611
  }
2720
- var _a = __read3(paths), representativePath = _a[0], identicalPaths = _a.slice(1);
2612
+ const [representativePath, ...identicalPaths] = paths;
2721
2613
  if (representativePath.length === 0) {
2722
2614
  rootEqualityPaths = identicalPaths.map(stringifyPath);
2723
2615
  } else {
@@ -2734,21 +2626,11 @@ function generateReferentialEqualityAnnotations(identitites, dedupe) {
2734
2626
  return isEmptyObject(result) ? void 0 : result;
2735
2627
  }
2736
2628
  }
2737
- var walker = function(object, identities, superJson, dedupe, path, objectsInThisPath, seenObjects) {
2738
- var _a;
2739
- if (path === void 0) {
2740
- path = [];
2741
- }
2742
- if (objectsInThisPath === void 0) {
2743
- objectsInThisPath = [];
2744
- }
2745
- if (seenObjects === void 0) {
2746
- seenObjects = /* @__PURE__ */ new Map();
2747
- }
2748
- var primitive = isPrimitive(object);
2629
+ var walker = (object, identities, superJson, dedupe, path = [], objectsInThisPath = [], seenObjects = /* @__PURE__ */ new Map()) => {
2630
+ const primitive = isPrimitive(object);
2749
2631
  if (!primitive) {
2750
2632
  addIdentity(object, path, identities);
2751
- var seen = seenObjects.get(object);
2633
+ const seen = seenObjects.get(object);
2752
2634
  if (seen) {
2753
2635
  return dedupe ? {
2754
2636
  transformedValue: null
@@ -2756,39 +2638,42 @@ var walker = function(object, identities, superJson, dedupe, path, objectsInThis
2756
2638
  }
2757
2639
  }
2758
2640
  if (!isDeep(object, superJson)) {
2759
- var transformed_1 = transformValue(object, superJson);
2760
- var result_1 = transformed_1 ? {
2761
- transformedValue: transformed_1.value,
2762
- annotations: [transformed_1.type]
2641
+ const transformed2 = transformValue(object, superJson);
2642
+ const result2 = transformed2 ? {
2643
+ transformedValue: transformed2.value,
2644
+ annotations: [transformed2.type]
2763
2645
  } : {
2764
2646
  transformedValue: object
2765
2647
  };
2766
2648
  if (!primitive) {
2767
- seenObjects.set(object, result_1);
2649
+ seenObjects.set(object, result2);
2768
2650
  }
2769
- return result_1;
2651
+ return result2;
2770
2652
  }
2771
2653
  if (includes(objectsInThisPath, object)) {
2772
2654
  return {
2773
2655
  transformedValue: null
2774
2656
  };
2775
2657
  }
2776
- var transformationResult = transformValue(object, superJson);
2777
- var transformed = (_a = transformationResult === null || transformationResult === void 0 ? void 0 : transformationResult.value) !== null && _a !== void 0 ? _a : object;
2778
- var transformedValue = isArray(transformed) ? [] : {};
2779
- var innerAnnotations = {};
2780
- forEach(transformed, function(value, index) {
2781
- var recursiveResult = walker(value, identities, superJson, dedupe, __spreadArray2(__spreadArray2([], __read3(path)), [index]), __spreadArray2(__spreadArray2([], __read3(objectsInThisPath)), [object]), seenObjects);
2658
+ const transformationResult = transformValue(object, superJson);
2659
+ const transformed = transformationResult?.value ?? object;
2660
+ const transformedValue = isArray(transformed) ? [] : {};
2661
+ const innerAnnotations = {};
2662
+ forEach(transformed, (value, index) => {
2663
+ if (index === "__proto__" || index === "constructor" || index === "prototype") {
2664
+ throw new Error(`Detected property ${index}. This is a prototype pollution risk, please remove it from your object.`);
2665
+ }
2666
+ const recursiveResult = walker(value, identities, superJson, dedupe, [...path, index], [...objectsInThisPath, object], seenObjects);
2782
2667
  transformedValue[index] = recursiveResult.transformedValue;
2783
2668
  if (isArray(recursiveResult.annotations)) {
2784
2669
  innerAnnotations[index] = recursiveResult.annotations;
2785
2670
  } else if (isPlainObject(recursiveResult.annotations)) {
2786
- forEach(recursiveResult.annotations, function(tree, key) {
2671
+ forEach(recursiveResult.annotations, (tree, key) => {
2787
2672
  innerAnnotations[escapeKey(index) + "." + key] = tree;
2788
2673
  });
2789
2674
  }
2790
2675
  });
2791
- var result = isEmptyObject(innerAnnotations) ? {
2676
+ const result = isEmptyObject(innerAnnotations) ? {
2792
2677
  transformedValue,
2793
2678
  annotations: !!transformationResult ? [transformationResult.type] : void 0
2794
2679
  } : {
@@ -2849,120 +2734,81 @@ function copy(target, options = {}) {
2849
2734
  }, {});
2850
2735
  }
2851
2736
 
2852
- // ../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/index.js
2853
- var __assign2 = function() {
2854
- __assign2 = Object.assign || function(t) {
2855
- for (var s, i = 1, n = arguments.length; i < n; i++) {
2856
- s = arguments[i];
2857
- for (var p in s)
2858
- if (Object.prototype.hasOwnProperty.call(s, p))
2859
- t[p] = s[p];
2860
- }
2861
- return t;
2862
- };
2863
- return __assign2.apply(this, arguments);
2864
- };
2865
- var __read4 = function(o, n) {
2866
- var m = typeof Symbol === "function" && o[Symbol.iterator];
2867
- if (!m)
2868
- return o;
2869
- var i = m.call(o), r, ar = [], e;
2870
- try {
2871
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
2872
- ar.push(r.value);
2873
- } catch (error) {
2874
- e = { error };
2875
- } finally {
2876
- try {
2877
- if (r && !r.done && (m = i["return"]))
2878
- m.call(i);
2879
- } finally {
2880
- if (e)
2881
- throw e.error;
2737
+ // ../../node_modules/.pnpm/superjson@2.2.1/node_modules/superjson/dist/index.js
2738
+ var SuperJSON = class {
2739
+ /**
2740
+ * @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
2741
+ */
2742
+ constructor({ dedupe = false } = {}) {
2743
+ this.classRegistry = new ClassRegistry();
2744
+ this.symbolRegistry = new Registry((s) => s.description ?? "");
2745
+ this.customTransformerRegistry = new CustomTransformerRegistry();
2746
+ this.allowedErrorProps = [];
2747
+ this.dedupe = dedupe;
2748
+ }
2749
+ serialize(object) {
2750
+ const identities = /* @__PURE__ */ new Map();
2751
+ const output = walker(object, identities, this, this.dedupe);
2752
+ const res = {
2753
+ json: output.transformedValue
2754
+ };
2755
+ if (output.annotations) {
2756
+ res.meta = {
2757
+ ...res.meta,
2758
+ values: output.annotations
2759
+ };
2760
+ }
2761
+ const equalityAnnotations = generateReferentialEqualityAnnotations(identities, this.dedupe);
2762
+ if (equalityAnnotations) {
2763
+ res.meta = {
2764
+ ...res.meta,
2765
+ referentialEqualities: equalityAnnotations
2766
+ };
2882
2767
  }
2768
+ return res;
2769
+ }
2770
+ deserialize(payload) {
2771
+ const { json, meta } = payload;
2772
+ let result = copy(json);
2773
+ if (meta?.values) {
2774
+ result = applyValueAnnotations(result, meta.values, this);
2775
+ }
2776
+ if (meta?.referentialEqualities) {
2777
+ result = applyReferentialEqualityAnnotations(result, meta.referentialEqualities);
2778
+ }
2779
+ return result;
2780
+ }
2781
+ stringify(object) {
2782
+ return JSON.stringify(this.serialize(object));
2783
+ }
2784
+ parse(string) {
2785
+ return this.deserialize(JSON.parse(string));
2786
+ }
2787
+ registerClass(v, options) {
2788
+ this.classRegistry.register(v, options);
2789
+ }
2790
+ registerSymbol(v, identifier) {
2791
+ this.symbolRegistry.register(v, identifier);
2792
+ }
2793
+ registerCustom(transformer, name) {
2794
+ this.customTransformerRegistry.register({
2795
+ name,
2796
+ ...transformer
2797
+ });
2798
+ }
2799
+ allowErrorProps(...props) {
2800
+ this.allowedErrorProps.push(...props);
2883
2801
  }
2884
- return ar;
2885
- };
2886
- var __spreadArray3 = function(to, from) {
2887
- for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
2888
- to[j] = from[i];
2889
- return to;
2890
2802
  };
2891
- var SuperJSON = (
2892
- /** @class */
2893
- function() {
2894
- function SuperJSON2(_a) {
2895
- var _b = _a === void 0 ? {} : _a, _c = _b.dedupe, dedupe = _c === void 0 ? false : _c;
2896
- this.classRegistry = new ClassRegistry();
2897
- this.symbolRegistry = new Registry(function(s) {
2898
- var _a2;
2899
- return (_a2 = s.description) !== null && _a2 !== void 0 ? _a2 : "";
2900
- });
2901
- this.customTransformerRegistry = new CustomTransformerRegistry();
2902
- this.allowedErrorProps = [];
2903
- this.dedupe = dedupe;
2904
- }
2905
- SuperJSON2.prototype.serialize = function(object) {
2906
- var identities = /* @__PURE__ */ new Map();
2907
- var output = walker(object, identities, this, this.dedupe);
2908
- var res = {
2909
- json: output.transformedValue
2910
- };
2911
- if (output.annotations) {
2912
- res.meta = __assign2(__assign2({}, res.meta), { values: output.annotations });
2913
- }
2914
- var equalityAnnotations = generateReferentialEqualityAnnotations(identities, this.dedupe);
2915
- if (equalityAnnotations) {
2916
- res.meta = __assign2(__assign2({}, res.meta), { referentialEqualities: equalityAnnotations });
2917
- }
2918
- return res;
2919
- };
2920
- SuperJSON2.prototype.deserialize = function(payload) {
2921
- var json = payload.json, meta = payload.meta;
2922
- var result = copy(json);
2923
- if (meta === null || meta === void 0 ? void 0 : meta.values) {
2924
- result = applyValueAnnotations(result, meta.values, this);
2925
- }
2926
- if (meta === null || meta === void 0 ? void 0 : meta.referentialEqualities) {
2927
- result = applyReferentialEqualityAnnotations(result, meta.referentialEqualities);
2928
- }
2929
- return result;
2930
- };
2931
- SuperJSON2.prototype.stringify = function(object) {
2932
- return JSON.stringify(this.serialize(object));
2933
- };
2934
- SuperJSON2.prototype.parse = function(string) {
2935
- return this.deserialize(JSON.parse(string));
2936
- };
2937
- SuperJSON2.prototype.registerClass = function(v, options) {
2938
- this.classRegistry.register(v, options);
2939
- };
2940
- SuperJSON2.prototype.registerSymbol = function(v, identifier) {
2941
- this.symbolRegistry.register(v, identifier);
2942
- };
2943
- SuperJSON2.prototype.registerCustom = function(transformer, name) {
2944
- this.customTransformerRegistry.register(__assign2({ name }, transformer));
2945
- };
2946
- SuperJSON2.prototype.allowErrorProps = function() {
2947
- var _a;
2948
- var props = [];
2949
- for (var _i = 0; _i < arguments.length; _i++) {
2950
- props[_i] = arguments[_i];
2951
- }
2952
- (_a = this.allowedErrorProps).push.apply(_a, __spreadArray3([], __read4(props)));
2953
- };
2954
- SuperJSON2.defaultInstance = new SuperJSON2();
2955
- SuperJSON2.serialize = SuperJSON2.defaultInstance.serialize.bind(SuperJSON2.defaultInstance);
2956
- SuperJSON2.deserialize = SuperJSON2.defaultInstance.deserialize.bind(SuperJSON2.defaultInstance);
2957
- SuperJSON2.stringify = SuperJSON2.defaultInstance.stringify.bind(SuperJSON2.defaultInstance);
2958
- SuperJSON2.parse = SuperJSON2.defaultInstance.parse.bind(SuperJSON2.defaultInstance);
2959
- SuperJSON2.registerClass = SuperJSON2.defaultInstance.registerClass.bind(SuperJSON2.defaultInstance);
2960
- SuperJSON2.registerSymbol = SuperJSON2.defaultInstance.registerSymbol.bind(SuperJSON2.defaultInstance);
2961
- SuperJSON2.registerCustom = SuperJSON2.defaultInstance.registerCustom.bind(SuperJSON2.defaultInstance);
2962
- SuperJSON2.allowErrorProps = SuperJSON2.defaultInstance.allowErrorProps.bind(SuperJSON2.defaultInstance);
2963
- return SuperJSON2;
2964
- }()
2965
- );
2803
+ SuperJSON.defaultInstance = new SuperJSON();
2804
+ SuperJSON.serialize = SuperJSON.defaultInstance.serialize.bind(SuperJSON.defaultInstance);
2805
+ SuperJSON.deserialize = SuperJSON.defaultInstance.deserialize.bind(SuperJSON.defaultInstance);
2806
+ SuperJSON.stringify = SuperJSON.defaultInstance.stringify.bind(SuperJSON.defaultInstance);
2807
+ SuperJSON.parse = SuperJSON.defaultInstance.parse.bind(SuperJSON.defaultInstance);
2808
+ SuperJSON.registerClass = SuperJSON.defaultInstance.registerClass.bind(SuperJSON.defaultInstance);
2809
+ SuperJSON.registerSymbol = SuperJSON.defaultInstance.registerSymbol.bind(SuperJSON.defaultInstance);
2810
+ SuperJSON.registerCustom = SuperJSON.defaultInstance.registerCustom.bind(SuperJSON.defaultInstance);
2811
+ SuperJSON.allowErrorProps = SuperJSON.defaultInstance.allowErrorProps.bind(SuperJSON.defaultInstance);
2966
2812
  var serialize = SuperJSON.serialize;
2967
2813
  SuperJSON.deserialize;
2968
2814
  var stringify = SuperJSON.stringify;
@@ -3141,4 +2987,4 @@ var setupStyleSheet = (nonce, target) => {
3141
2987
  }
3142
2988
  };
3143
2989
 
3144
- export { $PROXY, $TRACK, DEV, Dynamic, For, Index, Match, Portal, Show, Switch, addEventListener, batch, children, className, clearDelegatedEvents, convertRemToPixels, createComponent, createComputed, createContext, createEffect, createMemo, createRenderEffect, createRoot, createSignal, createUniqueId, delegateEvents, deleteNestedDataByPath, displayValue, getListener, getMutationStatusColor, getOwner, getPreferredColorScheme, getQueryStatusColor, getQueryStatusColorByLabel, getQueryStatusLabel, getSidedProp, insert, isServer, lazy, mergeProps, mutationSortFns, on, onCleanup, onMount, render, setAttribute, setupStyleSheet, sortFns, splitProps, spread, stringify, template, untrack, updateNestedDataByPath, use, useContext, useTransition };
2990
+ export { $TRACK, DEV, Dynamic, For, Index, Match, Portal, Show, Switch, addEventListener, batch, className, clearDelegatedEvents, convertRemToPixels, createComponent, createComputed, createContext, createEffect, createMemo, createRenderEffect, createRoot, createSignal, createUniqueId, delegateEvents, deleteNestedDataByPath, displayValue, getMutationStatusColor, getOwner, getPreferredColorScheme, getQueryStatusColor, getQueryStatusColorByLabel, getQueryStatusLabel, getSidedProp, insert, isServer, lazy, mergeProps, mutationSortFns, on, onCleanup, onMount, render, setAttribute, setupStyleSheet, sortFns, splitProps, spread, stringify, template, untrack, updateNestedDataByPath, use, useContext, useTransition };