@cedarjs/web 5.0.4-next.167 → 5.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. package/dist/apollo/fragmentRegistry.d.ts +0 -25
  2. package/dist/apollo/fragmentRegistry.d.ts.map +1 -1
  3. package/dist/apollo/fragmentRegistry.js +1 -19
  4. package/dist/apollo/index.d.ts +70 -50
  5. package/dist/apollo/index.d.ts.map +1 -1
  6. package/dist/apollo/index.js +184 -2
  7. package/dist/apollo/suspense.d.ts +7 -16
  8. package/dist/apollo/suspense.d.ts.map +1 -1
  9. package/dist/apollo/suspense.js +26 -9
  10. package/dist/apollo/typeOverride.d.ts +21 -0
  11. package/dist/apollo/typeOverride.d.ts.map +1 -0
  12. package/dist/bundled/apollo-upload-client.js +1 -2899
  13. package/dist/cjs/apollo/fragmentRegistry.d.ts +43 -0
  14. package/dist/cjs/apollo/fragmentRegistry.d.ts.map +1 -0
  15. package/dist/cjs/apollo/fragmentRegistry.js +75 -0
  16. package/dist/cjs/apollo/index.d.ts +76 -0
  17. package/dist/cjs/apollo/index.d.ts.map +1 -0
  18. package/dist/cjs/apollo/index.js +218 -0
  19. package/dist/cjs/apollo/links.d.ts +27 -0
  20. package/dist/cjs/apollo/links.d.ts.map +1 -0
  21. package/dist/cjs/apollo/links.js +122 -0
  22. package/dist/cjs/apollo/sseLink.d.ts +29 -0
  23. package/dist/cjs/apollo/sseLink.d.ts.map +1 -0
  24. package/dist/cjs/apollo/sseLink.js +120 -0
  25. package/dist/{apollo/apolloLinkTypes.d.ts → cjs/apollo/suspense.d.ts} +22 -22
  26. package/dist/cjs/apollo/suspense.d.ts.map +1 -0
  27. package/dist/cjs/apollo/suspense.js +127 -0
  28. package/dist/cjs/apollo/typeOverride.d.ts +21 -0
  29. package/dist/cjs/apollo/typeOverride.d.ts.map +1 -0
  30. package/dist/cjs/apollo/typeOverride.js +16 -0
  31. package/dist/cjs/apollo/useCache.d.ts +22 -0
  32. package/dist/cjs/apollo/useCache.d.ts.map +1 -0
  33. package/dist/cjs/apollo/useCache.js +49 -0
  34. package/dist/cjs/bins/cedar.d.ts +9 -0
  35. package/dist/cjs/bins/cedar.d.ts.map +1 -0
  36. package/dist/cjs/bins/cedar.js +36 -0
  37. package/dist/cjs/bins/cfw.d.ts +3 -0
  38. package/dist/cjs/bins/cfw.d.ts.map +1 -0
  39. package/dist/cjs/bins/cfw.js +36 -0
  40. package/dist/cjs/bins/cross-env.d.ts +3 -0
  41. package/dist/cjs/bins/cross-env.d.ts.map +1 -0
  42. package/dist/cjs/bins/cross-env.js +30 -0
  43. package/dist/cjs/bins/msw.d.ts +3 -0
  44. package/dist/cjs/bins/msw.d.ts.map +1 -0
  45. package/dist/cjs/bins/msw.js +28 -0
  46. package/dist/cjs/bins/redwood.d.ts +9 -0
  47. package/dist/cjs/bins/redwood.d.ts.map +1 -0
  48. package/dist/cjs/bins/redwood.js +36 -0
  49. package/dist/cjs/bins/storybook.d.ts +3 -0
  50. package/dist/cjs/bins/storybook.d.ts.map +1 -0
  51. package/dist/cjs/bins/storybook.js +49 -0
  52. package/dist/cjs/bins/tsc.d.ts +3 -0
  53. package/dist/cjs/bins/tsc.d.ts.map +1 -0
  54. package/dist/cjs/bins/tsc.js +30 -0
  55. package/dist/cjs/bundled/apollo-upload-client.d.ts +3 -0
  56. package/dist/cjs/bundled/apollo-upload-client.d.ts.map +1 -0
  57. package/dist/cjs/bundled/apollo-upload-client.js +2925 -0
  58. package/dist/cjs/components/DevFatalErrorPage.d.ts +21 -0
  59. package/dist/cjs/components/DevFatalErrorPage.d.ts.map +1 -0
  60. package/dist/cjs/components/DevFatalErrorPage.js +552 -0
  61. package/dist/cjs/components/FatalErrorBoundary.d.ts +24 -0
  62. package/dist/cjs/components/FatalErrorBoundary.d.ts.map +1 -0
  63. package/dist/cjs/components/FatalErrorBoundary.js +63 -0
  64. package/dist/cjs/components/FetchConfigProvider.d.ts +25 -0
  65. package/dist/cjs/components/FetchConfigProvider.d.ts.map +1 -0
  66. package/dist/cjs/components/FetchConfigProvider.js +80 -0
  67. package/dist/cjs/components/GraphQLHooksProvider.d.ts +45 -0
  68. package/dist/cjs/components/GraphQLHooksProvider.d.ts.map +1 -0
  69. package/dist/cjs/components/GraphQLHooksProvider.js +135 -0
  70. package/dist/cjs/components/MetaTags.d.ts +52 -0
  71. package/dist/cjs/components/MetaTags.d.ts.map +1 -0
  72. package/dist/cjs/components/MetaTags.js +68 -0
  73. package/dist/cjs/components/Metadata.d.ts +9 -0
  74. package/dist/cjs/components/Metadata.d.ts.map +1 -0
  75. package/dist/cjs/components/Metadata.js +94 -0
  76. package/dist/cjs/components/PortalHead.d.ts +4 -0
  77. package/dist/cjs/components/PortalHead.d.ts.map +1 -0
  78. package/dist/cjs/components/PortalHead.js +59 -0
  79. package/dist/cjs/components/RedwoodProvider.d.ts +9 -0
  80. package/dist/cjs/components/RedwoodProvider.d.ts.map +1 -0
  81. package/dist/cjs/components/RedwoodProvider.js +57 -0
  82. package/dist/cjs/components/ServerInject.d.ts +26 -0
  83. package/dist/cjs/components/ServerInject.d.ts.map +1 -0
  84. package/dist/cjs/components/ServerInject.js +75 -0
  85. package/dist/cjs/components/cell/CellCacheContext.d.ts +20 -0
  86. package/dist/cjs/components/cell/CellCacheContext.d.ts.map +1 -0
  87. package/dist/cjs/components/cell/CellCacheContext.js +53 -0
  88. package/dist/cjs/components/cell/CellErrorBoundary.d.ts +25 -0
  89. package/dist/cjs/components/cell/CellErrorBoundary.d.ts.map +1 -0
  90. package/dist/cjs/components/cell/CellErrorBoundary.js +66 -0
  91. package/dist/cjs/components/cell/cellTypes.d.ts +152 -0
  92. package/dist/cjs/components/cell/cellTypes.d.ts.map +1 -0
  93. package/dist/cjs/components/cell/cellTypes.js +16 -0
  94. package/dist/cjs/components/cell/createCell.d.ts +10 -0
  95. package/dist/cjs/components/cell/createCell.d.ts.map +1 -0
  96. package/dist/cjs/components/cell/createCell.js +165 -0
  97. package/dist/cjs/components/cell/createCell.test.js +351 -0
  98. package/dist/cjs/components/cell/createServerCell.d.ts +15 -0
  99. package/dist/cjs/components/cell/createServerCell.d.ts.map +1 -0
  100. package/dist/cjs/components/cell/createServerCell.js +91 -0
  101. package/dist/cjs/components/cell/createSuspendingCell.d.ts +11 -0
  102. package/dist/cjs/components/cell/createSuspendingCell.d.ts.map +1 -0
  103. package/dist/cjs/components/cell/createSuspendingCell.js +152 -0
  104. package/dist/cjs/components/cell/createSuspendingCell.test.js +115 -0
  105. package/dist/cjs/components/cell/isCellEmpty.d.ts +41 -0
  106. package/dist/cjs/components/cell/isCellEmpty.d.ts.map +1 -0
  107. package/dist/cjs/components/cell/isCellEmpty.js +35 -0
  108. package/dist/cjs/components/htmlTags.d.ts +52 -0
  109. package/dist/cjs/components/htmlTags.d.ts.map +1 -0
  110. package/dist/cjs/components/htmlTags.js +88 -0
  111. package/dist/cjs/config.d.ts +2 -0
  112. package/dist/cjs/config.d.ts.map +1 -0
  113. package/dist/cjs/config.js +6 -0
  114. package/dist/cjs/global.web-auto-imports.d.ts +30 -0
  115. package/dist/cjs/global.web-auto-imports.d.ts.map +1 -0
  116. package/dist/cjs/global.web-auto-imports.js +16 -0
  117. package/dist/cjs/graphql.d.ts +23 -0
  118. package/dist/cjs/graphql.d.ts.map +1 -0
  119. package/dist/cjs/graphql.js +36 -0
  120. package/dist/cjs/index.d.ts +19 -0
  121. package/dist/cjs/index.d.ts.map +1 -0
  122. package/dist/cjs/index.js +69 -0
  123. package/dist/cjs/package.json +1 -0
  124. package/dist/cjs/routeHooks.types.d.ts +12 -0
  125. package/dist/cjs/routeHooks.types.d.ts.map +1 -0
  126. package/dist/cjs/routeHooks.types.js +16 -0
  127. package/dist/cjs/server/MiddlewareRequest.d.ts +28 -0
  128. package/dist/cjs/server/MiddlewareRequest.d.ts.map +1 -0
  129. package/dist/cjs/server/MiddlewareRequest.js +71 -0
  130. package/dist/cjs/server/MiddlewareResponse.d.ts +44 -0
  131. package/dist/cjs/server/MiddlewareResponse.d.ts.map +1 -0
  132. package/dist/cjs/server/MiddlewareResponse.js +130 -0
  133. package/dist/cjs/server/middleware.d.ts +17 -0
  134. package/dist/cjs/server/middleware.d.ts.map +1 -0
  135. package/dist/cjs/server/middleware.js +24 -0
  136. package/dist/cjs/server/request.d.ts +2 -0
  137. package/dist/cjs/server/request.d.ts.map +1 -0
  138. package/dist/cjs/server/request.js +34 -0
  139. package/dist/cjs/streamUtils/useDocumentReady.d.ts +11 -0
  140. package/dist/cjs/streamUtils/useDocumentReady.d.ts.map +1 -0
  141. package/dist/cjs/streamUtils/useDocumentReady.js +41 -0
  142. package/dist/cjs/toast/index.d.ts +3 -0
  143. package/dist/cjs/toast/index.d.ts.map +1 -0
  144. package/dist/cjs/toast/index.js +41 -0
  145. package/dist/components/FetchConfigProvider.d.ts +2 -3
  146. package/dist/components/FetchConfigProvider.d.ts.map +1 -1
  147. package/dist/components/GraphQLHooksProvider.d.ts +45 -0
  148. package/dist/components/GraphQLHooksProvider.d.ts.map +1 -0
  149. package/dist/components/GraphQLHooksProvider.js +94 -0
  150. package/dist/components/cell/CellErrorBoundary.d.ts +2 -3
  151. package/dist/components/cell/CellErrorBoundary.d.ts.map +1 -1
  152. package/dist/components/cell/cellTypes.d.ts +4 -17
  153. package/dist/components/cell/cellTypes.d.ts.map +1 -1
  154. package/dist/components/cell/createCell.d.ts +7 -1
  155. package/dist/components/cell/createCell.d.ts.map +1 -1
  156. package/dist/components/cell/createCell.js +3 -22
  157. package/dist/components/cell/createCell.test.js +328 -0
  158. package/dist/components/cell/createSuspendingCell.d.ts.map +1 -1
  159. package/dist/components/cell/createSuspendingCell.js +3 -12
  160. package/dist/components/cell/createSuspendingCell.test.js +92 -0
  161. package/dist/global.web-auto-imports.d.ts +16 -0
  162. package/dist/global.web-auto-imports.d.ts.map +1 -1
  163. package/dist/index.d.ts +2 -5
  164. package/dist/index.d.ts.map +1 -1
  165. package/dist/index.js +3 -5
  166. package/dist/package.json +1 -0
  167. package/package.json +106 -48
  168. package/dist/apollo/ApolloProviderWithFetchConfig.d.ts +0 -15
  169. package/dist/apollo/ApolloProviderWithFetchConfig.d.ts.map +0 -1
  170. package/dist/apollo/ApolloProviderWithFetchConfig.js +0 -134
  171. package/dist/apollo/CedarApolloProvider.d.ts +0 -14
  172. package/dist/apollo/CedarApolloProvider.d.ts.map +0 -1
  173. package/dist/apollo/CedarApolloProvider.js +0 -35
  174. package/dist/apollo/ErrorBoundary.d.ts +0 -13
  175. package/dist/apollo/ErrorBoundary.d.ts.map +0 -1
  176. package/dist/apollo/ErrorBoundary.js +0 -13
  177. package/dist/apollo/apolloLinkTypes.d.ts.map +0 -1
  178. package/dist/bins/cedar.js +0 -14
  179. package/dist/bins/cfw.js +0 -14
  180. package/dist/bins/cross-env.js +0 -8
  181. package/dist/bins/msw.js +0 -6
  182. package/dist/bins/redwood.js +0 -14
  183. package/dist/bins/storybook.js +0 -27
  184. package/dist/bins/tsc.js +0 -8
  185. package/dist/components/cell/createFragmentCell.d.ts +0 -19
  186. package/dist/components/cell/createFragmentCell.d.ts.map +0 -1
  187. package/dist/components/cell/createFragmentCell.js +0 -73
  188. /package/dist/apollo/{apolloLinkTypes.js → typeOverride.js} +0 -0
