@salesforce/lds-worker-api 1.158.0 → 1.158.2

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.
@@ -3672,7 +3672,7 @@ class Luvio {
3672
3672
  return this.environment.buildStructuredKey(namespace, representationName, idValues);
3673
3673
  }
3674
3674
  }
3675
- // engine version: 0.143.2-f0cd3fab
3675
+ // engine version: 0.143.4-64dccb30
3676
3676
 
3677
3677
  /**
3678
3678
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -3799,7 +3799,7 @@ function withDefaultLuvio(callback) {
3799
3799
  }
3800
3800
  callbacks.push(callback);
3801
3801
  }
3802
- // version: 1.158.0-8b4924803
3802
+ // version: 1.158.2-6b3522c4a
3803
3803
 
3804
3804
  // TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
3805
3805
  function instrumentAdapter$1(createFunction, _metadata) {
@@ -15232,7 +15232,7 @@ function parseAndVisit(source) {
15232
15232
  updateReferenceMapWithKnownKey(ast, luvioDocumentNode);
15233
15233
  return luvioDocumentNode;
15234
15234
  }
15235
- // version: 1.158.0-8b4924803
15235
+ // version: 1.158.2-6b3522c4a
15236
15236
 
15237
15237
  function unwrap(data) {
15238
15238
  // The lwc-luvio bindings import a function from lwc called "unwrap".
@@ -16145,7 +16145,7 @@ function createGraphQLWireAdapterConstructor(luvio, adapter, metadata, astResolv
16145
16145
  const { apiFamily, name } = metadata;
16146
16146
  return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
16147
16147
  }
16148
- // version: 1.158.0-8b4924803
16148
+ // version: 1.158.2-6b3522c4a
16149
16149
 
16150
16150
  /**
16151
16151
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -16228,7 +16228,7 @@ var FragmentReadResultState;
16228
16228
  ({
16229
16229
  state: FragmentReadResultState.Missing,
16230
16230
  });
16231
- // engine version: 0.143.2-f0cd3fab
16231
+ // engine version: 0.143.4-64dccb30
16232
16232
 
16233
16233
  const { keys: ObjectKeys$3, create: ObjectCreate$3 } = Object;
16234
16234
 
@@ -44016,7 +44016,7 @@ withDefaultLuvio((luvio) => {
44016
44016
  dropFunction: instrumentation$2.notifyRecordUpdateAvailableDropped,
44017
44017
  });
44018
44018
  });
44019
- // version: 1.158.0-9275eaa3c
44019
+ // version: 1.158.2-2489a5047
44020
44020
 
44021
44021
  var caseSensitiveUserId = '005B0000000GR4OIAW';
44022
44022
 
@@ -60050,7 +60050,7 @@ register({
60050
60050
  id: '@salesforce/lds-network-adapter',
60051
60051
  instrument: instrument$1,
60052
60052
  });
60053
- // version: 1.158.0-8b4924803
60053
+ // version: 1.158.2-6b3522c4a
60054
60054
 
60055
60055
  const { create: create$2, keys: keys$2 } = Object;
60056
60056
  const { stringify: stringify$1, parse: parse$1 } = JSON;
@@ -60573,26 +60573,8 @@ function buildSelectionForNode$12(source, reader, parentNode, selectionNode, var
60573
60573
  }
60574
60574
  function select$1b(field, variables, fragments) {
60575
60575
  return (source, reader, parentRecordId) => {
60576
- var _a;
60577
60576
  const sink = {};
60578
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
60579
- const builtSelection = buildSelectionForNode$12(source, reader, field, sel, variables, fragments, parentRecordId);
60580
- if (builtSelection !== undefined) {
60581
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
60582
- Object.keys(builtSelection).forEach((key, value) => {
60583
- // We only assign a field selection in the fragment if it doesn't already exist in sink
60584
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
60585
- if (sink[key] === undefined) {
60586
- sink[key] = builtSelection[key];
60587
- }
60588
- });
60589
- }
60590
- else {
60591
- Object.assign(sink, builtSelection);
60592
- }
60593
- }
60594
- });
60595
- return sink;
60577
+ return selectCalculateSink(sink, field, buildSelectionForNode$12, source, reader, variables, fragments, parentRecordId);
60596
60578
  };
60597
60579
  }
60598
60580
  function getTypeCacheKeys$16(astNode, state) {
@@ -60735,26 +60717,8 @@ function buildSelectionForNode$11(source, reader, parentNode, selectionNode, var
60735
60717
  }
60736
60718
  function select$1a(field, variables, fragments) {
60737
60719
  return (source, reader, parentRecordId) => {
60738
- var _a;
60739
60720
  const sink = {};
60740
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
60741
- const builtSelection = buildSelectionForNode$11(source, reader, field, sel, variables, fragments, parentRecordId);
60742
- if (builtSelection !== undefined) {
60743
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
60744
- Object.keys(builtSelection).forEach((key, value) => {
60745
- // We only assign a field selection in the fragment if it doesn't already exist in sink
60746
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
60747
- if (sink[key] === undefined) {
60748
- sink[key] = builtSelection[key];
60749
- }
60750
- });
60751
- }
60752
- else {
60753
- Object.assign(sink, builtSelection);
60754
- }
60755
- }
60756
- });
60757
- return sink;
60721
+ return selectCalculateSink(sink, field, buildSelectionForNode$11, source, reader, variables, fragments, parentRecordId);
60758
60722
  };
60759
60723
  }
60760
60724
  function getTypeCacheKeys$15(astNode, state) {
@@ -60897,26 +60861,8 @@ function buildSelectionForNode$10(source, reader, parentNode, selectionNode, var
60897
60861
  }
60898
60862
  function select$19(field, variables, fragments) {
60899
60863
  return (source, reader, parentRecordId) => {
60900
- var _a;
60901
60864
  const sink = {};
60902
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
60903
- const builtSelection = buildSelectionForNode$10(source, reader, field, sel, variables, fragments, parentRecordId);
60904
- if (builtSelection !== undefined) {
60905
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
60906
- Object.keys(builtSelection).forEach((key, value) => {
60907
- // We only assign a field selection in the fragment if it doesn't already exist in sink
60908
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
60909
- if (sink[key] === undefined) {
60910
- sink[key] = builtSelection[key];
60911
- }
60912
- });
60913
- }
60914
- else {
60915
- Object.assign(sink, builtSelection);
60916
- }
60917
- }
60918
- });
60919
- return sink;
60865
+ return selectCalculateSink(sink, field, buildSelectionForNode$10, source, reader, variables, fragments, parentRecordId);
60920
60866
  };
60921
60867
  }
60922
60868
  function getTypeCacheKeys$14(astNode, state) {
@@ -61071,26 +61017,8 @@ function buildSelectionForNode$$(source, reader, parentNode, selectionNode, vari
61071
61017
  }
61072
61018
  function select$18(field, variables, fragments) {
61073
61019
  return (source, reader, parentRecordId) => {
61074
- var _a;
61075
61020
  const sink = {};
61076
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
61077
- const builtSelection = buildSelectionForNode$$(source, reader, field, sel, variables, fragments, parentRecordId);
61078
- if (builtSelection !== undefined) {
61079
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
61080
- Object.keys(builtSelection).forEach((key, value) => {
61081
- // We only assign a field selection in the fragment if it doesn't already exist in sink
61082
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
61083
- if (sink[key] === undefined) {
61084
- sink[key] = builtSelection[key];
61085
- }
61086
- });
61087
- }
61088
- else {
61089
- Object.assign(sink, builtSelection);
61090
- }
61091
- }
61092
- });
61093
- return sink;
61021
+ return selectCalculateSink(sink, field, buildSelectionForNode$$, source, reader, variables, fragments, parentRecordId);
61094
61022
  };
61095
61023
  }
61096
61024
  function getMinimumSelections$L() {
@@ -61115,10 +61043,10 @@ function getTypeCacheKeys$13(astNode, state) {
61115
61043
  representationName: name$_
61116
61044
  });
61117
61045
  // get all cache keys from normalizable fields
61118
- const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$$) : [];
61046
+ const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$$) : new Map();
61119
61047
  for (const fieldDataKey of Object.keys(data)) {
61120
61048
  const fieldData = data[fieldDataKey];
61121
- const requestedField = getRequestedField(fieldDataKey, requestedFields);
61049
+ const requestedField = requestedFields.get(fieldDataKey);
61122
61050
  if (requestedField === undefined) {
61123
61051
  continue; // Skip unknown field.
61124
61052
  }
@@ -61413,26 +61341,8 @@ function buildSelectionForNode$_(source, reader, parentNode, selectionNode, vari
61413
61341
  }
61414
61342
  function select$17(field, variables, fragments) {
61415
61343
  return (source, reader, parentRecordId) => {
61416
- var _a;
61417
61344
  const sink = {};
61418
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
61419
- const builtSelection = buildSelectionForNode$_(source, reader, field, sel, variables, fragments, parentRecordId);
61420
- if (builtSelection !== undefined) {
61421
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
61422
- Object.keys(builtSelection).forEach((key, value) => {
61423
- // We only assign a field selection in the fragment if it doesn't already exist in sink
61424
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
61425
- if (sink[key] === undefined) {
61426
- sink[key] = builtSelection[key];
61427
- }
61428
- });
61429
- }
61430
- else {
61431
- Object.assign(sink, builtSelection);
61432
- }
61433
- }
61434
- });
61435
- return sink;
61345
+ return selectCalculateSink(sink, field, buildSelectionForNode$_, source, reader, variables, fragments, parentRecordId);
61436
61346
  };
61437
61347
  }
61438
61348
  function getTypeCacheKeys$12(astNode, state) {
@@ -61570,26 +61480,8 @@ function buildSelectionForNode$Z(source, reader, parentNode, selectionNode, vari
61570
61480
  }
61571
61481
  function select$16(field, variables, fragments) {
61572
61482
  return (source, reader, parentRecordId) => {
61573
- var _a;
61574
61483
  const sink = {};
61575
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
61576
- const builtSelection = buildSelectionForNode$Z(source, reader, field, sel, variables, fragments, parentRecordId);
61577
- if (builtSelection !== undefined) {
61578
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
61579
- Object.keys(builtSelection).forEach((key, value) => {
61580
- // We only assign a field selection in the fragment if it doesn't already exist in sink
61581
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
61582
- if (sink[key] === undefined) {
61583
- sink[key] = builtSelection[key];
61584
- }
61585
- });
61586
- }
61587
- else {
61588
- Object.assign(sink, builtSelection);
61589
- }
61590
- }
61591
- });
61592
- return sink;
61484
+ return selectCalculateSink(sink, field, buildSelectionForNode$Z, source, reader, variables, fragments, parentRecordId);
61593
61485
  };
61594
61486
  }
61595
61487
  function getTypeCacheKeys$11(astNode, state) {
@@ -61735,26 +61627,8 @@ function buildSelectionForNode$Y(source, reader, parentNode, selectionNode, vari
61735
61627
  }
61736
61628
  function select$15(field, variables, fragments) {
61737
61629
  return (source, reader, parentRecordId) => {
61738
- var _a;
61739
61630
  const sink = {};
61740
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
61741
- const builtSelection = buildSelectionForNode$Y(source, reader, field, sel, variables, fragments, parentRecordId);
61742
- if (builtSelection !== undefined) {
61743
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
61744
- Object.keys(builtSelection).forEach((key, value) => {
61745
- // We only assign a field selection in the fragment if it doesn't already exist in sink
61746
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
61747
- if (sink[key] === undefined) {
61748
- sink[key] = builtSelection[key];
61749
- }
61750
- });
61751
- }
61752
- else {
61753
- Object.assign(sink, builtSelection);
61754
- }
61755
- }
61756
- });
61757
- return sink;
61631
+ return selectCalculateSink(sink, field, buildSelectionForNode$Y, source, reader, variables, fragments, parentRecordId);
61758
61632
  };
61759
61633
  }
61760
61634
  function getMinimumSelections$K() {
@@ -61779,10 +61653,10 @@ function getTypeCacheKeys$10(astNode, state) {
61779
61653
  representationName: name$X
61780
61654
  });
61781
61655
  // get all cache keys from normalizable fields
61782
- const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$Y) : [];
61656
+ const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$Y) : new Map();
61783
61657
  for (const fieldDataKey of Object.keys(data)) {
61784
61658
  const fieldData = data[fieldDataKey];
61785
- const requestedField = getRequestedField(fieldDataKey, requestedFields);
61659
+ const requestedField = requestedFields.get(fieldDataKey);
61786
61660
  if (requestedField === undefined) {
61787
61661
  continue; // Skip unknown field.
61788
61662
  }
@@ -62094,26 +61968,8 @@ function buildSelectionForNode$X(source, reader, parentNode, selectionNode, vari
62094
61968
  }
62095
61969
  function select$14(field, variables, fragments) {
62096
61970
  return (source, reader, parentRecordId) => {
62097
- var _a;
62098
61971
  const sink = {};
62099
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
62100
- const builtSelection = buildSelectionForNode$X(source, reader, field, sel, variables, fragments, parentRecordId);
62101
- if (builtSelection !== undefined) {
62102
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
62103
- Object.keys(builtSelection).forEach((key, value) => {
62104
- // We only assign a field selection in the fragment if it doesn't already exist in sink
62105
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
62106
- if (sink[key] === undefined) {
62107
- sink[key] = builtSelection[key];
62108
- }
62109
- });
62110
- }
62111
- else {
62112
- Object.assign(sink, builtSelection);
62113
- }
62114
- }
62115
- });
62116
- return sink;
61972
+ return selectCalculateSink(sink, field, buildSelectionForNode$X, source, reader, variables, fragments, parentRecordId);
62117
61973
  };
62118
61974
  }
62119
61975
  function getMinimumSelections$I() {
@@ -62262,26 +62118,8 @@ function buildSelectionForNode$W(source, reader, parentNode, selectionNode, vari
62262
62118
  }
62263
62119
  function select$13(field, variables, fragments) {
62264
62120
  return (source, reader, parentRecordId) => {
62265
- var _a;
62266
62121
  const sink = {};
62267
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
62268
- const builtSelection = buildSelectionForNode$W(source, reader, field, sel, variables, fragments, parentRecordId);
62269
- if (builtSelection !== undefined) {
62270
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
62271
- Object.keys(builtSelection).forEach((key, value) => {
62272
- // We only assign a field selection in the fragment if it doesn't already exist in sink
62273
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
62274
- if (sink[key] === undefined) {
62275
- sink[key] = builtSelection[key];
62276
- }
62277
- });
62278
- }
62279
- else {
62280
- Object.assign(sink, builtSelection);
62281
- }
62282
- }
62283
- });
62284
- return sink;
62122
+ return selectCalculateSink(sink, field, buildSelectionForNode$W, source, reader, variables, fragments, parentRecordId);
62285
62123
  };
62286
62124
  }
62287
62125
  function getTypeCacheKeys$_(astNode, state) {
@@ -62440,26 +62278,8 @@ function buildSelectionForNode$V(source, reader, parentNode, selectionNode, vari
62440
62278
  }
62441
62279
  function select$12(field, variables, fragments) {
62442
62280
  return (source, reader, parentRecordId) => {
62443
- var _a;
62444
62281
  const sink = {};
62445
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
62446
- const builtSelection = buildSelectionForNode$V(source, reader, field, sel, variables, fragments, parentRecordId);
62447
- if (builtSelection !== undefined) {
62448
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
62449
- Object.keys(builtSelection).forEach((key, value) => {
62450
- // We only assign a field selection in the fragment if it doesn't already exist in sink
62451
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
62452
- if (sink[key] === undefined) {
62453
- sink[key] = builtSelection[key];
62454
- }
62455
- });
62456
- }
62457
- else {
62458
- Object.assign(sink, builtSelection);
62459
- }
62460
- }
62461
- });
62462
- return sink;
62282
+ return selectCalculateSink(sink, field, buildSelectionForNode$V, source, reader, variables, fragments, parentRecordId);
62463
62283
  };
62464
62284
  }
62465
62285
  function getMinimumSelections$H() {
@@ -62484,10 +62304,10 @@ function getTypeCacheKeys$Z(astNode, state) {
62484
62304
  representationName: name$U
62485
62305
  });
62486
62306
  // get all cache keys from normalizable fields
62487
- const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$V) : [];
62307
+ const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$V) : new Map();
62488
62308
  for (const fieldDataKey of Object.keys(data)) {
62489
62309
  const fieldData = data[fieldDataKey];
62490
- const requestedField = getRequestedField(fieldDataKey, requestedFields);
62310
+ const requestedField = requestedFields.get(fieldDataKey);
62491
62311
  if (requestedField === undefined) {
62492
62312
  continue; // Skip unknown field.
62493
62313
  }
@@ -62990,26 +62810,8 @@ function buildSelectionForNode$U(source, reader, parentNode, selectionNode, vari
62990
62810
  }
62991
62811
  function select$11(field, variables, fragments) {
62992
62812
  return (source, reader, parentRecordId) => {
62993
- var _a;
62994
62813
  const sink = {};
62995
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
62996
- const builtSelection = buildSelectionForNode$U(source, reader, field, sel, variables, fragments, parentRecordId);
62997
- if (builtSelection !== undefined) {
62998
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
62999
- Object.keys(builtSelection).forEach((key, value) => {
63000
- // We only assign a field selection in the fragment if it doesn't already exist in sink
63001
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
63002
- if (sink[key] === undefined) {
63003
- sink[key] = builtSelection[key];
63004
- }
63005
- });
63006
- }
63007
- else {
63008
- Object.assign(sink, builtSelection);
63009
- }
63010
- }
63011
- });
63012
- return sink;
62814
+ return selectCalculateSink(sink, field, buildSelectionForNode$U, source, reader, variables, fragments, parentRecordId);
63013
62815
  };
63014
62816
  }
63015
62817
  function getMinimumSelections$G() {
@@ -63208,26 +63010,8 @@ function buildSelectionForNode$T(source, reader, parentNode, selectionNode, vari
63208
63010
  }
63209
63011
  function select$10(field, variables, fragments) {
63210
63012
  return (source, reader, parentRecordId) => {
63211
- var _a;
63212
63013
  const sink = {};
63213
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
63214
- const builtSelection = buildSelectionForNode$T(source, reader, field, sel, variables, fragments, parentRecordId);
63215
- if (builtSelection !== undefined) {
63216
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
63217
- Object.keys(builtSelection).forEach((key, value) => {
63218
- // We only assign a field selection in the fragment if it doesn't already exist in sink
63219
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
63220
- if (sink[key] === undefined) {
63221
- sink[key] = builtSelection[key];
63222
- }
63223
- });
63224
- }
63225
- else {
63226
- Object.assign(sink, builtSelection);
63227
- }
63228
- }
63229
- });
63230
- return sink;
63014
+ return selectCalculateSink(sink, field, buildSelectionForNode$T, source, reader, variables, fragments, parentRecordId);
63231
63015
  };
63232
63016
  }
63233
63017
  function getTypeCacheKeys$X(astNode, state) {
@@ -63363,26 +63147,8 @@ function buildSelectionForNode$S(source, reader, parentNode, selectionNode, vari
63363
63147
  }
63364
63148
  function select$$(field, variables, fragments) {
63365
63149
  return (source, reader, parentRecordId) => {
63366
- var _a;
63367
63150
  const sink = {};
63368
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
63369
- const builtSelection = buildSelectionForNode$S(source, reader, field, sel, variables, fragments, parentRecordId);
63370
- if (builtSelection !== undefined) {
63371
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
63372
- Object.keys(builtSelection).forEach((key, value) => {
63373
- // We only assign a field selection in the fragment if it doesn't already exist in sink
63374
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
63375
- if (sink[key] === undefined) {
63376
- sink[key] = builtSelection[key];
63377
- }
63378
- });
63379
- }
63380
- else {
63381
- Object.assign(sink, builtSelection);
63382
- }
63383
- }
63384
- });
63385
- return sink;
63151
+ return selectCalculateSink(sink, field, buildSelectionForNode$S, source, reader, variables, fragments, parentRecordId);
63386
63152
  };
63387
63153
  }
63388
63154
  function getMinimumSelections$E() {
@@ -63407,10 +63173,10 @@ function getTypeCacheKeys$W(astNode, state) {
63407
63173
  representationName: name$R
63408
63174
  });
63409
63175
  // get all cache keys from normalizable fields
63410
- const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$S) : [];
63176
+ const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$S) : new Map();
63411
63177
  for (const fieldDataKey of Object.keys(data)) {
63412
63178
  const fieldData = data[fieldDataKey];
63413
- const requestedField = getRequestedField(fieldDataKey, requestedFields);
63179
+ const requestedField = requestedFields.get(fieldDataKey);
63414
63180
  if (requestedField === undefined) {
63415
63181
  continue; // Skip unknown field.
63416
63182
  }
@@ -63587,26 +63353,8 @@ function buildSelectionForNode$R(source, reader, parentNode, selectionNode, vari
63587
63353
  }
63588
63354
  function select$_(field, variables, fragments) {
63589
63355
  return (source, reader, parentRecordId) => {
63590
- var _a;
63591
63356
  const sink = {};
63592
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
63593
- const builtSelection = buildSelectionForNode$R(source, reader, field, sel, variables, fragments, parentRecordId);
63594
- if (builtSelection !== undefined) {
63595
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
63596
- Object.keys(builtSelection).forEach((key, value) => {
63597
- // We only assign a field selection in the fragment if it doesn't already exist in sink
63598
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
63599
- if (sink[key] === undefined) {
63600
- sink[key] = builtSelection[key];
63601
- }
63602
- });
63603
- }
63604
- else {
63605
- Object.assign(sink, builtSelection);
63606
- }
63607
- }
63608
- });
63609
- return sink;
63357
+ return selectCalculateSink(sink, field, buildSelectionForNode$R, source, reader, variables, fragments, parentRecordId);
63610
63358
  };
63611
63359
  }
63612
63360
  function getMinimumSelections$D() {
@@ -63751,26 +63499,8 @@ function buildSelectionForNode$Q(source, reader, parentNode, selectionNode, vari
63751
63499
  }
63752
63500
  function select$Z(field, variables, fragments) {
63753
63501
  return (source, reader, parentRecordId) => {
63754
- var _a;
63755
63502
  const sink = {};
63756
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
63757
- const builtSelection = buildSelectionForNode$Q(source, reader, field, sel, variables, fragments, parentRecordId);
63758
- if (builtSelection !== undefined) {
63759
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
63760
- Object.keys(builtSelection).forEach((key, value) => {
63761
- // We only assign a field selection in the fragment if it doesn't already exist in sink
63762
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
63763
- if (sink[key] === undefined) {
63764
- sink[key] = builtSelection[key];
63765
- }
63766
- });
63767
- }
63768
- else {
63769
- Object.assign(sink, builtSelection);
63770
- }
63771
- }
63772
- });
63773
- return sink;
63503
+ return selectCalculateSink(sink, field, buildSelectionForNode$Q, source, reader, variables, fragments, parentRecordId);
63774
63504
  };
63775
63505
  }
63776
63506
  function getMinimumSelections$C() {
@@ -63948,26 +63678,8 @@ function buildSelectionForNode$P(source, reader, parentNode, selectionNode, vari
63948
63678
  }
63949
63679
  function select$Y(field, variables, fragments) {
63950
63680
  return (source, reader, parentRecordId) => {
63951
- var _a;
63952
63681
  const sink = {};
63953
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
63954
- const builtSelection = buildSelectionForNode$P(source, reader, field, sel, variables, fragments, parentRecordId);
63955
- if (builtSelection !== undefined) {
63956
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
63957
- Object.keys(builtSelection).forEach((key, value) => {
63958
- // We only assign a field selection in the fragment if it doesn't already exist in sink
63959
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
63960
- if (sink[key] === undefined) {
63961
- sink[key] = builtSelection[key];
63962
- }
63963
- });
63964
- }
63965
- else {
63966
- Object.assign(sink, builtSelection);
63967
- }
63968
- }
63969
- });
63970
- return sink;
63682
+ return selectCalculateSink(sink, field, buildSelectionForNode$P, source, reader, variables, fragments, parentRecordId);
63971
63683
  };
63972
63684
  }
63973
63685
  function getMinimumSelections$B() {
@@ -63992,10 +63704,10 @@ function getTypeCacheKeys$T(astNode, state) {
63992
63704
  representationName: name$O
63993
63705
  });
63994
63706
  // get all cache keys from normalizable fields
63995
- const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$P) : [];
63707
+ const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$P) : new Map();
63996
63708
  for (const fieldDataKey of Object.keys(data)) {
63997
63709
  const fieldData = data[fieldDataKey];
63998
- const requestedField = getRequestedField(fieldDataKey, requestedFields);
63710
+ const requestedField = requestedFields.get(fieldDataKey);
63999
63711
  if (requestedField === undefined) {
64000
63712
  continue; // Skip unknown field.
64001
63713
  }
@@ -64356,26 +64068,8 @@ function buildSelectionForNode$O(source, reader, parentNode, selectionNode, vari
64356
64068
  }
64357
64069
  function select$X(field, variables, fragments) {
64358
64070
  return (source, reader, parentRecordId) => {
64359
- var _a;
64360
64071
  const sink = {};
64361
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
64362
- const builtSelection = buildSelectionForNode$O(source, reader, field, sel, variables, fragments, parentRecordId);
64363
- if (builtSelection !== undefined) {
64364
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
64365
- Object.keys(builtSelection).forEach((key, value) => {
64366
- // We only assign a field selection in the fragment if it doesn't already exist in sink
64367
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
64368
- if (sink[key] === undefined) {
64369
- sink[key] = builtSelection[key];
64370
- }
64371
- });
64372
- }
64373
- else {
64374
- Object.assign(sink, builtSelection);
64375
- }
64376
- }
64377
- });
64378
- return sink;
64072
+ return selectCalculateSink(sink, field, buildSelectionForNode$O, source, reader, variables, fragments, parentRecordId);
64379
64073
  };
64380
64074
  }
64381
64075
  function getMinimumSelections$A() {
@@ -64546,26 +64240,8 @@ function buildSelectionForNode$N(source, reader, parentNode, selectionNode, vari
64546
64240
  }
64547
64241
  function select$W(field, variables, fragments) {
64548
64242
  return (source, reader, parentRecordId) => {
64549
- var _a;
64550
64243
  const sink = {};
64551
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
64552
- const builtSelection = buildSelectionForNode$N(source, reader, field, sel, variables, fragments, parentRecordId);
64553
- if (builtSelection !== undefined) {
64554
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
64555
- Object.keys(builtSelection).forEach((key, value) => {
64556
- // We only assign a field selection in the fragment if it doesn't already exist in sink
64557
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
64558
- if (sink[key] === undefined) {
64559
- sink[key] = builtSelection[key];
64560
- }
64561
- });
64562
- }
64563
- else {
64564
- Object.assign(sink, builtSelection);
64565
- }
64566
- }
64567
- });
64568
- return sink;
64244
+ return selectCalculateSink(sink, field, buildSelectionForNode$N, source, reader, variables, fragments, parentRecordId);
64569
64245
  };
64570
64246
  }
64571
64247
  function getMinimumSelections$z() {
@@ -64590,10 +64266,10 @@ function getTypeCacheKeys$R(astNode, state) {
64590
64266
  representationName: name$M
64591
64267
  });
64592
64268
  // get all cache keys from normalizable fields
64593
- const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$N) : [];
64269
+ const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$N) : new Map();
64594
64270
  for (const fieldDataKey of Object.keys(data)) {
64595
64271
  const fieldData = data[fieldDataKey];
64596
- const requestedField = getRequestedField(fieldDataKey, requestedFields);
64272
+ const requestedField = requestedFields.get(fieldDataKey);
64597
64273
  if (requestedField === undefined) {
64598
64274
  continue; // Skip unknown field.
64599
64275
  }
@@ -64986,26 +64662,8 @@ function buildSelectionForNode$M(source, reader, parentNode, selectionNode, vari
64986
64662
  }
64987
64663
  function select$V(field, variables, fragments) {
64988
64664
  return (source, reader, parentRecordId) => {
64989
- var _a;
64990
64665
  const sink = {};
64991
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
64992
- const builtSelection = buildSelectionForNode$M(source, reader, field, sel, variables, fragments, parentRecordId);
64993
- if (builtSelection !== undefined) {
64994
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
64995
- Object.keys(builtSelection).forEach((key, value) => {
64996
- // We only assign a field selection in the fragment if it doesn't already exist in sink
64997
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
64998
- if (sink[key] === undefined) {
64999
- sink[key] = builtSelection[key];
65000
- }
65001
- });
65002
- }
65003
- else {
65004
- Object.assign(sink, builtSelection);
65005
- }
65006
- }
65007
- });
65008
- return sink;
64666
+ return selectCalculateSink(sink, field, buildSelectionForNode$M, source, reader, variables, fragments, parentRecordId);
65009
64667
  };
65010
64668
  }
65011
64669
  function getMinimumSelections$y() {
@@ -65030,10 +64688,10 @@ function getTypeCacheKeys$Q(astNode, state) {
65030
64688
  representationName: name$L
65031
64689
  });
65032
64690
  // get all cache keys from normalizable fields
65033
- const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$M) : [];
64691
+ const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$M) : new Map();
65034
64692
  for (const fieldDataKey of Object.keys(data)) {
65035
64693
  const fieldData = data[fieldDataKey];
65036
- const requestedField = getRequestedField(fieldDataKey, requestedFields);
64694
+ const requestedField = requestedFields.get(fieldDataKey);
65037
64695
  if (requestedField === undefined) {
65038
64696
  continue; // Skip unknown field.
65039
64697
  }
@@ -65197,26 +64855,8 @@ function buildSelectionForNode$L(source, reader, parentNode, selectionNode, vari
65197
64855
  }
65198
64856
  function select$U(field, variables, fragments) {
65199
64857
  return (source, reader, parentRecordId) => {
65200
- var _a;
65201
64858
  const sink = {};
65202
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
65203
- const builtSelection = buildSelectionForNode$L(source, reader, field, sel, variables, fragments, parentRecordId);
65204
- if (builtSelection !== undefined) {
65205
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
65206
- Object.keys(builtSelection).forEach((key, value) => {
65207
- // We only assign a field selection in the fragment if it doesn't already exist in sink
65208
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
65209
- if (sink[key] === undefined) {
65210
- sink[key] = builtSelection[key];
65211
- }
65212
- });
65213
- }
65214
- else {
65215
- Object.assign(sink, builtSelection);
65216
- }
65217
- }
65218
- });
65219
- return sink;
64859
+ return selectCalculateSink(sink, field, buildSelectionForNode$L, source, reader, variables, fragments, parentRecordId);
65220
64860
  };
65221
64861
  }
65222
64862
  function getTypeCacheKeys$P(astNode, state) {
@@ -65353,26 +64993,8 @@ function buildSelectionForNode$K(source, reader, parentNode, selectionNode, vari
65353
64993
  }
65354
64994
  function select$T(field, variables, fragments) {
65355
64995
  return (source, reader, parentRecordId) => {
65356
- var _a;
65357
64996
  const sink = {};
65358
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
65359
- const builtSelection = buildSelectionForNode$K(source, reader, field, sel, variables, fragments, parentRecordId);
65360
- if (builtSelection !== undefined) {
65361
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
65362
- Object.keys(builtSelection).forEach((key, value) => {
65363
- // We only assign a field selection in the fragment if it doesn't already exist in sink
65364
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
65365
- if (sink[key] === undefined) {
65366
- sink[key] = builtSelection[key];
65367
- }
65368
- });
65369
- }
65370
- else {
65371
- Object.assign(sink, builtSelection);
65372
- }
65373
- }
65374
- });
65375
- return sink;
64997
+ return selectCalculateSink(sink, field, buildSelectionForNode$K, source, reader, variables, fragments, parentRecordId);
65376
64998
  };
65377
64999
  }
65378
65000
  function getTypeCacheKeys$O(astNode, state) {
@@ -65521,26 +65143,8 @@ function buildSelectionForNode$J(source, reader, parentNode, selectionNode, vari
65521
65143
  }
65522
65144
  function select$S(field, variables, fragments) {
65523
65145
  return (source, reader, parentRecordId) => {
65524
- var _a;
65525
65146
  const sink = {};
65526
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
65527
- const builtSelection = buildSelectionForNode$J(source, reader, field, sel, variables, fragments, parentRecordId);
65528
- if (builtSelection !== undefined) {
65529
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
65530
- Object.keys(builtSelection).forEach((key, value) => {
65531
- // We only assign a field selection in the fragment if it doesn't already exist in sink
65532
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
65533
- if (sink[key] === undefined) {
65534
- sink[key] = builtSelection[key];
65535
- }
65536
- });
65537
- }
65538
- else {
65539
- Object.assign(sink, builtSelection);
65540
- }
65541
- }
65542
- });
65543
- return sink;
65147
+ return selectCalculateSink(sink, field, buildSelectionForNode$J, source, reader, variables, fragments, parentRecordId);
65544
65148
  };
65545
65149
  }
65546
65150
  function getMinimumSelections$x() {
@@ -65565,10 +65169,10 @@ function getTypeCacheKeys$N(astNode, state) {
65565
65169
  representationName: name$I
65566
65170
  });
65567
65171
  // get all cache keys from normalizable fields
65568
- const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$J) : [];
65172
+ const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$J) : new Map();
65569
65173
  for (const fieldDataKey of Object.keys(data)) {
65570
65174
  const fieldData = data[fieldDataKey];
65571
- const requestedField = getRequestedField(fieldDataKey, requestedFields);
65175
+ const requestedField = requestedFields.get(fieldDataKey);
65572
65176
  if (requestedField === undefined) {
65573
65177
  continue; // Skip unknown field.
65574
65178
  }
@@ -65882,26 +65486,8 @@ function buildSelectionForNode$I(source, reader, parentNode, selectionNode, vari
65882
65486
  }
65883
65487
  function select$R(field, variables, fragments) {
65884
65488
  return (source, reader, parentRecordId) => {
65885
- var _a;
65886
65489
  const sink = {};
65887
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
65888
- const builtSelection = buildSelectionForNode$I(source, reader, field, sel, variables, fragments, parentRecordId);
65889
- if (builtSelection !== undefined) {
65890
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
65891
- Object.keys(builtSelection).forEach((key, value) => {
65892
- // We only assign a field selection in the fragment if it doesn't already exist in sink
65893
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
65894
- if (sink[key] === undefined) {
65895
- sink[key] = builtSelection[key];
65896
- }
65897
- });
65898
- }
65899
- else {
65900
- Object.assign(sink, builtSelection);
65901
- }
65902
- }
65903
- });
65904
- return sink;
65490
+ return selectCalculateSink(sink, field, buildSelectionForNode$I, source, reader, variables, fragments, parentRecordId);
65905
65491
  };
65906
65492
  }
65907
65493
  function getTypeCacheKeys$M(astNode, state) {
@@ -66050,26 +65636,8 @@ function buildSelectionForNode$H(source, reader, parentNode, selectionNode, vari
66050
65636
  }
66051
65637
  function select$Q(field, variables, fragments) {
66052
65638
  return (source, reader, parentRecordId) => {
66053
- var _a;
66054
65639
  const sink = {};
66055
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
66056
- const builtSelection = buildSelectionForNode$H(source, reader, field, sel, variables, fragments, parentRecordId);
66057
- if (builtSelection !== undefined) {
66058
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
66059
- Object.keys(builtSelection).forEach((key, value) => {
66060
- // We only assign a field selection in the fragment if it doesn't already exist in sink
66061
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
66062
- if (sink[key] === undefined) {
66063
- sink[key] = builtSelection[key];
66064
- }
66065
- });
66066
- }
66067
- else {
66068
- Object.assign(sink, builtSelection);
66069
- }
66070
- }
66071
- });
66072
- return sink;
65640
+ return selectCalculateSink(sink, field, buildSelectionForNode$H, source, reader, variables, fragments, parentRecordId);
66073
65641
  };
66074
65642
  }
66075
65643
  function getMinimumSelections$w() {
@@ -66094,10 +65662,10 @@ function getTypeCacheKeys$L(astNode, state) {
66094
65662
  representationName: name$G
66095
65663
  });
66096
65664
  // get all cache keys from normalizable fields
66097
- const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$H) : [];
65665
+ const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$H) : new Map();
66098
65666
  for (const fieldDataKey of Object.keys(data)) {
66099
65667
  const fieldData = data[fieldDataKey];
66100
- const requestedField = getRequestedField(fieldDataKey, requestedFields);
65668
+ const requestedField = requestedFields.get(fieldDataKey);
66101
65669
  if (requestedField === undefined) {
66102
65670
  continue; // Skip unknown field.
66103
65671
  }
@@ -66367,26 +65935,8 @@ function buildSelectionForNode$G(source, reader, parentNode, selectionNode, vari
66367
65935
  }
66368
65936
  function select$P(field, variables, fragments) {
66369
65937
  return (source, reader, parentRecordId) => {
66370
- var _a;
66371
65938
  const sink = {};
66372
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
66373
- const builtSelection = buildSelectionForNode$G(source, reader, field, sel, variables, fragments, parentRecordId);
66374
- if (builtSelection !== undefined) {
66375
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
66376
- Object.keys(builtSelection).forEach((key, value) => {
66377
- // We only assign a field selection in the fragment if it doesn't already exist in sink
66378
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
66379
- if (sink[key] === undefined) {
66380
- sink[key] = builtSelection[key];
66381
- }
66382
- });
66383
- }
66384
- else {
66385
- Object.assign(sink, builtSelection);
66386
- }
66387
- }
66388
- });
66389
- return sink;
65939
+ return selectCalculateSink(sink, field, buildSelectionForNode$G, source, reader, variables, fragments, parentRecordId);
66390
65940
  };
66391
65941
  }
66392
65942
  function getTypeCacheKeys$K(astNode, state) {
@@ -66529,26 +66079,8 @@ function buildSelectionForNode$F(source, reader, parentNode, selectionNode, vari
66529
66079
  }
66530
66080
  function select$O(field, variables, fragments) {
66531
66081
  return (source, reader, parentRecordId) => {
66532
- var _a;
66533
66082
  const sink = {};
66534
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
66535
- const builtSelection = buildSelectionForNode$F(source, reader, field, sel, variables, fragments, parentRecordId);
66536
- if (builtSelection !== undefined) {
66537
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
66538
- Object.keys(builtSelection).forEach((key, value) => {
66539
- // We only assign a field selection in the fragment if it doesn't already exist in sink
66540
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
66541
- if (sink[key] === undefined) {
66542
- sink[key] = builtSelection[key];
66543
- }
66544
- });
66545
- }
66546
- else {
66547
- Object.assign(sink, builtSelection);
66548
- }
66549
- }
66550
- });
66551
- return sink;
66083
+ return selectCalculateSink(sink, field, buildSelectionForNode$F, source, reader, variables, fragments, parentRecordId);
66552
66084
  };
66553
66085
  }
66554
66086
  function getTypeCacheKeys$J(astNode, state) {
@@ -66703,26 +66235,8 @@ function buildSelectionForNode$E(source, reader, parentNode, selectionNode, vari
66703
66235
  }
66704
66236
  function select$N(field, variables, fragments) {
66705
66237
  return (source, reader, parentRecordId) => {
66706
- var _a;
66707
66238
  const sink = {};
66708
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
66709
- const builtSelection = buildSelectionForNode$E(source, reader, field, sel, variables, fragments, parentRecordId);
66710
- if (builtSelection !== undefined) {
66711
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
66712
- Object.keys(builtSelection).forEach((key, value) => {
66713
- // We only assign a field selection in the fragment if it doesn't already exist in sink
66714
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
66715
- if (sink[key] === undefined) {
66716
- sink[key] = builtSelection[key];
66717
- }
66718
- });
66719
- }
66720
- else {
66721
- Object.assign(sink, builtSelection);
66722
- }
66723
- }
66724
- });
66725
- return sink;
66239
+ return selectCalculateSink(sink, field, buildSelectionForNode$E, source, reader, variables, fragments, parentRecordId);
66726
66240
  };
66727
66241
  }
66728
66242
  function getMinimumSelections$v() {
@@ -66747,10 +66261,10 @@ function getTypeCacheKeys$I(astNode, state) {
66747
66261
  representationName: name$D
66748
66262
  });
66749
66263
  // get all cache keys from normalizable fields
66750
- const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$E) : [];
66264
+ const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$E) : new Map();
66751
66265
  for (const fieldDataKey of Object.keys(data)) {
66752
66266
  const fieldData = data[fieldDataKey];
66753
- const requestedField = getRequestedField(fieldDataKey, requestedFields);
66267
+ const requestedField = requestedFields.get(fieldDataKey);
66754
66268
  if (requestedField === undefined) {
66755
66269
  continue; // Skip unknown field.
66756
66270
  }
@@ -67045,26 +66559,8 @@ function buildSelectionForNode$D(source, reader, parentNode, selectionNode, vari
67045
66559
  }
67046
66560
  function select$M(field, variables, fragments) {
67047
66561
  return (source, reader, parentRecordId) => {
67048
- var _a;
67049
66562
  const sink = {};
67050
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
67051
- const builtSelection = buildSelectionForNode$D(source, reader, field, sel, variables, fragments, parentRecordId);
67052
- if (builtSelection !== undefined) {
67053
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
67054
- Object.keys(builtSelection).forEach((key, value) => {
67055
- // We only assign a field selection in the fragment if it doesn't already exist in sink
67056
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
67057
- if (sink[key] === undefined) {
67058
- sink[key] = builtSelection[key];
67059
- }
67060
- });
67061
- }
67062
- else {
67063
- Object.assign(sink, builtSelection);
67064
- }
67065
- }
67066
- });
67067
- return sink;
66563
+ return selectCalculateSink(sink, field, buildSelectionForNode$D, source, reader, variables, fragments, parentRecordId);
67068
66564
  };
67069
66565
  }
67070
66566
  function getTypeCacheKeys$H(astNode, state) {
@@ -67355,26 +66851,8 @@ function buildSelectionForNode$C(source, reader, parentNode, selectionNode, vari
67355
66851
  }
67356
66852
  function select$L(field, variables, fragments) {
67357
66853
  return (source, reader, parentRecordId) => {
67358
- var _a;
67359
66854
  const sink = {};
67360
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
67361
- const builtSelection = buildSelectionForNode$C(source, reader, field, sel, variables, fragments, parentRecordId);
67362
- if (builtSelection !== undefined) {
67363
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
67364
- Object.keys(builtSelection).forEach((key, value) => {
67365
- // We only assign a field selection in the fragment if it doesn't already exist in sink
67366
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
67367
- if (sink[key] === undefined) {
67368
- sink[key] = builtSelection[key];
67369
- }
67370
- });
67371
- }
67372
- else {
67373
- Object.assign(sink, builtSelection);
67374
- }
67375
- }
67376
- });
67377
- return sink;
66855
+ return selectCalculateSink(sink, field, buildSelectionForNode$C, source, reader, variables, fragments, parentRecordId);
67378
66856
  };
67379
66857
  }
67380
66858
  function getTypeCacheKeys$G(astNode, state) {
@@ -67523,26 +67001,8 @@ function buildSelectionForNode$B(source, reader, parentNode, selectionNode, vari
67523
67001
  }
67524
67002
  function select$K(field, variables, fragments) {
67525
67003
  return (source, reader, parentRecordId) => {
67526
- var _a;
67527
67004
  const sink = {};
67528
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
67529
- const builtSelection = buildSelectionForNode$B(source, reader, field, sel, variables, fragments, parentRecordId);
67530
- if (builtSelection !== undefined) {
67531
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
67532
- Object.keys(builtSelection).forEach((key, value) => {
67533
- // We only assign a field selection in the fragment if it doesn't already exist in sink
67534
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
67535
- if (sink[key] === undefined) {
67536
- sink[key] = builtSelection[key];
67537
- }
67538
- });
67539
- }
67540
- else {
67541
- Object.assign(sink, builtSelection);
67542
- }
67543
- }
67544
- });
67545
- return sink;
67005
+ return selectCalculateSink(sink, field, buildSelectionForNode$B, source, reader, variables, fragments, parentRecordId);
67546
67006
  };
67547
67007
  }
67548
67008
  function getMinimumSelections$t() {
@@ -67567,10 +67027,10 @@ function getTypeCacheKeys$F(astNode, state) {
67567
67027
  representationName: name$A
67568
67028
  });
67569
67029
  // get all cache keys from normalizable fields
67570
- const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$B) : [];
67030
+ const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$B) : new Map();
67571
67031
  for (const fieldDataKey of Object.keys(data)) {
67572
67032
  const fieldData = data[fieldDataKey];
67573
- const requestedField = getRequestedField(fieldDataKey, requestedFields);
67033
+ const requestedField = requestedFields.get(fieldDataKey);
67574
67034
  if (requestedField === undefined) {
67575
67035
  continue; // Skip unknown field.
67576
67036
  }
@@ -67840,26 +67300,8 @@ function buildSelectionForNode$A(source, reader, parentNode, selectionNode, vari
67840
67300
  }
67841
67301
  function select$J(field, variables, fragments) {
67842
67302
  return (source, reader, parentRecordId) => {
67843
- var _a;
67844
67303
  const sink = {};
67845
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
67846
- const builtSelection = buildSelectionForNode$A(source, reader, field, sel, variables, fragments, parentRecordId);
67847
- if (builtSelection !== undefined) {
67848
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
67849
- Object.keys(builtSelection).forEach((key, value) => {
67850
- // We only assign a field selection in the fragment if it doesn't already exist in sink
67851
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
67852
- if (sink[key] === undefined) {
67853
- sink[key] = builtSelection[key];
67854
- }
67855
- });
67856
- }
67857
- else {
67858
- Object.assign(sink, builtSelection);
67859
- }
67860
- }
67861
- });
67862
- return sink;
67304
+ return selectCalculateSink(sink, field, buildSelectionForNode$A, source, reader, variables, fragments, parentRecordId);
67863
67305
  };
67864
67306
  }
67865
67307
  function getTypeCacheKeys$E(astNode, state) {
@@ -67996,26 +67438,8 @@ function buildSelectionForNode$z(source, reader, parentNode, selectionNode, vari
67996
67438
  }
67997
67439
  function select$I(field, variables, fragments) {
67998
67440
  return (source, reader, parentRecordId) => {
67999
- var _a;
68000
67441
  const sink = {};
68001
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
68002
- const builtSelection = buildSelectionForNode$z(source, reader, field, sel, variables, fragments, parentRecordId);
68003
- if (builtSelection !== undefined) {
68004
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
68005
- Object.keys(builtSelection).forEach((key, value) => {
68006
- // We only assign a field selection in the fragment if it doesn't already exist in sink
68007
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
68008
- if (sink[key] === undefined) {
68009
- sink[key] = builtSelection[key];
68010
- }
68011
- });
68012
- }
68013
- else {
68014
- Object.assign(sink, builtSelection);
68015
- }
68016
- }
68017
- });
68018
- return sink;
67442
+ return selectCalculateSink(sink, field, buildSelectionForNode$z, source, reader, variables, fragments, parentRecordId);
68019
67443
  };
68020
67444
  }
68021
67445
  function getTypeCacheKeys$D(astNode, state) {
@@ -68162,26 +67586,8 @@ function buildSelectionForNode$y(source, reader, parentNode, selectionNode, vari
68162
67586
  }
68163
67587
  function select$H(field, variables, fragments) {
68164
67588
  return (source, reader, parentRecordId) => {
68165
- var _a;
68166
67589
  const sink = {};
68167
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
68168
- const builtSelection = buildSelectionForNode$y(source, reader, field, sel, variables, fragments, parentRecordId);
68169
- if (builtSelection !== undefined) {
68170
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
68171
- Object.keys(builtSelection).forEach((key, value) => {
68172
- // We only assign a field selection in the fragment if it doesn't already exist in sink
68173
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
68174
- if (sink[key] === undefined) {
68175
- sink[key] = builtSelection[key];
68176
- }
68177
- });
68178
- }
68179
- else {
68180
- Object.assign(sink, builtSelection);
68181
- }
68182
- }
68183
- });
68184
- return sink;
67590
+ return selectCalculateSink(sink, field, buildSelectionForNode$y, source, reader, variables, fragments, parentRecordId);
68185
67591
  };
68186
67592
  }
68187
67593
  function getMinimumSelections$s() {
@@ -68206,10 +67612,10 @@ function getTypeCacheKeys$C(astNode, state) {
68206
67612
  representationName: name$x
68207
67613
  });
68208
67614
  // get all cache keys from normalizable fields
68209
- const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$y) : [];
67615
+ const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$y) : new Map();
68210
67616
  for (const fieldDataKey of Object.keys(data)) {
68211
67617
  const fieldData = data[fieldDataKey];
68212
- const requestedField = getRequestedField(fieldDataKey, requestedFields);
67618
+ const requestedField = requestedFields.get(fieldDataKey);
68213
67619
  if (requestedField === undefined) {
68214
67620
  continue; // Skip unknown field.
68215
67621
  }
@@ -68383,26 +67789,8 @@ function buildSelectionForNode$x(source, reader, parentNode, selectionNode, vari
68383
67789
  }
68384
67790
  function select$G(field, variables, fragments) {
68385
67791
  return (source, reader, parentRecordId) => {
68386
- var _a;
68387
67792
  const sink = {};
68388
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
68389
- const builtSelection = buildSelectionForNode$x(source, reader, field, sel, variables, fragments, parentRecordId);
68390
- if (builtSelection !== undefined) {
68391
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
68392
- Object.keys(builtSelection).forEach((key, value) => {
68393
- // We only assign a field selection in the fragment if it doesn't already exist in sink
68394
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
68395
- if (sink[key] === undefined) {
68396
- sink[key] = builtSelection[key];
68397
- }
68398
- });
68399
- }
68400
- else {
68401
- Object.assign(sink, builtSelection);
68402
- }
68403
- }
68404
- });
68405
- return sink;
67793
+ return selectCalculateSink(sink, field, buildSelectionForNode$x, source, reader, variables, fragments, parentRecordId);
68406
67794
  };
68407
67795
  }
68408
67796
  function getTypeCacheKeys$B(astNode, state) {
@@ -68551,26 +67939,8 @@ function buildSelectionForNode$w(source, reader, parentNode, selectionNode, vari
68551
67939
  }
68552
67940
  function select$F(field, variables, fragments) {
68553
67941
  return (source, reader, parentRecordId) => {
68554
- var _a;
68555
67942
  const sink = {};
68556
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
68557
- const builtSelection = buildSelectionForNode$w(source, reader, field, sel, variables, fragments, parentRecordId);
68558
- if (builtSelection !== undefined) {
68559
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
68560
- Object.keys(builtSelection).forEach((key, value) => {
68561
- // We only assign a field selection in the fragment if it doesn't already exist in sink
68562
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
68563
- if (sink[key] === undefined) {
68564
- sink[key] = builtSelection[key];
68565
- }
68566
- });
68567
- }
68568
- else {
68569
- Object.assign(sink, builtSelection);
68570
- }
68571
- }
68572
- });
68573
- return sink;
67943
+ return selectCalculateSink(sink, field, buildSelectionForNode$w, source, reader, variables, fragments, parentRecordId);
68574
67944
  };
68575
67945
  }
68576
67946
  function getMinimumSelections$r() {
@@ -68595,10 +67965,10 @@ function getTypeCacheKeys$A(astNode, state) {
68595
67965
  representationName: name$v
68596
67966
  });
68597
67967
  // get all cache keys from normalizable fields
68598
- const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$w) : [];
67968
+ const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$w) : new Map();
68599
67969
  for (const fieldDataKey of Object.keys(data)) {
68600
67970
  const fieldData = data[fieldDataKey];
68601
- const requestedField = getRequestedField(fieldDataKey, requestedFields);
67971
+ const requestedField = requestedFields.get(fieldDataKey);
68602
67972
  if (requestedField === undefined) {
68603
67973
  continue; // Skip unknown field.
68604
67974
  }
@@ -68887,26 +68257,8 @@ function buildSelectionForNode$v(source, reader, parentNode, selectionNode, vari
68887
68257
  }
68888
68258
  function select$E(field, variables, fragments) {
68889
68259
  return (source, reader, parentRecordId) => {
68890
- var _a;
68891
68260
  const sink = {};
68892
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
68893
- const builtSelection = buildSelectionForNode$v(source, reader, field, sel, variables, fragments, parentRecordId);
68894
- if (builtSelection !== undefined) {
68895
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
68896
- Object.keys(builtSelection).forEach((key, value) => {
68897
- // We only assign a field selection in the fragment if it doesn't already exist in sink
68898
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
68899
- if (sink[key] === undefined) {
68900
- sink[key] = builtSelection[key];
68901
- }
68902
- });
68903
- }
68904
- else {
68905
- Object.assign(sink, builtSelection);
68906
- }
68907
- }
68908
- });
68909
- return sink;
68261
+ return selectCalculateSink(sink, field, buildSelectionForNode$v, source, reader, variables, fragments, parentRecordId);
68910
68262
  };
68911
68263
  }
68912
68264
  function getTypeCacheKeys$z(astNode, state) {
@@ -69055,26 +68407,8 @@ function buildSelectionForNode$u(source, reader, parentNode, selectionNode, vari
69055
68407
  }
69056
68408
  function select$D(field, variables, fragments) {
69057
68409
  return (source, reader, parentRecordId) => {
69058
- var _a;
69059
68410
  const sink = {};
69060
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
69061
- const builtSelection = buildSelectionForNode$u(source, reader, field, sel, variables, fragments, parentRecordId);
69062
- if (builtSelection !== undefined) {
69063
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
69064
- Object.keys(builtSelection).forEach((key, value) => {
69065
- // We only assign a field selection in the fragment if it doesn't already exist in sink
69066
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
69067
- if (sink[key] === undefined) {
69068
- sink[key] = builtSelection[key];
69069
- }
69070
- });
69071
- }
69072
- else {
69073
- Object.assign(sink, builtSelection);
69074
- }
69075
- }
69076
- });
69077
- return sink;
68411
+ return selectCalculateSink(sink, field, buildSelectionForNode$u, source, reader, variables, fragments, parentRecordId);
69078
68412
  };
69079
68413
  }
69080
68414
  function getMinimumSelections$q() {
@@ -69099,10 +68433,10 @@ function getTypeCacheKeys$y(astNode, state) {
69099
68433
  representationName: name$t
69100
68434
  });
69101
68435
  // get all cache keys from normalizable fields
69102
- const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$u) : [];
68436
+ const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$u) : new Map();
69103
68437
  for (const fieldDataKey of Object.keys(data)) {
69104
68438
  const fieldData = data[fieldDataKey];
69105
- const requestedField = getRequestedField(fieldDataKey, requestedFields);
68439
+ const requestedField = requestedFields.get(fieldDataKey);
69106
68440
  if (requestedField === undefined) {
69107
68441
  continue; // Skip unknown field.
69108
68442
  }
@@ -69399,26 +68733,8 @@ function buildSelectionForNode$t(source, reader, parentNode, selectionNode, vari
69399
68733
  }
69400
68734
  function select$C(field, variables, fragments) {
69401
68735
  return (source, reader, parentRecordId) => {
69402
- var _a;
69403
68736
  const sink = {};
69404
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
69405
- const builtSelection = buildSelectionForNode$t(source, reader, field, sel, variables, fragments, parentRecordId);
69406
- if (builtSelection !== undefined) {
69407
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
69408
- Object.keys(builtSelection).forEach((key, value) => {
69409
- // We only assign a field selection in the fragment if it doesn't already exist in sink
69410
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
69411
- if (sink[key] === undefined) {
69412
- sink[key] = builtSelection[key];
69413
- }
69414
- });
69415
- }
69416
- else {
69417
- Object.assign(sink, builtSelection);
69418
- }
69419
- }
69420
- });
69421
- return sink;
68737
+ return selectCalculateSink(sink, field, buildSelectionForNode$t, source, reader, variables, fragments, parentRecordId);
69422
68738
  };
69423
68739
  }
69424
68740
  function getMinimumSelections$p() {
@@ -69443,10 +68759,10 @@ function getTypeCacheKeys$x(astNode, state) {
69443
68759
  representationName: name$s
69444
68760
  });
69445
68761
  // get all cache keys from normalizable fields
69446
- const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$t) : [];
68762
+ const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$t) : new Map();
69447
68763
  for (const fieldDataKey of Object.keys(data)) {
69448
68764
  const fieldData = data[fieldDataKey];
69449
- const requestedField = getRequestedField(fieldDataKey, requestedFields);
68765
+ const requestedField = requestedFields.get(fieldDataKey);
69450
68766
  if (requestedField === undefined) {
69451
68767
  continue; // Skip unknown field.
69452
68768
  }
@@ -69728,26 +69044,8 @@ function buildSelectionForNode$s(source, reader, parentNode, selectionNode, vari
69728
69044
  }
69729
69045
  function select$B(field, variables, fragments) {
69730
69046
  return (source, reader, parentRecordId) => {
69731
- var _a;
69732
69047
  const sink = {};
69733
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
69734
- const builtSelection = buildSelectionForNode$s(source, reader, field, sel, variables, fragments, parentRecordId);
69735
- if (builtSelection !== undefined) {
69736
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
69737
- Object.keys(builtSelection).forEach((key, value) => {
69738
- // We only assign a field selection in the fragment if it doesn't already exist in sink
69739
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
69740
- if (sink[key] === undefined) {
69741
- sink[key] = builtSelection[key];
69742
- }
69743
- });
69744
- }
69745
- else {
69746
- Object.assign(sink, builtSelection);
69747
- }
69748
- }
69749
- });
69750
- return sink;
69048
+ return selectCalculateSink(sink, field, buildSelectionForNode$s, source, reader, variables, fragments, parentRecordId);
69751
69049
  };
69752
69050
  }
69753
69051
  function getTypeCacheKeys$w(astNode, state) {
@@ -69896,26 +69194,8 @@ function buildSelectionForNode$r(source, reader, parentNode, selectionNode, vari
69896
69194
  }
69897
69195
  function select$A(field, variables, fragments) {
69898
69196
  return (source, reader, parentRecordId) => {
69899
- var _a;
69900
69197
  const sink = {};
69901
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
69902
- const builtSelection = buildSelectionForNode$r(source, reader, field, sel, variables, fragments, parentRecordId);
69903
- if (builtSelection !== undefined) {
69904
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
69905
- Object.keys(builtSelection).forEach((key, value) => {
69906
- // We only assign a field selection in the fragment if it doesn't already exist in sink
69907
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
69908
- if (sink[key] === undefined) {
69909
- sink[key] = builtSelection[key];
69910
- }
69911
- });
69912
- }
69913
- else {
69914
- Object.assign(sink, builtSelection);
69915
- }
69916
- }
69917
- });
69918
- return sink;
69198
+ return selectCalculateSink(sink, field, buildSelectionForNode$r, source, reader, variables, fragments, parentRecordId);
69919
69199
  };
69920
69200
  }
69921
69201
  function getMinimumSelections$o() {
@@ -69940,10 +69220,10 @@ function getTypeCacheKeys$v(astNode, state) {
69940
69220
  representationName: name$q
69941
69221
  });
69942
69222
  // get all cache keys from normalizable fields
69943
- const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$r) : [];
69223
+ const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$r) : new Map();
69944
69224
  for (const fieldDataKey of Object.keys(data)) {
69945
69225
  const fieldData = data[fieldDataKey];
69946
- const requestedField = getRequestedField(fieldDataKey, requestedFields);
69226
+ const requestedField = requestedFields.get(fieldDataKey);
69947
69227
  if (requestedField === undefined) {
69948
69228
  continue; // Skip unknown field.
69949
69229
  }
@@ -70225,26 +69505,8 @@ function buildSelectionForNode$q(source, reader, parentNode, selectionNode, vari
70225
69505
  }
70226
69506
  function select$z(field, variables, fragments) {
70227
69507
  return (source, reader, parentRecordId) => {
70228
- var _a;
70229
69508
  const sink = {};
70230
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
70231
- const builtSelection = buildSelectionForNode$q(source, reader, field, sel, variables, fragments, parentRecordId);
70232
- if (builtSelection !== undefined) {
70233
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
70234
- Object.keys(builtSelection).forEach((key, value) => {
70235
- // We only assign a field selection in the fragment if it doesn't already exist in sink
70236
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
70237
- if (sink[key] === undefined) {
70238
- sink[key] = builtSelection[key];
70239
- }
70240
- });
70241
- }
70242
- else {
70243
- Object.assign(sink, builtSelection);
70244
- }
70245
- }
70246
- });
70247
- return sink;
69509
+ return selectCalculateSink(sink, field, buildSelectionForNode$q, source, reader, variables, fragments, parentRecordId);
70248
69510
  };
70249
69511
  }
70250
69512
  function getMinimumSelections$n() {
@@ -70269,10 +69531,10 @@ function getTypeCacheKeys$u(astNode, state) {
70269
69531
  representationName: name$p
70270
69532
  });
70271
69533
  // get all cache keys from normalizable fields
70272
- const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$q) : [];
69534
+ const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$q) : new Map();
70273
69535
  for (const fieldDataKey of Object.keys(data)) {
70274
69536
  const fieldData = data[fieldDataKey];
70275
- const requestedField = getRequestedField(fieldDataKey, requestedFields);
69537
+ const requestedField = requestedFields.get(fieldDataKey);
70276
69538
  if (requestedField === undefined) {
70277
69539
  continue; // Skip unknown field.
70278
69540
  }
@@ -70554,26 +69816,8 @@ function buildSelectionForNode$p(source, reader, parentNode, selectionNode, vari
70554
69816
  }
70555
69817
  function select$y(field, variables, fragments) {
70556
69818
  return (source, reader, parentRecordId) => {
70557
- var _a;
70558
69819
  const sink = {};
70559
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
70560
- const builtSelection = buildSelectionForNode$p(source, reader, field, sel, variables, fragments, parentRecordId);
70561
- if (builtSelection !== undefined) {
70562
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
70563
- Object.keys(builtSelection).forEach((key, value) => {
70564
- // We only assign a field selection in the fragment if it doesn't already exist in sink
70565
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
70566
- if (sink[key] === undefined) {
70567
- sink[key] = builtSelection[key];
70568
- }
70569
- });
70570
- }
70571
- else {
70572
- Object.assign(sink, builtSelection);
70573
- }
70574
- }
70575
- });
70576
- return sink;
69820
+ return selectCalculateSink(sink, field, buildSelectionForNode$p, source, reader, variables, fragments, parentRecordId);
70577
69821
  };
70578
69822
  }
70579
69823
  function getMinimumSelections$m() {
@@ -70598,10 +69842,10 @@ function getTypeCacheKeys$t(astNode, state) {
70598
69842
  representationName: name$o
70599
69843
  });
70600
69844
  // get all cache keys from normalizable fields
70601
- const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$p) : [];
69845
+ const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$p) : new Map();
70602
69846
  for (const fieldDataKey of Object.keys(data)) {
70603
69847
  const fieldData = data[fieldDataKey];
70604
- const requestedField = getRequestedField(fieldDataKey, requestedFields);
69848
+ const requestedField = requestedFields.get(fieldDataKey);
70605
69849
  if (requestedField === undefined) {
70606
69850
  continue; // Skip unknown field.
70607
69851
  }
@@ -70871,26 +70115,8 @@ function buildSelectionForNode$o(source, reader, parentNode, selectionNode, vari
70871
70115
  }
70872
70116
  function select$x(field, variables, fragments) {
70873
70117
  return (source, reader, parentRecordId) => {
70874
- var _a;
70875
70118
  const sink = {};
70876
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
70877
- const builtSelection = buildSelectionForNode$o(source, reader, field, sel, variables, fragments, parentRecordId);
70878
- if (builtSelection !== undefined) {
70879
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
70880
- Object.keys(builtSelection).forEach((key, value) => {
70881
- // We only assign a field selection in the fragment if it doesn't already exist in sink
70882
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
70883
- if (sink[key] === undefined) {
70884
- sink[key] = builtSelection[key];
70885
- }
70886
- });
70887
- }
70888
- else {
70889
- Object.assign(sink, builtSelection);
70890
- }
70891
- }
70892
- });
70893
- return sink;
70119
+ return selectCalculateSink(sink, field, buildSelectionForNode$o, source, reader, variables, fragments, parentRecordId);
70894
70120
  };
70895
70121
  }
70896
70122
  function getTypeCacheKeys$s(astNode, state) {
@@ -71045,26 +70271,8 @@ function buildSelectionForNode$n(source, reader, parentNode, selectionNode, vari
71045
70271
  }
71046
70272
  function select$w(field, variables, fragments) {
71047
70273
  return (source, reader, parentRecordId) => {
71048
- var _a;
71049
70274
  const sink = {};
71050
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
71051
- const builtSelection = buildSelectionForNode$n(source, reader, field, sel, variables, fragments, parentRecordId);
71052
- if (builtSelection !== undefined) {
71053
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
71054
- Object.keys(builtSelection).forEach((key, value) => {
71055
- // We only assign a field selection in the fragment if it doesn't already exist in sink
71056
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
71057
- if (sink[key] === undefined) {
71058
- sink[key] = builtSelection[key];
71059
- }
71060
- });
71061
- }
71062
- else {
71063
- Object.assign(sink, builtSelection);
71064
- }
71065
- }
71066
- });
71067
- return sink;
70275
+ return selectCalculateSink(sink, field, buildSelectionForNode$n, source, reader, variables, fragments, parentRecordId);
71068
70276
  };
71069
70277
  }
71070
70278
  function getMinimumSelections$l() {
@@ -71089,10 +70297,10 @@ function getTypeCacheKeys$r(astNode, state) {
71089
70297
  representationName: name$m
71090
70298
  });
71091
70299
  // get all cache keys from normalizable fields
71092
- const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$n) : [];
70300
+ const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$n) : new Map();
71093
70301
  for (const fieldDataKey of Object.keys(data)) {
71094
70302
  const fieldData = data[fieldDataKey];
71095
- const requestedField = getRequestedField(fieldDataKey, requestedFields);
70303
+ const requestedField = requestedFields.get(fieldDataKey);
71096
70304
  if (requestedField === undefined) {
71097
70305
  continue; // Skip unknown field.
71098
70306
  }
@@ -71380,26 +70588,8 @@ function buildSelectionForNode$m(source, reader, parentNode, selectionNode, vari
71380
70588
  }
71381
70589
  function select$v(field, variables, fragments) {
71382
70590
  return (source, reader, parentRecordId) => {
71383
- var _a;
71384
70591
  const sink = {};
71385
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
71386
- const builtSelection = buildSelectionForNode$m(source, reader, field, sel, variables, fragments, parentRecordId);
71387
- if (builtSelection !== undefined) {
71388
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
71389
- Object.keys(builtSelection).forEach((key, value) => {
71390
- // We only assign a field selection in the fragment if it doesn't already exist in sink
71391
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
71392
- if (sink[key] === undefined) {
71393
- sink[key] = builtSelection[key];
71394
- }
71395
- });
71396
- }
71397
- else {
71398
- Object.assign(sink, builtSelection);
71399
- }
71400
- }
71401
- });
71402
- return sink;
70592
+ return selectCalculateSink(sink, field, buildSelectionForNode$m, source, reader, variables, fragments, parentRecordId);
71403
70593
  };
71404
70594
  }
71405
70595
  function getMinimumSelections$k() {
@@ -71424,10 +70614,10 @@ function getTypeCacheKeys$q(astNode, state) {
71424
70614
  representationName: name$l
71425
70615
  });
71426
70616
  // get all cache keys from normalizable fields
71427
- const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$m) : [];
70617
+ const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$m) : new Map();
71428
70618
  for (const fieldDataKey of Object.keys(data)) {
71429
70619
  const fieldData = data[fieldDataKey];
71430
- const requestedField = getRequestedField(fieldDataKey, requestedFields);
70620
+ const requestedField = requestedFields.get(fieldDataKey);
71431
70621
  if (requestedField === undefined) {
71432
70622
  continue; // Skip unknown field.
71433
70623
  }
@@ -71741,26 +70931,8 @@ function buildSelectionForNode$l(source, reader, parentNode, selectionNode, vari
71741
70931
  }
71742
70932
  function select$u(field, variables, fragments) {
71743
70933
  return (source, reader, parentRecordId) => {
71744
- var _a;
71745
70934
  const sink = {};
71746
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
71747
- const builtSelection = buildSelectionForNode$l(source, reader, field, sel, variables, fragments, parentRecordId);
71748
- if (builtSelection !== undefined) {
71749
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
71750
- Object.keys(builtSelection).forEach((key, value) => {
71751
- // We only assign a field selection in the fragment if it doesn't already exist in sink
71752
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
71753
- if (sink[key] === undefined) {
71754
- sink[key] = builtSelection[key];
71755
- }
71756
- });
71757
- }
71758
- else {
71759
- Object.assign(sink, builtSelection);
71760
- }
71761
- }
71762
- });
71763
- return sink;
70935
+ return selectCalculateSink(sink, field, buildSelectionForNode$l, source, reader, variables, fragments, parentRecordId);
71764
70936
  };
71765
70937
  }
71766
70938
  function getTypeCacheKeys$p(astNode, state) {
@@ -71901,26 +71073,8 @@ function buildSelectionForNode$k(source, reader, parentNode, selectionNode, vari
71901
71073
  }
71902
71074
  function select$t(field, variables, fragments) {
71903
71075
  return (source, reader, parentRecordId) => {
71904
- var _a;
71905
71076
  const sink = {};
71906
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
71907
- const builtSelection = buildSelectionForNode$k(source, reader, field, sel, variables, fragments, parentRecordId);
71908
- if (builtSelection !== undefined) {
71909
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
71910
- Object.keys(builtSelection).forEach((key, value) => {
71911
- // We only assign a field selection in the fragment if it doesn't already exist in sink
71912
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
71913
- if (sink[key] === undefined) {
71914
- sink[key] = builtSelection[key];
71915
- }
71916
- });
71917
- }
71918
- else {
71919
- Object.assign(sink, builtSelection);
71920
- }
71921
- }
71922
- });
71923
- return sink;
71077
+ return selectCalculateSink(sink, field, buildSelectionForNode$k, source, reader, variables, fragments, parentRecordId);
71924
71078
  };
71925
71079
  }
71926
71080
  function getMinimumSelections$j() {
@@ -71945,10 +71099,10 @@ function getTypeCacheKeys$o(astNode, state) {
71945
71099
  representationName: name$j
71946
71100
  });
71947
71101
  // get all cache keys from normalizable fields
71948
- const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$k) : [];
71102
+ const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$k) : new Map();
71949
71103
  for (const fieldDataKey of Object.keys(data)) {
71950
71104
  const fieldData = data[fieldDataKey];
71951
- const requestedField = getRequestedField(fieldDataKey, requestedFields);
71105
+ const requestedField = requestedFields.get(fieldDataKey);
71952
71106
  if (requestedField === undefined) {
71953
71107
  continue; // Skip unknown field.
71954
71108
  }
@@ -72116,26 +71270,8 @@ function buildSelectionForNode$j(source, reader, parentNode, selectionNode, vari
72116
71270
  }
72117
71271
  function select$s(field, variables, fragments) {
72118
71272
  return (source, reader, parentRecordId) => {
72119
- var _a;
72120
71273
  const sink = {};
72121
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
72122
- const builtSelection = buildSelectionForNode$j(source, reader, field, sel, variables, fragments, parentRecordId);
72123
- if (builtSelection !== undefined) {
72124
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
72125
- Object.keys(builtSelection).forEach((key, value) => {
72126
- // We only assign a field selection in the fragment if it doesn't already exist in sink
72127
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
72128
- if (sink[key] === undefined) {
72129
- sink[key] = builtSelection[key];
72130
- }
72131
- });
72132
- }
72133
- else {
72134
- Object.assign(sink, builtSelection);
72135
- }
72136
- }
72137
- });
72138
- return sink;
71274
+ return selectCalculateSink(sink, field, buildSelectionForNode$j, source, reader, variables, fragments, parentRecordId);
72139
71275
  };
72140
71276
  }
72141
71277
  function getTypeCacheKeys$n(astNode, state) {
@@ -72272,26 +71408,8 @@ function buildSelectionForNode$i(source, reader, parentNode, selectionNode, vari
72272
71408
  }
72273
71409
  function select$r(field, variables, fragments) {
72274
71410
  return (source, reader, parentRecordId) => {
72275
- var _a;
72276
71411
  const sink = {};
72277
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
72278
- const builtSelection = buildSelectionForNode$i(source, reader, field, sel, variables, fragments, parentRecordId);
72279
- if (builtSelection !== undefined) {
72280
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
72281
- Object.keys(builtSelection).forEach((key, value) => {
72282
- // We only assign a field selection in the fragment if it doesn't already exist in sink
72283
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
72284
- if (sink[key] === undefined) {
72285
- sink[key] = builtSelection[key];
72286
- }
72287
- });
72288
- }
72289
- else {
72290
- Object.assign(sink, builtSelection);
72291
- }
72292
- }
72293
- });
72294
- return sink;
71412
+ return selectCalculateSink(sink, field, buildSelectionForNode$i, source, reader, variables, fragments, parentRecordId);
72295
71413
  };
72296
71414
  }
72297
71415
  function getTypeCacheKeys$m(astNode, state) {
@@ -72462,26 +71580,8 @@ function buildSelectionForNode$h(source, reader, parentNode, selectionNode, vari
72462
71580
  }
72463
71581
  function select$q(field, variables, fragments) {
72464
71582
  return (source, reader, parentRecordId) => {
72465
- var _a;
72466
71583
  const sink = {};
72467
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
72468
- const builtSelection = buildSelectionForNode$h(source, reader, field, sel, variables, fragments, parentRecordId);
72469
- if (builtSelection !== undefined) {
72470
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
72471
- Object.keys(builtSelection).forEach((key, value) => {
72472
- // We only assign a field selection in the fragment if it doesn't already exist in sink
72473
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
72474
- if (sink[key] === undefined) {
72475
- sink[key] = builtSelection[key];
72476
- }
72477
- });
72478
- }
72479
- else {
72480
- Object.assign(sink, builtSelection);
72481
- }
72482
- }
72483
- });
72484
- return sink;
71584
+ return selectCalculateSink(sink, field, buildSelectionForNode$h, source, reader, variables, fragments, parentRecordId);
72485
71585
  };
72486
71586
  }
72487
71587
  function getMinimumSelections$h() {
@@ -72642,26 +71742,8 @@ function buildSelectionForNode$g(source, reader, parentNode, selectionNode, vari
72642
71742
  }
72643
71743
  function select$p(field, variables, fragments) {
72644
71744
  return (source, reader, parentRecordId) => {
72645
- var _a;
72646
71745
  const sink = {};
72647
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
72648
- const builtSelection = buildSelectionForNode$g(source, reader, field, sel, variables, fragments, parentRecordId);
72649
- if (builtSelection !== undefined) {
72650
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
72651
- Object.keys(builtSelection).forEach((key, value) => {
72652
- // We only assign a field selection in the fragment if it doesn't already exist in sink
72653
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
72654
- if (sink[key] === undefined) {
72655
- sink[key] = builtSelection[key];
72656
- }
72657
- });
72658
- }
72659
- else {
72660
- Object.assign(sink, builtSelection);
72661
- }
72662
- }
72663
- });
72664
- return sink;
71746
+ return selectCalculateSink(sink, field, buildSelectionForNode$g, source, reader, variables, fragments, parentRecordId);
72665
71747
  };
72666
71748
  }
72667
71749
  function getMinimumSelections$g() {
@@ -72814,26 +71896,8 @@ function buildSelectionForNode$f(source, reader, parentNode, selectionNode, vari
72814
71896
  }
72815
71897
  function select$o(field, variables, fragments) {
72816
71898
  return (source, reader, parentRecordId) => {
72817
- var _a;
72818
71899
  const sink = {};
72819
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
72820
- const builtSelection = buildSelectionForNode$f(source, reader, field, sel, variables, fragments, parentRecordId);
72821
- if (builtSelection !== undefined) {
72822
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
72823
- Object.keys(builtSelection).forEach((key, value) => {
72824
- // We only assign a field selection in the fragment if it doesn't already exist in sink
72825
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
72826
- if (sink[key] === undefined) {
72827
- sink[key] = builtSelection[key];
72828
- }
72829
- });
72830
- }
72831
- else {
72832
- Object.assign(sink, builtSelection);
72833
- }
72834
- }
72835
- });
72836
- return sink;
71900
+ return selectCalculateSink(sink, field, buildSelectionForNode$f, source, reader, variables, fragments, parentRecordId);
72837
71901
  };
72838
71902
  }
72839
71903
  function getMinimumSelections$f() {
@@ -72858,10 +71922,10 @@ function getTypeCacheKeys$j(astNode, state) {
72858
71922
  representationName: name$e
72859
71923
  });
72860
71924
  // get all cache keys from normalizable fields
72861
- const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$f) : [];
71925
+ const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$f) : new Map();
72862
71926
  for (const fieldDataKey of Object.keys(data)) {
72863
71927
  const fieldData = data[fieldDataKey];
72864
- const requestedField = getRequestedField(fieldDataKey, requestedFields);
71928
+ const requestedField = requestedFields.get(fieldDataKey);
72865
71929
  if (requestedField === undefined) {
72866
71930
  continue; // Skip unknown field.
72867
71931
  }
@@ -73346,26 +72410,8 @@ function buildSelectionForNode$e(source, reader, parentNode, selectionNode, vari
73346
72410
  }
73347
72411
  function select$m(field, variables, fragments) {
73348
72412
  return (source, reader, parentRecordId) => {
73349
- var _a;
73350
72413
  const sink = {};
73351
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
73352
- const builtSelection = buildSelectionForNode$e(source, reader, field, sel, variables, fragments, parentRecordId);
73353
- if (builtSelection !== undefined) {
73354
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
73355
- Object.keys(builtSelection).forEach((key, value) => {
73356
- // We only assign a field selection in the fragment if it doesn't already exist in sink
73357
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
73358
- if (sink[key] === undefined) {
73359
- sink[key] = builtSelection[key];
73360
- }
73361
- });
73362
- }
73363
- else {
73364
- Object.assign(sink, builtSelection);
73365
- }
73366
- }
73367
- });
73368
- return sink;
72414
+ return selectCalculateSink(sink, field, buildSelectionForNode$e, source, reader, variables, fragments, parentRecordId);
73369
72415
  };
73370
72416
  }
73371
72417
  function getMinimumSelections$d() {
@@ -73390,10 +72436,10 @@ function getTypeCacheKeys$h(astNode, state) {
73390
72436
  representationName: name$d
73391
72437
  });
73392
72438
  // get all cache keys from normalizable fields
73393
- const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$e) : [];
72439
+ const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$e) : new Map();
73394
72440
  for (const fieldDataKey of Object.keys(data)) {
73395
72441
  const fieldData = data[fieldDataKey];
73396
- const requestedField = getRequestedField(fieldDataKey, requestedFields);
72442
+ const requestedField = requestedFields.get(fieldDataKey);
73397
72443
  if (requestedField === undefined) {
73398
72444
  continue; // Skip unknown field.
73399
72445
  }
@@ -73942,26 +72988,8 @@ function buildSelectionForNode$d(source, reader, parentNode, selectionNode, vari
73942
72988
  }
73943
72989
  function select$l(field, variables, fragments) {
73944
72990
  return (source, reader, parentRecordId) => {
73945
- var _a;
73946
72991
  const sink = {};
73947
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
73948
- const builtSelection = buildSelectionForNode$d(source, reader, field, sel, variables, fragments, parentRecordId);
73949
- if (builtSelection !== undefined) {
73950
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
73951
- Object.keys(builtSelection).forEach((key, value) => {
73952
- // We only assign a field selection in the fragment if it doesn't already exist in sink
73953
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
73954
- if (sink[key] === undefined) {
73955
- sink[key] = builtSelection[key];
73956
- }
73957
- });
73958
- }
73959
- else {
73960
- Object.assign(sink, builtSelection);
73961
- }
73962
- }
73963
- });
73964
- return sink;
72992
+ return selectCalculateSink(sink, field, buildSelectionForNode$d, source, reader, variables, fragments, parentRecordId);
73965
72993
  };
73966
72994
  }
73967
72995
  function getMinimumSelections$c() {
@@ -73986,10 +73014,10 @@ function getTypeCacheKeys$g(astNode, state) {
73986
73014
  representationName: name$c
73987
73015
  });
73988
73016
  // get all cache keys from normalizable fields
73989
- const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$d) : [];
73017
+ const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$d) : new Map();
73990
73018
  for (const fieldDataKey of Object.keys(data)) {
73991
73019
  const fieldData = data[fieldDataKey];
73992
- const requestedField = getRequestedField(fieldDataKey, requestedFields);
73020
+ const requestedField = requestedFields.get(fieldDataKey);
73993
73021
  if (requestedField === undefined) {
73994
73022
  continue; // Skip unknown field.
73995
73023
  }
@@ -74140,26 +73168,8 @@ function buildSelectionForNode$c(source, reader, parentNode, selectionNode, vari
74140
73168
  }
74141
73169
  function select$k(field, variables, fragments) {
74142
73170
  return (source, reader, parentRecordId) => {
74143
- var _a;
74144
73171
  const sink = {};
74145
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
74146
- const builtSelection = buildSelectionForNode$c(source, reader, field, sel, variables, fragments, parentRecordId);
74147
- if (builtSelection !== undefined) {
74148
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
74149
- Object.keys(builtSelection).forEach((key, value) => {
74150
- // We only assign a field selection in the fragment if it doesn't already exist in sink
74151
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
74152
- if (sink[key] === undefined) {
74153
- sink[key] = builtSelection[key];
74154
- }
74155
- });
74156
- }
74157
- else {
74158
- Object.assign(sink, builtSelection);
74159
- }
74160
- }
74161
- });
74162
- return sink;
73172
+ return selectCalculateSink(sink, field, buildSelectionForNode$c, source, reader, variables, fragments, parentRecordId);
74163
73173
  };
74164
73174
  }
74165
73175
  function getMinimumSelections$b() {
@@ -74184,10 +73194,10 @@ function getTypeCacheKeys$f(astNode, state) {
74184
73194
  representationName: name$b
74185
73195
  });
74186
73196
  // get all cache keys from normalizable fields
74187
- const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$c) : [];
73197
+ const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$c) : new Map();
74188
73198
  for (const fieldDataKey of Object.keys(data)) {
74189
73199
  const fieldData = data[fieldDataKey];
74190
- const requestedField = getRequestedField(fieldDataKey, requestedFields);
73200
+ const requestedField = requestedFields.get(fieldDataKey);
74191
73201
  if (requestedField === undefined) {
74192
73202
  continue; // Skip unknown field.
74193
73203
  }
@@ -74345,26 +73355,8 @@ function buildSelectionForNode$b(source, reader, parentNode, selectionNode, vari
74345
73355
  }
74346
73356
  function select$j(field, variables, fragments) {
74347
73357
  return (source, reader, parentRecordId) => {
74348
- var _a;
74349
73358
  const sink = {};
74350
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
74351
- const builtSelection = buildSelectionForNode$b(source, reader, field, sel, variables, fragments, parentRecordId);
74352
- if (builtSelection !== undefined) {
74353
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
74354
- Object.keys(builtSelection).forEach((key, value) => {
74355
- // We only assign a field selection in the fragment if it doesn't already exist in sink
74356
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
74357
- if (sink[key] === undefined) {
74358
- sink[key] = builtSelection[key];
74359
- }
74360
- });
74361
- }
74362
- else {
74363
- Object.assign(sink, builtSelection);
74364
- }
74365
- }
74366
- });
74367
- return sink;
73359
+ return selectCalculateSink(sink, field, buildSelectionForNode$b, source, reader, variables, fragments, parentRecordId);
74368
73360
  };
74369
73361
  }
74370
73362
  function getMinimumSelections$a() {
@@ -74585,26 +73577,8 @@ function buildSelectionForNode$a(source, reader, parentNode, selectionNode, vari
74585
73577
  }
74586
73578
  function select$i(field, variables, fragments) {
74587
73579
  return (source, reader, parentRecordId) => {
74588
- var _a;
74589
73580
  const sink = {};
74590
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
74591
- const builtSelection = buildSelectionForNode$a(source, reader, field, sel, variables, fragments, parentRecordId);
74592
- if (builtSelection !== undefined) {
74593
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
74594
- Object.keys(builtSelection).forEach((key, value) => {
74595
- // We only assign a field selection in the fragment if it doesn't already exist in sink
74596
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
74597
- if (sink[key] === undefined) {
74598
- sink[key] = builtSelection[key];
74599
- }
74600
- });
74601
- }
74602
- else {
74603
- Object.assign(sink, builtSelection);
74604
- }
74605
- }
74606
- });
74607
- return sink;
73581
+ return selectCalculateSink(sink, field, buildSelectionForNode$a, source, reader, variables, fragments, parentRecordId);
74608
73582
  };
74609
73583
  }
74610
73584
  function getMinimumSelections$9() {
@@ -74630,10 +73604,10 @@ function getTypeCacheKeys$d(astNode, state) {
74630
73604
  representationName: name$9
74631
73605
  });
74632
73606
  // get all cache keys from normalizable fields
74633
- const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$a) : [];
73607
+ const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$a) : new Map();
74634
73608
  for (const fieldDataKey of Object.keys(data)) {
74635
73609
  const fieldData = data[fieldDataKey];
74636
- const requestedField = getRequestedField(fieldDataKey, requestedFields);
73610
+ const requestedField = requestedFields.get(fieldDataKey);
74637
73611
  if (requestedField === undefined) {
74638
73612
  continue; // Skip unknown field.
74639
73613
  }
@@ -75167,26 +74141,8 @@ function buildSelectionForNode$9(source, reader, parentNode, selectionNode, vari
75167
74141
  }
75168
74142
  function select$h(field, variables, fragments) {
75169
74143
  return (source, reader, parentRecordId) => {
75170
- var _a;
75171
74144
  const sink = {};
75172
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
75173
- const builtSelection = buildSelectionForNode$9(source, reader, field, sel, variables, fragments, parentRecordId);
75174
- if (builtSelection !== undefined) {
75175
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
75176
- Object.keys(builtSelection).forEach((key, value) => {
75177
- // We only assign a field selection in the fragment if it doesn't already exist in sink
75178
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
75179
- if (sink[key] === undefined) {
75180
- sink[key] = builtSelection[key];
75181
- }
75182
- });
75183
- }
75184
- else {
75185
- Object.assign(sink, builtSelection);
75186
- }
75187
- }
75188
- });
75189
- return sink;
74145
+ return selectCalculateSink(sink, field, buildSelectionForNode$9, source, reader, variables, fragments, parentRecordId);
75190
74146
  };
75191
74147
  }
75192
74148
  function getMinimumSelections$7() {
@@ -75211,10 +74167,10 @@ function getTypeCacheKeys$c(astNode, state) {
75211
74167
  representationName: name$8
75212
74168
  });
75213
74169
  // get all cache keys from normalizable fields
75214
- const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$9) : [];
74170
+ const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$9) : new Map();
75215
74171
  for (const fieldDataKey of Object.keys(data)) {
75216
74172
  const fieldData = data[fieldDataKey];
75217
- const requestedField = getRequestedField(fieldDataKey, requestedFields);
74173
+ const requestedField = requestedFields.get(fieldDataKey);
75218
74174
  if (requestedField === undefined) {
75219
74175
  continue; // Skip unknown field.
75220
74176
  }
@@ -75353,26 +74309,8 @@ function buildSelectionForNode$8(source, reader, parentNode, selectionNode, vari
75353
74309
  }
75354
74310
  function select$g(field, variables, fragments) {
75355
74311
  return (source, reader, parentRecordId) => {
75356
- var _a;
75357
74312
  const sink = {};
75358
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
75359
- const builtSelection = buildSelectionForNode$8(source, reader, field, sel, variables, fragments, parentRecordId);
75360
- if (builtSelection !== undefined) {
75361
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
75362
- Object.keys(builtSelection).forEach((key, value) => {
75363
- // We only assign a field selection in the fragment if it doesn't already exist in sink
75364
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
75365
- if (sink[key] === undefined) {
75366
- sink[key] = builtSelection[key];
75367
- }
75368
- });
75369
- }
75370
- else {
75371
- Object.assign(sink, builtSelection);
75372
- }
75373
- }
75374
- });
75375
- return sink;
74313
+ return selectCalculateSink(sink, field, buildSelectionForNode$8, source, reader, variables, fragments, parentRecordId);
75376
74314
  };
75377
74315
  }
75378
74316
  function getMinimumSelections$6() {
@@ -75691,10 +74629,10 @@ function ingestNonCursorConnectionType(astNode, state, specifics) {
75691
74629
  function ingestTypeWithStrategy(astNode, state, isCursorConnectionType, { key, isFragmentApplicable, isMappedFieldImport, getFieldType, ramlIngestBlock, ingestPaginatedMetadata, mergeData, storeMetadataParams, createLink, }, strategy) {
75692
74630
  const { data, variables, luvio, store } = state;
75693
74631
  const sink = {};
75694
- const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable) : [];
74632
+ const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable) : new Map();
75695
74633
  for (const fieldDataKey of Object.keys(data)) {
75696
74634
  const fieldData = data[fieldDataKey];
75697
- const requestedField = getRequestedField(fieldDataKey, requestedFields);
74635
+ const requestedField = requestedFields.get(fieldDataKey);
75698
74636
  if (requestedField === undefined) {
75699
74637
  continue; // TODO: (W-11132802) We got a field back we didn't ask for. Call handleUnknownField.
75700
74638
  }
@@ -75907,18 +74845,28 @@ function calculateRequestedFieldsForType(typename, selectionSet, namedFragmentsM
75907
74845
  selections.push(selection);
75908
74846
  }
75909
74847
  if (selection.kind === "InlineFragment" && isFragmentApplicable(selection, typename)) {
74848
+ // loops over the map to get the values.
75910
74849
  getRequestedFieldsForType(typename, selection.selectionSet, namedFragmentsMap, isFragmentApplicable)
75911
74850
  .forEach(fragmentFieldSelection => { mergeFragmentWithExistingSelections(fragmentFieldSelection, selections); });
75912
74851
  }
75913
74852
  if (selection.kind === "FragmentSpread") {
75914
74853
  const namedFragment = namedFragmentsMap[selection.name.value];
75915
74854
  if (namedFragment && isFragmentApplicable(namedFragment, typename)) {
74855
+ // loops over the map to get the values.
75916
74856
  getRequestedFieldsForType(typename, namedFragment.selectionSet, namedFragmentsMap, isFragmentApplicable)
75917
74857
  .forEach(fragmentFieldSelection => { mergeFragmentWithExistingSelections(fragmentFieldSelection, selections); });
75918
74858
  }
75919
74859
  }
75920
74860
  });
75921
- return selections;
74861
+ // Needs to happen after the selections are merged.
74862
+ return selections.reduce((acc, fieldNode) => {
74863
+ const fieldName = fieldNode.alias ? fieldNode.alias.value : fieldNode.name.value;
74864
+ // TODO: W-13485835. Some fields are not being merged, and this logic reproduces the current behavior in which the first field with name is being used.
74865
+ if (!acc.has(fieldName)) {
74866
+ acc.set(fieldName, fieldNode);
74867
+ }
74868
+ return acc;
74869
+ }, new Map());
75922
74870
  }
75923
74871
  let selectionSetRequestedFieldsWeakMap = new WeakMap();
75924
74872
  function getRequestedFieldsForType(typename, selectionSet, namedFragmentsMap, isFragmentApplicable) {
@@ -76523,6 +75471,27 @@ function augmentDefaultVariableValues(variableDefinitions, variables) {
76523
75471
  }
76524
75472
  });
76525
75473
  }
75474
+ function selectCalculateSink(sink, field, buildSelectionForNodeFn, source, reader, variables, fragments, parentRecordId) {
75475
+ var _a;
75476
+ (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
75477
+ const builtSelection = buildSelectionForNodeFn(source, reader, field, sel, variables, fragments, parentRecordId);
75478
+ if (builtSelection !== undefined) {
75479
+ if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
75480
+ Object.keys(builtSelection).forEach((key, value) => {
75481
+ // We only assign a field selection in the fragment if it doesn't already exist in sink
75482
+ // The non-fragment selection already got the merged selections in getRequestedFieldsForType
75483
+ if (sink[key] === undefined) {
75484
+ sink[key] = builtSelection[key];
75485
+ }
75486
+ });
75487
+ }
75488
+ else {
75489
+ Object.assign(sink, builtSelection);
75490
+ }
75491
+ }
75492
+ });
75493
+ return sink;
75494
+ }
76526
75495
  function selectTypeLinkWithPagination(resolvedLink, sel, fieldData, reader, key, sink, variables, fragments, selectFn) {
76527
75496
  var _a, _b, _c, _d, _e;
76528
75497
  const source = resolvedLink.data.data;
@@ -76710,26 +75679,8 @@ function buildSelectionForNode$6(source, reader, parentNode, selectionNode, vari
76710
75679
  }
76711
75680
  function select$f(field, variables, fragments) {
76712
75681
  return (source, reader, parentRecordId) => {
76713
- var _a;
76714
75682
  const sink = {};
76715
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
76716
- const builtSelection = buildSelectionForNode$6(source, reader, field, sel, variables, fragments, parentRecordId);
76717
- if (builtSelection !== undefined) {
76718
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
76719
- Object.keys(builtSelection).forEach((key, value) => {
76720
- // We only assign a field selection in the fragment if it doesn't already exist in sink
76721
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
76722
- if (sink[key] === undefined) {
76723
- sink[key] = builtSelection[key];
76724
- }
76725
- });
76726
- }
76727
- else {
76728
- Object.assign(sink, builtSelection);
76729
- }
76730
- }
76731
- });
76732
- return sink;
75683
+ return selectCalculateSink(sink, field, buildSelectionForNode$6, source, reader, variables, fragments, parentRecordId);
76733
75684
  };
76734
75685
  }
76735
75686
  function getTypeCacheKeys$a(astNode, state) {
@@ -76888,7 +75839,7 @@ function convertGraphQLToRaml(astNode, state) {
76888
75839
  const { data } = state;
76889
75840
  const requestedFields = astNode.selectionSet
76890
75841
  ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$5)
76891
- : [];
75842
+ : new Map();
76892
75843
  const { fieldsBag, trie } = createFieldsBagAndTrie(data, requestedFields, state);
76893
75844
  const recordRepresentation = {
76894
75845
  apiName: data.ApiName,
@@ -76917,7 +75868,7 @@ function createFieldsBagAndTrie(data, requestedFields, parentState) {
76917
75868
  };
76918
75869
  for (const fieldDataKey of Object.keys(data)) {
76919
75870
  const fieldData = data[fieldDataKey];
76920
- const requestedField = getRequestedField(fieldDataKey, requestedFields);
75871
+ const requestedField = requestedFields.get(fieldDataKey);
76921
75872
  if (requestedField === undefined) {
76922
75873
  continue; // We got a field back we didn't ask for. Skip.
76923
75874
  }
@@ -77007,9 +75958,8 @@ function convertAstToTrie$1(astNode, fragments) {
77007
75958
  const requestedFields = astNode.selectionSet
77008
75959
  ? getRequestedFieldsForType('', // data is null here
77009
75960
  astNode.selectionSet, fragments, isFragmentApplicable$5)
77010
- : [];
77011
- for (let i = 0, len = requestedFields.length; i < len; i += 1) {
77012
- const field = requestedFields[i];
75961
+ : new Map();
75962
+ for (const [, field] of requestedFields) {
77013
75963
  const fieldType = getFieldType$9(field);
77014
75964
  const fieldName = field.name.value;
77015
75965
  //Untyped field - Adapter forwarded request?
@@ -77356,10 +76306,10 @@ function getTypeCacheKeys$6(astNode, state) {
77356
76306
  // get all cache keys from normalizable fields
77357
76307
  const requestedFields = astNode.selectionSet
77358
76308
  ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$3)
77359
- : [];
76309
+ : new Map();
77360
76310
  for (const fieldDataKey of ObjectKeys(data)) {
77361
76311
  const fieldData = data[fieldDataKey];
77362
- const requestedField = getRequestedField(fieldDataKey, requestedFields);
76312
+ const requestedField = requestedFields.get(fieldDataKey);
77363
76313
  if (requestedField === undefined) {
77364
76314
  continue; // Skip unknown field.
77365
76315
  }
@@ -77581,28 +76531,10 @@ function buildSelectionForNode$5(source, reader, parentNode, selectionNode, vari
77581
76531
  }
77582
76532
  function select$e(field, variables, fragments) {
77583
76533
  return (source, reader, parentRecordId) => {
77584
- var _a;
77585
76534
  const sink = {};
77586
76535
  source = attachMappedData(source, reader);
77587
76536
  reader.markSeenId(parentRecordId); // Always mark identifiable types as seen
77588
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
77589
- const builtSelection = buildSelectionForNode$5(source, reader, field, sel, variables, fragments, parentRecordId);
77590
- if (builtSelection !== undefined) {
77591
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
77592
- Object.keys(builtSelection).forEach((key, value) => {
77593
- // We only assign a field selection in the fragment if it doesn't already exist in sink
77594
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
77595
- if (sink[key] === undefined) {
77596
- sink[key] = builtSelection[key];
77597
- }
77598
- });
77599
- }
77600
- else {
77601
- Object.assign(sink, builtSelection);
77602
- }
77603
- }
77604
- });
77605
- return sink;
76537
+ return selectCalculateSink(sink, field, buildSelectionForNode$5, source, reader, variables, fragments, parentRecordId);
77606
76538
  };
77607
76539
  }
77608
76540
  function getTypeCacheKeys$5(astNode, state) {
@@ -77615,10 +76547,10 @@ function getTypeCacheKeys$5(astNode, state) {
77615
76547
  representationName: name$5
77616
76548
  });
77617
76549
  // get all cache keys from normalizable fields
77618
- const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$5) : [];
76550
+ const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$5) : new Map();
77619
76551
  for (const fieldDataKey of Object.keys(data)) {
77620
76552
  const fieldData = data[fieldDataKey];
77621
- const requestedField = getRequestedField(fieldDataKey, requestedFields);
76553
+ const requestedField = requestedFields.get(fieldDataKey);
77622
76554
  if (requestedField === undefined) {
77623
76555
  continue; // Skip unknown field.
77624
76556
  }
@@ -78482,26 +77414,8 @@ function buildSelectionForNode$4(source, reader, parentNode, selectionNode, vari
78482
77414
  }
78483
77415
  function select$d(field, variables, fragments) {
78484
77416
  return (source, reader, parentRecordId) => {
78485
- var _a;
78486
77417
  const sink = {};
78487
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
78488
- const builtSelection = buildSelectionForNode$4(source, reader, field, sel, variables, fragments, parentRecordId);
78489
- if (builtSelection !== undefined) {
78490
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
78491
- Object.keys(builtSelection).forEach((key, value) => {
78492
- // We only assign a field selection in the fragment if it doesn't already exist in sink
78493
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
78494
- if (sink[key] === undefined) {
78495
- sink[key] = builtSelection[key];
78496
- }
78497
- });
78498
- }
78499
- else {
78500
- Object.assign(sink, builtSelection);
78501
- }
78502
- }
78503
- });
78504
- return sink;
77418
+ return selectCalculateSink(sink, field, buildSelectionForNode$4, source, reader, variables, fragments, parentRecordId);
78505
77419
  };
78506
77420
  }
78507
77421
  function getMinimumSelections$4() {
@@ -78526,10 +77440,10 @@ function getTypeCacheKeys$4(astNode, state) {
78526
77440
  representationName: name$4
78527
77441
  });
78528
77442
  // get all cache keys from normalizable fields
78529
- const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$4) : [];
77443
+ const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$4) : new Map();
78530
77444
  for (const fieldDataKey of Object.keys(data)) {
78531
77445
  const fieldData = data[fieldDataKey];
78532
- const requestedField = getRequestedField(fieldDataKey, requestedFields);
77446
+ const requestedField = requestedFields.get(fieldDataKey);
78533
77447
  if (requestedField === undefined) {
78534
77448
  continue; // Skip unknown field.
78535
77449
  }
@@ -78748,26 +77662,8 @@ function buildSelectionForNode$3(source, reader, parentNode, selectionNode, vari
78748
77662
  }
78749
77663
  function select$c(field, variables, fragments) {
78750
77664
  return (source, reader, parentRecordId) => {
78751
- var _a;
78752
77665
  const sink = {};
78753
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
78754
- const builtSelection = buildSelectionForNode$3(source, reader, field, sel, variables, fragments, parentRecordId);
78755
- if (builtSelection !== undefined) {
78756
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
78757
- Object.keys(builtSelection).forEach((key, value) => {
78758
- // We only assign a field selection in the fragment if it doesn't already exist in sink
78759
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
78760
- if (sink[key] === undefined) {
78761
- sink[key] = builtSelection[key];
78762
- }
78763
- });
78764
- }
78765
- else {
78766
- Object.assign(sink, builtSelection);
78767
- }
78768
- }
78769
- });
78770
- return sink;
77666
+ return selectCalculateSink(sink, field, buildSelectionForNode$3, source, reader, variables, fragments, parentRecordId);
78771
77667
  };
78772
77668
  }
78773
77669
  function getMinimumSelections$3() {
@@ -78935,26 +77831,8 @@ function buildSelectionForNode$2(source, reader, parentNode, selectionNode, vari
78935
77831
  }
78936
77832
  function select$b(field, variables, fragments) {
78937
77833
  return (source, reader, parentRecordId) => {
78938
- var _a;
78939
77834
  const sink = {};
78940
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
78941
- const builtSelection = buildSelectionForNode$2(source, reader, field, sel, variables, fragments, parentRecordId);
78942
- if (builtSelection !== undefined) {
78943
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
78944
- Object.keys(builtSelection).forEach((key, value) => {
78945
- // We only assign a field selection in the fragment if it doesn't already exist in sink
78946
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
78947
- if (sink[key] === undefined) {
78948
- sink[key] = builtSelection[key];
78949
- }
78950
- });
78951
- }
78952
- else {
78953
- Object.assign(sink, builtSelection);
78954
- }
78955
- }
78956
- });
78957
- return sink;
77835
+ return selectCalculateSink(sink, field, buildSelectionForNode$2, source, reader, variables, fragments, parentRecordId);
78958
77836
  };
78959
77837
  }
78960
77838
  function getMinimumSelections$2() {
@@ -78979,10 +77857,10 @@ function getTypeCacheKeys$3(astNode, state) {
78979
77857
  representationName: name$2
78980
77858
  });
78981
77859
  // get all cache keys from normalizable fields
78982
- const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$2) : [];
77860
+ const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$2) : new Map();
78983
77861
  for (const fieldDataKey of Object.keys(data)) {
78984
77862
  const fieldData = data[fieldDataKey];
78985
- const requestedField = getRequestedField(fieldDataKey, requestedFields);
77863
+ const requestedField = requestedFields.get(fieldDataKey);
78986
77864
  if (requestedField === undefined) {
78987
77865
  continue; // Skip unknown field.
78988
77866
  }
@@ -79127,26 +78005,8 @@ function buildSelectionForNode$1(source, reader, parentNode, selectionNode, vari
79127
78005
  }
79128
78006
  function select$a(field, variables, fragments) {
79129
78007
  return (source, reader, parentRecordId) => {
79130
- var _a;
79131
78008
  const sink = {};
79132
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
79133
- const builtSelection = buildSelectionForNode$1(source, reader, field, sel, variables, fragments, parentRecordId);
79134
- if (builtSelection !== undefined) {
79135
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
79136
- Object.keys(builtSelection).forEach((key, value) => {
79137
- // We only assign a field selection in the fragment if it doesn't already exist in sink
79138
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
79139
- if (sink[key] === undefined) {
79140
- sink[key] = builtSelection[key];
79141
- }
79142
- });
79143
- }
79144
- else {
79145
- Object.assign(sink, builtSelection);
79146
- }
79147
- }
79148
- });
79149
- return sink;
78009
+ return selectCalculateSink(sink, field, buildSelectionForNode$1, source, reader, variables, fragments, parentRecordId);
79150
78010
  };
79151
78011
  }
79152
78012
  function getMinimumSelections$1() {
@@ -79171,10 +78031,10 @@ function getTypeCacheKeys$2(astNode, state) {
79171
78031
  representationName: name$1
79172
78032
  });
79173
78033
  // get all cache keys from normalizable fields
79174
- const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$1) : [];
78034
+ const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable$1) : new Map();
79175
78035
  for (const fieldDataKey of Object.keys(data)) {
79176
78036
  const fieldData = data[fieldDataKey];
79177
- const requestedField = getRequestedField(fieldDataKey, requestedFields);
78037
+ const requestedField = requestedFields.get(fieldDataKey);
79178
78038
  if (requestedField === undefined) {
79179
78039
  continue; // Skip unknown field.
79180
78040
  }
@@ -79433,26 +78293,8 @@ function buildSelectionForNode(source, reader, parentNode, selectionNode, variab
79433
78293
  }
79434
78294
  function select$9(field, variables, fragments) {
79435
78295
  return (source, reader, parentRecordId) => {
79436
- var _a;
79437
78296
  const sink = {};
79438
- (_a = field.selectionSet) === null || _a === void 0 ? void 0 : _a.selections.forEach((sel) => {
79439
- const builtSelection = buildSelectionForNode(source, reader, field, sel, variables, fragments, parentRecordId);
79440
- if (builtSelection !== undefined) {
79441
- if (sel.kind === "InlineFragment" || sel.kind === "FragmentSpread") {
79442
- Object.keys(builtSelection).forEach((key, value) => {
79443
- // We only assign a field selection in the fragment if it doesn't already exist in sink
79444
- // The non-fragment selection already got the merged selections in getRequestedFieldsForType
79445
- if (sink[key] === undefined) {
79446
- sink[key] = builtSelection[key];
79447
- }
79448
- });
79449
- }
79450
- else {
79451
- Object.assign(sink, builtSelection);
79452
- }
79453
- }
79454
- });
79455
- return sink;
78297
+ return selectCalculateSink(sink, field, buildSelectionForNode, source, reader, variables, fragments, parentRecordId);
79456
78298
  };
79457
78299
  }
79458
78300
  function getMinimumSelections() {
@@ -79469,10 +78311,10 @@ function getTypeCacheKeys$1(astNode, state) {
79469
78311
  representationName: name
79470
78312
  });
79471
78313
  // get all cache keys from normalizable fields
79472
- const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable) : [];
78314
+ const requestedFields = astNode.selectionSet ? getRequestedFieldsForType(data.__typename, astNode.selectionSet, state.fragments, isFragmentApplicable) : new Map();
79473
78315
  for (const fieldDataKey of Object.keys(data)) {
79474
78316
  const fieldData = data[fieldDataKey];
79475
- const requestedField = getRequestedField(fieldDataKey, requestedFields);
78317
+ const requestedField = requestedFields.get(fieldDataKey);
79476
78318
  if (requestedField === undefined) {
79477
78319
  continue; // Skip unknown field.
79478
78320
  }
@@ -80895,7 +79737,7 @@ register({
80895
79737
  configuration: { ...configurationForGraphQLAdapters },
80896
79738
  instrument,
80897
79739
  });
80898
- // version: 1.158.0-9275eaa3c
79740
+ // version: 1.158.2-2489a5047
80899
79741
 
80900
79742
  // On core the unstable adapters are re-exported with different names,
80901
79743
 
@@ -83142,7 +81984,7 @@ withDefaultLuvio((luvio) => {
83142
81984
  unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
83143
81985
  graphQLImperative = ldsAdapter;
83144
81986
  });
83145
- // version: 1.158.0-9275eaa3c
81987
+ // version: 1.158.2-2489a5047
83146
81988
 
83147
81989
  var gqlApi = /*#__PURE__*/Object.freeze({
83148
81990
  __proto__: null,
@@ -83831,4 +82673,4 @@ const { luvio } = getRuntime();
83831
82673
  setDefaultLuvio({ luvio });
83832
82674
 
83833
82675
  export { createPrimingSession, draftManager, draftQueue, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, registerReportObserver, setMetadataTTL, setUiApiRecordTTL, subscribeToAdapter };
83834
- // version: 1.158.0-8b4924803
82676
+ // version: 1.158.2-6b3522c4a