@ticketapp-dev/shop-sdk 1.0.60 → 1.0.61

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 CHANGED
@@ -1,6 +1,6 @@
1
- import { GraphQLClient as A } from "graphql-request";
1
+ import { GraphQLClient as O } from "graphql-request";
2
2
  import { DateTime as Te } from "luxon";
3
- var T = /* @__PURE__ */ ((e) => (e.PACKAGE = "PACKAGE", e.PRODUCT = "PRODUCT", e.ADD_ONS = "ADD_ONS", e.DELIVERY = "DELIVERY", e.PICKUP = "PICKUP", e))(T || {}), L = /* @__PURE__ */ ((e) => (e.AdditionalEvent = "ADDITIONAL_EVENT", e.Addon = "ADDON", e.Regular = "REGULAR", e))(L || {}), W = /* @__PURE__ */ ((e) => (e.Active = "ACTIVE", e.Concept = "CONCEPT", e.Paused = "PAUSED", e.SoldOut = "SOLD_OUT", e))(W || {}), Z = /* @__PURE__ */ ((e) => (e.Active = "ACTIVE", e.Inactive = "INACTIVE", e))(Z || {}), K = /* @__PURE__ */ ((e) => (e.Active = "ACTIVE", e.Inactive = "INACTIVE", e.Paused = "PAUSED", e.SoldOut = "SOLD_OUT", e))(K || {}), ee = /* @__PURE__ */ ((e) => (e.Asc = "ASC", e.Desc = "DESC", e))(ee || {}), te = /* @__PURE__ */ ((e) => (e.AllReserved = "ALL_RESERVED", e.Available = "AVAILABLE", e.SoldOut = "SOLD_OUT", e))(te || {}), ne = /* @__PURE__ */ ((e) => (e.Addon = "ADDON", e.Delivery = "DELIVERY", e.Door = "DOOR", e.Friend = "FRIEND", e.Guest = "GUEST", e.Pickup = "PICKUP", e.Promoter = "PROMOTER", e.Ticket = "TICKET", e))(ne || {}), re = /* @__PURE__ */ ((e) => (e.FIXED = "FIXED", e.PERCENTAGE = "PERCENTAGE", e))(re || {}), ie = /* @__PURE__ */ ((e) => (e.AddOn = "ADD_ON", e.DeliveryOption = "DELIVERY_OPTION", e.EntranceTicket = "ENTRANCE_TICKET", e))(ie || {}), se = /* @__PURE__ */ ((e) => (e.Fixed = "FIXED", e.Percentage = "PERCENTAGE", e))(se || {}), ae = /* @__PURE__ */ ((e) => (e.Default = "DEFAULT", e.Transparent = "TRANSPARENT", e))(ae || {}), oe = /* @__PURE__ */ ((e) => (e.Calendar = "CALENDAR", e.Large = "LARGE", e.Small = "SMALL", e))(oe || {}), R = /* @__PURE__ */ ((e) => (e.Event = "EVENT", e.Package = "PACKAGE", e))(R || {}), ce = /* @__PURE__ */ ((e) => (e.RADIO_BUTTON = "RADIO_BUTTON", e.DATE = "DATE", e.EMAIL = "EMAIL", e.NUMERIC = "NUMERIC", e.DROPDOWN = "DROPDOWN", e.TEXT = "TEXT", e.TEXT_AREA = "TEXT_AREA", e.TIME = "TIME", e.CHECKBOX = "CHECKBOX", e.PHONE_NUMBER = "PHONE_NUMBER", e))(ce || {}), de = /* @__PURE__ */ ((e) => (e.GENDER = "GENDER", e.FIRST_NAME = "FIRST_NAME", e.LAST_NAME = "LAST_NAME", e.EMAIL = "EMAIL", e.AGE = "AGE", e.RESIDENCE = "RESIDENCE", e.GOOGLE_PLACE = "GOOGLE_PLACE", e))(de || {}), ue = /* @__PURE__ */ ((e) => (e.ONLINE = "ONLINE", e.OFFLINE = "OFFLINE", e))(ue || {});
3
+ var T = /* @__PURE__ */ ((e) => (e.PACKAGE = "PACKAGE", e.PRODUCT = "PRODUCT", e.ADD_ONS = "ADD_ONS", e.DELIVERY = "DELIVERY", e.PICKUP = "PICKUP", e))(T || {}), L = /* @__PURE__ */ ((e) => (e.AdditionalEvent = "ADDITIONAL_EVENT", e.Addon = "ADDON", e.Regular = "REGULAR", e))(L || {}), W = /* @__PURE__ */ ((e) => (e.Active = "ACTIVE", e.Concept = "CONCEPT", e.Paused = "PAUSED", e.SoldOut = "SOLD_OUT", e))(W || {}), Z = /* @__PURE__ */ ((e) => (e.Active = "ACTIVE", e.Inactive = "INACTIVE", e))(Z || {}), K = /* @__PURE__ */ ((e) => (e.Active = "ACTIVE", e.Inactive = "INACTIVE", e.Paused = "PAUSED", e.SoldOut = "SOLD_OUT", e))(K || {}), ee = /* @__PURE__ */ ((e) => (e.Asc = "ASC", e.Desc = "DESC", e))(ee || {}), te = /* @__PURE__ */ ((e) => (e.AllReserved = "ALL_RESERVED", e.Available = "AVAILABLE", e.SoldOut = "SOLD_OUT", e))(te || {}), ne = /* @__PURE__ */ ((e) => (e.Addon = "ADDON", e.Delivery = "DELIVERY", e.Door = "DOOR", e.Friend = "FRIEND", e.Guest = "GUEST", e.Pickup = "PICKUP", e.Promoter = "PROMOTER", e.Ticket = "TICKET", e))(ne || {}), re = /* @__PURE__ */ ((e) => (e.FIXED = "FIXED", e.PERCENTAGE = "PERCENTAGE", e))(re || {}), ie = /* @__PURE__ */ ((e) => (e.AddOn = "ADD_ON", e.DeliveryOption = "DELIVERY_OPTION", e.EntranceTicket = "ENTRANCE_TICKET", e))(ie || {}), se = /* @__PURE__ */ ((e) => (e.Fixed = "FIXED", e.Percentage = "PERCENTAGE", e))(se || {}), oe = /* @__PURE__ */ ((e) => (e.Default = "DEFAULT", e.Transparent = "TRANSPARENT", e))(oe || {}), ae = /* @__PURE__ */ ((e) => (e.Calendar = "CALENDAR", e.Large = "LARGE", e.Small = "SMALL", e))(ae || {}), R = /* @__PURE__ */ ((e) => (e.Event = "EVENT", e.Package = "PACKAGE", e))(R || {}), ce = /* @__PURE__ */ ((e) => (e.RADIO_BUTTON = "RADIO_BUTTON", e.DATE = "DATE", e.EMAIL = "EMAIL", e.NUMERIC = "NUMERIC", e.DROPDOWN = "DROPDOWN", e.TEXT = "TEXT", e.TEXT_AREA = "TEXT_AREA", e.TIME = "TIME", e.CHECKBOX = "CHECKBOX", e.PHONE_NUMBER = "PHONE_NUMBER", e))(ce || {}), de = /* @__PURE__ */ ((e) => (e.GENDER = "GENDER", e.FIRST_NAME = "FIRST_NAME", e.LAST_NAME = "LAST_NAME", e.EMAIL = "EMAIL", e.AGE = "AGE", e.RESIDENCE = "RESIDENCE", e.GOOGLE_PLACE = "GOOGLE_PLACE", e))(de || {}), ue = /* @__PURE__ */ ((e) => (e.ONLINE = "ONLINE", e.OFFLINE = "OFFLINE", e))(ue || {});
4
4
  const De = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5
5
  __proto__: null,
6
6
  BasketOrderType: T,
@@ -17,8 +17,8 @@ const De = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
17
17
  ProductStatus: te,
18
18
  ProductType: ne,
19
19
  SalesLocations: ue,
20
- ShopTemplateType: ae,
21
- ShopVariationType: oe,
20
+ ShopTemplateType: oe,
21
+ ShopVariationType: ae,
22
22
  SortOrder: ee
23
23
  }, Symbol.toStringTag, { value: "Module" }));
24
24
  var w = function() {
@@ -63,14 +63,14 @@ function be(e) {
63
63
  );
64
64
  }
