@spiffcommerce/core 26.7.6 → 26.7.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -7,7 +7,7 @@ import { orientation as Yn } from "exifr/dist/mini.umd.cjs";
7
7
  import { parse as La } from "css";
8
8
  import Jn from "fuse.js";
9
9
  import { Pith as aa } from "pith";
10
- import bt from "lodash.clonedeep";
10
+ import It from "lodash.clonedeep";
11
11
  import { toString as $a } from "qrcode";
12
12
  import Kn from "svg-path-bbox";
13
13
  import { parse as Ge } from "opentype.js";
@@ -17,7 +17,7 @@ import pa from "lodash.chunk";
17
17
  import Va from "lodash.isequal";
18
18
  import { split as We } from "unicode-default-word-boundary";
19
19
  import za from "lodash.debounce";
20
- var de = /* @__PURE__ */ ((r) => (r.Data = "Data", r.Font = "Font", r.Frame = "Frame", r.Illustration = "Illustration", r.Image = "Image", r.Model = "Model", r.Material = "Material", r.Color = "Color", r.QuestionnaireCollateral = "QuestionnaireCollateral", r.RequestCollateral = "RequestCollateral", r.SignupCollateral = "SignupCollateral", r.Video = "Video", r.ColorProfile = "ColorProfile", r.Environment = "Environment", r))(de || {}), et = /* @__PURE__ */ ((r) => (r.FileUpload = "FileUpload", r.Option = "Option", r.ColorOption = "ColorOption", r.Text = "Text", r))(et || {}), b = /* @__PURE__ */ ((r) => (r.Information = "Information", r.Bulk = "Bulk", r.DigitalContent = "DigitalContent", r.Finish = "Finish", r.Frame = "Frame", r.Illustration = "Illustration", r.Introduction = "Introduction", r.Material = "Material", r.Model = "Model", r.Module = "Module", r.Picture = "Picture", r.Photo = "Photo", r.ProductOverlay = "ProductOverlay", r.Question = "Question", r.Shape = "Shape", r.SilentIllustration = "SilentIllustration", r.Text = "Text", r))(b || {}), Zn = /* @__PURE__ */ ((r) => (r.Color = "Color", r.Colors = "Colors", r.Selection = "Selection", r.Selections = "Selections", r.Text = "Text", r.Upload = "Upload", r))(Zn || {}), Vt = /* @__PURE__ */ ((r) => (r.ThreeD = "ThreeD", r.FreeDesign = "FreeDesign", r.Print = "Print", r))(Vt || {}), T = /* @__PURE__ */ ((r) => (r.Frame = "frame", r.Group = "group", r.Image = "image", r.Pattern = "pattern", r.Illustration = "illustration", r.Textbox = "textbox", r))(T || {}), _n = /* @__PURE__ */ ((r) => (r.Hyperlink = "Hyperlink", r.Edit = "Edit", r.Approve = "Approve", r))(_n || {}), tr = /* @__PURE__ */ ((r) => (r.Hub = "Hub", r.Shopify = "Shopify", r))(tr || {}), na = /* @__PURE__ */ ((r) => (r.BackgroundRemover = "BackgroundRemover", r.ConversionAccelerator = "Conversion Accelerator", r.ProcessBuilder = "ProcessBuilder", r))(na || {}), er = /* @__PURE__ */ ((r) => (r[r.Orbit = 0] = "Orbit", r[r.Pan = 1] = "Pan", r))(er || {}), ar = /* @__PURE__ */ ((r) => (r.Manual = "Manual", r.OnStart = "OnStart", r.OnQuit = "OnQuit", r.OnEnd = "OnEnd", r))(ar || {}), nr = /* @__PURE__ */ ((r) => (r.Email = "Email", r.FirstName = "FirstName", r.LastName = "LastName", r.Phone = "Phone", r))(nr || {}), Ae = /* @__PURE__ */ ((r) => (r.Owner = "Owner", r.Approver = "Approver", r.Editor = "Editor", r.Viewer = "Viewer", r))(Ae || {}), Ft = /* @__PURE__ */ ((r) => (r.Autosize = "Autosize", r.Traditional = "Traditional", r))(Ft || {}), H = /* @__PURE__ */ ((r) => (r[r.North = 0] = "North", r[r.Northeast = 1] = "Northeast", r[r.East = 2] = "East", r[r.Southeast = 3] = "Southeast", r[r.South = 4] = "South", r[r.Southwest = 5] = "Southwest", r[r.West = 6] = "West", r[r.Northwest = 7] = "Northwest", r))(H || {}), rr = /* @__PURE__ */ ((r) => (r.Pixel = "px", r.Millimeter = "mm", r.Centimeter = "cm", r))(rr || {});
20
+ var de = /* @__PURE__ */ ((r) => (r.Data = "Data", r.Font = "Font", r.Frame = "Frame", r.Illustration = "Illustration", r.Image = "Image", r.Model = "Model", r.Material = "Material", r.Color = "Color", r.QuestionnaireCollateral = "QuestionnaireCollateral", r.RequestCollateral = "RequestCollateral", r.SignupCollateral = "SignupCollateral", r.Video = "Video", r.ColorProfile = "ColorProfile", r.Environment = "Environment", r))(de || {}), et = /* @__PURE__ */ ((r) => (r.FileUpload = "FileUpload", r.Option = "Option", r.ColorOption = "ColorOption", r.Text = "Text", r))(et || {}), I = /* @__PURE__ */ ((r) => (r.Information = "Information", r.Bulk = "Bulk", r.DigitalContent = "DigitalContent", r.Finish = "Finish", r.Frame = "Frame", r.Illustration = "Illustration", r.Introduction = "Introduction", r.Material = "Material", r.Model = "Model", r.Module = "Module", r.Picture = "Picture", r.Photo = "Photo", r.ProductOverlay = "ProductOverlay", r.Question = "Question", r.Shape = "Shape", r.SilentIllustration = "SilentIllustration", r.Text = "Text", r))(I || {}), Zn = /* @__PURE__ */ ((r) => (r.Color = "Color", r.Colors = "Colors", r.Selection = "Selection", r.Selections = "Selections", r.Text = "Text", r.Upload = "Upload", r))(Zn || {}), Vt = /* @__PURE__ */ ((r) => (r.ThreeD = "ThreeD", r.FreeDesign = "FreeDesign", r.Print = "Print", r))(Vt || {}), T = /* @__PURE__ */ ((r) => (r.Frame = "frame", r.Group = "group", r.Image = "image", r.Pattern = "pattern", r.Illustration = "illustration", r.Textbox = "textbox", r))(T || {}), _n = /* @__PURE__ */ ((r) => (r.Hyperlink = "Hyperlink", r.Edit = "Edit", r.Approve = "Approve", r))(_n || {}), tr = /* @__PURE__ */ ((r) => (r.Hub = "Hub", r.Shopify = "Shopify", r))(tr || {}), na = /* @__PURE__ */ ((r) => (r.BackgroundRemover = "BackgroundRemover", r.ConversionAccelerator = "Conversion Accelerator", r.ProcessBuilder = "ProcessBuilder", r))(na || {}), er = /* @__PURE__ */ ((r) => (r[r.Orbit = 0] = "Orbit", r[r.Pan = 1] = "Pan", r))(er || {}), ar = /* @__PURE__ */ ((r) => (r.Manual = "Manual", r.OnStart = "OnStart", r.OnQuit = "OnQuit", r.OnEnd = "OnEnd", r))(ar || {}), nr = /* @__PURE__ */ ((r) => (r.Email = "Email", r.FirstName = "FirstName", r.LastName = "LastName", r.Phone = "Phone", r))(nr || {}), Ae = /* @__PURE__ */ ((r) => (r.Owner = "Owner", r.Approver = "Approver", r.Editor = "Editor", r.Viewer = "Viewer", r))(Ae || {}), Ft = /* @__PURE__ */ ((r) => (r.Autosize = "Autosize", r.Traditional = "Traditional", r))(Ft || {}), H = /* @__PURE__ */ ((r) => (r[r.North = 0] = "North", r[r.Northeast = 1] = "Northeast", r[r.East = 2] = "East", r[r.Southeast = 3] = "Southeast", r[r.South = 4] = "South", r[r.Southwest = 5] = "Southwest", r[r.West = 6] = "West", r[r.Northwest = 7] = "Northwest", r))(H || {}), rr = /* @__PURE__ */ ((r) => (r.Pixel = "px", r.Millimeter = "mm", r.Centimeter = "cm", r))(rr || {});
21
21
  class Ga extends Error {
22
22
  constructor(t) {
23
23
  super(t), this.name = this.constructor.name;
@@ -63,7 +63,7 @@ class z extends we {
63
63
  super(`Unhandled Behavior Encountered: ${t}`);
64
64
  }
65
65
  }
66
- class It extends we {
66
+ class bt extends we {
67
67
  constructor(t) {
68
68
  super(`Parsing Error: ${t}`);
69
69
  }
@@ -156,7 +156,7 @@ class or {
156
156
  }
157
157
  const pt = new or();
158
158
  let je, He;
159
- function bl(r) {
159
+ function Il(r) {
160
160
  je = r;
161
161
  }
162
162
  function Dl(r) {
@@ -350,7 +350,7 @@ class yr {
350
350
  });
351
351
  }
352
352
  }
353
- const I = new yr();
353
+ const b = new yr();
354
354
  let qe, Ye;
355
355
  const dt = (r, t, e) => {
356
356
  if (qe !== void 0)
@@ -3147,12 +3147,12 @@ function Fl(r) {
3147
3147
  const t = Gt.indexOf(r);
3148
3148
  return t >= 0 ? Dt[t] : "";
3149
3149
  }
3150
- function Ir(r) {
3150
+ function br(r) {
3151
3151
  const t = Dt.indexOf(r);
3152
3152
  return t >= 0 ? Gt[t] : "";
3153
3153
  }
3154
3154
  function xl(r, t = 64) {
3155
- const e = [], a = [], n = Ir(r);
3155
+ const e = [], a = [], n = br(r);
3156
3156
  n && e.push({
3157
3157
  pms: n,
3158
3158
  hex: r,
@@ -3169,7 +3169,7 @@ function xl(r, t = 64) {
3169
3169
  a[A] <= t && !e.some((u) => u.pms === Gt[A]) && e.push({ pms: Gt[A], hex: Dt[A], distance: a[A] });
3170
3170
  return e.sort((A, u) => A.distance - u.distance);
3171
3171
  }
3172
- const br = Gt.map((r, t) => ({ pms: r, hex: Dt[t] })), Dr = new Jn(br, { keys: ["pms"] });
3172
+ const Ir = Gt.map((r, t) => ({ pms: r, hex: Dt[t] })), Dr = new Jn(Ir, { keys: ["pms"] });
3173
3173
  function kl(r, t) {
3174
3174
  return Dr.search(r, t ? { limit: t } : void 0);
3175
3175
  }
@@ -3462,14 +3462,14 @@ const ee = (r) => {
3462
3462
  ...AssetFields
3463
3463
  }
3464
3464
  }
3465
- `, Je = async (r) => (await I.getShadowGraphqlClient().query({
3465
+ `, Je = async (r) => (await b.getShadowGraphqlClient().query({
3466
3466
  query: Rr,
3467
3467
  errorPolicy: "all",
3468
3468
  fetchPolicy: "no-cache",
3469
3469
  variables: {
3470
3470
  keys: r
3471
3471
  }
3472
- })).data.assets, $r = async (r) => (await I.getShadowGraphqlClient().query({
3472
+ })).data.assets, $r = async (r) => (await b.getShadowGraphqlClient().query({
3473
3473
  query: Or,
3474
3474
  errorPolicy: "all",
3475
3475
  variables: {
@@ -3477,7 +3477,7 @@ const ee = (r) => {
3477
3477
  }
3478
3478
  })).data.materials, Vr = async (r, t, e, a, n) => {
3479
3479
  var s;
3480
- return (s = (await I.getShadowGraphqlClient().mutate({
3480
+ return (s = (await b.getShadowGraphqlClient().mutate({
3481
3481
  mutation: Ur,
3482
3482
  errorPolicy: "all",
3483
3483
  fetchPolicy: "no-cache",
@@ -3596,7 +3596,7 @@ class zr {
3596
3596
  }
3597
3597
  const n = (async () => {
3598
3598
  var s, o;
3599
- const i = await I.getShadowGraphqlClient().mutate({
3599
+ const i = await b.getShadowGraphqlClient().mutate({
3600
3600
  mutation: Lr,
3601
3601
  fetchPolicy: "no-cache",
3602
3602
  errorPolicy: "all",
@@ -3632,7 +3632,7 @@ class zr {
3632
3632
  if (e === "image/svg+xml") {
3633
3633
  const a = await t.blob.text(), s = new window.DOMParser().parseFromString(a, "image/svg+xml").documentElement;
3634
3634
  if (!s)
3635
- throw new It("Failed to read SVG.");
3635
+ throw new bt("Failed to read SVG.");
3636
3636
  Mr(s);
3637
3637
  const l = St().serializeToString(s);
3638
3638
  return {
@@ -3722,7 +3722,7 @@ const Tt = "persistentAssets", rn = class ht {
3722
3722
  };
3723
3723
  rn.callbacks = [];
3724
3724
  let Et = rn;
3725
- const Ia = "bgrmPersistentAssets";
3725
+ const ba = "bgrmPersistentAssets";
3726
3726
  class J {
3727
3727
  static has(t) {
3728
3728
  return J.getMap().has(t);
@@ -3749,10 +3749,10 @@ class J {
3749
3749
  a && (e.delete(a), J.setMap(e));
3750
3750
  }
3751
3751
  static getMap() {
3752
- return M.getMap(Ia) || /* @__PURE__ */ new Map();
3752
+ return M.getMap(ba) || /* @__PURE__ */ new Map();
3753
3753
  }
3754
3754
  static setMap(t) {
3755
- M.setMap(Ia, t);
3755
+ M.setMap(ba, t);
3756
3756
  }
3757
3757
  }
3758
3758
  const U = new zr();
@@ -3834,7 +3834,7 @@ const Wt = new Gr(), sn = S`
3834
3834
  }
3835
3835
  }
3836
3836
  `, jr = async (r) => {
3837
- const t = await I.getShadowGraphqlClient().query({
3837
+ const t = await b.getShadowGraphqlClient().query({
3838
3838
  query: Wr,
3839
3839
  errorPolicy: "all",
3840
3840
  variables: {
@@ -5039,14 +5039,14 @@ const X = new Yr(), on = S`
5039
5039
  internalId
5040
5040
  }
5041
5041
  }
5042
- `, Qt = [b.SilentIllustration, b.ProductOverlay], pi = async (r) => {
5042
+ `, Qt = [I.SilentIllustration, I.ProductOverlay], pi = async (r) => {
5043
5043
  const t = [];
5044
5044
  r.introduction && t.push({
5045
5045
  name: "Introduction",
5046
5046
  title: r.name,
5047
5047
  renderableSteps: [
5048
5048
  {
5049
- type: b.Introduction,
5049
+ type: I.Introduction,
5050
5050
  stepName: "Introduction",
5051
5051
  stepTitle: r.name,
5052
5052
  helpText: r.introduction,
@@ -5081,7 +5081,7 @@ const X = new Yr(), on = S`
5081
5081
  title: e,
5082
5082
  renderableSteps: [
5083
5083
  {
5084
- type: b.Finish,
5084
+ type: I.Finish,
5085
5085
  stepName: "Finish",
5086
5086
  stepTitle: e,
5087
5087
  helpText: "",
@@ -5117,7 +5117,7 @@ const X = new Yr(), on = S`
5117
5117
  for (const o of a)
5118
5118
  for (const l of o.renderableSteps) {
5119
5119
  const c = (((s = l.option) == null ? void 0 : s.variants) || []).length;
5120
- l.silent || (l.type === b.Model || l.type === b.Material || l.type === b.Picture || l.type === b.Shape ? (c > 1 || e) && n.push(l.stepName) : n.push(l.stepName));
5120
+ l.silent || (l.type === I.Model || l.type === I.Material || l.type === I.Picture || l.type === I.Shape ? (c > 1 || e) && n.push(l.stepName) : n.push(l.stepName));
5121
5121
  }
5122
5122
  const i = a.filter((o) => o.renderableSteps.filter(
5123
5123
  (c) => n.includes(c.stepName)
@@ -5599,7 +5599,7 @@ const Bi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Te = /* @_
5599
5599
  }
5600
5600
  })();
5601
5601
  return Te.set(r, e), e;
5602
- }, Ii = (r) => {
5602
+ }, bi = (r) => {
5603
5603
  const t = Ya(r), e = Ge(t);
5604
5604
  return Ke(r, e), e;
5605
5605
  }, wt = (r) => {
@@ -5647,7 +5647,7 @@ const Bi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Te = /* @_
5647
5647
  }
5648
5648
  return e.querySelectorAll("text").forEach((d) => d.remove()), St().serializeToString(a);
5649
5649
  }, me = (r, t, e, a) => Math.max(Fi(r.join(`
5650
- `), e, a), t), ba = (r, t, e, a, n, i) => {
5650
+ `), e, a), t), Ia = (r, t, e, a, n, i) => {
5651
5651
  const s = (i || ca) * n.getApproximateHeight(), o = t.split(`
5652
5652
  `);
5653
5653
  try {
@@ -5698,14 +5698,14 @@ const Bi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Te = /* @_
5698
5698
  if (l < 0)
5699
5699
  throw new Error(`No max width calculated for text: ${o}.`);
5700
5700
  return { lines: o, width: l };
5701
- }, bi = (r, t, e, a, n, i) => {
5701
+ }, Ii = (r, t, e, a, n, i) => {
5702
5702
  const s = (i ?? ca) * t.getApproximateHeight(), o = 1 / e.unitsPerEm, l = pn(r, o, t), c = r.length * s * o, d = a / l, A = n / c;
5703
5703
  return Math.min(A, d);
5704
5704
  }, Di = (r, t, e, a) => {
5705
5705
  var c;
5706
5706
  const n = wt(t.fontData.assetUrl), i = n.getFont(), s = t.fontSize / i.unitsPerEm;
5707
5707
  if (!e)
5708
- return ba(t, r, t.fontSize, s, n, a);
5708
+ return Ia(t, r, t.fontSize, s, n, a);
5709
5709
  let o;
5710
5710
  if (t.text ? o = t.text.split(`
5711
5711
  `) : o = ((c = t.input) == null ? void 0 : c.split(`
@@ -5721,8 +5721,8 @@ const Bi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Te = /* @_
5721
5721
  lines: o,
5722
5722
  requiredHeight: t.height,
5723
5723
  requiredWidth: me(o, t.width, s, n),
5724
- fontSize: bi(o, n, i, t.width, t.height, a)
5725
- } : ba(t, r, t.fontSize, s, n, a);
5724
+ fontSize: Ii(o, n, i, t.width, t.height, a)
5725
+ } : Ia(t, r, t.fontSize, s, n, a);
5726
5726
  }, Pi = (r, t, e, a, n) => {
5727
5727
  const s = wt(t.assetUrl).getFont();
5728
5728
  let o = { ...r };
@@ -6095,7 +6095,7 @@ const Zt = (r) => {
6095
6095
  if (!e.asset)
6096
6096
  throw new Error(`No asset for variant with ID: ${r.frameVariantId}`);
6097
6097
  return e;
6098
- }, Ie = async (r) => {
6098
+ }, be = async (r) => {
6099
6099
  if (Ne.has(r))
6100
6100
  return Ne.get(r);
6101
6101
  const e = (async () => {
@@ -6268,7 +6268,7 @@ const Zt = (r) => {
6268
6268
  };
6269
6269
  class jl {
6270
6270
  static async getFrame(t, e) {
6271
- const a = await yn(e.region, e.src), n = await Ie(a), i = e.region || await Rt(t, T.Frame);
6271
+ const a = await yn(e.region, e.src), n = await be(a), i = e.region || await Rt(t, T.Frame);
6272
6272
  return {
6273
6273
  id: Q(),
6274
6274
  x: i.left,
@@ -7110,14 +7110,14 @@ class Ma {
7110
7110
  if (!i)
7111
7111
  throw new Y(n);
7112
7112
  let s = "";
7113
- if (this.configuration.type === b.ProductOverlay) {
7113
+ if (this.configuration.type === I.ProductOverlay) {
7114
7114
  let u = "";
7115
7115
  if ((l = this.product) != null && l.overlayImageUrl && (u = this.product.overlayImageUrl), s = u, !u)
7116
7116
  throw new he(this.configuration, "Couldn't find an asset for product overlay step");
7117
7117
  }
7118
7118
  const o = this.evaluateAssetType();
7119
7119
  if (o === T.Image) {
7120
- const u = this.configuration.type === b.SilentIllustration ? (c = this.configuration.data.asset) == null ? void 0 : c.fileLink : (d = this.product) == null ? void 0 : d.overlayImageUrl;
7120
+ const u = this.configuration.type === I.SilentIllustration ? (c = this.configuration.data.asset) == null ? void 0 : c.fileLink : (d = this.product) == null ? void 0 : d.overlayImageUrl;
7121
7121
  if (!u)
7122
7122
  throw new Error("Undefined raster silent step source");
7123
7123
  const h = {
@@ -7132,7 +7132,7 @@ class Ma {
7132
7132
  layer: n.layer,
7133
7133
  layerIndex: n.layerIndex,
7134
7134
  immutable: n.immutable,
7135
- productOverlay: this.configuration.type === b.ProductOverlay ? !0 : void 0,
7135
+ productOverlay: this.configuration.type === I.ProductOverlay ? !0 : void 0,
7136
7136
  rotation: n.rotation,
7137
7137
  excludeFromExport: this.configuration.data.excludeFromPrint,
7138
7138
  preserveAspectRatio: "none"
@@ -7145,7 +7145,7 @@ class Ma {
7145
7145
  command: new W(h, i)
7146
7146
  };
7147
7147
  } else {
7148
- const u = this.configuration.type === b.SilentIllustration ? (A = this.configuration.data.asset) == null ? void 0 : A.fileLink : s, m = await At(await (async () => new Promise((f, p) => {
7148
+ const u = this.configuration.type === I.SilentIllustration ? (A = this.configuration.data.asset) == null ? void 0 : A.fileLink : s, m = await At(await (async () => new Promise((f, p) => {
7149
7149
  if (!u) {
7150
7150
  p("Undefined vector silent step source");
7151
7151
  return;
@@ -7169,7 +7169,7 @@ class Ma {
7169
7169
  layerIndex: n.layerIndex,
7170
7170
  rotation: n.rotation,
7171
7171
  immutable: n.immutable,
7172
- productOverlay: this.configuration.type === b.ProductOverlay ? !0 : void 0,
7172
+ productOverlay: this.configuration.type === I.ProductOverlay ? !0 : void 0,
7173
7173
  excludeFromExport: this.configuration.data.excludeFromPrint
7174
7174
  };
7175
7175
  return {
@@ -7185,11 +7185,11 @@ class Ma {
7185
7185
  async trigger() {
7186
7186
  if (!this.configuration.data.regions)
7187
7187
  throw new he(this.configuration, "Missing regions.");
7188
- if (this.configuration.type === b.SilentIllustration) {
7188
+ if (this.configuration.type === I.SilentIllustration) {
7189
7189
  const t = this.configuration.data.regions.map(this.processRegion);
7190
7190
  return Promise.all(t);
7191
7191
  } else
7192
- return this.configuration.type === b.ProductOverlay ? Promise.all(
7192
+ return this.configuration.type === I.ProductOverlay ? Promise.all(
7193
7193
  this.configuration.data.regions.map((t) => {
7194
7194
  if (!this.layouts.find((a) => t.panelId === a.panelId))
7195
7195
  throw new Y(t);
@@ -7199,7 +7199,7 @@ class Ma {
7199
7199
  }
7200
7200
  evaluateAssetType() {
7201
7201
  var e, a, n;
7202
- const t = this.configuration.type === b.ProductOverlay && ((e = this.product) != null && e.overlayImageUrl) ? this.product.overlayImageUrl.toLowerCase() : (n = (a = this.configuration.data.asset) == null ? void 0 : a.fileLink) == null ? void 0 : n.toLowerCase().split("?")[0];
7202
+ const t = this.configuration.type === I.ProductOverlay && ((e = this.product) != null && e.overlayImageUrl) ? this.product.overlayImageUrl.toLowerCase() : (n = (a = this.configuration.data.asset) == null ? void 0 : a.fileLink) == null ? void 0 : n.toLowerCase().split("?")[0];
7203
7203
  return t != null && t.startsWith("data:image/png") || t != null && t.endsWith(".jpeg") || t != null && t.endsWith(".jpg") || t != null && t.endsWith(".png") ? T.Image : (t != null && t.endsWith(".svg") || t != null && t.startsWith("image/svg+xml"), T.Illustration);
7204
7204
  }
7205
7205
  }
@@ -7217,7 +7217,7 @@ const ji = async (r) => {
7217
7217
  throw console.error(e), new ye("Failed to shorten URL, see console.");
7218
7218
  }
7219
7219
  };
7220
- class In {
7220
+ class bn {
7221
7221
  async poll() {
7222
7222
  try {
7223
7223
  if (await this.predicate()) {
@@ -7264,7 +7264,7 @@ class Hi {
7264
7264
  const h = (await Je([e]))[0], m = (f = (g = h == null ? void 0 : h.versions) == null ? void 0 : g.find((p) => p.name === "mpeg4")) == null ? void 0 : f.link;
7265
7265
  return { asset: h, link: m };
7266
7266
  }, s = await new Promise((h, m) => {
7267
- new In(
7267
+ new bn(
7268
7268
  async () => !!(await i()).link,
7269
7269
  async () => {
7270
7270
  const g = await i();
@@ -7332,7 +7332,7 @@ class Hi {
7332
7332
  } };
7333
7333
  }
7334
7334
  }
7335
- const bn = new Hi();
7335
+ const In = new Hi();
7336
7336
  class qi {
7337
7337
  constructor() {
7338
7338
  this.frameSourceSvg = async (t, e) => {
@@ -7452,7 +7452,7 @@ class qi {
7452
7452
  const o = e.fileLink || "";
7453
7453
  return o.endsWith(".pdf") || o.endsWith(".eps") || o.endsWith(".ai") ? new Promise((c) => {
7454
7454
  a.addPoller(
7455
- new In(
7455
+ new bn(
7456
7456
  async () => {
7457
7457
  var h;
7458
7458
  const A = (h = (await U.getFromServer(e.key || "")).versions) == null ? void 0 : h.find((m) => m.name === "svg");
@@ -7622,7 +7622,7 @@ class qi {
7622
7622
  i && i(!0);
7623
7623
  const c = t.data.initialZoomLevel, d = await Promise.all(
7624
7624
  t.data.regions.map(async (m, g) => {
7625
- const f = await Ie(l[g]), p = o.getImageData(), C = a.map((D) => new yt(D.id)), w = p ? ua(
7625
+ const f = await be(l[g]), p = o.getImageData(), C = a.map((D) => new yt(D.id)), w = p ? ua(
7626
7626
  p,
7627
7627
  f,
7628
7628
  c && !t.data.forceImageCover ? { scale: c } : void 0,
@@ -9280,7 +9280,7 @@ class us {
9280
9280
  u = (A * 100 | 0) / 100;
9281
9281
  break;
9282
9282
  default:
9283
- throw new It("Failed to encode path.");
9283
+ throw new bt("Failed to encode path.");
9284
9284
  }
9285
9285
  l || s.push(" "), s.push(u), l = !1;
9286
9286
  }
@@ -9294,12 +9294,12 @@ class us {
9294
9294
  for (e.lastIndex = 0; i = e.exec(t); ) {
9295
9295
  const s = i[1].toLowerCase(), o = (i[2].match(a) || []).map(parseFloat), l = s === i[1], c = Ta[s];
9296
9296
  if (o.length < c.length)
9297
- throw new It(
9297
+ throw new bt(
9298
9298
  `Path type "${s}" given ${o.length} arguments, expected ${c.length}.`
9299
9299
  );
9300
9300
  if (c.length > 0) {
9301
9301
  if (o.length % c.length !== 0)
9302
- throw new It(
9302
+ throw new bt(
9303
9303
  `Path type "${s}" given ${o.length} arguments, not divisible by ${c.length}`
9304
9304
  );
9305
9305
  for (let d = 0; d < o.length / c.length; d++) {
@@ -9324,7 +9324,7 @@ class us {
9324
9324
  if (o in i && l in i) {
9325
9325
  const c = [i[o], i[l]], d = e(c);
9326
9326
  if (d.length < 2)
9327
- throw new It("Transformer must return at least 2 points.");
9327
+ throw new bt("Transformer must return at least 2 points.");
9328
9328
  i[o] = d[0], i[l] = d[1];
9329
9329
  }
9330
9330
  }
@@ -9358,7 +9358,7 @@ class hs extends is {
9358
9358
  return this.svgElement(t, e);
9359
9359
  }
9360
9360
  svgElement(t, e) {
9361
- const a = Ii(ss), i = t !== "" ? ((w) => w.charAt(0).toUpperCase() + w.substr(1).toLowerCase())(t) : "", s = a.getPath(i, 0, 72, 72), o = s.toSVG(2), l = s.getBoundingBox(), c = l.x2 - l.x1, d = s.toPathData(3), A = () => {
9361
+ const a = bi(ss), i = t !== "" ? ((w) => w.charAt(0).toUpperCase() + w.substr(1).toLowerCase())(t) : "", s = a.getPath(i, 0, 72, 72), o = s.toSVG(2), l = s.getBoundingBox(), c = l.x2 - l.x1, d = s.toPathData(3), A = () => {
9362
9362
  const w = _("g");
9363
9363
  w.classList.add("module-text-group");
9364
9364
  const y = _("defs");
@@ -9394,7 +9394,7 @@ async function Mn(r) {
9394
9394
  return new hs();
9395
9395
  throw new z(`Failed to resolve Module, Module ${r} not found`);
9396
9396
  }
9397
- const be = S`
9397
+ const Ie = S`
9398
9398
  fragment GlobalPropertyStateAspectFields on GlobalPropertyStateAspect {
9399
9399
  name
9400
9400
  value
@@ -9411,7 +9411,7 @@ const be = S`
9411
9411
  }
9412
9412
  }
9413
9413
  `, ms = S`
9414
- ${be}
9414
+ ${Ie}
9415
9415
  mutation CreateGlobalPropertyState($bundleId: String!) {
9416
9416
  globalPropertyStateCreate(bundleId: $bundleId) {
9417
9417
  id
@@ -9421,7 +9421,7 @@ const be = S`
9421
9421
  }
9422
9422
  }
9423
9423
  `, gs = S`
9424
- ${be}
9424
+ ${Ie}
9425
9425
  mutation UpdateGlobalPropertyState($id: String!, $aspects: [GlobalPropertyStateAspectInput]!) {
9426
9426
  globalPropertyStateUpdate(id: $id, aspects: $aspects) {
9427
9427
  id
@@ -9432,7 +9432,7 @@ const be = S`
9432
9432
  }
9433
9433
  `;
9434
9434
  S`
9435
- ${be}
9435
+ ${Ie}
9436
9436
  query GetGlobalPropertyState($bundleId: String!) {
9437
9437
  globalPropertyState(bundleId: $bundleId) {
9438
9438
  id
@@ -9548,7 +9548,7 @@ const fs = S`
9548
9548
  }
9549
9549
  }
9550
9550
  `, ps = (r) => S`
9551
- ${be}
9551
+ ${Ie}
9552
9552
  ${De(r)}
9553
9553
  query GetBundle($id: String!) {
9554
9554
  globalPropertyState(bundleId: $id) {
@@ -9763,13 +9763,13 @@ const fs = S`
9763
9763
  id
9764
9764
  }
9765
9765
  }
9766
- `, Is = S`
9766
+ `, bs = S`
9767
9767
  mutation BundleAddTransaction($id: String!, $transactionId: String!) {
9768
9768
  bundleAddTransaction(id: $id, transactionId: $transactionId) {
9769
9769
  id
9770
9770
  }
9771
9771
  }
9772
- `, bs = S`
9772
+ `, Is = S`
9773
9773
  mutation BundleAddTransactions($id: String!, $transactionIds: [String!]!, $transactionOwnerIds: [String!]) {
9774
9774
  bundleAddTransactions(id: $id, transactionIds: $transactionIds, transactionOwnerIds: $transactionOwnerIds) {
9775
9775
  id
@@ -10165,7 +10165,7 @@ class zs {
10165
10165
  },
10166
10166
  { refocusCamera: e }
10167
10167
  );
10168
- this.setModelContainer(a), Bt(this.allScenes, this.stepSelections).filter((s) => s).map((s) => s.renderableSteps).flat().filter((s) => s.type === b.Model || s.type === b.Material).forEach((s) => {
10168
+ this.setModelContainer(a), Bt(this.allScenes, this.stepSelections).filter((s) => s).map((s) => s.renderableSteps).flat().filter((s) => s.type === I.Model || s.type === I.Material).forEach((s) => {
10169
10169
  var c, d, A;
10170
10170
  if (!((c = s.option) != null && c.id)) {
10171
10171
  console.error(`Failed to read option id from step: ${s.stepName}`);
@@ -10175,7 +10175,7 @@ class zs {
10175
10175
  if (o.length === 0)
10176
10176
  return;
10177
10177
  const l = o[0];
10178
- if (s.type === b.Model) {
10178
+ if (s.type === I.Model) {
10179
10179
  if (!this.modelContainer)
10180
10180
  throw new z(
10181
10181
  "We should always have a model container when injecting a preview!"
@@ -10277,7 +10277,7 @@ class zs {
10277
10277
  const t = this.getCommandContext().getState();
10278
10278
  if (!t)
10279
10279
  throw new z("Attempted to serialize state before it was initialized.");
10280
- const e = bt(t.transaction), a = this.dehydrateState(e);
10280
+ const e = It(t.transaction), a = this.dehydrateState(e);
10281
10281
  return JSON.stringify(a);
10282
10282
  }
10283
10283
  /**
@@ -10319,17 +10319,17 @@ class zs {
10319
10319
  ), t), []);
10320
10320
  }
10321
10321
  getInvalidModelVariants() {
10322
- return this.workflow.steps.reduce((t, e) => (e.type === b.Model && !ft(e, this.stepSelections) && t.push(e.stepName), t), []);
10322
+ return this.workflow.steps.reduce((t, e) => (e.type === I.Model && !ft(e, this.stepSelections) && t.push(e.stepName), t), []);
10323
10323
  }
10324
10324
  async stepElementsForIntroducedSilentSteps(t, e) {
10325
10325
  const a = this.product;
10326
10326
  if (!a)
10327
10327
  return Promise.resolve({ stepElements: {}, commands: [] });
10328
10328
  const n = async (c, d, A) => {
10329
- if (c.type === b.SilentIllustration) {
10329
+ if (c.type === I.SilentIllustration) {
10330
10330
  const u = await new Ma(c, d).trigger();
10331
10331
  return { step: c, results: u };
10332
- } else if (c.type === b.ProductOverlay) {
10332
+ } else if (c.type === I.ProductOverlay) {
10333
10333
  const u = await new Ma(
10334
10334
  c,
10335
10335
  d,
@@ -10375,7 +10375,7 @@ class zs {
10375
10375
  }
10376
10376
  async updateTransactionStakeholders() {
10377
10377
  var e;
10378
- const t = await I.getShadowGraphqlClient().query({
10378
+ const t = await b.getShadowGraphqlClient().query({
10379
10379
  query: ni,
10380
10380
  errorPolicy: "all",
10381
10381
  fetchPolicy: "no-cache",
@@ -10386,7 +10386,7 @@ class zs {
10386
10386
  !((e = t == null ? void 0 : t.data) != null && e.transactions) || t.data.transactions.length !== 1 ? (this.transaction.currentStakeholder = void 0, this.transaction.stakeholders = void 0) : (this.transaction.stakeholders = t.data.transactions[0].stakeholders, this.transaction.currentStakeholder = t.data.transactions[0].currentStakeholder);
10387
10387
  }
10388
10388
  async approveTransaction(t) {
10389
- await I.getShadowGraphqlClient().mutate({
10389
+ await b.getShadowGraphqlClient().mutate({
10390
10390
  mutation: Ls,
10391
10391
  errorPolicy: "all",
10392
10392
  fetchPolicy: "no-cache",
@@ -10397,7 +10397,7 @@ class zs {
10397
10397
  });
10398
10398
  }
10399
10399
  async rejectTransaction(t) {
10400
- await I.getShadowGraphqlClient().mutate({
10400
+ await b.getShadowGraphqlClient().mutate({
10401
10401
  mutation: $s,
10402
10402
  errorPolicy: "all",
10403
10403
  fetchPolicy: "no-cache",
@@ -10436,7 +10436,7 @@ class zs {
10436
10436
  [t]: a
10437
10437
  }, this.removeElements(u);
10438
10438
  const g = this.workflow.steps.find((E) => E.stepName === t);
10439
- if ((g == null ? void 0 : g.type) === b.Frame) {
10439
+ if ((g == null ? void 0 : g.type) === I.Frame) {
10440
10440
  const E = (v = this.getWorkflowExperience().getStepById(g.stepName)) == null ? void 0 : v.frameService;
10441
10441
  E == null || E.setTargetElements(a.map((B) => B.id));
10442
10442
  }
@@ -10462,54 +10462,54 @@ class zs {
10462
10462
  for (const l of n)
10463
10463
  if (!this.stepInitialised[l.stepName])
10464
10464
  switch (this.stepInitialised[l.stepName] = !0, l.type) {
10465
- case b.DigitalContent:
10465
+ case I.DigitalContent:
10466
10466
  a.push(
10467
- bn.init(
10467
+ In.init(
10468
10468
  l,
10469
10469
  this,
10470
10470
  this.reloadedState
10471
10471
  )
10472
10472
  );
10473
10473
  break;
10474
- case b.Frame:
10474
+ case I.Frame:
10475
10475
  a.push(
10476
10476
  mt.init(l, this, this.reloadedState)
10477
10477
  );
10478
10478
  break;
10479
- case b.Illustration:
10479
+ case I.Illustration:
10480
10480
  a.push(
10481
10481
  le.init(l, this, this.reloadedState)
10482
10482
  );
10483
10483
  break;
10484
- case b.Material:
10484
+ case I.Material:
10485
10485
  a.push(
10486
10486
  Dn.init(l, this, this.reloadedState)
10487
10487
  );
10488
10488
  break;
10489
- case b.Model:
10489
+ case I.Model:
10490
10490
  a.push(Pn.init(l, this, this.reloadedState));
10491
10491
  break;
10492
- case b.Module:
10492
+ case I.Module:
10493
10493
  this.stepSpecificServices[l.stepName] = {
10494
10494
  module: await Mn(l.data.module)
10495
10495
  }, a.push(
10496
10496
  Fn.init(l, this, this.reloadedState)
10497
10497
  );
10498
10498
  break;
10499
- case b.Picture:
10499
+ case I.Picture:
10500
10500
  a.push(
10501
10501
  xn.init(l, this, this.reloadedState)
10502
10502
  );
10503
10503
  break;
10504
- case b.Question:
10504
+ case I.Question:
10505
10505
  a.push(
10506
10506
  kn.init(l, this, this.reloadedState)
10507
10507
  );
10508
10508
  break;
10509
- case b.Shape:
10509
+ case I.Shape:
10510
10510
  a.push(Ut.init(l, this, this.reloadedState));
10511
10511
  break;
10512
- case b.Text:
10512
+ case I.Text:
10513
10513
  a.push(q.init(l, this, this.reloadedState));
10514
10514
  break;
10515
10515
  }
@@ -11196,7 +11196,7 @@ class Xs extends nt {
11196
11196
  * @returns The final URL string for the QR code.
11197
11197
  */
11198
11198
  async selectVideo(t) {
11199
- return bn.regenerateQRCode(
11199
+ return In.regenerateQRCode(
11200
11200
  this.manager.getRegionElements(this.step.stepName),
11201
11201
  t.key,
11202
11202
  this.manager,
@@ -11254,27 +11254,27 @@ class Zs extends nt {
11254
11254
  class ne {
11255
11255
  static get(t, e) {
11256
11256
  switch (e.type) {
11257
- case b.DigitalContent:
11257
+ case I.DigitalContent:
11258
11258
  return new Xs(t, e, t.getStepTags(e.stepName));
11259
- case b.Information:
11259
+ case I.Information:
11260
11260
  return new Ks(t, e, t.getStepTags(e.stepName));
11261
- case b.Question:
11261
+ case I.Question:
11262
11262
  return new qs(t, e, t.getStepTags(e.stepName));
11263
- case b.Text:
11263
+ case I.Text:
11264
11264
  return new Js(t, e, t.getStepTags(e.stepName));
11265
- case b.Illustration:
11265
+ case I.Illustration:
11266
11266
  return new Gs(t, e, t.getStepTags(e.stepName));
11267
- case b.Picture:
11267
+ case I.Picture:
11268
11268
  return new Hs(t, e, t.getStepTags(e.stepName));
11269
- case b.Shape:
11269
+ case I.Shape:
11270
11270
  return new Ys(t, e, t.getStepTags(e.stepName));
11271
- case b.Material:
11271
+ case I.Material:
11272
11272
  return new Ws(t, e, t.getStepTags(e.stepName));
11273
- case b.Model:
11273
+ case I.Model:
11274
11274
  return new js(t, e, t.getStepTags(e.stepName));
11275
- case b.Frame:
11275
+ case I.Frame:
11276
11276
  return new Zo(t, e, t.getStepTags(e.stepName));
11277
- case b.Module:
11277
+ case I.Module:
11278
11278
  return new Zs(t, e, t.getStepTags(e.stepName));
11279
11279
  default:
11280
11280
  throw new z(`Step type ${e.type} not yet supported in Core SDK`);
@@ -11360,7 +11360,7 @@ function Ce(r) {
11360
11360
  const eo = async (r) => {
11361
11361
  var s, o;
11362
11362
  const e = ((s = Object.entries(localStorage).find(([l, c]) => l.startsWith("CognitoIdentityServiceProvider") && l.endsWith("idToken"))) == null ? void 0 : s[0]) || "", a = localStorage.getItem(e), n = {};
11363
- return a && !Ce(a) && (n.Authorization = `Bearer ${a}`), (o = (await I.getShadowGraphqlClient().mutate({
11363
+ return a && !Ce(a) && (n.Authorization = `Bearer ${a}`), (o = (await b.getShadowGraphqlClient().mutate({
11364
11364
  mutation: _s,
11365
11365
  errorPolicy: "all",
11366
11366
  fetchPolicy: "no-cache",
@@ -11381,7 +11381,7 @@ const eo = async (r) => {
11381
11381
  }, ao = async (r) => {
11382
11382
  var s, o;
11383
11383
  const e = ((s = Object.entries(localStorage).find(([l, c]) => l.startsWith("CognitoIdentityServiceProvider") && l.endsWith("idToken"))) == null ? void 0 : s[0]) || "", a = localStorage.getItem(e), n = {};
11384
- return a && !Ce(a) && (n.Authorization = `Bearer ${a}`), (o = (await I.getShadowGraphqlClient().mutate({
11384
+ return a && !Ce(a) && (n.Authorization = `Bearer ${a}`), (o = (await b.getShadowGraphqlClient().mutate({
11385
11385
  mutation: to,
11386
11386
  errorPolicy: "all",
11387
11387
  fetchPolicy: "no-cache",
@@ -11488,7 +11488,7 @@ const eo = async (r) => {
11488
11488
  if (c !== void 0)
11489
11489
  return c;
11490
11490
  await r.outstandingRequestsPromise();
11491
- const x = (M.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(n.id), N = await I.getShadowGraphqlClient().query({
11491
+ const x = (M.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(n.id), N = await b.getShadowGraphqlClient().query({
11492
11492
  query: dn,
11493
11493
  variables: { ids: [n.id] },
11494
11494
  fetchPolicy: "no-cache",
@@ -11613,7 +11613,7 @@ const eo = async (r) => {
11613
11613
  );
11614
11614
  const n = await (async () => {
11615
11615
  var c;
11616
- const l = await I.getShadowGraphqlClient().query({
11616
+ const l = await b.getShadowGraphqlClient().query({
11617
11617
  query: dn,
11618
11618
  variables: { ids: r.map((d) => d.transaction.id) },
11619
11619
  fetchPolicy: "no-cache",
@@ -11990,7 +11990,7 @@ class co {
11990
11990
  }
11991
11991
  async assignCustomerDetails(t) {
11992
11992
  var s, o, l;
11993
- const a = (M.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(this.getWorkflowManager().getTransaction().id), i = (l = (o = (s = (await I.getShadowGraphqlClient().mutate({
11993
+ const a = (M.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(this.getWorkflowManager().getTransaction().id), i = (l = (o = (s = (await b.getShadowGraphqlClient().mutate({
11994
11994
  mutation: oo,
11995
11995
  variables: {
11996
11996
  id: this.getWorkflowManager().getTransaction().id,
@@ -12041,7 +12041,7 @@ class co {
12041
12041
  }
12042
12042
  async copy() {
12043
12043
  var s;
12044
- const t = bt(this.getCommandContext().getState());
12044
+ const t = It(this.getCommandContext().getState());
12045
12045
  if (!t)
12046
12046
  throw new z("Internal state is undefined! Cannot copy experience!");
12047
12047
  const e = JSON.stringify(t.transaction), a = this.getWorkflowManager().getWorkflow(), n = (s = this.getWorkflowManager().getTransaction().integrationProduct) == null ? void 0 : s.id;
@@ -12056,7 +12056,7 @@ class co {
12056
12056
  }
12057
12057
  async onDesignFinished(t, e = !0) {
12058
12058
  const a = this.workflowManager.getTransaction();
12059
- return a.completed ? (await I.getShadowGraphqlClient().mutate({
12059
+ return a.completed ? (await b.getShadowGraphqlClient().mutate({
12060
12060
  mutation: ri,
12061
12061
  variables: {
12062
12062
  transactionId: a.id
@@ -12090,7 +12090,7 @@ class co {
12090
12090
  * @returns Returns true when a valid handle is implemented for a given step type. Certain steps don't support handles, such as silent illustrations.
12091
12091
  */
12092
12092
  stepHasHandle(t) {
12093
- return t.type !== b.SilentIllustration && t.type !== b.ProductOverlay;
12093
+ return t.type !== I.SilentIllustration && t.type !== I.ProductOverlay;
12094
12094
  }
12095
12095
  getExportedData() {
12096
12096
  var n;
@@ -12122,7 +12122,7 @@ class co {
12122
12122
  /* QuantityChanged */
12123
12123
  ), this.checkForPriceBreakChanges();
12124
12124
  const e = M.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map(), a = this.getWorkflowManager().getTransaction(), n = e.get(a.id) || void 0;
12125
- await I.getShadowGraphqlClient().mutate({
12125
+ await b.getShadowGraphqlClient().mutate({
12126
12126
  mutation: Zr,
12127
12127
  variables: {
12128
12128
  id: a.id,
@@ -12194,7 +12194,7 @@ const Ao = [
12194
12194
  o && (t[a.stepName] = { selectedVariants: [o] });
12195
12195
  const l = async (c) => {
12196
12196
  var g;
12197
- const d = await yn(c, (g = o == null ? void 0 : o.asset) == null ? void 0 : g.fileLink), A = await Ie(d), u = Q(), h = r.find((f) => f.panelId === c.panelId);
12197
+ const d = await yn(c, (g = o == null ? void 0 : o.asset) == null ? void 0 : g.fileLink), A = await be(d), u = Q(), h = r.find((f) => f.panelId === c.panelId);
12198
12198
  if (!h)
12199
12199
  throw new Y(c);
12200
12200
  const m = ua(
@@ -12446,7 +12446,7 @@ const Ao = [
12446
12446
  }, Co = async (r, t, e) => {
12447
12447
  const a = [], i = (() => {
12448
12448
  var c, d;
12449
- return t.type === b.ProductOverlay ? e || ((c = t.data.asset) == null ? void 0 : c.fileLink) || "" : ((d = t.data.asset) == null ? void 0 : d.fileLink) || "";
12449
+ return t.type === I.ProductOverlay ? e || ((c = t.data.asset) == null ? void 0 : c.fileLink) || "" : ((d = t.data.asset) == null ? void 0 : d.fileLink) || "";
12450
12450
  })(), o = (() => i.endsWith(".jpeg") || i.endsWith(".jpg") || i.endsWith(".png") ? T.Image : (i.endsWith(".svg"), T.Illustration))(), l = t.data.regions;
12451
12451
  if (o === "image")
12452
12452
  try {
@@ -12464,7 +12464,7 @@ const Ao = [
12464
12464
  height: c.height,
12465
12465
  layer: c.layer,
12466
12466
  layerIndex: c.layerIndex,
12467
- productOverlay: t.type === b.ProductOverlay ? !0 : void 0,
12467
+ productOverlay: t.type === I.ProductOverlay ? !0 : void 0,
12468
12468
  scaleX: 1,
12469
12469
  scaleY: 1,
12470
12470
  rotation: c.rotation,
@@ -12480,7 +12480,7 @@ const Ao = [
12480
12480
  const c = await at(i, !0), d = (A) => {
12481
12481
  const u = /<svg.*?<\/svg>/s, h = A.match(u) || [], m = (h == null ? void 0 : h.length) > 0 ? h[0] : "", p = ot().parseFromString(m, "image/svg+xml").firstElementChild;
12482
12482
  if (!p)
12483
- throw new It("Failed to read SVG.");
12483
+ throw new bt("Failed to read SVG.");
12484
12484
  return sa(p), St().serializeToString(p);
12485
12485
  };
12486
12486
  l.forEach((A) => {
@@ -12503,7 +12503,7 @@ const Ao = [
12503
12503
  scaleX: 1,
12504
12504
  scaleY: 1,
12505
12505
  rotation: A.rotation,
12506
- productOverlay: t.type === b.ProductOverlay ? !0 : void 0,
12506
+ productOverlay: t.type === I.ProductOverlay ? !0 : void 0,
12507
12507
  excludeFromExport: t.data.excludeFromPrint
12508
12508
  };
12509
12509
  a.push(new W(h, u));
@@ -12614,18 +12614,18 @@ const Ao = [
12614
12614
  const o = t.steps.find((l) => l.stepName === s.name);
12615
12615
  if (o)
12616
12616
  switch (o.type) {
12617
- case b.DigitalContent:
12617
+ case I.DigitalContent:
12618
12618
  n.push(
12619
12619
  ...await uo(e, s, o)
12620
12620
  );
12621
12621
  break;
12622
- case b.Frame:
12623
- case b.Photo:
12622
+ case I.Frame:
12623
+ case I.Photo:
12624
12624
  n.push(
12625
12625
  ...await ho(e, i, s, o)
12626
12626
  );
12627
12627
  break;
12628
- case b.Illustration:
12628
+ case I.Illustration:
12629
12629
  n.push(
12630
12630
  ...await mo(
12631
12631
  e,
@@ -12635,20 +12635,20 @@ const Ao = [
12635
12635
  )
12636
12636
  );
12637
12637
  break;
12638
- case b.Module:
12638
+ case I.Module:
12639
12639
  n.push(...await go(e, s, o));
12640
12640
  break;
12641
- case b.Picture:
12641
+ case I.Picture:
12642
12642
  n.push(
12643
12643
  ...await fo(e, i, s, o)
12644
12644
  );
12645
12645
  break;
12646
- case b.Shape:
12646
+ case I.Shape:
12647
12647
  n.push(
12648
12648
  ...await po(e, i, s, o)
12649
12649
  );
12650
12650
  break;
12651
- case b.Text:
12651
+ case I.Text:
12652
12652
  n.push(
12653
12653
  ...await wo(e, i, s, o)
12654
12654
  );
@@ -12656,7 +12656,7 @@ const Ao = [
12656
12656
  }
12657
12657
  }
12658
12658
  for (const s of t.steps)
12659
- s.type !== b.SilentIllustration && s.type !== b.ProductOverlay || yo(s, i) && n.push(
12659
+ s.type !== I.SilentIllustration && s.type !== I.ProductOverlay || yo(s, i) && n.push(
12660
12660
  ...await Co(e, s, a)
12661
12661
  );
12662
12662
  return n;
@@ -12668,7 +12668,7 @@ class Eo {
12668
12668
  t.forEach(
12669
12669
  (a) => e.set(
12670
12670
  a.id,
12671
- new Io(a.id, a.name, this, { width: a.width, height: a.height })
12671
+ new bo(a.id, a.name, this, { width: a.width, height: a.height })
12672
12672
  )
12673
12673
  ), this.layouts = e;
12674
12674
  }
@@ -12690,7 +12690,7 @@ const vo = () => new Promise((r, t) => {
12690
12690
  r(!1);
12691
12691
  }
12692
12692
  }), Bo = vo();
12693
- class Io {
12693
+ class bo {
12694
12694
  constructor(t, e, a, n) {
12695
12695
  this.hasSetStaticContext = !1, this.interactiveDirty = !1, this.staticCtxDirty = !1, this.lastRequestedRenderArguments = void 0, this.lastCompletedStaticRender = void 0, this.renderQueue = new hn(2), this.id = t, this.name = e, this.service = a, this.panelSize = n;
12696
12696
  }
@@ -12738,7 +12738,7 @@ class Io {
12738
12738
  * Actions to perform when a static render event is fired for this canvas.
12739
12739
  */
12740
12740
  async render(t) {
12741
- const e = bt(t);
12741
+ const e = It(t);
12742
12742
  this.lastRequestedRenderArguments = e;
12743
12743
  const a = this.getStaticContext();
12744
12744
  if (!a) {
@@ -12746,7 +12746,7 @@ class Io {
12746
12746
  return;
12747
12747
  }
12748
12748
  this.renderQueue.enqueue(
12749
- new bo(
12749
+ new Io(
12750
12750
  this.getID(),
12751
12751
  a,
12752
12752
  await Bo,
@@ -12758,7 +12758,7 @@ class Io {
12758
12758
  );
12759
12759
  }
12760
12760
  }
12761
- class bo extends un {
12761
+ class Io extends un {
12762
12762
  // TODO: Do we need to pass this whole array in?
12763
12763
  constructor(t, e, a, n, i) {
12764
12764
  super(), this.layoutId = t, this.ctx = e, this.nonPOTSupport = a, this.onRender = n, this.layouts = i;
@@ -12830,7 +12830,7 @@ const tc = (r, t) => {
12830
12830
  const e = [];
12831
12831
  return r.forEach((a) => {
12832
12832
  const n = t.steps.find((i) => i.stepName === a.stepName);
12833
- (n == null ? void 0 : n.type) === b.Text && a.stepAspectType === "Text" && e.push({
12833
+ (n == null ? void 0 : n.type) === I.Text && a.stepAspectType === "Text" && e.push({
12834
12834
  name: n.stepName,
12835
12835
  data: {
12836
12836
  text: a.value
@@ -13241,9 +13241,9 @@ class Ra extends On {
13241
13241
  async applyColorVariant(t, e) {
13242
13242
  const n = this.getSharedSteps(e).map((i) => {
13243
13243
  switch (i.getType()) {
13244
- case b.Shape:
13244
+ case I.Shape:
13245
13245
  return i.selectVariant(t);
13246
- case b.Text:
13246
+ case I.Text:
13247
13247
  return i.setFillColor({
13248
13248
  fill: t.getColor(),
13249
13249
  stroke: t.getColor(),
@@ -13272,9 +13272,9 @@ class xo {
13272
13272
  this.bundleId = t, this.bundleOwnerId = e, this.configuration = a, this.bundleOptions = i;
13273
13273
  const s = i == null ? void 0 : i.existingGlobalPropertyState;
13274
13274
  this.initPromise = s ? Promise.resolve(s).then(() => {
13275
- this.globalPropertyState = s;
13275
+ console.log("Setting global property state to existing state."), this.globalPropertyState = s;
13276
13276
  }) : this.createGlobalPropertyState().then((o) => {
13277
- this.globalPropertyState = o;
13277
+ console.log("Setting global property state to new state."), this.globalPropertyState = o;
13278
13278
  }), this.onGlobalPropertyStateChange = n;
13279
13279
  }
13280
13280
  setBundleOptions(t) {
@@ -13294,7 +13294,7 @@ class xo {
13294
13294
  }
13295
13295
  async setGlobalPropertyState(t) {
13296
13296
  this.globalPropertyState || await this.initPromise;
13297
- const e = bt(this.globalPropertyState);
13297
+ const e = It(this.globalPropertyState);
13298
13298
  this.globalPropertyState = { ...t, id: e.id }, await this.updateGlobalPropertyState(), await this.onGlobalPropertyStateChange(e, this.globalPropertyState);
13299
13299
  }
13300
13300
  getAspect(t) {
@@ -13318,7 +13318,7 @@ class xo {
13318
13318
  const n = this.configuration.aspects.find((o) => o.name === t);
13319
13319
  if (!n)
13320
13320
  throw new Error(`Failed to find configuration aspect with name: ${t}`);
13321
- const i = bt(this.globalPropertyState), s = this.globalPropertyState.aspects.find((o) => o.name === t);
13321
+ const i = It(this.globalPropertyState), s = this.globalPropertyState.aspects.find((o) => o.name === t);
13322
13322
  s ? (s.value = e, s.type = n.type, a !== void 0 && (s.storage = a !== null ? a : void 0)) : this.globalPropertyState.aspects.push({
13323
13323
  name: t,
13324
13324
  value: e,
@@ -13334,7 +13334,7 @@ class xo {
13334
13334
  const a = this.configuration.aspects.find((s) => s.name === t);
13335
13335
  if (!a)
13336
13336
  throw new Error(`Failed to find configuration aspect with name: ${t}`);
13337
- const n = bt(this.globalPropertyState), i = this.globalPropertyState.aspects.find((s) => s.name === t);
13337
+ const n = It(this.globalPropertyState), i = this.globalPropertyState.aspects.find((s) => s.name === t);
13338
13338
  i ? (i.storage = e !== null ? e : void 0, i.type = a.type) : this.globalPropertyState.aspects.push({
13339
13339
  name: t,
13340
13340
  value: "",
@@ -13346,7 +13346,7 @@ class xo {
13346
13346
  var e, a;
13347
13347
  if (!this.globalPropertyState)
13348
13348
  throw new Error("Global property state not initialized");
13349
- const t = await I.getShadowGraphqlClient().mutate({
13349
+ const t = await b.getShadowGraphqlClient().mutate({
13350
13350
  mutation: gs,
13351
13351
  variables: {
13352
13352
  id: this.globalPropertyState.id,
@@ -13389,7 +13389,7 @@ class xo {
13389
13389
  }
13390
13390
  async createGlobalPropertyState() {
13391
13391
  var e, a;
13392
- const t = await I.getShadowGraphqlClient().mutate({
13392
+ const t = await b.getShadowGraphqlClient().mutate({
13393
13393
  mutation: ms,
13394
13394
  variables: {
13395
13395
  bundleId: this.bundleId
@@ -13533,7 +13533,7 @@ class Mo {
13533
13533
  async fetchProducts(t) {
13534
13534
  if (this.fullFetched)
13535
13535
  return this.collection.productCollectionProducts.map((a) => new re(a));
13536
- const e = await I.getShadowGraphqlClient().query({
13536
+ const e = await b.getShadowGraphqlClient().query({
13537
13537
  query: ws,
13538
13538
  variables: {
13539
13539
  id: this.getId(),
@@ -13549,7 +13549,7 @@ class Mo {
13549
13549
  */
13550
13550
  async filterProducts(t) {
13551
13551
  var i, s;
13552
- const e = await I.getShadowGraphqlClient().query({
13552
+ const e = await b.getShadowGraphqlClient().query({
13553
13553
  query: ys,
13554
13554
  errorPolicy: "all",
13555
13555
  variables: {
@@ -13583,7 +13583,7 @@ class Mo {
13583
13583
  items: u.slice(t, t + e)
13584
13584
  };
13585
13585
  }
13586
- const n = await I.getShadowGraphqlClient().query({
13586
+ const n = await b.getShadowGraphqlClient().query({
13587
13587
  query: Ss,
13588
13588
  variables: {
13589
13589
  id: this.getId(),
@@ -13827,10 +13827,14 @@ class ze {
13827
13827
  s
13828
13828
  ), this.globalPropertyHandleService = new Do(this), this.setPreviewService(a);
13829
13829
  const l = new Promise((u, h) => {
13830
- this.globalPropertyHandleService.getHandles().then((m) => {
13830
+ console.log("Setting default global variants."), this.globalPropertyHandleService.getHandles().then((m) => {
13831
13831
  const g = m.map((f) => {
13832
- if (f.getType() === et.ColorOption || f.getType() === et.Option)
13833
- return f.initDefaultVariant();
13832
+ if (f.getType() === et.ColorOption || f.getType() === et.Option) {
13833
+ const p = f;
13834
+ if (this.globalPropertyStateManager.getGlobalPropertyState())
13835
+ return p.initDefaultVariant();
13836
+ console.log("Attempted to set global default variant before state was initialized.");
13837
+ }
13834
13838
  });
13835
13839
  Promise.all(g).then(u).catch(h);
13836
13840
  });
@@ -13840,9 +13844,8 @@ class ze {
13840
13844
  ...n,
13841
13845
  bundleOwnerId: i
13842
13846
  }),
13843
- this.globalPropertyStateManager.getInitializationPromise(),
13844
- l
13845
- ]), this.initializationPromise.catch((u) => {
13847
+ this.globalPropertyStateManager.getInitializationPromise()
13848
+ ]).then(() => l), this.initializationPromise.catch((u) => {
13846
13849
  console.error(`Bundle initialization failed: ${u}`);
13847
13850
  });
13848
13851
  }
@@ -13924,8 +13927,8 @@ class ze {
13924
13927
  "Unable to add transaction to bundle - Already Exists: " + a.filter((o) => !!o).map((o) => o == null ? void 0 : o.getWorkflowManager().getTransaction().id).join(", ")
13925
13928
  );
13926
13929
  const n = M.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map(), i = e.map((o) => n.get(o));
13927
- await I.getShadowGraphqlClient().mutate({
13928
- mutation: bs,
13930
+ await b.getShadowGraphqlClient().mutate({
13931
+ mutation: Is,
13929
13932
  variables: {
13930
13933
  id: this.id,
13931
13934
  transactionIds: e,
@@ -13954,8 +13957,8 @@ class ze {
13954
13957
  ))
13955
13958
  throw new Error("Unable to add transaction to bundle - Already Exists!");
13956
13959
  const s = (M.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(a);
13957
- await I.getShadowGraphqlClient().mutate({
13958
- mutation: Is,
13960
+ await b.getShadowGraphqlClient().mutate({
13961
+ mutation: bs,
13959
13962
  variables: {
13960
13963
  id: this.id,
13961
13964
  transactionId: a
@@ -13987,7 +13990,7 @@ class ze {
13987
13990
  const n = this.workflowExperiences.find(
13988
13991
  (i) => i.getWorkflowManager().getTransaction().id === e.id
13989
13992
  );
13990
- n.setBundle(void 0), this.previewService && n.getWorkflowManager().ejectFromPreviewService(), this.bundleStateManager.removeStateForTransaction(e.id), await I.getShadowGraphqlClient().mutate({
13993
+ n.setBundle(void 0), this.previewService && n.getWorkflowManager().ejectFromPreviewService(), this.bundleStateManager.removeStateForTransaction(e.id), await b.getShadowGraphqlClient().mutate({
13991
13994
  mutation: Ds,
13992
13995
  variables: {
13993
13996
  id: this.id,
@@ -14019,7 +14022,7 @@ class ze {
14019
14022
  );
14020
14023
  a.forEach((n) => n.setBundle(void 0)), [...this.workflowExperiences, ...a].forEach(
14021
14024
  (n) => n.checkForPriceBreakChanges()
14022
- ), this.previewService && a.forEach((n) => n.getWorkflowManager().ejectFromPreviewService()), t.forEach((n) => this.bundleStateManager.removeStateForTransaction(n.id)), await I.getShadowGraphqlClient().mutate({
14025
+ ), this.previewService && a.forEach((n) => n.getWorkflowManager().ejectFromPreviewService()), t.forEach((n) => this.bundleStateManager.removeStateForTransaction(n.id)), await b.getShadowGraphqlClient().mutate({
14023
14026
  mutation: Ps,
14024
14027
  variables: {
14025
14028
  id: this.id,
@@ -14080,7 +14083,7 @@ class ze {
14080
14083
  }
14081
14084
  async addStakeholder(t, e) {
14082
14085
  var i;
14083
- const a = await I.getShadowGraphqlClient().mutate({
14086
+ const a = await b.getShadowGraphqlClient().mutate({
14084
14087
  mutation: Fs,
14085
14088
  variables: {
14086
14089
  id: this.id,
@@ -14098,7 +14101,7 @@ class ze {
14098
14101
  }
14099
14102
  async removeStakeholder(t) {
14100
14103
  var a;
14101
- if (!((a = (await I.getShadowGraphqlClient().mutate({
14104
+ if (!((a = (await b.getShadowGraphqlClient().mutate({
14102
14105
  mutation: xs,
14103
14106
  variables: {
14104
14107
  id: this.id,
@@ -14112,7 +14115,7 @@ class ze {
14112
14115
  }
14113
14116
  async updateStakeholders(t) {
14114
14117
  var n;
14115
- const e = await I.getShadowGraphqlClient().mutate({
14118
+ const e = await b.getShadowGraphqlClient().mutate({
14116
14119
  mutation: ks,
14117
14120
  variables: {
14118
14121
  id: this.id,
@@ -14128,7 +14131,7 @@ class ze {
14128
14131
  this.storeStakeholderCustomers(a);
14129
14132
  }
14130
14133
  async getAllStakeholders() {
14131
- const t = await I.getShadowGraphqlClient().query({
14134
+ const t = await b.getShadowGraphqlClient().query({
14132
14135
  query: Qa,
14133
14136
  errorPolicy: "all",
14134
14137
  fetchPolicy: "no-cache",
@@ -14145,7 +14148,7 @@ class ze {
14145
14148
  return this.storeStakeholderCustomers(e), e;
14146
14149
  }
14147
14150
  async getCurrentStakeholder() {
14148
- const t = await I.getShadowGraphqlClient().query({
14151
+ const t = await b.getShadowGraphqlClient().query({
14149
14152
  query: Qa,
14150
14153
  errorPolicy: "all",
14151
14154
  fetchPolicy: "no-cache",
@@ -14167,7 +14170,7 @@ class ze {
14167
14170
  }
14168
14171
  async finish(t, e) {
14169
14172
  if (this.completed)
14170
- return await I.getShadowGraphqlClient().mutate({
14173
+ return await b.getShadowGraphqlClient().mutate({
14171
14174
  mutation: Rs,
14172
14175
  variables: {
14173
14176
  bundleId: this.id
@@ -14229,7 +14232,7 @@ class ze {
14229
14232
  return this.bundleStateManager.activateWorkflowExperienceTransform(t, e), this.updateBundle();
14230
14233
  }
14231
14234
  async assignGlobalPropertyConfiguration(t) {
14232
- await I.getShadowGraphqlClient().mutate({
14235
+ await b.getShadowGraphqlClient().mutate({
14233
14236
  mutation: Qs,
14234
14237
  variables: {
14235
14238
  bundleId: this.id,
@@ -14242,7 +14245,7 @@ class ze {
14242
14245
  }
14243
14246
  async assignProductCollection(t) {
14244
14247
  var a, n;
14245
- const e = await I.getShadowGraphqlClient().mutate({
14248
+ const e = await b.getShadowGraphqlClient().mutate({
14246
14249
  mutation: Ts(
14247
14250
  ((a = this.globalPropertyStateManager.getBundleOptions()) == null ? void 0 : a.eagerFetchProducts) ?? !1
14248
14251
  ),
@@ -14300,7 +14303,7 @@ class ze {
14300
14303
  }
14301
14304
  async updateBundle() {
14302
14305
  var e;
14303
- if (!((e = (await I.getShadowGraphqlClient().mutate({
14306
+ if (!((e = (await b.getShadowGraphqlClient().mutate({
14304
14307
  mutation: Bs,
14305
14308
  variables: {
14306
14309
  id: this.id,
@@ -14315,7 +14318,7 @@ class ze {
14315
14318
  throw new Error("Bundle not found!");
14316
14319
  }
14317
14320
  async updateTransactionOrder() {
14318
- await I.getShadowGraphqlClient().mutate({
14321
+ await b.getShadowGraphqlClient().mutate({
14319
14322
  mutation: Ms,
14320
14323
  variables: {
14321
14324
  id: this.id,
@@ -14362,7 +14365,7 @@ class ze {
14362
14365
  return this.workflowViewerAmendLink;
14363
14366
  }
14364
14367
  async approve(t) {
14365
- await I.getShadowGraphqlClient().mutate({
14368
+ await b.getShadowGraphqlClient().mutate({
14366
14369
  mutation: Os,
14367
14370
  errorPolicy: "all",
14368
14371
  fetchPolicy: "no-cache",
@@ -14373,7 +14376,7 @@ class ze {
14373
14376
  });
14374
14377
  }
14375
14378
  async reject(t) {
14376
- await I.getShadowGraphqlClient().mutate({
14379
+ await b.getShadowGraphqlClient().mutate({
14377
14380
  mutation: Us,
14378
14381
  errorPolicy: "all",
14379
14382
  fetchPolicy: "no-cache",
@@ -14401,7 +14404,7 @@ class Ro {
14401
14404
  */
14402
14405
  async execute(t, e, a) {
14403
14406
  var A, u, h;
14404
- const i = (u = (A = (await I.getShadowGraphqlClient().mutate({
14407
+ const i = (u = (A = (await b.getShadowGraphqlClient().mutate({
14405
14408
  mutation: No,
14406
14409
  variables: {
14407
14410
  processFlowId: t,
@@ -14417,7 +14420,7 @@ class Ro {
14417
14420
  }
14418
14421
  let o = !1, l = 0, c, d;
14419
14422
  for (; !o; ) {
14420
- c = await I.getShadowGraphqlClient().query({
14423
+ c = await b.getShadowGraphqlClient().query({
14421
14424
  query: S`
14422
14425
  query getProcessFlowExecution($ids: [String]!) {
14423
14426
  processExecutions(ids: $ids) {
@@ -14712,7 +14715,7 @@ const Ua = S`
14712
14715
  }
14713
14716
  `, Wo = async (r, t) => {
14714
14717
  var n;
14715
- const e = await I.getShadowGraphqlClient().query({
14718
+ const e = await b.getShadowGraphqlClient().query({
14716
14719
  query: ci(((n = t == null ? void 0 : t.assets) == null ? void 0 : n.metadata) || !1),
14717
14720
  errorPolicy: "all",
14718
14721
  variables: {
@@ -14768,14 +14771,14 @@ class ic {
14768
14771
  constructor(t) {
14769
14772
  this.activeIntegration = void 0, this.updateTransactionState = async (e) => {
14770
14773
  try {
14771
- return I.getShadowGraphqlClient().mutate({
14774
+ return b.getShadowGraphqlClient().mutate({
14772
14775
  ...e,
14773
14776
  mutation: Xr
14774
14777
  });
14775
14778
  } catch (a) {
14776
14779
  throw console.error(a), new lt("Critical - Unable to synchronize workflow state with server.");
14777
14780
  }
14778
- }, this.options = t, this.options.applicationKey && gr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 26.7.6"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
14781
+ }, this.options = t, this.options.applicationKey && gr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 26.7.8"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
14779
14782
  }
14780
14783
  configure(t) {
14781
14784
  pt.setHubUrl(t.hubUrl), pt.setServerUrl(t.serverUrl), pt.setServicesApiUrl(t.servicesApiUrl), this.marketplaceThemeInstallId = t.marketplaceThemeInstallId, this.marketplaceThemeInstallConfigurationId = t.marketplaceThemeInstallConfigurationId, t.bearerAuthenticationToken && pr(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration();
@@ -14854,7 +14857,7 @@ class ic {
14854
14857
  */
14855
14858
  async authenticateTransactionFromLocalStorage(t) {
14856
14859
  var d, A, u, h, m, g;
14857
- const e = I.getShadowGraphqlClient(), a = await e.query({
14860
+ const e = b.getShadowGraphqlClient(), a = await e.query({
14858
14861
  query: di,
14859
14862
  errorPolicy: "all",
14860
14863
  fetchPolicy: "no-cache",
@@ -14917,7 +14920,7 @@ class ic {
14917
14920
  e != null && e.has(t) && (e.delete(t), M.setMap("transactionCustomerIds", e));
14918
14921
  }
14919
14922
  async customerHasBundleTemplates(t) {
14920
- const n = (await I.getShadowGraphqlClient().query({
14923
+ const n = (await b.getShadowGraphqlClient().query({
14921
14924
  query: Ua,
14922
14925
  errorPolicy: "all",
14923
14926
  fetchPolicy: "no-cache",
@@ -14941,7 +14944,7 @@ class ic {
14941
14944
  async getOrCreateCustomer(t) {
14942
14945
  var s;
14943
14946
  this.customer = void 0;
14944
- const e = I.getShadowGraphqlClient(), n = (await e.query({
14947
+ const e = b.getShadowGraphqlClient(), n = (await e.query({
14945
14948
  query: Ua,
14946
14949
  errorPolicy: "all",
14947
14950
  fetchPolicy: "no-cache",
@@ -14979,7 +14982,7 @@ class ic {
14979
14982
  }
14980
14983
  async authenticateCustomerId(t) {
14981
14984
  var o;
14982
- const e = I.getShadowGraphqlClient(), a = M.getMap("customerTokens");
14985
+ const e = b.getShadowGraphqlClient(), a = M.getMap("customerTokens");
14983
14986
  if (!(a != null && a.has(t)))
14984
14987
  return !1;
14985
14988
  const n = a.get(t);
@@ -15000,7 +15003,7 @@ class ic {
15000
15003
  * @param emailAddress The email address to generate a verification code for. The user will be sent an email with the verification code.
15001
15004
  */
15002
15005
  async generateVerificationCode(t) {
15003
- await I.getShadowGraphqlClient().mutate({
15006
+ await b.getShadowGraphqlClient().mutate({
15004
15007
  mutation: Vo,
15005
15008
  variables: {
15006
15009
  emailAddress: t
@@ -15015,7 +15018,7 @@ class ic {
15015
15018
  */
15016
15019
  async verifyCode(t, e) {
15017
15020
  var i, s;
15018
- const n = (i = (await I.getShadowGraphqlClient().mutate({
15021
+ const n = (i = (await b.getShadowGraphqlClient().mutate({
15019
15022
  mutation: zo,
15020
15023
  errorPolicy: "all",
15021
15024
  fetchPolicy: "no-cache",
@@ -15039,7 +15042,7 @@ class ic {
15039
15042
  var e;
15040
15043
  if (!((e = this.customer) != null && e.id))
15041
15044
  throw new Error("Customer must be logged in before calling this function.");
15042
- return (await I.getShadowGraphqlClient().query({
15045
+ return (await b.getShadowGraphqlClient().query({
15043
15046
  query: Go,
15044
15047
  variables: {
15045
15048
  id: this.customer.id
@@ -15052,7 +15055,7 @@ class ic {
15052
15055
  */
15053
15056
  async getNewBundle(t, e, a) {
15054
15057
  var c, d, A, u, h;
15055
- const i = (A = (await I.getShadowGraphqlClient().mutate({
15058
+ const i = (A = (await b.getShadowGraphqlClient().mutate({
15056
15059
  mutation: Es(((d = (c = a == null ? void 0 : a.graphql) == null ? void 0 : c.productCollection) == null ? void 0 : d.eagerFetchProducts) || !1),
15057
15060
  variables: {
15058
15061
  collectionId: t,
@@ -15088,7 +15091,7 @@ class ic {
15088
15091
  bundleOwnerId: s,
15089
15092
  ...d,
15090
15093
  ...(p = n == null ? void 0 : n.graphql) == null ? void 0 : p.additionalHeaders
15091
- }, u = await I.getShadowGraphqlClient().query({
15094
+ }, u = await b.getShadowGraphqlClient().query({
15092
15095
  query: ps(((w = (C = n == null ? void 0 : n.graphql) == null ? void 0 : C.productCollection) == null ? void 0 : w.eagerFetchProducts) || !1),
15093
15096
  variables: {
15094
15097
  id: t
@@ -15123,7 +15126,7 @@ class ic {
15123
15126
  bundleOwnerId: i,
15124
15127
  ...c,
15125
15128
  ...(C = n == null ? void 0 : n.graphql) == null ? void 0 : C.additionalHeaders
15126
- }, u = (v = (await I.getShadowGraphqlClient().mutate({
15129
+ }, u = (v = (await b.getShadowGraphqlClient().mutate({
15127
15130
  mutation: vs(((y = (w = n == null ? void 0 : n.graphql) == null ? void 0 : w.productCollection) == null ? void 0 : y.eagerFetchProducts) || !1),
15128
15131
  variables: {
15129
15132
  id: t,
@@ -15162,7 +15165,7 @@ class ic {
15162
15165
  if (!((i = this.customer) != null && i.id))
15163
15166
  throw new Error("Customer not authenticated.");
15164
15167
  const { includeMetadata: e, ...a } = t;
15165
- return (await I.getShadowGraphqlClient().query({
15168
+ return (await b.getShadowGraphqlClient().query({
15166
15169
  query: Ns(e ?? !1),
15167
15170
  variables: {
15168
15171
  ...a,
@@ -15179,7 +15182,7 @@ class ic {
15179
15182
  var i;
15180
15183
  if (!this.customer)
15181
15184
  throw new Error("Customer not authenticated.");
15182
- const t = await I.getShadowGraphqlClient().query({
15185
+ const t = await b.getShadowGraphqlClient().query({
15183
15186
  query: Cs,
15184
15187
  variables: {
15185
15188
  id: this.customer.id
@@ -15216,7 +15219,7 @@ class ic {
15216
15219
  async getWorkflowExperiences(t, e) {
15217
15220
  if (t.length === 0)
15218
15221
  throw new lt("No options provided!");
15219
- const a = I.getShadowGraphqlClient(), n = async (v) => {
15222
+ const a = b.getShadowGraphqlClient(), n = async (v) => {
15220
15223
  var P, x, k;
15221
15224
  if (v.length === 0)
15222
15225
  return [];
@@ -15324,7 +15327,7 @@ class ic {
15324
15327
  }
15325
15328
  async getIntegrationProductById(t) {
15326
15329
  var i, s;
15327
- const n = (i = (await I.getShadowGraphqlClient().query({
15330
+ const n = (i = (await b.getShadowGraphqlClient().query({
15328
15331
  query: ei,
15329
15332
  variables: {
15330
15333
  ids: [t]
@@ -15338,7 +15341,7 @@ class ic {
15338
15341
  }
15339
15342
  async getIntegrationProductFromExternalIds(t, e) {
15340
15343
  var s;
15341
- const i = (s = (await I.getShadowGraphqlClient().query({
15344
+ const i = (s = (await b.getShadowGraphqlClient().query({
15342
15345
  query: ai,
15343
15346
  variables: {
15344
15347
  externalProductId: e,
@@ -15355,7 +15358,7 @@ class ic {
15355
15358
  return t.type === "integration" ? this.getIntegrationProductById(t.integrationProductId) : this.getIntegrationProductFromExternalIds(t.externalIntegrationId, t.externalProductId);
15356
15359
  }
15357
15360
  async getShareActionsForTransaction(t) {
15358
- const a = (M.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(t) || void 0, n = await I.getShadowGraphqlClient().query({
15361
+ const a = (M.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(t) || void 0, n = await b.getShadowGraphqlClient().query({
15359
15362
  query: ti,
15360
15363
  errorPolicy: "all",
15361
15364
  fetchPolicy: "no-cache",
@@ -15371,7 +15374,7 @@ class ic {
15371
15374
  return n.data.transactions[0].transactionShareActions;
15372
15375
  }
15373
15376
  async placeOrder(t) {
15374
- const e = await I.getShadowGraphqlClient().mutate({
15377
+ const e = await b.getShadowGraphqlClient().mutate({
15375
15378
  mutation: fi,
15376
15379
  variables: {
15377
15380
  orderItems: t
@@ -15387,7 +15390,7 @@ class ic {
15387
15390
  };
15388
15391
  }
15389
15392
  }
15390
- const Yo = async (r) => (await I.getShadowGraphqlClient().query({
15393
+ const Yo = async (r) => (await b.getShadowGraphqlClient().query({
15391
15394
  query: hi,
15392
15395
  errorPolicy: "all",
15393
15396
  fetchPolicy: "no-cache",
@@ -15397,7 +15400,7 @@ const Yo = async (r) => (await I.getShadowGraphqlClient().query({
15397
15400
  }
15398
15401
  }
15399
15402
  })).data.currentIntegration, sc = async (r) => {
15400
- const e = await I.getShadowGraphqlClient().query({
15403
+ const e = await b.getShadowGraphqlClient().query({
15401
15404
  query: _r,
15402
15405
  errorPolicy: "all",
15403
15406
  fetchPolicy: "network-only",
@@ -15409,7 +15412,7 @@ const Yo = async (r) => (await I.getShadowGraphqlClient().query({
15409
15412
  return e.data.transactions[0];
15410
15413
  }, oc = async (r, t) => {
15411
15414
  var a;
15412
- return (a = (await I.getShadowGraphqlClient().query({
15415
+ return (a = (await b.getShadowGraphqlClient().query({
15413
15416
  query: ui,
15414
15417
  errorPolicy: "all",
15415
15418
  variables: {
@@ -15419,7 +15422,7 @@ const Yo = async (r) => (await I.getShadowGraphqlClient().query({
15419
15422
  })).data) == null ? void 0 : a.marketplaceThemeInstallConfiguration;
15420
15423
  }, lc = async (r) => {
15421
15424
  var e, a, n;
15422
- return (n = (a = (e = (await I.getShadowGraphqlClient().query({
15425
+ return (n = (a = (e = (await b.getShadowGraphqlClient().query({
15423
15426
  query: gi,
15424
15427
  errorPolicy: "all",
15425
15428
  variables: {
@@ -15428,7 +15431,7 @@ const Yo = async (r) => (await I.getShadowGraphqlClient().query({
15428
15431
  })).data) == null ? void 0 : e.bundles) == null ? void 0 : a[0]) == null ? void 0 : n.marketplaceThemeInstallConfiguration;
15429
15432
  }, cc = async (r) => {
15430
15433
  var e, a, n;
15431
- return (n = (a = (e = (await I.getShadowGraphqlClient().query({
15434
+ return (n = (a = (e = (await b.getShadowGraphqlClient().query({
15432
15435
  query: mi,
15433
15436
  errorPolicy: "all",
15434
15437
  variables: {
@@ -15472,7 +15475,7 @@ class Ko {
15472
15475
  if (n.currentFrameSources) {
15473
15476
  let i = !1;
15474
15477
  for (let s = 0; s < n.currentFrameSources.length; s++) {
15475
- const o = n.currentFrameSources[s], l = await Ie(o), c = this.frameData ? this.frameData[s] : void 0;
15478
+ const o = n.currentFrameSources[s], l = await be(o), c = this.frameData ? this.frameData[s] : void 0;
15476
15479
  Va(l, c) || (this.frameData || (this.frameData = new Array(n.currentFrameSources.length)), this.frameData[s] = l, i = !0);
15477
15480
  }
15478
15481
  i && (this.onFrameDataChangeListeners.forEach(
@@ -16124,7 +16127,7 @@ const _o = S`
16124
16127
  total
16125
16128
  }
16126
16129
  }
16127
- `, Ac = async (r, t, e) => await I.getShadowGraphqlClient().mutate({
16130
+ `, Ac = async (r, t, e) => await b.getShadowGraphqlClient().mutate({
16128
16131
  mutation: rl,
16129
16132
  errorPolicy: "all",
16130
16133
  variables: {
@@ -16132,34 +16135,34 @@ const _o = S`
16132
16135
  name: t
16133
16136
  },
16134
16137
  context: e
16135
- }), uc = async (r, t) => await I.getShadowGraphqlClient().mutate({
16138
+ }), uc = async (r, t) => await b.getShadowGraphqlClient().mutate({
16136
16139
  mutation: tl,
16137
16140
  errorPolicy: "all",
16138
16141
  variables: {
16139
16142
  id: r,
16140
16143
  name: t
16141
16144
  }
16142
- }), hc = async (r, t) => await I.getShadowGraphqlClient().mutate({
16145
+ }), hc = async (r, t) => await b.getShadowGraphqlClient().mutate({
16143
16146
  mutation: il,
16144
16147
  errorPolicy: "all",
16145
16148
  variables: {
16146
16149
  id: r,
16147
16150
  template: t
16148
16151
  }
16149
- }), mc = async (r, t) => await I.getShadowGraphqlClient().mutate({
16152
+ }), mc = async (r, t) => await b.getShadowGraphqlClient().mutate({
16150
16153
  mutation: el,
16151
16154
  errorPolicy: "all",
16152
16155
  variables: {
16153
16156
  id: r,
16154
16157
  template: t
16155
16158
  }
16156
- }), gc = async (r) => (await I.getShadowGraphqlClient().query({
16159
+ }), gc = async (r) => (await b.getShadowGraphqlClient().query({
16157
16160
  query: _o,
16158
16161
  errorPolicy: "all",
16159
16162
  variables: {
16160
16163
  email: r
16161
16164
  }
16162
- })).data.customer, fc = async (r, t, e) => await I.getShadowGraphqlClient().query({
16165
+ })).data.customer, fc = async (r, t, e) => await b.getShadowGraphqlClient().query({
16163
16166
  query: al,
16164
16167
  errorPolicy: "all",
16165
16168
  fetchPolicy: "no-cache",
@@ -16168,7 +16171,7 @@ const _o = S`
16168
16171
  offset: e,
16169
16172
  limit: t
16170
16173
  }
16171
- }), pc = async (r, t) => await I.getShadowGraphqlClient().query({
16174
+ }), pc = async (r, t) => await b.getShadowGraphqlClient().query({
16172
16175
  query: nl,
16173
16176
  errorPolicy: "all",
16174
16177
  fetchPolicy: "no-cache",
@@ -16178,7 +16181,7 @@ const _o = S`
16178
16181
  context: t
16179
16182
  }), Cc = async (r, t, e) => {
16180
16183
  var n;
16181
- const a = await I.getShadowGraphqlClient().query({
16184
+ const a = await b.getShadowGraphqlClient().query({
16182
16185
  query: fa,
16183
16186
  errorPolicy: "all",
16184
16187
  fetchPolicy: "no-cache",
@@ -16202,7 +16205,7 @@ const _o = S`
16202
16205
  return ((n = a == null ? void 0 : a.data.customerTransactionsFeed) == null ? void 0 : n.items) || [];
16203
16206
  }, wc = async (r, t, e) => {
16204
16207
  var n;
16205
- const a = await I.getShadowGraphqlClient().query({
16208
+ const a = await b.getShadowGraphqlClient().query({
16206
16209
  query: fa,
16207
16210
  errorPolicy: "all",
16208
16211
  fetchPolicy: "no-cache",
@@ -16226,7 +16229,7 @@ const _o = S`
16226
16229
  return ((n = a == null ? void 0 : a.data.customerTransactionsFeed) == null ? void 0 : n.items) || [];
16227
16230
  }, yc = async (r, t, e) => {
16228
16231
  var n;
16229
- const a = await I.getShadowGraphqlClient().query({
16232
+ const a = await b.getShadowGraphqlClient().query({
16230
16233
  query: fa,
16231
16234
  errorPolicy: "all",
16232
16235
  fetchPolicy: "no-cache",
@@ -16246,7 +16249,7 @@ const _o = S`
16246
16249
  return ((n = a == null ? void 0 : a.data.customerTransactionsFeed) == null ? void 0 : n.items) || [];
16247
16250
  }, Sc = async (r, t, e) => {
16248
16251
  var n;
16249
- const a = await I.getShadowGraphqlClient().query({
16252
+ const a = await b.getShadowGraphqlClient().query({
16250
16253
  query: sl,
16251
16254
  errorPolicy: "all",
16252
16255
  fetchPolicy: "no-cache",
@@ -16309,7 +16312,7 @@ export {
16309
16312
  Uo as ObjectInputType,
16310
16313
  On as OptionGlobalPropertyHandle,
16311
16314
  ue as OptionNotFoundError,
16312
- It as ParseError,
16315
+ bt as ParseError,
16313
16316
  Hs as PictureStepHandle,
16314
16317
  er as ProductCameraRig,
16315
16318
  Mo as ProductCollection,
@@ -16329,7 +16332,7 @@ export {
16329
16332
  Ae as StakeholderType,
16330
16333
  Zn as StepAspectType,
16331
16334
  nt as StepHandle,
16332
- b as StepType,
16335
+ I as StepType,
16333
16336
  Ft as TextAlgorithm,
16334
16337
  Gi as TextChangeCommand,
16335
16338
  Fo as TextGlobalPropertyHandle,
@@ -16351,7 +16354,7 @@ export {
16351
16354
  Pl as dataUrlFromExternalUrl,
16352
16355
  Ve as designService,
16353
16356
  ce as determineCorrectFontSizeAndLines,
16354
- bn as digitalContentStepService,
16357
+ In as digitalContentStepService,
16355
16358
  ot as domParser,
16356
16359
  hc as duplicateBundle,
16357
16360
  mc as duplicateTransaction,
@@ -16372,7 +16375,7 @@ export {
16372
16375
  gc as getCustomer,
16373
16376
  fc as getCustomerBundles,
16374
16377
  Vl as getElementVertices,
16375
- Ie as getFrameData,
16378
+ be as getFrameData,
16376
16379
  Yo as getIntegration,
16377
16380
  Ul as getNEPoint,
16378
16381
  Ol as getNWPoint,
@@ -16390,7 +16393,7 @@ export {
16390
16393
  Cc as getUnorderedTransactions,
16391
16394
  rc as getWorkflow,
16392
16395
  Ln as getWorkflows,
16393
- I as graphQlManager,
16396
+ b as graphQlManager,
16394
16397
  le as illustrationStepService,
16395
16398
  Ql as isCloseToValue,
16396
16399
  kt as loadFont,
@@ -16409,9 +16412,9 @@ export {
16409
16412
  Fl as pmsToRgb,
16410
16413
  kn as questionStepService,
16411
16414
  Dl as registerFetchImplementation,
16412
- bl as registerWindowImplementation,
16415
+ Il as registerWindowImplementation,
16413
16416
  Fa as rehydrateSerializedLayout,
16414
- Ir as rgbToPms,
16417
+ br as rgbToPms,
16415
16418
  ae as rotateAroundPoint,
16416
16419
  sa as sanitizeSvgTree,
16417
16420
  pr as setBearerAuthenticationToken,