houdini-svelte 2.1.0 → 2.1.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.
@@ -86465,7 +86465,18 @@ var ListManager = class {
86465
86465
  }
86466
86466
  lists = /* @__PURE__ */ new Map();
86467
86467
  listsByField = /* @__PURE__ */ new Map();
86468
- get(listName, id2, allLists) {
86468
+ get(listName, id2, allLists, skipMatches) {
86469
+ const lists = this.getLists(listName, id2, allLists);
86470
+ if (!lists) {
86471
+ return null;
86472
+ }
86473
+ if (skipMatches) {
86474
+ return new ListCollection(lists.lists.filter((list3) => !skipMatches.has(list3.fieldRef)));
86475
+ } else {
86476
+ return lists;
86477
+ }
86478
+ }
86479
+ getLists(listName, id2, allLists) {
86469
86480
  const matches = this.lists.get(listName);
86470
86481
  if (!matches || matches.size === 0) {
86471
86482
  return null;
@@ -86587,6 +86598,9 @@ var List = class {
86587
86598
  this.manager = manager;
86588
86599
  this.abstract = abstract;
86589
86600
  }
86601
+ get fieldRef() {
86602
+ return `${this.recordID}.${this.key}`;
86603
+ }
86590
86604
  when(when) {
86591
86605
  return this.manager.lists.get(this.name).get(this.recordID).when(when);
86592
86606
  }
@@ -87731,8 +87745,8 @@ var Cache = class {
87731
87745
  variables
87732
87746
  );
87733
87747
  }
87734
- list(name, parentID, allLists) {
87735
- const handler = this._internal_unstable.lists.get(name, parentID, allLists);
87748
+ list(name, parentID, allLists, skipMatches) {
87749
+ const handler = this._internal_unstable.lists.get(name, parentID, allLists, skipMatches);
87736
87750
  if (!handler) {
87737
87751
  throw new Error(
87738
87752
  `Cannot find list with name: ${name}${parentID ? " under parent " + parentID : ""}. Is it possible that the query is not mounted?`
@@ -88147,6 +88161,7 @@ var CacheInternal = class {
88147
88161
  });
88148
88162
  }
88149
88163
  }
88164
+ const processedOperations = /* @__PURE__ */ new Set();
88150
88165
  for (const operation of operations || []) {
88151
88166
  let parentID;
88152
88167
  if (operation.parentID) {
@@ -88166,7 +88181,12 @@ var CacheInternal = class {
88166
88181
  const targets = Array.isArray(value) ? value : [value];
88167
88182
  for (const target of targets) {
88168
88183
  if (operation.action === "insert" && target instanceof Object && fieldSelection && operation.list) {
88169
- this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).addToList(
88184
+ this.cache.list(
88185
+ operation.list,
88186
+ parentID,
88187
+ operation.target === "all",
88188
+ processedOperations
88189
+ ).when(operation.when).addToList(
88170
88190
  fieldSelection,
88171
88191
  target,
88172
88192
  variables,
@@ -88174,7 +88194,12 @@ var CacheInternal = class {
88174
88194
  layer
88175
88195
  );
88176
88196
  } else if (operation.action === "toggle" && target instanceof Object && fieldSelection && operation.list) {
88177
- this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).toggleElement({
88197
+ this.cache.list(
88198
+ operation.list,
88199
+ parentID,
88200
+ operation.target === "all",
88201
+ processedOperations
88202
+ ).when(operation.when).toggleElement({
88178
88203
  selection: fieldSelection,
88179
88204
  data: target,
88180
88205
  variables,
@@ -88182,7 +88207,12 @@ var CacheInternal = class {
88182
88207
  layer
88183
88208
  });
88184
88209
  } else if (operation.action === "remove" && target instanceof Object && fieldSelection && operation.list) {
88185
- this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).remove(target, variables, layer);
88210
+ this.cache.list(
88211
+ operation.list,
88212
+ parentID,
88213
+ operation.target === "all",
88214
+ processedOperations
88215
+ ).when(operation.when).remove(target, variables, layer);
88186
88216
  } else if (operation.action === "delete" && operation.type && target) {
88187
88217
  const targetID = this.id(operation.type, target);
88188
88218
  if (!targetID) {
@@ -88194,6 +88224,16 @@ var CacheInternal = class {
88194
88224
  this.cache.delete(targetID, layer);
88195
88225
  }
88196
88226
  }
88227
+ if (operation.list) {
88228
+ const matchingLists = this.cache.list(
88229
+ operation.list,
88230
+ parentID,
88231
+ operation.target === "all"
88232
+ );
88233
+ for (const list3 of matchingLists.lists) {
88234
+ processedOperations.add(list3.fieldRef);
88235
+ }
88236
+ }
88197
88237
  }
88198
88238
  }
88199
88239
  return toNotify;
@@ -108844,30 +108884,30 @@ var require_utils5 = __commonJS3({
108844
108884
  validate3.oneOf = values;
108845
108885
  return validate3;
108846
108886
  }
108847
- function assertNodeType(...types17) {
108887
+ function assertNodeType(...types18) {
108848
108888
  function validate3(node, key2, val) {
108849
- for (const type of types17) {
108889
+ for (const type of types18) {
108850
108890
  if ((0, _is.default)(type, val)) {
108851
108891
  (0, _validate.validateChild)(node, key2, val);
108852
108892
  return;
108853
108893
  }
108854
108894
  }
108855
- throw new TypeError(`Property ${key2} of ${node.type} expected node to be of a type ${JSON.stringify(types17)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
108895
+ throw new TypeError(`Property ${key2} of ${node.type} expected node to be of a type ${JSON.stringify(types18)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
108856
108896
  }
108857
- validate3.oneOfNodeTypes = types17;
108897
+ validate3.oneOfNodeTypes = types18;
108858
108898
  return validate3;
108859
108899
  }
108860
- function assertNodeOrValueType(...types17) {
108900
+ function assertNodeOrValueType(...types18) {
108861
108901
  function validate3(node, key2, val) {
108862
- for (const type of types17) {
108902
+ for (const type of types18) {
108863
108903
  if (getType(val) === type || (0, _is.default)(type, val)) {
108864
108904
  (0, _validate.validateChild)(node, key2, val);
108865
108905
  return;
108866
108906
  }
108867
108907
  }
108868
- throw new TypeError(`Property ${key2} of ${node.type} expected node to be of a type ${JSON.stringify(types17)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
108908
+ throw new TypeError(`Property ${key2} of ${node.type} expected node to be of a type ${JSON.stringify(types18)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
108869
108909
  }
108870
- validate3.oneOfNodeOrValueTypes = types17;
108910
+ validate3.oneOfNodeOrValueTypes = types18;
108871
108911
  return validate3;
108872
108912
  }
108873
108913
  function assertValueType(type) {
@@ -113271,10 +113311,10 @@ var require_generated22 = __commonJS3({
113271
113311
  body
113272
113312
  });
113273
113313
  }
113274
- function intersectionTypeAnnotation(types17) {
113314
+ function intersectionTypeAnnotation(types18) {
113275
113315
  return (0, _validateNode.default)({
113276
113316
  type: "IntersectionTypeAnnotation",
113277
- types: types17
113317
+ types: types18
113278
113318
  });
113279
113319
  }
113280
113320
  function mixedTypeAnnotation() {
@@ -113397,10 +113437,10 @@ var require_generated22 = __commonJS3({
113397
113437
  type: "ThisTypeAnnotation"
113398
113438
  };
113399
113439
  }
113400
- function tupleTypeAnnotation(types17) {
113440
+ function tupleTypeAnnotation(types18) {
113401
113441
  return (0, _validateNode.default)({
113402
113442
  type: "TupleTypeAnnotation",
113403
- types: types17
113443
+ types: types18
113404
113444
  });
113405
113445
  }
113406
113446
  function typeofTypeAnnotation(argument) {
@@ -113451,10 +113491,10 @@ var require_generated22 = __commonJS3({
113451
113491
  params
113452
113492
  });
113453
113493
  }
113454
- function unionTypeAnnotation(types17) {
113494
+ function unionTypeAnnotation(types18) {
113455
113495
  return (0, _validateNode.default)({
113456
113496
  type: "UnionTypeAnnotation",
113457
- types: types17
113497
+ types: types18
113458
113498
  });
113459
113499
  }
113460
113500
  function variance(kind) {
@@ -113967,16 +114007,16 @@ var require_generated22 = __commonJS3({
113967
114007
  optional
113968
114008
  });
113969
114009
  }
113970
- function tsUnionType(types17) {
114010
+ function tsUnionType(types18) {
113971
114011
  return (0, _validateNode.default)({
113972
114012
  type: "TSUnionType",
113973
- types: types17
114013
+ types: types18
113974
114014
  });
113975
114015
  }
113976
- function tsIntersectionType(types17) {
114016
+ function tsIntersectionType(types18) {
113977
114017
  return (0, _validateNode.default)({
113978
114018
  type: "TSIntersectionType",
113979
- types: types17
114019
+ types: types18
113980
114020
  });
113981
114021
  }
113982
114022
  function tsConditionalType(checkType, extendsType, trueType, falseType) {
@@ -115577,12 +115617,12 @@ var require_removeTypeDuplicates3 = __commonJS3({
115577
115617
  const generics = /* @__PURE__ */ new Map();
115578
115618
  const bases = /* @__PURE__ */ new Map();
115579
115619
  const typeGroups = /* @__PURE__ */ new Set();
115580
- const types17 = [];
115620
+ const types18 = [];
115581
115621
  for (let i22 = 0; i22 < nodes.length; i22++) {
115582
115622
  const node = nodes[i22];
115583
115623
  if (!node)
115584
115624
  continue;
115585
- if (types17.indexOf(node) >= 0) {
115625
+ if (types18.indexOf(node) >= 0) {
115586
115626
  continue;
115587
115627
  }
115588
115628
  if ((0, _generated.isAnyTypeAnnotation)(node)) {
@@ -115616,15 +115656,15 @@ var require_removeTypeDuplicates3 = __commonJS3({
115616
115656
  }
115617
115657
  continue;
115618
115658
  }
115619
- types17.push(node);
115659
+ types18.push(node);
115620
115660
  }
115621
115661
  for (const [, baseType] of bases) {
115622
- types17.push(baseType);
115662
+ types18.push(baseType);
115623
115663
  }
115624
115664
  for (const [, genericName] of generics) {
115625
- types17.push(genericName);
115665
+ types18.push(genericName);
115626
115666
  }
115627
- return types17;
115667
+ return types18;
115628
115668
  }
115629
115669
  }
115630
115670
  });
@@ -115637,8 +115677,8 @@ var require_createFlowUnionType2 = __commonJS3({
115637
115677
  exports.default = createFlowUnionType;
115638
115678
  var _generated = require_generated22();
115639
115679
  var _removeTypeDuplicates = require_removeTypeDuplicates3();
115640
- function createFlowUnionType(types17) {
115641
- const flattened = (0, _removeTypeDuplicates.default)(types17);
115680
+ function createFlowUnionType(types18) {
115681
+ const flattened = (0, _removeTypeDuplicates.default)(types18);
115642
115682
  if (flattened.length === 1) {
115643
115683
  return flattened[0];
115644
115684
  } else {
@@ -115663,12 +115703,12 @@ var require_removeTypeDuplicates22 = __commonJS3({
115663
115703
  const generics = /* @__PURE__ */ new Map();
115664
115704
  const bases = /* @__PURE__ */ new Map();
115665
115705
  const typeGroups = /* @__PURE__ */ new Set();
115666
- const types17 = [];
115706
+ const types18 = [];
115667
115707
  for (let i22 = 0; i22 < nodes.length; i22++) {
115668
115708
  const node = nodes[i22];
115669
115709
  if (!node)
115670
115710
  continue;
115671
- if (types17.indexOf(node) >= 0) {
115711
+ if (types18.indexOf(node) >= 0) {
115672
115712
  continue;
115673
115713
  }
115674
115714
  if ((0, _generated.isTSAnyKeyword)(node)) {
@@ -115702,15 +115742,15 @@ var require_removeTypeDuplicates22 = __commonJS3({
115702
115742
  }
115703
115743
  continue;
115704
115744
  }
115705
- types17.push(node);
115745
+ types18.push(node);
115706
115746
  }
115707
115747
  for (const [, baseType] of bases) {
115708
- types17.push(baseType);
115748
+ types18.push(baseType);
115709
115749
  }
115710
115750
  for (const [, genericName] of generics) {
115711
- types17.push(genericName);
115751
+ types18.push(genericName);
115712
115752
  }
115713
- return types17;
115753
+ return types18;
115714
115754
  }
115715
115755
  }
115716
115756
  });
@@ -115725,10 +115765,10 @@ var require_createTSUnionType2 = __commonJS3({
115725
115765
  var _removeTypeDuplicates = require_removeTypeDuplicates22();
115726
115766
  var _index = require_generated5();
115727
115767
  function createTSUnionType(typeAnnotations) {
115728
- const types17 = typeAnnotations.map((type) => {
115768
+ const types18 = typeAnnotations.map((type) => {
115729
115769
  return (0, _index.isTSTypeAnnotation)(type) ? type.typeAnnotation : type;
115730
115770
  });
115731
- const flattened = (0, _removeTypeDuplicates.default)(types17);
115771
+ const flattened = (0, _removeTypeDuplicates.default)(types18);
115732
115772
  if (flattened.length === 1) {
115733
115773
  return flattened[0];
115734
115774
  } else {
@@ -119992,14 +120032,14 @@ var require_lib62 = __commonJS3({
119992
120032
  this.preserveSpace = !!preserveSpace;
119993
120033
  }
119994
120034
  };
119995
- var types17 = {
120035
+ var types18 = {
119996
120036
  brace: new TokContext3("{"),
119997
120037
  j_oTag: new TokContext3("<tag"),
119998
120038
  j_cTag: new TokContext3("</tag"),
119999
120039
  j_expr: new TokContext3("<tag>...</tag>", true)
120000
120040
  };
120001
120041
  {
120002
- types17.template = new TokContext3("`", true);
120042
+ types18.template = new TokContext3("`", true);
120003
120043
  }
120004
120044
  var beforeExpr2 = true;
120005
120045
  var startsExpr2 = true;
@@ -120537,17 +120577,17 @@ var require_lib62 = __commonJS3({
120537
120577
  context.pop();
120538
120578
  };
120539
120579
  tokenTypes[5].updateContext = tokenTypes[7].updateContext = tokenTypes[23].updateContext = (context) => {
120540
- context.push(types17.brace);
120580
+ context.push(types18.brace);
120541
120581
  };
120542
120582
  tokenTypes[22].updateContext = (context) => {
120543
- if (context[context.length - 1] === types17.template) {
120583
+ if (context[context.length - 1] === types18.template) {
120544
120584
  context.pop();
120545
120585
  } else {
120546
- context.push(types17.template);
120586
+ context.push(types18.template);
120547
120587
  }
120548
120588
  };
120549
120589
  tokenTypes[142].updateContext = (context) => {
120550
- context.push(types17.j_expr, types17.j_oTag);
120590
+ context.push(types18.j_expr, types18.j_oTag);
120551
120591
  };
120552
120592
  }
120553
120593
  var nonASCIIidentifierStartChars2 = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
@@ -121107,7 +121147,7 @@ var require_lib62 = __commonJS3({
121107
121147
  this.end = 0;
121108
121148
  this.lastTokEndLoc = null;
121109
121149
  this.lastTokStartLoc = null;
121110
- this.context = [types17.brace];
121150
+ this.context = [types18.brace];
121111
121151
  this.firstInvalidTemplateEscapePos = null;
121112
121152
  this.strictErrors = /* @__PURE__ */ new Map();
121113
121153
  this.tokensLength = 0;
@@ -124934,7 +124974,7 @@ var require_lib62 = __commonJS3({
124934
124974
  context
124935
124975
  } = this.state;
124936
124976
  const currentContext = context[context.length - 1];
124937
- if (currentContext === types17.j_oTag || currentContext === types17.j_expr) {
124977
+ if (currentContext === types18.j_oTag || currentContext === types18.j_expr) {
124938
124978
  context.pop();
124939
124979
  }
124940
124980
  }
@@ -125956,9 +125996,9 @@ var require_lib62 = __commonJS3({
125956
125996
  switch (this.state.type) {
125957
125997
  case 5:
125958
125998
  node = this.startNode();
125959
- this.setContext(types17.brace);
125999
+ this.setContext(types18.brace);
125960
126000
  this.next();
125961
- node = this.jsxParseExpressionContainer(node, types17.j_oTag);
126001
+ node = this.jsxParseExpressionContainer(node, types18.j_oTag);
125962
126002
  if (node.expression.type === "JSXEmptyExpression") {
125963
126003
  this.raise(JsxErrors.AttributeIsEmpty, node);
125964
126004
  }
@@ -125977,7 +126017,7 @@ var require_lib62 = __commonJS3({
125977
126017
  jsxParseSpreadChild(node) {
125978
126018
  this.next();
125979
126019
  node.expression = this.parseExpression();
125980
- this.setContext(types17.j_expr);
126020
+ this.setContext(types18.j_expr);
125981
126021
  this.state.canStartJSXElement = true;
125982
126022
  this.expect(8);
125983
126023
  return this.finishNode(node, "JSXSpreadChild");
@@ -125997,11 +126037,11 @@ var require_lib62 = __commonJS3({
125997
126037
  jsxParseAttribute() {
125998
126038
  const node = this.startNode();
125999
126039
  if (this.match(5)) {
126000
- this.setContext(types17.brace);
126040
+ this.setContext(types18.brace);
126001
126041
  this.next();
126002
126042
  this.expect(21);
126003
126043
  node.argument = this.parseMaybeAssignAllowIn();
126004
- this.setContext(types17.j_oTag);
126044
+ this.setContext(types18.j_oTag);
126005
126045
  this.state.canStartJSXElement = true;
126006
126046
  this.expect(8);
126007
126047
  return this.finishNode(node, "JSXSpreadAttribute");
@@ -126060,12 +126100,12 @@ var require_lib62 = __commonJS3({
126060
126100
  break;
126061
126101
  case 5: {
126062
126102
  const node2 = this.startNode();
126063
- this.setContext(types17.brace);
126103
+ this.setContext(types18.brace);
126064
126104
  this.next();
126065
126105
  if (this.match(21)) {
126066
126106
  children.push(this.jsxParseSpreadChild(node2));
126067
126107
  } else {
126068
- children.push(this.jsxParseExpressionContainer(node2, types17.j_expr));
126108
+ children.push(this.jsxParseExpressionContainer(node2, types18.j_expr));
126069
126109
  }
126070
126110
  break;
126071
126111
  }
@@ -126130,11 +126170,11 @@ var require_lib62 = __commonJS3({
126130
126170
  }
126131
126171
  getTokenFromCode(code2) {
126132
126172
  const context = this.curContext();
126133
- if (context === types17.j_expr) {
126173
+ if (context === types18.j_expr) {
126134
126174
  this.jsxReadToken();
126135
126175
  return;
126136
126176
  }
126137
- if (context === types17.j_oTag || context === types17.j_cTag) {
126177
+ if (context === types18.j_oTag || context === types18.j_cTag) {
126138
126178
  if (isIdentifierStart2(code2)) {
126139
126179
  this.jsxReadWord();
126140
126180
  return;
@@ -126144,7 +126184,7 @@ var require_lib62 = __commonJS3({
126144
126184
  this.finishToken(143);
126145
126185
  return;
126146
126186
  }
126147
- if ((code2 === 34 || code2 === 39) && context === types17.j_oTag) {
126187
+ if ((code2 === 34 || code2 === 39) && context === types18.j_oTag) {
126148
126188
  this.jsxReadString(code2);
126149
126189
  return;
126150
126190
  }
@@ -126162,17 +126202,17 @@ var require_lib62 = __commonJS3({
126162
126202
  type
126163
126203
  } = this.state;
126164
126204
  if (type === 56 && prevType === 142) {
126165
- context.splice(-2, 2, types17.j_cTag);
126205
+ context.splice(-2, 2, types18.j_cTag);
126166
126206
  this.state.canStartJSXElement = false;
126167
126207
  } else if (type === 142) {
126168
- context.push(types17.j_oTag);
126208
+ context.push(types18.j_oTag);
126169
126209
  } else if (type === 143) {
126170
126210
  const out = context[context.length - 1];
126171
- if (out === types17.j_oTag && prevType === 56 || out === types17.j_cTag) {
126211
+ if (out === types18.j_oTag && prevType === 56 || out === types18.j_cTag) {
126172
126212
  context.pop();
126173
- this.state.canStartJSXElement = context[context.length - 1] === types17.j_expr;
126213
+ this.state.canStartJSXElement = context[context.length - 1] === types18.j_expr;
126174
126214
  } else {
126175
- this.setContext(types17.j_expr);
126215
+ this.setContext(types18.j_expr);
126176
126216
  this.state.canStartJSXElement = true;
126177
126217
  }
126178
126218
  } else {
@@ -127547,14 +127587,14 @@ var require_lib62 = __commonJS3({
127547
127587
  tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) {
127548
127588
  const node = this.startNode();
127549
127589
  const hasLeadingOperator = this.eat(operator);
127550
- const types18 = [];
127590
+ const types19 = [];
127551
127591
  do {
127552
- types18.push(parseConstituentType());
127592
+ types19.push(parseConstituentType());
127553
127593
  } while (this.eat(operator));
127554
- if (types18.length === 1 && !hasLeadingOperator) {
127555
- return types18[0];
127594
+ if (types19.length === 1 && !hasLeadingOperator) {
127595
+ return types19[0];
127556
127596
  }
127557
- node.types = types18;
127597
+ node.types = types19;
127558
127598
  return this.finishNode(node, kind);
127559
127599
  }
127560
127600
  tsParseIntersectionTypeOrHigher() {
@@ -128118,7 +128158,7 @@ var require_lib62 = __commonJS3({
128118
128158
  }));
128119
128159
  if (node.params.length === 0) {
128120
128160
  this.raise(TSErrors.EmptyTypeArguments, node);
128121
- } else if (!this.state.inType && this.curContext() === types17.brace) {
128161
+ } else if (!this.state.inType && this.curContext() === types18.brace) {
128122
128162
  this.reScan_lt_gt();
128123
128163
  }
128124
128164
  this.expect(48);
@@ -128744,7 +128784,7 @@ var require_lib62 = __commonJS3({
128744
128784
  context
128745
128785
  } = this.state;
128746
128786
  const currentContext = context[context.length - 1];
128747
- if (currentContext === types17.j_oTag || currentContext === types17.j_expr) {
128787
+ if (currentContext === types18.j_oTag || currentContext === types18.j_expr) {
128748
128788
  context.pop();
128749
128789
  }
128750
128790
  }
@@ -133872,9 +133912,9 @@ var require_shared2 = __commonJS3({
133872
133912
  var tslib_1 = require_tslib2();
133873
133913
  var types_1 = tslib_1.__importDefault(require_types2());
133874
133914
  function default_1(fork) {
133875
- var types17 = fork.use(types_1.default);
133876
- var Type = types17.Type;
133877
- var builtin = types17.builtInTypes;
133915
+ var types18 = fork.use(types_1.default);
133916
+ var Type = types18.Type;
133917
+ var builtin = types18.builtInTypes;
133878
133918
  var isNumber = builtin.number;
133879
133919
  function geq(than) {
133880
133920
  return Type.from(function(value) {
@@ -134022,9 +134062,9 @@ var require_types2 = __commonJS3({
134022
134062
  }(BaseType);
134023
134063
  var OrType = function(_super) {
134024
134064
  tslib_1.__extends(OrType2, _super);
134025
- function OrType2(types17) {
134065
+ function OrType2(types18) {
134026
134066
  var _this = _super.call(this) || this;
134027
- _this.types = types17;
134067
+ _this.types = types18;
134028
134068
  _this.kind = "OrType";
134029
134069
  return _this;
134030
134070
  }
@@ -134165,11 +134205,11 @@ var require_types2 = __commonJS3({
134165
134205
  function typesPlugin(_fork) {
134166
134206
  var Type = {
134167
134207
  or: function() {
134168
- var types17 = [];
134208
+ var types18 = [];
134169
134209
  for (var _i = 0; _i < arguments.length; _i++) {
134170
- types17[_i] = arguments[_i];
134210
+ types18[_i] = arguments[_i];
134171
134211
  }
134172
- return new OrType(types17.map(function(type) {
134212
+ return new OrType(types18.map(function(type) {
134173
134213
  return Type.from(type);
134174
134214
  }));
134175
134215
  },
@@ -134612,9 +134652,9 @@ var require_path22 = __commonJS3({
134612
134652
  var Op = Object.prototype;
134613
134653
  var hasOwn2 = Op.hasOwnProperty;
134614
134654
  function pathPlugin(fork) {
134615
- var types17 = fork.use(types_1.default);
134616
- var isArray2 = types17.builtInTypes.array;
134617
- var isNumber = types17.builtInTypes.number;
134655
+ var types18 = fork.use(types_1.default);
134656
+ var isArray2 = types18.builtInTypes.array;
134657
+ var isNumber = types18.builtInTypes.number;
134618
134658
  var Path = function Path2(value, parentPath, name) {
134619
134659
  if (!(this instanceof Path2)) {
134620
134660
  throw new Error("Path constructor cannot be invoked without 'new'");
@@ -134914,13 +134954,13 @@ var require_scope2 = __commonJS3({
134914
134954
  var types_1 = tslib_1.__importDefault(require_types2());
134915
134955
  var hasOwn2 = Object.prototype.hasOwnProperty;
134916
134956
  function scopePlugin(fork) {
134917
- var types17 = fork.use(types_1.default);
134918
- var Type = types17.Type;
134919
- var namedTypes = types17.namedTypes;
134957
+ var types18 = fork.use(types_1.default);
134958
+ var Type = types18.Type;
134959
+ var namedTypes = types18.namedTypes;
134920
134960
  var Node3 = namedTypes.Node;
134921
134961
  var Expression = namedTypes.Expression;
134922
- var isArray2 = types17.builtInTypes.array;
134923
- var b2 = types17.builders;
134962
+ var isArray2 = types18.builtInTypes.array;
134963
+ var b2 = types18.builders;
134924
134964
  var Scope4 = function Scope22(path3, parentScope) {
134925
134965
  if (!(this instanceof Scope22)) {
134926
134966
  throw new Error("Scope constructor cannot be invoked without 'new'");
@@ -134983,7 +135023,7 @@ var require_scope2 = __commonJS3({
134983
135023
  ++index;
134984
135024
  }
134985
135025
  var name = prefix + index;
134986
- return this.bindings[name] = types17.builders.identifier(name);
135026
+ return this.bindings[name] = types18.builders.identifier(name);
134987
135027
  };
134988
135028
  Sp.injectTemporary = function(identifier, init2) {
134989
135029
  identifier || (identifier = this.declareTemporary());
@@ -135059,7 +135099,7 @@ var require_scope2 = __commonJS3({
135059
135099
  bindings
135060
135100
  );
135061
135101
  } else if (Node3.check(node) && !Expression.check(node)) {
135062
- types17.eachField(node, function(name, child) {
135102
+ types18.eachField(node, function(name, child) {
135063
135103
  var childPath = path3.get(name);
135064
135104
  if (!pathHasValue(childPath, child)) {
135065
135105
  throw new Error("");
@@ -135137,24 +135177,24 @@ var require_scope2 = __commonJS3({
135137
135177
  addPattern(patternPath.get("argument"), bindings);
135138
135178
  }
135139
135179
  }
135140
- function addTypePattern(patternPath, types18) {
135180
+ function addTypePattern(patternPath, types19) {
135141
135181
  var pattern = patternPath.value;
135142
135182
  namedTypes.Pattern.assert(pattern);
135143
135183
  if (namedTypes.Identifier.check(pattern)) {
135144
- if (hasOwn2.call(types18, pattern.name)) {
135145
- types18[pattern.name].push(patternPath);
135184
+ if (hasOwn2.call(types19, pattern.name)) {
135185
+ types19[pattern.name].push(patternPath);
135146
135186
  } else {
135147
- types18[pattern.name] = [patternPath];
135187
+ types19[pattern.name] = [patternPath];
135148
135188
  }
135149
135189
  }
135150
135190
  }
135151
- function addTypeParameter(parameterPath, types18) {
135191
+ function addTypeParameter(parameterPath, types19) {
135152
135192
  var parameter = parameterPath.value;
135153
135193
  FlowOrTSTypeParameterType.assert(parameter);
135154
- if (hasOwn2.call(types18, parameter.name)) {
135155
- types18[parameter.name].push(parameterPath);
135194
+ if (hasOwn2.call(types19, parameter.name)) {
135195
+ types19[parameter.name].push(parameterPath);
135156
135196
  } else {
135157
- types18[parameter.name] = [parameterPath];
135197
+ types19[parameter.name] = [parameterPath];
135158
135198
  }
135159
135199
  }
135160
135200
  Sp.lookup = function(name) {
@@ -135193,11 +135233,11 @@ var require_node_path2 = __commonJS3({
135193
135233
  var scope_1 = tslib_1.__importDefault(require_scope2());
135194
135234
  var shared_1 = require_shared2();
135195
135235
  function nodePathPlugin(fork) {
135196
- var types17 = fork.use(types_1.default);
135197
- var n2 = types17.namedTypes;
135198
- var b2 = types17.builders;
135199
- var isNumber = types17.builtInTypes.number;
135200
- var isArray2 = types17.builtInTypes.array;
135236
+ var types18 = fork.use(types_1.default);
135237
+ var n2 = types18.namedTypes;
135238
+ var b2 = types18.builders;
135239
+ var isNumber = types18.builtInTypes.number;
135240
+ var isArray2 = types18.builtInTypes.array;
135201
135241
  var Path = fork.use(path_1.default);
135202
135242
  var Scope4 = fork.use(scope_1.default);
135203
135243
  var NodePath = function NodePath2(value, parentPath, name) {
@@ -135288,7 +135328,7 @@ var require_node_path2 = __commonJS3({
135288
135328
  return scope || null;
135289
135329
  };
135290
135330
  NPp.getValueProperty = function(name) {
135291
- return types17.getFieldValue(this.value, name);
135331
+ return types18.getFieldValue(this.value, name);
135292
135332
  };
135293
135333
  NPp.needsParens = function(assumeExpressionContext) {
135294
135334
  var pp2 = this.parentPath;
@@ -135430,7 +135470,7 @@ var require_node_path2 = __commonJS3({
135430
135470
  return node.some(containsCallExpression);
135431
135471
  }
135432
135472
  if (n2.Node.check(node)) {
135433
- return types17.someField(node, function(_name, child) {
135473
+ return types18.someField(node, function(_name, child) {
135434
135474
  return containsCallExpression(child);
135435
135475
  });
135436
135476
  }
@@ -135549,11 +135589,11 @@ var require_path_visitor2 = __commonJS3({
135549
135589
  var shared_1 = require_shared2();
135550
135590
  var hasOwn2 = Object.prototype.hasOwnProperty;
135551
135591
  function pathVisitorPlugin(fork) {
135552
- var types17 = fork.use(types_1.default);
135592
+ var types18 = fork.use(types_1.default);
135553
135593
  var NodePath = fork.use(node_path_1.default);
135554
- var isArray2 = types17.builtInTypes.array;
135555
- var isObject2 = types17.builtInTypes.object;
135556
- var isFunction = types17.builtInTypes.function;
135594
+ var isArray2 = types18.builtInTypes.array;
135595
+ var isObject2 = types18.builtInTypes.object;
135596
+ var isFunction = types18.builtInTypes.function;
135557
135597
  var undefined2;
135558
135598
  var PathVisitor = function PathVisitor2() {
135559
135599
  if (!(this instanceof PathVisitor2)) {
@@ -135573,7 +135613,7 @@ var require_path_visitor2 = __commonJS3({
135573
135613
  typeNames[methodName.slice("visit".length)] = true;
135574
135614
  }
135575
135615
  }
135576
- var supertypeTable = types17.computeSupertypeLookupTable(typeNames);
135616
+ var supertypeTable = types18.computeSupertypeLookupTable(typeNames);
135577
135617
  var methodNameTable = /* @__PURE__ */ Object.create(null);
135578
135618
  var typeNameKeys = Object.keys(supertypeTable);
135579
135619
  var typeNameCount = typeNameKeys.length;
@@ -135692,7 +135732,7 @@ var require_path_visitor2 = __commonJS3({
135692
135732
  path3.each(visitor.visitWithoutReset, visitor);
135693
135733
  } else if (!isObject2.check(value)) {
135694
135734
  } else {
135695
- var childNames = types17.getFieldNames(value);
135735
+ var childNames = types18.getFieldNames(value);
135696
135736
  if (visitor._shouldVisitComments && value.comments && childNames.indexOf("comments") < 0) {
135697
135737
  childNames.push("comments");
135698
135738
  }
@@ -135701,7 +135741,7 @@ var require_path_visitor2 = __commonJS3({
135701
135741
  for (var i22 = 0; i22 < childCount; ++i22) {
135702
135742
  var childName = childNames[i22];
135703
135743
  if (!hasOwn2.call(value, childName)) {
135704
- value[childName] = types17.getFieldValue(value, childName);
135744
+ value[childName] = types18.getFieldValue(value, childName);
135705
135745
  }
135706
135746
  childPaths.push(path3.get(childName));
135707
135747
  }
@@ -135842,13 +135882,13 @@ var require_equiv2 = __commonJS3({
135842
135882
  var shared_1 = require_shared2();
135843
135883
  var types_1 = tslib_1.__importDefault(require_types2());
135844
135884
  function default_1(fork) {
135845
- var types17 = fork.use(types_1.default);
135846
- var getFieldNames = types17.getFieldNames;
135847
- var getFieldValue = types17.getFieldValue;
135848
- var isArray2 = types17.builtInTypes.array;
135849
- var isObject2 = types17.builtInTypes.object;
135850
- var isDate = types17.builtInTypes.Date;
135851
- var isRegExp = types17.builtInTypes.RegExp;
135885
+ var types18 = fork.use(types_1.default);
135886
+ var getFieldNames = types18.getFieldNames;
135887
+ var getFieldValue = types18.getFieldValue;
135888
+ var isArray2 = types18.builtInTypes.array;
135889
+ var isObject2 = types18.builtInTypes.object;
135890
+ var isDate = types18.builtInTypes.Date;
135891
+ var isRegExp = types18.builtInTypes.RegExp;
135852
135892
  var hasOwn2 = Object.prototype.hasOwnProperty;
135853
135893
  function astNodesAreEquivalent(a2, b2, problemPath) {
135854
135894
  if (isArray2.check(problemPath)) {
@@ -135999,24 +136039,24 @@ var require_fork2 = __commonJS3({
135999
136039
  var shared_1 = require_shared2();
136000
136040
  function default_1(plugins) {
136001
136041
  var fork = createFork();
136002
- var types17 = fork.use(types_1.default);
136042
+ var types18 = fork.use(types_1.default);
136003
136043
  plugins.forEach(fork.use);
136004
- types17.finalize();
136044
+ types18.finalize();
136005
136045
  var PathVisitor = fork.use(path_visitor_1.default);
136006
136046
  return {
136007
- Type: types17.Type,
136008
- builtInTypes: types17.builtInTypes,
136009
- namedTypes: types17.namedTypes,
136010
- builders: types17.builders,
136011
- defineMethod: types17.defineMethod,
136012
- getFieldNames: types17.getFieldNames,
136013
- getFieldValue: types17.getFieldValue,
136014
- eachField: types17.eachField,
136015
- someField: types17.someField,
136016
- getSupertypeNames: types17.getSupertypeNames,
136017
- getBuilderName: types17.getBuilderName,
136047
+ Type: types18.Type,
136048
+ builtInTypes: types18.builtInTypes,
136049
+ namedTypes: types18.namedTypes,
136050
+ builders: types18.builders,
136051
+ defineMethod: types18.defineMethod,
136052
+ getFieldNames: types18.getFieldNames,
136053
+ getFieldValue: types18.getFieldValue,
136054
+ eachField: types18.eachField,
136055
+ someField: types18.someField,
136056
+ getSupertypeNames: types18.getSupertypeNames,
136057
+ getBuilderName: types18.getBuilderName,
136018
136058
  astNodesAreEquivalent: fork.use(equiv_1.default),
136019
- finalize: types17.finalize,
136059
+ finalize: types18.finalize,
136020
136060
  Path: fork.use(path_1.default),
136021
136061
  NodePath: fork.use(node_path_1.default),
136022
136062
  PathVisitor,
@@ -136176,8 +136216,8 @@ var require_core32 = __commonJS3({
136176
136216
  var types_1 = tslib_1.__importDefault(require_types2());
136177
136217
  var shared_1 = tslib_1.__importStar(require_shared2());
136178
136218
  function default_1(fork) {
136179
- var types17 = fork.use(types_1.default);
136180
- var Type = types17.Type;
136219
+ var types18 = fork.use(types_1.default);
136220
+ var Type = types18.Type;
136181
136221
  var def = Type.def;
136182
136222
  var or = Type.or;
136183
136223
  var shared2 = fork.use(shared_1.default);
@@ -136267,9 +136307,9 @@ var require_es62 = __commonJS3({
136267
136307
  var shared_1 = tslib_1.__importStar(require_shared2());
136268
136308
  function default_1(fork) {
136269
136309
  fork.use(core_1.default);
136270
- var types17 = fork.use(types_1.default);
136271
- var def = types17.Type.def;
136272
- var or = types17.Type.or;
136310
+ var types18 = fork.use(types_1.default);
136311
+ var def = types18.Type.def;
136312
+ var or = types18.Type.or;
136273
136313
  var defaults = fork.use(shared_1.default).defaults;
136274
136314
  def("Function").field("generator", Boolean, defaults["false"]).field("expression", Boolean, defaults["false"]).field("defaults", [or(def("Expression"), null)], defaults.emptyArray).field("rest", or(def("Identifier"), null), defaults["null"]);
136275
136315
  def("RestElement").bases("Pattern").build("argument").field("argument", def("Pattern")).field(
@@ -136355,8 +136395,8 @@ var require_es20172 = __commonJS3({
136355
136395
  var shared_1 = tslib_1.__importStar(require_shared2());
136356
136396
  function default_1(fork) {
136357
136397
  fork.use(es2016_1.default);
136358
- var types17 = fork.use(types_1.default);
136359
- var def = types17.Type.def;
136398
+ var types18 = fork.use(types_1.default);
136399
+ var def = types18.Type.def;
136360
136400
  var defaults = fork.use(shared_1.default).defaults;
136361
136401
  def("Function").field("async", Boolean, defaults["false"]);
136362
136402
  def("AwaitExpression").bases("Expression").build("argument").field("argument", def("Expression"));
@@ -136377,9 +136417,9 @@ var require_es20182 = __commonJS3({
136377
136417
  var shared_1 = tslib_1.__importStar(require_shared2());
136378
136418
  function default_1(fork) {
136379
136419
  fork.use(es2017_1.default);
136380
- var types17 = fork.use(types_1.default);
136381
- var def = types17.Type.def;
136382
- var or = types17.Type.or;
136420
+ var types18 = fork.use(types_1.default);
136421
+ var def = types18.Type.def;
136422
+ var or = types18.Type.or;
136383
136423
  var defaults = fork.use(shared_1.default).defaults;
136384
136424
  def("ForOfStatement").field("await", Boolean, defaults["false"]);
136385
136425
  def("SpreadProperty").bases("Node").build("argument").field("argument", def("Expression"));
@@ -136408,9 +136448,9 @@ var require_es20192 = __commonJS3({
136408
136448
  var shared_1 = tslib_1.__importStar(require_shared2());
136409
136449
  function default_1(fork) {
136410
136450
  fork.use(es2018_1.default);
136411
- var types17 = fork.use(types_1.default);
136412
- var def = types17.Type.def;
136413
- var or = types17.Type.or;
136451
+ var types18 = fork.use(types_1.default);
136452
+ var def = types18.Type.def;
136453
+ var or = types18.Type.or;
136414
136454
  var defaults = fork.use(shared_1.default).defaults;
136415
136455
  def("CatchClause").field("param", or(def("Pattern"), null), defaults["null"]);
136416
136456
  }
@@ -136432,9 +136472,9 @@ var require_es202022 = __commonJS3({
136432
136472
  function default_1(fork) {
136433
136473
  fork.use(es2020_1.default);
136434
136474
  fork.use(es2019_1.default);
136435
- var types17 = fork.use(types_1.default);
136436
- var def = types17.Type.def;
136437
- var or = types17.Type.or;
136475
+ var types18 = fork.use(types_1.default);
136476
+ var def = types18.Type.def;
136477
+ var or = types18.Type.or;
136438
136478
  var shared2 = fork.use(shared_1.default);
136439
136479
  var defaults = shared2.defaults;
136440
136480
  def("ImportExpression").bases("Expression").build("source").field("source", def("Expression"));
@@ -136480,8 +136520,8 @@ var require_es20222 = __commonJS3({
136480
136520
  var shared_1 = require_shared2();
136481
136521
  function default_1(fork) {
136482
136522
  fork.use(es2021_1.default);
136483
- var types17 = fork.use(types_1.default);
136484
- var def = types17.Type.def;
136523
+ var types18 = fork.use(types_1.default);
136524
+ var def = types18.Type.def;
136485
136525
  def("StaticBlock").bases("Declaration").build("body").field("body", [def("Statement")]);
136486
136526
  }
136487
136527
  exports.default = default_1;
@@ -136500,9 +136540,9 @@ var require_es_proposals2 = __commonJS3({
136500
136540
  var es2022_1 = tslib_1.__importDefault(require_es20222());
136501
136541
  function default_1(fork) {
136502
136542
  fork.use(es2022_1.default);
136503
- var types17 = fork.use(types_1.default);
136504
- var Type = types17.Type;
136505
- var def = types17.Type.def;
136543
+ var types18 = fork.use(types_1.default);
136544
+ var Type = types18.Type;
136545
+ var def = types18.Type.def;
136506
136546
  var or = Type.or;
136507
136547
  var shared2 = fork.use(shared_1.default);
136508
136548
  var defaults = shared2.defaults;
@@ -136540,9 +136580,9 @@ var require_jsx22 = __commonJS3({
136540
136580
  var shared_1 = tslib_1.__importStar(require_shared2());
136541
136581
  function default_1(fork) {
136542
136582
  fork.use(es_proposals_1.default);
136543
- var types17 = fork.use(types_1.default);
136544
- var def = types17.Type.def;
136545
- var or = types17.Type.or;
136583
+ var types18 = fork.use(types_1.default);
136584
+ var def = types18.Type.def;
136585
+ var or = types18.Type.or;
136546
136586
  var defaults = fork.use(shared_1.default).defaults;
136547
136587
  def("JSXAttribute").bases("Node").build("name", "value").field("name", or(def("JSXIdentifier"), def("JSXNamespacedName"))).field("value", or(
136548
136588
  def("Literal"),
@@ -136598,9 +136638,9 @@ var require_type_annotations2 = __commonJS3({
136598
136638
  var types_1 = tslib_1.__importDefault(require_types2());
136599
136639
  var shared_1 = tslib_1.__importStar(require_shared2());
136600
136640
  function default_1(fork) {
136601
- var types17 = fork.use(types_1.default);
136602
- var def = types17.Type.def;
136603
- var or = types17.Type.or;
136641
+ var types18 = fork.use(types_1.default);
136642
+ var def = types18.Type.def;
136643
+ var or = types18.Type.or;
136604
136644
  var defaults = fork.use(shared_1.default).defaults;
136605
136645
  var TypeAnnotation = or(def("TypeAnnotation"), def("TSTypeAnnotation"), null);
136606
136646
  var TypeParamDecl = or(def("TypeParameterDeclaration"), def("TSTypeParameterDeclaration"), null);
@@ -136633,9 +136673,9 @@ var require_flow22 = __commonJS3({
136633
136673
  function default_1(fork) {
136634
136674
  fork.use(es_proposals_1.default);
136635
136675
  fork.use(type_annotations_1.default);
136636
- var types17 = fork.use(types_1.default);
136637
- var def = types17.Type.def;
136638
- var or = types17.Type.or;
136676
+ var types18 = fork.use(types_1.default);
136677
+ var def = types18.Type.def;
136678
+ var or = types18.Type.or;
136639
136679
  var defaults = fork.use(shared_1.default).defaults;
136640
136680
  def("Flow").bases("Node");
136641
136681
  def("FlowType").bases("Flow");
@@ -136747,10 +136787,10 @@ var require_esprima4 = __commonJS3({
136747
136787
  var shared_1 = tslib_1.__importStar(require_shared2());
136748
136788
  function default_1(fork) {
136749
136789
  fork.use(es_proposals_1.default);
136750
- var types17 = fork.use(types_1.default);
136790
+ var types18 = fork.use(types_1.default);
136751
136791
  var defaults = fork.use(shared_1.default).defaults;
136752
- var def = types17.Type.def;
136753
- var or = types17.Type.or;
136792
+ var def = types18.Type.def;
136793
+ var or = types18.Type.or;
136754
136794
  def("VariableDeclaration").field("declarations", [or(
136755
136795
  def("VariableDeclarator"),
136756
136796
  def("Identifier")
@@ -136793,11 +136833,11 @@ var require_babel_core2 = __commonJS3({
136793
136833
  function default_1(fork) {
136794
136834
  var _a, _b, _c, _d, _e;
136795
136835
  fork.use(es_proposals_1.default);
136796
- var types17 = fork.use(types_1.default);
136836
+ var types18 = fork.use(types_1.default);
136797
136837
  var defaults = fork.use(shared_1.default).defaults;
136798
- var def = types17.Type.def;
136799
- var or = types17.Type.or;
136800
- var isUndefined = types17.builtInTypes.undefined;
136838
+ var def = types18.Type.def;
136839
+ var or = types18.Type.or;
136840
+ var isUndefined = types18.builtInTypes.undefined;
136801
136841
  def("Noop").bases("Statement").build();
136802
136842
  def("DoExpression").bases("Expression").build("body").field("body", [def("Statement")]);
136803
136843
  def("BindExpression").bases("Expression").build("object", "callee").field("object", or(def("Expression"), null)).field("callee", def("Expression"));
@@ -136822,7 +136862,7 @@ var require_babel_core2 = __commonJS3({
136822
136862
  raw: String
136823
136863
  },
136824
136864
  function getDefault() {
136825
- var value = types17.getFieldValue(this, "value");
136865
+ var value = types18.getFieldValue(this, "value");
136826
136866
  return {
136827
136867
  rawValue: value,
136828
136868
  raw: toRaw ? toRaw(value) : String(value)
@@ -136923,8 +136963,8 @@ var require_babel2 = __commonJS3({
136923
136963
  var flow_1 = tslib_1.__importDefault(require_flow22());
136924
136964
  var shared_1 = require_shared2();
136925
136965
  function default_1(fork) {
136926
- var types17 = fork.use(types_1.default);
136927
- var def = types17.Type.def;
136966
+ var types18 = fork.use(types_1.default);
136967
+ var def = types18.Type.def;
136928
136968
  fork.use(babel_core_1.default);
136929
136969
  fork.use(flow_1.default);
136930
136970
  def("V8IntrinsicIdentifier").bases("Expression").build("name").field("name", String);
@@ -136948,12 +136988,12 @@ var require_typescript22 = __commonJS3({
136948
136988
  function default_1(fork) {
136949
136989
  fork.use(babel_core_1.default);
136950
136990
  fork.use(type_annotations_1.default);
136951
- var types17 = fork.use(types_1.default);
136952
- var n2 = types17.namedTypes;
136953
- var def = types17.Type.def;
136954
- var or = types17.Type.or;
136991
+ var types18 = fork.use(types_1.default);
136992
+ var n2 = types18.namedTypes;
136993
+ var def = types18.Type.def;
136994
+ var or = types18.Type.or;
136955
136995
  var defaults = fork.use(shared_1.default).defaults;
136956
- var StringLiteral = types17.Type.from(function(value, deep) {
136996
+ var StringLiteral = types18.Type.from(function(value, deep) {
136957
136997
  if (n2.StringLiteral && n2.StringLiteral.check(value, deep)) {
136958
136998
  return true;
136959
136999
  }
@@ -138901,8 +138941,8 @@ var require_util22 = __commonJS3({
138901
138941
  exports.isTrailingCommaEnabled = exports.getParentExportDeclaration = exports.isExportDeclaration = exports.fixFaultyLocations = exports.getTrueLoc = exports.composeSourceMaps = exports.copyPos = exports.comparePos = exports.getUnionOfKeys = exports.getOption = exports.isBrowser = exports.getLineTerminator = void 0;
138902
138942
  var tslib_1 = require_tslib2();
138903
138943
  var assert_1 = tslib_1.__importDefault(__require2("assert"));
138904
- var types17 = tslib_1.__importStar(require_main3());
138905
- var n2 = types17.namedTypes;
138944
+ var types18 = tslib_1.__importStar(require_main3());
138945
+ var n2 = types18.namedTypes;
138906
138946
  var source_map_1 = tslib_1.__importDefault(require_source_map2());
138907
138947
  var SourceMapConsumer = source_map_1.default.SourceMapConsumer;
138908
138948
  var SourceMapGenerator = source_map_1.default.SourceMapGenerator;
@@ -146208,10 +146248,10 @@ var require_comments2 = __commonJS3({
146208
146248
  exports.printComments = exports.attach = void 0;
146209
146249
  var tslib_1 = require_tslib2();
146210
146250
  var assert_1 = tslib_1.__importDefault(__require2("assert"));
146211
- var types17 = tslib_1.__importStar(require_main3());
146212
- var n2 = types17.namedTypes;
146213
- var isArray2 = types17.builtInTypes.array;
146214
- var isObject2 = types17.builtInTypes.object;
146251
+ var types18 = tslib_1.__importStar(require_main3());
146252
+ var n2 = types18.namedTypes;
146253
+ var isArray2 = types18.builtInTypes.array;
146254
+ var isObject2 = types18.builtInTypes.object;
146215
146255
  var lines_1 = require_lines2();
146216
146256
  var util_1 = require_util22();
146217
146257
  var childNodesCache = /* @__PURE__ */ new WeakMap();
@@ -146242,7 +146282,7 @@ var require_comments2 = __commonJS3({
146242
146282
  if (isArray2.check(node)) {
146243
146283
  names = Object.keys(node);
146244
146284
  } else if (isObject2.check(node)) {
146245
- names = types17.getFieldNames(node);
146285
+ names = types18.getFieldNames(node);
146246
146286
  } else {
146247
146287
  return resultArray;
146248
146288
  }
@@ -146420,7 +146460,7 @@ var require_comments2 = __commonJS3({
146420
146460
  function printComments(path3, print132) {
146421
146461
  var value = path3.getValue();
146422
146462
  var innerLines = print132(path3);
146423
- var comments = n2.Node.check(value) && types17.getFieldValue(value, "comments");
146463
+ var comments = n2.Node.check(value) && types18.getFieldValue(value, "comments");
146424
146464
  if (!comments || comments.length === 0) {
146425
146465
  return innerLines;
146426
146466
  }
@@ -146428,8 +146468,8 @@ var require_comments2 = __commonJS3({
146428
146468
  var trailingParts = [innerLines];
146429
146469
  path3.each(function(commentPath) {
146430
146470
  var comment = commentPath.getValue();
146431
- var leading = types17.getFieldValue(comment, "leading");
146432
- var trailing = types17.getFieldValue(comment, "trailing");
146471
+ var leading = types18.getFieldValue(comment, "leading");
146472
+ var trailing = types18.getFieldValue(comment, "trailing");
146433
146473
  if (leading || trailing && !(n2.Statement.check(value) || comment.type === "Block" || comment.type === "CommentBlock")) {
146434
146474
  leadingParts.push(printLeadingComment(commentPath, print132));
146435
146475
  } else if (trailing) {
@@ -146449,10 +146489,10 @@ var require_parser2 = __commonJS3({
146449
146489
  exports.parse = void 0;
146450
146490
  var tslib_1 = require_tslib2();
146451
146491
  var assert_1 = tslib_1.__importDefault(__require2("assert"));
146452
- var types17 = tslib_1.__importStar(require_main3());
146453
- var b2 = types17.builders;
146454
- var isObject2 = types17.builtInTypes.object;
146455
- var isArray2 = types17.builtInTypes.array;
146492
+ var types18 = tslib_1.__importStar(require_main3());
146493
+ var b2 = types18.builders;
146494
+ var isObject2 = types18.builtInTypes.object;
146495
+ var isArray2 = types18.builtInTypes.array;
146456
146496
  var options_1 = require_options2();
146457
146497
  var lines_1 = require_lines2();
146458
146498
  var comments_1 = require_comments2();
@@ -146636,11 +146676,11 @@ var require_fast_path2 = __commonJS3({
146636
146676
  Object.defineProperty(exports, "__esModule", { value: true });
146637
146677
  var tslib_1 = require_tslib2();
146638
146678
  var assert_1 = tslib_1.__importDefault(__require2("assert"));
146639
- var types17 = tslib_1.__importStar(require_main3());
146679
+ var types18 = tslib_1.__importStar(require_main3());
146640
146680
  var util = tslib_1.__importStar(require_util22());
146641
- var n2 = types17.namedTypes;
146642
- var isArray2 = types17.builtInTypes.array;
146643
- var isNumber = types17.builtInTypes.number;
146681
+ var n2 = types18.namedTypes;
146682
+ var isArray2 = types18.builtInTypes.array;
146683
+ var isNumber = types18.builtInTypes.number;
146644
146684
  var PRECEDENCE = {};
146645
146685
  [
146646
146686
  ["??"],
@@ -146669,7 +146709,7 @@ var require_fast_path2 = __commonJS3({
146669
146709
  if (obj instanceof FastPath) {
146670
146710
  return obj.copy();
146671
146711
  }
146672
- if (obj instanceof types17.NodePath) {
146712
+ if (obj instanceof types18.NodePath) {
146673
146713
  var copy = Object.create(FastPath.prototype);
146674
146714
  var stack = [obj.value];
146675
146715
  for (var pp2 = void 0; pp2 = obj.parentPath; obj = pp2)
@@ -146980,7 +147020,7 @@ var require_fast_path2 = __commonJS3({
146980
147020
  return node.some(containsCallExpression);
146981
147021
  }
146982
147022
  if (n2.Node.check(node)) {
146983
- return types17.someField(node, function(_name, child) {
147023
+ return types18.someField(node, function(_name, child) {
146984
147024
  return containsCallExpression(child);
146985
147025
  });
146986
147026
  }
@@ -147068,16 +147108,16 @@ var require_patcher2 = __commonJS3({
147068
147108
  var tslib_1 = require_tslib2();
147069
147109
  var assert_1 = tslib_1.__importDefault(__require2("assert"));
147070
147110
  var linesModule = tslib_1.__importStar(require_lines2());
147071
- var types17 = tslib_1.__importStar(require_main3());
147072
- var Printable = types17.namedTypes.Printable;
147073
- var Expression = types17.namedTypes.Expression;
147074
- var ReturnStatement = types17.namedTypes.ReturnStatement;
147075
- var SourceLocation3 = types17.namedTypes.SourceLocation;
147111
+ var types18 = tslib_1.__importStar(require_main3());
147112
+ var Printable = types18.namedTypes.Printable;
147113
+ var Expression = types18.namedTypes.Expression;
147114
+ var ReturnStatement = types18.namedTypes.ReturnStatement;
147115
+ var SourceLocation3 = types18.namedTypes.SourceLocation;
147076
147116
  var util_1 = require_util22();
147077
147117
  var fast_path_1 = tslib_1.__importDefault(require_fast_path2());
147078
- var isObject2 = types17.builtInTypes.object;
147079
- var isArray2 = types17.builtInTypes.array;
147080
- var isString = types17.builtInTypes.string;
147118
+ var isObject2 = types18.builtInTypes.object;
147119
+ var isArray2 = types18.builtInTypes.array;
147120
+ var isString = types18.builtInTypes.string;
147081
147121
  var riskyAdjoiningCharExp = /[0-9a-z_$]/i;
147082
147122
  var Patcher = function Patcher2(lines) {
147083
147123
  assert_1.default.ok(this instanceof Patcher2);
@@ -147347,8 +147387,8 @@ var require_patcher2 = __commonJS3({
147347
147387
  if (k2.charAt(0) === "_") {
147348
147388
  continue;
147349
147389
  }
147350
- newPath.stack.push(k2, types17.getFieldValue(newNode, k2));
147351
- oldPath.stack.push(k2, types17.getFieldValue(oldNode, k2));
147390
+ newPath.stack.push(k2, types18.getFieldValue(newNode, k2));
147391
+ oldPath.stack.push(k2, types18.getFieldValue(oldNode, k2));
147352
147392
  var canReprint = findAnyReprints(newPath, oldPath, reprints);
147353
147393
  newPath.stack.length -= 2;
147354
147394
  oldPath.stack.length -= 2;
@@ -147370,16 +147410,16 @@ var require_printer2 = __commonJS3({
147370
147410
  exports.Printer = void 0;
147371
147411
  var tslib_1 = require_tslib2();
147372
147412
  var assert_1 = tslib_1.__importDefault(__require2("assert"));
147373
- var types17 = tslib_1.__importStar(require_main3());
147413
+ var types18 = tslib_1.__importStar(require_main3());
147374
147414
  var comments_1 = require_comments2();
147375
147415
  var fast_path_1 = tslib_1.__importDefault(require_fast_path2());
147376
147416
  var lines_1 = require_lines2();
147377
147417
  var options_1 = require_options2();
147378
147418
  var patcher_1 = require_patcher2();
147379
147419
  var util = tslib_1.__importStar(require_util22());
147380
- var namedTypes = types17.namedTypes;
147381
- var isString = types17.builtInTypes.string;
147382
- var isObject2 = types17.builtInTypes.object;
147420
+ var namedTypes = types18.namedTypes;
147421
+ var isString = types18.builtInTypes.string;
147422
+ var isObject2 = types18.builtInTypes.object;
147383
147423
  var PrintResult = function PrintResult2(code, sourceMap) {
147384
147424
  assert_1.default.ok(this instanceof PrintResult2);
147385
147425
  isString.assert(code);
@@ -147541,7 +147581,7 @@ var require_printer2 = __commonJS3({
147541
147581
  case "OptionalMemberExpression": {
147542
147582
  parts.push(path3.call(print132, "object"));
147543
147583
  var property = path3.call(print132, "property");
147544
- var optional = types17.getFieldValue(n2, "optional");
147584
+ var optional = types18.getFieldValue(n2, "optional");
147545
147585
  if (n2.computed) {
147546
147586
  parts.push(optional ? "?.[" : "[", property, "]");
147547
147587
  } else {
@@ -147812,7 +147852,7 @@ var require_printer2 = __commonJS3({
147812
147852
  if (n2.typeArguments) {
147813
147853
  parts.push(path3.call(print132, "typeArguments"));
147814
147854
  }
147815
- if (types17.getFieldValue(n2, "optional")) {
147855
+ if (types18.getFieldValue(n2, "optional")) {
147816
147856
  parts.push("?.");
147817
147857
  }
147818
147858
  parts.push(printArgumentsList(path3, options, print132));
@@ -149491,8 +149531,8 @@ var require_printer2 = __commonJS3({
149491
149531
  });
149492
149532
  }
149493
149533
  function getPossibleRaw(node) {
149494
- var value = types17.getFieldValue(node, "value");
149495
- var extra = types17.getFieldValue(node, "extra");
149534
+ var value = types18.getFieldValue(node, "value");
149535
+ var extra = types18.getFieldValue(node, "extra");
149496
149536
  if (extra && typeof extra.raw === "string" && value == extra.rawValue) {
149497
149537
  return extra.raw;
149498
149538
  }
@@ -149538,8 +149578,8 @@ var require_main22 = __commonJS3({
149538
149578
  exports.run = exports.prettyPrint = exports.print = exports.visit = exports.types = exports.parse = void 0;
149539
149579
  var tslib_1 = require_tslib2();
149540
149580
  var fs_1 = tslib_1.__importDefault(__require2("fs"));
149541
- var types17 = tslib_1.__importStar(require_main3());
149542
- exports.types = types17;
149581
+ var types18 = tslib_1.__importStar(require_main3());
149582
+ exports.types = types18;
149543
149583
  var parser_1 = require_parser2();
149544
149584
  Object.defineProperty(exports, "parse", { enumerable: true, get: function() {
149545
149585
  return parser_1.parse;
@@ -150199,7 +150239,7 @@ var printDocASTReducer2 = {
150199
150239
  leave: ({ name, interfaces, directives, fields }) => join3(["interface", name, wrap2("implements ", join3(interfaces, " & ")), join3(directives, " "), block2(fields)], " ")
150200
150240
  },
150201
150241
  UnionTypeDefinition: {
150202
- leave: ({ name, directives, types: types17 }) => join3(["union", name, join3(directives, " "), wrap2("= ", join3(types17, " | "))], " ")
150242
+ leave: ({ name, directives, types: types18 }) => join3(["union", name, join3(directives, " "), wrap2("= ", join3(types18, " | "))], " ")
150203
150243
  },
150204
150244
  EnumTypeDefinition: {
150205
150245
  leave: ({ name, directives, values }) => join3(["enum", name, join3(directives, " "), block2(values)], " ")
@@ -150226,7 +150266,7 @@ var printDocASTReducer2 = {
150226
150266
  leave: ({ name, interfaces, directives, fields }) => join3(["extend interface", name, wrap2("implements ", join3(interfaces, " & ")), join3(directives, " "), block2(fields)], " ")
150227
150267
  },
150228
150268
  UnionTypeExtension: {
150229
- leave: ({ name, directives, types: types17 }) => join3(["extend union", name, join3(directives, " "), wrap2("= ", join3(types17, " | "))], " ")
150269
+ leave: ({ name, directives, types: types18 }) => join3(["extend union", name, join3(directives, " "), wrap2("= ", join3(types18, " | "))], " ")
150230
150270
  },
150231
150271
  EnumTypeExtension: {
150232
150272
  leave: ({ name, directives, values }) => join3(["extend enum", name, join3(directives, " "), block2(values)], " ")
@@ -151641,7 +151681,18 @@ var ListManager2 = class {
151641
151681
  }
151642
151682
  lists = /* @__PURE__ */ new Map();
151643
151683
  listsByField = /* @__PURE__ */ new Map();
151644
- get(listName, id2, allLists) {
151684
+ get(listName, id2, allLists, skipMatches) {
151685
+ const lists = this.getLists(listName, id2, allLists);
151686
+ if (!lists) {
151687
+ return null;
151688
+ }
151689
+ if (skipMatches) {
151690
+ return new ListCollection2(lists.lists.filter((list3) => !skipMatches.has(list3.fieldRef)));
151691
+ } else {
151692
+ return lists;
151693
+ }
151694
+ }
151695
+ getLists(listName, id2, allLists) {
151645
151696
  const matches = this.lists.get(listName);
151646
151697
  if (!matches || matches.size === 0) {
151647
151698
  return null;
@@ -151763,6 +151814,9 @@ var List2 = class {
151763
151814
  this.manager = manager;
151764
151815
  this.abstract = abstract;
151765
151816
  }
151817
+ get fieldRef() {
151818
+ return `${this.recordID}.${this.key}`;
151819
+ }
151766
151820
  when(when) {
151767
151821
  return this.manager.lists.get(this.name).get(this.recordID).when(when);
151768
151822
  }
@@ -152907,8 +152961,8 @@ var Cache2 = class {
152907
152961
  variables
152908
152962
  );
152909
152963
  }
152910
- list(name, parentID, allLists) {
152911
- const handler = this._internal_unstable.lists.get(name, parentID, allLists);
152964
+ list(name, parentID, allLists, skipMatches) {
152965
+ const handler = this._internal_unstable.lists.get(name, parentID, allLists, skipMatches);
152912
152966
  if (!handler) {
152913
152967
  throw new Error(
152914
152968
  `Cannot find list with name: ${name}${parentID ? " under parent " + parentID : ""}. Is it possible that the query is not mounted?`
@@ -153323,6 +153377,7 @@ var CacheInternal2 = class {
153323
153377
  });
153324
153378
  }
153325
153379
  }
153380
+ const processedOperations = /* @__PURE__ */ new Set();
153326
153381
  for (const operation of operations || []) {
153327
153382
  let parentID;
153328
153383
  if (operation.parentID) {
@@ -153342,7 +153397,12 @@ var CacheInternal2 = class {
153342
153397
  const targets = Array.isArray(value) ? value : [value];
153343
153398
  for (const target of targets) {
153344
153399
  if (operation.action === "insert" && target instanceof Object && fieldSelection && operation.list) {
153345
- this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).addToList(
153400
+ this.cache.list(
153401
+ operation.list,
153402
+ parentID,
153403
+ operation.target === "all",
153404
+ processedOperations
153405
+ ).when(operation.when).addToList(
153346
153406
  fieldSelection,
153347
153407
  target,
153348
153408
  variables,
@@ -153350,7 +153410,12 @@ var CacheInternal2 = class {
153350
153410
  layer
153351
153411
  );
153352
153412
  } else if (operation.action === "toggle" && target instanceof Object && fieldSelection && operation.list) {
153353
- this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).toggleElement({
153413
+ this.cache.list(
153414
+ operation.list,
153415
+ parentID,
153416
+ operation.target === "all",
153417
+ processedOperations
153418
+ ).when(operation.when).toggleElement({
153354
153419
  selection: fieldSelection,
153355
153420
  data: target,
153356
153421
  variables,
@@ -153358,7 +153423,12 @@ var CacheInternal2 = class {
153358
153423
  layer
153359
153424
  });
153360
153425
  } else if (operation.action === "remove" && target instanceof Object && fieldSelection && operation.list) {
153361
- this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).remove(target, variables, layer);
153426
+ this.cache.list(
153427
+ operation.list,
153428
+ parentID,
153429
+ operation.target === "all",
153430
+ processedOperations
153431
+ ).when(operation.when).remove(target, variables, layer);
153362
153432
  } else if (operation.action === "delete" && operation.type && target) {
153363
153433
  const targetID = this.id(operation.type, target);
153364
153434
  if (!targetID) {
@@ -153370,6 +153440,16 @@ var CacheInternal2 = class {
153370
153440
  this.cache.delete(targetID, layer);
153371
153441
  }
153372
153442
  }
153443
+ if (operation.list) {
153444
+ const matchingLists = this.cache.list(
153445
+ operation.list,
153446
+ parentID,
153447
+ operation.target === "all"
153448
+ );
153449
+ for (const list3 of matchingLists.lists) {
153450
+ processedOperations.add(list3.fieldRef);
153451
+ }
153452
+ }
153373
153453
  }
153374
153454
  }
153375
153455
  return toNotify;
@@ -153835,6 +153915,46 @@ var { keys } = Object;
153835
153915
  var recast4 = __toESM3(require_main22(), 1);
153836
153916
  var AST4 = recast4.types.builders;
153837
153917
  var pageInfoSelection = [
153918
+ {
153919
+ kind: graphql13.Kind.FIELD,
153920
+ name: {
153921
+ kind: graphql13.Kind.NAME,
153922
+ value: "pageInfo"
153923
+ },
153924
+ selectionSet: {
153925
+ kind: graphql13.Kind.SELECTION_SET,
153926
+ selections: [
153927
+ {
153928
+ kind: graphql13.Kind.FIELD,
153929
+ name: {
153930
+ kind: graphql13.Kind.NAME,
153931
+ value: "hasPreviousPage"
153932
+ }
153933
+ },
153934
+ {
153935
+ kind: graphql13.Kind.FIELD,
153936
+ name: {
153937
+ kind: graphql13.Kind.NAME,
153938
+ value: "hasNextPage"
153939
+ }
153940
+ },
153941
+ {
153942
+ kind: graphql13.Kind.FIELD,
153943
+ name: {
153944
+ kind: graphql13.Kind.NAME,
153945
+ value: "startCursor"
153946
+ }
153947
+ },
153948
+ {
153949
+ kind: graphql13.Kind.FIELD,
153950
+ name: {
153951
+ kind: graphql13.Kind.NAME,
153952
+ value: "endCursor"
153953
+ }
153954
+ }
153955
+ ]
153956
+ }
153957
+ },
153838
153958
  {
153839
153959
  kind: graphql13.Kind.FIELD,
153840
153960
  name: {
@@ -154105,7 +154225,7 @@ var printDocASTReducer22 = {
154105
154225
  ], " ")
154106
154226
  },
154107
154227
  UnionTypeDefinition: {
154108
- leave: ({ name, directives, types: types17 }) => join32(["union", name, join32(directives, " "), wrap22("= ", join32(types17, " | "))], " ")
154228
+ leave: ({ name, directives, types: types18 }) => join32(["union", name, join32(directives, " "), wrap22("= ", join32(types18, " | "))], " ")
154109
154229
  },
154110
154230
  EnumTypeDefinition: {
154111
154231
  leave: ({ name, directives, values }) => join32(["enum", name, join32(directives, " "), block22(values)], " ")
@@ -154144,7 +154264,7 @@ var printDocASTReducer22 = {
154144
154264
  ], " ")
154145
154265
  },
154146
154266
  UnionTypeExtension: {
154147
- leave: ({ name, directives, types: types17 }) => join32(["extend union", name, join32(directives, " "), wrap22("= ", join32(types17, " | "))], " ")
154267
+ leave: ({ name, directives, types: types18 }) => join32(["extend union", name, join32(directives, " "), wrap22("= ", join32(types18, " | "))], " ")
154148
154268
  },
154149
154269
  EnumTypeExtension: {
154150
154270
  leave: ({ name, directives, values }) => join32(["extend enum", name, join32(directives, " "), block22(values)], " ")
@@ -154181,6 +154301,8 @@ For more information, please visit these links:
154181
154301
  - https://graphql.org/learn/global-object-identification/
154182
154302
  - ${siteURL}/guides/caching-data#custom-ids
154183
154303
  `;
154304
+ var recast14 = __toESM3(require_main22(), 1);
154305
+ var AST14 = recast14.types.builders;
154184
154306
  function find_insert_index(script) {
154185
154307
  let insert_index = script.body.findIndex((statement) => {
154186
154308
  return statement.type !== "ImportDeclaration";
@@ -154199,7 +154321,7 @@ function find_exported_fn(body, name) {
154199
154321
  if (exportDeclaration.declaration?.type === "FunctionDeclaration") {
154200
154322
  const value = exportDeclaration.declaration;
154201
154323
  if (value.id?.name === name) {
154202
- return exportDeclaration.declaration;
154324
+ return { declaration: exportDeclaration.declaration, export: exportDeclaration };
154203
154325
  }
154204
154326
  } else if (exportDeclaration.declaration?.type === "VariableDeclaration") {
154205
154327
  const value = exportDeclaration.declaration;
@@ -154218,7 +154340,10 @@ function find_exported_fn(body, name) {
154218
154340
  init2 = init2.arguments[0];
154219
154341
  }
154220
154342
  if (init2.type === "FunctionExpression" || init2.type === "ArrowFunctionExpression") {
154221
- return init2;
154343
+ return { declaration: init2, export: exportDeclaration };
154344
+ }
154345
+ if (init2.type === "Identifier" || init2.type === "CallExpression") {
154346
+ return { declaration: init2, export: exportDeclaration };
154222
154347
  }
154223
154348
  } else {
154224
154349
  continue;
@@ -154230,10 +154355,10 @@ function find_exported_fn(body, name) {
154230
154355
  if (!exported) {
154231
154356
  return null;
154232
154357
  }
154233
- return exported.declaration;
154358
+ return { declaration: exported.declaration, export: exported };
154234
154359
  }
154235
- var recast14 = __toESM3(require_main22(), 1);
154236
- var AST14 = recast14.types.builders;
154360
+ var recast15 = __toESM3(require_main22(), 1);
154361
+ var AST15 = recast15.types.builders;
154237
154362
  function ensure_imports({
154238
154363
  config: config2,
154239
154364
  script,
@@ -154249,13 +154374,13 @@ function ensure_imports({
154249
154374
  if (!has_import) {
154250
154375
  script.body.unshift({
154251
154376
  type: "ImportDeclaration",
154252
- source: AST14.stringLiteral(sourceModule),
154377
+ source: AST15.stringLiteral(sourceModule),
154253
154378
  importKind
154254
154379
  });
154255
154380
  }
154256
154381
  return { ids: [], added: has_import ? 0 : 1 };
154257
154382
  }
154258
- const idList = (Array.isArray(importID) ? importID : [importID]).map((id2) => AST14.identifier(id2));
154383
+ const idList = (Array.isArray(importID) ? importID : [importID]).map((id2) => AST15.identifier(id2));
154259
154384
  const toImport = idList.filter(
154260
154385
  (identifier) => !script.body.find(
154261
154386
  (statement) => statement.type === "ImportDeclaration" && statement.specifiers?.find(
@@ -154266,16 +154391,16 @@ function ensure_imports({
154266
154391
  if (toImport.length > 0) {
154267
154392
  script.body.unshift({
154268
154393
  type: "ImportDeclaration",
154269
- source: AST14.stringLiteral(sourceModule),
154394
+ source: AST15.stringLiteral(sourceModule),
154270
154395
  specifiers: toImport.map(
154271
- (identifier, i22) => !Array.isArray(importID) ? AST14.importDefaultSpecifier(identifier) : AST14.importSpecifier(identifier, as?.[i22] ? AST14.identifier(as[i22]) : identifier)
154396
+ (identifier, i22) => !Array.isArray(importID) ? AST15.importDefaultSpecifier(identifier) : AST15.importSpecifier(identifier, as?.[i22] ? AST15.identifier(as[i22]) : identifier)
154272
154397
  ),
154273
154398
  importKind
154274
154399
  });
154275
154400
  }
154276
154401
  for (const [i22, target] of (as ?? []).entries()) {
154277
154402
  if (target) {
154278
- idList[i22] = AST14.identifier(target);
154403
+ idList[i22] = AST15.identifier(target);
154279
154404
  }
154280
154405
  }
154281
154406
  return {
@@ -171132,8 +171257,8 @@ export type ${config.variableFunctionName(
171132
171257
  }
171133
171258
 
171134
171259
  // src/plugin/codegen/fragmentTypedefs/index.ts
171135
- var recast15 = __toESM(require_main5(), 1);
171136
- var AST15 = recast15.types.builders;
171260
+ var recast16 = __toESM(require_main5(), 1);
171261
+ var AST16 = recast16.types.builders;
171137
171262
  async function fragmentTypedefs(input) {
171138
171263
  let fragments = {};
171139
171264
  for (const doc of input.documents) {
@@ -171179,43 +171304,43 @@ async function fragmentTypedefs(input) {
171179
171304
  }
171180
171305
  const store = store_name({ config: input.config, name: doc.name });
171181
171306
  const import_path = path_exports.join("..", stores_directory_name(), doc.name);
171182
- const fragment_map = AST15.tsTypeLiteral([
171183
- AST15.tsPropertySignature(
171184
- AST15.stringLiteral(fragmentKey),
171185
- AST15.tsTypeAnnotation(
171186
- AST15.tsTypeLiteral([
171187
- AST15.tsPropertySignature(
171188
- AST15.identifier(doc.name),
171189
- AST15.tsTypeAnnotation(AST15.tsAnyKeyword())
171307
+ const fragment_map = AST16.tsTypeLiteral([
171308
+ AST16.tsPropertySignature(
171309
+ AST16.stringLiteral(fragmentKey),
171310
+ AST16.tsTypeAnnotation(
171311
+ AST16.tsTypeLiteral([
171312
+ AST16.tsPropertySignature(
171313
+ AST16.identifier(doc.name),
171314
+ AST16.tsTypeAnnotation(AST16.tsAnyKeyword())
171190
171315
  )
171191
171316
  ])
171192
171317
  )
171193
171318
  )
171194
171319
  ]);
171195
- const non_exhaustive = AST15.tsTypeLiteral([
171196
- AST15.tsPropertySignature(
171197
- AST15.literal("__typename"),
171198
- AST15.tsTypeAnnotation(
171199
- AST15.tsLiteralType(AST15.stringLiteral("non-exhaustive; don't match this"))
171320
+ const non_exhaustive = AST16.tsTypeLiteral([
171321
+ AST16.tsPropertySignature(
171322
+ AST16.literal("__typename"),
171323
+ AST16.tsTypeAnnotation(
171324
+ AST16.tsLiteralType(AST16.stringLiteral("non-exhaustive; don't match this"))
171200
171325
  )
171201
171326
  )
171202
171327
  ]);
171203
- const initial_value_input = AST15.identifier("initialValue");
171204
- initial_value_input.typeAnnotation = AST15.tsTypeAnnotation(
171205
- AST15.tsUnionType([fragment_map, non_exhaustive])
171328
+ const initial_value_input = AST16.identifier("initialValue");
171329
+ initial_value_input.typeAnnotation = AST16.tsTypeAnnotation(
171330
+ AST16.tsUnionType([fragment_map, non_exhaustive])
171206
171331
  );
171207
- const initial_value_or_null_input = AST15.identifier("initialValue");
171208
- initial_value_or_null_input.typeAnnotation = AST15.tsTypeAnnotation(
171209
- AST15.tsUnionType([
171332
+ const initial_value_or_null_input = AST16.identifier("initialValue");
171333
+ initial_value_or_null_input.typeAnnotation = AST16.tsTypeAnnotation(
171334
+ AST16.tsUnionType([
171210
171335
  fragment_map,
171211
- AST15.tsNullKeyword(),
171212
- AST15.tsUndefinedKeyword(),
171336
+ AST16.tsNullKeyword(),
171337
+ AST16.tsUndefinedKeyword(),
171213
171338
  non_exhaustive
171214
171339
  ])
171215
171340
  );
171216
- const document_input = AST15.identifier("document");
171217
- document_input.typeAnnotation = AST15.tsTypeAnnotation(
171218
- AST15.tsTypeReference(AST15.identifier(store))
171341
+ const document_input = AST16.identifier("document");
171342
+ document_input.typeAnnotation = AST16.tsTypeAnnotation(
171343
+ AST16.tsTypeReference(AST16.identifier(store))
171219
171344
  );
171220
171345
  let store_type = "FragmentStoreInstance";
171221
171346
  if (doc.refetch?.paginated) {
@@ -171246,37 +171371,37 @@ async function fragmentTypedefs(input) {
171246
171371
  sourceModule: "../../../artifacts/" + doc.name,
171247
171372
  import: [inputID, shapeID]
171248
171373
  });
171249
- const typeParams = [AST15.tsTypeReference(AST15.identifier(inputID))];
171250
- const return_value = AST15.tsTypeReference(
171251
- AST15.identifier(store_type),
171252
- AST15.tsTypeParameterInstantiation([
171253
- AST15.tsTypeReference(AST15.identifier(shapeID)),
171374
+ const typeParams = [AST16.tsTypeReference(AST16.identifier(inputID))];
171375
+ const return_value = AST16.tsTypeReference(
171376
+ AST16.identifier(store_type),
171377
+ AST16.tsTypeParameterInstantiation([
171378
+ AST16.tsTypeReference(AST16.identifier(shapeID)),
171254
171379
  ...typeParams
171255
171380
  ])
171256
171381
  );
171257
- const null_return_value = AST15.tsTypeReference(
171258
- AST15.identifier(store_type),
171259
- AST15.tsTypeParameterInstantiation([
171260
- AST15.tsUnionType([
171261
- AST15.tsTypeReference(AST15.identifier(shapeID)),
171262
- AST15.tsNullKeyword()
171382
+ const null_return_value = AST16.tsTypeReference(
171383
+ AST16.identifier(store_type),
171384
+ AST16.tsTypeParameterInstantiation([
171385
+ AST16.tsUnionType([
171386
+ AST16.tsTypeReference(AST16.identifier(shapeID)),
171387
+ AST16.tsNullKeyword()
171263
171388
  ]),
171264
171389
  ...typeParams
171265
171390
  ])
171266
171391
  );
171267
171392
  return [
171268
- AST15.exportNamedDeclaration(
171269
- AST15.tsDeclareFunction(
171270
- AST15.identifier(which),
171393
+ AST16.exportNamedDeclaration(
171394
+ AST16.tsDeclareFunction(
171395
+ AST16.identifier(which),
171271
171396
  [initial_value_input, document_input],
171272
- AST15.tsTypeAnnotation(return_value)
171397
+ AST16.tsTypeAnnotation(return_value)
171273
171398
  )
171274
171399
  ),
171275
- AST15.exportNamedDeclaration(
171276
- AST15.tsDeclareFunction(
171277
- AST15.identifier(which),
171400
+ AST16.exportNamedDeclaration(
171401
+ AST16.tsDeclareFunction(
171402
+ AST16.identifier(which),
171278
171403
  [initial_value_or_null_input, document_input],
171279
- AST15.tsTypeAnnotation(null_return_value)
171404
+ AST16.tsTypeAnnotation(null_return_value)
171280
171405
  )
171281
171406
  )
171282
171407
  ];
@@ -172112,17 +172237,17 @@ function is_root_route(filepath) {
172112
172237
  var empty_layout = "<slot />";
172113
172238
 
172114
172239
  // src/plugin/transforms/index.ts
172115
- var recast21 = __toESM(require_main5(), 1);
172240
+ var recast23 = __toESM(require_main5(), 1);
172116
172241
 
172117
172242
  // src/plugin/transforms/componentQuery.ts
172118
- var recast16 = __toESM(require_main5(), 1);
172119
- var AST16 = recast16.types.builders;
172243
+ var recast17 = __toESM(require_main5(), 1);
172244
+ var AST17 = recast17.types.builders;
172120
172245
  async function QueryProcessor(config, page) {
172121
172246
  if (!is_component(config, page.framework, page.filepath)) {
172122
172247
  return;
172123
172248
  }
172124
172249
  const store_id = (name) => {
172125
- return AST16.identifier(`_houdini_` + name);
172250
+ return AST17.identifier(`_houdini_` + name);
172126
172251
  };
172127
172252
  const queries = await find_inline_queries(page, page.script, store_id);
172128
172253
  if (queries.length === 0) {
@@ -172192,8 +172317,8 @@ async function QueryProcessor(config, page) {
172192
172317
  page.script.body.splice(
172193
172318
  find_insert_index(page.script),
172194
172319
  0,
172195
- AST16.variableDeclaration("const", [
172196
- AST16.variableDeclarator(store_id(query.name.value), AST16.newExpression(factory, []))
172320
+ AST17.variableDeclaration("const", [
172321
+ AST17.variableDeclarator(store_id(query.name.value), AST17.newExpression(factory, []))
172197
172322
  ])
172198
172323
  );
172199
172324
  }
@@ -172209,47 +172334,47 @@ async function QueryProcessor(config, page) {
172209
172334
  )}. maybe its not exported? `
172210
172335
  });
172211
172336
  }
172212
- const queryLoadExpression = AST16.callExpression(
172213
- AST16.memberExpression(store_id(query.name.value), AST16.identifier("fetch")),
172337
+ const queryLoadExpression = AST17.callExpression(
172338
+ AST17.memberExpression(store_id(query.name.value), AST17.identifier("fetch")),
172214
172339
  [
172215
- AST16.objectExpression([
172216
- AST16.objectProperty(
172217
- AST16.identifier("variables"),
172218
- AST16.callExpression(AST16.identifier("marshalInputs"), [
172219
- AST16.objectExpression([
172220
- AST16.objectProperty(
172221
- AST16.identifier("config"),
172222
- AST16.callExpression(AST16.identifier("getCurrentConfig"), [])
172340
+ AST17.objectExpression([
172341
+ AST17.objectProperty(
172342
+ AST17.identifier("variables"),
172343
+ AST17.callExpression(AST17.identifier("marshalInputs"), [
172344
+ AST17.objectExpression([
172345
+ AST17.objectProperty(
172346
+ AST17.identifier("config"),
172347
+ AST17.callExpression(AST17.identifier("getCurrentConfig"), [])
172223
172348
  ),
172224
- AST16.objectProperty(
172225
- AST16.identifier("artifact"),
172226
- AST16.memberExpression(
172349
+ AST17.objectProperty(
172350
+ AST17.identifier("artifact"),
172351
+ AST17.memberExpression(
172227
172352
  store_id(query.name.value),
172228
- AST16.identifier("artifact")
172353
+ AST17.identifier("artifact")
172229
172354
  )
172230
172355
  ),
172231
- AST16.objectProperty(
172232
- AST16.identifier("input"),
172233
- has_variables ? AST16.callExpression(
172234
- AST16.memberExpression(
172235
- AST16.identifier(variable_fn),
172236
- AST16.identifier("call")
172356
+ AST17.objectProperty(
172357
+ AST17.identifier("input"),
172358
+ has_variables ? AST17.callExpression(
172359
+ AST17.memberExpression(
172360
+ AST17.identifier(variable_fn),
172361
+ AST17.identifier("call")
172237
172362
  ),
172238
172363
  [
172239
- AST16.newExpression(
172240
- AST16.identifier("RequestContext"),
172364
+ AST17.newExpression(
172365
+ AST17.identifier("RequestContext"),
172241
172366
  []
172242
172367
  ),
172243
- AST16.objectExpression([
172244
- AST16.objectProperty(
172245
- AST16.identifier("props"),
172246
- AST16.objectExpression(
172368
+ AST17.objectExpression([
172369
+ AST17.objectProperty(
172370
+ AST17.identifier("props"),
172371
+ AST17.objectExpression(
172247
172372
  props.map(
172248
- (prop2) => AST16.objectProperty(
172249
- AST16.identifier(
172373
+ (prop2) => AST17.objectProperty(
172374
+ AST17.identifier(
172250
172375
  prop2
172251
172376
  ),
172252
- AST16.identifier(
172377
+ AST17.identifier(
172253
172378
  prop2
172254
172379
  )
172255
172380
  )
@@ -172258,7 +172383,7 @@ async function QueryProcessor(config, page) {
172258
172383
  )
172259
172384
  ])
172260
172385
  ]
172261
- ) : AST16.objectExpression([])
172386
+ ) : AST17.objectExpression([])
172262
172387
  )
172263
172388
  ])
172264
172389
  ])
@@ -172269,23 +172394,23 @@ async function QueryProcessor(config, page) {
172269
172394
  let finalExpression = [];
172270
172395
  if (page.svelte5Runes) {
172271
172396
  finalExpression = [
172272
- AST16.expressionStatement(
172273
- AST16.callExpression(AST16.identifier("$effect"), [
172274
- AST16.arrowFunctionExpression(
172397
+ AST17.expressionStatement(
172398
+ AST17.callExpression(AST17.identifier("$effect"), [
172399
+ AST17.arrowFunctionExpression(
172275
172400
  [],
172276
- AST16.blockStatement([AST16.expressionStatement(queryLoadExpression)])
172401
+ AST17.blockStatement([AST17.expressionStatement(queryLoadExpression)])
172277
172402
  )
172278
172403
  ])
172279
172404
  )
172280
172405
  ];
172281
172406
  } else {
172282
172407
  finalExpression = [
172283
- AST16.labeledStatement(
172284
- AST16.identifier("$"),
172285
- AST16.expressionStatement(
172286
- AST16.logicalExpression(
172408
+ AST17.labeledStatement(
172409
+ AST17.identifier("$"),
172410
+ AST17.expressionStatement(
172411
+ AST17.logicalExpression(
172287
172412
  "&&",
172288
- AST16.identifier("isBrowser"),
172413
+ AST17.identifier("isBrowser"),
172289
172414
  queryLoadExpression
172290
172415
  )
172291
172416
  )
@@ -172327,8 +172452,8 @@ async function find_inline_queries(page, parsed, store_id) {
172327
172452
  }
172328
172453
 
172329
172454
  // src/plugin/transforms/kit/init.ts
172330
- var recast17 = __toESM(require_main5(), 1);
172331
- var AST17 = recast17.types.builders;
172455
+ var recast18 = __toESM(require_main5(), 1);
172456
+ var AST18 = recast18.types.builders;
172332
172457
  async function kit_init(page) {
172333
172458
  if (!is_root_layout(page.config, page.filepath)) {
172334
172459
  return;
@@ -172352,9 +172477,9 @@ async function kit_init(page) {
172352
172477
  import: ["extractSession", "setClientSession"]
172353
172478
  }).ids;
172354
172479
  page.script.body.push(
172355
- AST17.expressionStatement(
172356
- AST17.callExpression(on_mount, [
172357
- AST17.arrowFunctionExpression([], AST17.callExpression(set_client_started, []))
172480
+ AST18.expressionStatement(
172481
+ AST18.callExpression(on_mount, [
172482
+ AST18.arrowFunctionExpression([], AST18.callExpression(set_client_started, []))
172358
172483
  ])
172359
172484
  )
172360
172485
  );
@@ -172365,17 +172490,17 @@ async function kit_init(page) {
172365
172490
  import: ["page"]
172366
172491
  }).ids[0];
172367
172492
  page.script.body.push(
172368
- AST17.expressionStatement(
172369
- AST17.callExpression(AST17.memberExpression(store_id, AST17.identifier("subscribe")), [
172370
- AST17.arrowFunctionExpression(
172371
- [AST17.identifier("val")],
172372
- AST17.blockStatement([
172373
- AST17.expressionStatement(
172374
- AST17.callExpression(set_session, [
172375
- AST17.callExpression(extract_session, [
172376
- AST17.memberExpression(
172377
- AST17.identifier("val"),
172378
- AST17.identifier("data")
172493
+ AST18.expressionStatement(
172494
+ AST18.callExpression(AST18.memberExpression(store_id, AST18.identifier("subscribe")), [
172495
+ AST18.arrowFunctionExpression(
172496
+ [AST18.identifier("val")],
172497
+ AST18.blockStatement([
172498
+ AST18.expressionStatement(
172499
+ AST18.callExpression(set_session, [
172500
+ AST18.callExpression(extract_session, [
172501
+ AST18.memberExpression(
172502
+ AST18.identifier("val"),
172503
+ AST18.identifier("data")
172379
172504
  )
172380
172505
  ])
172381
172506
  ])
@@ -172389,15 +172514,15 @@ async function kit_init(page) {
172389
172514
 
172390
172515
  // src/plugin/transforms/kit/load.ts
172391
172516
  var graphql36 = __toESM(require("graphql"), 1);
172392
- var recast18 = __toESM(require_main5(), 1);
172393
- var AST18 = recast18.types.builders;
172517
+ var recast19 = __toESM(require_main5(), 1);
172518
+ var AST19 = recast19.types.builders;
172394
172519
  async function kit_load_generator(page) {
172395
172520
  const route = is_route(page.config, page.framework, page.filepath);
172396
172521
  const script = is_route_script(page.framework, page.filepath);
172397
172522
  if (!route && !script) {
172398
172523
  return;
172399
172524
  }
172400
- const inline_query_store = (name) => route ? AST18.memberExpression(AST18.identifier("data"), AST18.identifier(name)) : artifact_import({
172525
+ const inline_query_store = (name) => route ? AST19.memberExpression(AST19.identifier("data"), AST19.identifier(name)) : artifact_import({
172401
172526
  config: page.config,
172402
172527
  script: page.script,
172403
172528
  page,
@@ -172449,8 +172574,8 @@ async function kit_load_generator(page) {
172449
172574
  find_insert_index(page.script),
172450
172575
  0,
172451
172576
  ...!has_data ? [
172452
- AST18.exportNamedDeclaration(
172453
- AST18.variableDeclaration("let", [AST18.identifier("data")])
172577
+ AST19.exportNamedDeclaration(
172578
+ AST19.variableDeclaration("let", [AST19.identifier("data")])
172454
172579
  )
172455
172580
  ] : []
172456
172581
  );
@@ -172497,43 +172622,43 @@ function add_load({
172497
172622
  let before_load = page_info.exports.includes(houdini_before_load_fn);
172498
172623
  let afterLoad = page_info.exports.includes(houdini_afterLoad_fn);
172499
172624
  let on_error = page_info.exports.includes(houdini_on_error_fn);
172500
- const request_context = AST18.identifier("houdini_context");
172501
- const promise_list = AST18.identifier("promises");
172502
- const return_value = AST18.memberExpression(request_context, AST18.identifier("returnValue"));
172503
- const result_obj = AST18.identifier("result");
172504
- const input_obj = AST18.identifier("inputs");
172505
- const preload_fn = AST18.functionDeclaration(
172506
- AST18.identifier("load"),
172507
- [AST18.identifier("context")],
172508
- AST18.blockStatement([
172509
- AST18.variableDeclaration("const", [
172510
- AST18.variableDeclarator(
172625
+ const request_context = AST19.identifier("houdini_context");
172626
+ const promise_list = AST19.identifier("promises");
172627
+ const return_value = AST19.memberExpression(request_context, AST19.identifier("returnValue"));
172628
+ const result_obj = AST19.identifier("result");
172629
+ const input_obj = AST19.identifier("inputs");
172630
+ const preload_fn = AST19.functionDeclaration(
172631
+ AST19.identifier("load"),
172632
+ [AST19.identifier("context")],
172633
+ AST19.blockStatement([
172634
+ AST19.variableDeclaration("const", [
172635
+ AST19.variableDeclarator(
172511
172636
  request_context,
172512
- AST18.newExpression(AST18.identifier("RequestContext"), [AST18.identifier("context")])
172637
+ AST19.newExpression(AST19.identifier("RequestContext"), [AST19.identifier("context")])
172513
172638
  )
172514
172639
  ]),
172515
- AST18.variableDeclaration("const", [
172516
- AST18.variableDeclarator(
172517
- AST18.identifier("houdiniConfig"),
172518
- AST18.callExpression(AST18.identifier("getCurrentConfig"), [])
172640
+ AST19.variableDeclaration("const", [
172641
+ AST19.variableDeclarator(
172642
+ AST19.identifier("houdiniConfig"),
172643
+ AST19.callExpression(AST19.identifier("getCurrentConfig"), [])
172519
172644
  )
172520
172645
  ]),
172521
- AST18.variableDeclaration("const", [
172522
- AST18.variableDeclarator(promise_list, AST18.arrayExpression([]))
172646
+ AST19.variableDeclaration("const", [
172647
+ AST19.variableDeclarator(promise_list, AST19.arrayExpression([]))
172523
172648
  ]),
172524
- AST18.variableDeclaration("const", [
172525
- AST18.variableDeclarator(input_obj, AST18.objectExpression([]))
172649
+ AST19.variableDeclaration("const", [
172650
+ AST19.variableDeclarator(input_obj, AST19.objectExpression([]))
172526
172651
  ]),
172527
- AST18.returnStatement(
172528
- AST18.objectExpression([
172529
- AST18.spreadElement(return_value),
172530
- AST18.spreadElement(result_obj)
172652
+ AST19.returnStatement(
172653
+ AST19.objectExpression([
172654
+ AST19.spreadElement(return_value),
172655
+ AST19.spreadElement(result_obj)
172531
172656
  ])
172532
172657
  )
172533
172658
  ])
172534
172659
  );
172535
172660
  preload_fn.async = true;
172536
- page.script.body.push(AST18.exportNamedDeclaration(preload_fn));
172661
+ page.script.body.push(AST19.exportNamedDeclaration(preload_fn));
172537
172662
  let insert_index = 4;
172538
172663
  for (const query of queries) {
172539
172664
  const { ids } = ensure_imports({
@@ -172543,19 +172668,19 @@ function add_load({
172543
172668
  sourceModule: store_import_path({ config: page.config, name: query.name.value })
172544
172669
  });
172545
172670
  const load_fn = ids[0];
172546
- const variables = (query.variableDefinitions?.length ?? 0) > 0 ? AST18.awaitExpression(
172547
- AST18.callExpression(AST18.identifier(__variable_fn_name(query.name.value)), [
172548
- AST18.identifier("houdiniConfig"),
172549
- AST18.identifier("context")
172671
+ const variables = (query.variableDefinitions?.length ?? 0) > 0 ? AST19.awaitExpression(
172672
+ AST19.callExpression(AST19.identifier(__variable_fn_name(query.name.value)), [
172673
+ AST19.identifier("houdiniConfig"),
172674
+ AST19.identifier("context")
172550
172675
  ])
172551
- ) : AST18.objectExpression([]);
172676
+ ) : AST19.objectExpression([]);
172552
172677
  preload_fn.body.body.splice(
172553
172678
  insert_index++,
172554
172679
  0,
172555
- AST18.expressionStatement(
172556
- AST18.assignmentExpression(
172680
+ AST19.expressionStatement(
172681
+ AST19.assignmentExpression(
172557
172682
  "=",
172558
- AST18.memberExpression(input_obj, AST18.literal(query.name.value)),
172683
+ AST19.memberExpression(input_obj, AST19.literal(query.name.value)),
172559
172684
  variables
172560
172685
  )
172561
172686
  )
@@ -172563,18 +172688,18 @@ function add_load({
172563
172688
  preload_fn.body.body.splice(
172564
172689
  insert_index++,
172565
172690
  0,
172566
- AST18.expressionStatement(
172567
- AST18.callExpression(AST18.memberExpression(promise_list, AST18.identifier("push")), [
172568
- AST18.callExpression(load_fn, [
172569
- AST18.objectExpression([
172570
- AST18.objectProperty(
172571
- AST18.literal("variables"),
172572
- AST18.memberExpression(input_obj, AST18.literal(query.name.value))
172691
+ AST19.expressionStatement(
172692
+ AST19.callExpression(AST19.memberExpression(promise_list, AST19.identifier("push")), [
172693
+ AST19.callExpression(load_fn, [
172694
+ AST19.objectExpression([
172695
+ AST19.objectProperty(
172696
+ AST19.literal("variables"),
172697
+ AST19.memberExpression(input_obj, AST19.literal(query.name.value))
172573
172698
  ),
172574
- AST18.objectProperty(AST18.literal("event"), AST18.identifier("context")),
172575
- AST18.objectProperty(
172576
- AST18.literal("blocking"),
172577
- afterLoad || on_error ? AST18.booleanLiteral(true) : AST18.identifier("undefined")
172699
+ AST19.objectProperty(AST19.literal("event"), AST19.identifier("context")),
172700
+ AST19.objectProperty(
172701
+ AST19.literal("blocking"),
172702
+ afterLoad || on_error ? AST19.booleanLiteral(true) : AST19.identifier("undefined")
172578
172703
  )
172579
172704
  ])
172580
172705
  ])
@@ -172586,28 +172711,28 @@ function add_load({
172586
172711
  preload_fn.body.body.splice(
172587
172712
  insert_index++,
172588
172713
  0,
172589
- AST18.variableDeclaration("let", [
172590
- AST18.variableDeclarator(result_obj, AST18.objectExpression([]))
172714
+ AST19.variableDeclaration("let", [
172715
+ AST19.variableDeclarator(result_obj, AST19.objectExpression([]))
172591
172716
  ]),
172592
- AST18.tryStatement(
172593
- AST18.blockStatement([
172594
- AST18.expressionStatement(
172595
- AST18.assignmentExpression(
172717
+ AST19.tryStatement(
172718
+ AST19.blockStatement([
172719
+ AST19.expressionStatement(
172720
+ AST19.assignmentExpression(
172596
172721
  "=",
172597
172722
  result_obj,
172598
- AST18.callExpression(
172599
- AST18.memberExpression(
172600
- AST18.identifier("Object"),
172601
- AST18.identifier("assign")
172723
+ AST19.callExpression(
172724
+ AST19.memberExpression(
172725
+ AST19.identifier("Object"),
172726
+ AST19.identifier("assign")
172602
172727
  ),
172603
172728
  [
172604
- AST18.objectExpression([]),
172605
- AST18.spreadElement(
172606
- AST18.awaitExpression(
172607
- AST18.callExpression(
172608
- AST18.memberExpression(
172609
- AST18.identifier("Promise"),
172610
- AST18.identifier("all")
172729
+ AST19.objectExpression([]),
172730
+ AST19.spreadElement(
172731
+ AST19.awaitExpression(
172732
+ AST19.callExpression(
172733
+ AST19.memberExpression(
172734
+ AST19.identifier("Promise"),
172735
+ AST19.identifier("all")
172611
172736
  ),
172612
172737
  [promise_list]
172613
172738
  )
@@ -172618,37 +172743,37 @@ function add_load({
172618
172743
  )
172619
172744
  )
172620
172745
  ]),
172621
- AST18.catchClause(
172622
- AST18.identifier("err"),
172746
+ AST19.catchClause(
172747
+ AST19.identifier("err"),
172623
172748
  null,
172624
- AST18.blockStatement([
172625
- on_error ? AST18.expressionStatement(
172626
- AST18.awaitExpression(
172627
- AST18.callExpression(
172628
- AST18.memberExpression(
172749
+ AST19.blockStatement([
172750
+ on_error ? AST19.expressionStatement(
172751
+ AST19.awaitExpression(
172752
+ AST19.callExpression(
172753
+ AST19.memberExpression(
172629
172754
  request_context,
172630
- AST18.identifier("invokeLoadHook")
172755
+ AST19.identifier("invokeLoadHook")
172631
172756
  ),
172632
172757
  [
172633
- AST18.objectExpression([
172634
- AST18.objectProperty(
172635
- AST18.literal("variant"),
172636
- AST18.stringLiteral("error")
172758
+ AST19.objectExpression([
172759
+ AST19.objectProperty(
172760
+ AST19.literal("variant"),
172761
+ AST19.stringLiteral("error")
172637
172762
  ),
172638
- AST18.objectProperty(
172639
- AST18.literal("hookFn"),
172640
- AST18.identifier(houdini_on_error_fn)
172763
+ AST19.objectProperty(
172764
+ AST19.literal("hookFn"),
172765
+ AST19.identifier(houdini_on_error_fn)
172641
172766
  ),
172642
- AST18.objectProperty(
172643
- AST18.literal("error"),
172644
- AST18.identifier("err")
172767
+ AST19.objectProperty(
172768
+ AST19.literal("error"),
172769
+ AST19.identifier("err")
172645
172770
  ),
172646
- AST18.objectProperty(AST18.literal("input"), input_obj)
172771
+ AST19.objectProperty(AST19.literal("input"), input_obj)
172647
172772
  ])
172648
172773
  ]
172649
172774
  )
172650
172775
  )
172651
- ) : AST18.throwStatement(AST18.identifier("err"))
172776
+ ) : AST19.throwStatement(AST19.identifier("err"))
172652
172777
  ])
172653
172778
  )
172654
172779
  )
@@ -172683,22 +172808,22 @@ async function find_special_query(type, page) {
172683
172808
  return definition;
172684
172809
  }
172685
172810
  function load_hook_statements(name, request_context, input_id, result_id) {
172686
- return AST18.expressionStatement(
172687
- AST18.awaitExpression(
172688
- AST18.callExpression(
172689
- AST18.memberExpression(request_context, AST18.identifier("invokeLoadHook")),
172811
+ return AST19.expressionStatement(
172812
+ AST19.awaitExpression(
172813
+ AST19.callExpression(
172814
+ AST19.memberExpression(request_context, AST19.identifier("invokeLoadHook")),
172690
172815
  [
172691
- AST18.objectExpression([
172692
- AST18.objectProperty(AST18.literal("variant"), AST18.stringLiteral(name)),
172693
- AST18.objectProperty(
172694
- AST18.literal("hookFn"),
172695
- AST18.identifier(
172816
+ AST19.objectExpression([
172817
+ AST19.objectProperty(AST19.literal("variant"), AST19.stringLiteral(name)),
172818
+ AST19.objectProperty(
172819
+ AST19.literal("hookFn"),
172820
+ AST19.identifier(
172696
172821
  name === "before" ? houdini_before_load_fn : houdini_afterLoad_fn
172697
172822
  )
172698
172823
  ),
172699
172824
  ...name === "after" ? [
172700
- AST18.objectProperty(AST18.literal("input"), input_id),
172701
- AST18.objectProperty(AST18.literal("data"), result_id)
172825
+ AST19.objectProperty(AST19.literal("input"), input_id),
172826
+ AST19.objectProperty(AST19.literal("data"), result_id)
172702
172827
  ] : []
172703
172828
  ])
172704
172829
  ]
@@ -172760,22 +172885,22 @@ function variable_function_for_query(page, query, has_local) {
172760
172885
  };
172761
172886
  }
172762
172887
  const fn_body = [
172763
- AST18.variableDeclaration("const", [
172764
- AST18.variableDeclarator(
172765
- AST18.identifier("result"),
172766
- AST18.objectExpression(
172888
+ AST19.variableDeclaration("const", [
172889
+ AST19.variableDeclarator(
172890
+ AST19.identifier("result"),
172891
+ AST19.objectExpression(
172767
172892
  Object.entries(has_args).map(([arg, type]) => {
172768
- return AST18.objectProperty(
172769
- AST18.identifier(arg),
172770
- AST18.callExpression(AST18.identifier("parseScalar"), [
172771
- AST18.identifier("config"),
172772
- AST18.stringLiteral(type),
172773
- AST18.memberExpression(
172774
- AST18.memberExpression(
172775
- AST18.identifier("event"),
172776
- AST18.identifier("params")
172893
+ return AST19.objectProperty(
172894
+ AST19.identifier(arg),
172895
+ AST19.callExpression(AST19.identifier("parseScalar"), [
172896
+ AST19.identifier("config"),
172897
+ AST19.stringLiteral(type),
172898
+ AST19.memberExpression(
172899
+ AST19.memberExpression(
172900
+ AST19.identifier("event"),
172901
+ AST19.identifier("params")
172777
172902
  ),
172778
- AST18.identifier(arg)
172903
+ AST19.identifier(arg)
172779
172904
  )
172780
172905
  ])
172781
172906
  );
@@ -172786,28 +172911,28 @@ function variable_function_for_query(page, query, has_local) {
172786
172911
  ];
172787
172912
  if (has_local) {
172788
172913
  fn_body.push(
172789
- AST18.expressionStatement(
172790
- AST18.callExpression(
172791
- AST18.memberExpression(AST18.identifier("Object"), AST18.identifier("assign")),
172914
+ AST19.expressionStatement(
172915
+ AST19.callExpression(
172916
+ AST19.memberExpression(AST19.identifier("Object"), AST19.identifier("assign")),
172792
172917
  [
172793
- AST18.identifier("result"),
172794
- AST18.callExpression(AST18.identifier("marshalInputs"), [
172795
- AST18.objectExpression([
172796
- AST18.objectProperty(
172797
- AST18.identifier("config"),
172798
- AST18.identifier("config")
172918
+ AST19.identifier("result"),
172919
+ AST19.callExpression(AST19.identifier("marshalInputs"), [
172920
+ AST19.objectExpression([
172921
+ AST19.objectProperty(
172922
+ AST19.identifier("config"),
172923
+ AST19.identifier("config")
172799
172924
  ),
172800
- AST18.objectProperty(
172801
- AST18.identifier("input"),
172802
- AST18.awaitExpression(
172803
- AST18.callExpression(
172804
- AST18.identifier(query_variable_fn(query.name.value)),
172805
- [AST18.identifier("event")]
172925
+ AST19.objectProperty(
172926
+ AST19.identifier("input"),
172927
+ AST19.awaitExpression(
172928
+ AST19.callExpression(
172929
+ AST19.identifier(query_variable_fn(query.name.value)),
172930
+ [AST19.identifier("event")]
172806
172931
  )
172807
172932
  )
172808
172933
  ),
172809
- AST18.objectProperty(
172810
- AST18.identifier("artifact"),
172934
+ AST19.objectProperty(
172935
+ AST19.identifier("artifact"),
172811
172936
  artifact_import({
172812
172937
  config: page.config,
172813
172938
  script: page.script,
@@ -172822,11 +172947,11 @@ function variable_function_for_query(page, query, has_local) {
172822
172947
  )
172823
172948
  );
172824
172949
  }
172825
- fn_body.push(AST18.returnStatement(AST18.identifier("result")));
172826
- const declaration2 = AST18.functionDeclaration(
172827
- AST18.identifier(__variable_fn_name(query.name.value)),
172828
- [AST18.identifier("config"), AST18.identifier("event")],
172829
- AST18.blockStatement(fn_body)
172950
+ fn_body.push(AST19.returnStatement(AST19.identifier("result")));
172951
+ const declaration2 = AST19.functionDeclaration(
172952
+ AST19.identifier(__variable_fn_name(query.name.value)),
172953
+ [AST19.identifier("config"), AST19.identifier("event")],
172954
+ AST19.blockStatement(fn_body)
172830
172955
  );
172831
172956
  declaration2.async = true;
172832
172957
  return declaration2;
@@ -172836,8 +172961,8 @@ function __variable_fn_name(name) {
172836
172961
  }
172837
172962
 
172838
172963
  // src/plugin/transforms/kit/session.ts
172839
- var recast19 = __toESM(require_main5(), 1);
172840
- var AST19 = recast19.types.builders;
172964
+ var recast20 = __toESM(require_main5(), 1);
172965
+ var AST20 = recast20.types.builders;
172841
172966
  function session_default(page) {
172842
172967
  if (is_root_layout_server(page.config, page.filepath)) {
172843
172968
  process_root_layout_server(page);
@@ -172853,12 +172978,12 @@ function process_root_layout_server(page) {
172853
172978
  sourceModule: "$houdini/plugins/houdini-svelte/runtime/session"
172854
172979
  }).ids[0];
172855
172980
  add_load_return(page, (event_id) => [
172856
- AST19.spreadElement(AST19.callExpression(build_session_object, [event_id]))
172981
+ AST20.spreadElement(AST20.callExpression(build_session_object, [event_id]))
172857
172982
  ]);
172858
172983
  }
172859
172984
  function process_root_layout_script(page) {
172860
172985
  add_load_return(page, (event_id) => [
172861
- AST19.spreadElement(AST19.memberExpression(event_id, AST19.identifier("data")))
172986
+ AST20.spreadElement(AST20.memberExpression(event_id, AST20.identifier("data")))
172862
172987
  ]);
172863
172988
  }
172864
172989
  function add_load_return(page, properties) {
@@ -172870,50 +172995,78 @@ function add_load_return(page, properties) {
172870
172995
  if (return_statement_index !== -1) {
172871
172996
  return_statement = body.body[return_statement_index];
172872
172997
  } else {
172873
- return_statement = AST19.returnStatement(AST19.objectExpression([]));
172998
+ return_statement = AST20.returnStatement(AST20.objectExpression([]));
172874
172999
  body.body.push(return_statement);
172875
- return_statement_index = body.body.length - 1;
172876
173000
  }
172877
- const local_return_var = AST19.identifier("__houdini__vite__plugin__return__value__");
172878
- body.body[return_statement_index] = AST19.variableDeclaration("const", [
172879
- AST19.variableDeclarator(local_return_var, return_statement.argument)
172880
- ]);
172881
- body.body.splice(
172882
- return_statement_index + 1,
172883
- 0,
172884
- AST19.returnStatement(
172885
- AST19.objectExpression([...properties(event_id), AST19.spreadElement(local_return_var)])
172886
- )
172887
- );
173001
+ return walk(body, {
173002
+ enter(node) {
173003
+ if (node.type === "ReturnStatement") {
173004
+ const returnedValue = node.argument;
173005
+ this.replace(
173006
+ AST20.returnStatement(
173007
+ AST20.objectExpression([
173008
+ ...properties(event_id),
173009
+ AST20.spreadElement(returnedValue ?? AST20.objectExpression([]))
173010
+ ])
173011
+ )
173012
+ );
173013
+ }
173014
+ }
173015
+ });
172888
173016
  });
172889
173017
  }
172890
173018
  function modify_load(page, cb) {
172891
- let load_fn = find_exported_fn(page.script.body, "load");
172892
- let event_id = AST19.identifier("event");
172893
- let body = AST19.blockStatement([]);
173019
+ let exported = find_exported_fn(page.script.body, "load");
173020
+ let event_id = AST20.identifier("event");
173021
+ let load_fn = exported?.declaration || null;
173022
+ let body = AST20.blockStatement([]);
172894
173023
  if (load_fn?.type === "ArrowFunctionExpression") {
172895
173024
  if (load_fn.body.type === "BlockStatement") {
172896
173025
  body = load_fn.body;
172897
173026
  } else {
172898
- body = AST19.blockStatement([AST19.returnStatement(load_fn.body)]);
173027
+ body = AST20.blockStatement([AST20.returnStatement(load_fn.body)]);
172899
173028
  load_fn.body = body;
172900
173029
  }
172901
- } else if (load_fn) {
173030
+ } else if (load_fn && "body" in load_fn) {
172902
173031
  body = load_fn.body;
172903
173032
  }
172904
173033
  if (!load_fn) {
172905
- load_fn = AST19.functionDeclaration(
172906
- AST19.identifier("load"),
173034
+ load_fn = AST20.functionDeclaration(
173035
+ AST20.identifier("load"),
172907
173036
  [event_id],
172908
- AST19.blockStatement([])
173037
+ AST20.blockStatement([])
172909
173038
  );
172910
173039
  load_fn.async = true;
172911
173040
  page.script.body.splice(
172912
173041
  find_insert_index(page.script),
172913
173042
  0,
172914
- AST19.exportNamedDeclaration(load_fn)
173043
+ AST20.exportNamedDeclaration(load_fn)
172915
173044
  );
172916
173045
  body = load_fn.body;
173046
+ } else if (load_fn.type === "CallExpression" || load_fn.type === "Identifier") {
173047
+ const exportStatement = exported?.export;
173048
+ if (!exportStatement) {
173049
+ return;
173050
+ }
173051
+ const intermediateID = AST20.identifier("houdini__intermediate__load__");
173052
+ page.script.body.push(
173053
+ AST20.variableDeclaration("const", [AST20.variableDeclarator(intermediateID, load_fn)])
173054
+ );
173055
+ const newLoad = AST20.arrowFunctionExpression(
173056
+ [AST20.identifier("event")],
173057
+ AST20.blockStatement([
173058
+ AST20.variableDeclaration("const", [
173059
+ AST20.variableDeclarator(
173060
+ AST20.identifier("result"),
173061
+ AST20.callExpression(intermediateID, [AST20.identifier("event")])
173062
+ )
173063
+ ]),
173064
+ AST20.returnStatement(AST20.identifier("result"))
173065
+ ])
173066
+ );
173067
+ exportStatement.declaration.declarations[0].init = newLoad;
173068
+ load_fn = newLoad;
173069
+ body = newLoad.body;
172917
173070
  } else {
172918
173071
  if (load_fn.params.length === 0) {
172919
173072
  load_fn.params.push(event_id);
@@ -172923,7 +173076,7 @@ function modify_load(page, cb) {
172923
173076
  const pattern = load_fn.params[0];
172924
173077
  load_fn.params[0] = event_id;
172925
173078
  body.body.unshift(
172926
- AST19.variableDeclaration("let", [AST19.variableDeclarator(pattern, event_id)])
173079
+ AST20.variableDeclaration("let", [AST20.variableDeclarator(pattern, event_id)])
172927
173080
  );
172928
173081
  } else {
172929
173082
  throw new Error(
@@ -172931,7 +173084,7 @@ function modify_load(page, cb) {
172931
173084
  );
172932
173085
  }
172933
173086
  }
172934
- cb(body, event_id);
173087
+ load_fn.body = cb(body, event_id);
172935
173088
  }
172936
173089
 
172937
173090
  // src/plugin/transforms/kit/index.ts
@@ -172944,8 +173097,8 @@ async function SvelteKitProcessor(config, page) {
172944
173097
  }
172945
173098
 
172946
173099
  // src/plugin/transforms/tags.ts
172947
- var recast20 = __toESM(require_main5(), 1);
172948
- var AST20 = recast20.types.builders;
173100
+ var recast21 = __toESM(require_main5(), 1);
173101
+ var AST21 = recast21.types.builders;
172949
173102
  async function GraphQLTagProcessor(config, page) {
172950
173103
  await find_graphql(config, page.script, {
172951
173104
  dependency: page.watch_file,
@@ -172953,7 +173106,7 @@ async function GraphQLTagProcessor(config, page) {
172953
173106
  const { node, parsedDocument } = tag2;
172954
173107
  const operation = config.extractDefinition(parsedDocument);
172955
173108
  const { id: id2 } = store_import({ page, artifact: { name: operation.name.value } });
172956
- node.replaceWith(AST20.newExpression(id2, []));
173109
+ node.replaceWith(AST21.newExpression(id2, []));
172957
173110
  }
172958
173111
  });
172959
173112
  }
@@ -172972,7 +173125,7 @@ async function apply_transforms(framework2, page) {
172972
173125
  position = res.position;
172973
173126
  useRunes = res.useRunes;
172974
173127
  } else {
172975
- script = recast21.types.builders.program([]);
173128
+ script = recast23.types.builders.program([]);
172976
173129
  position = { start: 0, end: 0 };
172977
173130
  }
172978
173131
  } else {