@spiffcommerce/core 26.38.0-beta.72af74a6-4a96-518b-bc76-ffd23af38fe9 → 26.38.0-beta.74522645-52ca-5674-8208-247745ff45d5

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 hr } from "exifr/dist/mini.umd.cjs";
7
7
  import { parse as rn } from "css";
8
8
  import mr from "fuse.js";
9
9
  import { Pith as da } from "pith";
10
- import vt from "lodash.clonedeep";
10
+ import xt from "lodash.clonedeep";
11
11
  import { toString as sn } from "qrcode";
12
12
  import gr from "svg-path-bbox";
13
13
  import { parse as Ke } from "opentype.js";
@@ -40,7 +40,7 @@ class Y extends Kt {
40
40
  super(`Panel not Found: ${t.panelId}`), this.panelId = (t == null ? void 0 : t.panelId) || "N/A";
41
41
  }
42
42
  }
43
- class Et extends Kt {
43
+ class vt extends Kt {
44
44
  constructor(t) {
45
45
  super(`Asset not found for variant: ${t.name}`), this.variant = t;
46
46
  }
@@ -65,7 +65,7 @@ class G extends Ie {
65
65
  super(`Unhandled Behavior Encountered: ${t}`);
66
66
  }
67
67
  }
68
- class xt extends Ie {
68
+ class Ft extends Ie {
69
69
  constructor(t) {
70
70
  super(`Parsing Error: ${t}`);
71
71
  }
@@ -224,7 +224,7 @@ const dn = /* @__PURE__ */ new Map(), ka = /* @__PURE__ */ new Map(), Ma = /* @_
224
224
  const n = a.load();
225
225
  return Ne.set(t, n), n;
226
226
  }
227
- }, It = () => {
227
+ }, bt = () => {
228
228
  if (Qt([typeof XMLSerializer]))
229
229
  return new XMLSerializer();
230
230
  const r = _t();
@@ -328,7 +328,7 @@ const Tr = {
328
328
  weight: Q()
329
329
  }
330
330
  },
331
- WorkflowProduct: {
331
+ Workflow: {
332
332
  fields: {
333
333
  id: Q(),
334
334
  index: Q(),
@@ -3408,7 +3408,7 @@ const se = (r) => {
3408
3408
  }
3409
3409
  });
3410
3410
  });
3411
- }, Sn = (r) => It().serializeToString(r), pa = (r, t, e, a, n) => {
3411
+ }, Sn = (r) => bt().serializeToString(r), pa = (r, t, e, a, n) => {
3412
3412
  const i = wn(r);
3413
3413
  if (!i)
3414
3414
  throw new Error("Failed to read SVG.");
@@ -3440,7 +3440,7 @@ const se = (r) => {
3440
3440
  s.classList.add(A), s.setAttribute("stroke", c.browserValue), a[d] = c;
3441
3441
  }
3442
3442
  });
3443
- const i = It().serializeToString(e);
3443
+ const i = bt().serializeToString(e);
3444
3444
  return {
3445
3445
  colors: a,
3446
3446
  svg: i
@@ -3689,7 +3689,7 @@ class li {
3689
3689
  d.lengthComputable && a(d.loaded * 100 / d.total);
3690
3690
  }, c.onload = () => {
3691
3691
  const d = s.assetResponse.asset;
3692
- Pt.add(s.assetResponse.asset), o(d);
3692
+ It.add(s.assetResponse.asset), o(d);
3693
3693
  }, c.onerror = l, this.postProcessFileUpload(t, s.mimeType).then((d) => c.send(d.blob)).catch(l);
3694
3694
  }), this.cacheAsset(s.assetResponse.asset), s.assetResponse.asset;
3695
3695
  }
@@ -3721,7 +3721,7 @@ class li {
3721
3721
  });
3722
3722
  if (this.bgrmProcessCache.delete(e), !((o = (s = i.data) == null ? void 0 : s.assetRemoveBackground) != null && o.key))
3723
3723
  throw new Error("Failed to remove background from image");
3724
- return Pt.add(i.data.assetRemoveBackground), J.add(e, i.data.assetRemoveBackground.key), this.cache.set(
3724
+ return It.add(i.data.assetRemoveBackground), J.add(e, i.data.assetRemoveBackground.key), this.cache.set(
3725
3725
  i.data.assetRemoveBackground.key,
3726
3726
  Promise.resolve(i.data.assetRemoveBackground)
3727
3727
  ), i.data.assetRemoveBackground;
@@ -3729,16 +3729,16 @@ class li {
3729
3729
  return this.bgrmProcessCache.set(e, n), n;
3730
3730
  }
3731
3731
  removePersistedAsset(t) {
3732
- Pt.remove(t), J.delete(t), J.deleteForBgRemovedKey(t);
3732
+ It.remove(t), J.delete(t), J.deleteForBgRemovedKey(t);
3733
3733
  }
3734
3734
  getPersistedAssets() {
3735
- return Pt.list();
3735
+ return It.list();
3736
3736
  }
3737
3737
  registerPersistedAssetListener(t) {
3738
- Pt.addCallback(t);
3738
+ It.addCallback(t);
3739
3739
  }
3740
3740
  unRegisterPersistedAssetListener(t) {
3741
- Pt.removeCallback(t);
3741
+ It.removeCallback(t);
3742
3742
  }
3743
3743
  isRaster(t) {
3744
3744
  return !(t.type === "image/svg+xml" || t.type === "application/pdf" || t.type === "application/postscript");
@@ -3747,9 +3747,9 @@ class li {
3747
3747
  if (e === "image/svg+xml") {
3748
3748
  const a = await t.blob.text(), s = new window.DOMParser().parseFromString(a, "image/svg+xml").documentElement;
3749
3749
  if (!s)
3750
- throw new xt("Failed to read SVG.");
3750
+ throw new Ft("Failed to read SVG.");
3751
3751
  Xr(s);
3752
- const l = It().serializeToString(s);
3752
+ const l = bt().serializeToString(s);
3753
3753
  return {
3754
3754
  name: t.name,
3755
3755
  blob: new Blob([l], { type: "image/svg+xml" })
@@ -3836,7 +3836,7 @@ const Ot = "persistentAssets", vn = class wt {
3836
3836
  }
3837
3837
  };
3838
3838
  vn.callbacks = [];
3839
- let Pt = vn;
3839
+ let It = vn;
3840
3840
  const Oa = "bgrmPersistentAssets";
3841
3841
  class J {
3842
3842
  static has(t) {
@@ -5277,9 +5277,9 @@ const X = new mi(), Bn = y`
5277
5277
  silentSteps: r.silentSteps.filter((a) => St(a, t))
5278
5278
  };
5279
5279
  return e.silentSteps.length === 0 && e.renderableSteps.length === 0 ? null : e;
5280
- }, Ft = (r, t) => r.map((e) => Ui(e, t)).filter((e) => e !== null), Li = async (r, t, e = !1) => {
5280
+ }, Dt = (r, t) => r.map((e) => Ui(e, t)).filter((e) => e !== null), Li = async (r, t, e = !1) => {
5281
5281
  var s;
5282
- const a = Ft(r, t), n = [];
5282
+ const a = Dt(r, t), n = [];
5283
5283
  for (const o of a)
5284
5284
  for (const l of o.renderableSteps) {
5285
5285
  const c = (((s = l.option) == null ? void 0 : s.variants) || []).length;
@@ -5502,7 +5502,7 @@ const R = () => {
5502
5502
  }), Mc = (r, t, e, a) => ({
5503
5503
  x: r.x + ((t == null ? void 0 : t.x) + (t == null ? void 0 : t.width)) * e,
5504
5504
  y: r.y + ((t == null ? void 0 : t.y) + (t == null ? void 0 : t.height)) * a
5505
- }), Dt = (r) => {
5505
+ }), Pt = (r) => {
5506
5506
  switch (r) {
5507
5507
  case H.North:
5508
5508
  return H.East;
@@ -5521,7 +5521,7 @@ const R = () => {
5521
5521
  case H.Southwest:
5522
5522
  return H.Northwest;
5523
5523
  }
5524
- }, Tc = (r, t) => t > 45 && t <= 135 ? Dt(r) : t > 135 && t <= 225 ? Dt(Dt(r)) : t > 225 && t <= 315 ? Dt(Dt(Dt(r))) : r, Qc = (r, t = { x: 0, y: 0 }, e = { x: 1, y: 1 }) => {
5524
+ }, Tc = (r, t) => t > 45 && t <= 135 ? Pt(r) : t > 135 && t <= 225 ? Pt(Pt(r)) : t > 225 && t <= 315 ? Pt(Pt(Pt(r))) : r, Qc = (r, t = { x: 0, y: 0 }, e = { x: 1, y: 1 }) => {
5525
5525
  const a = ft(r.rotation), n = {
5526
5526
  x: t.x + r.x * e.x,
5527
5527
  y: t.x + r.y * e.y
@@ -5753,7 +5753,7 @@ const Wi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", $e = /* @_
5753
5753
  return $e.get(r);
5754
5754
  const e = (async () => {
5755
5755
  try {
5756
- return Bt(r).getFont();
5756
+ return Et(r).getFont();
5757
5757
  } catch {
5758
5758
  if (Wi(r)) {
5759
5759
  const a = hn(r), n = Ke(a);
@@ -5768,7 +5768,7 @@ const Wi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", $e = /* @_
5768
5768
  }, ji = (r) => {
5769
5769
  const t = hn(r), e = Ke(t);
5770
5770
  return na(r, e), e;
5771
- }, Bt = (r) => {
5771
+ }, Et = (r) => {
5772
5772
  const t = Tn.get(r);
5773
5773
  if (t)
5774
5774
  return t;
@@ -5811,7 +5811,7 @@ const Wi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", $e = /* @_
5811
5811
  const I = B.toSVG(2), F = t.parseFromString(I, "image/svg+xml").firstElementChild;
5812
5812
  h.appendChild(F);
5813
5813
  }
5814
- return e.querySelectorAll("text").forEach((d) => d.remove()), It().serializeToString(a);
5814
+ return e.querySelectorAll("text").forEach((d) => d.remove()), bt().serializeToString(a);
5815
5815
  }, ye = (r, t, e, a) => Math.max(Ji(r.join(`
5816
5816
  `), e, a), t), $a = (r, t, e, a, n, i) => {
5817
5817
  const s = (i || wa) * n.getApproximateHeight(), o = t.split(`
@@ -5869,7 +5869,7 @@ const Wi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", $e = /* @_
5869
5869
  return Math.min(A, d);
5870
5870
  }, qi = (r, t, e, a) => {
5871
5871
  var c;
5872
- const n = Bt(t.fontData.assetUrl), i = n.getFont(), s = t.fontSize / i.unitsPerEm;
5872
+ const n = Et(t.fontData.assetUrl), i = n.getFont(), s = t.fontSize / i.unitsPerEm;
5873
5873
  if (!e)
5874
5874
  return $a(t, r, t.fontSize, s, n, a);
5875
5875
  let o;
@@ -5890,9 +5890,9 @@ const Wi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", $e = /* @_
5890
5890
  fontSize: Hi(o, n, i, t.width, t.height, a)
5891
5891
  } : $a(t, r, t.fontSize, s, n, a);
5892
5892
  }, Yi = (r, t, e, a, n) => {
5893
- const s = Bt(t.assetUrl).getFont();
5893
+ const s = Et(t.assetUrl).getFont();
5894
5894
  let o = { ...r };
5895
- const l = { ...r }, c = Qn(a, e / s.unitsPerEm, Bt(t.assetUrl));
5895
+ const l = { ...r }, c = Qn(a, e / s.unitsPerEm, Et(t.assetUrl));
5896
5896
  return c && c < o.width && (l.width = c, n === "left" ? (l.left += Math.sin(o.rotation * Math.PI / 360) * (o.width - c), l.top += Math.sin(o.rotation * Math.PI / 180) * (c - o.width) / 2) : n === "right" ? l.left += o.width - c : l.left += (o.width - c) / 2, a && Ki(a, a).every(([d, A]) => d === A) && (o = l)), o;
5897
5897
  }, Ue = 1, mt = (r, t, e) => {
5898
5898
  let a = 0;
@@ -6380,7 +6380,7 @@ const ee = (r) => {
6380
6380
  const s = At().parseFromString(r, "image/svg+xml").firstElementChild;
6381
6381
  if (!s)
6382
6382
  throw new Error("Failed to read SVG");
6383
- const l = It().serializeToString(s), c = pt(), d = c.getContext("2d"), A = await da.from(d, l, {
6383
+ const l = bt().serializeToString(s), c = pt(), d = c.getContext("2d"), A = await da.from(d, l, {
6384
6384
  anonymousCrossOrigin: !0,
6385
6385
  ignoreDimensions: !1,
6386
6386
  createCanvas: pt,
@@ -6423,7 +6423,7 @@ const ee = (r) => {
6423
6423
  }
6424
6424
  if (e && t === T.Textbox && (a != null && a.text) && (a != null && a.fontScale)) {
6425
6425
  await Nt(e);
6426
- const l = Bt(e), c = mt(a.text, a == null ? void 0 : a.fontScale, l);
6426
+ const l = Et(e), c = mt(a.text, a == null ? void 0 : a.fontScale, l);
6427
6427
  o.width = Math.min(c, n.width * 0.85), o.left = n.x + n.width / 2 - o.width / 2;
6428
6428
  }
6429
6429
  return o;
@@ -6836,7 +6836,7 @@ class W extends $ {
6836
6836
  return a !== void 0 ? a + 1 : 0;
6837
6837
  }
6838
6838
  }
6839
- class bt extends $ {
6839
+ class Bt extends $ {
6840
6840
  constructor(t) {
6841
6841
  super(), this.id = t;
6842
6842
  }
@@ -7444,7 +7444,7 @@ class us {
7444
7444
  40
7445
7445
  );
7446
7446
  });
7447
- t.forEach((h) => a.getCommandDispatcher()(new bt(h.id)));
7447
+ t.forEach((h) => a.getCommandDispatcher()(new Bt(h.id)));
7448
7448
  const o = n.data.baseUrl.slice(0, 4) === "http" ? "" : "https://", l = new URL(o + n.data.baseUrl);
7449
7449
  l.searchParams.append("video", btoa(JSON.stringify([s]))), l.pathname = l.pathname + (l.pathname.slice(-1) === "/" ? "" : "/");
7450
7450
  const c = l.toString();
@@ -7502,7 +7502,7 @@ class ve {
7502
7502
  return ra(e);
7503
7503
  const a = t.asset;
7504
7504
  if (!a)
7505
- throw new Et(t);
7505
+ throw new vt(t);
7506
7506
  const n = a.fileLink;
7507
7507
  if (n)
7508
7508
  return nt(n, !0);
@@ -7786,7 +7786,7 @@ class ve {
7786
7786
  i && i(!0);
7787
7787
  const c = t.data.initialZoomLevel, d = await Promise.all(
7788
7788
  t.data.regions.map(async (m, g) => {
7789
- const p = await Te(l[g]), f = o.getImageData(), C = a.map((I) => new bt(I.id)), w = f ? va(
7789
+ const p = await Te(l[g]), f = o.getImageData(), C = a.map((I) => new Bt(I.id)), w = f ? va(
7790
7790
  f,
7791
7791
  p,
7792
7792
  c && !t.data.forceImageCover ? { scale: c } : void 0,
@@ -8048,11 +8048,11 @@ class hs {
8048
8048
  if (!t.data || !t.data.regions)
8049
8049
  throw new we(t, "Missing regions.");
8050
8050
  n(!0);
8051
- const s = a.map((C) => new bt(C.id));
8051
+ const s = a.map((C) => new Bt(C.id));
8052
8052
  t.mandatory && i.setMandatoryFulfilled(t.stepName, !1);
8053
8053
  const o = e.asset;
8054
8054
  if (!o)
8055
- throw new Et(e);
8055
+ throw new vt(e);
8056
8056
  const l = o.fileLink;
8057
8057
  if (!l)
8058
8058
  throw new Ht(o);
@@ -8190,7 +8190,7 @@ class ms {
8190
8190
  n(!0);
8191
8191
  const s = e.material;
8192
8192
  if (!s)
8193
- throw n(!1), new Et(e);
8193
+ throw n(!1), new vt(e);
8194
8194
  return {
8195
8195
  command: void 0,
8196
8196
  followup: async () => {
@@ -8245,7 +8245,7 @@ class gs {
8245
8245
  if (h && t.option) {
8246
8246
  const g = (m = A.asset) == null ? void 0 : m.fileLink;
8247
8247
  if (!g)
8248
- throw new Et(A);
8248
+ throw new vt(A);
8249
8249
  await h.applyModelVariant(
8250
8250
  t.stepName || "",
8251
8251
  {
@@ -8270,7 +8270,7 @@ class gs {
8270
8270
  n(!0);
8271
8271
  const i = (s = e.asset) == null ? void 0 : s.fileLink;
8272
8272
  if (!i)
8273
- throw new Et(e);
8273
+ throw new vt(e);
8274
8274
  return {
8275
8275
  command: void 0,
8276
8276
  followup: async () => {
@@ -8333,7 +8333,7 @@ class ps {
8333
8333
  if (!p)
8334
8334
  return console.error(`Can not find layout for region: ${u.panelId}`), null;
8335
8335
  const f = [];
8336
- return h && f.push(new bt(m)), f.push(
8336
+ return h && f.push(new Bt(m)), f.push(
8337
8337
  new W(
8338
8338
  {
8339
8339
  stepRegion: u,
@@ -8450,12 +8450,12 @@ class fs {
8450
8450
  async selectVariantCommand(t, e, a, n) {
8451
8451
  const i = e.asset;
8452
8452
  if (!i)
8453
- throw new Et(e);
8453
+ throw new vt(e);
8454
8454
  const s = i == null ? void 0 : i.fileLink;
8455
8455
  if (!s)
8456
8456
  return console.error("No URL for picture!"), null;
8457
8457
  n(!0), t.mandatory && a.setMandatoryFulfilled(t.stepName, !1);
8458
- const l = a.getRegionElements(t.stepName).map((A) => new bt(A.id)), c = (A) => {
8458
+ const l = a.getRegionElements(t.stepName).map((A) => new Bt(A.id)), c = (A) => {
8459
8459
  const h = a.getLayouts().find((g) => g.panelId === A.panelId);
8460
8460
  if (!h)
8461
8461
  throw new Y(A);
@@ -8785,7 +8785,7 @@ const Ss = new ys(), We = (r, t, e, a, n) => {
8785
8785
  return [null, null];
8786
8786
  }, me = (r, t, e, a, n) => {
8787
8787
  let i, s;
8788
- const o = Bt(t.assetUrl), l = o.getFont();
8788
+ const o = Et(t.assetUrl), l = o.getFont();
8789
8789
  if (n.size) {
8790
8790
  const u = r / l.unitsPerEm;
8791
8791
  return [i, s] = We(e, a, r, u, o), [n.size, i, s];
@@ -8820,7 +8820,7 @@ class Es {
8820
8820
  /(\r\n|\r|(\u2665|\u00a9|\u00ae|[\u2000-\u2017]|[\u201E-\u3300]]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff]))/gm,
8821
8821
  ""
8822
8822
  );
8823
- const n = [], i = e ? Bt(e.assetUrl) : void 0;
8823
+ const n = [], i = e ? Et(e.assetUrl) : void 0;
8824
8824
  if (i) {
8825
8825
  const s = a.split("").filter((l) => !vs.includes(l)).join(""), o = s.split("").map((l) => i.getFont().charToGlyph(l));
8826
8826
  for (let l = 0; l < o.length; l++)
@@ -9140,7 +9140,7 @@ class Es {
9140
9140
  async fontDataFromVariant(t) {
9141
9141
  const e = t.asset;
9142
9142
  if (!e)
9143
- throw new Et(t);
9143
+ throw new vt(t);
9144
9144
  const a = e.fileLink;
9145
9145
  if (!a)
9146
9146
  throw new Ht(e);
@@ -9462,7 +9462,7 @@ class ks {
9462
9462
  u = (A * 100 | 0) / 100;
9463
9463
  break;
9464
9464
  default:
9465
- throw new xt("Failed to encode path.");
9465
+ throw new Ft("Failed to encode path.");
9466
9466
  }
9467
9467
  l || s.push(" "), s.push(u), l = !1;
9468
9468
  }
@@ -9476,12 +9476,12 @@ class ks {
9476
9476
  for (e.lastIndex = 0; i = e.exec(t); ) {
9477
9477
  const s = i[1].toLowerCase(), o = (i[2].match(a) || []).map(parseFloat), l = s === i[1], c = ja[s];
9478
9478
  if (o.length < c.length)
9479
- throw new xt(
9479
+ throw new Ft(
9480
9480
  `Path type "${s}" given ${o.length} arguments, expected ${c.length}.`
9481
9481
  );
9482
9482
  if (c.length > 0) {
9483
9483
  if (o.length % c.length !== 0)
9484
- throw new xt(
9484
+ throw new Ft(
9485
9485
  `Path type "${s}" given ${o.length} arguments, not divisible by ${c.length}`
9486
9486
  );
9487
9487
  for (let d = 0; d < o.length / c.length; d++) {
@@ -9506,7 +9506,7 @@ class ks {
9506
9506
  if (o in i && l in i) {
9507
9507
  const c = [i[o], i[l]], d = e(c);
9508
9508
  if (d.length < 2)
9509
- throw new xt("Transformer must return at least 2 points.");
9509
+ throw new Ft("Transformer must return at least 2 points.");
9510
9510
  i[o] = d[0], i[l] = d[1];
9511
9511
  }
9512
9512
  }
@@ -10341,7 +10341,7 @@ class Ao {
10341
10341
  this.reloadedState && this.reloadedState.serializableWorkflow.steps.forEach((o) => {
10342
10342
  this.storage[o.stepName] = o.storage || {};
10343
10343
  }), this.allScenes = await Oi(t);
10344
- const n = Ft(this.allScenes, this.stepSelections).map((o) => o.silentSteps).flat(), { stepElements: i, commands: s } = await this.stepElementsForIntroducedSilentSteps(n, !!this.reloadedState);
10344
+ const n = Dt(this.allScenes, this.stepSelections).map((o) => o.silentSteps).flat(), { stepElements: i, commands: s } = await this.stepElementsForIntroducedSilentSteps(n, !!this.reloadedState);
10345
10345
  this.commandContext.apply(new U(s), !0), this.stepElements = { ...this.stepElements, ...i }, await this.ensureStepsAreLoaded(), !this.isReloadedTransaction && this.updateStateWithServer(), this.renderLayouts(), this.reloadedState && e();
10346
10346
  }
10347
10347
  getWorkflowExperience() {
@@ -10547,7 +10547,7 @@ class Ao {
10547
10547
  },
10548
10548
  { refocusCamera: e }
10549
10549
  );
10550
- this.setModelContainer(a), Ft(this.allScenes, this.stepSelections).filter((s) => s).map((s) => s.renderableSteps).flat().filter((s) => s.type === P.Model || s.type === P.Material).forEach((s) => {
10550
+ this.setModelContainer(a), Dt(this.allScenes, this.stepSelections).filter((s) => s).map((s) => s.renderableSteps).flat().filter((s) => s.type === P.Model || s.type === P.Material).forEach((s) => {
10551
10551
  var c, d, A;
10552
10552
  if (!((c = s.option) != null && c.id)) {
10553
10553
  console.error(`Failed to read option id from step: ${s.stepName}`);
@@ -10659,7 +10659,7 @@ class Ao {
10659
10659
  const t = this.getCommandContext().getState();
10660
10660
  if (!t)
10661
10661
  throw new G("Attempted to serialize state before it was initialized.");
10662
- const e = vt(t.transaction), a = this.dehydrateState(e);
10662
+ const e = xt(t.transaction), a = this.dehydrateState(e);
10663
10663
  return JSON.stringify(a);
10664
10664
  }
10665
10665
  /**
@@ -10792,7 +10792,7 @@ class Ao {
10792
10792
  async reset() {
10793
10793
  this.commandContext.getAllLayouts().forEach(
10794
10794
  (e) => e.layoutState.elements.forEach((a) => {
10795
- this.getCommandDispatcher()(new bt(a.id));
10795
+ this.getCommandDispatcher()(new Bt(a.id));
10796
10796
  })
10797
10797
  ), this.stepElements = {}, this.stepInitialised = {}, this.stepMetadata = {}, this.stepSelections = {}, this.storage = {}, await this.ensureStepsAreLoaded();
10798
10798
  }
@@ -10805,7 +10805,7 @@ class Ao {
10805
10805
  }, this.selectionCost = Object.values(this.stepSelections).reduce((E, B) => E + B.selectedVariants.map((I) => I.priceModifier || 0).reduce((I, D) => I + D, 0), 0), this.workflow.steps.forEach((E) => {
10806
10806
  St(E, this.stepSelections) || (this.stepInitialised[E.stepName] = !1, delete this.stepMetadata[E.stepName], delete this.stepSelections[E.stepName], delete this.storage[E.stepName]);
10807
10807
  });
10808
- const s = this.allScenes, o = Ft(s, i), l = Ft(s, this.stepSelections), c = o.map((E) => E.silentSteps).flat(), A = l.map((E) => E.silentSteps).flat().filter(
10808
+ const s = this.allScenes, o = Dt(s, i), l = Dt(s, this.stepSelections), c = o.map((E) => E.silentSteps).flat(), A = l.map((E) => E.silentSteps).flat().filter(
10809
10809
  (E) => !c.some((B) => B.stepName === E.stepName)
10810
10810
  );
10811
10811
  c.forEach((E) => {
@@ -10822,7 +10822,7 @@ class Ao {
10822
10822
  const E = (S = this.getWorkflowExperience().getStepById(g.stepName)) == null ? void 0 : S.frameService;
10823
10823
  E == null || E.setTargetElements(a.map((B) => B.id));
10824
10824
  }
10825
- const p = u.map((E) => new bt(E.id)), f = new za(this.constructSerializableWorkflow()), C = [...m, ...p, f];
10825
+ const p = u.map((E) => new Bt(E.id)), f = new za(this.constructSerializableWorkflow()), C = [...m, ...p, f];
10826
10826
  C.length > 0 && this.commandContext.apply(new U(C), !0), await this.ensureStepsAreLoaded(), this.onElementsChange();
10827
10827
  const w = this.getInvalidModelVariants(), v = this.modelContainer;
10828
10828
  if (v) {
@@ -10840,7 +10840,7 @@ class Ao {
10840
10840
  await this.onSelectionChange(), n && await n();
10841
10841
  }
10842
10842
  async ensureStepsAreLoaded() {
10843
- const e = Ft(this.allScenes, this.stepSelections).map((l) => l.renderableSteps), a = [], n = e.flat();
10843
+ const e = Dt(this.allScenes, this.stepSelections).map((l) => l.renderableSteps), a = [], n = e.flat();
10844
10844
  for (const l of n)
10845
10845
  if (!this.stepInitialised[l.stepName])
10846
10846
  switch (this.stepInitialised[l.stepName] = !0, l.type) {
@@ -12490,7 +12490,7 @@ class Qo {
12490
12490
  }
12491
12491
  async copy() {
12492
12492
  var s;
12493
- const t = vt(this.getCommandContext().getState());
12493
+ const t = xt(this.getCommandContext().getState());
12494
12494
  if (!t)
12495
12495
  throw new G("Internal state is undefined! Cannot copy experience!");
12496
12496
  const e = JSON.stringify(t.transaction), a = this.getWorkflowManager().getWorkflow(), n = (s = this.getWorkflowManager().getTransaction().integrationProduct) == null ? void 0 : s.id;
@@ -12723,7 +12723,7 @@ const No = [
12723
12723
  B.classList.add(N), g[N] = { browserValue: F };
12724
12724
  }
12725
12725
  });
12726
- const f = It().serializeToString(m), C = n.colors;
12726
+ const f = bt().serializeToString(m), C = n.colors;
12727
12727
  if (C) {
12728
12728
  for (const [B, I] of Object.entries(g))
12729
12729
  for (const D of Object.keys(C))
@@ -12926,8 +12926,8 @@ const No = [
12926
12926
  const c = await nt(i, !0), d = (A) => {
12927
12927
  const u = /<svg.*?<\/svg>/s, h = A.match(u) || [], m = (h == null ? void 0 : h.length) > 0 ? h[0] : "", f = At().parseFromString(m, "image/svg+xml").firstElementChild;
12928
12928
  if (!f)
12929
- throw new xt("Failed to read SVG.");
12930
- return ga(f), It().serializeToString(f);
12929
+ throw new Ft("Failed to read SVG.");
12930
+ return ga(f), bt().serializeToString(f);
12931
12931
  };
12932
12932
  l.forEach((A) => {
12933
12933
  const u = r.find((m) => m.panelId === A.panelId);
@@ -13184,7 +13184,7 @@ class Jo {
13184
13184
  * Actions to perform when a static render event is fired for this canvas.
13185
13185
  */
13186
13186
  async render(t) {
13187
- const e = vt(t);
13187
+ const e = xt(t);
13188
13188
  this.lastRequestedRenderArguments = e;
13189
13189
  const a = this.getStaticContext();
13190
13190
  if (!a) {
@@ -13852,7 +13852,7 @@ class al {
13852
13852
  }
13853
13853
  async setGlobalPropertyState(t) {
13854
13854
  this.globalPropertyState || await this.initPromise;
13855
- const e = vt(this.globalPropertyState);
13855
+ const e = xt(this.globalPropertyState);
13856
13856
  this.globalPropertyState = { ...t, id: e.id }, await this.updateGlobalPropertyState(), await this.onGlobalPropertyStateChange(e, this.globalPropertyState);
13857
13857
  }
13858
13858
  getAspect(t, e) {
@@ -13876,7 +13876,7 @@ class al {
13876
13876
  const i = this.configuration.aspects.find((l) => l.name === t);
13877
13877
  if (!i)
13878
13878
  throw new Error(`Failed to find configuration aspect with name: ${t}`);
13879
- const s = vt(this.globalPropertyState), o = this.globalPropertyState.aspects.filter((l) => l.name === t);
13879
+ const s = xt(this.globalPropertyState), o = this.globalPropertyState.aspects.filter((l) => l.name === t);
13880
13880
  if (o.length > 0)
13881
13881
  if (n) {
13882
13882
  const l = o.find((c) => c.channel === n);
@@ -13917,7 +13917,7 @@ class al {
13917
13917
  const n = this.configuration.aspects.find((o) => o.name === t);
13918
13918
  if (!n)
13919
13919
  throw new Error(`Failed to find configuration aspect with name: ${t}`);
13920
- const i = vt(this.globalPropertyState), s = this.globalPropertyState.aspects.filter((o) => o.name === t);
13920
+ const i = xt(this.globalPropertyState), s = this.globalPropertyState.aspects.filter((o) => o.name === t);
13921
13921
  if (s.length > 0)
13922
13922
  if (a) {
13923
13923
  const o = s.find((l) => l.channel === a);
@@ -14287,9 +14287,9 @@ class tr {
14287
14287
  },
14288
14288
  errorPolicy: "all",
14289
14289
  fetchPolicy: "cache-first"
14290
- }), l = ((A = (d = (c = o == null ? void 0 : o.data) == null ? void 0 : c.productCollections) == null ? void 0 : d[0].productCollectionProductsFeed) == null ? void 0 : A.items.filter((g) => !!g.product).map((g) => new ce(g))) || [];
14290
+ });
14291
14291
  return {
14292
- items: vt(l),
14292
+ items: ((A = (d = (c = o == null ? void 0 : o.data) == null ? void 0 : c.productCollections) == null ? void 0 : d[0].productCollectionProductsFeed) == null ? void 0 : A.items.filter((g) => !!g.product).map((g) => new ce(g))) || [],
14293
14293
  total: ((m = (h = (u = o == null ? void 0 : o.data) == null ? void 0 : u.productCollections) == null ? void 0 : h[0].productCollectionProductsFeed) == null ? void 0 : m.total) ?? 0
14294
14294
  };
14295
14295
  }
@@ -15679,7 +15679,7 @@ class Zc {
15679
15679
  } catch (a) {
15680
15680
  throw console.error(a), new ht("Critical - Unable to synchronize workflow state with server.");
15681
15681
  }
15682
- }, this.options = t, this.options.applicationKey && Qr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 26.38.0-beta.875901e0-62d3-57ec-9127-b7291c4a69f9"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
15682
+ }, this.options = t, this.options.applicationKey && Qr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 26.38.0-beta.917e3bd5-5e3d-5efa-82e7-0473353ee3ce"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
15683
15683
  }
15684
15684
  configure(t) {
15685
15685
  gt.setHubUrl(t.hubUrl), gt.setServerUrl(t.serverUrl), gt.setServicesApiUrl(t.servicesApiUrl), this.marketplaceThemeInstallId = t.marketplaceThemeInstallId, this.marketplaceThemeInstallConfigurationId = t.marketplaceThemeInstallConfigurationId, t.bearerAuthenticationToken && Rr(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration();
@@ -17388,7 +17388,7 @@ export {
17388
17388
  Kl as AddressValidationResultConfirmationLevel,
17389
17389
  _c as ArrayInput,
17390
17390
  at as AspectType,
17391
- Et as AssetNotFoundError,
17391
+ vt as AssetNotFoundError,
17392
17392
  pe as AssetType,
17393
17393
  jc as BringForwardCommand,
17394
17394
  Wc as BringToBackCommand,
@@ -17402,7 +17402,7 @@ export {
17402
17402
  zl as ConversionLocation,
17403
17403
  W as CreateElementCommand,
17404
17404
  Ln as CreateLayoutCommand,
17405
- bt as DeleteElementCommand,
17405
+ Bt as DeleteElementCommand,
17406
17406
  yo as DigitalContentStepHandle,
17407
17407
  Xo as FileUploadGlobalPropertyHandle,
17408
17408
  de as FlowExecutionNodeResult,
@@ -17436,7 +17436,7 @@ export {
17436
17436
  Cl as ObjectInputType,
17437
17437
  Zn as OptionGlobalPropertyHandle,
17438
17438
  Ce as OptionNotFoundError,
17439
- xt as ParseError,
17439
+ Ft as ParseError,
17440
17440
  go as PictureStepHandle,
17441
17441
  Sr as ProductCameraRig,
17442
17442
  tr as ProductCollection,
@@ -17560,6 +17560,6 @@ export {
17560
17560
  Ss as toast,
17561
17561
  Cd as validateWorkflowExperienceRecipient,
17562
17562
  wd as validateWorkflowExperienceRecipients,
17563
- It as xmlSerializer
17563
+ bt as xmlSerializer
17564
17564
  };
17565
17565
  //# sourceMappingURL=index.mjs.map