@wexio/messenger-widget-react 1.1.5 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dist/widget-react--D5-TDqS.js +475 -0
  2. package/dist/{widget-react-D9b9f-j_2.js → widget-react-2tTH7-bO.js} +1 -1
  3. package/dist/{widget-react-GkCAcRz0.js → widget-react-B8rXZyxg.js} +1 -1
  4. package/dist/widget-react-B9X7Tn7t.js +125 -0
  5. package/dist/{widget-react-D7Q1S5E02.js → widget-react-BPNfTldJ.js} +134 -121
  6. package/dist/{widget-react-NffhFueH.js → widget-react-BlTmXnei.js} +2 -2
  7. package/dist/{widget-react-D_1wQTaz.js → widget-react-CIy9jXND.js} +2 -2
  8. package/dist/widget-react-CVLHwRZh.js +21619 -0
  9. package/dist/{widget-react-DWO5MXt62.js → widget-react-CtvdaJvy.js} +5 -5
  10. package/dist/widget-react-D8-Z8fvu.js +323 -0
  11. package/dist/{widget-react-NUWScxeE2.js → widget-react-DF5yY9sQ.js} +120 -108
  12. package/dist/widget-react-DNFROpaS.js +262 -0
  13. package/dist/{widget-react-BhdM1EXE2.js → widget-react-DXP6EOCM.js} +1 -1
  14. package/dist/{widget-react-BDd1HJHs.js → widget-react-DejnNTzJ.js} +36 -36
  15. package/dist/{widget-react-Br8qtj152.js → widget-react-DubCiNev.js} +5 -5
  16. package/dist/{widget-react-BVRYDaf5.js → widget-react-faSyVXFQ.js} +2 -2
  17. package/dist/{widget-react-BGCZpMUT.js → widget-react-krPPnv02.js} +1 -1
  18. package/dist/widget-react.js +14513 -6394
  19. package/package.json +1 -1
  20. package/dist/widget-react--A4IVF5N2.js +0 -359
  21. package/dist/widget-react-BFgpQWPW.js +0 -7733
  22. package/dist/widget-react-BGmjRit12.js +0 -359
  23. package/dist/widget-react-BJN4_XqD.js +0 -359
  24. package/dist/widget-react-BepZON2O.js +0 -359
  25. package/dist/widget-react-BirV4fjr.js +0 -359
  26. package/dist/widget-react-BjeN5jDi.js +0 -359
  27. package/dist/widget-react-Blj9taMI2.js +0 -359
  28. package/dist/widget-react-Bpjcku_E.js +0 -359
  29. package/dist/widget-react-Br-jpQBt.js +0 -359
  30. package/dist/widget-react-C4jVLX4O.js +0 -359
  31. package/dist/widget-react-CMn2M4G7.js +0 -359
  32. package/dist/widget-react-CPIqSc_J.js +0 -359
  33. package/dist/widget-react-CPnUEeex.js +0 -9907
  34. package/dist/widget-react-CVrATfkA.js +0 -359
  35. package/dist/widget-react-CeQaem4N2.js +0 -126
  36. package/dist/widget-react-CkDPMun5.js +0 -359
  37. package/dist/widget-react-Cp0KM0D6.js +0 -359
  38. package/dist/widget-react-Cs_ooZdD.js +0 -359
  39. package/dist/widget-react-Csr68eN1.js +0 -359
  40. package/dist/widget-react-CxzW4Bam.js +0 -359
  41. package/dist/widget-react-D00lhVJW.js +0 -359
  42. package/dist/widget-react-DM5ptbez2.js +0 -359
  43. package/dist/widget-react-DU5Wg6Cl.js +0 -359
  44. package/dist/widget-react-DYBhHaDC.js +0 -359
  45. package/dist/widget-react-DZxVgDlM2.js +0 -359
  46. package/dist/widget-react-Dhi-efUB2.js +0 -359
  47. package/dist/widget-react-DmQP1bcj.js +0 -4293
  48. package/dist/widget-react-Dvze5gXC.js +0 -359
  49. package/dist/widget-react-H0QV1X13.js +0 -359
  50. package/dist/widget-react-JcQ9Xwb6.js +0 -359
  51. package/dist/widget-react-LjYTh4EJ.js +0 -359
  52. package/dist/widget-react-M3D_BLuT.js +0 -359
  53. package/dist/widget-react-O_BU6qSC.js +0 -359
  54. package/dist/widget-react-TB2Eoyvi2.js +0 -263
  55. package/dist/widget-react-WSHbDgKs.js +0 -359
  56. package/dist/widget-react-_6vfCiAZ.js +0 -359
  57. package/dist/widget-react-e8MoPThS2.js +0 -359
