@spiffcommerce/core 34.0.0-beta.eb70dc77-1c26-5362-97cc-339b6daa5bc7 → 34.0.0-beta.ee7533e8-2025-5ab5-9b84-699a87a6cc70

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
@@ -8,8 +8,8 @@ import { parse as yn } from "css";
8
8
  import ki from "fuse.js";
9
9
  import { Pith as va } from "pith";
10
10
  import Et from "lodash.clonedeep";
11
- import jt from "lodash.isequal";
12
- import { jsx as P, jsxs as ct, Fragment as Gt } from "preact/jsx-runtime";
11
+ import Yt from "lodash.isequal";
12
+ import { jsx as P, jsxs as ct, Fragment as Wt } from "preact/jsx-runtime";
13
13
  import { parse as la } from "opentype.js";
14
14
  import Mi from "handlebars";
15
15
  import { dataUriToBuffer as Ti } from "data-uri-to-buffer";
@@ -24,38 +24,38 @@ import vn from "lodash.debounce";
24
24
  import "fs";
25
25
  import "path";
26
26
  import $i from "lodash.omit";
27
- var Ee = /* @__PURE__ */ ((n) => (n.Data = "Data", n.Font = "Font", n.Frame = "Frame", n.Illustration = "Illustration", n.Image = "Image", n.Model = "Model", n.Material = "Material", n.Color = "Color", n.QuestionnaireCollateral = "QuestionnaireCollateral", n.RequestCollateral = "RequestCollateral", n.SignupCollateral = "SignupCollateral", n.Video = "Video", n.ColorProfile = "ColorProfile", n.Environment = "Environment", n))(Ee || {}), En = /* @__PURE__ */ ((n) => (n.AND = "AND", n.OR = "OR", n))(En || {}), z = /* @__PURE__ */ ((n) => (n.FileUpload = "FileUpload", n.Option = "Option", n.ColorOption = "ColorOption", n.Text = "Text", n))(z || {}), b = /* @__PURE__ */ ((n) => (n.Information = "Information", n.Bulk = "Bulk", n.DigitalContent = "DigitalContent", n.Finish = "Finish", n.Frame = "Frame", n.Illustration = "Illustration", n.Introduction = "Introduction", n.Material = "Material", n.Model = "Model", n.Module = "Module", n.Picture = "Picture", n.Photo = "Photo", n.ProductOverlay = "ProductOverlay", n.Question = "Question", n.Shape = "Shape", n.SilentIllustration = "SilentIllustration", n.Text = "Text", n))(b || {}), Ui = /* @__PURE__ */ ((n) => (n.Color = "Color", n.Colors = "Colors", n.Selection = "Selection", n.Selections = "Selections", n.Text = "Text", n.Upload = "Upload", n))(Ui || {}), Yt = /* @__PURE__ */ ((n) => (n.ThreeD = "ThreeD", n.FreeDesign = "FreeDesign", n.Print = "Print", n))(Yt || {}), F = /* @__PURE__ */ ((n) => (n.Frame = "frame", n.Group = "group", n.Image = "image", n.Pattern = "pattern", n.Illustration = "illustration", n.Textbox = "textbox", n))(F || {}), Li = /* @__PURE__ */ ((n) => (n.Default = "Default", n.FirstTransaction = "FirstTransaction", n.OneToOne = "OneToOne", n))(Li || {}), bn = /* @__PURE__ */ ((n) => (n.Pending = "Pending", n.Failed = "Failed", n.Validated = "Validated", n.Overridden = "Overridden", n))(bn || {}), Vi = /* @__PURE__ */ ((n) => (n.Hyperlink = "Hyperlink", n.Edit = "Edit", n.Approve = "Approve", n))(Vi || {}), zi = /* @__PURE__ */ ((n) => (n.Hub = "Hub", n.Shopify = "Shopify", n))(zi || {}), Ea = /* @__PURE__ */ ((n) => (n.BackgroundRemover = "BackgroundRemover", n.ConversionAccelerator = "Conversion Accelerator", n.ProcessBuilder = "ProcessBuilder", n))(Ea || {}), Gi = /* @__PURE__ */ ((n) => (n[n.Orbit = 0] = "Orbit", n[n.Pan = 1] = "Pan", n))(Gi || {}), be = /* @__PURE__ */ ((n) => (n.Owner = "Owner", n.Approver = "Approver", n.Editor = "Editor", n.Viewer = "Viewer", n))(be || {}), kt = /* @__PURE__ */ ((n) => (n.Autosize = "Autosize", n.Traditional = "Traditional", n))(kt || {}), j = /* @__PURE__ */ ((n) => (n[n.North = 0] = "North", n[n.Northeast = 1] = "Northeast", n[n.East = 2] = "East", n[n.Southeast = 3] = "Southeast", n[n.South = 4] = "South", n[n.Southwest = 5] = "Southwest", n[n.West = 6] = "West", n[n.Northwest = 7] = "Northwest", n))(j || {}), Wi = /* @__PURE__ */ ((n) => (n.Pixel = "px", n.Millimeter = "mm", n.Centimeter = "cm", n))(Wi || {});
27
+ var Ee = /* @__PURE__ */ ((n) => (n.Data = "Data", n.Font = "Font", n.Frame = "Frame", n.Illustration = "Illustration", n.Image = "Image", n.Model = "Model", n.Material = "Material", n.Color = "Color", n.QuestionnaireCollateral = "QuestionnaireCollateral", n.RequestCollateral = "RequestCollateral", n.SignupCollateral = "SignupCollateral", n.Video = "Video", n.ColorProfile = "ColorProfile", n.Environment = "Environment", n))(Ee || {}), En = /* @__PURE__ */ ((n) => (n.AND = "AND", n.OR = "OR", n))(En || {}), z = /* @__PURE__ */ ((n) => (n.FileUpload = "FileUpload", n.Option = "Option", n.ColorOption = "ColorOption", n.Text = "Text", n))(z || {}), b = /* @__PURE__ */ ((n) => (n.Information = "Information", n.Bulk = "Bulk", n.DigitalContent = "DigitalContent", n.Finish = "Finish", n.Frame = "Frame", n.Illustration = "Illustration", n.Introduction = "Introduction", n.Material = "Material", n.Model = "Model", n.Module = "Module", n.Picture = "Picture", n.Photo = "Photo", n.ProductOverlay = "ProductOverlay", n.Question = "Question", n.Shape = "Shape", n.SilentIllustration = "SilentIllustration", n.Text = "Text", n))(b || {}), Ui = /* @__PURE__ */ ((n) => (n.Color = "Color", n.Colors = "Colors", n.Selection = "Selection", n.Selections = "Selections", n.Text = "Text", n.Upload = "Upload", n))(Ui || {}), Jt = /* @__PURE__ */ ((n) => (n.ThreeD = "ThreeD", n.FreeDesign = "FreeDesign", n.Print = "Print", n))(Jt || {}), F = /* @__PURE__ */ ((n) => (n.Frame = "frame", n.Group = "group", n.Image = "image", n.Pattern = "pattern", n.Illustration = "illustration", n.Textbox = "textbox", n))(F || {}), Li = /* @__PURE__ */ ((n) => (n.Default = "Default", n.FirstTransaction = "FirstTransaction", n.OneToOne = "OneToOne", n))(Li || {}), bn = /* @__PURE__ */ ((n) => (n.Pending = "Pending", n.Failed = "Failed", n.Validated = "Validated", n.Overridden = "Overridden", n))(bn || {}), Vi = /* @__PURE__ */ ((n) => (n.Hyperlink = "Hyperlink", n.Edit = "Edit", n.Approve = "Approve", n))(Vi || {}), zi = /* @__PURE__ */ ((n) => (n.Hub = "Hub", n.Shopify = "Shopify", n))(zi || {}), Ea = /* @__PURE__ */ ((n) => (n.BackgroundRemover = "BackgroundRemover", n.ConversionAccelerator = "Conversion Accelerator", n.ProcessBuilder = "ProcessBuilder", n))(Ea || {}), Gi = /* @__PURE__ */ ((n) => (n[n.Orbit = 0] = "Orbit", n[n.Pan = 1] = "Pan", n))(Gi || {}), be = /* @__PURE__ */ ((n) => (n.Owner = "Owner", n.Approver = "Approver", n.Editor = "Editor", n.Viewer = "Viewer", n))(be || {}), Mt = /* @__PURE__ */ ((n) => (n.Autosize = "Autosize", n.Traditional = "Traditional", n))(Mt || {}), j = /* @__PURE__ */ ((n) => (n[n.North = 0] = "North", n[n.Northeast = 1] = "Northeast", n[n.East = 2] = "East", n[n.Southeast = 3] = "Southeast", n[n.South = 4] = "South", n[n.Southwest = 5] = "Southwest", n[n.West = 6] = "West", n[n.Northwest = 7] = "Northwest", n))(j || {}), Wi = /* @__PURE__ */ ((n) => (n.Pixel = "px", n.Millimeter = "mm", n.Centimeter = "cm", n))(Wi || {});
28
28
  class In extends Error {
29
29
  constructor(t) {
30
30
  super(t), this.name = this.constructor.name;
31
31
  }
32
32
  }