65
65
  function le(e, t) {
66
- const n = e.locationOffset.column - 1, r = "".padStart(n) + e.body, i = t.line - 1, s = e.locationOffset.line - 1, o = t.line + s, l = t.line === 1 ? n : 0, h = t.column + l, E = `${e.name}:${o}:${h}
66
+ const n = e.locationOffset.column - 1, r = "".padStart(n) + e.body, i = t.line - 1, s = e.locationOffset.line - 1, a = t.line + s, l = t.line === 1 ? n : 0, h = t.column + l, E = `${e.name}:${a}:${h}
67
67
  `, p = r.split(/\r\n|[\n\r]/g), d = p[i];
68
68
  if (d.length > 120) {
69
69
  const g = Math.floor(h / 80), y = h % 80, m = [];
70
70
  for (let k = 0; k < d.length; k += 80)
71
71
  m.push(d.slice(k, k + 80));
72
72
  return E + Q([
73
- [`${o} |`, m[0]],
73
+ [`${a} |`, m[0]],
74
74
  ...m.slice(1, g + 1).map((k) => ["|", k]),
75
75
  ["|", "^".padStart(y)],
76
76
  ["|", m[g + 1]]
@@ -78,10 +78,10 @@ function le(e, t) {
78
78
  }
79
79
  return E + Q([
80
80
  // Lines specified like this: ["prefix", "string"],
81
- [`${o - 1} |`, p[i - 1]],
82
- [`${o} |`, d],
81
+ [`${a - 1} |`, p[i - 1]],
82
+ [`${a} |`, d],
83
83
  ["|", "^".padStart(h)],
84
- [`${o + 1} |`, p[i + 1]]
84
+ [`${a + 1} |`, p[i + 1]]
85
85
  ]);
86
86
  }
87
87
  function Q(e) {
@@ -141,9 +141,9 @@ class G extends Error {
141
141
  */
142
142
  constructor(t, ...n) {
143
143
  var r, i, s;
144
- const { nodes: o, source: l, positions: h, path: E, originalError: p, extensions: d } = xe(n);
144
+ const { nodes: a, source: l, positions: h, path: E, originalError: p, extensions: d } = xe(n);
145
145
  super(t), this.name = "GraphQLError", this.path = E ?? void 0, this.originalError = p ?? void 0, this.nodes = X(
146
- Array.isArray(o) ? o : o ? [o] : void 0
146
+ Array.isArray(a) ? a : a ? [a] : void 0
147
147
  );
148
148
  const g = X(
149
149
  (r = this.nodes) === null || r === void 0 ? void 0 : r.map((m) => m.loc).filter((m) => m != null)
@@ -271,8 +271,8 @@ class he {
271
271
  * including ignored tokens. <SOF> is always the first node and <EOF>
272
272
  * the last.
273
273
  */
274
- constructor(t, n, r, i, s, o) {
275
- this.kind = t, this.start = n, this.end = r, this.line = i, this.column = s, this.value = o, this.prev = null, this.next = null;
274
+ constructor(t, n, r, i, s, a) {
275
+ this.kind = t, this.start = n, this.end = r, this.line = i, this.column = s, this.value = a, this.prev = null, this.next = null;
276
276
  }
277
277
  get [Symbol.toStringTag]() {
278
278
  return "Token";
@@ -406,12 +406,12 @@ function Le(e) {
406
406
  function Re(e) {
407
407
  var t;
408
408
  let n = Number.MAX_SAFE_INTEGER, r = null, i = -1;
409
- for (let o = 0; o < e.length; ++o) {
409
+ for (let a = 0; a < e.length; ++a) {
410
410
  var s;
411
- const l = e[o], h = we(l);
412
- h !== l.length && (r = (s = r) !== null && s !== void 0 ? s : o, i = o, o !== 0 && h < n && (n = h));
411
+ const l = e[a], h = we(l);
412
+ h !== l.length && (r = (s = r) !== null && s !== void 0 ? s : a, i = a, a !== 0 && h < n && (n = h));
413
413
  }
414
- return e.map((o, l) => l === 0 ? o : o.slice(n)).slice(
414
+ return e.map((a, l) => l === 0 ? a : a.slice(n)).slice(
415
415
  (t = r) !== null && t !== void 0 ? t : 0,
416
416
  i + 1
417
417
  );
@@ -422,10 +422,10 @@ function we(e) {
422
422
  ++t;
423
423
  return t;
424
424
  }
425
- var a;
425
+ var o;
426
426
  (function(e) {
427
427
  e.SOF = "<SOF>", e.EOF = "<EOF>", e.BANG = "!", e.DOLLAR = "$", e.AMP = "&", e.PAREN_L = "(", e.PAREN_R = ")", e.DOT = ".", e.SPREAD = "...", e.COLON = ":", e.EQUALS = "=", e.AT = "@", e.BRACKET_L = "[", e.BRACKET_R = "]", e.BRACE_L = "{", e.PIPE = "|", e.BRACE_R = "}", e.NAME = "Name", e.INT = "Int", e.FLOAT = "Float", e.STRING = "String", e.BLOCK_STRING = "BlockString", e.COMMENT = "Comment";
428
- })(a || (a = {}));
428
+ })(o || (o = {}));
429
429
  class Fe {
430
430
  /**
431
431
  * The previously focused non-ignored token.
@@ -440,7 +440,7 @@ class Fe {
440
440
  * The character offset at which the current line begins.
441
441
  */
442
442
  constructor(t) {
443
- const n = new he(a.SOF, 0, 0, 0, 0);
443
+ const n = new he(o.SOF, 0, 0, 0, 0);
444
444
  this.source = t, this.lastToken = n, this.token = n, this.line = 1, this.lineStart = 0;
445
445
  }
446
446
  get [Symbol.toStringTag]() {
@@ -458,7 +458,7 @@ class Fe {
458
458
  */
459
459
  lookahead() {
460
460
  let t = this.token;
461
- if (t.kind !== a.EOF)
461
+ if (t.kind !== o.EOF)
462
462
  do
463
463
  if (t.next)
464
464
  t = t.next;
@@ -466,12 +466,12 @@ class Fe {
466
466
  const n = Be(this, t.end);
467
467
  t.next = n, n.prev = t, t = n;
468
468
  }
469
- while (t.kind === a.COMMENT);
469
+ while (t.kind === o.COMMENT);
470
470
  return t;
471
471
  }
472
472
  }
473
473
  function $e(e) {
474
- return e === a.BANG || e === a.DOLLAR || e === a.AMP || e === a.PAREN_L || e === a.PAREN_R || e === a.DOT || e === a.SPREAD || e === a.COLON || e === a.EQUALS || e === a.AT || e === a.BRACKET_L || e === a.BRACKET_R || e === a.BRACE_L || e === a.PIPE || e === a.BRACE_R;
474
+ return e === o.BANG || e === o.DOLLAR || e === o.AMP || e === o.PAREN_L || e === o.PAREN_R || e === o.DOT || e === o.SPREAD || e === o.COLON || e === o.EQUALS || e === o.AT || e === o.BRACKET_L || e === o.BRACKET_R || e === o.BRACE_L || e === o.PIPE || e === o.BRACE_R;
475
475
  }
476
476
  function v(e) {
477
477
  return e >= 0 && e <= 55295 || e >= 57344 && e <= 1114111;
@@ -488,7 +488,7 @@ function fe(e) {
488
488
  function D(e, t) {
489
489
  const n = e.source.body.codePointAt(t);
490
490
  if (n === void 0)
491
- return a.EOF;
491
+ return o.EOF;
492
492
  if (n >= 32 && n <= 126) {
493
493
  const r = String.fromCodePoint(n);
494
494
  return r === '"' ? `'"'` : `"${r}"`;
@@ -496,8 +496,8 @@ function D(e, t) {
496
496
  return "U+" + n.toString(16).toUpperCase().padStart(4, "0");
497
497
  }
498
498
  function f(e, t, n, r, i) {
499
- const s = e.line, o = 1 + n - e.lineStart;
500
- return new he(t, n, r, s, o, i);
499
+ const s = e.line, a = 1 + n - e.lineStart;
500
+ return new he(t, n, r, s, a, i);
501
501
  }
502
502
  function Be(e, t) {
503
503
  const n = e.source.body, r = n.length;
@@ -550,35 +550,35 @@ function Be(e, t) {
550
550
  //
551
551
  // Punctuator :: one of ! $ & ( ) ... : = @ [ ] { | }
552
552
  case 33:
553
- return f(e, a.BANG, i, i + 1);
553
+ return f(e, o.BANG, i, i + 1);
554
554
  case 36:
555
- return f(e, a.DOLLAR, i, i + 1);
555
+ return f(e, o.DOLLAR, i, i + 1);
556
556
  case 38:
557
- return f(e, a.AMP, i, i + 1);
557
+ return f(e, o.AMP, i, i + 1);
558
558
  case 40:
559
- return f(e, a.PAREN_L, i, i + 1);
559
+ return f(e, o.PAREN_L, i, i + 1);
560
560
  case 41:
561
- return f(e, a.PAREN_R, i, i + 1);
561
+ return f(e, o.PAREN_R, i, i + 1);
562
562
  case 46:
563
563
  if (n.charCodeAt(i + 1) === 46 && n.charCodeAt(i + 2) === 46)
564
- return f(e, a.SPREAD, i, i + 3);
564
+ return f(e, o.SPREAD, i, i + 3);
565
565
  break;
566
566
  case 58:
567
- return f(e, a.COLON, i, i + 1);
567
+ return f(e, o.COLON, i, i + 1);
568
568
  case 61:
569
- return f(e, a.EQUALS, i, i + 1);
569
+ return f(e, o.EQUALS, i, i + 1);
570
570
  case 64:
571
- return f(e, a.AT, i, i + 1);
571
+ return f(e, o.AT, i, i + 1);
572
572
  case 91:
573
- return f(e, a.BRACKET_L, i, i + 1);
573
+ return f(e, o.BRACKET_L, i, i + 1);
574
574
  case 93:
575
- return f(e, a.BRACKET_R, i, i + 1);
575
+ return f(e, o.BRACKET_R, i, i + 1);
576
576
  case 123:
577
- return f(e, a.BRACE_L, i, i + 1);
577
+ return f(e, o.BRACE_L, i, i + 1);
578
578
  case 124:
579
- return f(e, a.PIPE, i, i + 1);
579
+ return f(e, o.PIPE, i, i + 1);
580
580
  case 125:
581
- return f(e, a.BRACE_R, i, i + 1);
581
+ return f(e, o.BRACE_R, i, i + 1);
582
582
  // StringValue
583
583
  case 34:
584
584
  return n.charCodeAt(i + 1) === 34 && n.charCodeAt(i + 2) === 34 ? je(e, i) : Me(e, i);
@@ -593,7 +593,7 @@ function Be(e, t) {
593
593
  s === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : v(s) || $(n, i) ? `Unexpected character: ${D(e, i)}.` : `Invalid character: ${D(e, i)}.`
594
594
  );
595
595
  }
596
- return f(e, a.EOF, r, r);
596
+ return f(e, o.EOF, r, r);
597
597
  }
598
598
  function Ue(e, t) {
599
599
  const n = e.source.body, r = n.length;
@@ -611,7 +611,7 @@ function Ue(e, t) {
611
611
  }
612
612
  return f(
613
613
  e,
614
- a.COMMENT,
614
+ o.COMMENT,
615
615
  t,
616
616
  i,
617
617
  n.slice(t + 1, i)
@@ -619,7 +619,7 @@ function Ue(e, t) {
619
619
  }
620
620
  function Ve(e, t, n) {
621
621
  const r = e.source.body;
622
- let i = t, s = n, o = !1;
622
+ let i = t, s = n, a = !1;
623
623
  if (s === 45 && (s = r.charCodeAt(++i)), s === 48) {
624
624
  if (s = r.charCodeAt(++i), x(s))
625
625
  throw I(
@@ -632,7 +632,7 @@ function Ve(e, t, n) {
632
632
  );
633
633
  } else
634
634
  i = V(e, i, s), s = r.charCodeAt(i);
635
- if (s === 46 && (o = !0, s = r.charCodeAt(++i), i = V(e, i, s), s = r.charCodeAt(i)), (s === 69 || s === 101) && (o = !0, s = r.charCodeAt(++i), (s === 43 || s === 45) && (s = r.charCodeAt(++i)), i = V(e, i, s), s = r.charCodeAt(i)), s === 46 || ge(s))
635
+ if (s === 46 && (a = !0, s = r.charCodeAt(++i), i = V(e, i, s), s = r.charCodeAt(i)), (s === 69 || s === 101) && (a = !0, s = r.charCodeAt(++i), (s === 43 || s === 45) && (s = r.charCodeAt(++i)), i = V(e, i, s), s = r.charCodeAt(i)), s === 46 || ge(s))
636
636
  throw I(
637
637
  e.source,
638
638
  i,
@@ -643,7 +643,7 @@ function Ve(e, t, n) {
643
643
  );
644
644
  return f(
645
645
  e,
646
- o ? a.FLOAT : a.INT,
646
+ a ? o.FLOAT : o.INT,
647
647
  t,
648
648
  i,
649
649
  r.slice(t, i)
@@ -667,15 +667,15 @@ function V(e, t, n) {
667
667
  }
668
668
  function Me(e, t) {
669
669
  const n = e.source.body, r = n.length;
670
- let i = t + 1, s = i, o = "";
670
+ let i = t + 1, s = i, a = "";
671
671
  for (; i < r; ) {
672
672
  const l = n.charCodeAt(i);
673
673
  if (l === 34)
674
- return o += n.slice(s, i), f(e, a.STRING, t, i + 1, o);
674
+ return a += n.slice(s, i), f(e, o.STRING, t, i + 1, a);
675
675
  if (l === 92) {
676
- o += n.slice(s, i);
676
+ a += n.slice(s, i);
677
677
  const h = n.charCodeAt(i + 1) === 117 ? n.charCodeAt(i + 2) === 123 ? qe(e, i) : ze(e, i) : Ge(e, i);
678
- o += h.value, i += h.size, s = i;
678
+ a += h.value, i += h.size, s = i;
679
679
  continue;
680
680
  }
681
681
  if (l === 10 || l === 13)
@@ -804,15 +804,15 @@ function Ge(e, t) {
804
804
  }
805
805
  function je(e, t) {
806
806
  const n = e.source.body, r = n.length;
807
- let i = e.lineStart, s = t + 3, o = s, l = "";
807
+ let i = e.lineStart, s = t + 3, a = s, l = "";
808
808
  const h = [];
809
809
  for (; s < r; ) {
810
810
  const E = n.charCodeAt(s);
811
811
  if (E === 34 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34) {
812
- l += n.slice(o, s), h.push(l);
812
+ l += n.slice(a, s), h.push(l);
813
813
  const p = f(
814
814
  e,
815
- a.BLOCK_STRING,
815
+ o.BLOCK_STRING,
816
816
  t,
817
817
  s + 3,
818
818
  // Return a string of the lines joined with U+000A.
@@ -822,11 +822,11 @@ function je(e, t) {
822
822
  return e.line += h.length - 1, e.lineStart = i, p;
823
823
  }
824
824
  if (E === 92 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34 && n.charCodeAt(s + 3) === 34) {
825
- l += n.slice(o, s), o = s + 1, s += 4;
825
+ l += n.slice(a, s), a = s + 1, s += 4;
826
826
  continue;
827
827
  }
828
828
  if (E === 10 || E === 13) {
829
- l += n.slice(o, s), h.push(l), E === 13 && n.charCodeAt(s + 1) === 10 ? s += 2 : ++s, l = "", o = s, i = s;
829
+ l += n.slice(a, s), h.push(l), E === 13 && n.charCodeAt(s + 1) === 10 ? s += 2 : ++s, l = "", a = s, i = s;
830
830
  continue;
831
831
  }
832
832
  if (v(E))
@@ -857,7 +857,7 @@ function He(e, t) {
857
857
  }
858
858
  return f(
859
859
  e,
860
- a.NAME,
860
+ o.NAME,
861
861
  t,
862
862
  i,
863
863
  n.slice(t, i)
@@ -937,8 +937,8 @@ process.env.NODE_ENV === "production", et = (
937
937
  Symbol.toStringTag in t ? t[Symbol.toStringTag] : (r = t.constructor) === null || r === void 0 ? void 0 : r.name
938
938
  );
939
939
  if (i === s) {
940
- const o = Ee(t);
941
- throw new Error(`Cannot use ${i} "${o}" from another module or realm.
940
+ const a = Ee(t);
941
+ throw new Error(`Cannot use ${i} "${a}" from another module or realm.
942
942
 
943
943
  Ensure that there is only one instance of "graphql" in the node_modules
944
944
  directory. If different versions of "graphql" are the dependencies of other
@@ -1000,7 +1000,7 @@ class rt {
1000
1000
  * Converts a name lex token into a name parse node.
1001
1001
  */
1002
1002
  parseName() {
1003
- const t = this.expectToken(a.NAME);
1003
+ const t = this.expectToken(o.NAME);
1004
1004
  return this.node(t, {
1005
1005
  kind: c.NAME,
1006
1006
  value: t.value
@@ -1014,9 +1014,9 @@ class rt {
1014
1014
  return this.node(this._lexer.token, {
1015
1015
  kind: c.DOCUMENT,
1016
1016
  definitions: this.many(
1017
- a.SOF,
1017
+ o.SOF,
1018
1018
  this.parseDefinition,
1019
- a.EOF
1019
+ o.EOF
1020
1020
  )
1021
1021
  });
1022
1022
  }
@@ -1044,16 +1044,16 @@ class rt {
1044
1044
  * - InputObjectTypeDefinition
1045
1045
  */
1046
1046
  parseDefinition() {
1047
- if (this.peek(a.BRACE_L))
1047
+ if (this.peek(o.BRACE_L))
1048
1048
  return this.parseOperationDefinition();
1049
1049
  const t = this.peekDescription(), n = t ? this._lexer.lookahead() : this._lexer.token;
1050
- if (t && n.kind === a.BRACE_L)
1050
+ if (t && n.kind === o.BRACE_L)
1051
1051
  throw I(
1052
1052
  this._lexer.source,
1053
1053
  this._lexer.token.start,
1054
1054
  "Unexpected description, descriptions are not supported on shorthand queries."
1055
1055
  );
1056
- if (n.kind === a.NAME) {
1056
+ if (n.kind === o.NAME) {
1057
1057
  switch (n.value) {
1058
1058
  case "schema":
1059
1059
  return this.parseSchemaDefinition();
@@ -1099,7 +1099,7 @@ class rt {
1099
1099
  */
1100
1100
  parseOperationDefinition() {
1101
1101
  const t = this._lexer.token;
1102
- if (this.peek(a.BRACE_L))
1102
+ if (this.peek(o.BRACE_L))
1103
1103
  return this.node(t, {
1104
1104
  kind: c.OPERATION_DEFINITION,
1105
1105
  operation: N.QUERY,
@@ -1111,7 +1111,7 @@ class rt {
1111
1111
  });
1112
1112
  const n = this.parseDescription(), r = this.parseOperationType();
1113
1113
  let i;
1114
- return this.peek(a.NAME) && (i = this.parseName()), this.node(t, {
1114
+ return this.peek(o.NAME) && (i = this.parseName()), this.node(t, {
1115
1115
  kind: c.OPERATION_DEFINITION,
1116
1116
  operation: r,
1117
1117
  description: n,
@@ -1125,7 +1125,7 @@ class rt {
1125
1125
  * OperationType : one of query mutation subscription
1126
1126
  */
1127
1127
  parseOperationType() {
1128
- const t = this.expectToken(a.NAME);
1128
+ const t = this.expectToken(o.NAME);
1129
1129
  switch (t.value) {
1130
1130
  case "query":
1131
1131
  return N.QUERY;
@@ -1141,9 +1141,9 @@ class rt {
1141
1141
  */
1142
1142
  parseVariableDefinitions() {
1143
1143
  return this.optionalMany(
1144
- a.PAREN_L,
1144
+ o.PAREN_L,
1145
1145
  this.parseVariableDefinition,
1146
- a.PAREN_R
1146
+ o.PAREN_R
1147
1147
  );
1148
1148
  }
1149
1149
  /**
@@ -1154,8 +1154,8 @@ class rt {
1154
1154
  kind: c.VARIABLE_DEFINITION,
1155
1155
  description: this.parseDescription(),
1156
1156
  variable: this.parseVariable(),
1157
- type: (this.expectToken(a.COLON), this.parseTypeReference()),
1158
- defaultValue: this.expectOptionalToken(a.EQUALS) ? this.parseConstValueLiteral() : void 0,
1157
+ type: (this.expectToken(o.COLON), this.parseTypeReference()),
1158
+ defaultValue: this.expectOptionalToken(o.EQUALS) ? this.parseConstValueLiteral() : void 0,
1159
1159
  directives: this.parseConstDirectives()
1160
1160
  });
1161
1161
  }
@@ -1164,7 +1164,7 @@ class rt {
1164
1164
  */
1165
1165
  parseVariable() {
1166
1166
  const t = this._lexer.token;
1167
- return this.expectToken(a.DOLLAR), this.node(t, {
1167
+ return this.expectToken(o.DOLLAR), this.node(t, {
1168
1168
  kind: c.VARIABLE,
1169
1169
  name: this.parseName()
1170
1170
  });
@@ -1178,9 +1178,9 @@ class rt {
1178
1178
  return this.node(this._lexer.token, {
1179
1179
  kind: c.SELECTION_SET,
1180
1180
  selections: this.many(
1181
- a.BRACE_L,
1181
+ o.BRACE_L,
1182
1182
  this.parseSelection,
1183
- a.BRACE_R
1183
+ o.BRACE_R
1184
1184
  )
1185
1185
  });
1186
1186
  }
@@ -1191,7 +1191,7 @@ class rt {
1191
1191
  * - InlineFragment
1192
1192
  */
1193
1193
  parseSelection() {
1194
- return this.peek(a.SPREAD) ? this.parseFragment() : this.parseField();
1194
+ return this.peek(o.SPREAD) ? this.parseFragment() : this.parseField();
1195
1195
  }
1196
1196
  /**
1197
1197
  * Field : Alias? Name Arguments? Directives? SelectionSet?
@@ -1201,13 +1201,13 @@ class rt {
1201
1201
  parseField() {
1202
1202
  const t = this._lexer.token, n = this.parseName();
1203
1203
  let r, i;
1204
- return this.expectOptionalToken(a.COLON) ? (r = n, i = this.parseName()) : i = n, this.node(t, {
1204
+ return this.expectOptionalToken(o.COLON) ? (r = n, i = this.parseName()) : i = n, this.node(t, {
1205
1205
  kind: c.FIELD,
1206
1206
  alias: r,
1207
1207
  name: i,
1208
1208
  arguments: this.parseArguments(!1),
1209
1209
  directives: this.parseDirectives(!1),
1210
- selectionSet: this.peek(a.BRACE_L) ? this.parseSelectionSet() : void 0
1210
+ selectionSet: this.peek(o.BRACE_L) ? this.parseSelectionSet() : void 0
1211
1211
  });
1212
1212
  }
1213
1213
  /**
@@ -1215,14 +1215,14 @@ class rt {
1215
1215
  */
1216
1216
  parseArguments(t) {
1217
1217
  const n = t ? this.parseConstArgument : this.parseArgument;
1218
- return this.optionalMany(a.PAREN_L, n, a.PAREN_R);
1218
+ return this.optionalMany(o.PAREN_L, n, o.PAREN_R);
1219
1219
  }
1220
1220
  /**
1221
1221
  * Argument[Const] : Name : Value[?Const]
1222
1222
  */
1223
1223
  parseArgument(t = !1) {
1224
1224
  const n = this._lexer.token, r = this.parseName();
1225
- return this.expectToken(a.COLON), this.node(n, {
1225
+ return this.expectToken(o.COLON), this.node(n, {
1226
1226
  kind: c.ARGUMENT,
1227
1227
  name: r,
1228
1228
  value: this.parseValueLiteral(t)
@@ -1241,9 +1241,9 @@ class rt {
1241
1241
  */
1242
1242
  parseFragment() {
1243
1243
  const t = this._lexer.token;
1244
- this.expectToken(a.SPREAD);
1244
+ this.expectToken(o.SPREAD);
1245
1245
  const n = this.expectOptionalKeyword("on");
1246
- return !n && this.peek(a.NAME) ? this.node(t, {
1246
+ return !n && this.peek(o.NAME) ? this.node(t, {
1247
1247
  kind: c.FRAGMENT_SPREAD,
1248
1248
  name: this.parseFragmentName(),
1249
1249
  directives: this.parseDirectives(!1)
@@ -1309,24 +1309,24 @@ class rt {
1309
1309
  parseValueLiteral(t) {
1310
1310
  const n = this._lexer.token;
1311
1311
  switch (n.kind) {
1312
- case a.BRACKET_L:
1312
+ case o.BRACKET_L:
1313
1313
  return this.parseList(t);
1314
- case a.BRACE_L:
1314
+ case o.BRACE_L:
1315
1315
  return this.parseObject(t);
1316
- case a.INT:
1316
+ case o.INT:
1317
1317
  return this.advanceLexer(), this.node(n, {
1318
1318
  kind: c.INT,
1319
1319
  value: n.value
1320
1320
  });
1321
- case a.FLOAT:
1321
+ case o.FLOAT:
1322
1322
  return this.advanceLexer(), this.node(n, {
1323
1323
  kind: c.FLOAT,
1324
1324
  value: n.value
1325
1325
  });
1326
- case a.STRING:
1327
- case a.BLOCK_STRING:
1326
+ case o.STRING:
1327
+ case o.BLOCK_STRING:
1328
1328
  return this.parseStringLiteral();
1329
- case a.NAME:
1329
+ case o.NAME:
1330
1330
  switch (this.advanceLexer(), n.value) {
1331
1331
  case "true":
1332
1332
  return this.node(n, {
@@ -1348,9 +1348,9 @@ class rt {
1348
1348
  value: n.value
1349
1349
  });
1350
1350
  }
1351
- case a.DOLLAR:
1351
+ case o.DOLLAR:
1352
1352
  if (t)
1353
- if (this.expectToken(a.DOLLAR), this._lexer.token.kind === a.NAME) {
1353
+ if (this.expectToken(o.DOLLAR), this._lexer.token.kind === o.NAME) {
1354
1354
  const r = this._lexer.token.value;
1355
1355
  throw I(
1356
1356
  this._lexer.source,
@@ -1372,7 +1372,7 @@ class rt {
1372
1372
  return this.advanceLexer(), this.node(t, {
1373
1373
  kind: c.STRING,
1374
1374
  value: t.value,
1375
- block: t.kind === a.BLOCK_STRING
1375
+ block: t.kind === o.BLOCK_STRING
1376
1376
  });
1377
1377
  }
1378
1378
  /**
@@ -1384,7 +1384,7 @@ class rt {
1384
1384
  const n = () => this.parseValueLiteral(t);
1385
1385
  return this.node(this._lexer.token, {
1386
1386
  kind: c.LIST,
1387
- values: this.any(a.BRACKET_L, n, a.BRACKET_R)
1387
+ values: this.any(o.BRACKET_L, n, o.BRACKET_R)
1388
1388
  });
1389
1389
  }
1390
1390
  /**
@@ -1398,7 +1398,7 @@ class rt {
1398
1398
  const n = () => this.parseObjectField(t);
1399
1399
  return this.node(this._lexer.token, {
1400
1400
  kind: c.OBJECT,
1401
- fields: this.any(a.BRACE_L, n, a.BRACE_R)
1401
+ fields: this.any(o.BRACE_L, n, o.BRACE_R)
1402
1402
  });
1403
1403
  }
1404
1404
  /**
@@ -1406,7 +1406,7 @@ class rt {
1406
1406
  */
1407
1407
  parseObjectField(t) {
1408
1408
  const n = this._lexer.token, r = this.parseName();
1409
- return this.expectToken(a.COLON), this.node(n, {
1409
+ return this.expectToken(o.COLON), this.node(n, {
1410
1410
  kind: c.OBJECT_FIELD,
1411
1411
  name: r,
1412
1412
  value: this.parseValueLiteral(t)
@@ -1418,7 +1418,7 @@ class rt {
1418
1418
  */
1419
1419
  parseDirectives(t) {
1420
1420
  const n = [];
1421
- for (; this.peek(a.AT); )
1421
+ for (; this.peek(o.AT); )
1422
1422
  n.push(this.parseDirective(t));
1423
1423
  return n;
1424
1424
  }
@@ -1432,7 +1432,7 @@ class rt {
1432
1432
  */
1433
1433
  parseDirective(t) {
1434
1434
  const n = this._lexer.token;
1435
- return this.expectToken(a.AT), this.node(n, {
1435
+ return this.expectToken(o.AT), this.node(n, {
1436
1436
  kind: c.DIRECTIVE,
1437
1437
  name: this.parseName(),
1438
1438
  arguments: this.parseArguments(t)
@@ -1448,15 +1448,15 @@ class rt {
1448
1448
  parseTypeReference() {
1449
1449
  const t = this._lexer.token;
1450
1450
  let n;
1451
- if (this.expectOptionalToken(a.BRACKET_L)) {
1451
+ if (this.expectOptionalToken(o.BRACKET_L)) {
1452
1452
  const r = this.parseTypeReference();
1453
- this.expectToken(a.BRACKET_R), n = this.node(t, {
1453
+ this.expectToken(o.BRACKET_R), n = this.node(t, {
1454
1454
  kind: c.LIST_TYPE,
1455
1455
  type: r
1456
1456
  });
1457
1457
  } else
1458
1458
  n = this.parseNamedType();
1459
- return this.expectOptionalToken(a.BANG) ? this.node(t, {
1459
+ return this.expectOptionalToken(o.BANG) ? this.node(t, {
1460
1460
  kind: c.NON_NULL_TYPE,
1461
1461
  type: n
1462
1462
  }) : n;
@@ -1472,7 +1472,7 @@ class rt {
1472
1472
  }
1473
1473
  // Implements the parsing rules in the Type Definition section.
1474
1474
  peekDescription() {
1475
- return this.peek(a.STRING) || this.peek(a.BLOCK_STRING);
1475
+ return this.peek(o.STRING) || this.peek(o.BLOCK_STRING);
1476
1476
  }
1477
1477
  /**
1478
1478
  * Description : StringValue
@@ -1490,9 +1490,9 @@ class rt {
1490
1490
  const t = this._lexer.token, n = this.parseDescription();
1491
1491
  this.expectKeyword("schema");
1492
1492
  const r = this.parseConstDirectives(), i = this.many(
1493
- a.BRACE_L,
1493
+ o.BRACE_L,
1494
1494
  this.parseOperationTypeDefinition,
1495
- a.BRACE_R
1495
+ o.BRACE_R
1496
1496
  );
1497
1497
  return this.node(t, {
1498
1498
  kind: c.SCHEMA_DEFINITION,
@@ -1506,7 +1506,7 @@ class rt {
1506
1506
  */
1507
1507
  parseOperationTypeDefinition() {
1508
1508
  const t = this._lexer.token, n = this.parseOperationType();
1509
- this.expectToken(a.COLON);
1509
+ this.expectToken(o.COLON);
1510
1510
  const r = this.parseNamedType();
1511
1511
  return this.node(t, {
1512
1512
  kind: c.OPERATION_TYPE_DEFINITION,
@@ -1536,14 +1536,14 @@ class rt {
1536
1536
  parseObjectTypeDefinition() {
1537
1537
  const t = this._lexer.token, n = this.parseDescription();
1538
1538
  this.expectKeyword("type");
1539
- const r = this.parseName(), i = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), o = this.parseFieldsDefinition();
1539
+ const r = this.parseName(), i = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), a = this.parseFieldsDefinition();
1540
1540
  return this.node(t, {
1541
1541
  kind: c.OBJECT_TYPE_DEFINITION,
1542
1542
  description: n,
1543
1543
  name: r,
1544
1544
  interfaces: i,
1545
1545
  directives: s,
1546
- fields: o
1546
+ fields: a
1547
1547
  });
1548
1548
  }
1549
1549
  /**
@@ -1552,7 +1552,7 @@ class rt {
1552
1552
  * - ImplementsInterfaces & NamedType
1553
1553
  */
1554
1554
  parseImplementsInterfaces() {
1555
- return this.expectOptionalKeyword("implements") ? this.delimitedMany(a.AMP, this.parseNamedType) : [];
1555
+ return this.expectOptionalKeyword("implements") ? this.delimitedMany(o.AMP, this.parseNamedType) : [];
1556
1556
  }
1557
1557
  /**
1558
1558
  * ```
@@ -1561,9 +1561,9 @@ class rt {
1561
1561
  */
1562
1562
  parseFieldsDefinition() {
1563
1563
  return this.optionalMany(
1564
- a.BRACE_L,
1564
+ o.BRACE_L,
1565
1565
  this.parseFieldDefinition,
1566
- a.BRACE_R
1566
+ o.BRACE_R
1567
1567
  );
1568
1568
  }
1569
1569
  /**
@@ -1572,15 +1572,15 @@ class rt {
1572
1572
  */
1573
1573
  parseFieldDefinition() {
1574
1574
  const t = this._lexer.token, n = this.parseDescription(), r = this.parseName(), i = this.parseArgumentDefs();
1575
- this.expectToken(a.COLON);
1576
- const s = this.parseTypeReference(), o = this.parseConstDirectives();
1575
+ this.expectToken(o.COLON);
1576
+ const s = this.parseTypeReference(), a = this.parseConstDirectives();
1577
1577
  return this.node(t, {
1578
1578
  kind: c.FIELD_DEFINITION,
1579
1579
  description: n,
1580
1580
  name: r,
1581
1581
  arguments: i,
1582
1582
  type: s,
1583
- directives: o
1583
+ directives: a
1584
1584
  });
1585
1585
  }
1586
1586
  /**
@@ -1588,9 +1588,9 @@ class rt {
1588
1588
  */
1589
1589
  parseArgumentDefs() {
1590
1590
  return this.optionalMany(
1591
- a.PAREN_L,
1591
+ o.PAREN_L,
1592
1592
  this.parseInputValueDef,
1593
- a.PAREN_R
1593
+ o.PAREN_R
1594
1594
  );
1595
1595
  }
1596
1596
  /**
@@ -1599,18 +1599,18 @@ class rt {
1599
1599
  */
1600
1600
  parseInputValueDef() {
1601
1601
  const t = this._lexer.token, n = this.parseDescription(), r = this.parseName();
1602
- this.expectToken(a.COLON);
1602
+ this.expectToken(o.COLON);
1603
1603
  const i = this.parseTypeReference();
1604
1604
  let s;
1605
- this.expectOptionalToken(a.EQUALS) && (s = this.parseConstValueLiteral());
1606
- const o = this.parseConstDirectives();
1605
+ this.expectOptionalToken(o.EQUALS) && (s = this.parseConstValueLiteral());
1606
+ const a = this.parseConstDirectives();
1607
1607
  return this.node(t, {
1608
1608
  kind: c.INPUT_VALUE_DEFINITION,
1609
1609
  description: n,
1610
1610
  name: r,
1611
1611
  type: i,
1612
1612
  defaultValue: s,
1613
- directives: o
1613
+ directives: a
1614
1614
  });
1615
1615
  }
1616
1616
  /**
@@ -1620,14 +1620,14 @@ class rt {
1620
1620
  parseInterfaceTypeDefinition() {
1621
1621
  const t = this._lexer.token, n = this.parseDescription();
1622
1622
  this.expectKeyword("interface");
1623
- const r = this.parseName(), i = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), o = this.parseFieldsDefinition();
1623
+ const r = this.parseName(), i = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), a = this.parseFieldsDefinition();
1624
1624
  return this.node(t, {
1625
1625
  kind: c.INTERFACE_TYPE_DEFINITION,
1626
1626
  description: n,
1627
1627
  name: r,
1628
1628
  interfaces: i,
1629
1629
  directives: s,
1630
- fields: o
1630
+ fields: a
1631
1631
  });
1632
1632
  }
1633
1633
  /**
@@ -1652,7 +1652,7 @@ class rt {
1652
1652
  * - UnionMemberTypes | NamedType
1653
1653
  */
1654
1654
  parseUnionMemberTypes() {
1655
- return this.expectOptionalToken(a.EQUALS) ? this.delimitedMany(a.PIPE, this.parseNamedType) : [];
1655
+ return this.expectOptionalToken(o.EQUALS) ? this.delimitedMany(o.PIPE, this.parseNamedType) : [];
1656
1656
  }
1657
1657
  /**
1658
1658
  * EnumTypeDefinition :
@@ -1677,9 +1677,9 @@ class rt {
1677
1677
  */
1678
1678
  parseEnumValuesDefinition() {
1679
1679
  return this.optionalMany(
1680
- a.BRACE_L,
1680
+ o.BRACE_L,
1681
1681
  this.parseEnumValueDefinition,
1682
- a.BRACE_R
1682
+ o.BRACE_R
1683
1683
  );
1684
1684
  }
1685
1685
  /**
@@ -1731,9 +1731,9 @@ class rt {
1731
1731
  */
1732
1732
  parseInputFieldsDefinition() {
1733
1733
  return this.optionalMany(
1734
- a.BRACE_L,
1734
+ o.BRACE_L,
1735
1735
  this.parseInputValueDef,
1736
- a.BRACE_R
1736
+ o.BRACE_R
1737
1737
  );
1738
1738
  }
1739
1739
  /**
@@ -1751,7 +1751,7 @@ class rt {
1751
1751
  */
1752
1752
  parseTypeSystemExtension() {
1753
1753
  const t = this._lexer.lookahead();
1754
- if (t.kind === a.NAME)
1754
+ if (t.kind === o.NAME)
1755
1755
  switch (t.value) {
1756
1756
  case "schema":
1757
1757
  return this.parseSchemaExtension();
@@ -1781,9 +1781,9 @@ class rt {
1781
1781
  const t = this._lexer.token;
1782
1782
  this.expectKeyword("extend"), this.expectKeyword("schema");
1783
1783
  const n = this.parseConstDirectives(), r = this.optionalMany(
1784
- a.BRACE_L,
1784
+ o.BRACE_L,
1785
1785
  this.parseOperationTypeDefinition,
1786
- a.BRACE_R
1786
+ o.BRACE_R
1787
1787
  );
1788
1788
  if (n.length === 0 && r.length === 0)
1789
1789
  throw this.unexpected();
@@ -1911,17 +1911,17 @@ class rt {
1911
1911
  */
1912
1912
  parseDirectiveDefinition() {
1913
1913
  const t = this._lexer.token, n = this.parseDescription();
1914
- this.expectKeyword("directive"), this.expectToken(a.AT);
1914
+ this.expectKeyword("directive"), this.expectToken(o.AT);
1915
1915
  const r = this.parseName(), i = this.parseArgumentDefs(), s = this.expectOptionalKeyword("repeatable");
1916
1916
  this.expectKeyword("on");
1917
- const o = this.parseDirectiveLocations();
1917
+ const a = this.parseDirectiveLocations();
1918
1918
  return this.node(t, {
1919
1919
  kind: c.DIRECTIVE_DEFINITION,
1920
1920
  description: n,
1921
1921
  name: r,
1922
1922
  arguments: i,
1923
1923
  repeatable: s,
1924
- locations: o
1924
+ locations: a
1925
1925
  });
1926
1926
  }
1927
1927
  /**
@@ -1930,7 +1930,7 @@ class rt {
1930
1930
  * - DirectiveLocations | DirectiveLocation
1931
1931
  */
1932
1932
  parseDirectiveLocations() {
1933
- return this.delimitedMany(a.PIPE, this.parseDirectiveLocation);
1933
+ return this.delimitedMany(o.PIPE, this.parseDirectiveLocation);
1934
1934
  }
1935
1935
  /*
1936
1936
  * DirectiveLocation :
@@ -1975,11 +1975,11 @@ class rt {
1975
1975
  * - \@ Name ( Name : )
1976
1976
  */
1977
1977
  parseSchemaCoordinate() {
1978
- const t = this._lexer.token, n = this.expectOptionalToken(a.AT), r = this.parseName();
1978
+ const t = this._lexer.token, n = this.expectOptionalToken(o.AT), r = this.parseName();
1979
1979
  let i;
1980
- !n && this.expectOptionalToken(a.DOT) && (i = this.parseName());
1980
+ !n && this.expectOptionalToken(o.DOT) && (i = this.parseName());
1981
1981
  let s;
1982
- return (n || i) && this.expectOptionalToken(a.PAREN_L) && (s = this.parseName(), this.expectToken(a.COLON), this.expectToken(a.PAREN_R)), n ? s ? this.node(t, {
1982
+ return (n || i) && this.expectOptionalToken(o.PAREN_L) && (s = this.parseName(), this.expectToken(o.COLON), this.expectToken(o.PAREN_R)), n ? s ? this.node(t, {
1983
1983
  kind: c.DIRECTIVE_ARGUMENT_COORDINATE,
1984
1984
  name: r,
1985
1985
  argumentName: s
@@ -2046,7 +2046,7 @@ class rt {
2046
2046
  */
2047
2047
  expectKeyword(t) {
2048
2048
  const n = this._lexer.token;
2049
- if (n.kind === a.NAME && n.value === t)
2049
+ if (n.kind === o.NAME && n.value === t)
2050
2050
  this.advanceLexer();
2051
2051
  else
2052
2052
  throw I(
@@ -2061,7 +2061,7 @@ class rt {
2061
2061
  */
2062
2062
  expectOptionalKeyword(t) {
2063
2063
  const n = this._lexer.token;
2064
- return n.kind === a.NAME && n.value === t ? (this.advanceLexer(), !0) : !1;
2064
+ return n.kind === o.NAME && n.value === t ? (this.advanceLexer(), !0) : !1;
2065
2065
  }
2066
2066
  /**
2067
2067
  * Helper function for creating an error when an unexpected lexed token is encountered.
@@ -2130,7 +2130,7 @@ class rt {
2130
2130
  }
2131
2131
  advanceLexer() {
2132
2132
  const { maxTokens: t } = this._options, n = this._lexer.advance();
2133
- if (n.kind !== a.EOF && (++this._tokenCounter, t !== void 0 && this._tokenCounter > t))
2133
+ if (n.kind !== o.EOF && (++this._tokenCounter, t !== void 0 && this._tokenCounter > t))
2134
2134
  throw I(
2135
2135
  this._lexer.source,
2136
2136
  n.start,
@@ -2145,26 +2145,26 @@ function C(e) {
2145
2145
  function ke(e) {
2146
2146
  return $e(e) ? `"${e}"` : e;
2147
2147
  }
2148
- var _ = /* @__PURE__ */ new Map(), z = /* @__PURE__ */ new Map(), Oe = !0, F = !1;
2149
- function Ae(e) {
2148
+ var _ = /* @__PURE__ */ new Map(), z = /* @__PURE__ */ new Map(), Ae = !0, F = !1;
2149
+ function Oe(e) {
2150
2150
  return e.replace(/[\s,]+/g, " ").trim();
2151
2151
  }
2152
2152
  function it(e) {
2153
- return Ae(e.source.body.substring(e.start, e.end));
2153
+ return Oe(e.source.body.substring(e.start, e.end));
2154
2154
  }
2155
2155
  function st(e) {
2156
2156
  var t = /* @__PURE__ */ new Set(), n = [];
2157
2157
  return e.definitions.forEach(function(r) {
2158
2158
  if (r.kind === "FragmentDefinition") {
2159
- var i = r.name.value, s = it(r.loc), o = z.get(i);
2160
- o && !o.has(s) ? Oe && console.warn("Warning: fragment with name " + i + ` already exists.
2159
+ var i = r.name.value, s = it(r.loc), a = z.get(i);
2160
+ a && !a.has(s) ? Ae && console.warn("Warning: fragment with name " + i + ` already exists.
2161
2161
  graphql-tag enforces all fragment names across your application to be unique; read more about
2162
- this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`) : o || z.set(i, o = /* @__PURE__ */ new Set()), o.add(s), t.has(s) || (t.add(s), n.push(r));
2162
+ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`) : a || z.set(i, a = /* @__PURE__ */ new Set()), a.add(s), t.has(s) || (t.add(s), n.push(r));
2163
2163
  } else
2164
2164
  n.push(r);
2165
2165
  }), w(w({}, e), { definitions: n });
2166
2166
  }
2167
- function at(e) {
2167
+ function ot(e) {
2168
2168
  var t = new Set(e.definitions);
2169
2169
  t.forEach(function(r) {
2170
2170
  r.loc && delete r.loc, Object.keys(r).forEach(function(i) {
@@ -2175,8 +2175,8 @@ function at(e) {
2175
2175
  var n = e.loc;
2176
2176
  return n && (delete n.startToken, delete n.endToken), e;
2177
2177
  }
2178
- function ot(e) {
2179
- var t = Ae(e);
2178
+ function at(e) {
2179
+ var t = Oe(e);
2180
2180
  if (!_.has(t)) {
2181
2181
  var n = nt(e, {
2182
2182
  experimentalFragmentVariables: F,
@@ -2184,7 +2184,7 @@ function ot(e) {
2184
2184
  });
2185
2185
  if (!n || n.kind !== "Document")
2186
2186
  throw new Error("Not a valid GraphQL document.");
2187
- _.set(t, at(st(n)));
2187
+ _.set(t, ot(st(n)));
2188
2188
  }
2189
2189
  return _.get(t);
2190
2190
  }
@@ -2195,13 +2195,13 @@ function u(e) {
2195
2195
  var r = e[0];
2196
2196
  return t.forEach(function(i, s) {
2197
2197
  i && i.kind === "Document" ? r += i.loc.source.body : r += i, r += e[s + 1];
2198
- }), ot(r);
2198
+ }), at(r);
2199
2199
  }
2200
2200
  function ct() {
2201
2201
  _.clear(), z.clear();
2202
2202
  }
2203
2203
  function dt() {
2204
- Oe = !1;
2204
+ Ae = !1;
2205
2205
  }
2206
2206
  function ut() {
2207
2207
  F = !0;
@@ -2414,12 +2414,12 @@ const ht = u`
2414
2414
  input: {id: $orderId, countryCode: $countryCode, customer: $customer}
2415
2415
  )
2416
2416
  }
2417
- `, Ot = u`
2417
+ `, At = u`
2418
2418
  mutation deleteOrder($orderId: ID!) {
2419
2419
  cancelOrder(id: $orderId)
2420
2420
  }
2421
- `, At = (e, t, n, r) => e();
2422
- function Tt(e, t = At) {
2421
+ `, Ot = (e, t, n, r) => e();
2422
+ function Tt(e, t = Ot) {
2423
2423
  return {
2424
2424
  findActiveOrderById(n, r, i) {
2425
2425
  return t((s) => e.request({ document: ht, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "findActiveOrderById", "query", n);
@@ -2449,7 +2449,7 @@ function Tt(e, t = At) {
2449
2449
  return t((s) => e.request({ document: kt, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "createOrderCustomer", "mutation", n);
2450
2450
  },
2451
2451
  deleteOrder(n, r, i) {
2452
- return t((s) => e.request({ document: Ot, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "deleteOrder", "mutation", n);
2452
+ return t((s) => e.request({ document: At, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "deleteOrder", "mutation", n);
2453
2453
  }
2454
2454
  };
2455
2455
  }
@@ -2457,7 +2457,7 @@ class Dt {
2457
2457
  config;
2458
2458
  sdk;
2459
2459
  constructor(t) {
2460
- this.config = t, this.sdk = Tt(new A(t.apiUrl));
2460
+ this.config = t, this.sdk = Tt(new O(t.apiUrl));
2461
2461
  }
2462
2462
  // Basket update functions
2463
2463
  async addProduct(t, n, r) {
@@ -2508,9 +2508,9 @@ class Dt {
2508
2508
  }
2509
2509
  async configurePackage(t, n, r) {
2510
2510
  try {
2511
- const i = n.items.map((o) => ({
2512
- packageItemId: o.packageItemId,
2513
- eventId: o.eventId
2511
+ const i = n.items.map((a) => ({
2512
+ packageItemId: a.packageItemId,
2513
+ eventId: a.eventId
2514
2514
  }));
2515
2515
  this.debugLog("Configuring package", {
2516
2516
  packageId: n.id,
@@ -2631,13 +2631,15 @@ class Dt {
2631
2631
  depositPrice: d.depositPrice ?? 0,
2632
2632
  originalPrice: d.originalPrice ?? 0,
2633
2633
  serviceFee: d.serviceFee ?? 0,
2634
+ maxAmountOfAddons: d.product?.maxAmountOfAddons ?? 0,
2635
+ minAmountOfAddons: d.product?.minAmountOfAddons ?? 0,
2634
2636
  seats: d.seats?.map((y) => ({
2635
2637
  id: y.seatsIoId,
2636
2638
  label: y.label,
2637
2639
  amount: y.amount
2638
2640
  }))
2639
2641
  };
2640
- }), o = i.filter((d) => d.packageItem != null && d.amount > 0).reduce((d, g) => {
2642
+ }), a = i.filter((d) => d.packageItem != null && d.amount > 0).reduce((d, g) => {
2641
2643
  const {
2642
2644
  packageItem: y,
2643
2645
  event: m,
@@ -2646,9 +2648,9 @@ class Dt {
2646
2648
  serviceFee: j,
2647
2649
  depositPrice: H,
2648
2650
  originalPrice: Y
2649
- } = g, O = y.package.id;
2650
- return d[O] ? (d[O].price += S ?? 0, d[O].serviceFee += j ?? 0, d[O].originalPrice += Y ?? 0, d[O].depositPrice += H ?? S ?? 0) : d[O] = {
2651
- id: O,
2651
+ } = g, A = y.package.id;
2652
+ return d[A] ? (d[A].price += S ?? 0, d[A].serviceFee += j ?? 0, d[A].originalPrice += Y ?? 0, d[A].depositPrice += H ?? S ?? 0) : d[A] = {
2653
+ id: A,
2652
2654
  type: T.PACKAGE,
2653
2655
  name: y.package.name,
2654
2656
  amount: k,
@@ -2657,7 +2659,7 @@ class Dt {
2657
2659
  depositPrice: H ?? S ?? 0,
2658
2660
  originalPrice: Y ?? 0,
2659
2661
  packageItems: []
2660
- }, d[O].packageItems.push({
2662
+ }, d[A].packageItems.push({
2661
2663
  packageItemId: y.id,
2662
2664
  eventId: m.id,
2663
2665
  name: m.name,
@@ -2667,7 +2669,7 @@ class Dt {
2667
2669
  }), d;
2668
2670
  }, {}), l = [
2669
2671
  ...s,
2670
- ...Object.values(o)
2672
+ ...Object.values(a)
2671
2673
  ], h = l.reduce((d, g) => d + (g.amount || 0), 0);
2672
2674
  if (h === 0)
2673
2675
  return null;
@@ -2878,7 +2880,7 @@ class Ct {
2878
2880
  config;
2879
2881
  sdk;
2880
2882
  constructor(t) {
2881
- this.config = t, this.sdk = St(new A(t.apiUrl));
2883
+ this.config = t, this.sdk = St(new O(t.apiUrl));
2882
2884
  }
2883
2885
  async getEvents(t, n) {
2884
2886
  try {
@@ -3053,36 +3055,36 @@ class Ct {
3053
3055
  productTypes: n
3054
3056
  });
3055
3057
  if (i?.findPublicProductsByEventId) {
3056
- const s = i.findPublicProductsByEventId.map((o) => ({
3057
- id: o.id,
3058
- name: o.name,
3059
- category: o.category ? {
3060
- id: o.category.id,
3061
- name: o.category.name,
3062
- description: o.category.description,
3063
- order: o.category.order
3058
+ const s = i.findPublicProductsByEventId.map((a) => ({
3059
+ id: a.id,
3060
+ name: a.name,
3061
+ category: a.category ? {
3062
+ id: a.category.id,
3063
+ name: a.category.name,
3064
+ description: a.category.description,
3065
+ order: a.category.order
3064
3066
  } : void 0,
3065
- currency: o.currency,
3066
- depositPrice: o.depositPrice,
3067
- description: o.description,
3068
- discountPrice: o.promoterDiscountPrice ?? o.discountPrice,
3069
- startSalesAt: o.startSalesAt,
3070
- endSalesAt: o.endSalesAt,
3071
- icon: o.icon,
3072
- maxAmountOfAddons: o.maxAmountOfAddons,
3073
- minAmountOfAddons: o.minAmountOfAddons,
3074
- maxAmountPerOrder: o.maxAmountPerOrder,
3075
- price: o.price,
3076
- serviceFee: o.serviceFee,
3077
- showEndSalesAtTag: o.showEndSalesAtTag,
3078
- status: o.status,
3079
- type: o.type,
3080
- seatsCategory: o.seatsCategory
3067
+ currency: a.currency,
3068
+ depositPrice: a.depositPrice,
3069
+ description: a.description,
3070
+ discountPrice: a.promoterDiscountPrice ?? a.discountPrice,
3071
+ startSalesAt: a.startSalesAt,
3072
+ endSalesAt: a.endSalesAt,
3073
+ icon: a.icon,
3074
+ maxAmountOfAddons: a.maxAmountOfAddons,
3075
+ minAmountOfAddons: a.minAmountOfAddons,
3076
+ maxAmountPerOrder: a.maxAmountPerOrder,
3077
+ price: a.price,
3078
+ serviceFee: a.serviceFee,
3079
+ showEndSalesAtTag: a.showEndSalesAtTag,
3080
+ status: a.status,
3081
+ type: a.type,
3082
+ seatsCategory: a.seatsCategory
3081
3083
  }));
3082
3084
  return this.debugLog("Products fetched", {
3083
3085
  eventId: t,
3084
3086
  count: s.length,
3085
- types: s.map((o) => o.type)
3087
+ types: s.map((a) => a.type)
3086
3088
  }), s;
3087
3089
  }
3088
3090
  return;
@@ -3143,7 +3145,7 @@ class Ft {
3143
3145
  config;
3144
3146
  sdk;
3145
3147
  constructor(t) {
3146
- this.config = t, this.sdk = wt(new A(t.apiUrl));
3148
+ this.config = t, this.sdk = wt(new O(t.apiUrl));
3147
3149
  }
3148
3150
  async getPaymentDetails(t) {
3149
3151
  this.debugLog("Fetching payment methods", t);
@@ -3360,7 +3362,7 @@ class zt {
3360
3362
  config;
3361
3363
  sdk;
3362
3364
  constructor(t) {
3363
- this.config = t, this.sdk = qt(new A(t.apiUrl));
3365
+ this.config = t, this.sdk = qt(new O(t.apiUrl));
3364
3366
  }
3365
3367
  debugLog(t, n) {
3366
3368
  this.config.debug && console.log(`[PackageService] ${t}`, n || "");
@@ -3476,7 +3478,7 @@ class Yt {
3476
3478
  config;
3477
3479
  sdk;
3478
3480
  constructor(t) {
3479
- this.config = t, this.sdk = Ht(new A(t.apiUrl));
3481
+ this.config = t, this.sdk = Ht(new O(t.apiUrl));
3480
3482
  }
3481
3483
  debugLog(t, n) {
3482
3484
  this.config.debug && console.log(`[CategoryService] ${t}`, n || "");
@@ -3488,8 +3490,8 @@ class Yt {
3488
3490
  if (r?.findAllPublicHostingsByOrganizationId) {
3489
3491
  const i = r.findAllPublicHostingsByOrganizationId, s = r.findAllPublicLocationsByOrganizationId;
3490
3492
  return this.debugLog("Categories fetched", { count: i.count + s.count, dataLength: i.data.length + s.data.length }), [
3491
- ...i.data.map((o) => ({ id: o.id, name: o.name, icon: o.icon, activeEvents: o.amountOfActiveEvents, type: "HOSTING" })),
3492
- ...s.data.map((o) => ({ id: o.id, name: o.name, activeEvents: o.amountOfActiveEvents, type: "LOCATION" }))
3493
+ ...i.data.map((a) => ({ id: a.id, name: a.name, icon: a.icon, activeEvents: a.amountOfActiveEvents, type: "HOSTING" })),
3494
+ ...s.data.map((a) => ({ id: a.id, name: a.name, activeEvents: a.amountOfActiveEvents, type: "LOCATION" }))
3493
3495
  ];
3494
3496
  }
3495
3497
  return [];
@@ -3528,7 +3530,7 @@ class Kt {
3528
3530
  config;
3529
3531
  sdk;
3530
3532
  constructor(t) {
3531
- this.config = t, this.sdk = Zt(new A(t.apiUrl));
3533
+ this.config = t, this.sdk = Zt(new O(t.apiUrl));
3532
3534
  }
3533
3535
  createMetric = async (t, n, r) => {
3534
3536
  switch (!n && !r && await this.sdk.CreateShopView({
@@ -3610,7 +3612,7 @@ class rn {
3610
3612
  config;
3611
3613
  sdk;
3612
3614
  constructor(t) {
3613
- this.config = t, this.sdk = nn(new A(t.apiUrl));
3615
+ this.config = t, this.sdk = nn(new O(t.apiUrl));
3614
3616
  }
3615
3617
  async getShop(t) {
3616
3618
  try {
@@ -3648,8 +3650,8 @@ const sn = u`
3648
3650
  confirm
3649
3651
  }
3650
3652
  }
3651
- `, an = (e, t, n, r) => e();
3652
- function on(e, t = an) {
3653
+ `, on = (e, t, n, r) => e();
3654
+ function an(e, t = on) {
3653
3655
  return {
3654
3656
  findAllCustomFieldsByOrderId(n, r, i) {
3655
3657
  return t((s) => e.request({ document: sn, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "findAllCustomFieldsByOrderId", "query", n);
@@ -3660,7 +3662,7 @@ class cn {
3660
3662
  config;
3661
3663
  sdk;
3662
3664
  constructor(t) {
3663
- this.config = t, this.sdk = on(new A(t.apiUrl));
3665
+ this.config = t, this.sdk = an(new O(t.apiUrl));
3664
3666
  }
3665
3667
  async findByOrderId(t, n) {
3666
3668
  try {
@@ -3710,8 +3712,8 @@ export {
3710
3712
  te as ProductStatus,
3711
3713
  ne as ProductType,
3712
3714
  ue as SalesLocations,
3713
- ae as ShopTemplateType,
3714
- oe as ShopVariationType,
3715
+ oe as ShopTemplateType,
3716
+ ae as ShopVariationType,
3715
3717
  ee as SortOrder,
3716
3718
  hn as TicketappSDK
3717
3719
  };
@@ -1 +1 @@
1
- {"version":3,"file":"basket.service.d.ts","sourceRoot":"","sources":["../../../lib/services/basket/basket.service.ts"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EAEX,sBAAsB,EACtB,sBAAsB,EACtB,yBAAyB,EACzB,qBAAqB,EAErB,KAAK,EACL,YAAY,EACZ,eAAe,EACf,iCAAiC,EACjC,eAAe,EAChB,MAAM,SAAS,CAAA;AAIhB,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAsB;IACpC,OAAO,CAAC,GAAG,CAA4B;gBAG3B,MAAM,EAAE,mBAAmB;IAM1B,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAiC3F,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC;IA6BpF,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC;IAiCjH,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC;IAchF,4BAA4B,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,iCAAiC,GAAG,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC;IA6BxH,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ3C,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC;IAgCzE,qBAAqB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,sBAAsB,GAAG,OAAO,CAAC,yBAAyB,GAAG,IAAI,CAAC;IAkBhH,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;IAoI1E,OAAO,CAAC,QAAQ;IAKhB,OAAO,CAAC,WAAW;CAwBpB"}
1
+ {"version":3,"file":"basket.service.d.ts","sourceRoot":"","sources":["../../../lib/services/basket/basket.service.ts"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EAEX,sBAAsB,EACtB,sBAAsB,EACtB,yBAAyB,EACzB,qBAAqB,EAErB,KAAK,EACL,YAAY,EACZ,eAAe,EACf,iCAAiC,EACjC,eAAe,EAChB,MAAM,SAAS,CAAA;AAIhB,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAsB;IACpC,OAAO,CAAC,GAAG,CAA4B;gBAG3B,MAAM,EAAE,mBAAmB;IAM1B,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAiC3F,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC;IA6BpF,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC;IAiCjH,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC;IAchF,4BAA4B,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,iCAAiC,GAAG,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC;IA6BxH,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ3C,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC;IAgCzE,qBAAqB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,sBAAsB,GAAG,OAAO,CAAC,yBAAyB,GAAG,IAAI,CAAC;IAkBhH,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;IAsI1E,OAAO,CAAC,QAAQ;IAKhB,OAAO,CAAC,WAAW;CAwBpB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ticketapp-dev/shop-sdk",
3
- "version": "1.0.60",
3
+ "version": "1.0.61",
4
4
  "description": "TicketApp Shop SDK",
5
5
  "type": "module",
6
6
  "files": [