@@ -1,4293 +0,0 @@
1
- globalThis.process === void 0 && (globalThis.process = {
2
- env: {},
3
- nextTick: function(e) {
4
- setTimeout(e, 0);
5
- },
6
- emit: function() {
7
- return !1;
8
- }
9
- });
10
- import "react";
11
- import "react-dom";
12
- import "react/jsx-runtime";
13
- import "react-dom/client";
14
- import { $t as e, A as t, At as n, Bt as r, Ct as i, D as a, Dt as o, Et as s, Ft as c, G as l, Gt as u, H as d, Ht as f, It as p, J as m, Jt as h, K as g, Kt as _, Lt as v, Mt as y, N as b, Nt as x, Ot as S, Pt as C, Q as w, Qt as T, R as E, Rt as ee, St as te, Tt as ne, U as re, Ut as ie, Vt as ae, W as oe, Wt as se, X as ce, Xt as le, Y as ue, Yt as de, Z as fe, Zt as pe, _n as me, _t as he, at as ge, bt as _e, cn as ve, ct as ye, dn as be, dt as D, en as xe, fn as O, ft as k, gn as A, gt as Se, hn as j, ht as Ce, in as M, it as we, jt as Te, kt as Ee, ln as De, lt as Oe, mn as N, mt as ke, nn as P, nt as Ae, on as F, ot as je, pn as I, pt as Me, q as Ne, qt as Pe, rn as Fe, rt as L, sn as R, st as Ie, tn as Le, tt as z, un as Re, ut as B, vt as ze, wt as Be, xt as Ve, y as He, yt as Ue, zt as V } from "./widget-react-BFgpQWPW.js";
15
- import { n as We, r as Ge } from "./widget-react-BGCZpMUT.js";
16
- import * as H from "react";
17
- import { jsx as Ke } from "react/jsx-runtime";
18
- //#region node_modules/graphql/language/printString.mjs
19
- function qe(e) {
20
- return `"${e.replace(Je, Ye)}"`;
21
- }
22
- var Je = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g;
23
- function Ye(e) {
24
- return Xe[e.charCodeAt(0)];
25
- }
26
- var Xe = /* @__PURE__ */ "\\u0000.\\u0001.\\u0002.\\u0003.\\u0004.\\u0005.\\u0006.\\u0007.\\b.\\t.\\n.\\u000B.\\f.\\r.\\u000E.\\u000F.\\u0010.\\u0011.\\u0012.\\u0013.\\u0014.\\u0015.\\u0016.\\u0017.\\u0018.\\u0019.\\u001A.\\u001B.\\u001C.\\u001D.\\u001E.\\u001F...\\\"..........................................................\\\\...................................\\u007F.\\u0080.\\u0081.\\u0082.\\u0083.\\u0084.\\u0085.\\u0086.\\u0087.\\u0088.\\u0089.\\u008A.\\u008B.\\u008C.\\u008D.\\u008E.\\u008F.\\u0090.\\u0091.\\u0092.\\u0093.\\u0094.\\u0095.\\u0096.\\u0097.\\u0098.\\u0099.\\u009A.\\u009B.\\u009C.\\u009D.\\u009E.\\u009F".split(".");
27
- //#endregion
28
- //#region node_modules/graphql/language/printer.mjs
29
- function Ze(e) {
30
- return P(e, $e);
31
- }
32
- var Qe = 80, $e = {
33
- Name: { leave: (e) => e.value },
34
- Variable: { leave: (e) => "$" + e.name },
35
- Document: { leave: (e) => U(e.definitions, "\n\n") },
36
- OperationDefinition: { leave(e) {
37
- let t = tt(e.variableDefinitions) ? G("(\n", U(e.variableDefinitions, "\n"), "\n)") : G("(", U(e.variableDefinitions, ", "), ")"), n = G("", e.description, "\n") + U([
38
- e.operation,
39
- U([e.name, t]),
40
- U(e.directives, " ")
41
- ], " ");
42
- return (n === "query" ? "" : n + " ") + e.selectionSet;
43
- } },
44
- VariableDefinition: { leave: ({ variable: e, type: t, defaultValue: n, directives: r, description: i }) => G("", i, "\n") + e + ": " + t + G(" = ", n) + G(" ", U(r, " ")) },
45
- SelectionSet: { leave: ({ selections: e }) => W(e) },
46
- Field: { leave({ alias: e, name: t, arguments: n, directives: r, selectionSet: i }) {
47
- let a = G("", e, ": ") + t, o = a + G("(", U(n, ", "), ")");
48
- return o.length > Qe && (o = a + G("(\n", et(U(n, "\n")), "\n)")), U([
49
- o,
50
- U(r, " "),
51
- i
52
- ], " ");
53
- } },
54
- Argument: { leave: ({ name: e, value: t }) => e + ": " + t },
55
- FragmentSpread: { leave: ({ name: e, directives: t }) => "..." + e + G(" ", U(t, " ")) },
56
- InlineFragment: { leave: ({ typeCondition: e, directives: t, selectionSet: n }) => U([
57
- "...",
58
- G("on ", e),
59
- U(t, " "),
60
- n
61
- ], " ") },
62
- FragmentDefinition: { leave: ({ name: e, typeCondition: t, variableDefinitions: n, directives: r, selectionSet: i, description: a }) => G("", a, "\n") + `fragment ${e}${G("(", U(n, ", "), ")")} on ${t} ${G("", U(r, " "), " ")}` + i },
63
- IntValue: { leave: ({ value: e }) => e },
64
- FloatValue: { leave: ({ value: e }) => e },
65
- StringValue: { leave: ({ value: e, block: t }) => t ? Fe(e) : qe(e) },
66
- BooleanValue: { leave: ({ value: e }) => e ? "true" : "false" },
67
- NullValue: { leave: () => "null" },
68
- EnumValue: { leave: ({ value: e }) => e },
69
- ListValue: { leave: ({ values: e }) => "[" + U(e, ", ") + "]" },
70
- ObjectValue: { leave: ({ fields: e }) => "{" + U(e, ", ") + "}" },
71
- ObjectField: { leave: ({ name: e, value: t }) => e + ": " + t },
72
- Directive: { leave: ({ name: e, arguments: t }) => "@" + e + G("(", U(t, ", "), ")") },
73
- NamedType: { leave: ({ name: e }) => e },
74
- ListType: { leave: ({ type: e }) => "[" + e + "]" },
75
- NonNullType: { leave: ({ type: e }) => e + "!" },
76
- SchemaDefinition: { leave: ({ description: e, directives: t, operationTypes: n }) => G("", e, "\n") + U([
77
- "schema",
78
- U(t, " "),
79
- W(n)
80
- ], " ") },
81
- OperationTypeDefinition: { leave: ({ operation: e, type: t }) => e + ": " + t },
82
- ScalarTypeDefinition: { leave: ({ description: e, name: t, directives: n }) => G("", e, "\n") + U([
83
- "scalar",
84
- t,
85
- U(n, " ")
86
- ], " ") },
87
- ObjectTypeDefinition: { leave: ({ description: e, name: t, interfaces: n, directives: r, fields: i }) => G("", e, "\n") + U([
88
- "type",
89
- t,
90
- G("implements ", U(n, " & ")),
91
- U(r, " "),
92
- W(i)
93
- ], " ") },
94
- FieldDefinition: { leave: ({ description: e, name: t, arguments: n, type: r, directives: i }) => G("", e, "\n") + t + (tt(n) ? G("(\n", et(U(n, "\n")), "\n)") : G("(", U(n, ", "), ")")) + ": " + r + G(" ", U(i, " ")) },
95
- InputValueDefinition: { leave: ({ description: e, name: t, type: n, defaultValue: r, directives: i }) => G("", e, "\n") + U([
96
- t + ": " + n,
97
- G("= ", r),
98
- U(i, " ")
99
- ], " ") },
100
- InterfaceTypeDefinition: { leave: ({ description: e, name: t, interfaces: n, directives: r, fields: i }) => G("", e, "\n") + U([
101
- "interface",
102
- t,
103
- G("implements ", U(n, " & ")),
104
- U(r, " "),
105
- W(i)
106
- ], " ") },
107
- UnionTypeDefinition: { leave: ({ description: e, name: t, directives: n, types: r }) => G("", e, "\n") + U([
108
- "union",
109
- t,
110
- U(n, " "),
111
- G("= ", U(r, " | "))
112
- ], " ") },
113
- EnumTypeDefinition: { leave: ({ description: e, name: t, directives: n, values: r }) => G("", e, "\n") + U([
114
- "enum",
115
- t,
116
- U(n, " "),
117
- W(r)
118
- ], " ") },
119
- EnumValueDefinition: { leave: ({ description: e, name: t, directives: n }) => G("", e, "\n") + U([t, U(n, " ")], " ") },
120
- InputObjectTypeDefinition: { leave: ({ description: e, name: t, directives: n, fields: r }) => G("", e, "\n") + U([
121
- "input",
122
- t,
123
- U(n, " "),
124
- W(r)
125
- ], " ") },
126
- DirectiveDefinition: { leave: ({ description: e, name: t, arguments: n, directives: r, repeatable: i, locations: a }) => G("", e, "\n") + "directive @" + t + (tt(n) ? G("(\n", et(U(n, "\n")), "\n)") : G("(", U(n, ", "), ")")) + G(" ", U(r, " ")) + (i ? " repeatable" : "") + " on " + U(a, " | ") },
127
- SchemaExtension: { leave: ({ directives: e, operationTypes: t }) => U([
128
- "extend schema",
129
- U(e, " "),
130
- W(t)
131
- ], " ") },
132
- ScalarTypeExtension: { leave: ({ name: e, directives: t }) => U([
133
- "extend scalar",
134
- e,
135
- U(t, " ")
136
- ], " ") },
137
- ObjectTypeExtension: { leave: ({ name: e, interfaces: t, directives: n, fields: r }) => U([
138
- "extend type",
139
- e,
140
- G("implements ", U(t, " & ")),
141
- U(n, " "),
142
- W(r)
143
- ], " ") },
144
- InterfaceTypeExtension: { leave: ({ name: e, interfaces: t, directives: n, fields: r }) => U([
145
- "extend interface",
146
- e,
147
- G("implements ", U(t, " & ")),
148
- U(n, " "),
149
- W(r)
150
- ], " ") },
151
- UnionTypeExtension: { leave: ({ name: e, directives: t, types: n }) => U([
152
- "extend union",
153
- e,
154
- U(t, " "),
155
- G("= ", U(n, " | "))
156
- ], " ") },
157
- EnumTypeExtension: { leave: ({ name: e, directives: t, values: n }) => U([
158
- "extend enum",
159
- e,
160
- U(t, " "),
161
- W(n)
162
- ], " ") },
163
- InputObjectTypeExtension: { leave: ({ name: e, directives: t, fields: n }) => U([
164
- "extend input",
165
- e,
166
- U(t, " "),
167
- W(n)
168
- ], " ") },
169
- DirectiveExtension: { leave: ({ name: e, directives: t }) => U(["extend directive @" + e, U(t, " ")], " ") },
170
- TypeCoordinate: { leave: ({ name: e }) => e },
171
- MemberCoordinate: { leave: ({ name: e, memberName: t }) => U([e, G(".", t)]) },
172
- ArgumentCoordinate: { leave: ({ name: e, fieldName: t, argumentName: n }) => U([
173
- e,
174
- G(".", t),
175
- G("(", n, ":)")
176
- ]) },
177
- DirectiveCoordinate: { leave: ({ name: e }) => U(["@", e]) },
178
- DirectiveArgumentCoordinate: { leave: ({ name: e, argumentName: t }) => U([
179
- "@",
180
- e,
181
- G("(", t, ":)")
182
- ]) }
183
- };
184
- function U(e, t = "") {
185
- return e?.filter((e) => e).join(t) ?? "";
186
- }
187
- function W(e) {
188
- return G("{\n", et(U(e, "\n")), "\n}");
189
- }
190
- function G(e, t, n = "") {
191
- return t != null && t !== "" ? e + t + n : "";
192
- }
193
- function et(e) {
194
- return G(" ", e.replace(/\n/g, "\n "));
195
- }
196
- function tt(e) {
197
- /* c8 ignore next */
198
- return e?.some((e) => e.includes("\n")) ?? !1;
199
- }
200
- //#endregion
201
- //#region node_modules/graphql/language/predicates.mjs
202
- function nt(e) {
203
- return e.kind === M.FIELD || e.kind === M.FRAGMENT_SPREAD || e.kind === M.INLINE_FRAGMENT;
204
- }
205
- //#endregion
206
- //#region node_modules/@apollo/client/utilities/graphql/DocumentTransform.js
207
- function rt(e) {
208
- return e;
209
- }
210
- var it = function() {
211
- function e(e, t) {
212
- t === void 0 && (t = Object.create(null)), this.resultCache = de ? /* @__PURE__ */ new WeakSet() : /* @__PURE__ */ new Set(), this.transform = e, t.getCacheKey && (this.getCacheKey = t.getCacheKey), this.cached = t.cache !== !1, this.resetCache();
213
- }
214
- return e.prototype.getCacheKey = function(e) {
215
- return [e];
216
- }, e.identity = function() {
217
- return new e(rt, { cache: !1 });
218
- }, e.split = function(t, n, r) {
219
- return r === void 0 && (r = e.identity()), Object.assign(new e(function(e) {
220
- return (t(e) ? n : r).transformDocument(e);
221
- }, { cache: !1 }), {
222
- left: n,
223
- right: r
224
- });
225
- }, e.prototype.resetCache = function() {
226
- var t = this;
227
- if (this.cached) {
228
- var n = new le(h);
229
- this.performWork = Me(e.prototype.performWork.bind(this), {
230
- makeCacheKey: function(e) {
231
- var r = t.getCacheKey(e);
232
- if (r) return F(Array.isArray(r), 104), n.lookupArray(r);
233
- },
234
- max: V["documentTransform.cache"],
235
- cache: ae
236
- });
237
- }
238
- }, e.prototype.performWork = function(e) {
239
- return Se(e), this.transform(e);
240
- }, e.prototype.transformDocument = function(e) {
241
- if (this.resultCache.has(e)) return e;
242
- var t = this.performWork(e);
243
- return this.resultCache.add(t), t;
244
- }, e.prototype.concat = function(t) {
245
- var n = this;
246
- return Object.assign(new e(function(e) {
247
- return t.transformDocument(n.transformDocument(e));
248
- }, { cache: !1 }), {
249
- left: this,
250
- right: t
251
- });
252
- }, e;
253
- }(), at, K = Object.assign(function(e) {
254
- var t = at.get(e);
255
- return t || (t = Ze(e), at.set(e, t)), t;
256
- }, { reset: function() {
257
- at = new r(V.print || 2e3);
258
- } });
259
- K.reset(), globalThis.__DEV__ !== !1 && ee("print", function() {
260
- return at ? at.size : 0;
261
- });
262
- //#endregion
263
- //#region node_modules/@apollo/client/utilities/graphql/transform.js
264
- var ot = {
265
- kind: M.FIELD,
266
- name: {
267
- kind: M.NAME,
268
- value: "__typename"
269
- }
270
- };
271
- function st(e, t) {
272
- return !e || e.selectionSet.selections.every(function(e) {
273
- return e.kind === M.FRAGMENT_SPREAD && st(t[e.name.value], t);
274
- });
275
- }
276
- function ct(e) {
277
- return st(Ve(e) || ze(e), f(Ue(e))) ? null : e;
278
- }
279
- function lt(e) {
280
- var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
281
- return e.forEach(function(e) {
282
- e && (e.name ? t.set(e.name, e) : e.test && n.set(e.test, e));
283
- }), function(e) {
284
- var r = t.get(e.name.value);
285
- return !r && n.size && n.forEach(function(t, n) {
286
- n(e) && (r = t);
287
- }), r;
288
- };
289
- }
290
- function ut(e) {
291
- var t = /* @__PURE__ */ new Map();
292
- return function(n) {
293
- n === void 0 && (n = e);
294
- var r = t.get(n);
295
- return r || t.set(n, r = {
296
- variables: /* @__PURE__ */ new Set(),
297
- fragmentSpreads: /* @__PURE__ */ new Set()
298
- }), r;
299
- };
300
- }
301
- function dt(e, t) {
302
- Se(t);
303
- for (var n = ut(""), r = ut(""), i = function(e) {
304
- for (var t = 0, i = void 0; t < e.length && (i = e[t]); ++t) if (!D(i)) {
305
- if (i.kind === M.OPERATION_DEFINITION) return n(i.name && i.name.value);
306
- if (i.kind === M.FRAGMENT_DEFINITION) return r(i.name.value);
307
- }
308
- return globalThis.__DEV__ !== !1 && F.error(124), null;
309
- }, a = 0, o = t.definitions.length - 1; o >= 0; --o) t.definitions[o].kind === M.OPERATION_DEFINITION && ++a;
310
- var s = lt(e), c = function(e) {
311
- return k(e) && e.map(s).some(function(e) {
312
- return e && e.remove;
313
- });
314
- }, l = /* @__PURE__ */ new Map(), u = !1, d = { enter: function(e) {
315
- if (c(e.directives)) return u = !0, null;
316
- } }, f = P(t, {
317
- Field: d,
318
- InlineFragment: d,
319
- VariableDefinition: { enter: function() {
320
- return !1;
321
- } },
322
- Variable: { enter: function(e, t, n, r, a) {
323
- var o = i(a);
324
- o && o.variables.add(e.name.value);
325
- } },
326
- FragmentSpread: { enter: function(e, t, n, r, a) {
327
- if (c(e.directives)) return u = !0, null;
328
- var o = i(a);
329
- o && o.fragmentSpreads.add(e.name.value);
330
- } },
331
- FragmentDefinition: {
332
- enter: function(e, t, n, r) {
333
- l.set(JSON.stringify(r), e);
334
- },
335
- leave: function(e, t, n, i) {
336
- if (e === l.get(JSON.stringify(i))) return e;
337
- if (a > 0 && e.selectionSet.selections.every(function(e) {
338
- return e.kind === M.FIELD && e.name.value === "__typename";
339
- })) return r(e.name.value).removed = !0, u = !0, null;
340
- }
341
- },
342
- Directive: { leave: function(e) {
343
- if (s(e)) return u = !0, null;
344
- } }
345
- });
346
- if (!u) return t;
347
- var p = function(e) {
348
- return e.transitiveVars || (e.transitiveVars = new Set(e.variables), e.removed || e.fragmentSpreads.forEach(function(t) {
349
- p(r(t)).transitiveVars.forEach(function(t) {
350
- e.transitiveVars.add(t);
351
- });
352
- })), e;
353
- }, m = /* @__PURE__ */ new Set();
354
- f.definitions.forEach(function(e) {
355
- e.kind === M.OPERATION_DEFINITION ? p(n(e.name && e.name.value)).fragmentSpreads.forEach(function(e) {
356
- m.add(e);
357
- }) : e.kind === M.FRAGMENT_DEFINITION && a === 0 && !r(e.name.value).removed && m.add(e.name.value);
358
- }), m.forEach(function(e) {
359
- p(r(e)).fragmentSpreads.forEach(function(e) {
360
- m.add(e);
361
- });
362
- });
363
- var h = function(e) {
364
- return !!(!m.has(e) || r(e).removed);
365
- }, g = { enter: function(e) {
366
- if (h(e.name.value)) return null;
367
- } };
368
- return ct(P(f, {
369
- FragmentSpread: g,
370
- FragmentDefinition: g,
371
- OperationDefinition: { leave: function(e) {
372
- if (e.variableDefinitions) {
373
- var t = p(n(e.name && e.name.value)).transitiveVars;
374
- if (t.size < e.variableDefinitions.length) return O(O({}, e), { variableDefinitions: e.variableDefinitions.filter(function(e) {
375
- return t.has(e.variable.name.value);
376
- }) });
377
- }
378
- } }
379
- }));
380
- }
381
- var ft = Object.assign(function(e) {
382
- return P(e, { SelectionSet: { enter: function(e, t, n) {
383
- if (!(n && n.kind === M.OPERATION_DEFINITION)) {
384
- var r = e.selections;
385
- if (r && !r.some(function(e) {
386
- return S(e) && (e.name.value === "__typename" || e.name.value.lastIndexOf("__", 0) === 0);
387
- })) {
388
- var i = n;
389
- if (!(S(i) && i.directives && i.directives.some(function(e) {
390
- return e.name.value === "export";
391
- }))) return O(O({}, e), { selections: me(me([], r, !0), [ot], !1) });
392
- }
393
- }
394
- } } });
395
- }, { added: function(e) {
396
- return e === ot;
397
- } });
398
- function pt(e) {
399
- return _e(e).operation === "query" ? e : P(e, { OperationDefinition: { enter: function(e) {
400
- return O(O({}, e), { operation: "query" });
401
- } } });
402
- }
403
- function mt(e) {
404
- return Se(e), dt([{
405
- test: function(e) {
406
- return e.name.value === "client";
407
- },
408
- remove: !0
409
- }], e);
410
- }
411
- function ht(e) {
412
- return Se(e), P(e, { FragmentSpread: function(e) {
413
- if (!e.directives?.some(function(e) {
414
- return e.name.value === "unmask";
415
- })) return O(O({}, e), { directives: me(me([], e.directives || [], !0), [{
416
- kind: M.DIRECTIVE,
417
- name: {
418
- kind: M.NAME,
419
- value: "nonreactive"
420
- }
421
- }], !1) });
422
- } });
423
- }
424
- //#endregion
425
- //#region node_modules/@apollo/client/utilities/common/mergeDeep.js
426
- var gt = Object.prototype.hasOwnProperty;
427
- function _t() {
428
- return vt([...arguments]);
429
- }
430
- function vt(e) {
431
- var t = e[0] || {}, n = e.length;
432
- if (n > 1) for (var r = new q(), i = 1; i < n; ++i) t = r.merge(t, e[i]);
433
- return t;
434
- }
435
- var yt = function(e, t, n) {
436
- return this.merge(e[n], t[n]);
437
- }, q = function() {
438
- function e(e) {
439
- e === void 0 && (e = yt), this.reconciler = e, this.isObject = _, this.pastCopies = /* @__PURE__ */ new Set();
440
- }
441
- return e.prototype.merge = function(e, t) {
442
- for (var n = this, r = [], i = 2; i < arguments.length; i++) r[i - 2] = arguments[i];
443
- return _(t) && _(e) ? (Object.keys(t).forEach(function(i) {
444
- if (gt.call(e, i)) {
445
- var a = e[i];
446
- if (t[i] !== a) {
447
- var o = n.reconciler.apply(n, me([
448
- e,
449
- t,
450
- i
451
- ], r, !1));
452
- o !== a && (e = n.shallowCopyForMerge(e), e[i] = o);
453
- }
454
- } else e = n.shallowCopyForMerge(e), e[i] = t[i];
455
- }), e) : t;
456
- }, e.prototype.shallowCopyForMerge = function(e) {
457
- return _(e) && (this.pastCopies.has(e) || (e = Array.isArray(e) ? e.slice(0) : O({ __proto__: Object.getPrototypeOf(e) }, e), this.pastCopies.add(e))), e;
458
- }, e;
459
- }();
460
- //#endregion
461
- //#region node_modules/@apollo/client/utilities/observables/asyncMap.js
462
- function bt(e, t, n) {
463
- return new B(function(r) {
464
- var i = { then: function(e) {
465
- return new Promise(function(t) {
466
- return t(e());
467
- });
468
- } };
469
- function a(e, t) {
470
- return function(n) {
471
- if (e) {
472
- var a = function() {
473
- return r.closed ? 0 : e(n);
474
- };
475
- i = i.then(a, a).then(function(e) {
476
- return r.next(e);
477
- }, function(e) {
478
- return r.error(e);
479
- });
480
- } else r[t](n);
481
- };
482
- }
483
- var o = {
484
- next: a(t, "next"),
485
- error: a(n, "error"),
486
- complete: function() {
487
- i.then(function() {
488
- return r.complete();
489
- });
490
- }
491
- }, s = e.subscribe(o);
492
- return function() {
493
- return s.unsubscribe();
494
- };
495
- });
496
- }
497
- //#endregion
498
- //#region node_modules/@apollo/client/utilities/observables/Concast.js
499
- function xt(e) {
500
- return e && typeof e.then == "function";
501
- }
502
- var J = function(e) {
503
- N(t, e);
504
- function t(t) {
505
- var n = e.call(this, function(e) {
506
- return n.addObserver(e), function() {
507
- return n.removeObserver(e);
508
- };
509
- }) || this;
510
- return n.observers = /* @__PURE__ */ new Set(), n.promise = new Promise(function(e, t) {
511
- n.resolve = e, n.reject = t;
512
- }), n.handlers = {
513
- next: function(e) {
514
- n.sub !== null && (n.latest = ["next", e], n.notify("next", e), Ie(n.observers, "next", e));
515
- },
516
- error: function(e) {
517
- var t = n.sub;
518
- t !== null && (t && setTimeout(function() {
519
- return t.unsubscribe();
520
- }), n.sub = null, n.latest = ["error", e], n.reject(e), n.notify("error", e), Ie(n.observers, "error", e));
521
- },
522
- complete: function() {
523
- var e = n, t = e.sub, r = e.sources, i = r === void 0 ? [] : r;
524
- if (t !== null) {
525
- var a = i.shift();
526
- a ? xt(a) ? a.then(function(e) {
527
- return n.sub = e.subscribe(n.handlers);
528
- }, n.handlers.error) : n.sub = a.subscribe(n.handlers) : (t && setTimeout(function() {
529
- return t.unsubscribe();
530
- }), n.sub = null, n.latest && n.latest[0] === "next" ? n.resolve(n.latest[1]) : n.resolve(), n.notify("complete"), Ie(n.observers, "complete"));
531
- }
532
- }
533
- }, n.nextResultListeners = /* @__PURE__ */ new Set(), n.cancel = function(e) {
534
- n.reject(e), n.sources = [], n.handlers.error(e);
535
- }, n.promise.catch(function(e) {}), typeof t == "function" && (t = [new B(t)]), xt(t) ? t.then(function(e) {
536
- return n.start(e);
537
- }, n.handlers.error) : n.start(t), n;
538
- }
539
- return t.prototype.start = function(e) {
540
- this.sub === void 0 && (this.sources = Array.from(e), this.handlers.complete());
541
- }, t.prototype.deliverLastMessage = function(e) {
542
- if (this.latest) {
543
- var t = this.latest[0], n = e[t];
544
- n && n.call(e, this.latest[1]), this.sub === null && t === "next" && e.complete && e.complete();
545
- }
546
- }, t.prototype.addObserver = function(e) {
547
- this.observers.has(e) || (this.deliverLastMessage(e), this.observers.add(e));
548
- }, t.prototype.removeObserver = function(e) {
549
- this.observers.delete(e) && this.observers.size < 1 && this.handlers.complete();
550
- }, t.prototype.notify = function(e, t) {
551
- var n = this.nextResultListeners;
552
- n.size && (this.nextResultListeners = /* @__PURE__ */ new Set(), n.forEach(function(n) {
553
- return n(e, t);
554
- }));
555
- }, t.prototype.beforeNext = function(e) {
556
- var t = !1;
557
- this.nextResultListeners.add(function(n, r) {
558
- t || (t = !0, e(n, r));
559
- });
560
- }, t;
561
- }(B);
562
- je(J);
563
- //#endregion
564
- //#region node_modules/@apollo/client/utilities/common/incrementalResult.js
565
- function St(e) {
566
- return "incremental" in e;
567
- }
568
- function Ct(e) {
569
- return "hasNext" in e && "data" in e;
570
- }
571
- function wt(e) {
572
- return St(e) || Ct(e);
573
- }
574
- function Tt(e) {
575
- return _(e) && "payload" in e;
576
- }
577
- function Et(e, t) {
578
- var n = e, r = new q();
579
- return St(t) && k(t.incremental) && t.incremental.forEach(function(e) {
580
- for (var t = e.data, i = e.path, a = i.length - 1; a >= 0; --a) {
581
- var o = i[a], s = isNaN(+o) ? {} : [];
582
- s[o] = t, t = s;
583
- }
584
- n = r.merge(n, t);
585
- }), n;
586
- }
587
- //#endregion
588
- //#region node_modules/@apollo/client/utilities/common/errorHandling.js
589
- function Dt(e) {
590
- return k(Ot(e));
591
- }
592
- function Ot(e) {
593
- var t = k(e.errors) ? e.errors.slice(0) : [];
594
- return St(e) && k(e.incremental) && e.incremental.forEach(function(e) {
595
- e.errors && t.push.apply(t, e.errors);
596
- }), t;
597
- }
598
- //#endregion
599
- //#region node_modules/@apollo/client/link/utils/fromError.js
600
- function kt(e) {
601
- return new B(function(t) {
602
- t.error(e);
603
- });
604
- }
605
- //#endregion
606
- //#region node_modules/@apollo/client/link/utils/throwServerError.js
607
- var At = function(e, t, n) {
608
- var r = Error(n);
609
- throw r.name = "ServerError", r.response = e, r.statusCode = e.status, r.result = t, r;
610
- };
611
- //#endregion
612
- //#region node_modules/@apollo/client/link/utils/validateOperation.js
613
- function jt(e) {
614
- for (var t = [
615
- "query",
616
- "operationName",
617
- "variables",
618
- "extensions",
619
- "context"
620
- ], n = 0, r = Object.keys(e); n < r.length; n++) {
621
- var i = r[n];
622
- if (t.indexOf(i) < 0) throw R(58, i);
623
- }
624
- return e;
625
- }
626
- //#endregion
627
- //#region node_modules/@apollo/client/link/utils/createOperation.js
628
- function Mt(e, t) {
629
- var n = O({}, e);
630
- return Object.defineProperty(t, "setContext", {
631
- enumerable: !1,
632
- value: function(e) {
633
- n = typeof e == "function" ? O(O({}, n), e(n)) : O(O({}, n), e);
634
- }
635
- }), Object.defineProperty(t, "getContext", {
636
- enumerable: !1,
637
- value: function() {
638
- return O({}, n);
639
- }
640
- }), t;
641
- }
642
- //#endregion
643
- //#region node_modules/@apollo/client/link/utils/transformOperation.js
644
- function Nt(e) {
645
- var t = {
646
- variables: e.variables || {},
647
- extensions: e.extensions || {},
648
- operationName: e.operationName,
649
- query: e.query
650
- };
651
- return t.operationName || (t.operationName = typeof t.query == "string" ? "" : te(t.query) || void 0), t;
652
- }
653
- //#endregion
654
- //#region node_modules/@apollo/client/link/utils/filterOperationVariables.js
655
- function Pt(e, t) {
656
- var n = O({}, e), r = new Set(Object.keys(e));
657
- return P(t, { Variable: function(e, t, n) {
658
- n && n.kind !== "VariableDefinition" && r.delete(e.name.value);
659
- } }), r.forEach(function(e) {
660
- delete n[e];
661
- }), n;
662
- }
663
- //#endregion
664
- //#region node_modules/@apollo/client/link/core/ApolloLink.js
665
- function Ft(e, t) {
666
- return t ? t(e) : B.of();
667
- }
668
- function It(e) {
669
- return typeof e == "function" ? new Y(e) : e;
670
- }
671
- function Lt(e) {
672
- return e.request.length <= 1;
673
- }
674
- var Y = function() {
675
- function e(e) {
676
- e && (this.request = e);
677
- }
678
- return e.empty = function() {
679
- return new e(function() {
680
- return B.of();
681
- });
682
- }, e.from = function(t) {
683
- return t.length === 0 ? e.empty() : t.map(It).reduce(function(e, t) {
684
- return e.concat(t);
685
- });
686
- }, e.split = function(t, n, r) {
687
- var i = It(n), a = It(r || new e(Ft)), o = Lt(i) && Lt(a) ? new e(function(e) {
688
- return t(e) ? i.request(e) || B.of() : a.request(e) || B.of();
689
- }) : new e(function(e, n) {
690
- return t(e) ? i.request(e, n) || B.of() : a.request(e, n) || B.of();
691
- });
692
- return Object.assign(o, {
693
- left: i,
694
- right: a
695
- });
696
- }, e.execute = function(e, t) {
697
- return e.request(Mt(t.context, Nt(jt(t)))) || B.of();
698
- }, e.concat = function(t, n) {
699
- var r = It(t);
700
- if (Lt(r)) return globalThis.__DEV__ !== !1 && F.warn(47, r), r;
701
- var i = It(n), a = Lt(i) ? new e(function(e) {
702
- return r.request(e, function(e) {
703
- return i.request(e) || B.of();
704
- }) || B.of();
705
- }) : new e(function(e, t) {
706
- return r.request(e, function(e) {
707
- return i.request(e, t) || B.of();
708
- }) || B.of();
709
- });
710
- return Object.assign(a, {
711
- left: r,
712
- right: i
713
- });
714
- }, e.prototype.split = function(t, n, r) {
715
- return this.concat(e.split(t, n, r || new e(Ft)));
716
- }, e.prototype.concat = function(t) {
717
- return e.concat(this, t);
718
- }, e.prototype.request = function(e, t) {
719
- throw R(48);
720
- }, e.prototype.onError = function(e, t) {
721
- if (globalThis.__DEV__ !== !1 && Ae("onError", function() {
722
- globalThis.__DEV__ !== !1 && F.warn(49);
723
- }), t && t.error) return t.error(e), !1;
724
- throw e;
725
- }, e.prototype.setOnError = function(e) {
726
- return globalThis.__DEV__ !== !1 && globalThis.__DEV__ !== !1 && F.warn(50), this.onError = e, this;
727
- }, e;
728
- }(), Rt = Y.from, zt = Y.execute;
729
- //#endregion
730
- //#region node_modules/@apollo/client/link/http/iterators/async.js
731
- function Bt(e) {
732
- var t, n = e[Symbol.asyncIterator]();
733
- return t = { next: function() {
734
- return n.next();
735
- } }, t[Symbol.asyncIterator] = function() {
736
- return this;
737
- }, t;
738
- }
739
- //#endregion
740
- //#region node_modules/@apollo/client/link/http/iterators/nodeStream.js
741
- function Vt(e) {
742
- var t = null, n = null, r = !1, i = [], a = [];
743
- function o(e) {
744
- if (!n) {
745
- if (a.length) {
746
- var t = a.shift();
747
- if (Array.isArray(t) && t[0]) return t[0]({
748
- value: e,
749
- done: !1
750
- });
751
- }
752
- i.push(e);
753
- }
754
- }
755
- function s(e) {
756
- n = e, a.slice().forEach(function(t) {
757
- t[1](e);
758
- }), !t || t();
759
- }
760
- function c() {
761
- r = !0, a.slice().forEach(function(e) {
762
- e[0]({
763
- value: void 0,
764
- done: !0
765
- });
766
- }), !t || t();
767
- }
768
- t = function() {
769
- t = null, e.removeListener("data", o), e.removeListener("error", s), e.removeListener("end", c), e.removeListener("finish", c), e.removeListener("close", c);
770
- }, e.on("data", o), e.on("error", s), e.on("end", c), e.on("finish", c), e.on("close", c);
771
- function l() {
772
- return new Promise(function(e, t) {
773
- if (n) return t(n);
774
- if (i.length) return e({
775
- value: i.shift(),
776
- done: !1
777
- });
778
- if (r) return e({
779
- value: void 0,
780
- done: !0
781
- });
782
- a.push([e, t]);
783
- });
784
- }
785
- var u = { next: function() {
786
- return l();
787
- } };
788
- return Pe && (u[Symbol.asyncIterator] = function() {
789
- return this;
790
- }), u;
791
- }
792
- //#endregion
793
- //#region node_modules/@apollo/client/link/http/iterators/promise.js
794
- function Ht(e) {
795
- var t = !1, n = { next: function() {
796
- return t ? Promise.resolve({
797
- value: void 0,
798
- done: !0
799
- }) : (t = !0, new Promise(function(t, n) {
800
- e.then(function(e) {
801
- t({
802
- value: e,
803
- done: !1
804
- });
805
- }).catch(n);
806
- }));
807
- } };
808
- return Pe && (n[Symbol.asyncIterator] = function() {
809
- return this;
810
- }), n;
811
- }
812
- //#endregion
813
- //#region node_modules/@apollo/client/link/http/iterators/reader.js
814
- function Ut(e) {
815
- var t = { next: function() {
816
- return e.read();
817
- } };
818
- return Pe && (t[Symbol.asyncIterator] = function() {
819
- return this;
820
- }), t;
821
- }
822
- //#endregion
823
- //#region node_modules/@apollo/client/link/http/responseIterator.js
824
- function Wt(e) {
825
- return !!e.body;
826
- }
827
- function Gt(e) {
828
- return !!e.getReader;
829
- }
830
- function Kt(e) {
831
- return !!(Pe && e[Symbol.asyncIterator]);
832
- }
833
- function qt(e) {
834
- return !!e.stream;
835
- }
836
- function Jt(e) {
837
- return !!e.arrayBuffer;
838
- }
839
- function Yt(e) {
840
- return !!e.pipe;
841
- }
842
- function Xt(e) {
843
- var t = e;
844
- if (Wt(e) && (t = e.body), Kt(t)) return Bt(t);
845
- if (Gt(t)) return Ut(t.getReader());
846
- if (qt(t)) return Ut(t.stream().getReader());
847
- if (Jt(t)) return Ht(t.arrayBuffer());
848
- if (Yt(t)) return Vt(t);
849
- throw Error("Unknown body type for responseIterator. Please pass a streamable response.");
850
- }
851
- //#endregion
852
- //#region node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js
853
- var Zt = Object.prototype.hasOwnProperty;
854
- function Qt(e, t) {
855
- return I(this, void 0, void 0, function() {
856
- var n, r, i, a, o, s, c, l, u, d, f, p, m, h, g, _, v, y, b, x, S, C, w;
857
- return j(this, function(T) {
858
- switch (T.label) {
859
- case 0:
860
- if (TextDecoder === void 0) throw Error("TextDecoder must be defined in the environment: please import a polyfill.");
861
- n = new TextDecoder("utf-8"), r = e.headers?.get("content-type"), i = "boundary=", a = r?.includes(i) ? r?.substring(r?.indexOf(i) + i.length).replace(/['"]/g, "").replace(/\;(.*)/gm, "").trim() : "-", o = `\r
862
- --${a}`, s = "", c = Xt(e), l = !0, T.label = 1;
863
- case 1: return l ? [4, c.next()] : [3, 3];
864
- case 2:
865
- for (u = T.sent(), d = u.value, f = u.done, p = typeof d == "string" ? d : n.decode(d), m = s.length - o.length + 1, l = !f, s += p, h = s.indexOf(o, m); h > -1;) {
866
- if (g = void 0, C = [s.slice(0, h), s.slice(h + o.length)], g = C[0], s = C[1], _ = g.indexOf("\r\n\r\n"), v = $t(g.slice(0, _)), y = v["content-type"], y && y.toLowerCase().indexOf("application/json") === -1) throw Error("Unsupported patch content type: application/json is required.");
867
- if (b = g.slice(_), b) {
868
- if (x = en(e, b), Object.keys(x).length > 1 || "data" in x || "incremental" in x || "errors" in x || "payload" in x) if (Tt(x)) {
869
- if (S = {}, "payload" in x) {
870
- if (Object.keys(x).length === 1 && x.payload === null) return [2];
871
- S = O({}, x.payload);
872
- }
873
- "errors" in x && (S = O(O({}, S), { extensions: O(O({}, "extensions" in S ? S.extensions : null), (w = {}, w[ue] = x.errors, w)) })), t(S);
874
- } else t(x);
875
- else if (Object.keys(x).length === 1 && "hasNext" in x && !x.hasNext) return [2];
876
- }
877
- h = s.indexOf(o);
878
- }
879
- return [3, 1];
880
- case 3: return [2];
881
- }
882
- });
883
- });
884
- }
885
- function $t(e) {
886
- var t = {};
887
- return e.split("\n").forEach(function(e) {
888
- var n = e.indexOf(":");
889
- if (n > -1) {
890
- var r = e.slice(0, n).trim().toLowerCase();
891
- t[r] = e.slice(n + 1).trim();
892
- }
893
- }), t;
894
- }
895
- function en(e, t) {
896
- e.status >= 300 && At(e, function() {
897
- try {
898
- return JSON.parse(t);
899
- } catch {
900
- return t;
901
- }
902
- }(), `Response not successful: Received status code ${e.status}`);
903
- try {
904
- return JSON.parse(t);
905
- } catch (r) {
906
- var n = r;
907
- throw n.name = "ServerParseError", n.response = e, n.statusCode = e.status, n.bodyText = t, n;
908
- }
909
- }
910
- function tn(e, t) {
911
- e.result && e.result.errors && e.result.data && t.next(e.result), t.error(e);
912
- }
913
- function nn(e) {
914
- return function(t) {
915
- return t.text().then(function(e) {
916
- return en(t, e);
917
- }).then(function(n) {
918
- return !Array.isArray(n) && !Zt.call(n, "data") && !Zt.call(n, "errors") && At(t, n, `Server response was missing for query '${Array.isArray(e) ? e.map(function(e) {
919
- return e.operationName;
920
- }) : e.operationName}'.`), n;
921
- });
922
- };
923
- }
924
- //#endregion
925
- //#region node_modules/@apollo/client/link/http/serializeFetchParameter.js
926
- var rn = function(e, t) {
927
- var n;
928
- try {
929
- n = JSON.stringify(e);
930
- } catch (e) {
931
- var r = R(54, t, e.message);
932
- throw r.parseError = e, r;
933
- }
934
- return n;
935
- }, an = {
936
- http: {
937
- includeQuery: !0,
938
- includeExtensions: !1,
939
- preserveHeaderCase: !1
940
- },
941
- headers: {
942
- accept: "*/*",
943
- "content-type": "application/json"
944
- },
945
- options: { method: "POST" }
946
- }, on = function(e, t) {
947
- return t(e);
948
- };
949
- function sn(e, t) {
950
- var n = [...arguments].slice(2), r = {}, i = {};
951
- n.forEach(function(e) {
952
- r = O(O(O({}, r), e.options), { headers: O(O({}, r.headers), e.headers) }), e.credentials && (r.credentials = e.credentials), i = O(O({}, i), e.http);
953
- }), r.headers && (r.headers = cn(r.headers, i.preserveHeaderCase));
954
- var a = e.operationName, o = e.extensions, s = e.variables, c = e.query, l = {
955
- operationName: a,
956
- variables: s
957
- };
958
- return i.includeExtensions && (l.extensions = o), i.includeQuery && (l.query = t(c, K)), {
959
- options: r,
960
- body: l
961
- };
962
- }
963
- function cn(e, t) {
964
- if (!t) {
965
- var n = {};
966
- return Object.keys(Object(e)).forEach(function(t) {
967
- n[t.toLowerCase()] = e[t];
968
- }), n;
969
- }
970
- var r = {};
971
- Object.keys(Object(e)).forEach(function(t) {
972
- r[t.toLowerCase()] = {
973
- originalName: t,
974
- value: e[t]
975
- };
976
- });
977
- var i = {};
978
- return Object.keys(r).forEach(function(e) {
979
- i[r[e].originalName] = r[e].value;
980
- }), i;
981
- }
982
- //#endregion
983
- //#region node_modules/@apollo/client/link/http/checkFetcher.js
984
- var ln = function(e) {
985
- if (!e && typeof fetch > "u") throw R(51);
986
- }, un = function(e, t) {
987
- return e.getContext().uri || (typeof t == "function" ? t(e) : t || "/graphql");
988
- };
989
- //#endregion
990
- //#region node_modules/@apollo/client/link/http/rewriteURIForGET.js
991
- function dn(e, t) {
992
- var n = [], r = function(e, t) {
993
- n.push(`${e}=${encodeURIComponent(t)}`);
994
- };
995
- if ("query" in t && r("query", t.query), t.operationName && r("operationName", t.operationName), t.variables) {
996
- var i = void 0;
997
- try {
998
- i = rn(t.variables, "Variables map");
999
- } catch (e) {
1000
- return { parseError: e };
1001
- }
1002
- r("variables", i);
1003
- }
1004
- if (t.extensions) {
1005
- var a = void 0;
1006
- try {
1007
- a = rn(t.extensions, "Extensions map");
1008
- } catch (e) {
1009
- return { parseError: e };
1010
- }
1011
- r("extensions", a);
1012
- }
1013
- var o = "", s = e, c = e.indexOf("#");
1014
- c !== -1 && (o = e.substr(c), s = e.substr(0, c));
1015
- var l = s.indexOf("?") === -1 ? "?" : "&";
1016
- return { newURI: s + l + n.join("&") + o };
1017
- }
1018
- //#endregion
1019
- //#region node_modules/@apollo/client/link/http/createHttpLink.js
1020
- var fn = Re(function() {
1021
- return fetch;
1022
- }), pn = function(t) {
1023
- t === void 0 && (t = {});
1024
- var n = t.uri, r = n === void 0 ? "/graphql" : n, i = t.fetch, a = t.print, o = a === void 0 ? on : a, s = t.includeExtensions, c = t.preserveHeaderCase, l = t.useGETForQueries, u = t.includeUnusedVariables, d = u === void 0 ? !1 : u, f = A(t, [
1025
- "uri",
1026
- "fetch",
1027
- "print",
1028
- "includeExtensions",
1029
- "preserveHeaderCase",
1030
- "useGETForQueries",
1031
- "includeUnusedVariables"
1032
- ]);
1033
- globalThis.__DEV__ !== !1 && ln(i || fn);
1034
- var p = {
1035
- http: {
1036
- includeExtensions: s,
1037
- preserveHeaderCase: c
1038
- },
1039
- options: f.fetchOptions,
1040
- credentials: f.credentials,
1041
- headers: f.headers
1042
- };
1043
- return new Y(function(t) {
1044
- var n = un(t, r), a = t.getContext(), s = {};
1045
- if (a.clientAwareness) {
1046
- var c = a.clientAwareness, u = c.name, f = c.version;
1047
- u && (s["apollographql-client-name"] = u), f && (s["apollographql-client-version"] = f);
1048
- }
1049
- var m = O(O({}, s), a.headers), h = {
1050
- http: a.http,
1051
- options: a.fetchOptions,
1052
- credentials: a.credentials,
1053
- headers: m
1054
- };
1055
- if (e(["client"], t.query)) {
1056
- globalThis.__DEV__ !== !1 && globalThis.__DEV__ !== !1 && F.warn(52);
1057
- var g = mt(t.query);
1058
- if (!g) return kt(/* @__PURE__ */ Error("HttpLink: Trying to send a client-only query to the server. To send to the server, ensure a non-client field is added to the query or set the `transformOptions.removeClientFields` option to `true`."));
1059
- t.query = g;
1060
- }
1061
- var _ = sn(t, o, an, p, h), v = _.options, y = _.body;
1062
- y.variables && !d && (y.variables = Pt(y.variables, t.query));
1063
- var b;
1064
- !v.signal && typeof AbortController < "u" && (b = new AbortController(), v.signal = b.signal);
1065
- var x = function(e) {
1066
- return e.kind === "OperationDefinition" && e.operation === "mutation";
1067
- }, S = function(e) {
1068
- return e.kind === "OperationDefinition" && e.operation === "subscription";
1069
- }(_e(t.query)), C = e(["defer"], t.query);
1070
- if (l && !t.query.definitions.some(x) && (v.method = "GET"), C || S) {
1071
- v.headers = v.headers || {};
1072
- var w = "multipart/mixed;";
1073
- S && C && globalThis.__DEV__ !== !1 && F.warn(53), S ? w += "boundary=graphql;subscriptionSpec=1.0,application/json" : C && (w += "deferSpec=20220824,application/json"), v.headers.accept = w;
1074
- }
1075
- if (v.method === "GET") {
1076
- var T = dn(n, y), E = T.newURI, ee = T.parseError;
1077
- if (ee) return kt(ee);
1078
- n = E;
1079
- } else try {
1080
- v.body = rn(y, "Payload");
1081
- } catch (e) {
1082
- return kt(e);
1083
- }
1084
- return new B(function(e) {
1085
- var r = i || Re(function() {
1086
- return fetch;
1087
- }) || fn, a = e.next.bind(e);
1088
- return r(n, v).then(function(e) {
1089
- t.setContext({ response: e });
1090
- var n = e.headers?.get("content-type");
1091
- return n !== null && /^multipart\/mixed/i.test(n) ? Qt(e, a) : nn(t)(e).then(a);
1092
- }).then(function() {
1093
- b = void 0, e.complete();
1094
- }).catch(function(t) {
1095
- b = void 0, tn(t, e);
1096
- }), function() {
1097
- b && b.abort();
1098
- };
1099
- });
1100
- });
1101
- }, mn = function(e) {
1102
- N(t, e);
1103
- function t(t) {
1104
- t === void 0 && (t = {});
1105
- var n = e.call(this, pn(t).request) || this;
1106
- return n.options = t, n;
1107
- }
1108
- return t;
1109
- }(Y), hn = h ? WeakMap : Map, gn = de ? WeakSet : Set, _n = new Ce(), vn = !1;
1110
- function yn() {
1111
- vn || (vn = !0, globalThis.__DEV__ !== !1 && F.warn(64));
1112
- }
1113
- //#endregion
1114
- //#region node_modules/@apollo/client/masking/maskDefinition.js
1115
- function bn(e, t, n) {
1116
- return _n.withValue(!0, function() {
1117
- var r = Sn(e, t, n, !1);
1118
- return Object.isFrozen(e) && ye(r), r;
1119
- });
1120
- }
1121
- function xn(e, t) {
1122
- if (t.has(e)) return t.get(e);
1123
- var n = Array.isArray(e) ? [] : Object.create(null);
1124
- return t.set(e, n), n;
1125
- }
1126
- function Sn(e, t, n, r, i) {
1127
- var a = n.knownChanged, o = xn(e, n.mutableTargets);
1128
- if (Array.isArray(e)) {
1129
- for (var s = 0, c = Array.from(e.entries()); s < c.length; s++) {
1130
- var l = c[s], u = l[0], d = l[1];
1131
- if (d === null) {
1132
- o[u] = null;
1133
- continue;
1134
- }
1135
- var f = Sn(d, t, n, r, globalThis.__DEV__ === !1 ? void 0 : `${i || ""}[${u}]`);
1136
- a.has(f) && a.add(o), o[u] = f;
1137
- }
1138
- return a.has(o) ? o : e;
1139
- }
1140
- for (var p = 0, m = t.selections; p < m.length; p++) {
1141
- var h = m[p], g = void 0;
1142
- if (r && a.add(o), h.kind === M.FIELD) {
1143
- var _ = y(h), v = h.selectionSet;
1144
- if (g = o[_] || e[_], g === void 0) continue;
1145
- if (v && g !== null) {
1146
- var f = Sn(e[_], v, n, r, globalThis.__DEV__ === !1 ? void 0 : `${i || ""}.${_}`);
1147
- a.has(f) && (g = f);
1148
- }
1149
- globalThis.__DEV__ === !1 && (o[_] = g), globalThis.__DEV__ !== !1 && (r && _ !== "__typename" && !Object.getOwnPropertyDescriptor(o, _)?.value ? Object.defineProperty(o, _, Cn(_, g, i || "", n.operationName, n.operationType)) : (delete o[_], o[_] = g));
1150
- }
1151
- if (h.kind === M.INLINE_FRAGMENT && (!h.typeCondition || n.cache.fragmentMatches(h, e.__typename)) && (g = Sn(e, h.selectionSet, n, r, i)), h.kind === M.FRAGMENT_SPREAD) {
1152
- var b = h.name.value, x = n.fragmentMap[b] || (n.fragmentMap[b] = n.cache.lookupFragment(b));
1153
- F(x, 59, b);
1154
- var S = pe(h);
1155
- S !== "mask" && (g = Sn(e, x.selectionSet, n, S === "migrate", i));
1156
- }
1157
- a.has(g) && a.add(o);
1158
- }
1159
- return "__typename" in e && !("__typename" in o) && (o.__typename = e.__typename), Object.keys(o).length !== Object.keys(e).length && a.add(o), a.has(o) ? o : e;
1160
- }
1161
- function Cn(e, t, n, r, i) {
1162
- var a = function() {
1163
- return _n.getValue() ? t : (globalThis.__DEV__ !== !1 && F.warn(60, r ? `${i} '${r}'` : `anonymous ${i}`, `${n}.${e}`.replace(/^\./, "")), a = function() {
1164
- return t;
1165
- }, t);
1166
- };
1167
- return {
1168
- get: function() {
1169
- return a();
1170
- },
1171
- set: function(e) {
1172
- a = function() {
1173
- return e;
1174
- };
1175
- },
1176
- enumerable: !0,
1177
- configurable: !0
1178
- };
1179
- }
1180
- //#endregion
1181
- //#region node_modules/@apollo/client/masking/maskFragment.js
1182
- function wn(e, t, n, r) {
1183
- if (!n.fragmentMatches) return globalThis.__DEV__ !== !1 && yn(), e;
1184
- var i = t.definitions.filter(function(e) {
1185
- return e.kind === M.FRAGMENT_DEFINITION;
1186
- });
1187
- r === void 0 && (F(i.length === 1, 61, i.length), r = i[0].name.value);
1188
- var a = i.find(function(e) {
1189
- return e.name.value === r;
1190
- });
1191
- return F(!!a, 62, r), e == null || w(e, {}) ? e : bn(e, a.selectionSet, {
1192
- operationType: "fragment",
1193
- operationName: a.name.value,
1194
- fragmentMap: f(Ue(t)),
1195
- cache: n,
1196
- mutableTargets: new hn(),
1197
- knownChanged: new gn()
1198
- });
1199
- }
1200
- //#endregion
1201
- //#region node_modules/@apollo/client/masking/maskOperation.js
1202
- function Tn(e, t, n) {
1203
- if (!n.fragmentMatches) return globalThis.__DEV__ !== !1 && yn(), e;
1204
- var r = Ve(t);
1205
- return F(r, 63), e == null ? e : bn(e, r.selectionSet, {
1206
- operationType: r.operation,
1207
- operationName: r.name?.value,
1208
- fragmentMap: f(Ue(t)),
1209
- cache: n,
1210
- mutableTargets: new hn(),
1211
- knownChanged: new gn()
1212
- });
1213
- }
1214
- //#endregion
1215
- //#region node_modules/@apollo/client/cache/core/cache.js
1216
- var En = function() {
1217
- function e() {
1218
- this.assumeImmutableResults = !1, this.getFragmentDoc = Me(se, {
1219
- max: V["cache.fragmentQueryDocuments"] || 1e3,
1220
- cache: ae
1221
- });
1222
- }
1223
- return e.prototype.lookupFragment = function(e) {
1224
- return null;
1225
- }, e.prototype.batch = function(e) {
1226
- var t = this, n = typeof e.optimistic == "string" ? e.optimistic : e.optimistic === !1 ? null : void 0, r;
1227
- return this.performTransaction(function() {
1228
- return r = e.update(t);
1229
- }, n), r;
1230
- }, e.prototype.recordOptimisticTransaction = function(e, t) {
1231
- this.performTransaction(e, t);
1232
- }, e.prototype.transformDocument = function(e) {
1233
- return e;
1234
- }, e.prototype.transformForLink = function(e) {
1235
- return e;
1236
- }, e.prototype.identify = function(e) {}, e.prototype.gc = function() {
1237
- return [];
1238
- }, e.prototype.modify = function(e) {
1239
- return !1;
1240
- }, e.prototype.readQuery = function(e, t) {
1241
- var n = this;
1242
- return t === void 0 && (t = !!e.optimistic), globalThis.__DEV__ !== !1 && L(e, "canonizeResults", "cache.readQuery"), z("canonizeResults", function() {
1243
- return n.read(O(O({}, e), {
1244
- rootId: e.id || "ROOT_QUERY",
1245
- optimistic: t
1246
- }));
1247
- });
1248
- }, e.prototype.watchFragment = function(e) {
1249
- var t = this, n = e.fragment, r = e.fragmentName, i = e.from, a = e.optimistic, o = a === void 0 ? !0 : a, s = A(e, [
1250
- "fragment",
1251
- "fragmentName",
1252
- "from",
1253
- "optimistic"
1254
- ]), c = this.getFragmentDoc(n, r), l = i === void 0 || typeof i == "string" ? i : this.identify(i), u = !!e[Symbol.for("apollo.dataMasking")];
1255
- if (globalThis.__DEV__ !== !1) {
1256
- var d = r || ze(n).name.value;
1257
- l || globalThis.__DEV__ !== !1 && F.warn(1, d);
1258
- }
1259
- var f = O(O({}, s), {
1260
- returnPartialData: !0,
1261
- id: l,
1262
- query: c,
1263
- optimistic: o
1264
- }), p;
1265
- return new B(function(i) {
1266
- return t.watch(O(O({}, f), {
1267
- immediate: !0,
1268
- callback: function(a) {
1269
- var o = u ? wn(a.result, n, t, r) : a.result;
1270
- if (!(p && Ne(c, { data: p.result }, { data: o }, e.variables))) {
1271
- var s = {
1272
- data: o,
1273
- complete: !!a.complete
1274
- };
1275
- a.missing && (s.missing = vt(a.missing.map(function(e) {
1276
- return e.missing;
1277
- }))), p = O(O({}, a), { result: o }), i.next(s);
1278
- }
1279
- }
1280
- }));
1281
- });
1282
- }, e.prototype.readFragment = function(e, t) {
1283
- var n = this;
1284
- return t === void 0 && (t = !!e.optimistic), globalThis.__DEV__ !== !1 && L(e, "canonizeResults", "cache.readFragment"), z("canonizeResults", function() {
1285
- return n.read(O(O({}, e), {
1286
- query: n.getFragmentDoc(e.fragment, e.fragmentName),
1287
- rootId: e.id,
1288
- optimistic: t
1289
- }));
1290
- });
1291
- }, e.prototype.writeQuery = function(e) {
1292
- var t = e.id, n = e.data, r = A(e, ["id", "data"]);
1293
- return this.write(Object.assign(r, {
1294
- dataId: t || "ROOT_QUERY",
1295
- result: n
1296
- }));
1297
- }, e.prototype.writeFragment = function(e) {
1298
- var t = e.id, n = e.data, r = e.fragment, i = e.fragmentName, a = A(e, [
1299
- "id",
1300
- "data",
1301
- "fragment",
1302
- "fragmentName"
1303
- ]);
1304
- return this.write(Object.assign(a, {
1305
- query: this.getFragmentDoc(r, i),
1306
- dataId: t,
1307
- result: n
1308
- }));
1309
- }, e.prototype.updateQuery = function(e, t) {
1310
- return globalThis.__DEV__ !== !1 && L(e, "canonizeResults", "cache.updateQuery"), this.batch({ update: function(n) {
1311
- var r = z("canonizeResults", function() {
1312
- return n.readQuery(e);
1313
- }), i = t(r);
1314
- return i == null ? r : (n.writeQuery(O(O({}, e), { data: i })), i);
1315
- } });
1316
- }, e.prototype.updateFragment = function(e, t) {
1317
- return globalThis.__DEV__ !== !1 && L(e, "canonizeResults", "cache.updateFragment"), this.batch({ update: function(n) {
1318
- var r = z("canonizeResults", function() {
1319
- return n.readFragment(e);
1320
- }), i = t(r);
1321
- return i == null ? r : (n.writeFragment(O(O({}, e), { data: i })), i);
1322
- } });
1323
- }, e;
1324
- }();
1325
- globalThis.__DEV__ !== !1 && (En.prototype.getMemoryInternals = c);
1326
- //#endregion
1327
- //#region node_modules/@apollo/client/cache/core/types/common.js
1328
- var Dn = function(e) {
1329
- N(t, e);
1330
- function t(n, r, i, a) {
1331
- var o, s = e.call(this, n) || this;
1332
- if (s.message = n, s.path = r, s.query = i, s.variables = a, Array.isArray(s.path)) {
1333
- s.missing = s.message;
1334
- for (var c = s.path.length - 1; c >= 0; --c) s.missing = (o = {}, o[s.path[c]] = s.missing, o);
1335
- } else s.missing = s.path;
1336
- return s.__proto__ = t.prototype, s;
1337
- }
1338
- return t;
1339
- }(Error), X = Object.prototype.hasOwnProperty;
1340
- function On(e) {
1341
- return e == null;
1342
- }
1343
- function kn(e, t) {
1344
- var n = e.__typename, r = e.id, i = e._id;
1345
- if (typeof n == "string" && (t && (t.keyObject = On(r) ? On(i) ? void 0 : { _id: i } : { id: r }), On(r) && !On(i) && (r = i), !On(r))) return `${n}:${typeof r == "number" || typeof r == "string" ? r : JSON.stringify(r)}`;
1346
- }
1347
- var An = {
1348
- dataIdFromObject: kn,
1349
- addTypename: !0,
1350
- resultCaching: !0,
1351
- canonizeResults: !1
1352
- };
1353
- function jn(e) {
1354
- return ge(An, e);
1355
- }
1356
- function Mn(e) {
1357
- var t = e.canonizeResults;
1358
- return t === void 0 ? An.canonizeResults : t;
1359
- }
1360
- function Nn(e, t) {
1361
- return n(t) ? e.get(t.__ref, "__typename") : t && t.__typename;
1362
- }
1363
- var Pn = /^[_a-z][_0-9a-z]*/i;
1364
- function Z(e) {
1365
- var t = e.match(Pn);
1366
- return t ? t[0] : e;
1367
- }
1368
- function Fn(e, t, n) {
1369
- return _(t) ? D(t) ? t.every(function(t) {
1370
- return Fn(e, t, n);
1371
- }) : e.selections.every(function(e) {
1372
- if (S(e) && xe(e, n)) {
1373
- var r = y(e);
1374
- return X.call(t, r) && (!e.selectionSet || Fn(e.selectionSet, t[r], n));
1375
- }
1376
- return !0;
1377
- }) : !1;
1378
- }
1379
- function In(e) {
1380
- return _(e) && !n(e) && !D(e);
1381
- }
1382
- function Ln() {
1383
- return new q();
1384
- }
1385
- function Rn(e, t) {
1386
- var n = f(Ue(e));
1387
- return {
1388
- fragmentMap: n,
1389
- lookupFragment: function(e) {
1390
- var r = n[e];
1391
- return !r && t && (r = t.lookup(e)), r || null;
1392
- }
1393
- };
1394
- }
1395
- //#endregion
1396
- //#region node_modules/@apollo/client/cache/inmemory/entityStore.js
1397
- var zn = Object.create(null), Bn = function() {
1398
- return zn;
1399
- }, Vn = Object.create(null), Hn = function() {
1400
- function e(e, t) {
1401
- var r = this;
1402
- this.policies = e, this.group = t, this.data = Object.create(null), this.rootIds = Object.create(null), this.refs = Object.create(null), this.getFieldValue = function(e, t) {
1403
- return ye(n(e) ? r.get(e.__ref, t) : e && e[t]);
1404
- }, this.canRead = function(e) {
1405
- return n(e) ? r.has(e.__ref) : typeof e == "object";
1406
- }, this.toReference = function(e, t) {
1407
- if (typeof e == "string") return Te(e);
1408
- if (n(e)) return e;
1409
- var i = r.policies.identify(e)[0];
1410
- if (i) {
1411
- var a = Te(i);
1412
- return t && r.merge(i, e), a;
1413
- }
1414
- };
1415
- }
1416
- return e.prototype.toObject = function() {
1417
- return O({}, this.data);
1418
- }, e.prototype.has = function(e) {
1419
- return this.lookup(e, !0) !== void 0;
1420
- }, e.prototype.get = function(e, t) {
1421
- if (this.group.depend(e, t), X.call(this.data, e)) {
1422
- var n = this.data[e];
1423
- if (n && X.call(n, t)) return n[t];
1424
- }
1425
- if (t === "__typename" && X.call(this.policies.rootTypenamesById, e)) return this.policies.rootTypenamesById[e];
1426
- if (this instanceof Q) return this.parent.get(e, t);
1427
- }, e.prototype.lookup = function(e, t) {
1428
- if (t && this.group.depend(e, "__exists"), X.call(this.data, e)) return this.data[e];
1429
- if (this instanceof Q) return this.parent.lookup(e, t);
1430
- if (this.policies.rootTypenamesById[e]) return Object.create(null);
1431
- }, e.prototype.merge = function(e, t) {
1432
- var r = this, i;
1433
- n(e) && (e = e.__ref), n(t) && (t = t.__ref);
1434
- var a = typeof e == "string" ? this.lookup(i = e) : e, o = typeof t == "string" ? this.lookup(i = t) : t;
1435
- if (o) {
1436
- F(typeof i == "string", 2);
1437
- var s = new q(qn).merge(a, o);
1438
- if (this.data[i] = s, s !== a && (delete this.refs[i], this.group.caching)) {
1439
- var c = Object.create(null);
1440
- a || (c.__exists = 1), Object.keys(o).forEach(function(e) {
1441
- if (!a || a[e] !== s[e]) {
1442
- c[e] = 1;
1443
- var t = Z(e);
1444
- t !== e && !r.policies.hasKeyArgs(s.__typename, t) && (c[t] = 1), s[e] === void 0 && !(r instanceof Q) && delete s[e];
1445
- }
1446
- }), c.__typename && !(a && a.__typename) && this.policies.rootTypenamesById[i] === s.__typename && delete c.__typename, Object.keys(c).forEach(function(e) {
1447
- return r.group.dirty(i, e);
1448
- });
1449
- }
1450
- }
1451
- }, e.prototype.modify = function(e, t) {
1452
- var r = this, i = this.lookup(e);
1453
- if (i) {
1454
- var a = Object.create(null), o = !1, s = !0, c = {
1455
- DELETE: zn,
1456
- INVALIDATE: Vn,
1457
- isReference: n,
1458
- toReference: this.toReference,
1459
- canRead: this.canRead,
1460
- readField: function(t, n) {
1461
- return r.policies.readField(typeof t == "string" ? {
1462
- fieldName: t,
1463
- from: n || Te(e)
1464
- } : t, { store: r });
1465
- }
1466
- };
1467
- if (Object.keys(i).forEach(function(l) {
1468
- var u = Z(l), d = i[l];
1469
- if (d !== void 0) {
1470
- var f = typeof t == "function" ? t : t[l] || t[u];
1471
- if (f) {
1472
- var p = f === Bn ? zn : f(ye(d), O(O({}, c), {
1473
- fieldName: u,
1474
- storeFieldName: l,
1475
- storage: r.getStorage(e, l)
1476
- }));
1477
- if (p === Vn) r.group.dirty(e, l);
1478
- else if (p === zn && (p = void 0), p !== d && (a[l] = p, o = !0, d = p, globalThis.__DEV__ !== !1)) {
1479
- var m = function(e) {
1480
- if (r.lookup(e.__ref) === void 0) return globalThis.__DEV__ !== !1 && F.warn(3, e), !0;
1481
- };
1482
- if (n(p)) m(p);
1483
- else if (Array.isArray(p)) for (var h = !1, g = void 0, _ = 0, v = p; _ < v.length; _++) {
1484
- var y = v[_];
1485
- if (n(y)) {
1486
- if (h = !0, m(y)) break;
1487
- } else typeof y == "object" && y && r.policies.identify(y)[0] && (g = y);
1488
- if (h && g !== void 0) {
1489
- globalThis.__DEV__ !== !1 && F.warn(4, g);
1490
- break;
1491
- }
1492
- }
1493
- }
1494
- }
1495
- d !== void 0 && (s = !1);
1496
- }
1497
- }), o) return this.merge(e, a), s && (this instanceof Q ? this.data[e] = void 0 : delete this.data[e], this.group.dirty(e, "__exists")), !0;
1498
- }
1499
- return !1;
1500
- }, e.prototype.delete = function(e, t, n) {
1501
- var r, i = this.lookup(e);
1502
- if (i) {
1503
- var a = this.getFieldValue(i, "__typename"), o = t && n ? this.policies.getStoreFieldName({
1504
- typename: a,
1505
- fieldName: t,
1506
- args: n
1507
- }) : t;
1508
- return this.modify(e, o ? (r = {}, r[o] = Bn, r) : Bn);
1509
- }
1510
- return !1;
1511
- }, e.prototype.evict = function(e, t) {
1512
- var n = !1;
1513
- return e.id && (X.call(this.data, e.id) && (n = this.delete(e.id, e.fieldName, e.args)), this instanceof Q && this !== t && (n = this.parent.evict(e, t) || n), (e.fieldName || n) && this.group.dirty(e.id, e.fieldName || "__exists")), n;
1514
- }, e.prototype.clear = function() {
1515
- this.replace(null);
1516
- }, e.prototype.extract = function() {
1517
- var e = this, t = this.toObject(), n = [];
1518
- return this.getRootIdSet().forEach(function(t) {
1519
- X.call(e.policies.rootTypenamesById, t) || n.push(t);
1520
- }), n.length && (t.__META = { extraRootIds: n.sort() }), t;
1521
- }, e.prototype.replace = function(e) {
1522
- var t = this;
1523
- if (Object.keys(this.data).forEach(function(n) {
1524
- e && X.call(e, n) || t.delete(n);
1525
- }), e) {
1526
- var n = e.__META, r = A(e, ["__META"]);
1527
- Object.keys(r).forEach(function(e) {
1528
- t.merge(e, r[e]);
1529
- }), n && n.extraRootIds.forEach(this.retain, this);
1530
- }
1531
- }, e.prototype.retain = function(e) {
1532
- return this.rootIds[e] = (this.rootIds[e] || 0) + 1;
1533
- }, e.prototype.release = function(e) {
1534
- if (this.rootIds[e] > 0) {
1535
- var t = --this.rootIds[e];
1536
- return t || delete this.rootIds[e], t;
1537
- }
1538
- return 0;
1539
- }, e.prototype.getRootIdSet = function(e) {
1540
- return e === void 0 && (e = /* @__PURE__ */ new Set()), Object.keys(this.rootIds).forEach(e.add, e), this instanceof Q ? this.parent.getRootIdSet(e) : Object.keys(this.policies.rootTypenamesById).forEach(e.add, e), e;
1541
- }, e.prototype.gc = function() {
1542
- var e = this, t = this.getRootIdSet(), n = this.toObject();
1543
- t.forEach(function(r) {
1544
- X.call(n, r) && (Object.keys(e.findChildRefIds(r)).forEach(t.add, t), delete n[r]);
1545
- });
1546
- var r = Object.keys(n);
1547
- if (r.length) {
1548
- for (var i = this; i instanceof Q;) i = i.parent;
1549
- r.forEach(function(e) {
1550
- return i.delete(e);
1551
- });
1552
- }
1553
- return r;
1554
- }, e.prototype.findChildRefIds = function(e) {
1555
- if (!X.call(this.refs, e)) {
1556
- var t = this.refs[e] = Object.create(null), r = this.data[e];
1557
- if (!r) return t;
1558
- var i = new Set([r]);
1559
- i.forEach(function(e) {
1560
- n(e) && (t[e.__ref] = !0), _(e) && Object.keys(e).forEach(function(t) {
1561
- var n = e[t];
1562
- _(n) && i.add(n);
1563
- });
1564
- });
1565
- }
1566
- return this.refs[e];
1567
- }, e.prototype.makeCacheKey = function() {
1568
- return this.group.keyMaker.lookupArray(arguments);
1569
- }, e;
1570
- }(), Un = function() {
1571
- function e(e, t) {
1572
- t === void 0 && (t = null), this.caching = e, this.parent = t, this.d = null, this.resetCaching();
1573
- }
1574
- return e.prototype.resetCaching = function() {
1575
- this.d = this.caching ? ke() : null, this.keyMaker = new le(h);
1576
- }, e.prototype.depend = function(e, t) {
1577
- if (this.d) {
1578
- this.d(Wn(e, t));
1579
- var n = Z(t);
1580
- n !== t && this.d(Wn(e, n)), this.parent && this.parent.depend(e, t);
1581
- }
1582
- }, e.prototype.dirty = function(e, t) {
1583
- this.d && this.d.dirty(Wn(e, t), t === "__exists" ? "forget" : "setDirty");
1584
- }, e;
1585
- }();
1586
- function Wn(e, t) {
1587
- return t + "#" + e;
1588
- }
1589
- function Gn(e, t) {
1590
- Jn(e) && e.group.depend(t, "__exists");
1591
- }
1592
- (function(e) {
1593
- e.Root = function(e) {
1594
- N(t, e);
1595
- function t(t) {
1596
- var n = t.policies, r = t.resultCaching, i = r === void 0 ? !0 : r, a = t.seed, o = e.call(this, n, new Un(i)) || this;
1597
- return o.stump = new Kn(o), o.storageTrie = new le(h), a && o.replace(a), o;
1598
- }
1599
- return t.prototype.addLayer = function(e, t) {
1600
- return this.stump.addLayer(e, t);
1601
- }, t.prototype.removeLayer = function() {
1602
- return this;
1603
- }, t.prototype.getStorage = function() {
1604
- return this.storageTrie.lookupArray(arguments);
1605
- }, t;
1606
- }(e);
1607
- })(Hn || (Hn = {}));
1608
- var Q = function(e) {
1609
- N(t, e);
1610
- function t(t, n, r, i) {
1611
- var a = e.call(this, n.policies, i) || this;
1612
- return a.id = t, a.parent = n, a.replay = r, a.group = i, r(a), a;
1613
- }
1614
- return t.prototype.addLayer = function(e, n) {
1615
- return new t(e, this, n, this.group);
1616
- }, t.prototype.removeLayer = function(e) {
1617
- var t = this, n = this.parent.removeLayer(e);
1618
- return e === this.id ? (this.group.caching && Object.keys(this.data).forEach(function(e) {
1619
- var r = t.data[e], i = n.lookup(e);
1620
- i ? r ? r !== i && Object.keys(r).forEach(function(n) {
1621
- w(r[n], i[n]) || t.group.dirty(e, n);
1622
- }) : (t.group.dirty(e, "__exists"), Object.keys(i).forEach(function(n) {
1623
- t.group.dirty(e, n);
1624
- })) : t.delete(e);
1625
- }), n) : n === this.parent ? this : n.addLayer(this.id, this.replay);
1626
- }, t.prototype.toObject = function() {
1627
- return O(O({}, this.parent.toObject()), this.data);
1628
- }, t.prototype.findChildRefIds = function(t) {
1629
- var n = this.parent.findChildRefIds(t);
1630
- return X.call(this.data, t) ? O(O({}, n), e.prototype.findChildRefIds.call(this, t)) : n;
1631
- }, t.prototype.getStorage = function() {
1632
- for (var e = this.parent; e.parent;) e = e.parent;
1633
- return e.getStorage.apply(e, arguments);
1634
- }, t;
1635
- }(Hn), Kn = function(e) {
1636
- N(t, e);
1637
- function t(t) {
1638
- return e.call(this, "EntityStore.Stump", t, function() {}, new Un(t.group.caching, t.group)) || this;
1639
- }
1640
- return t.prototype.removeLayer = function() {
1641
- return this;
1642
- }, t.prototype.merge = function(e, t) {
1643
- return this.parent.merge(e, t);
1644
- }, t;
1645
- }(Q);
1646
- function qn(e, t, n) {
1647
- var r = e[n], i = t[n];
1648
- return w(r, i) ? r : i;
1649
- }
1650
- function Jn(e) {
1651
- return !!(e instanceof Hn && e.group.caching);
1652
- }
1653
- //#endregion
1654
- //#region node_modules/@apollo/client/cache/inmemory/object-canon.js
1655
- function Yn(e) {
1656
- return _(e) ? D(e) ? e.slice(0) : O({ __proto__: Object.getPrototypeOf(e) }, e) : e;
1657
- }
1658
- var Xn = function() {
1659
- function e() {
1660
- this.known = new (de ? WeakSet : Set)(), this.pool = new le(h), this.passes = /* @__PURE__ */ new WeakMap(), this.keysByJSON = /* @__PURE__ */ new Map(), this.empty = this.admit({});
1661
- }
1662
- return e.prototype.isKnown = function(e) {
1663
- return _(e) && this.known.has(e);
1664
- }, e.prototype.pass = function(e) {
1665
- if (_(e)) {
1666
- var t = Yn(e);
1667
- return this.passes.set(t, e), t;
1668
- }
1669
- return e;
1670
- }, e.prototype.admit = function(e) {
1671
- var t = this;
1672
- if (_(e)) {
1673
- var n = this.passes.get(e);
1674
- if (n) return n;
1675
- switch (Object.getPrototypeOf(e)) {
1676
- case Array.prototype:
1677
- if (this.known.has(e)) return e;
1678
- var r = e.map(this.admit, this), i = this.pool.lookupArray(r);
1679
- return i.array || (this.known.add(i.array = r), globalThis.__DEV__ !== !1 && Object.freeze(r)), i.array;
1680
- case null:
1681
- case Object.prototype:
1682
- if (this.known.has(e)) return e;
1683
- var a = Object.getPrototypeOf(e), o = [a], s = this.sortedKeys(e);
1684
- o.push(s.json);
1685
- var c = o.length;
1686
- s.sorted.forEach(function(n) {
1687
- o.push(t.admit(e[n]));
1688
- });
1689
- var i = this.pool.lookupArray(o);
1690
- if (!i.object) {
1691
- var l = i.object = Object.create(a);
1692
- this.known.add(l), s.sorted.forEach(function(e, t) {
1693
- l[e] = o[c + t];
1694
- }), globalThis.__DEV__ !== !1 && Object.freeze(l);
1695
- }
1696
- return i.object;
1697
- }
1698
- }
1699
- return e;
1700
- }, e.prototype.sortedKeys = function(e) {
1701
- var t = Object.keys(e), n = this.pool.lookupArray(t);
1702
- if (!n.keys) {
1703
- t.sort();
1704
- var r = JSON.stringify(t);
1705
- (n.keys = this.keysByJSON.get(r)) || this.keysByJSON.set(r, n.keys = {
1706
- sorted: t,
1707
- json: r
1708
- });
1709
- }
1710
- return n.keys;
1711
- }, e;
1712
- }();
1713
- //#endregion
1714
- //#region node_modules/@apollo/client/cache/inmemory/readFromStore.js
1715
- function Zn(e) {
1716
- return [
1717
- e.selectionSet,
1718
- e.objectOrReference,
1719
- e.context,
1720
- e.context.canonizeResults
1721
- ];
1722
- }
1723
- var Qn = function() {
1724
- function e(e) {
1725
- var t = this;
1726
- this.knownResults = new (h ? WeakMap : Map)(), this.config = ge(e, {
1727
- addTypename: e.addTypename !== !1,
1728
- canonizeResults: Mn(e)
1729
- }), this.canon = e.canon || new Xn(), this.executeSelectionSet = Me(function(e) {
1730
- var n, r = e.context.canonizeResults, i = Zn(e);
1731
- i[3] = !r;
1732
- var a = (n = t.executeSelectionSet).peek.apply(n, i);
1733
- return a ? r ? O(O({}, a), { result: t.canon.admit(a.result) }) : a : (Gn(e.context.store, e.enclosingRef.__ref), t.execSelectionSetImpl(e));
1734
- }, {
1735
- max: this.config.resultCacheMaxSize || V["inMemoryCache.executeSelectionSet"] || 5e4,
1736
- keyArgs: Zn,
1737
- makeCacheKey: function(e, t, r, i) {
1738
- if (Jn(r.store)) return r.store.makeCacheKey(e, n(t) ? t.__ref : t, r.varString, i);
1739
- }
1740
- }), this.executeSubSelectedArray = Me(function(e) {
1741
- return Gn(e.context.store, e.enclosingRef.__ref), t.execSubSelectedArrayImpl(e);
1742
- }, {
1743
- max: this.config.resultCacheMaxSize || V["inMemoryCache.executeSubSelectedArray"] || 1e4,
1744
- makeCacheKey: function(e) {
1745
- var t = e.field, n = e.array, r = e.context;
1746
- if (Jn(r.store)) return r.store.makeCacheKey(t, n, r.varString);
1747
- }
1748
- });
1749
- }
1750
- return e.prototype.resetCanon = function() {
1751
- this.canon = new Xn();
1752
- }, e.prototype.diffQueryAgainstStore = function(e) {
1753
- var t = e.store, n = e.query, r = e.rootId, a = r === void 0 ? "ROOT_QUERY" : r, o = e.variables, s = e.returnPartialData, c = s === void 0 ? !0 : s, l = e.canonizeResults, u = l === void 0 ? this.config.canonizeResults : l, d = this.config.cache.policies;
1754
- o = O(O({}, he(i(n))), o);
1755
- var f = Te(a), p = this.executeSelectionSet({
1756
- selectionSet: _e(n).selectionSet,
1757
- objectOrReference: f,
1758
- enclosingRef: f,
1759
- context: O({
1760
- store: t,
1761
- query: n,
1762
- policies: d,
1763
- variables: o,
1764
- varString: C(o),
1765
- canonizeResults: u
1766
- }, Rn(n, this.config.fragments))
1767
- }), m;
1768
- if (p.missing && (m = [new Dn($n(p.missing), p.missing, n, o)], !c)) throw m[0];
1769
- return {
1770
- result: p.result,
1771
- complete: !m,
1772
- missing: m
1773
- };
1774
- }, e.prototype.isFresh = function(e, t, n, r) {
1775
- if (Jn(r.store) && this.knownResults.get(e) === n) {
1776
- var i = this.executeSelectionSet.peek(n, t, r, this.canon.isKnown(e));
1777
- if (i && e === i.result) return !0;
1778
- }
1779
- return !1;
1780
- }, e.prototype.execSelectionSetImpl = function(e) {
1781
- var t = this, r = e.selectionSet, i = e.objectOrReference, a = e.enclosingRef, o = e.context;
1782
- if (n(i) && !o.policies.rootTypenamesById[i.__ref] && !o.store.has(i.__ref)) return {
1783
- result: this.canon.empty,
1784
- missing: `Dangling reference to missing ${i.__ref} object`
1785
- };
1786
- var s = o.variables, c = o.policies, l = o.store.getFieldValue(i, "__typename"), u = [], d, f = new q();
1787
- this.config.addTypename && typeof l == "string" && !c.rootIdsByTypename[l] && u.push({ __typename: l });
1788
- function p(e, t) {
1789
- var n;
1790
- return e.missing && (d = f.merge(d, (n = {}, n[t] = e.missing, n))), e.result;
1791
- }
1792
- var m = new Set(r.selections);
1793
- m.forEach(function(e) {
1794
- var r, h;
1795
- if (xe(e, s)) if (S(e)) {
1796
- var g = c.readField({
1797
- fieldName: e.name.value,
1798
- field: e,
1799
- variables: o.variables,
1800
- from: i
1801
- }, o), _ = y(e);
1802
- g === void 0 ? ft.added(e) || (d = f.merge(d, (r = {}, r[_] = `Can't find field '${e.name.value}' on ${n(i) ? i.__ref + " object" : "object " + JSON.stringify(i, null, 2)}`, r))) : D(g) ? g.length > 0 && (g = p(t.executeSubSelectedArray({
1803
- field: e,
1804
- array: g,
1805
- enclosingRef: a,
1806
- context: o
1807
- }), _)) : e.selectionSet ? g != null && (g = p(t.executeSelectionSet({
1808
- selectionSet: e.selectionSet,
1809
- objectOrReference: g,
1810
- enclosingRef: n(g) ? g : a,
1811
- context: o
1812
- }), _)) : o.canonizeResults && (g = t.canon.pass(g)), g !== void 0 && u.push((h = {}, h[_] = g, h));
1813
- } else {
1814
- var v = ie(e, o.lookupFragment);
1815
- if (!v && e.kind === M.FRAGMENT_SPREAD) throw R(10, e.name.value);
1816
- v && c.fragmentMatches(v, l) && v.selectionSet.selections.forEach(m.add, m);
1817
- }
1818
- });
1819
- var h = {
1820
- result: vt(u),
1821
- missing: d
1822
- }, g = o.canonizeResults ? this.canon.admit(h) : ye(h);
1823
- return g.result && this.knownResults.set(g.result, r), g;
1824
- }, e.prototype.execSubSelectedArrayImpl = function(e) {
1825
- var t = this, r = e.field, i = e.array, a = e.enclosingRef, o = e.context, s, c = new q();
1826
- function l(e, t) {
1827
- var n;
1828
- return e.missing && (s = c.merge(s, (n = {}, n[t] = e.missing, n))), e.result;
1829
- }
1830
- return r.selectionSet && (i = i.filter(o.store.canRead)), i = i.map(function(e, i) {
1831
- return e === null ? null : D(e) ? l(t.executeSubSelectedArray({
1832
- field: r,
1833
- array: e,
1834
- enclosingRef: a,
1835
- context: o
1836
- }), i) : r.selectionSet ? l(t.executeSelectionSet({
1837
- selectionSet: r.selectionSet,
1838
- objectOrReference: e,
1839
- enclosingRef: n(e) ? e : a,
1840
- context: o
1841
- }), i) : (globalThis.__DEV__ !== !1 && er(o.store, r, e), e);
1842
- }), {
1843
- result: o.canonizeResults ? this.canon.admit(i) : i,
1844
- missing: s
1845
- };
1846
- }, e;
1847
- }();
1848
- function $n(e) {
1849
- try {
1850
- JSON.stringify(e, function(e, t) {
1851
- if (typeof t == "string") throw t;
1852
- return t;
1853
- });
1854
- } catch (e) {
1855
- return e;
1856
- }
1857
- }
1858
- function er(e, t, r) {
1859
- if (!t.selectionSet) {
1860
- var i = new Set([r]);
1861
- i.forEach(function(r) {
1862
- _(r) && (F(!n(r), 11, Nn(e, r), t.name.value), Object.values(r).forEach(i.add, i));
1863
- });
1864
- }
1865
- }
1866
- //#endregion
1867
- //#region node_modules/@apollo/client/cache/inmemory/reactiveVars.js
1868
- var tr = new Ce(), nr = /* @__PURE__ */ new WeakMap();
1869
- function rr(e) {
1870
- var t = nr.get(e);
1871
- return t || nr.set(e, t = {
1872
- vars: /* @__PURE__ */ new Set(),
1873
- dep: ke()
1874
- }), t;
1875
- }
1876
- function ir(e) {
1877
- rr(e).vars.forEach(function(t) {
1878
- return t.forgetCache(e);
1879
- });
1880
- }
1881
- function ar(e) {
1882
- rr(e).vars.forEach(function(t) {
1883
- return t.attachCache(e);
1884
- });
1885
- }
1886
- function or(e) {
1887
- var t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), r = function(a) {
1888
- if (arguments.length > 0) {
1889
- if (e !== a) {
1890
- e = a, t.forEach(function(e) {
1891
- rr(e).dep.dirty(r), sr(e);
1892
- });
1893
- var o = Array.from(n);
1894
- n.clear(), o.forEach(function(t) {
1895
- return t(e);
1896
- });
1897
- }
1898
- } else {
1899
- var s = tr.getValue();
1900
- s && (i(s), rr(s).dep(r));
1901
- }
1902
- return e;
1903
- };
1904
- r.onNextChange = function(e) {
1905
- return n.add(e), function() {
1906
- n.delete(e);
1907
- };
1908
- };
1909
- var i = r.attachCache = function(e) {
1910
- return t.add(e), rr(e).vars.add(r), r;
1911
- };
1912
- return r.forgetCache = function(e) {
1913
- return t.delete(e);
1914
- }, r;
1915
- }
1916
- function sr(e) {
1917
- e.broadcastWatches && e.broadcastWatches();
1918
- }
1919
- //#endregion
1920
- //#region node_modules/@apollo/client/cache/inmemory/key-extractor.js
1921
- var cr = Object.create(null);
1922
- function lr(e) {
1923
- var t = JSON.stringify(e);
1924
- return cr[t] || (cr[t] = Object.create(null));
1925
- }
1926
- function ur(e) {
1927
- var t = lr(e);
1928
- return t.keyFieldsFn || (t.keyFieldsFn = function(t, n) {
1929
- var r = function(e, t) {
1930
- return n.readField(t, e);
1931
- }, i = n.keyObject = fr(e, function(e) {
1932
- var i = hr(n.storeObject, e, r);
1933
- return i === void 0 && t !== n.storeObject && X.call(t, e[0]) && (i = hr(t, e, mr)), F(i !== void 0, 5, e.join("."), t), i;
1934
- });
1935
- return `${n.typename}:${JSON.stringify(i)}`;
1936
- });
1937
- }
1938
- function dr(e) {
1939
- var t = lr(e);
1940
- return t.keyArgsFn || (t.keyArgsFn = function(t, n) {
1941
- var r = n.field, i = n.variables, a = n.fieldName, o = fr(e, function(e) {
1942
- var n = e[0], a = n.charAt(0);
1943
- if (a === "@") {
1944
- if (r && k(r.directives)) {
1945
- var o = n.slice(1), s = r.directives.find(function(e) {
1946
- return e.name.value === o;
1947
- }), c = s && Be(s, i);
1948
- return c && hr(c, e.slice(1));
1949
- }
1950
- return;
1951
- }
1952
- if (a === "$") {
1953
- var l = n.slice(1);
1954
- if (i && X.call(i, l)) {
1955
- var u = e.slice(0);
1956
- return u[0] = l, hr(i, u);
1957
- }
1958
- return;
1959
- }
1960
- if (t) return hr(t, e);
1961
- }), s = JSON.stringify(o);
1962
- return (t || s !== "{}") && (a += ":" + s), a;
1963
- });
1964
- }
1965
- function fr(e, t) {
1966
- var n = new q();
1967
- return pr(e).reduce(function(e, r) {
1968
- var i, a = t(r);
1969
- if (a !== void 0) {
1970
- for (var o = r.length - 1; o >= 0; --o) a = (i = {}, i[r[o]] = a, i);
1971
- e = n.merge(e, a);
1972
- }
1973
- return e;
1974
- }, Object.create(null));
1975
- }
1976
- function pr(e) {
1977
- var t = lr(e);
1978
- if (!t.paths) {
1979
- var n = t.paths = [], r = [];
1980
- e.forEach(function(t, i) {
1981
- D(t) ? (pr(t).forEach(function(e) {
1982
- return n.push(r.concat(e));
1983
- }), r.length = 0) : (r.push(t), D(e[i + 1]) || (n.push(r.slice(0)), r.length = 0));
1984
- });
1985
- }
1986
- return t.paths;
1987
- }
1988
- function mr(e, t) {
1989
- return e[t];
1990
- }
1991
- function hr(e, t, n) {
1992
- return n = n || mr, gr(t.reduce(function e(t, r) {
1993
- return D(t) ? t.map(function(t) {
1994
- return e(t, r);
1995
- }) : t && n(t, r);
1996
- }, e));
1997
- }
1998
- function gr(e) {
1999
- return _(e) ? D(e) ? e.map(gr) : fr(Object.keys(e).sort(), function(t) {
2000
- return hr(e, t);
2001
- }) : e;
2002
- }
2003
- //#endregion
2004
- //#region node_modules/@apollo/client/cache/inmemory/policies.js
2005
- function _r(e) {
2006
- return e.args === void 0 ? e.field ? Be(e.field, e.variables) : null : e.args;
2007
- }
2008
- var vr = function() {}, yr = function(e, t) {
2009
- return t.fieldName;
2010
- }, br = function(e, t, n) {
2011
- var r = n.mergeObjects;
2012
- return r(e, t);
2013
- }, xr = function(e, t) {
2014
- return t;
2015
- }, Sr = function() {
2016
- function e(e) {
2017
- this.config = e, this.typePolicies = Object.create(null), this.toBeAdded = Object.create(null), this.supertypeMap = /* @__PURE__ */ new Map(), this.fuzzySubtypes = /* @__PURE__ */ new Map(), this.rootIdsByTypename = Object.create(null), this.rootTypenamesById = Object.create(null), this.usingPossibleTypes = !1, this.config = O({ dataIdFromObject: kn }, e), this.cache = this.config.cache, this.setRootTypename("Query"), this.setRootTypename("Mutation"), this.setRootTypename("Subscription"), e.possibleTypes && this.addPossibleTypes(e.possibleTypes), e.typePolicies && this.addTypePolicies(e.typePolicies);
2018
- }
2019
- return e.prototype.identify = function(e, t) {
2020
- var n = this, r = t && (t.typename || t.storeObject?.__typename) || e.__typename;
2021
- if (r === this.rootTypenamesById.ROOT_QUERY) return ["ROOT_QUERY"];
2022
- var i = t && t.storeObject || e, a = O(O({}, t), {
2023
- typename: r,
2024
- storeObject: i,
2025
- readField: t && t.readField || function() {
2026
- var e = wr(arguments, i);
2027
- return n.readField(e, {
2028
- store: n.cache.data,
2029
- variables: e.variables
2030
- });
2031
- }
2032
- }), o, s = r && this.getTypePolicy(r), c = s && s.keyFn || this.config.dataIdFromObject;
2033
- return _n.withValue(!0, function() {
2034
- for (; c;) {
2035
- var t = c(O(O({}, e), i), a);
2036
- if (D(t)) c = ur(t);
2037
- else {
2038
- o = t;
2039
- break;
2040
- }
2041
- }
2042
- }), o = o ? String(o) : void 0, a.keyObject ? [o, a.keyObject] : [o];
2043
- }, e.prototype.addTypePolicies = function(e) {
2044
- var t = this;
2045
- Object.keys(e).forEach(function(n) {
2046
- var r = e[n], i = r.queryType, a = r.mutationType, o = r.subscriptionType, s = A(r, [
2047
- "queryType",
2048
- "mutationType",
2049
- "subscriptionType"
2050
- ]);
2051
- i && t.setRootTypename("Query", n), a && t.setRootTypename("Mutation", n), o && t.setRootTypename("Subscription", n), X.call(t.toBeAdded, n) ? t.toBeAdded[n].push(s) : t.toBeAdded[n] = [s];
2052
- });
2053
- }, e.prototype.updateTypePolicy = function(e, t, n) {
2054
- var r = this.getTypePolicy(e), i = t.keyFields, a = t.fields;
2055
- function o(e, t) {
2056
- e.merge = typeof t == "function" ? t : t === !0 ? br : t === !1 ? xr : e.merge;
2057
- }
2058
- o(r, t.merge), r.keyFn = i === !1 ? vr : D(i) ? ur(i) : typeof i == "function" ? i : r.keyFn, a && Object.keys(a).forEach(function(t) {
2059
- var r = n[t];
2060
- (!r || r?.typename !== e) && (r = n[t] = { typename: e });
2061
- var i = a[t];
2062
- if (typeof i == "function") r.read = i;
2063
- else {
2064
- var s = i.keyArgs, c = i.read, l = i.merge;
2065
- r.keyFn = s === !1 ? yr : D(s) ? dr(s) : typeof s == "function" ? s : r.keyFn, typeof c == "function" && (r.read = c), o(r, l);
2066
- }
2067
- r.read && r.merge && (r.keyFn = r.keyFn || yr);
2068
- });
2069
- }, e.prototype.setRootTypename = function(e, t) {
2070
- t === void 0 && (t = e);
2071
- var n = "ROOT_" + e.toUpperCase(), r = this.rootTypenamesById[n];
2072
- t !== r && (F(!r || r === e, 6, e), r && delete this.rootIdsByTypename[r], this.rootIdsByTypename[t] = n, this.rootTypenamesById[n] = t);
2073
- }, e.prototype.addPossibleTypes = function(e) {
2074
- var t = this;
2075
- this.usingPossibleTypes = !0, Object.keys(e).forEach(function(n) {
2076
- t.getSupertypeSet(n, !0), e[n].forEach(function(e) {
2077
- t.getSupertypeSet(e, !0).add(n);
2078
- var r = e.match(Pn);
2079
- (!r || r[0] !== e) && t.fuzzySubtypes.set(e, new RegExp(e));
2080
- });
2081
- });
2082
- }, e.prototype.getTypePolicy = function(e) {
2083
- var t = this;
2084
- if (!X.call(this.typePolicies, e)) {
2085
- var n = this.typePolicies[e] = Object.create(null);
2086
- n.fields = Object.create(null);
2087
- var r = this.supertypeMap.get(e);
2088
- !r && this.fuzzySubtypes.size && (r = this.getSupertypeSet(e, !0), this.fuzzySubtypes.forEach(function(n, i) {
2089
- if (n.test(e)) {
2090
- var a = t.supertypeMap.get(i);
2091
- a && a.forEach(function(e) {
2092
- return r.add(e);
2093
- });
2094
- }
2095
- })), r && r.size && r.forEach(function(e) {
2096
- var r = t.getTypePolicy(e), i = r.fields, a = A(r, ["fields"]);
2097
- Object.assign(n, a), Object.assign(n.fields, i);
2098
- });
2099
- }
2100
- var i = this.toBeAdded[e];
2101
- return i && i.length && i.splice(0).forEach(function(n) {
2102
- t.updateTypePolicy(e, n, t.typePolicies[e].fields);
2103
- }), this.typePolicies[e];
2104
- }, e.prototype.getFieldPolicy = function(e, t) {
2105
- if (e) return this.getTypePolicy(e).fields[t];
2106
- }, e.prototype.getSupertypeSet = function(e, t) {
2107
- var n = this.supertypeMap.get(e);
2108
- return !n && t && this.supertypeMap.set(e, n = /* @__PURE__ */ new Set()), n;
2109
- }, e.prototype.fragmentMatches = function(e, t, n, r) {
2110
- var i = this;
2111
- if (!e.typeCondition) return !0;
2112
- if (!t) return !1;
2113
- var a = e.typeCondition.name.value;
2114
- if (t === a) return !0;
2115
- if (this.usingPossibleTypes && this.supertypeMap.has(a)) for (var o = this.getSupertypeSet(t, !0), s = [o], c = function(e) {
2116
- var t = i.getSupertypeSet(e, !1);
2117
- t && t.size && s.indexOf(t) < 0 && s.push(t);
2118
- }, l = !!(n && this.fuzzySubtypes.size), u = !1, d = 0; d < s.length; ++d) {
2119
- var f = s[d];
2120
- if (f.has(a)) return o.has(a) || (u && globalThis.__DEV__ !== !1 && F.warn(7, t, a), o.add(a)), !0;
2121
- f.forEach(c), l && d === s.length - 1 && Fn(e.selectionSet, n, r) && (l = !1, u = !0, this.fuzzySubtypes.forEach(function(e, n) {
2122
- var r = t.match(e);
2123
- r && r[0] === t && c(n);
2124
- }));
2125
- }
2126
- return !1;
2127
- }, e.prototype.hasKeyArgs = function(e, t) {
2128
- var n = this.getFieldPolicy(e, t);
2129
- return !!(n && n.keyFn);
2130
- }, e.prototype.getStoreFieldName = function(e) {
2131
- var t = e.typename, n = e.fieldName, r = this.getFieldPolicy(t, n), i, a = r && r.keyFn;
2132
- if (a && t) for (var o = {
2133
- typename: t,
2134
- fieldName: n,
2135
- field: e.field || null,
2136
- variables: e.variables
2137
- }, s = _r(e); a;) {
2138
- var c = a(s, o);
2139
- if (D(c)) a = dr(c);
2140
- else {
2141
- i = c || n;
2142
- break;
2143
- }
2144
- }
2145
- return i === void 0 && (i = e.field ? x(e.field, e.variables) : ne(n, _r(e))), i === !1 ? n : n === Z(i) ? i : n + ":" + i;
2146
- }, e.prototype.readField = function(e, t) {
2147
- var r = e.from;
2148
- if (r && (e.field || e.fieldName)) {
2149
- if (e.typename === void 0) {
2150
- var i = t.store.getFieldValue(r, "__typename");
2151
- i && (e.typename = i);
2152
- }
2153
- var a = this.getStoreFieldName(e), o = Z(a), s = t.store.getFieldValue(r, a), c = this.getFieldPolicy(e.typename, o), l = c && c.read;
2154
- if (l) {
2155
- var u = Cr(this, r, e, t, t.store.getStorage(n(r) ? r.__ref : r, a));
2156
- return tr.withValue(this.cache, l, [s, u]);
2157
- }
2158
- return s;
2159
- }
2160
- }, e.prototype.getReadFunction = function(e, t) {
2161
- var n = this.getFieldPolicy(e, t);
2162
- return n && n.read;
2163
- }, e.prototype.getMergeFunction = function(e, t, n) {
2164
- var r = this.getFieldPolicy(e, t), i = r && r.merge;
2165
- return !i && n && (r = this.getTypePolicy(n), i = r && r.merge), i;
2166
- }, e.prototype.runMergeFunction = function(e, t, n, r, i) {
2167
- var a = n.field, o = n.typename, s = n.merge;
2168
- return s === br ? Tr(r.store)(e, t) : s === xr ? t : (r.overwrite && (e = void 0), s(e, t, Cr(this, void 0, {
2169
- typename: o,
2170
- fieldName: a.name.value,
2171
- field: a,
2172
- variables: r.variables
2173
- }, r, i || Object.create(null))));
2174
- }, e;
2175
- }();
2176
- function Cr(e, t, r, i, a) {
2177
- var o = e.getStoreFieldName(r), s = Z(o), c = r.variables || i.variables, l = i.store, u = l.toReference, d = l.canRead;
2178
- return {
2179
- args: _r(r),
2180
- field: r.field || null,
2181
- fieldName: s,
2182
- storeFieldName: o,
2183
- variables: c,
2184
- isReference: n,
2185
- toReference: u,
2186
- storage: a,
2187
- cache: e.cache,
2188
- canRead: d,
2189
- readField: function() {
2190
- return e.readField(wr(arguments, t, c), i);
2191
- },
2192
- mergeObjects: Tr(i.store)
2193
- };
2194
- }
2195
- function wr(e, t, n) {
2196
- var r = e[0], i = e[1], a = e.length, o;
2197
- return typeof r == "string" ? o = {
2198
- fieldName: r,
2199
- from: a > 1 ? i : t
2200
- } : (o = O({}, r), X.call(o, "from") || (o.from = t)), globalThis.__DEV__ !== !1 && o.from === void 0 && globalThis.__DEV__ !== !1 && F.warn(8, ve(Array.from(e))), o.variables === void 0 && (o.variables = n), o;
2201
- }
2202
- function Tr(e) {
2203
- return function(t, r) {
2204
- if (D(t) || D(r)) throw R(9);
2205
- if (_(t) && _(r)) {
2206
- var i = e.getFieldValue(t, "__typename"), a = e.getFieldValue(r, "__typename");
2207
- if (i && a && i !== a) return r;
2208
- if (n(t) && In(r)) return e.merge(t.__ref, r), t;
2209
- if (In(t) && n(r)) return e.merge(t, r.__ref), r;
2210
- if (In(t) && In(r)) return O(O({}, t), r);
2211
- }
2212
- return r;
2213
- };
2214
- }
2215
- //#endregion
2216
- //#region node_modules/@apollo/client/cache/inmemory/writeToStore.js
2217
- function Er(e, t, n) {
2218
- var r = `${t}${n}`, i = e.flavors.get(r);
2219
- return i || e.flavors.set(r, i = e.clientOnly === t && e.deferred === n ? e : O(O({}, e), {
2220
- clientOnly: t,
2221
- deferred: n
2222
- })), i;
2223
- }
2224
- var Dr = function() {
2225
- function e(e, t, n) {
2226
- this.cache = e, this.reader = t, this.fragments = n;
2227
- }
2228
- return e.prototype.writeToStore = function(e, t) {
2229
- var r = this, i = t.query, a = t.result, o = t.dataId, s = t.variables, c = t.overwrite, l = Ve(i), u = Ln();
2230
- s = O(O({}, he(l)), s);
2231
- var d = O(O({
2232
- store: e,
2233
- written: Object.create(null),
2234
- merge: function(e, t) {
2235
- return u.merge(e, t);
2236
- },
2237
- variables: s,
2238
- varString: C(s)
2239
- }, Rn(i, this.fragments)), {
2240
- overwrite: !!c,
2241
- incomingById: /* @__PURE__ */ new Map(),
2242
- clientOnly: !1,
2243
- deferred: !1,
2244
- flavors: /* @__PURE__ */ new Map()
2245
- }), f = this.processSelectionSet({
2246
- result: a || Object.create(null),
2247
- dataId: o,
2248
- selectionSet: l.selectionSet,
2249
- mergeTree: { map: /* @__PURE__ */ new Map() },
2250
- context: d
2251
- });
2252
- if (!n(f)) throw R(12, a);
2253
- return d.incomingById.forEach(function(t, i) {
2254
- var a = t.storeObject, o = t.mergeTree, s = t.fieldNodeSet, c = Te(i);
2255
- if (o && o.map.size) {
2256
- var l = r.applyMerges(o, c, a, d);
2257
- if (n(l)) return;
2258
- a = l;
2259
- }
2260
- if (globalThis.__DEV__ !== !1 && !d.overwrite) {
2261
- var u = Object.create(null);
2262
- s.forEach(function(e) {
2263
- e.selectionSet && (u[e.name.value] = !0);
2264
- });
2265
- var f = function(e) {
2266
- return u[Z(e)] === !0;
2267
- }, p = function(e) {
2268
- var t = o && o.map.get(e);
2269
- return !!(t && t.info && t.info.merge);
2270
- };
2271
- Object.keys(a).forEach(function(e) {
2272
- f(e) && !p(e) && Pr(c, a, e, d.store);
2273
- });
2274
- }
2275
- e.merge(i, a);
2276
- }), e.retain(f.__ref), f;
2277
- }, e.prototype.processSelectionSet = function(e) {
2278
- var t = this, r = e.dataId, i = e.result, a = e.selectionSet, o = e.context, c = e.mergeTree, l = this.cache.policies, u = Object.create(null), d = r && l.rootTypenamesById[r] || s(i, a, o.fragmentMap) || r && o.store.get(r, "__typename");
2279
- typeof d == "string" && (u.__typename = d);
2280
- var f = function() {
2281
- var e = wr(arguments, u, o.variables);
2282
- if (n(e.from)) {
2283
- var t = o.incomingById.get(e.from.__ref);
2284
- if (t) {
2285
- var r = l.readField(O(O({}, e), { from: t.storeObject }), o);
2286
- if (r !== void 0) return r;
2287
- }
2288
- }
2289
- return l.readField(e, o);
2290
- }, p = /* @__PURE__ */ new Set();
2291
- this.flattenFields(a, i, o, d).forEach(function(e, r) {
2292
- var a, o = i[y(r)];
2293
- if (p.add(r), o !== void 0) {
2294
- var s = l.getStoreFieldName({
2295
- typename: d,
2296
- fieldName: r.name.value,
2297
- field: r,
2298
- variables: e.variables
2299
- }), m = kr(c, s), h = t.processFieldValue(o, r, r.selectionSet ? Er(e, !1, !1) : e, m), g = void 0;
2300
- r.selectionSet && (n(h) || In(h)) && (g = f("__typename", h));
2301
- var _ = l.getMergeFunction(d, r.name.value, g);
2302
- _ ? m.info = {
2303
- field: r,
2304
- typename: d,
2305
- merge: _
2306
- } : Mr(c, s), u = e.merge(u, (a = {}, a[s] = h, a));
2307
- } else globalThis.__DEV__ !== !1 && !e.clientOnly && !e.deferred && !ft.added(r) && !l.getReadFunction(d, r.name.value) && globalThis.__DEV__ !== !1 && F.error(13, y(r), i);
2308
- });
2309
- try {
2310
- var m = l.identify(i, {
2311
- typename: d,
2312
- selectionSet: a,
2313
- fragmentMap: o.fragmentMap,
2314
- storeObject: u,
2315
- readField: f
2316
- }), h = m[0], g = m[1];
2317
- r = r || h, g && (u = o.merge(u, g));
2318
- } catch (e) {
2319
- if (!r) throw e;
2320
- }
2321
- if (typeof r == "string") {
2322
- var _ = Te(r), v = o.written[r] || (o.written[r] = []);
2323
- if (v.indexOf(a) >= 0 || (v.push(a), this.reader && this.reader.isFresh(i, _, a, o))) return _;
2324
- var b = o.incomingById.get(r);
2325
- return b ? (b.storeObject = o.merge(b.storeObject, u), b.mergeTree = Ar(b.mergeTree, c), p.forEach(function(e) {
2326
- return b.fieldNodeSet.add(e);
2327
- })) : o.incomingById.set(r, {
2328
- storeObject: u,
2329
- mergeTree: jr(c) ? void 0 : c,
2330
- fieldNodeSet: p
2331
- }), _;
2332
- }
2333
- return u;
2334
- }, e.prototype.processFieldValue = function(e, t, n, r) {
2335
- var i = this;
2336
- return !t.selectionSet || e === null ? globalThis.__DEV__ === !1 ? e : Oe(e) : D(e) ? e.map(function(e, a) {
2337
- var o = i.processFieldValue(e, t, n, kr(r, a));
2338
- return Mr(r, a), o;
2339
- }) : this.processSelectionSet({
2340
- result: e,
2341
- selectionSet: t.selectionSet,
2342
- context: n,
2343
- mergeTree: r
2344
- });
2345
- }, e.prototype.flattenFields = function(e, t, n, r) {
2346
- r === void 0 && (r = s(t, e, n.fragmentMap));
2347
- var i = /* @__PURE__ */ new Map(), a = this.cache.policies, o = new le(!1);
2348
- return (function e(s, c) {
2349
- var l = o.lookup(s, c.clientOnly, c.deferred);
2350
- l.visited || (l.visited = !0, s.selections.forEach(function(o) {
2351
- if (xe(o, n.variables)) {
2352
- var s = c.clientOnly, l = c.deferred;
2353
- if (!(s && l) && k(o.directives) && o.directives.forEach(function(e) {
2354
- var t = e.name.value;
2355
- if (t === "client" && (s = !0), t === "defer") {
2356
- var r = Be(e, n.variables);
2357
- (!r || r.if !== !1) && (l = !0);
2358
- }
2359
- }), S(o)) {
2360
- var u = i.get(o);
2361
- u && (s = s && u.clientOnly, l = l && u.deferred), i.set(o, Er(n, s, l));
2362
- } else {
2363
- var d = ie(o, n.lookupFragment);
2364
- if (!d && o.kind === M.FRAGMENT_SPREAD) throw R(14, o.name.value);
2365
- d && a.fragmentMatches(d, r, t, n.variables) && e(d.selectionSet, Er(n, s, l));
2366
- }
2367
- }
2368
- }));
2369
- })(e, n), i;
2370
- }, e.prototype.applyMerges = function(e, t, r, i, a) {
2371
- var o, s = this;
2372
- if (e.map.size && !n(r)) {
2373
- var c = !D(r) && (n(t) || In(t)) ? t : void 0, l = r;
2374
- c && !a && (a = [n(c) ? c.__ref : c]);
2375
- var u, d = function(e, t) {
2376
- return D(e) ? typeof t == "number" ? e[t] : void 0 : i.store.getFieldValue(e, String(t));
2377
- };
2378
- e.map.forEach(function(e, t) {
2379
- var n = d(c, t), r = d(l, t);
2380
- if (r !== void 0) {
2381
- a && a.push(t);
2382
- var o = s.applyMerges(e, n, r, i, a);
2383
- o !== r && (u = u || /* @__PURE__ */ new Map(), u.set(t, o)), a && F(a.pop() === t);
2384
- }
2385
- }), u && (r = D(l) ? l.slice(0) : O({}, l), u.forEach(function(e, t) {
2386
- r[t] = e;
2387
- }));
2388
- }
2389
- return e.info ? this.cache.policies.runMergeFunction(t, r, e.info, i, a && (o = i.store).getStorage.apply(o, a)) : r;
2390
- }, e;
2391
- }(), Or = [];
2392
- function kr(e, t) {
2393
- var n = e.map;
2394
- return n.has(t) || n.set(t, Or.pop() || { map: /* @__PURE__ */ new Map() }), n.get(t);
2395
- }
2396
- function Ar(e, t) {
2397
- if (e === t || !t || jr(t)) return e;
2398
- if (!e || jr(e)) return t;
2399
- var n = e.info && t.info ? O(O({}, e.info), t.info) : e.info || t.info, r = e.map.size && t.map.size, i = {
2400
- info: n,
2401
- map: r ? /* @__PURE__ */ new Map() : e.map.size ? e.map : t.map
2402
- };
2403
- if (r) {
2404
- var a = new Set(t.map.keys());
2405
- e.map.forEach(function(e, n) {
2406
- i.map.set(n, Ar(e, t.map.get(n))), a.delete(n);
2407
- }), a.forEach(function(n) {
2408
- i.map.set(n, Ar(t.map.get(n), e.map.get(n)));
2409
- });
2410
- }
2411
- return i;
2412
- }
2413
- function jr(e) {
2414
- return !e || !(e.info || e.map.size);
2415
- }
2416
- function Mr(e, t) {
2417
- var n = e.map, r = n.get(t);
2418
- r && jr(r) && (Or.push(r), n.delete(t));
2419
- }
2420
- var Nr = /* @__PURE__ */ new Set();
2421
- function Pr(e, t, r, i) {
2422
- var a = function(e) {
2423
- var t = i.getFieldValue(e, r);
2424
- return typeof t == "object" && t;
2425
- }, o = a(e);
2426
- if (o) {
2427
- var s = a(t);
2428
- if (s && !n(o) && !w(o, s) && !Object.keys(o).every(function(e) {
2429
- return i.getFieldValue(s, e) !== void 0;
2430
- })) {
2431
- var c = i.getFieldValue(e, "__typename") || i.getFieldValue(t, "__typename"), l = Z(r), u = `${c}.${l}`;
2432
- if (!Nr.has(u)) {
2433
- Nr.add(u);
2434
- var d = [];
2435
- !D(o) && !D(s) && [o, s].forEach(function(e) {
2436
- var t = i.getFieldValue(e, "__typename");
2437
- typeof t == "string" && !d.includes(t) && d.push(t);
2438
- }), globalThis.__DEV__ !== !1 && F.warn(15, l, c, d.length ? "either ensure all objects of type " + d.join(" and ") + " have an ID or a custom merge function, or " : "", u, O({}, o), O({}, s));
2439
- }
2440
- }
2441
- }
2442
- }
2443
- //#endregion
2444
- //#region node_modules/@apollo/client/cache/inmemory/inMemoryCache.js
2445
- var Fr = function(e) {
2446
- N(t, e);
2447
- function t(t) {
2448
- t === void 0 && (t = {});
2449
- var n = e.call(this) || this;
2450
- return n.watches = /* @__PURE__ */ new Set(), n.addTypenameTransform = new it(ft), n.assumeImmutableResults = !0, n.makeVar = or, n.txCount = 0, globalThis.__DEV__ !== !1 && (L(t, "addTypename", "InMemoryCache", "Please remove the `addTypename` option when initializing `InMemoryCache`."), L(t, "canonizeResults", "InMemoryCache", "Please remove the `canonizeResults` option when initializing `InMemoryCache`.")), n.config = jn(t), n.addTypename = !!n.config.addTypename, n.policies = new Sr({
2451
- cache: n,
2452
- dataIdFromObject: n.config.dataIdFromObject,
2453
- possibleTypes: n.config.possibleTypes,
2454
- typePolicies: n.config.typePolicies
2455
- }), n.init(), n;
2456
- }
2457
- return t.prototype.init = function() {
2458
- var e = this.data = new Hn.Root({
2459
- policies: this.policies,
2460
- resultCaching: this.config.resultCaching
2461
- });
2462
- this.optimisticData = e.stump, this.resetResultCache();
2463
- }, t.prototype.resetResultCache = function(e) {
2464
- var t = this, n = this.storeReader, r = this.config.fragments;
2465
- this.addTypenameTransform.resetCache(), r?.resetCaches(), this.storeWriter = new Dr(this, this.storeReader = new Qn({
2466
- cache: this,
2467
- addTypename: this.addTypename,
2468
- resultCacheMaxSize: this.config.resultCacheMaxSize,
2469
- canonizeResults: Mn(this.config),
2470
- canon: e ? void 0 : n && n.canon,
2471
- fragments: r
2472
- }), r), this.maybeBroadcastWatch = Me(function(e, n) {
2473
- return t.broadcastWatch(e, n);
2474
- }, {
2475
- max: this.config.resultCacheMaxSize || V["inMemoryCache.maybeBroadcastWatch"] || 5e3,
2476
- makeCacheKey: function(e) {
2477
- var n = e.optimistic ? t.optimisticData : t.data;
2478
- if (Jn(n)) {
2479
- var r = e.optimistic, i = e.id, a = e.variables;
2480
- return n.makeCacheKey(e.query, e.callback, C({
2481
- optimistic: r,
2482
- id: i,
2483
- variables: a
2484
- }));
2485
- }
2486
- }
2487
- }), new Set([this.data.group, this.optimisticData.group]).forEach(function(e) {
2488
- return e.resetCaching();
2489
- });
2490
- }, t.prototype.restore = function(e) {
2491
- return this.init(), e && this.data.replace(e), this;
2492
- }, t.prototype.extract = function(e) {
2493
- return e === void 0 && (e = !1), (e ? this.optimisticData : this.data).extract();
2494
- }, t.prototype.read = function(e) {
2495
- globalThis.__DEV__ !== !1 && L(e, "canonizeResults", "cache.read");
2496
- var t = e.returnPartialData, n = t === void 0 ? !1 : t;
2497
- try {
2498
- return this.storeReader.diffQueryAgainstStore(O(O({}, e), {
2499
- store: e.optimistic ? this.optimisticData : this.data,
2500
- config: this.config,
2501
- returnPartialData: n
2502
- })).result || null;
2503
- } catch (e) {
2504
- if (e instanceof Dn) return null;
2505
- throw e;
2506
- }
2507
- }, t.prototype.write = function(e) {
2508
- try {
2509
- return ++this.txCount, this.storeWriter.writeToStore(this.data, e);
2510
- } finally {
2511
- !--this.txCount && e.broadcast !== !1 && this.broadcastWatches();
2512
- }
2513
- }, t.prototype.modify = function(e) {
2514
- if (X.call(e, "id") && !e.id) return !1;
2515
- var t = e.optimistic ? this.optimisticData : this.data;
2516
- try {
2517
- return ++this.txCount, t.modify(e.id || "ROOT_QUERY", e.fields);
2518
- } finally {
2519
- !--this.txCount && e.broadcast !== !1 && this.broadcastWatches();
2520
- }
2521
- }, t.prototype.diff = function(e) {
2522
- return globalThis.__DEV__ !== !1 && L(e, "canonizeResults", "cache.diff"), this.storeReader.diffQueryAgainstStore(O(O({}, e), {
2523
- store: e.optimistic ? this.optimisticData : this.data,
2524
- rootId: e.id || "ROOT_QUERY",
2525
- config: this.config
2526
- }));
2527
- }, t.prototype.watch = function(e) {
2528
- var t = this;
2529
- return this.watches.size || ar(this), this.watches.add(e), e.immediate && this.maybeBroadcastWatch(e), function() {
2530
- t.watches.delete(e) && !t.watches.size && ir(t), t.maybeBroadcastWatch.forget(e);
2531
- };
2532
- }, t.prototype.gc = function(e) {
2533
- globalThis.__DEV__ !== !1 && L(e || {}, "resetResultIdentities", "cache.gc", "First ensure all usages of `canonizeResults` are removed, then remove this option."), C.reset(), K.reset();
2534
- var t = this.optimisticData.gc();
2535
- return e && !this.txCount && (e.resetResultCache ? this.resetResultCache(e.resetResultIdentities) : e.resetResultIdentities && this.storeReader.resetCanon()), t;
2536
- }, t.prototype.retain = function(e, t) {
2537
- return (t ? this.optimisticData : this.data).retain(e);
2538
- }, t.prototype.release = function(e, t) {
2539
- return (t ? this.optimisticData : this.data).release(e);
2540
- }, t.prototype.identify = function(e) {
2541
- if (n(e)) return e.__ref;
2542
- try {
2543
- return this.policies.identify(e)[0];
2544
- } catch (e) {
2545
- globalThis.__DEV__ !== !1 && F.warn(e);
2546
- }
2547
- }, t.prototype.evict = function(e) {
2548
- if (!e.id) {
2549
- if (X.call(e, "id")) return !1;
2550
- e = O(O({}, e), { id: "ROOT_QUERY" });
2551
- }
2552
- try {
2553
- return ++this.txCount, this.optimisticData.evict(e, this.data);
2554
- } finally {
2555
- !--this.txCount && e.broadcast !== !1 && this.broadcastWatches();
2556
- }
2557
- }, t.prototype.reset = function(e) {
2558
- var t = this;
2559
- return this.init(), C.reset(), e && e.discardWatches ? (this.watches.forEach(function(e) {
2560
- return t.maybeBroadcastWatch.forget(e);
2561
- }), this.watches.clear(), ir(this)) : this.broadcastWatches(), Promise.resolve();
2562
- }, t.prototype.removeOptimistic = function(e) {
2563
- var t = this.optimisticData.removeLayer(e);
2564
- t !== this.optimisticData && (this.optimisticData = t, this.broadcastWatches());
2565
- }, t.prototype.batch = function(e) {
2566
- var t = this, n = e.update, r = e.optimistic, i = r === void 0 ? !0 : r, a = e.removeOptimistic, o = e.onWatchUpdated, s, c = function(e) {
2567
- var r = t, i = r.data, a = r.optimisticData;
2568
- ++t.txCount, e && (t.data = t.optimisticData = e);
2569
- try {
2570
- return s = n(t);
2571
- } finally {
2572
- --t.txCount, t.data = i, t.optimisticData = a;
2573
- }
2574
- }, l = /* @__PURE__ */ new Set();
2575
- return o && !this.txCount && this.broadcastWatches(O(O({}, e), { onWatchUpdated: function(e) {
2576
- return l.add(e), !1;
2577
- } })), typeof i == "string" ? this.optimisticData = this.optimisticData.addLayer(i, c) : i === !1 ? c(this.data) : c(), typeof a == "string" && (this.optimisticData = this.optimisticData.removeLayer(a)), o && l.size ? (this.broadcastWatches(O(O({}, e), { onWatchUpdated: function(e, t) {
2578
- var n = o.call(this, e, t);
2579
- return n !== !1 && l.delete(e), n;
2580
- } })), l.size && l.forEach(function(e) {
2581
- return t.maybeBroadcastWatch.dirty(e);
2582
- })) : this.broadcastWatches(e), s;
2583
- }, t.prototype.performTransaction = function(e, t) {
2584
- return this.batch({
2585
- update: e,
2586
- optimistic: t || t !== null
2587
- });
2588
- }, t.prototype.transformDocument = function(e) {
2589
- return this.addTypenameToDocument(this.addFragmentsToDocument(e));
2590
- }, t.prototype.fragmentMatches = function(e, t) {
2591
- return this.policies.fragmentMatches(e, t);
2592
- }, t.prototype.lookupFragment = function(e) {
2593
- return this.config.fragments?.lookup(e) || null;
2594
- }, t.prototype.broadcastWatches = function(e) {
2595
- var t = this;
2596
- this.txCount || this.watches.forEach(function(n) {
2597
- return t.maybeBroadcastWatch(n, e);
2598
- });
2599
- }, t.prototype.addFragmentsToDocument = function(e) {
2600
- var t = this.config.fragments;
2601
- return t ? t.transform(e) : e;
2602
- }, t.prototype.addTypenameToDocument = function(e) {
2603
- return this.addTypename ? this.addTypenameTransform.transformDocument(e) : e;
2604
- }, t.prototype.broadcastWatch = function(e, t) {
2605
- var n = this, r = e.lastDiff, i = z("canonizeResults", function() {
2606
- return n.diff(e);
2607
- });
2608
- t && (e.optimistic && typeof t.optimistic == "string" && (i.fromOptimisticTransaction = !0), t.onWatchUpdated && t.onWatchUpdated.call(this, e, i, r) === !1) || (!r || !w(r.result, i.result)) && e.callback(e.lastDiff = i, r);
2609
- }, t;
2610
- }(En);
2611
- globalThis.__DEV__ !== !1 && (Fr.prototype.getMemoryInternals = v);
2612
- //#endregion
2613
- //#region node_modules/@apollo/client/core/QueryInfo.js
2614
- var Ir = new (h ? WeakMap : Map)();
2615
- function Lr(e, t) {
2616
- var n = e[t];
2617
- typeof n == "function" && (e[t] = function() {
2618
- return Ir.set(e, (Ir.get(e) + 1) % 0x38d7ea4c68000), n.apply(this, arguments);
2619
- });
2620
- }
2621
- var Rr = function() {
2622
- function e(e, t) {
2623
- t === void 0 && (t = e.generateQueryId()), this.queryId = t, this.document = null, this.lastRequestId = 1, this.stopped = !1, this.observableQuery = null;
2624
- var n = this.cache = e.cache;
2625
- Ir.has(n) || (Ir.set(n, 0), Lr(n, "evict"), Lr(n, "modify"), Lr(n, "reset"));
2626
- }
2627
- return e.prototype.init = function(e) {
2628
- var t = e.networkStatus || l.loading;
2629
- return this.variables && this.networkStatus !== l.loading && !w(this.variables, e.variables) && (t = l.setVariables), w(e.variables, this.variables) || (this.lastDiff = void 0, this.cancel()), Object.assign(this, {
2630
- document: e.document,
2631
- variables: e.variables,
2632
- networkError: null,
2633
- graphQLErrors: this.graphQLErrors || [],
2634
- networkStatus: t
2635
- }), e.observableQuery && this.setObservableQuery(e.observableQuery), e.lastRequestId && (this.lastRequestId = e.lastRequestId), this;
2636
- }, e.prototype.resetDiff = function() {
2637
- this.lastDiff = void 0;
2638
- }, e.prototype.getDiff = function() {
2639
- var e = this, t = this.getDiffOptions();
2640
- if (this.lastDiff && w(t, this.lastDiff.options)) return this.lastDiff.diff;
2641
- this.updateWatch(this.variables);
2642
- var n = this.observableQuery;
2643
- if (n && n.options.fetchPolicy === "no-cache") return { complete: !1 };
2644
- var r = z("canonizeResults", function() {
2645
- return e.cache.diff(t);
2646
- });
2647
- return this.updateLastDiff(r, t), r;
2648
- }, e.prototype.updateLastDiff = function(e, t) {
2649
- this.lastDiff = e ? {
2650
- diff: e,
2651
- options: t || this.getDiffOptions()
2652
- } : void 0;
2653
- }, e.prototype.getDiffOptions = function(e) {
2654
- return e === void 0 && (e = this.variables), {
2655
- query: this.document,
2656
- variables: e,
2657
- returnPartialData: !0,
2658
- optimistic: !0,
2659
- canonizeResults: this.observableQuery?.options.canonizeResults
2660
- };
2661
- }, e.prototype.setDiff = function(e) {
2662
- var t = this, n, r = this.lastDiff && this.lastDiff.diff;
2663
- e && !e.complete && z("getLastError", function() {
2664
- return t.observableQuery?.getLastError();
2665
- }) || (this.updateLastDiff(e), w(r && r.result, e && e.result) || (n = this.observableQuery) == null || n.scheduleNotify());
2666
- }, e.prototype.setObservableQuery = function(e) {
2667
- e !== this.observableQuery && (this.observableQuery = e, e && (e.queryInfo = this));
2668
- }, e.prototype.stop = function() {
2669
- var e;
2670
- if (!this.stopped) {
2671
- this.stopped = !0, (e = this.observableQuery) == null || e.resetNotifications(), this.cancel();
2672
- var t = this.observableQuery;
2673
- t && t.stopPolling();
2674
- }
2675
- }, e.prototype.cancel = function() {
2676
- var e;
2677
- (e = this.cancelWatch) == null || e.call(this), this.cancelWatch = void 0;
2678
- }, e.prototype.updateWatch = function(e) {
2679
- var t = this;
2680
- e === void 0 && (e = this.variables);
2681
- var n = this.observableQuery;
2682
- if (!(n && n.options.fetchPolicy === "no-cache")) {
2683
- var r = O(O({}, this.getDiffOptions(e)), {
2684
- watcher: this,
2685
- callback: function(e) {
2686
- return t.setDiff(e);
2687
- }
2688
- });
2689
- (!this.lastWatch || !w(r, this.lastWatch)) && (this.cancel(), this.cancelWatch = this.cache.watch(this.lastWatch = r));
2690
- }
2691
- }, e.prototype.resetLastWrite = function() {
2692
- this.lastWrite = void 0;
2693
- }, e.prototype.shouldWrite = function(e, t) {
2694
- var n = this.lastWrite;
2695
- return !(n && n.dmCount === Ir.get(this.cache) && w(t, n.variables) && w(e.data, n.result.data));
2696
- }, e.prototype.markResult = function(e, t, n, r) {
2697
- var i = this, a, o = new q(), s = k(e.errors) ? e.errors.slice(0) : [];
2698
- if ((a = this.observableQuery) == null || a.resetNotifications(), "incremental" in e && k(e.incremental)) e.data = Et(this.getDiff().result, e);
2699
- else if ("hasNext" in e && e.hasNext) {
2700
- var c = this.getDiff();
2701
- e.data = o.merge(c.result, e.data);
2702
- }
2703
- this.graphQLErrors = s, n.fetchPolicy === "no-cache" ? this.updateLastDiff({
2704
- result: e.data,
2705
- complete: !0
2706
- }, this.getDiffOptions(n.variables)) : r !== 0 && (zr(e, n.errorPolicy) ? this.cache.performTransaction(function(a) {
2707
- if (i.shouldWrite(e, n.variables)) a.writeQuery({
2708
- query: t,
2709
- data: e.data,
2710
- variables: n.variables,
2711
- overwrite: r === 1
2712
- }), i.lastWrite = {
2713
- result: e,
2714
- variables: n.variables,
2715
- dmCount: Ir.get(i.cache)
2716
- };
2717
- else if (i.lastDiff && i.lastDiff.diff.complete) {
2718
- e.data = i.lastDiff.diff.result;
2719
- return;
2720
- }
2721
- var o = i.getDiffOptions(n.variables), s = z("canonizeResults", function() {
2722
- return a.diff(o);
2723
- });
2724
- !i.stopped && w(i.variables, n.variables) && i.updateWatch(n.variables), i.updateLastDiff(s, o), s.complete && (e.data = s.result);
2725
- }) : this.lastWrite = void 0);
2726
- }, e.prototype.markReady = function() {
2727
- return this.networkError = null, this.networkStatus = l.ready;
2728
- }, e.prototype.markError = function(e) {
2729
- var t;
2730
- return this.networkStatus = l.error, this.lastWrite = void 0, (t = this.observableQuery) == null || t.resetNotifications(), e.graphQLErrors && (this.graphQLErrors = e.graphQLErrors), e.networkError && (this.networkError = e.networkError), e;
2731
- }, e;
2732
- }();
2733
- function zr(e, t) {
2734
- t === void 0 && (t = "none");
2735
- var n = t === "ignore" || t === "all", r = !Dt(e);
2736
- return !r && n && e.data && (r = !0), r;
2737
- }
2738
- //#endregion
2739
- //#region node_modules/@apollo/client/core/QueryManager.js
2740
- var Br = Object.prototype.hasOwnProperty, Vr = Object.create(null), Hr = function() {
2741
- function t(e) {
2742
- var t = this;
2743
- this.clientAwareness = {}, this.queries = /* @__PURE__ */ new Map(), this.fetchCancelFns = /* @__PURE__ */ new Map(), this.transformCache = new r(V["queryManager.getDocumentInfo"] || 2e3), this.queryIdCounter = 1, this.requestIdCounter = 1, this.mutationIdCounter = 1, this.inFlightLinkObservables = new le(!1), this.noCacheWarningsByQueryId = /* @__PURE__ */ new Set();
2744
- var n = new it(function(e) {
2745
- return t.cache.transformDocument(e);
2746
- }, { cache: !1 });
2747
- this.cache = e.cache, this.link = e.link, this.defaultOptions = e.defaultOptions, this.queryDeduplication = e.queryDeduplication, this.clientAwareness = e.clientAwareness, this.localState = e.localState, this.ssrMode = e.ssrMode, this.assumeImmutableResults = e.assumeImmutableResults, this.dataMasking = e.dataMasking;
2748
- var i = e.documentTransform;
2749
- this.documentTransform = i ? n.concat(i).concat(n) : n, this.defaultContext = e.defaultContext || Object.create(null), (this.onBroadcast = e.onBroadcast) && (this.mutationStore = Object.create(null));
2750
- }
2751
- return t.prototype.stop = function() {
2752
- var e = this;
2753
- this.queries.forEach(function(t, n) {
2754
- e.stopQueryNoBroadcast(n);
2755
- }), this.cancelPendingFetches(R(35));
2756
- }, t.prototype.cancelPendingFetches = function(e) {
2757
- this.fetchCancelFns.forEach(function(t) {
2758
- return t(e);
2759
- }), this.fetchCancelFns.clear();
2760
- }, t.prototype.mutate = function(e) {
2761
- return I(this, arguments, void 0, function(e) {
2762
- var t, n, r, i, a, o = e.mutation, s = e.variables, c = e.optimisticResponse, l = e.updateQueries, u = e.refetchQueries, d = u === void 0 ? [] : u, f = e.awaitRefetchQueries, p = f === void 0 ? !1 : f, h = e.update, g = e.onQueryUpdated, _ = e.fetchPolicy, v = _ === void 0 ? this.defaultOptions.mutate?.fetchPolicy || "network-only" : _, y = e.errorPolicy, b = y === void 0 ? this.defaultOptions.mutate?.errorPolicy || "none" : y, x = e.keepRootFields, S = e.context;
2763
- return j(this, function(e) {
2764
- switch (e.label) {
2765
- case 0: return F(o, 36), F(v === "network-only" || v === "no-cache", 37), t = this.generateMutationId(), o = this.cache.transformForLink(this.transform(o)), n = this.getDocumentInfo(o).hasClientExports, s = this.getVariables(o, s), n ? [4, this.localState.addExportedVariables(o, s, S)] : [3, 2];
2766
- case 1: s = e.sent(), e.label = 2;
2767
- case 2: return r = this.mutationStore && (this.mutationStore[t] = {
2768
- mutation: o,
2769
- variables: s,
2770
- loading: !0,
2771
- error: null
2772
- }), i = c && this.markMutationOptimistic(c, {
2773
- mutationId: t,
2774
- document: o,
2775
- variables: s,
2776
- fetchPolicy: v,
2777
- errorPolicy: b,
2778
- context: S,
2779
- updateQueries: l,
2780
- update: h,
2781
- keepRootFields: x
2782
- }), this.broadcastQueries(), a = this, [2, new Promise(function(e, n) {
2783
- return bt(a.getObservableFromLink(o, O(O({}, S), { optimisticResponse: i ? c : void 0 }), s, {}, !1), function(e) {
2784
- if (Dt(e) && b === "none") throw new m({ graphQLErrors: Ot(e) });
2785
- r && (r.loading = !1, r.error = null);
2786
- var n = O({}, e);
2787
- return typeof d == "function" && (d = d(n)), b === "ignore" && Dt(n) && delete n.errors, a.markMutationResult({
2788
- mutationId: t,
2789
- result: n,
2790
- document: o,
2791
- variables: s,
2792
- fetchPolicy: v,
2793
- errorPolicy: b,
2794
- context: S,
2795
- update: h,
2796
- updateQueries: l,
2797
- awaitRefetchQueries: p,
2798
- refetchQueries: d,
2799
- removeOptimistic: i ? t : void 0,
2800
- onQueryUpdated: g,
2801
- keepRootFields: x
2802
- });
2803
- }).subscribe({
2804
- next: function(n) {
2805
- a.broadcastQueries(), (!("hasNext" in n) || n.hasNext === !1) && e(O(O({}, n), { data: a.maskOperation({
2806
- document: o,
2807
- data: n.data,
2808
- fetchPolicy: v,
2809
- id: t
2810
- }) }));
2811
- },
2812
- error: function(e) {
2813
- r && (r.loading = !1, r.error = e), i && a.cache.removeOptimistic(t), a.broadcastQueries(), n(e instanceof m ? e : new m({ networkError: e }));
2814
- }
2815
- });
2816
- })];
2817
- }
2818
- });
2819
- });
2820
- }, t.prototype.markMutationResult = function(e, t) {
2821
- var n = this;
2822
- t === void 0 && (t = this.cache);
2823
- var r = e.result, i = [], a = e.fetchPolicy === "no-cache";
2824
- if (!a && zr(r, e.errorPolicy)) {
2825
- if (St(r) || i.push({
2826
- result: r.data,
2827
- dataId: "ROOT_MUTATION",
2828
- query: e.document,
2829
- variables: e.variables
2830
- }), St(r) && k(r.incremental)) {
2831
- var o = t.diff({
2832
- id: "ROOT_MUTATION",
2833
- query: this.getDocumentInfo(e.document).asQuery,
2834
- variables: e.variables,
2835
- optimistic: !1,
2836
- returnPartialData: !0
2837
- }), s = void 0;
2838
- o.result && (s = Et(o.result, r)), s !== void 0 && (r.data = s, i.push({
2839
- result: s,
2840
- dataId: "ROOT_MUTATION",
2841
- query: e.document,
2842
- variables: e.variables
2843
- }));
2844
- }
2845
- var c = e.updateQueries;
2846
- c && this.queries.forEach(function(e, a) {
2847
- var o = e.observableQuery, s = o && o.queryName;
2848
- if (!(!s || !Br.call(c, s))) {
2849
- var l = c[s], u = n.queries.get(a), d = u.document, f = u.variables, p = t.diff({
2850
- query: d,
2851
- variables: f,
2852
- returnPartialData: !0,
2853
- optimistic: !1
2854
- }), m = p.result;
2855
- if (p.complete && m) {
2856
- var h = l(m, {
2857
- mutationResult: r,
2858
- queryName: d && te(d) || void 0,
2859
- queryVariables: f
2860
- });
2861
- h && i.push({
2862
- result: h,
2863
- dataId: "ROOT_QUERY",
2864
- query: d,
2865
- variables: f
2866
- });
2867
- }
2868
- }
2869
- });
2870
- }
2871
- if (i.length > 0 || (e.refetchQueries || "").length > 0 || e.update || e.onQueryUpdated || e.removeOptimistic) {
2872
- var l = [];
2873
- if (this.refetchQueries({
2874
- updateCache: function(t) {
2875
- a || i.forEach(function(e) {
2876
- return t.write(e);
2877
- });
2878
- var o = e.update, s = !wt(r) || St(r) && !r.hasNext;
2879
- if (o) {
2880
- if (!a) {
2881
- var c = t.diff({
2882
- id: "ROOT_MUTATION",
2883
- query: n.getDocumentInfo(e.document).asQuery,
2884
- variables: e.variables,
2885
- optimistic: !1,
2886
- returnPartialData: !0
2887
- });
2888
- c.complete && (r = O(O({}, r), { data: c.result }), "incremental" in r && delete r.incremental, "hasNext" in r && delete r.hasNext);
2889
- }
2890
- s && o(t, r, {
2891
- context: e.context,
2892
- variables: e.variables
2893
- });
2894
- }
2895
- !a && !e.keepRootFields && s && t.modify({
2896
- id: "ROOT_MUTATION",
2897
- fields: function(e, t) {
2898
- var n = t.fieldName, r = t.DELETE;
2899
- return n === "__typename" ? e : r;
2900
- }
2901
- });
2902
- },
2903
- include: e.refetchQueries,
2904
- optimistic: !1,
2905
- removeOptimistic: e.removeOptimistic,
2906
- onQueryUpdated: e.onQueryUpdated || null
2907
- }).forEach(function(e) {
2908
- return l.push(e);
2909
- }), e.awaitRefetchQueries || e.onQueryUpdated) return Promise.all(l).then(function() {
2910
- return r;
2911
- });
2912
- }
2913
- return Promise.resolve(r);
2914
- }, t.prototype.markMutationOptimistic = function(e, t) {
2915
- var n = this, r = typeof e == "function" ? e(t.variables, { IGNORE: Vr }) : e;
2916
- return r === Vr ? !1 : (this.cache.recordOptimisticTransaction(function(e) {
2917
- try {
2918
- n.markMutationResult(O(O({}, t), { result: { data: r } }), e);
2919
- } catch (e) {
2920
- globalThis.__DEV__ !== !1 && F.error(e);
2921
- }
2922
- }, t.mutationId), !0);
2923
- }, t.prototype.fetchQuery = function(e, t, n) {
2924
- return this.fetchConcastWithInfo(this.getOrCreateQuery(e), t, n).concast.promise;
2925
- }, t.prototype.getQueryStore = function() {
2926
- var e = Object.create(null);
2927
- return this.queries.forEach(function(t, n) {
2928
- e[n] = {
2929
- variables: t.variables,
2930
- networkStatus: t.networkStatus,
2931
- networkError: t.networkError,
2932
- graphQLErrors: t.graphQLErrors
2933
- };
2934
- }), e;
2935
- }, t.prototype.resetErrors = function(e) {
2936
- var t = this.queries.get(e);
2937
- t && (t.networkError = void 0, t.graphQLErrors = []);
2938
- }, t.prototype.transform = function(e) {
2939
- return this.documentTransform.transformDocument(e);
2940
- }, t.prototype.getDocumentInfo = function(t) {
2941
- var n = this.transformCache;
2942
- if (!n.has(t)) {
2943
- var r = {
2944
- hasClientExports: T(t),
2945
- hasForcedResolvers: this.localState.shouldForceResolvers(t),
2946
- hasNonreactiveDirective: e(["nonreactive"], t),
2947
- nonReactiveQuery: ht(t),
2948
- clientQuery: this.localState.clientQuery(t),
2949
- serverQuery: dt([
2950
- {
2951
- name: "client",
2952
- remove: !0
2953
- },
2954
- { name: "connection" },
2955
- { name: "nonreactive" },
2956
- { name: "unmask" }
2957
- ], t),
2958
- defaultVars: he(Ve(t)),
2959
- asQuery: O(O({}, t), { definitions: t.definitions.map(function(e) {
2960
- return e.kind === "OperationDefinition" && e.operation !== "query" ? O(O({}, e), { operation: "query" }) : e;
2961
- }) })
2962
- };
2963
- n.set(t, r);
2964
- }
2965
- return n.get(t);
2966
- }, t.prototype.getVariables = function(e, t) {
2967
- return O(O({}, this.getDocumentInfo(e).defaultVars), t);
2968
- }, t.prototype.watchQuery = function(e) {
2969
- var t = this.transform(e.query);
2970
- e = O(O({}, e), { variables: this.getVariables(t, e.variables) }), e.notifyOnNetworkStatusChange === void 0 && (e.notifyOnNetworkStatusChange = !1);
2971
- var n = new Rr(this), r = new re({
2972
- queryManager: this,
2973
- queryInfo: n,
2974
- options: e
2975
- });
2976
- return r.lastQuery = t, re.inactiveOnCreation.getValue() || this.queries.set(r.queryId, n), n.init({
2977
- document: t,
2978
- observableQuery: r,
2979
- variables: r.variables
2980
- }), r;
2981
- }, t.prototype.query = function(e, t) {
2982
- var n = this;
2983
- t === void 0 && (t = this.generateQueryId()), F(e.query, 38), F(e.query.kind === "Document", 39), F(!e.returnPartialData, 40), F(!e.pollInterval, 41);
2984
- var r = this.transform(e.query);
2985
- return this.fetchQuery(t, O(O({}, e), { query: r })).then(function(i) {
2986
- return i && O(O({}, i), { data: n.maskOperation({
2987
- document: r,
2988
- data: i.data,
2989
- fetchPolicy: e.fetchPolicy,
2990
- id: t
2991
- }) });
2992
- }).finally(function() {
2993
- return n.stopQuery(t);
2994
- });
2995
- }, t.prototype.generateQueryId = function() {
2996
- return String(this.queryIdCounter++);
2997
- }, t.prototype.generateRequestId = function() {
2998
- return this.requestIdCounter++;
2999
- }, t.prototype.generateMutationId = function() {
3000
- return String(this.mutationIdCounter++);
3001
- }, t.prototype.stopQueryInStore = function(e) {
3002
- this.stopQueryInStoreNoBroadcast(e), this.broadcastQueries();
3003
- }, t.prototype.stopQueryInStoreNoBroadcast = function(e) {
3004
- var t = this.queries.get(e);
3005
- t && t.stop();
3006
- }, t.prototype.clearStore = function(e) {
3007
- return e === void 0 && (e = { discardWatches: !0 }), this.cancelPendingFetches(R(42)), this.queries.forEach(function(e) {
3008
- e.observableQuery ? e.networkStatus = l.loading : e.stop();
3009
- }), this.mutationStore && (this.mutationStore = Object.create(null)), this.cache.reset(e);
3010
- }, t.prototype.getObservableQueries = function(e) {
3011
- var t = this;
3012
- e === void 0 && (e = "active");
3013
- var n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Set();
3014
- return Array.isArray(e) && e.forEach(function(e) {
3015
- if (typeof e == "string") r.set(e, e), i.set(e, !1);
3016
- else if (o(e)) {
3017
- var n = K(t.transform(e));
3018
- r.set(n, te(e)), i.set(n, !1);
3019
- } else _(e) && e.query && a.add(e);
3020
- }), this.queries.forEach(function(t, r) {
3021
- var a = t.observableQuery, o = t.document;
3022
- if (a) {
3023
- if (e === "all") {
3024
- n.set(r, a);
3025
- return;
3026
- }
3027
- var s = a.queryName;
3028
- if (a.options.fetchPolicy === "standby" || e === "active" && !a.hasObservers()) return;
3029
- (e === "active" || s && i.has(s) || o && i.has(K(o))) && (n.set(r, a), s && i.set(s, !0), o && i.set(K(o), !0));
3030
- }
3031
- }), a.size && a.forEach(function(e) {
3032
- var r = De("legacyOneTimeQuery"), i = t.getOrCreateQuery(r).init({
3033
- document: e.query,
3034
- variables: e.variables
3035
- }), a = new re({
3036
- queryManager: t,
3037
- queryInfo: i,
3038
- options: O(O({}, e), { fetchPolicy: "network-only" })
3039
- });
3040
- F(a.queryId === r), i.setObservableQuery(a), n.set(r, a);
3041
- }), globalThis.__DEV__ !== !1 && i.size && i.forEach(function(e, t) {
3042
- if (!e) {
3043
- var n = r.get(t);
3044
- n ? globalThis.__DEV__ !== !1 && F.warn(43, n) : globalThis.__DEV__ !== !1 && F.warn(44);
3045
- }
3046
- }), n;
3047
- }, t.prototype.reFetchObservableQueries = function(e) {
3048
- var t = this;
3049
- e === void 0 && (e = !1);
3050
- var n = [];
3051
- return this.getObservableQueries(e ? "all" : "active").forEach(function(r, i) {
3052
- var a = r.options.fetchPolicy;
3053
- z("resetLastResults", function() {
3054
- return r.resetLastResults();
3055
- }), (e || a !== "standby" && a !== "cache-only") && n.push(r.refetch()), (t.queries.get(i) || r.queryInfo).setDiff(null);
3056
- }), this.broadcastQueries(), Promise.all(n);
3057
- }, t.prototype.startGraphQLSubscription = function(e) {
3058
- var t = this, n = e.query, r = e.variables, i = e.fetchPolicy, a = e.errorPolicy, o = a === void 0 ? "none" : a, s = e.context, c = s === void 0 ? {} : s, l = e.extensions, u = l === void 0 ? {} : l;
3059
- n = this.transform(n), r = this.getVariables(n, r);
3060
- var d = function(e) {
3061
- return t.getObservableFromLink(n, c, e, u).map(function(r) {
3062
- i !== "no-cache" && (zr(r, o) && t.cache.write({
3063
- query: n,
3064
- result: r.data,
3065
- dataId: "ROOT_SUBSCRIPTION",
3066
- variables: e
3067
- }), t.broadcastQueries());
3068
- var a = Dt(r), s = ce(r);
3069
- if (a || s) {
3070
- var c = {};
3071
- if (a && (c.graphQLErrors = r.errors), s && (c.protocolErrors = r.extensions[ue]), o === "none" || s) throw new m(c);
3072
- }
3073
- return o === "ignore" && delete r.errors, r;
3074
- });
3075
- };
3076
- if (this.getDocumentInfo(n).hasClientExports) {
3077
- var f = this.localState.addExportedVariables(n, r, c).then(d);
3078
- return new B(function(e) {
3079
- var t = null;
3080
- return f.then(function(n) {
3081
- return t = n.subscribe(e);
3082
- }, e.error), function() {
3083
- return t && t.unsubscribe();
3084
- };
3085
- });
3086
- }
3087
- return d(r);
3088
- }, t.prototype.stopQuery = function(e) {
3089
- this.stopQueryNoBroadcast(e), this.broadcastQueries();
3090
- }, t.prototype.stopQueryNoBroadcast = function(e) {
3091
- this.stopQueryInStoreNoBroadcast(e), this.removeQuery(e);
3092
- }, t.prototype.removeQuery = function(e) {
3093
- var t;
3094
- this.fetchCancelFns.delete(e), this.queries.has(e) && ((t = this.queries.get(e)) == null || t.stop(), this.queries.delete(e));
3095
- }, t.prototype.broadcastQueries = function() {
3096
- this.onBroadcast && this.onBroadcast(), this.queries.forEach(function(e) {
3097
- return e.observableQuery?.notify();
3098
- });
3099
- }, t.prototype.getLocalState = function() {
3100
- return this.localState;
3101
- }, t.prototype.getObservableFromLink = function(e, t, n, r, i) {
3102
- var a = this;
3103
- i === void 0 && (i = t?.queryDeduplication ?? this.queryDeduplication);
3104
- var o, s = this.getDocumentInfo(e), c = s.serverQuery, l = s.clientQuery;
3105
- if (c) {
3106
- var u = this, d = u.inFlightLinkObservables, f = u.link, p = {
3107
- query: c,
3108
- variables: n,
3109
- operationName: te(c) || void 0,
3110
- context: this.prepareContext(O(O({}, t), { forceFetch: !i })),
3111
- extensions: r
3112
- };
3113
- if (t = p.context, i) {
3114
- var m = K(c), h = C(n), g = d.lookup(m, h);
3115
- if (o = g.observable, !o) {
3116
- var _ = new J([zt(f, p)]);
3117
- o = g.observable = _, _.beforeNext(function e(t, n) {
3118
- t === "next" && "hasNext" in n && n.hasNext ? _.beforeNext(e) : d.remove(m, h);
3119
- });
3120
- }
3121
- } else o = new J([zt(f, p)]);
3122
- } else o = new J([B.of({ data: {} })]), t = this.prepareContext(t);
3123
- return l && (o = bt(o, function(e) {
3124
- return a.localState.runResolvers({
3125
- document: l,
3126
- remoteResult: e,
3127
- context: t,
3128
- variables: n
3129
- });
3130
- })), o;
3131
- }, t.prototype.getResultsFromLink = function(e, t, n) {
3132
- var r = e.lastRequestId = this.generateRequestId(), i = this.cache.transformForLink(n.query);
3133
- return bt(this.getObservableFromLink(i, n.context, n.variables), function(a) {
3134
- var o = Ot(a), s = o.length > 0, c = n.errorPolicy;
3135
- if (r >= e.lastRequestId) {
3136
- if (s && c === "none") throw e.markError(new m({ graphQLErrors: o }));
3137
- e.markResult(a, i, n, t), e.markReady();
3138
- }
3139
- var u = {
3140
- data: a.data,
3141
- loading: !1,
3142
- networkStatus: l.ready
3143
- };
3144
- return s && c === "none" && (u.data = void 0), s && c !== "ignore" && (u.errors = o, u.networkStatus = l.error), u;
3145
- }, function(t) {
3146
- var n = fe(t) ? t : new m({ networkError: t });
3147
- throw r >= e.lastRequestId && e.markError(n), n;
3148
- });
3149
- }, t.prototype.fetchConcastWithInfo = function(e, t, n, r) {
3150
- var i = this;
3151
- n === void 0 && (n = l.loading), r === void 0 && (r = t.query);
3152
- var a = this.getVariables(r, t.variables), o = this.defaultOptions.watchQuery, s = t.fetchPolicy, c = s === void 0 ? o && o.fetchPolicy || "cache-first" : s, u = t.errorPolicy, d = u === void 0 ? o && o.errorPolicy || "none" : u, f = t.returnPartialData, p = f === void 0 ? !1 : f, m = t.notifyOnNetworkStatusChange, h = m === void 0 ? !1 : m, g = t.context, _ = Object.assign({}, t, {
3153
- query: r,
3154
- variables: a,
3155
- fetchPolicy: c,
3156
- errorPolicy: d,
3157
- returnPartialData: p,
3158
- notifyOnNetworkStatusChange: h,
3159
- context: g === void 0 ? {} : g
3160
- }), v = function(r) {
3161
- _.variables = r;
3162
- var a = i.fetchQueryByPolicy(e, _, n);
3163
- return _.fetchPolicy !== "standby" && a.sources.length > 0 && e.observableQuery && e.observableQuery.applyNextFetchPolicy("after-fetch", t), a;
3164
- }, y = function() {
3165
- return i.fetchCancelFns.delete(e.queryId);
3166
- };
3167
- this.fetchCancelFns.set(e.queryId, function(e) {
3168
- y(), setTimeout(function() {
3169
- return b.cancel(e);
3170
- });
3171
- });
3172
- var b, x;
3173
- if (this.getDocumentInfo(_.query).hasClientExports) b = new J(this.localState.addExportedVariables(_.query, _.variables, _.context).then(v).then(function(e) {
3174
- return e.sources;
3175
- })), x = !0;
3176
- else {
3177
- var S = v(_.variables);
3178
- x = S.fromLink, b = new J(S.sources);
3179
- }
3180
- return b.promise.then(y, y), {
3181
- concast: b,
3182
- fromLink: x
3183
- };
3184
- }, t.prototype.refetchQueries = function(e) {
3185
- var t = this, n = e.updateCache, r = e.include, i = e.optimistic, a = i === void 0 ? !1 : i, o = e.removeOptimistic, s = o === void 0 ? a ? De("refetchQueries") : void 0 : o, c = e.onQueryUpdated, l = /* @__PURE__ */ new Map();
3186
- r && this.getObservableQueries(r).forEach(function(e, n) {
3187
- l.set(n, {
3188
- oq: e,
3189
- lastDiff: (t.queries.get(n) || e.queryInfo).getDiff()
3190
- });
3191
- });
3192
- var u = /* @__PURE__ */ new Map();
3193
- return n && this.cache.batch({
3194
- update: n,
3195
- optimistic: a && s || !1,
3196
- removeOptimistic: s,
3197
- onWatchUpdated: function(e, t, n) {
3198
- var r = e.watcher instanceof Rr && e.watcher.observableQuery;
3199
- if (r) {
3200
- if (c) {
3201
- l.delete(r.queryId);
3202
- var i = c(r, t, n);
3203
- return i === !0 && (i = r.refetch()), i !== !1 && u.set(r, i), i;
3204
- }
3205
- c !== null && l.set(r.queryId, {
3206
- oq: r,
3207
- lastDiff: n,
3208
- diff: t
3209
- });
3210
- }
3211
- }
3212
- }), l.size && l.forEach(function(e, n) {
3213
- var r = e.oq, i = e.lastDiff, a = e.diff, o;
3214
- c && (a || (a = z("canonizeResults", function() {
3215
- return t.cache.diff(r.queryInfo.getDiffOptions());
3216
- })), o = c(r, a, i)), (!c || o === !0) && (o = r.refetch()), o !== !1 && u.set(r, o), n.indexOf("legacyOneTimeQuery") >= 0 && t.stopQueryNoBroadcast(n);
3217
- }), s && this.cache.removeOptimistic(s), u;
3218
- }, t.prototype.maskOperation = function(e) {
3219
- var t = e.document, n = e.data;
3220
- if (globalThis.__DEV__ !== !1) {
3221
- var r = e.fetchPolicy, i = e.id, a = Ve(t)?.operation, o = (a?.[0] ?? "o") + i;
3222
- this.dataMasking && r === "no-cache" && !u(t) && !this.noCacheWarningsByQueryId.has(o) && (this.noCacheWarningsByQueryId.add(o), globalThis.__DEV__ !== !1 && F.warn(45, te(t) ?? `Unnamed ${a ?? "operation"}`));
3223
- }
3224
- return this.dataMasking ? Tn(n, t, this.cache) : n;
3225
- }, t.prototype.maskFragment = function(e) {
3226
- var t = e.data, n = e.fragment, r = e.fragmentName;
3227
- return this.dataMasking ? wn(t, n, this.cache, r) : t;
3228
- }, t.prototype.fetchQueryByPolicy = function(e, t, n) {
3229
- var r = this, i = t.query, a = t.variables, o = t.fetchPolicy, s = t.refetchWritePolicy, c = t.errorPolicy, u = t.returnPartialData, d = t.context, f = t.notifyOnNetworkStatusChange, p = e.networkStatus;
3230
- e.init({
3231
- document: i,
3232
- variables: a,
3233
- networkStatus: n
3234
- });
3235
- var m = function() {
3236
- return e.getDiff();
3237
- }, h = function(t, n) {
3238
- n === void 0 && (n = e.networkStatus || l.loading);
3239
- var o = t.result;
3240
- globalThis.__DEV__ !== !1 && !u && !w(o, {}) && oe(t.missing);
3241
- var s = function(e) {
3242
- return B.of(O({
3243
- data: e,
3244
- loading: g(n),
3245
- networkStatus: n
3246
- }, t.complete ? null : { partial: !0 }));
3247
- };
3248
- return o && r.getDocumentInfo(i).hasForcedResolvers ? r.localState.runResolvers({
3249
- document: i,
3250
- remoteResult: { data: o },
3251
- context: d,
3252
- variables: a,
3253
- onlyRunForcedResolvers: !0
3254
- }).then(function(e) {
3255
- return s(e.data || void 0);
3256
- }) : c === "none" && n === l.refetch && Array.isArray(t.missing) ? s(void 0) : s(o);
3257
- }, _ = o === "no-cache" ? 0 : n === l.refetch && s !== "merge" ? 1 : 2, v = function() {
3258
- return r.getResultsFromLink(e, _, {
3259
- query: i,
3260
- variables: a,
3261
- context: d,
3262
- fetchPolicy: o,
3263
- errorPolicy: c
3264
- });
3265
- }, y = f && typeof p == "number" && p !== n && g(n);
3266
- switch (o) {
3267
- default:
3268
- case "cache-first":
3269
- var b = m();
3270
- return b.complete ? {
3271
- fromLink: !1,
3272
- sources: [h(b, e.markReady())]
3273
- } : u || y ? {
3274
- fromLink: !0,
3275
- sources: [h(b), v()]
3276
- } : {
3277
- fromLink: !0,
3278
- sources: [v()]
3279
- };
3280
- case "cache-and-network":
3281
- var b = m();
3282
- return b.complete || u || y ? {
3283
- fromLink: !0,
3284
- sources: [h(b), v()]
3285
- } : {
3286
- fromLink: !0,
3287
- sources: [v()]
3288
- };
3289
- case "cache-only": return {
3290
- fromLink: !1,
3291
- sources: [h(m(), e.markReady())]
3292
- };
3293
- case "network-only": return y ? {
3294
- fromLink: !0,
3295
- sources: [h(m()), v()]
3296
- } : {
3297
- fromLink: !0,
3298
- sources: [v()]
3299
- };
3300
- case "no-cache": return y ? {
3301
- fromLink: !0,
3302
- sources: [h(e.getDiff()), v()]
3303
- } : {
3304
- fromLink: !0,
3305
- sources: [v()]
3306
- };
3307
- case "standby": return {
3308
- fromLink: !1,
3309
- sources: []
3310
- };
3311
- }
3312
- }, t.prototype.getOrCreateQuery = function(e) {
3313
- return e && !this.queries.has(e) && this.queries.set(e, new Rr(this, e)), this.queries.get(e);
3314
- }, t.prototype.prepareContext = function(e) {
3315
- e === void 0 && (e = {});
3316
- var t = this.localState.prepareContext(e);
3317
- return O(O(O({}, this.defaultContext), t), { clientAwareness: this.clientAwareness });
3318
- }, t;
3319
- }(), Ur = function() {
3320
- function t(e) {
3321
- var t = e.cache, n = e.client, r = e.resolvers, i = e.fragmentMatcher;
3322
- this.selectionsToResolveCache = /* @__PURE__ */ new WeakMap(), this.cache = t, n && (this.client = n), r && this.addResolvers(r), i && this.setFragmentMatcher(i);
3323
- }
3324
- return t.prototype.addResolvers = function(e) {
3325
- var t = this;
3326
- this.resolvers = this.resolvers || {}, Array.isArray(e) ? e.forEach(function(e) {
3327
- t.resolvers = _t(t.resolvers, e);
3328
- }) : this.resolvers = _t(this.resolvers, e);
3329
- }, t.prototype.setResolvers = function(e) {
3330
- this.resolvers = {}, this.addResolvers(e);
3331
- }, t.prototype.getResolvers = function() {
3332
- return this.resolvers || {};
3333
- }, t.prototype.runResolvers = function(e) {
3334
- return I(this, arguments, void 0, function(e) {
3335
- var t = e.document, n = e.remoteResult, r = e.context, i = e.variables, a = e.onlyRunForcedResolvers, o = a === void 0 ? !1 : a;
3336
- return j(this, function(e) {
3337
- return t ? [2, this.resolveDocument(t, n.data, r, i, this.fragmentMatcher, o).then(function(e) {
3338
- return O(O({}, n), { data: e.result });
3339
- })] : [2, n];
3340
- });
3341
- });
3342
- }, t.prototype.setFragmentMatcher = function(e) {
3343
- this.fragmentMatcher = e;
3344
- }, t.prototype.getFragmentMatcher = function() {
3345
- return this.fragmentMatcher;
3346
- }, t.prototype.clientQuery = function(t) {
3347
- return e(["client"], t) && this.resolvers ? t : null;
3348
- }, t.prototype.serverQuery = function(e) {
3349
- return mt(e);
3350
- }, t.prototype.prepareContext = function(e) {
3351
- var t = this.cache;
3352
- return O(O({}, e), {
3353
- cache: t,
3354
- getCacheKey: function(e) {
3355
- return t.identify(e);
3356
- }
3357
- });
3358
- }, t.prototype.addExportedVariables = function(e) {
3359
- return I(this, arguments, void 0, function(e, t, n) {
3360
- return t === void 0 && (t = {}), n === void 0 && (n = {}), j(this, function(r) {
3361
- return e ? [2, this.resolveDocument(e, this.buildRootValueFromCache(e, t) || {}, this.prepareContext(n), t).then(function(e) {
3362
- return O(O({}, t), e.exportedVariables);
3363
- })] : [2, O({}, t)];
3364
- });
3365
- });
3366
- }, t.prototype.shouldForceResolvers = function(e) {
3367
- var t = !1;
3368
- return P(e, { Directive: { enter: function(e) {
3369
- if (e.name.value === "client" && e.arguments && (t = e.arguments.some(function(e) {
3370
- return e.name.value === "always" && e.value.kind === "BooleanValue" && e.value.value === !0;
3371
- }), t)) return Le;
3372
- } } }), t;
3373
- }, t.prototype.buildRootValueFromCache = function(e, t) {
3374
- return this.cache.diff({
3375
- query: pt(e),
3376
- variables: t,
3377
- returnPartialData: !0,
3378
- optimistic: !1
3379
- }).result;
3380
- }, t.prototype.resolveDocument = function(e, t) {
3381
- return I(this, arguments, void 0, function(e, t, n, r, i, a) {
3382
- var o, s, c, l, u, d, p, m, h, g, _;
3383
- return n === void 0 && (n = {}), r === void 0 && (r = {}), i === void 0 && (i = function() {
3384
- return !0;
3385
- }), a === void 0 && (a = !1), j(this, function(v) {
3386
- return o = _e(e), s = Ue(e), c = f(s), l = this.collectSelectionsToResolve(o, c), u = o.operation, d = u ? u.charAt(0).toUpperCase() + u.slice(1) : "Query", p = this, m = p.cache, h = p.client, g = {
3387
- fragmentMap: c,
3388
- context: O(O({}, n), {
3389
- cache: m,
3390
- client: h
3391
- }),
3392
- variables: r,
3393
- fragmentMatcher: i,
3394
- defaultOperationType: d,
3395
- exportedVariables: {},
3396
- selectionsToResolve: l,
3397
- onlyRunForcedResolvers: a
3398
- }, _ = !1, [2, this.resolveSelectionSet(o.selectionSet, _, t, g).then(function(e) {
3399
- return {
3400
- result: e,
3401
- exportedVariables: g.exportedVariables
3402
- };
3403
- })];
3404
- });
3405
- });
3406
- }, t.prototype.resolveSelectionSet = function(e, t, n, r) {
3407
- return I(this, void 0, void 0, function() {
3408
- var i, a, o, s, c, l = this;
3409
- return j(this, function(u) {
3410
- return i = r.fragmentMap, a = r.context, o = r.variables, s = [n], c = function(e) {
3411
- return I(l, void 0, void 0, function() {
3412
- var c, l;
3413
- return j(this, function(u) {
3414
- return !t && !r.selectionsToResolve.has(e) || !xe(e, o) ? [2] : S(e) ? [2, this.resolveField(e, t, n, r).then(function(t) {
3415
- var n;
3416
- t !== void 0 && s.push((n = {}, n[y(e)] = t, n));
3417
- })] : (Ee(e) ? c = e : (c = i[e.name.value], F(c, 21, e.name.value)), c && c.typeCondition && (l = c.typeCondition.name.value, r.fragmentMatcher(n, l, a)) ? [2, this.resolveSelectionSet(c.selectionSet, t, n, r).then(function(e) {
3418
- s.push(e);
3419
- })] : [2]);
3420
- });
3421
- });
3422
- }, [2, Promise.all(e.selections.map(c)).then(function() {
3423
- return vt(s);
3424
- })];
3425
- });
3426
- });
3427
- }, t.prototype.resolveField = function(e, t, n, r) {
3428
- return I(this, void 0, void 0, function() {
3429
- var i, a, o, s, c, l, u, d, f, p = this;
3430
- return j(this, function(m) {
3431
- return n ? (i = r.variables, a = e.name.value, o = y(e), s = a !== o, c = n[o] || n[a], l = Promise.resolve(c), (!r.onlyRunForcedResolvers || this.shouldForceResolvers(e)) && (u = n.__typename || r.defaultOperationType, d = this.resolvers && this.resolvers[u], d && (f = d[s ? a : o], f && (l = Promise.resolve(tr.withValue(this.cache, f, [
3432
- n,
3433
- Be(e, i),
3434
- r.context,
3435
- {
3436
- field: e,
3437
- fragmentMap: r.fragmentMap
3438
- }
3439
- ]))))), [2, l.then(function(n) {
3440
- if (n === void 0 && (n = c), e.directives && e.directives.forEach(function(e) {
3441
- e.name.value === "export" && e.arguments && e.arguments.forEach(function(e) {
3442
- e.name.value === "as" && e.value.kind === "StringValue" && (r.exportedVariables[e.value.value] = n);
3443
- });
3444
- }), !e.selectionSet || n == null) return n;
3445
- var i = e.directives?.some(function(e) {
3446
- return e.name.value === "client";
3447
- }) ?? !1;
3448
- if (Array.isArray(n)) return p.resolveSubSelectedArray(e, t || i, n, r);
3449
- if (e.selectionSet) return p.resolveSelectionSet(e.selectionSet, t || i, n, r);
3450
- })]) : [2, null];
3451
- });
3452
- });
3453
- }, t.prototype.resolveSubSelectedArray = function(e, t, n, r) {
3454
- var i = this;
3455
- return Promise.all(n.map(function(n) {
3456
- if (n === null) return null;
3457
- if (Array.isArray(n)) return i.resolveSubSelectedArray(e, t, n, r);
3458
- if (e.selectionSet) return i.resolveSelectionSet(e.selectionSet, t, n, r);
3459
- }));
3460
- }, t.prototype.collectSelectionsToResolve = function(e, t) {
3461
- var n = function(e) {
3462
- return !Array.isArray(e);
3463
- }, r = this.selectionsToResolveCache;
3464
- function i(e) {
3465
- if (!r.has(e)) {
3466
- var a = /* @__PURE__ */ new Set();
3467
- r.set(e, a), P(e, {
3468
- Directive: function(e, t, r, i, o) {
3469
- e.name.value === "client" && o.forEach(function(e) {
3470
- n(e) && nt(e) && a.add(e);
3471
- });
3472
- },
3473
- FragmentSpread: function(e, r, o, s, c) {
3474
- var l = t[e.name.value];
3475
- F(l, 22, e.name.value);
3476
- var u = i(l);
3477
- u.size > 0 && (c.forEach(function(e) {
3478
- n(e) && nt(e) && a.add(e);
3479
- }), a.add(e), u.forEach(function(e) {
3480
- a.add(e);
3481
- }));
3482
- }
3483
- });
3484
- }
3485
- return r.get(e);
3486
- }
3487
- return i(e);
3488
- }, t;
3489
- }(), Wr = !1, Gr = function() {
3490
- function e(e) {
3491
- var t = this;
3492
- if (this.resetStoreCallbacks = [], this.clearStoreCallbacks = [], !e.cache) throw R(16);
3493
- var n = e.uri, r = e.credentials, i = e.headers, a = e.cache, o = e.documentTransform, s = e.ssrMode, c = s === void 0 ? !1 : s, l = e.ssrForceFetchDelay, u = l === void 0 ? 0 : l, d = e.connectToDevTools, f = e.queryDeduplication, p = f === void 0 ? !0 : f, m = e.defaultOptions, h = e.defaultContext, g = e.assumeImmutableResults, _ = g === void 0 ? a.assumeImmutableResults : g, v = e.resolvers, y = e.typeDefs, b = e.fragmentMatcher, x = e.clientAwareness, S = e.name, C = e.version, w = e.devtools, T = e.dataMasking;
3494
- globalThis.__DEV__ !== !1 && (L(e, "connectToDevTools", "ApolloClient", "Please use `devtools.enabled` instead."), L(e, "uri", "ApolloClient", "Please initialize an instance of `HttpLink` with `uri` instead."), L(e, "credentials", "ApolloClient", "Please initialize an instance of `HttpLink` with `credentials` instead."), L(e, "headers", "ApolloClient", "Please initialize an instance of `HttpLink` with `headers` instead."), L(e, "name", "ApolloClient", "Please use the `clientAwareness.name` option instead."), L(e, "version", "ApolloClient", "Please use the `clientAwareness.version` option instead."), L(e, "typeDefs", "ApolloClient"), e.link || globalThis.__DEV__ !== !1 && F.warn(17));
3495
- var E = e.link;
3496
- E || (E = n ? new mn({
3497
- uri: n,
3498
- credentials: r,
3499
- headers: i
3500
- }) : Y.empty()), this.link = E, this.cache = a, this.disableNetworkFetches = c || u > 0, this.queryDeduplication = p, this.defaultOptions = m || Object.create(null), this.typeDefs = y, this.devtoolsConfig = O(O({}, w), { enabled: w?.enabled ?? d }), this.devtoolsConfig.enabled === void 0 && (this.devtoolsConfig.enabled = globalThis.__DEV__ !== !1), u && setTimeout(function() {
3501
- return t.disableNetworkFetches = !1;
3502
- }, u), this.watchQuery = this.watchQuery.bind(this), this.query = this.query.bind(this), this.mutate = this.mutate.bind(this), this.watchFragment = this.watchFragment.bind(this), this.resetStore = this.resetStore.bind(this), this.reFetchObservableQueries = this.reFetchObservableQueries.bind(this), this.version = be, this.localState = new Ur({
3503
- cache: a,
3504
- client: this,
3505
- resolvers: v,
3506
- fragmentMatcher: b
3507
- }), this.queryManager = new Hr({
3508
- cache: this.cache,
3509
- link: this.link,
3510
- defaultOptions: this.defaultOptions,
3511
- defaultContext: h,
3512
- documentTransform: o,
3513
- queryDeduplication: p,
3514
- ssrMode: c,
3515
- dataMasking: !!T,
3516
- clientAwareness: {
3517
- name: x?.name ?? S,
3518
- version: x?.version ?? C
3519
- },
3520
- localState: this.localState,
3521
- assumeImmutableResults: _,
3522
- onBroadcast: this.devtoolsConfig.enabled ? function() {
3523
- t.devToolsHookCb && t.devToolsHookCb({
3524
- action: {},
3525
- state: {
3526
- queries: t.queryManager.getQueryStore(),
3527
- mutations: t.queryManager.mutationStore || {}
3528
- },
3529
- dataWithOptimisticResults: t.cache.extract(!0)
3530
- });
3531
- } : void 0
3532
- }), this.devtoolsConfig.enabled && this.connectToDevTools();
3533
- }
3534
- return Object.defineProperty(e.prototype, "prioritizeCacheValues", {
3535
- get: function() {
3536
- return this.disableNetworkFetches;
3537
- },
3538
- set: function(e) {
3539
- this.disableNetworkFetches = e;
3540
- },
3541
- enumerable: !1,
3542
- configurable: !0
3543
- }), e.prototype.connectToDevTools = function() {
3544
- if (!(typeof window > "u")) {
3545
- var e = window, t = Symbol.for("apollo.devtools");
3546
- (e[t] = e[t] || []).push(this), e.__APOLLO_CLIENT__ = this, !Wr && globalThis.__DEV__ !== !1 && (Wr = !0, window.document && window.top === window.self && /^(https?|file):$/.test(window.location.protocol) && setTimeout(function() {
3547
- if (!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__) {
3548
- var e = window.navigator, t = e && e.userAgent, n = void 0;
3549
- typeof t == "string" && (t.indexOf("Chrome/") > -1 ? n = "https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm" : t.indexOf("Firefox/") > -1 && (n = "https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")), n && globalThis.__DEV__ !== !1 && F.log("Download the Apollo DevTools for a better development experience: %s", n);
3550
- }
3551
- }, 1e4));
3552
- }
3553
- }, Object.defineProperty(e.prototype, "documentTransform", {
3554
- get: function() {
3555
- return this.queryManager.documentTransform;
3556
- },
3557
- enumerable: !1,
3558
- configurable: !0
3559
- }), e.prototype.stop = function() {
3560
- this.queryManager.stop();
3561
- }, e.prototype.watchQuery = function(e) {
3562
- return this.defaultOptions.watchQuery && (e = we(this.defaultOptions.watchQuery, e)), this.disableNetworkFetches && (e.fetchPolicy === "network-only" || e.fetchPolicy === "cache-and-network") && (e = O(O({}, e), { fetchPolicy: "cache-first" })), globalThis.__DEV__ !== !1 && (L(e, "canonizeResults", "client.watchQuery"), L(e, "partialRefetch", "client.watchQuery")), this.queryManager.watchQuery(e);
3563
- }, e.prototype.query = function(e) {
3564
- return this.defaultOptions.query && (e = we(this.defaultOptions.query, e)), F(e.fetchPolicy !== "cache-and-network", 18), this.disableNetworkFetches && e.fetchPolicy === "network-only" && (e = O(O({}, e), { fetchPolicy: "cache-first" })), globalThis.__DEV__ !== !1 && (L(e, "canonizeResults", "client.query"), L(e, "notifyOnNetworkStatusChange", "client.query", "This option does not affect `client.query` and can be safely removed."), e.fetchPolicy === "standby" && globalThis.__DEV__ !== !1 && F.warn(19)), this.queryManager.query(e);
3565
- }, e.prototype.mutate = function(e) {
3566
- return this.defaultOptions.mutate && (e = we(this.defaultOptions.mutate, e)), this.queryManager.mutate(e);
3567
- }, e.prototype.subscribe = function(e) {
3568
- var t = this, n = this.queryManager.generateQueryId();
3569
- return this.queryManager.startGraphQLSubscription(e).map(function(r) {
3570
- return O(O({}, r), { data: t.queryManager.maskOperation({
3571
- document: e.query,
3572
- data: r.data,
3573
- fetchPolicy: e.fetchPolicy,
3574
- id: n
3575
- }) });
3576
- });
3577
- }, e.prototype.readQuery = function(e, t) {
3578
- return t === void 0 && (t = !1), this.cache.readQuery(e, t);
3579
- }, e.prototype.watchFragment = function(e) {
3580
- var t;
3581
- return this.cache.watchFragment(O(O({}, e), (t = {}, t[Symbol.for("apollo.dataMasking")] = this.queryManager.dataMasking, t)));
3582
- }, e.prototype.readFragment = function(e, t) {
3583
- return t === void 0 && (t = !1), this.cache.readFragment(e, t);
3584
- }, e.prototype.writeQuery = function(e) {
3585
- var t = this.cache.writeQuery(e);
3586
- return e.broadcast !== !1 && this.queryManager.broadcastQueries(), t;
3587
- }, e.prototype.writeFragment = function(e) {
3588
- var t = this.cache.writeFragment(e);
3589
- return e.broadcast !== !1 && this.queryManager.broadcastQueries(), t;
3590
- }, e.prototype.__actionHookForDevTools = function(e) {
3591
- this.devToolsHookCb = e;
3592
- }, e.prototype.__requestRaw = function(e) {
3593
- return zt(this.link, e);
3594
- }, e.prototype.resetStore = function() {
3595
- var e = this;
3596
- return Promise.resolve().then(function() {
3597
- return e.queryManager.clearStore({ discardWatches: !1 });
3598
- }).then(function() {
3599
- return Promise.all(e.resetStoreCallbacks.map(function(e) {
3600
- return e();
3601
- }));
3602
- }).then(function() {
3603
- return e.reFetchObservableQueries();
3604
- });
3605
- }, e.prototype.clearStore = function() {
3606
- var e = this;
3607
- return Promise.resolve().then(function() {
3608
- return e.queryManager.clearStore({ discardWatches: !0 });
3609
- }).then(function() {
3610
- return Promise.all(e.clearStoreCallbacks.map(function(e) {
3611
- return e();
3612
- }));
3613
- });
3614
- }, e.prototype.onResetStore = function(e) {
3615
- var t = this;
3616
- return this.resetStoreCallbacks.push(e), function() {
3617
- t.resetStoreCallbacks = t.resetStoreCallbacks.filter(function(t) {
3618
- return t !== e;
3619
- });
3620
- };
3621
- }, e.prototype.onClearStore = function(e) {
3622
- var t = this;
3623
- return this.clearStoreCallbacks.push(e), function() {
3624
- t.clearStoreCallbacks = t.clearStoreCallbacks.filter(function(t) {
3625
- return t !== e;
3626
- });
3627
- };
3628
- }, e.prototype.reFetchObservableQueries = function(e) {
3629
- return this.queryManager.reFetchObservableQueries(e);
3630
- }, e.prototype.refetchQueries = function(e) {
3631
- var t = this.queryManager.refetchQueries(e), n = [], r = [];
3632
- t.forEach(function(e, t) {
3633
- n.push(t), r.push(e);
3634
- });
3635
- var i = Promise.all(r);
3636
- return i.queries = n, i.results = r, i.catch(function(e) {
3637
- globalThis.__DEV__ !== !1 && F.debug(20, e);
3638
- }), i;
3639
- }, e.prototype.getObservableQueries = function(e) {
3640
- return e === void 0 && (e = "active"), this.queryManager.getObservableQueries(e);
3641
- }, e.prototype.extract = function(e) {
3642
- return this.cache.extract(e);
3643
- }, e.prototype.restore = function(e) {
3644
- return this.cache.restore(e);
3645
- }, e.prototype.addResolvers = function(e) {
3646
- this.localState.addResolvers(e);
3647
- }, e.prototype.setResolvers = function(e) {
3648
- this.localState.setResolvers(e);
3649
- }, e.prototype.getResolvers = function() {
3650
- return this.localState.getResolvers();
3651
- }, e.prototype.setLocalStateFragmentMatcher = function(e) {
3652
- this.localState.setFragmentMatcher(e);
3653
- }, e.prototype.setLink = function(e) {
3654
- this.link = this.queryManager.link = e;
3655
- }, Object.defineProperty(e.prototype, "defaultContext", {
3656
- get: function() {
3657
- return this.queryManager.defaultContext;
3658
- },
3659
- enumerable: !1,
3660
- configurable: !0
3661
- }), e;
3662
- }();
3663
- globalThis.__DEV__ !== !1 && (Gr.prototype.getMemoryInternals = p);
3664
- //#endregion
3665
- //#region node_modules/@apollo/client/link/context/index.js
3666
- function Kr(e) {
3667
- return new Y(function(t, n) {
3668
- var r = A(t, []);
3669
- return new B(function(i) {
3670
- var a, o = !1;
3671
- return Promise.resolve(r).then(function(n) {
3672
- return e(n, t.getContext());
3673
- }).then(t.setContext).then(function() {
3674
- o || (a = n(t).subscribe({
3675
- next: i.next.bind(i),
3676
- error: i.error.bind(i),
3677
- complete: i.complete.bind(i)
3678
- }));
3679
- }).catch(i.error.bind(i)), function() {
3680
- o = !0, a && a.unsubscribe();
3681
- };
3682
- });
3683
- });
3684
- }
3685
- //#endregion
3686
- //#region node_modules/@apollo/client/link/error/index.js
3687
- function qr(e) {
3688
- return new Y(function(t, n) {
3689
- return new B(function(r) {
3690
- var i, a, o;
3691
- try {
3692
- i = n(t).subscribe({
3693
- next: function(i) {
3694
- if (i.errors ? o = e({
3695
- graphQLErrors: i.errors,
3696
- response: i,
3697
- operation: t,
3698
- forward: n
3699
- }) : ce(i) && (o = e({
3700
- protocolErrors: i.extensions[ue],
3701
- response: i,
3702
- operation: t,
3703
- forward: n
3704
- })), o) {
3705
- a = o.subscribe({
3706
- next: r.next.bind(r),
3707
- error: r.error.bind(r),
3708
- complete: r.complete.bind(r)
3709
- });
3710
- return;
3711
- }
3712
- r.next(i);
3713
- },
3714
- error: function(i) {
3715
- if (o = e({
3716
- operation: t,
3717
- networkError: i,
3718
- graphQLErrors: i && i.result && i.result.errors || void 0,
3719
- forward: n
3720
- }), o) {
3721
- a = o.subscribe({
3722
- next: r.next.bind(r),
3723
- error: r.error.bind(r),
3724
- complete: r.complete.bind(r)
3725
- });
3726
- return;
3727
- }
3728
- r.error(i);
3729
- },
3730
- complete: function() {
3731
- o || r.complete.bind(r)();
3732
- }
3733
- });
3734
- } catch (i) {
3735
- e({
3736
- networkError: i,
3737
- operation: t,
3738
- forward: n
3739
- }), r.error(i);
3740
- }
3741
- return function() {
3742
- i && i.unsubscribe(), a && i.unsubscribe();
3743
- };
3744
- });
3745
- });
3746
- }
3747
- (function(e) {
3748
- N(t, e);
3749
- function t(t) {
3750
- var n = e.call(this) || this;
3751
- return n.link = qr(t), n;
3752
- }
3753
- return t.prototype.request = function(e, t) {
3754
- return this.link.request(e, t);
3755
- }, t;
3756
- })(Y);
3757
- //#endregion
3758
- //#region lib/apollo-client.ts
3759
- var Jr = null, Yr = null;
3760
- function Xr(e) {
3761
- Jr = e;
3762
- }
3763
- function Zr() {
3764
- return Jr;
3765
- }
3766
- var Qr = null;
3767
- function $r(e) {
3768
- Qr = e;
3769
- }
3770
- var ei = null;
3771
- function ti(e) {
3772
- ei = e;
3773
- }
3774
- var ni = new Set([
3775
- "StartAnonymousVisitor",
3776
- "StartIdentifiedVisitor",
3777
- "VisitorPasskeyRegistrationOptions",
3778
- "VerifyVisitorPasskeyRegistration",
3779
- "VisitorPasskeyAuthenticationOptions",
3780
- "VerifyVisitorPasskeyAuthentication"
3781
- ]);
3782
- function ri(e) {
3783
- Yr = e;
3784
- }
3785
- function ii() {
3786
- return Yr;
3787
- }
3788
- var ai = null;
3789
- function oi() {
3790
- if (ai) return ai;
3791
- let e = new mn({
3792
- uri: `${t()}/graphql`,
3793
- credentials: "omit"
3794
- }), n = Kr((e, { headers: t }) => ({ headers: {
3795
- ...t,
3796
- ...Yr ? { "x-web-public-key": Yr } : {},
3797
- ...Jr ? { authorization: `Bearer ${Jr}` } : {}
3798
- } }));
3799
- return ai = new Gr({
3800
- link: Rt([
3801
- qr(({ operation: e, graphQLErrors: t, networkError: n }) => {
3802
- if (ni.has(e.operationName)) return;
3803
- let r = n && "statusCode" in n ? n.statusCode : void 0;
3804
- if ((t ?? []).some((e) => {
3805
- let t = e.extensions;
3806
- if (t?.code === "webIntegrationMismatch") return !0;
3807
- let n = t?.response?.message;
3808
- return !!(typeof n == "string" && n.includes("webIntegrationMismatch") || Array.isArray(n) && n.some((e) => typeof e == "string" && e.includes("webIntegrationMismatch")));
3809
- })) {
3810
- ei?.();
3811
- return;
3812
- }
3813
- (r === 401 || (t ?? []).some((e) => {
3814
- let t = e.extensions;
3815
- return t?.code === "UNAUTHENTICATED" || t?.response?.statusCode === 401 || e.message === "Unauthorized";
3816
- })) && Qr?.();
3817
- }),
3818
- n,
3819
- e
3820
- ]),
3821
- cache: new Fr({ typePolicies: {} }),
3822
- defaultOptions: {
3823
- watchQuery: {
3824
- errorPolicy: "all",
3825
- fetchPolicy: "cache-first"
3826
- },
3827
- query: {
3828
- errorPolicy: "all",
3829
- fetchPolicy: "cache-first"
3830
- },
3831
- mutate: { errorPolicy: "all" }
3832
- }
3833
- }), ai;
3834
- }
3835
- //#endregion
3836
- //#region dummy/help.ts
3837
- var si = [
3838
- "demo-cat-getting-started",
3839
- "demo-cat-automation",
3840
- "demo-cat-integrations",
3841
- "demo-cat-billing"
3842
- ];
3843
- function ci(e) {
3844
- return si.map((t) => ({
3845
- id: t,
3846
- articleCount: li.filter((e) => e.categoryId === t).length,
3847
- title: e.raw(`help.categories.${t}.title`),
3848
- description: e.raw(`help.categories.${t}.description`)
3849
- }));
3850
- }
3851
- var li = [
3852
- {
3853
- id: "demo-article-install",
3854
- slug: "install-the-widget",
3855
- categoryId: "demo-cat-getting-started",
3856
- viewCount: 2310,
3857
- publishedAt: "2026-01-12T10:00:00.000Z",
3858
- authorIds: ["maya"],
3859
- tagSlugs: ["setup", "install"]
3860
- },
3861
- {
3862
- id: "demo-article-flows",
3863
- slug: "build-your-first-flow",
3864
- categoryId: "demo-cat-automation",
3865
- viewCount: 1684,
3866
- publishedAt: "2026-02-04T10:00:00.000Z",
3867
- authorIds: ["leo"],
3868
- tagSlugs: ["automation", "flows"]
3869
- },
3870
- {
3871
- id: "demo-article-slack",
3872
- slug: "connect-slack",
3873
- categoryId: "demo-cat-integrations",
3874
- viewCount: 1102,
3875
- publishedAt: "2026-02-22T10:00:00.000Z",
3876
- authorIds: ["leo", "ira"],
3877
- tagSlugs: ["integrations", "slack"]
3878
- },
3879
- {
3880
- id: "demo-article-billing",
3881
- slug: "manage-billing",
3882
- categoryId: "demo-cat-billing",
3883
- viewCount: 540,
3884
- publishedAt: "2026-03-18T10:00:00.000Z",
3885
- authorIds: ["maya"],
3886
- tagSlugs: ["billing", "plans"]
3887
- },
3888
- {
3889
- id: "demo-article-theme",
3890
- slug: "customise-theme",
3891
- categoryId: "demo-cat-getting-started",
3892
- viewCount: 1340,
3893
- publishedAt: "2026-02-10T10:00:00.000Z",
3894
- authorIds: ["ira"],
3895
- tagSlugs: ["setup", "design"]
3896
- },
3897
- {
3898
- id: "demo-article-handoff",
3899
- slug: "human-handoff",
3900
- categoryId: "demo-cat-automation",
3901
- viewCount: 988,
3902
- publishedAt: "2026-03-01T10:00:00.000Z",
3903
- authorIds: ["leo"],
3904
- tagSlugs: ["automation", "ai"]
3905
- },
3906
- {
3907
- id: "demo-article-crm",
3908
- slug: "connect-crm",
3909
- categoryId: "demo-cat-integrations",
3910
- viewCount: 763,
3911
- publishedAt: "2026-03-25T10:00:00.000Z",
3912
- authorIds: ["ira"],
3913
- tagSlugs: ["integrations", "crm"]
3914
- },
3915
- {
3916
- id: "demo-article-shortcuts",
3917
- slug: "operator-shortcuts",
3918
- categoryId: "demo-cat-getting-started",
3919
- viewCount: 612,
3920
- publishedAt: "2026-04-08T10:00:00.000Z",
3921
- authorIds: ["maya"],
3922
- tagSlugs: ["productivity", "inbox"]
3923
- }
3924
- ];
3925
- function ui(e) {
3926
- return li.map(({ authorIds: t, tagSlugs: n, ...r }) => ({
3927
- ...r,
3928
- title: e.raw(`help.articles.${r.id}.title`),
3929
- excerpt: e.raw(`help.articles.${r.id}.excerpt`),
3930
- contentMarkdown: e.raw(`help.articles.${r.id}.body`),
3931
- authors: a(t),
3932
- tags: n.map((t) => ({
3933
- _id: `demo-tag-${t}`,
3934
- slug: t,
3935
- label: e.raw(`help.tags.${t}`)
3936
- }))
3937
- }));
3938
- }
3939
- //#endregion
3940
- //#region node_modules/@radix-ui/react-slot/dist/index.mjs
3941
- var di = Symbol.for("react.lazy"), fi = H.use;
3942
- function pi(e) {
3943
- return typeof e == "object" && !!e && "then" in e;
3944
- }
3945
- function mi(e) {
3946
- return typeof e == "object" && !!e && "$$typeof" in e && e.$$typeof === di && "_payload" in e && pi(e._payload);
3947
- }
3948
- /* @__NO_SIDE_EFFECTS__ */
3949
- function hi(e) {
3950
- let t = /* @__PURE__ */ _i(e), n = H.forwardRef((e, n) => {
3951
- let { children: r, ...i } = e;
3952
- mi(r) && typeof fi == "function" && (r = fi(r._payload));
3953
- let a = H.Children.toArray(r), o = a.find(yi);
3954
- if (o) {
3955
- let e = o.props.children, r = a.map((t) => t === o ? H.Children.count(e) > 1 ? H.Children.only(null) : H.isValidElement(e) ? e.props.children : null : t);
3956
- return /* @__PURE__ */ Ke(t, {
3957
- ...i,
3958
- ref: n,
3959
- children: H.isValidElement(e) ? H.cloneElement(e, void 0, r) : null
3960
- });
3961
- }
3962
- return /* @__PURE__ */ Ke(t, {
3963
- ...i,
3964
- ref: n,
3965
- children: r
3966
- });
3967
- });
3968
- return n.displayName = `${e}.Slot`, n;
3969
- }
3970
- var gi = /* @__PURE__ */ hi("Slot");
3971
- /* @__NO_SIDE_EFFECTS__ */
3972
- function _i(e) {
3973
- let t = H.forwardRef((e, t) => {
3974
- let { children: n, ...r } = e;
3975
- if (mi(n) && typeof fi == "function" && (n = fi(n._payload)), H.isValidElement(n)) {
3976
- let e = xi(n), i = bi(r, n.props);
3977
- return n.type !== H.Fragment && (i.ref = t ? He(t, e) : e), H.cloneElement(n, i);
3978
- }
3979
- return H.Children.count(n) > 1 ? H.Children.only(null) : null;
3980
- });
3981
- return t.displayName = `${e}.SlotClone`, t;
3982
- }
3983
- var vi = Symbol("radix.slottable");
3984
- function yi(e) {
3985
- return H.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === vi;
3986
- }
3987
- function bi(e, t) {
3988
- let n = { ...t };
3989
- for (let r in t) {
3990
- let i = e[r], a = t[r];
3991
- /^on[A-Z]/.test(r) ? i && a ? n[r] = (...e) => {
3992
- let t = a(...e);
3993
- return i(...e), t;
3994
- } : i && (n[r] = i) : r === "style" ? n[r] = {
3995
- ...i,
3996
- ...a
3997
- } : r === "className" && (n[r] = [i, a].filter(Boolean).join(" "));
3998
- }
3999
- return {
4000
- ...e,
4001
- ...n
4002
- };
4003
- }
4004
- function xi(e) {
4005
- let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
4006
- return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
4007
- }
4008
- //#endregion
4009
- //#region node_modules/class-variance-authority/dist/index.mjs
4010
- var Si = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ci = Ge, wi = ((e, t) => (n) => {
4011
- if (t?.variants == null) return Ci(e, n?.class, n?.className);
4012
- let { variants: r, defaultVariants: i } = t, a = Object.keys(r).map((e) => {
4013
- let t = n?.[e], a = i?.[e];
4014
- if (t === null) return null;
4015
- let o = Si(t) || Si(a);
4016
- return r[e][o];
4017
- }), o = n && Object.entries(n).reduce((e, t) => {
4018
- let [n, r] = t;
4019
- return r === void 0 || (e[n] = r), e;
4020
- }, {});
4021
- return Ci(e, a, t?.compoundVariants?.reduce((e, t) => {
4022
- let { class: n, className: r, ...a } = t;
4023
- return Object.entries(a).every((e) => {
4024
- let [t, n] = e;
4025
- return Array.isArray(n) ? n.includes({
4026
- ...i,
4027
- ...o
4028
- }[t]) : {
4029
- ...i,
4030
- ...o
4031
- }[t] === n;
4032
- }) ? [
4033
- ...e,
4034
- n,
4035
- r
4036
- ] : e;
4037
- }, []), n?.class, n?.className);
4038
- })("inline-flex items-center justify-center gap-2 font-semibold transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary focus-visible:ring-offset-2 focus-visible:ring-offset-wx-bg disabled:pointer-events-none disabled:opacity-50", {
4039
- variants: {
4040
- variant: {
4041
- solid: "bg-wx-primary text-wx-primary-fg hover:bg-wx-primary-hover",
4042
- tonal: "bg-wx-bg-elevated text-wx-fg hover:bg-wx-bg-elevated-2",
4043
- ghost: "bg-transparent text-wx-fg-muted hover:bg-wx-bg-elevated hover:text-wx-fg",
4044
- outline: "border border-wx-border bg-transparent text-wx-fg hover:bg-wx-bg-elevated"
4045
- },
4046
- size: {
4047
- sm: "h-8 px-3 text-xs rounded-wx-sm whitespace-nowrap",
4048
- md: "h-10 px-4 text-sm rounded-wx whitespace-nowrap",
4049
- lg: "h-12 px-5 text-sm rounded-wx-lg whitespace-nowrap",
4050
- tile: "w-full px-5 py-5 text-base rounded-wx-lg",
4051
- icon: "h-9 w-9 rounded-full whitespace-nowrap"
4052
- }
4053
- },
4054
- defaultVariants: {
4055
- variant: "solid",
4056
- size: "md"
4057
- }
4058
- }), Ti = H.forwardRef(({ className: e, variant: t, size: n, asChild: r = !1, ...i }, a) => /* @__PURE__ */ Ke(r ? gi : "button", {
4059
- ref: a,
4060
- className: We(wi({
4061
- variant: t,
4062
- size: n,
4063
- className: e
4064
- })),
4065
- ...i
4066
- }));
4067
- Ti.displayName = "Button";
4068
- //#endregion
4069
- //#region lib/graphql/queries/generated/help.generated.tsx
4070
- var $ = {}, Ei = /* @__PURE__ */ function(e) {
4071
- return e.Popular = "POPULAR", e.Recent = "RECENT", e;
4072
- }({}), Di = d`
4073
- query VisitorHelpFolders($parentId: ID, $locale: String) {
4074
- visitorHelpFolders(parentId: $parentId, locale: $locale) {
4075
- _id
4076
- name
4077
- slug
4078
- description
4079
- parentId
4080
- ancestors
4081
- order
4082
- articleCount
4083
- }
4084
- }
4085
- `;
4086
- function Oi(e) {
4087
- return E(Di, {
4088
- ...$,
4089
- ...e
4090
- });
4091
- }
4092
- d`
4093
- query VisitorHelpTags($locale: String) {
4094
- visitorHelpTags(locale: $locale) {
4095
- _id
4096
- slug
4097
- label
4098
- description
4099
- }
4100
- }
4101
- `;
4102
- var ki = d`
4103
- query VisitorHelpList($args: VisitorHelpListArgs) {
4104
- visitorHelpList(args: $args) {
4105
- items {
4106
- _id
4107
- title
4108
- slug
4109
- excerpt
4110
- locale
4111
- publishedAt
4112
- order
4113
- reactionCounts
4114
- folder {
4115
- _id
4116
- name
4117
- }
4118
- tags {
4119
- _id
4120
- slug
4121
- label
4122
- }
4123
- authors {
4124
- _id
4125
- name
4126
- photo {
4127
- _id
4128
- url
4129
- }
4130
- }
4131
- coverImageUrl {
4132
- _id
4133
- url
4134
- }
4135
- }
4136
- meta {
4137
- totalCount
4138
- currentPage
4139
- totalPages
4140
- hasNextPage
4141
- hasPreviousPage
4142
- }
4143
- }
4144
- }
4145
- `;
4146
- function Ai(e) {
4147
- return E(ki, {
4148
- ...$,
4149
- ...e
4150
- });
4151
- }
4152
- var ji = d`
4153
- query VisitorHelpArticle($args: VisitorHelpArticleArgs!) {
4154
- visitorHelpArticle(args: $args) {
4155
- _id
4156
- title
4157
- slug
4158
- excerpt
4159
- content
4160
- contentFormat
4161
- locale
4162
- publishedAt
4163
- viewCount
4164
- reactionCounts
4165
- viewerReaction
4166
- folder {
4167
- _id
4168
- name
4169
- ancestors
4170
- }
4171
- ancestors
4172
- authors {
4173
- _id
4174
- name
4175
- photo {
4176
- _id
4177
- url
4178
- }
4179
- }
4180
- tags {
4181
- _id
4182
- slug
4183
- label
4184
- }
4185
- coverImageUrl {
4186
- _id
4187
- url
4188
- }
4189
- canonicalUrl
4190
- translations {
4191
- _id
4192
- locale
4193
- slug
4194
- }
4195
- }
4196
- }
4197
- `;
4198
- function Mi(e) {
4199
- return E(ji, {
4200
- ...$,
4201
- ...e
4202
- });
4203
- }
4204
- var Ni = d`
4205
- query VisitorHelpArticlesByIds($ids: [ID!]!, $locale: String) {
4206
- visitorHelpArticlesByIds(ids: $ids, locale: $locale) {
4207
- _id
4208
- title
4209
- slug
4210
- excerpt
4211
- publishedAt
4212
- coverImageUrl {
4213
- _id
4214
- url
4215
- }
4216
- }
4217
- }
4218
- `;
4219
- function Pi(e) {
4220
- return E(Ni, {
4221
- ...$,
4222
- ...e
4223
- });
4224
- }
4225
- var Fi = d`
4226
- query VisitorHelpRelated($articleId: ID!, $limit: Int, $locale: String) {
4227
- visitorHelpRelated(articleId: $articleId, limit: $limit, locale: $locale) {
4228
- _id
4229
- title
4230
- slug
4231
- excerpt
4232
- coverImageUrl {
4233
- _id
4234
- url
4235
- }
4236
- }
4237
- }
4238
- `;
4239
- function Ii(e) {
4240
- return E(Fi, {
4241
- ...$,
4242
- ...e
4243
- });
4244
- }
4245
- var Li = d`
4246
- mutation RecordVisitorHelpView($articleId: String!) {
4247
- recordVisitorHelpView(articleId: $articleId) {
4248
- ok
4249
- }
4250
- }
4251
- `;
4252
- function Ri(e) {
4253
- return b(Li, {
4254
- ...$,
4255
- ...e
4256
- });
4257
- }
4258
- var zi = d`
4259
- query VisitorHelpListSlim($args: VisitorHelpListArgs) {
4260
- visitorHelpList(args: $args) {
4261
- items {
4262
- _id
4263
- title
4264
- slug
4265
- }
4266
- }
4267
- }
4268
- `;
4269
- function Bi(e) {
4270
- return E(zi, {
4271
- ...$,
4272
- ...e
4273
- });
4274
- }
4275
- var Vi = d`
4276
- query VisitorHelpArticlesByIdsSlim($ids: [ID!]!, $locale: String) {
4277
- visitorHelpArticlesByIds(ids: $ids, locale: $locale) {
4278
- _id
4279
- title
4280
- slug
4281
- }
4282
- }
4283
- `;
4284
- function Hi(e) {
4285
- return E(Vi, {
4286
- ...$,
4287
- ...e
4288
- });
4289
- }
4290
- //#endregion
4291
- export { ti as _, Hi as a, Xr as b, Bi as c, hi as d, ui as f, Zr as g, ii as h, Pi as i, Ii as l, oi as m, Ri as n, Oi as o, ci as p, Mi as r, Ai as s, Ei as t, Ti as u, $r as v, ri as y };
4292
-
4293
- //# sourceMappingURL=widget-react-DmQP1bcj.js.map