33
- class Zt extends In {
33
+ class te extends In {
34
34
  constructor(t) {
35
35
  super(`ConfigurationError - ${t}`);
36
36
  }
37
37
  }
38
- class Ie extends Zt {
38
+ class Ie extends te {
39
39
  constructor(t) {
40
40
  super(`Option not Configured: ${t.stepTitle}`), this.optionId = t?.optionId || "N/A";
41
41
  }
42
42
  }
43
- class J extends Zt {
43
+ class J extends te {
44
44
  constructor(t) {
45
45
  super(`Panel not Found: ${t.panelId}`), this.panelId = t?.panelId || "N/A";
46
46
  }
47
47
  }
48
- class bt extends Zt {
48
+ class bt extends te {
49
49
  constructor(t) {
50
50
  super(`Asset not found for variant: ${t.name}`), this.variant = t;
51
51
  }
52
52
  }
53
- class Jt extends Zt {
53
+ class Kt extends te {
54
54
  constructor(t) {
55
55
  super(`Resource not found for asset: ${t.name}`), this.asset = t;
56
56
  }
57
57
  }
58
- class Be extends Zt {
58
+ class Be extends te {
59
59
  constructor(t, e) {
60
60
  super(`Workflow Misconfiguration: ${t.stepName} - ${e}`), this.step = t;
61
61
  }
@@ -70,7 +70,7 @@ class Q extends Ne {
70
70
  super(`Unhandled Behavior Encountered: ${t}`);
71
71
  }
72
72
  }
73
- class Pt extends Ne {
73
+ class xt extends Ne {
74
74
  constructor(t) {
75
75
  super(`Parsing Error: ${t}`);
76
76
  }
@@ -169,7 +169,7 @@ function ad(n) {
169
169
  function nd(n) {
170
170
  Aa = n;
171
171
  }
172
- function te() {
172
+ function ee() {
173
173
  return da ? new da().window : (console.log(
174
174
  "DOM constructor is not registered. Assuming browser environment. If not, please register DOM constructor before calling this function."
175
175
  ), window);
@@ -197,17 +197,17 @@ const Bn = /* @__PURE__ */ new Map(), Wa = /* @__PURE__ */ new Map(), qa = /* @_
197
197
  if (t) return t;
198
198
  const a = (async () => await (await nt(n)).text())();
199
199
  return qa.set(n, a), a;
200
- }, Mt = (n) => n.every((t) => t !== "undefined"), le = (n) => Mt([typeof document]) ? document.createElement(n) : te().document.createElement(n), Ji = (n, t) => {
201
- if (Mt([typeof document]))
200
+ }, Tt = (n) => n.every((t) => t !== "undefined"), ce = (n) => Tt([typeof document]) ? document.createElement(n) : ee().document.createElement(n), Ji = (n, t) => {
201
+ if (Tt([typeof document]))
202
202
  return document.createElementNS(n, t);
203
- const a = te().document.createElement(t);
203
+ const a = ee().document.createElement(t);
204
204
  return a.setAttribute("xmlns", n), a;
205
205
  }, dt = () => {
206
- if (Mt([typeof DOMParser]))
206
+ if (Tt([typeof DOMParser]))
207
207
  return new DOMParser();
208
- const n = te();
208
+ const n = ee();
209
209
  return new n.DOMParser();
210
- }, Ki = () => Mt([typeof DOMParser]) ? DOMParser : te().DOMParser, Re = (n, t) => new Promise((e, a) => {
210
+ }, Ki = () => Tt([typeof DOMParser]) ? DOMParser : ee().DOMParser, Re = (n, t) => new Promise((e, a) => {
211
211
  t ? Pn(n).then(e).catch(a) : nt(n).then((i) => {
212
212
  i.arrayBuffer().then(e).catch(a);
213
213
  }).catch((i) => {
@@ -218,7 +218,7 @@ const Bn = /* @__PURE__ */ new Map(), Wa = /* @__PURE__ */ new Map(), qa = /* @_
218
218
  i.text().then(e).catch(a);
219
219
  }).catch(a);
220
220
  }), xn = (n) => xi(n), je = /* @__PURE__ */ new Map(), _i = async (n, t) => {
221
- if (Mt([typeof FontFace])) {
221
+ if (Tt([typeof FontFace])) {
222
222
  if (je.has(t))
223
223
  return je.get(t);
224
224
  const e = n.names.fullName.en, a = new FontFace(e, `url(${t})`);
@@ -227,9 +227,9 @@ const Bn = /* @__PURE__ */ new Map(), Wa = /* @__PURE__ */ new Map(), qa = /* @_
227
227
  return je.set(t, i), i;
228
228
  }
229
229
  }, It = () => {
230
- if (Mt([typeof XMLSerializer]))
230
+ if (Tt([typeof XMLSerializer]))
231
231
  return new XMLSerializer();
232
- const n = te();
232
+ const n = ee();
233
233
  return new n.XMLSerializer();
234
234
  }, Ha = (n) => btoa(n), Oe = (n) => {
235
235
  function t() {
@@ -375,7 +375,7 @@ const ft = (n, t, e) => {
375
375
  } catch {
376
376
  throw new Error("Canvas module not set");
377
377
  }
378
- }, ee = (n, t) => {
378
+ }, ae = (n, t) => {
379
379
  if (ha !== void 0)
380
380
  return ha(n, t);
381
381
  try {
@@ -411,21 +411,21 @@ let Ye;
411
411
  function Ba() {
412
412
  return Ye === void 0 && (Ye = Ki()), Ye;
413
413
  }
414
- let ce = null;
414
+ let de = null;
415
415
  const cr = (n) => new Promise((t) => {
416
416
  if (Oe(n) !== "image/jpeg")
417
417
  return t(1);
418
418
  Di(n).then((a) => t(a || 1)).catch(() => t(1));
419
419
  }), dr = async () => {
420
- if (ce !== null)
421
- return !ce;
422
- const t = await ee("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAIAAwMBEQACEQEDEQH/xABRAAEAAAAAAAAAAAAAAAAAAAAKEAEBAQADAQEAAAAAAAAAAAAGBQQDCAkCBwEBAAAAAAAAAAAAAAAAAAAAABEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8AG8T9NfSMEVMhQvoP3fFiRZ+MTHDifa/95OFSZU5OzRzxkyejv8ciEfhSceSXGjS8eSdLnZc2HDm4M3BxcXwH/9k=");
423
- return ce = t.width === 2 && t.height === 3, !ce;
420
+ if (de !== null)
421
+ return !de;
422
+ const t = await ae("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAIAAwMBEQACEQEDEQH/xABRAAEAAAAAAAAAAAAAAAAAAAAKEAEBAQADAQEAAAAAAAAAAAAGBQQDCAkCBwEBAAAAAAAAAAAAAAAAAAAAABEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8AG8T9NfSMEVMhQvoP3fFiRZ+MTHDifa/95OFSZU5OzRzxkyejv8ciEfhSceSXGjS8eSdLnZc2HDm4M3BxcXwH/9k=");
423
+ return de = t.width === 2 && t.height === 3, !de;
424
424
  }, Ar = (n) => {
425
425
  const e = n.naturalWidth / n.naturalHeight;
426
426
  return n.naturalHeight <= 8192 && n.naturalWidth <= 8192 ? [n.naturalWidth, n.naturalHeight] : n.naturalHeight > n.naturalWidth ? [e * 8192, 8192] : [8192, 8192 / e];
427
427
  }, ur = async (n) => {
428
- const t = await Zi(n), e = await ee(t), [a, i] = Ar(e);
428
+ const t = await Zi(n), e = await ae(t), [a, i] = Ar(e);
429
429
  if (!await dr()) {
430
430
  const A = ft(a, i);
431
431
  return A.getContext("2d")?.drawImage(e, 0, 0, a, i), A;
@@ -466,7 +466,7 @@ const cr = (n) => new Promise((t) => {
466
466
  height: t.height,
467
467
  width: t.width
468
468
  };
469
- }, Kt = [
469
+ }, _t = [
470
470
  "Yellow C",
471
471
  "Yellow 012 C",
472
472
  "Orange 021 C",
@@ -1808,7 +1808,7 @@ const cr = (n) => new Promise((t) => {
1808
1808
  "Black 5 C",
1809
1809
  "Black 6 C",
1810
1810
  "Black 7 C"
1811
- ], Ft = [
1811
+ ], Dt = [
1812
1812
  "FEDD00",
1813
1813
  "FFD700",
1814
1814
  "FE5000",
@@ -3150,18 +3150,18 @@ const cr = (n) => new Promise((t) => {
3150
3150
  "3E2B2E",
3151
3151
  "101820",
3152
3152
  "3D3935"
3153
- ], Je = Ft.map((n) => [
3153
+ ], Je = Dt.map((n) => [
3154
3154
  parseInt(n.substring(0, 2), 16),
3155
3155
  parseInt(n.substring(2, 4), 16),
3156
3156
  parseInt(n.substring(4, 6), 16)
3157
3157
  ]);
3158
3158
  function rd(n) {
3159
- const t = Kt.indexOf(n);
3160
- return t >= 0 ? Ft[t] : "";
3159
+ const t = _t.indexOf(n);
3160
+ return t >= 0 ? Dt[t] : "";
3161
3161
  }
3162
3162
  function hr(n) {
3163
- const t = Ft.indexOf(n);
3164
- return t >= 0 ? Kt[t] : "";
3163
+ const t = Dt.indexOf(n);
3164
+ return t >= 0 ? _t[t] : "";
3165
3165
  }
3166
3166
  function od(n, t = 64) {
3167
3167
  const e = [], a = [], i = hr(n);
@@ -3172,36 +3172,36 @@ function od(n, t = 64) {
3172
3172
  });
3173
3173
  const r = parseInt(n.substring(0, 2), 16), o = parseInt(n.substring(2, 4), 16), s = parseInt(n.substring(4, 6), 16);
3174
3174
  let l, c, d;
3175
- for (let A = 0; A < Ft.length; A++) {
3175
+ for (let A = 0; A < Dt.length; A++) {
3176
3176
  l = Je[A][0], c = Je[A][1], d = Je[A][2];
3177
3177
  const u = Math.sqrt(Math.pow(r - l, 2) + Math.pow(o - c, 2) + Math.pow(s - d, 2));
3178
3178
  a.push(u);
3179
3179
  }
3180
3180
  for (let A = 0; A < a.length; A++)
3181
- a[A] <= t && !e.some((u) => u.pms === Kt[A]) && e.push({ pms: Kt[A], hex: Ft[A], distance: a[A] });
3181
+ a[A] <= t && !e.some((u) => u.pms === _t[A]) && e.push({ pms: _t[A], hex: Dt[A], distance: a[A] });
3182
3182
  return e.sort((A, u) => A.distance - u.distance);
3183
3183
  }
3184
- const gr = Kt.map((n, t) => ({ pms: n, hex: Ft[t] })), mr = new ki(gr, { keys: ["pms"] });
3184
+ const gr = _t.map((n, t) => ({ pms: n, hex: Dt[t] })), mr = new ki(gr, { keys: ["pms"] });
3185
3185
  function sd(n, t) {
3186
3186
  return mr.search(n, t ? { limit: t } : void 0);
3187
3187
  }
3188
- let Qt = null;
3188
+ let Rt = null;
3189
3189
  function pr(n) {
3190
3190
  if (n.startsWith("#"))
3191
3191
  return ja(n);
3192
3192
  if (!document)
3193
3193
  throw new Error("browserColorToHex is only supported on browsers");
3194
- if (Qt || (Qt = document.createElement("canvas").getContext("2d")), !Qt)
3194
+ if (Rt || (Rt = document.createElement("canvas").getContext("2d")), !Rt)
3195
3195
  throw new Error("Failed to create canvas context required to convert colors");
3196
- Qt.fillStyle = n;
3197
- const t = ja(Qt.fillStyle);
3196
+ Rt.fillStyle = n;
3197
+ const t = ja(Rt.fillStyle);
3198
3198
  return t || console.error(`Unknown browser color ${n}`), t;
3199
3199
  }
3200
3200
  function ja(n) {
3201
3201
  const t = n.substring(1).toUpperCase();
3202
3202
  return t.length === 6 ? t : t.length === 3 ? `${t[0]}${t[0]}${t[1]}${t[1]}${t[2]}${t[2]}` : "";
3203
3203
  }
3204
- const de = (n) => {
3204
+ const Bt = (n) => {
3205
3205
  const t = Tn(n.spotColor);
3206
3206
  return t ? `${n.browserValue} ${t}` : n.browserValue;
3207
3207
  }, Tn = (n) => {
@@ -3238,8 +3238,8 @@ const de = (n) => {
3238
3238
  "textPath",
3239
3239
  "tref",
3240
3240
  "tspan"
3241
- ], Cr = ["fill", "stroke"], Dt = (n, t) => {
3242
- t(n), n.children.length > 0 && Array.from(n.children).forEach((e) => Dt(e, t));
3241
+ ], Cr = ["fill", "stroke"], kt = (n, t) => {
3242
+ t(n), n.children.length > 0 && Array.from(n.children).forEach((e) => kt(e, t));
3243
3243
  }, wr = (n, t) => {
3244
3244
  try {
3245
3245
  return n.matches(t);
@@ -3249,7 +3249,7 @@ const de = (n) => {
3249
3249
  }, Pa = (n, t = !1) => {
3250
3250
  !t && n.setAttribute("preserveAspectRatio", "none");
3251
3251
  const e = [];
3252
- Dt(n, (a) => {
3252
+ kt(n, (a) => {
3253
3253
  if (a.tagName === "script") {
3254
3254
  a.remove();
3255
3255
  return;
@@ -3275,7 +3275,7 @@ const de = (n) => {
3275
3275
  }
3276
3276
  }), r.length > 0 ? a.setAttribute("style", r.join(";")) : a.removeAttribute("style");
3277
3277
  }
3278
- }), Dt(n, (a) => {
3278
+ }), kt(n, (a) => {
3279
3279
  e.forEach((i) => {
3280
3280
  i.selectors?.forEach((r) => {
3281
3281
  wr(a, r) && i.declarations?.forEach((o) => {
@@ -3291,39 +3291,57 @@ const de = (n) => {
3291
3291
  }, Nn = (n) => dt().parseFromString(n, "image/svg+xml").firstElementChild, Sr = (n, t, e) => {
3292
3292
  n.setAttribute("height", `${e}px`), n.setAttribute("width", `${t}px`);
3293
3293
  }, Qn = (n, t, e) => {
3294
- Dt(n, (a) => {
3294
+ kt(n, (a) => {
3295
3295
  const i = a.attributes.getNamedItem("fill");
3296
- i && i.value !== "none" && a.classList.forEach((o) => {
3297
- if (o.startsWith("spiff-fill")) {
3298
- const s = t[o.replace("spiff-fill-", "")];
3299
- if (s)
3296
+ i && i.value !== "none" && a.classList.forEach((s) => {
3297
+ if (s.startsWith("spiff-fill")) {
3298
+ const l = t[s.replace("spiff-fill-", "")];
3299
+ if (l)
3300
3300
  a.setAttribute(
3301
3301
  "fill",
3302
- e ? de(s) : s.browserValue
3302
+ e ? Bt(l) : l.browserValue
3303
3303
  );
3304
3304
  else {
3305
- const l = t[o];
3306
- l && a.setAttribute(
3305
+ const c = t[s];
3306
+ c && a.setAttribute(
3307
3307
  "fill",
3308
- e ? de(l) : l.browserValue
3308
+ e ? Bt(c) : c.browserValue
3309
3309
  );
3310
3310
  }
3311
3311
  }
3312
3312
  });
3313
- const r = a.attributes.getNamedItem("stroke");
3314
- r && r.value !== "none" && a.classList.forEach((o) => {
3315
- if (o.startsWith("spiff-stroke")) {
3316
- const s = t[o.replace("spiff-stroke-", "")];
3317
- if (s)
3313
+ const r = a.attributes.getNamedItem("spiff-fill");
3314
+ r && r.value === "undefined" && a.classList.forEach((s) => {
3315
+ if (s.startsWith("spiff-fill")) {
3316
+ const l = t[s.replace("spiff-fill-", "")];
3317
+ if (l)
3318
+ a.setAttribute(
3319
+ "fill",
3320
+ e ? Bt(l) : l.browserValue
3321
+ );
3322
+ else {
3323
+ const c = t[s];
3324
+ c && a.setAttribute(
3325
+ "fill",
3326
+ e ? Bt(c) : c.browserValue
3327
+ );
3328
+ }
3329
+ }
3330
+ });
3331
+ const o = a.attributes.getNamedItem("stroke");
3332
+ o && o.value !== "none" && a.classList.forEach((s) => {
3333
+ if (s.startsWith("spiff-stroke")) {
3334
+ const l = t[s.replace("spiff-stroke-", "")];
3335
+ if (l)
3318
3336
  a.setAttribute(
3319
3337
  "stroke",
3320
- e ? de(s) : s.browserValue
3338
+ e ? Bt(l) : l.browserValue
3321
3339
  );
3322
3340
  else {
3323
- const l = t[o];
3324
- l && a.setAttribute(
3341
+ const c = t[s];
3342
+ c && a.setAttribute(
3325
3343
  "fill",
3326
- e ? de(l) : l.browserValue
3344
+ e ? Bt(c) : c.browserValue
3327
3345
  );
3328
3346
  }
3329
3347
  }
@@ -3348,8 +3366,11 @@ const de = (n) => {
3348
3366
  throw new Error("Failed to read SVG.");
3349
3367
  Pa(e);
3350
3368
  const a = {};
3351
- Dt(e, (o) => {
3352
- fr.includes(o.tagName) && !o.attributes.getNamedItem("fill") && o.setAttribute("spiff-fill", "none");
3369
+ kt(e, (o) => {
3370
+ if (fr.includes(o.tagName) && !o.attributes.getNamedItem("fill")) {
3371
+ const c = "spiff-fill-undefined";
3372
+ o.setAttribute("spiff-fill", "undefined"), o.classList.add(c), a.undefined = { browserValue: "undefined" };
3373
+ }
3353
3374
  const s = o.attributes.getNamedItem("fill");
3354
3375
  if (s && s.value !== "none" && !s.value.startsWith("url(")) {
3355
3376
  const c = Ya(s.value), d = c.browserValue.replace(/\W/g, ""), A = `spiff-fill-${d}`;
@@ -3373,7 +3394,7 @@ const de = (n) => {
3373
3394
  value
3374
3395
  }
3375
3396
  }
3376
- `, ae = (n) => C`
3397
+ `, ne = (n) => C`
3377
3398
  ${n && Er || ""}
3378
3399
  fragment AssetFields on Asset {
3379
3400
  name
@@ -3417,7 +3438,7 @@ const de = (n) => {
3417
3438
  ${n && "...AssetMetadataFields" || ""}
3418
3439
  }
3419
3440
  `, br = C`
3420
- ${ae(!1)}
3441
+ ${ne(!1)}
3421
3442
  query GetAssets($keys: [String]!) {
3422
3443
  assets(keys: $keys) {
3423
3444
  ...AssetFields
@@ -3492,7 +3513,7 @@ const de = (n) => {
3492
3513
  }
3493
3514
  }
3494
3515
  `, Pr = C`
3495
- ${ae(!1)}
3516
+ ${ne(!1)}
3496
3517
  mutation RemoveBackgroundFromAsset($key: String!) {
3497
3518
  assetRemoveBackground(key: $key) {
3498
3519
  ...AssetFields
@@ -3660,7 +3681,7 @@ class Dr {
3660
3681
  async postProcessFileUpload(t, e) {
3661
3682
  if (e === "image/svg+xml") {
3662
3683
  const a = await t.blob.text(), o = new window.DOMParser().parseFromString(a, "image/svg+xml").documentElement;
3663
- if (!o) throw new Pt("Failed to read SVG.");
3684
+ if (!o) throw new xt("Failed to read SVG.");
3664
3685
  yr(o);
3665
3686
  const l = It().serializeToString(o);
3666
3687
  return {
@@ -3697,7 +3718,7 @@ class Dr {
3697
3718
  }
3698
3719
  }
3699
3720
  }
3700
- const Rt = "persistentAssets", lt = class lt {
3721
+ const Ot = "persistentAssets", lt = class lt {
3701
3722
  /**
3702
3723
  * Add a new asset to persistence
3703
3724
  * @param asset The asset to add.
@@ -3709,26 +3730,26 @@ const Rt = "persistentAssets", lt = class lt {
3709
3730
  }
3710
3731
  const e = /* @__PURE__ */ new Map();
3711
3732
  e.set(t.key || "", t.fileLink);
3712
- const a = k.getMap(Rt);
3733
+ const a = k.getMap(Ot);
3713
3734
  a && a.forEach((i, r) => {
3714
3735
  e.set(r, i);
3715
- }), k.setMap(Rt, e), lt.executeCallbacks();
3736
+ }), k.setMap(Ot, e), lt.executeCallbacks();
3716
3737
  }
3717
3738
  /**
3718
3739
  * Remove an existing asset from persistence. Noop if the asset doesn't exist.
3719
3740
  * @param assetKey The key to remove.
3720
3741
  */
3721
3742
  static remove(t) {
3722
- const e = k.getMap(Rt);
3743
+ const e = k.getMap(Ot);
3723
3744
  if (!e) return;
3724
3745
  const a = Array.from(e.entries()).find((i) => i[0] === t);
3725
- a && (e.delete(a[0]), k.setMap(Rt, e), lt.executeCallbacks());
3746
+ a && (e.delete(a[0]), k.setMap(Ot, e), lt.executeCallbacks());
3726
3747
  }
3727
3748
  /**
3728
3749
  * Get a list of all persisted assets.
3729
3750
  */
3730
3751
  static list() {
3731
- const t = k.getMap(Rt);
3752
+ const t = k.getMap(Ot);
3732
3753
  return t ? Array.from(t.entries()).map((e) => ({ assetKey: e[0], src: e[1] })) : [];
3733
3754
  }
3734
3755
  /**
@@ -3812,7 +3833,7 @@ class kr {
3812
3833
  this.disabled = t;
3813
3834
  }
3814
3835
  }
3815
- const _t = new kr(), On = C`
3836
+ const Xt = new kr(), On = C`
3816
3837
  fragment OptionFields on Option {
3817
3838
  id
3818
3839
  name
@@ -3854,7 +3875,7 @@ const _t = new kr(), On = C`
3854
3875
  }
3855
3876
  }
3856
3877
  `, Mr = C`
3857
- ${ae(!1)}
3878
+ ${ne(!1)}
3858
3879
  ${Da}
3859
3880
  ${On}
3860
3881
  query GetOptions($ids: [String]!) {
@@ -3876,11 +3897,11 @@ const _t = new kr(), On = C`
3876
3897
  });
3877
3898
  }), t.data.options;
3878
3899
  }, Nr = async (n, t) => (await t).find((a) => a.id === n), Qr = async (n) => {
3879
- const t = n.map((o) => _t.get({ id: o })), e = n.filter((o, s) => t[s] === void 0);
3900
+ const t = n.map((o) => Xt.get({ id: o })), e = n.filter((o, s) => t[s] === void 0);
3880
3901
  if (e.length === 0)
3881
3902
  return Promise.all(t);
3882
3903
  const a = Tr(e), i = e.map(
3883
- (o) => _t.set({ id: o }, Nr(o, a))
3904
+ (o) => Xt.set({ id: o }, Nr(o, a))
3884
3905
  ), r = t.filter((o) => o !== void 0);
3885
3906
  return await Promise.all(r.concat(i));
3886
3907
  };
@@ -3983,7 +4004,7 @@ const Y = new Rr(), $n = C`
3983
4004
  customField5
3984
4005
  conversionConfigurationId
3985
4006
  }
3986
- `, ne = C`
4007
+ `, ie = C`
3987
4008
  fragment ConversionConfigurationFields on ConversionConfiguration {
3988
4009
  id
3989
4010
  partnerId
@@ -4060,7 +4081,7 @@ const Y = new Rr(), $n = C`
4060
4081
  }
4061
4082
  `, $r = C`
4062
4083
  ${Ue}
4063
- ${ne}
4084
+ ${ie}
4064
4085
  ${$n}
4065
4086
  query ReadIntegrationProducts($ids: [String!]!) {
4066
4087
  integrationProducts(ids: $ids) {
@@ -4221,14 +4242,14 @@ const Y = new Rr(), $n = C`
4221
4242
  }
4222
4243
  }
4223
4244
  `, Gr = C`
4224
- ${ne}
4245
+ ${ie}
4225
4246
  query ReadConversionConfigurationQuery($id: String!) {
4226
4247
  conversionConfiguration(id: $id) {
4227
4248
  ...ConversionConfigurationFields
4228
4249
  }
4229
4250
  }
4230
4251
  `, Wr = C`
4231
- ${ne}
4252
+ ${ie}
4232
4253
  query ReadTransactionForDesignCreation($id: String!) {
4233
4254
  transactions(ids: [$id]) {
4234
4255
  id
@@ -4538,7 +4559,7 @@ const Y = new Rr(), $n = C`
4538
4559
  name
4539
4560
  }
4540
4561
  `, eo = (n) => C`
4541
- ${ae(n)}
4562
+ ${ne(n)}
4542
4563
  ${Da}
4543
4564
  ${On}
4544
4565
  ${_r}
@@ -4962,7 +4983,7 @@ const Y = new Rr(), $n = C`
4962
4983
  }
4963
4984
  }
4964
4985
  `, no = C`
4965
- ${ae(!1)}
4986
+ ${ne(!1)}
4966
4987
  query GetWorkflowForTheme($id: String!) {
4967
4988
  workflow(id: $id) {
4968
4989
  id
@@ -4984,7 +5005,7 @@ const Y = new Rr(), $n = C`
4984
5005
  }
4985
5006
  }
4986
5007
  `, Le = C`
4987
- ${ne}
5008
+ ${ie}
4988
5009
  fragment MarketplaceThemeInstallConfigurationFields on MarketplaceThemeInstallConfiguration {
4989
5010
  id
4990
5011
  themeInstallId
@@ -5104,7 +5125,7 @@ const Y = new Rr(), $n = C`
5104
5125
  timestamp
5105
5126
  }
5106
5127
  }
5107
- `, Ot = [b.SilentIllustration, b.ProductOverlay], Ao = async (n) => {
5128
+ `, $t = [b.SilentIllustration, b.ProductOverlay], Ao = async (n) => {
5108
5129
  const t = [];
5109
5130
  n.introduction && t.push({
5110
5131
  name: "Introduction",
@@ -5127,16 +5148,16 @@ const Y = new Rr(), $n = C`
5127
5148
  t.push({
5128
5149
  name: a.stepName,
5129
5150
  title: a.stepTitle,
5130
- renderableSteps: Ot.includes(a.type) ? [] : [a],
5131
- silentSteps: Ot.includes(a.type) ? [a] : []
5151
+ renderableSteps: $t.includes(a.type) ? [] : [a],
5152
+ silentSteps: $t.includes(a.type) ? [a] : []
5132
5153
  });
5133
5154
  else {
5134
5155
  const r = t.find((o) => o.name === i.name);
5135
- r ? Ot.includes(a.type) ? r.silentSteps.push(a) : r.renderableSteps.push(a) : t.push({
5156
+ r ? $t.includes(a.type) ? r.silentSteps.push(a) : r.renderableSteps.push(a) : t.push({
5136
5157
  name: i.name,
5137
5158
  title: i.name,
5138
- renderableSteps: Ot.includes(a.type) ? [] : [a],
5139
- silentSteps: Ot.includes(a.type) ? [a] : []
5159
+ renderableSteps: $t.includes(a.type) ? [] : [a],
5160
+ silentSteps: $t.includes(a.type) ? [a] : []
5140
5161
  });
5141
5162
  }
5142
5163
  }
@@ -5285,7 +5306,7 @@ const M = () => {
5285
5306
  viewBox: A,
5286
5307
  width: u
5287
5308
  }) => {
5288
- const h = e || 0, g = 2 * (l?.scale || 1), m = A || { x: 0, y: 0, width: u, height: r }, p = `${m.x} ${m.y} ${m.width} ${m.height}`, f = M(), S = a.purpose === Yt.FreeDesign && /* @__PURE__ */ P("defs", { children: /* @__PURE__ */ P("clipPath", { id: "viewboxClip", children: /* @__PURE__ */ P("rect", { width: m.width, height: m.height, rx: h }) }) }), w = a.colorProfiles?.map((E, I) => (
5309
+ const h = e || 0, g = 2 * (l?.scale || 1), m = A || { x: 0, y: 0, width: u, height: r }, p = `${m.x} ${m.y} ${m.width} ${m.height}`, f = M(), S = a.purpose === Jt.FreeDesign && /* @__PURE__ */ P("defs", { children: /* @__PURE__ */ P("clipPath", { id: "viewboxClip", children: /* @__PURE__ */ P("rect", { width: m.width, height: m.height, rx: h }) }) }), w = a.colorProfiles?.map((E, I) => (
5289
5310
  /* @ts-ignore */
5290
5311
  /* @__PURE__ */ P("color-profile", { name: E.name, xlinkHref: E.key, children: " " }, I)
5291
5312
  )), x = i.map((E) => ({
@@ -5328,7 +5349,7 @@ const M = () => {
5328
5349
  "g",
5329
5350
  {
5330
5351
  id: "element-group",
5331
- clipPath: a.purpose === Yt.FreeDesign ? "url(#viewboxClip)" : void 0,
5352
+ clipPath: a.purpose === Jt.FreeDesign ? "url(#viewboxClip)" : void 0,
5332
5353
  children: v.map((E) => Xn(E)).filter((E) => !!E)
5333
5354
  }
5334
5355
  ),
@@ -5399,7 +5420,7 @@ const M = () => {
5399
5420
  }), md = (n, t, e, a) => ({
5400
5421
  x: n.x + (t?.x + t?.width) * e,
5401
5422
  y: n.y + (t?.y + t?.height) * a
5402
- }), Bt = (n) => {
5423
+ }), Pt = (n) => {
5403
5424
  switch (n) {
5404
5425
  case j.North:
5405
5426
  return j.East;
@@ -5418,7 +5439,7 @@ const M = () => {
5418
5439
  case j.Southwest:
5419
5440
  return j.Northwest;
5420
5441
  }
5421
- }, pd = (n, t) => t > 45 && t <= 135 ? Bt(n) : t > 135 && t <= 225 ? Bt(Bt(n)) : t > 225 && t <= 315 ? Bt(Bt(Bt(n))) : n, fd = (n, t = { x: 0, y: 0 }, e = { x: 1, y: 1 }) => {
5442
+ }, pd = (n, t) => t > 45 && t <= 135 ? Pt(n) : t > 135 && t <= 225 ? Pt(Pt(n)) : t > 225 && t <= 315 ? Pt(Pt(Pt(n))) : n, fd = (n, t = { x: 0, y: 0 }, e = { x: 1, y: 1 }) => {
5422
5443
  const a = Ct(n.rotation), i = {
5423
5444
  x: t.x + n.x * e.x,
5424
5445
  y: t.x + n.y * e.y
@@ -5472,7 +5493,7 @@ const M = () => {
5472
5493
  ) });
5473
5494
  }, Hn = (n) => {
5474
5495
  const t = `spiff-group-clip-${n.id}`, e = n.rotation || 0, a = Ct(e), i = Math.cos(a), r = -Math.sin(a), o = Ma(n.children);
5475
- return /* @__PURE__ */ ct(Gt, { children: [
5496
+ return /* @__PURE__ */ ct(Wt, { children: [
5476
5497
  /* @__PURE__ */ P("defs", { children: /* @__PURE__ */ P("clipPath", { id: t, preserveAspectRatio: "none", children: n.clipPath ? /* @__PURE__ */ P("path", { d: n.clipPath }) : /* @__PURE__ */ P("rect", { x: 0, y: 0, width: n.width, height: n.height }) }) }),
5477
5498
  /* @__PURE__ */ ct(
5478
5499
  "g",
@@ -5512,8 +5533,8 @@ const M = () => {
5512
5533
  return n.pattern.src;
5513
5534
  };
5514
5535
  if (!a())
5515
- return /* @__PURE__ */ P(Gt, {});
5516
- const i = () => n.threshold ? n.invertThreshold ? "1 ".repeat(n.threshold) + "0 ".repeat(256 - n.threshold) : "0 ".repeat(n.threshold) + "1 ".repeat(256 - n.threshold) : "", r = () => /* @__PURE__ */ P(Gt, { children: n.useThreshold && /* @__PURE__ */ P("defs", { children: /* @__PURE__ */ ct("filter", { id: e, "color-interpolation-filters": "sRGB", children: [
5536
+ return /* @__PURE__ */ P(Wt, {});
5537
+ const i = () => n.threshold ? n.invertThreshold ? "1 ".repeat(n.threshold) + "0 ".repeat(256 - n.threshold) : "0 ".repeat(n.threshold) + "1 ".repeat(256 - n.threshold) : "", r = () => /* @__PURE__ */ P(Wt, { children: n.useThreshold && /* @__PURE__ */ P("defs", { children: /* @__PURE__ */ ct("filter", { id: e, "color-interpolation-filters": "sRGB", children: [
5517
5538
  /* @__PURE__ */ P(
5518
5539
  "feColorMatrix",
5519
5540
  {
@@ -5556,7 +5577,7 @@ const M = () => {
5556
5577
  src: a()
5557
5578
  }];
5558
5579
  };
5559
- return /* @__PURE__ */ ct(Gt, { children: [
5580
+ return /* @__PURE__ */ ct(Wt, { children: [
5560
5581
  r(),
5561
5582
  /* @__PURE__ */ P(
5562
5583
  "g",
@@ -5642,7 +5663,7 @@ class fo {
5642
5663
  }), a - i;
5643
5664
  }
5644
5665
  }
5645
- const Co = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", Ke = /* @__PURE__ */ new Map(), Tt = async (n) => {
5666
+ const Co = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", Ke = /* @__PURE__ */ new Map(), Nt = async (n) => {
5646
5667
  if (Ke.has(n))
5647
5668
  return Ke.get(n);
5648
5669
  const e = (async () => {
@@ -5684,7 +5705,7 @@ const Co = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", Ke = /* @_
5684
5705
  });
5685
5706
  const o = e.querySelectorAll("tspan");
5686
5707
  for (let d = 0; d < o.length; d++) {
5687
- const A = o.item(d), u = A.closest("text"), h = A.closest("g"), g = u.getAttribute("font-family"), m = await Tt(i.get(g)), p = u.getAttribute("fill"), f = u.getAttribute("stroke"), S = u.getAttribute("stroke-width"), w = m.getPath(
5708
+ const A = o.item(d), u = A.closest("text"), h = A.closest("g"), g = u.getAttribute("font-family"), m = await Nt(i.get(g)), p = u.getAttribute("fill"), f = u.getAttribute("stroke"), S = u.getAttribute("stroke-width"), w = m.getPath(
5688
5709
  A.innerHTML,
5689
5710
  0,
5690
5711
  0,
@@ -5817,10 +5838,10 @@ const Co = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", Ke = /* @_
5817
5838
  let a = n || "";
5818
5839
  return e.stripControlCharacters && (a = a.replace(/^(?![\u000A\u000D])[\u0000-\u001F\u007F-\u009F]/g, "")), e.uppercase && (a = a.toUpperCase()), e.vertical && (a = a.split("").join(`
5819
5840
  `)), a;
5820
- }, bo = (n, t) => n.map((e, a) => [e, t[a]]), Io = (n = "center", t = !1) => t ? "center" : n, Jn = (n) => n === "left" ? "start" : n === "right" ? "end" : "middle", ie = (n, t, e) => n.fontData ? {
5841
+ }, bo = (n, t) => n.map((e, a) => [e, t[a]]), Io = (n = "center", t = !1) => t ? "center" : n, Jn = (n) => n === "left" ? "start" : n === "right" ? "end" : "middle", re = (n, t, e) => n.fontData ? {
5821
5842
  ...n,
5822
5843
  ...(() => {
5823
- if (n.algorithm === kt.Traditional) {
5844
+ if (n.algorithm === Mt.Traditional) {
5824
5845
  const i = So(t, n, e, n.lineHeight);
5825
5846
  return {
5826
5847
  text: i.lines.join(`
@@ -5836,7 +5857,7 @@ const Co = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", Ke = /* @_
5836
5857
  };
5837
5858
  })()
5838
5859
  } : n, Kn = 1.1;
5839
- function xt(n, t) {
5860
+ function Ft(n, t) {
5840
5861
  return _n(n, t.getTemplatingContext());
5841
5862
  }
5842
5863
  function _n(n, t) {
@@ -5853,7 +5874,7 @@ const Bo = (n) => {
5853
5874
  if (n.curved && !n.paths || !n.fontData)
5854
5875
  return null;
5855
5876
  const h = () => n.textFillImage ? `url("#${o}")` : n._renderingConfiguration?.spotColors && n.fillSpotColorDefinition ? `${n.fill} ${Tn(n.fillSpotColorDefinition)}` : n.fill;
5856
- return /* @__PURE__ */ ct(Gt, { children: [
5877
+ return /* @__PURE__ */ ct(Wt, { children: [
5857
5878
  /* @__PURE__ */ ct("defs", { children: [
5858
5879
  n.textFillImage && /* @__PURE__ */ P(
5859
5880
  "pattern",
@@ -6130,7 +6151,7 @@ function Ma(n) {
6130
6151
  return r < o ? -1 : r > o ? 1 : 0;
6131
6152
  });
6132
6153
  }
6133
- const re = (n) => {
6154
+ const oe = (n) => {
6134
6155
  const t = n.variants;
6135
6156
  if (t) {
6136
6157
  if (t.length === 1)
@@ -6138,7 +6159,7 @@ const re = (n) => {
6138
6159
  if (n.defaultVariant !== void 0)
6139
6160
  return t.find((e) => e.id === n.defaultVariant);
6140
6161
  }
6141
- }, ht = /* @__PURE__ */ new Map(), Vt = /* @__PURE__ */ new Map(), Xe = /* @__PURE__ */ new Map(), Zn = async (n, t) => {
6162
+ }, ht = /* @__PURE__ */ new Map(), zt = /* @__PURE__ */ new Map(), Xe = /* @__PURE__ */ new Map(), Zn = async (n, t) => {
6142
6163
  if (!t) {
6143
6164
  if (!n) throw new Error("No region or src supplied. Cannot construct frame!");
6144
6165
  return ma(n);
@@ -6153,7 +6174,7 @@ const re = (n) => {
6153
6174
  }, ko = (n, t) => {
6154
6175
  if (!t)
6155
6176
  return;
6156
- const e = t.variants?.find((a) => a.id === n.frameVariantId) || re(t);
6177
+ const e = t.variants?.find((a) => a.id === n.frameVariantId) || oe(t);
6157
6178
  if (!e)
6158
6179
  throw new Error(`No variant with ID: ${n.frameVariantId}`);
6159
6180
  if (!e.asset)
@@ -6163,8 +6184,8 @@ const re = (n) => {
6163
6184
  if (Xe.has(n))
6164
6185
  return Xe.get(n);
6165
6186
  const e = (async () => {
6166
- if (Vt.has(n))
6167
- return Vt.get(n);
6187
+ if (zt.has(n))
6188
+ return zt.get(n);
6168
6189
  await new Promise((u) => setTimeout(u, 0));
6169
6190
  const i = dt().parseFromString(n, "image/svg+xml"), r = i.querySelector("svg");
6170
6191
  if (!r)
@@ -6182,7 +6203,7 @@ const re = (n) => {
6182
6203
  width: c,
6183
6204
  height: l
6184
6205
  };
6185
- return Vt.set(u, h), h;
6206
+ return zt.set(u, h), h;
6186
6207
  }
6187
6208
  if (A) {
6188
6209
  const u = A.getAttribute("d");
@@ -6193,7 +6214,7 @@ const re = (n) => {
6193
6214
  width: c,
6194
6215
  height: l
6195
6216
  };
6196
- return Vt.set(u, h), h;
6217
+ return zt.set(u, h), h;
6197
6218
  }
6198
6219
  throw new Error("Malformed frame SVG");
6199
6220
  })();
@@ -6251,14 +6272,14 @@ const re = (n) => {
6251
6272
  width: s[2],
6252
6273
  height: s[3]
6253
6274
  };
6254
- }, $t = (n, t) => {
6275
+ }, Ut = (n, t) => {
6255
6276
  const e = n.layoutState.elements.filter((i) => i.layer === t), a = Math.max(...e.map((i) => i.layerIndex).filter((i) => i !== void 0));
6256
6277
  return Math.max(a, 0) + 1;
6257
6278
  }, ei = async (n) => new Promise((t) => {
6258
6279
  at(n).then((e) => {
6259
6280
  t(e);
6260
6281
  }).catch((e) => console.error(e));
6261
- }), Ze = /* @__PURE__ */ new Map(), Xt = async (n) => {
6282
+ }), Ze = /* @__PURE__ */ new Map(), Zt = async (n) => {
6262
6283
  if (Ze.has(n))
6263
6284
  return Ze.get(n);
6264
6285
  const t = async (i) => new Promise((r, o) => {
@@ -6280,7 +6301,7 @@ const re = (n) => {
6280
6301
  anonymousCrossOrigin: !0,
6281
6302
  ignoreDimensions: !1,
6282
6303
  createCanvas: ft,
6283
- createImage: ee,
6304
+ createImage: ae,
6284
6305
  DOMParser: Ba(),
6285
6306
  fetch: nt
6286
6307
  }), u = o.getAttribute("width"), h = o.getAttribute("height"), g = 2048;
@@ -6292,7 +6313,7 @@ const re = (n) => {
6292
6313
  return await A.render(), await t(c);
6293
6314
  })();
6294
6315
  return Ze.set(n, a), a;
6295
- }, Ut = async (n, t, e, a) => {
6316
+ }, Lt = async (n, t, e, a) => {
6296
6317
  const i = n.layoutState.layout.useEditableArea && n.layoutState.layout.editableArea || {
6297
6318
  width: n.layoutState.layout.width,
6298
6319
  height: n.layoutState.layout.height,
@@ -6317,7 +6338,7 @@ const re = (n) => {
6317
6338
  s.height = s.width / A, s.top += (l - s.height) / 2;
6318
6339
  }
6319
6340
  if (e && t === F.Textbox && a?.text && a?.fontScale) {
6320
- await Tt(e);
6341
+ await Nt(e);
6321
6342
  const l = wt(e), c = mt(a.text, a?.fontScale, l);
6322
6343
  s.width = Math.min(c, i.width * 0.85), s.left = i.x + i.width / 2 - s.width / 2;
6323
6344
  }
@@ -6325,7 +6346,7 @@ const re = (n) => {
6325
6346
  };
6326
6347
  class Sd {
6327
6348
  static async getFrame(t, e) {
6328
- const a = await Zn(e.region, e.src), i = await Ve(a), r = e.region || await Ut(t, F.Frame);
6349
+ const a = await Zn(e.region, e.src), i = await Ve(a), r = e.region || await Lt(t, F.Frame);
6329
6350
  return {
6330
6351
  id: M(),
6331
6352
  x: r.left,
@@ -6333,7 +6354,7 @@ class Sd {
6333
6354
  width: r.width,
6334
6355
  height: r.height,
6335
6356
  layer: r.layer || 0,
6336
- layerIndex: r.layerIndex || $t(t, r.layer || 0),
6357
+ layerIndex: r.layerIndex || Ut(t, r.layer || 0),
6337
6358
  rotation: r.rotation,
6338
6359
  scaleX: r.width / i.width,
6339
6360
  scaleY: r.height / i.height,
@@ -6351,7 +6372,7 @@ class Sd {
6351
6372
  };
6352
6373
  }
6353
6374
  static async getImage(t, e) {
6354
- const a = e.region || await Ut(t, F.Image, e.src);
6375
+ const a = e.region || await Lt(t, F.Image, e.src);
6355
6376
  return {
6356
6377
  id: M(),
6357
6378
  src: e.src,
@@ -6362,22 +6383,22 @@ class Sd {
6362
6383
  width: a.width,
6363
6384
  height: a.height,
6364
6385
  layer: a.layer || 0,
6365
- layerIndex: a.layerIndex || $t(t, a.layer || 0),
6386
+ layerIndex: a.layerIndex || Ut(t, a.layer || 0),
6366
6387
  immutable: a.immutable,
6367
6388
  preserveAspectRatio: "none"
6368
6389
  };
6369
6390
  }
6370
6391
  static async getTextbox(t, e) {
6371
- const { configuration: a, fontSrc: i, designInputStep: r } = e, o = await Tt(i), s = {
6392
+ const { configuration: a, fontSrc: i, designInputStep: r } = e, o = await Nt(i), s = {
6372
6393
  assetUrl: i,
6373
6394
  name: o.names.fullName.en
6374
6395
  }, l = r?.text || a.defaultText || "", c = a.replaceableText ? a.replaceableText.replace("{{}}", l) : l, d = Fe(c, {
6375
6396
  vertical: a.vertical,
6376
6397
  uppercase: a.uppercase
6377
- }), A = e.region || await Ut(t, F.Textbox, i, {
6398
+ }), A = e.region || await Lt(t, F.Textbox, i, {
6378
6399
  text: d,
6379
6400
  fontScale: a.size ? a.size / o.unitsPerEm : void 0
6380
- }), u = ie(
6401
+ }), u = re(
6381
6402
  {
6382
6403
  id: M(),
6383
6404
  type: F.Textbox,
@@ -6390,12 +6411,12 @@ class Sd {
6390
6411
  fill: r?.color || a.colour || "#000000",
6391
6412
  fontData: s,
6392
6413
  layer: A.layer || 0,
6393
- layerIndex: A.layerIndex || $t(t, A.layer || 0),
6414
+ layerIndex: A.layerIndex || Ut(t, A.layer || 0),
6394
6415
  paths: a.paths,
6395
6416
  rotation: A.rotation,
6396
6417
  vertical: a.vertical,
6397
6418
  verticalAlign: a.verticalAlign || "middle",
6398
- algorithm: kt.Traditional,
6419
+ algorithm: Mt.Traditional,
6399
6420
  fontSize: a.size || Math.max(Math.round(A.height * 0.025), 1),
6400
6421
  text: d,
6401
6422
  input: l
@@ -6440,7 +6461,7 @@ class Sd {
6440
6461
  </svg>
6441
6462
  `, i = {};
6442
6463
  i["spiff-fill-shape"] = { browserValue: e.color };
6443
- const r = e.region?.item || await Ut(t, F.Illustration), o = M();
6464
+ const r = e.region?.item || await Lt(t, F.Illustration), o = M();
6444
6465
  return {
6445
6466
  stepRegion: e.region?.item,
6446
6467
  stepRegionIndex: e.region?.index,
@@ -6454,12 +6475,12 @@ class Sd {
6454
6475
  width: r.width,
6455
6476
  height: r.height,
6456
6477
  layer: r.layer || 0,
6457
- layerIndex: r.layerIndex || $t(t, r.layer || 0),
6478
+ layerIndex: r.layerIndex || Ut(t, r.layer || 0),
6458
6479
  immutable: r.immutable
6459
6480
  };
6460
6481
  }
6461
6482
  static async getIllustration(t, e) {
6462
- const a = e.region?.item || await Ut(t, F.Illustration, e.src), i = await st(await ei(e.src)), r = await Xt(i.svg), o = M();
6483
+ const a = e.region?.item || await Lt(t, F.Illustration, e.src), i = await st(await ei(e.src)), r = await Zt(i.svg), o = M();
6463
6484
  return {
6464
6485
  cachedObjectURL: r,
6465
6486
  stepRegion: e.region?.item,
@@ -6475,7 +6496,7 @@ class Sd {
6475
6496
  width: a.width,
6476
6497
  height: a.height,
6477
6498
  layer: a.layer || 0,
6478
- layerIndex: a.layerIndex || $t(t, a.layer || 0),
6499
+ layerIndex: a.layerIndex || Ut(t, a.layer || 0),
6479
6500
  immutable: a.immutable
6480
6501
  };
6481
6502
  }
@@ -6533,7 +6554,7 @@ const V = (n, t) => X(n, t).elements.find((i) => i.id === n), X = (n, t) => {
6533
6554
  const s = i[o];
6534
6555
  if (s.src && s.svg)
6535
6556
  try {
6536
- s.cachedObjectURL = await Xt(s.svg);
6557
+ s.cachedObjectURL = await Zt(s.svg);
6537
6558
  } catch (l) {
6538
6559
  console.log(l);
6539
6560
  }
@@ -6543,7 +6564,7 @@ const V = (n, t) => X(n, t).elements.find((i) => i.id === n), X = (n, t) => {
6543
6564
  );
6544
6565
  for (let o = 0; o < r.length; ++o) {
6545
6566
  const s = r[o];
6546
- s.fontData?.assetUrl && await Tt(s.fontData.assetUrl);
6567
+ s.fontData?.assetUrl && await Nt(s.fontData.assetUrl);
6547
6568
  }
6548
6569
  }
6549
6570
  };
@@ -6631,8 +6652,8 @@ class bd extends O {
6631
6652
  const o = a;
6632
6653
  o.scaleX = o.scaleX * this.width / e.width, o.scaleY = o.scaleY * this.height / e.height;
6633
6654
  } else if (e.type === "textbox") {
6634
- const o = a, s = (!o.algorithm || o.algorithm === kt.Autosize ? o.text : o.input) ?? "";
6635
- a = ie(o, s, e);
6655
+ const o = a, s = (!o.algorithm || o.algorithm === Mt.Autosize ? o.text : o.input) ?? "";
6656
+ a = re(o, s, e);
6636
6657
  }
6637
6658
  const i = X(e.id, Object.values(t.layouts)), r = Z(a, i);
6638
6659
  return {
@@ -6729,7 +6750,7 @@ class W extends O {
6729
6750
  return a !== void 0 ? a + 1 : 0;
6730
6751
  }
6731
6752
  }
6732
- class Nt extends O {
6753
+ class Qt extends O {
6733
6754
  constructor(t) {
6734
6755
  super(), this.id = t;
6735
6756
  }
@@ -6809,7 +6830,7 @@ class To extends O {
6809
6830
  const a = {
6810
6831
  ...e,
6811
6832
  fontSize: this.size
6812
- }, i = X(e.id, Object.values(t.layouts)), r = (!e.algorithm || e.algorithm === kt.Autosize ? e.text : e.input) ?? "", o = Z(ie(a, r), i);
6833
+ }, i = X(e.id, Object.values(t.layouts)), r = (!e.algorithm || e.algorithm === Mt.Autosize ? e.text : e.input) ?? "", o = Z(re(a, r), i);
6813
6834
  return {
6814
6835
  ...t,
6815
6836
  layouts: {
@@ -6831,7 +6852,7 @@ class en extends O {
6831
6852
  const a = {
6832
6853
  ...e,
6833
6854
  fontData: this.fontData
6834
- }, i = X(e.id, Object.values(t.layouts)), r = (!e.algorithm || e.algorithm === kt.Autosize ? e.text : e.input) ?? "", o = Z(ie(a, r), i);
6855
+ }, i = X(e.id, Object.values(t.layouts)), r = (!e.algorithm || e.algorithm === Mt.Autosize ? e.text : e.input) ?? "", o = Z(re(a, r), i);
6835
6856
  return {
6836
6857
  ...t,
6837
6858
  layouts: {
@@ -6955,7 +6976,7 @@ class Oo extends O {
6955
6976
  const e = V(this.id, Object.values(t.layouts));
6956
6977
  if (!e.id)
6957
6978
  throw new G();
6958
- const a = X(e.id, Object.values(t.layouts)), i = Z(ie(e, this.text, e), a);
6979
+ const a = X(e.id, Object.values(t.layouts)), i = Z(re(e, this.text, e), a);
6959
6980
  return {
6960
6981
  ...t,
6961
6982
  layouts: {
@@ -7210,7 +7231,7 @@ class an {
7210
7231
  }))()), A = {
7211
7232
  stepName: this.configuration.stepName,
7212
7233
  id: M(),
7213
- cachedObjectURL: await Xt(d.svg),
7234
+ cachedObjectURL: await Zt(d.svg),
7214
7235
  src: l,
7215
7236
  svg: d.svg,
7216
7237
  colors: d.colors,
@@ -7323,7 +7344,7 @@ class Lo {
7323
7344
  async () => {
7324
7345
  const m = await r();
7325
7346
  if (!m.link || !m.link)
7326
- throw new Jt(m.asset);
7347
+ throw new Kt(m.asset);
7327
7348
  h({
7328
7349
  rel: "mpeg4",
7329
7350
  href: m.link
@@ -7336,7 +7357,7 @@ class Lo {
7336
7357
  40
7337
7358
  );
7338
7359
  });
7339
- t.forEach((h) => a.getCommandDispatcher()(new Nt(h.id)));
7360
+ t.forEach((h) => a.getCommandDispatcher()(new Qt(h.id)));
7340
7361
  const s = i.data.baseUrl.slice(0, 4) === "http" ? "" : "https://", l = new URL(s + i.data.baseUrl);
7341
7362
  l.searchParams.append("video", btoa(JSON.stringify([o]))), l.pathname = l.pathname + (l.pathname.slice(-1) === "/" ? "" : "/");
7342
7363
  const c = l.toString();
@@ -7399,7 +7420,7 @@ class De {
7399
7420
  const i = a.fileLink;
7400
7421
  if (i)
7401
7422
  return at(i, !0);
7402
- throw new Jt(a);
7423
+ throw new Kt(a);
7403
7424
  };
7404
7425
  }
7405
7426
  async init(t, e, a) {
@@ -7667,7 +7688,7 @@ class De {
7667
7688
  r && r(!0);
7668
7689
  const c = t.data.initialZoomLevel, d = await Promise.all(
7669
7690
  t.data.regions.map(async (h, g) => {
7670
- const m = await Ve(l[g]), p = s.getImageData(), f = a.map((I) => new Nt(I.id)), S = p ? Ta(
7691
+ const m = await Ve(l[g]), p = s.getImageData(), f = a.map((I) => new Qt(I.id)), S = p ? Ta(
7671
7692
  p,
7672
7693
  m,
7673
7694
  c && !t.data.forceImageCover ? { scale: c } : void 0,
@@ -7729,7 +7750,7 @@ class De {
7729
7750
  const a = t.fileLink;
7730
7751
  if (a)
7731
7752
  return a;
7732
- throw new Jt(t);
7753
+ throw new Kt(t);
7733
7754
  }
7734
7755
  async loadPatternFromAsset(t, e, a, i) {
7735
7756
  const r = De.patternSource(t), o = a.markUpdatePending(), s = a.getWorkflowExperience().getStepById(e.stepName)?.frameService;
@@ -7869,7 +7890,8 @@ class Vo {
7869
7890
  spotColor: A.spotColor,
7870
7891
  pmsValue: A.pmsValue
7871
7892
  };
7872
- const s = xa(t, e, a, o), l = await Xt(s), c = [];
7893
+ console.log(`LOG: newColors ${JSON.stringify(o, null, 2)}`);
7894
+ const s = xa(t, e, a, o), l = await Zt(s), c = [];
7873
7895
  for (const d of i) {
7874
7896
  for (const [A, u] of r.entries())
7875
7897
  c.push(new fa(d, A, u));
@@ -7921,15 +7943,15 @@ class Vo {
7921
7943
  if (!t.data || !t.data.regions)
7922
7944
  throw new Be(t, "Missing regions.");
7923
7945
  i(!0);
7924
- const o = a.map((f) => new Nt(f.id));
7946
+ const o = a.map((f) => new Qt(f.id));
7925
7947
  t.mandatory && r.setMandatoryFulfilled(t.stepName, !1);
7926
7948
  const s = e.asset;
7927
7949
  if (!s)
7928
7950
  throw new bt(e);
7929
7951
  const l = s.fileLink;
7930
7952
  if (!l)
7931
- throw new Jt(s);
7932
- const c = await st(await this.getIllustrationBody(l)), d = await Xt(c.svg), A = (f, S) => {
7953
+ throw new Kt(s);
7954
+ const c = await st(await this.getIllustrationBody(l)), d = await Zt(c.svg), A = (f, S) => {
7933
7955
  const w = r.getLayouts().find((v) => v.panelId === f.panelId);
7934
7956
  if (!w)
7935
7957
  throw new J(f);
@@ -8204,7 +8226,7 @@ class Wo {
8204
8226
  if (!p)
8205
8227
  return console.error(`Can not find layout for region: ${A.panelId}`), null;
8206
8228
  const f = [];
8207
- return h && f.push(new Nt(g)), f.push(
8229
+ return h && f.push(new Qt(g)), f.push(
8208
8230
  new W(
8209
8231
  {
8210
8232
  stepRegion: A,
@@ -8335,7 +8357,7 @@ class qo {
8335
8357
  if (!o)
8336
8358
  return console.error("No URL for picture!"), null;
8337
8359
  i(!0), t.mandatory && a.setMandatoryFulfilled(t.stepName, !1);
8338
- const l = a.getRegionElements(t.stepName).map((A) => new Nt(A.id)), c = (A, u) => {
8360
+ const l = a.getRegionElements(t.stepName).map((A) => new Qt(A.id)), c = (A, u) => {
8339
8361
  const g = a.getLayouts().find((p) => p.panelId === A.panelId);
8340
8362
  if (!g)
8341
8363
  throw new J(A);
@@ -8604,7 +8626,7 @@ class jo {
8604
8626
  }
8605
8627
  }
8606
8628
  }
8607
- const zt = new jo();
8629
+ const Gt = new jo();
8608
8630
  class Yo {
8609
8631
  constructor() {
8610
8632
  this.latestToast = null, this.toastType = null, this.toastCallbacks = [];
@@ -8902,7 +8924,7 @@ class _o {
8902
8924
  });
8903
8925
  }
8904
8926
  updateInputText(t, e, a, i) {
8905
- const r = i.getStepStorage(a.stepName), o = xt(t, i), s = this.getProcessedInput(o, a.data, r?.customiseAllText ?? !1), l = {
8927
+ const r = i.getStepStorage(a.stepName), o = Ft(t, i), s = this.getProcessedInput(o, a.data, r?.customiseAllText ?? !1), l = {
8906
8928
  command: void 0,
8907
8929
  helperData: {},
8908
8930
  errorData: this.getErrorsForText(t, s, a, i)
@@ -9077,8 +9099,8 @@ class _o {
9077
9099
  throw new bt(t);
9078
9100
  const a = e.fileLink;
9079
9101
  if (!a)
9080
- throw new Jt(e);
9081
- const i = await Tt(a);
9102
+ throw new Kt(e);
9103
+ const i = await Nt(a);
9082
9104
  return {
9083
9105
  assetUrl: a,
9084
9106
  name: i.names.fullName.en
@@ -9165,7 +9187,7 @@ class _o {
9165
9187
  async createTextboxRegions(t, e, a, i, r, o) {
9166
9188
  if (!a || !a.regions)
9167
9189
  throw new Error("Step data not supplied");
9168
- const s = r.text || a.defaultText || "", l = xt(s, o), c = this.getProcessedInput(l, a, !1), d = async (u, h) => {
9190
+ const s = r.text || a.defaultText || "", l = Ft(s, o), c = this.getProcessedInput(l, a, !1), d = async (u, h) => {
9169
9191
  const m = o.getLayouts().find((f) => f.panelId === u.panelId), p = M();
9170
9192
  try {
9171
9193
  if (!m)
@@ -9263,7 +9285,7 @@ class _o {
9263
9285
  * @deprecated
9264
9286
  */
9265
9287
  async changeInputTextWithRegion(t, e, a, i, r, o, s, l, c, d) {
9266
- const A = (i || "").replace(/^(?![\u000A\u000D])[\u0000-\u001F\u007F-\u009F]/g, ""), u = xt(A, o), h = this.getProcessedInput(u, t.data, s), g = o.getRegionElements(t.stepName), m = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map();
9288
+ const A = (i || "").replace(/^(?![\u000A\u000D])[\u0000-\u001F\u007F-\u009F]/g, ""), u = Ft(A, o), h = this.getProcessedInput(u, t.data, s), g = o.getRegionElements(t.stepName), m = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map();
9267
9289
  for (const v of g)
9268
9290
  if (v.region) {
9269
9291
  const [E, I] = ye(
@@ -9320,13 +9342,13 @@ const Zo = "data:application/octet-stream;base64,AAEAAAAPAIAAAwBwRkZUTYdHeHoAAEl
9320
9342
  const e = et("rect");
9321
9343
  return e.setAttribute("height", `${n}`), e.setAttribute("width", `${t}`), e;
9322
9344
  }, es = (n, t, e, a) => {
9323
- const i = le("filter");
9345
+ const i = ce("filter");
9324
9346
  i.setAttribute("id", a), i.setAttribute("height", "200%"), i.setAttribute("width", "200%"), i.setAttribute("x", "-50%"), i.setAttribute("y", "-50%");
9325
- const r = le("feOffset");
9347
+ const r = ce("feOffset");
9326
9348
  i.appendChild(r), r.setAttribute("result", "offOut"), r.setAttribute("in", "SourceAlpha"), r.setAttribute("dx", `${n}`), r.setAttribute("dy", `${t}`);
9327
- const o = le("feGaussianBlur");
9349
+ const o = ce("feGaussianBlur");
9328
9350
  i.appendChild(o), o.setAttribute("result", "blurOut"), o.setAttribute("in", "offOut"), o.setAttribute("stdDeviation", `${e}`);
9329
- const s = le("feBlend");
9351
+ const s = ce("feBlend");
9330
9352
  return i.appendChild(s), s.setAttribute("in", "SourceGraphic"), s.setAttribute("in2", "blurOut"), s.setAttribute("mode", "normal"), i;
9331
9353
  }, as = (n) => {
9332
9354
  let t = n;
@@ -9391,7 +9413,7 @@ class rs {
9391
9413
  u = (A * 100 | 0) / 100;
9392
9414
  break;
9393
9415
  default:
9394
- throw new Pt("Failed to encode path.");
9416
+ throw new xt("Failed to encode path.");
9395
9417
  }
9396
9418
  l || o.push(" "), o.push(u), l = !1;
9397
9419
  }
@@ -9405,12 +9427,12 @@ class rs {
9405
9427
  for (e.lastIndex = 0; r = e.exec(t); ) {
9406
9428
  const o = r[1].toLowerCase(), s = (r[2].match(a) || []).map(parseFloat), l = o === r[1], c = nn[o];
9407
9429
  if (s.length < c.length)
9408
- throw new Pt(
9430
+ throw new xt(
9409
9431
  `Path type "${o}" given ${s.length} arguments, expected ${c.length}.`
9410
9432
  );
9411
9433
  if (c.length > 0) {
9412
9434
  if (s.length % c.length !== 0)
9413
- throw new Pt(
9435
+ throw new xt(
9414
9436
  `Path type "${o}" given ${s.length} arguments, not divisible by ${c.length}`
9415
9437
  );
9416
9438
  for (let d = 0; d < s.length / c.length; d++) {
@@ -9435,7 +9457,7 @@ class rs {
9435
9457
  if (s in r && l in r) {
9436
9458
  const c = [r[s], r[l]], d = e(c);
9437
9459
  if (d.length < 2)
9438
- throw new Pt("Transformer must return at least 2 points.");
9460
+ throw new xt("Transformer must return at least 2 points.");
9439
9461
  r[s] = d[0], r[l] = d[1];
9440
9462
  }
9441
9463
  }
@@ -9605,7 +9627,7 @@ const ss = [
9605
9627
  const i = e.data, r = a.option;
9606
9628
  if (!r)
9607
9629
  return console.error(`No option for step ${a.stepName}.`), [];
9608
- const o = r.variants?.find((v) => v.id === i.illustrationVariantId) || re(r);
9630
+ const o = r.variants?.find((v) => v.id === i.illustrationVariantId) || oe(r);
9609
9631
  if (!o)
9610
9632
  return console.error(`No variant with ID: ${i.illustrationVariantId}`), [];
9611
9633
  if (!o.asset)
@@ -9619,7 +9641,7 @@ const ss = [
9619
9641
  return console.error("Failed to read SVG."), [];
9620
9642
  Pa(g);
9621
9643
  const m = {};
9622
- Dt(g, (v) => {
9644
+ kt(g, (v) => {
9623
9645
  ss.includes(v.tagName) && !v.attributes.getNamedItem("fill") && v.setAttribute("fill", "#000000");
9624
9646
  const E = v.attributes.getNamedItem("fill");
9625
9647
  if (E && E.value !== "none") {
@@ -9703,7 +9725,7 @@ const ss = [
9703
9725
  const i = e.data, r = a.option;
9704
9726
  if (!r)
9705
9727
  return console.error(`No option for step ${a.stepName}.`), [];
9706
- const o = r.variants?.find((d) => d.id === i.pictureVariantId) || re(r);
9728
+ const o = r.variants?.find((d) => d.id === i.pictureVariantId) || oe(r);
9707
9729
  if (!o)
9708
9730
  return console.error(`No variant with ID: ${i.pictureVariantId}`), [];
9709
9731
  if (!o.asset)
@@ -9744,7 +9766,7 @@ const ss = [
9744
9766
  const i = e.data, r = a.option;
9745
9767
  if (!r)
9746
9768
  return console.error(`No option for step ${a.stepName}.`), [];
9747
- const o = r.variants?.find((c) => c.id === i.colorVariantId) || re(r);
9769
+ const o = r.variants?.find((c) => c.id === i.colorVariantId) || oe(r);
9748
9770
  if (!o)
9749
9771
  return console.error(`No variant with ID: ${i.colorVariantId}`), [];
9750
9772
  t[a.stepName] = { selectedVariants: [o] };
@@ -9830,7 +9852,7 @@ const ss = [
9830
9852
  const c = await at(r, !0), d = (A) => {
9831
9853
  const u = /<svg.*?<\/svg>/s, h = A.match(u) || [], g = h?.length > 0 ? h[0] : "", f = dt().parseFromString(g, "image/svg+xml").firstElementChild;
9832
9854
  if (!f)
9833
- throw new Pt("Failed to read SVG.");
9855
+ throw new xt("Failed to read SVG.");
9834
9856
  return Pa(f), It().serializeToString(f);
9835
9857
  };
9836
9858
  l.forEach((A) => {
@@ -9865,7 +9887,7 @@ const ss = [
9865
9887
  const p = a.option;
9866
9888
  if (!p)
9867
9889
  return;
9868
- const f = p.variants?.find((w) => w.id === r.fontVariantId) || re(p);
9890
+ const f = p.variants?.find((w) => w.id === r.fontVariantId) || oe(p);
9869
9891
  if (!f || !f.asset)
9870
9892
  return;
9871
9893
  t[a.stepName] = { selectedVariants: [f] };
@@ -9876,7 +9898,7 @@ const ss = [
9876
9898
  const p = l();
9877
9899
  if (!p)
9878
9900
  return;
9879
- const f = await Tt(p);
9901
+ const f = await Nt(p);
9880
9902
  return {
9881
9903
  assetUrl: p,
9882
9904
  name: f.names.fullName.en
@@ -10169,7 +10191,7 @@ class vs extends Gn {
10169
10191
  l = r.width, c = r.height;
10170
10192
  const d = this.getWorkflowManager?.()?.getTemplatingContext(), A = ka(t.layoutState.layout, e, {
10171
10193
  renderingConfiguration: {
10172
- purpose: Yt.ThreeD,
10194
+ purpose: Jt.ThreeD,
10173
10195
  templatingContext: d
10174
10196
  }
10175
10197
  }), u = xn(A), h = await va.from(this.ctx, u, {
@@ -10180,7 +10202,7 @@ class vs extends Gn {
10180
10202
  ignoreMouse: !0,
10181
10203
  enableRedraw: !1,
10182
10204
  createCanvas: ft,
10183
- createImage: ee,
10205
+ createImage: ae,
10184
10206
  DOMParser: Ba(),
10185
10207
  fetch
10186
10208
  });
@@ -10943,7 +10965,7 @@ const el = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
10943
10965
  })), al = (n, t) => {
10944
10966
  const e = n.workflowState, a = e ? JSON.parse(e) : void 0;
10945
10967
  return a ? Object.values(a.layouts).map((i) => i.layout) : el(t.panels);
10946
- }, qt = class qt {
10968
+ }, Ht = class Ht {
10947
10969
  constructor(t, e, a, i, r, o = !1, s, l = !1, c = !1, d = !1) {
10948
10970
  this.workflowStatePromiseQueue = new Wn(1), this.initialized = !1, this.readOnly = !1, this.isReloadedTransaction = !1, this.singleVariantsRenderable = !1, this.stepTags = {}, this.setWorkflow = async (u) => {
10949
10971
  this.confirmedDesign = !1, this.editedSteps = {}, this.informationResults = [], this.mandatorySteps = {}, this.pendingUpdates = [], this.selectionCost = 0, this.stepSpecificServices = {}, this.pollers = [], this.allScenes = [], this.stepElements = {}, this.stepInitialised = {}, this.stepMetadata = {}, this.stepSelections = {}, this.storage = {}, this.validationErrors = { steps: /* @__PURE__ */ new Map() }, this.currentAdjustingStepId = "", this.reloadedState ? this.layouts = Object.values(this.reloadedState.layouts || {}).map((g) => g.layout) : u ? this.layouts = al(this.experience.getTransaction(), u) : this.layouts = [], this.commandContext.initialize(this.layouts, this.reloadedState), this.renderableContextService = new Cs(this.layouts), this.renderableContextService.setWorkflowManager(this), u.steps.forEach((g) => {
@@ -11086,7 +11108,7 @@ const el = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
11086
11108
  async fetchConversionConfiguration() {
11087
11109
  const t = this.experience.getTransaction().recipient;
11088
11110
  if (t?.conversionConfigurationId && !this.recipientConversionConfiguration) {
11089
- const e = qt.configurationPromiseMap.get(
11111
+ const e = Ht.configurationPromiseMap.get(
11090
11112
  t.conversionConfigurationId
11091
11113
  );
11092
11114
  if (e)
@@ -11100,7 +11122,7 @@ const el = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
11100
11122
  id: t.conversionConfigurationId
11101
11123
  }
11102
11124
  })).data.conversionConfiguration)();
11103
- qt.configurationPromiseMap.set(t.conversionConfigurationId, i), this.recipientConversionConfiguration = await i;
11125
+ Ht.configurationPromiseMap.set(t.conversionConfigurationId, i), this.recipientConversionConfiguration = await i;
11104
11126
  }
11105
11127
  }
11106
11128
  }
@@ -11360,7 +11382,7 @@ const el = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
11360
11382
  ...this.storage,
11361
11383
  [t]: { ...this.storage[t], ...e }
11362
11384
  };
11363
- if (!jt(a, this.storage)) {
11385
+ if (!Yt(a, this.storage)) {
11364
11386
  this.storage = a;
11365
11387
  const i = new tn(this.constructSerializableWorkflow());
11366
11388
  this.commandContext.apply(i, !0), this.onStepSpecificStorageChange(t), this.onStorageChange();
@@ -11578,7 +11600,7 @@ const el = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
11578
11600
  }, this.removeElements(h);
11579
11601
  const p = r.steps.find((E) => E.stepName === t);
11580
11602
  p?.type === b.Frame && this.getWorkflowExperience().getStepById(p.stepName)?.frameService?.setTargetElements(a.map((I) => I.id));
11581
- const f = h.map((E) => new Nt(E.id)), S = new tn(this.constructSerializableWorkflow()), w = [...m, ...f, S];
11603
+ const f = h.map((E) => new Qt(E.id)), S = new tn(this.constructSerializableWorkflow()), w = [...m, ...f, S];
11582
11604
  w.length > 0 && this.commandContext.apply(new $(w), !0), await this.ensureStepsAreLoaded(), this.onElementsChange();
11583
11605
  const x = this.getInvalidModelVariants(), v = this.modelContainer;
11584
11606
  if (v) {
@@ -11643,7 +11665,7 @@ const el = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
11643
11665
  );
11644
11666
  break;
11645
11667
  case b.Shape:
11646
- a.push(zt.init(l, this, this.reloadedState));
11668
+ a.push(Gt.init(l, this, this.reloadedState));
11647
11669
  break;
11648
11670
  case b.Text:
11649
11671
  a.push(H.init(l, this, this.reloadedState));
@@ -11708,8 +11730,8 @@ const el = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
11708
11730
  return go(this.allScenes, this.stepSelections, this.singleVariantsRenderable);
11709
11731
  }
11710
11732
  };
11711
- qt.configurationPromiseMap = /* @__PURE__ */ new Map();
11712
- let Ca = qt;
11733
+ Ht.configurationPromiseMap = /* @__PURE__ */ new Map();
11734
+ let Ca = Ht;
11713
11735
  class rt {
11714
11736
  constructor(t) {
11715
11737
  this.variantData = t;
@@ -11790,7 +11812,7 @@ class rt {
11790
11812
  return this.variantData.enabled;
11791
11813
  }
11792
11814
  }
11793
- const Ht = class Ht {
11815
+ const jt = class jt {
11794
11816
  constructor(t, e, a) {
11795
11817
  this.manager = t, this.step = e, this.tags = a;
11796
11818
  }
@@ -11800,7 +11822,7 @@ const Ht = class Ht {
11800
11822
  * @param value The new value
11801
11823
  */
11802
11824
  setUpdateState(t) {
11803
- Ht.updateState.set(
11825
+ jt.updateState.set(
11804
11826
  `${this.step.stepName}-${this.manager.getWorkflowExperience().getTransaction().id}`,
11805
11827
  t
11806
11828
  );
@@ -11809,7 +11831,7 @@ const Ht = class Ht {
11809
11831
  * @returns Gets the current update state of this step. All step handles for this step will see this value.
11810
11832
  */
11811
11833
  getUpdateState() {
11812
- return !!Ht.updateState.get(
11834
+ return !!jt.updateState.get(
11813
11835
  `${this.step.stepName}-${this.manager.getWorkflowExperience().getTransaction().id}`
11814
11836
  );
11815
11837
  }
@@ -11921,8 +11943,8 @@ const Ht = class Ht {
11921
11943
  e ? r && e.executeCameraAnimation(r) : console.warn("No preview service available, cannot execute camera animations."), a ? i && a.executeAnimation(i, t) : console.warn("No model container available, cannot execute model animations.");
11922
11944
  }
11923
11945
  };
11924
- Ht.updateState = /* @__PURE__ */ new Map();
11925
- let tt = Ht;
11946
+ jt.updateState = /* @__PURE__ */ new Map();
11947
+ let tt = jt;
11926
11948
  class nl extends tt {
11927
11949
  constructor(t, e, a) {
11928
11950
  super(t, e, a);
@@ -11970,13 +11992,14 @@ class nl extends tt {
11970
11992
  * Set color for the illustration.
11971
11993
  */
11972
11994
  setColor(t, e, a) {
11995
+ console.log("LOG: setColor");
11973
11996
  const i = /* @__PURE__ */ new Map(), o = this.getCurrentVariant()?.getAssetResource()?.assetConfiguration;
11974
11997
  return (o?.defaultColorVariants || []).length !== 0 ? o.channelNumbers.forEach((l) => {
11975
11998
  if (l.number.toString() === t) {
11976
11999
  const c = l.id.replace(/\W/g, "");
11977
12000
  a ? i.set(c, { browserValue: e, pmsValue: a }) : i.set(c, e);
11978
12001
  }
11979
- }) : a ? i.set(t, { browserValue: e, pmsValue: a }) : i.set(t, e), we.changeColors(
12002
+ }) : a ? i.set(t, { browserValue: e, pmsValue: a }) : (console.log(`LOG: setting color ${t} | ${e}`), i.set(t, e)), we.changeColors(
11980
12003
  this.step,
11981
12004
  this.manager.getRegionElements(this.step.stepName),
11982
12005
  this.manager,
@@ -12063,7 +12086,7 @@ class ll extends tt {
12063
12086
  }
12064
12087
  selectVariant(t) {
12065
12088
  const e = t.getResource();
12066
- return zt.selectVariant(
12089
+ return Gt.selectVariant(
12067
12090
  this.step,
12068
12091
  {
12069
12092
  fill: e.color,
@@ -12081,7 +12104,7 @@ class ll extends tt {
12081
12104
  * @deprecated The shape step can now pass through colors returned by getColors via selectVariant. Please swap setColor for selectVariant.
12082
12105
  */
12083
12106
  setColor(t) {
12084
- return zt.selectVariant(
12107
+ return Gt.selectVariant(
12085
12108
  this.step,
12086
12109
  t,
12087
12110
  this.manager.getRegionElements(this.step.stepName) || [],
@@ -12093,7 +12116,7 @@ class ll extends tt {
12093
12116
  * @returns A list of color definitions that are currently applied to the illustration.
12094
12117
  */
12095
12118
  getColors() {
12096
- return zt.availableColours(this.step);
12119
+ return Gt.availableColours(this.step);
12097
12120
  }
12098
12121
  /**
12099
12122
  * Allows for setting a custom color when the custom variant is selected. Will
@@ -12102,7 +12125,7 @@ class ll extends tt {
12102
12125
  setCustomColor(t) {
12103
12126
  return this.getCurrentVariant()?.getColor() !== "#custom" && console.warn(
12104
12127
  `setting custom color for step ${this.step.stepName} but color is ${this.getCurrentVariant()?.getColor()}`
12105
- ), zt.setCustomColor(t, this.step, this.manager);
12128
+ ), Gt.setCustomColor(t, this.step, this.manager);
12106
12129
  }
12107
12130
  getCustomColor() {
12108
12131
  this.getCurrentVariant()?.getColor() !== "#custom" && console.warn(
@@ -12206,7 +12229,7 @@ class cl extends tt {
12206
12229
  const e = {
12207
12230
  input: t,
12208
12231
  helperData: {}
12209
- }, a = H.findLayoutElements(this.manager, this.step), i = H.filterUnsupportedCharacters(t, a[0]?.fontData), r = xt(i, this.manager).length, o = !!this.step.data && !!this.step.data.maxLength && r > this.step.data.maxLength;
12232
+ }, a = H.findLayoutElements(this.manager, this.step), i = H.filterUnsupportedCharacters(t, a[0]?.fontData), r = Ft(i, this.manager).length, o = !!this.step.data && !!this.step.data.maxLength && r > this.step.data.maxLength;
12210
12233
  o || (e.input = i);
12211
12234
  const s = a.length <= 0, l = s ? { inputText: i, text: i } : { inputText: i };
12212
12235
  this.manager.updateStorage(this.step.stepName, l);
@@ -12282,7 +12305,7 @@ class cl extends tt {
12282
12305
  const t = this.step.data.maxLength;
12283
12306
  if (t === void 0)
12284
12307
  return;
12285
- const e = xt(this.getText(), this.manager);
12308
+ const e = Ft(this.getText(), this.manager);
12286
12309
  return t - e.length;
12287
12310
  }
12288
12311
  setCustomColor(t) {
@@ -12363,7 +12386,7 @@ class ul extends tt {
12363
12386
  const t = this.step.data.maxLength;
12364
12387
  if (t === void 0)
12365
12388
  return;
12366
- const e = xt(this.getText(), this.manager);
12389
+ const e = Ft(this.getText(), this.manager);
12367
12390
  return t - e.length;
12368
12391
  }
12369
12392
  /**
@@ -12814,7 +12837,7 @@ const ra = new wl(), yl = C`
12814
12837
  }
12815
12838
  `, ln = C`
12816
12839
  ${Ue}
12817
- ${ne}
12840
+ ${ie}
12818
12841
  mutation TransactionUpdateIntegrationProduct($id: String!, $integrationProductId: String) {
12819
12842
  transactionUpdateIntegrationProduct(id: $id, integrationProductId: $integrationProductId) {
12820
12843
  id
@@ -13088,7 +13111,7 @@ class El {
13088
13111
  throw new Qe("Failed to obtain 2D context for preview image creation");
13089
13112
  const g = this.workflowManager.getTemplatingContext(), m = ka(u.layoutState.layout, u.layoutState.elements, {
13090
13113
  renderingConfiguration: {
13091
- purpose: Yt.Print,
13114
+ purpose: Jt.Print,
13092
13115
  region: { left: A.x, top: A.y, width: A.width, height: A.height },
13093
13116
  templatingContext: g
13094
13117
  }
@@ -13097,7 +13120,7 @@ class El {
13097
13120
  anonymousCrossOrigin: !0,
13098
13121
  ignoreDimensions: !1,
13099
13122
  createCanvas: ft,
13100
- createImage: ee,
13123
+ createImage: ae,
13101
13124
  DOMParser: Ba(),
13102
13125
  fetch
13103
13126
  })).render();
@@ -14083,7 +14106,7 @@ class Tl {
14083
14106
  storage: a !== null ? a : void 0,
14084
14107
  channel: i
14085
14108
  });
14086
- jt(o, this.globalPropertyState) || (await this.updateGlobalPropertyState(), await this.onGlobalPropertyStateChange(o, this.globalPropertyState));
14109
+ Yt(o, this.globalPropertyState) || (await this.updateGlobalPropertyState(), await this.onGlobalPropertyStateChange(o, this.globalPropertyState));
14087
14110
  }
14088
14111
  async setAspectStorage(t, e, a) {
14089
14112
  if (!this.globalPropertyState)
@@ -14110,7 +14133,7 @@ class Tl {
14110
14133
  storage: e !== null ? e : void 0,
14111
14134
  channel: a
14112
14135
  });
14113
- jt(r, this.globalPropertyState) || (await this.updateGlobalPropertyState(), await this.onGlobalPropertyStateChange(r, this.globalPropertyState));
14136
+ Yt(r, this.globalPropertyState) || (await this.updateGlobalPropertyState(), await this.onGlobalPropertyStateChange(r, this.globalPropertyState));
14114
14137
  }
14115
14138
  async updateGlobalPropertyState() {
14116
14139
  if (!this.globalPropertyState)
@@ -14580,10 +14603,10 @@ class ge {
14580
14603
  const e = this.productResource.workflowId;
14581
14604
  if (e) {
14582
14605
  const a = t.find((i) => i.workflowName === e);
14583
- if (a) return new Wt(a);
14606
+ if (a) return new qt(a);
14584
14607
  }
14585
14608
  if (t.length === 1)
14586
- return new Wt(t[0]);
14609
+ return new qt(t[0]);
14587
14610
  throw new gt(
14588
14611
  "Called getDefaultWorkflow() but no default workflow is configured for the requested product. Multiple workflows exist so we can't assume!"
14589
14612
  );
@@ -14596,7 +14619,7 @@ class ge {
14596
14619
  throw new gt(
14597
14620
  "No workflows on configured product. Ensure at least 1 workflow is assigned to this product."
14598
14621
  );
14599
- return this.product.workflows.sort((e, a) => (e.index ?? 0) - (a.index ?? 0)).map((e) => new Wt(e));
14622
+ return this.product.workflows.sort((e, a) => (e.index ?? 0) - (a.index ?? 0)).map((e) => new qt(e));
14600
14623
  }
14601
14624
  /**
14602
14625
  * A list of all integrations this product is connected to.
@@ -14640,7 +14663,7 @@ class ge {
14640
14663
  return Ol.requestKeysForEntity(this.product.id, t);
14641
14664
  }
14642
14665
  }
14643
- class Wt {
14666
+ class qt {
14644
14667
  constructor(t) {
14645
14668
  this.workflow = t;
14646
14669
  }
@@ -15511,7 +15534,7 @@ class dn {
15511
15534
  });
15512
15535
  await Promise.all(l), await Promise.all(r.map((A) => A.applyGlobalState()));
15513
15536
  const c = this.globalPropertyStateManager.getGlobalPropertyState(), d = this.globalPropertyHandleService.applyConditionsFromState(a, c);
15514
- jt(r.sort(), d.sort()) || (this.checkConditionalHandlesChanged(r, d), this.checkMandatoryHandlesChanged(c, d), await this.onGlobalPropertiesChanged(e, c));
15537
+ Yt(r.sort(), d.sort()) || (this.checkConditionalHandlesChanged(r, d), this.checkMandatoryHandlesChanged(c, d), await this.onGlobalPropertiesChanged(e, c));
15515
15538
  }
15516
15539
  checkConditionalHandlesChanged(t, e) {
15517
15540
  (() => {
@@ -15784,7 +15807,7 @@ class An {
15784
15807
  throw new Error(
15785
15808
  "No workflows found on product. This is generally due to a configuration error. Please confirm at least one workflow is configured for this product."
15786
15809
  );
15787
- return new Wt(t[0]);
15810
+ return new qt(t[0]);
15788
15811
  }
15789
15812
  getAllWorkflows() {
15790
15813
  if (!this.integrationProduct.product)
@@ -15794,7 +15817,7 @@ class An {
15794
15817
  throw new Error(
15795
15818
  "No workflows found on product. This is generally due to a configuration error. Please confirm at least one workflow is configured for this product."
15796
15819
  );
15797
- return t.sort((e, a) => (e.index ?? 0) - (a.index ?? 0)).map((e) => new Wt(e));
15820
+ return t.sort((e, a) => (e.index ?? 0) - (a.index ?? 0)).map((e) => new qt(e));
15798
15821
  }
15799
15822
  }
15800
15823
  const pe = C`
@@ -15989,7 +16012,7 @@ class tc {
15989
16012
  );
15990
16013
  }
15991
16014
  }
15992
- const Lt = new tc();
16015
+ const Vt = new tc();
15993
16016
  class ec {
15994
16017
  /**
15995
16018
  * Returns a formatted string representing a given amount with desired currency.
@@ -16084,7 +16107,7 @@ const nc = async (n, t) => {
16084
16107
  i.steps.forEach((r) => {
16085
16108
  delete r.data.__typename, r.option?.id && (r.option.defaultVariant?.asset && U.cacheAsset(r.option.defaultVariant.asset), r.option.colorProfile && U.cacheAsset(r.option.colorProfile), r.option.variants?.forEach((o) => {
16086
16109
  o.asset && U.cacheAsset(o.asset), o.thumbnail && U.cacheAsset(o.thumbnail), o.material && U.cacheMaterial(o.material);
16087
- }), _t.set({ id: r.option.id }, Promise.resolve(r.option)));
16110
+ }), Xt.set({ id: r.option.id }, Promise.resolve(r.option)));
16088
16111
  }), i.finalizeStepConfig || (i.finalizeStepConfig = {}), i.finalizeStepConfig.termsMarkdown = i.finalizeStepConfig.termsMarkdown || i.partner.termsMarkdown;
16089
16112
  }), a;
16090
16113
  }, ic = async (n, t) => {
@@ -16093,11 +16116,11 @@ const nc = async (n, t) => {
16093
16116
  throw new Error(`Workflow not found: ${n}`);
16094
16117
  return a;
16095
16118
  }, fi = async (n, t) => {
16096
- const e = n.map((s) => _t.get({ id: s, options: t })), a = n.filter((s, l) => e[l] === void 0);
16119
+ const e = n.map((s) => Xt.get({ id: s, options: t })), a = n.filter((s, l) => e[l] === void 0);
16097
16120
  if (a.length === 0)
16098
16121
  return Promise.all(e);
16099
16122
  const i = nc(a, t), r = a.map(
16100
- (s) => _t.set({ id: s, options: t }, ic(s, i))
16123
+ (s) => Xt.set({ id: s, options: t }, ic(s, i))
16101
16124
  ), o = e.filter((s) => s !== void 0);
16102
16125
  return await Promise.all(o.concat(r));
16103
16126
  }, rc = async (n, t) => (await fi([n], t))[0], oc = async (n) => {
@@ -16122,10 +16145,10 @@ class Rd {
16122
16145
  } catch (a) {
16123
16146
  throw console.error(a), new gt("Critical - Unable to synchronize workflow state with server.");
16124
16147
  }
16125
- }, this.options = t, this.options.applicationKey && ar(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 34.0.0"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
16148
+ }, this.options = t, this.options.applicationKey && ar(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 34.0.0-beta.3f2fe6a9-805d-5c25-a99f-4d12215f8c94"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
16126
16149
  }
16127
16150
  configure(t) {
16128
- pt.setHubUrl(t.hubUrl), pt.setServerUrl(t.serverUrl), pt.setServicesApiUrl(t.servicesApiUrl), this.marketplaceThemeInstallId = t.marketplaceThemeInstallId, this.marketplaceThemeInstallConfigurationId = t.marketplaceThemeInstallConfigurationId, this.userPoolClientId = t.userPoolClientId, this.userPoolRegion = t.userPoolRegion, this.spiffRegion = t.spiffRegion, t.bearerAuthenticationToken && ir(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration(), this.spiffRegion && this.userPoolRegion && this.userPoolClientId && Lt.init(this.spiffRegion, this.userPoolRegion, this.userPoolClientId);
16151
+ pt.setHubUrl(t.hubUrl), pt.setServerUrl(t.serverUrl), pt.setServicesApiUrl(t.servicesApiUrl), this.marketplaceThemeInstallId = t.marketplaceThemeInstallId, this.marketplaceThemeInstallConfigurationId = t.marketplaceThemeInstallConfigurationId, this.userPoolClientId = t.userPoolClientId, this.userPoolRegion = t.userPoolRegion, this.spiffRegion = t.spiffRegion, t.bearerAuthenticationToken && ir(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration(), this.spiffRegion && this.userPoolRegion && this.userPoolClientId && Vt.init(this.spiffRegion, this.userPoolRegion, this.userPoolClientId);
16129
16152
  }
16130
16153
  /**
16131
16154
  * @returns The asset manager allows for common operations related to assets
@@ -16319,7 +16342,7 @@ class Rd {
16319
16342
  return !1;
16320
16343
  const i = JSON.parse(e), r = (/* @__PURE__ */ new Date()).getTime() / 1e3;
16321
16344
  if (!i.ExpiresIn || i.ExpiresIn < r - parseInt(t)) {
16322
- const l = await Lt.refreshTokens();
16345
+ const l = await Vt.refreshTokens();
16323
16346
  if (l?.AuthenticationResult)
16324
16347
  localStorage.setItem("last-refreshed-cognito-tokens", `${(/* @__PURE__ */ new Date()).getTime() / 1e3}`), i.AccessToken = l.AuthenticationResult.AccessToken, localStorage.setItem("cognito-tokens", JSON.stringify(i));
16325
16348
  else
@@ -16344,14 +16367,14 @@ class Rd {
16344
16367
  variables: {
16345
16368
  emailAddress: t
16346
16369
  }
16347
- }), await Lt.generateCode(t);
16370
+ }), await Vt.generateCode(t);
16348
16371
  }
16349
16372
  /**
16350
16373
  * Verify an email code to log in as a Spiff user.
16351
16374
  * Always returns true if it doesn't throw.
16352
16375
  */
16353
16376
  async verifyCode(t, e) {
16354
- const a = (await this.getIntegration()).partner.id || "", i = await Lt.verifyCode(t, e, a);
16377
+ const a = (await this.getIntegration()).partner.id || "", i = await Vt.verifyCode(t, e, a);
16355
16378
  if (i?.AuthenticationResult) {
16356
16379
  localStorage.setItem("last-refreshed-cognito-tokens", `${(/* @__PURE__ */ new Date()).getTime() / 1e3}`), localStorage.setItem("cognito-tokens", JSON.stringify(i.AuthenticationResult)), localStorage.setItem("cognito-email", t);
16357
16380
  const o = (await y.getShadowGraphqlClient().query({
@@ -16381,7 +16404,7 @@ class Rd {
16381
16404
  throw new Error("No token data in storage.");
16382
16405
  const a = JSON.parse(e), i = (/* @__PURE__ */ new Date()).getTime() / 1e3, r = !a?.AccessToken || Te(a.AccessToken);
16383
16406
  if (!a.ExpiresIn || a.ExpiresIn < i - parseInt(t) || r) {
16384
- const o = await Lt.refreshTokens();
16407
+ const o = await Vt.refreshTokens();
16385
16408
  if (o?.AuthenticationResult)
16386
16409
  localStorage.setItem("last-refreshed-cognito-tokens", `${(/* @__PURE__ */ new Date()).getTime() / 1e3}`), a.AccessToken = o.AuthenticationResult.AccessToken, localStorage.setItem("cognito-tokens", JSON.stringify(a));
16387
16410
  else
@@ -16653,12 +16676,12 @@ class Rd {
16653
16676
  const it = x.get(T.integrationProductId);
16654
16677
  T.integrationProduct = it, T.product = it?.product, T.integrationProduct || console.error("failed to find transaction's product");
16655
16678
  }
16656
- const oe = k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map();
16657
- !oe.get(T.id) && T.transactionOwnerId && (oe.set(T.id, T.transactionOwnerId), k.setMap("transactionOwnerIds", oe));
16658
- const He = oe.get(T.id) || void 0, Si = new Zl({
16679
+ const se = k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map();
16680
+ !se.get(T.id) && T.transactionOwnerId && (se.set(T.id, T.transactionOwnerId), k.setMap("transactionOwnerIds", se));
16681
+ const He = se.get(T.id) || void 0, Si = new Zl({
16659
16682
  onMutate: () => ({ context: { transactionOwnerId: He, bundleOwnerId: e?.bundleOwnerId } }),
16660
16683
  onQuery: () => ({ context: { transactionOwnerId: He, bundleOwnerId: e?.bundleOwnerId } })
16661
- }), se = {
16684
+ }), le = {
16662
16685
  workflow: qe,
16663
16686
  transaction: T,
16664
16687
  singleVariantsRenderable: At?.workflowConfiguration?.singleVariantsRenderable,
@@ -16674,12 +16697,12 @@ class Rd {
16674
16697
  };
16675
16698
  if (At.type === "transaction" && T.workflowState) {
16676
16699
  const it = JSON.parse(T.workflowState);
16677
- await Za(it), se.reloadedState = it;
16700
+ await Za(it), le.reloadedState = it;
16678
16701
  } else if (!D && At.workflowState) {
16679
16702
  const it = JSON.parse(At.workflowState);
16680
- await Za(it), se.reloadedState = it;
16703
+ await Za(it), le.reloadedState = it;
16681
16704
  }
16682
- return se.delayWorkflowStateSync = !0, { experienceOptions: se, index: q, options: At };
16705
+ return le.delayWorkflowStateSync = !0, { experienceOptions: le, index: q, options: At };
16683
16706
  }), N = (await Promise.all(E)).sort((B, T) => B.index - T.index);
16684
16707
  let R = [];
16685
16708
  for (const B of N) {
@@ -16864,7 +16887,7 @@ class cc {
16864
16887
  let r = !1;
16865
16888
  for (let o = 0; o < i.currentFrameSources.length; o++) {
16866
16889
  const s = i.currentFrameSources[o], l = await Ve(s), c = this.frameData ? this.frameData[o] : void 0;
16867
- jt(l, c) || (this.frameData || (this.frameData = new Array(i.currentFrameSources.length)), this.frameData[o] = l, r = !0);
16890
+ Yt(l, c) || (this.frameData || (this.frameData = new Array(i.currentFrameSources.length)), this.frameData[o] = l, r = !0);
16868
16891
  }
16869
16892
  r && (this.onFrameDataChangeListeners.forEach(
16870
16893
  (o) => o(this.frameData)
@@ -16898,7 +16921,7 @@ class cc {
16898
16921
  return;
16899
16922
  }
16900
16923
  t.forEach((e, a) => {
16901
- const i = Vt.get(e);
16924
+ const i = zt.get(e);
16902
16925
  i && (this.frameData || (this.frameData = new Array(t.length)), this.frameData[a] = i);
16903
16926
  });
16904
16927
  }
@@ -17878,7 +17901,7 @@ export {
17878
17901
  ai as CreateLayoutCommand,
17879
17902
  ac as CurrencyContext,
17880
17903
  ec as CurrencyService,
17881
- Nt as DeleteElementCommand,
17904
+ Qt as DeleteElementCommand,
17882
17905
  Al as DigitalContentStepHandle,
17883
17906
  Pl as FileUploadGlobalPropertyHandle,
17884
17907
  me as FlowExecutionNodeResult,
@@ -17901,7 +17924,7 @@ export {
17901
17924
  Sd as LayoutElementFactory,
17902
17925
  F as LayoutElementType,
17903
17926
  J as LayoutNotFoundError,
17904
- Yt as LayoutRenderingPurpose,
17927
+ Jt as LayoutRenderingPurpose,
17905
17928
  il as MaterialStepHandle,
17906
17929
  Be as MisconfigurationError,
17907
17930
  zd as MockWorkflowManager,
@@ -17912,18 +17935,18 @@ export {
17912
17935
  Jl as ObjectInputType,
17913
17936
  hi as OptionGlobalPropertyHandle,
17914
17937
  Ie as OptionNotFoundError,
17915
- Pt as ParseError,
17938
+ xt as ParseError,
17916
17939
  ol as PictureStepHandle,
17917
17940
  Gi as ProductCameraRig,
17918
17941
  mi as ProductCollection,
17919
17942
  $l as ProductCollectionProductSortKey,
17920
- Wt as ProductWorkflow,
17921
- _t as PromiseCache,
17943
+ qt as ProductWorkflow,
17944
+ Xt as PromiseCache,
17922
17945
  Wn as PromiseQueue,
17923
17946
  sl as QuestionStepHandle,
17924
17947
  Gn as QueueablePromise,
17925
17948
  bd as ResizeCommand,
17926
- Jt as ResourceNotFoundError,
17949
+ Kt as ResourceNotFoundError,
17927
17950
  Ed as RotateCommand,
17928
17951
  j as ScaleAxis,
17929
17952
  Fd as SendBackwardsCommand,
@@ -17934,7 +17957,7 @@ export {
17934
17957
  Ui as StepAspectType,
17935
17958
  tt as StepHandle,
17936
17959
  b as StepType,
17937
- kt as TextAlgorithm,
17960
+ Mt as TextAlgorithm,
17938
17961
  Oo as TextChangeCommand,
17939
17962
  xl as TextGlobalPropertyHandle,
17940
17963
  Nd as TextInput,
@@ -17963,7 +17986,7 @@ export {
17963
17986
  cd as findAngle,
17964
17987
  V as findElement,
17965
17988
  sd as findPmsColors,
17966
- Vt as frameDataCache,
17989
+ zt as frameDataCache,
17967
17990
  St as frameStepService,
17968
17991
  M as generate,
17969
17992
  fs as generateCommands,
@@ -18002,7 +18025,7 @@ export {
18002
18025
  y as graphQlManager,
18003
18026
  we as illustrationStepService,
18004
18027
  dd as isCloseToValue,
18005
- Tt as loadFont,
18028
+ Nt as loadFont,
18006
18029
  od as matchHexToPms,
18007
18030
  ri as materialStepService,
18008
18031
  Ol as metafieldManager,
@@ -18028,7 +18051,7 @@ export {
18028
18051
  Pa as sanitizeSvgTree,
18029
18052
  ir as setBearerAuthenticationToken,
18030
18053
  kn as setCanvasModule,
18031
- zt as shapeStepService,
18054
+ Gt as shapeStepService,
18032
18055
  Uo as shortenUrl,
18033
18056
  pt as spiffCoreConfiguration,
18034
18057
  Dd as stepAspectValuesToDesignInputSteps,