@ticketapp-dev/shop-sdk 1.0.42 → 1.0.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1068 -1707
- package/dist/services/metric/metric.service.d.ts.map +1 -1
- package/dist/services/payment/payment.service.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/__vite-browser-external-l0sNRNKZ.js +0 -1
- package/dist/utils/persisted-query/persisted-query-client.d.ts +0 -5
- package/dist/utils/persisted-query/persisted-query-client.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,101 +1,101 @@
|
|
|
1
|
-
import { GraphQLClient as
|
|
2
|
-
import { DateTime as
|
|
3
|
-
var
|
|
4
|
-
const
|
|
1
|
+
import { GraphQLClient as v } from "graphql-request";
|
|
2
|
+
import { DateTime as A } from "luxon";
|
|
3
|
+
var T = /* @__PURE__ */ ((t) => (t.PACKAGE = "PACKAGE", t.PRODUCT = "PRODUCT", t.ADD_ONS = "ADD_ONS", t.DELIVERY = "DELIVERY", t.PICKUP = "PICKUP", t))(T || {}), R = /* @__PURE__ */ ((t) => (t.AdditionalEvent = "ADDITIONAL_EVENT", t.Addon = "ADDON", t.Regular = "REGULAR", t))(R || {}), K = /* @__PURE__ */ ((t) => (t.Active = "ACTIVE", t.Concept = "CONCEPT", t.Paused = "PAUSED", t.SoldOut = "SOLD_OUT", t))(K || {}), ee = /* @__PURE__ */ ((t) => (t.Active = "ACTIVE", t.Inactive = "INACTIVE", t))(ee || {}), te = /* @__PURE__ */ ((t) => (t.Active = "ACTIVE", t.Inactive = "INACTIVE", t.Paused = "PAUSED", t.SoldOut = "SOLD_OUT", t))(te || {}), ne = /* @__PURE__ */ ((t) => (t.Asc = "ASC", t.Desc = "DESC", t))(ne || {}), ie = /* @__PURE__ */ ((t) => (t.AllReserved = "ALL_RESERVED", t.Available = "AVAILABLE", t.SoldOut = "SOLD_OUT", t))(ie || {}), re = /* @__PURE__ */ ((t) => (t.Addon = "ADDON", t.Delivery = "DELIVERY", t.Door = "DOOR", t.Friend = "FRIEND", t.Guest = "GUEST", t.Pickup = "PICKUP", t.Promoter = "PROMOTER", t.Ticket = "TICKET", t))(re || {}), se = /* @__PURE__ */ ((t) => (t.FIXED = "FIXED", t.PERCENTAGE = "PERCENTAGE", t))(se || {}), ae = /* @__PURE__ */ ((t) => (t.AddOn = "ADD_ON", t.DeliveryOption = "DELIVERY_OPTION", t.EntranceTicket = "ENTRANCE_TICKET", t))(ae || {}), oe = /* @__PURE__ */ ((t) => (t.Fixed = "FIXED", t.Percentage = "PERCENTAGE", t))(oe || {}), w = /* @__PURE__ */ ((t) => (t.Event = "EVENT", t.Package = "PACKAGE", t))(w || {});
|
|
4
|
+
const Te = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5
5
|
__proto__: null,
|
|
6
|
-
BasketOrderType:
|
|
7
|
-
DiscountType:
|
|
8
|
-
EventStatus:
|
|
9
|
-
MetricsType:
|
|
10
|
-
OrderItemType:
|
|
11
|
-
PackageItemType:
|
|
12
|
-
PackageStatus:
|
|
13
|
-
PackageTabType:
|
|
14
|
-
PaymentMethodFeeType:
|
|
15
|
-
ProductStatus:
|
|
16
|
-
ProductType:
|
|
17
|
-
SortOrder:
|
|
6
|
+
BasketOrderType: T,
|
|
7
|
+
DiscountType: oe,
|
|
8
|
+
EventStatus: te,
|
|
9
|
+
MetricsType: w,
|
|
10
|
+
OrderItemType: ae,
|
|
11
|
+
PackageItemType: R,
|
|
12
|
+
PackageStatus: K,
|
|
13
|
+
PackageTabType: ee,
|
|
14
|
+
PaymentMethodFeeType: se,
|
|
15
|
+
ProductStatus: ie,
|
|
16
|
+
ProductType: re,
|
|
17
|
+
SortOrder: ne
|
|
18
18
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
19
|
-
var
|
|
20
|
-
return
|
|
21
|
-
for (var
|
|
22
|
-
|
|
23
|
-
for (var s in
|
|
19
|
+
var F = function() {
|
|
20
|
+
return F = Object.assign || function(n) {
|
|
21
|
+
for (var e, i = 1, r = arguments.length; i < r; i++) {
|
|
22
|
+
e = arguments[i];
|
|
23
|
+
for (var s in e) Object.prototype.hasOwnProperty.call(e, s) && (n[s] = e[s]);
|
|
24
24
|
}
|
|
25
|
-
return
|
|
26
|
-
},
|
|
25
|
+
return n;
|
|
26
|
+
}, F.apply(this, arguments);
|
|
27
27
|
};
|
|
28
|
-
function
|
|
29
|
-
if (!!!
|
|
30
|
-
throw new Error(
|
|
28
|
+
function U(t, n) {
|
|
29
|
+
if (!!!t)
|
|
30
|
+
throw new Error(n);
|
|
31
31
|
}
|
|
32
|
-
function
|
|
33
|
-
return typeof
|
|
32
|
+
function Ae(t) {
|
|
33
|
+
return typeof t == "object" && t !== null;
|
|
34
34
|
}
|
|
35
|
-
function
|
|
36
|
-
if (!!!
|
|
35
|
+
function Ne(t, n) {
|
|
36
|
+
if (!!!t)
|
|
37
37
|
throw new Error(
|
|
38
38
|
"Unexpected invariant triggered."
|
|
39
39
|
);
|
|
40
40
|
}
|
|
41
|
-
const
|
|
42
|
-
function
|
|
43
|
-
let
|
|
44
|
-
for (const r of
|
|
45
|
-
if (typeof r.index == "number" ||
|
|
41
|
+
const De = /\r\n|[\n\r]/g;
|
|
42
|
+
function z(t, n) {
|
|
43
|
+
let e = 0, i = 1;
|
|
44
|
+
for (const r of t.body.matchAll(De)) {
|
|
45
|
+
if (typeof r.index == "number" || Ne(!1), r.index >= n)
|
|
46
46
|
break;
|
|
47
|
-
|
|
47
|
+
e = r.index + r[0].length, i += 1;
|
|
48
48
|
}
|
|
49
49
|
return {
|
|
50
50
|
line: i,
|
|
51
|
-
column:
|
|
51
|
+
column: n + 1 - e
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
|
-
function
|
|
55
|
-
return
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
function ve(t) {
|
|
55
|
+
return ce(
|
|
56
|
+
t.source,
|
|
57
|
+
z(t.source, t.start)
|
|
58
58
|
);
|
|
59
59
|
}
|
|
60
|
-
function
|
|
61
|
-
const
|
|
62
|
-
`,
|
|
60
|
+
function ce(t, n) {
|
|
61
|
+
const e = t.locationOffset.column - 1, i = "".padStart(e) + t.body, r = n.line - 1, s = t.locationOffset.line - 1, o = n.line + s, u = n.line === 1 ? e : 0, h = n.column + u, E = `${t.name}:${o}:${h}
|
|
62
|
+
`, m = i.split(/\r\n|[\n\r]/g), d = m[r];
|
|
63
63
|
if (d.length > 120) {
|
|
64
|
-
const
|
|
65
|
-
for (let
|
|
66
|
-
|
|
67
|
-
return
|
|
68
|
-
[`${o} |`,
|
|
69
|
-
...
|
|
64
|
+
const f = Math.floor(h / 80), y = h % 80, p = [];
|
|
65
|
+
for (let O = 0; O < d.length; O += 80)
|
|
66
|
+
p.push(d.slice(O, O + 80));
|
|
67
|
+
return E + Q([
|
|
68
|
+
[`${o} |`, p[0]],
|
|
69
|
+
...p.slice(1, f + 1).map((O) => ["|", O]),
|
|
70
70
|
["|", "^".padStart(y)],
|
|
71
|
-
["|",
|
|
71
|
+
["|", p[f + 1]]
|
|
72
72
|
]);
|
|
73
73
|
}
|
|
74
|
-
return
|
|
74
|
+
return E + Q([
|
|
75
75
|
// Lines specified like this: ["prefix", "string"],
|
|
76
|
-
[`${o - 1} |`,
|
|
76
|
+
[`${o - 1} |`, m[r - 1]],
|
|
77
77
|
[`${o} |`, d],
|
|
78
|
-
["|", "^".padStart(
|
|
79
|
-
[`${o + 1} |`,
|
|
78
|
+
["|", "^".padStart(h)],
|
|
79
|
+
[`${o + 1} |`, m[r + 1]]
|
|
80
80
|
]);
|
|
81
81
|
}
|
|
82
|
-
function
|
|
83
|
-
const
|
|
84
|
-
return
|
|
82
|
+
function Q(t) {
|
|
83
|
+
const n = t.filter(([i, r]) => r !== void 0), e = Math.max(...n.map(([i]) => i.length));
|
|
84
|
+
return n.map(([i, r]) => i.padStart(e) + (r ? " " + r : "")).join(`
|
|
85
85
|
`);
|
|
86
86
|
}
|
|
87
|
-
function
|
|
88
|
-
const
|
|
89
|
-
return
|
|
90
|
-
nodes:
|
|
91
|
-
source:
|
|
92
|
-
positions:
|
|
93
|
-
path:
|
|
94
|
-
originalError:
|
|
95
|
-
extensions:
|
|
96
|
-
} :
|
|
87
|
+
function Pe(t) {
|
|
88
|
+
const n = t[0];
|
|
89
|
+
return n == null || "kind" in n || "length" in n ? {
|
|
90
|
+
nodes: n,
|
|
91
|
+
source: t[1],
|
|
92
|
+
positions: t[2],
|
|
93
|
+
path: t[3],
|
|
94
|
+
originalError: t[4],
|
|
95
|
+
extensions: t[5]
|
|
96
|
+
} : n;
|
|
97
97
|
}
|
|
98
|
-
class
|
|
98
|
+
class j extends Error {
|
|
99
99
|
/**
|
|
100
100
|
* An array of `{ line, column }` locations within the source GraphQL document
|
|
101
101
|
* which correspond to this error.
|
|
@@ -134,19 +134,19 @@ class ce extends Error {
|
|
|
134
134
|
/**
|
|
135
135
|
* @deprecated Please use the `GraphQLErrorOptions` constructor overload instead.
|
|
136
136
|
*/
|
|
137
|
-
constructor(
|
|
137
|
+
constructor(n, ...e) {
|
|
138
138
|
var i, r, s;
|
|
139
|
-
const { nodes: o, source:
|
|
140
|
-
super(
|
|
139
|
+
const { nodes: o, source: u, positions: h, path: E, originalError: m, extensions: d } = Pe(e);
|
|
140
|
+
super(n), this.name = "GraphQLError", this.path = E ?? void 0, this.originalError = m ?? void 0, this.nodes = X(
|
|
141
141
|
Array.isArray(o) ? o : o ? [o] : void 0
|
|
142
142
|
);
|
|
143
|
-
const
|
|
144
|
-
(i = this.nodes) === null || i === void 0 ? void 0 : i.map((
|
|
143
|
+
const f = X(
|
|
144
|
+
(i = this.nodes) === null || i === void 0 ? void 0 : i.map((p) => p.loc).filter((p) => p != null)
|
|
145
145
|
);
|
|
146
|
-
this.source =
|
|
147
|
-
const y =
|
|
148
|
-
|
|
149
|
-
) ?
|
|
146
|
+
this.source = u ?? (f == null || (r = f[0]) === null || r === void 0 ? void 0 : r.source), this.positions = h ?? f?.map((p) => p.start), this.locations = h && u ? h.map((p) => z(u, p)) : f?.map((p) => z(p.source, p.start));
|
|
147
|
+
const y = Ae(
|
|
148
|
+
m?.extensions
|
|
149
|
+
) ? m?.extensions : void 0;
|
|
150
150
|
this.extensions = (s = d ?? y) !== null && s !== void 0 ? s : /* @__PURE__ */ Object.create(null), Object.defineProperties(this, {
|
|
151
151
|
message: {
|
|
152
152
|
writable: !0,
|
|
@@ -167,11 +167,11 @@ class ce extends Error {
|
|
|
167
167
|
originalError: {
|
|
168
168
|
enumerable: !1
|
|
169
169
|
}
|
|
170
|
-
}),
|
|
171
|
-
value:
|
|
170
|
+
}), m != null && m.stack ? Object.defineProperty(this, "stack", {
|
|
171
|
+
value: m.stack,
|
|
172
172
|
writable: !0,
|
|
173
173
|
configurable: !0
|
|
174
|
-
}) : Error.captureStackTrace ? Error.captureStackTrace(this,
|
|
174
|
+
}) : Error.captureStackTrace ? Error.captureStackTrace(this, j) : Object.defineProperty(this, "stack", {
|
|
175
175
|
value: Error().stack,
|
|
176
176
|
writable: !0,
|
|
177
177
|
configurable: !0
|
|
@@ -181,36 +181,36 @@ class ce extends Error {
|
|
|
181
181
|
return "GraphQLError";
|
|
182
182
|
}
|
|
183
183
|
toString() {
|
|
184
|
-
let
|
|
184
|
+
let n = this.message;
|
|
185
185
|
if (this.nodes)
|
|
186
|
-
for (const
|
|
187
|
-
|
|
186
|
+
for (const e of this.nodes)
|
|
187
|
+
e.loc && (n += `
|
|
188
188
|
|
|
189
|
-
` +
|
|
189
|
+
` + ve(e.loc));
|
|
190
190
|
else if (this.source && this.locations)
|
|
191
|
-
for (const
|
|
192
|
-
|
|
191
|
+
for (const e of this.locations)
|
|
192
|
+
n += `
|
|
193
193
|
|
|
194
|
-
` +
|
|
195
|
-
return
|
|
194
|
+
` + ce(this.source, e);
|
|
195
|
+
return n;
|
|
196
196
|
}
|
|
197
197
|
toJSON() {
|
|
198
|
-
const
|
|
198
|
+
const n = {
|
|
199
199
|
message: this.message
|
|
200
200
|
};
|
|
201
|
-
return this.locations != null && (
|
|
201
|
+
return this.locations != null && (n.locations = this.locations), this.path != null && (n.path = this.path), this.extensions != null && Object.keys(this.extensions).length > 0 && (n.extensions = this.extensions), n;
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
|
-
function
|
|
205
|
-
return
|
|
204
|
+
function X(t) {
|
|
205
|
+
return t === void 0 || t.length === 0 ? void 0 : t;
|
|
206
206
|
}
|
|
207
|
-
function
|
|
208
|
-
return new
|
|
209
|
-
source:
|
|
210
|
-
positions: [
|
|
207
|
+
function I(t, n, e) {
|
|
208
|
+
return new j(`Syntax Error: ${e}`, {
|
|
209
|
+
source: t,
|
|
210
|
+
positions: [n]
|
|
211
211
|
});
|
|
212
212
|
}
|
|
213
|
-
class
|
|
213
|
+
class xe {
|
|
214
214
|
/**
|
|
215
215
|
* The character offset at which this Node begins.
|
|
216
216
|
*/
|
|
@@ -226,8 +226,8 @@ class Ye {
|
|
|
226
226
|
/**
|
|
227
227
|
* The Source document the AST represents.
|
|
228
228
|
*/
|
|
229
|
-
constructor(
|
|
230
|
-
this.start =
|
|
229
|
+
constructor(n, e, i) {
|
|
230
|
+
this.start = n.start, this.end = e.end, this.startToken = n, this.endToken = e, this.source = i;
|
|
231
231
|
}
|
|
232
232
|
get [Symbol.toStringTag]() {
|
|
233
233
|
return "Location";
|
|
@@ -239,7 +239,7 @@ class Ye {
|
|
|
239
239
|
};
|
|
240
240
|
}
|
|
241
241
|
}
|
|
242
|
-
class
|
|
242
|
+
class de {
|
|
243
243
|
/**
|
|
244
244
|
* The kind of Token.
|
|
245
245
|
*/
|
|
@@ -266,8 +266,8 @@ class be {
|
|
|
266
266
|
* including ignored tokens. <SOF> is always the first node and <EOF>
|
|
267
267
|
* the last.
|
|
268
268
|
*/
|
|
269
|
-
constructor(
|
|
270
|
-
this.kind =
|
|
269
|
+
constructor(n, e, i, r, s, o) {
|
|
270
|
+
this.kind = n, this.start = e, this.end = i, this.line = r, this.column = s, this.value = o, this.prev = null, this.next = null;
|
|
271
271
|
}
|
|
272
272
|
get [Symbol.toStringTag]() {
|
|
273
273
|
return "Token";
|
|
@@ -281,7 +281,7 @@ class be {
|
|
|
281
281
|
};
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
|
-
const
|
|
284
|
+
const be = {
|
|
285
285
|
Name: [],
|
|
286
286
|
Document: ["definitions"],
|
|
287
287
|
OperationDefinition: [
|
|
@@ -368,74 +368,60 @@ const Pe = {
|
|
|
368
368
|
ArgumentCoordinate: ["name", "fieldName", "argumentName"],
|
|
369
369
|
DirectiveCoordinate: ["name"],
|
|
370
370
|
DirectiveArgumentCoordinate: ["name", "argumentName"]
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
}
|
|
388
|
-
function
|
|
389
|
-
return
|
|
390
|
-
}
|
|
391
|
-
function
|
|
392
|
-
return
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
}
|
|
398
|
-
function Ce(
|
|
399
|
-
return
|
|
400
|
-
}
|
|
401
|
-
function
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
var t;
|
|
406
|
-
let n = Number.MAX_SAFE_INTEGER, i = null, r = -1;
|
|
407
|
-
for (let o = 0; o < e.length; ++o) {
|
|
371
|
+
};
|
|
372
|
+
new Set(Object.keys(be));
|
|
373
|
+
var D;
|
|
374
|
+
(function(t) {
|
|
375
|
+
t.QUERY = "query", t.MUTATION = "mutation", t.SUBSCRIPTION = "subscription";
|
|
376
|
+
})(D || (D = {}));
|
|
377
|
+
var q;
|
|
378
|
+
(function(t) {
|
|
379
|
+
t.QUERY = "QUERY", t.MUTATION = "MUTATION", t.SUBSCRIPTION = "SUBSCRIPTION", t.FIELD = "FIELD", t.FRAGMENT_DEFINITION = "FRAGMENT_DEFINITION", t.FRAGMENT_SPREAD = "FRAGMENT_SPREAD", t.INLINE_FRAGMENT = "INLINE_FRAGMENT", t.VARIABLE_DEFINITION = "VARIABLE_DEFINITION", t.SCHEMA = "SCHEMA", t.SCALAR = "SCALAR", t.OBJECT = "OBJECT", t.FIELD_DEFINITION = "FIELD_DEFINITION", t.ARGUMENT_DEFINITION = "ARGUMENT_DEFINITION", t.INTERFACE = "INTERFACE", t.UNION = "UNION", t.ENUM = "ENUM", t.ENUM_VALUE = "ENUM_VALUE", t.INPUT_OBJECT = "INPUT_OBJECT", t.INPUT_FIELD_DEFINITION = "INPUT_FIELD_DEFINITION";
|
|
380
|
+
})(q || (q = {}));
|
|
381
|
+
var c;
|
|
382
|
+
(function(t) {
|
|
383
|
+
t.NAME = "Name", t.DOCUMENT = "Document", t.OPERATION_DEFINITION = "OperationDefinition", t.VARIABLE_DEFINITION = "VariableDefinition", t.SELECTION_SET = "SelectionSet", t.FIELD = "Field", t.ARGUMENT = "Argument", t.FRAGMENT_SPREAD = "FragmentSpread", t.INLINE_FRAGMENT = "InlineFragment", t.FRAGMENT_DEFINITION = "FragmentDefinition", t.VARIABLE = "Variable", t.INT = "IntValue", t.FLOAT = "FloatValue", t.STRING = "StringValue", t.BOOLEAN = "BooleanValue", t.NULL = "NullValue", t.ENUM = "EnumValue", t.LIST = "ListValue", t.OBJECT = "ObjectValue", t.OBJECT_FIELD = "ObjectField", t.DIRECTIVE = "Directive", t.NAMED_TYPE = "NamedType", t.LIST_TYPE = "ListType", t.NON_NULL_TYPE = "NonNullType", t.SCHEMA_DEFINITION = "SchemaDefinition", t.OPERATION_TYPE_DEFINITION = "OperationTypeDefinition", t.SCALAR_TYPE_DEFINITION = "ScalarTypeDefinition", t.OBJECT_TYPE_DEFINITION = "ObjectTypeDefinition", t.FIELD_DEFINITION = "FieldDefinition", t.INPUT_VALUE_DEFINITION = "InputValueDefinition", t.INTERFACE_TYPE_DEFINITION = "InterfaceTypeDefinition", t.UNION_TYPE_DEFINITION = "UnionTypeDefinition", t.ENUM_TYPE_DEFINITION = "EnumTypeDefinition", t.ENUM_VALUE_DEFINITION = "EnumValueDefinition", t.INPUT_OBJECT_TYPE_DEFINITION = "InputObjectTypeDefinition", t.DIRECTIVE_DEFINITION = "DirectiveDefinition", t.SCHEMA_EXTENSION = "SchemaExtension", t.SCALAR_TYPE_EXTENSION = "ScalarTypeExtension", t.OBJECT_TYPE_EXTENSION = "ObjectTypeExtension", t.INTERFACE_TYPE_EXTENSION = "InterfaceTypeExtension", t.UNION_TYPE_EXTENSION = "UnionTypeExtension", t.ENUM_TYPE_EXTENSION = "EnumTypeExtension", t.INPUT_OBJECT_TYPE_EXTENSION = "InputObjectTypeExtension", t.TYPE_COORDINATE = "TypeCoordinate", t.MEMBER_COORDINATE = "MemberCoordinate", t.ARGUMENT_COORDINATE = "ArgumentCoordinate", t.DIRECTIVE_COORDINATE = "DirectiveCoordinate", t.DIRECTIVE_ARGUMENT_COORDINATE = "DirectiveArgumentCoordinate";
|
|
384
|
+
})(c || (c = {}));
|
|
385
|
+
function Se(t) {
|
|
386
|
+
return t === 9 || t === 32;
|
|
387
|
+
}
|
|
388
|
+
function S(t) {
|
|
389
|
+
return t >= 48 && t <= 57;
|
|
390
|
+
}
|
|
391
|
+
function ue(t) {
|
|
392
|
+
return t >= 97 && t <= 122 || // A-Z
|
|
393
|
+
t >= 65 && t <= 90;
|
|
394
|
+
}
|
|
395
|
+
function le(t) {
|
|
396
|
+
return ue(t) || t === 95;
|
|
397
|
+
}
|
|
398
|
+
function Ce(t) {
|
|
399
|
+
return ue(t) || S(t) || t === 95;
|
|
400
|
+
}
|
|
401
|
+
function _e(t) {
|
|
402
|
+
var n;
|
|
403
|
+
let e = Number.MAX_SAFE_INTEGER, i = null, r = -1;
|
|
404
|
+
for (let o = 0; o < t.length; ++o) {
|
|
408
405
|
var s;
|
|
409
|
-
const
|
|
410
|
-
|
|
406
|
+
const u = t[o], h = Le(u);
|
|
407
|
+
h !== u.length && (i = (s = i) !== null && s !== void 0 ? s : o, r = o, o !== 0 && h < e && (e = h));
|
|
411
408
|
}
|
|
412
|
-
return
|
|
413
|
-
(
|
|
409
|
+
return t.map((o, u) => u === 0 ? o : o.slice(e)).slice(
|
|
410
|
+
(n = i) !== null && n !== void 0 ? n : 0,
|
|
414
411
|
r + 1
|
|
415
412
|
);
|
|
416
413
|
}
|
|
417
|
-
function
|
|
418
|
-
let
|
|
419
|
-
for (;
|
|
420
|
-
++
|
|
421
|
-
return
|
|
422
|
-
}
|
|
423
|
-
function We(e, t) {
|
|
424
|
-
const n = e.replace(/"""/g, '\\"""'), i = n.split(/\r\n|[\n\r]/g), r = i.length === 1, s = i.length > 1 && i.slice(1).every((y) => y.length === 0 || se(y.charCodeAt(0))), o = n.endsWith('\\"""'), p = e.endsWith('"') && !o, f = e.endsWith("\\"), l = p || f, g = (
|
|
425
|
-
// add leading and trailing new lines only if it improves readability
|
|
426
|
-
!r || e.length > 70 || l || s || o
|
|
427
|
-
);
|
|
428
|
-
let d = "";
|
|
429
|
-
const m = r && se(e.charCodeAt(0));
|
|
430
|
-
return (g && !m || s) && (d += `
|
|
431
|
-
`), d += n, (g || l) && (d += `
|
|
432
|
-
`), '"""' + d + '"""';
|
|
414
|
+
function Le(t) {
|
|
415
|
+
let n = 0;
|
|
416
|
+
for (; n < t.length && Se(t.charCodeAt(n)); )
|
|
417
|
+
++n;
|
|
418
|
+
return n;
|
|
433
419
|
}
|
|
434
420
|
var a;
|
|
435
|
-
(function(
|
|
436
|
-
|
|
421
|
+
(function(t) {
|
|
422
|
+
t.SOF = "<SOF>", t.EOF = "<EOF>", t.BANG = "!", t.DOLLAR = "$", t.AMP = "&", t.PAREN_L = "(", t.PAREN_R = ")", t.DOT = ".", t.SPREAD = "...", t.COLON = ":", t.EQUALS = "=", t.AT = "@", t.BRACKET_L = "[", t.BRACKET_R = "]", t.BRACE_L = "{", t.PIPE = "|", t.BRACE_R = "}", t.NAME = "Name", t.INT = "Int", t.FLOAT = "Float", t.STRING = "String", t.BLOCK_STRING = "BlockString", t.COMMENT = "Comment";
|
|
437
423
|
})(a || (a = {}));
|
|
438
|
-
class
|
|
424
|
+
class Re {
|
|
439
425
|
/**
|
|
440
426
|
* The previously focused non-ignored token.
|
|
441
427
|
*/
|
|
@@ -448,9 +434,9 @@ class Ze {
|
|
|
448
434
|
/**
|
|
449
435
|
* The character offset at which the current line begins.
|
|
450
436
|
*/
|
|
451
|
-
constructor(
|
|
452
|
-
const
|
|
453
|
-
this.source =
|
|
437
|
+
constructor(n) {
|
|
438
|
+
const e = new de(a.SOF, 0, 0, 0, 0);
|
|
439
|
+
this.source = n, this.lastToken = e, this.token = e, this.line = 1, this.lineStart = 0;
|
|
454
440
|
}
|
|
455
441
|
get [Symbol.toStringTag]() {
|
|
456
442
|
return "Lexer";
|
|
@@ -466,53 +452,53 @@ class Ze {
|
|
|
466
452
|
* the state of Lexer.
|
|
467
453
|
*/
|
|
468
454
|
lookahead() {
|
|
469
|
-
let
|
|
470
|
-
if (
|
|
455
|
+
let n = this.token;
|
|
456
|
+
if (n.kind !== a.EOF)
|
|
471
457
|
do
|
|
472
|
-
if (
|
|
473
|
-
|
|
458
|
+
if (n.next)
|
|
459
|
+
n = n.next;
|
|
474
460
|
else {
|
|
475
|
-
const
|
|
476
|
-
|
|
461
|
+
const e = Fe(this, n.end);
|
|
462
|
+
n.next = e, e.prev = n, n = e;
|
|
477
463
|
}
|
|
478
|
-
while (
|
|
479
|
-
return
|
|
464
|
+
while (n.kind === a.COMMENT);
|
|
465
|
+
return n;
|
|
480
466
|
}
|
|
481
467
|
}
|
|
482
|
-
function
|
|
483
|
-
return
|
|
468
|
+
function we(t) {
|
|
469
|
+
return t === a.BANG || t === a.DOLLAR || t === a.AMP || t === a.PAREN_L || t === a.PAREN_R || t === a.DOT || t === a.SPREAD || t === a.COLON || t === a.EQUALS || t === a.AT || t === a.BRACKET_L || t === a.BRACKET_R || t === a.BRACE_L || t === a.PIPE || t === a.BRACE_R;
|
|
484
470
|
}
|
|
485
|
-
function
|
|
486
|
-
return
|
|
471
|
+
function P(t) {
|
|
472
|
+
return t >= 0 && t <= 55295 || t >= 57344 && t <= 1114111;
|
|
487
473
|
}
|
|
488
|
-
function
|
|
489
|
-
return
|
|
474
|
+
function B(t, n) {
|
|
475
|
+
return he(t.charCodeAt(n)) && pe(t.charCodeAt(n + 1));
|
|
490
476
|
}
|
|
491
|
-
function
|
|
492
|
-
return
|
|
477
|
+
function he(t) {
|
|
478
|
+
return t >= 55296 && t <= 56319;
|
|
493
479
|
}
|
|
494
|
-
function
|
|
495
|
-
return
|
|
480
|
+
function pe(t) {
|
|
481
|
+
return t >= 56320 && t <= 57343;
|
|
496
482
|
}
|
|
497
|
-
function
|
|
498
|
-
const
|
|
499
|
-
if (
|
|
483
|
+
function N(t, n) {
|
|
484
|
+
const e = t.source.body.codePointAt(n);
|
|
485
|
+
if (e === void 0)
|
|
500
486
|
return a.EOF;
|
|
501
|
-
if (
|
|
502
|
-
const i = String.fromCodePoint(
|
|
487
|
+
if (e >= 32 && e <= 126) {
|
|
488
|
+
const i = String.fromCodePoint(e);
|
|
503
489
|
return i === '"' ? `'"'` : `"${i}"`;
|
|
504
490
|
}
|
|
505
|
-
return "U+" +
|
|
491
|
+
return "U+" + e.toString(16).toUpperCase().padStart(4, "0");
|
|
506
492
|
}
|
|
507
|
-
function
|
|
508
|
-
const s =
|
|
509
|
-
return new
|
|
493
|
+
function g(t, n, e, i, r) {
|
|
494
|
+
const s = t.line, o = 1 + e - t.lineStart;
|
|
495
|
+
return new de(n, e, i, s, o, r);
|
|
510
496
|
}
|
|
511
|
-
function
|
|
512
|
-
const
|
|
513
|
-
let r =
|
|
497
|
+
function Fe(t, n) {
|
|
498
|
+
const e = t.source.body, i = e.length;
|
|
499
|
+
let r = n;
|
|
514
500
|
for (; r < i; ) {
|
|
515
|
-
const s =
|
|
501
|
+
const s = e.charCodeAt(r);
|
|
516
502
|
switch (s) {
|
|
517
503
|
// Ignored ::
|
|
518
504
|
// - UnicodeBOM
|
|
@@ -542,14 +528,14 @@ function et(e, t) {
|
|
|
542
528
|
// - "Carriage Return (U+000D)" [lookahead != "New Line (U+000A)"]
|
|
543
529
|
// - "Carriage Return (U+000D)" "New Line (U+000A)"
|
|
544
530
|
case 10:
|
|
545
|
-
++r, ++
|
|
531
|
+
++r, ++t.line, t.lineStart = r;
|
|
546
532
|
continue;
|
|
547
533
|
case 13:
|
|
548
|
-
|
|
534
|
+
e.charCodeAt(r + 1) === 10 ? r += 2 : ++r, ++t.line, t.lineStart = r;
|
|
549
535
|
continue;
|
|
550
536
|
// Comment
|
|
551
537
|
case 35:
|
|
552
|
-
return
|
|
538
|
+
return $e(t, r);
|
|
553
539
|
// Token ::
|
|
554
540
|
// - Punctuator
|
|
555
541
|
// - Name
|
|
@@ -559,207 +545,207 @@ function et(e, t) {
|
|
|
559
545
|
//
|
|
560
546
|
// Punctuator :: one of ! $ & ( ) ... : = @ [ ] { | }
|
|
561
547
|
case 33:
|
|
562
|
-
return
|
|
548
|
+
return g(t, a.BANG, r, r + 1);
|
|
563
549
|
case 36:
|
|
564
|
-
return
|
|
550
|
+
return g(t, a.DOLLAR, r, r + 1);
|
|
565
551
|
case 38:
|
|
566
|
-
return
|
|
552
|
+
return g(t, a.AMP, r, r + 1);
|
|
567
553
|
case 40:
|
|
568
|
-
return
|
|
554
|
+
return g(t, a.PAREN_L, r, r + 1);
|
|
569
555
|
case 41:
|
|
570
|
-
return
|
|
556
|
+
return g(t, a.PAREN_R, r, r + 1);
|
|
571
557
|
case 46:
|
|
572
|
-
if (
|
|
573
|
-
return
|
|
558
|
+
if (e.charCodeAt(r + 1) === 46 && e.charCodeAt(r + 2) === 46)
|
|
559
|
+
return g(t, a.SPREAD, r, r + 3);
|
|
574
560
|
break;
|
|
575
561
|
case 58:
|
|
576
|
-
return
|
|
562
|
+
return g(t, a.COLON, r, r + 1);
|
|
577
563
|
case 61:
|
|
578
|
-
return
|
|
564
|
+
return g(t, a.EQUALS, r, r + 1);
|
|
579
565
|
case 64:
|
|
580
|
-
return
|
|
566
|
+
return g(t, a.AT, r, r + 1);
|
|
581
567
|
case 91:
|
|
582
|
-
return
|
|
568
|
+
return g(t, a.BRACKET_L, r, r + 1);
|
|
583
569
|
case 93:
|
|
584
|
-
return
|
|
570
|
+
return g(t, a.BRACKET_R, r, r + 1);
|
|
585
571
|
case 123:
|
|
586
|
-
return
|
|
572
|
+
return g(t, a.BRACE_L, r, r + 1);
|
|
587
573
|
case 124:
|
|
588
|
-
return
|
|
574
|
+
return g(t, a.PIPE, r, r + 1);
|
|
589
575
|
case 125:
|
|
590
|
-
return
|
|
576
|
+
return g(t, a.BRACE_R, r, r + 1);
|
|
591
577
|
// StringValue
|
|
592
578
|
case 34:
|
|
593
|
-
return
|
|
579
|
+
return e.charCodeAt(r + 1) === 34 && e.charCodeAt(r + 2) === 34 ? qe(t, r) : Ve(t, r);
|
|
594
580
|
}
|
|
595
|
-
if (
|
|
596
|
-
return
|
|
597
|
-
if (
|
|
598
|
-
return
|
|
599
|
-
throw
|
|
600
|
-
|
|
581
|
+
if (S(s) || s === 45)
|
|
582
|
+
return Be(t, r, s);
|
|
583
|
+
if (le(s))
|
|
584
|
+
return Ge(t, r);
|
|
585
|
+
throw I(
|
|
586
|
+
t.source,
|
|
601
587
|
r,
|
|
602
|
-
s === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` :
|
|
588
|
+
s === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : P(s) || B(e, r) ? `Unexpected character: ${N(t, r)}.` : `Invalid character: ${N(t, r)}.`
|
|
603
589
|
);
|
|
604
590
|
}
|
|
605
|
-
return
|
|
591
|
+
return g(t, a.EOF, i, i);
|
|
606
592
|
}
|
|
607
|
-
function
|
|
608
|
-
const
|
|
609
|
-
let r =
|
|
593
|
+
function $e(t, n) {
|
|
594
|
+
const e = t.source.body, i = e.length;
|
|
595
|
+
let r = n + 1;
|
|
610
596
|
for (; r < i; ) {
|
|
611
|
-
const s =
|
|
597
|
+
const s = e.charCodeAt(r);
|
|
612
598
|
if (s === 10 || s === 13)
|
|
613
599
|
break;
|
|
614
|
-
if (
|
|
600
|
+
if (P(s))
|
|
615
601
|
++r;
|
|
616
|
-
else if (
|
|
602
|
+
else if (B(e, r))
|
|
617
603
|
r += 2;
|
|
618
604
|
else
|
|
619
605
|
break;
|
|
620
606
|
}
|
|
621
|
-
return
|
|
622
|
-
e,
|
|
623
|
-
a.COMMENT,
|
|
607
|
+
return g(
|
|
624
608
|
t,
|
|
609
|
+
a.COMMENT,
|
|
610
|
+
n,
|
|
625
611
|
r,
|
|
626
|
-
|
|
612
|
+
e.slice(n + 1, r)
|
|
627
613
|
);
|
|
628
614
|
}
|
|
629
|
-
function
|
|
630
|
-
const i =
|
|
631
|
-
let r =
|
|
615
|
+
function Be(t, n, e) {
|
|
616
|
+
const i = t.source.body;
|
|
617
|
+
let r = n, s = e, o = !1;
|
|
632
618
|
if (s === 45 && (s = i.charCodeAt(++r)), s === 48) {
|
|
633
|
-
if (s = i.charCodeAt(++r),
|
|
634
|
-
throw
|
|
635
|
-
|
|
619
|
+
if (s = i.charCodeAt(++r), S(s))
|
|
620
|
+
throw I(
|
|
621
|
+
t.source,
|
|
636
622
|
r,
|
|
637
|
-
`Invalid number, unexpected digit after 0: ${
|
|
638
|
-
|
|
623
|
+
`Invalid number, unexpected digit after 0: ${N(
|
|
624
|
+
t,
|
|
639
625
|
r
|
|
640
626
|
)}.`
|
|
641
627
|
);
|
|
642
628
|
} else
|
|
643
|
-
r =
|
|
644
|
-
if (s === 46 && (o = !0, s = i.charCodeAt(++r), r =
|
|
645
|
-
throw
|
|
646
|
-
|
|
629
|
+
r = M(t, r, s), s = i.charCodeAt(r);
|
|
630
|
+
if (s === 46 && (o = !0, s = i.charCodeAt(++r), r = M(t, r, s), s = i.charCodeAt(r)), (s === 69 || s === 101) && (o = !0, s = i.charCodeAt(++r), (s === 43 || s === 45) && (s = i.charCodeAt(++r)), r = M(t, r, s), s = i.charCodeAt(r)), s === 46 || le(s))
|
|
631
|
+
throw I(
|
|
632
|
+
t.source,
|
|
647
633
|
r,
|
|
648
|
-
`Invalid number, expected digit but got: ${
|
|
649
|
-
|
|
634
|
+
`Invalid number, expected digit but got: ${N(
|
|
635
|
+
t,
|
|
650
636
|
r
|
|
651
637
|
)}.`
|
|
652
638
|
);
|
|
653
|
-
return
|
|
654
|
-
e,
|
|
655
|
-
o ? a.FLOAT : a.INT,
|
|
639
|
+
return g(
|
|
656
640
|
t,
|
|
641
|
+
o ? a.FLOAT : a.INT,
|
|
642
|
+
n,
|
|
657
643
|
r,
|
|
658
|
-
i.slice(
|
|
644
|
+
i.slice(n, r)
|
|
659
645
|
);
|
|
660
646
|
}
|
|
661
|
-
function
|
|
662
|
-
if (!
|
|
663
|
-
throw
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
`Invalid number, expected digit but got: ${
|
|
667
|
-
|
|
668
|
-
|
|
647
|
+
function M(t, n, e) {
|
|
648
|
+
if (!S(e))
|
|
649
|
+
throw I(
|
|
650
|
+
t.source,
|
|
651
|
+
n,
|
|
652
|
+
`Invalid number, expected digit but got: ${N(
|
|
653
|
+
t,
|
|
654
|
+
n
|
|
669
655
|
)}.`
|
|
670
656
|
);
|
|
671
|
-
const i =
|
|
672
|
-
let r =
|
|
673
|
-
for (;
|
|
657
|
+
const i = t.source.body;
|
|
658
|
+
let r = n + 1;
|
|
659
|
+
for (; S(i.charCodeAt(r)); )
|
|
674
660
|
++r;
|
|
675
661
|
return r;
|
|
676
662
|
}
|
|
677
|
-
function
|
|
678
|
-
const
|
|
679
|
-
let r =
|
|
663
|
+
function Ve(t, n) {
|
|
664
|
+
const e = t.source.body, i = e.length;
|
|
665
|
+
let r = n + 1, s = r, o = "";
|
|
680
666
|
for (; r < i; ) {
|
|
681
|
-
const
|
|
682
|
-
if (
|
|
683
|
-
return o +=
|
|
684
|
-
if (
|
|
685
|
-
o +=
|
|
686
|
-
const
|
|
687
|
-
o +=
|
|
667
|
+
const u = e.charCodeAt(r);
|
|
668
|
+
if (u === 34)
|
|
669
|
+
return o += e.slice(s, r), g(t, a.STRING, n, r + 1, o);
|
|
670
|
+
if (u === 92) {
|
|
671
|
+
o += e.slice(s, r);
|
|
672
|
+
const h = e.charCodeAt(r + 1) === 117 ? e.charCodeAt(r + 2) === 123 ? Ue(t, r) : Me(t, r) : ze(t, r);
|
|
673
|
+
o += h.value, r += h.size, s = r;
|
|
688
674
|
continue;
|
|
689
675
|
}
|
|
690
|
-
if (
|
|
676
|
+
if (u === 10 || u === 13)
|
|
691
677
|
break;
|
|
692
|
-
if (
|
|
678
|
+
if (P(u))
|
|
693
679
|
++r;
|
|
694
|
-
else if (
|
|
680
|
+
else if (B(e, r))
|
|
695
681
|
r += 2;
|
|
696
682
|
else
|
|
697
|
-
throw
|
|
698
|
-
|
|
683
|
+
throw I(
|
|
684
|
+
t.source,
|
|
699
685
|
r,
|
|
700
|
-
`Invalid character within String: ${
|
|
701
|
-
|
|
686
|
+
`Invalid character within String: ${N(
|
|
687
|
+
t,
|
|
702
688
|
r
|
|
703
689
|
)}.`
|
|
704
690
|
);
|
|
705
691
|
}
|
|
706
|
-
throw
|
|
692
|
+
throw I(t.source, r, "Unterminated string.");
|
|
707
693
|
}
|
|
708
|
-
function
|
|
709
|
-
const
|
|
694
|
+
function Ue(t, n) {
|
|
695
|
+
const e = t.source.body;
|
|
710
696
|
let i = 0, r = 3;
|
|
711
697
|
for (; r < 12; ) {
|
|
712
|
-
const s =
|
|
698
|
+
const s = e.charCodeAt(n + r++);
|
|
713
699
|
if (s === 125) {
|
|
714
|
-
if (r < 5 || !
|
|
700
|
+
if (r < 5 || !P(i))
|
|
715
701
|
break;
|
|
716
702
|
return {
|
|
717
703
|
value: String.fromCodePoint(i),
|
|
718
704
|
size: r
|
|
719
705
|
};
|
|
720
706
|
}
|
|
721
|
-
if (i = i << 4 |
|
|
707
|
+
if (i = i << 4 | b(s), i < 0)
|
|
722
708
|
break;
|
|
723
709
|
}
|
|
724
|
-
throw
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
`Invalid Unicode escape sequence: "${
|
|
728
|
-
|
|
729
|
-
|
|
710
|
+
throw I(
|
|
711
|
+
t.source,
|
|
712
|
+
n,
|
|
713
|
+
`Invalid Unicode escape sequence: "${e.slice(
|
|
714
|
+
n,
|
|
715
|
+
n + r
|
|
730
716
|
)}".`
|
|
731
717
|
);
|
|
732
718
|
}
|
|
733
|
-
function
|
|
734
|
-
const
|
|
735
|
-
if (
|
|
719
|
+
function Me(t, n) {
|
|
720
|
+
const e = t.source.body, i = W(e, n + 2);
|
|
721
|
+
if (P(i))
|
|
736
722
|
return {
|
|
737
723
|
value: String.fromCodePoint(i),
|
|
738
724
|
size: 6
|
|
739
725
|
};
|
|
740
|
-
if (
|
|
741
|
-
const r =
|
|
742
|
-
if (
|
|
726
|
+
if (he(i) && e.charCodeAt(n + 6) === 92 && e.charCodeAt(n + 7) === 117) {
|
|
727
|
+
const r = W(e, n + 8);
|
|
728
|
+
if (pe(r))
|
|
743
729
|
return {
|
|
744
730
|
value: String.fromCodePoint(i, r),
|
|
745
731
|
size: 12
|
|
746
732
|
};
|
|
747
733
|
}
|
|
748
|
-
throw
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
`Invalid Unicode escape sequence: "${
|
|
734
|
+
throw I(
|
|
735
|
+
t.source,
|
|
736
|
+
n,
|
|
737
|
+
`Invalid Unicode escape sequence: "${e.slice(n, n + 6)}".`
|
|
752
738
|
);
|
|
753
739
|
}
|
|
754
|
-
function
|
|
755
|
-
return
|
|
740
|
+
function W(t, n) {
|
|
741
|
+
return b(t.charCodeAt(n)) << 12 | b(t.charCodeAt(n + 1)) << 8 | b(t.charCodeAt(n + 2)) << 4 | b(t.charCodeAt(n + 3));
|
|
756
742
|
}
|
|
757
|
-
function
|
|
758
|
-
return
|
|
743
|
+
function b(t) {
|
|
744
|
+
return t >= 48 && t <= 57 ? t - 48 : t >= 65 && t <= 70 ? t - 55 : t >= 97 && t <= 102 ? t - 87 : -1;
|
|
759
745
|
}
|
|
760
|
-
function
|
|
761
|
-
const
|
|
762
|
-
switch (
|
|
746
|
+
function ze(t, n) {
|
|
747
|
+
const e = t.source.body;
|
|
748
|
+
switch (e.charCodeAt(n + 1)) {
|
|
763
749
|
case 34:
|
|
764
750
|
return {
|
|
765
751
|
value: '"',
|
|
@@ -802,151 +788,151 @@ function at(e, t) {
|
|
|
802
788
|
size: 2
|
|
803
789
|
};
|
|
804
790
|
}
|
|
805
|
-
throw
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
`Invalid character escape sequence: "${
|
|
809
|
-
|
|
810
|
-
|
|
791
|
+
throw I(
|
|
792
|
+
t.source,
|
|
793
|
+
n,
|
|
794
|
+
`Invalid character escape sequence: "${e.slice(
|
|
795
|
+
n,
|
|
796
|
+
n + 2
|
|
811
797
|
)}".`
|
|
812
798
|
);
|
|
813
799
|
}
|
|
814
|
-
function
|
|
815
|
-
const
|
|
816
|
-
let r =
|
|
817
|
-
const
|
|
800
|
+
function qe(t, n) {
|
|
801
|
+
const e = t.source.body, i = e.length;
|
|
802
|
+
let r = t.lineStart, s = n + 3, o = s, u = "";
|
|
803
|
+
const h = [];
|
|
818
804
|
for (; s < i; ) {
|
|
819
|
-
const
|
|
820
|
-
if (
|
|
821
|
-
|
|
822
|
-
const
|
|
823
|
-
e,
|
|
824
|
-
a.BLOCK_STRING,
|
|
805
|
+
const E = e.charCodeAt(s);
|
|
806
|
+
if (E === 34 && e.charCodeAt(s + 1) === 34 && e.charCodeAt(s + 2) === 34) {
|
|
807
|
+
u += e.slice(o, s), h.push(u);
|
|
808
|
+
const m = g(
|
|
825
809
|
t,
|
|
810
|
+
a.BLOCK_STRING,
|
|
811
|
+
n,
|
|
826
812
|
s + 3,
|
|
827
813
|
// Return a string of the lines joined with U+000A.
|
|
828
|
-
|
|
814
|
+
_e(h).join(`
|
|
829
815
|
`)
|
|
830
816
|
);
|
|
831
|
-
return
|
|
817
|
+
return t.line += h.length - 1, t.lineStart = r, m;
|
|
832
818
|
}
|
|
833
|
-
if (
|
|
834
|
-
|
|
819
|
+
if (E === 92 && e.charCodeAt(s + 1) === 34 && e.charCodeAt(s + 2) === 34 && e.charCodeAt(s + 3) === 34) {
|
|
820
|
+
u += e.slice(o, s), o = s + 1, s += 4;
|
|
835
821
|
continue;
|
|
836
822
|
}
|
|
837
|
-
if (
|
|
838
|
-
|
|
823
|
+
if (E === 10 || E === 13) {
|
|
824
|
+
u += e.slice(o, s), h.push(u), E === 13 && e.charCodeAt(s + 1) === 10 ? s += 2 : ++s, u = "", o = s, r = s;
|
|
839
825
|
continue;
|
|
840
826
|
}
|
|
841
|
-
if (
|
|
827
|
+
if (P(E))
|
|
842
828
|
++s;
|
|
843
|
-
else if (
|
|
829
|
+
else if (B(e, s))
|
|
844
830
|
s += 2;
|
|
845
831
|
else
|
|
846
|
-
throw
|
|
847
|
-
|
|
832
|
+
throw I(
|
|
833
|
+
t.source,
|
|
848
834
|
s,
|
|
849
|
-
`Invalid character within String: ${
|
|
850
|
-
|
|
835
|
+
`Invalid character within String: ${N(
|
|
836
|
+
t,
|
|
851
837
|
s
|
|
852
838
|
)}.`
|
|
853
839
|
);
|
|
854
840
|
}
|
|
855
|
-
throw
|
|
841
|
+
throw I(t.source, s, "Unterminated string.");
|
|
856
842
|
}
|
|
857
|
-
function
|
|
858
|
-
const
|
|
859
|
-
let r =
|
|
843
|
+
function Ge(t, n) {
|
|
844
|
+
const e = t.source.body, i = e.length;
|
|
845
|
+
let r = n + 1;
|
|
860
846
|
for (; r < i; ) {
|
|
861
|
-
const s =
|
|
862
|
-
if (
|
|
847
|
+
const s = e.charCodeAt(r);
|
|
848
|
+
if (Ce(s))
|
|
863
849
|
++r;
|
|
864
850
|
else
|
|
865
851
|
break;
|
|
866
852
|
}
|
|
867
|
-
return
|
|
868
|
-
e,
|
|
869
|
-
a.NAME,
|
|
853
|
+
return g(
|
|
870
854
|
t,
|
|
855
|
+
a.NAME,
|
|
856
|
+
n,
|
|
871
857
|
r,
|
|
872
|
-
|
|
858
|
+
e.slice(n, r)
|
|
873
859
|
);
|
|
874
860
|
}
|
|
875
|
-
const
|
|
876
|
-
function
|
|
877
|
-
return
|
|
861
|
+
const je = 10, me = 2;
|
|
862
|
+
function fe(t) {
|
|
863
|
+
return V(t, []);
|
|
878
864
|
}
|
|
879
|
-
function
|
|
880
|
-
switch (typeof
|
|
865
|
+
function V(t, n) {
|
|
866
|
+
switch (typeof t) {
|
|
881
867
|
case "string":
|
|
882
|
-
return JSON.stringify(
|
|
868
|
+
return JSON.stringify(t);
|
|
883
869
|
case "function":
|
|
884
|
-
return
|
|
870
|
+
return t.name ? `[function ${t.name}]` : "[function]";
|
|
885
871
|
case "object":
|
|
886
|
-
return
|
|
872
|
+
return Ye(t, n);
|
|
887
873
|
default:
|
|
888
|
-
return String(
|
|
874
|
+
return String(t);
|
|
889
875
|
}
|
|
890
876
|
}
|
|
891
|
-
function
|
|
892
|
-
if (
|
|
877
|
+
function Ye(t, n) {
|
|
878
|
+
if (t === null)
|
|
893
879
|
return "null";
|
|
894
|
-
if (
|
|
880
|
+
if (n.includes(t))
|
|
895
881
|
return "[Circular]";
|
|
896
|
-
const
|
|
897
|
-
if (
|
|
898
|
-
const i =
|
|
899
|
-
if (i !==
|
|
900
|
-
return typeof i == "string" ? i :
|
|
901
|
-
} else if (Array.isArray(
|
|
902
|
-
return
|
|
903
|
-
return
|
|
904
|
-
}
|
|
905
|
-
function
|
|
906
|
-
return typeof
|
|
907
|
-
}
|
|
908
|
-
function
|
|
909
|
-
const
|
|
910
|
-
return
|
|
911
|
-
([r, s]) => r + ": " +
|
|
882
|
+
const e = [...n, t];
|
|
883
|
+
if (He(t)) {
|
|
884
|
+
const i = t.toJSON();
|
|
885
|
+
if (i !== t)
|
|
886
|
+
return typeof i == "string" ? i : V(i, e);
|
|
887
|
+
} else if (Array.isArray(t))
|
|
888
|
+
return Qe(t, e);
|
|
889
|
+
return Je(t, e);
|
|
890
|
+
}
|
|
891
|
+
function He(t) {
|
|
892
|
+
return typeof t.toJSON == "function";
|
|
893
|
+
}
|
|
894
|
+
function Je(t, n) {
|
|
895
|
+
const e = Object.entries(t);
|
|
896
|
+
return e.length === 0 ? "{}" : n.length > me ? "[" + Xe(t) + "]" : "{ " + e.map(
|
|
897
|
+
([r, s]) => r + ": " + V(s, n)
|
|
912
898
|
).join(", ") + " }";
|
|
913
899
|
}
|
|
914
|
-
function
|
|
915
|
-
if (
|
|
900
|
+
function Qe(t, n) {
|
|
901
|
+
if (t.length === 0)
|
|
916
902
|
return "[]";
|
|
917
|
-
if (
|
|
903
|
+
if (n.length > me)
|
|
918
904
|
return "[Array]";
|
|
919
|
-
const
|
|
920
|
-
for (let s = 0; s <
|
|
921
|
-
r.push(
|
|
905
|
+
const e = Math.min(je, t.length), i = t.length - e, r = [];
|
|
906
|
+
for (let s = 0; s < e; ++s)
|
|
907
|
+
r.push(V(t[s], n));
|
|
922
908
|
return i === 1 ? r.push("... 1 more item") : i > 1 && r.push(`... ${i} more items`), "[" + r.join(", ") + "]";
|
|
923
909
|
}
|
|
924
|
-
function
|
|
925
|
-
const
|
|
926
|
-
if (
|
|
927
|
-
const
|
|
928
|
-
if (typeof
|
|
929
|
-
return
|
|
910
|
+
function Xe(t) {
|
|
911
|
+
const n = Object.prototype.toString.call(t).replace(/^\[object /, "").replace(/]$/, "");
|
|
912
|
+
if (n === "Object" && typeof t.constructor == "function") {
|
|
913
|
+
const e = t.constructor.name;
|
|
914
|
+
if (typeof e == "string" && e !== "")
|
|
915
|
+
return e;
|
|
930
916
|
}
|
|
931
|
-
return
|
|
917
|
+
return n;
|
|
932
918
|
}
|
|
933
|
-
const
|
|
934
|
-
process.env.NODE_ENV === "production",
|
|
919
|
+
const We = globalThis.process && // eslint-disable-next-line no-undef
|
|
920
|
+
process.env.NODE_ENV === "production", Ze = (
|
|
935
921
|
/* c8 ignore next 6 */
|
|
936
922
|
// FIXME: https://github.com/graphql/graphql-js/issues/2317
|
|
937
|
-
|
|
938
|
-
return
|
|
939
|
-
} : function(
|
|
940
|
-
if (
|
|
923
|
+
We ? function(n, e) {
|
|
924
|
+
return n instanceof e;
|
|
925
|
+
} : function(n, e) {
|
|
926
|
+
if (n instanceof e)
|
|
941
927
|
return !0;
|
|
942
|
-
if (typeof
|
|
928
|
+
if (typeof n == "object" && n !== null) {
|
|
943
929
|
var i;
|
|
944
|
-
const r =
|
|
930
|
+
const r = e.prototype[Symbol.toStringTag], s = (
|
|
945
931
|
// We still need to support constructor's name to detect conflicts with older versions of this library.
|
|
946
|
-
Symbol.toStringTag in
|
|
932
|
+
Symbol.toStringTag in n ? n[Symbol.toStringTag] : (i = n.constructor) === null || i === void 0 ? void 0 : i.name
|
|
947
933
|
);
|
|
948
934
|
if (r === s) {
|
|
949
|
-
const o =
|
|
935
|
+
const o = fe(n);
|
|
950
936
|
throw new Error(`Cannot use ${r} "${o}" from another module or realm.
|
|
951
937
|
|
|
952
938
|
Ensure that there is only one instance of "graphql" in the node_modules
|
|
@@ -964,15 +950,15 @@ spurious results.`);
|
|
|
964
950
|
return !1;
|
|
965
951
|
}
|
|
966
952
|
);
|
|
967
|
-
class
|
|
968
|
-
constructor(
|
|
953
|
+
class ge {
|
|
954
|
+
constructor(n, e = "GraphQL request", i = {
|
|
969
955
|
line: 1,
|
|
970
956
|
column: 1
|
|
971
957
|
}) {
|
|
972
|
-
typeof
|
|
958
|
+
typeof n == "string" || U(!1, `Body must be a string. Received: ${fe(n)}.`), this.body = n, this.name = e, this.locationOffset = i, this.locationOffset.line > 0 || U(
|
|
973
959
|
!1,
|
|
974
960
|
"line in locationOffset is 1-indexed and must be positive."
|
|
975
|
-
), this.locationOffset.column > 0 ||
|
|
961
|
+
), this.locationOffset.column > 0 || U(
|
|
976
962
|
!1,
|
|
977
963
|
"column in locationOffset is 1-indexed and must be positive."
|
|
978
964
|
);
|
|
@@ -981,24 +967,24 @@ class we {
|
|
|
981
967
|
return "Source";
|
|
982
968
|
}
|
|
983
969
|
}
|
|
984
|
-
function
|
|
985
|
-
return
|
|
970
|
+
function Ke(t) {
|
|
971
|
+
return Ze(t, ge);
|
|
986
972
|
}
|
|
987
|
-
function
|
|
988
|
-
const
|
|
973
|
+
function et(t, n) {
|
|
974
|
+
const e = new tt(t, n), i = e.parseDocument();
|
|
989
975
|
return Object.defineProperty(i, "tokenCount", {
|
|
990
976
|
enumerable: !1,
|
|
991
|
-
value:
|
|
977
|
+
value: e.tokenCount
|
|
992
978
|
}), i;
|
|
993
979
|
}
|
|
994
|
-
class
|
|
995
|
-
constructor(
|
|
996
|
-
const { lexer: i, ...r } =
|
|
980
|
+
class tt {
|
|
981
|
+
constructor(n, e = {}) {
|
|
982
|
+
const { lexer: i, ...r } = e;
|
|
997
983
|
if (i)
|
|
998
984
|
this._lexer = i;
|
|
999
985
|
else {
|
|
1000
|
-
const s =
|
|
1001
|
-
this._lexer = new
|
|
986
|
+
const s = Ke(n) ? n : new ge(n);
|
|
987
|
+
this._lexer = new Re(s);
|
|
1002
988
|
}
|
|
1003
989
|
this._options = r, this._tokenCounter = 0;
|
|
1004
990
|
}
|
|
@@ -1009,10 +995,10 @@ class yt {
|
|
|
1009
995
|
* Converts a name lex token into a name parse node.
|
|
1010
996
|
*/
|
|
1011
997
|
parseName() {
|
|
1012
|
-
const
|
|
1013
|
-
return this.node(
|
|
1014
|
-
kind:
|
|
1015
|
-
value:
|
|
998
|
+
const n = this.expectToken(a.NAME);
|
|
999
|
+
return this.node(n, {
|
|
1000
|
+
kind: c.NAME,
|
|
1001
|
+
value: n.value
|
|
1016
1002
|
});
|
|
1017
1003
|
}
|
|
1018
1004
|
// Implements the parsing rules in the Document section.
|
|
@@ -1021,7 +1007,7 @@ class yt {
|
|
|
1021
1007
|
*/
|
|
1022
1008
|
parseDocument() {
|
|
1023
1009
|
return this.node(this._lexer.token, {
|
|
1024
|
-
kind:
|
|
1010
|
+
kind: c.DOCUMENT,
|
|
1025
1011
|
definitions: this.many(
|
|
1026
1012
|
a.SOF,
|
|
1027
1013
|
this.parseDefinition,
|
|
@@ -1055,15 +1041,15 @@ class yt {
|
|
|
1055
1041
|
parseDefinition() {
|
|
1056
1042
|
if (this.peek(a.BRACE_L))
|
|
1057
1043
|
return this.parseOperationDefinition();
|
|
1058
|
-
const
|
|
1059
|
-
if (
|
|
1060
|
-
throw
|
|
1044
|
+
const n = this.peekDescription(), e = n ? this._lexer.lookahead() : this._lexer.token;
|
|
1045
|
+
if (n && e.kind === a.BRACE_L)
|
|
1046
|
+
throw I(
|
|
1061
1047
|
this._lexer.source,
|
|
1062
1048
|
this._lexer.token.start,
|
|
1063
1049
|
"Unexpected description, descriptions are not supported on shorthand queries."
|
|
1064
1050
|
);
|
|
1065
|
-
if (
|
|
1066
|
-
switch (
|
|
1051
|
+
if (e.kind === a.NAME) {
|
|
1052
|
+
switch (e.value) {
|
|
1067
1053
|
case "schema":
|
|
1068
1054
|
return this.parseSchemaDefinition();
|
|
1069
1055
|
case "scalar":
|
|
@@ -1081,7 +1067,7 @@ class yt {
|
|
|
1081
1067
|
case "directive":
|
|
1082
1068
|
return this.parseDirectiveDefinition();
|
|
1083
1069
|
}
|
|
1084
|
-
switch (
|
|
1070
|
+
switch (e.value) {
|
|
1085
1071
|
case "query":
|
|
1086
1072
|
case "mutation":
|
|
1087
1073
|
case "subscription":
|
|
@@ -1089,16 +1075,16 @@ class yt {
|
|
|
1089
1075
|
case "fragment":
|
|
1090
1076
|
return this.parseFragmentDefinition();
|
|
1091
1077
|
}
|
|
1092
|
-
if (
|
|
1093
|
-
throw
|
|
1078
|
+
if (n)
|
|
1079
|
+
throw I(
|
|
1094
1080
|
this._lexer.source,
|
|
1095
1081
|
this._lexer.token.start,
|
|
1096
1082
|
"Unexpected description, only GraphQL definitions support descriptions."
|
|
1097
1083
|
);
|
|
1098
|
-
if (
|
|
1084
|
+
if (e.value === "extend")
|
|
1099
1085
|
return this.parseTypeSystemExtension();
|
|
1100
1086
|
}
|
|
1101
|
-
throw this.unexpected(
|
|
1087
|
+
throw this.unexpected(e);
|
|
1102
1088
|
}
|
|
1103
1089
|
// Implements the parsing rules in the Operations section.
|
|
1104
1090
|
/**
|
|
@@ -1107,23 +1093,23 @@ class yt {
|
|
|
1107
1093
|
* - OperationType Name? VariableDefinitions? Directives? SelectionSet
|
|
1108
1094
|
*/
|
|
1109
1095
|
parseOperationDefinition() {
|
|
1110
|
-
const
|
|
1096
|
+
const n = this._lexer.token;
|
|
1111
1097
|
if (this.peek(a.BRACE_L))
|
|
1112
|
-
return this.node(
|
|
1113
|
-
kind:
|
|
1114
|
-
operation:
|
|
1098
|
+
return this.node(n, {
|
|
1099
|
+
kind: c.OPERATION_DEFINITION,
|
|
1100
|
+
operation: D.QUERY,
|
|
1115
1101
|
description: void 0,
|
|
1116
1102
|
name: void 0,
|
|
1117
1103
|
variableDefinitions: [],
|
|
1118
1104
|
directives: [],
|
|
1119
1105
|
selectionSet: this.parseSelectionSet()
|
|
1120
1106
|
});
|
|
1121
|
-
const
|
|
1107
|
+
const e = this.parseDescription(), i = this.parseOperationType();
|
|
1122
1108
|
let r;
|
|
1123
|
-
return this.peek(a.NAME) && (r = this.parseName()), this.node(
|
|
1124
|
-
kind:
|
|
1109
|
+
return this.peek(a.NAME) && (r = this.parseName()), this.node(n, {
|
|
1110
|
+
kind: c.OPERATION_DEFINITION,
|
|
1125
1111
|
operation: i,
|
|
1126
|
-
description:
|
|
1112
|
+
description: e,
|
|
1127
1113
|
name: r,
|
|
1128
1114
|
variableDefinitions: this.parseVariableDefinitions(),
|
|
1129
1115
|
directives: this.parseDirectives(!1),
|
|
@@ -1134,16 +1120,16 @@ class yt {
|
|
|
1134
1120
|
* OperationType : one of query mutation subscription
|
|
1135
1121
|
*/
|
|
1136
1122
|
parseOperationType() {
|
|
1137
|
-
const
|
|
1138
|
-
switch (
|
|
1123
|
+
const n = this.expectToken(a.NAME);
|
|
1124
|
+
switch (n.value) {
|
|
1139
1125
|
case "query":
|
|
1140
|
-
return
|
|
1126
|
+
return D.QUERY;
|
|
1141
1127
|
case "mutation":
|
|
1142
|
-
return
|
|
1128
|
+
return D.MUTATION;
|
|
1143
1129
|
case "subscription":
|
|
1144
|
-
return
|
|
1130
|
+
return D.SUBSCRIPTION;
|
|
1145
1131
|
}
|
|
1146
|
-
throw this.unexpected(
|
|
1132
|
+
throw this.unexpected(n);
|
|
1147
1133
|
}
|
|
1148
1134
|
/**
|
|
1149
1135
|
* VariableDefinitions : ( VariableDefinition+ )
|
|
@@ -1160,7 +1146,7 @@ class yt {
|
|
|
1160
1146
|
*/
|
|
1161
1147
|
parseVariableDefinition() {
|
|
1162
1148
|
return this.node(this._lexer.token, {
|
|
1163
|
-
kind:
|
|
1149
|
+
kind: c.VARIABLE_DEFINITION,
|
|
1164
1150
|
description: this.parseDescription(),
|
|
1165
1151
|
variable: this.parseVariable(),
|
|
1166
1152
|
type: (this.expectToken(a.COLON), this.parseTypeReference()),
|
|
@@ -1172,9 +1158,9 @@ class yt {
|
|
|
1172
1158
|
* Variable : $ Name
|
|
1173
1159
|
*/
|
|
1174
1160
|
parseVariable() {
|
|
1175
|
-
const
|
|
1176
|
-
return this.expectToken(a.DOLLAR), this.node(
|
|
1177
|
-
kind:
|
|
1161
|
+
const n = this._lexer.token;
|
|
1162
|
+
return this.expectToken(a.DOLLAR), this.node(n, {
|
|
1163
|
+
kind: c.VARIABLE,
|
|
1178
1164
|
name: this.parseName()
|
|
1179
1165
|
});
|
|
1180
1166
|
}
|
|
@@ -1185,7 +1171,7 @@ class yt {
|
|
|
1185
1171
|
*/
|
|
1186
1172
|
parseSelectionSet() {
|
|
1187
1173
|
return this.node(this._lexer.token, {
|
|
1188
|
-
kind:
|
|
1174
|
+
kind: c.SELECTION_SET,
|
|
1189
1175
|
selections: this.many(
|
|
1190
1176
|
a.BRACE_L,
|
|
1191
1177
|
this.parseSelection,
|
|
@@ -1208,10 +1194,10 @@ class yt {
|
|
|
1208
1194
|
* Alias : Name :
|
|
1209
1195
|
*/
|
|
1210
1196
|
parseField() {
|
|
1211
|
-
const
|
|
1197
|
+
const n = this._lexer.token, e = this.parseName();
|
|
1212
1198
|
let i, r;
|
|
1213
|
-
return this.expectOptionalToken(a.COLON) ? (i =
|
|
1214
|
-
kind:
|
|
1199
|
+
return this.expectOptionalToken(a.COLON) ? (i = e, r = this.parseName()) : r = e, this.node(n, {
|
|
1200
|
+
kind: c.FIELD,
|
|
1215
1201
|
alias: i,
|
|
1216
1202
|
name: r,
|
|
1217
1203
|
arguments: this.parseArguments(!1),
|
|
@@ -1222,19 +1208,19 @@ class yt {
|
|
|
1222
1208
|
/**
|
|
1223
1209
|
* Arguments[Const] : ( Argument[?Const]+ )
|
|
1224
1210
|
*/
|
|
1225
|
-
parseArguments(
|
|
1226
|
-
const
|
|
1227
|
-
return this.optionalMany(a.PAREN_L,
|
|
1211
|
+
parseArguments(n) {
|
|
1212
|
+
const e = n ? this.parseConstArgument : this.parseArgument;
|
|
1213
|
+
return this.optionalMany(a.PAREN_L, e, a.PAREN_R);
|
|
1228
1214
|
}
|
|
1229
1215
|
/**
|
|
1230
1216
|
* Argument[Const] : Name : Value[?Const]
|
|
1231
1217
|
*/
|
|
1232
|
-
parseArgument(
|
|
1233
|
-
const
|
|
1234
|
-
return this.expectToken(a.COLON), this.node(
|
|
1235
|
-
kind:
|
|
1218
|
+
parseArgument(n = !1) {
|
|
1219
|
+
const e = this._lexer.token, i = this.parseName();
|
|
1220
|
+
return this.expectToken(a.COLON), this.node(e, {
|
|
1221
|
+
kind: c.ARGUMENT,
|
|
1236
1222
|
name: i,
|
|
1237
|
-
value: this.parseValueLiteral(
|
|
1223
|
+
value: this.parseValueLiteral(n)
|
|
1238
1224
|
});
|
|
1239
1225
|
}
|
|
1240
1226
|
parseConstArgument() {
|
|
@@ -1249,16 +1235,16 @@ class yt {
|
|
|
1249
1235
|
* InlineFragment : ... TypeCondition? Directives? SelectionSet
|
|
1250
1236
|
*/
|
|
1251
1237
|
parseFragment() {
|
|
1252
|
-
const
|
|
1238
|
+
const n = this._lexer.token;
|
|
1253
1239
|
this.expectToken(a.SPREAD);
|
|
1254
|
-
const
|
|
1255
|
-
return !
|
|
1256
|
-
kind:
|
|
1240
|
+
const e = this.expectOptionalKeyword("on");
|
|
1241
|
+
return !e && this.peek(a.NAME) ? this.node(n, {
|
|
1242
|
+
kind: c.FRAGMENT_SPREAD,
|
|
1257
1243
|
name: this.parseFragmentName(),
|
|
1258
1244
|
directives: this.parseDirectives(!1)
|
|
1259
|
-
}) : this.node(
|
|
1260
|
-
kind:
|
|
1261
|
-
typeCondition:
|
|
1245
|
+
}) : this.node(n, {
|
|
1246
|
+
kind: c.INLINE_FRAGMENT,
|
|
1247
|
+
typeCondition: e ? this.parseNamedType() : void 0,
|
|
1262
1248
|
directives: this.parseDirectives(!1),
|
|
1263
1249
|
selectionSet: this.parseSelectionSet()
|
|
1264
1250
|
});
|
|
@@ -1270,18 +1256,18 @@ class yt {
|
|
|
1270
1256
|
* TypeCondition : NamedType
|
|
1271
1257
|
*/
|
|
1272
1258
|
parseFragmentDefinition() {
|
|
1273
|
-
const
|
|
1274
|
-
return this.expectKeyword("fragment"), this._options.allowLegacyFragmentVariables === !0 ? this.node(
|
|
1275
|
-
kind:
|
|
1276
|
-
description:
|
|
1259
|
+
const n = this._lexer.token, e = this.parseDescription();
|
|
1260
|
+
return this.expectKeyword("fragment"), this._options.allowLegacyFragmentVariables === !0 ? this.node(n, {
|
|
1261
|
+
kind: c.FRAGMENT_DEFINITION,
|
|
1262
|
+
description: e,
|
|
1277
1263
|
name: this.parseFragmentName(),
|
|
1278
1264
|
variableDefinitions: this.parseVariableDefinitions(),
|
|
1279
1265
|
typeCondition: (this.expectKeyword("on"), this.parseNamedType()),
|
|
1280
1266
|
directives: this.parseDirectives(!1),
|
|
1281
1267
|
selectionSet: this.parseSelectionSet()
|
|
1282
|
-
}) : this.node(
|
|
1283
|
-
kind:
|
|
1284
|
-
description:
|
|
1268
|
+
}) : this.node(n, {
|
|
1269
|
+
kind: c.FRAGMENT_DEFINITION,
|
|
1270
|
+
description: e,
|
|
1285
1271
|
name: this.parseFragmentName(),
|
|
1286
1272
|
typeCondition: (this.expectKeyword("on"), this.parseNamedType()),
|
|
1287
1273
|
directives: this.parseDirectives(!1),
|
|
@@ -1315,59 +1301,59 @@ class yt {
|
|
|
1315
1301
|
*
|
|
1316
1302
|
* EnumValue : Name but not `true`, `false` or `null`
|
|
1317
1303
|
*/
|
|
1318
|
-
parseValueLiteral(
|
|
1319
|
-
const
|
|
1320
|
-
switch (
|
|
1304
|
+
parseValueLiteral(n) {
|
|
1305
|
+
const e = this._lexer.token;
|
|
1306
|
+
switch (e.kind) {
|
|
1321
1307
|
case a.BRACKET_L:
|
|
1322
|
-
return this.parseList(
|
|
1308
|
+
return this.parseList(n);
|
|
1323
1309
|
case a.BRACE_L:
|
|
1324
|
-
return this.parseObject(
|
|
1310
|
+
return this.parseObject(n);
|
|
1325
1311
|
case a.INT:
|
|
1326
|
-
return this.advanceLexer(), this.node(
|
|
1327
|
-
kind:
|
|
1328
|
-
value:
|
|
1312
|
+
return this.advanceLexer(), this.node(e, {
|
|
1313
|
+
kind: c.INT,
|
|
1314
|
+
value: e.value
|
|
1329
1315
|
});
|
|
1330
1316
|
case a.FLOAT:
|
|
1331
|
-
return this.advanceLexer(), this.node(
|
|
1332
|
-
kind:
|
|
1333
|
-
value:
|
|
1317
|
+
return this.advanceLexer(), this.node(e, {
|
|
1318
|
+
kind: c.FLOAT,
|
|
1319
|
+
value: e.value
|
|
1334
1320
|
});
|
|
1335
1321
|
case a.STRING:
|
|
1336
1322
|
case a.BLOCK_STRING:
|
|
1337
1323
|
return this.parseStringLiteral();
|
|
1338
1324
|
case a.NAME:
|
|
1339
|
-
switch (this.advanceLexer(),
|
|
1325
|
+
switch (this.advanceLexer(), e.value) {
|
|
1340
1326
|
case "true":
|
|
1341
|
-
return this.node(
|
|
1342
|
-
kind:
|
|
1327
|
+
return this.node(e, {
|
|
1328
|
+
kind: c.BOOLEAN,
|
|
1343
1329
|
value: !0
|
|
1344
1330
|
});
|
|
1345
1331
|
case "false":
|
|
1346
|
-
return this.node(
|
|
1347
|
-
kind:
|
|
1332
|
+
return this.node(e, {
|
|
1333
|
+
kind: c.BOOLEAN,
|
|
1348
1334
|
value: !1
|
|
1349
1335
|
});
|
|
1350
1336
|
case "null":
|
|
1351
|
-
return this.node(
|
|
1352
|
-
kind:
|
|
1337
|
+
return this.node(e, {
|
|
1338
|
+
kind: c.NULL
|
|
1353
1339
|
});
|
|
1354
1340
|
default:
|
|
1355
|
-
return this.node(
|
|
1356
|
-
kind:
|
|
1357
|
-
value:
|
|
1341
|
+
return this.node(e, {
|
|
1342
|
+
kind: c.ENUM,
|
|
1343
|
+
value: e.value
|
|
1358
1344
|
});
|
|
1359
1345
|
}
|
|
1360
1346
|
case a.DOLLAR:
|
|
1361
|
-
if (
|
|
1347
|
+
if (n)
|
|
1362
1348
|
if (this.expectToken(a.DOLLAR), this._lexer.token.kind === a.NAME) {
|
|
1363
1349
|
const i = this._lexer.token.value;
|
|
1364
|
-
throw
|
|
1350
|
+
throw I(
|
|
1365
1351
|
this._lexer.source,
|
|
1366
|
-
|
|
1352
|
+
e.start,
|
|
1367
1353
|
`Unexpected variable "$${i}" in constant value.`
|
|
1368
1354
|
);
|
|
1369
1355
|
} else
|
|
1370
|
-
throw this.unexpected(
|
|
1356
|
+
throw this.unexpected(e);
|
|
1371
1357
|
return this.parseVariable();
|
|
1372
1358
|
default:
|
|
1373
1359
|
throw this.unexpected();
|
|
@@ -1377,11 +1363,11 @@ class yt {
|
|
|
1377
1363
|
return this.parseValueLiteral(!0);
|
|
1378
1364
|
}
|
|
1379
1365
|
parseStringLiteral() {
|
|
1380
|
-
const
|
|
1381
|
-
return this.advanceLexer(), this.node(
|
|
1382
|
-
kind:
|
|
1383
|
-
value:
|
|
1384
|
-
block:
|
|
1366
|
+
const n = this._lexer.token;
|
|
1367
|
+
return this.advanceLexer(), this.node(n, {
|
|
1368
|
+
kind: c.STRING,
|
|
1369
|
+
value: n.value,
|
|
1370
|
+
block: n.kind === a.BLOCK_STRING
|
|
1385
1371
|
});
|
|
1386
1372
|
}
|
|
1387
1373
|
/**
|
|
@@ -1389,11 +1375,11 @@ class yt {
|
|
|
1389
1375
|
* - [ ]
|
|
1390
1376
|
* - [ Value[?Const]+ ]
|
|
1391
1377
|
*/
|
|
1392
|
-
parseList(
|
|
1393
|
-
const
|
|
1378
|
+
parseList(n) {
|
|
1379
|
+
const e = () => this.parseValueLiteral(n);
|
|
1394
1380
|
return this.node(this._lexer.token, {
|
|
1395
|
-
kind:
|
|
1396
|
-
values: this.any(a.BRACKET_L,
|
|
1381
|
+
kind: c.LIST,
|
|
1382
|
+
values: this.any(a.BRACKET_L, e, a.BRACKET_R)
|
|
1397
1383
|
});
|
|
1398
1384
|
}
|
|
1399
1385
|
/**
|
|
@@ -1403,33 +1389,33 @@ class yt {
|
|
|
1403
1389
|
* - { ObjectField[?Const]+ }
|
|
1404
1390
|
* ```
|
|
1405
1391
|
*/
|
|
1406
|
-
parseObject(
|
|
1407
|
-
const
|
|
1392
|
+
parseObject(n) {
|
|
1393
|
+
const e = () => this.parseObjectField(n);
|
|
1408
1394
|
return this.node(this._lexer.token, {
|
|
1409
|
-
kind:
|
|
1410
|
-
fields: this.any(a.BRACE_L,
|
|
1395
|
+
kind: c.OBJECT,
|
|
1396
|
+
fields: this.any(a.BRACE_L, e, a.BRACE_R)
|
|
1411
1397
|
});
|
|
1412
1398
|
}
|
|
1413
1399
|
/**
|
|
1414
1400
|
* ObjectField[Const] : Name : Value[?Const]
|
|
1415
1401
|
*/
|
|
1416
|
-
parseObjectField(
|
|
1417
|
-
const
|
|
1418
|
-
return this.expectToken(a.COLON), this.node(
|
|
1419
|
-
kind:
|
|
1402
|
+
parseObjectField(n) {
|
|
1403
|
+
const e = this._lexer.token, i = this.parseName();
|
|
1404
|
+
return this.expectToken(a.COLON), this.node(e, {
|
|
1405
|
+
kind: c.OBJECT_FIELD,
|
|
1420
1406
|
name: i,
|
|
1421
|
-
value: this.parseValueLiteral(
|
|
1407
|
+
value: this.parseValueLiteral(n)
|
|
1422
1408
|
});
|
|
1423
1409
|
}
|
|
1424
1410
|
// Implements the parsing rules in the Directives section.
|
|
1425
1411
|
/**
|
|
1426
1412
|
* Directives[Const] : Directive[?Const]+
|
|
1427
1413
|
*/
|
|
1428
|
-
parseDirectives(
|
|
1429
|
-
const
|
|
1414
|
+
parseDirectives(n) {
|
|
1415
|
+
const e = [];
|
|
1430
1416
|
for (; this.peek(a.AT); )
|
|
1431
|
-
|
|
1432
|
-
return
|
|
1417
|
+
e.push(this.parseDirective(n));
|
|
1418
|
+
return e;
|
|
1433
1419
|
}
|
|
1434
1420
|
parseConstDirectives() {
|
|
1435
1421
|
return this.parseDirectives(!0);
|
|
@@ -1439,12 +1425,12 @@ class yt {
|
|
|
1439
1425
|
* Directive[Const] : @ Name Arguments[?Const]?
|
|
1440
1426
|
* ```
|
|
1441
1427
|
*/
|
|
1442
|
-
parseDirective(
|
|
1443
|
-
const
|
|
1444
|
-
return this.expectToken(a.AT), this.node(
|
|
1445
|
-
kind:
|
|
1428
|
+
parseDirective(n) {
|
|
1429
|
+
const e = this._lexer.token;
|
|
1430
|
+
return this.expectToken(a.AT), this.node(e, {
|
|
1431
|
+
kind: c.DIRECTIVE,
|
|
1446
1432
|
name: this.parseName(),
|
|
1447
|
-
arguments: this.parseArguments(
|
|
1433
|
+
arguments: this.parseArguments(n)
|
|
1448
1434
|
});
|
|
1449
1435
|
}
|
|
1450
1436
|
// Implements the parsing rules in the Types section.
|
|
@@ -1455,27 +1441,27 @@ class yt {
|
|
|
1455
1441
|
* - NonNullType
|
|
1456
1442
|
*/
|
|
1457
1443
|
parseTypeReference() {
|
|
1458
|
-
const
|
|
1459
|
-
let
|
|
1444
|
+
const n = this._lexer.token;
|
|
1445
|
+
let e;
|
|
1460
1446
|
if (this.expectOptionalToken(a.BRACKET_L)) {
|
|
1461
1447
|
const i = this.parseTypeReference();
|
|
1462
|
-
this.expectToken(a.BRACKET_R),
|
|
1463
|
-
kind:
|
|
1448
|
+
this.expectToken(a.BRACKET_R), e = this.node(n, {
|
|
1449
|
+
kind: c.LIST_TYPE,
|
|
1464
1450
|
type: i
|
|
1465
1451
|
});
|
|
1466
1452
|
} else
|
|
1467
|
-
|
|
1468
|
-
return this.expectOptionalToken(a.BANG) ? this.node(
|
|
1469
|
-
kind:
|
|
1470
|
-
type:
|
|
1471
|
-
}) :
|
|
1453
|
+
e = this.parseNamedType();
|
|
1454
|
+
return this.expectOptionalToken(a.BANG) ? this.node(n, {
|
|
1455
|
+
kind: c.NON_NULL_TYPE,
|
|
1456
|
+
type: e
|
|
1457
|
+
}) : e;
|
|
1472
1458
|
}
|
|
1473
1459
|
/**
|
|
1474
1460
|
* NamedType : Name
|
|
1475
1461
|
*/
|
|
1476
1462
|
parseNamedType() {
|
|
1477
1463
|
return this.node(this._lexer.token, {
|
|
1478
|
-
kind:
|
|
1464
|
+
kind: c.NAMED_TYPE,
|
|
1479
1465
|
name: this.parseName()
|
|
1480
1466
|
});
|
|
1481
1467
|
}
|
|
@@ -1496,16 +1482,16 @@ class yt {
|
|
|
1496
1482
|
* ```
|
|
1497
1483
|
*/
|
|
1498
1484
|
parseSchemaDefinition() {
|
|
1499
|
-
const
|
|
1485
|
+
const n = this._lexer.token, e = this.parseDescription();
|
|
1500
1486
|
this.expectKeyword("schema");
|
|
1501
1487
|
const i = this.parseConstDirectives(), r = this.many(
|
|
1502
1488
|
a.BRACE_L,
|
|
1503
1489
|
this.parseOperationTypeDefinition,
|
|
1504
1490
|
a.BRACE_R
|
|
1505
1491
|
);
|
|
1506
|
-
return this.node(
|
|
1507
|
-
kind:
|
|
1508
|
-
description:
|
|
1492
|
+
return this.node(n, {
|
|
1493
|
+
kind: c.SCHEMA_DEFINITION,
|
|
1494
|
+
description: e,
|
|
1509
1495
|
directives: i,
|
|
1510
1496
|
operationTypes: r
|
|
1511
1497
|
});
|
|
@@ -1514,12 +1500,12 @@ class yt {
|
|
|
1514
1500
|
* OperationTypeDefinition : OperationType : NamedType
|
|
1515
1501
|
*/
|
|
1516
1502
|
parseOperationTypeDefinition() {
|
|
1517
|
-
const
|
|
1503
|
+
const n = this._lexer.token, e = this.parseOperationType();
|
|
1518
1504
|
this.expectToken(a.COLON);
|
|
1519
1505
|
const i = this.parseNamedType();
|
|
1520
|
-
return this.node(
|
|
1521
|
-
kind:
|
|
1522
|
-
operation:
|
|
1506
|
+
return this.node(n, {
|
|
1507
|
+
kind: c.OPERATION_TYPE_DEFINITION,
|
|
1508
|
+
operation: e,
|
|
1523
1509
|
type: i
|
|
1524
1510
|
});
|
|
1525
1511
|
}
|
|
@@ -1527,12 +1513,12 @@ class yt {
|
|
|
1527
1513
|
* ScalarTypeDefinition : Description? scalar Name Directives[Const]?
|
|
1528
1514
|
*/
|
|
1529
1515
|
parseScalarTypeDefinition() {
|
|
1530
|
-
const
|
|
1516
|
+
const n = this._lexer.token, e = this.parseDescription();
|
|
1531
1517
|
this.expectKeyword("scalar");
|
|
1532
1518
|
const i = this.parseName(), r = this.parseConstDirectives();
|
|
1533
|
-
return this.node(
|
|
1534
|
-
kind:
|
|
1535
|
-
description:
|
|
1519
|
+
return this.node(n, {
|
|
1520
|
+
kind: c.SCALAR_TYPE_DEFINITION,
|
|
1521
|
+
description: e,
|
|
1536
1522
|
name: i,
|
|
1537
1523
|
directives: r
|
|
1538
1524
|
});
|
|
@@ -1543,12 +1529,12 @@ class yt {
|
|
|
1543
1529
|
* type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition?
|
|
1544
1530
|
*/
|
|
1545
1531
|
parseObjectTypeDefinition() {
|
|
1546
|
-
const
|
|
1532
|
+
const n = this._lexer.token, e = this.parseDescription();
|
|
1547
1533
|
this.expectKeyword("type");
|
|
1548
1534
|
const i = this.parseName(), r = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), o = this.parseFieldsDefinition();
|
|
1549
|
-
return this.node(
|
|
1550
|
-
kind:
|
|
1551
|
-
description:
|
|
1535
|
+
return this.node(n, {
|
|
1536
|
+
kind: c.OBJECT_TYPE_DEFINITION,
|
|
1537
|
+
description: e,
|
|
1552
1538
|
name: i,
|
|
1553
1539
|
interfaces: r,
|
|
1554
1540
|
directives: s,
|
|
@@ -1580,12 +1566,12 @@ class yt {
|
|
|
1580
1566
|
* - Description? Name ArgumentsDefinition? : Type Directives[Const]?
|
|
1581
1567
|
*/
|
|
1582
1568
|
parseFieldDefinition() {
|
|
1583
|
-
const
|
|
1569
|
+
const n = this._lexer.token, e = this.parseDescription(), i = this.parseName(), r = this.parseArgumentDefs();
|
|
1584
1570
|
this.expectToken(a.COLON);
|
|
1585
1571
|
const s = this.parseTypeReference(), o = this.parseConstDirectives();
|
|
1586
|
-
return this.node(
|
|
1587
|
-
kind:
|
|
1588
|
-
description:
|
|
1572
|
+
return this.node(n, {
|
|
1573
|
+
kind: c.FIELD_DEFINITION,
|
|
1574
|
+
description: e,
|
|
1589
1575
|
name: i,
|
|
1590
1576
|
arguments: r,
|
|
1591
1577
|
type: s,
|
|
@@ -1607,15 +1593,15 @@ class yt {
|
|
|
1607
1593
|
* - Description? Name : Type DefaultValue? Directives[Const]?
|
|
1608
1594
|
*/
|
|
1609
1595
|
parseInputValueDef() {
|
|
1610
|
-
const
|
|
1596
|
+
const n = this._lexer.token, e = this.parseDescription(), i = this.parseName();
|
|
1611
1597
|
this.expectToken(a.COLON);
|
|
1612
1598
|
const r = this.parseTypeReference();
|
|
1613
1599
|
let s;
|
|
1614
1600
|
this.expectOptionalToken(a.EQUALS) && (s = this.parseConstValueLiteral());
|
|
1615
1601
|
const o = this.parseConstDirectives();
|
|
1616
|
-
return this.node(
|
|
1617
|
-
kind:
|
|
1618
|
-
description:
|
|
1602
|
+
return this.node(n, {
|
|
1603
|
+
kind: c.INPUT_VALUE_DEFINITION,
|
|
1604
|
+
description: e,
|
|
1619
1605
|
name: i,
|
|
1620
1606
|
type: r,
|
|
1621
1607
|
defaultValue: s,
|
|
@@ -1627,12 +1613,12 @@ class yt {
|
|
|
1627
1613
|
* - Description? interface Name Directives[Const]? FieldsDefinition?
|
|
1628
1614
|
*/
|
|
1629
1615
|
parseInterfaceTypeDefinition() {
|
|
1630
|
-
const
|
|
1616
|
+
const n = this._lexer.token, e = this.parseDescription();
|
|
1631
1617
|
this.expectKeyword("interface");
|
|
1632
1618
|
const i = this.parseName(), r = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), o = this.parseFieldsDefinition();
|
|
1633
|
-
return this.node(
|
|
1634
|
-
kind:
|
|
1635
|
-
description:
|
|
1619
|
+
return this.node(n, {
|
|
1620
|
+
kind: c.INTERFACE_TYPE_DEFINITION,
|
|
1621
|
+
description: e,
|
|
1636
1622
|
name: i,
|
|
1637
1623
|
interfaces: r,
|
|
1638
1624
|
directives: s,
|
|
@@ -1644,12 +1630,12 @@ class yt {
|
|
|
1644
1630
|
* - Description? union Name Directives[Const]? UnionMemberTypes?
|
|
1645
1631
|
*/
|
|
1646
1632
|
parseUnionTypeDefinition() {
|
|
1647
|
-
const
|
|
1633
|
+
const n = this._lexer.token, e = this.parseDescription();
|
|
1648
1634
|
this.expectKeyword("union");
|
|
1649
1635
|
const i = this.parseName(), r = this.parseConstDirectives(), s = this.parseUnionMemberTypes();
|
|
1650
|
-
return this.node(
|
|
1651
|
-
kind:
|
|
1652
|
-
description:
|
|
1636
|
+
return this.node(n, {
|
|
1637
|
+
kind: c.UNION_TYPE_DEFINITION,
|
|
1638
|
+
description: e,
|
|
1653
1639
|
name: i,
|
|
1654
1640
|
directives: r,
|
|
1655
1641
|
types: s
|
|
@@ -1668,12 +1654,12 @@ class yt {
|
|
|
1668
1654
|
* - Description? enum Name Directives[Const]? EnumValuesDefinition?
|
|
1669
1655
|
*/
|
|
1670
1656
|
parseEnumTypeDefinition() {
|
|
1671
|
-
const
|
|
1657
|
+
const n = this._lexer.token, e = this.parseDescription();
|
|
1672
1658
|
this.expectKeyword("enum");
|
|
1673
1659
|
const i = this.parseName(), r = this.parseConstDirectives(), s = this.parseEnumValuesDefinition();
|
|
1674
|
-
return this.node(
|
|
1675
|
-
kind:
|
|
1676
|
-
description:
|
|
1660
|
+
return this.node(n, {
|
|
1661
|
+
kind: c.ENUM_TYPE_DEFINITION,
|
|
1662
|
+
description: e,
|
|
1677
1663
|
name: i,
|
|
1678
1664
|
directives: r,
|
|
1679
1665
|
values: s
|
|
@@ -1695,10 +1681,10 @@ class yt {
|
|
|
1695
1681
|
* EnumValueDefinition : Description? EnumValue Directives[Const]?
|
|
1696
1682
|
*/
|
|
1697
1683
|
parseEnumValueDefinition() {
|
|
1698
|
-
const
|
|
1699
|
-
return this.node(
|
|
1700
|
-
kind:
|
|
1701
|
-
description:
|
|
1684
|
+
const n = this._lexer.token, e = this.parseDescription(), i = this.parseEnumValueName(), r = this.parseConstDirectives();
|
|
1685
|
+
return this.node(n, {
|
|
1686
|
+
kind: c.ENUM_VALUE_DEFINITION,
|
|
1687
|
+
description: e,
|
|
1702
1688
|
name: i,
|
|
1703
1689
|
directives: r
|
|
1704
1690
|
});
|
|
@@ -1708,10 +1694,10 @@ class yt {
|
|
|
1708
1694
|
*/
|
|
1709
1695
|
parseEnumValueName() {
|
|
1710
1696
|
if (this._lexer.token.value === "true" || this._lexer.token.value === "false" || this._lexer.token.value === "null")
|
|
1711
|
-
throw
|
|
1697
|
+
throw I(
|
|
1712
1698
|
this._lexer.source,
|
|
1713
1699
|
this._lexer.token.start,
|
|
1714
|
-
`${
|
|
1700
|
+
`${_(
|
|
1715
1701
|
this._lexer.token
|
|
1716
1702
|
)} is reserved and cannot be used for an enum value.`
|
|
1717
1703
|
);
|
|
@@ -1722,12 +1708,12 @@ class yt {
|
|
|
1722
1708
|
* - Description? input Name Directives[Const]? InputFieldsDefinition?
|
|
1723
1709
|
*/
|
|
1724
1710
|
parseInputObjectTypeDefinition() {
|
|
1725
|
-
const
|
|
1711
|
+
const n = this._lexer.token, e = this.parseDescription();
|
|
1726
1712
|
this.expectKeyword("input");
|
|
1727
1713
|
const i = this.parseName(), r = this.parseConstDirectives(), s = this.parseInputFieldsDefinition();
|
|
1728
|
-
return this.node(
|
|
1729
|
-
kind:
|
|
1730
|
-
description:
|
|
1714
|
+
return this.node(n, {
|
|
1715
|
+
kind: c.INPUT_OBJECT_TYPE_DEFINITION,
|
|
1716
|
+
description: e,
|
|
1731
1717
|
name: i,
|
|
1732
1718
|
directives: r,
|
|
1733
1719
|
fields: s
|
|
@@ -1759,9 +1745,9 @@ class yt {
|
|
|
1759
1745
|
* - InputObjectTypeDefinition
|
|
1760
1746
|
*/
|
|
1761
1747
|
parseTypeSystemExtension() {
|
|
1762
|
-
const
|
|
1763
|
-
if (
|
|
1764
|
-
switch (
|
|
1748
|
+
const n = this._lexer.lookahead();
|
|
1749
|
+
if (n.kind === a.NAME)
|
|
1750
|
+
switch (n.value) {
|
|
1765
1751
|
case "schema":
|
|
1766
1752
|
return this.parseSchemaExtension();
|
|
1767
1753
|
case "scalar":
|
|
@@ -1777,7 +1763,7 @@ class yt {
|
|
|
1777
1763
|
case "input":
|
|
1778
1764
|
return this.parseInputObjectTypeExtension();
|
|
1779
1765
|
}
|
|
1780
|
-
throw this.unexpected(
|
|
1766
|
+
throw this.unexpected(n);
|
|
1781
1767
|
}
|
|
1782
1768
|
/**
|
|
1783
1769
|
* ```
|
|
@@ -1787,18 +1773,18 @@ class yt {
|
|
|
1787
1773
|
* ```
|
|
1788
1774
|
*/
|
|
1789
1775
|
parseSchemaExtension() {
|
|
1790
|
-
const
|
|
1776
|
+
const n = this._lexer.token;
|
|
1791
1777
|
this.expectKeyword("extend"), this.expectKeyword("schema");
|
|
1792
|
-
const
|
|
1778
|
+
const e = this.parseConstDirectives(), i = this.optionalMany(
|
|
1793
1779
|
a.BRACE_L,
|
|
1794
1780
|
this.parseOperationTypeDefinition,
|
|
1795
1781
|
a.BRACE_R
|
|
1796
1782
|
);
|
|
1797
|
-
if (
|
|
1783
|
+
if (e.length === 0 && i.length === 0)
|
|
1798
1784
|
throw this.unexpected();
|
|
1799
|
-
return this.node(
|
|
1800
|
-
kind:
|
|
1801
|
-
directives:
|
|
1785
|
+
return this.node(n, {
|
|
1786
|
+
kind: c.SCHEMA_EXTENSION,
|
|
1787
|
+
directives: e,
|
|
1802
1788
|
operationTypes: i
|
|
1803
1789
|
});
|
|
1804
1790
|
}
|
|
@@ -1807,14 +1793,14 @@ class yt {
|
|
|
1807
1793
|
* - extend scalar Name Directives[Const]
|
|
1808
1794
|
*/
|
|
1809
1795
|
parseScalarTypeExtension() {
|
|
1810
|
-
const
|
|
1796
|
+
const n = this._lexer.token;
|
|
1811
1797
|
this.expectKeyword("extend"), this.expectKeyword("scalar");
|
|
1812
|
-
const
|
|
1798
|
+
const e = this.parseName(), i = this.parseConstDirectives();
|
|
1813
1799
|
if (i.length === 0)
|
|
1814
1800
|
throw this.unexpected();
|
|
1815
|
-
return this.node(
|
|
1816
|
-
kind:
|
|
1817
|
-
name:
|
|
1801
|
+
return this.node(n, {
|
|
1802
|
+
kind: c.SCALAR_TYPE_EXTENSION,
|
|
1803
|
+
name: e,
|
|
1818
1804
|
directives: i
|
|
1819
1805
|
});
|
|
1820
1806
|
}
|
|
@@ -1825,14 +1811,14 @@ class yt {
|
|
|
1825
1811
|
* - extend type Name ImplementsInterfaces
|
|
1826
1812
|
*/
|
|
1827
1813
|
parseObjectTypeExtension() {
|
|
1828
|
-
const
|
|
1814
|
+
const n = this._lexer.token;
|
|
1829
1815
|
this.expectKeyword("extend"), this.expectKeyword("type");
|
|
1830
|
-
const
|
|
1816
|
+
const e = this.parseName(), i = this.parseImplementsInterfaces(), r = this.parseConstDirectives(), s = this.parseFieldsDefinition();
|
|
1831
1817
|
if (i.length === 0 && r.length === 0 && s.length === 0)
|
|
1832
1818
|
throw this.unexpected();
|
|
1833
|
-
return this.node(
|
|
1834
|
-
kind:
|
|
1835
|
-
name:
|
|
1819
|
+
return this.node(n, {
|
|
1820
|
+
kind: c.OBJECT_TYPE_EXTENSION,
|
|
1821
|
+
name: e,
|
|
1836
1822
|
interfaces: i,
|
|
1837
1823
|
directives: r,
|
|
1838
1824
|
fields: s
|
|
@@ -1845,14 +1831,14 @@ class yt {
|
|
|
1845
1831
|
* - extend interface Name ImplementsInterfaces
|
|
1846
1832
|
*/
|
|
1847
1833
|
parseInterfaceTypeExtension() {
|
|
1848
|
-
const
|
|
1834
|
+
const n = this._lexer.token;
|
|
1849
1835
|
this.expectKeyword("extend"), this.expectKeyword("interface");
|
|
1850
|
-
const
|
|
1836
|
+
const e = this.parseName(), i = this.parseImplementsInterfaces(), r = this.parseConstDirectives(), s = this.parseFieldsDefinition();
|
|
1851
1837
|
if (i.length === 0 && r.length === 0 && s.length === 0)
|
|
1852
1838
|
throw this.unexpected();
|
|
1853
|
-
return this.node(
|
|
1854
|
-
kind:
|
|
1855
|
-
name:
|
|
1839
|
+
return this.node(n, {
|
|
1840
|
+
kind: c.INTERFACE_TYPE_EXTENSION,
|
|
1841
|
+
name: e,
|
|
1856
1842
|
interfaces: i,
|
|
1857
1843
|
directives: r,
|
|
1858
1844
|
fields: s
|
|
@@ -1864,14 +1850,14 @@ class yt {
|
|
|
1864
1850
|
* - extend union Name Directives[Const]
|
|
1865
1851
|
*/
|
|
1866
1852
|
parseUnionTypeExtension() {
|
|
1867
|
-
const
|
|
1853
|
+
const n = this._lexer.token;
|
|
1868
1854
|
this.expectKeyword("extend"), this.expectKeyword("union");
|
|
1869
|
-
const
|
|
1855
|
+
const e = this.parseName(), i = this.parseConstDirectives(), r = this.parseUnionMemberTypes();
|
|
1870
1856
|
if (i.length === 0 && r.length === 0)
|
|
1871
1857
|
throw this.unexpected();
|
|
1872
|
-
return this.node(
|
|
1873
|
-
kind:
|
|
1874
|
-
name:
|
|
1858
|
+
return this.node(n, {
|
|
1859
|
+
kind: c.UNION_TYPE_EXTENSION,
|
|
1860
|
+
name: e,
|
|
1875
1861
|
directives: i,
|
|
1876
1862
|
types: r
|
|
1877
1863
|
});
|
|
@@ -1882,14 +1868,14 @@ class yt {
|
|
|
1882
1868
|
* - extend enum Name Directives[Const]
|
|
1883
1869
|
*/
|
|
1884
1870
|
parseEnumTypeExtension() {
|
|
1885
|
-
const
|
|
1871
|
+
const n = this._lexer.token;
|
|
1886
1872
|
this.expectKeyword("extend"), this.expectKeyword("enum");
|
|
1887
|
-
const
|
|
1873
|
+
const e = this.parseName(), i = this.parseConstDirectives(), r = this.parseEnumValuesDefinition();
|
|
1888
1874
|
if (i.length === 0 && r.length === 0)
|
|
1889
1875
|
throw this.unexpected();
|
|
1890
|
-
return this.node(
|
|
1891
|
-
kind:
|
|
1892
|
-
name:
|
|
1876
|
+
return this.node(n, {
|
|
1877
|
+
kind: c.ENUM_TYPE_EXTENSION,
|
|
1878
|
+
name: e,
|
|
1893
1879
|
directives: i,
|
|
1894
1880
|
values: r
|
|
1895
1881
|
});
|
|
@@ -1900,14 +1886,14 @@ class yt {
|
|
|
1900
1886
|
* - extend input Name Directives[Const]
|
|
1901
1887
|
*/
|
|
1902
1888
|
parseInputObjectTypeExtension() {
|
|
1903
|
-
const
|
|
1889
|
+
const n = this._lexer.token;
|
|
1904
1890
|
this.expectKeyword("extend"), this.expectKeyword("input");
|
|
1905
|
-
const
|
|
1891
|
+
const e = this.parseName(), i = this.parseConstDirectives(), r = this.parseInputFieldsDefinition();
|
|
1906
1892
|
if (i.length === 0 && r.length === 0)
|
|
1907
1893
|
throw this.unexpected();
|
|
1908
|
-
return this.node(
|
|
1909
|
-
kind:
|
|
1910
|
-
name:
|
|
1894
|
+
return this.node(n, {
|
|
1895
|
+
kind: c.INPUT_OBJECT_TYPE_EXTENSION,
|
|
1896
|
+
name: e,
|
|
1911
1897
|
directives: i,
|
|
1912
1898
|
fields: r
|
|
1913
1899
|
});
|
|
@@ -1919,14 +1905,14 @@ class yt {
|
|
|
1919
1905
|
* ```
|
|
1920
1906
|
*/
|
|
1921
1907
|
parseDirectiveDefinition() {
|
|
1922
|
-
const
|
|
1908
|
+
const n = this._lexer.token, e = this.parseDescription();
|
|
1923
1909
|
this.expectKeyword("directive"), this.expectToken(a.AT);
|
|
1924
1910
|
const i = this.parseName(), r = this.parseArgumentDefs(), s = this.expectOptionalKeyword("repeatable");
|
|
1925
1911
|
this.expectKeyword("on");
|
|
1926
1912
|
const o = this.parseDirectiveLocations();
|
|
1927
|
-
return this.node(
|
|
1928
|
-
kind:
|
|
1929
|
-
description:
|
|
1913
|
+
return this.node(n, {
|
|
1914
|
+
kind: c.DIRECTIVE_DEFINITION,
|
|
1915
|
+
description: e,
|
|
1930
1916
|
name: i,
|
|
1931
1917
|
arguments: r,
|
|
1932
1918
|
repeatable: s,
|
|
@@ -1969,10 +1955,10 @@ class yt {
|
|
|
1969
1955
|
* `INPUT_FIELD_DEFINITION`
|
|
1970
1956
|
*/
|
|
1971
1957
|
parseDirectiveLocation() {
|
|
1972
|
-
const
|
|
1973
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
1974
|
-
return
|
|
1975
|
-
throw this.unexpected(
|
|
1958
|
+
const n = this._lexer.token, e = this.parseName();
|
|
1959
|
+
if (Object.prototype.hasOwnProperty.call(q, e.value))
|
|
1960
|
+
return e;
|
|
1961
|
+
throw this.unexpected(n);
|
|
1976
1962
|
}
|
|
1977
1963
|
// Schema Coordinates
|
|
1978
1964
|
/**
|
|
@@ -1984,28 +1970,28 @@ class yt {
|
|
|
1984
1970
|
* - \@ Name ( Name : )
|
|
1985
1971
|
*/
|
|
1986
1972
|
parseSchemaCoordinate() {
|
|
1987
|
-
const
|
|
1973
|
+
const n = this._lexer.token, e = this.expectOptionalToken(a.AT), i = this.parseName();
|
|
1988
1974
|
let r;
|
|
1989
|
-
!
|
|
1975
|
+
!e && this.expectOptionalToken(a.DOT) && (r = this.parseName());
|
|
1990
1976
|
let s;
|
|
1991
|
-
return (
|
|
1992
|
-
kind:
|
|
1977
|
+
return (e || r) && this.expectOptionalToken(a.PAREN_L) && (s = this.parseName(), this.expectToken(a.COLON), this.expectToken(a.PAREN_R)), e ? s ? this.node(n, {
|
|
1978
|
+
kind: c.DIRECTIVE_ARGUMENT_COORDINATE,
|
|
1993
1979
|
name: i,
|
|
1994
1980
|
argumentName: s
|
|
1995
|
-
}) : this.node(
|
|
1996
|
-
kind:
|
|
1981
|
+
}) : this.node(n, {
|
|
1982
|
+
kind: c.DIRECTIVE_COORDINATE,
|
|
1997
1983
|
name: i
|
|
1998
|
-
}) : r ? s ? this.node(
|
|
1999
|
-
kind:
|
|
1984
|
+
}) : r ? s ? this.node(n, {
|
|
1985
|
+
kind: c.ARGUMENT_COORDINATE,
|
|
2000
1986
|
name: i,
|
|
2001
1987
|
fieldName: r,
|
|
2002
1988
|
argumentName: s
|
|
2003
|
-
}) : this.node(
|
|
2004
|
-
kind:
|
|
1989
|
+
}) : this.node(n, {
|
|
1990
|
+
kind: c.MEMBER_COORDINATE,
|
|
2005
1991
|
name: i,
|
|
2006
1992
|
memberName: r
|
|
2007
|
-
}) : this.node(
|
|
2008
|
-
kind:
|
|
1993
|
+
}) : this.node(n, {
|
|
1994
|
+
kind: c.TYPE_COORDINATE,
|
|
2009
1995
|
name: i
|
|
2010
1996
|
});
|
|
2011
1997
|
}
|
|
@@ -2015,72 +2001,72 @@ class yt {
|
|
|
2015
2001
|
* location object, used to identify the place in the source that created a
|
|
2016
2002
|
* given parsed object.
|
|
2017
2003
|
*/
|
|
2018
|
-
node(
|
|
2019
|
-
return this._options.noLocation !== !0 && (
|
|
2020
|
-
|
|
2004
|
+
node(n, e) {
|
|
2005
|
+
return this._options.noLocation !== !0 && (e.loc = new xe(
|
|
2006
|
+
n,
|
|
2021
2007
|
this._lexer.lastToken,
|
|
2022
2008
|
this._lexer.source
|
|
2023
|
-
)),
|
|
2009
|
+
)), e;
|
|
2024
2010
|
}
|
|
2025
2011
|
/**
|
|
2026
2012
|
* Determines if the next token is of a given kind
|
|
2027
2013
|
*/
|
|
2028
|
-
peek(
|
|
2029
|
-
return this._lexer.token.kind ===
|
|
2014
|
+
peek(n) {
|
|
2015
|
+
return this._lexer.token.kind === n;
|
|
2030
2016
|
}
|
|
2031
2017
|
/**
|
|
2032
2018
|
* If the next token is of the given kind, return that token after advancing the lexer.
|
|
2033
2019
|
* Otherwise, do not change the parser state and throw an error.
|
|
2034
2020
|
*/
|
|
2035
|
-
expectToken(
|
|
2036
|
-
const
|
|
2037
|
-
if (
|
|
2038
|
-
return this.advanceLexer(),
|
|
2039
|
-
throw
|
|
2021
|
+
expectToken(n) {
|
|
2022
|
+
const e = this._lexer.token;
|
|
2023
|
+
if (e.kind === n)
|
|
2024
|
+
return this.advanceLexer(), e;
|
|
2025
|
+
throw I(
|
|
2040
2026
|
this._lexer.source,
|
|
2041
|
-
|
|
2042
|
-
`Expected ${
|
|
2027
|
+
e.start,
|
|
2028
|
+
`Expected ${Ie(n)}, found ${_(e)}.`
|
|
2043
2029
|
);
|
|
2044
2030
|
}
|
|
2045
2031
|
/**
|
|
2046
2032
|
* If the next token is of the given kind, return "true" after advancing the lexer.
|
|
2047
2033
|
* Otherwise, do not change the parser state and return "false".
|
|
2048
2034
|
*/
|
|
2049
|
-
expectOptionalToken(
|
|
2050
|
-
return this._lexer.token.kind ===
|
|
2035
|
+
expectOptionalToken(n) {
|
|
2036
|
+
return this._lexer.token.kind === n ? (this.advanceLexer(), !0) : !1;
|
|
2051
2037
|
}
|
|
2052
2038
|
/**
|
|
2053
2039
|
* If the next token is a given keyword, advance the lexer.
|
|
2054
2040
|
* Otherwise, do not change the parser state and throw an error.
|
|
2055
2041
|
*/
|
|
2056
|
-
expectKeyword(
|
|
2057
|
-
const
|
|
2058
|
-
if (
|
|
2042
|
+
expectKeyword(n) {
|
|
2043
|
+
const e = this._lexer.token;
|
|
2044
|
+
if (e.kind === a.NAME && e.value === n)
|
|
2059
2045
|
this.advanceLexer();
|
|
2060
2046
|
else
|
|
2061
|
-
throw
|
|
2047
|
+
throw I(
|
|
2062
2048
|
this._lexer.source,
|
|
2063
|
-
|
|
2064
|
-
`Expected "${
|
|
2049
|
+
e.start,
|
|
2050
|
+
`Expected "${n}", found ${_(e)}.`
|
|
2065
2051
|
);
|
|
2066
2052
|
}
|
|
2067
2053
|
/**
|
|
2068
2054
|
* If the next token is a given keyword, return "true" after advancing the lexer.
|
|
2069
2055
|
* Otherwise, do not change the parser state and return "false".
|
|
2070
2056
|
*/
|
|
2071
|
-
expectOptionalKeyword(
|
|
2072
|
-
const
|
|
2073
|
-
return
|
|
2057
|
+
expectOptionalKeyword(n) {
|
|
2058
|
+
const e = this._lexer.token;
|
|
2059
|
+
return e.kind === a.NAME && e.value === n ? (this.advanceLexer(), !0) : !1;
|
|
2074
2060
|
}
|
|
2075
2061
|
/**
|
|
2076
2062
|
* Helper function for creating an error when an unexpected lexed token is encountered.
|
|
2077
2063
|
*/
|
|
2078
|
-
unexpected(
|
|
2079
|
-
const
|
|
2080
|
-
return
|
|
2064
|
+
unexpected(n) {
|
|
2065
|
+
const e = n ?? this._lexer.token;
|
|
2066
|
+
return I(
|
|
2081
2067
|
this._lexer.source,
|
|
2082
|
-
|
|
2083
|
-
`Unexpected ${
|
|
2068
|
+
e.start,
|
|
2069
|
+
`Unexpected ${_(e)}.`
|
|
2084
2070
|
);
|
|
2085
2071
|
}
|
|
2086
2072
|
/**
|
|
@@ -2088,11 +2074,11 @@ class yt {
|
|
|
2088
2074
|
* This list begins with a lex token of openKind and ends with a lex token of closeKind.
|
|
2089
2075
|
* Advances the parser to the next lex token after the closing token.
|
|
2090
2076
|
*/
|
|
2091
|
-
any(
|
|
2092
|
-
this.expectToken(
|
|
2077
|
+
any(n, e, i) {
|
|
2078
|
+
this.expectToken(n);
|
|
2093
2079
|
const r = [];
|
|
2094
2080
|
for (; !this.expectOptionalToken(i); )
|
|
2095
|
-
r.push(
|
|
2081
|
+
r.push(e.call(this));
|
|
2096
2082
|
return r;
|
|
2097
2083
|
}
|
|
2098
2084
|
/**
|
|
@@ -2101,11 +2087,11 @@ class yt {
|
|
|
2101
2087
|
* that begins with a lex token of openKind and ends with a lex token of closeKind.
|
|
2102
2088
|
* Advances the parser to the next lex token after the closing token.
|
|
2103
2089
|
*/
|
|
2104
|
-
optionalMany(
|
|
2105
|
-
if (this.expectOptionalToken(
|
|
2090
|
+
optionalMany(n, e, i) {
|
|
2091
|
+
if (this.expectOptionalToken(n)) {
|
|
2106
2092
|
const r = [];
|
|
2107
2093
|
do
|
|
2108
|
-
r.push(
|
|
2094
|
+
r.push(e.call(this));
|
|
2109
2095
|
while (!this.expectOptionalToken(i));
|
|
2110
2096
|
return r;
|
|
2111
2097
|
}
|
|
@@ -2116,11 +2102,11 @@ class yt {
|
|
|
2116
2102
|
* This list begins with a lex token of openKind and ends with a lex token of closeKind.
|
|
2117
2103
|
* Advances the parser to the next lex token after the closing token.
|
|
2118
2104
|
*/
|
|
2119
|
-
many(
|
|
2120
|
-
this.expectToken(
|
|
2105
|
+
many(n, e, i) {
|
|
2106
|
+
this.expectToken(n);
|
|
2121
2107
|
const r = [];
|
|
2122
2108
|
do
|
|
2123
|
-
r.push(
|
|
2109
|
+
r.push(e.call(this));
|
|
2124
2110
|
while (!this.expectOptionalToken(i));
|
|
2125
2111
|
return r;
|
|
2126
2112
|
}
|
|
@@ -2129,645 +2115,107 @@ class yt {
|
|
|
2129
2115
|
* This list may begin with a lex token of delimiterKind followed by items separated by lex tokens of tokenKind.
|
|
2130
2116
|
* Advances the parser to the next lex token after last item in the list.
|
|
2131
2117
|
*/
|
|
2132
|
-
delimitedMany(
|
|
2133
|
-
this.expectOptionalToken(
|
|
2118
|
+
delimitedMany(n, e) {
|
|
2119
|
+
this.expectOptionalToken(n);
|
|
2134
2120
|
const i = [];
|
|
2135
2121
|
do
|
|
2136
|
-
i.push(
|
|
2137
|
-
while (this.expectOptionalToken(
|
|
2122
|
+
i.push(e.call(this));
|
|
2123
|
+
while (this.expectOptionalToken(n));
|
|
2138
2124
|
return i;
|
|
2139
2125
|
}
|
|
2140
2126
|
advanceLexer() {
|
|
2141
|
-
const { maxTokens:
|
|
2142
|
-
if (
|
|
2143
|
-
throw
|
|
2127
|
+
const { maxTokens: n } = this._options, e = this._lexer.advance();
|
|
2128
|
+
if (e.kind !== a.EOF && (++this._tokenCounter, n !== void 0 && this._tokenCounter > n))
|
|
2129
|
+
throw I(
|
|
2144
2130
|
this._lexer.source,
|
|
2145
|
-
|
|
2146
|
-
`Document contains more that ${
|
|
2131
|
+
e.start,
|
|
2132
|
+
`Document contains more that ${n} tokens. Parsing aborted.`
|
|
2147
2133
|
);
|
|
2148
2134
|
}
|
|
2149
2135
|
}
|
|
2150
|
-
function
|
|
2151
|
-
const
|
|
2152
|
-
return
|
|
2153
|
-
}
|
|
2154
|
-
function Fe(e) {
|
|
2155
|
-
return Ke(e) ? `"${e}"` : e;
|
|
2156
|
-
}
|
|
2157
|
-
function Tt(e) {
|
|
2158
|
-
return `"${e.replace(vt, kt)}"`;
|
|
2159
|
-
}
|
|
2160
|
-
const vt = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g;
|
|
2161
|
-
function kt(e) {
|
|
2162
|
-
return Ot[e.charCodeAt(0)];
|
|
2163
|
-
}
|
|
2164
|
-
const Ot = [
|
|
2165
|
-
"\\u0000",
|
|
2166
|
-
"\\u0001",
|
|
2167
|
-
"\\u0002",
|
|
2168
|
-
"\\u0003",
|
|
2169
|
-
"\\u0004",
|
|
2170
|
-
"\\u0005",
|
|
2171
|
-
"\\u0006",
|
|
2172
|
-
"\\u0007",
|
|
2173
|
-
"\\b",
|
|
2174
|
-
"\\t",
|
|
2175
|
-
"\\n",
|
|
2176
|
-
"\\u000B",
|
|
2177
|
-
"\\f",
|
|
2178
|
-
"\\r",
|
|
2179
|
-
"\\u000E",
|
|
2180
|
-
"\\u000F",
|
|
2181
|
-
"\\u0010",
|
|
2182
|
-
"\\u0011",
|
|
2183
|
-
"\\u0012",
|
|
2184
|
-
"\\u0013",
|
|
2185
|
-
"\\u0014",
|
|
2186
|
-
"\\u0015",
|
|
2187
|
-
"\\u0016",
|
|
2188
|
-
"\\u0017",
|
|
2189
|
-
"\\u0018",
|
|
2190
|
-
"\\u0019",
|
|
2191
|
-
"\\u001A",
|
|
2192
|
-
"\\u001B",
|
|
2193
|
-
"\\u001C",
|
|
2194
|
-
"\\u001D",
|
|
2195
|
-
"\\u001E",
|
|
2196
|
-
"\\u001F",
|
|
2197
|
-
"",
|
|
2198
|
-
"",
|
|
2199
|
-
'\\"',
|
|
2200
|
-
"",
|
|
2201
|
-
"",
|
|
2202
|
-
"",
|
|
2203
|
-
"",
|
|
2204
|
-
"",
|
|
2205
|
-
"",
|
|
2206
|
-
"",
|
|
2207
|
-
"",
|
|
2208
|
-
"",
|
|
2209
|
-
"",
|
|
2210
|
-
"",
|
|
2211
|
-
"",
|
|
2212
|
-
"",
|
|
2213
|
-
// 2F
|
|
2214
|
-
"",
|
|
2215
|
-
"",
|
|
2216
|
-
"",
|
|
2217
|
-
"",
|
|
2218
|
-
"",
|
|
2219
|
-
"",
|
|
2220
|
-
"",
|
|
2221
|
-
"",
|
|
2222
|
-
"",
|
|
2223
|
-
"",
|
|
2224
|
-
"",
|
|
2225
|
-
"",
|
|
2226
|
-
"",
|
|
2227
|
-
"",
|
|
2228
|
-
"",
|
|
2229
|
-
"",
|
|
2230
|
-
// 3F
|
|
2231
|
-
"",
|
|
2232
|
-
"",
|
|
2233
|
-
"",
|
|
2234
|
-
"",
|
|
2235
|
-
"",
|
|
2236
|
-
"",
|
|
2237
|
-
"",
|
|
2238
|
-
"",
|
|
2239
|
-
"",
|
|
2240
|
-
"",
|
|
2241
|
-
"",
|
|
2242
|
-
"",
|
|
2243
|
-
"",
|
|
2244
|
-
"",
|
|
2245
|
-
"",
|
|
2246
|
-
"",
|
|
2247
|
-
// 4F
|
|
2248
|
-
"",
|
|
2249
|
-
"",
|
|
2250
|
-
"",
|
|
2251
|
-
"",
|
|
2252
|
-
"",
|
|
2253
|
-
"",
|
|
2254
|
-
"",
|
|
2255
|
-
"",
|
|
2256
|
-
"",
|
|
2257
|
-
"",
|
|
2258
|
-
"",
|
|
2259
|
-
"",
|
|
2260
|
-
"\\\\",
|
|
2261
|
-
"",
|
|
2262
|
-
"",
|
|
2263
|
-
"",
|
|
2264
|
-
// 5F
|
|
2265
|
-
"",
|
|
2266
|
-
"",
|
|
2267
|
-
"",
|
|
2268
|
-
"",
|
|
2269
|
-
"",
|
|
2270
|
-
"",
|
|
2271
|
-
"",
|
|
2272
|
-
"",
|
|
2273
|
-
"",
|
|
2274
|
-
"",
|
|
2275
|
-
"",
|
|
2276
|
-
"",
|
|
2277
|
-
"",
|
|
2278
|
-
"",
|
|
2279
|
-
"",
|
|
2280
|
-
"",
|
|
2281
|
-
// 6F
|
|
2282
|
-
"",
|
|
2283
|
-
"",
|
|
2284
|
-
"",
|
|
2285
|
-
"",
|
|
2286
|
-
"",
|
|
2287
|
-
"",
|
|
2288
|
-
"",
|
|
2289
|
-
"",
|
|
2290
|
-
"",
|
|
2291
|
-
"",
|
|
2292
|
-
"",
|
|
2293
|
-
"",
|
|
2294
|
-
"",
|
|
2295
|
-
"",
|
|
2296
|
-
"",
|
|
2297
|
-
"\\u007F",
|
|
2298
|
-
"\\u0080",
|
|
2299
|
-
"\\u0081",
|
|
2300
|
-
"\\u0082",
|
|
2301
|
-
"\\u0083",
|
|
2302
|
-
"\\u0084",
|
|
2303
|
-
"\\u0085",
|
|
2304
|
-
"\\u0086",
|
|
2305
|
-
"\\u0087",
|
|
2306
|
-
"\\u0088",
|
|
2307
|
-
"\\u0089",
|
|
2308
|
-
"\\u008A",
|
|
2309
|
-
"\\u008B",
|
|
2310
|
-
"\\u008C",
|
|
2311
|
-
"\\u008D",
|
|
2312
|
-
"\\u008E",
|
|
2313
|
-
"\\u008F",
|
|
2314
|
-
"\\u0090",
|
|
2315
|
-
"\\u0091",
|
|
2316
|
-
"\\u0092",
|
|
2317
|
-
"\\u0093",
|
|
2318
|
-
"\\u0094",
|
|
2319
|
-
"\\u0095",
|
|
2320
|
-
"\\u0096",
|
|
2321
|
-
"\\u0097",
|
|
2322
|
-
"\\u0098",
|
|
2323
|
-
"\\u0099",
|
|
2324
|
-
"\\u009A",
|
|
2325
|
-
"\\u009B",
|
|
2326
|
-
"\\u009C",
|
|
2327
|
-
"\\u009D",
|
|
2328
|
-
"\\u009E",
|
|
2329
|
-
"\\u009F"
|
|
2330
|
-
], At = Object.freeze({});
|
|
2331
|
-
function Dt(e, t, n = Pe) {
|
|
2332
|
-
const i = /* @__PURE__ */ new Map();
|
|
2333
|
-
for (const O of Object.values(u))
|
|
2334
|
-
i.set(O, Nt(t, O));
|
|
2335
|
-
let r, s = Array.isArray(e), o = [e], p = -1, f = [], l = e, g, d;
|
|
2336
|
-
const m = [], y = [];
|
|
2337
|
-
do {
|
|
2338
|
-
p++;
|
|
2339
|
-
const O = p === o.length, C = O && f.length !== 0;
|
|
2340
|
-
if (O) {
|
|
2341
|
-
if (g = y.length === 0 ? void 0 : m[m.length - 1], l = d, d = y.pop(), C)
|
|
2342
|
-
if (s) {
|
|
2343
|
-
l = l.slice();
|
|
2344
|
-
let k = 0;
|
|
2345
|
-
for (const [A, x] of f) {
|
|
2346
|
-
const P = A - k;
|
|
2347
|
-
x === null ? (l.splice(P, 1), k++) : l[P] = x;
|
|
2348
|
-
}
|
|
2349
|
-
} else {
|
|
2350
|
-
l = { ...l };
|
|
2351
|
-
for (const [k, A] of f)
|
|
2352
|
-
l[k] = A;
|
|
2353
|
-
}
|
|
2354
|
-
p = r.index, o = r.keys, f = r.edits, s = r.inArray, r = r.prev;
|
|
2355
|
-
} else if (d) {
|
|
2356
|
-
if (g = s ? p : o[p], l = d[g], l == null)
|
|
2357
|
-
continue;
|
|
2358
|
-
m.push(g);
|
|
2359
|
-
}
|
|
2360
|
-
let b;
|
|
2361
|
-
if (!Array.isArray(l)) {
|
|
2362
|
-
var I, D;
|
|
2363
|
-
he(l) || z(!1, `Invalid AST Node: ${de(l)}.`);
|
|
2364
|
-
const k = O ? (I = i.get(l.kind)) === null || I === void 0 ? void 0 : I.leave : (D = i.get(l.kind)) === null || D === void 0 ? void 0 : D.enter;
|
|
2365
|
-
if (b = k?.call(t, l, g, d, m, y), b === At)
|
|
2366
|
-
break;
|
|
2367
|
-
if (b === !1) {
|
|
2368
|
-
if (!O) {
|
|
2369
|
-
m.pop();
|
|
2370
|
-
continue;
|
|
2371
|
-
}
|
|
2372
|
-
} else if (b !== void 0 && (f.push([g, b]), !O))
|
|
2373
|
-
if (he(b))
|
|
2374
|
-
l = b;
|
|
2375
|
-
else {
|
|
2376
|
-
m.pop();
|
|
2377
|
-
continue;
|
|
2378
|
-
}
|
|
2379
|
-
}
|
|
2380
|
-
if (b === void 0 && C && f.push([g, l]), O)
|
|
2381
|
-
m.pop();
|
|
2382
|
-
else {
|
|
2383
|
-
var N;
|
|
2384
|
-
r = {
|
|
2385
|
-
inArray: s,
|
|
2386
|
-
index: p,
|
|
2387
|
-
keys: o,
|
|
2388
|
-
edits: f,
|
|
2389
|
-
prev: r
|
|
2390
|
-
}, s = Array.isArray(l), o = s ? l : (N = n[l.kind]) !== null && N !== void 0 ? N : [], p = -1, f = [], d && y.push(d), d = l;
|
|
2391
|
-
}
|
|
2392
|
-
} while (r !== void 0);
|
|
2393
|
-
return f.length !== 0 ? f[f.length - 1][1] : e;
|
|
2394
|
-
}
|
|
2395
|
-
function Nt(e, t) {
|
|
2396
|
-
const n = e[t];
|
|
2397
|
-
return typeof n == "object" ? n : typeof n == "function" ? {
|
|
2398
|
-
enter: n,
|
|
2399
|
-
leave: void 0
|
|
2400
|
-
} : {
|
|
2401
|
-
enter: e.enter,
|
|
2402
|
-
leave: e.leave
|
|
2403
|
-
};
|
|
2136
|
+
function _(t) {
|
|
2137
|
+
const n = t.value;
|
|
2138
|
+
return Ie(t.kind) + (n != null ? ` "${n}"` : "");
|
|
2404
2139
|
}
|
|
2405
|
-
function
|
|
2406
|
-
return
|
|
2407
|
-
}
|
|
2408
|
-
const bt = 80, Pt = {
|
|
2409
|
-
Name: {
|
|
2410
|
-
leave: (e) => e.value
|
|
2411
|
-
},
|
|
2412
|
-
Variable: {
|
|
2413
|
-
leave: (e) => "$" + e.name
|
|
2414
|
-
},
|
|
2415
|
-
// Document
|
|
2416
|
-
Document: {
|
|
2417
|
-
leave: (e) => c(e.definitions, `
|
|
2418
|
-
|
|
2419
|
-
`)
|
|
2420
|
-
},
|
|
2421
|
-
OperationDefinition: {
|
|
2422
|
-
leave(e) {
|
|
2423
|
-
const t = te(e.variableDefinitions) ? h(`(
|
|
2424
|
-
`, c(e.variableDefinitions, `
|
|
2425
|
-
`), `
|
|
2426
|
-
)`) : h("(", c(e.variableDefinitions, ", "), ")"), n = h("", e.description, `
|
|
2427
|
-
`) + c(
|
|
2428
|
-
[
|
|
2429
|
-
e.operation,
|
|
2430
|
-
c([e.name, t]),
|
|
2431
|
-
c(e.directives, " ")
|
|
2432
|
-
],
|
|
2433
|
-
" "
|
|
2434
|
-
);
|
|
2435
|
-
return (n === "query" ? "" : n + " ") + e.selectionSet;
|
|
2436
|
-
}
|
|
2437
|
-
},
|
|
2438
|
-
VariableDefinition: {
|
|
2439
|
-
leave: ({ variable: e, type: t, defaultValue: n, directives: i, description: r }) => h("", r, `
|
|
2440
|
-
`) + e + ": " + t + h(" = ", n) + h(" ", c(i, " "))
|
|
2441
|
-
},
|
|
2442
|
-
SelectionSet: {
|
|
2443
|
-
leave: ({ selections: e }) => S(e)
|
|
2444
|
-
},
|
|
2445
|
-
Field: {
|
|
2446
|
-
leave({ alias: e, name: t, arguments: n, directives: i, selectionSet: r }) {
|
|
2447
|
-
const s = h("", e, ": ") + t;
|
|
2448
|
-
let o = s + h("(", c(n, ", "), ")");
|
|
2449
|
-
return o.length > bt && (o = s + h(`(
|
|
2450
|
-
`, j(c(n, `
|
|
2451
|
-
`)), `
|
|
2452
|
-
)`)), c([o, c(i, " "), r], " ");
|
|
2453
|
-
}
|
|
2454
|
-
},
|
|
2455
|
-
Argument: {
|
|
2456
|
-
leave: ({ name: e, value: t }) => e + ": " + t
|
|
2457
|
-
},
|
|
2458
|
-
// Fragments
|
|
2459
|
-
FragmentSpread: {
|
|
2460
|
-
leave: ({ name: e, directives: t }) => "..." + e + h(" ", c(t, " "))
|
|
2461
|
-
},
|
|
2462
|
-
InlineFragment: {
|
|
2463
|
-
leave: ({ typeCondition: e, directives: t, selectionSet: n }) => c(
|
|
2464
|
-
[
|
|
2465
|
-
"...",
|
|
2466
|
-
h("on ", e),
|
|
2467
|
-
c(t, " "),
|
|
2468
|
-
n
|
|
2469
|
-
],
|
|
2470
|
-
" "
|
|
2471
|
-
)
|
|
2472
|
-
},
|
|
2473
|
-
FragmentDefinition: {
|
|
2474
|
-
leave: ({
|
|
2475
|
-
name: e,
|
|
2476
|
-
typeCondition: t,
|
|
2477
|
-
variableDefinitions: n,
|
|
2478
|
-
directives: i,
|
|
2479
|
-
selectionSet: r,
|
|
2480
|
-
description: s
|
|
2481
|
-
}) => h("", s, `
|
|
2482
|
-
`) + // Note: fragment variable definitions are experimental and may be changed
|
|
2483
|
-
// or removed in the future.
|
|
2484
|
-
`fragment ${e}${h("(", c(n, ", "), ")")} on ${t} ${h("", c(i, " "), " ")}` + r
|
|
2485
|
-
},
|
|
2486
|
-
// Value
|
|
2487
|
-
IntValue: {
|
|
2488
|
-
leave: ({ value: e }) => e
|
|
2489
|
-
},
|
|
2490
|
-
FloatValue: {
|
|
2491
|
-
leave: ({ value: e }) => e
|
|
2492
|
-
},
|
|
2493
|
-
StringValue: {
|
|
2494
|
-
leave: ({ value: e, block: t }) => t ? We(e) : Tt(e)
|
|
2495
|
-
},
|
|
2496
|
-
BooleanValue: {
|
|
2497
|
-
leave: ({ value: e }) => e ? "true" : "false"
|
|
2498
|
-
},
|
|
2499
|
-
NullValue: {
|
|
2500
|
-
leave: () => "null"
|
|
2501
|
-
},
|
|
2502
|
-
EnumValue: {
|
|
2503
|
-
leave: ({ value: e }) => e
|
|
2504
|
-
},
|
|
2505
|
-
ListValue: {
|
|
2506
|
-
leave: ({ values: e }) => "[" + c(e, ", ") + "]"
|
|
2507
|
-
},
|
|
2508
|
-
ObjectValue: {
|
|
2509
|
-
leave: ({ fields: e }) => "{" + c(e, ", ") + "}"
|
|
2510
|
-
},
|
|
2511
|
-
ObjectField: {
|
|
2512
|
-
leave: ({ name: e, value: t }) => e + ": " + t
|
|
2513
|
-
},
|
|
2514
|
-
// Directive
|
|
2515
|
-
Directive: {
|
|
2516
|
-
leave: ({ name: e, arguments: t }) => "@" + e + h("(", c(t, ", "), ")")
|
|
2517
|
-
},
|
|
2518
|
-
// Type
|
|
2519
|
-
NamedType: {
|
|
2520
|
-
leave: ({ name: e }) => e
|
|
2521
|
-
},
|
|
2522
|
-
ListType: {
|
|
2523
|
-
leave: ({ type: e }) => "[" + e + "]"
|
|
2524
|
-
},
|
|
2525
|
-
NonNullType: {
|
|
2526
|
-
leave: ({ type: e }) => e + "!"
|
|
2527
|
-
},
|
|
2528
|
-
// Type System Definitions
|
|
2529
|
-
SchemaDefinition: {
|
|
2530
|
-
leave: ({ description: e, directives: t, operationTypes: n }) => h("", e, `
|
|
2531
|
-
`) + c(["schema", c(t, " "), S(n)], " ")
|
|
2532
|
-
},
|
|
2533
|
-
OperationTypeDefinition: {
|
|
2534
|
-
leave: ({ operation: e, type: t }) => e + ": " + t
|
|
2535
|
-
},
|
|
2536
|
-
ScalarTypeDefinition: {
|
|
2537
|
-
leave: ({ description: e, name: t, directives: n }) => h("", e, `
|
|
2538
|
-
`) + c(["scalar", t, c(n, " ")], " ")
|
|
2539
|
-
},
|
|
2540
|
-
ObjectTypeDefinition: {
|
|
2541
|
-
leave: ({ description: e, name: t, interfaces: n, directives: i, fields: r }) => h("", e, `
|
|
2542
|
-
`) + c(
|
|
2543
|
-
[
|
|
2544
|
-
"type",
|
|
2545
|
-
t,
|
|
2546
|
-
h("implements ", c(n, " & ")),
|
|
2547
|
-
c(i, " "),
|
|
2548
|
-
S(r)
|
|
2549
|
-
],
|
|
2550
|
-
" "
|
|
2551
|
-
)
|
|
2552
|
-
},
|
|
2553
|
-
FieldDefinition: {
|
|
2554
|
-
leave: ({ description: e, name: t, arguments: n, type: i, directives: r }) => h("", e, `
|
|
2555
|
-
`) + t + (te(n) ? h(`(
|
|
2556
|
-
`, j(c(n, `
|
|
2557
|
-
`)), `
|
|
2558
|
-
)`) : h("(", c(n, ", "), ")")) + ": " + i + h(" ", c(r, " "))
|
|
2559
|
-
},
|
|
2560
|
-
InputValueDefinition: {
|
|
2561
|
-
leave: ({ description: e, name: t, type: n, defaultValue: i, directives: r }) => h("", e, `
|
|
2562
|
-
`) + c(
|
|
2563
|
-
[t + ": " + n, h("= ", i), c(r, " ")],
|
|
2564
|
-
" "
|
|
2565
|
-
)
|
|
2566
|
-
},
|
|
2567
|
-
InterfaceTypeDefinition: {
|
|
2568
|
-
leave: ({ description: e, name: t, interfaces: n, directives: i, fields: r }) => h("", e, `
|
|
2569
|
-
`) + c(
|
|
2570
|
-
[
|
|
2571
|
-
"interface",
|
|
2572
|
-
t,
|
|
2573
|
-
h("implements ", c(n, " & ")),
|
|
2574
|
-
c(i, " "),
|
|
2575
|
-
S(r)
|
|
2576
|
-
],
|
|
2577
|
-
" "
|
|
2578
|
-
)
|
|
2579
|
-
},
|
|
2580
|
-
UnionTypeDefinition: {
|
|
2581
|
-
leave: ({ description: e, name: t, directives: n, types: i }) => h("", e, `
|
|
2582
|
-
`) + c(
|
|
2583
|
-
["union", t, c(n, " "), h("= ", c(i, " | "))],
|
|
2584
|
-
" "
|
|
2585
|
-
)
|
|
2586
|
-
},
|
|
2587
|
-
EnumTypeDefinition: {
|
|
2588
|
-
leave: ({ description: e, name: t, directives: n, values: i }) => h("", e, `
|
|
2589
|
-
`) + c(["enum", t, c(n, " "), S(i)], " ")
|
|
2590
|
-
},
|
|
2591
|
-
EnumValueDefinition: {
|
|
2592
|
-
leave: ({ description: e, name: t, directives: n }) => h("", e, `
|
|
2593
|
-
`) + c([t, c(n, " ")], " ")
|
|
2594
|
-
},
|
|
2595
|
-
InputObjectTypeDefinition: {
|
|
2596
|
-
leave: ({ description: e, name: t, directives: n, fields: i }) => h("", e, `
|
|
2597
|
-
`) + c(["input", t, c(n, " "), S(i)], " ")
|
|
2598
|
-
},
|
|
2599
|
-
DirectiveDefinition: {
|
|
2600
|
-
leave: ({ description: e, name: t, arguments: n, repeatable: i, locations: r }) => h("", e, `
|
|
2601
|
-
`) + "directive @" + t + (te(n) ? h(`(
|
|
2602
|
-
`, j(c(n, `
|
|
2603
|
-
`)), `
|
|
2604
|
-
)`) : h("(", c(n, ", "), ")")) + (i ? " repeatable" : "") + " on " + c(r, " | ")
|
|
2605
|
-
},
|
|
2606
|
-
SchemaExtension: {
|
|
2607
|
-
leave: ({ directives: e, operationTypes: t }) => c(
|
|
2608
|
-
["extend schema", c(e, " "), S(t)],
|
|
2609
|
-
" "
|
|
2610
|
-
)
|
|
2611
|
-
},
|
|
2612
|
-
ScalarTypeExtension: {
|
|
2613
|
-
leave: ({ name: e, directives: t }) => c(["extend scalar", e, c(t, " ")], " ")
|
|
2614
|
-
},
|
|
2615
|
-
ObjectTypeExtension: {
|
|
2616
|
-
leave: ({ name: e, interfaces: t, directives: n, fields: i }) => c(
|
|
2617
|
-
[
|
|
2618
|
-
"extend type",
|
|
2619
|
-
e,
|
|
2620
|
-
h("implements ", c(t, " & ")),
|
|
2621
|
-
c(n, " "),
|
|
2622
|
-
S(i)
|
|
2623
|
-
],
|
|
2624
|
-
" "
|
|
2625
|
-
)
|
|
2626
|
-
},
|
|
2627
|
-
InterfaceTypeExtension: {
|
|
2628
|
-
leave: ({ name: e, interfaces: t, directives: n, fields: i }) => c(
|
|
2629
|
-
[
|
|
2630
|
-
"extend interface",
|
|
2631
|
-
e,
|
|
2632
|
-
h("implements ", c(t, " & ")),
|
|
2633
|
-
c(n, " "),
|
|
2634
|
-
S(i)
|
|
2635
|
-
],
|
|
2636
|
-
" "
|
|
2637
|
-
)
|
|
2638
|
-
},
|
|
2639
|
-
UnionTypeExtension: {
|
|
2640
|
-
leave: ({ name: e, directives: t, types: n }) => c(
|
|
2641
|
-
[
|
|
2642
|
-
"extend union",
|
|
2643
|
-
e,
|
|
2644
|
-
c(t, " "),
|
|
2645
|
-
h("= ", c(n, " | "))
|
|
2646
|
-
],
|
|
2647
|
-
" "
|
|
2648
|
-
)
|
|
2649
|
-
},
|
|
2650
|
-
EnumTypeExtension: {
|
|
2651
|
-
leave: ({ name: e, directives: t, values: n }) => c(["extend enum", e, c(t, " "), S(n)], " ")
|
|
2652
|
-
},
|
|
2653
|
-
InputObjectTypeExtension: {
|
|
2654
|
-
leave: ({ name: e, directives: t, fields: n }) => c(["extend input", e, c(t, " "), S(n)], " ")
|
|
2655
|
-
},
|
|
2656
|
-
// Schema Coordinates
|
|
2657
|
-
TypeCoordinate: {
|
|
2658
|
-
leave: ({ name: e }) => e
|
|
2659
|
-
},
|
|
2660
|
-
MemberCoordinate: {
|
|
2661
|
-
leave: ({ name: e, memberName: t }) => c([e, h(".", t)])
|
|
2662
|
-
},
|
|
2663
|
-
ArgumentCoordinate: {
|
|
2664
|
-
leave: ({ name: e, fieldName: t, argumentName: n }) => c([e, h(".", t), h("(", n, ":)")])
|
|
2665
|
-
},
|
|
2666
|
-
DirectiveCoordinate: {
|
|
2667
|
-
leave: ({ name: e }) => c(["@", e])
|
|
2668
|
-
},
|
|
2669
|
-
DirectiveArgumentCoordinate: {
|
|
2670
|
-
leave: ({ name: e, argumentName: t }) => c(["@", e, h("(", t, ":)")])
|
|
2671
|
-
}
|
|
2672
|
-
};
|
|
2673
|
-
function c(e, t = "") {
|
|
2674
|
-
var n;
|
|
2675
|
-
return (n = e?.filter((i) => i).join(t)) !== null && n !== void 0 ? n : "";
|
|
2140
|
+
function Ie(t) {
|
|
2141
|
+
return we(t) ? `"${t}"` : t;
|
|
2676
2142
|
}
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
`)), `
|
|
2681
|
-
}`);
|
|
2143
|
+
var L = /* @__PURE__ */ new Map(), G = /* @__PURE__ */ new Map(), Ee = !0, $ = !1;
|
|
2144
|
+
function ye(t) {
|
|
2145
|
+
return t.replace(/[\s,]+/g, " ").trim();
|
|
2682
2146
|
}
|
|
2683
|
-
function
|
|
2684
|
-
return t
|
|
2147
|
+
function nt(t) {
|
|
2148
|
+
return ye(t.source.body.substring(t.start, t.end));
|
|
2685
2149
|
}
|
|
2686
|
-
function
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
}
|
|
2690
|
-
function te(e) {
|
|
2691
|
-
var t;
|
|
2692
|
-
return (t = e?.some((n) => n.includes(`
|
|
2693
|
-
`))) !== null && t !== void 0 ? t : !1;
|
|
2694
|
-
}
|
|
2695
|
-
var G = /* @__PURE__ */ new Map(), ae = /* @__PURE__ */ new Map(), $e = !0, J = !1;
|
|
2696
|
-
function Be(e) {
|
|
2697
|
-
return e.replace(/[\s,]+/g, " ").trim();
|
|
2698
|
-
}
|
|
2699
|
-
function St(e) {
|
|
2700
|
-
return Be(e.source.body.substring(e.start, e.end));
|
|
2701
|
-
}
|
|
2702
|
-
function Ct(e) {
|
|
2703
|
-
var t = /* @__PURE__ */ new Set(), n = [];
|
|
2704
|
-
return e.definitions.forEach(function(i) {
|
|
2150
|
+
function it(t) {
|
|
2151
|
+
var n = /* @__PURE__ */ new Set(), e = [];
|
|
2152
|
+
return t.definitions.forEach(function(i) {
|
|
2705
2153
|
if (i.kind === "FragmentDefinition") {
|
|
2706
|
-
var r = i.name.value, s =
|
|
2707
|
-
o && !o.has(s) ?
|
|
2154
|
+
var r = i.name.value, s = nt(i.loc), o = G.get(r);
|
|
2155
|
+
o && !o.has(s) ? Ee && console.warn("Warning: fragment with name " + r + ` already exists.
|
|
2708
2156
|
graphql-tag enforces all fragment names across your application to be unique; read more about
|
|
2709
|
-
this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`) : o ||
|
|
2157
|
+
this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`) : o || G.set(r, o = /* @__PURE__ */ new Set()), o.add(s), n.has(s) || (n.add(s), e.push(i));
|
|
2710
2158
|
} else
|
|
2711
|
-
|
|
2712
|
-
}),
|
|
2159
|
+
e.push(i);
|
|
2160
|
+
}), F(F({}, t), { definitions: e });
|
|
2713
2161
|
}
|
|
2714
|
-
function
|
|
2715
|
-
var
|
|
2716
|
-
|
|
2162
|
+
function rt(t) {
|
|
2163
|
+
var n = new Set(t.definitions);
|
|
2164
|
+
n.forEach(function(i) {
|
|
2717
2165
|
i.loc && delete i.loc, Object.keys(i).forEach(function(r) {
|
|
2718
2166
|
var s = i[r];
|
|
2719
|
-
s && typeof s == "object" &&
|
|
2167
|
+
s && typeof s == "object" && n.add(s);
|
|
2720
2168
|
});
|
|
2721
2169
|
});
|
|
2722
|
-
var
|
|
2723
|
-
return
|
|
2724
|
-
}
|
|
2725
|
-
function
|
|
2726
|
-
var
|
|
2727
|
-
if (!
|
|
2728
|
-
var
|
|
2729
|
-
experimentalFragmentVariables:
|
|
2730
|
-
allowLegacyFragmentVariables:
|
|
2170
|
+
var e = t.loc;
|
|
2171
|
+
return e && (delete e.startToken, delete e.endToken), t;
|
|
2172
|
+
}
|
|
2173
|
+
function st(t) {
|
|
2174
|
+
var n = ye(t);
|
|
2175
|
+
if (!L.has(n)) {
|
|
2176
|
+
var e = et(t, {
|
|
2177
|
+
experimentalFragmentVariables: $,
|
|
2178
|
+
allowLegacyFragmentVariables: $
|
|
2731
2179
|
});
|
|
2732
|
-
if (!
|
|
2180
|
+
if (!e || e.kind !== "Document")
|
|
2733
2181
|
throw new Error("Not a valid GraphQL document.");
|
|
2734
|
-
|
|
2182
|
+
L.set(n, rt(it(e)));
|
|
2735
2183
|
}
|
|
2736
|
-
return
|
|
2184
|
+
return L.get(n);
|
|
2737
2185
|
}
|
|
2738
|
-
function
|
|
2739
|
-
for (var
|
|
2740
|
-
|
|
2741
|
-
typeof
|
|
2742
|
-
var i =
|
|
2743
|
-
return
|
|
2744
|
-
r && r.kind === "Document" ? i += r.loc.source.body : i += r, i +=
|
|
2745
|
-
}),
|
|
2186
|
+
function l(t) {
|
|
2187
|
+
for (var n = [], e = 1; e < arguments.length; e++)
|
|
2188
|
+
n[e - 1] = arguments[e];
|
|
2189
|
+
typeof t == "string" && (t = [t]);
|
|
2190
|
+
var i = t[0];
|
|
2191
|
+
return n.forEach(function(r, s) {
|
|
2192
|
+
r && r.kind === "Document" ? i += r.loc.source.body : i += r, i += t[s + 1];
|
|
2193
|
+
}), st(i);
|
|
2746
2194
|
}
|
|
2747
|
-
function
|
|
2748
|
-
|
|
2195
|
+
function at() {
|
|
2196
|
+
L.clear(), G.clear();
|
|
2749
2197
|
}
|
|
2750
|
-
function
|
|
2751
|
-
|
|
2198
|
+
function ot() {
|
|
2199
|
+
Ee = !1;
|
|
2752
2200
|
}
|
|
2753
|
-
function
|
|
2754
|
-
|
|
2201
|
+
function ct() {
|
|
2202
|
+
$ = !0;
|
|
2755
2203
|
}
|
|
2756
|
-
function
|
|
2757
|
-
|
|
2204
|
+
function dt() {
|
|
2205
|
+
$ = !1;
|
|
2758
2206
|
}
|
|
2759
|
-
var
|
|
2760
|
-
gql:
|
|
2761
|
-
resetCaches:
|
|
2762
|
-
disableFragmentWarnings:
|
|
2763
|
-
enableExperimentalFragmentVariables:
|
|
2764
|
-
disableExperimentalFragmentVariables:
|
|
2207
|
+
var x = {
|
|
2208
|
+
gql: l,
|
|
2209
|
+
resetCaches: at,
|
|
2210
|
+
disableFragmentWarnings: ot,
|
|
2211
|
+
enableExperimentalFragmentVariables: ct,
|
|
2212
|
+
disableExperimentalFragmentVariables: dt
|
|
2765
2213
|
};
|
|
2766
|
-
(function(
|
|
2767
|
-
|
|
2768
|
-
})(
|
|
2769
|
-
|
|
2770
|
-
const
|
|
2214
|
+
(function(t) {
|
|
2215
|
+
t.gql = x.gql, t.resetCaches = x.resetCaches, t.disableFragmentWarnings = x.disableFragmentWarnings, t.enableExperimentalFragmentVariables = x.enableExperimentalFragmentVariables, t.disableExperimentalFragmentVariables = x.disableExperimentalFragmentVariables;
|
|
2216
|
+
})(l || (l = {}));
|
|
2217
|
+
l.default = l;
|
|
2218
|
+
const ut = l`
|
|
2771
2219
|
query findActiveOrderById($id: String) {
|
|
2772
2220
|
findOrder(id: $id) {
|
|
2773
2221
|
id
|
|
@@ -2854,7 +2302,7 @@ const Bt = E`
|
|
|
2854
2302
|
}
|
|
2855
2303
|
}
|
|
2856
2304
|
}
|
|
2857
|
-
`,
|
|
2305
|
+
`, lt = l`
|
|
2858
2306
|
query findOrderById($id: String, $reference: String) {
|
|
2859
2307
|
findOrder(id: $id, reference: $reference) {
|
|
2860
2308
|
id
|
|
@@ -2898,7 +2346,7 @@ const Bt = E`
|
|
|
2898
2346
|
downloadCode
|
|
2899
2347
|
}
|
|
2900
2348
|
}
|
|
2901
|
-
`,
|
|
2349
|
+
`, ht = l`
|
|
2902
2350
|
mutation addToOrder($orderId: ID!, $productId: ID!, $shopId: ID, $additionalData: AdditionalDataInput, $trackerId: ID, $amount: Int) {
|
|
2903
2351
|
reserveProduct(
|
|
2904
2352
|
input: {orderId: $orderId, productId: $productId, additionalData: $additionalData, trackerId: $trackerId, shopId: $shopId, amountToIncrease: $amount}
|
|
@@ -2908,7 +2356,7 @@ const Bt = E`
|
|
|
2908
2356
|
amountReserved
|
|
2909
2357
|
}
|
|
2910
2358
|
}
|
|
2911
|
-
`,
|
|
2359
|
+
`, pt = l`
|
|
2912
2360
|
mutation removeFromOrder($orderId: ID!, $productId: ID!, $additionalData: AdditionalDataInput, $amount: Int) {
|
|
2913
2361
|
releaseProduct(
|
|
2914
2362
|
input: {orderId: $orderId, productId: $productId, additionalData: $additionalData, amountToRelease: $amount}
|
|
@@ -2917,7 +2365,7 @@ const Bt = E`
|
|
|
2917
2365
|
amountReleased
|
|
2918
2366
|
}
|
|
2919
2367
|
}
|
|
2920
|
-
`,
|
|
2368
|
+
`, mt = l`
|
|
2921
2369
|
mutation configurePackage($orderId: ID!, $packageId: ID!, $amount: Int!, $items: [ReservedItem!]!, $shopId: ID, $trackerId: ID) {
|
|
2922
2370
|
configurePackage(
|
|
2923
2371
|
input: {orderId: $orderId, shopId: $shopId, trackerId: $trackerId, packageId: $packageId, amount: $amount, items: $items}
|
|
@@ -2927,7 +2375,7 @@ const Bt = E`
|
|
|
2927
2375
|
amountReserved
|
|
2928
2376
|
}
|
|
2929
2377
|
}
|
|
2930
|
-
`,
|
|
2378
|
+
`, ft = l`
|
|
2931
2379
|
mutation reserveAdditionalPackageItem($amount: Int!, $orderId: ID!, $packageId: ID!, $eventId: ID!, $packageItemId: ID!) {
|
|
2932
2380
|
reserveAdditionalPackageItem(
|
|
2933
2381
|
input: {amount: $amount, eventId: $eventId, orderId: $orderId, packageId: $packageId, packageItemId: $packageItemId}
|
|
@@ -2937,124 +2385,124 @@ const Bt = E`
|
|
|
2937
2385
|
amountReserved
|
|
2938
2386
|
}
|
|
2939
2387
|
}
|
|
2940
|
-
`,
|
|
2388
|
+
`, gt = l`
|
|
2941
2389
|
mutation configureOrderDeliveryOption($orderId: ID!, $productId: ID) {
|
|
2942
2390
|
configureDeliveryOption(input: {orderId: $orderId, productId: $productId})
|
|
2943
2391
|
}
|
|
2944
|
-
`,
|
|
2392
|
+
`, It = l`
|
|
2945
2393
|
mutation createOrderCustomer($orderId: ID!, $countryCode: String, $customer: CreateCustomerInput!) {
|
|
2946
2394
|
createOrderCustomer(
|
|
2947
2395
|
input: {id: $orderId, countryCode: $countryCode, customer: $customer}
|
|
2948
2396
|
)
|
|
2949
2397
|
}
|
|
2950
|
-
`,
|
|
2398
|
+
`, Et = l`
|
|
2951
2399
|
mutation deleteOrder($orderId: ID!) {
|
|
2952
2400
|
cancelOrder(id: $orderId)
|
|
2953
2401
|
}
|
|
2954
|
-
`,
|
|
2955
|
-
function
|
|
2402
|
+
`, yt = (t, n, e, i) => t();
|
|
2403
|
+
function Ot(t, n = yt) {
|
|
2956
2404
|
return {
|
|
2957
|
-
findActiveOrderById(
|
|
2958
|
-
return
|
|
2405
|
+
findActiveOrderById(e, i, r) {
|
|
2406
|
+
return n((s) => t.request({ document: ut, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "findActiveOrderById", "query", e);
|
|
2959
2407
|
},
|
|
2960
|
-
findOrderById(
|
|
2961
|
-
return
|
|
2408
|
+
findOrderById(e, i, r) {
|
|
2409
|
+
return n((s) => t.request({ document: lt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "findOrderById", "query", e);
|
|
2962
2410
|
},
|
|
2963
|
-
addToOrder(
|
|
2964
|
-
return
|
|
2411
|
+
addToOrder(e, i, r) {
|
|
2412
|
+
return n((s) => t.request({ document: ht, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "addToOrder", "mutation", e);
|
|
2965
2413
|
},
|
|
2966
|
-
removeFromOrder(
|
|
2967
|
-
return
|
|
2414
|
+
removeFromOrder(e, i, r) {
|
|
2415
|
+
return n((s) => t.request({ document: pt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "removeFromOrder", "mutation", e);
|
|
2968
2416
|
},
|
|
2969
|
-
configurePackage(
|
|
2970
|
-
return
|
|
2417
|
+
configurePackage(e, i, r) {
|
|
2418
|
+
return n((s) => t.request({ document: mt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "configurePackage", "mutation", e);
|
|
2971
2419
|
},
|
|
2972
|
-
reserveAdditionalPackageItem(
|
|
2973
|
-
return
|
|
2420
|
+
reserveAdditionalPackageItem(e, i, r) {
|
|
2421
|
+
return n((s) => t.request({ document: ft, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "reserveAdditionalPackageItem", "mutation", e);
|
|
2974
2422
|
},
|
|
2975
|
-
configureOrderDeliveryOption(
|
|
2976
|
-
return
|
|
2423
|
+
configureOrderDeliveryOption(e, i, r) {
|
|
2424
|
+
return n((s) => t.request({ document: gt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "configureOrderDeliveryOption", "mutation", e);
|
|
2977
2425
|
},
|
|
2978
|
-
createOrderCustomer(
|
|
2979
|
-
return
|
|
2426
|
+
createOrderCustomer(e, i, r) {
|
|
2427
|
+
return n((s) => t.request({ document: It, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "createOrderCustomer", "mutation", e);
|
|
2980
2428
|
},
|
|
2981
|
-
deleteOrder(
|
|
2982
|
-
return
|
|
2429
|
+
deleteOrder(e, i, r) {
|
|
2430
|
+
return n((s) => t.request({ document: Et, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "deleteOrder", "mutation", e);
|
|
2983
2431
|
}
|
|
2984
2432
|
};
|
|
2985
2433
|
}
|
|
2986
|
-
class
|
|
2434
|
+
class kt {
|
|
2987
2435
|
config;
|
|
2988
2436
|
sdk;
|
|
2989
|
-
constructor(
|
|
2990
|
-
this.config =
|
|
2437
|
+
constructor(n) {
|
|
2438
|
+
this.config = n, this.sdk = Ot(new v(n.apiUrl));
|
|
2991
2439
|
}
|
|
2992
2440
|
// Basket update functions
|
|
2993
|
-
async addProduct(
|
|
2441
|
+
async addProduct(n, e) {
|
|
2994
2442
|
try {
|
|
2995
2443
|
return this.debugLog("Adding product", {
|
|
2996
|
-
productId:
|
|
2997
|
-
orderId:
|
|
2998
|
-
amount:
|
|
2999
|
-
seat:
|
|
2444
|
+
productId: e.id,
|
|
2445
|
+
orderId: n,
|
|
2446
|
+
amount: e.amount,
|
|
2447
|
+
seat: e.seat
|
|
3000
2448
|
}), (await this.sdk.addToOrder({
|
|
3001
|
-
productId:
|
|
3002
|
-
orderId:
|
|
3003
|
-
additionalData:
|
|
2449
|
+
productId: e.id,
|
|
2450
|
+
orderId: n,
|
|
2451
|
+
additionalData: e.seat ? {
|
|
3004
2452
|
seat: {
|
|
3005
|
-
seatId:
|
|
3006
|
-
seatLabel:
|
|
3007
|
-
holdToken:
|
|
2453
|
+
seatId: e.seat.id,
|
|
2454
|
+
seatLabel: e.seat.label,
|
|
2455
|
+
holdToken: e.seat.holdToken
|
|
3008
2456
|
}
|
|
3009
2457
|
} : null,
|
|
3010
2458
|
trackerId: this.config.trackerId,
|
|
3011
2459
|
shopId: this.config.shopId,
|
|
3012
|
-
amount:
|
|
2460
|
+
amount: e.amount
|
|
3013
2461
|
})).reserveProduct;
|
|
3014
2462
|
} catch (i) {
|
|
3015
2463
|
throw this.debugLog("Error adding product", i), this.handleError(i), i;
|
|
3016
2464
|
}
|
|
3017
2465
|
}
|
|
3018
|
-
async removeProduct(
|
|
2466
|
+
async removeProduct(n, e) {
|
|
3019
2467
|
try {
|
|
3020
2468
|
return this.debugLog("Removing product", {
|
|
3021
|
-
productId:
|
|
3022
|
-
orderId:
|
|
3023
|
-
amount:
|
|
2469
|
+
productId: e.id,
|
|
2470
|
+
orderId: n,
|
|
2471
|
+
amount: e.amount
|
|
3024
2472
|
}), (await this.sdk.removeFromOrder({
|
|
3025
|
-
productId:
|
|
3026
|
-
orderId:
|
|
3027
|
-
additionalData:
|
|
2473
|
+
productId: e.id,
|
|
2474
|
+
orderId: n,
|
|
2475
|
+
additionalData: e.seat ? {
|
|
3028
2476
|
seat: {
|
|
3029
|
-
seatId:
|
|
3030
|
-
seatLabel:
|
|
2477
|
+
seatId: e.seat.id,
|
|
2478
|
+
seatLabel: e.seat.label
|
|
3031
2479
|
}
|
|
3032
2480
|
} : null,
|
|
3033
|
-
amount:
|
|
2481
|
+
amount: e.amount
|
|
3034
2482
|
})).releaseProduct ?? null;
|
|
3035
2483
|
} catch (i) {
|
|
3036
2484
|
throw this.debugLog("Error removing product", i), this.handleError(i), i;
|
|
3037
2485
|
}
|
|
3038
2486
|
}
|
|
3039
|
-
async configurePackage(
|
|
2487
|
+
async configurePackage(n, e) {
|
|
3040
2488
|
try {
|
|
3041
|
-
const i =
|
|
2489
|
+
const i = e.items.map((s) => ({
|
|
3042
2490
|
packageItemId: s.packageItemId,
|
|
3043
2491
|
eventId: s.eventId
|
|
3044
2492
|
}));
|
|
3045
2493
|
this.debugLog("Configuring package", {
|
|
3046
|
-
packageId:
|
|
3047
|
-
orderId:
|
|
3048
|
-
amount:
|
|
2494
|
+
packageId: e.id,
|
|
2495
|
+
orderId: n,
|
|
2496
|
+
amount: e.amount,
|
|
3049
2497
|
items: i,
|
|
3050
2498
|
shopId: this.config.shopId
|
|
3051
2499
|
});
|
|
3052
2500
|
const r = await this.sdk.configurePackage({
|
|
3053
2501
|
trackerId: this.config.trackerId,
|
|
3054
2502
|
shopId: this.config.shopId,
|
|
3055
|
-
packageId:
|
|
3056
|
-
orderId:
|
|
3057
|
-
amount:
|
|
2503
|
+
packageId: e.id,
|
|
2504
|
+
orderId: n,
|
|
2505
|
+
amount: e.amount,
|
|
3058
2506
|
items: i
|
|
3059
2507
|
});
|
|
3060
2508
|
return this.debugLog("Configure package response"), r.configurePackage ?? null;
|
|
@@ -3062,33 +2510,33 @@ class Jt {
|
|
|
3062
2510
|
throw this.debugLog("Error configuring package", i), this.handleError(i), i;
|
|
3063
2511
|
}
|
|
3064
2512
|
}
|
|
3065
|
-
async configureCustomer(
|
|
3066
|
-
this.debugLog("Creating/replacing customer", { orderId:
|
|
2513
|
+
async configureCustomer(n, e) {
|
|
2514
|
+
this.debugLog("Creating/replacing customer", { orderId: n, email: e.email });
|
|
3067
2515
|
try {
|
|
3068
2516
|
const i = await this.sdk.createOrderCustomer({
|
|
3069
|
-
orderId:
|
|
3070
|
-
customer:
|
|
2517
|
+
orderId: n,
|
|
2518
|
+
customer: e
|
|
3071
2519
|
});
|
|
3072
2520
|
this.debugLog("Customer set successfully", i);
|
|
3073
2521
|
} catch (i) {
|
|
3074
2522
|
throw this.debugLog("Failed to set customer", i), new Error(`Failed to set customer: ${i.message}`);
|
|
3075
2523
|
}
|
|
3076
2524
|
}
|
|
3077
|
-
async reserveAdditionalPackageItem(
|
|
2525
|
+
async reserveAdditionalPackageItem(n, e) {
|
|
3078
2526
|
try {
|
|
3079
2527
|
this.debugLog("reserve additional packageItem", {
|
|
3080
|
-
orderId:
|
|
3081
|
-
eventId:
|
|
3082
|
-
amount:
|
|
3083
|
-
packageId:
|
|
3084
|
-
packageItemId:
|
|
2528
|
+
orderId: n,
|
|
2529
|
+
eventId: e.eventId,
|
|
2530
|
+
amount: e.amount,
|
|
2531
|
+
packageId: e.packageId,
|
|
2532
|
+
packageItemId: e.packageItemId
|
|
3085
2533
|
});
|
|
3086
2534
|
const i = await this.sdk.reserveAdditionalPackageItem({
|
|
3087
|
-
orderId:
|
|
3088
|
-
eventId:
|
|
3089
|
-
amount:
|
|
3090
|
-
packageId:
|
|
3091
|
-
packageItemId:
|
|
2535
|
+
orderId: n,
|
|
2536
|
+
eventId: e.eventId,
|
|
2537
|
+
amount: e.amount,
|
|
2538
|
+
packageId: e.packageId,
|
|
2539
|
+
packageItemId: e.packageItemId
|
|
3092
2540
|
});
|
|
3093
2541
|
return this.debugLog("reserve additional packageItem"), i.reserveAdditionalPackageItem ?? null;
|
|
3094
2542
|
} catch (i) {
|
|
@@ -3096,12 +2544,12 @@ class Jt {
|
|
|
3096
2544
|
}
|
|
3097
2545
|
}
|
|
3098
2546
|
// Cancel and clear order functions
|
|
3099
|
-
async cancelOrder(
|
|
3100
|
-
|
|
2547
|
+
async cancelOrder(n) {
|
|
2548
|
+
n && (this.debugLog("Cancelling order", { orderId: n }), await this.sdk.deleteOrder({ orderId: n }), this.debugLog("Order cancelled successfully"));
|
|
3101
2549
|
}
|
|
3102
|
-
async findOrder(
|
|
2550
|
+
async findOrder(n, e) {
|
|
3103
2551
|
try {
|
|
3104
|
-
const i = await this.sdk.findOrderById({ id:
|
|
2552
|
+
const i = await this.sdk.findOrderById({ id: n, reference: e });
|
|
3105
2553
|
return i.findOrder ? {
|
|
3106
2554
|
id: i.findOrder.id,
|
|
3107
2555
|
reference: i.findOrder.reference,
|
|
@@ -3126,19 +2574,19 @@ class Jt {
|
|
|
3126
2574
|
return this.debugLog("Error finding order", i), this.handleError(i), null;
|
|
3127
2575
|
}
|
|
3128
2576
|
}
|
|
3129
|
-
async findActiveOrder(
|
|
3130
|
-
this.debugLog("Fetching order from server", { orderId:
|
|
2577
|
+
async findActiveOrder(n) {
|
|
2578
|
+
this.debugLog("Fetching order from server", { orderId: n });
|
|
3131
2579
|
try {
|
|
3132
|
-
const
|
|
3133
|
-
if (!
|
|
2580
|
+
const e = await this.sdk.findActiveOrderById({ id: n });
|
|
2581
|
+
if (!e?.findOrder)
|
|
3134
2582
|
return null;
|
|
3135
|
-
const i =
|
|
2583
|
+
const i = e.findOrder;
|
|
3136
2584
|
this.debugLog("Order fetched successfully", i);
|
|
3137
2585
|
const r = i.items, s = r.filter((d) => d.product != null && d.amount > 0).map((d) => {
|
|
3138
|
-
let
|
|
3139
|
-
return d.product.type === "PROMOTER" ?
|
|
2586
|
+
let f = T.PRODUCT;
|
|
2587
|
+
return d.product.type === "PROMOTER" ? f = T.ADD_ONS : d.product.type === "PICKUP" ? f = T.PICKUP : d.product.type === "DELIVERY" && (f = T.DELIVERY), {
|
|
3140
2588
|
id: d.product.id,
|
|
3141
|
-
type:
|
|
2589
|
+
type: f,
|
|
3142
2590
|
name: d.product.name,
|
|
3143
2591
|
icon: d.product.icon,
|
|
3144
2592
|
description: d.product.description,
|
|
@@ -3152,51 +2600,51 @@ class Jt {
|
|
|
3152
2600
|
label: y.label
|
|
3153
2601
|
}))
|
|
3154
2602
|
};
|
|
3155
|
-
}), o = r.filter((d) => d.packageItem != null && d.amount > 0).reduce((d,
|
|
2603
|
+
}), o = r.filter((d) => d.packageItem != null && d.amount > 0).reduce((d, f) => {
|
|
3156
2604
|
const {
|
|
3157
2605
|
packageItem: y,
|
|
3158
|
-
event:
|
|
3159
|
-
amount:
|
|
3160
|
-
price:
|
|
3161
|
-
serviceFee:
|
|
3162
|
-
depositPrice:
|
|
3163
|
-
originalPrice:
|
|
3164
|
-
} =
|
|
3165
|
-
d[k] ? (d[k].price +=
|
|
2606
|
+
event: p,
|
|
2607
|
+
amount: O,
|
|
2608
|
+
price: C,
|
|
2609
|
+
serviceFee: Y,
|
|
2610
|
+
depositPrice: H,
|
|
2611
|
+
originalPrice: J
|
|
2612
|
+
} = f, k = y.package.id;
|
|
2613
|
+
d[k] ? (d[k].price += C ?? 0, d[k].serviceFee += Y ?? 0, d[k].originalPrice += J ?? 0, d[k].depositPrice += H ?? C ?? 0) : d[k] = {
|
|
3166
2614
|
id: k,
|
|
3167
|
-
type:
|
|
2615
|
+
type: T.PACKAGE,
|
|
3168
2616
|
name: y.package.name,
|
|
3169
|
-
amount:
|
|
3170
|
-
price:
|
|
3171
|
-
serviceFee:
|
|
3172
|
-
depositPrice:
|
|
3173
|
-
originalPrice:
|
|
2617
|
+
amount: O,
|
|
2618
|
+
price: C ?? 0,
|
|
2619
|
+
serviceFee: Y ?? 0,
|
|
2620
|
+
depositPrice: H ?? C ?? 0,
|
|
2621
|
+
originalPrice: J ?? 0,
|
|
3174
2622
|
packageItems: []
|
|
3175
2623
|
};
|
|
3176
|
-
const
|
|
3177
|
-
zone:
|
|
3178
|
-
}),
|
|
3179
|
-
zone:
|
|
2624
|
+
const Oe = A.fromISO(p.startAt, {
|
|
2625
|
+
zone: p.timezone
|
|
2626
|
+
}), ke = A.fromISO(p.endAt, {
|
|
2627
|
+
zone: p.timezone
|
|
3180
2628
|
});
|
|
3181
2629
|
return d[k].packageItems.push({
|
|
3182
2630
|
packageItemId: y.id,
|
|
3183
|
-
eventId:
|
|
3184
|
-
name:
|
|
3185
|
-
startAt:
|
|
3186
|
-
endAt:
|
|
2631
|
+
eventId: p.id,
|
|
2632
|
+
name: p.name,
|
|
2633
|
+
startAt: Oe.toJSDate().toISOString(),
|
|
2634
|
+
endAt: ke.toJSDate().toISOString()
|
|
3187
2635
|
}), d;
|
|
3188
|
-
}, {}),
|
|
2636
|
+
}, {}), u = [
|
|
3189
2637
|
...s,
|
|
3190
2638
|
...Object.values(o)
|
|
3191
|
-
],
|
|
3192
|
-
if (
|
|
2639
|
+
], h = u.reduce((d, f) => d + (f.amount || 0), 0);
|
|
2640
|
+
if (h === 0)
|
|
3193
2641
|
return null;
|
|
3194
|
-
const
|
|
2642
|
+
const E = r.filter((d) => d.amount > 0).map((d) => new Date(d.expiredAt).getTime()), m = A.fromMillis(Math.min(...E));
|
|
3195
2643
|
return {
|
|
3196
2644
|
id: i.id,
|
|
3197
2645
|
currency: i.currency,
|
|
3198
|
-
expiredAt:
|
|
3199
|
-
items:
|
|
2646
|
+
expiredAt: m?.toJSDate().toISOString(),
|
|
2647
|
+
items: u,
|
|
3200
2648
|
customer: i.mainBooker ? {
|
|
3201
2649
|
firstName: i.mainBooker.firstName,
|
|
3202
2650
|
lastName: i.mainBooker.lastName,
|
|
@@ -3206,29 +2654,29 @@ class Jt {
|
|
|
3206
2654
|
residence: i.mainBooker.residence,
|
|
3207
2655
|
extraInfo: i.mainBooker.extraInfo
|
|
3208
2656
|
} : null,
|
|
3209
|
-
count:
|
|
2657
|
+
count: h,
|
|
3210
2658
|
orderProtection: !1
|
|
3211
2659
|
};
|
|
3212
|
-
} catch (
|
|
3213
|
-
throw this.debugLog("Error fetching order",
|
|
2660
|
+
} catch (e) {
|
|
2661
|
+
throw this.debugLog("Error fetching order", e), e;
|
|
3214
2662
|
}
|
|
3215
2663
|
}
|
|
3216
|
-
debugLog(
|
|
3217
|
-
this.config.debug && console.log(`[BasketService] ${
|
|
2664
|
+
debugLog(n, e) {
|
|
2665
|
+
this.config.debug && console.log(`[BasketService] ${n}`, e || "");
|
|
3218
2666
|
}
|
|
3219
|
-
handleError(
|
|
3220
|
-
const
|
|
3221
|
-
if (
|
|
3222
|
-
const i =
|
|
2667
|
+
handleError(n) {
|
|
2668
|
+
const e = n;
|
|
2669
|
+
if (e.graphQLErrors && e.graphQLErrors.length > 0) {
|
|
2670
|
+
const i = e.graphQLErrors[0];
|
|
3223
2671
|
i.extensions?.status === "RATE_LIMIT" && console.error("Rate Limit reached"), i.extensions?.status === "SOLD_OUT" && console.error("Product sold out");
|
|
3224
2672
|
}
|
|
3225
|
-
if (
|
|
3226
|
-
const i =
|
|
2673
|
+
if (e.response?.errors && e.response.errors.length > 0) {
|
|
2674
|
+
const i = e.response.errors[0];
|
|
3227
2675
|
console.error("GraphQL Error:", i.message), i.extensions?.code && console.error("Error Code:", i.extensions.code);
|
|
3228
2676
|
}
|
|
3229
2677
|
}
|
|
3230
2678
|
}
|
|
3231
|
-
const
|
|
2679
|
+
const Tt = l`
|
|
3232
2680
|
query EventOverviewPage($organizationId: ID!, $hostingIds: [String!], $locationIds: [String!], $excludedEventIds: [String!], $trackerId: String, $filterEventStatuses: [EventStatus!], $dateRange: DateRangeInput, $page: PageInput, $sorts: [SortInput!], $searchTerm: String, $priceRange: PriceRangeInput) {
|
|
3233
2681
|
findAllPublicEventByOrganizationId(
|
|
3234
2682
|
id: $organizationId
|
|
@@ -3273,7 +2721,7 @@ const Xt = E`
|
|
|
3273
2721
|
count
|
|
3274
2722
|
}
|
|
3275
2723
|
}
|
|
3276
|
-
`,
|
|
2724
|
+
`, At = l`
|
|
3277
2725
|
query EventDetailPage($eventId: ID!) {
|
|
3278
2726
|
findPublicEventById(id: $eventId) {
|
|
3279
2727
|
id
|
|
@@ -3305,7 +2753,7 @@ const Xt = E`
|
|
|
3305
2753
|
totalViews
|
|
3306
2754
|
}
|
|
3307
2755
|
}
|
|
3308
|
-
`,
|
|
2756
|
+
`, Nt = l`
|
|
3309
2757
|
query findProductsByEventId($eventId: ID!, $promoCode: String, $trackerId: String, $productTypes: [ProductType!]) {
|
|
3310
2758
|
findPublicProductsByEventId(
|
|
3311
2759
|
eventId: $eventId
|
|
@@ -3339,153 +2787,66 @@ const Xt = E`
|
|
|
3339
2787
|
showEndSalesAtTag
|
|
3340
2788
|
}
|
|
3341
2789
|
}
|
|
3342
|
-
`,
|
|
3343
|
-
function
|
|
2790
|
+
`, Dt = (t, n, e, i) => t();
|
|
2791
|
+
function vt(t, n = Dt) {
|
|
3344
2792
|
return {
|
|
3345
|
-
EventOverviewPage(
|
|
3346
|
-
return
|
|
2793
|
+
EventOverviewPage(e, i, r) {
|
|
2794
|
+
return n((s) => t.request({ document: Tt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "EventOverviewPage", "query", e);
|
|
3347
2795
|
},
|
|
3348
|
-
EventDetailPage(
|
|
3349
|
-
return
|
|
2796
|
+
EventDetailPage(e, i, r) {
|
|
2797
|
+
return n((s) => t.request({ document: At, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "EventDetailPage", "query", e);
|
|
3350
2798
|
},
|
|
3351
|
-
findProductsByEventId(
|
|
3352
|
-
return
|
|
2799
|
+
findProductsByEventId(e, i, r) {
|
|
2800
|
+
return n((s) => t.request({ document: Nt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "findProductsByEventId", "query", e);
|
|
3353
2801
|
}
|
|
3354
2802
|
};
|
|
3355
2803
|
}
|
|
3356
|
-
|
|
3357
|
-
const t = /(query|mutation|subscription)\s+(\w+)/.exec(e);
|
|
3358
|
-
if (!t) return { type: "unknown" };
|
|
3359
|
-
const n = t[1], i = t[2];
|
|
3360
|
-
return { type: n, name: i };
|
|
3361
|
-
}
|
|
3362
|
-
async function nn(e) {
|
|
3363
|
-
if (typeof globalThis < "u" && globalThis.crypto?.subtle) {
|
|
3364
|
-
const n = new TextEncoder().encode(e), i = await globalThis.crypto.subtle.digest("SHA-256", n);
|
|
3365
|
-
return Array.from(new Uint8Array(i)).map((r) => r.toString(16).padStart(2, "0")).join("");
|
|
3366
|
-
}
|
|
3367
|
-
try {
|
|
3368
|
-
const { createHash: t } = await import("./__vite-browser-external-l0sNRNKZ.js");
|
|
3369
|
-
return t("sha256").update(e).digest("hex");
|
|
3370
|
-
} catch {
|
|
3371
|
-
throw new Error("SHA-256 is not available in this environment");
|
|
3372
|
-
}
|
|
3373
|
-
}
|
|
3374
|
-
function rn(e) {
|
|
3375
|
-
const t = { "content-type": "application/json" };
|
|
3376
|
-
if (e)
|
|
3377
|
-
for (const [n, i] of Object.entries(e))
|
|
3378
|
-
typeof i < "u" && (t[n] = String(i));
|
|
3379
|
-
return t;
|
|
3380
|
-
}
|
|
3381
|
-
function me(e, t) {
|
|
3382
|
-
return e?.length ? e.some((n) => t.includes(n?.extensions?.code) || t.includes(n?.message)) : !1;
|
|
3383
|
-
}
|
|
3384
|
-
function ge(e, t, n, i, r) {
|
|
3385
|
-
const s = new Error(e);
|
|
3386
|
-
return s.response = { data: r.json?.data, errors: r.json?.errors, status: r.status }, s.request = { query: t, variables: n, operationName: i }, s.graphQLErrors = r.json?.errors, s;
|
|
3387
|
-
}
|
|
3388
|
-
function ne(e, t, n, i, r) {
|
|
3389
|
-
if (r.json?.errors?.length)
|
|
3390
|
-
throw ge(`GraphQL request failed${e ? ` (${e})` : ""}`, t, n, i, r);
|
|
3391
|
-
if (typeof r.json?.data > "u")
|
|
3392
|
-
throw ge("GraphQL request failed: no data received", t, n, i, r);
|
|
3393
|
-
return r.json.data;
|
|
3394
|
-
}
|
|
3395
|
-
class Z extends oe {
|
|
3396
|
-
async request(t, ...n) {
|
|
3397
|
-
let i = t, r, s, o;
|
|
3398
|
-
t && typeof t == "object" && "document" in t ? (i = t.document, r = t.variables, s = t.requestHeaders, o = t.signal) : (r = n[0], s = n[1]);
|
|
3399
|
-
const p = typeof i == "string" ? i : xt(i), { type: f, name: l } = tn(p), g = await nn(p), d = r ?? {}, m = this.url ?? this.endpoint ?? "", y = rn(s), I = async (A) => {
|
|
3400
|
-
const x = await fetch(m, { method: "POST", headers: y, body: JSON.stringify(A), signal: o });
|
|
3401
|
-
let P = null;
|
|
3402
|
-
try {
|
|
3403
|
-
P = await x.json();
|
|
3404
|
-
} catch {
|
|
3405
|
-
P = null;
|
|
3406
|
-
}
|
|
3407
|
-
return { status: x.status, json: P };
|
|
3408
|
-
}, D = async (A) => {
|
|
3409
|
-
const x = new URLSearchParams();
|
|
3410
|
-
for (const [Ve, M] of Object.entries(A))
|
|
3411
|
-
typeof M > "u" || x.set(Ve, typeof M == "string" ? M : JSON.stringify(M));
|
|
3412
|
-
const P = m.includes("?") ? "&" : "?", $ = `${m}${P}${x.toString()}`, ue = await fetch($, { method: "GET", headers: y, signal: o });
|
|
3413
|
-
let K = null;
|
|
3414
|
-
try {
|
|
3415
|
-
K = await ue.json();
|
|
3416
|
-
} catch {
|
|
3417
|
-
K = null;
|
|
3418
|
-
}
|
|
3419
|
-
return { status: ue.status, json: K };
|
|
3420
|
-
}, N = {
|
|
3421
|
-
operationName: l,
|
|
3422
|
-
variables: d,
|
|
3423
|
-
extensions: { persistedQuery: { version: 1, sha256Hash: g } }
|
|
3424
|
-
}, O = async (A, x, P) => {
|
|
3425
|
-
if (me(A.json?.errors, ["PERSISTED_QUERY_NOT_FOUND", "PersistedQueryNotFound"])) {
|
|
3426
|
-
const $ = await x();
|
|
3427
|
-
return ne("APQ register", p, d, l, $);
|
|
3428
|
-
}
|
|
3429
|
-
if (me(A.json?.errors, ["PERSISTED_QUERY_NOT_SUPPORTED"])) {
|
|
3430
|
-
const $ = await P();
|
|
3431
|
-
return ne("no APQ support", p, d, l, $);
|
|
3432
|
-
}
|
|
3433
|
-
return ne("", p, d, l, A);
|
|
3434
|
-
};
|
|
3435
|
-
if (f === "query") {
|
|
3436
|
-
const A = await D(N);
|
|
3437
|
-
return O(A, () => I({ ...N, query: p }), () => I({ operationName: l, variables: d, query: p }));
|
|
3438
|
-
}
|
|
3439
|
-
const C = await I(N);
|
|
3440
|
-
return O(C, () => I({ ...N, query: p }), () => I({ operationName: l, variables: d, query: p }));
|
|
3441
|
-
}
|
|
3442
|
-
}
|
|
3443
|
-
class sn {
|
|
2804
|
+
class Pt {
|
|
3444
2805
|
config;
|
|
3445
2806
|
sdk;
|
|
3446
|
-
constructor(
|
|
3447
|
-
this.config =
|
|
2807
|
+
constructor(n) {
|
|
2808
|
+
this.config = n, this.sdk = vt(new v(n.apiUrl));
|
|
3448
2809
|
}
|
|
3449
|
-
async getEvents(
|
|
2810
|
+
async getEvents(n = {}) {
|
|
3450
2811
|
try {
|
|
3451
|
-
|
|
3452
|
-
index:
|
|
3453
|
-
size:
|
|
2812
|
+
n.page && (n.page = {
|
|
2813
|
+
index: n.page.index ?? 0,
|
|
2814
|
+
size: n.page.size ?? 20
|
|
3454
2815
|
}), this.debugLog("Fetching events with parameters", {
|
|
3455
2816
|
organizationId: this.config.organizationId,
|
|
3456
|
-
hostingIds:
|
|
3457
|
-
filterEventStatuses:
|
|
3458
|
-
dateRange:
|
|
3459
|
-
page:
|
|
3460
|
-
sorts:
|
|
2817
|
+
hostingIds: n.hostingIds,
|
|
2818
|
+
filterEventStatuses: n.statuses,
|
|
2819
|
+
dateRange: n.dateRange,
|
|
2820
|
+
page: n.page,
|
|
2821
|
+
sorts: n.sorts,
|
|
3461
2822
|
trackerId: this.config.trackerId
|
|
3462
2823
|
});
|
|
3463
|
-
const
|
|
2824
|
+
const e = await this.sdk.EventOverviewPage({
|
|
3464
2825
|
organizationId: this.config.organizationId,
|
|
3465
|
-
hostingIds:
|
|
3466
|
-
locationIds:
|
|
3467
|
-
excludedEventIds:
|
|
3468
|
-
filterEventStatuses:
|
|
3469
|
-
dateRange:
|
|
3470
|
-
from:
|
|
3471
|
-
till:
|
|
2826
|
+
hostingIds: n.hostingIds,
|
|
2827
|
+
locationIds: n.locationIds,
|
|
2828
|
+
excludedEventIds: n.excludedEventIds,
|
|
2829
|
+
filterEventStatuses: n.statuses,
|
|
2830
|
+
dateRange: n.dateRange && n.dateRange.from && n.dateRange.till ? {
|
|
2831
|
+
from: n.dateRange.from.toISO(),
|
|
2832
|
+
till: n.dateRange.till.toISO()
|
|
3472
2833
|
} : void 0,
|
|
3473
|
-
page:
|
|
3474
|
-
sorts:
|
|
2834
|
+
page: n.page,
|
|
2835
|
+
sorts: n.sorts,
|
|
3475
2836
|
trackerId: this.config.trackerId,
|
|
3476
|
-
searchTerm:
|
|
3477
|
-
priceRange:
|
|
2837
|
+
searchTerm: n.searchTerm,
|
|
2838
|
+
priceRange: n.priceRange
|
|
3478
2839
|
});
|
|
3479
|
-
if (this.debugLog("Raw GraphQL response",
|
|
3480
|
-
const i =
|
|
2840
|
+
if (this.debugLog("Raw GraphQL response", e), e?.findAllPublicEventByOrganizationId?.data) {
|
|
2841
|
+
const i = e.findAllPublicEventByOrganizationId.data.map((r) => ({
|
|
3481
2842
|
id: r.id,
|
|
3482
2843
|
name: r.name,
|
|
3483
2844
|
icon: r.icon,
|
|
3484
2845
|
banner: r.banner,
|
|
3485
2846
|
description: r.description,
|
|
3486
2847
|
addonDescription: r.addonDescription,
|
|
3487
|
-
startAt:
|
|
3488
|
-
endAt:
|
|
2848
|
+
startAt: A.fromISO(r.startAt, { zone: r.timezone }).toJSDate().toISOString(),
|
|
2849
|
+
endAt: A.fromISO(r.endAt, { zone: r.timezone }).toJSDate().toISOString(),
|
|
3489
2850
|
timezone: r.timezone,
|
|
3490
2851
|
startSalesAt: null,
|
|
3491
2852
|
endSalesAt: null,
|
|
@@ -3505,27 +2866,27 @@ class sn {
|
|
|
3505
2866
|
startingPrice: r.startingPrice,
|
|
3506
2867
|
totalViews: r.totalViews
|
|
3507
2868
|
}));
|
|
3508
|
-
return this.debugLog("Processed events", { events: i, count: i.length }), [i,
|
|
2869
|
+
return this.debugLog("Processed events", { events: i, count: i.length }), [i, e.findAllPublicEventByOrganizationId.count ?? 0];
|
|
3509
2870
|
} else
|
|
3510
2871
|
return this.debugLog("No events found in response"), [[], 0];
|
|
3511
|
-
} catch (
|
|
3512
|
-
throw this.debugLog("Error fetching events",
|
|
2872
|
+
} catch (e) {
|
|
2873
|
+
throw this.debugLog("Error fetching events", e), e;
|
|
3513
2874
|
}
|
|
3514
2875
|
}
|
|
3515
|
-
async getEvent(
|
|
2876
|
+
async getEvent(n) {
|
|
3516
2877
|
try {
|
|
3517
|
-
this.debugLog("Fetching single event", { eventId:
|
|
3518
|
-
const
|
|
3519
|
-
if (this.debugLog("Raw GraphQL response",
|
|
3520
|
-
const i =
|
|
2878
|
+
this.debugLog("Fetching single event", { eventId: n });
|
|
2879
|
+
const e = await this.sdk.EventDetailPage({ eventId: n });
|
|
2880
|
+
if (this.debugLog("Raw GraphQL response", e), e?.findPublicEventById) {
|
|
2881
|
+
const i = e.findPublicEventById, r = {
|
|
3521
2882
|
id: i.id,
|
|
3522
2883
|
name: i.name,
|
|
3523
2884
|
icon: i.icon,
|
|
3524
2885
|
banner: i.banner,
|
|
3525
2886
|
description: i.description,
|
|
3526
2887
|
addonDescription: i.addonDescription,
|
|
3527
|
-
startAt:
|
|
3528
|
-
endAt:
|
|
2888
|
+
startAt: A.fromISO(i.startAt, { zone: i.timezone }).toJSDate().toISOString(),
|
|
2889
|
+
endAt: A.fromISO(i.endAt, { zone: i.timezone }).toJSDate().toISOString(),
|
|
3529
2890
|
timezone: i.timezone,
|
|
3530
2891
|
startSalesAt: i.startSalesAt,
|
|
3531
2892
|
endSalesAt: i.endSalesAt,
|
|
@@ -3547,26 +2908,26 @@ class sn {
|
|
|
3547
2908
|
};
|
|
3548
2909
|
return this.debugLog("Processed single event", r), r;
|
|
3549
2910
|
} else {
|
|
3550
|
-
this.debugLog("No event found for id",
|
|
2911
|
+
this.debugLog("No event found for id", n);
|
|
3551
2912
|
return;
|
|
3552
2913
|
}
|
|
3553
|
-
} catch (
|
|
3554
|
-
throw this.debugLog("Error fetching single event",
|
|
2914
|
+
} catch (e) {
|
|
2915
|
+
throw this.debugLog("Error fetching single event", e), e;
|
|
3555
2916
|
}
|
|
3556
2917
|
}
|
|
3557
|
-
async getProducts(
|
|
2918
|
+
async getProducts(n, e, i) {
|
|
3558
2919
|
try {
|
|
3559
2920
|
this.debugLog("Fetching products for event", {
|
|
3560
|
-
eventId:
|
|
2921
|
+
eventId: n,
|
|
3561
2922
|
promoCode: i,
|
|
3562
2923
|
trackerId: this.config.trackerId,
|
|
3563
|
-
productTypes:
|
|
2924
|
+
productTypes: e
|
|
3564
2925
|
});
|
|
3565
2926
|
const r = await this.sdk.findProductsByEventId({
|
|
3566
|
-
eventId:
|
|
2927
|
+
eventId: n,
|
|
3567
2928
|
promoCode: i,
|
|
3568
2929
|
trackerId: this.config.trackerId,
|
|
3569
|
-
productTypes:
|
|
2930
|
+
productTypes: e
|
|
3570
2931
|
});
|
|
3571
2932
|
if (r?.findPublicProductsByEventId) {
|
|
3572
2933
|
const s = r.findPublicProductsByEventId.map((o) => ({
|
|
@@ -3594,21 +2955,21 @@ class sn {
|
|
|
3594
2955
|
type: o.type
|
|
3595
2956
|
}));
|
|
3596
2957
|
return this.debugLog("Products fetched", {
|
|
3597
|
-
eventId:
|
|
2958
|
+
eventId: n,
|
|
3598
2959
|
count: s.length,
|
|
3599
2960
|
types: s.map((o) => o.type)
|
|
3600
2961
|
}), s;
|
|
3601
2962
|
}
|
|
3602
2963
|
return;
|
|
3603
2964
|
} catch (r) {
|
|
3604
|
-
throw this.debugLog("Error fetching products", { eventId:
|
|
2965
|
+
throw this.debugLog("Error fetching products", { eventId: n, error: r }), r;
|
|
3605
2966
|
}
|
|
3606
2967
|
}
|
|
3607
|
-
debugLog(
|
|
3608
|
-
this.config.debug && console.log(`[EventService:${this.config.organizationId}] ${
|
|
2968
|
+
debugLog(n, e) {
|
|
2969
|
+
this.config.debug && console.log(`[EventService:${this.config.organizationId}] ${n}`, e || "");
|
|
3609
2970
|
}
|
|
3610
2971
|
}
|
|
3611
|
-
const
|
|
2972
|
+
const xt = l`
|
|
3612
2973
|
query findPaymentMethods($orderId: ID!, $orderItemId: String, $amountOfTickets: Int, $paymentMethodId: String, $withTicketProtection: Boolean) {
|
|
3613
2974
|
findPaymentDetails(
|
|
3614
2975
|
orderId: $orderId
|
|
@@ -3638,40 +2999,40 @@ const an = E`
|
|
|
3638
2999
|
protectionFee
|
|
3639
3000
|
}
|
|
3640
3001
|
}
|
|
3641
|
-
`,
|
|
3002
|
+
`, bt = l`
|
|
3642
3003
|
mutation createDigitalPayment($input: CreateDigitalOrderPaymentInput!) {
|
|
3643
3004
|
createDigitalOrderPayment(input: $input)
|
|
3644
3005
|
}
|
|
3645
|
-
`,
|
|
3646
|
-
function
|
|
3006
|
+
`, St = (t, n, e, i) => t();
|
|
3007
|
+
function Ct(t, n = St) {
|
|
3647
3008
|
return {
|
|
3648
|
-
findPaymentMethods(
|
|
3649
|
-
return
|
|
3009
|
+
findPaymentMethods(e, i, r) {
|
|
3010
|
+
return n((s) => t.request({ document: xt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "findPaymentMethods", "query", e);
|
|
3650
3011
|
},
|
|
3651
|
-
createDigitalPayment(
|
|
3652
|
-
return
|
|
3012
|
+
createDigitalPayment(e, i, r) {
|
|
3013
|
+
return n((s) => t.request({ document: bt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "createDigitalPayment", "mutation", e);
|
|
3653
3014
|
}
|
|
3654
3015
|
};
|
|
3655
3016
|
}
|
|
3656
|
-
class
|
|
3017
|
+
class _t {
|
|
3657
3018
|
config;
|
|
3658
3019
|
sdk;
|
|
3659
|
-
constructor(
|
|
3660
|
-
this.config =
|
|
3020
|
+
constructor(n) {
|
|
3021
|
+
this.config = n, this.sdk = Ct(new v(n.apiUrl));
|
|
3661
3022
|
}
|
|
3662
|
-
async getPaymentDetails(
|
|
3663
|
-
this.debugLog("Fetching payment methods",
|
|
3023
|
+
async getPaymentDetails(n) {
|
|
3024
|
+
this.debugLog("Fetching payment methods", n);
|
|
3664
3025
|
try {
|
|
3665
|
-
const
|
|
3666
|
-
orderId:
|
|
3667
|
-
orderItemId:
|
|
3668
|
-
amountOfTickets:
|
|
3669
|
-
paymentMethodId:
|
|
3670
|
-
withTicketProtection:
|
|
3026
|
+
const e = await this.sdk.findPaymentMethods({
|
|
3027
|
+
orderId: n.orderId,
|
|
3028
|
+
orderItemId: n.orderItemId,
|
|
3029
|
+
amountOfTickets: n.amountOfTickets,
|
|
3030
|
+
paymentMethodId: n.paymentMethodId,
|
|
3031
|
+
withTicketProtection: n.withTicketProtection
|
|
3671
3032
|
});
|
|
3672
|
-
if (!
|
|
3033
|
+
if (!e?.findPaymentDetails)
|
|
3673
3034
|
throw this.debugLog("No payment details found"), new Error("No payment details found for this order");
|
|
3674
|
-
const i =
|
|
3035
|
+
const i = e.findPaymentDetails;
|
|
3675
3036
|
return this.debugLog("Payment methods fetched successfully", {
|
|
3676
3037
|
methodCount: i.methods?.length ?? 0,
|
|
3677
3038
|
transactionPrice: i.transactionPrice,
|
|
@@ -3700,42 +3061,42 @@ class un {
|
|
|
3700
3061
|
})) ?? null
|
|
3701
3062
|
})) ?? null
|
|
3702
3063
|
};
|
|
3703
|
-
} catch (
|
|
3704
|
-
throw this.debugLog("Error fetching payment methods",
|
|
3064
|
+
} catch (e) {
|
|
3065
|
+
throw this.debugLog("Error fetching payment methods", e), e;
|
|
3705
3066
|
}
|
|
3706
3067
|
}
|
|
3707
|
-
async createPayment(
|
|
3708
|
-
this.debugLog("Creating payment",
|
|
3068
|
+
async createPayment(n) {
|
|
3069
|
+
this.debugLog("Creating payment", n);
|
|
3709
3070
|
try {
|
|
3710
|
-
const
|
|
3711
|
-
orderId:
|
|
3712
|
-
paymentMethodId:
|
|
3713
|
-
issuerId:
|
|
3714
|
-
redirectUrl:
|
|
3071
|
+
const e = {
|
|
3072
|
+
orderId: n.orderId,
|
|
3073
|
+
paymentMethodId: n.paymentMethodId,
|
|
3074
|
+
issuerId: n.issuerId,
|
|
3075
|
+
redirectUrl: n.redirectUrl,
|
|
3715
3076
|
// For payment links this input in used
|
|
3716
|
-
initiatedByUserId:
|
|
3717
|
-
initiatedByTeamId:
|
|
3718
|
-
amountOfTickets:
|
|
3719
|
-
orderItemId:
|
|
3720
|
-
withTicketProtection:
|
|
3077
|
+
initiatedByUserId: n.initiatedByUserId,
|
|
3078
|
+
initiatedByTeamId: n.initiatedByTeamId,
|
|
3079
|
+
amountOfTickets: n.amountOfTickets,
|
|
3080
|
+
orderItemId: n.orderItemId,
|
|
3081
|
+
withTicketProtection: n.withTicketProtection
|
|
3721
3082
|
};
|
|
3722
|
-
|
|
3083
|
+
n.customer && (e.customer = n.customer), n.products && (e.products = n.products), n.description && (e.description = n.description), n.reference && (e.reference = n.reference), n.ipAddress && (e.ipAddress = n.ipAddress);
|
|
3723
3084
|
const i = await this.sdk.createDigitalPayment({
|
|
3724
|
-
input:
|
|
3085
|
+
input: e
|
|
3725
3086
|
});
|
|
3726
3087
|
if (!i?.createDigitalOrderPayment)
|
|
3727
3088
|
throw this.debugLog("Failed to create payment"), new Error("Failed to create payment for this order");
|
|
3728
3089
|
const r = i.createDigitalOrderPayment;
|
|
3729
3090
|
return this.debugLog("Payment created successfully", { paymentUrl: r }), { paymentUrl: r };
|
|
3730
|
-
} catch (
|
|
3731
|
-
throw this.debugLog("Error creating payment",
|
|
3091
|
+
} catch (e) {
|
|
3092
|
+
throw this.debugLog("Error creating payment", e), e;
|
|
3732
3093
|
}
|
|
3733
3094
|
}
|
|
3734
|
-
debugLog(
|
|
3735
|
-
this.config.debug && console.log(`[PaymentService] ${
|
|
3095
|
+
debugLog(n, e) {
|
|
3096
|
+
this.config.debug && console.log(`[PaymentService] ${n}`, e || "");
|
|
3736
3097
|
}
|
|
3737
3098
|
}
|
|
3738
|
-
const
|
|
3099
|
+
const Lt = l`
|
|
3739
3100
|
query findAllPublicPackagesByOrganizationId($organizationId: ID!) {
|
|
3740
3101
|
findAllPublicPackagesByOrganizationId(organizationId: $organizationId) {
|
|
3741
3102
|
data {
|
|
@@ -3760,7 +3121,7 @@ const ln = E`
|
|
|
3760
3121
|
count
|
|
3761
3122
|
}
|
|
3762
3123
|
}
|
|
3763
|
-
`,
|
|
3124
|
+
`, Rt = l`
|
|
3764
3125
|
query findPublicPackageById($packageId: ID!) {
|
|
3765
3126
|
findPublicPackageById(id: $packageId) {
|
|
3766
3127
|
id
|
|
@@ -3786,7 +3147,7 @@ const ln = E`
|
|
|
3786
3147
|
}
|
|
3787
3148
|
}
|
|
3788
3149
|
}
|
|
3789
|
-
`,
|
|
3150
|
+
`, wt = l`
|
|
3790
3151
|
query findPublicItemsByPackageId($packageId: ID!, $types: [PackageItemType!], $page: PageInput) {
|
|
3791
3152
|
findPublicItemsByPackageId(packageId: $packageId, types: $types, page: $page) {
|
|
3792
3153
|
data {
|
|
@@ -3821,40 +3182,40 @@ const ln = E`
|
|
|
3821
3182
|
count
|
|
3822
3183
|
}
|
|
3823
3184
|
}
|
|
3824
|
-
`,
|
|
3825
|
-
function
|
|
3185
|
+
`, Ft = (t, n, e, i) => t();
|
|
3186
|
+
function $t(t, n = Ft) {
|
|
3826
3187
|
return {
|
|
3827
|
-
findAllPublicPackagesByOrganizationId(
|
|
3828
|
-
return
|
|
3188
|
+
findAllPublicPackagesByOrganizationId(e, i, r) {
|
|
3189
|
+
return n((s) => t.request({ document: Lt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "findAllPublicPackagesByOrganizationId", "query", e);
|
|
3829
3190
|
},
|
|
3830
|
-
findPublicPackageById(
|
|
3831
|
-
return
|
|
3191
|
+
findPublicPackageById(e, i, r) {
|
|
3192
|
+
return n((s) => t.request({ document: Rt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "findPublicPackageById", "query", e);
|
|
3832
3193
|
},
|
|
3833
|
-
findPublicItemsByPackageId(
|
|
3834
|
-
return
|
|
3194
|
+
findPublicItemsByPackageId(e, i, r) {
|
|
3195
|
+
return n((s) => t.request({ document: wt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "findPublicItemsByPackageId", "query", e);
|
|
3835
3196
|
}
|
|
3836
3197
|
};
|
|
3837
3198
|
}
|
|
3838
|
-
class
|
|
3199
|
+
class Bt {
|
|
3839
3200
|
config;
|
|
3840
3201
|
sdk;
|
|
3841
|
-
constructor(
|
|
3842
|
-
this.config =
|
|
3202
|
+
constructor(n) {
|
|
3203
|
+
this.config = n, this.sdk = $t(new v(n.apiUrl));
|
|
3843
3204
|
}
|
|
3844
|
-
debugLog(
|
|
3845
|
-
this.config.debug && console.log(`[PackageService] ${
|
|
3205
|
+
debugLog(n, e) {
|
|
3206
|
+
this.config.debug && console.log(`[PackageService] ${n}`, e || "");
|
|
3846
3207
|
}
|
|
3847
|
-
async getPackages(
|
|
3208
|
+
async getPackages(n = {}) {
|
|
3848
3209
|
try {
|
|
3849
|
-
let
|
|
3850
|
-
|
|
3851
|
-
index:
|
|
3852
|
-
size:
|
|
3210
|
+
let e;
|
|
3211
|
+
n.page && (e = {
|
|
3212
|
+
index: n.page.index ?? 0,
|
|
3213
|
+
size: n.page.size ?? 20
|
|
3853
3214
|
}), this.debugLog("Fetching public packages", {
|
|
3854
3215
|
organizationId: this.config.organizationId,
|
|
3855
|
-
page:
|
|
3856
|
-
tab:
|
|
3857
|
-
statuses:
|
|
3216
|
+
page: e,
|
|
3217
|
+
tab: n.tab,
|
|
3218
|
+
statuses: n.statuses
|
|
3858
3219
|
});
|
|
3859
3220
|
const i = await this.sdk.findAllPublicPackagesByOrganizationId({
|
|
3860
3221
|
organizationId: this.config.organizationId
|
|
@@ -3867,31 +3228,31 @@ class gn {
|
|
|
3867
3228
|
}), r.data;
|
|
3868
3229
|
}
|
|
3869
3230
|
return null;
|
|
3870
|
-
} catch (
|
|
3871
|
-
throw this.debugLog("Error fetching public packages",
|
|
3231
|
+
} catch (e) {
|
|
3232
|
+
throw this.debugLog("Error fetching public packages", e), e;
|
|
3872
3233
|
}
|
|
3873
3234
|
}
|
|
3874
|
-
async getPackage(
|
|
3235
|
+
async getPackage(n) {
|
|
3875
3236
|
try {
|
|
3876
3237
|
this.debugLog("Fetching public packages", {
|
|
3877
|
-
packageId:
|
|
3238
|
+
packageId: n
|
|
3878
3239
|
});
|
|
3879
|
-
const
|
|
3880
|
-
if (
|
|
3881
|
-
const i =
|
|
3240
|
+
const e = await this.sdk.findPublicPackageById({ packageId: n });
|
|
3241
|
+
if (e?.findPublicPackageById) {
|
|
3242
|
+
const i = e.findPublicPackageById;
|
|
3882
3243
|
return this.debugLog("Public package fetched"), i;
|
|
3883
3244
|
}
|
|
3884
3245
|
return null;
|
|
3885
|
-
} catch (
|
|
3886
|
-
throw this.debugLog("Error fetching public packages",
|
|
3246
|
+
} catch (e) {
|
|
3247
|
+
throw this.debugLog("Error fetching public packages", e), e;
|
|
3887
3248
|
}
|
|
3888
3249
|
}
|
|
3889
|
-
async getPackageItems(
|
|
3250
|
+
async getPackageItems(n, e = [R.Regular, R.AdditionalEvent]) {
|
|
3890
3251
|
try {
|
|
3891
|
-
this.debugLog("Fetching public package items", { packageId:
|
|
3252
|
+
this.debugLog("Fetching public package items", { packageId: n, types: e });
|
|
3892
3253
|
const i = await this.sdk.findPublicItemsByPackageId({
|
|
3893
|
-
packageId:
|
|
3894
|
-
types:
|
|
3254
|
+
packageId: n,
|
|
3255
|
+
types: e,
|
|
3895
3256
|
page: { index: 0, size: 100 }
|
|
3896
3257
|
});
|
|
3897
3258
|
if (i?.findPublicItemsByPackageId) {
|
|
@@ -3907,7 +3268,7 @@ class gn {
|
|
|
3907
3268
|
}
|
|
3908
3269
|
}
|
|
3909
3270
|
}
|
|
3910
|
-
const
|
|
3271
|
+
const Vt = l`
|
|
3911
3272
|
query findAllPublicCategoriesByOrganizationId($organizationId: ID!, $dateRange: DateRangeInput) {
|
|
3912
3273
|
findAllPublicLocationsByOrganizationId(id: $organizationId) {
|
|
3913
3274
|
data {
|
|
@@ -3927,89 +3288,89 @@ const In = E`
|
|
|
3927
3288
|
count
|
|
3928
3289
|
}
|
|
3929
3290
|
}
|
|
3930
|
-
`,
|
|
3931
|
-
function
|
|
3291
|
+
`, Ut = (t, n, e, i) => t();
|
|
3292
|
+
function Mt(t, n = Ut) {
|
|
3932
3293
|
return {
|
|
3933
|
-
findAllPublicCategoriesByOrganizationId(
|
|
3934
|
-
return
|
|
3294
|
+
findAllPublicCategoriesByOrganizationId(e, i, r) {
|
|
3295
|
+
return n((s) => t.request({ document: Vt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "findAllPublicCategoriesByOrganizationId", "query", e);
|
|
3935
3296
|
}
|
|
3936
3297
|
};
|
|
3937
3298
|
}
|
|
3938
|
-
class
|
|
3299
|
+
class zt {
|
|
3939
3300
|
config;
|
|
3940
3301
|
sdk;
|
|
3941
|
-
constructor(
|
|
3942
|
-
this.config =
|
|
3302
|
+
constructor(n) {
|
|
3303
|
+
this.config = n, this.sdk = Mt(new v(n.apiUrl));
|
|
3943
3304
|
}
|
|
3944
|
-
debugLog(
|
|
3945
|
-
this.config.debug && console.log(`[CategoryService] ${
|
|
3305
|
+
debugLog(n, e) {
|
|
3306
|
+
this.config.debug && console.log(`[CategoryService] ${n}`, e || "");
|
|
3946
3307
|
}
|
|
3947
|
-
async getCategories(
|
|
3308
|
+
async getCategories(n) {
|
|
3948
3309
|
try {
|
|
3949
3310
|
this.debugLog("Fetching all categories", { organizationId: this.config.organizationId });
|
|
3950
|
-
const
|
|
3951
|
-
if (
|
|
3952
|
-
const i =
|
|
3311
|
+
const e = await this.sdk.findAllPublicCategoriesByOrganizationId({ organizationId: this.config.organizationId, dateRange: n ?? null });
|
|
3312
|
+
if (e?.findAllPublicHostingsByOrganizationId) {
|
|
3313
|
+
const i = e.findAllPublicHostingsByOrganizationId, r = e.findAllPublicLocationsByOrganizationId;
|
|
3953
3314
|
return this.debugLog("Categories fetched", { count: i.count + r.count, dataLength: i.data.length + r.data.length }), [
|
|
3954
3315
|
...i.data.map((s) => ({ id: s.id, name: s.name, icon: s.icon, activeEvents: s.amountOfActiveEvents, type: "HOSTING" })),
|
|
3955
3316
|
...r.data.map((s) => ({ id: s.id, name: s.name, activeEvents: s.amountOfActiveEvents, type: "LOCATION" }))
|
|
3956
3317
|
];
|
|
3957
3318
|
}
|
|
3958
3319
|
return [];
|
|
3959
|
-
} catch (
|
|
3960
|
-
throw this.debugLog("Error fetching categories",
|
|
3320
|
+
} catch (e) {
|
|
3321
|
+
throw this.debugLog("Error fetching categories", e), e;
|
|
3961
3322
|
}
|
|
3962
3323
|
}
|
|
3963
3324
|
}
|
|
3964
|
-
const
|
|
3325
|
+
const qt = l`
|
|
3965
3326
|
mutation CreateShopView($id: ID!, $trackerLinkId: ID) {
|
|
3966
3327
|
createShopView(id: $id, trackerId: $trackerLinkId)
|
|
3967
3328
|
}
|
|
3968
|
-
`,
|
|
3329
|
+
`, Gt = l`
|
|
3969
3330
|
mutation CreateEventView($id: ID!, $shopId: ID, $trackerLinkId: ID) {
|
|
3970
3331
|
createEventView(id: $id, shopId: $shopId, trackerId: $trackerLinkId)
|
|
3971
3332
|
}
|
|
3972
|
-
`,
|
|
3333
|
+
`, jt = l`
|
|
3973
3334
|
mutation CreatePackageView($id: ID!, $shopId: ID, $trackerLinkId: ID) {
|
|
3974
3335
|
createPackageView(id: $id, shopId: $shopId, trackerId: $trackerLinkId)
|
|
3975
3336
|
}
|
|
3976
|
-
`,
|
|
3977
|
-
function
|
|
3337
|
+
`, Yt = (t, n, e, i) => t();
|
|
3338
|
+
function Ht(t, n = Yt) {
|
|
3978
3339
|
return {
|
|
3979
|
-
CreateShopView(
|
|
3980
|
-
return
|
|
3340
|
+
CreateShopView(e, i, r) {
|
|
3341
|
+
return n((s) => t.request({ document: qt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "CreateShopView", "mutation", e);
|
|
3981
3342
|
},
|
|
3982
|
-
CreateEventView(
|
|
3983
|
-
return
|
|
3343
|
+
CreateEventView(e, i, r) {
|
|
3344
|
+
return n((s) => t.request({ document: Gt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "CreateEventView", "mutation", e);
|
|
3984
3345
|
},
|
|
3985
|
-
CreatePackageView(
|
|
3986
|
-
return
|
|
3346
|
+
CreatePackageView(e, i, r) {
|
|
3347
|
+
return n((s) => t.request({ document: jt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "CreatePackageView", "mutation", e);
|
|
3987
3348
|
}
|
|
3988
3349
|
};
|
|
3989
3350
|
}
|
|
3990
|
-
class
|
|
3351
|
+
class Jt {
|
|
3991
3352
|
config;
|
|
3992
3353
|
sdk;
|
|
3993
|
-
constructor(
|
|
3994
|
-
this.config =
|
|
3354
|
+
constructor(n) {
|
|
3355
|
+
this.config = n, this.sdk = Ht(new v(n.apiUrl));
|
|
3995
3356
|
}
|
|
3996
|
-
createMetric = async (
|
|
3997
|
-
switch (!
|
|
3998
|
-
id:
|
|
3357
|
+
createMetric = async (n, e, i) => {
|
|
3358
|
+
switch (!e && !i && await this.sdk.CreateShopView({
|
|
3359
|
+
id: n,
|
|
3999
3360
|
trackerLinkId: this.config.trackerId
|
|
4000
3361
|
}), i) {
|
|
4001
|
-
case
|
|
3362
|
+
case w.Event:
|
|
4002
3363
|
await this.sdk.CreateEventView({
|
|
4003
|
-
id:
|
|
4004
|
-
shopId:
|
|
3364
|
+
id: n,
|
|
3365
|
+
shopId: e,
|
|
4005
3366
|
trackerLinkId: this.config.trackerId
|
|
4006
3367
|
});
|
|
4007
3368
|
break;
|
|
4008
|
-
case
|
|
3369
|
+
case w.Package:
|
|
4009
3370
|
await this.sdk.CreatePackageView(
|
|
4010
3371
|
{
|
|
4011
|
-
id:
|
|
4012
|
-
shopId:
|
|
3372
|
+
id: n,
|
|
3373
|
+
shopId: e,
|
|
4013
3374
|
trackerLinkId: this.config.trackerId
|
|
4014
3375
|
}
|
|
4015
3376
|
);
|
|
@@ -4017,8 +3378,8 @@ class Nn {
|
|
|
4017
3378
|
}
|
|
4018
3379
|
};
|
|
4019
3380
|
}
|
|
4020
|
-
const
|
|
4021
|
-
class
|
|
3381
|
+
const Qt = "https://api.ticketapp.com/graphql", Z = "TIC_TRACKER_ID";
|
|
3382
|
+
class Zt {
|
|
4022
3383
|
basket;
|
|
4023
3384
|
event;
|
|
4024
3385
|
payment;
|
|
@@ -4026,42 +3387,42 @@ class Sn {
|
|
|
4026
3387
|
category;
|
|
4027
3388
|
metric;
|
|
4028
3389
|
// Attach selected public types to the SDK class
|
|
4029
|
-
static Types =
|
|
4030
|
-
constructor(
|
|
4031
|
-
const { organizationId:
|
|
4032
|
-
this.basket = new
|
|
3390
|
+
static Types = Te;
|
|
3391
|
+
constructor(n) {
|
|
3392
|
+
const { organizationId: e, debug: i = !1, apiUrl: r = Qt } = n, s = this.getOrInitTrackerId();
|
|
3393
|
+
this.basket = new kt({ debug: i, apiUrl: r, shopId: n.shopId, trackerId: s }), this.event = new Pt({ organizationId: e, debug: i, apiUrl: r, trackerId: s }), this.payment = new _t({ debug: i, apiUrl: r }), this.package = new Bt({ organizationId: e, debug: i, apiUrl: r }), this.category = new zt({ organizationId: e, debug: i, apiUrl: r }), this.metric = new Jt({ apiUrl: r, trackerId: s });
|
|
4033
3394
|
}
|
|
4034
3395
|
// Resolve tracker id from (in order): explicit config, URL query, or session storage
|
|
4035
3396
|
// Persist to session when found via config or URL for subsequent page loads
|
|
4036
3397
|
getOrInitTrackerId() {
|
|
4037
3398
|
try {
|
|
4038
|
-
let
|
|
3399
|
+
let n = null, e = null;
|
|
4039
3400
|
if (typeof window < "u") {
|
|
4040
3401
|
try {
|
|
4041
|
-
|
|
3402
|
+
e = new URL(window.location.href).searchParams.get("trackerId");
|
|
4042
3403
|
} catch {
|
|
4043
3404
|
}
|
|
4044
3405
|
try {
|
|
4045
|
-
|
|
3406
|
+
n = window.sessionStorage?.getItem(Z) ?? null;
|
|
4046
3407
|
} catch {
|
|
4047
3408
|
}
|
|
4048
3409
|
}
|
|
4049
|
-
if (
|
|
3410
|
+
if (e && e.trim().length > 0) {
|
|
4050
3411
|
try {
|
|
4051
|
-
typeof window < "u" && window.sessionStorage && sessionStorage.setItem(
|
|
3412
|
+
typeof window < "u" && window.sessionStorage && sessionStorage.setItem(Z, e);
|
|
4052
3413
|
} catch {
|
|
4053
3414
|
}
|
|
4054
|
-
return
|
|
3415
|
+
return e;
|
|
4055
3416
|
}
|
|
4056
|
-
if (
|
|
3417
|
+
if (n && n.trim().length > 0) {
|
|
4057
3418
|
try {
|
|
4058
3419
|
if (typeof window < "u") {
|
|
4059
3420
|
const i = new URL(window.location.href);
|
|
4060
|
-
i.searchParams.get("trackerId") || (i.searchParams.set("trackerId",
|
|
3421
|
+
i.searchParams.get("trackerId") || (i.searchParams.set("trackerId", n), window.history.replaceState({}, "", i.toString()));
|
|
4061
3422
|
}
|
|
4062
3423
|
} catch {
|
|
4063
3424
|
}
|
|
4064
|
-
return
|
|
3425
|
+
return n;
|
|
4065
3426
|
}
|
|
4066
3427
|
return;
|
|
4067
3428
|
} catch {
|
|
@@ -4070,17 +3431,17 @@ class Sn {
|
|
|
4070
3431
|
}
|
|
4071
3432
|
}
|
|
4072
3433
|
export {
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
3434
|
+
T as BasketOrderType,
|
|
3435
|
+
oe as DiscountType,
|
|
3436
|
+
te as EventStatus,
|
|
3437
|
+
w as MetricsType,
|
|
3438
|
+
ae as OrderItemType,
|
|
3439
|
+
R as PackageItemType,
|
|
3440
|
+
K as PackageStatus,
|
|
3441
|
+
ee as PackageTabType,
|
|
3442
|
+
se as PaymentMethodFeeType,
|
|
3443
|
+
ie as ProductStatus,
|
|
3444
|
+
re as ProductType,
|
|
3445
|
+
ne as SortOrder,
|
|
3446
|
+
Zt as TicketappSDK
|
|
4086
3447
|
};
|