@@ -1,2902 +1,4 @@
1
- // ../../node_modules/tslib/tslib.es6.mjs
2
- var extendStatics = function(d, b) {
3
- extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
4
- d2.__proto__ = b2;
5
- } || function(d2, b2) {
6
- for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
7
- };
8
- return extendStatics(d, b);
9
- };
10
- function __extends(d, b) {
11
- if (typeof b !== "function" && b !== null)
12
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
13
- extendStatics(d, b);
14
- function __() {
15
- this.constructor = d;
16
- }
17
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
18
- }
19
- var __assign = function() {
20
- __assign = Object.assign || function __assign2(t) {
21
- for (var s, i = 1, n = arguments.length; i < n; i++) {
22
- s = arguments[i];
23
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
24
- }
25
- return t;
26
- };
27
- return __assign.apply(this, arguments);
28
- };
29
- function __spreadArray(to, from, pack) {
30
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
31
- if (ar || !(i in from)) {
32
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
33
- ar[i] = from[i];
34
- }
35
- }
36
- return to.concat(ar || Array.prototype.slice.call(from));
37
- }
38
-
39
- // ../../node_modules/ts-invariant/lib/invariant.js
40
- var genericMessage = "Invariant Violation";
41
- var _a = Object.setPrototypeOf;
42
- var setPrototypeOf = _a === void 0 ? function(obj, proto) {
43
- obj.__proto__ = proto;
44
- return obj;
45
- } : _a;
46
- var InvariantError = (
47
- /** @class */
48
- (function(_super) {
49
- __extends(InvariantError2, _super);
50
- function InvariantError2(message) {
51
- if (message === void 0) {
52
- message = genericMessage;
53
- }
54
- var _this = _super.call(this, typeof message === "number" ? genericMessage + ": " + message + " (see https://github.com/apollographql/invariant-packages)" : message) || this;
55
- _this.framesToPop = 1;
56
- _this.name = genericMessage;
57
- setPrototypeOf(_this, InvariantError2.prototype);
58
- return _this;
59
- }
60
- return InvariantError2;
61
- })(Error)
62
- );
63
- function invariant(condition, message) {
64
- if (!condition) {
65
- throw new InvariantError(message);
66
- }
67
- }
68
- var verbosityLevels = ["debug", "log", "warn", "error", "silent"];
69
- var verbosityLevel = verbosityLevels.indexOf("log");
70
- function wrapConsoleMethod(name) {
71
- return function() {
72
- if (verbosityLevels.indexOf(name) >= verbosityLevel) {
73
- var method = console[name] || console.log;
74
- return method.apply(console, arguments);
75
- }
76
- };
77
- }
78
- (function(invariant4) {
79
- invariant4.debug = wrapConsoleMethod("debug");
80
- invariant4.log = wrapConsoleMethod("log");
81
- invariant4.warn = wrapConsoleMethod("warn");
82
- invariant4.error = wrapConsoleMethod("error");
83
- })(invariant || (invariant = {}));
84
-
85
- // ../../node_modules/@apollo/client/version.js
86
- var version = "3.14.1";
87
-
88
- // ../../node_modules/@apollo/client/utilities/globals/maybe.js
89
- function maybe(thunk) {
90
- try {
91
- return thunk();
92
- } catch (_a3) {
93
- }
94
- }
95
-
96
- // ../../node_modules/@apollo/client/utilities/globals/global.js
97
- var global_default = maybe(function() {
98
- return globalThis;
99
- }) || maybe(function() {
100
- return window;
101
- }) || maybe(function() {
102
- return self;
103
- }) || maybe(function() {
104
- return global;
105
- }) || // We don't expect the Function constructor ever to be invoked at runtime, as
106
- // long as at least one of globalThis, window, self, or global is defined, so
107
- // we are under no obligation to make it easy for static analysis tools to
108
- // detect syntactic usage of the Function constructor. If you think you can
109
- // improve your static analysis to detect this obfuscation, think again. This
110
- // is an arms race you cannot win, at least not in JavaScript.
111
- maybe(function() {
112
- return maybe.constructor("return this")();
113
- });
114
-
115
- // ../../node_modules/@apollo/client/utilities/common/makeUniqueId.js
116
- var prefixCounts = /* @__PURE__ */ new Map();
117
- function makeUniqueId(prefix) {
118
- var count = prefixCounts.get(prefix) || 1;
119
- prefixCounts.set(prefix, count + 1);
120
- return "".concat(prefix, ":").concat(count, ":").concat(Math.random().toString(36).slice(2));
121
- }
122
-
123
- // ../../node_modules/@apollo/client/utilities/common/stringifyForDisplay.js
124
- function stringifyForDisplay(value, space) {
125
- if (space === void 0) {
126
- space = 0;
127
- }
128
- var undefId = makeUniqueId("stringifyForDisplay");
129
- return JSON.stringify(value, function(key, value2) {
130
- return value2 === void 0 ? undefId : value2;
131
- }, space).split(JSON.stringify(undefId)).join("<undefined>");
132
- }
133
-
134
- // ../../node_modules/@apollo/client/utilities/globals/invariantWrappers.js
135
- function wrap(fn) {
136
- return function(message) {
137
- var args = [];
138
- for (var _i = 1; _i < arguments.length; _i++) {
139
- args[_i - 1] = arguments[_i];
140
- }
141
- if (typeof message === "number") {
142
- var arg0 = message;
143
- message = getHandledErrorMsg(arg0);
144
- if (!message) {
145
- message = getFallbackErrorMsg(arg0, args);
146
- args = [];
147
- }
148
- }
149
- fn.apply(void 0, [message].concat(args));
150
- };
151
- }
152
- var invariant2 = Object.assign(function invariant3(condition, message) {
153
- var args = [];
154
- for (var _i = 2; _i < arguments.length; _i++) {
155
- args[_i - 2] = arguments[_i];
156
- }
157
- if (!condition) {
158
- invariant(condition, getHandledErrorMsg(message, args) || getFallbackErrorMsg(message, args));
159
- }
160
- }, {
161
- debug: wrap(invariant.debug),
162
- log: wrap(invariant.log),
163
- warn: wrap(invariant.warn),
164
- error: wrap(invariant.error)
165
- });
166
- function newInvariantError(message) {
167
- var optionalParams = [];
168
- for (var _i = 1; _i < arguments.length; _i++) {
169
- optionalParams[_i - 1] = arguments[_i];
170
- }
171
- return new InvariantError(getHandledErrorMsg(message, optionalParams) || getFallbackErrorMsg(message, optionalParams));
172
- }
173
- var ApolloErrorMessageHandler = /* @__PURE__ */ Symbol.for("ApolloErrorMessageHandler_" + version);
174
- function stringify(arg) {
175
- if (typeof arg == "string") {
176
- return arg;
177
- }
178
- try {
179
- return stringifyForDisplay(arg, 2).slice(0, 1e3);
180
- } catch (_a3) {
181
- return "<non-serializable>";
182
- }
183
- }
184
- function getHandledErrorMsg(message, messageArgs) {
185
- if (messageArgs === void 0) {
186
- messageArgs = [];
187
- }
188
- if (!message)
189
- return;
190
- return global_default[ApolloErrorMessageHandler] && global_default[ApolloErrorMessageHandler](message, messageArgs.map(stringify));
191
- }
192
- function getFallbackErrorMsg(message, messageArgs) {
193
- if (messageArgs === void 0) {
194
- messageArgs = [];
195
- }
196
- if (!message)
197
- return;
198
- return "An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#".concat(encodeURIComponent(JSON.stringify({
199
- version,
200
- message,
201
- args: messageArgs.map(stringify)
202
- })));
203
- }
204
-
205
- // ../../node_modules/@apollo/client/utilities/globals/index.js
206
- var DEV = globalThis.__DEV__ !== false;
207
-
208
- // ../../node_modules/graphql/jsutils/devAssert.mjs
209
- function devAssert(condition, message) {
210
- const booleanCondition = Boolean(condition);
211
- if (!booleanCondition) {
212
- throw new Error(message);
213
- }
214
- }
215
-
216
- // ../../node_modules/graphql/language/ast.mjs
217
- var QueryDocumentKeys = {
218
- Name: [],
219
- Document: ["definitions"],
220
- OperationDefinition: [
221
- "description",
222
- "name",
223
- "variableDefinitions",
224
- "directives",
225
- "selectionSet"
226
- ],
227
- VariableDefinition: [
228
- "description",
229
- "variable",
230
- "type",
231
- "defaultValue",
232
- "directives"
233
- ],
234
- Variable: ["name"],
235
- SelectionSet: ["selections"],
236
- Field: ["alias", "name", "arguments", "directives", "selectionSet"],
237
- Argument: ["name", "value"],
238
- FragmentSpread: ["name", "directives"],
239
- InlineFragment: ["typeCondition", "directives", "selectionSet"],
240
- FragmentDefinition: [
241
- "description",
242
- "name",
243
- // Note: fragment variable definitions are deprecated and will removed in v17.0.0
244
- "variableDefinitions",
245
- "typeCondition",
246
- "directives",
247
- "selectionSet"
248
- ],
249
- IntValue: [],
250
- FloatValue: [],
251
- StringValue: [],
252
- BooleanValue: [],
253
- NullValue: [],
254
- EnumValue: [],
255
- ListValue: ["values"],
256
- ObjectValue: ["fields"],
257
- ObjectField: ["name", "value"],
258
- Directive: ["name", "arguments"],
259
- NamedType: ["name"],
260
- ListType: ["type"],
261
- NonNullType: ["type"],
262
- SchemaDefinition: ["description", "directives", "operationTypes"],
263
- OperationTypeDefinition: ["type"],
264
- ScalarTypeDefinition: ["description", "name", "directives"],
265
- ObjectTypeDefinition: [
266
- "description",
267
- "name",
268
- "interfaces",
269
- "directives",
270
- "fields"
271
- ],
272
- FieldDefinition: ["description", "name", "arguments", "type", "directives"],
273
- InputValueDefinition: [
274
- "description",
275
- "name",
276
- "type",
277
- "defaultValue",
278
- "directives"
279
- ],
280
- InterfaceTypeDefinition: [
281
- "description",
282
- "name",
283
- "interfaces",
284
- "directives",
285
- "fields"
286
- ],
287
- UnionTypeDefinition: ["description", "name", "directives", "types"],
288
- EnumTypeDefinition: ["description", "name", "directives", "values"],
289
- EnumValueDefinition: ["description", "name", "directives"],
290
- InputObjectTypeDefinition: ["description", "name", "directives", "fields"],
291
- DirectiveDefinition: [
292
- "description",
293
- "name",
294
- "arguments",
295
- "directives",
296
- "locations"
297
- ],
298
- SchemaExtension: ["directives", "operationTypes"],
299
- DirectiveExtension: ["name", "directives"],
300
- ScalarTypeExtension: ["name", "directives"],
301
- ObjectTypeExtension: ["name", "interfaces", "directives", "fields"],
302
- InterfaceTypeExtension: ["name", "interfaces", "directives", "fields"],
303
- UnionTypeExtension: ["name", "directives", "types"],
304
- EnumTypeExtension: ["name", "directives", "values"],
305
- InputObjectTypeExtension: ["name", "directives", "fields"],
306
- TypeCoordinate: ["name"],
307
- MemberCoordinate: ["name", "memberName"],
308
- ArgumentCoordinate: ["name", "fieldName", "argumentName"],
309
- DirectiveCoordinate: ["name"],
310
- DirectiveArgumentCoordinate: ["name", "argumentName"]
311
- };
312
- var kindValues = new Set(Object.keys(QueryDocumentKeys));
313
- function isNode(maybeNode) {
314
- const maybeKind = maybeNode === null || maybeNode === void 0 ? void 0 : maybeNode.kind;
315
- return typeof maybeKind === "string" && kindValues.has(maybeKind);
316
- }
317
- var OperationTypeNode;
318
- (function(OperationTypeNode2) {
319
- OperationTypeNode2["QUERY"] = "query";
320
- OperationTypeNode2["MUTATION"] = "mutation";
321
- OperationTypeNode2["SUBSCRIPTION"] = "subscription";
322
- })(OperationTypeNode || (OperationTypeNode = {}));
323
-
324
- // ../../node_modules/graphql/language/kinds.mjs
325
- var Kind;
326
- (function(Kind2) {
327
- Kind2["NAME"] = "Name";
328
- Kind2["DOCUMENT"] = "Document";
329
- Kind2["OPERATION_DEFINITION"] = "OperationDefinition";
330
- Kind2["VARIABLE_DEFINITION"] = "VariableDefinition";
331
- Kind2["SELECTION_SET"] = "SelectionSet";
332
- Kind2["FIELD"] = "Field";
333
- Kind2["ARGUMENT"] = "Argument";
334
- Kind2["FRAGMENT_SPREAD"] = "FragmentSpread";
335
- Kind2["INLINE_FRAGMENT"] = "InlineFragment";
336
- Kind2["FRAGMENT_DEFINITION"] = "FragmentDefinition";
337
- Kind2["VARIABLE"] = "Variable";
338
- Kind2["INT"] = "IntValue";
339
- Kind2["FLOAT"] = "FloatValue";
340
- Kind2["STRING"] = "StringValue";
341
- Kind2["BOOLEAN"] = "BooleanValue";
342
- Kind2["NULL"] = "NullValue";
343
- Kind2["ENUM"] = "EnumValue";
344
- Kind2["LIST"] = "ListValue";
345
- Kind2["OBJECT"] = "ObjectValue";
346
- Kind2["OBJECT_FIELD"] = "ObjectField";
347
- Kind2["DIRECTIVE"] = "Directive";
348
- Kind2["NAMED_TYPE"] = "NamedType";
349
- Kind2["LIST_TYPE"] = "ListType";
350
- Kind2["NON_NULL_TYPE"] = "NonNullType";
351
- Kind2["SCHEMA_DEFINITION"] = "SchemaDefinition";
352
- Kind2["OPERATION_TYPE_DEFINITION"] = "OperationTypeDefinition";
353
- Kind2["SCALAR_TYPE_DEFINITION"] = "ScalarTypeDefinition";
354
- Kind2["OBJECT_TYPE_DEFINITION"] = "ObjectTypeDefinition";
355
- Kind2["FIELD_DEFINITION"] = "FieldDefinition";
356
- Kind2["INPUT_VALUE_DEFINITION"] = "InputValueDefinition";
357
- Kind2["INTERFACE_TYPE_DEFINITION"] = "InterfaceTypeDefinition";
358
- Kind2["UNION_TYPE_DEFINITION"] = "UnionTypeDefinition";
359
- Kind2["ENUM_TYPE_DEFINITION"] = "EnumTypeDefinition";
360
- Kind2["ENUM_VALUE_DEFINITION"] = "EnumValueDefinition";
361
- Kind2["INPUT_OBJECT_TYPE_DEFINITION"] = "InputObjectTypeDefinition";
362
- Kind2["DIRECTIVE_DEFINITION"] = "DirectiveDefinition";
363
- Kind2["SCHEMA_EXTENSION"] = "SchemaExtension";
364
- Kind2["DIRECTIVE_EXTENSION"] = "DirectiveExtension";
365
- Kind2["SCALAR_TYPE_EXTENSION"] = "ScalarTypeExtension";
366
- Kind2["OBJECT_TYPE_EXTENSION"] = "ObjectTypeExtension";
367
- Kind2["INTERFACE_TYPE_EXTENSION"] = "InterfaceTypeExtension";
368
- Kind2["UNION_TYPE_EXTENSION"] = "UnionTypeExtension";
369
- Kind2["ENUM_TYPE_EXTENSION"] = "EnumTypeExtension";
370
- Kind2["INPUT_OBJECT_TYPE_EXTENSION"] = "InputObjectTypeExtension";
371
- Kind2["TYPE_COORDINATE"] = "TypeCoordinate";
372
- Kind2["MEMBER_COORDINATE"] = "MemberCoordinate";
373
- Kind2["ARGUMENT_COORDINATE"] = "ArgumentCoordinate";
374
- Kind2["DIRECTIVE_COORDINATE"] = "DirectiveCoordinate";
375
- Kind2["DIRECTIVE_ARGUMENT_COORDINATE"] = "DirectiveArgumentCoordinate";
376
- })(Kind || (Kind = {}));
377
-
378
- // ../../node_modules/graphql/language/characterClasses.mjs
379
- function isWhiteSpace(code) {
380
- return code === 9 || code === 32;
381
- }
382
-
383
- // ../../node_modules/graphql/language/blockString.mjs
384
- function printBlockString(value, options) {
385
- const escapedValue = value.replace(/"""/g, '\\"""');
386
- const lines = escapedValue.split(/\r\n|[\n\r]/g);
387
- const isSingleLine = lines.length === 1;
388
- const forceLeadingNewLine = lines.length > 1 && lines.slice(1).every((line) => line.length === 0 || isWhiteSpace(line.charCodeAt(0)));
389
- const hasTrailingTripleQuotes = escapedValue.endsWith('\\"""');
390
- const hasTrailingQuote = value.endsWith('"') && !hasTrailingTripleQuotes;
391
- const hasTrailingSlash = value.endsWith("\\");
392
- const forceTrailingNewline = hasTrailingQuote || hasTrailingSlash;
393
- const printAsMultipleLines = !(options !== null && options !== void 0 && options.minimize) && // add leading and trailing new lines only if it improves readability
394
- (!isSingleLine || value.length > 70 || forceTrailingNewline || forceLeadingNewLine || hasTrailingTripleQuotes);
395
- let result2 = "";
396
- const skipLeadingNewLine = isSingleLine && isWhiteSpace(value.charCodeAt(0));
397
- if (printAsMultipleLines && !skipLeadingNewLine || forceLeadingNewLine) {
398
- result2 += "\n";
399
- }
400
- result2 += escapedValue;
401
- if (printAsMultipleLines || forceTrailingNewline) {
402
- result2 += "\n";
403
- }
404
- return '"""' + result2 + '"""';
405
- }
406
-
407
- // ../../node_modules/graphql/jsutils/inspect.mjs
408
- var MAX_ARRAY_LENGTH = 10;
409
- var MAX_RECURSIVE_DEPTH = 2;
410
- function inspect(value) {
411
- return formatValue(value, []);
412
- }
413
- function formatValue(value, seenValues) {
414
- switch (typeof value) {
415
- case "string":
416
- return JSON.stringify(value);
417
- case "function":
418
- return value.name ? `[function ${value.name}]` : "[function]";
419
- case "object":
420
- return formatObjectValue(value, seenValues);
421
- default:
422
- return String(value);
423
- }
424
- }
425
- function formatObjectValue(value, previouslySeenValues) {
426
- if (value === null) {
427
- return "null";
428
- }
429
- if (previouslySeenValues.includes(value)) {
430
- return "[Circular]";
431
- }
432
- const seenValues = [...previouslySeenValues, value];
433
- if (isJSONable(value)) {
434
- const jsonValue = value.toJSON();
435
- if (jsonValue !== value) {
436
- return typeof jsonValue === "string" ? jsonValue : formatValue(jsonValue, seenValues);
437
- }
438
- } else if (Array.isArray(value)) {
439
- return formatArray(value, seenValues);
440
- }
441
- return formatObject(value, seenValues);
442
- }
443
- function isJSONable(value) {
444
- return typeof value.toJSON === "function";
445
- }
446
- function formatObject(object, seenValues) {
447
- const entries = Object.entries(object);
448
- if (entries.length === 0) {
449
- return "{}";
450
- }
451
- if (seenValues.length > MAX_RECURSIVE_DEPTH) {
452
- return "[" + getObjectTag(object) + "]";
453
- }
454
- const properties = entries.map(
455
- ([key, value]) => key + ": " + formatValue(value, seenValues)
456
- );
457
- return "{ " + properties.join(", ") + " }";
458
- }
459
- function formatArray(array, seenValues) {
460
- if (array.length === 0) {
461
- return "[]";
462
- }
463
- if (seenValues.length > MAX_RECURSIVE_DEPTH) {
464
- return "[Array]";
465
- }
466
- const len = Math.min(MAX_ARRAY_LENGTH, array.length);
467
- const remaining = array.length - len;
468
- const items = [];
469
- for (let i = 0; i < len; ++i) {
470
- items.push(formatValue(array[i], seenValues));
471
- }
472
- if (remaining === 1) {
473
- items.push("... 1 more item");
474
- } else if (remaining > 1) {
475
- items.push(`... ${remaining} more items`);
476
- }
477
- return "[" + items.join(", ") + "]";
478
- }
479
- function getObjectTag(object) {
480
- const tag = Object.prototype.toString.call(object).replace(/^\[object /, "").replace(/]$/, "");
481
- if (tag === "Object" && typeof object.constructor === "function") {
482
- const name = object.constructor.name;
483
- if (typeof name === "string" && name !== "") {
484
- return name;
485
- }
486
- }
487
- return tag;
488
- }
489
-
490
- // ../../node_modules/graphql/language/printString.mjs
491
- function printString(str) {
492
- return `"${str.replace(escapedRegExp, escapedReplacer)}"`;
493
- }
494
- var escapedRegExp = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g;
495
- function escapedReplacer(str) {
496
- return escapeSequences[str.charCodeAt(0)];
497
- }
498
- var escapeSequences = [
499
- "\\u0000",
500
- "\\u0001",
501
- "\\u0002",
502
- "\\u0003",
503
- "\\u0004",
504
- "\\u0005",
505
- "\\u0006",
506
- "\\u0007",
507
- "\\b",
508
- "\\t",
509
- "\\n",
510
- "\\u000B",
511
- "\\f",
512
- "\\r",
513
- "\\u000E",
514
- "\\u000F",
515
- "\\u0010",
516
- "\\u0011",
517
- "\\u0012",
518
- "\\u0013",
519
- "\\u0014",
520
- "\\u0015",
521
- "\\u0016",
522
- "\\u0017",
523
- "\\u0018",
524
- "\\u0019",
525
- "\\u001A",
526
- "\\u001B",
527
- "\\u001C",
528
- "\\u001D",
529
- "\\u001E",
530
- "\\u001F",
531
- "",
532
- "",
533
- '\\"',
534
- "",
535
- "",
536
- "",
537
- "",
538
- "",
539
- "",
540
- "",
541
- "",
542
- "",
543
- "",
544
- "",
545
- "",
546
- "",
547
- // 2F
548
- "",
549
- "",
550
- "",
551
- "",
552
- "",
553
- "",
554
- "",
555
- "",
556
- "",
557
- "",
558
- "",
559
- "",
560
- "",
561
- "",
562
- "",
563
- "",
564
- // 3F
565
- "",
566
- "",
567
- "",
568
- "",
569
- "",
570
- "",
571
- "",
572
- "",
573
- "",
574
- "",
575
- "",
576
- "",
577
- "",
578
- "",
579
- "",
580
- "",
581
- // 4F
582
- "",
583
- "",
584
- "",
585
- "",
586
- "",
587
- "",
588
- "",
589
- "",
590
- "",
591
- "",
592
- "",
593
- "",
594
- "\\\\",
595
- "",
596
- "",
597
- "",
598
- // 5F
599
- "",
600
- "",
601
- "",
602
- "",
603
- "",
604
- "",
605
- "",
606
- "",
607
- "",
608
- "",
609
- "",
610
- "",
611
- "",
612
- "",
613
- "",
614
- "",
615
- // 6F
616
- "",
617
- "",
618
- "",
619
- "",
620
- "",
621
- "",
622
- "",
623
- "",
624
- "",
625
- "",
626
- "",
627
- "",
628
- "",
629
- "",
630
- "",
631
- "\\u007F",
632
- "\\u0080",
633
- "\\u0081",
634
- "\\u0082",
635
- "\\u0083",
636
- "\\u0084",
637
- "\\u0085",
638
- "\\u0086",
639
- "\\u0087",
640
- "\\u0088",
641
- "\\u0089",
642
- "\\u008A",
643
- "\\u008B",
644
- "\\u008C",
645
- "\\u008D",
646
- "\\u008E",
647
- "\\u008F",
648
- "\\u0090",
649
- "\\u0091",
650
- "\\u0092",
651
- "\\u0093",
652
- "\\u0094",
653
- "\\u0095",
654
- "\\u0096",
655
- "\\u0097",
656
- "\\u0098",
657
- "\\u0099",
658
- "\\u009A",
659
- "\\u009B",
660
- "\\u009C",
661
- "\\u009D",
662
- "\\u009E",
663
- "\\u009F"
664
- ];
665
-
666
- // ../../node_modules/graphql/language/visitor.mjs
667
- var BREAK = Object.freeze({});
668
- function visit(root2, visitor, visitorKeys = QueryDocumentKeys) {
669
- const enterLeaveMap = /* @__PURE__ */ new Map();
670
- for (const kind of Object.values(Kind)) {
671
- enterLeaveMap.set(kind, getEnterLeaveForKind(visitor, kind));
672
- }
673
- let stack = void 0;
674
- let inArray = Array.isArray(root2);
675
- let keys = [root2];
676
- let index = -1;
677
- let edits = [];
678
- let node = root2;
679
- let key = void 0;
680
- let parent = void 0;
681
- const path = [];
682
- const ancestors = [];
683
- do {
684
- index++;
685
- const isLeaving = index === keys.length;
686
- const isEdited = isLeaving && edits.length !== 0;
687
- if (isLeaving) {
688
- key = ancestors.length === 0 ? void 0 : path[path.length - 1];
689
- node = parent;
690
- parent = ancestors.pop();
691
- if (isEdited) {
692
- if (inArray) {
693
- node = node.slice();
694
- let editOffset = 0;
695
- for (const [editKey, editValue] of edits) {
696
- const arrayKey = editKey - editOffset;
697
- if (editValue === null) {
698
- node.splice(arrayKey, 1);
699
- editOffset++;
700
- } else {
701
- node[arrayKey] = editValue;
702
- }
703
- }
704
- } else {
705
- node = { ...node };
706
- for (const [editKey, editValue] of edits) {
707
- node[editKey] = editValue;
708
- }
709
- }
710
- }
711
- index = stack.index;
712
- keys = stack.keys;
713
- edits = stack.edits;
714
- inArray = stack.inArray;
715
- stack = stack.prev;
716
- } else if (parent) {
717
- key = inArray ? index : keys[index];
718
- node = parent[key];
719
- if (node === null || node === void 0) {
720
- continue;
721
- }
722
- path.push(key);
723
- }
724
- let result2;
725
- if (!Array.isArray(node)) {
726
- var _enterLeaveMap$get, _enterLeaveMap$get2;
727
- isNode(node) || devAssert(false, `Invalid AST Node: ${inspect(node)}.`);
728
- const visitFn = isLeaving ? (_enterLeaveMap$get = enterLeaveMap.get(node.kind)) === null || _enterLeaveMap$get === void 0 ? void 0 : _enterLeaveMap$get.leave : (_enterLeaveMap$get2 = enterLeaveMap.get(node.kind)) === null || _enterLeaveMap$get2 === void 0 ? void 0 : _enterLeaveMap$get2.enter;
729
- result2 = visitFn === null || visitFn === void 0 ? void 0 : visitFn.call(visitor, node, key, parent, path, ancestors);
730
- if (result2 === BREAK) {
731
- break;
732
- }
733
- if (result2 === false) {
734
- if (!isLeaving) {
735
- path.pop();
736
- continue;
737
- }
738
- } else if (result2 !== void 0) {
739
- edits.push([key, result2]);
740
- if (!isLeaving) {
741
- if (isNode(result2)) {
742
- node = result2;
743
- } else {
744
- path.pop();
745
- continue;
746
- }
747
- }
748
- }
749
- }
750
- if (result2 === void 0 && isEdited) {
751
- edits.push([key, node]);
752
- }
753
- if (isLeaving) {
754
- path.pop();
755
- } else {
756
- var _node$kind;
757
- stack = {
758
- inArray,
759
- index,
760
- keys,
761
- edits,
762
- prev: stack
763
- };
764
- inArray = Array.isArray(node);
765
- keys = inArray ? node : (_node$kind = visitorKeys[node.kind]) !== null && _node$kind !== void 0 ? _node$kind : [];
766
- index = -1;
767
- edits = [];
768
- if (parent) {
769
- ancestors.push(parent);
770
- }
771
- parent = node;
772
- }
773
- } while (stack !== void 0);
774
- if (edits.length !== 0) {
775
- return edits[edits.length - 1][1];
776
- }
777
- return root2;
778
- }
779
- function getEnterLeaveForKind(visitor, kind) {
780
- const kindVisitor = visitor[kind];
781
- if (typeof kindVisitor === "object") {
782
- return kindVisitor;
783
- } else if (typeof kindVisitor === "function") {
784
- return {
785
- enter: kindVisitor,
786
- leave: void 0
787
- };
788
- }
789
- return {
790
- enter: visitor.enter,
791
- leave: visitor.leave
792
- };
793
- }
794
-
795
- // ../../node_modules/graphql/language/printer.mjs
796
- function print(ast) {
797
- return visit(ast, printDocASTReducer);
798
- }
799
- var MAX_LINE_LENGTH = 80;
800
- var printDocASTReducer = {
801
- Name: {
802
- leave: (node) => node.value
803
- },
804
- Variable: {
805
- leave: (node) => "$" + node.name
806
- },
807
- // Document
808
- Document: {
809
- leave: (node) => join(node.definitions, "\n\n")
810
- },
811
- OperationDefinition: {
812
- leave(node) {
813
- const varDefs = hasMultilineItems(node.variableDefinitions) ? wrap2("(\n", join(node.variableDefinitions, "\n"), "\n)") : wrap2("(", join(node.variableDefinitions, ", "), ")");
814
- const prefix = wrap2("", node.description, "\n") + join(
815
- [
816
- node.operation,
817
- join([node.name, varDefs]),
818
- join(node.directives, " ")
819
- ],
820
- " "
821
- );
822
- return (prefix === "query" ? "" : prefix + " ") + node.selectionSet;
823
- }
824
- },
825
- VariableDefinition: {
826
- leave: ({ variable, type, defaultValue, directives, description }) => wrap2("", description, "\n") + variable + ": " + type + wrap2(" = ", defaultValue) + wrap2(" ", join(directives, " "))
827
- },
828
- SelectionSet: {
829
- leave: ({ selections }) => block(selections)
830
- },
831
- Field: {
832
- leave({ alias, name, arguments: args, directives, selectionSet }) {
833
- const prefix = wrap2("", alias, ": ") + name;
834
- let argsLine = prefix + wrap2("(", join(args, ", "), ")");
835
- if (argsLine.length > MAX_LINE_LENGTH) {
836
- argsLine = prefix + wrap2("(\n", indent(join(args, "\n")), "\n)");
837
- }
838
- return join([argsLine, join(directives, " "), selectionSet], " ");
839
- }
840
- },
841
- Argument: {
842
- leave: ({ name, value }) => name + ": " + value
843
- },
844
- // Fragments
845
- FragmentSpread: {
846
- leave: ({ name, directives }) => "..." + name + wrap2(" ", join(directives, " "))
847
- },
848
- InlineFragment: {
849
- leave: ({ typeCondition, directives, selectionSet }) => join(
850
- [
851
- "...",
852
- wrap2("on ", typeCondition),
853
- join(directives, " "),
854
- selectionSet
855
- ],
856
- " "
857
- )
858
- },
859
- FragmentDefinition: {
860
- leave: ({
861
- name,
862
- typeCondition,
863
- variableDefinitions,
864
- directives,
865
- selectionSet,
866
- description
867
- }) => wrap2("", description, "\n") + // Note: fragment variable definitions are experimental and may be changed
868
- // or removed in the future.
869
- `fragment ${name}${wrap2("(", join(variableDefinitions, ", "), ")")} on ${typeCondition} ${wrap2("", join(directives, " "), " ")}` + selectionSet
870
- },
871
- // Value
872
- IntValue: {
873
- leave: ({ value }) => value
874
- },
875
- FloatValue: {
876
- leave: ({ value }) => value
877
- },
878
- StringValue: {
879
- leave: ({ value, block: isBlockString }) => isBlockString ? printBlockString(value) : printString(value)
880
- },
881
- BooleanValue: {
882
- leave: ({ value }) => value ? "true" : "false"
883
- },
884
- NullValue: {
885
- leave: () => "null"
886
- },
887
- EnumValue: {
888
- leave: ({ value }) => value
889
- },
890
- ListValue: {
891
- leave: ({ values }) => "[" + join(values, ", ") + "]"
892
- },
893
- ObjectValue: {
894
- leave: ({ fields }) => "{" + join(fields, ", ") + "}"
895
- },
896
- ObjectField: {
897
- leave: ({ name, value }) => name + ": " + value
898
- },
899
- // Directive
900
- Directive: {
901
- leave: ({ name, arguments: args }) => "@" + name + wrap2("(", join(args, ", "), ")")
902
- },
903
- // Type
904
- NamedType: {
905
- leave: ({ name }) => name
906
- },
907
- ListType: {
908
- leave: ({ type }) => "[" + type + "]"
909
- },
910
- NonNullType: {
911
- leave: ({ type }) => type + "!"
912
- },
913
- // Type System Definitions
914
- SchemaDefinition: {
915
- leave: ({ description, directives, operationTypes }) => wrap2("", description, "\n") + join(["schema", join(directives, " "), block(operationTypes)], " ")
916
- },
917
- OperationTypeDefinition: {
918
- leave: ({ operation, type }) => operation + ": " + type
919
- },
920
- ScalarTypeDefinition: {
921
- leave: ({ description, name, directives }) => wrap2("", description, "\n") + join(["scalar", name, join(directives, " ")], " ")
922
- },
923
- ObjectTypeDefinition: {
924
- leave: ({ description, name, interfaces, directives, fields }) => wrap2("", description, "\n") + join(
925
- [
926
- "type",
927
- name,
928
- wrap2("implements ", join(interfaces, " & ")),
929
- join(directives, " "),
930
- block(fields)
931
- ],
932
- " "
933
- )
934
- },
935
- FieldDefinition: {
936
- leave: ({ description, name, arguments: args, type, directives }) => wrap2("", description, "\n") + name + (hasMultilineItems(args) ? wrap2("(\n", indent(join(args, "\n")), "\n)") : wrap2("(", join(args, ", "), ")")) + ": " + type + wrap2(" ", join(directives, " "))
937
- },
938
- InputValueDefinition: {
939
- leave: ({ description, name, type, defaultValue, directives }) => wrap2("", description, "\n") + join(
940
- [name + ": " + type, wrap2("= ", defaultValue), join(directives, " ")],
941
- " "
942
- )
943
- },
944
- InterfaceTypeDefinition: {
945
- leave: ({ description, name, interfaces, directives, fields }) => wrap2("", description, "\n") + join(
946
- [
947
- "interface",
948
- name,
949
- wrap2("implements ", join(interfaces, " & ")),
950
- join(directives, " "),
951
- block(fields)
952
- ],
953
- " "
954
- )
955
- },
956
- UnionTypeDefinition: {
957
- leave: ({ description, name, directives, types }) => wrap2("", description, "\n") + join(
958
- ["union", name, join(directives, " "), wrap2("= ", join(types, " | "))],
959
- " "
960
- )
961
- },
962
- EnumTypeDefinition: {
963
- leave: ({ description, name, directives, values }) => wrap2("", description, "\n") + join(["enum", name, join(directives, " "), block(values)], " ")
964
- },
965
- EnumValueDefinition: {
966
- leave: ({ description, name, directives }) => wrap2("", description, "\n") + join([name, join(directives, " ")], " ")
967
- },
968
- InputObjectTypeDefinition: {
969
- leave: ({ description, name, directives, fields }) => wrap2("", description, "\n") + join(["input", name, join(directives, " "), block(fields)], " ")
970
- },
971
- DirectiveDefinition: {
972
- leave: ({
973
- description,
974
- name,
975
- arguments: args,
976
- directives,
977
- repeatable,
978
- locations
979
- }) => wrap2("", description, "\n") + "directive @" + name + (hasMultilineItems(args) ? wrap2("(\n", indent(join(args, "\n")), "\n)") : wrap2("(", join(args, ", "), ")")) + wrap2(" ", join(directives, " ")) + (repeatable ? " repeatable" : "") + " on " + join(locations, " | ")
980
- },
981
- SchemaExtension: {
982
- leave: ({ directives, operationTypes }) => join(
983
- ["extend schema", join(directives, " "), block(operationTypes)],
984
- " "
985
- )
986
- },
987
- ScalarTypeExtension: {
988
- leave: ({ name, directives }) => join(["extend scalar", name, join(directives, " ")], " ")
989
- },
990
- ObjectTypeExtension: {
991
- leave: ({ name, interfaces, directives, fields }) => join(
992
- [
993
- "extend type",
994
- name,
995
- wrap2("implements ", join(interfaces, " & ")),
996
- join(directives, " "),
997
- block(fields)
998
- ],
999
- " "
1000
- )
1001
- },
1002
- InterfaceTypeExtension: {
1003
- leave: ({ name, interfaces, directives, fields }) => join(
1004
- [
1005
- "extend interface",
1006
- name,
1007
- wrap2("implements ", join(interfaces, " & ")),
1008
- join(directives, " "),
1009
- block(fields)
1010
- ],
1011
- " "
1012
- )
1013
- },
1014
- UnionTypeExtension: {
1015
- leave: ({ name, directives, types }) => join(
1016
- [
1017
- "extend union",
1018
- name,
1019
- join(directives, " "),
1020
- wrap2("= ", join(types, " | "))
1021
- ],
1022
- " "
1023
- )
1024
- },
1025
- EnumTypeExtension: {
1026
- leave: ({ name, directives, values }) => join(["extend enum", name, join(directives, " "), block(values)], " ")
1027
- },
1028
- InputObjectTypeExtension: {
1029
- leave: ({ name, directives, fields }) => join(["extend input", name, join(directives, " "), block(fields)], " ")
1030
- },
1031
- DirectiveExtension: {
1032
- leave: ({ name, directives }) => join(["extend directive @" + name, join(directives, " ")], " ")
1033
- },
1034
- // Schema Coordinates
1035
- TypeCoordinate: {
1036
- leave: ({ name }) => name
1037
- },
1038
- MemberCoordinate: {
1039
- leave: ({ name, memberName }) => join([name, wrap2(".", memberName)])
1040
- },
1041
- ArgumentCoordinate: {
1042
- leave: ({ name, fieldName, argumentName }) => join([name, wrap2(".", fieldName), wrap2("(", argumentName, ":)")])
1043
- },
1044
- DirectiveCoordinate: {
1045
- leave: ({ name }) => join(["@", name])
1046
- },
1047
- DirectiveArgumentCoordinate: {
1048
- leave: ({ name, argumentName }) => join(["@", name, wrap2("(", argumentName, ":)")])
1049
- }
1050
- };
1051
- function join(maybeArray, separator = "") {
1052
- var _maybeArray$filter$jo;
1053
- return (_maybeArray$filter$jo = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.filter((x) => x).join(separator)) !== null && _maybeArray$filter$jo !== void 0 ? _maybeArray$filter$jo : "";
1054
- }
1055
- function block(array) {
1056
- return wrap2("{\n", indent(join(array, "\n")), "\n}");
1057
- }
1058
- function wrap2(start, maybeString, end = "") {
1059
- return maybeString != null && maybeString !== "" ? start + maybeString + end : "";
1060
- }
1061
- function indent(str) {
1062
- return wrap2(" ", str.replace(/\n/g, "\n "));
1063
- }
1064
- function hasMultilineItems(maybeArray) {
1065
- var _maybeArray$some;
1066
- return (_maybeArray$some = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.some((str) => str.includes("\n"))) !== null && _maybeArray$some !== void 0 ? _maybeArray$some : false;
1067
- }
1068
-
1069
- // ../../node_modules/@wry/caches/lib/weak.js
1070
- function noop() {
1071
- }
1072
- var defaultDispose = noop;
1073
- var _WeakRef = typeof WeakRef !== "undefined" ? WeakRef : function(value) {
1074
- return { deref: () => value };
1075
- };
1076
- var _WeakMap = typeof WeakMap !== "undefined" ? WeakMap : Map;
1077
- var _FinalizationRegistry = typeof FinalizationRegistry !== "undefined" ? FinalizationRegistry : function() {
1078
- return {
1079
- register: noop,
1080
- unregister: noop
1081
- };
1082
- };
1083
- var finalizationBatchSize = 10024;
1084
- var WeakCache = class {
1085
- constructor(max = Infinity, dispose = defaultDispose) {
1086
- this.max = max;
1087
- this.dispose = dispose;
1088
- this.map = new _WeakMap();
1089
- this.newest = null;
1090
- this.oldest = null;
1091
- this.unfinalizedNodes = /* @__PURE__ */ new Set();
1092
- this.finalizationScheduled = false;
1093
- this.size = 0;
1094
- this.finalize = () => {
1095
- const iterator = this.unfinalizedNodes.values();
1096
- for (let i = 0; i < finalizationBatchSize; i++) {
1097
- const node = iterator.next().value;
1098
- if (!node)
1099
- break;
1100
- this.unfinalizedNodes.delete(node);
1101
- const key = node.key;
1102
- delete node.key;
1103
- node.keyRef = new _WeakRef(key);
1104
- this.registry.register(key, node, node);
1105
- }
1106
- if (this.unfinalizedNodes.size > 0) {
1107
- queueMicrotask(this.finalize);
1108
- } else {
1109
- this.finalizationScheduled = false;
1110
- }
1111
- };
1112
- this.registry = new _FinalizationRegistry(this.deleteNode.bind(this));
1113
- }
1114
- has(key) {
1115
- return this.map.has(key);
1116
- }
1117
- get(key) {
1118
- const node = this.getNode(key);
1119
- return node && node.value;
1120
- }
1121
- getNode(key) {
1122
- const node = this.map.get(key);
1123
- if (node && node !== this.newest) {
1124
- const { older, newer } = node;
1125
- if (newer) {
1126
- newer.older = older;
1127
- }
1128
- if (older) {
1129
- older.newer = newer;
1130
- }
1131
- node.older = this.newest;
1132
- node.older.newer = node;
1133
- node.newer = null;
1134
- this.newest = node;
1135
- if (node === this.oldest) {
1136
- this.oldest = newer;
1137
- }
1138
- }
1139
- return node;
1140
- }
1141
- set(key, value) {
1142
- let node = this.getNode(key);
1143
- if (node) {
1144
- return node.value = value;
1145
- }
1146
- node = {
1147
- key,
1148
- value,
1149
- newer: null,
1150
- older: this.newest
1151
- };
1152
- if (this.newest) {
1153
- this.newest.newer = node;
1154
- }
1155
- this.newest = node;
1156
- this.oldest = this.oldest || node;
1157
- this.scheduleFinalization(node);
1158
- this.map.set(key, node);
1159
- this.size++;
1160
- return node.value;
1161
- }
1162
- clean() {
1163
- while (this.oldest && this.size > this.max) {
1164
- this.deleteNode(this.oldest);
1165
- }
1166
- }
1167
- deleteNode(node) {
1168
- if (node === this.newest) {
1169
- this.newest = node.older;
1170
- }
1171
- if (node === this.oldest) {
1172
- this.oldest = node.newer;
1173
- }
1174
- if (node.newer) {
1175
- node.newer.older = node.older;
1176
- }
1177
- if (node.older) {
1178
- node.older.newer = node.newer;
1179
- }
1180
- this.size--;
1181
- const key = node.key || node.keyRef && node.keyRef.deref();
1182
- this.dispose(node.value, key);
1183
- if (!node.keyRef) {
1184
- this.unfinalizedNodes.delete(node);
1185
- } else {
1186
- this.registry.unregister(node);
1187
- }
1188
- if (key)
1189
- this.map.delete(key);
1190
- }
1191
- delete(key) {
1192
- const node = this.map.get(key);
1193
- if (node) {
1194
- this.deleteNode(node);
1195
- return true;
1196
- }
1197
- return false;
1198
- }
1199
- scheduleFinalization(node) {
1200
- this.unfinalizedNodes.add(node);
1201
- if (!this.finalizationScheduled) {
1202
- this.finalizationScheduled = true;
1203
- queueMicrotask(this.finalize);
1204
- }
1205
- }
1206
- };
1207
-
1208
- // ../../node_modules/@apollo/client/utilities/caching/caches.js
1209
- var scheduledCleanup = /* @__PURE__ */ new WeakSet();
1210
- function schedule(cache) {
1211
- if (cache.size <= (cache.max || -1)) {
1212
- return;
1213
- }
1214
- if (!scheduledCleanup.has(cache)) {
1215
- scheduledCleanup.add(cache);
1216
- setTimeout(function() {
1217
- cache.clean();
1218
- scheduledCleanup.delete(cache);
1219
- }, 100);
1220
- }
1221
- }
1222
- var AutoCleanedWeakCache = function(max, dispose) {
1223
- var cache = new WeakCache(max, dispose);
1224
- cache.set = function(key, value) {
1225
- var ret = WeakCache.prototype.set.call(this, key, value);
1226
- schedule(this);
1227
- return ret;
1228
- };
1229
- return cache;
1230
- };
1231
-
1232
- // ../../node_modules/@apollo/client/utilities/caching/sizes.js
1233
- var cacheSizeSymbol = /* @__PURE__ */ Symbol.for("apollo.cacheSize");
1234
- var cacheSizes = __assign({}, global_default[cacheSizeSymbol]);
1235
-
1236
- // ../../node_modules/@apollo/client/utilities/caching/getMemoryInternals.js
1237
- var globalCaches = {};
1238
- function registerGlobalCache(name, getSize) {
1239
- globalCaches[name] = getSize;
1240
- }
1241
- var getApolloClientMemoryInternals = globalThis.__DEV__ !== false ? _getApolloClientMemoryInternals : void 0;
1242
- var getInMemoryCacheMemoryInternals = globalThis.__DEV__ !== false ? _getInMemoryCacheMemoryInternals : void 0;
1243
- var getApolloCacheMemoryInternals = globalThis.__DEV__ !== false ? _getApolloCacheMemoryInternals : void 0;
1244
- function getCurrentCacheSizes() {
1245
- var defaults = {
1246
- parser: 1e3,
1247
- canonicalStringify: 1e3,
1248
- print: 2e3,
1249
- "documentTransform.cache": 2e3,
1250
- "queryManager.getDocumentInfo": 2e3,
1251
- "PersistedQueryLink.persistedQueryHashes": 2e3,
1252
- "fragmentRegistry.transform": 2e3,
1253
- "fragmentRegistry.lookup": 1e3,
1254
- "fragmentRegistry.findFragmentSpreads": 4e3,
1255
- "cache.fragmentQueryDocuments": 1e3,
1256
- "removeTypenameFromVariables.getVariableDefinitions": 2e3,
1257
- "inMemoryCache.maybeBroadcastWatch": 5e3,
1258
- "inMemoryCache.executeSelectionSet": 5e4,
1259
- "inMemoryCache.executeSubSelectedArray": 1e4
1260
- };
1261
- return Object.fromEntries(Object.entries(defaults).map(function(_a3) {
1262
- var k = _a3[0], v = _a3[1];
1263
- return [
1264
- k,
1265
- cacheSizes[k] || v
1266
- ];
1267
- }));
1268
- }
1269
- function _getApolloClientMemoryInternals() {
1270
- var _a3, _b, _c, _d, _e;
1271
- if (!(globalThis.__DEV__ !== false))
1272
- throw new Error("only supported in development mode");
1273
- return {
1274
- limits: getCurrentCacheSizes(),
1275
- sizes: __assign({ print: (_a3 = globalCaches.print) === null || _a3 === void 0 ? void 0 : _a3.call(globalCaches), parser: (_b = globalCaches.parser) === null || _b === void 0 ? void 0 : _b.call(globalCaches), canonicalStringify: (_c = globalCaches.canonicalStringify) === null || _c === void 0 ? void 0 : _c.call(globalCaches), links: linkInfo(this.link), queryManager: {
1276
- getDocumentInfo: this["queryManager"]["transformCache"].size,
1277
- documentTransforms: transformInfo(this["queryManager"].documentTransform)
1278
- } }, (_e = (_d = this.cache).getMemoryInternals) === null || _e === void 0 ? void 0 : _e.call(_d))
1279
- };
1280
- }
1281
- function _getApolloCacheMemoryInternals() {
1282
- return {
1283
- cache: {
1284
- fragmentQueryDocuments: getWrapperInformation(this["getFragmentDoc"])
1285
- }
1286
- };
1287
- }
1288
- function _getInMemoryCacheMemoryInternals() {
1289
- var fragments = this.config.fragments;
1290
- return __assign(__assign({}, _getApolloCacheMemoryInternals.apply(this)), { addTypenameDocumentTransform: transformInfo(this["addTypenameTransform"]), inMemoryCache: {
1291
- executeSelectionSet: getWrapperInformation(this["storeReader"]["executeSelectionSet"]),
1292
- executeSubSelectedArray: getWrapperInformation(this["storeReader"]["executeSubSelectedArray"]),
1293
- maybeBroadcastWatch: getWrapperInformation(this["maybeBroadcastWatch"])
1294
- }, fragmentRegistry: {
1295
- findFragmentSpreads: getWrapperInformation(fragments === null || fragments === void 0 ? void 0 : fragments.findFragmentSpreads),
1296
- lookup: getWrapperInformation(fragments === null || fragments === void 0 ? void 0 : fragments.lookup),
1297
- transform: getWrapperInformation(fragments === null || fragments === void 0 ? void 0 : fragments.transform)
1298
- } });
1299
- }
1300
- function isWrapper(f) {
1301
- return !!f && "dirtyKey" in f;
1302
- }
1303
- function getWrapperInformation(f) {
1304
- return isWrapper(f) ? f.size : void 0;
1305
- }
1306
- function isDefined(value) {
1307
- return value != null;
1308
- }
1309
- function transformInfo(transform) {
1310
- return recurseTransformInfo(transform).map(function(cache) {
1311
- return { cache };
1312
- });
1313
- }
1314
- function recurseTransformInfo(transform) {
1315
- return transform ? __spreadArray(__spreadArray([
1316
- getWrapperInformation(transform === null || transform === void 0 ? void 0 : transform["performWork"])
1317
- ], recurseTransformInfo(transform === null || transform === void 0 ? void 0 : transform["left"]), true), recurseTransformInfo(transform === null || transform === void 0 ? void 0 : transform["right"]), true).filter(isDefined) : [];
1318
- }
1319
- function linkInfo(link) {
1320
- var _a3;
1321
- return link ? __spreadArray(__spreadArray([
1322
- (_a3 = link === null || link === void 0 ? void 0 : link.getMemoryInternals) === null || _a3 === void 0 ? void 0 : _a3.call(link)
1323
- ], linkInfo(link === null || link === void 0 ? void 0 : link.left), true), linkInfo(link === null || link === void 0 ? void 0 : link.right), true).filter(isDefined) : [];
1324
- }
1325
-
1326
- // ../../node_modules/@apollo/client/utilities/graphql/getFromAST.js
1327
- function getOperationName(doc) {
1328
- return doc.definitions.filter(function(definition) {
1329
- return definition.kind === "OperationDefinition" && !!definition.name;
1330
- }).map(function(x) {
1331
- return x.name.value;
1332
- })[0] || null;
1333
- }
1334
-
1335
- // ../../node_modules/optimism/node_modules/@wry/trie/lib/index.js
1336
- var { forEach, slice } = Array.prototype;
1337
- var { hasOwnProperty } = Object.prototype;
1338
-
1339
- // ../../node_modules/@wry/context/lib/slot.js
1340
- var currentContext = null;
1341
- var MISSING_VALUE = {};
1342
- var idCounter = 1;
1343
- var makeSlotClass = () => class Slot {
1344
- constructor() {
1345
- this.id = [
1346
- "slot",
1347
- idCounter++,
1348
- Date.now(),
1349
- Math.random().toString(36).slice(2)
1350
- ].join(":");
1351
- }
1352
- hasValue() {
1353
- for (let context = currentContext; context; context = context.parent) {
1354
- if (this.id in context.slots) {
1355
- const value = context.slots[this.id];
1356
- if (value === MISSING_VALUE)
1357
- break;
1358
- if (context !== currentContext) {
1359
- currentContext.slots[this.id] = value;
1360
- }
1361
- return true;
1362
- }
1363
- }
1364
- if (currentContext) {
1365
- currentContext.slots[this.id] = MISSING_VALUE;
1366
- }
1367
- return false;
1368
- }
1369
- getValue() {
1370
- if (this.hasValue()) {
1371
- return currentContext.slots[this.id];
1372
- }
1373
- }
1374
- withValue(value, callback, args, thisArg) {
1375
- const slots = {
1376
- __proto__: null,
1377
- [this.id]: value
1378
- };
1379
- const parent = currentContext;
1380
- currentContext = { parent, slots };
1381
- try {
1382
- return callback.apply(thisArg, args);
1383
- } finally {
1384
- currentContext = parent;
1385
- }
1386
- }
1387
- // Capture the current context and wrap a callback function so that it
1388
- // reestablishes the captured context when called.
1389
- static bind(callback) {
1390
- const context = currentContext;
1391
- return function() {
1392
- const saved = currentContext;
1393
- try {
1394
- currentContext = context;
1395
- return callback.apply(this, arguments);
1396
- } finally {
1397
- currentContext = saved;
1398
- }
1399
- };
1400
- }
1401
- // Immediately run a callback function without any captured context.
1402
- static noContext(callback, args, thisArg) {
1403
- if (currentContext) {
1404
- const saved = currentContext;
1405
- try {
1406
- currentContext = null;
1407
- return callback.apply(thisArg, args);
1408
- } finally {
1409
- currentContext = saved;
1410
- }
1411
- } else {
1412
- return callback.apply(thisArg, args);
1413
- }
1414
- }
1415
- };
1416
- function maybe2(fn) {
1417
- try {
1418
- return fn();
1419
- } catch (ignored) {
1420
- }
1421
- }
1422
- var globalKey = "@wry/context:Slot";
1423
- var host = (
1424
- // Prefer globalThis when available.
1425
- // https://github.com/benjamn/wryware/issues/347
1426
- maybe2(() => globalThis) || // Fall back to global, which works in Node.js and may be converted by some
1427
- // bundlers to the appropriate identifier (window, self, ...) depending on the
1428
- // bundling target. https://github.com/endojs/endo/issues/576#issuecomment-1178515224
1429
- maybe2(() => global) || // Otherwise, use a dummy host that's local to this module. We used to fall
1430
- // back to using the Array constructor as a namespace, but that was flagged in
1431
- // https://github.com/benjamn/wryware/issues/347, and can be avoided.
1432
- /* @__PURE__ */ Object.create(null)
1433
- );
1434
- var globalHost = host;
1435
- var Slot = globalHost[globalKey] || // Earlier versions of this package stored the globalKey property on the Array
1436
- // constructor, so we check there as well, to prevent Slot class duplication.
1437
- Array[globalKey] || (function(Slot2) {
1438
- try {
1439
- Object.defineProperty(globalHost, globalKey, {
1440
- value: Slot2,
1441
- enumerable: false,
1442
- writable: false,
1443
- // When it was possible for globalHost to be the Array constructor (a
1444
- // legacy Slot dedup strategy), it was important for the property to be
1445
- // configurable:true so it could be deleted. That does not seem to be as
1446
- // important when globalHost is the global object, but I don't want to
1447
- // cause similar problems again, and configurable:true seems safest.
1448
- // https://github.com/endojs/endo/issues/576#issuecomment-1178274008
1449
- configurable: true
1450
- });
1451
- } finally {
1452
- return Slot2;
1453
- }
1454
- })(makeSlotClass());
1455
-
1456
- // ../../node_modules/@wry/context/lib/index.js
1457
- var { bind, noContext } = Slot;
1458
-
1459
- // ../../node_modules/optimism/lib/context.js
1460
- var parentEntrySlot = new Slot();
1461
-
1462
- // ../../node_modules/optimism/lib/helpers.js
1463
- var { hasOwnProperty: hasOwnProperty2 } = Object.prototype;
1464
- var arrayFromSet = Array.from || function(set) {
1465
- const array = [];
1466
- set.forEach((item) => array.push(item));
1467
- return array;
1468
- };
1469
- function maybeUnsubscribe(entryOrDep) {
1470
- const { unsubscribe } = entryOrDep;
1471
- if (typeof unsubscribe === "function") {
1472
- entryOrDep.unsubscribe = void 0;
1473
- unsubscribe();
1474
- }
1475
- }
1476
-
1477
- // ../../node_modules/optimism/lib/entry.js
1478
- var emptySetPool = [];
1479
- var POOL_TARGET_SIZE = 100;
1480
- function assert(condition, optionalMessage) {
1481
- if (!condition) {
1482
- throw new Error(optionalMessage || "assertion failure");
1483
- }
1484
- }
1485
- function valueIs(a, b) {
1486
- const len = a.length;
1487
- return (
1488
- // Unknown values are not equal to each other.
1489
- len > 0 && // Both values must be ordinary (or both exceptional) to be equal.
1490
- len === b.length && // The underlying value or exception must be the same.
1491
- a[len - 1] === b[len - 1]
1492
- );
1493
- }
1494
- function valueGet(value) {
1495
- switch (value.length) {
1496
- case 0:
1497
- throw new Error("unknown value");
1498
- case 1:
1499
- return value[0];
1500
- case 2:
1501
- throw value[1];
1502
- }
1503
- }
1504
- function valueCopy(value) {
1505
- return value.slice(0);
1506
- }
1507
- var Entry = class _Entry {
1508
- constructor(fn) {
1509
- this.fn = fn;
1510
- this.parents = /* @__PURE__ */ new Set();
1511
- this.childValues = /* @__PURE__ */ new Map();
1512
- this.dirtyChildren = null;
1513
- this.dirty = true;
1514
- this.recomputing = false;
1515
- this.value = [];
1516
- this.deps = null;
1517
- ++_Entry.count;
1518
- }
1519
- peek() {
1520
- if (this.value.length === 1 && !mightBeDirty(this)) {
1521
- rememberParent(this);
1522
- return this.value[0];
1523
- }
1524
- }
1525
- // This is the most important method of the Entry API, because it
1526
- // determines whether the cached this.value can be returned immediately,
1527
- // or must be recomputed. The overall performance of the caching system
1528
- // depends on the truth of the following observations: (1) this.dirty is
1529
- // usually false, (2) this.dirtyChildren is usually null/empty, and thus
1530
- // (3) valueGet(this.value) is usually returned without recomputation.
1531
- recompute(args) {
1532
- assert(!this.recomputing, "already recomputing");
1533
- rememberParent(this);
1534
- return mightBeDirty(this) ? reallyRecompute(this, args) : valueGet(this.value);
1535
- }
1536
- setDirty() {
1537
- if (this.dirty)
1538
- return;
1539
- this.dirty = true;
1540
- reportDirty(this);
1541
- maybeUnsubscribe(this);
1542
- }
1543
- dispose() {
1544
- this.setDirty();
1545
- forgetChildren(this);
1546
- eachParent(this, (parent, child) => {
1547
- parent.setDirty();
1548
- forgetChild(parent, this);
1549
- });
1550
- }
1551
- forget() {
1552
- this.dispose();
1553
- }
1554
- dependOn(dep2) {
1555
- dep2.add(this);
1556
- if (!this.deps) {
1557
- this.deps = emptySetPool.pop() || /* @__PURE__ */ new Set();
1558
- }
1559
- this.deps.add(dep2);
1560
- }
1561
- forgetDeps() {
1562
- if (this.deps) {
1563
- arrayFromSet(this.deps).forEach((dep2) => dep2.delete(this));
1564
- this.deps.clear();
1565
- emptySetPool.push(this.deps);
1566
- this.deps = null;
1567
- }
1568
- }
1569
- };
1570
- Entry.count = 0;
1571
- function rememberParent(child) {
1572
- const parent = parentEntrySlot.getValue();
1573
- if (parent) {
1574
- child.parents.add(parent);
1575
- if (!parent.childValues.has(child)) {
1576
- parent.childValues.set(child, []);
1577
- }
1578
- if (mightBeDirty(child)) {
1579
- reportDirtyChild(parent, child);
1580
- } else {
1581
- reportCleanChild(parent, child);
1582
- }
1583
- return parent;
1584
- }
1585
- }
1586
- function reallyRecompute(entry, args) {
1587
- forgetChildren(entry);
1588
- parentEntrySlot.withValue(entry, recomputeNewValue, [entry, args]);
1589
- if (maybeSubscribe(entry, args)) {
1590
- setClean(entry);
1591
- }
1592
- return valueGet(entry.value);
1593
- }
1594
- function recomputeNewValue(entry, args) {
1595
- entry.recomputing = true;
1596
- const { normalizeResult } = entry;
1597
- let oldValueCopy;
1598
- if (normalizeResult && entry.value.length === 1) {
1599
- oldValueCopy = valueCopy(entry.value);
1600
- }
1601
- entry.value.length = 0;
1602
- try {
1603
- entry.value[0] = entry.fn.apply(null, args);
1604
- if (normalizeResult && oldValueCopy && !valueIs(oldValueCopy, entry.value)) {
1605
- try {
1606
- entry.value[0] = normalizeResult(entry.value[0], oldValueCopy[0]);
1607
- } catch (_a3) {
1608
- }
1609
- }
1610
- } catch (e) {
1611
- entry.value[1] = e;
1612
- }
1613
- entry.recomputing = false;
1614
- }
1615
- function mightBeDirty(entry) {
1616
- return entry.dirty || !!(entry.dirtyChildren && entry.dirtyChildren.size);
1617
- }
1618
- function setClean(entry) {
1619
- entry.dirty = false;
1620
- if (mightBeDirty(entry)) {
1621
- return;
1622
- }
1623
- reportClean(entry);
1624
- }
1625
- function reportDirty(child) {
1626
- eachParent(child, reportDirtyChild);
1627
- }
1628
- function reportClean(child) {
1629
- eachParent(child, reportCleanChild);
1630
- }
1631
- function eachParent(child, callback) {
1632
- const parentCount = child.parents.size;
1633
- if (parentCount) {
1634
- const parents = arrayFromSet(child.parents);
1635
- for (let i = 0; i < parentCount; ++i) {
1636
- callback(parents[i], child);
1637
- }
1638
- }
1639
- }
1640
- function reportDirtyChild(parent, child) {
1641
- assert(parent.childValues.has(child));
1642
- assert(mightBeDirty(child));
1643
- const parentWasClean = !mightBeDirty(parent);
1644
- if (!parent.dirtyChildren) {
1645
- parent.dirtyChildren = emptySetPool.pop() || /* @__PURE__ */ new Set();
1646
- } else if (parent.dirtyChildren.has(child)) {
1647
- return;
1648
- }
1649
- parent.dirtyChildren.add(child);
1650
- if (parentWasClean) {
1651
- reportDirty(parent);
1652
- }
1653
- }
1654
- function reportCleanChild(parent, child) {
1655
- assert(parent.childValues.has(child));
1656
- assert(!mightBeDirty(child));
1657
- const childValue = parent.childValues.get(child);
1658
- if (childValue.length === 0) {
1659
- parent.childValues.set(child, valueCopy(child.value));
1660
- } else if (!valueIs(childValue, child.value)) {
1661
- parent.setDirty();
1662
- }
1663
- removeDirtyChild(parent, child);
1664
- if (mightBeDirty(parent)) {
1665
- return;
1666
- }
1667
- reportClean(parent);
1668
- }
1669
- function removeDirtyChild(parent, child) {
1670
- const dc = parent.dirtyChildren;
1671
- if (dc) {
1672
- dc.delete(child);
1673
- if (dc.size === 0) {
1674
- if (emptySetPool.length < POOL_TARGET_SIZE) {
1675
- emptySetPool.push(dc);
1676
- }
1677
- parent.dirtyChildren = null;
1678
- }
1679
- }
1680
- }
1681
- function forgetChildren(parent) {
1682
- if (parent.childValues.size > 0) {
1683
- parent.childValues.forEach((_value, child) => {
1684
- forgetChild(parent, child);
1685
- });
1686
- }
1687
- parent.forgetDeps();
1688
- assert(parent.dirtyChildren === null);
1689
- }
1690
- function forgetChild(parent, child) {
1691
- child.parents.delete(parent);
1692
- parent.childValues.delete(child);
1693
- removeDirtyChild(parent, child);
1694
- }
1695
- function maybeSubscribe(entry, args) {
1696
- if (typeof entry.subscribe === "function") {
1697
- try {
1698
- maybeUnsubscribe(entry);
1699
- entry.unsubscribe = entry.subscribe.apply(null, args);
1700
- } catch (e) {
1701
- entry.setDirty();
1702
- return false;
1703
- }
1704
- }
1705
- return true;
1706
- }
1707
-
1708
- // ../../node_modules/@apollo/client/utilities/graphql/print.js
1709
- var printCache;
1710
- var print2 = Object.assign(function(ast) {
1711
- var result2 = printCache.get(ast);
1712
- if (!result2) {
1713
- result2 = print(ast);
1714
- printCache.set(ast, result2);
1715
- }
1716
- return result2;
1717
- }, {
1718
- reset: function() {
1719
- printCache = new AutoCleanedWeakCache(
1720
- cacheSizes.print || 2e3
1721
- /* defaultCacheSizes.print */
1722
- );
1723
- }
1724
- });
1725
- print2.reset();
1726
- if (globalThis.__DEV__ !== false) {
1727
- registerGlobalCache("print", function() {
1728
- return printCache ? printCache.size : 0;
1729
- });
1730
- }
1731
-
1732
- // ../../node_modules/zen-observable-ts/module.js
1733
- function _createForOfIteratorHelperLoose(o, allowArrayLike) {
1734
- var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
1735
- if (it) return (it = it.call(o)).next.bind(it);
1736
- if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
1737
- if (it) o = it;
1738
- var i = 0;
1739
- return function() {
1740
- if (i >= o.length) return { done: true };
1741
- return { done: false, value: o[i++] };
1742
- };
1743
- }
1744
- throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1745
- }
1746
- function _unsupportedIterableToArray(o, minLen) {
1747
- if (!o) return;
1748
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
1749
- var n = Object.prototype.toString.call(o).slice(8, -1);
1750
- if (n === "Object" && o.constructor) n = o.constructor.name;
1751
- if (n === "Map" || n === "Set") return Array.from(o);
1752
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
1753
- }
1754
- function _arrayLikeToArray(arr, len) {
1755
- if (len == null || len > arr.length) len = arr.length;
1756
- for (var i = 0, arr2 = new Array(len); i < len; i++) {
1757
- arr2[i] = arr[i];
1758
- }
1759
- return arr2;
1760
- }
1761
- function _defineProperties(target, props) {
1762
- for (var i = 0; i < props.length; i++) {
1763
- var descriptor = props[i];
1764
- descriptor.enumerable = descriptor.enumerable || false;
1765
- descriptor.configurable = true;
1766
- if ("value" in descriptor) descriptor.writable = true;
1767
- Object.defineProperty(target, descriptor.key, descriptor);
1768
- }
1769
- }
1770
- function _createClass(Constructor, protoProps, staticProps) {
1771
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
1772
- if (staticProps) _defineProperties(Constructor, staticProps);
1773
- Object.defineProperty(Constructor, "prototype", { writable: false });
1774
- return Constructor;
1775
- }
1776
- var hasSymbols = function() {
1777
- return typeof Symbol === "function";
1778
- };
1779
- var hasSymbol = function(name) {
1780
- return hasSymbols() && Boolean(Symbol[name]);
1781
- };
1782
- var getSymbol = function(name) {
1783
- return hasSymbol(name) ? Symbol[name] : "@@" + name;
1784
- };
1785
- if (hasSymbols() && !hasSymbol("observable")) {
1786
- Symbol.observable = /* @__PURE__ */ Symbol("observable");
1787
- }
1788
- var SymbolIterator = getSymbol("iterator");
1789
- var SymbolObservable = getSymbol("observable");
1790
- var SymbolSpecies = getSymbol("species");
1791
- function getMethod(obj, key) {
1792
- var value = obj[key];
1793
- if (value == null) return void 0;
1794
- if (typeof value !== "function") throw new TypeError(value + " is not a function");
1795
- return value;
1796
- }
1797
- function getSpecies(obj) {
1798
- var ctor = obj.constructor;
1799
- if (ctor !== void 0) {
1800
- ctor = ctor[SymbolSpecies];
1801
- if (ctor === null) {
1802
- ctor = void 0;
1803
- }
1804
- }
1805
- return ctor !== void 0 ? ctor : Observable;
1806
- }
1807
- function isObservable(x) {
1808
- return x instanceof Observable;
1809
- }
1810
- function hostReportError(e) {
1811
- if (hostReportError.log) {
1812
- hostReportError.log(e);
1813
- } else {
1814
- setTimeout(function() {
1815
- throw e;
1816
- });
1817
- }
1818
- }
1819
- function enqueue(fn) {
1820
- Promise.resolve().then(function() {
1821
- try {
1822
- fn();
1823
- } catch (e) {
1824
- hostReportError(e);
1825
- }
1826
- });
1827
- }
1828
- function cleanupSubscription(subscription) {
1829
- var cleanup = subscription._cleanup;
1830
- if (cleanup === void 0) return;
1831
- subscription._cleanup = void 0;
1832
- if (!cleanup) {
1833
- return;
1834
- }
1835
- try {
1836
- if (typeof cleanup === "function") {
1837
- cleanup();
1838
- } else {
1839
- var unsubscribe = getMethod(cleanup, "unsubscribe");
1840
- if (unsubscribe) {
1841
- unsubscribe.call(cleanup);
1842
- }
1843
- }
1844
- } catch (e) {
1845
- hostReportError(e);
1846
- }
1847
- }
1848
- function closeSubscription(subscription) {
1849
- subscription._observer = void 0;
1850
- subscription._queue = void 0;
1851
- subscription._state = "closed";
1852
- }
1853
- function flushSubscription(subscription) {
1854
- var queue = subscription._queue;
1855
- if (!queue) {
1856
- return;
1857
- }
1858
- subscription._queue = void 0;
1859
- subscription._state = "ready";
1860
- for (var i = 0; i < queue.length; ++i) {
1861
- notifySubscription(subscription, queue[i].type, queue[i].value);
1862
- if (subscription._state === "closed") break;
1863
- }
1864
- }
1865
- function notifySubscription(subscription, type, value) {
1866
- subscription._state = "running";
1867
- var observer = subscription._observer;
1868
- try {
1869
- var m = getMethod(observer, type);
1870
- switch (type) {
1871
- case "next":
1872
- if (m) m.call(observer, value);
1873
- break;
1874
- case "error":
1875
- closeSubscription(subscription);
1876
- if (m) m.call(observer, value);
1877
- else throw value;
1878
- break;
1879
- case "complete":
1880
- closeSubscription(subscription);
1881
- if (m) m.call(observer);
1882
- break;
1883
- }
1884
- } catch (e) {
1885
- hostReportError(e);
1886
- }
1887
- if (subscription._state === "closed") cleanupSubscription(subscription);
1888
- else if (subscription._state === "running") subscription._state = "ready";
1889
- }
1890
- function onNotify(subscription, type, value) {
1891
- if (subscription._state === "closed") return;
1892
- if (subscription._state === "buffering") {
1893
- subscription._queue.push({
1894
- type,
1895
- value
1896
- });
1897
- return;
1898
- }
1899
- if (subscription._state !== "ready") {
1900
- subscription._state = "buffering";
1901
- subscription._queue = [{
1902
- type,
1903
- value
1904
- }];
1905
- enqueue(function() {
1906
- return flushSubscription(subscription);
1907
- });
1908
- return;
1909
- }
1910
- notifySubscription(subscription, type, value);
1911
- }
1912
- var Subscription = /* @__PURE__ */ (function() {
1913
- function Subscription2(observer, subscriber) {
1914
- this._cleanup = void 0;
1915
- this._observer = observer;
1916
- this._queue = void 0;
1917
- this._state = "initializing";
1918
- var subscriptionObserver = new SubscriptionObserver(this);
1919
- try {
1920
- this._cleanup = subscriber.call(void 0, subscriptionObserver);
1921
- } catch (e) {
1922
- subscriptionObserver.error(e);
1923
- }
1924
- if (this._state === "initializing") this._state = "ready";
1925
- }
1926
- var _proto = Subscription2.prototype;
1927
- _proto.unsubscribe = function unsubscribe() {
1928
- if (this._state !== "closed") {
1929
- closeSubscription(this);
1930
- cleanupSubscription(this);
1931
- }
1932
- };
1933
- _createClass(Subscription2, [{
1934
- key: "closed",
1935
- get: function() {
1936
- return this._state === "closed";
1937
- }
1938
- }]);
1939
- return Subscription2;
1940
- })();
1941
- var SubscriptionObserver = /* @__PURE__ */ (function() {
1942
- function SubscriptionObserver2(subscription) {
1943
- this._subscription = subscription;
1944
- }
1945
- var _proto2 = SubscriptionObserver2.prototype;
1946
- _proto2.next = function next(value) {
1947
- onNotify(this._subscription, "next", value);
1948
- };
1949
- _proto2.error = function error(value) {
1950
- onNotify(this._subscription, "error", value);
1951
- };
1952
- _proto2.complete = function complete() {
1953
- onNotify(this._subscription, "complete");
1954
- };
1955
- _createClass(SubscriptionObserver2, [{
1956
- key: "closed",
1957
- get: function() {
1958
- return this._subscription._state === "closed";
1959
- }
1960
- }]);
1961
- return SubscriptionObserver2;
1962
- })();
1963
- var Observable = /* @__PURE__ */ (function() {
1964
- function Observable2(subscriber) {
1965
- if (!(this instanceof Observable2)) throw new TypeError("Observable cannot be called as a function");
1966
- if (typeof subscriber !== "function") throw new TypeError("Observable initializer must be a function");
1967
- this._subscriber = subscriber;
1968
- }
1969
- var _proto3 = Observable2.prototype;
1970
- _proto3.subscribe = function subscribe(observer) {
1971
- if (typeof observer !== "object" || observer === null) {
1972
- observer = {
1973
- next: observer,
1974
- error: arguments[1],
1975
- complete: arguments[2]
1976
- };
1977
- }
1978
- return new Subscription(observer, this._subscriber);
1979
- };
1980
- _proto3.forEach = function forEach2(fn) {
1981
- var _this = this;
1982
- return new Promise(function(resolve, reject) {
1983
- if (typeof fn !== "function") {
1984
- reject(new TypeError(fn + " is not a function"));
1985
- return;
1986
- }
1987
- function done() {
1988
- subscription.unsubscribe();
1989
- resolve();
1990
- }
1991
- var subscription = _this.subscribe({
1992
- next: function(value) {
1993
- try {
1994
- fn(value, done);
1995
- } catch (e) {
1996
- reject(e);
1997
- subscription.unsubscribe();
1998
- }
1999
- },
2000
- error: reject,
2001
- complete: resolve
2002
- });
2003
- });
2004
- };
2005
- _proto3.map = function map(fn) {
2006
- var _this2 = this;
2007
- if (typeof fn !== "function") throw new TypeError(fn + " is not a function");
2008
- var C = getSpecies(this);
2009
- return new C(function(observer) {
2010
- return _this2.subscribe({
2011
- next: function(value) {
2012
- try {
2013
- value = fn(value);
2014
- } catch (e) {
2015
- return observer.error(e);
2016
- }
2017
- observer.next(value);
2018
- },
2019
- error: function(e) {
2020
- observer.error(e);
2021
- },
2022
- complete: function() {
2023
- observer.complete();
2024
- }
2025
- });
2026
- });
2027
- };
2028
- _proto3.filter = function filter(fn) {
2029
- var _this3 = this;
2030
- if (typeof fn !== "function") throw new TypeError(fn + " is not a function");
2031
- var C = getSpecies(this);
2032
- return new C(function(observer) {
2033
- return _this3.subscribe({
2034
- next: function(value) {
2035
- try {
2036
- if (!fn(value)) return;
2037
- } catch (e) {
2038
- return observer.error(e);
2039
- }
2040
- observer.next(value);
2041
- },
2042
- error: function(e) {
2043
- observer.error(e);
2044
- },
2045
- complete: function() {
2046
- observer.complete();
2047
- }
2048
- });
2049
- });
2050
- };
2051
- _proto3.reduce = function reduce(fn) {
2052
- var _this4 = this;
2053
- if (typeof fn !== "function") throw new TypeError(fn + " is not a function");
2054
- var C = getSpecies(this);
2055
- var hasSeed = arguments.length > 1;
2056
- var hasValue = false;
2057
- var seed = arguments[1];
2058
- var acc = seed;
2059
- return new C(function(observer) {
2060
- return _this4.subscribe({
2061
- next: function(value) {
2062
- var first = !hasValue;
2063
- hasValue = true;
2064
- if (!first || hasSeed) {
2065
- try {
2066
- acc = fn(acc, value);
2067
- } catch (e) {
2068
- return observer.error(e);
2069
- }
2070
- } else {
2071
- acc = value;
2072
- }
2073
- },
2074
- error: function(e) {
2075
- observer.error(e);
2076
- },
2077
- complete: function() {
2078
- if (!hasValue && !hasSeed) return observer.error(new TypeError("Cannot reduce an empty sequence"));
2079
- observer.next(acc);
2080
- observer.complete();
2081
- }
2082
- });
2083
- });
2084
- };
2085
- _proto3.concat = function concat() {
2086
- var _this5 = this;
2087
- for (var _len = arguments.length, sources = new Array(_len), _key = 0; _key < _len; _key++) {
2088
- sources[_key] = arguments[_key];
2089
- }
2090
- var C = getSpecies(this);
2091
- return new C(function(observer) {
2092
- var subscription;
2093
- var index = 0;
2094
- function startNext(next) {
2095
- subscription = next.subscribe({
2096
- next: function(v) {
2097
- observer.next(v);
2098
- },
2099
- error: function(e) {
2100
- observer.error(e);
2101
- },
2102
- complete: function() {
2103
- if (index === sources.length) {
2104
- subscription = void 0;
2105
- observer.complete();
2106
- } else {
2107
- startNext(C.from(sources[index++]));
2108
- }
2109
- }
2110
- });
2111
- }
2112
- startNext(_this5);
2113
- return function() {
2114
- if (subscription) {
2115
- subscription.unsubscribe();
2116
- subscription = void 0;
2117
- }
2118
- };
2119
- });
2120
- };
2121
- _proto3.flatMap = function flatMap(fn) {
2122
- var _this6 = this;
2123
- if (typeof fn !== "function") throw new TypeError(fn + " is not a function");
2124
- var C = getSpecies(this);
2125
- return new C(function(observer) {
2126
- var subscriptions = [];
2127
- var outer = _this6.subscribe({
2128
- next: function(value) {
2129
- if (fn) {
2130
- try {
2131
- value = fn(value);
2132
- } catch (e) {
2133
- return observer.error(e);
2134
- }
2135
- }
2136
- var inner = C.from(value).subscribe({
2137
- next: function(value2) {
2138
- observer.next(value2);
2139
- },
2140
- error: function(e) {
2141
- observer.error(e);
2142
- },
2143
- complete: function() {
2144
- var i = subscriptions.indexOf(inner);
2145
- if (i >= 0) subscriptions.splice(i, 1);
2146
- completeIfDone();
2147
- }
2148
- });
2149
- subscriptions.push(inner);
2150
- },
2151
- error: function(e) {
2152
- observer.error(e);
2153
- },
2154
- complete: function() {
2155
- completeIfDone();
2156
- }
2157
- });
2158
- function completeIfDone() {
2159
- if (outer.closed && subscriptions.length === 0) observer.complete();
2160
- }
2161
- return function() {
2162
- subscriptions.forEach(function(s) {
2163
- return s.unsubscribe();
2164
- });
2165
- outer.unsubscribe();
2166
- };
2167
- });
2168
- };
2169
- _proto3[SymbolObservable] = function() {
2170
- return this;
2171
- };
2172
- Observable2.from = function from(x) {
2173
- var C = typeof this === "function" ? this : Observable2;
2174
- if (x == null) throw new TypeError(x + " is not an object");
2175
- var method = getMethod(x, SymbolObservable);
2176
- if (method) {
2177
- var observable = method.call(x);
2178
- if (Object(observable) !== observable) throw new TypeError(observable + " is not an object");
2179
- if (isObservable(observable) && observable.constructor === C) return observable;
2180
- return new C(function(observer) {
2181
- return observable.subscribe(observer);
2182
- });
2183
- }
2184
- if (hasSymbol("iterator")) {
2185
- method = getMethod(x, SymbolIterator);
2186
- if (method) {
2187
- return new C(function(observer) {
2188
- enqueue(function() {
2189
- if (observer.closed) return;
2190
- for (var _iterator = _createForOfIteratorHelperLoose(method.call(x)), _step; !(_step = _iterator()).done; ) {
2191
- var item = _step.value;
2192
- observer.next(item);
2193
- if (observer.closed) return;
2194
- }
2195
- observer.complete();
2196
- });
2197
- });
2198
- }
2199
- }
2200
- if (Array.isArray(x)) {
2201
- return new C(function(observer) {
2202
- enqueue(function() {
2203
- if (observer.closed) return;
2204
- for (var i = 0; i < x.length; ++i) {
2205
- observer.next(x[i]);
2206
- if (observer.closed) return;
2207
- }
2208
- observer.complete();
2209
- });
2210
- });
2211
- }
2212
- throw new TypeError(x + " is not observable");
2213
- };
2214
- Observable2.of = function of() {
2215
- for (var _len2 = arguments.length, items = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
2216
- items[_key2] = arguments[_key2];
2217
- }
2218
- var C = typeof this === "function" ? this : Observable2;
2219
- return new C(function(observer) {
2220
- enqueue(function() {
2221
- if (observer.closed) return;
2222
- for (var i = 0; i < items.length; ++i) {
2223
- observer.next(items[i]);
2224
- if (observer.closed) return;
2225
- }
2226
- observer.complete();
2227
- });
2228
- });
2229
- };
2230
- _createClass(Observable2, null, [{
2231
- key: SymbolSpecies,
2232
- get: function() {
2233
- return this;
2234
- }
2235
- }]);
2236
- return Observable2;
2237
- })();
2238
- if (hasSymbols()) {
2239
- Object.defineProperty(Observable, /* @__PURE__ */ Symbol("extensions"), {
2240
- value: {
2241
- symbol: SymbolObservable,
2242
- hostReportError
2243
- },
2244
- configurable: true
2245
- });
2246
- }
2247
-
2248
- // ../../node_modules/symbol-observable/es/ponyfill.js
2249
- function symbolObservablePonyfill(root2) {
2250
- var result2;
2251
- var Symbol2 = root2.Symbol;
2252
- if (typeof Symbol2 === "function") {
2253
- if (Symbol2.observable) {
2254
- result2 = Symbol2.observable;
2255
- } else {
2256
- if (typeof Symbol2.for === "function") {
2257
- result2 = Symbol2.for("https://github.com/benlesh/symbol-observable");
2258
- } else {
2259
- result2 = Symbol2("https://github.com/benlesh/symbol-observable");
2260
- }
2261
- try {
2262
- Symbol2.observable = result2;
2263
- } catch (err) {
2264
- }
2265
- }
2266
- } else {
2267
- result2 = "@@observable";
2268
- }
2269
- return result2;
2270
- }
2271
-
2272
- // ../../node_modules/symbol-observable/es/index.js
2273
- var root;
2274
- if (typeof self !== "undefined") {
2275
- root = self;
2276
- } else if (typeof window !== "undefined") {
2277
- root = window;
2278
- } else if (typeof global !== "undefined") {
2279
- root = global;
2280
- } else if (typeof module !== "undefined") {
2281
- root = module;
2282
- } else {
2283
- root = Function("return this")();
2284
- }
2285
- var result = symbolObservablePonyfill(root);
2286
-
2287
- // ../../node_modules/@apollo/client/utilities/observables/Observable.js
2288
- var prototype = Observable.prototype;
2289
- var fakeObsSymbol = "@@observable";
2290
- if (!prototype[fakeObsSymbol]) {
2291
- prototype[fakeObsSymbol] = function() {
2292
- return this;
2293
- };
2294
- }
2295
-
2296
- // ../../node_modules/@apollo/client/utilities/deprecation/index.js
2297
- var _a2;
2298
- var muteAllDeprecations = /* @__PURE__ */ Symbol.for("apollo.deprecations");
2299
- var deprecationsSlot = /* @__PURE__ */ Symbol.for("apollo.deprecations.slot");
2300
- var global2 = global_default;
2301
- var slot = (_a2 = global2[deprecationsSlot]) !== null && _a2 !== void 0 ? _a2 : global2[deprecationsSlot] = new Slot();
2302
- function isMuted(name) {
2303
- return global2[muteAllDeprecations] || (slot.getValue() || []).includes(name);
2304
- }
2305
- function warnDeprecated(name, cb) {
2306
- if (!isMuted(name)) {
2307
- cb();
2308
- }
2309
- }
2310
-
2311
- // ../../node_modules/@apollo/client/link/utils/throwServerError.js
2312
- var throwServerError = function(response, result2, message) {
2313
- var error = new Error(message);
2314
- error.name = "ServerError";
2315
- error.response = response;
2316
- error.statusCode = response.status;
2317
- error.result = result2;
2318
- throw error;
2319
- };
2320
-
2321
- // ../../node_modules/@apollo/client/link/utils/validateOperation.js
2322
- function validateOperation(operation) {
2323
- var OPERATION_FIELDS = [
2324
- "query",
2325
- "operationName",
2326
- "variables",
2327
- "extensions",
2328
- "context"
2329
- ];
2330
- for (var _i = 0, _a3 = Object.keys(operation); _i < _a3.length; _i++) {
2331
- var key = _a3[_i];
2332
- if (OPERATION_FIELDS.indexOf(key) < 0) {
2333
- throw newInvariantError(58, key);
2334
- }
2335
- }
2336
- return operation;
2337
- }
2338
-
2339
- // ../../node_modules/@apollo/client/link/utils/createOperation.js
2340
- function createOperation(starting, operation) {
2341
- var context = __assign({}, starting);
2342
- var setContext = function(next) {
2343
- if (typeof next === "function") {
2344
- context = __assign(__assign({}, context), next(context));
2345
- } else {
2346
- context = __assign(__assign({}, context), next);
2347
- }
2348
- };
2349
- var getContext = function() {
2350
- return __assign({}, context);
2351
- };
2352
- Object.defineProperty(operation, "setContext", {
2353
- enumerable: false,
2354
- value: setContext
2355
- });
2356
- Object.defineProperty(operation, "getContext", {
2357
- enumerable: false,
2358
- value: getContext
2359
- });
2360
- return operation;
2361
- }
2362
-
2363
- // ../../node_modules/@apollo/client/link/utils/transformOperation.js
2364
- function transformOperation(operation) {
2365
- var transformedOperation = {
2366
- variables: operation.variables || {},
2367
- extensions: operation.extensions || {},
2368
- operationName: operation.operationName,
2369
- query: operation.query
2370
- };
2371
- if (!transformedOperation.operationName) {
2372
- transformedOperation.operationName = typeof transformedOperation.query !== "string" ? getOperationName(transformedOperation.query) || void 0 : "";
2373
- }
2374
- return transformedOperation;
2375
- }
2376
-
2377
- // ../../node_modules/@apollo/client/link/core/ApolloLink.js
2378
- function passthrough(op, forward) {
2379
- return forward ? forward(op) : Observable.of();
2380
- }
2381
- function toLink(handler) {
2382
- return typeof handler === "function" ? new ApolloLink(handler) : handler;
2383
- }
2384
- function isTerminating(link) {
2385
- return link.request.length <= 1;
2386
- }
2387
- var ApolloLink = (
2388
- /** @class */
2389
- (function() {
2390
- function ApolloLink2(request) {
2391
- if (request)
2392
- this.request = request;
2393
- }
2394
- ApolloLink2.empty = function() {
2395
- return new ApolloLink2(function() {
2396
- return Observable.of();
2397
- });
2398
- };
2399
- ApolloLink2.from = function(links) {
2400
- if (links.length === 0)
2401
- return ApolloLink2.empty();
2402
- return links.map(toLink).reduce(function(x, y) {
2403
- return x.concat(y);
2404
- });
2405
- };
2406
- ApolloLink2.split = function(test, left, right) {
2407
- var leftLink = toLink(left);
2408
- var rightLink = toLink(right || new ApolloLink2(passthrough));
2409
- var ret;
2410
- if (isTerminating(leftLink) && isTerminating(rightLink)) {
2411
- ret = new ApolloLink2(function(operation) {
2412
- return test(operation) ? leftLink.request(operation) || Observable.of() : rightLink.request(operation) || Observable.of();
2413
- });
2414
- } else {
2415
- ret = new ApolloLink2(function(operation, forward) {
2416
- return test(operation) ? leftLink.request(operation, forward) || Observable.of() : rightLink.request(operation, forward) || Observable.of();
2417
- });
2418
- }
2419
- return Object.assign(ret, { left: leftLink, right: rightLink });
2420
- };
2421
- ApolloLink2.execute = function(link, operation) {
2422
- return link.request(createOperation(operation.context, transformOperation(validateOperation(operation)))) || Observable.of();
2423
- };
2424
- ApolloLink2.concat = function(first, second) {
2425
- var firstLink = toLink(first);
2426
- if (isTerminating(firstLink)) {
2427
- globalThis.__DEV__ !== false && invariant2.warn(47, firstLink);
2428
- return firstLink;
2429
- }
2430
- var nextLink = toLink(second);
2431
- var ret;
2432
- if (isTerminating(nextLink)) {
2433
- ret = new ApolloLink2(function(operation) {
2434
- return firstLink.request(operation, function(op) {
2435
- return nextLink.request(op) || Observable.of();
2436
- }) || Observable.of();
2437
- });
2438
- } else {
2439
- ret = new ApolloLink2(function(operation, forward) {
2440
- return firstLink.request(operation, function(op) {
2441
- return nextLink.request(op, forward) || Observable.of();
2442
- }) || Observable.of();
2443
- });
2444
- }
2445
- return Object.assign(ret, { left: firstLink, right: nextLink });
2446
- };
2447
- ApolloLink2.prototype.split = function(test, left, right) {
2448
- return this.concat(ApolloLink2.split(test, left, right || new ApolloLink2(passthrough)));
2449
- };
2450
- ApolloLink2.prototype.concat = function(next) {
2451
- return ApolloLink2.concat(this, next);
2452
- };
2453
- ApolloLink2.prototype.request = function(operation, forward) {
2454
- throw newInvariantError(48);
2455
- };
2456
- ApolloLink2.prototype.onError = function(error, observer) {
2457
- if (globalThis.__DEV__ !== false) {
2458
- warnDeprecated("onError", function() {
2459
- globalThis.__DEV__ !== false && invariant2.warn(49);
2460
- });
2461
- }
2462
- if (observer && observer.error) {
2463
- observer.error(error);
2464
- return false;
2465
- }
2466
- throw error;
2467
- };
2468
- ApolloLink2.prototype.setOnError = function(fn) {
2469
- if (globalThis.__DEV__ !== false) {
2470
- globalThis.__DEV__ !== false && invariant2.warn(50);
2471
- }
2472
- this.onError = fn;
2473
- return this;
2474
- };
2475
- return ApolloLink2;
2476
- })()
2477
- );
2478
-
2479
- // ../../node_modules/@apollo/client/link/http/createSignalIfSupported.js
2480
- var createSignalIfSupported = function() {
2481
- if (typeof AbortController === "undefined")
2482
- return { controller: false, signal: false };
2483
- var controller = new AbortController();
2484
- var signal = controller.signal;
2485
- return { controller, signal };
2486
- };
2487
-
2488
- // ../../node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js
2489
- var hasOwnProperty3 = Object.prototype.hasOwnProperty;
2490
- function parseJsonBody(response, bodyText) {
2491
- if (response.status >= 300) {
2492
- var getResult = function() {
2493
- try {
2494
- return JSON.parse(bodyText);
2495
- } catch (err) {
2496
- return bodyText;
2497
- }
2498
- };
2499
- throwServerError(response, getResult(), "Response not successful: Received status code ".concat(response.status));
2500
- }
2501
- try {
2502
- return JSON.parse(bodyText);
2503
- } catch (err) {
2504
- var parseError = err;
2505
- parseError.name = "ServerParseError";
2506
- parseError.response = response;
2507
- parseError.statusCode = response.status;
2508
- parseError.bodyText = bodyText;
2509
- throw parseError;
2510
- }
2511
- }
2512
- function parseAndCheckHttpResponse(operations) {
2513
- return function(response) {
2514
- return response.text().then(function(bodyText) {
2515
- return parseJsonBody(response, bodyText);
2516
- }).then(function(result2) {
2517
- if (!Array.isArray(result2) && !hasOwnProperty3.call(result2, "data") && !hasOwnProperty3.call(result2, "errors")) {
2518
- throwServerError(response, result2, "Server response was missing for query '".concat(Array.isArray(operations) ? operations.map(function(op) {
2519
- return op.operationName;
2520
- }) : operations.operationName, "'."));
2521
- }
2522
- return result2;
2523
- });
2524
- };
2525
- }
2526
-
2527
- // ../../node_modules/@apollo/client/link/http/serializeFetchParameter.js
2528
- var serializeFetchParameter = function(p, label) {
2529
- var serialized;
2530
- try {
2531
- serialized = JSON.stringify(p);
2532
- } catch (e) {
2533
- var parseError = newInvariantError(54, label, e.message);
2534
- parseError.parseError = e;
2535
- throw parseError;
2536
- }
2537
- return serialized;
2538
- };
2539
-
2540
- // ../../node_modules/@apollo/client/link/http/rewriteURIForGET.js
2541
- function rewriteURIForGET(chosenURI, body) {
2542
- var queryParams = [];
2543
- var addQueryParam = function(key, value) {
2544
- queryParams.push("".concat(key, "=").concat(encodeURIComponent(value)));
2545
- };
2546
- if ("query" in body) {
2547
- addQueryParam("query", body.query);
2548
- }
2549
- if (body.operationName) {
2550
- addQueryParam("operationName", body.operationName);
2551
- }
2552
- if (body.variables) {
2553
- var serializedVariables = void 0;
2554
- try {
2555
- serializedVariables = serializeFetchParameter(body.variables, "Variables map");
2556
- } catch (parseError) {
2557
- return { parseError };
2558
- }
2559
- addQueryParam("variables", serializedVariables);
2560
- }
2561
- if (body.extensions) {
2562
- var serializedExtensions = void 0;
2563
- try {
2564
- serializedExtensions = serializeFetchParameter(body.extensions, "Extensions map");
2565
- } catch (parseError) {
2566
- return { parseError };
2567
- }
2568
- addQueryParam("extensions", serializedExtensions);
2569
- }
2570
- var fragment = "", preFragment = chosenURI;
2571
- var fragmentStart = chosenURI.indexOf("#");
2572
- if (fragmentStart !== -1) {
2573
- fragment = chosenURI.substr(fragmentStart);
2574
- preFragment = chosenURI.substr(0, fragmentStart);
2575
- }
2576
- var queryParamsPrefix = preFragment.indexOf("?") === -1 ? "?" : "&";
2577
- var newURI = preFragment + queryParamsPrefix + queryParams.join("&") + fragment;
2578
- return { newURI };
2579
- }
2580
-
2581
- // ../../node_modules/@apollo/client/link/http/selectHttpOptionsAndBody.js
2582
- var defaultHttpOptions = {
2583
- includeQuery: true,
2584
- includeExtensions: false,
2585
- preserveHeaderCase: false
2586
- };
2587
- var defaultHeaders = {
2588
- // headers are case insensitive (https://stackoverflow.com/a/5259004)
2589
- accept: "*/*",
2590
- // The content-type header describes the type of the body of the request, and
2591
- // so it typically only is sent with requests that actually have bodies. One
2592
- // could imagine that Apollo Client would remove this header when constructing
2593
- // a GET request (which has no body), but we historically have not done that.
2594
- // This means that browsers will preflight all Apollo Client requests (even
2595
- // GET requests). Apollo Server's CSRF prevention feature (introduced in
2596
- // AS3.7) takes advantage of this fact and does not block requests with this
2597
- // header. If you want to drop this header from GET requests, then you should
2598
- // probably replace it with a `apollo-require-preflight` header, or servers
2599
- // with CSRF prevention enabled might block your GET request. See
2600
- // https://www.apollographql.com/docs/apollo-server/security/cors/#preventing-cross-site-request-forgery-csrf
2601
- // for more details.
2602
- "content-type": "application/json"
2603
- };
2604
- var defaultOptions = {
2605
- method: "POST"
2606
- };
2607
- var fallbackHttpConfig = {
2608
- http: defaultHttpOptions,
2609
- headers: defaultHeaders,
2610
- options: defaultOptions
2611
- };
2612
- var defaultPrinter = function(ast, printer) {
2613
- return printer(ast);
2614
- };
2615
- function selectHttpOptionsAndBodyInternal(operation, printer) {
2616
- var configs = [];
2617
- for (var _i = 2; _i < arguments.length; _i++) {
2618
- configs[_i - 2] = arguments[_i];
2619
- }
2620
- var options = {};
2621
- var http = {};
2622
- configs.forEach(function(config) {
2623
- options = __assign(__assign(__assign({}, options), config.options), { headers: __assign(__assign({}, options.headers), config.headers) });
2624
- if (config.credentials) {
2625
- options.credentials = config.credentials;
2626
- }
2627
- http = __assign(__assign({}, http), config.http);
2628
- });
2629
- if (options.headers) {
2630
- options.headers = removeDuplicateHeaders(options.headers, http.preserveHeaderCase);
2631
- }
2632
- var operationName = operation.operationName, extensions = operation.extensions, variables = operation.variables, query = operation.query;
2633
- var body = { operationName, variables };
2634
- if (http.includeExtensions)
2635
- body.extensions = extensions;
2636
- if (http.includeQuery)
2637
- body.query = printer(query, print2);
2638
- return {
2639
- options,
2640
- body
2641
- };
2642
- }
2643
- function removeDuplicateHeaders(headers, preserveHeaderCase) {
2644
- if (!preserveHeaderCase) {
2645
- var normalizedHeaders_1 = {};
2646
- Object.keys(Object(headers)).forEach(function(name) {
2647
- normalizedHeaders_1[name.toLowerCase()] = headers[name];
2648
- });
2649
- return normalizedHeaders_1;
2650
- }
2651
- var headerData = {};
2652
- Object.keys(Object(headers)).forEach(function(name) {
2653
- headerData[name.toLowerCase()] = {
2654
- originalName: name,
2655
- value: headers[name]
2656
- };
2657
- });
2658
- var normalizedHeaders = {};
2659
- Object.keys(headerData).forEach(function(name) {
2660
- normalizedHeaders[headerData[name].originalName] = headerData[name].value;
2661
- });
2662
- return normalizedHeaders;
2663
- }
2664
-
2665
- // ../../node_modules/@apollo/client/link/http/selectURI.js
2666
- var selectURI = function(operation, fallbackURI) {
2667
- var context = operation.getContext();
2668
- var contextURI = context.uri;
2669
- if (contextURI) {
2670
- return contextURI;
2671
- } else if (typeof fallbackURI === "function") {
2672
- return fallbackURI(operation);
2673
- } else {
2674
- return fallbackURI || "/graphql";
2675
- }
2676
- };
2677
-
2678
- // ../../node_modules/is-plain-obj/index.js
2679
- function isPlainObject(value) {
2680
- if (typeof value !== "object" || value === null) {
2681
- return false;
2682
- }
2683
- const prototype2 = Object.getPrototypeOf(value);
2684
- return (prototype2 === null || prototype2 === Object.prototype || Object.getPrototypeOf(prototype2) === null) && !(Symbol.toStringTag in value) && !(Symbol.iterator in value);
2685
- }
2686
-
2687
- // ../../node_modules/extract-files/extractFiles.mjs
2688
- function extractFiles(value, isExtractable, path = "") {
2689
- if (!arguments.length) throw new TypeError("Argument 1 `value` is required.");
2690
- if (typeof isExtractable !== "function")
2691
- throw new TypeError("Argument 2 `isExtractable` must be a function.");
2692
- if (typeof path !== "string")
2693
- throw new TypeError("Argument 3 `path` must be a string.");
2694
- const clones = /* @__PURE__ */ new Map();
2695
- const files = /* @__PURE__ */ new Map();
2696
- function recurse(value2, path2, recursed) {
2697
- if (isExtractable(value2)) {
2698
- const filePaths = files.get(value2);
2699
- filePaths ? filePaths.push(path2) : files.set(value2, [path2]);
2700
- return null;
2701
- }
2702
- const valueIsList = Array.isArray(value2) || typeof FileList !== "undefined" && value2 instanceof FileList;
2703
- const valueIsPlainObject = isPlainObject(value2);
2704
- if (valueIsList || valueIsPlainObject) {
2705
- let clone = clones.get(value2);
2706
- const uncloned = !clone;
2707
- if (uncloned) {
2708
- clone = valueIsList ? [] : (
2709
- // Replicate if the plain object is an `Object` instance.
2710
- value2 instanceof /** @type {any} */
2711
- Object ? {} : /* @__PURE__ */ Object.create(null)
2712
- );
2713
- clones.set(
2714
- value2,
2715
- /** @type {Clone} */
2716
- clone
2717
- );
2718
- }
2719
- if (!recursed.has(value2)) {
2720
- const pathPrefix = path2 ? `${path2}.` : "";
2721
- const recursedDeeper = new Set(recursed).add(value2);
2722
- if (valueIsList) {
2723
- let index = 0;
2724
- for (const item of value2) {
2725
- const itemClone = recurse(
2726
- item,
2727
- pathPrefix + index++,
2728
- recursedDeeper
2729
- );
2730
- if (uncloned) clone.push(itemClone);
2731
- }
2732
- } else
2733
- for (const key in value2) {
2734
- const propertyClone = recurse(
2735
- value2[key],
2736
- pathPrefix + key,
2737
- recursedDeeper
2738
- );
2739
- if (uncloned)
2740
- clone[key] = propertyClone;
2741
- }
2742
- }
2743
- return clone;
2744
- }
2745
- return value2;
2746
- }
2747
- return {
2748
- clone: recurse(value, path, /* @__PURE__ */ new Set()),
2749
- files
2750
- };
2751
- }
2752
-
2753
- // ../../node_modules/apollo-upload-client/formDataAppendFile.mjs
2754
- function formDataAppendFile(formData, fieldName, file) {
2755
- "name" in file ? formData.append(fieldName, file, file.name) : formData.append(fieldName, file);
2756
- }
2757
-
2758
- // ../../node_modules/extract-files/isExtractableFile.mjs
2759
- function isExtractableFile(value) {
2760
- return typeof File !== "undefined" && value instanceof File || typeof Blob !== "undefined" && value instanceof Blob;
2761
- }
2762
-
2763
- // ../../node_modules/apollo-upload-client/createUploadLink.mjs
2764
- function createUploadLink({
2765
- uri: fetchUri = "/graphql",
2766
- useGETForQueries,
2767
- isExtractableFile: customIsExtractableFile = isExtractableFile,
2768
- FormData: CustomFormData,
2769
- formDataAppendFile: customFormDataAppendFile = formDataAppendFile,
2770
- print: print3 = defaultPrinter,
2771
- fetch: customFetch,
2772
- fetchOptions,
2773
- credentials,
2774
- headers,
2775
- includeExtensions
2776
- } = {}) {
2777
- const linkConfig = {
2778
- http: { includeExtensions },
2779
- options: fetchOptions,
2780
- credentials,
2781
- headers
2782
- };
2783
- return new ApolloLink((operation) => {
2784
- const context = (
2785
- /**
2786
- * @type {import("@apollo/client/core/types.js").DefaultContext & {
2787
- * clientAwareness?: {
2788
- * name?: string,
2789
- * version?: string,
2790
- * },
2791
- * }}
2792
- */
2793
- operation.getContext()
2794
- );
2795
- const {
2796
- // Apollo Studio client awareness `name` and `version` can be configured
2797
- // via `ApolloClient` constructor options:
2798
- // https://www.apollographql.com/docs/graphos/metrics/client-awareness/#setup
2799
- clientAwareness: { name, version: version2 } = {},
2800
- headers: headers2
2801
- } = context;
2802
- const contextConfig = {
2803
- http: context.http,
2804
- options: context.fetchOptions,
2805
- credentials: context.credentials,
2806
- headers: {
2807
- // Client awareness headers can be overridden by context `headers`.
2808
- ...name && { "apollographql-client-name": name },
2809
- ...version2 && { "apollographql-client-version": version2 },
2810
- ...headers2
2811
- }
2812
- };
2813
- const { options, body } = selectHttpOptionsAndBodyInternal(
2814
- operation,
2815
- print3,
2816
- fallbackHttpConfig,
2817
- linkConfig,
2818
- contextConfig
2819
- );
2820
- const { clone, files } = extractFiles(body, customIsExtractableFile, "");
2821
- let uri = selectURI(operation, fetchUri);
2822
- if (files.size) {
2823
- if (options.headers)
2824
- delete options.headers["content-type"];
2825
- const RuntimeFormData = CustomFormData || FormData;
2826
- const form = new RuntimeFormData();
2827
- form.append("operations", serializeFetchParameter(clone, "Payload"));
2828
- const map = {};
2829
- let i = 0;
2830
- files.forEach((paths) => {
2831
- map[++i] = paths;
2832
- });
2833
- form.append("map", JSON.stringify(map));
2834
- i = 0;
2835
- files.forEach((_paths, file) => {
2836
- customFormDataAppendFile(form, String(++i), file);
2837
- });
2838
- options.body = form;
2839
- } else {
2840
- if (useGETForQueries && // If the operation contains some mutations GET shouldn’t be used.
2841
- !operation.query.definitions.some(
2842
- (definition) => definition.kind === "OperationDefinition" && definition.operation === "mutation"
2843
- ))
2844
- options.method = "GET";
2845
- if (options.method === "GET") {
2846
- const { newURI, parseError } = rewriteURIForGET(uri, body);
2847
- if (parseError)
2848
- return new Observable((observer) => {
2849
- observer.error(parseError);
2850
- });
2851
- uri = newURI;
2852
- } else options.body = serializeFetchParameter(clone, "Payload");
2853
- }
2854
- const { controller } = createSignalIfSupported();
2855
- if (typeof controller !== "boolean") {
2856
- if (options.signal)
2857
- options.signal.aborted ? (
2858
- // Signal already aborted, so immediately abort.
2859
- controller.abort()
2860
- ) : (
2861
- // Signal not already aborted, so setup a listener to abort when it
2862
- // does.
2863
- options.signal.addEventListener(
2864
- "abort",
2865
- () => {
2866
- controller.abort();
2867
- },
2868
- {
2869
- // Prevent a memory leak if the user configured abort controller
2870
- // is long lasting, or controls multiple things.
2871
- once: true
2872
- }
2873
- )
2874
- );
2875
- options.signal = controller.signal;
2876
- }
2877
- const runtimeFetch = customFetch || fetch;
2878
- return new Observable((observer) => {
2879
- let cleaningUp;
2880
- runtimeFetch(uri, options).then((response) => {
2881
- operation.setContext({ response });
2882
- return response;
2883
- }).then(parseAndCheckHttpResponse(operation)).then((result2) => {
2884
- observer.next(result2);
2885
- observer.complete();
2886
- }).catch((error) => {
2887
- if (!cleaningUp) {
2888
- if (error.result && error.result.errors && error.result.data)
2889
- observer.next(error.result);
2890
- observer.error(error);
2891
- }
2892
- });
2893
- return () => {
2894
- cleaningUp = true;
2895
- if (typeof controller !== "boolean") controller.abort();
2896
- };
2897
- });
2898
- });
2899
- }
1
+ import createUploadLink from "apollo-upload-client/createUploadLink.mjs";
2900
2
  export {
2901
3
  createUploadLink
2902
4
  };