@builtbystack/sq-shopify-theme-sdk 0.0.28 → 0.0.30

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.
@@ -1,6 +1,6 @@
1
1
  var He = Object.defineProperty;
2
2
  var Ye = (e, t, n) => t in e ? He(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var Te = (e, t, n) => (Ye(e, typeof t != "symbol" ? t + "" : t, n), n);
3
+ var Ae = (e, t, n) => (Ye(e, typeof t != "symbol" ? t + "" : t, n), n);
4
4
  function ze(e, t) {
5
5
  for (var n = 0; n < t.length; n++) {
6
6
  const r = t[n];
@@ -27,7 +27,7 @@ var ne = function() {
27
27
  return t;
28
28
  }, ne.apply(this, arguments);
29
29
  };
30
- function K(e, t) {
30
+ function W(e, t) {
31
31
  if (!!!e)
32
32
  throw new Error(t);
33
33
  }
@@ -53,7 +53,7 @@ function he(e, t) {
53
53
  column: t + 1 - n
54
54
  };
55
55
  }
56
- function We(e) {
56
+ function Ke(e) {
57
57
  return Oe(
58
58
  e.source,
59
59
  he(e.source, e.start)
@@ -63,17 +63,17 @@ function Oe(e, t) {
63
63
  const n = e.locationOffset.column - 1, r = "".padStart(n) + e.body, i = t.line - 1, s = e.locationOffset.line - 1, a = t.line + s, c = t.line === 1 ? n : 0, p = t.column + c, h = `${e.name}:${a}:${p}
64
64
  `, m = r.split(/\r\n|[\n\r]/g), C = m[i];
65
65
  if (C.length > 120) {
66
- const y = Math.floor(p / 80), A = p % 80, g = [];
66
+ const y = Math.floor(p / 80), T = p % 80, g = [];
67
67
  for (let I = 0; I < C.length; I += 80)
68
68
  g.push(C.slice(I, I + 80));
69
- return h + Ae([
69
+ return h + Te([
70
70
  [`${a} |`, g[0]],
71
71
  ...g.slice(1, y + 1).map((I) => ["|", I]),
72
- ["|", "^".padStart(A)],
72
+ ["|", "^".padStart(T)],
73
73
  ["|", g[y + 1]]
74
74
  ]);
75
75
  }
76
- return h + Ae([
76
+ return h + Te([
77
77
  // Lines specified like this: ["prefix", "string"],
78
78
  [`${a - 1} |`, m[i - 1]],
79
79
  [`${a} |`, C],
@@ -81,12 +81,12 @@ function Oe(e, t) {
81
81
  [`${a + 1} |`, m[i + 1]]
82
82
  ]);
83
83
  }
84
- function Ae(e) {
84
+ function Te(e) {
85
85
  const t = e.filter(([r, i]) => i !== void 0), n = Math.max(...t.map(([r]) => r.length));
86
86
  return t.map(([r, i]) => r.padStart(n) + (i ? " " + i : "")).join(`
87
87
  `);
88
88
  }
89
- function Ke(e) {
89
+ function We(e) {
90
90
  const t = e[0];
91
91
  return t == null || "kind" in t || "length" in t ? {
92
92
  nodes: t,
@@ -138,7 +138,7 @@ class ye extends Error {
138
138
  */
139
139
  constructor(t, ...n) {
140
140
  var r, i, s;
141
- const { nodes: a, source: c, positions: p, path: h, originalError: m, extensions: C } = Ke(n);
141
+ const { nodes: a, source: c, positions: p, path: h, originalError: m, extensions: C } = We(n);
142
142
  super(t), this.name = "GraphQLError", this.path = h ?? void 0, this.originalError = m ?? void 0, this.nodes = Ie(
143
143
  Array.isArray(a) ? a : a ? [a] : void 0
144
144
  );
@@ -146,10 +146,10 @@ class ye extends Error {
146
146
  (r = this.nodes) === null || r === void 0 ? void 0 : r.map((g) => g.loc).filter((g) => g != null)
147
147
  );
148
148
  this.source = c ?? (y == null || (i = y[0]) === null || i === void 0 ? void 0 : i.source), this.positions = p ?? (y == null ? void 0 : y.map((g) => g.start)), this.locations = p && c ? p.map((g) => he(c, g)) : y == null ? void 0 : y.map((g) => he(g.source, g.start));
149
- const A = Je(
149
+ const T = Je(
150
150
  m == null ? void 0 : m.extensions
151
151
  ) ? m == null ? void 0 : m.extensions : void 0;
152
- this.extensions = (s = C ?? A) !== null && s !== void 0 ? s : /* @__PURE__ */ Object.create(null), Object.defineProperties(this, {
152
+ this.extensions = (s = C ?? T) !== null && s !== void 0 ? s : /* @__PURE__ */ Object.create(null), Object.defineProperties(this, {
153
153
  message: {
154
154
  writable: !0,
155
155
  enumerable: !0
@@ -188,7 +188,7 @@ class ye extends Error {
188
188
  for (const n of this.nodes)
189
189
  n.loc && (t += `
190
190
 
191
- ` + We(n.loc));
191
+ ` + Ke(n.loc));
192
192
  else if (this.source && this.locations)
193
193
  for (const n of this.locations)
194
194
  t += `
@@ -241,7 +241,7 @@ class Ze {
241
241
  };
242
242
  }
243
243
  }
244
- class Pe {
244
+ class be {
245
245
  /**
246
246
  * The kind of Token.
247
247
  */
@@ -362,10 +362,10 @@ function Se(e) {
362
362
  const t = e == null ? void 0 : e.kind;
363
363
  return typeof t == "string" && et.has(t);
364
364
  }
365
- var M;
365
+ var U;
366
366
  (function(e) {
367
367
  e.QUERY = "query", e.MUTATION = "mutation", e.SUBSCRIPTION = "subscription";
368
- })(M || (M = {}));
368
+ })(U || (U = {}));
369
369
  var fe;
370
370
  (function(e) {
371
371
  e.QUERY = "QUERY", e.MUTATION = "MUTATION", e.SUBSCRIPTION = "SUBSCRIPTION", e.FIELD = "FIELD", e.FRAGMENT_DEFINITION = "FRAGMENT_DEFINITION", e.FRAGMENT_SPREAD = "FRAGMENT_SPREAD", e.INLINE_FRAGMENT = "INLINE_FRAGMENT", e.VARIABLE_DEFINITION = "VARIABLE_DEFINITION", e.SCHEMA = "SCHEMA", e.SCALAR = "SCALAR", e.OBJECT = "OBJECT", e.FIELD_DEFINITION = "FIELD_DEFINITION", e.ARGUMENT_DEFINITION = "ARGUMENT_DEFINITION", e.INTERFACE = "INTERFACE", e.UNION = "UNION", e.ENUM = "ENUM", e.ENUM_VALUE = "ENUM_VALUE", e.INPUT_OBJECT = "INPUT_OBJECT", e.INPUT_FIELD_DEFINITION = "INPUT_FIELD_DEFINITION";
@@ -410,7 +410,7 @@ function it(e) {
410
410
  return t;
411
411
  }
412
412
  function rt(e, t) {
413
- const n = e.replace(/"""/g, '\\"""'), r = n.split(/\r\n|[\n\r]/g), i = r.length === 1, s = r.length > 1 && r.slice(1).every((A) => A.length === 0 || me(A.charCodeAt(0))), a = n.endsWith('\\"""'), c = e.endsWith('"') && !a, p = e.endsWith("\\"), h = c || p, m = !(t != null && t.minimize) && // add leading and trailing new lines only if it improves readability
413
+ const n = e.replace(/"""/g, '\\"""'), r = n.split(/\r\n|[\n\r]/g), i = r.length === 1, s = r.length > 1 && r.slice(1).every((T) => T.length === 0 || me(T.charCodeAt(0))), a = n.endsWith('\\"""'), c = e.endsWith('"') && !a, p = e.endsWith("\\"), h = c || p, m = !(t != null && t.minimize) && // add leading and trailing new lines only if it improves readability
414
414
  (!i || e.length > 70 || h || s || a);
415
415
  let C = "";
416
416
  const y = i && me(e.charCodeAt(0));
@@ -436,7 +436,7 @@ class st {
436
436
  * The character offset at which the current line begins.
437
437
  */
438
438
  constructor(t) {
439
- const n = new Pe(u.SOF, 0, 0, 0, 0);
439
+ const n = new be(u.SOF, 0, 0, 0, 0);
440
440
  this.source = t, this.lastToken = n, this.token = n, this.line = 1, this.lineStart = 0;
441
441
  }
442
442
  get [Symbol.toStringTag]() {
@@ -493,7 +493,7 @@ function F(e, t) {
493
493
  }
494
494
  function S(e, t, n, r, i) {
495
495
  const s = e.line, a = 1 + n - e.lineStart;
496
- return new Pe(t, n, r, s, a, i);
496
+ return new be(t, n, r, s, a, i);
497
497
  }
498
498
  function ot(e, t) {
499
499
  const n = e.source.body, r = n.length;
@@ -546,7 +546,7 @@ function ot(e, t) {
546
546
  case 125:
547
547
  return S(e, u.BRACE_R, i, i + 1);
548
548
  case 34:
549
- return n.charCodeAt(i + 1) === 34 && n.charCodeAt(i + 2) === 34 ? ft(e, i) : lt(e, i);
549
+ return n.charCodeAt(i + 1) === 34 && n.charCodeAt(i + 2) === 34 ? ft(e, i) : dt(e, i);
550
550
  }
551
551
  if (Y(s) || s === 45)
552
552
  return ct(e, i, s);
@@ -630,7 +630,7 @@ function ce(e, t, n) {
630
630
  ++i;
631
631
  return i;
632
632
  }
633
- function lt(e, t) {
633
+ function dt(e, t) {
634
634
  const n = e.source.body, r = n.length;
635
635
  let i = t + 1, s = i, a = "";
636
636
  for (; i < r; ) {
@@ -639,7 +639,7 @@ function lt(e, t) {
639
639
  return a += n.slice(s, i), S(e, u.STRING, t, i + 1, a);
640
640
  if (c === 92) {
641
641
  a += n.slice(s, i);
642
- const p = n.charCodeAt(i + 1) === 117 ? n.charCodeAt(i + 2) === 123 ? dt(e, i) : pt(e, i) : ht(e, i);
642
+ const p = n.charCodeAt(i + 1) === 117 ? n.charCodeAt(i + 2) === 123 ? lt(e, i) : pt(e, i) : ht(e, i);
643
643
  a += p.value, i += p.size, s = i;
644
644
  continue;
645
645
  }
@@ -661,7 +661,7 @@ function lt(e, t) {
661
661
  }
662
662
  throw N(e.source, i, "Unterminated string.");
663
663
  }
664
- function dt(e, t) {
664
+ function lt(e, t) {
665
665
  const n = e.source.body;
666
666
  let r = 0, i = 3;
667
667
  for (; i < 12; ) {
@@ -687,14 +687,14 @@ function dt(e, t) {
687
687
  );
688
688
  }
689
689
  function pt(e, t) {
690
- const n = e.source.body, r = Ne(n, t + 2);
690
+ const n = e.source.body, r = Re(n, t + 2);
691
691
  if (G(r))
692
692
  return {
693
693
  value: String.fromCodePoint(r),
694
694
  size: 6
695
695
  };
696
696
  if (Le(r) && n.charCodeAt(t + 6) === 92 && n.charCodeAt(t + 7) === 117) {
697
- const i = Ne(n, t + 8);
697
+ const i = Re(n, t + 8);
698
698
  if (we(i))
699
699
  return {
700
700
  value: String.fromCodePoint(r, i),
@@ -707,7 +707,7 @@ function pt(e, t) {
707
707
  `Invalid Unicode escape sequence: "${n.slice(t, t + 6)}".`
708
708
  );
709
709
  }
710
- function Ne(e, t) {
710
+ function Re(e, t) {
711
711
  return j(e.charCodeAt(t)) << 12 | j(e.charCodeAt(t + 1)) << 8 | j(e.charCodeAt(t + 2)) << 4 | j(e.charCodeAt(t + 3));
712
712
  }
713
713
  function j(e) {
@@ -863,7 +863,7 @@ function yt(e) {
863
863
  }
864
864
  function Et(e, t) {
865
865
  const n = Object.entries(e);
866
- return n.length === 0 ? "{}" : t.length > Fe ? "[" + Tt(e) + "]" : "{ " + n.map(
866
+ return n.length === 0 ? "{}" : t.length > Fe ? "[" + At(e) + "]" : "{ " + n.map(
867
867
  ([i, s]) => i + ": " + ae(s, t)
868
868
  ).join(", ") + " }";
869
869
  }
@@ -877,7 +877,7 @@ function vt(e, t) {
877
877
  i.push(ae(e[s], t));
878
878
  return r === 1 ? i.push("... 1 more item") : r > 1 && i.push(`... ${r} more items`), "[" + i.join(", ") + "]";
879
879
  }
880
- function Tt(e) {
880
+ function At(e) {
881
881
  const t = Object.prototype.toString.call(e).replace(/^\[object /, "").replace(/]$/, "");
882
882
  if (t === "Object" && typeof e.constructor == "function") {
883
883
  const n = e.constructor.name;
@@ -886,7 +886,7 @@ function Tt(e) {
886
886
  }
887
887
  return t;
888
888
  }
889
- const At = (
889
+ const Tt = (
890
890
  /* c8 ignore next 6 */
891
891
  // FIXME: https://github.com/graphql/graphql-js/issues/2317
892
892
  globalThis.process && globalThis.process.env.NODE_ENV === "production" ? function(t, n) {
@@ -924,10 +924,10 @@ class Be {
924
924
  line: 1,
925
925
  column: 1
926
926
  }) {
927
- typeof t == "string" || K(!1, `Body must be a string. Received: ${Ee(t)}.`), this.body = t, this.name = n, this.locationOffset = r, this.locationOffset.line > 0 || K(
927
+ typeof t == "string" || W(!1, `Body must be a string. Received: ${Ee(t)}.`), this.body = t, this.name = n, this.locationOffset = r, this.locationOffset.line > 0 || W(
928
928
  !1,
929
929
  "line in locationOffset is 1-indexed and must be positive."
930
- ), this.locationOffset.column > 0 || K(
930
+ ), this.locationOffset.column > 0 || W(
931
931
  !1,
932
932
  "column in locationOffset is 1-indexed and must be positive."
933
933
  );
@@ -937,9 +937,9 @@ class Be {
937
937
  }
938
938
  }
939
939
  function It(e) {
940
- return At(e, Be);
940
+ return Tt(e, Be);
941
941
  }
942
- function Ue(e, t) {
942
+ function Me(e, t) {
943
943
  return new St(e, t).parseDocument();
944
944
  }
945
945
  class St {
@@ -1047,7 +1047,7 @@ class St {
1047
1047
  if (this.peek(u.BRACE_L))
1048
1048
  return this.node(t, {
1049
1049
  kind: f.OPERATION_DEFINITION,
1050
- operation: M.QUERY,
1050
+ operation: U.QUERY,
1051
1051
  name: void 0,
1052
1052
  variableDefinitions: [],
1053
1053
  directives: [],
@@ -1071,11 +1071,11 @@ class St {
1071
1071
  const t = this.expectToken(u.NAME);
1072
1072
  switch (t.value) {
1073
1073
  case "query":
1074
- return M.QUERY;
1074
+ return U.QUERY;
1075
1075
  case "mutation":
1076
- return M.MUTATION;
1076
+ return U.MUTATION;
1077
1077
  case "subscription":
1078
- return M.SUBSCRIPTION;
1078
+ return U.SUBSCRIPTION;
1079
1079
  }
1080
1080
  throw this.unexpected(t);
1081
1081
  }
@@ -1642,7 +1642,7 @@ class St {
1642
1642
  throw N(
1643
1643
  this._lexer.source,
1644
1644
  this._lexer.token.start,
1645
- `${W(
1645
+ `${K(
1646
1646
  this._lexer.token
1647
1647
  )} is reserved and cannot be used for an enum value.`
1648
1648
  );
@@ -1935,7 +1935,7 @@ class St {
1935
1935
  throw N(
1936
1936
  this._lexer.source,
1937
1937
  n.start,
1938
- `Expected ${Me(t)}, found ${W(n)}.`
1938
+ `Expected ${Ue(t)}, found ${K(n)}.`
1939
1939
  );
1940
1940
  }
1941
1941
  /**
@@ -1957,7 +1957,7 @@ class St {
1957
1957
  throw N(
1958
1958
  this._lexer.source,
1959
1959
  n.start,
1960
- `Expected "${t}", found ${W(n)}.`
1960
+ `Expected "${t}", found ${K(n)}.`
1961
1961
  );
1962
1962
  }
1963
1963
  /**
@@ -1976,7 +1976,7 @@ class St {
1976
1976
  return N(
1977
1977
  this._lexer.source,
1978
1978
  n.start,
1979
- `Unexpected ${W(n)}.`
1979
+ `Unexpected ${K(n)}.`
1980
1980
  );
1981
1981
  }
1982
1982
  /**
@@ -2043,21 +2043,21 @@ class St {
2043
2043
  );
2044
2044
  }
2045
2045
  }
2046
- function W(e) {
2046
+ function K(e) {
2047
2047
  const t = e.value;
2048
- return Me(e.kind) + (t != null ? ` "${t}"` : "");
2048
+ return Ue(e.kind) + (t != null ? ` "${t}"` : "");
2049
2049
  }
2050
- function Me(e) {
2050
+ function Ue(e) {
2051
2051
  return at(e) ? `"${e}"` : e;
2052
2052
  }
2053
- function Nt(e) {
2054
- return `"${e.replace(Rt, xt)}"`;
2053
+ function Rt(e) {
2054
+ return `"${e.replace(Nt, Pt)}"`;
2055
2055
  }
2056
- const Rt = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g;
2057
- function xt(e) {
2058
- return bt[e.charCodeAt(0)];
2056
+ const Nt = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g;
2057
+ function Pt(e) {
2058
+ return xt[e.charCodeAt(0)];
2059
2059
  }
2060
- const bt = [
2060
+ const xt = [
2061
2061
  "\\u0000",
2062
2062
  "\\u0001",
2063
2063
  "\\u0002",
@@ -2224,17 +2224,17 @@ const bt = [
2224
2224
  "\\u009E",
2225
2225
  "\\u009F"
2226
2226
  ], Ot = Object.freeze({});
2227
- function Pt(e, t, n = De) {
2227
+ function bt(e, t, n = De) {
2228
2228
  const r = /* @__PURE__ */ new Map();
2229
- for (const P of Object.values(f))
2230
- r.set(P, Dt(t, P));
2229
+ for (const b of Object.values(f))
2230
+ r.set(b, Dt(t, b));
2231
2231
  let i, s = Array.isArray(e), a = [e], c = -1, p = [], h = e, m, C;
2232
- const y = [], A = [];
2232
+ const y = [], T = [];
2233
2233
  do {
2234
2234
  c++;
2235
- const P = c === a.length, z = P && p.length !== 0;
2236
- if (P) {
2237
- if (m = A.length === 0 ? void 0 : y[y.length - 1], h = C, C = A.pop(), z)
2235
+ const b = c === a.length, z = b && p.length !== 0;
2236
+ if (b) {
2237
+ if (m = T.length === 0 ? void 0 : y[y.length - 1], h = C, C = T.pop(), z)
2238
2238
  if (s) {
2239
2239
  h = h.slice();
2240
2240
  let D = 0;
@@ -2259,16 +2259,16 @@ function Pt(e, t, n = De) {
2259
2259
  let _;
2260
2260
  if (!Array.isArray(h)) {
2261
2261
  var g, I;
2262
- Se(h) || K(!1, `Invalid AST Node: ${Ee(h)}.`);
2263
- const D = P ? (g = r.get(h.kind)) === null || g === void 0 ? void 0 : g.leave : (I = r.get(h.kind)) === null || I === void 0 ? void 0 : I.enter;
2264
- if (_ = D == null ? void 0 : D.call(t, h, m, C, y, A), _ === Ot)
2262
+ Se(h) || W(!1, `Invalid AST Node: ${Ee(h)}.`);
2263
+ const D = b ? (g = r.get(h.kind)) === null || g === void 0 ? void 0 : g.leave : (I = r.get(h.kind)) === null || I === void 0 ? void 0 : I.enter;
2264
+ if (_ = D == null ? void 0 : D.call(t, h, m, C, y, T), _ === Ot)
2265
2265
  break;
2266
2266
  if (_ === !1) {
2267
- if (!P) {
2267
+ if (!b) {
2268
2268
  y.pop();
2269
2269
  continue;
2270
2270
  }
2271
- } else if (_ !== void 0 && (p.push([m, _]), !P))
2271
+ } else if (_ !== void 0 && (p.push([m, _]), !b))
2272
2272
  if (Se(_))
2273
2273
  h = _;
2274
2274
  else {
@@ -2276,7 +2276,7 @@ function Pt(e, t, n = De) {
2276
2276
  continue;
2277
2277
  }
2278
2278
  }
2279
- if (_ === void 0 && z && p.push([m, h]), P)
2279
+ if (_ === void 0 && z && p.push([m, h]), b)
2280
2280
  y.pop();
2281
2281
  else {
2282
2282
  var O;
@@ -2286,7 +2286,7 @@ function Pt(e, t, n = De) {
2286
2286
  keys: a,
2287
2287
  edits: p,
2288
2288
  prev: i
2289
- }, s = Array.isArray(h), a = s ? h : (O = n[h.kind]) !== null && O !== void 0 ? O : [], c = -1, p = [], C && A.push(C), C = h;
2289
+ }, s = Array.isArray(h), a = s ? h : (O = n[h.kind]) !== null && O !== void 0 ? O : [], c = -1, p = [], C && T.push(C), C = h;
2290
2290
  }
2291
2291
  } while (i !== void 0);
2292
2292
  return p.length !== 0 ? p[p.length - 1][1] : e;
@@ -2302,7 +2302,7 @@ function Dt(e, t) {
2302
2302
  };
2303
2303
  }
2304
2304
  function kt(e) {
2305
- return Pt(e, Lt);
2305
+ return bt(e, Lt);
2306
2306
  }
2307
2307
  const _t = 80, Lt = {
2308
2308
  Name: {
@@ -2313,17 +2313,17 @@ const _t = 80, Lt = {
2313
2313
  },
2314
2314
  // Document
2315
2315
  Document: {
2316
- leave: (e) => d(e.definitions, `
2316
+ leave: (e) => l(e.definitions, `
2317
2317
 
2318
2318
  `)
2319
2319
  },
2320
2320
  OperationDefinition: {
2321
2321
  leave(e) {
2322
- const t = v("(", d(e.variableDefinitions, ", "), ")"), n = d(
2322
+ const t = v("(", l(e.variableDefinitions, ", "), ")"), n = l(
2323
2323
  [
2324
2324
  e.operation,
2325
- d([e.name, t]),
2326
- d(e.directives, " ")
2325
+ l([e.name, t]),
2326
+ l(e.directives, " ")
2327
2327
  ],
2328
2328
  " "
2329
2329
  );
@@ -2331,7 +2331,7 @@ const _t = 80, Lt = {
2331
2331
  }
2332
2332
  },
2333
2333
  VariableDefinition: {
2334
- leave: ({ variable: e, type: t, defaultValue: n, directives: r }) => e + ": " + t + v(" = ", n) + v(" ", d(r, " "))
2334
+ leave: ({ variable: e, type: t, defaultValue: n, directives: r }) => e + ": " + t + v(" = ", n) + v(" ", l(r, " "))
2335
2335
  },
2336
2336
  SelectionSet: {
2337
2337
  leave: ({ selections: e }) => k(e)
@@ -2339,11 +2339,11 @@ const _t = 80, Lt = {
2339
2339
  Field: {
2340
2340
  leave({ alias: e, name: t, arguments: n, directives: r, selectionSet: i }) {
2341
2341
  const s = v("", e, ": ") + t;
2342
- let a = s + v("(", d(n, ", "), ")");
2342
+ let a = s + v("(", l(n, ", "), ")");
2343
2343
  return a.length > _t && (a = s + v(`(
2344
- `, Z(d(n, `
2344
+ `, Z(l(n, `
2345
2345
  `)), `
2346
- )`)), d([a, d(r, " "), i], " ");
2346
+ )`)), l([a, l(r, " "), i], " ");
2347
2347
  }
2348
2348
  },
2349
2349
  Argument: {
@@ -2351,14 +2351,14 @@ const _t = 80, Lt = {
2351
2351
  },
2352
2352
  // Fragments
2353
2353
  FragmentSpread: {
2354
- leave: ({ name: e, directives: t }) => "..." + e + v(" ", d(t, " "))
2354
+ leave: ({ name: e, directives: t }) => "..." + e + v(" ", l(t, " "))
2355
2355
  },
2356
2356
  InlineFragment: {
2357
- leave: ({ typeCondition: e, directives: t, selectionSet: n }) => d(
2357
+ leave: ({ typeCondition: e, directives: t, selectionSet: n }) => l(
2358
2358
  [
2359
2359
  "...",
2360
2360
  v("on ", e),
2361
- d(t, " "),
2361
+ l(t, " "),
2362
2362
  n
2363
2363
  ],
2364
2364
  " "
@@ -2367,7 +2367,7 @@ const _t = 80, Lt = {
2367
2367
  FragmentDefinition: {
2368
2368
  leave: ({ name: e, typeCondition: t, variableDefinitions: n, directives: r, selectionSet: i }) => (
2369
2369
  // or removed in the future.
2370
- `fragment ${e}${v("(", d(n, ", "), ")")} on ${t} ${v("", d(r, " "), " ")}` + i
2370
+ `fragment ${e}${v("(", l(n, ", "), ")")} on ${t} ${v("", l(r, " "), " ")}` + i
2371
2371
  )
2372
2372
  },
2373
2373
  // Value
@@ -2378,7 +2378,7 @@ const _t = 80, Lt = {
2378
2378
  leave: ({ value: e }) => e
2379
2379
  },
2380
2380
  StringValue: {
2381
- leave: ({ value: e, block: t }) => t ? rt(e) : Nt(e)
2381
+ leave: ({ value: e, block: t }) => t ? rt(e) : Rt(e)
2382
2382
  },
2383
2383
  BooleanValue: {
2384
2384
  leave: ({ value: e }) => e ? "true" : "false"
@@ -2390,17 +2390,17 @@ const _t = 80, Lt = {
2390
2390
  leave: ({ value: e }) => e
2391
2391
  },
2392
2392
  ListValue: {
2393
- leave: ({ values: e }) => "[" + d(e, ", ") + "]"
2393
+ leave: ({ values: e }) => "[" + l(e, ", ") + "]"
2394
2394
  },
2395
2395
  ObjectValue: {
2396
- leave: ({ fields: e }) => "{" + d(e, ", ") + "}"
2396
+ leave: ({ fields: e }) => "{" + l(e, ", ") + "}"
2397
2397
  },
2398
2398
  ObjectField: {
2399
2399
  leave: ({ name: e, value: t }) => e + ": " + t
2400
2400
  },
2401
2401
  // Directive
2402
2402
  Directive: {
2403
- leave: ({ name: e, arguments: t }) => "@" + e + v("(", d(t, ", "), ")")
2403
+ leave: ({ name: e, arguments: t }) => "@" + e + v("(", l(t, ", "), ")")
2404
2404
  },
2405
2405
  // Type
2406
2406
  NamedType: {
@@ -2415,23 +2415,23 @@ const _t = 80, Lt = {
2415
2415
  // Type System Definitions
2416
2416
  SchemaDefinition: {
2417
2417
  leave: ({ description: e, directives: t, operationTypes: n }) => v("", e, `
2418
- `) + d(["schema", d(t, " "), k(n)], " ")
2418
+ `) + l(["schema", l(t, " "), k(n)], " ")
2419
2419
  },
2420
2420
  OperationTypeDefinition: {
2421
2421
  leave: ({ operation: e, type: t }) => e + ": " + t
2422
2422
  },
2423
2423
  ScalarTypeDefinition: {
2424
2424
  leave: ({ description: e, name: t, directives: n }) => v("", e, `
2425
- `) + d(["scalar", t, d(n, " ")], " ")
2425
+ `) + l(["scalar", t, l(n, " ")], " ")
2426
2426
  },
2427
2427
  ObjectTypeDefinition: {
2428
2428
  leave: ({ description: e, name: t, interfaces: n, directives: r, fields: i }) => v("", e, `
2429
- `) + d(
2429
+ `) + l(
2430
2430
  [
2431
2431
  "type",
2432
2432
  t,
2433
- v("implements ", d(n, " & ")),
2434
- d(r, " "),
2433
+ v("implements ", l(n, " & ")),
2434
+ l(r, " "),
2435
2435
  k(i)
2436
2436
  ],
2437
2437
  " "
@@ -2439,26 +2439,26 @@ const _t = 80, Lt = {
2439
2439
  },
2440
2440
  FieldDefinition: {
2441
2441
  leave: ({ description: e, name: t, arguments: n, type: r, directives: i }) => v("", e, `
2442
- `) + t + (Re(n) ? v(`(
2443
- `, Z(d(n, `
2442
+ `) + t + (Ne(n) ? v(`(
2443
+ `, Z(l(n, `
2444
2444
  `)), `
2445
- )`) : v("(", d(n, ", "), ")")) + ": " + r + v(" ", d(i, " "))
2445
+ )`) : v("(", l(n, ", "), ")")) + ": " + r + v(" ", l(i, " "))
2446
2446
  },
2447
2447
  InputValueDefinition: {
2448
2448
  leave: ({ description: e, name: t, type: n, defaultValue: r, directives: i }) => v("", e, `
2449
- `) + d(
2450
- [t + ": " + n, v("= ", r), d(i, " ")],
2449
+ `) + l(
2450
+ [t + ": " + n, v("= ", r), l(i, " ")],
2451
2451
  " "
2452
2452
  )
2453
2453
  },
2454
2454
  InterfaceTypeDefinition: {
2455
2455
  leave: ({ description: e, name: t, interfaces: n, directives: r, fields: i }) => v("", e, `
2456
- `) + d(
2456
+ `) + l(
2457
2457
  [
2458
2458
  "interface",
2459
2459
  t,
2460
- v("implements ", d(n, " & ")),
2461
- d(r, " "),
2460
+ v("implements ", l(n, " & ")),
2461
+ l(r, " "),
2462
2462
  k(i)
2463
2463
  ],
2464
2464
  " "
@@ -2466,88 +2466,88 @@ const _t = 80, Lt = {
2466
2466
  },
2467
2467
  UnionTypeDefinition: {
2468
2468
  leave: ({ description: e, name: t, directives: n, types: r }) => v("", e, `
2469
- `) + d(
2470
- ["union", t, d(n, " "), v("= ", d(r, " | "))],
2469
+ `) + l(
2470
+ ["union", t, l(n, " "), v("= ", l(r, " | "))],
2471
2471
  " "
2472
2472
  )
2473
2473
  },
2474
2474
  EnumTypeDefinition: {
2475
2475
  leave: ({ description: e, name: t, directives: n, values: r }) => v("", e, `
2476
- `) + d(["enum", t, d(n, " "), k(r)], " ")
2476
+ `) + l(["enum", t, l(n, " "), k(r)], " ")
2477
2477
  },
2478
2478
  EnumValueDefinition: {
2479
2479
  leave: ({ description: e, name: t, directives: n }) => v("", e, `
2480
- `) + d([t, d(n, " ")], " ")
2480
+ `) + l([t, l(n, " ")], " ")
2481
2481
  },
2482
2482
  InputObjectTypeDefinition: {
2483
2483
  leave: ({ description: e, name: t, directives: n, fields: r }) => v("", e, `
2484
- `) + d(["input", t, d(n, " "), k(r)], " ")
2484
+ `) + l(["input", t, l(n, " "), k(r)], " ")
2485
2485
  },
2486
2486
  DirectiveDefinition: {
2487
2487
  leave: ({ description: e, name: t, arguments: n, repeatable: r, locations: i }) => v("", e, `
2488
- `) + "directive @" + t + (Re(n) ? v(`(
2489
- `, Z(d(n, `
2488
+ `) + "directive @" + t + (Ne(n) ? v(`(
2489
+ `, Z(l(n, `
2490
2490
  `)), `
2491
- )`) : v("(", d(n, ", "), ")")) + (r ? " repeatable" : "") + " on " + d(i, " | ")
2491
+ )`) : v("(", l(n, ", "), ")")) + (r ? " repeatable" : "") + " on " + l(i, " | ")
2492
2492
  },
2493
2493
  SchemaExtension: {
2494
- leave: ({ directives: e, operationTypes: t }) => d(
2495
- ["extend schema", d(e, " "), k(t)],
2494
+ leave: ({ directives: e, operationTypes: t }) => l(
2495
+ ["extend schema", l(e, " "), k(t)],
2496
2496
  " "
2497
2497
  )
2498
2498
  },
2499
2499
  ScalarTypeExtension: {
2500
- leave: ({ name: e, directives: t }) => d(["extend scalar", e, d(t, " ")], " ")
2500
+ leave: ({ name: e, directives: t }) => l(["extend scalar", e, l(t, " ")], " ")
2501
2501
  },
2502
2502
  ObjectTypeExtension: {
2503
- leave: ({ name: e, interfaces: t, directives: n, fields: r }) => d(
2503
+ leave: ({ name: e, interfaces: t, directives: n, fields: r }) => l(
2504
2504
  [
2505
2505
  "extend type",
2506
2506
  e,
2507
- v("implements ", d(t, " & ")),
2508
- d(n, " "),
2507
+ v("implements ", l(t, " & ")),
2508
+ l(n, " "),
2509
2509
  k(r)
2510
2510
  ],
2511
2511
  " "
2512
2512
  )
2513
2513
  },
2514
2514
  InterfaceTypeExtension: {
2515
- leave: ({ name: e, interfaces: t, directives: n, fields: r }) => d(
2515
+ leave: ({ name: e, interfaces: t, directives: n, fields: r }) => l(
2516
2516
  [
2517
2517
  "extend interface",
2518
2518
  e,
2519
- v("implements ", d(t, " & ")),
2520
- d(n, " "),
2519
+ v("implements ", l(t, " & ")),
2520
+ l(n, " "),
2521
2521
  k(r)
2522
2522
  ],
2523
2523
  " "
2524
2524
  )
2525
2525
  },
2526
2526
  UnionTypeExtension: {
2527
- leave: ({ name: e, directives: t, types: n }) => d(
2527
+ leave: ({ name: e, directives: t, types: n }) => l(
2528
2528
  [
2529
2529
  "extend union",
2530
2530
  e,
2531
- d(t, " "),
2532
- v("= ", d(n, " | "))
2531
+ l(t, " "),
2532
+ v("= ", l(n, " | "))
2533
2533
  ],
2534
2534
  " "
2535
2535
  )
2536
2536
  },
2537
2537
  EnumTypeExtension: {
2538
- leave: ({ name: e, directives: t, values: n }) => d(["extend enum", e, d(t, " "), k(n)], " ")
2538
+ leave: ({ name: e, directives: t, values: n }) => l(["extend enum", e, l(t, " "), k(n)], " ")
2539
2539
  },
2540
2540
  InputObjectTypeExtension: {
2541
- leave: ({ name: e, directives: t, fields: n }) => d(["extend input", e, d(t, " "), k(n)], " ")
2541
+ leave: ({ name: e, directives: t, fields: n }) => l(["extend input", e, l(t, " "), k(n)], " ")
2542
2542
  }
2543
2543
  };
2544
- function d(e, t = "") {
2544
+ function l(e, t = "") {
2545
2545
  var n;
2546
2546
  return (n = e == null ? void 0 : e.filter((r) => r).join(t)) !== null && n !== void 0 ? n : "";
2547
2547
  }
2548
2548
  function k(e) {
2549
2549
  return v(`{
2550
- `, Z(d(e, `
2550
+ `, Z(l(e, `
2551
2551
  `)), `
2552
2552
  }`);
2553
2553
  }
@@ -2558,7 +2558,7 @@ function Z(e) {
2558
2558
  return v(" ", e.replace(/\n/g, `
2559
2559
  `));
2560
2560
  }
2561
- function Re(e) {
2561
+ function Ne(e) {
2562
2562
  var t;
2563
2563
  return (t = e == null ? void 0 : e.some((n) => n.includes(`
2564
2564
  `))) !== null && t !== void 0 ? t : !1;
@@ -2593,10 +2593,10 @@ function Bt(e) {
2593
2593
  var n = e.loc;
2594
2594
  return n && (delete n.startToken, delete n.endToken), e;
2595
2595
  }
2596
- function Ut(e) {
2596
+ function Mt(e) {
2597
2597
  var t = Ge(e);
2598
2598
  if (!ee.has(t)) {
2599
- var n = Ue(e, {
2599
+ var n = Me(e, {
2600
2600
  experimentalFragmentVariables: ie,
2601
2601
  allowLegacyFragmentVariables: ie
2602
2602
  });
@@ -2613,9 +2613,9 @@ function q(e) {
2613
2613
  var r = e[0];
2614
2614
  return t.forEach(function(i, s) {
2615
2615
  i && i.kind === "Document" ? r += i.loc.source.body : r += i, r += e[s + 1];
2616
- }), Ut(r);
2616
+ }), Mt(r);
2617
2617
  }
2618
- function Mt() {
2618
+ function Ut() {
2619
2619
  ee.clear(), ge.clear();
2620
2620
  }
2621
2621
  function qt() {
@@ -2629,7 +2629,7 @@ function Vt() {
2629
2629
  }
2630
2630
  var $ = {
2631
2631
  gql: q,
2632
- resetCaches: Mt,
2632
+ resetCaches: Ut,
2633
2633
  disableFragmentWarnings: qt,
2634
2634
  enableExperimentalFragmentVariables: Gt,
2635
2635
  disableExperimentalFragmentVariables: Vt
@@ -2638,7 +2638,7 @@ var $ = {
2638
2638
  e.gql = $.gql, e.resetCaches = $.resetCaches, e.disableFragmentWarnings = $.disableFragmentWarnings, e.enableExperimentalFragmentVariables = $.enableExperimentalFragmentVariables, e.disableExperimentalFragmentVariables = $.disableExperimentalFragmentVariables;
2639
2639
  })(q || (q = {}));
2640
2640
  q.default = q;
2641
- const x = q, $t = x`
2641
+ const R = q, $t = R`
2642
2642
  query GetLocationAvailabilities($sku: String!, $first: Int, $after: String, $isReverse: Boolean! = false) {
2643
2643
  locationAvailabilities(
2644
2644
  sku: $sku
@@ -2677,7 +2677,7 @@ const x = q, $t = x`
2677
2677
  }
2678
2678
  }
2679
2679
  }
2680
- `, jt = x`
2680
+ `, jt = R`
2681
2681
  query GetLocationAvailability($sku: String!, $locationID: ID!) {
2682
2682
  locationAvailability(sku: $sku, locationID: $locationID) {
2683
2683
  location {
@@ -2703,7 +2703,7 @@ const x = q, $t = x`
2703
2703
  inventoryQuantity
2704
2704
  }
2705
2705
  }
2706
- `, Ht = x`
2706
+ `, Ht = R`
2707
2707
  query GetPurchasingCustomerMetafield($namespace: String!, $key: String!) {
2708
2708
  purchasingCustomerMetafield(namespace: $namespace, key: $key) {
2709
2709
  id
@@ -2712,7 +2712,7 @@ const x = q, $t = x`
2712
2712
  value
2713
2713
  }
2714
2714
  }
2715
- `, Yt = x`
2715
+ `, Yt = R`
2716
2716
  query GetPoints {
2717
2717
  purchasingCustomer {
2718
2718
  pointsApproved
@@ -2724,7 +2724,7 @@ const x = q, $t = x`
2724
2724
  }
2725
2725
  }
2726
2726
  }
2727
- `, zt = x`
2727
+ `, zt = R`
2728
2728
  query GetLocations($first: Int, $after: String, $filter: LocationFilter, $isReverse: Boolean! = false) {
2729
2729
  locations(first: $first, after: $after, filter: $filter, isReverse: $isReverse) {
2730
2730
  nodes {
@@ -2755,7 +2755,7 @@ const x = q, $t = x`
2755
2755
  }
2756
2756
  }
2757
2757
  }
2758
- `, Jt = x`
2758
+ `, Jt = R`
2759
2759
  query GetPurchasingCustomerDiscounts($first: Int, $after: String, $isReverse: Boolean! = false) {
2760
2760
  purchasingCustomer {
2761
2761
  id
@@ -2784,14 +2784,14 @@ const x = q, $t = x`
2784
2784
  }
2785
2785
  }
2786
2786
  }
2787
- `, Qt = x`
2787
+ `, Qt = R`
2788
2788
  query GetPurchasingCustomerDiscountCodeCount {
2789
2789
  purchasingCustomer {
2790
2790
  id
2791
2791
  orderPriceAdjustmentRuleCount
2792
2792
  }
2793
2793
  }
2794
- `, Xt = x`
2794
+ `, Xt = R`
2795
2795
  query GetPurchasingCustomerPointChangeActivities($first: Int, $after: String, $isReverse: Boolean! = false, $sortKeys: PointChangeActivitySortKey! = CREATED_AT) {
2796
2796
  purchasingCustomer {
2797
2797
  id
@@ -2851,7 +2851,7 @@ const x = q, $t = x`
2851
2851
  }
2852
2852
  }
2853
2853
  }
2854
- `, Wt = x`
2854
+ `, Kt = R`
2855
2855
  query GetPurchasingCustomerRank {
2856
2856
  purchasingCustomer {
2857
2857
  currentCustomerRank {
@@ -2892,14 +2892,14 @@ const x = q, $t = x`
2892
2892
  }
2893
2893
  }
2894
2894
  }
2895
- `, Kt = x`
2895
+ `, Wt = R`
2896
2896
  query GetSharingPurchasingCustomerCount {
2897
2897
  purchasingCustomer {
2898
2898
  id
2899
2899
  sharingPurchasingCustomerCount
2900
2900
  }
2901
2901
  }
2902
- `, Zt = x`
2902
+ `, Zt = R`
2903
2903
  query GetPurchasingCustomerSharing {
2904
2904
  purchasingCustomer {
2905
2905
  id
@@ -2916,7 +2916,7 @@ const x = q, $t = x`
2916
2916
  }
2917
2917
  }
2918
2918
  }
2919
- `, en = x`
2919
+ `, en = R`
2920
2920
  query GetProduct($id: String!, $first: Int, $after: String, $isReverse: Boolean! = false, $sortKeys: ProductVariantSortKeys! = CREATED_AT) {
2921
2921
  productByProductShopifyLegacyResourceID(productShopifyLegacyResourceID: $id) {
2922
2922
  id
@@ -2948,7 +2948,14 @@ const x = q, $t = x`
2948
2948
  }
2949
2949
  }
2950
2950
  }
2951
- `, tn = x`
2951
+ `, tn = R`
2952
+ query GetHasBackOrderProductVariantsByProductShopifyLegacyResourceID($id: String!) {
2953
+ productByProductShopifyLegacyResourceID(productShopifyLegacyResourceID: $id) {
2954
+ id
2955
+ hasBackOrderProductVariants
2956
+ }
2957
+ }
2958
+ `, nn = R`
2952
2959
  query GetPointCampaignOrderRuleTargetCustomerRank {
2953
2960
  pointCampaignOrderRuleTargetCustomerRank {
2954
2961
  pointCampaignOrderRule {
@@ -2961,7 +2968,7 @@ const x = q, $t = x`
2961
2968
  fixedPoint
2962
2969
  }
2963
2970
  }
2964
- `, nn = x`
2971
+ `, rn = R`
2965
2972
  query GetEstimatedShopifyCartPoint($input: EstimatedShopifyCartPointInput!) {
2966
2973
  estimatedShopifyCartPoint(input: $input) {
2967
2974
  pointsEarning
@@ -2977,7 +2984,7 @@ const x = q, $t = x`
2977
2984
  }
2978
2985
  }
2979
2986
  }
2980
- `, rn = x`
2987
+ `, sn = R`
2981
2988
  query GetEstimatedShopifyCartLineItemPoint($input: EstimatedShopifyCartLineItemPointInput!) {
2982
2989
  estimatedShopifyCartLineItemPoint(input: $input) {
2983
2990
  pointsEarning
@@ -2993,7 +3000,7 @@ const x = q, $t = x`
2993
3000
  }
2994
3001
  }
2995
3002
  }
2996
- `, sn = x`
3003
+ `, an = R`
2997
3004
  mutation PurchasingCustomerSendCustomerSharingActivationCode {
2998
3005
  purchasingCustomerSendCustomerSharingActivationCode {
2999
3006
  purchasingCustomer {
@@ -3009,7 +3016,7 @@ const x = q, $t = x`
3009
3016
  }
3010
3017
  }
3011
3018
  }
3012
- `, an = x`
3019
+ `, on = R`
3013
3020
  mutation PurchasingCustomerActivateCustomerSharing($email: String!, $activationCode: String!) {
3014
3021
  purchasingCustomerActivateCustomerSharing(
3015
3022
  input: {email: $email, activationCode: $activationCode}
@@ -3024,8 +3031,43 @@ const x = q, $t = x`
3024
3031
  }
3025
3032
  }
3026
3033
  }
3027
- `, on = (e, t, n, r) => e();
3028
- function un(e, t = on) {
3034
+ `, un = R`
3035
+ query GetMiles {
3036
+ purchasingCustomer {
3037
+ miles
3038
+ }
3039
+ }
3040
+ `, cn = R`
3041
+ query GetPurchasingCustomerMileChangeActivities($first: Int, $after: String, $isReverse: Boolean! = false, $sortKeys: MileChangeActivitySortKey! = CREATED_AT) {
3042
+ purchasingCustomer {
3043
+ id
3044
+ mileChangeActivities(
3045
+ first: $first
3046
+ after: $after
3047
+ isReverse: $isReverse
3048
+ sortKeys: $sortKeys
3049
+ ) {
3050
+ nodes {
3051
+ id
3052
+ title
3053
+ mileChange {
3054
+ id
3055
+ delta
3056
+ mileChangeCreatedAt
3057
+ createdAt
3058
+ }
3059
+ }
3060
+ pageInfo {
3061
+ startCursor
3062
+ endCursor
3063
+ hasNextPage
3064
+ hasPreviousPage
3065
+ }
3066
+ }
3067
+ }
3068
+ }
3069
+ `, dn = (e, t, n, r) => e();
3070
+ function ln(e, t = dn) {
3029
3071
  return {
3030
3072
  GetLocationAvailabilities(n, r) {
3031
3073
  return t((i) => e.request($t, n, { ...r, ...i }), "GetLocationAvailabilities", "query", n);
@@ -3052,10 +3094,10 @@ function un(e, t = on) {
3052
3094
  return t((i) => e.request(Xt, n, { ...r, ...i }), "GetPurchasingCustomerPointChangeActivities", "query", n);
3053
3095
  },
3054
3096
  GetPurchasingCustomerRank(n, r) {
3055
- return t((i) => e.request(Wt, n, { ...r, ...i }), "GetPurchasingCustomerRank", "query", n);
3097
+ return t((i) => e.request(Kt, n, { ...r, ...i }), "GetPurchasingCustomerRank", "query", n);
3056
3098
  },
3057
3099
  GetSharingPurchasingCustomerCount(n, r) {
3058
- return t((i) => e.request(Kt, n, { ...r, ...i }), "GetSharingPurchasingCustomerCount", "query", n);
3100
+ return t((i) => e.request(Wt, n, { ...r, ...i }), "GetSharingPurchasingCustomerCount", "query", n);
3059
3101
  },
3060
3102
  GetPurchasingCustomerSharing(n, r) {
3061
3103
  return t((i) => e.request(Zt, n, { ...r, ...i }), "GetPurchasingCustomerSharing", "query", n);
@@ -3063,58 +3105,67 @@ function un(e, t = on) {
3063
3105
  GetProduct(n, r) {
3064
3106
  return t((i) => e.request(en, n, { ...r, ...i }), "GetProduct", "query", n);
3065
3107
  },
3108
+ GetHasBackOrderProductVariantsByProductShopifyLegacyResourceID(n, r) {
3109
+ return t((i) => e.request(tn, n, { ...r, ...i }), "GetHasBackOrderProductVariantsByProductShopifyLegacyResourceID", "query", n);
3110
+ },
3066
3111
  GetPointCampaignOrderRuleTargetCustomerRank(n, r) {
3067
- return t((i) => e.request(tn, n, { ...r, ...i }), "GetPointCampaignOrderRuleTargetCustomerRank", "query", n);
3112
+ return t((i) => e.request(nn, n, { ...r, ...i }), "GetPointCampaignOrderRuleTargetCustomerRank", "query", n);
3068
3113
  },
3069
3114
  GetEstimatedShopifyCartPoint(n, r) {
3070
- return t((i) => e.request(nn, n, { ...r, ...i }), "GetEstimatedShopifyCartPoint", "query", n);
3115
+ return t((i) => e.request(rn, n, { ...r, ...i }), "GetEstimatedShopifyCartPoint", "query", n);
3071
3116
  },
3072
3117
  GetEstimatedShopifyCartLineItemPoint(n, r) {
3073
- return t((i) => e.request(rn, n, { ...r, ...i }), "GetEstimatedShopifyCartLineItemPoint", "query", n);
3118
+ return t((i) => e.request(sn, n, { ...r, ...i }), "GetEstimatedShopifyCartLineItemPoint", "query", n);
3074
3119
  },
3075
3120
  PurchasingCustomerSendCustomerSharingActivationCode(n, r) {
3076
- return t((i) => e.request(sn, n, { ...r, ...i }), "PurchasingCustomerSendCustomerSharingActivationCode", "mutation", n);
3121
+ return t((i) => e.request(an, n, { ...r, ...i }), "PurchasingCustomerSendCustomerSharingActivationCode", "mutation", n);
3077
3122
  },
3078
3123
  PurchasingCustomerActivateCustomerSharing(n, r) {
3079
- return t((i) => e.request(an, n, { ...r, ...i }), "PurchasingCustomerActivateCustomerSharing", "mutation", n);
3124
+ return t((i) => e.request(on, n, { ...r, ...i }), "PurchasingCustomerActivateCustomerSharing", "mutation", n);
3125
+ },
3126
+ GetMiles(n, r) {
3127
+ return t((i) => e.request(un, n, { ...r, ...i }), "GetMiles", "query", n);
3128
+ },
3129
+ GetPurchasingCustomerMileChangeActivities(n, r) {
3130
+ return t((i) => e.request(cn, n, { ...r, ...i }), "GetPurchasingCustomerMileChangeActivities", "query", n);
3080
3131
  }
3081
3132
  };
3082
3133
  }
3083
- const ve = JSON, cn = (e) => e.toUpperCase(), ln = (e) => {
3134
+ const ve = JSON, pn = (e) => e.toUpperCase(), hn = (e) => {
3084
3135
  const t = {};
3085
3136
  return e.forEach((n, r) => {
3086
3137
  t[r] = n;
3087
3138
  }), t;
3088
- }, dn = (e, t, n) => e.document ? e : {
3139
+ }, fn = (e, t, n) => e.document ? e : {
3089
3140
  document: e,
3090
3141
  variables: t,
3091
3142
  requestHeaders: n,
3092
3143
  signal: void 0
3093
- }, pn = (e, t, n) => e.query ? e : {
3144
+ }, mn = (e, t, n) => e.query ? e : {
3094
3145
  query: e,
3095
3146
  variables: t,
3096
3147
  requestHeaders: n,
3097
3148
  signal: void 0
3098
- }, hn = (e, t) => e.documents ? e : {
3149
+ }, gn = (e, t) => e.documents ? e : {
3099
3150
  documents: e,
3100
3151
  requestHeaders: t,
3101
3152
  signal: void 0
3102
- }, xe = (e) => {
3153
+ }, Pe = (e) => {
3103
3154
  var r, i;
3104
3155
  let t;
3105
3156
  const n = e.definitions.filter((s) => s.kind === "OperationDefinition");
3106
3157
  return n.length === 1 && (t = (i = (r = n[0]) == null ? void 0 : r.name) == null ? void 0 : i.value), t;
3107
- }, le = (e) => {
3158
+ }, de = (e) => {
3108
3159
  if (typeof e == "string") {
3109
3160
  let n;
3110
3161
  try {
3111
- const r = Ue(e);
3112
- n = xe(r);
3162
+ const r = Me(e);
3163
+ n = Pe(r);
3113
3164
  } catch {
3114
3165
  }
3115
3166
  return { query: e, operationName: n };
3116
3167
  }
3117
- const t = xe(e);
3168
+ const t = Pe(e);
3118
3169
  return { query: kt(e), operationName: t };
3119
3170
  };
3120
3171
  class H extends Error {
@@ -3130,13 +3181,13 @@ class H extends Error {
3130
3181
  return ((r = (n = t.errors) == null ? void 0 : n[0]) == null ? void 0 : r.message) ?? `GraphQL Error (Code: ${t.status})`;
3131
3182
  }
3132
3183
  }
3133
- var fn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
3134
- function mn(e) {
3184
+ var Cn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
3185
+ function yn(e) {
3135
3186
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
3136
3187
  }
3137
3188
  var Ce = { exports: {} };
3138
3189
  (function(e, t) {
3139
- var n = typeof self < "u" ? self : fn, r = function() {
3190
+ var n = typeof self < "u" ? self : Cn, r = function() {
3140
3191
  function s() {
3141
3192
  this.fetch = !1, this.DOMException = n.DOMException;
3142
3193
  }
@@ -3182,56 +3233,56 @@ var Ce = { exports: {} };
3182
3233
  function y(o) {
3183
3234
  return typeof o != "string" && (o = String(o)), o;
3184
3235
  }
3185
- function A(o) {
3186
- var l = {
3236
+ function T(o) {
3237
+ var d = {
3187
3238
  next: function() {
3188
3239
  var E = o.shift();
3189
3240
  return { done: E === void 0, value: E };
3190
3241
  }
3191
3242
  };
3192
- return c.iterable && (l[Symbol.iterator] = function() {
3193
- return l;
3194
- }), l;
3243
+ return c.iterable && (d[Symbol.iterator] = function() {
3244
+ return d;
3245
+ }), d;
3195
3246
  }
3196
3247
  function g(o) {
3197
- this.map = {}, o instanceof g ? o.forEach(function(l, E) {
3198
- this.append(E, l);
3199
- }, this) : Array.isArray(o) ? o.forEach(function(l) {
3200
- this.append(l[0], l[1]);
3201
- }, this) : o && Object.getOwnPropertyNames(o).forEach(function(l) {
3202
- this.append(l, o[l]);
3248
+ this.map = {}, o instanceof g ? o.forEach(function(d, E) {
3249
+ this.append(E, d);
3250
+ }, this) : Array.isArray(o) ? o.forEach(function(d) {
3251
+ this.append(d[0], d[1]);
3252
+ }, this) : o && Object.getOwnPropertyNames(o).forEach(function(d) {
3253
+ this.append(d, o[d]);
3203
3254
  }, this);
3204
3255
  }
3205
- g.prototype.append = function(o, l) {
3206
- o = C(o), l = y(l);
3256
+ g.prototype.append = function(o, d) {
3257
+ o = C(o), d = y(d);
3207
3258
  var E = this.map[o];
3208
- this.map[o] = E ? E + ", " + l : l;
3259
+ this.map[o] = E ? E + ", " + d : d;
3209
3260
  }, g.prototype.delete = function(o) {
3210
3261
  delete this.map[C(o)];
3211
3262
  }, g.prototype.get = function(o) {
3212
3263
  return o = C(o), this.has(o) ? this.map[o] : null;
3213
3264
  }, g.prototype.has = function(o) {
3214
3265
  return this.map.hasOwnProperty(C(o));
3215
- }, g.prototype.set = function(o, l) {
3216
- this.map[C(o)] = y(l);
3217
- }, g.prototype.forEach = function(o, l) {
3266
+ }, g.prototype.set = function(o, d) {
3267
+ this.map[C(o)] = y(d);
3268
+ }, g.prototype.forEach = function(o, d) {
3218
3269
  for (var E in this.map)
3219
- this.map.hasOwnProperty(E) && o.call(l, this.map[E], E, this);
3270
+ this.map.hasOwnProperty(E) && o.call(d, this.map[E], E, this);
3220
3271
  }, g.prototype.keys = function() {
3221
3272
  var o = [];
3222
- return this.forEach(function(l, E) {
3273
+ return this.forEach(function(d, E) {
3223
3274
  o.push(E);
3224
- }), A(o);
3275
+ }), T(o);
3225
3276
  }, g.prototype.values = function() {
3226
3277
  var o = [];
3227
- return this.forEach(function(l) {
3228
- o.push(l);
3229
- }), A(o);
3278
+ return this.forEach(function(d) {
3279
+ o.push(d);
3280
+ }), T(o);
3230
3281
  }, g.prototype.entries = function() {
3231
3282
  var o = [];
3232
- return this.forEach(function(l, E) {
3233
- o.push([E, l]);
3234
- }), A(o);
3283
+ return this.forEach(function(d, E) {
3284
+ o.push([E, d]);
3285
+ }), T(o);
3235
3286
  }, c.iterable && (g.prototype[Symbol.iterator] = g.prototype.entries);
3236
3287
  function I(o) {
3237
3288
  if (o.bodyUsed)
@@ -3239,32 +3290,32 @@ var Ce = { exports: {} };
3239
3290
  o.bodyUsed = !0;
3240
3291
  }
3241
3292
  function O(o) {
3242
- return new Promise(function(l, E) {
3293
+ return new Promise(function(d, E) {
3243
3294
  o.onload = function() {
3244
- l(o.result);
3295
+ d(o.result);
3245
3296
  }, o.onerror = function() {
3246
3297
  E(o.error);
3247
3298
  };
3248
3299
  });
3249
3300
  }
3250
- function P(o) {
3251
- var l = new FileReader(), E = O(l);
3252
- return l.readAsArrayBuffer(o), E;
3301
+ function b(o) {
3302
+ var d = new FileReader(), E = O(d);
3303
+ return d.readAsArrayBuffer(o), E;
3253
3304
  }
3254
3305
  function z(o) {
3255
- var l = new FileReader(), E = O(l);
3256
- return l.readAsText(o), E;
3306
+ var d = new FileReader(), E = O(d);
3307
+ return d.readAsText(o), E;
3257
3308
  }
3258
3309
  function _(o) {
3259
- for (var l = new Uint8Array(o), E = new Array(l.length), b = 0; b < l.length; b++)
3260
- E[b] = String.fromCharCode(l[b]);
3310
+ for (var d = new Uint8Array(o), E = new Array(d.length), x = 0; x < d.length; x++)
3311
+ E[x] = String.fromCharCode(d[x]);
3261
3312
  return E.join("");
3262
3313
  }
3263
3314
  function D(o) {
3264
3315
  if (o.slice)
3265
3316
  return o.slice(0);
3266
- var l = new Uint8Array(o.byteLength);
3267
- return l.set(new Uint8Array(o)), l.buffer;
3317
+ var d = new Uint8Array(o.byteLength);
3318
+ return d.set(new Uint8Array(o)), d.buffer;
3268
3319
  }
3269
3320
  function B() {
3270
3321
  return this.bodyUsed = !1, this._initBody = function(o) {
@@ -3281,7 +3332,7 @@ var Ce = { exports: {} };
3281
3332
  throw new Error("could not read FormData body as blob");
3282
3333
  return Promise.resolve(new Blob([this._bodyText]));
3283
3334
  }, this.arrayBuffer = function() {
3284
- return this._bodyArrayBuffer ? I(this) || Promise.resolve(this._bodyArrayBuffer) : this.blob().then(P);
3335
+ return this._bodyArrayBuffer ? I(this) || Promise.resolve(this._bodyArrayBuffer) : this.blob().then(b);
3285
3336
  }), this.text = function() {
3286
3337
  var o = I(this);
3287
3338
  if (o)
@@ -3301,19 +3352,19 @@ var Ce = { exports: {} };
3301
3352
  }
3302
3353
  var J = ["DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT"];
3303
3354
  function Q(o) {
3304
- var l = o.toUpperCase();
3305
- return J.indexOf(l) > -1 ? l : o;
3355
+ var d = o.toUpperCase();
3356
+ return J.indexOf(d) > -1 ? d : o;
3306
3357
  }
3307
- function w(o, l) {
3308
- l = l || {};
3309
- var E = l.body;
3358
+ function w(o, d) {
3359
+ d = d || {};
3360
+ var E = d.body;
3310
3361
  if (o instanceof w) {
3311
3362
  if (o.bodyUsed)
3312
3363
  throw new TypeError("Already read");
3313
- this.url = o.url, this.credentials = o.credentials, l.headers || (this.headers = new g(o.headers)), this.method = o.method, this.mode = o.mode, this.signal = o.signal, !E && o._bodyInit != null && (E = o._bodyInit, o.bodyUsed = !0);
3364
+ this.url = o.url, this.credentials = o.credentials, d.headers || (this.headers = new g(o.headers)), this.method = o.method, this.mode = o.mode, this.signal = o.signal, !E && o._bodyInit != null && (E = o._bodyInit, o.bodyUsed = !0);
3314
3365
  } else
3315
3366
  this.url = String(o);
3316
- if (this.credentials = l.credentials || this.credentials || "same-origin", (l.headers || !this.headers) && (this.headers = new g(l.headers)), this.method = Q(l.method || this.method || "GET"), this.mode = l.mode || this.mode || null, this.signal = l.signal || this.signal, this.referrer = null, (this.method === "GET" || this.method === "HEAD") && E)
3367
+ if (this.credentials = d.credentials || this.credentials || "same-origin", (d.headers || !this.headers) && (this.headers = new g(d.headers)), this.method = Q(d.method || this.method || "GET"), this.mode = d.mode || this.mode || null, this.signal = d.signal || this.signal, this.referrer = null, (this.method === "GET" || this.method === "HEAD") && E)
3317
3368
  throw new TypeError("Body not allowed for GET or HEAD requests");
3318
3369
  this._initBody(E);
3319
3370
  }
@@ -3321,27 +3372,27 @@ var Ce = { exports: {} };
3321
3372
  return new w(this, { body: this._bodyInit });
3322
3373
  };
3323
3374
  function Ve(o) {
3324
- var l = new FormData();
3375
+ var d = new FormData();
3325
3376
  return o.trim().split("&").forEach(function(E) {
3326
3377
  if (E) {
3327
- var b = E.split("="), R = b.shift().replace(/\+/g, " "), T = b.join("=").replace(/\+/g, " ");
3328
- l.append(decodeURIComponent(R), decodeURIComponent(T));
3378
+ var x = E.split("="), P = x.shift().replace(/\+/g, " "), A = x.join("=").replace(/\+/g, " ");
3379
+ d.append(decodeURIComponent(P), decodeURIComponent(A));
3329
3380
  }
3330
- }), l;
3381
+ }), d;
3331
3382
  }
3332
3383
  function $e(o) {
3333
- var l = new g(), E = o.replace(/\r?\n[\t ]+/g, " ");
3334
- return E.split(/\r?\n/).forEach(function(b) {
3335
- var R = b.split(":"), T = R.shift().trim();
3336
- if (T) {
3337
- var X = R.join(":").trim();
3338
- l.append(T, X);
3384
+ var d = new g(), E = o.replace(/\r?\n[\t ]+/g, " ");
3385
+ return E.split(/\r?\n/).forEach(function(x) {
3386
+ var P = x.split(":"), A = P.shift().trim();
3387
+ if (A) {
3388
+ var X = P.join(":").trim();
3389
+ d.append(A, X);
3339
3390
  }
3340
- }), l;
3391
+ }), d;
3341
3392
  }
3342
3393
  B.call(w.prototype);
3343
- function L(o, l) {
3344
- l || (l = {}), this.type = "default", this.status = l.status === void 0 ? 200 : l.status, this.ok = this.status >= 200 && this.status < 300, this.statusText = "statusText" in l ? l.statusText : "OK", this.headers = new g(l.headers), this.url = l.url || "", this._initBody(o);
3394
+ function L(o, d) {
3395
+ d || (d = {}), this.type = "default", this.status = d.status === void 0 ? 200 : d.status, this.ok = this.status >= 200 && this.status < 300, this.statusText = "statusText" in d ? d.statusText : "OK", this.headers = new g(d.headers), this.url = d.url || "", this._initBody(o);
3345
3396
  }
3346
3397
  B.call(L.prototype), L.prototype.clone = function() {
3347
3398
  return new L(this._bodyInit, {
@@ -3355,49 +3406,49 @@ var Ce = { exports: {} };
3355
3406
  return o.type = "error", o;
3356
3407
  };
3357
3408
  var je = [301, 302, 303, 307, 308];
3358
- L.redirect = function(o, l) {
3359
- if (je.indexOf(l) === -1)
3409
+ L.redirect = function(o, d) {
3410
+ if (je.indexOf(d) === -1)
3360
3411
  throw new RangeError("Invalid status code");
3361
- return new L(null, { status: l, headers: { location: o } });
3412
+ return new L(null, { status: d, headers: { location: o } });
3362
3413
  }, a.DOMException = s.DOMException;
3363
3414
  try {
3364
3415
  new a.DOMException();
3365
3416
  } catch {
3366
- a.DOMException = function(l, E) {
3367
- this.message = l, this.name = E;
3368
- var b = Error(l);
3369
- this.stack = b.stack;
3417
+ a.DOMException = function(d, E) {
3418
+ this.message = d, this.name = E;
3419
+ var x = Error(d);
3420
+ this.stack = x.stack;
3370
3421
  }, a.DOMException.prototype = Object.create(Error.prototype), a.DOMException.prototype.constructor = a.DOMException;
3371
3422
  }
3372
- function oe(o, l) {
3373
- return new Promise(function(E, b) {
3374
- var R = new w(o, l);
3375
- if (R.signal && R.signal.aborted)
3376
- return b(new a.DOMException("Aborted", "AbortError"));
3377
- var T = new XMLHttpRequest();
3423
+ function oe(o, d) {
3424
+ return new Promise(function(E, x) {
3425
+ var P = new w(o, d);
3426
+ if (P.signal && P.signal.aborted)
3427
+ return x(new a.DOMException("Aborted", "AbortError"));
3428
+ var A = new XMLHttpRequest();
3378
3429
  function X() {
3379
- T.abort();
3430
+ A.abort();
3380
3431
  }
3381
- T.onload = function() {
3432
+ A.onload = function() {
3382
3433
  var V = {
3383
- status: T.status,
3384
- statusText: T.statusText,
3385
- headers: $e(T.getAllResponseHeaders() || "")
3434
+ status: A.status,
3435
+ statusText: A.statusText,
3436
+ headers: $e(A.getAllResponseHeaders() || "")
3386
3437
  };
3387
- V.url = "responseURL" in T ? T.responseURL : V.headers.get("X-Request-URL");
3388
- var ue = "response" in T ? T.response : T.responseText;
3438
+ V.url = "responseURL" in A ? A.responseURL : V.headers.get("X-Request-URL");
3439
+ var ue = "response" in A ? A.response : A.responseText;
3389
3440
  E(new L(ue, V));
3390
- }, T.onerror = function() {
3391
- b(new TypeError("Network request failed"));
3392
- }, T.ontimeout = function() {
3393
- b(new TypeError("Network request failed"));
3394
- }, T.onabort = function() {
3395
- b(new a.DOMException("Aborted", "AbortError"));
3396
- }, T.open(R.method, R.url, !0), R.credentials === "include" ? T.withCredentials = !0 : R.credentials === "omit" && (T.withCredentials = !1), "responseType" in T && c.blob && (T.responseType = "blob"), R.headers.forEach(function(V, ue) {
3397
- T.setRequestHeader(ue, V);
3398
- }), R.signal && (R.signal.addEventListener("abort", X), T.onreadystatechange = function() {
3399
- T.readyState === 4 && R.signal.removeEventListener("abort", X);
3400
- }), T.send(typeof R._bodyInit > "u" ? null : R._bodyInit);
3441
+ }, A.onerror = function() {
3442
+ x(new TypeError("Network request failed"));
3443
+ }, A.ontimeout = function() {
3444
+ x(new TypeError("Network request failed"));
3445
+ }, A.onabort = function() {
3446
+ x(new a.DOMException("Aborted", "AbortError"));
3447
+ }, A.open(P.method, P.url, !0), P.credentials === "include" ? A.withCredentials = !0 : P.credentials === "omit" && (A.withCredentials = !1), "responseType" in A && c.blob && (A.responseType = "blob"), P.headers.forEach(function(V, ue) {
3448
+ A.setRequestHeader(ue, V);
3449
+ }), P.signal && (P.signal.addEventListener("abort", X), A.onreadystatechange = function() {
3450
+ A.readyState === 4 && P.signal.removeEventListener("abort", X);
3451
+ }), A.send(typeof P._bodyInit > "u" ? null : P._bodyInit);
3401
3452
  });
3402
3453
  }
3403
3454
  return oe.polyfill = !0, s.fetch || (s.fetch = oe, s.Headers = g, s.Request = w, s.Response = L), a.Headers = g, a.Request = w, a.Response = L, a.fetch = oe, Object.defineProperty(a, "__esModule", { value: !0 }), a;
@@ -3407,30 +3458,30 @@ var Ce = { exports: {} };
3407
3458
  t = i.fetch, t.default = i.fetch, t.fetch = i.fetch, t.Headers = i.Headers, t.Request = i.Request, t.Response = i.Response, e.exports = t;
3408
3459
  })(Ce, Ce.exports);
3409
3460
  var re = Ce.exports;
3410
- const te = /* @__PURE__ */ mn(re), gn = /* @__PURE__ */ ze({
3461
+ const te = /* @__PURE__ */ yn(re), En = /* @__PURE__ */ ze({
3411
3462
  __proto__: null,
3412
3463
  default: te
3413
- }, [re]), U = (e) => {
3464
+ }, [re]), M = (e) => {
3414
3465
  let t = {};
3415
- return e && (typeof Headers < "u" && e instanceof Headers || gn && re.Headers && e instanceof re.Headers ? t = ln(e) : Array.isArray(e) ? e.forEach(([n, r]) => {
3466
+ return e && (typeof Headers < "u" && e instanceof Headers || En && re.Headers && e instanceof re.Headers ? t = hn(e) : Array.isArray(e) ? e.forEach(([n, r]) => {
3416
3467
  n && r !== void 0 && (t[n] = r);
3417
3468
  }) : t = e), t;
3418
- }, be = (e) => e.replace(/([\s,]|#[^\n\r]+)+/g, " ").trim(), Cn = (e) => {
3469
+ }, xe = (e) => e.replace(/([\s,]|#[^\n\r]+)+/g, " ").trim(), vn = (e) => {
3419
3470
  if (!Array.isArray(e.query)) {
3420
- const r = e, i = [`query=${encodeURIComponent(be(r.query))}`];
3471
+ const r = e, i = [`query=${encodeURIComponent(xe(r.query))}`];
3421
3472
  return e.variables && i.push(`variables=${encodeURIComponent(r.jsonSerializer.stringify(r.variables))}`), r.operationName && i.push(`operationName=${encodeURIComponent(r.operationName)}`), i.join("&");
3422
3473
  }
3423
3474
  if (typeof e.variables < "u" && !Array.isArray(e.variables))
3424
3475
  throw new Error("Cannot create query with given variable type, array expected");
3425
3476
  const t = e, n = e.query.reduce((r, i, s) => (r.push({
3426
- query: be(i),
3477
+ query: xe(i),
3427
3478
  variables: t.variables ? t.jsonSerializer.stringify(t.variables[s]) : void 0
3428
3479
  }), r), []);
3429
3480
  return `query=${encodeURIComponent(t.jsonSerializer.stringify(n))}`;
3430
- }, yn = (e) => async (t) => {
3481
+ }, An = (e) => async (t) => {
3431
3482
  const { url: n, query: r, variables: i, operationName: s, fetch: a, fetchOptions: c, middleware: p } = t, h = { ...t.headers };
3432
3483
  let m = "", C;
3433
- e === "POST" ? (C = vn(r, i, s, c.jsonSerializer), typeof C == "string" && (h["Content-Type"] = "application/json")) : m = Cn({
3484
+ e === "POST" ? (C = In(r, i, s, c.jsonSerializer), typeof C == "string" && (h["Content-Type"] = "application/json")) : m = vn({
3434
3485
  query: r,
3435
3486
  variables: i,
3436
3487
  operationName: s,
@@ -3442,31 +3493,31 @@ const te = /* @__PURE__ */ mn(re), gn = /* @__PURE__ */ ze({
3442
3493
  body: C,
3443
3494
  ...c
3444
3495
  };
3445
- let A = n, g = y;
3496
+ let T = n, g = y;
3446
3497
  if (p) {
3447
- const I = await Promise.resolve(p({ ...y, url: n, operationName: s, variables: i })), { url: O, ...P } = I;
3448
- A = O, g = P;
3498
+ const I = await Promise.resolve(p({ ...y, url: n, operationName: s, variables: i })), { url: O, ...b } = I;
3499
+ T = O, g = b;
3449
3500
  }
3450
- return m && (A = `${A}?${m}`), await a(A, g);
3501
+ return m && (T = `${T}?${m}`), await a(T, g);
3451
3502
  };
3452
- class En {
3503
+ class Tn {
3453
3504
  constructor(t, n = {}) {
3454
3505
  this.url = t, this.requestConfig = n, this.rawRequest = async (...r) => {
3455
- const [i, s, a] = r, c = pn(i, s, a), { headers: p, fetch: h = te, method: m = "POST", requestMiddleware: C, responseMiddleware: y, ...A } = this.requestConfig, { url: g } = this;
3456
- c.signal !== void 0 && (A.signal = c.signal);
3457
- const { operationName: I } = le(c.query);
3458
- return de({
3506
+ const [i, s, a] = r, c = mn(i, s, a), { headers: p, fetch: h = te, method: m = "POST", requestMiddleware: C, responseMiddleware: y, ...T } = this.requestConfig, { url: g } = this;
3507
+ c.signal !== void 0 && (T.signal = c.signal);
3508
+ const { operationName: I } = de(c.query);
3509
+ return le({
3459
3510
  url: g,
3460
3511
  query: c.query,
3461
3512
  variables: c.variables,
3462
3513
  headers: {
3463
- ...U(pe(p)),
3464
- ...U(c.requestHeaders)
3514
+ ...M(pe(p)),
3515
+ ...M(c.requestHeaders)
3465
3516
  },
3466
3517
  operationName: I,
3467
3518
  fetch: h,
3468
3519
  method: m,
3469
- fetchOptions: A,
3520
+ fetchOptions: T,
3470
3521
  middleware: C
3471
3522
  }).then((O) => (y && y(O), O)).catch((O) => {
3472
3523
  throw y && y(O), O;
@@ -3474,16 +3525,16 @@ class En {
3474
3525
  };
3475
3526
  }
3476
3527
  async request(t, ...n) {
3477
- const [r, i] = n, s = dn(t, r, i), { headers: a, fetch: c = te, method: p = "POST", requestMiddleware: h, responseMiddleware: m, ...C } = this.requestConfig, { url: y } = this;
3528
+ const [r, i] = n, s = fn(t, r, i), { headers: a, fetch: c = te, method: p = "POST", requestMiddleware: h, responseMiddleware: m, ...C } = this.requestConfig, { url: y } = this;
3478
3529
  s.signal !== void 0 && (C.signal = s.signal);
3479
- const { query: A, operationName: g } = le(s.document);
3480
- return de({
3530
+ const { query: T, operationName: g } = de(s.document);
3531
+ return le({
3481
3532
  url: y,
3482
- query: A,
3533
+ query: T,
3483
3534
  variables: s.variables,
3484
3535
  headers: {
3485
- ...U(pe(a)),
3486
- ...U(s.requestHeaders)
3536
+ ...M(pe(a)),
3537
+ ...M(s.requestHeaders)
3487
3538
  },
3488
3539
  operationName: g,
3489
3540
  fetch: c,
@@ -3496,17 +3547,17 @@ class En {
3496
3547
  }
3497
3548
  // prettier-ignore
3498
3549
  batchRequests(t, n) {
3499
- const r = hn(t, n), { headers: i, ...s } = this.requestConfig;
3550
+ const r = gn(t, n), { headers: i, ...s } = this.requestConfig;
3500
3551
  r.signal !== void 0 && (s.signal = r.signal);
3501
- const a = r.documents.map(({ document: p }) => le(p).query), c = r.documents.map(({ variables: p }) => p);
3502
- return de({
3552
+ const a = r.documents.map(({ document: p }) => de(p).query), c = r.documents.map(({ variables: p }) => p);
3553
+ return le({
3503
3554
  url: this.url,
3504
3555
  query: a,
3505
3556
  // @ts-expect-error TODO reconcile batch variables into system.
3506
3557
  variables: c,
3507
3558
  headers: {
3508
- ...U(pe(i)),
3509
- ...U(r.requestHeaders)
3559
+ ...M(pe(i)),
3560
+ ...M(r.requestHeaders)
3510
3561
  },
3511
3562
  operationName: void 0,
3512
3563
  fetch: this.requestConfig.fetch ?? te,
@@ -3534,8 +3585,8 @@ class En {
3534
3585
  return this.url = t, this;
3535
3586
  }
3536
3587
  }
3537
- const de = async (e) => {
3538
- const { query: t, variables: n, fetchOptions: r } = e, i = yn(cn(e.method ?? "post")), s = Array.isArray(e.query), a = await i(e), c = await Tn(a, r.jsonSerializer ?? ve), p = Array.isArray(c) ? !c.some(({ data: m }) => !m) : !!c.data, h = Array.isArray(c) || !c.errors || Array.isArray(c.errors) && !c.errors.length || r.errorPolicy === "all" || r.errorPolicy === "ignore";
3588
+ const le = async (e) => {
3589
+ const { query: t, variables: n, fetchOptions: r } = e, i = An(pn(e.method ?? "post")), s = Array.isArray(e.query), a = await i(e), c = await Sn(a, r.jsonSerializer ?? ve), p = Array.isArray(c) ? !c.some(({ data: m }) => !m) : !!c.data, h = Array.isArray(c) || !c.errors || Array.isArray(c.errors) && !c.errors.length || r.errorPolicy === "all" || r.errorPolicy === "ignore";
3539
3590
  if (a.ok && h && p) {
3540
3591
  const { errors: m, ...C } = (Array.isArray(c), c), y = r.errorPolicy === "ignore" ? C : c;
3541
3592
  return {
@@ -3553,7 +3604,7 @@ const de = async (e) => {
3553
3604
  { query: t, variables: n }
3554
3605
  );
3555
3606
  }
3556
- }, vn = (e, t, n, r) => {
3607
+ }, In = (e, t, n, r) => {
3557
3608
  const i = r ?? ve;
3558
3609
  if (!Array.isArray(e))
3559
3610
  return i.stringify({ query: e, variables: t, operationName: n });
@@ -3561,18 +3612,18 @@ const de = async (e) => {
3561
3612
  throw new Error("Cannot create request body with given variable type, array expected");
3562
3613
  const s = e.reduce((a, c, p) => (a.push({ query: c, variables: t ? t[p] : void 0 }), a), []);
3563
3614
  return i.stringify(s);
3564
- }, Tn = async (e, t) => {
3615
+ }, Sn = async (e, t) => {
3565
3616
  let n;
3566
3617
  return e.headers.forEach((r, i) => {
3567
3618
  i.toLowerCase() === "content-type" && (n = r);
3568
3619
  }), n && (n.toLowerCase().startsWith("application/json") || n.toLowerCase().startsWith("application/graphql+json") || n.toLowerCase().startsWith("application/graphql-response+json")) ? t.parse(await e.text()) : e.text();
3569
3620
  }, pe = (e) => typeof e == "function" ? e() : e;
3570
- var An = /* @__PURE__ */ ((e) => (e.Eur = "EUR", e.Jpy = "JPY", e.Usd = "USD", e))(An || {}), In = /* @__PURE__ */ ((e) => (e.Retail = "RETAIL", e.Warehouse = "WAREHOUSE", e))(In || {});
3571
- class Nn {
3621
+ var Rn = /* @__PURE__ */ ((e) => (e.Eur = "EUR", e.Jpy = "JPY", e.Usd = "USD", e))(Rn || {}), Nn = /* @__PURE__ */ ((e) => (e.Retail = "RETAIL", e.Warehouse = "WAREHOUSE", e))(Nn || {});
3622
+ class xn {
3572
3623
  constructor(t) {
3573
- Te(this, "api");
3574
- this.api = un(
3575
- new En(`${t}/apps/sq-api`, {
3624
+ Ae(this, "api");
3625
+ this.api = ln(
3626
+ new Tn(`${t}/apps/sq-api`, {
3576
3627
  headers: {
3577
3628
  "X-SQ-CLIENT": "ShopifyAppProxy"
3578
3629
  }
@@ -3928,6 +3979,17 @@ class Nn {
3928
3979
  }
3929
3980
  } : null;
3930
3981
  }
3982
+ /**
3983
+ * getHasBackOrderProductVariants はIDで指定した商品が持つ商品バリエーションに1つでも予約販売設定がされている場合trueを返します。
3984
+ * 指定したIDの商品が存在しない場合はnullを返します。
3985
+ * @param {string} [productShopifyLegacyResourceID] 商品のShopifyLegacyResourceID(gid://shopify/Product/xxxのxxxの部分)
3986
+ */
3987
+ async getHasBackOrderProductVariants(t) {
3988
+ const n = await this.api.GetHasBackOrderProductVariantsByProductShopifyLegacyResourceID({
3989
+ id: t
3990
+ });
3991
+ return n.productByProductShopifyLegacyResourceID ? n.productByProductShopifyLegacyResourceID.hasBackOrderProductVariants : null;
3992
+ }
3931
3993
  async getPointCampaignOrderRuleTargetCustomerRank() {
3932
3994
  const t = await this.api.GetPointCampaignOrderRuleTargetCustomerRank();
3933
3995
  return t.pointCampaignOrderRuleTargetCustomerRank ? {
@@ -4025,9 +4087,51 @@ class Nn {
4025
4087
  }
4026
4088
  } : null;
4027
4089
  }
4090
+ /**
4091
+ * getMiles は、Miles は SDK から取得できるマイルの情報を返します。
4092
+ */
4093
+ async getMiles() {
4094
+ const t = await this.api.GetMiles();
4095
+ return t.purchasingCustomer ? {
4096
+ miles: t.purchasingCustomer.miles
4097
+ } : null;
4098
+ }
4099
+ /**
4100
+ * getMileChangeActivities は購入者のマイル変動履歴を返します。
4101
+ *
4102
+ * @param {number} [first] 取得してくる個数。デフォルトは250。
4103
+ * @param {string} [after] ページングの値。指定しない場合先頭から取得してくる。
4104
+ * @param {boolean} [isReverse] 並び順。デフォルトはfalse。
4105
+ * @param {MileChangeActivitySortKey} [sortKeys] ソートキー。CREATED_ATかMILE_CHANGE_CREATED_ATを渡す。デフォルトはCREATED_AT。
4106
+ */
4107
+ async getMileChangeActivities(t, n, r, i) {
4108
+ const s = await this.api.GetPurchasingCustomerMileChangeActivities({
4109
+ first: t,
4110
+ after: n,
4111
+ isReverse: r,
4112
+ sortKeys: i
4113
+ });
4114
+ return s.purchasingCustomer ? {
4115
+ nodes: s.purchasingCustomer.mileChangeActivities.nodes.map(
4116
+ (a) => ({
4117
+ id: a.id,
4118
+ title: a.title,
4119
+ mileChange: {
4120
+ id: a.mileChange.id,
4121
+ delta: a.mileChange.delta,
4122
+ mileChangeCreatedAt: new Date(
4123
+ a.mileChange.mileChangeCreatedAt
4124
+ ),
4125
+ createdAt: new Date(a.mileChange.createdAt)
4126
+ }
4127
+ })
4128
+ ),
4129
+ pageInfo: s.purchasingCustomer.mileChangeActivities.pageInfo
4130
+ } : null;
4131
+ }
4028
4132
  }
4029
4133
  export {
4030
- An as CurrencyCode,
4031
- In as LocationType,
4032
- Nn as SDK
4134
+ Rn as CurrencyCode,
4135
+ Nn as LocationType,
4136
+ xn as SDK
4033
4137
  };