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