@builtbystack/sq-shopify-theme-sdk 0.0.32 → 0.0.33

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.
@@ -54,12 +54,12 @@ function he(e, t) {
54
54
  };
55
55
  }
56
56
  function Ke(e) {
57
- return Pe(
57
+ return Ne(
58
58
  e.source,
59
59
  he(e.source, e.start)
60
60
  );
61
61
  }
62
- function Pe(e, t) {
62
+ function Ne(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
  `, f = r.split(/\r\n|[\n\r]/g), C = f[i];
65
65
  if (C.length > 120) {
@@ -139,10 +139,10 @@ class ye extends Error {
139
139
  constructor(t, ...n) {
140
140
  var r, i, s;
141
141
  const { nodes: a, source: c, positions: p, path: h, originalError: f, extensions: C } = Ze(n);
142
- super(t), this.name = "GraphQLError", this.path = h ?? void 0, this.originalError = f ?? void 0, this.nodes = Te(
142
+ super(t), this.name = "GraphQLError", this.path = h ?? void 0, this.originalError = f ?? void 0, this.nodes = Se(
143
143
  Array.isArray(a) ? a : a ? [a] : void 0
144
144
  );
145
- const y = Te(
145
+ const y = Se(
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));
@@ -193,7 +193,7 @@ class ye extends Error {
193
193
  for (const n of this.locations)
194
194
  t += `
195
195
 
196
- ` + Pe(this.source, n);
196
+ ` + Ne(this.source, n);
197
197
  return t;
198
198
  }
199
199
  toJSON() {
@@ -203,10 +203,10 @@ class ye extends Error {
203
203
  return this.locations != null && (t.locations = this.locations), this.path != null && (t.path = this.path), this.extensions != null && Object.keys(this.extensions).length > 0 && (t.extensions = this.extensions), t;
204
204
  }
205
205
  }
206
- function Te(e) {
206
+ function Se(e) {
207
207
  return e === void 0 || e.length === 0 ? void 0 : e;
208
208
  }
209
- function R(e, t, n) {
209
+ function P(e, t, n) {
210
210
  return new ye(`Syntax Error: ${n}`, {
211
211
  source: e,
212
212
  positions: [t]
@@ -358,7 +358,7 @@ const be = {
358
358
  EnumTypeExtension: ["name", "directives", "values"],
359
359
  InputObjectTypeExtension: ["name", "directives", "fields"]
360
360
  }, et = new Set(Object.keys(be));
361
- function xe(e) {
361
+ function Te(e) {
362
362
  const t = e == null ? void 0 : e.kind;
363
363
  return typeof t == "string" && et.has(t);
364
364
  }
@@ -481,7 +481,7 @@ function Le(e) {
481
481
  function we(e) {
482
482
  return e >= 56320 && e <= 57343;
483
483
  }
484
- function F(e, t) {
484
+ function M(e, t) {
485
485
  const n = e.source.body.codePointAt(t);
486
486
  if (n === void 0)
487
487
  return u.EOF;
@@ -491,7 +491,7 @@ function F(e, t) {
491
491
  }
492
492
  return "U+" + n.toString(16).toUpperCase().padStart(4, "0");
493
493
  }
494
- function S(e, t, n, r, i) {
494
+ function x(e, t, n, r, i) {
495
495
  const s = e.line, a = 1 + n - e.lineStart;
496
496
  return new De(t, n, r, s, a, i);
497
497
  }
@@ -516,35 +516,35 @@ function ot(e, t) {
516
516
  case 35:
517
517
  return ut(e, i);
518
518
  case 33:
519
- return S(e, u.BANG, i, i + 1);
519
+ return x(e, u.BANG, i, i + 1);
520
520
  case 36:
521
- return S(e, u.DOLLAR, i, i + 1);
521
+ return x(e, u.DOLLAR, i, i + 1);
522
522
  case 38:
523
- return S(e, u.AMP, i, i + 1);
523
+ return x(e, u.AMP, i, i + 1);
524
524
  case 40:
525
- return S(e, u.PAREN_L, i, i + 1);
525
+ return x(e, u.PAREN_L, i, i + 1);
526
526
  case 41:
527
- return S(e, u.PAREN_R, i, i + 1);
527
+ return x(e, u.PAREN_R, i, i + 1);
528
528
  case 46:
529
529
  if (n.charCodeAt(i + 1) === 46 && n.charCodeAt(i + 2) === 46)
530
- return S(e, u.SPREAD, i, i + 3);
530
+ return x(e, u.SPREAD, i, i + 3);
531
531
  break;
532
532
  case 58:
533
- return S(e, u.COLON, i, i + 1);
533
+ return x(e, u.COLON, i, i + 1);
534
534
  case 61:
535
- return S(e, u.EQUALS, i, i + 1);
535
+ return x(e, u.EQUALS, i, i + 1);
536
536
  case 64:
537
- return S(e, u.AT, i, i + 1);
537
+ return x(e, u.AT, i, i + 1);
538
538
  case 91:
539
- return S(e, u.BRACKET_L, i, i + 1);
539
+ return x(e, u.BRACKET_L, i, i + 1);
540
540
  case 93:
541
- return S(e, u.BRACKET_R, i, i + 1);
541
+ return x(e, u.BRACKET_R, i, i + 1);
542
542
  case 123:
543
- return S(e, u.BRACE_L, i, i + 1);
543
+ return x(e, u.BRACE_L, i, i + 1);
544
544
  case 124:
545
- return S(e, u.PIPE, i, i + 1);
545
+ return x(e, u.PIPE, i, i + 1);
546
546
  case 125:
547
- return S(e, u.BRACE_R, i, i + 1);
547
+ return x(e, u.BRACE_R, i, i + 1);
548
548
  case 34:
549
549
  return n.charCodeAt(i + 1) === 34 && n.charCodeAt(i + 2) === 34 ? mt(e, i) : lt(e, i);
550
550
  }
@@ -552,13 +552,13 @@ function ot(e, t) {
552
552
  return ct(e, i, s);
553
553
  if (_e(s))
554
554
  return ft(e, i);
555
- throw R(
555
+ throw P(
556
556
  e.source,
557
557
  i,
558
- s === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : G(s) || se(n, i) ? `Unexpected character: ${F(e, i)}.` : `Invalid character: ${F(e, i)}.`
558
+ s === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : G(s) || se(n, i) ? `Unexpected character: ${M(e, i)}.` : `Invalid character: ${M(e, i)}.`
559
559
  );
560
560
  }
561
- return S(e, u.EOF, r, r);
561
+ return x(e, u.EOF, r, r);
562
562
  }
563
563
  function ut(e, t) {
564
564
  const n = e.source.body, r = n.length;
@@ -574,7 +574,7 @@ function ut(e, t) {
574
574
  else
575
575
  break;
576
576
  }
577
- return S(
577
+ return x(
578
578
  e,
579
579
  u.COMMENT,
580
580
  t,
@@ -587,10 +587,10 @@ function ct(e, t, n) {
587
587
  let i = t, s = n, a = !1;
588
588
  if (s === 45 && (s = r.charCodeAt(++i)), s === 48) {
589
589
  if (s = r.charCodeAt(++i), Y(s))
590
- throw R(
590
+ throw P(
591
591
  e.source,
592
592
  i,
593
- `Invalid number, unexpected digit after 0: ${F(
593
+ `Invalid number, unexpected digit after 0: ${M(
594
594
  e,
595
595
  i
596
596
  )}.`
@@ -598,15 +598,15 @@ function ct(e, t, n) {
598
598
  } else
599
599
  i = ce(e, i, s), s = r.charCodeAt(i);
600
600
  if (s === 46 && (a = !0, s = r.charCodeAt(++i), i = ce(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 = ce(e, i, s), s = r.charCodeAt(i)), s === 46 || _e(s))
601
- throw R(
601
+ throw P(
602
602
  e.source,
603
603
  i,
604
- `Invalid number, expected digit but got: ${F(
604
+ `Invalid number, expected digit but got: ${M(
605
605
  e,
606
606
  i
607
607
  )}.`
608
608
  );
609
- return S(
609
+ return x(
610
610
  e,
611
611
  a ? u.FLOAT : u.INT,
612
612
  t,
@@ -616,10 +616,10 @@ function ct(e, t, n) {
616
616
  }
617
617
  function ce(e, t, n) {
618
618
  if (!Y(n))
619
- throw R(
619
+ throw P(
620
620
  e.source,
621
621
  t,
622
- `Invalid number, expected digit but got: ${F(
622
+ `Invalid number, expected digit but got: ${M(
623
623
  e,
624
624
  t
625
625
  )}.`
@@ -636,7 +636,7 @@ function lt(e, t) {
636
636
  for (; i < r; ) {
637
637
  const c = n.charCodeAt(i);
638
638
  if (c === 34)
639
- return a += n.slice(s, i), S(e, u.STRING, t, i + 1, a);
639
+ return a += n.slice(s, i), x(e, u.STRING, t, i + 1, a);
640
640
  if (c === 92) {
641
641
  a += n.slice(s, i);
642
642
  const p = n.charCodeAt(i + 1) === 117 ? n.charCodeAt(i + 2) === 123 ? dt(e, i) : pt(e, i) : ht(e, i);
@@ -650,16 +650,16 @@ function lt(e, t) {
650
650
  else if (se(n, i))
651
651
  i += 2;
652
652
  else
653
- throw R(
653
+ throw P(
654
654
  e.source,
655
655
  i,
656
- `Invalid character within String: ${F(
656
+ `Invalid character within String: ${M(
657
657
  e,
658
658
  i
659
659
  )}.`
660
660
  );
661
661
  }
662
- throw R(e.source, i, "Unterminated string.");
662
+ throw P(e.source, i, "Unterminated string.");
663
663
  }
664
664
  function dt(e, t) {
665
665
  const n = e.source.body;
@@ -677,7 +677,7 @@ function dt(e, t) {
677
677
  if (r = r << 4 | j(s), r < 0)
678
678
  break;
679
679
  }
680
- throw R(
680
+ throw P(
681
681
  e.source,
682
682
  t,
683
683
  `Invalid Unicode escape sequence: "${n.slice(
@@ -687,27 +687,27 @@ function dt(e, t) {
687
687
  );
688
688
  }
689
689
  function pt(e, t) {
690
- const n = e.source.body, r = Se(n, t + 2);
690
+ const n = e.source.body, r = xe(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 = Se(n, t + 8);
697
+ const i = xe(n, t + 8);
698
698
  if (we(i))
699
699
  return {
700
700
  value: String.fromCodePoint(r, i),
701
701
  size: 12
702
702
  };
703
703
  }
704
- throw R(
704
+ throw P(
705
705
  e.source,
706
706
  t,
707
707
  `Invalid Unicode escape sequence: "${n.slice(t, t + 6)}".`
708
708
  );
709
709
  }
710
- function Se(e, t) {
710
+ function xe(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) {
@@ -758,7 +758,7 @@ function ht(e, t) {
758
758
  size: 2
759
759
  };
760
760
  }
761
- throw R(
761
+ throw P(
762
762
  e.source,
763
763
  t,
764
764
  `Invalid character escape sequence: "${n.slice(
@@ -775,7 +775,7 @@ function mt(e, t) {
775
775
  const h = n.charCodeAt(s);
776
776
  if (h === 34 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34) {
777
777
  c += n.slice(a, s), p.push(c);
778
- const f = S(
778
+ const f = x(
779
779
  e,
780
780
  u.BLOCK_STRING,
781
781
  t,
@@ -799,16 +799,16 @@ function mt(e, t) {
799
799
  else if (se(n, s))
800
800
  s += 2;
801
801
  else
802
- throw R(
802
+ throw P(
803
803
  e.source,
804
804
  s,
805
- `Invalid character within String: ${F(
805
+ `Invalid character within String: ${M(
806
806
  e,
807
807
  s
808
808
  )}.`
809
809
  );
810
810
  }
811
- throw R(e.source, s, "Unterminated string.");
811
+ throw P(e.source, s, "Unterminated string.");
812
812
  }
813
813
  function ft(e, t) {
814
814
  const n = e.source.body, r = n.length;
@@ -820,7 +820,7 @@ function ft(e, t) {
820
820
  else
821
821
  break;
822
822
  }
823
- return S(
823
+ return x(
824
824
  e,
825
825
  u.NAME,
826
826
  t,
@@ -828,7 +828,7 @@ function ft(e, t) {
828
828
  n.slice(t, i)
829
829
  );
830
830
  }
831
- const gt = 10, Fe = 2;
831
+ const gt = 10, Me = 2;
832
832
  function Ee(e) {
833
833
  return ae(e, []);
834
834
  }
@@ -863,14 +863,14 @@ 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 ? "[" + vt(e) + "]" : "{ " + n.map(
866
+ return n.length === 0 ? "{}" : t.length > Me ? "[" + vt(e) + "]" : "{ " + n.map(
867
867
  ([i, s]) => i + ": " + ae(s, t)
868
868
  ).join(", ") + " }";
869
869
  }
870
870
  function At(e, t) {
871
871
  if (e.length === 0)
872
872
  return "[]";
873
- if (t.length > Fe)
873
+ if (t.length > Me)
874
874
  return "[Array]";
875
875
  const n = Math.min(gt, e.length), r = e.length - n, i = [];
876
876
  for (let s = 0; s < n; ++s)
@@ -919,7 +919,7 @@ spurious results.`);
919
919
  return !1;
920
920
  }
921
921
  );
922
- class Me {
922
+ class Fe {
923
923
  constructor(t, n = "GraphQL request", r = {
924
924
  line: 1,
925
925
  column: 1
@@ -936,15 +936,15 @@ class Me {
936
936
  return "Source";
937
937
  }
938
938
  }
939
- function Tt(e) {
940
- return It(e, Me);
939
+ function St(e) {
940
+ return It(e, Fe);
941
941
  }
942
942
  function Be(e, t) {
943
- return new xt(e, t).parseDocument();
943
+ return new Tt(e, t).parseDocument();
944
944
  }
945
- class xt {
945
+ class Tt {
946
946
  constructor(t, n = {}) {
947
- const r = Tt(t) ? t : new Me(t);
947
+ const r = St(t) ? t : new Fe(t);
948
948
  this._lexer = new st(r), this._options = n, this._tokenCounter = 0;
949
949
  }
950
950
  /**
@@ -1018,7 +1018,7 @@ class xt {
1018
1018
  return this.parseDirectiveDefinition();
1019
1019
  }
1020
1020
  if (t)
1021
- throw R(
1021
+ throw P(
1022
1022
  this._lexer.source,
1023
1023
  this._lexer.token.start,
1024
1024
  "Unexpected description, descriptions are supported only on type definitions."
@@ -1292,7 +1292,7 @@ class xt {
1292
1292
  if (t)
1293
1293
  if (this.expectToken(u.DOLLAR), this._lexer.token.kind === u.NAME) {
1294
1294
  const r = this._lexer.token.value;
1295
- throw R(
1295
+ throw P(
1296
1296
  this._lexer.source,
1297
1297
  n.start,
1298
1298
  `Unexpected variable "$${r}" in constant value.`
@@ -1639,7 +1639,7 @@ class xt {
1639
1639
  */
1640
1640
  parseEnumValueName() {
1641
1641
  if (this._lexer.token.value === "true" || this._lexer.token.value === "false" || this._lexer.token.value === "null")
1642
- throw R(
1642
+ throw P(
1643
1643
  this._lexer.source,
1644
1644
  this._lexer.token.start,
1645
1645
  `${K(
@@ -1932,7 +1932,7 @@ class xt {
1932
1932
  const n = this._lexer.token;
1933
1933
  if (n.kind === t)
1934
1934
  return this.advanceLexer(), n;
1935
- throw R(
1935
+ throw P(
1936
1936
  this._lexer.source,
1937
1937
  n.start,
1938
1938
  `Expected ${qe(t)}, found ${K(n)}.`
@@ -1954,7 +1954,7 @@ class xt {
1954
1954
  if (n.kind === u.NAME && n.value === t)
1955
1955
  this.advanceLexer();
1956
1956
  else
1957
- throw R(
1957
+ throw P(
1958
1958
  this._lexer.source,
1959
1959
  n.start,
1960
1960
  `Expected "${t}", found ${K(n)}.`
@@ -1973,7 +1973,7 @@ class xt {
1973
1973
  */
1974
1974
  unexpected(t) {
1975
1975
  const n = t ?? this._lexer.token;
1976
- return R(
1976
+ return P(
1977
1977
  this._lexer.source,
1978
1978
  n.start,
1979
1979
  `Unexpected ${K(n)}.`
@@ -2036,7 +2036,7 @@ class xt {
2036
2036
  advanceLexer() {
2037
2037
  const { maxTokens: t } = this._options, n = this._lexer.advance();
2038
2038
  if (t !== void 0 && n.kind !== u.EOF && (++this._tokenCounter, this._tokenCounter > t))
2039
- throw R(
2039
+ throw P(
2040
2040
  this._lexer.source,
2041
2041
  n.start,
2042
2042
  `Document contains more that ${t} tokens. Parsing aborted.`
@@ -2050,14 +2050,14 @@ function K(e) {
2050
2050
  function qe(e) {
2051
2051
  return at(e) ? `"${e}"` : e;
2052
2052
  }
2053
- function St(e) {
2054
- return `"${e.replace(Rt, Ot)}"`;
2053
+ function xt(e) {
2054
+ return `"${e.replace(Pt, Rt)}"`;
2055
2055
  }
2056
- const Rt = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g;
2057
- function Ot(e) {
2058
- return Nt[e.charCodeAt(0)];
2056
+ const Pt = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g;
2057
+ function Rt(e) {
2058
+ return Ot[e.charCodeAt(0)];
2059
2059
  }
2060
- const Nt = [
2060
+ const Ot = [
2061
2061
  "\\u0000",
2062
2062
  "\\u0001",
2063
2063
  "\\u0002",
@@ -2223,7 +2223,7 @@ const Nt = [
2223
2223
  "\\u009D",
2224
2224
  "\\u009E",
2225
2225
  "\\u009F"
2226
- ], Pt = Object.freeze({});
2226
+ ], Nt = Object.freeze({});
2227
2227
  function Dt(e, t, n = be) {
2228
2228
  const r = /* @__PURE__ */ new Map();
2229
2229
  for (const D of Object.values(m))
@@ -2238,8 +2238,8 @@ function Dt(e, t, n = be) {
2238
2238
  if (s) {
2239
2239
  h = h.slice();
2240
2240
  let b = 0;
2241
- for (const [M, J] of p) {
2242
- const Q = M - b;
2241
+ for (const [F, J] of p) {
2242
+ const Q = F - b;
2243
2243
  J === null ? (h.splice(Q, 1), b++) : h[Q] = J;
2244
2244
  }
2245
2245
  } else {
@@ -2247,8 +2247,8 @@ function Dt(e, t, n = be) {
2247
2247
  {},
2248
2248
  Object.getOwnPropertyDescriptors(h)
2249
2249
  );
2250
- for (const [b, M] of p)
2251
- h[b] = M;
2250
+ for (const [b, F] of p)
2251
+ h[b] = F;
2252
2252
  }
2253
2253
  c = i.index, a = i.keys, p = i.edits, s = i.inArray, i = i.prev;
2254
2254
  } else if (C) {
@@ -2259,9 +2259,9 @@ function Dt(e, t, n = be) {
2259
2259
  let _;
2260
2260
  if (!Array.isArray(h)) {
2261
2261
  var g, T;
2262
- xe(h) || Z(!1, `Invalid AST Node: ${Ee(h)}.`);
2262
+ Te(h) || Z(!1, `Invalid AST Node: ${Ee(h)}.`);
2263
2263
  const b = D ? (g = r.get(h.kind)) === null || g === void 0 ? void 0 : g.leave : (T = r.get(h.kind)) === null || T === void 0 ? void 0 : T.enter;
2264
- if (_ = b == null ? void 0 : b.call(t, h, f, C, y, I), _ === Pt)
2264
+ if (_ = b == null ? void 0 : b.call(t, h, f, C, y, I), _ === Nt)
2265
2265
  break;
2266
2266
  if (_ === !1) {
2267
2267
  if (!D) {
@@ -2269,7 +2269,7 @@ function Dt(e, t, n = be) {
2269
2269
  continue;
2270
2270
  }
2271
2271
  } else if (_ !== void 0 && (p.push([f, _]), !D))
2272
- if (xe(_))
2272
+ if (Te(_))
2273
2273
  h = _;
2274
2274
  else {
2275
2275
  y.pop();
@@ -2279,14 +2279,14 @@ function Dt(e, t, n = be) {
2279
2279
  if (_ === void 0 && z && p.push([f, h]), D)
2280
2280
  y.pop();
2281
2281
  else {
2282
- var P;
2282
+ var N;
2283
2283
  i = {
2284
2284
  inArray: s,
2285
2285
  index: c,
2286
2286
  keys: a,
2287
2287
  edits: p,
2288
2288
  prev: i
2289
- }, s = Array.isArray(h), a = s ? h : (P = n[h.kind]) !== null && P !== void 0 ? P : [], c = -1, p = [], C && I.push(C), C = h;
2289
+ }, s = Array.isArray(h), a = s ? h : (N = n[h.kind]) !== null && N !== void 0 ? N : [], c = -1, p = [], C && I.push(C), C = h;
2290
2290
  }
2291
2291
  } while (i !== void 0);
2292
2292
  return p.length !== 0 ? p[p.length - 1][1] : e;
@@ -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) : St(e)
2381
+ leave: ({ value: e, block: t }) => t ? rt(e) : xt(e)
2382
2382
  },
2383
2383
  BooleanValue: {
2384
2384
  leave: ({ value: e }) => e ? "true" : "false"
@@ -2439,7 +2439,7 @@ const _t = 80, Lt = {
2439
2439
  },
2440
2440
  FieldDefinition: {
2441
2441
  leave: ({ description: e, name: t, arguments: n, type: r, directives: i }) => A("", e, `
2442
- `) + t + (Re(n) ? A(`(
2442
+ `) + t + (Pe(n) ? A(`(
2443
2443
  `, W(d(n, `
2444
2444
  `)), `
2445
2445
  )`) : A("(", d(n, ", "), ")")) + ": " + r + A(" ", d(i, " "))
@@ -2485,7 +2485,7 @@ const _t = 80, Lt = {
2485
2485
  },
2486
2486
  DirectiveDefinition: {
2487
2487
  leave: ({ description: e, name: t, arguments: n, repeatable: r, locations: i }) => A("", e, `
2488
- `) + "directive @" + t + (Re(n) ? A(`(
2488
+ `) + "directive @" + t + (Pe(n) ? A(`(
2489
2489
  `, W(d(n, `
2490
2490
  `)), `
2491
2491
  )`) : A("(", d(n, ", "), ")")) + (r ? " repeatable" : "") + " on " + d(i, " | ")
@@ -2558,31 +2558,31 @@ function W(e) {
2558
2558
  return A(" ", e.replace(/\n/g, `
2559
2559
  `));
2560
2560
  }
2561
- function Re(e) {
2561
+ function Pe(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;
2565
2565
  }
2566
- var ee = /* @__PURE__ */ new Map(), ge = /* @__PURE__ */ new Map(), Ue = !0, ie = !1;
2566
+ var ee = /* @__PURE__ */ new Map(), ge = /* @__PURE__ */ new Map(), Ve = !0, ie = !1;
2567
2567
  function Ge(e) {
2568
2568
  return e.replace(/[\s,]+/g, " ").trim();
2569
2569
  }
2570
2570
  function wt(e) {
2571
2571
  return Ge(e.source.body.substring(e.start, e.end));
2572
2572
  }
2573
- function Ft(e) {
2573
+ function Mt(e) {
2574
2574
  var t = /* @__PURE__ */ new Set(), n = [];
2575
2575
  return e.definitions.forEach(function(r) {
2576
2576
  if (r.kind === "FragmentDefinition") {
2577
2577
  var i = r.name.value, s = wt(r.loc), a = ge.get(i);
2578
- a && !a.has(s) ? Ue && console.warn("Warning: fragment with name " + i + ` already exists.
2578
+ a && !a.has(s) ? Ve && console.warn("Warning: fragment with name " + i + ` already exists.
2579
2579
  graphql-tag enforces all fragment names across your application to be unique; read more about
2580
2580
  this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`) : a || ge.set(i, a = /* @__PURE__ */ new Set()), a.add(s), t.has(s) || (t.add(s), n.push(r));
2581
2581
  } else
2582
2582
  n.push(r);
2583
2583
  }), ne(ne({}, e), { definitions: n });
2584
2584
  }
2585
- function Mt(e) {
2585
+ function Ft(e) {
2586
2586
  var t = new Set(e.definitions);
2587
2587
  t.forEach(function(r) {
2588
2588
  r.loc && delete r.loc, Object.keys(r).forEach(function(i) {
@@ -2602,11 +2602,11 @@ function Bt(e) {
2602
2602
  });
2603
2603
  if (!n || n.kind !== "Document")
2604
2604
  throw new Error("Not a valid GraphQL document.");
2605
- ee.set(t, Mt(Ft(n)));
2605
+ ee.set(t, Ft(Mt(n)));
2606
2606
  }
2607
2607
  return ee.get(t);
2608
2608
  }
2609
- function U(e) {
2609
+ function V(e) {
2610
2610
  for (var t = [], n = 1; n < arguments.length; n++)
2611
2611
  t[n - 1] = arguments[n];
2612
2612
  typeof e == "string" && (e = [e]);
@@ -2618,27 +2618,27 @@ function U(e) {
2618
2618
  function qt() {
2619
2619
  ee.clear(), ge.clear();
2620
2620
  }
2621
- function Ut() {
2622
- Ue = !1;
2621
+ function Vt() {
2622
+ Ve = !1;
2623
2623
  }
2624
2624
  function Gt() {
2625
2625
  ie = !0;
2626
2626
  }
2627
- function $t() {
2627
+ function Ut() {
2628
2628
  ie = !1;
2629
2629
  }
2630
- var V = {
2631
- gql: U,
2630
+ var $ = {
2631
+ gql: V,
2632
2632
  resetCaches: qt,
2633
- disableFragmentWarnings: Ut,
2633
+ disableFragmentWarnings: Vt,
2634
2634
  enableExperimentalFragmentVariables: Gt,
2635
- disableExperimentalFragmentVariables: $t
2635
+ disableExperimentalFragmentVariables: Ut
2636
2636
  };
2637
2637
  (function(e) {
2638
- e.gql = V.gql, e.resetCaches = V.resetCaches, e.disableFragmentWarnings = V.disableFragmentWarnings, e.enableExperimentalFragmentVariables = V.enableExperimentalFragmentVariables, e.disableExperimentalFragmentVariables = V.disableExperimentalFragmentVariables;
2639
- })(U || (U = {}));
2640
- U.default = U;
2641
- const x = U, Vt = x`
2638
+ e.gql = $.gql, e.resetCaches = $.resetCaches, e.disableFragmentWarnings = $.disableFragmentWarnings, e.enableExperimentalFragmentVariables = $.enableExperimentalFragmentVariables, e.disableExperimentalFragmentVariables = $.disableExperimentalFragmentVariables;
2639
+ })(V || (V = {}));
2640
+ V.default = V;
2641
+ const S = V, $t = S`
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 = U, Vt = x`
2677
2677
  }
2678
2678
  }
2679
2679
  }
2680
- `, jt = x`
2680
+ `, jt = S`
2681
2681
  query GetLocationAvailability($sku: String!, $locationID: ID!) {
2682
2682
  locationAvailability(sku: $sku, locationID: $locationID) {
2683
2683
  location {
@@ -2703,7 +2703,7 @@ const x = U, Vt = x`
2703
2703
  inventoryQuantity
2704
2704
  }
2705
2705
  }
2706
- `, Ht = x`
2706
+ `, Ht = S`
2707
2707
  query GetPurchasingCustomerMetafield($namespace: String!, $key: String!) {
2708
2708
  purchasingCustomerMetafield(namespace: $namespace, key: $key) {
2709
2709
  id
@@ -2712,7 +2712,7 @@ const x = U, Vt = x`
2712
2712
  value
2713
2713
  }
2714
2714
  }
2715
- `, Yt = x`
2715
+ `, Yt = S`
2716
2716
  query GetPoints {
2717
2717
  purchasingCustomer {
2718
2718
  pointsApproved
@@ -2724,7 +2724,7 @@ const x = U, Vt = x`
2724
2724
  }
2725
2725
  }
2726
2726
  }
2727
- `, zt = x`
2727
+ `, zt = S`
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 = U, Vt = x`
2755
2755
  }
2756
2756
  }
2757
2757
  }
2758
- `, Jt = x`
2758
+ `, Jt = S`
2759
2759
  query GetPurchasingCustomerDiscounts($first: Int, $after: String, $isReverse: Boolean! = false) {
2760
2760
  purchasingCustomer {
2761
2761
  id
@@ -2784,14 +2784,14 @@ const x = U, Vt = x`
2784
2784
  }
2785
2785
  }
2786
2786
  }
2787
- `, Qt = x`
2787
+ `, Qt = S`
2788
2788
  query GetPurchasingCustomerDiscountCodeCount {
2789
2789
  purchasingCustomer {
2790
2790
  id
2791
2791
  orderPriceAdjustmentRuleCount
2792
2792
  }
2793
2793
  }
2794
- `, Xt = x`
2794
+ `, Xt = S`
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 = U, Vt = x`
2851
2851
  }
2852
2852
  }
2853
2853
  }
2854
- `, Kt = x`
2854
+ `, Kt = S`
2855
2855
  query GetPurchasingCustomerRank {
2856
2856
  purchasingCustomer {
2857
2857
  currentCustomerRank {
@@ -2892,14 +2892,14 @@ const x = U, Vt = x`
2892
2892
  }
2893
2893
  }
2894
2894
  }
2895
- `, Zt = x`
2895
+ `, Zt = S`
2896
2896
  query GetSharingPurchasingCustomerCount {
2897
2897
  purchasingCustomer {
2898
2898
  id
2899
2899
  sharingPurchasingCustomerCount
2900
2900
  }
2901
2901
  }
2902
- `, Wt = x`
2902
+ `, Wt = S`
2903
2903
  query GetPurchasingCustomerSharing {
2904
2904
  purchasingCustomer {
2905
2905
  id
@@ -2916,7 +2916,7 @@ const x = U, Vt = x`
2916
2916
  }
2917
2917
  }
2918
2918
  }
2919
- `, en = x`
2919
+ `, en = S`
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,14 +2948,14 @@ const x = U, Vt = x`
2948
2948
  }
2949
2949
  }
2950
2950
  }
2951
- `, tn = x`
2951
+ `, tn = S`
2952
2952
  query GetHasBackOrderProductVariantsByProductShopifyLegacyResourceID($id: String!) {
2953
2953
  productByProductShopifyLegacyResourceID(productShopifyLegacyResourceID: $id) {
2954
2954
  id
2955
2955
  hasBackOrderProductVariants
2956
2956
  }
2957
2957
  }
2958
- `, nn = x`
2958
+ `, nn = S`
2959
2959
  query GetPointCampaignOrderRuleTargetCustomerRank {
2960
2960
  pointCampaignOrderRuleTargetCustomerRank {
2961
2961
  pointCampaignOrderRule {
@@ -2968,7 +2968,7 @@ const x = U, Vt = x`
2968
2968
  fixedPoint
2969
2969
  }
2970
2970
  }
2971
- `, rn = x`
2971
+ `, rn = S`
2972
2972
  query GetEstimatedShopifyCartPoint($input: EstimatedShopifyCartPointInput!) {
2973
2973
  estimatedShopifyCartPoint(input: $input) {
2974
2974
  pointsEarning
@@ -2984,7 +2984,7 @@ const x = U, Vt = x`
2984
2984
  }
2985
2985
  }
2986
2986
  }
2987
- `, sn = x`
2987
+ `, sn = S`
2988
2988
  query GetEstimatedShopifyCartLineItemPoint($input: EstimatedShopifyCartLineItemPointInput!) {
2989
2989
  estimatedShopifyCartLineItemPoint(input: $input) {
2990
2990
  pointsEarning
@@ -3000,7 +3000,15 @@ const x = U, Vt = x`
3000
3000
  }
3001
3001
  }
3002
3002
  }
3003
- `, an = x`
3003
+ `, an = S`
3004
+ query GetPurchasingCustomerSMS {
3005
+ purchasingCustomer {
3006
+ id
3007
+ smsVerified
3008
+ smsVerifiedPhone
3009
+ }
3010
+ }
3011
+ `, on = S`
3004
3012
  mutation PurchasingCustomerSendCustomerSharingActivationCode {
3005
3013
  purchasingCustomerSendCustomerSharingActivationCode {
3006
3014
  purchasingCustomer {
@@ -3016,7 +3024,7 @@ const x = U, Vt = x`
3016
3024
  }
3017
3025
  }
3018
3026
  }
3019
- `, on = x`
3027
+ `, un = S`
3020
3028
  mutation PurchasingCustomerActivateCustomerSharing($email: String!, $activationCode: String!) {
3021
3029
  purchasingCustomerActivateCustomerSharing(
3022
3030
  input: {email: $email, activationCode: $activationCode}
@@ -3031,13 +3039,13 @@ const x = U, Vt = x`
3031
3039
  }
3032
3040
  }
3033
3041
  }
3034
- `, un = x`
3042
+ `, cn = S`
3035
3043
  query GetMiles {
3036
3044
  purchasingCustomer {
3037
3045
  miles
3038
3046
  }
3039
3047
  }
3040
- `, cn = x`
3048
+ `, ln = S`
3041
3049
  query GetPurchasingCustomerMileChangeActivities($first: Int, $after: String, $isReverse: Boolean! = false, $sortKeys: MileChangeActivitySortKey! = CREATED_AT) {
3042
3050
  purchasingCustomer {
3043
3051
  id
@@ -3066,7 +3074,7 @@ const x = U, Vt = x`
3066
3074
  }
3067
3075
  }
3068
3076
  }
3069
- `, ln = x`
3077
+ `, dn = S`
3070
3078
  query GetMileItems($first: Int, $after: String, $isReverse: Boolean! = false, $sortKeys: ShopifyMileItemSortKey! = CREATED_AT) {
3071
3079
  mileItems(
3072
3080
  first: $first
@@ -3094,7 +3102,7 @@ const x = U, Vt = x`
3094
3102
  }
3095
3103
  }
3096
3104
  }
3097
- `, dn = x`
3105
+ `, pn = S`
3098
3106
  query GetMileOrders($first: Int, $after: String, $isReverse: Boolean! = false, $sortKeys: MileOrderSortKey! = CREATED_AT) {
3099
3107
  purchasingCustomer {
3100
3108
  id
@@ -3131,7 +3139,7 @@ const x = U, Vt = x`
3131
3139
  }
3132
3140
  }
3133
3141
  }
3134
- `, pn = x`
3142
+ `, hn = S`
3135
3143
  mutation MileItemExchange($mileItemID: ID!) {
3136
3144
  mileItemExchange(input: {mileItemID: $mileItemID}) {
3137
3145
  mileOrder {
@@ -3154,11 +3162,33 @@ const x = U, Vt = x`
3154
3162
  }
3155
3163
  }
3156
3164
  }
3157
- `, hn = (e, t, n, r) => e();
3158
- function mn(e, t = hn) {
3165
+ `, mn = S`
3166
+ mutation PurchasingCustomerSendSMSVerificationCode($phone: String!) {
3167
+ purchasingCustomerSendSMSVerificationCode(input: {phone: $phone}) {
3168
+ purchasingCustomer {
3169
+ id
3170
+ smsVerified
3171
+ smsVerifiedPhone
3172
+ }
3173
+ }
3174
+ }
3175
+ `, fn = S`
3176
+ mutation PurchasingCustomerVerifySMS($phone: String!, $verificationCode: String!) {
3177
+ purchasingCustomerVerifySMS(
3178
+ input: {phone: $phone, verificationCode: $verificationCode}
3179
+ ) {
3180
+ purchasingCustomer {
3181
+ id
3182
+ smsVerified
3183
+ smsVerifiedPhone
3184
+ }
3185
+ }
3186
+ }
3187
+ `, gn = (e, t, n, r) => e();
3188
+ function Cn(e, t = gn) {
3159
3189
  return {
3160
3190
  GetLocationAvailabilities(n, r) {
3161
- return t((i) => e.request(Vt, n, { ...r, ...i }), "GetLocationAvailabilities", "query", n);
3191
+ return t((i) => e.request($t, n, { ...r, ...i }), "GetLocationAvailabilities", "query", n);
3162
3192
  },
3163
3193
  GetLocationAvailability(n, r) {
3164
3194
  return t((i) => e.request(jt, n, { ...r, ...i }), "GetLocationAvailability", "query", n);
@@ -3205,49 +3235,58 @@ function mn(e, t = hn) {
3205
3235
  GetEstimatedShopifyCartLineItemPoint(n, r) {
3206
3236
  return t((i) => e.request(sn, n, { ...r, ...i }), "GetEstimatedShopifyCartLineItemPoint", "query", n);
3207
3237
  },
3238
+ GetPurchasingCustomerSMS(n, r) {
3239
+ return t((i) => e.request(an, n, { ...r, ...i }), "GetPurchasingCustomerSMS", "query", n);
3240
+ },
3208
3241
  PurchasingCustomerSendCustomerSharingActivationCode(n, r) {
3209
- return t((i) => e.request(an, n, { ...r, ...i }), "PurchasingCustomerSendCustomerSharingActivationCode", "mutation", n);
3242
+ return t((i) => e.request(on, n, { ...r, ...i }), "PurchasingCustomerSendCustomerSharingActivationCode", "mutation", n);
3210
3243
  },
3211
3244
  PurchasingCustomerActivateCustomerSharing(n, r) {
3212
- return t((i) => e.request(on, n, { ...r, ...i }), "PurchasingCustomerActivateCustomerSharing", "mutation", n);
3245
+ return t((i) => e.request(un, n, { ...r, ...i }), "PurchasingCustomerActivateCustomerSharing", "mutation", n);
3213
3246
  },
3214
3247
  GetMiles(n, r) {
3215
- return t((i) => e.request(un, n, { ...r, ...i }), "GetMiles", "query", n);
3248
+ return t((i) => e.request(cn, n, { ...r, ...i }), "GetMiles", "query", n);
3216
3249
  },
3217
3250
  GetPurchasingCustomerMileChangeActivities(n, r) {
3218
- return t((i) => e.request(cn, n, { ...r, ...i }), "GetPurchasingCustomerMileChangeActivities", "query", n);
3251
+ return t((i) => e.request(ln, n, { ...r, ...i }), "GetPurchasingCustomerMileChangeActivities", "query", n);
3219
3252
  },
3220
3253
  GetMileItems(n, r) {
3221
- return t((i) => e.request(ln, n, { ...r, ...i }), "GetMileItems", "query", n);
3254
+ return t((i) => e.request(dn, n, { ...r, ...i }), "GetMileItems", "query", n);
3222
3255
  },
3223
3256
  GetMileOrders(n, r) {
3224
- return t((i) => e.request(dn, n, { ...r, ...i }), "GetMileOrders", "query", n);
3257
+ return t((i) => e.request(pn, n, { ...r, ...i }), "GetMileOrders", "query", n);
3225
3258
  },
3226
3259
  MileItemExchange(n, r) {
3227
- return t((i) => e.request(pn, n, { ...r, ...i }), "MileItemExchange", "mutation", n);
3260
+ return t((i) => e.request(hn, n, { ...r, ...i }), "MileItemExchange", "mutation", n);
3261
+ },
3262
+ PurchasingCustomerSendSMSVerificationCode(n, r) {
3263
+ return t((i) => e.request(mn, n, { ...r, ...i }), "PurchasingCustomerSendSMSVerificationCode", "mutation", n);
3264
+ },
3265
+ PurchasingCustomerVerifySMS(n, r) {
3266
+ return t((i) => e.request(fn, n, { ...r, ...i }), "PurchasingCustomerVerifySMS", "mutation", n);
3228
3267
  }
3229
3268
  };
3230
3269
  }
3231
- const Ae = JSON, fn = (e) => e.toUpperCase(), gn = (e) => {
3270
+ const Ae = JSON, yn = (e) => e.toUpperCase(), En = (e) => {
3232
3271
  const t = {};
3233
3272
  return e.forEach((n, r) => {
3234
3273
  t[r] = n;
3235
3274
  }), t;
3236
- }, Cn = (e, t, n) => e.document ? e : {
3275
+ }, An = (e, t, n) => e.document ? e : {
3237
3276
  document: e,
3238
3277
  variables: t,
3239
3278
  requestHeaders: n,
3240
3279
  signal: void 0
3241
- }, yn = (e, t, n) => e.query ? e : {
3280
+ }, vn = (e, t, n) => e.query ? e : {
3242
3281
  query: e,
3243
3282
  variables: t,
3244
3283
  requestHeaders: n,
3245
3284
  signal: void 0
3246
- }, En = (e, t) => e.documents ? e : {
3285
+ }, In = (e, t) => e.documents ? e : {
3247
3286
  documents: e,
3248
3287
  requestHeaders: t,
3249
3288
  signal: void 0
3250
- }, Oe = (e) => {
3289
+ }, Re = (e) => {
3251
3290
  var r, i;
3252
3291
  let t;
3253
3292
  const n = e.definitions.filter((s) => s.kind === "OperationDefinition");
@@ -3257,12 +3296,12 @@ const Ae = JSON, fn = (e) => e.toUpperCase(), gn = (e) => {
3257
3296
  let n;
3258
3297
  try {
3259
3298
  const r = Be(e);
3260
- n = Oe(r);
3299
+ n = Re(r);
3261
3300
  } catch {
3262
3301
  }
3263
3302
  return { query: e, operationName: n };
3264
3303
  }
3265
- const t = Oe(e);
3304
+ const t = Re(e);
3266
3305
  return { query: kt(e), operationName: t };
3267
3306
  };
3268
3307
  class H extends Error {
@@ -3278,13 +3317,13 @@ class H extends Error {
3278
3317
  return ((r = (n = t.errors) == null ? void 0 : n[0]) == null ? void 0 : r.message) ?? `GraphQL Error (Code: ${t.status})`;
3279
3318
  }
3280
3319
  }
3281
- var An = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
3282
- function vn(e) {
3320
+ var Sn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
3321
+ function Tn(e) {
3283
3322
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
3284
3323
  }
3285
3324
  var Ce = { exports: {} };
3286
3325
  (function(e, t) {
3287
- var n = typeof self < "u" ? self : An, r = function() {
3326
+ var n = typeof self < "u" ? self : Sn, r = function() {
3288
3327
  function s() {
3289
3328
  this.fetch = !1, this.DOMException = n.DOMException;
3290
3329
  }
@@ -3386,7 +3425,7 @@ var Ce = { exports: {} };
3386
3425
  return Promise.reject(new TypeError("Already read"));
3387
3426
  o.bodyUsed = !0;
3388
3427
  }
3389
- function P(o) {
3428
+ function N(o) {
3390
3429
  return new Promise(function(l, E) {
3391
3430
  o.onload = function() {
3392
3431
  l(o.result);
@@ -3396,16 +3435,16 @@ var Ce = { exports: {} };
3396
3435
  });
3397
3436
  }
3398
3437
  function D(o) {
3399
- var l = new FileReader(), E = P(l);
3438
+ var l = new FileReader(), E = N(l);
3400
3439
  return l.readAsArrayBuffer(o), E;
3401
3440
  }
3402
3441
  function z(o) {
3403
- var l = new FileReader(), E = P(l);
3442
+ var l = new FileReader(), E = N(l);
3404
3443
  return l.readAsText(o), E;
3405
3444
  }
3406
3445
  function _(o) {
3407
- for (var l = new Uint8Array(o), E = new Array(l.length), N = 0; N < l.length; N++)
3408
- E[N] = String.fromCharCode(l[N]);
3446
+ for (var l = new Uint8Array(o), E = new Array(l.length), O = 0; O < l.length; O++)
3447
+ E[O] = String.fromCharCode(l[O]);
3409
3448
  return E.join("");
3410
3449
  }
3411
3450
  function b(o) {
@@ -3414,7 +3453,7 @@ var Ce = { exports: {} };
3414
3453
  var l = new Uint8Array(o.byteLength);
3415
3454
  return l.set(new Uint8Array(o)), l.buffer;
3416
3455
  }
3417
- function M() {
3456
+ function F() {
3418
3457
  return this.bodyUsed = !1, this._initBody = function(o) {
3419
3458
  this._bodyInit = o, o ? typeof o == "string" ? this._bodyText = o : c.blob && Blob.prototype.isPrototypeOf(o) ? this._bodyBlob = o : c.formData && FormData.prototype.isPrototypeOf(o) ? this._bodyFormData = o : c.searchParams && URLSearchParams.prototype.isPrototypeOf(o) ? this._bodyText = o.toString() : c.arrayBuffer && c.blob && p(o) ? (this._bodyArrayBuffer = b(o.buffer), this._bodyInit = new Blob([this._bodyArrayBuffer])) : c.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(o) || f(o)) ? this._bodyArrayBuffer = b(o) : this._bodyText = o = Object.prototype.toString.call(o) : this._bodyText = "", this.headers.get("content-type") || (typeof o == "string" ? this.headers.set("content-type", "text/plain;charset=UTF-8") : this._bodyBlob && this._bodyBlob.type ? this.headers.set("content-type", this._bodyBlob.type) : c.searchParams && URLSearchParams.prototype.isPrototypeOf(o) && this.headers.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"));
3420
3459
  }, c.blob && (this.blob = function() {
@@ -3442,7 +3481,7 @@ var Ce = { exports: {} };
3442
3481
  throw new Error("could not read FormData body as text");
3443
3482
  return Promise.resolve(this._bodyText);
3444
3483
  }, c.formData && (this.formData = function() {
3445
- return this.text().then($e);
3484
+ return this.text().then(Ue);
3446
3485
  }), this.json = function() {
3447
3486
  return this.text().then(JSON.parse);
3448
3487
  }, this;
@@ -3468,30 +3507,30 @@ var Ce = { exports: {} };
3468
3507
  w.prototype.clone = function() {
3469
3508
  return new w(this, { body: this._bodyInit });
3470
3509
  };
3471
- function $e(o) {
3510
+ function Ue(o) {
3472
3511
  var l = new FormData();
3473
3512
  return o.trim().split("&").forEach(function(E) {
3474
3513
  if (E) {
3475
- var N = E.split("="), O = N.shift().replace(/\+/g, " "), v = N.join("=").replace(/\+/g, " ");
3476
- l.append(decodeURIComponent(O), decodeURIComponent(v));
3514
+ var O = E.split("="), R = O.shift().replace(/\+/g, " "), v = O.join("=").replace(/\+/g, " ");
3515
+ l.append(decodeURIComponent(R), decodeURIComponent(v));
3477
3516
  }
3478
3517
  }), l;
3479
3518
  }
3480
- function Ve(o) {
3519
+ function $e(o) {
3481
3520
  var l = new g(), E = o.replace(/\r?\n[\t ]+/g, " ");
3482
- return E.split(/\r?\n/).forEach(function(N) {
3483
- var O = N.split(":"), v = O.shift().trim();
3521
+ return E.split(/\r?\n/).forEach(function(O) {
3522
+ var R = O.split(":"), v = R.shift().trim();
3484
3523
  if (v) {
3485
- var X = O.join(":").trim();
3524
+ var X = R.join(":").trim();
3486
3525
  l.append(v, X);
3487
3526
  }
3488
3527
  }), l;
3489
3528
  }
3490
- M.call(w.prototype);
3529
+ F.call(w.prototype);
3491
3530
  function L(o, l) {
3492
3531
  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);
3493
3532
  }
3494
- M.call(L.prototype), L.prototype.clone = function() {
3533
+ F.call(L.prototype), L.prototype.clone = function() {
3495
3534
  return new L(this._bodyInit, {
3496
3535
  status: this.status,
3497
3536
  statusText: this.statusText,
@@ -3513,39 +3552,39 @@ var Ce = { exports: {} };
3513
3552
  } catch {
3514
3553
  a.DOMException = function(l, E) {
3515
3554
  this.message = l, this.name = E;
3516
- var N = Error(l);
3517
- this.stack = N.stack;
3555
+ var O = Error(l);
3556
+ this.stack = O.stack;
3518
3557
  }, a.DOMException.prototype = Object.create(Error.prototype), a.DOMException.prototype.constructor = a.DOMException;
3519
3558
  }
3520
3559
  function oe(o, l) {
3521
- return new Promise(function(E, N) {
3522
- var O = new w(o, l);
3523
- if (O.signal && O.signal.aborted)
3524
- return N(new a.DOMException("Aborted", "AbortError"));
3560
+ return new Promise(function(E, O) {
3561
+ var R = new w(o, l);
3562
+ if (R.signal && R.signal.aborted)
3563
+ return O(new a.DOMException("Aborted", "AbortError"));
3525
3564
  var v = new XMLHttpRequest();
3526
3565
  function X() {
3527
3566
  v.abort();
3528
3567
  }
3529
3568
  v.onload = function() {
3530
- var $ = {
3569
+ var U = {
3531
3570
  status: v.status,
3532
3571
  statusText: v.statusText,
3533
- headers: Ve(v.getAllResponseHeaders() || "")
3572
+ headers: $e(v.getAllResponseHeaders() || "")
3534
3573
  };
3535
- $.url = "responseURL" in v ? v.responseURL : $.headers.get("X-Request-URL");
3574
+ U.url = "responseURL" in v ? v.responseURL : U.headers.get("X-Request-URL");
3536
3575
  var ue = "response" in v ? v.response : v.responseText;
3537
- E(new L(ue, $));
3576
+ E(new L(ue, U));
3538
3577
  }, v.onerror = function() {
3539
- N(new TypeError("Network request failed"));
3578
+ O(new TypeError("Network request failed"));
3540
3579
  }, v.ontimeout = function() {
3541
- N(new TypeError("Network request failed"));
3580
+ O(new TypeError("Network request failed"));
3542
3581
  }, v.onabort = function() {
3543
- N(new a.DOMException("Aborted", "AbortError"));
3544
- }, v.open(O.method, O.url, !0), O.credentials === "include" ? v.withCredentials = !0 : O.credentials === "omit" && (v.withCredentials = !1), "responseType" in v && c.blob && (v.responseType = "blob"), O.headers.forEach(function($, ue) {
3545
- v.setRequestHeader(ue, $);
3546
- }), O.signal && (O.signal.addEventListener("abort", X), v.onreadystatechange = function() {
3547
- v.readyState === 4 && O.signal.removeEventListener("abort", X);
3548
- }), v.send(typeof O._bodyInit > "u" ? null : O._bodyInit);
3582
+ O(new a.DOMException("Aborted", "AbortError"));
3583
+ }, v.open(R.method, R.url, !0), R.credentials === "include" ? v.withCredentials = !0 : R.credentials === "omit" && (v.withCredentials = !1), "responseType" in v && c.blob && (v.responseType = "blob"), R.headers.forEach(function(U, ue) {
3584
+ v.setRequestHeader(ue, U);
3585
+ }), R.signal && (R.signal.addEventListener("abort", X), v.onreadystatechange = function() {
3586
+ v.readyState === 4 && R.signal.removeEventListener("abort", X);
3587
+ }), v.send(typeof R._bodyInit > "u" ? null : R._bodyInit);
3549
3588
  });
3550
3589
  }
3551
3590
  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;
@@ -3555,30 +3594,30 @@ var Ce = { exports: {} };
3555
3594
  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;
3556
3595
  })(Ce, Ce.exports);
3557
3596
  var re = Ce.exports;
3558
- const te = /* @__PURE__ */ vn(re), In = /* @__PURE__ */ ze({
3597
+ const te = /* @__PURE__ */ Tn(re), xn = /* @__PURE__ */ ze({
3559
3598
  __proto__: null,
3560
3599
  default: te
3561
3600
  }, [re]), B = (e) => {
3562
3601
  let t = {};
3563
- return e && (typeof Headers < "u" && e instanceof Headers || In && re.Headers && e instanceof re.Headers ? t = gn(e) : Array.isArray(e) ? e.forEach(([n, r]) => {
3602
+ return e && (typeof Headers < "u" && e instanceof Headers || xn && re.Headers && e instanceof re.Headers ? t = En(e) : Array.isArray(e) ? e.forEach(([n, r]) => {
3564
3603
  n && r !== void 0 && (t[n] = r);
3565
3604
  }) : t = e), t;
3566
- }, Ne = (e) => e.replace(/([\s,]|#[^\n\r]+)+/g, " ").trim(), Tn = (e) => {
3605
+ }, Oe = (e) => e.replace(/([\s,]|#[^\n\r]+)+/g, " ").trim(), Pn = (e) => {
3567
3606
  if (!Array.isArray(e.query)) {
3568
- const r = e, i = [`query=${encodeURIComponent(Ne(r.query))}`];
3607
+ const r = e, i = [`query=${encodeURIComponent(Oe(r.query))}`];
3569
3608
  return e.variables && i.push(`variables=${encodeURIComponent(r.jsonSerializer.stringify(r.variables))}`), r.operationName && i.push(`operationName=${encodeURIComponent(r.operationName)}`), i.join("&");
3570
3609
  }
3571
3610
  if (typeof e.variables < "u" && !Array.isArray(e.variables))
3572
3611
  throw new Error("Cannot create query with given variable type, array expected");
3573
3612
  const t = e, n = e.query.reduce((r, i, s) => (r.push({
3574
- query: Ne(i),
3613
+ query: Oe(i),
3575
3614
  variables: t.variables ? t.jsonSerializer.stringify(t.variables[s]) : void 0
3576
3615
  }), r), []);
3577
3616
  return `query=${encodeURIComponent(t.jsonSerializer.stringify(n))}`;
3578
- }, xn = (e) => async (t) => {
3617
+ }, Rn = (e) => async (t) => {
3579
3618
  const { url: n, query: r, variables: i, operationName: s, fetch: a, fetchOptions: c, middleware: p } = t, h = { ...t.headers };
3580
3619
  let f = "", C;
3581
- e === "POST" ? (C = Rn(r, i, s, c.jsonSerializer), typeof C == "string" && (h["Content-Type"] = "application/json")) : f = Tn({
3620
+ e === "POST" ? (C = Nn(r, i, s, c.jsonSerializer), typeof C == "string" && (h["Content-Type"] = "application/json")) : f = Pn({
3582
3621
  query: r,
3583
3622
  variables: i,
3584
3623
  operationName: s,
@@ -3592,15 +3631,15 @@ const te = /* @__PURE__ */ vn(re), In = /* @__PURE__ */ ze({
3592
3631
  };
3593
3632
  let I = n, g = y;
3594
3633
  if (p) {
3595
- const T = await Promise.resolve(p({ ...y, url: n, operationName: s, variables: i })), { url: P, ...D } = T;
3596
- I = P, g = D;
3634
+ const T = await Promise.resolve(p({ ...y, url: n, operationName: s, variables: i })), { url: N, ...D } = T;
3635
+ I = N, g = D;
3597
3636
  }
3598
3637
  return f && (I = `${I}?${f}`), await a(I, g);
3599
3638
  };
3600
- class Sn {
3639
+ class On {
3601
3640
  constructor(t, n = {}) {
3602
3641
  this.url = t, this.requestConfig = n, this.rawRequest = async (...r) => {
3603
- const [i, s, a] = r, c = yn(i, s, a), { headers: p, fetch: h = te, method: f = "POST", requestMiddleware: C, responseMiddleware: y, ...I } = this.requestConfig, { url: g } = this;
3642
+ const [i, s, a] = r, c = vn(i, s, a), { headers: p, fetch: h = te, method: f = "POST", requestMiddleware: C, responseMiddleware: y, ...I } = this.requestConfig, { url: g } = this;
3604
3643
  c.signal !== void 0 && (I.signal = c.signal);
3605
3644
  const { operationName: T } = le(c.query);
3606
3645
  return de({
@@ -3616,13 +3655,13 @@ class Sn {
3616
3655
  method: f,
3617
3656
  fetchOptions: I,
3618
3657
  middleware: C
3619
- }).then((P) => (y && y(P), P)).catch((P) => {
3620
- throw y && y(P), P;
3658
+ }).then((N) => (y && y(N), N)).catch((N) => {
3659
+ throw y && y(N), N;
3621
3660
  });
3622
3661
  };
3623
3662
  }
3624
3663
  async request(t, ...n) {
3625
- const [r, i] = n, s = Cn(t, r, i), { headers: a, fetch: c = te, method: p = "POST", requestMiddleware: h, responseMiddleware: f, ...C } = this.requestConfig, { url: y } = this;
3664
+ const [r, i] = n, s = An(t, r, i), { headers: a, fetch: c = te, method: p = "POST", requestMiddleware: h, responseMiddleware: f, ...C } = this.requestConfig, { url: y } = this;
3626
3665
  s.signal !== void 0 && (C.signal = s.signal);
3627
3666
  const { query: I, operationName: g } = le(s.document);
3628
3667
  return de({
@@ -3644,7 +3683,7 @@ class Sn {
3644
3683
  }
3645
3684
  // prettier-ignore
3646
3685
  batchRequests(t, n) {
3647
- const r = En(t, n), { headers: i, ...s } = this.requestConfig;
3686
+ const r = In(t, n), { headers: i, ...s } = this.requestConfig;
3648
3687
  r.signal !== void 0 && (s.signal = r.signal);
3649
3688
  const a = r.documents.map(({ document: p }) => le(p).query), c = r.documents.map(({ variables: p }) => p);
3650
3689
  return de({
@@ -3683,7 +3722,7 @@ class Sn {
3683
3722
  }
3684
3723
  }
3685
3724
  const de = async (e) => {
3686
- const { query: t, variables: n, fetchOptions: r } = e, i = xn(fn(e.method ?? "post")), s = Array.isArray(e.query), a = await i(e), c = await On(a, r.jsonSerializer ?? Ae), p = Array.isArray(c) ? !c.some(({ data: f }) => !f) : !!c.data, h = Array.isArray(c) || !c.errors || Array.isArray(c.errors) && !c.errors.length || r.errorPolicy === "all" || r.errorPolicy === "ignore";
3725
+ const { query: t, variables: n, fetchOptions: r } = e, i = Rn(yn(e.method ?? "post")), s = Array.isArray(e.query), a = await i(e), c = await Dn(a, r.jsonSerializer ?? Ae), p = Array.isArray(c) ? !c.some(({ data: f }) => !f) : !!c.data, h = Array.isArray(c) || !c.errors || Array.isArray(c.errors) && !c.errors.length || r.errorPolicy === "all" || r.errorPolicy === "ignore";
3687
3726
  if (a.ok && h && p) {
3688
3727
  const { errors: f, ...C } = (Array.isArray(c), c), y = r.errorPolicy === "ignore" ? C : c;
3689
3728
  return {
@@ -3701,7 +3740,7 @@ const de = async (e) => {
3701
3740
  { query: t, variables: n }
3702
3741
  );
3703
3742
  }
3704
- }, Rn = (e, t, n, r) => {
3743
+ }, Nn = (e, t, n, r) => {
3705
3744
  const i = r ?? Ae;
3706
3745
  if (!Array.isArray(e))
3707
3746
  return i.stringify({ query: e, variables: t, operationName: n });
@@ -3709,18 +3748,18 @@ const de = async (e) => {
3709
3748
  throw new Error("Cannot create request body with given variable type, array expected");
3710
3749
  const s = e.reduce((a, c, p) => (a.push({ query: c, variables: t ? t[p] : void 0 }), a), []);
3711
3750
  return i.stringify(s);
3712
- }, On = async (e, t) => {
3751
+ }, Dn = async (e, t) => {
3713
3752
  let n;
3714
3753
  return e.headers.forEach((r, i) => {
3715
3754
  i.toLowerCase() === "content-type" && (n = r);
3716
3755
  }), 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();
3717
3756
  }, pe = (e) => typeof e == "function" ? e() : e;
3718
- var Nn = /* @__PURE__ */ ((e) => (e.Eur = "EUR", e.Jpy = "JPY", e.Usd = "USD", e))(Nn || {}), Pn = /* @__PURE__ */ ((e) => (e.Retail = "RETAIL", e.Warehouse = "WAREHOUSE", e))(Pn || {});
3719
- class bn {
3757
+ var bn = /* @__PURE__ */ ((e) => (e.Eur = "EUR", e.Jpy = "JPY", e.Usd = "USD", e))(bn || {}), kn = /* @__PURE__ */ ((e) => (e.Retail = "RETAIL", e.Warehouse = "WAREHOUSE", e))(kn || {});
3758
+ class Ln {
3720
3759
  constructor(t) {
3721
3760
  ve(this, "api");
3722
- this.api = mn(
3723
- new Sn(`${t}/apps/sq-api`, {
3761
+ this.api = Cn(
3762
+ new On(`${t}/apps/sq-api`, {
3724
3763
  headers: {
3725
3764
  "X-SQ-CLIENT": "ShopifyAppProxy"
3726
3765
  }
@@ -4164,7 +4203,7 @@ class bn {
4164
4203
  } : null;
4165
4204
  }
4166
4205
  /**
4167
- * purchasingCustomerActivateCustomerSharing はクティベーションコードを入力して顧客を有効化する。
4206
+ * purchasingCustomerActivateCustomerSharing はアクティベーションコードを入力して顧客を有効化する。
4168
4207
  */
4169
4208
  async purchasingCustomerActivateCustomerSharing(t, n) {
4170
4209
  if (n.length !== 6)
@@ -4294,6 +4333,17 @@ class bn {
4294
4333
  pageInfo: s.purchasingCustomer.mileOrders.pageInfo
4295
4334
  } : null;
4296
4335
  }
4336
+ /**
4337
+ * getPurchasingCustomerSMS は顧客のSMS認証情報を返します。
4338
+ */
4339
+ async getPurchasingCustomerSMS() {
4340
+ const t = await this.api.GetPurchasingCustomerSMS();
4341
+ return t.purchasingCustomer ? {
4342
+ id: t.purchasingCustomer.id,
4343
+ smsVerifiedPhone: t.purchasingCustomer.smsVerifiedPhone,
4344
+ smsVerified: t.purchasingCustomer.smsVerified
4345
+ } : null;
4346
+ }
4297
4347
  /**
4298
4348
  * mileItemExchange は指定したマイル商品を交換します。
4299
4349
  *
@@ -4322,9 +4372,43 @@ class bn {
4322
4372
  isCancelled: n.mileItemExchange.mileOrder.isCancelled
4323
4373
  } : null;
4324
4374
  }
4375
+ /**
4376
+ * purchasingCustomerSendSMSVerificationCode は指定された電話番号に対して、SMS認証用コード(数字6桁)を送信します。
4377
+ *
4378
+ * @param {string} phone SMS認証コードを送信する電話番号
4379
+ */
4380
+ async purchasingCustomerSendSMSVerificationCode(t) {
4381
+ var i;
4382
+ const r = (i = (await this.api.PurchasingCustomerSendSMSVerificationCode({
4383
+ phone: t
4384
+ })).purchasingCustomerSendSMSVerificationCode) == null ? void 0 : i.purchasingCustomer;
4385
+ return r ? {
4386
+ id: r.id,
4387
+ smsVerifiedPhone: r.smsVerifiedPhone,
4388
+ smsVerified: r.smsVerified
4389
+ } : null;
4390
+ }
4391
+ /**
4392
+ * purchasingCustomerVerifySMS はSMS認証用コード(数字6桁)を指定して、SMS認証を行います。
4393
+ *
4394
+ * @param {string} phone SMS認証コードを送信した電話番号
4395
+ * @param {string} verificationCode SMS認証用コード
4396
+ */
4397
+ async purchasingCustomerVerifySMS(t, n) {
4398
+ var s;
4399
+ const i = (s = (await this.api.PurchasingCustomerVerifySMS({
4400
+ phone: t,
4401
+ verificationCode: n
4402
+ })).purchasingCustomerVerifySMS) == null ? void 0 : s.purchasingCustomer;
4403
+ return i ? {
4404
+ id: i.id,
4405
+ smsVerifiedPhone: i.smsVerifiedPhone,
4406
+ smsVerified: i.smsVerified
4407
+ } : null;
4408
+ }
4325
4409
  }
4326
4410
  export {
4327
- Nn as CurrencyCode,
4328
- Pn as LocationType,
4329
- bn as SDK
4411
+ bn as CurrencyCode,
4412
+ kn as LocationType,
4413
+ Ln as SDK
4330
4414
  };