@spiffcommerce/core 26.23.2 → 26.23.4-beta.20d47a7c-f527-5383-9ed3-ea8e5da544b2

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
@@ -11,7 +11,7 @@ import Pt from "lodash.clonedeep";
11
11
  import { toString as nn } from "qrcode";
12
12
  import Ar from "svg-path-bbox";
13
13
  import { parse as Je } from "opentype.js";
14
- import { jsx as F, jsxs as lt, Fragment as Vt } from "preact/jsx-runtime";
14
+ import { jsx as x, jsxs as lt, Fragment as Vt } from "preact/jsx-runtime";
15
15
  import { dataUriToBuffer as ur } from "data-uri-to-buffer";
16
16
  import Da from "lodash.chunk";
17
17
  import rn from "lodash.isequal";
@@ -19,7 +19,7 @@ import { split as Ke } from "unicode-default-word-boundary";
19
19
  import sn from "lodash.debounce";
20
20
  import "fs";
21
21
  import "path";
22
- var he = /* @__PURE__ */ ((r) => (r.Data = "Data", r.Font = "Font", r.Frame = "Frame", r.Illustration = "Illustration", r.Image = "Image", r.Model = "Model", r.Material = "Material", r.Color = "Color", r.QuestionnaireCollateral = "QuestionnaireCollateral", r.RequestCollateral = "RequestCollateral", r.SignupCollateral = "SignupCollateral", r.Video = "Video", r.ColorProfile = "ColorProfile", r.Environment = "Environment", r))(he || {}), et = /* @__PURE__ */ ((r) => (r.FileUpload = "FileUpload", r.Option = "Option", r.ColorOption = "ColorOption", r.Text = "Text", r))(et || {}), D = /* @__PURE__ */ ((r) => (r.Information = "Information", r.Bulk = "Bulk", r.DigitalContent = "DigitalContent", r.Finish = "Finish", r.Frame = "Frame", r.Illustration = "Illustration", r.Introduction = "Introduction", r.Material = "Material", r.Model = "Model", r.Module = "Module", r.Picture = "Picture", r.Photo = "Photo", r.ProductOverlay = "ProductOverlay", r.Question = "Question", r.Shape = "Shape", r.SilentIllustration = "SilentIllustration", r.Text = "Text", r))(D || {}), hr = /* @__PURE__ */ ((r) => (r.Color = "Color", r.Colors = "Colors", r.Selection = "Selection", r.Selections = "Selections", r.Text = "Text", r.Upload = "Upload", r))(hr || {}), Gt = /* @__PURE__ */ ((r) => (r.ThreeD = "ThreeD", r.FreeDesign = "FreeDesign", r.Print = "Print", r))(Gt || {}), T = /* @__PURE__ */ ((r) => (r.Frame = "frame", r.Group = "group", r.Image = "image", r.Pattern = "pattern", r.Illustration = "illustration", r.Textbox = "textbox", r))(T || {}), mr = /* @__PURE__ */ ((r) => (r.Default = "Default", r.FirstTransaction = "FirstTransaction", r.OneToOne = "OneToOne", r))(mr || {}), gr = /* @__PURE__ */ ((r) => (r.Hyperlink = "Hyperlink", r.Edit = "Edit", r.Approve = "Approve", r))(gr || {}), fr = /* @__PURE__ */ ((r) => (r.Hub = "Hub", r.Shopify = "Shopify", r))(fr || {}), da = /* @__PURE__ */ ((r) => (r.BackgroundRemover = "BackgroundRemover", r.ConversionAccelerator = "Conversion Accelerator", r.ProcessBuilder = "ProcessBuilder", r))(da || {}), pr = /* @__PURE__ */ ((r) => (r[r.Orbit = 0] = "Orbit", r[r.Pan = 1] = "Pan", r))(pr || {}), me = /* @__PURE__ */ ((r) => (r.Owner = "Owner", r.Approver = "Approver", r.Editor = "Editor", r.Viewer = "Viewer", r))(me || {}), kt = /* @__PURE__ */ ((r) => (r.Autosize = "Autosize", r.Traditional = "Traditional", r))(kt || {}), H = /* @__PURE__ */ ((r) => (r[r.North = 0] = "North", r[r.Northeast = 1] = "Northeast", r[r.East = 2] = "East", r[r.Southeast = 3] = "Southeast", r[r.South = 4] = "South", r[r.Southwest = 5] = "Southwest", r[r.West = 6] = "West", r[r.Northwest = 7] = "Northwest", r))(H || {}), Cr = /* @__PURE__ */ ((r) => (r.Pixel = "px", r.Millimeter = "mm", r.Centimeter = "cm", r))(Cr || {});
22
+ var ue = /* @__PURE__ */ ((r) => (r.Data = "Data", r.Font = "Font", r.Frame = "Frame", r.Illustration = "Illustration", r.Image = "Image", r.Model = "Model", r.Material = "Material", r.Color = "Color", r.QuestionnaireCollateral = "QuestionnaireCollateral", r.RequestCollateral = "RequestCollateral", r.SignupCollateral = "SignupCollateral", r.Video = "Video", r.ColorProfile = "ColorProfile", r.Environment = "Environment", r))(ue || {}), et = /* @__PURE__ */ ((r) => (r.FileUpload = "FileUpload", r.Option = "Option", r.ColorOption = "ColorOption", r.Text = "Text", r))(et || {}), D = /* @__PURE__ */ ((r) => (r.Information = "Information", r.Bulk = "Bulk", r.DigitalContent = "DigitalContent", r.Finish = "Finish", r.Frame = "Frame", r.Illustration = "Illustration", r.Introduction = "Introduction", r.Material = "Material", r.Model = "Model", r.Module = "Module", r.Picture = "Picture", r.Photo = "Photo", r.ProductOverlay = "ProductOverlay", r.Question = "Question", r.Shape = "Shape", r.SilentIllustration = "SilentIllustration", r.Text = "Text", r))(D || {}), hr = /* @__PURE__ */ ((r) => (r.Color = "Color", r.Colors = "Colors", r.Selection = "Selection", r.Selections = "Selections", r.Text = "Text", r.Upload = "Upload", r))(hr || {}), Gt = /* @__PURE__ */ ((r) => (r.ThreeD = "ThreeD", r.FreeDesign = "FreeDesign", r.Print = "Print", r))(Gt || {}), T = /* @__PURE__ */ ((r) => (r.Frame = "frame", r.Group = "group", r.Image = "image", r.Pattern = "pattern", r.Illustration = "illustration", r.Textbox = "textbox", r))(T || {}), mr = /* @__PURE__ */ ((r) => (r.Default = "Default", r.FirstTransaction = "FirstTransaction", r.OneToOne = "OneToOne", r))(mr || {}), gr = /* @__PURE__ */ ((r) => (r.Hyperlink = "Hyperlink", r.Edit = "Edit", r.Approve = "Approve", r))(gr || {}), fr = /* @__PURE__ */ ((r) => (r.Hub = "Hub", r.Shopify = "Shopify", r))(fr || {}), da = /* @__PURE__ */ ((r) => (r.BackgroundRemover = "BackgroundRemover", r.ConversionAccelerator = "Conversion Accelerator", r.ProcessBuilder = "ProcessBuilder", r))(da || {}), pr = /* @__PURE__ */ ((r) => (r[r.Orbit = 0] = "Orbit", r[r.Pan = 1] = "Pan", r))(pr || {}), he = /* @__PURE__ */ ((r) => (r.Owner = "Owner", r.Approver = "Approver", r.Editor = "Editor", r.Viewer = "Viewer", r))(he || {}), kt = /* @__PURE__ */ ((r) => (r.Autosize = "Autosize", r.Traditional = "Traditional", r))(kt || {}), H = /* @__PURE__ */ ((r) => (r[r.North = 0] = "North", r[r.Northeast = 1] = "Northeast", r[r.East = 2] = "East", r[r.Southeast = 3] = "Southeast", r[r.South = 4] = "South", r[r.Southwest = 5] = "Southwest", r[r.West = 6] = "West", r[r.Northwest = 7] = "Northwest", r))(H || {}), Cr = /* @__PURE__ */ ((r) => (r.Pixel = "px", r.Millimeter = "mm", r.Centimeter = "cm", r))(Cr || {});
23
23
  class on extends Error {
24
24
  constructor(t) {
25
25
  super(t), this.name = this.constructor.name;
@@ -30,7 +30,7 @@ class Yt extends on {
30
30
  super(`ConfigurationError - ${t}`);
31
31
  }
32
32
  }
33
- class ge extends Yt {
33
+ class me extends Yt {
34
34
  constructor(t) {
35
35
  super(`Option not Configured: ${t.stepTitle}`), this.optionId = (t == null ? void 0 : t.optionId) || "N/A";
36
36
  }
@@ -50,32 +50,32 @@ class Wt extends Yt {
50
50
  super(`Resource not found for asset: ${t.name}`), this.asset = t;
51
51
  }
52
52
  }
53
- class fe extends Yt {
53
+ class ge extends Yt {
54
54
  constructor(t, e) {
55
55
  super(`Workflow Misconfiguration: ${t.stepName} - ${e}`), this.step = t;
56
56
  }
57
57
  }
58
- class Ee extends on {
58
+ class ve extends on {
59
59
  constructor(t) {
60
60
  super(`ImplementationError - ${t}`);
61
61
  }
62
62
  }
63
- class z extends Ee {
63
+ class z extends ve {
64
64
  constructor(t) {
65
65
  super(`Unhandled Behavior Encountered: ${t}`);
66
66
  }
67
67
  }
68
- class Dt extends Ee {
68
+ class Dt extends ve {
69
69
  constructor(t) {
70
70
  super(`Parsing Error: ${t}`);
71
71
  }
72
72
  }
73
- class ut extends Ee {
73
+ class ut extends ve {
74
74
  constructor(t) {
75
75
  super(`Client Error: ${t}`);
76
76
  }
77
77
  }
78
- class Be extends Ee {
78
+ class Ee extends ve {
79
79
  constructor(t) {
80
80
  super(`Resource Generation Failed: ${t}`);
81
81
  }
@@ -179,8 +179,8 @@ function ct(r, t) {
179
179
  }
180
180
  return Xe(r, t);
181
181
  }
182
- const ln = /* @__PURE__ */ new Map(), xa = /* @__PURE__ */ new Map(), Fa = /* @__PURE__ */ new Map(), cn = async (r) => {
183
- const t = xa.get(r);
182
+ const ln = /* @__PURE__ */ new Map(), Fa = /* @__PURE__ */ new Map(), xa = /* @__PURE__ */ new Map(), cn = async (r) => {
183
+ const t = Fa.get(r);
184
184
  if (t)
185
185
  return t;
186
186
  const a = (async () => {
@@ -188,14 +188,14 @@ const ln = /* @__PURE__ */ new Map(), xa = /* @__PURE__ */ new Map(), Fa = /* @_
188
188
  const n = await ct(r);
189
189
  return ln.set(r, ((i = n.headers) == null ? void 0 : i.get("content-type")) || ""), await n.arrayBuffer();
190
190
  })();
191
- return xa.set(r, a), a;
191
+ return Fa.set(r, a), a;
192
192
  }, vr = async (r) => {
193
- const t = Fa.get(r);
193
+ const t = xa.get(r);
194
194
  if (t)
195
195
  return t;
196
196
  const a = (async () => await (await ct(r)).text())();
197
- return Fa.set(r, a), a;
198
- }, Mt = (r) => r.every((t) => t !== "undefined"), ee = (r) => Mt([typeof document]) ? document.createElement(r) : Jt().document.createElement(r), Er = (r, t) => {
197
+ return xa.set(r, a), a;
198
+ }, Mt = (r) => r.every((t) => t !== "undefined"), te = (r) => Mt([typeof document]) ? document.createElement(r) : Jt().document.createElement(r), Er = (r, t) => {
199
199
  if (Mt([typeof document]))
200
200
  return document.createElementNS(r, t);
201
201
  const a = Jt().document.createElement(t);
@@ -205,7 +205,7 @@ const ln = /* @__PURE__ */ new Map(), xa = /* @__PURE__ */ new Map(), Fa = /* @_
205
205
  return new DOMParser();
206
206
  const r = Jt();
207
207
  return new r.DOMParser();
208
- }, Br = () => Mt([typeof DOMParser]) ? DOMParser : Jt().DOMParser, be = (r, t) => new Promise((e, a) => {
208
+ }, Br = () => Mt([typeof DOMParser]) ? DOMParser : Jt().DOMParser, Be = (r, t) => new Promise((e, a) => {
209
209
  t ? cn(r).then(e).catch(a) : ct(r).then((n) => {
210
210
  n.arrayBuffer().then(e).catch(a);
211
211
  }).catch((n) => {
@@ -229,7 +229,7 @@ const ln = /* @__PURE__ */ new Map(), xa = /* @__PURE__ */ new Map(), Fa = /* @_
229
229
  return new XMLSerializer();
230
230
  const r = Jt();
231
231
  return new r.XMLSerializer();
232
- }, ka = (r) => btoa(r), Kt = (r) => {
232
+ }, ka = (r) => btoa(r), be = (r) => {
233
233
  function t() {
234
234
  const a = new Uint8Array(r), n = 4;
235
235
  if (a.length >= n) {
@@ -257,7 +257,7 @@ const ln = /* @__PURE__ */ new Map(), xa = /* @__PURE__ */ new Map(), Fa = /* @_
257
257
  const e = t();
258
258
  return e || "image/svg+xml";
259
259
  }, tc = async (r) => {
260
- const t = await cn(r), e = ln.get(r) || Kt(t);
260
+ const t = await cn(r), e = ln.get(r) || be(t);
261
261
  return await Pr(new Blob([t], { type: e }));
262
262
  }, Ir = (r) => {
263
263
  let t = "";
@@ -266,7 +266,7 @@ const ln = /* @__PURE__ */ new Map(), xa = /* @__PURE__ */ new Map(), Fa = /* @_
266
266
  t += String.fromCharCode(r[a]);
267
267
  return t;
268
268
  }, Dr = async (r) => {
269
- const t = Kt(r), e = new Uint8Array(r), a = Ir(e), n = btoa(a);
269
+ const t = be(r), e = new Uint8Array(r), a = Ir(e), n = btoa(a);
270
270
  return `data:${t};base64,${n}`;
271
271
  }, Aa = (r) => `data:image/svg+xml;base64,${btoa(r)}`, An = (r) => {
272
272
  const t = r.replace(/\r?\n/g, ""), e = t.indexOf(",");
@@ -292,9 +292,9 @@ const Ma = (r) => {
292
292
  un = r;
293
293
  };
294
294
  let ua;
295
- const xr = (r) => {
295
+ const Fr = (r) => {
296
296
  ua = r;
297
- }, Fr = () => ua;
297
+ }, xr = () => ua;
298
298
  let hn;
299
299
  const kr = (r) => {
300
300
  hn = r;
@@ -363,7 +363,7 @@ const mt = (r, t, e) => {
363
363
  } catch {
364
364
  throw new Error("Canvas module not set");
365
365
  }
366
- }, _t = (r, t) => {
366
+ }, Kt = (r, t) => {
367
367
  if (ta !== void 0)
368
368
  return ta(r, t);
369
369
  try {
@@ -400,22 +400,22 @@ let Ne;
400
400
  function ha() {
401
401
  return Ne === void 0 && (Ne = Br()), Ne;
402
402
  }
403
- let ae = null;
403
+ let ee = null;
404
404
  const Nr = (r) => new Promise((t) => {
405
- if (Kt(r) !== "image/jpeg")
405
+ if (be(r) !== "image/jpeg")
406
406
  return t(1);
407
407
  cr(r).then((a) => t(a || 1)).catch(() => t(1));
408
408
  }), Rr = async () => {
409
- if (ae !== null)
410
- return !ae;
411
- const t = await _t("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAIAAwMBEQACEQEDEQH/xABRAAEAAAAAAAAAAAAAAAAAAAAKEAEBAQADAQEAAAAAAAAAAAAGBQQDCAkCBwEBAAAAAAAAAAAAAAAAAAAAABEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8AG8T9NfSMEVMhQvoP3fFiRZ+MTHDifa/95OFSZU5OzRzxkyejv8ciEfhSceSXGjS8eSdLnZc2HDm4M3BxcXwH/9k=");
412
- return ae = t.width === 2 && t.height === 3, !ae;
409
+ if (ee !== null)
410
+ return !ee;
411
+ const t = await Kt("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAIAAwMBEQACEQEDEQH/xABRAAEAAAAAAAAAAAAAAAAAAAAKEAEBAQADAQEAAAAAAAAAAAAGBQQDCAkCBwEBAAAAAAAAAAAAAAAAAAAAABEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8AG8T9NfSMEVMhQvoP3fFiRZ+MTHDifa/95OFSZU5OzRzxkyejv8ciEfhSceSXGjS8eSdLnZc2HDm4M3BxcXwH/9k=");
412
+ return ee = t.width === 2 && t.height === 3, !ee;
413
413
  }, Or = (r) => {
414
414
  const e = r.naturalWidth / r.naturalHeight;
415
415
  return r.naturalHeight <= 8192 && r.naturalWidth <= 8192 ? [r.naturalWidth, r.naturalHeight] : r.naturalHeight > r.naturalWidth ? [e * 8192, 8192] : [8192, 8192 / e];
416
416
  }, Ur = async (r) => {
417
417
  var A;
418
- const t = await Dr(r), e = await _t(t), [a, n] = Or(e);
418
+ const t = await Dr(r), e = await Kt(t), [a, n] = Or(e);
419
419
  if (!await Rr()) {
420
420
  const u = mt(a, n);
421
421
  return (A = u.getContext("2d")) == null || A.drawImage(e, 0, 0, a, n), u;
@@ -447,7 +447,7 @@ const Nr = (r) => new Promise((t) => {
447
447
  return d.drawImage(e, 0, 0, o, l), c;
448
448
  }, Ie = async (r) => {
449
449
  const t = await Ur(r);
450
- return Kt(r) === "image/jpeg" ? {
450
+ return be(r) === "image/jpeg" ? {
451
451
  dataUrl: t.toDataURL("image/jpeg", 1),
452
452
  height: t.height,
453
453
  width: t.width
@@ -1798,7 +1798,7 @@ const Nr = (r) => new Promise((t) => {
1798
1798
  "Black 5 C",
1799
1799
  "Black 6 C",
1800
1800
  "Black 7 C"
1801
- ], xt = [
1801
+ ], Ft = [
1802
1802
  "FEDD00",
1803
1803
  "FFD700",
1804
1804
  "FE5000",
@@ -3140,17 +3140,17 @@ const Nr = (r) => new Promise((t) => {
3140
3140
  "3E2B2E",
3141
3141
  "101820",
3142
3142
  "3D3935"
3143
- ], Re = xt.map((r) => [
3143
+ ], Re = Ft.map((r) => [
3144
3144
  parseInt(r.substring(0, 2), 16),
3145
3145
  parseInt(r.substring(2, 4), 16),
3146
3146
  parseInt(r.substring(4, 6), 16)
3147
3147
  ]);
3148
3148
  function ec(r) {
3149
3149
  const t = jt.indexOf(r);
3150
- return t >= 0 ? xt[t] : "";
3150
+ return t >= 0 ? Ft[t] : "";
3151
3151
  }
3152
3152
  function Lr(r) {
3153
- const t = xt.indexOf(r);
3153
+ const t = Ft.indexOf(r);
3154
3154
  return t >= 0 ? jt[t] : "";
3155
3155
  }
3156
3156
  function ac(r, t = 64) {
@@ -3162,16 +3162,16 @@ function ac(r, t = 64) {
3162
3162
  });
3163
3163
  const i = parseInt(r.substring(0, 2), 16), s = parseInt(r.substring(2, 4), 16), o = parseInt(r.substring(4, 6), 16);
3164
3164
  let l, c, d;
3165
- for (let A = 0; A < xt.length; A++) {
3165
+ for (let A = 0; A < Ft.length; A++) {
3166
3166
  l = Re[A][0], c = Re[A][1], d = Re[A][2];
3167
3167
  const u = Math.sqrt(Math.pow(i - l, 2) + Math.pow(s - c, 2) + Math.pow(o - d, 2));
3168
3168
  a.push(u);
3169
3169
  }
3170
3170
  for (let A = 0; A < a.length; A++)
3171
- a[A] <= t && !e.some((u) => u.pms === jt[A]) && e.push({ pms: jt[A], hex: xt[A], distance: a[A] });
3171
+ a[A] <= t && !e.some((u) => u.pms === jt[A]) && e.push({ pms: jt[A], hex: Ft[A], distance: a[A] });
3172
3172
  return e.sort((A, u) => A.distance - u.distance);
3173
3173
  }
3174
- const $r = jt.map((r, t) => ({ pms: r, hex: xt[t] })), Vr = new dr($r, { keys: ["pms"] });
3174
+ const $r = jt.map((r, t) => ({ pms: r, hex: Ft[t] })), Vr = new dr($r, { keys: ["pms"] });
3175
3175
  function nc(r, t) {
3176
3176
  return Vr.search(r, t ? { limit: t } : void 0);
3177
3177
  }
@@ -3191,7 +3191,7 @@ function Ta(r) {
3191
3191
  const t = r.substring(1).toUpperCase();
3192
3192
  return t.length === 6 ? t : t.length === 3 ? `${t[0]}${t[0]}${t[1]}${t[1]}${t[2]}${t[2]}` : "";
3193
3193
  }
3194
- const ne = (r) => {
3194
+ const ae = (r) => {
3195
3195
  const t = fn(r.spotColor);
3196
3196
  return t ? `${r.browserValue} ${t}` : r.browserValue;
3197
3197
  }, fn = (r) => {
@@ -3228,8 +3228,8 @@ const ne = (r) => {
3228
3228
  "textPath",
3229
3229
  "tref",
3230
3230
  "tspan"
3231
- ], Wr = ["fill", "stroke"], Ft = (r, t) => {
3232
- t(r), r.children.length > 0 && Array.from(r.children).forEach((e) => Ft(e, t));
3231
+ ], Wr = ["fill", "stroke"], xt = (r, t) => {
3232
+ t(r), r.children.length > 0 && Array.from(r.children).forEach((e) => xt(e, t));
3233
3233
  }, jr = (r, t) => {
3234
3234
  try {
3235
3235
  return r.matches(t);
@@ -3239,7 +3239,7 @@ const ne = (r) => {
3239
3239
  }, ma = (r, t = !1) => {
3240
3240
  !t && r.setAttribute("preserveAspectRatio", "none");
3241
3241
  const e = [];
3242
- Ft(r, (a) => {
3242
+ xt(r, (a) => {
3243
3243
  var i, s, o;
3244
3244
  if (a.tagName === "script") {
3245
3245
  a.remove();
@@ -3266,7 +3266,7 @@ const ne = (r) => {
3266
3266
  }
3267
3267
  }), l.length > 0 ? a.setAttribute("style", l.join(";")) : a.removeAttribute("style");
3268
3268
  }
3269
- }), Ft(r, (a) => {
3269
+ }), xt(r, (a) => {
3270
3270
  e.forEach((n) => {
3271
3271
  var i;
3272
3272
  (i = n.selectors) == null || i.forEach((s) => {
@@ -3285,7 +3285,7 @@ const ne = (r) => {
3285
3285
  }, pn = (r) => dt().parseFromString(r, "image/svg+xml").firstElementChild, qr = (r, t, e) => {
3286
3286
  r.setAttribute("height", `${e}px`), r.setAttribute("width", `${t}px`);
3287
3287
  }, Cn = (r, t, e) => {
3288
- Ft(r, (a) => {
3288
+ xt(r, (a) => {
3289
3289
  const n = a.attributes.getNamedItem("fill");
3290
3290
  n && n.value !== "none" && a.classList.forEach((s) => {
3291
3291
  if (s.startsWith("spiff-fill")) {
@@ -3293,13 +3293,13 @@ const ne = (r) => {
3293
3293
  if (o)
3294
3294
  a.setAttribute(
3295
3295
  "fill",
3296
- e ? ne(o) : o.browserValue
3296
+ e ? ae(o) : o.browserValue
3297
3297
  );
3298
3298
  else {
3299
3299
  const l = t[s];
3300
3300
  l && a.setAttribute(
3301
3301
  "fill",
3302
- e ? ne(l) : l.browserValue
3302
+ e ? ae(l) : l.browserValue
3303
3303
  );
3304
3304
  }
3305
3305
  }
@@ -3311,13 +3311,13 @@ const ne = (r) => {
3311
3311
  if (o)
3312
3312
  a.setAttribute(
3313
3313
  "stroke",
3314
- e ? ne(o) : o.browserValue
3314
+ e ? ae(o) : o.browserValue
3315
3315
  );
3316
3316
  else {
3317
3317
  const l = t[s];
3318
3318
  l && a.setAttribute(
3319
3319
  "fill",
3320
- e ? ne(l) : l.browserValue
3320
+ e ? ae(l) : l.browserValue
3321
3321
  );
3322
3322
  }
3323
3323
  }
@@ -3342,7 +3342,7 @@ const ne = (r) => {
3342
3342
  throw new Error("Failed to read SVG.");
3343
3343
  ma(e);
3344
3344
  const a = {};
3345
- Ft(e, (s) => {
3345
+ xt(e, (s) => {
3346
3346
  Gr.includes(s.tagName) && !s.attributes.getNamedItem("fill") && s.setAttribute("fill", "black");
3347
3347
  const o = s.attributes.getNamedItem("fill");
3348
3348
  if (o && o.value !== "none" && !o.value.startsWith("url(")) {
@@ -3367,7 +3367,7 @@ const ne = (r) => {
3367
3367
  value
3368
3368
  }
3369
3369
  }
3370
- `, Xt = (r) => y`
3370
+ `, _t = (r) => y`
3371
3371
  ${r && Jr || ""}
3372
3372
  fragment AssetFields on Asset {
3373
3373
  name
@@ -3411,7 +3411,7 @@ const ne = (r) => {
3411
3411
  ${r && "...AssetMetadataFields" || ""}
3412
3412
  }
3413
3413
  `, Kr = y`
3414
- ${Xt(!1)}
3414
+ ${_t(!1)}
3415
3415
  query GetAssets($keys: [String]!) {
3416
3416
  assets(keys: $keys) {
3417
3417
  ...AssetFields
@@ -3486,7 +3486,7 @@ const ne = (r) => {
3486
3486
  }
3487
3487
  }
3488
3488
  `, Zr = y`
3489
- ${Xt(!1)}
3489
+ ${_t(!1)}
3490
3490
  mutation RemoveBackgroundFromAsset($key: String!) {
3491
3491
  assetRemoveBackground(key: $key) {
3492
3492
  ...AssetFields
@@ -3613,7 +3613,7 @@ class ai {
3613
3613
  }, a, n);
3614
3614
  }
3615
3615
  async uploadFile(t, e) {
3616
- const n = this.isRaster(t) ? he.Image : he.Illustration, i = await this.loadImageAsFileInfo(t);
3616
+ const n = this.isRaster(t) ? ue.Image : ue.Illustration, i = await this.loadImageAsFileInfo(t);
3617
3617
  return await this.uploadAssetWithProgress(i, n, e, !0);
3618
3618
  }
3619
3619
  async removeBackgroundFromAsset(t) {
@@ -3855,7 +3855,7 @@ const Ht = new ni(), Sn = y`
3855
3855
  }
3856
3856
  }
3857
3857
  `, ri = y`
3858
- ${Xt(!1)}
3858
+ ${_t(!1)}
3859
3859
  ${pa}
3860
3860
  ${Sn}
3861
3861
  query GetOptions($ids: [String]!) {
@@ -4309,7 +4309,7 @@ const X = new li(), vn = y`
4309
4309
  workflowState
4310
4310
  }
4311
4311
  }
4312
- `, In = y`
4312
+ `, In = (r) => y`
4313
4313
  ${De}
4314
4314
  fragment IntegrationProductFields on IntegrationProduct {
4315
4315
  id
@@ -4325,6 +4325,7 @@ const X = new li(), vn = y`
4325
4325
  enabled
4326
4326
  externalIntegrationId
4327
4327
  type
4328
+ isCurrent
4328
4329
  }
4329
4330
  product {
4330
4331
  id
@@ -4370,17 +4371,36 @@ const X = new li(), vn = y`
4370
4371
  minQty
4371
4372
  percentage
4372
4373
  }
4374
+ ${r ? `
4375
+ integrationProducts {
4376
+ id
4377
+ externalProductId
4378
+ externalVariantId
4379
+ additionalExternalProductId
4380
+ additionalExternalVariantId
4381
+ additionalIntegrationProduct {
4382
+ ...AdditionalIntegrationProductFields
4383
+ }
4384
+ integration {
4385
+ id
4386
+ enabled
4387
+ externalIntegrationId
4388
+ type
4389
+ isCurrent
4390
+ }
4391
+ }
4392
+ ` : ""}
4373
4393
  }
4374
4394
  }
4375
- `, gi = y`
4376
- ${In}
4395
+ `, gi = (r) => y`
4396
+ ${In(r)}
4377
4397
  query GetIntegrationProducts($ids: [String!]!) {
4378
4398
  integrationProducts(ids: $ids) {
4379
4399
  ...IntegrationProductFields
4380
4400
  }
4381
4401
  }
4382
- `, fi = y`
4383
- ${In}
4402
+ `, fi = (r) => y`
4403
+ ${In(r)}
4384
4404
  query GetIntegrationProductFromExternalIds($externalIntegrationId: String!, $externalProductId: String!) {
4385
4405
  integrationProductFromExternalIds(
4386
4406
  externalIntegrationId: $externalIntegrationId
@@ -4526,7 +4546,7 @@ const X = new li(), vn = y`
4526
4546
  name
4527
4547
  }
4528
4548
  `, Ei = (r) => y`
4529
- ${Xt(r)}
4549
+ ${_t(r)}
4530
4550
  ${pa}
4531
4551
  ${Sn}
4532
4552
  ${wi}
@@ -4946,7 +4966,7 @@ const X = new li(), vn = y`
4946
4966
  }
4947
4967
  }
4948
4968
  `, bi = y`
4949
- ${Xt(!1)}
4969
+ ${_t(!1)}
4950
4970
  query GetWorkflowForTheme($id: String!) {
4951
4971
  workflow(id: $id) {
4952
4972
  id
@@ -5070,7 +5090,7 @@ const X = new li(), vn = y`
5070
5090
  }
5071
5091
  }
5072
5092
  }
5073
- `, xi = y`
5093
+ `, Fi = y`
5074
5094
  ${Pe}
5075
5095
  query ReadBundleForMarketplaceTheme($id: String!) {
5076
5096
  bundles(ids: [$id]) {
@@ -5079,7 +5099,7 @@ const X = new li(), vn = y`
5079
5099
  }
5080
5100
  }
5081
5101
  }
5082
- `, Fi = y`
5102
+ `, xi = y`
5083
5103
  mutation CreateOrder($orderItems: [OrderItemInput]!) {
5084
5104
  orderCreate(orderItems: $orderItems, paid: false, generateInternalId: true) {
5085
5105
  id
@@ -5269,9 +5289,9 @@ const Q = () => {
5269
5289
  width: u
5270
5290
  }) => {
5271
5291
  var B;
5272
- const h = e || 0, m = 2 * ((l == null ? void 0 : l.scale) || 1), g = A || { x: 0, y: 0, width: u, height: i }, f = `${g.x} ${g.y} ${g.width} ${g.height}`, p = Q(), C = a.purpose === Gt.FreeDesign && /* @__PURE__ */ F("defs", { children: /* @__PURE__ */ F("clipPath", { id: "viewboxClip", children: /* @__PURE__ */ F("rect", { width: g.width, height: g.height, rx: h }) }) }), w = (B = a.colorProfiles) == null ? void 0 : B.map((E, I) => (
5292
+ const h = e || 0, m = 2 * ((l == null ? void 0 : l.scale) || 1), g = A || { x: 0, y: 0, width: u, height: i }, f = `${g.x} ${g.y} ${g.width} ${g.height}`, p = Q(), C = a.purpose === Gt.FreeDesign && /* @__PURE__ */ x("defs", { children: /* @__PURE__ */ x("clipPath", { id: "viewboxClip", children: /* @__PURE__ */ x("rect", { width: g.width, height: g.height, rx: h }) }) }), w = (B = a.colorProfiles) == null ? void 0 : B.map((E, I) => (
5273
5293
  /* @ts-ignore */
5274
- /* @__PURE__ */ F("color-profile", { name: E.name, xlinkHref: E.key, children: " " }, I)
5294
+ /* @__PURE__ */ x("color-profile", { name: E.name, xlinkHref: E.key, children: " " }, I)
5275
5295
  )), v = n.map((E) => ({
5276
5296
  ...E,
5277
5297
  _renderingConfiguration: a,
@@ -5298,7 +5318,7 @@ const Q = () => {
5298
5318
  children: [
5299
5319
  w,
5300
5320
  C,
5301
- !!r && /* @__PURE__ */ F(
5321
+ !!r && /* @__PURE__ */ x(
5302
5322
  "rect",
5303
5323
  {
5304
5324
  id: "layout-background",
@@ -5308,7 +5328,7 @@ const Q = () => {
5308
5328
  rx: h
5309
5329
  }
5310
5330
  ),
5311
- /* @__PURE__ */ F(
5331
+ /* @__PURE__ */ x(
5312
5332
  "g",
5313
5333
  {
5314
5334
  id: "element-group",
@@ -5316,7 +5336,7 @@ const Q = () => {
5316
5336
  children: S.map((E) => Qn(E)).filter((E) => !!E)
5317
5337
  }
5318
5338
  ),
5319
- l && /* @__PURE__ */ F(
5339
+ l && /* @__PURE__ */ x(
5320
5340
  "rect",
5321
5341
  {
5322
5342
  x: l.x,
@@ -5330,7 +5350,7 @@ const Q = () => {
5330
5350
  }
5331
5351
  ),
5332
5352
  l && /* @__PURE__ */ lt("mask", { id: `viewmask-${p}`, children: [
5333
- /* @__PURE__ */ F(
5353
+ /* @__PURE__ */ x(
5334
5354
  "rect",
5335
5355
  {
5336
5356
  x: g.x,
@@ -5340,7 +5360,7 @@ const Q = () => {
5340
5360
  fill: "black"
5341
5361
  }
5342
5362
  ),
5343
- /* @__PURE__ */ F(
5363
+ /* @__PURE__ */ x(
5344
5364
  "rect",
5345
5365
  {
5346
5366
  x: l.x,
@@ -5420,21 +5440,21 @@ const Q = () => {
5420
5440
  y: o.y - r.height * e.y / 2
5421
5441
  };
5422
5442
  return {
5423
- a: re(n, l, a),
5424
- b: re(i, l, a),
5425
- c: re(s, l, a),
5426
- d: re(o, l, a),
5443
+ a: ne(n, l, a),
5444
+ b: ne(i, l, a),
5445
+ c: ne(s, l, a),
5446
+ d: ne(o, l, a),
5427
5447
  center: l
5428
5448
  };
5429
- }, re = (r, t, e) => {
5449
+ }, ne = (r, t, e) => {
5430
5450
  const a = Math.sin(e), n = Math.cos(e);
5431
5451
  return {
5432
5452
  x: (r.x - t.x) * n - (r.y - t.y) * a + t.x,
5433
5453
  y: (r.x - t.x) * a + (r.y - t.y) * n + t.y
5434
5454
  };
5435
- }, mc = 0.352778, gc = 0.035277, xn = (r) => {
5455
+ }, mc = 0.352778, gc = 0.035277, Fn = (r) => {
5436
5456
  const t = r.rotation || 0, e = gt(t), a = Math.cos(e), n = -Math.sin(e);
5437
- return /* @__PURE__ */ F("g", { mask: r.stepName || r.productOverlay ? void 0 : r.mask, children: /* @__PURE__ */ F(
5457
+ return /* @__PURE__ */ x("g", { mask: r.stepName || r.productOverlay ? void 0 : r.mask, children: /* @__PURE__ */ x(
5438
5458
  "g",
5439
5459
  {
5440
5460
  transform: `
@@ -5443,7 +5463,7 @@ const Q = () => {
5443
5463
  matrix(${a}, ${-n}, ${n}, ${a}, 0, 0)
5444
5464
  matrix(1, 0, 0, 1, ${-r.width / 2}, ${-r.height / 2})
5445
5465
  `,
5446
- children: /* @__PURE__ */ F(
5466
+ children: /* @__PURE__ */ x(
5447
5467
  "image",
5448
5468
  {
5449
5469
  xlinkHref: r.src,
@@ -5454,11 +5474,11 @@ const Q = () => {
5454
5474
  )
5455
5475
  }
5456
5476
  ) });
5457
- }, Fn = (r) => {
5477
+ }, xn = (r) => {
5458
5478
  var l;
5459
5479
  const t = `spiff-group-clip-${r.id}`, e = r.rotation || 0, a = gt(e), n = Math.cos(a), i = -Math.sin(a), s = ya(r.children);
5460
5480
  return /* @__PURE__ */ lt(Vt, { children: [
5461
- /* @__PURE__ */ F("defs", { children: (() => /* @__PURE__ */ F("clipPath", { id: t, preserveAspectRatio: "none", children: r.clipPath ? /* @__PURE__ */ F("path", { d: r.clipPath }) : /* @__PURE__ */ F("rect", { x: 0, y: 0, width: r.width, height: r.height }) }))() }),
5481
+ /* @__PURE__ */ x("defs", { children: (() => /* @__PURE__ */ x("clipPath", { id: t, preserveAspectRatio: "none", children: r.clipPath ? /* @__PURE__ */ x("path", { d: r.clipPath }) : /* @__PURE__ */ x("rect", { x: 0, y: 0, width: r.width, height: r.height }) }))() }),
5462
5482
  /* @__PURE__ */ lt(
5463
5483
  "g",
5464
5484
  {
@@ -5469,7 +5489,7 @@ const Q = () => {
5469
5489
  matrix(1, 0, 0, 1, ${-r.width / 2}, ${-r.height / 2})
5470
5490
  `,
5471
5491
  children: [
5472
- (l = r._renderingConfiguration) != null && l.debug ? /* @__PURE__ */ F(
5492
+ (l = r._renderingConfiguration) != null && l.debug ? /* @__PURE__ */ x(
5473
5493
  "rect",
5474
5494
  {
5475
5495
  stroke: "red",
@@ -5481,7 +5501,7 @@ const Q = () => {
5481
5501
  height: r.height
5482
5502
  }
5483
5503
  ) : void 0,
5484
- s.map((c) => Qn(c)).filter((c) => !!c).map((c) => /* @__PURE__ */ F("g", { clipPath: `url(#${t})`, children: c }))
5504
+ s.map((c) => Qn(c)).filter((c) => !!c).map((c) => /* @__PURE__ */ x("g", { clipPath: `url(#${t})`, children: c }))
5485
5505
  ]
5486
5506
  }
5487
5507
  )
@@ -5497,9 +5517,9 @@ const Q = () => {
5497
5517
  return r.pattern.src;
5498
5518
  };
5499
5519
  if (!a())
5500
- return /* @__PURE__ */ F(Vt, {});
5501
- const n = () => r.threshold ? r.invertThreshold ? "1 ".repeat(r.threshold) + "0 ".repeat(256 - r.threshold) : "0 ".repeat(r.threshold) + "1 ".repeat(256 - r.threshold) : "", i = () => /* @__PURE__ */ F(Vt, { children: r.useThreshold && /* @__PURE__ */ F("defs", { children: /* @__PURE__ */ lt("filter", { id: e, "color-interpolation-filters": "sRGB", children: [
5502
- /* @__PURE__ */ F(
5520
+ return /* @__PURE__ */ x(Vt, {});
5521
+ const n = () => r.threshold ? r.invertThreshold ? "1 ".repeat(r.threshold) + "0 ".repeat(256 - r.threshold) : "0 ".repeat(r.threshold) + "1 ".repeat(256 - r.threshold) : "", i = () => /* @__PURE__ */ x(Vt, { children: r.useThreshold && /* @__PURE__ */ x("defs", { children: /* @__PURE__ */ lt("filter", { id: e, "color-interpolation-filters": "sRGB", children: [
5522
+ /* @__PURE__ */ x(
5503
5523
  "feColorMatrix",
5504
5524
  {
5505
5525
  type: "matrix",
@@ -5513,14 +5533,14 @@ const Q = () => {
5513
5533
  }
5514
5534
  ),
5515
5535
  /* @__PURE__ */ lt("feComponentTransfer", { in: "greyscale", children: [
5516
- /* @__PURE__ */ F("feFuncR", { type: "discrete", tableValues: n() }),
5517
- /* @__PURE__ */ F("feFuncG", { type: "discrete", tableValues: n() }),
5518
- /* @__PURE__ */ F("feFuncB", { type: "discrete", tableValues: n() })
5536
+ /* @__PURE__ */ x("feFuncR", { type: "discrete", tableValues: n() }),
5537
+ /* @__PURE__ */ x("feFuncG", { type: "discrete", tableValues: n() }),
5538
+ /* @__PURE__ */ x("feFuncB", { type: "discrete", tableValues: n() })
5519
5539
  ] })
5520
5540
  ] }) }) }), s = r.rotation || 0, o = gt(s), l = Math.cos(o), c = -Math.sin(o), d = () => {
5521
- var w, v, S, B, E, I, P, x, M, N;
5541
+ var w, v, S, B, E, I, P, F, M, N;
5522
5542
  const A = ((w = r.pattern) == null ? void 0 : w.x) || 0, u = ((v = r.pattern) == null ? void 0 : v.y) || 0, h = ((S = r.pattern) == null ? void 0 : S.width) || 0, m = ((B = r.pattern) == null ? void 0 : B.height) || 0, g = ((E = r.pattern) == null ? void 0 : E.scaleX) || 1, f = ((I = r.pattern) == null ? void 0 : I.scaleY) || 1, p = ((P = r.pattern) == null ? void 0 : P.rotation) || 0;
5523
- return [(x = r.pattern) != null && x.svg ? {
5543
+ return [(F = r.pattern) != null && F.svg ? {
5524
5544
  id: `${t}-contents`,
5525
5545
  type: T.Illustration,
5526
5546
  x: A,
@@ -5544,13 +5564,13 @@ const Q = () => {
5544
5564
  };
5545
5565
  return /* @__PURE__ */ lt(Vt, { children: [
5546
5566
  i(),
5547
- /* @__PURE__ */ F(
5567
+ /* @__PURE__ */ x(
5548
5568
  "g",
5549
5569
  {
5550
5570
  opacity: r.opacity,
5551
5571
  mask: r.stepName ? void 0 : r.mask,
5552
5572
  filter: r.useThreshold ? `url(#${e})` : void 0,
5553
- children: /* @__PURE__ */ F(
5573
+ children: /* @__PURE__ */ x(
5554
5574
  "g",
5555
5575
  {
5556
5576
  transform: `
@@ -5560,8 +5580,8 @@ const Q = () => {
5560
5580
  matrix(1, 0, 0, 1, ${-r.width / 2}, ${-r.height / 2})
5561
5581
  matrix(${r.scaleX}, 0, 0, ${r.scaleY}, 0, 0)
5562
5582
  `,
5563
- children: /* @__PURE__ */ F(
5564
- Fn,
5583
+ children: /* @__PURE__ */ x(
5584
+ xn,
5565
5585
  {
5566
5586
  id: t,
5567
5587
  x: 0,
@@ -5640,7 +5660,7 @@ const Ui = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
5640
5660
  const a = An(r), n = Je(a);
5641
5661
  return aa(r, n), n;
5642
5662
  } else {
5643
- const a = await be(r, !0), n = Je(a);
5663
+ const a = await Be(r, !0), n = Je(a);
5644
5664
  return aa(r, n), await br(n, r), n;
5645
5665
  }
5646
5666
  }
@@ -5689,21 +5709,21 @@ const Ui = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
5689
5709
  parseInt(u.getAttribute("font-size") ?? "72")
5690
5710
  );
5691
5711
  E.fill = f, E.stroke = p, E.strokeWidth = parseFloat(C ?? "0");
5692
- const I = E.toSVG(2), x = t.parseFromString(I, "image/svg+xml").firstElementChild;
5693
- h.appendChild(x);
5712
+ const I = E.toSVG(2), F = t.parseFromString(I, "image/svg+xml").firstElementChild;
5713
+ h.appendChild(F);
5694
5714
  }
5695
5715
  return e.querySelectorAll("text").forEach((d) => d.remove()), Et().serializeToString(a);
5696
- }, pe = (r, t, e, a) => Math.max(Gi(r.join(`
5716
+ }, fe = (r, t, e, a) => Math.max(Gi(r.join(`
5697
5717
  `), e, a), t), Ra = (r, t, e, a, n, i) => {
5698
5718
  const s = (i || Ca) * n.getApproximateHeight(), o = t.split(`
5699
5719
  `);
5700
5720
  try {
5701
- const l = o.flatMap((d) => ce(d, r.width, a, n)), c = l.flatMap((d) => d.lines);
5721
+ const l = o.flatMap((d) => le(d, r.width, a, n)), c = l.flatMap((d) => d.lines);
5702
5722
  return {
5703
5723
  lines: c,
5704
5724
  requiredHeight: l.flatMap((d) => d.lines).length * (a * s),
5705
5725
  fontSize: e,
5706
- requiredWidth: pe(c, r.width, a, n)
5726
+ requiredWidth: fe(c, r.width, a, n)
5707
5727
  };
5708
5728
  } catch {
5709
5729
  const c = t.split("");
@@ -5711,17 +5731,17 @@ const Ui = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
5711
5731
  lines: c,
5712
5732
  requiredHeight: c.length * (a * s),
5713
5733
  fontSize: e,
5714
- requiredWidth: pe(c, r.width, a, n)
5734
+ requiredWidth: fe(c, r.width, a, n)
5715
5735
  };
5716
5736
  }
5717
- }, ce = (r, t, e, a) => {
5737
+ }, le = (r, t, e, a) => {
5718
5738
  const n = ht(r, e, a);
5719
5739
  if (n <= t)
5720
5740
  return { lines: [r], width: n };
5721
5741
  if (!(r.indexOf(" ") > -1)) {
5722
5742
  if (r.length <= 1)
5723
5743
  throw new Error(`Character ${r} is wider than region`);
5724
- const d = Math.floor(r.length / 2), A = ce(r.slice(0, d), t, e, a), u = ce(r.slice(d), t, e, a);
5744
+ const d = Math.floor(r.length / 2), A = le(r.slice(0, d), t, e, a), u = le(r.slice(d), t, e, a);
5725
5745
  return { lines: [...A.lines, ...u.lines], width: Math.max(A.width, u.width) };
5726
5746
  }
5727
5747
  const s = r.split(" "), o = [];
@@ -5729,7 +5749,7 @@ const Ui = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
5729
5749
  for (; c < s.length; ) {
5730
5750
  const d = s[c];
5731
5751
  if (ht(d, e, a) > t) {
5732
- const A = ce(d, t, e, a);
5752
+ const A = le(d, t, e, a);
5733
5753
  o.push(...A.lines), l = Math.max(l, A.width), c++;
5734
5754
  } else {
5735
5755
  const A = [d];
@@ -5760,14 +5780,14 @@ const Ui = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
5760
5780
  return {
5761
5781
  lines: o,
5762
5782
  requiredHeight: t.height,
5763
- requiredWidth: pe(o, t.width, s, n),
5783
+ requiredWidth: fe(o, t.width, s, n),
5764
5784
  fontSize: t.fontSize
5765
5785
  };
5766
5786
  const l = t.width !== e.width != (t.height !== e.height);
5767
5787
  return t.lineHeight === e.lineHeight && !l && e.input === r ? {
5768
5788
  lines: o,
5769
5789
  requiredHeight: t.height,
5770
- requiredWidth: pe(o, t.width, s, n),
5790
+ requiredWidth: fe(o, t.width, s, n),
5771
5791
  fontSize: $i(o, n, i, t.width, t.height, a)
5772
5792
  } : Ra(t, r, t.fontSize, s, n, a);
5773
5793
  }, zi = (r, t, e, a, n) => {
@@ -5802,12 +5822,12 @@ const Ui = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
5802
5822
  stripControlCharacters: !0,
5803
5823
  vertical: !1,
5804
5824
  uppercase: !1
5805
- }, Ce = (r, t = Oa) => {
5825
+ }, pe = (r, t = Oa) => {
5806
5826
  const e = { ...Oa, ...t };
5807
5827
  let a = r || "";
5808
5828
  return e.stripControlCharacters && (a = a.replace(/^(?![\u000A\u000D])[\u0000-\u001F\u007F-\u009F]/g, "")), e.uppercase && (a = a.toUpperCase()), e.vertical && (a = a.split("").join(`
5809
5829
  `)), a;
5810
- }, Wi = (r, t) => r.map((e, a) => [e, t[a]]), ji = (r = "center", t = !1) => t ? "center" : r, Tn = (r) => r === "left" ? "start" : r === "right" ? "end" : "middle", Zt = (r, t, e) => r.fontData ? {
5830
+ }, Wi = (r, t) => r.map((e, a) => [e, t[a]]), ji = (r = "center", t = !1) => t ? "center" : r, Tn = (r) => r === "left" ? "start" : r === "right" ? "end" : "middle", Xt = (r, t, e) => r.fontData ? {
5811
5831
  ...r,
5812
5832
  ...(() => {
5813
5833
  if (r.algorithm === kt.Traditional) {
@@ -5837,7 +5857,7 @@ const Ui = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
5837
5857
  };
5838
5858
  return /* @__PURE__ */ lt(Vt, { children: [
5839
5859
  /* @__PURE__ */ lt("defs", { children: [
5840
- r.textFillImage && /* @__PURE__ */ F(
5860
+ r.textFillImage && /* @__PURE__ */ x(
5841
5861
  "pattern",
5842
5862
  {
5843
5863
  id: s,
@@ -5846,7 +5866,7 @@ const Ui = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
5846
5866
  height: r.textFillImage.scale * r.textFillImage.height,
5847
5867
  x: 0,
5848
5868
  y: 0,
5849
- children: /* @__PURE__ */ F(
5869
+ children: /* @__PURE__ */ x(
5850
5870
  "image",
5851
5871
  {
5852
5872
  href: r.textFillImage.src,
@@ -5857,7 +5877,7 @@ const Ui = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
5857
5877
  )
5858
5878
  }
5859
5879
  ),
5860
- /* @__PURE__ */ F(
5880
+ /* @__PURE__ */ x(
5861
5881
  "style",
5862
5882
  {
5863
5883
  type: "text/css",
@@ -5871,10 +5891,10 @@ const Ui = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
5871
5891
  }
5872
5892
  }
5873
5893
  ),
5874
- r.curved && r.paths ? /* @__PURE__ */ F("path", { id: i, d: r.paths[0] }) : void 0
5894
+ r.curved && r.paths ? /* @__PURE__ */ x("path", { id: i, d: r.paths[0] }) : void 0
5875
5895
  ] }),
5876
- (f = r._renderingConfiguration) != null && f.debug ? /* @__PURE__ */ F("rect", { stroke: "blue", fill: "none", x: r.x, y: r.y, width: r.width, height: r.height }) : void 0,
5877
- /* @__PURE__ */ F("g", { mask: r.stepName ? void 0 : r.mask, children: /* @__PURE__ */ F("g", { transform: `matrix(${a}, ${-n}, ${n}, ${a}, ${o}, ${l})`, children: /* @__PURE__ */ F(
5896
+ (f = r._renderingConfiguration) != null && f.debug ? /* @__PURE__ */ x("rect", { stroke: "blue", fill: "none", x: r.x, y: r.y, width: r.width, height: r.height }) : void 0,
5897
+ /* @__PURE__ */ x("g", { mask: r.stepName ? void 0 : r.mask, children: /* @__PURE__ */ x("g", { transform: `matrix(${a}, ${-n}, ${n}, ${a}, ${o}, ${l})`, children: /* @__PURE__ */ x(
5878
5898
  "text",
5879
5899
  {
5880
5900
  xmlSpace: "preserve",
@@ -5889,7 +5909,7 @@ const Ui = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
5889
5909
  },
5890
5910
  stroke: d,
5891
5911
  strokeWidth: A,
5892
- children: r.curved ? /* @__PURE__ */ F(Yi, { text: r.text || "", curvedPathId: i, align: r.align }) : c.map((p, C) => /* @__PURE__ */ F(
5912
+ children: r.curved ? /* @__PURE__ */ x(Yi, { text: r.text || "", curvedPathId: i, align: r.align }) : c.map((p, C) => /* @__PURE__ */ x(
5893
5913
  qi,
5894
5914
  {
5895
5915
  align: r.vertical ? "center" : r.align,
@@ -5920,10 +5940,10 @@ const Ui = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
5920
5940
  const s = (r.amountLines - 1) / 2;
5921
5941
  return (r.thisLineIdx - s) * n + r.fontSize / 4;
5922
5942
  };
5923
- return /* @__PURE__ */ F("tspan", { textAnchor: Tn(r.align), x: e(), y: `${a()}px`, children: r.text });
5943
+ return /* @__PURE__ */ x("tspan", { textAnchor: Tn(r.align), x: e(), y: `${a()}px`, children: r.text });
5924
5944
  }, Yi = (r) => {
5925
5945
  const t = `#${r.curvedPathId}`;
5926
- return /* @__PURE__ */ F(
5946
+ return /* @__PURE__ */ x(
5927
5947
  "textPath",
5928
5948
  {
5929
5949
  startOffset: (() => r.align === "left" ? "0%" : r.align === "right" ? "100%" : "50%")(),
@@ -5936,8 +5956,8 @@ const Ui = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
5936
5956
  }, Ji = (r) => {
5937
5957
  var s, o;
5938
5958
  if (r.cachedObjectURL && !((s = r._renderingConfiguration) != null && s.omitCachedFields))
5939
- return /* @__PURE__ */ F(
5940
- xn,
5959
+ return /* @__PURE__ */ x(
5960
+ Fn,
5941
5961
  {
5942
5962
  id: r.id,
5943
5963
  src: r.cachedObjectURL,
@@ -5961,7 +5981,7 @@ const Ui = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
5961
5981
  throw new Error(
5962
5982
  `Illustration element ${r.id} (stepName ${r.stepName}) lacked svg from src ${r.src} at render time.`
5963
5983
  );
5964
- return /* @__PURE__ */ F("g", { mask: r.stepName ? void 0 : r.mask, children: /* @__PURE__ */ F(
5984
+ return /* @__PURE__ */ x("g", { mask: r.stepName ? void 0 : r.mask, children: /* @__PURE__ */ x(
5965
5985
  "g",
5966
5986
  {
5967
5987
  transform: i,
@@ -6069,9 +6089,9 @@ class Ki {
6069
6089
  return { ...t, transaction: e.apply(a) };
6070
6090
  }
6071
6091
  }
6072
- const Qn = (r) => r.type === T.Image ? /* @__PURE__ */ F(xn, { ...r }, r.id) : r.type === T.Frame ? /* @__PURE__ */ F(Ri, { ...r }, r.id) : r.type === T.Illustration ? /* @__PURE__ */ F(Ji, { ...r }, r.id) : r.type === T.Textbox ? /* @__PURE__ */ F(Hi, { ...r }, r.id) : r.type === T.Group ? /* @__PURE__ */ F(Fn, { ...r }, r.id) : null, wa = (r, t, e) => {
6092
+ const Qn = (r) => r.type === T.Image ? /* @__PURE__ */ x(Fn, { ...r }, r.id) : r.type === T.Frame ? /* @__PURE__ */ x(Ri, { ...r }, r.id) : r.type === T.Illustration ? /* @__PURE__ */ x(Ji, { ...r }, r.id) : r.type === T.Textbox ? /* @__PURE__ */ x(Hi, { ...r }, r.id) : r.type === T.Group ? /* @__PURE__ */ x(xn, { ...r }, r.id) : null, wa = (r, t, e) => {
6073
6093
  const a = e.renderingConfiguration, n = a != null && a.removeExcludedElements ? t.filter((i) => !i.excludeFromExport) : t;
6074
- return /* @__PURE__ */ F(
6094
+ return /* @__PURE__ */ x(
6075
6095
  Ni,
6076
6096
  {
6077
6097
  preserveAspectRatio: void 0,
@@ -6111,7 +6131,7 @@ function ya(r) {
6111
6131
  return i < s ? -1 : i > s ? 1 : 0;
6112
6132
  });
6113
6133
  }
6114
- const te = (r) => {
6134
+ const Zt = (r) => {
6115
6135
  const t = r.variants;
6116
6136
  if (t) {
6117
6137
  if (t.length === 1)
@@ -6136,13 +6156,13 @@ const te = (r) => {
6136
6156
  var a;
6137
6157
  if (!t)
6138
6158
  return;
6139
- const e = ((a = t.variants) == null ? void 0 : a.find((n) => n.id === r.frameVariantId)) || te(t);
6159
+ const e = ((a = t.variants) == null ? void 0 : a.find((n) => n.id === r.frameVariantId)) || Zt(t);
6140
6160
  if (!e)
6141
6161
  throw new Error(`No variant with ID: ${r.frameVariantId}`);
6142
6162
  if (!e.asset)
6143
6163
  throw new Error(`No asset for variant with ID: ${r.frameVariantId}`);
6144
6164
  return e;
6145
- }, xe = async (r) => {
6165
+ }, Fe = async (r) => {
6146
6166
  if (Le.has(r))
6147
6167
  return Le.get(r);
6148
6168
  const e = (async () => {
@@ -6204,8 +6224,7 @@ const te = (r) => {
6204
6224
  };
6205
6225
  return At.set(r, s), s;
6206
6226
  }
6207
- const t = ((e = r.split(".").pop()) == null ? void 0 : e.toLowerCase()) ?? "";
6208
- if (t === "svg") {
6227
+ if ((((e = r.split(".").pop()) == null ? void 0 : e.toLowerCase()) ?? "") === "svg") {
6209
6228
  const a = await va(r), n = a.width, i = a.height, s = {
6210
6229
  src: r,
6211
6230
  width: n,
@@ -6214,16 +6233,13 @@ const te = (r) => {
6214
6233
  };
6215
6234
  return At.set(r, s), s;
6216
6235
  } else {
6217
- const a = await be(r, !0), n = Kt(a), i = t === "jpg" || t === "jpeg";
6218
- if (!n.endsWith(t) && n === "image/jpeg" && !i)
6219
- throw Error(`File ${r} has wrong extension for mime type ${n}`);
6220
- const s = await Ie(a), o = {
6236
+ const a = await Be(r, !0), n = await Ie(a), i = {
6221
6237
  src: r,
6222
- width: s.width,
6223
- height: s.height,
6224
- aspect: s.width / s.height
6238
+ width: n.width,
6239
+ height: n.height,
6240
+ aspect: n.width / n.height
6225
6241
  };
6226
- return At.set(r, o), o;
6242
+ return At.set(r, i), i;
6227
6243
  }
6228
6244
  }, va = async (r) => {
6229
6245
  const t = await at(r);
@@ -6269,7 +6285,7 @@ const te = (r) => {
6269
6285
  anonymousCrossOrigin: !0,
6270
6286
  ignoreDimensions: !1,
6271
6287
  createCanvas: mt,
6272
- createImage: _t,
6288
+ createImage: Kt,
6273
6289
  DOMParser: ha(),
6274
6290
  fetch: ct
6275
6291
  }), u = s.getAttribute("width"), h = s.getAttribute("height"), m = 2048;
@@ -6303,7 +6319,7 @@ const te = (r) => {
6303
6319
  o.height = o.width / p, o.top += (h - o.height) / 2;
6304
6320
  }
6305
6321
  if (e && t === T.Image) {
6306
- const l = o.height, c = await be(e), d = await Ie(c), A = d.width / d.height;
6322
+ const l = o.height, c = await Be(e), d = await Ie(c), A = d.width / d.height;
6307
6323
  o.height = o.width / A, o.top += (l - o.height) / 2;
6308
6324
  }
6309
6325
  if (e && t === T.Textbox && (a != null && a.text) && (a != null && a.fontScale)) {
@@ -6315,7 +6331,7 @@ const te = (r) => {
6315
6331
  };
6316
6332
  class pc {
6317
6333
  static async getFrame(t, e) {
6318
- const a = await Nn(e.region, e.src), n = await xe(a), i = e.region || await Ut(t, T.Frame);
6334
+ const a = await Nn(e.region, e.src), n = await Fe(a), i = e.region || await Ut(t, T.Frame);
6319
6335
  return {
6320
6336
  id: Q(),
6321
6337
  x: i.left,
@@ -6362,13 +6378,13 @@ class pc {
6362
6378
  const { configuration: a, fontSrc: n, designInputStep: i } = e, s = await Tt(n), o = {
6363
6379
  assetUrl: n,
6364
6380
  name: s.names.fullName.en
6365
- }, l = (i == null ? void 0 : i.text) || a.defaultText || "", c = a.replaceableText ? a.replaceableText.replace("{{}}", l) : l, d = Ce(c, {
6381
+ }, l = (i == null ? void 0 : i.text) || a.defaultText || "", c = a.replaceableText ? a.replaceableText.replace("{{}}", l) : l, d = pe(c, {
6366
6382
  vertical: a.vertical,
6367
6383
  uppercase: a.uppercase
6368
6384
  }), A = e.region || await Ut(t, T.Textbox, n, {
6369
6385
  text: d,
6370
6386
  fontScale: a.size ? a.size / s.unitsPerEm : void 0
6371
- }), u = Zt(
6387
+ }), u = Xt(
6372
6388
  {
6373
6389
  id: Q(),
6374
6390
  type: T.Textbox,
@@ -6623,7 +6639,7 @@ class yc extends R {
6623
6639
  s.scaleX = s.scaleX * this.width / e.width, s.scaleY = s.scaleY * this.height / e.height;
6624
6640
  } else if (e.type === "textbox") {
6625
6641
  const s = a, o = (!s.algorithm || s.algorithm === kt.Autosize ? s.text : s.input) ?? "";
6626
- a = Zt(s, o, e);
6642
+ a = Xt(s, o, e);
6627
6643
  }
6628
6644
  const n = _(e.id, Object.values(t.layouts)), i = Z(a, n);
6629
6645
  return {
@@ -6801,7 +6817,7 @@ class Zi extends R {
6801
6817
  const a = {
6802
6818
  ...e,
6803
6819
  fontSize: this.size
6804
- }, n = _(e.id, Object.values(t.layouts)), i = (!e.algorithm || e.algorithm === kt.Autosize ? e.text : e.input) ?? "", s = Z(Zt(a, i), n);
6820
+ }, n = _(e.id, Object.values(t.layouts)), i = (!e.algorithm || e.algorithm === kt.Autosize ? e.text : e.input) ?? "", s = Z(Xt(a, i), n);
6805
6821
  return {
6806
6822
  ...t,
6807
6823
  layouts: {
@@ -6823,7 +6839,7 @@ class Va extends R {
6823
6839
  const a = {
6824
6840
  ...e,
6825
6841
  fontData: this.fontData
6826
- }, n = _(e.id, Object.values(t.layouts)), i = (!e.algorithm || e.algorithm === kt.Autosize ? e.text : e.input) ?? "", s = Z(Zt(a, i), n);
6842
+ }, n = _(e.id, Object.values(t.layouts)), i = (!e.algorithm || e.algorithm === kt.Autosize ? e.text : e.input) ?? "", s = Z(Xt(a, i), n);
6827
6843
  return {
6828
6844
  ...t,
6829
6845
  layouts: {
@@ -6947,7 +6963,7 @@ class ns extends R {
6947
6963
  const e = L(this.id, Object.values(t.layouts));
6948
6964
  if (!e.id)
6949
6965
  throw new $();
6950
- const a = _(e.id, Object.values(t.layouts)), n = Z(Zt(e, this.text, e), a);
6966
+ const a = _(e.id, Object.values(t.layouts)), n = Z(Xt(e, this.text, e), a);
6951
6967
  return {
6952
6968
  ...t,
6953
6969
  layouts: {
@@ -7160,7 +7176,7 @@ class za {
7160
7176
  if (this.configuration.type === D.ProductOverlay) {
7161
7177
  let u = "";
7162
7178
  if ((l = this.product) != null && l.overlayImageUrl && (u = this.product.overlayImageUrl), s = u, !u)
7163
- throw new fe(this.configuration, "Couldn't find an asset for product overlay step");
7179
+ throw new ge(this.configuration, "Couldn't find an asset for product overlay step");
7164
7180
  }
7165
7181
  const o = this.evaluateAssetType();
7166
7182
  if (o === T.Image) {
@@ -7231,7 +7247,7 @@ class za {
7231
7247
  }
7232
7248
  async trigger() {
7233
7249
  if (!this.configuration.data.regions)
7234
- throw new fe(this.configuration, "Missing regions.");
7250
+ throw new ge(this.configuration, "Missing regions.");
7235
7251
  if (this.configuration.type === D.SilentIllustration) {
7236
7252
  const t = this.configuration.data.regions.map(this.processRegion);
7237
7253
  return Promise.all(t);
@@ -7261,7 +7277,7 @@ const is = async (r) => {
7261
7277
  }
7262
7278
  })).json()).shortUrl;
7263
7279
  } catch (e) {
7264
- throw console.error(e), new Be("Failed to shorten URL, see console.");
7280
+ throw console.error(e), new Ee("Failed to shorten URL, see console.");
7265
7281
  }
7266
7282
  };
7267
7283
  class Ln {
@@ -7334,10 +7350,10 @@ class ss {
7334
7350
  l.searchParams.append("video", btoa(JSON.stringify([s]))), l.pathname = l.pathname + (l.pathname.slice(-1) === "/" ? "" : "/");
7335
7351
  const c = l.toString();
7336
7352
  if (c.length >= 2e3)
7337
- throw new Be("Cannot create QR code, URL too long.");
7353
+ throw new Ee("Cannot create QR code, URL too long.");
7338
7354
  const d = await is(c);
7339
7355
  if (!n.data || !n.data.regions)
7340
- throw new fe(n, "Missing regions.");
7356
+ throw new ge(n, "Missing regions.");
7341
7357
  const A = await this.regionElements(n), u = await this.command(d, A, a, n.stepName);
7342
7358
  return u && (u.command && a.getCommandDispatcher()(u.command), u.followup && await u.followup()), await a.setSelectionsAndElements(n.stepName, [], A, async () => {
7343
7359
  a.updateStorage(n.stepName, {
@@ -7380,7 +7396,7 @@ class ss {
7380
7396
  }
7381
7397
  }
7382
7398
  const $n = new ss();
7383
- class we {
7399
+ class Ce {
7384
7400
  constructor() {
7385
7401
  this.frameSourceSvg = async (t, e) => {
7386
7402
  if (!t)
@@ -7494,7 +7510,7 @@ class we {
7494
7510
  }
7495
7511
  selectImage(t, e, a, n = !0) {
7496
7512
  var l;
7497
- const i = we.patternSource(e), s = (l = a.getStepStorage(t.stepName)) == null ? void 0 : l.framePatternSrc;
7513
+ const i = Ce.patternSource(e), s = (l = a.getStepStorage(t.stepName)) == null ? void 0 : l.framePatternSrc;
7498
7514
  if (s && s === i)
7499
7515
  return Promise.resolve();
7500
7516
  a.setEditedStatus(t.stepName, !0);
@@ -7515,7 +7531,7 @@ class we {
7515
7531
  });
7516
7532
  },
7517
7533
  () => {
7518
- throw new Be("Failed to resolve transcoded PDF");
7534
+ throw new Ee("Failed to resolve transcoded PDF");
7519
7535
  }
7520
7536
  )
7521
7537
  );
@@ -7577,7 +7593,7 @@ class we {
7577
7593
  };
7578
7594
  At.set(t, A), e.setPatternData(A, a);
7579
7595
  } else {
7580
- const s = await be(t, !0), o = await Ie(s), l = {
7596
+ const s = await Be(t, !0), o = await Ie(s), l = {
7581
7597
  src: t,
7582
7598
  width: o.width,
7583
7599
  height: o.height,
@@ -7671,7 +7687,7 @@ class we {
7671
7687
  i && i(!0);
7672
7688
  const c = t.data.initialZoomLevel, d = await Promise.all(
7673
7689
  t.data.regions.map(async (m, g) => {
7674
- const f = await xe(l[g]), p = o.getImageData(), C = a.map((I) => new vt(I.id)), w = p ? Sa(
7690
+ const f = await Fe(l[g]), p = o.getImageData(), C = a.map((I) => new vt(I.id)), w = p ? Sa(
7675
7691
  p,
7676
7692
  f,
7677
7693
  c && !t.data.forceImageCover ? { scale: c } : void 0,
@@ -7739,7 +7755,7 @@ class we {
7739
7755
  }
7740
7756
  async loadPatternFromAsset(t, e, a, n) {
7741
7757
  var c, d;
7742
- const i = we.patternSource(t), s = a.markUpdatePending(), o = (c = a.getWorkflowExperience().getStepById(e.stepName)) == null ? void 0 : c.frameService;
7758
+ const i = Ce.patternSource(t), s = a.markUpdatePending(), o = (c = a.getWorkflowExperience().getStepById(e.stepName)) == null ? void 0 : c.frameService;
7743
7759
  if (!o)
7744
7760
  throw a.markUpdateCompleted(s), new Error("Frame service unavailable, cannot load pattern!");
7745
7761
  try {
@@ -7766,7 +7782,7 @@ class we {
7766
7782
  ), this.validateColorCount(e, a);
7767
7783
  }
7768
7784
  }
7769
- const pt = new we();
7785
+ const pt = new Ce();
7770
7786
  class os {
7771
7787
  async getIllustrationBody(t) {
7772
7788
  return new Promise((e) => {
@@ -7931,7 +7947,7 @@ class os {
7931
7947
  async selectVariantCommand(t, e, a, n, i) {
7932
7948
  var p;
7933
7949
  if (!t.data || !t.data.regions)
7934
- throw new fe(t, "Missing regions.");
7950
+ throw new ge(t, "Missing regions.");
7935
7951
  n(!0);
7936
7952
  const s = a.map((C) => new vt(C.id));
7937
7953
  t.mandatory && i.setMandatoryFulfilled(t.stepName, !1);
@@ -7980,7 +7996,7 @@ class os {
7980
7996
  const S = {};
7981
7997
  (((v = o.assetConfiguration) == null ? void 0 : v.channelNumbers) || []).forEach((E) => {
7982
7998
  var P;
7983
- const I = C.find((x) => x.channelNumber === E.number);
7999
+ const I = C.find((F) => F.channelNumber === E.number);
7984
8000
  I && (S[`${E.id.replace(/\W/g, "")}`] = { browserValue: ((P = I == null ? void 0 : I.variant) == null ? void 0 : P.color) || "" });
7985
8001
  }), await this.changeColors(
7986
8002
  t,
@@ -7996,7 +8012,7 @@ class os {
7996
8012
  const I = S[0], P = B[0];
7997
8013
  await this.changeColors(
7998
8014
  t,
7999
- u.map((x) => x.regionElement),
8015
+ u.map((F) => F.regionElement),
8000
8016
  i,
8001
8017
  () => i.getCommandContext().getAllLayouts(),
8002
8018
  /* @__PURE__ */ new Map([[P, I.variant.color]])
@@ -8014,12 +8030,12 @@ class os {
8014
8030
  };
8015
8031
  }
8016
8032
  }
8017
- const de = new os();
8033
+ const ce = new os();
8018
8034
  class ls {
8019
8035
  async init(t, e, a) {
8020
8036
  const n = t.option;
8021
8037
  if (!n)
8022
- throw new ge(t);
8038
+ throw new me(t);
8023
8039
  if (a)
8024
8040
  await this.reload(t, e, a);
8025
8041
  else {
@@ -8037,7 +8053,7 @@ class ls {
8037
8053
  a.serializableWorkflow.steps
8038
8054
  ), o = Object.values(a.layouts).map((d) => d.elements).flat().filter((d) => d.stepName === t.stepName), l = t.option;
8039
8055
  if (!l)
8040
- throw new ge(t);
8056
+ throw new me(t);
8041
8057
  if (n != null && n.selectedVariants) {
8042
8058
  const d = n.selectedVariants[0].id;
8043
8059
  if (d) {
@@ -8097,7 +8113,7 @@ class cs {
8097
8113
  async init(t, e, a) {
8098
8114
  const n = t.option;
8099
8115
  if (!n)
8100
- throw new ge(t);
8116
+ throw new me(t);
8101
8117
  if (a)
8102
8118
  await this.reload(t, e, a);
8103
8119
  else {
@@ -8469,7 +8485,7 @@ class hs {
8469
8485
  async init(t, e, a) {
8470
8486
  const n = t.option;
8471
8487
  if (!n)
8472
- throw new ge(t);
8488
+ throw new me(t);
8473
8489
  if (a)
8474
8490
  await this.reload(t, e, a);
8475
8491
  else {
@@ -8668,7 +8684,7 @@ const gs = new ms(), Ge = (r, t, e, a, n) => {
8668
8684
  m || (c = !1);
8669
8685
  }
8670
8686
  return [null, null];
8671
- }, Ae = (r, t, e, a, n) => {
8687
+ }, de = (r, t, e, a, n) => {
8672
8688
  let i, s;
8673
8689
  const o = St(t.assetUrl), l = o.getFont();
8674
8690
  if (n.size) {
@@ -8686,16 +8702,16 @@ const gs = new ms(), Ge = (r, t, e, a, n) => {
8686
8702
  const A = d / l.unitsPerEm;
8687
8703
  return [i, s] = Ge(e, a, d, A, o), [d, i, s];
8688
8704
  }, We = 30;
8689
- class ye extends Error {
8705
+ class we extends Error {
8690
8706
  constructor(t) {
8691
- super(t), Object.setPrototypeOf(this, new.target.prototype), this.name = ye.name;
8707
+ super(t), Object.setPrototypeOf(this, new.target.prototype), this.name = we.name;
8692
8708
  }
8693
8709
  }
8694
8710
  const fs = ["‘", "’", "“", "”", `
8695
8711
  `];
8696
- class Se extends Error {
8712
+ class ye extends Error {
8697
8713
  constructor(t) {
8698
- super(t), Object.setPrototypeOf(this, new.target.prototype), this.name = Se.name;
8714
+ super(t), Object.setPrototypeOf(this, new.target.prototype), this.name = ye.name;
8699
8715
  }
8700
8716
  }
8701
8717
  class ps {
@@ -8909,7 +8925,7 @@ class ps {
8909
8925
  }
8910
8926
  getProcessedInput(t, e, a) {
8911
8927
  const n = a ? t : this.injectReplaceableText(t, e);
8912
- return Ce(n, {
8928
+ return pe(n, {
8913
8929
  vertical: e.vertical,
8914
8930
  uppercase: e.uppercase
8915
8931
  });
@@ -8927,7 +8943,7 @@ class ps {
8927
8943
  for (const A of e) {
8928
8944
  if (!A.fontData)
8929
8945
  throw new z("Failed to resolve font data for text.");
8930
- const [u, h] = Ae(
8946
+ const [u, h] = de(
8931
8947
  A.fontSize,
8932
8948
  A.fontData,
8933
8949
  { left: A.x, top: A.y, width: A.width, height: A.height, rotation: A.rotation, panelId: "" },
@@ -9122,7 +9138,7 @@ class ps {
9122
9138
  const h = s.getLayouts().find((f) => f.panelId === A.panelId), m = Q();
9123
9139
  try {
9124
9140
  if (!h)
9125
- throw new Se("Failed to find layout for region: " + A.panelId);
9141
+ throw new ye("Failed to find layout for region: " + A.panelId);
9126
9142
  const f = a.colorOption;
9127
9143
  let p;
9128
9144
  if (f && f.variants) {
@@ -9161,7 +9177,7 @@ class ps {
9161
9177
  }, S = [], B = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map();
9162
9178
  if (!v.fontData)
9163
9179
  throw new z("Failed to resolve font data for text.");
9164
- const [I, P] = Ae(
9180
+ const [I, P] = de(
9165
9181
  v.fontSize,
9166
9182
  v.fontData,
9167
9183
  {
@@ -9176,10 +9192,10 @@ class ps {
9176
9192
  { size: a.size, minSize: a.minSize, maxSize: a.maxSize }
9177
9193
  );
9178
9194
  B.set(v.id, I), E.set(v.id, P);
9179
- const x = a.curved || a.vertical ? l : (P || []).join(`
9195
+ const F = a.curved || a.vertical ? l : (P || []).join(`
9180
9196
  `);
9181
9197
  S.push(
9182
- this.generateTextChangeCommandsForRegion(I, a, v.id, x)
9198
+ this.generateTextChangeCommandsForRegion(I, a, v.id, F)
9183
9199
  );
9184
9200
  const M = new W(v, h);
9185
9201
  return {
@@ -9189,10 +9205,10 @@ class ps {
9189
9205
  fontData: n
9190
9206
  };
9191
9207
  } catch (f) {
9192
- throw console.log(f), new ye("Error adding font to region");
9208
+ throw console.log(f), new we("Error adding font to region");
9193
9209
  }
9194
9210
  }, d = await Promise.all(a.regions.map(c)).catch((A) => {
9195
- throw A instanceof ye ? (gs.setLatestToast("Failed to load font.", Me.Error), A) : A instanceof Se ? A : new Error(A);
9211
+ throw A instanceof we ? (gs.setLatestToast("Failed to load font.", Me.Error), A) : A instanceof ye ? A : new Error(A);
9196
9212
  });
9197
9213
  return await s.setSelectionsAndElements(
9198
9214
  t,
@@ -9222,7 +9238,7 @@ class ps {
9222
9238
  const A = (n || "").replace(/^(?![\u000A\u000D])[\u0000-\u001F\u007F-\u009F]/g, ""), u = this.getProcessedInput(A, t.data, o), h = s.getRegionElements(t.stepName), m = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map();
9223
9239
  for (const v of h)
9224
9240
  if (v.region) {
9225
- const [S, B] = Ae(
9241
+ const [S, B] = de(
9226
9242
  e,
9227
9243
  a,
9228
9244
  v.region,
@@ -9276,13 +9292,13 @@ const ws = "data:application/octet-stream;base64,AAEAAAAPAIAAAwBwRkZUTYdHeHoAAEl
9276
9292
  const e = tt("rect");
9277
9293
  return e.setAttribute("height", `${r}`), e.setAttribute("width", `${t}`), e;
9278
9294
  }, Ss = (r, t, e, a) => {
9279
- const n = ee("filter");
9295
+ const n = te("filter");
9280
9296
  n.setAttribute("id", a), n.setAttribute("height", "200%"), n.setAttribute("width", "200%"), n.setAttribute("x", "-50%"), n.setAttribute("y", "-50%");
9281
- const i = ee("feOffset");
9297
+ const i = te("feOffset");
9282
9298
  n.appendChild(i), i.setAttribute("result", "offOut"), i.setAttribute("in", "SourceAlpha"), i.setAttribute("dx", `${r}`), i.setAttribute("dy", `${t}`);
9283
- const s = ee("feGaussianBlur");
9299
+ const s = te("feGaussianBlur");
9284
9300
  n.appendChild(s), s.setAttribute("result", "blurOut"), s.setAttribute("in", "offOut"), s.setAttribute("stdDeviation", `${e}`);
9285
- const o = ee("feBlend");
9301
+ const o = te("feBlend");
9286
9302
  return n.appendChild(o), o.setAttribute("in", "SourceGraphic"), o.setAttribute("in2", "blurOut"), o.setAttribute("mode", "normal"), n;
9287
9303
  }, vs = (r) => {
9288
9304
  let t = r;
@@ -9461,7 +9477,7 @@ async function Hn(r) {
9461
9477
  return new Is();
9462
9478
  throw new z(`Failed to resolve Module, Module ${r} not found`);
9463
9479
  }
9464
- const Fe = y`
9480
+ const xe = y`
9465
9481
  fragment GlobalPropertyStateAspectFields on GlobalPropertyStateAspect {
9466
9482
  name
9467
9483
  value
@@ -9484,7 +9500,7 @@ const Fe = y`
9484
9500
  }
9485
9501
  }
9486
9502
  `, Ds = y`
9487
- ${Fe}
9503
+ ${xe}
9488
9504
  mutation CreateGlobalPropertyState($bundleId: String!) {
9489
9505
  globalPropertyStateCreate(bundleId: $bundleId) {
9490
9506
  id
@@ -9494,7 +9510,7 @@ const Fe = y`
9494
9510
  }
9495
9511
  }
9496
9512
  `, Ps = y`
9497
- ${Fe}
9513
+ ${xe}
9498
9514
  mutation UpdateGlobalPropertyState($id: String!, $aspects: [GlobalPropertyStateAspectInput]!) {
9499
9515
  globalPropertyStateUpdate(id: $id, aspects: $aspects) {
9500
9516
  id
@@ -9505,7 +9521,7 @@ const Fe = y`
9505
9521
  }
9506
9522
  `;
9507
9523
  y`
9508
- ${Fe}
9524
+ ${xe}
9509
9525
  query GetGlobalPropertyState($bundleId: String!) {
9510
9526
  globalPropertyState(bundleId: $bundleId) {
9511
9527
  id
@@ -9515,7 +9531,7 @@ y`
9515
9531
  }
9516
9532
  }
9517
9533
  `;
9518
- const xs = y`
9534
+ const Fs = y`
9519
9535
  ${De}
9520
9536
  fragment ProductFields on Product {
9521
9537
  id
@@ -9561,7 +9577,7 @@ const xs = y`
9561
9577
  }
9562
9578
  }
9563
9579
  `, Ea = y`
9564
- ${xs}
9580
+ ${Fs}
9565
9581
  fragment ProductCollectionProductFields on ProductCollectionProduct {
9566
9582
  id
9567
9583
  productId
@@ -9628,8 +9644,8 @@ const xs = y`
9628
9644
  }
9629
9645
  }
9630
9646
  }
9631
- `, Fs = (r) => y`
9632
- ${Fe}
9647
+ `, xs = (r) => y`
9648
+ ${xe}
9633
9649
  ${ke(r)}
9634
9650
  query GetBundle($id: String!) {
9635
9651
  globalPropertyState(bundleId: $id) {
@@ -10569,7 +10585,7 @@ class eo {
10569
10585
  break;
10570
10586
  case D.Illustration:
10571
10587
  a.push(
10572
- de.init(l, this, this.reloadedState)
10588
+ ce.init(l, this, this.reloadedState)
10573
10589
  );
10574
10590
  break;
10575
10591
  case D.Material:
@@ -10891,7 +10907,7 @@ class ao extends rt {
10891
10907
  */
10892
10908
  async selectVariant(t) {
10893
10909
  if (!this.getUpdateState() && this.getCurrentVariant() !== t)
10894
- return de.selectVariant(
10910
+ return ce.selectVariant(
10895
10911
  this.step,
10896
10912
  t.getResource(),
10897
10913
  this.manager.getRegionElements(this.step.stepName) || [],
@@ -10937,7 +10953,7 @@ class ao extends rt {
10937
10953
  const d = c.id.replace(/\W/g, "");
10938
10954
  a ? n.set(d, { browserValue: e, pmsValue: a }) : n.set(d, e);
10939
10955
  }
10940
- }) : a ? n.set(t, { browserValue: e, pmsValue: a }) : n.set(t, e), de.changeColors(
10956
+ }) : a ? n.set(t, { browserValue: e, pmsValue: a }) : n.set(t, e), ce.changeColors(
10941
10957
  this.step,
10942
10958
  this.manager.getRegionElements(this.step.stepName),
10943
10959
  this.manager,
@@ -10949,7 +10965,7 @@ class ao extends rt {
10949
10965
  return this.step.data.colorOption;
10950
10966
  }
10951
10967
  getAvailableColors() {
10952
- return this.step.data.colorPickerEnabled ? de.availableColors(this.step, this.manager) : Promise.resolve([]);
10968
+ return this.step.data.colorPickerEnabled ? ce.availableColors(this.step, this.manager) : Promise.resolve([]);
10953
10969
  }
10954
10970
  isColorPickerEnabled() {
10955
10971
  return this.step.data.colorPickerEnabled ?? !1;
@@ -11363,7 +11379,7 @@ class uo extends rt {
11363
11379
  });
11364
11380
  }
11365
11381
  }
11366
- class ie {
11382
+ class re {
11367
11383
  static get(t, e) {
11368
11384
  switch (e.type) {
11369
11385
  case D.DigitalContent:
@@ -11465,14 +11481,14 @@ const Yn = y`
11465
11481
  }
11466
11482
  }
11467
11483
  `;
11468
- function ve(r) {
11484
+ function Se(r) {
11469
11485
  const t = JSON.parse(atob(r.split(".")[1])).exp;
11470
11486
  return Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3) >= t;
11471
11487
  }
11472
11488
  const go = async (r) => {
11473
11489
  var s, o;
11474
11490
  const e = ((s = Object.entries(localStorage).find(([l, c]) => l.startsWith("CognitoIdentityServiceProvider") && l.endsWith("idToken"))) == null ? void 0 : s[0]) || "", a = localStorage.getItem(e), n = {};
11475
- return a && !ve(a) && (n.Authorization = `Bearer ${a}`), (o = (await b.getShadowGraphqlClient().mutate({
11491
+ return a && !Se(a) && (n.Authorization = `Bearer ${a}`), (o = (await b.getShadowGraphqlClient().mutate({
11476
11492
  mutation: ho,
11477
11493
  errorPolicy: "all",
11478
11494
  fetchPolicy: "no-cache",
@@ -11493,7 +11509,7 @@ const go = async (r) => {
11493
11509
  }, fo = async (r) => {
11494
11510
  var s, o;
11495
11511
  const e = ((s = Object.entries(localStorage).find(([l, c]) => l.startsWith("CognitoIdentityServiceProvider") && l.endsWith("idToken"))) == null ? void 0 : s[0]) || "", a = localStorage.getItem(e), n = {};
11496
- return a && !ve(a) && (n.Authorization = `Bearer ${a}`), (o = (await b.getShadowGraphqlClient().mutate({
11512
+ return a && !Se(a) && (n.Authorization = `Bearer ${a}`), (o = (await b.getShadowGraphqlClient().mutate({
11497
11513
  mutation: mo,
11498
11514
  errorPolicy: "all",
11499
11515
  fetchPolicy: "no-cache",
@@ -11600,13 +11616,13 @@ const go = async (r) => {
11600
11616
  if (c !== void 0)
11601
11617
  return c;
11602
11618
  await r.outstandingRequestsPromise();
11603
- const x = (k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(n.id), N = await b.getShadowGraphqlClient().query({
11619
+ const F = (k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(n.id), N = await b.getShadowGraphqlClient().query({
11604
11620
  query: bn,
11605
11621
  variables: { ids: [n.id] },
11606
11622
  fetchPolicy: "no-cache",
11607
11623
  errorPolicy: "all",
11608
11624
  context: {
11609
- transactionOwnerId: x
11625
+ transactionOwnerId: F
11610
11626
  }
11611
11627
  }), V = (j = N.data) == null ? void 0 : j.transactions[0].workflowState;
11612
11628
  return N.errors ? (N.errors.forEach((G) => {
@@ -11614,7 +11630,7 @@ const go = async (r) => {
11614
11630
  }), null) : V ?? null;
11615
11631
  })() || (console.warn("State mismatch detected. Uploading known state explicitly"), console.warn("State Object:", JSON.stringify(a())), await r.updateStateWithServerImmediate(a), console.log("Server state is undefined @ Workflow completion"));
11616
11632
  const u = r.getPreviewService(), h = (I = t == null ? void 0 : t.finalizeStepConfig) == null ? void 0 : I.lookAtAnimation, m = u && t.showModelOnFinishStep && !!h, g = l && oa(l, t, !0), f = l && oa(l, t, !1), p = async (P) => {
11617
- const x = {};
11633
+ const F = {};
11618
11634
  let M = 0;
11619
11635
  if (Object.keys(i).length > 0)
11620
11636
  for (const N of Object.keys(i)) {
@@ -11623,11 +11639,11 @@ const go = async (r) => {
11623
11639
  const nt = V.selections[G];
11624
11640
  if (j && (!P || j.option && (j.option.variants || []).length > 1 && !j.data.hideSelectionInCart && !j.data.hideSelectionsInCart)) {
11625
11641
  const Te = j.stepTitle;
11626
- x[Te] ? x[Te].push({
11642
+ F[Te] ? F[Te].push({
11627
11643
  id: nt.id || "",
11628
11644
  name: nt.name,
11629
11645
  priceModifier: nt.priceModifier
11630
- }) : x[Te] = [
11646
+ }) : F[Te] = [
11631
11647
  {
11632
11648
  id: nt.id || "",
11633
11649
  name: nt.name,
@@ -11638,13 +11654,13 @@ const go = async (r) => {
11638
11654
  M += nt.priceModifier;
11639
11655
  }
11640
11656
  }
11641
- return [x, M];
11657
+ return [F, M];
11642
11658
  }, [C] = await p(!0), w = Object.fromEntries(
11643
- Object.keys(C).map((P) => [P, C[P].map((x) => x.id)])
11659
+ Object.keys(C).map((P) => [P, C[P].map((F) => F.id)])
11644
11660
  ), [v] = await p(!1), S = Object.fromEntries(
11645
11661
  Object.keys(v).map((P) => [
11646
11662
  P,
11647
- v[P].map((x) => x.id)
11663
+ v[P].map((F) => F.id)
11648
11664
  ])
11649
11665
  );
11650
11666
  let B = await o(m, n.id);
@@ -11652,7 +11668,7 @@ const go = async (r) => {
11652
11668
  const P = await (await ct(B)).blob();
11653
11669
  B = (await U.uploadAsset(
11654
11670
  { name: `${n.id}-preview-image.png`, blob: P },
11655
- he.Image,
11671
+ ue.Image,
11656
11672
  !0,
11657
11673
  !1
11658
11674
  )).fileLink;
@@ -11661,9 +11677,9 @@ const go = async (r) => {
11661
11677
  designDetails: (() => {
11662
11678
  const P = {
11663
11679
  name: s,
11664
- layouts: e.map((x) => ({
11665
- index: x.index,
11666
- panelId: x.panelId
11680
+ layouts: e.map((F) => ({
11681
+ index: F.index,
11682
+ panelId: F.panelId
11667
11683
  })),
11668
11684
  workflowId: t.id,
11669
11685
  transactionId: n.id,
@@ -11671,16 +11687,16 @@ const go = async (r) => {
11671
11687
  previewImage: B
11672
11688
  };
11673
11689
  if (f) {
11674
- const x = [];
11690
+ const F = [];
11675
11691
  for (const [M, N] of Object.entries(f))
11676
- x.push({ key: M, value: N });
11677
- P.metadata = x;
11692
+ F.push({ key: M, value: N });
11693
+ P.metadata = F;
11678
11694
  }
11679
11695
  if (w) {
11680
- const x = [];
11696
+ const F = [];
11681
11697
  for (const [M, N] of Object.entries(S))
11682
- x.push({ key: M, ids: N });
11683
- P.selectedVariants = x;
11698
+ F.push({ key: M, ids: N });
11699
+ P.selectedVariants = F;
11684
11700
  }
11685
11701
  return P;
11686
11702
  })(),
@@ -12018,7 +12034,7 @@ class bo {
12018
12034
  height: d.layoutState.layout.height
12019
12035
  }, u = this.commandContext.getLayoutById(d.layoutState.layout.id), h = s.getContext("2d");
12020
12036
  if (!h)
12021
- throw new Be("Failed to obtain 2D context for preview image creation");
12037
+ throw new Ee("Failed to obtain 2D context for preview image creation");
12022
12038
  const m = wa(u.layoutState.layout, u.layoutState.elements, {
12023
12039
  renderingConfiguration: {
12024
12040
  purpose: Gt.Print,
@@ -12029,7 +12045,7 @@ class bo {
12029
12045
  anonymousCrossOrigin: !0,
12030
12046
  ignoreDimensions: !1,
12031
12047
  createCanvas: mt,
12032
- createImage: _t,
12048
+ createImage: Kt,
12033
12049
  DOMParser: ha(),
12034
12050
  fetch
12035
12051
  })).render();
@@ -12043,7 +12059,7 @@ class bo {
12043
12059
  const a = this.cachedStepHandles.get(e.stepName);
12044
12060
  if (a)
12045
12061
  return a;
12046
- const n = ie.get(this.getWorkflowManager(), e);
12062
+ const n = re.get(this.getWorkflowManager(), e);
12047
12063
  return this.cachedStepHandles.set(e.stepName, n), n;
12048
12064
  }
12049
12065
  getSteps() {
@@ -12147,10 +12163,10 @@ class bo {
12147
12163
  getStepByName(t) {
12148
12164
  const e = this.getWorkflowManager().getWorkflow().steps.find((a) => a.stepTitle === t);
12149
12165
  if (!(!e || !this.stepHasHandle(e)))
12150
- return ie.get(this.getWorkflowManager(), e);
12166
+ return re.get(this.getWorkflowManager(), e);
12151
12167
  }
12152
12168
  getStepsByType(t) {
12153
- return this.getWorkflowManager().getWorkflow().steps.filter((e) => e.type === t).map((e) => ie.get(this.getWorkflowManager(), e));
12169
+ return this.getWorkflowManager().getWorkflow().steps.filter((e) => e.type === t).map((e) => re.get(this.getWorkflowManager(), e));
12154
12170
  }
12155
12171
  getStepsByScene(t) {
12156
12172
  if (!this.getWorkflowManager().getWorkflow().stepGroups.find((a) => a.name === t.name))
@@ -12159,7 +12175,7 @@ class bo {
12159
12175
  );
12160
12176
  return t.stepIds.map(
12161
12177
  (a) => this.getWorkflowManager().getWorkflow().steps.find((n) => n.stepName === a)
12162
- ).filter((a) => this.stepHasHandle(a)).map((a) => ie.get(this.getWorkflowManager(), a));
12178
+ ).filter((a) => this.stepHasHandle(a)).map((a) => re.get(this.getWorkflowManager(), a));
12163
12179
  }
12164
12180
  async attachCustomerDetails(t) {
12165
12181
  return this.assignCustomerDetails({ emailAddress: t.email });
@@ -12370,7 +12386,7 @@ const Io = [
12370
12386
  o && (t[a.stepName] = { selectedVariants: [o] });
12371
12387
  const l = async (c) => {
12372
12388
  var g;
12373
- const d = await Nn(c, (g = o == null ? void 0 : o.asset) == null ? void 0 : g.fileLink), A = await xe(d), u = Q(), h = r.find((f) => f.panelId === c.panelId);
12389
+ const d = await Nn(c, (g = o == null ? void 0 : o.asset) == null ? void 0 : g.fileLink), A = await Fe(d), u = Q(), h = r.find((f) => f.panelId === c.panelId);
12374
12390
  if (!h)
12375
12391
  throw new Y(c);
12376
12392
  const m = Sa(
@@ -12421,12 +12437,12 @@ const Io = [
12421
12437
  } catch (o) {
12422
12438
  return console.error(o), [];
12423
12439
  }
12424
- }, xo = async (r, t, e, a) => {
12440
+ }, Fo = async (r, t, e, a) => {
12425
12441
  var S, B;
12426
12442
  const n = e.data, i = a.option;
12427
12443
  if (!i)
12428
12444
  return console.error(`No option for step ${a.stepName}.`), [];
12429
- const s = ((S = i.variants) == null ? void 0 : S.find((E) => E.id === n.illustrationVariantId)) || te(i);
12445
+ const s = ((S = i.variants) == null ? void 0 : S.find((E) => E.id === n.illustrationVariantId)) || Zt(i);
12430
12446
  if (!s)
12431
12447
  return console.error(`No variant with ID: ${n.illustrationVariantId}`), [];
12432
12448
  if (!s.asset)
@@ -12440,17 +12456,17 @@ const Io = [
12440
12456
  return console.error("Failed to read SVG."), [];
12441
12457
  ma(m);
12442
12458
  const g = {};
12443
- Ft(m, (E) => {
12459
+ xt(m, (E) => {
12444
12460
  Io.includes(E.tagName) && !E.attributes.getNamedItem("fill") && E.setAttribute("fill", "#000000");
12445
12461
  const I = E.attributes.getNamedItem("fill");
12446
12462
  if (I && I.value !== "none") {
12447
- const x = I.value, N = `spiff-fill-${x.replace(/\W/g, "")}`;
12448
- E.classList.add(N), g[N] = { browserValue: x };
12463
+ const F = I.value, N = `spiff-fill-${F.replace(/\W/g, "")}`;
12464
+ E.classList.add(N), g[N] = { browserValue: F };
12449
12465
  }
12450
12466
  const P = E.attributes.getNamedItem("stroke");
12451
12467
  if (P && P.value !== "none") {
12452
- const x = P.value, N = `spiff-stroke-${x.replace(/\W/g, "")}`;
12453
- E.classList.add(N), g[N] = { browserValue: x };
12468
+ const F = P.value, N = `spiff-stroke-${F.replace(/\W/g, "")}`;
12469
+ E.classList.add(N), g[N] = { browserValue: F };
12454
12470
  }
12455
12471
  });
12456
12472
  const p = Et().serializeToString(m), C = n.colors;
@@ -12463,7 +12479,7 @@ const Io = [
12463
12479
  }
12464
12480
  }
12465
12481
  const w = (E) => {
12466
- const I = r.find((x) => x.panelId === E.panelId);
12482
+ const I = r.find((F) => F.panelId === E.panelId);
12467
12483
  if (!I)
12468
12484
  throw new Y(E);
12469
12485
  const P = Q();
@@ -12490,7 +12506,7 @@ const Io = [
12490
12506
  } catch (E) {
12491
12507
  return console.error(E), [];
12492
12508
  }
12493
- }, Fo = async (r, t, e) => {
12509
+ }, xo = async (r, t, e) => {
12494
12510
  const a = await Hn(e.data.module), n = t.data, i = (o, l) => {
12495
12511
  const c = r.find((A) => A.panelId === l.panelId);
12496
12512
  if (!c)
@@ -12525,7 +12541,7 @@ const Io = [
12525
12541
  const n = e.data, i = a.option;
12526
12542
  if (!i)
12527
12543
  return console.error(`No option for step ${a.stepName}.`), [];
12528
- const s = ((d = i.variants) == null ? void 0 : d.find((u) => u.id === n.pictureVariantId)) || te(i);
12544
+ const s = ((d = i.variants) == null ? void 0 : d.find((u) => u.id === n.pictureVariantId)) || Zt(i);
12529
12545
  if (!s)
12530
12546
  return console.error(`No variant with ID: ${n.pictureVariantId}`), [];
12531
12547
  if (!s.asset)
@@ -12567,7 +12583,7 @@ const Io = [
12567
12583
  const n = e.data, i = a.option;
12568
12584
  if (!i)
12569
12585
  return console.error(`No option for step ${a.stepName}.`), [];
12570
- const s = ((c = i.variants) == null ? void 0 : c.find((d) => d.id === n.colorVariantId)) || te(i);
12586
+ const s = ((c = i.variants) == null ? void 0 : c.find((d) => d.id === n.colorVariantId)) || Zt(i);
12571
12587
  if (!s)
12572
12588
  return console.error(`No variant with ID: ${n.colorVariantId}`), [];
12573
12589
  t[a.stepName] = { selectedVariants: [s] };
@@ -12692,7 +12708,7 @@ const Io = [
12692
12708
  const f = a.option;
12693
12709
  if (!f)
12694
12710
  return;
12695
- const p = ((w = f.variants) == null ? void 0 : w.find((v) => v.id === i.fontVariantId)) || te(f);
12711
+ const p = ((w = f.variants) == null ? void 0 : w.find((v) => v.id === i.fontVariantId)) || Zt(f);
12696
12712
  if (!p || !p.asset)
12697
12713
  return;
12698
12714
  t[a.stepName] = { selectedVariants: [p] };
@@ -12708,7 +12724,7 @@ const Io = [
12708
12724
  assetUrl: f,
12709
12725
  name: p.names.fullName.en
12710
12726
  };
12711
- })(), A = (a.data.replaceableText ? a.data.replaceableText.replace("{{}}", i.text) : i.text) || "", u = Ce(A, {
12727
+ })(), A = (a.data.replaceableText ? a.data.replaceableText.replace("{{}}", i.text) : i.text) || "", u = pe(A, {
12712
12728
  vertical: a.data.vertical,
12713
12729
  uppercase: a.data.uppercase
12714
12730
  }), h = async (f) => {
@@ -12744,12 +12760,12 @@ const Io = [
12744
12760
  y: f.top
12745
12761
  };
12746
12762
  if (d) {
12747
- const [w, v] = Ae(
12763
+ const [w, v] = de(
12748
12764
  a.data.size || s,
12749
12765
  d,
12750
12766
  f,
12751
12767
  [
12752
- Ce(u, {
12768
+ pe(u, {
12753
12769
  vertical: a.data.vertical,
12754
12770
  uppercase: a.data.uppercase
12755
12771
  })
@@ -12803,7 +12819,7 @@ const Io = [
12803
12819
  break;
12804
12820
  case D.Illustration:
12805
12821
  n.push(
12806
- ...await xo(
12822
+ ...await Fo(
12807
12823
  e,
12808
12824
  i,
12809
12825
  s,
@@ -12812,7 +12828,7 @@ const Io = [
12812
12828
  );
12813
12829
  break;
12814
12830
  case D.Module:
12815
- n.push(...await Fo(e, s, o));
12831
+ n.push(...await xo(e, s, o));
12816
12832
  break;
12817
12833
  case D.Picture:
12818
12834
  n.push(
@@ -12995,7 +13011,7 @@ class Vo extends Dn {
12995
13011
  ignoreMouse: !0,
12996
13012
  enableRedraw: !1,
12997
13013
  createCanvas: mt,
12998
- createImage: _t,
13014
+ createImage: Kt,
12999
13015
  DOMParser: ha(),
13000
13016
  fetch
13001
13017
  });
@@ -13781,7 +13797,12 @@ class Ho {
13781
13797
  }
13782
13798
  getSerializedState() {
13783
13799
  if (this.state)
13784
- return JSON.stringify(this.state);
13800
+ return this.deleteFieldNameFromObjectRecursive(this.state, "__typename"), JSON.stringify(this.state);
13801
+ }
13802
+ deleteFieldNameFromObjectRecursive(t, e) {
13803
+ if (!(typeof t != "object" || t === null))
13804
+ for (const a in t)
13805
+ a === e ? delete t[a] : this.deleteFieldNameFromObjectRecursive(t[a], e);
13785
13806
  }
13786
13807
  flipTransform(t, e) {
13787
13808
  return e && e.flipTransform ? e.flipTransform(
@@ -13839,14 +13860,14 @@ class qo {
13839
13860
  getProducts() {
13840
13861
  if (!this.collection.productCollectionProducts)
13841
13862
  throw new Error("Failed to find products on collection. Ensure you fetch them first!");
13842
- return this.collection.productCollectionProducts.filter((t) => !!t.product).map((t) => new se(t));
13863
+ return this.collection.productCollectionProducts.filter((t) => !!t.product).map((t) => new ie(t));
13843
13864
  }
13844
13865
  /**
13845
13866
  * A list of products in this collections with useful helpers for interacting with them.
13846
13867
  */
13847
13868
  async fetchProducts(t) {
13848
13869
  if (this.fullFetched)
13849
- return this.collection.productCollectionProducts.filter((a) => !!a.product).map((a) => new se(a));
13870
+ return this.collection.productCollectionProducts.filter((a) => !!a.product).map((a) => new ie(a));
13850
13871
  const e = await b.getShadowGraphqlClient().query({
13851
13872
  query: Ms,
13852
13873
  variables: {
@@ -13855,7 +13876,7 @@ class qo {
13855
13876
  },
13856
13877
  errorPolicy: "all"
13857
13878
  });
13858
- return t || (this.fullFetched = !0), this.collection.productCollectionProducts = e.data.productCollections[0].productCollectionProducts || [], this.collection.productCollectionProducts.filter((a) => !!a.product).map((a) => new se(a));
13879
+ return t || (this.fullFetched = !0), this.collection.productCollectionProducts = e.data.productCollections[0].productCollectionProducts || [], this.collection.productCollectionProducts.filter((a) => !!a.product).map((a) => new ie(a));
13859
13880
  }
13860
13881
  /**
13861
13882
  * Returns a list of collections products matching the associated metafield filters.
@@ -13911,7 +13932,7 @@ class qo {
13911
13932
  errorPolicy: "all"
13912
13933
  });
13913
13934
  return {
13914
- items: ((l = (o = (s = n == null ? void 0 : n.data) == null ? void 0 : s.productCollections) == null ? void 0 : o[0].productCollectionProductsFeed) == null ? void 0 : l.items.filter((u) => !!u.product).map((u) => new se(u))) || [],
13935
+ items: ((l = (o = (s = n == null ? void 0 : n.data) == null ? void 0 : s.productCollections) == null ? void 0 : o[0].productCollectionProductsFeed) == null ? void 0 : l.items.filter((u) => !!u.product).map((u) => new ie(u))) || [],
13915
13936
  total: ((A = (d = (c = n == null ? void 0 : n.data) == null ? void 0 : c.productCollections) == null ? void 0 : d[0].productCollectionProductsFeed) == null ? void 0 : A.total) ?? 0
13916
13937
  };
13917
13938
  }
@@ -13926,7 +13947,7 @@ class qo {
13926
13947
  return this.collection;
13927
13948
  }
13928
13949
  }
13929
- class se {
13950
+ class ie {
13930
13951
  constructor(t) {
13931
13952
  this.product = t.product, this.productResource = t;
13932
13953
  }
@@ -14524,7 +14545,7 @@ class He {
14524
14545
  variables: {
14525
14546
  id: this.id,
14526
14547
  details: t,
14527
- type: e || me.Owner
14548
+ type: e || he.Owner
14528
14549
  },
14529
14550
  context: {
14530
14551
  bundleOwnerId: this.ownerId
@@ -14920,14 +14941,14 @@ class nl {
14920
14941
  * @returns The nodes contained within the execution.
14921
14942
  */
14922
14943
  getNodes() {
14923
- return this.execution.nodes.map((t) => new oe(t));
14944
+ return this.execution.nodes.map((t) => new se(t));
14924
14945
  }
14925
14946
  /**
14926
14947
  * @param type The type of node to return.
14927
14948
  * @returns A list of nodes matching the requested type.
14928
14949
  */
14929
14950
  getNodesByType(t) {
14930
- return this.execution.nodes.filter((e) => e.type === t).map((e) => new oe(e));
14951
+ return this.execution.nodes.filter((e) => e.type === t).map((e) => new se(e));
14931
14952
  }
14932
14953
  /**
14933
14954
  * @returns A list of input nodes that exist in this execution.
@@ -14936,7 +14957,7 @@ class nl {
14936
14957
  return this.execution.nodes.filter(
14937
14958
  (t) => t.type === "StartTerminal"
14938
14959
  /* StartTerminal */
14939
- ).map((t) => new oe(t));
14960
+ ).map((t) => new se(t));
14940
14961
  }
14941
14962
  /**
14942
14963
  * @returns A list of out put nodes that exist in this execution.
@@ -14945,7 +14966,7 @@ class nl {
14945
14966
  return this.execution.nodes.filter(
14946
14967
  (t) => t.type === "EndTerminal"
14947
14968
  /* EndTerminal */
14948
- ).map((t) => new oe(t));
14969
+ ).map((t) => new se(t));
14949
14970
  }
14950
14971
  /**
14951
14972
  * @returns A date object representing the point in time this execution completed.
@@ -14962,7 +14983,7 @@ class nl {
14962
14983
  return new Date(this.execution.failedAt);
14963
14984
  }
14964
14985
  }
14965
- class oe {
14986
+ class se {
14966
14987
  constructor(t) {
14967
14988
  this.node = t;
14968
14989
  }
@@ -15007,7 +15028,7 @@ class Xn extends ba {
15007
15028
  return t.match(/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i);
15008
15029
  }
15009
15030
  }
15010
- class xc extends ba {
15031
+ class Fc extends ba {
15011
15032
  constructor(t) {
15012
15033
  super(`[${t.map((e) => e.getRaw()).join(",")}]`);
15013
15034
  }
@@ -15195,7 +15216,7 @@ const Ya = y`
15195
15216
  (o) => Ht.set({ id: o, options: t }, Al(o, n))
15196
15217
  ), s = e.filter((o) => o !== void 0);
15197
15218
  return await Promise.all(s.concat(i));
15198
- }, Fc = async (r, t) => (await Zn([r], t))[0], ul = (r) => r.sort((t, e) => t.index - e.index).map((t) => ({
15219
+ }, xc = async (r, t) => (await Zn([r], t))[0], ul = (r) => r.sort((t, e) => t.index - e.index).map((t) => ({
15199
15220
  id: Q(),
15200
15221
  panelId: t.name,
15201
15222
  name: t.name,
@@ -15224,7 +15245,7 @@ class kc {
15224
15245
  } catch (a) {
15225
15246
  throw console.error(a), new ut("Critical - Unable to synchronize workflow state with server.");
15226
15247
  }
15227
- }, this.options = t, this.options.applicationKey && xr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 26.23.2"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
15248
+ }, this.options = t, this.options.applicationKey && Fr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 26.23.4-beta.9a6b3f77-3bf6-52ad-a823-41cd49720f64"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
15228
15249
  }
15229
15250
  configure(t) {
15230
15251
  wt.setHubUrl(t.hubUrl), wt.setServerUrl(t.serverUrl), wt.setServicesApiUrl(t.servicesApiUrl), this.marketplaceThemeInstallId = t.marketplaceThemeInstallId, this.marketplaceThemeInstallConfigurationId = t.marketplaceThemeInstallConfigurationId, t.bearerAuthenticationToken && kr(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration();
@@ -15242,7 +15263,7 @@ class kc {
15242
15263
  return this.currencyCode;
15243
15264
  }
15244
15265
  getFlowService() {
15245
- if (!Fr())
15266
+ if (!xr())
15246
15267
  throw new Error("Application key required to use Flow Service.");
15247
15268
  return new al();
15248
15269
  }
@@ -15271,7 +15292,7 @@ class kc {
15271
15292
  var n, i;
15272
15293
  const e = k.getMap("bundleOwnerIds");
15273
15294
  if (e != null && e.has(t))
15274
- return Promise.resolve({ success: !0, stakeholderType: me.Owner });
15295
+ return Promise.resolve({ success: !0, stakeholderType: he.Owner });
15275
15296
  const a = k.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
15276
15297
  if (a.has(t)) {
15277
15298
  const s = a.get(t), l = (k.getMap("partnerCustomerIds") || /* @__PURE__ */ new Map()).get(s);
@@ -15320,7 +15341,7 @@ class kc {
15320
15341
  return Promise.resolve({ success: !1, transactionReadOnly: !0 });
15321
15342
  const s = k.getMap("transactionOwnerIds");
15322
15343
  if (s != null && s.has(t))
15323
- return Promise.resolve({ success: !0, stakeholderType: me.Owner });
15344
+ return Promise.resolve({ success: !0, stakeholderType: he.Owner });
15324
15345
  const o = k.getMap("transactionCustomerIds");
15325
15346
  if (o != null && o.has(t)) {
15326
15347
  const f = o.get(t);
@@ -15531,15 +15552,15 @@ class kc {
15531
15552
  * @returns A bundle to be used for grouping and operating on large amounts of workflow experiences.
15532
15553
  */
15533
15554
  async getExistingBundle(t, e, a, n) {
15534
- var f, p, C, w, v, S, B, E, I, P, x;
15555
+ var f, p, C, w, v, S, B, E, I, P, F;
15535
15556
  const i = k.getMap("bundleOwnerIds"), s = i == null ? void 0 : i.get(t), l = ((f = Object.entries(localStorage).find(([M, N]) => M.startsWith("CognitoIdentityServiceProvider") && M.endsWith("idToken"))) == null ? void 0 : f[0]) || "", c = localStorage.getItem(l), d = {};
15536
- c && !ve(c) && (d.Authorization = `Bearer ${c}`);
15557
+ c && !Se(c) && (d.Authorization = `Bearer ${c}`);
15537
15558
  const A = {
15538
15559
  bundleOwnerId: s,
15539
15560
  ...d,
15540
15561
  ...(p = n == null ? void 0 : n.graphql) == null ? void 0 : p.additionalHeaders
15541
15562
  }, u = await b.getShadowGraphqlClient().query({
15542
- query: Fs(((w = (C = n == null ? void 0 : n.graphql) == null ? void 0 : C.productCollection) == null ? void 0 : w.eagerFetchProducts) || !1),
15563
+ query: xs(((w = (C = n == null ? void 0 : n.graphql) == null ? void 0 : C.productCollection) == null ? void 0 : w.eagerFetchProducts) || !1),
15543
15564
  variables: {
15544
15565
  id: t
15545
15566
  },
@@ -15554,7 +15575,7 @@ class kc {
15554
15575
  m.set(h.id, h.partner.id), k.setMap("bundlePartnerIds", m);
15555
15576
  const g = new He(this, h, e, a, s, {
15556
15577
  additionalHeaders: (I = n == null ? void 0 : n.graphql) == null ? void 0 : I.additionalHeaders,
15557
- eagerFetchProducts: (x = (P = n == null ? void 0 : n.graphql) == null ? void 0 : P.productCollection) == null ? void 0 : x.eagerFetchProducts,
15578
+ eagerFetchProducts: (F = (P = n == null ? void 0 : n.graphql) == null ? void 0 : P.productCollection) == null ? void 0 : F.eagerFetchProducts,
15558
15579
  existingGlobalPropertyState: u.data.globalPropertyState,
15559
15580
  readonly: n == null ? void 0 : n.readonly
15560
15581
  });
@@ -15569,7 +15590,7 @@ class kc {
15569
15590
  async duplicateBundle(t, e, a, n) {
15570
15591
  var f, p, C, w, v, S, B, E;
15571
15592
  const i = (f = k.getMap("bundleOwnerIds")) == null ? void 0 : f.get(t), o = ((p = Object.entries(localStorage).find(([I, P]) => I.startsWith("CognitoIdentityServiceProvider") && I.endsWith("idToken"))) == null ? void 0 : p[0]) || "", l = localStorage.getItem(o), c = {};
15572
- l && !ve(l) && (c.Authorization = `Bearer ${l}`);
15593
+ l && !Se(l) && (c.Authorization = `Bearer ${l}`);
15573
15594
  const d = {
15574
15595
  bundleOwnerId: i,
15575
15596
  ...c,
@@ -15669,7 +15690,7 @@ class kc {
15669
15690
  if (t.length === 0)
15670
15691
  throw new ut("No options provided!");
15671
15692
  const a = b.getShadowGraphqlClient(), n = async (S) => {
15672
- var P, x, M;
15693
+ var P, F, M;
15673
15694
  if (S.length === 0)
15674
15695
  return [];
15675
15696
  const B = S.map((N) => N.option.transactionId), E = await a.query({
@@ -15681,7 +15702,7 @@ class kc {
15681
15702
  fetchPolicy: "no-cache"
15682
15703
  }), I = E.data.transactions;
15683
15704
  if (I.length !== S.length) {
15684
- const N = ((x = (P = E.errors) == null ? void 0 : P[0]) == null ? void 0 : x.message) || "Unknown error";
15705
+ const N = ((F = (P = E.errors) == null ? void 0 : P[0]) == null ? void 0 : F.message) || "Unknown error";
15685
15706
  throw new ut(`Not all transactions were found: ${N}`);
15686
15707
  }
15687
15708
  return !this.activeIntegration && ((M = I[0].integrationProduct) != null && M.integration) && (this.activeIntegration = Promise.resolve(I[0].integrationProduct.integration)), I.map((N, V) => {
@@ -15694,7 +15715,7 @@ class kc {
15694
15715
  };
15695
15716
  });
15696
15717
  }, i = async (S) => {
15697
- var I, P, x;
15718
+ var I, P, F;
15698
15719
  if (S.length === 0)
15699
15720
  return [];
15700
15721
  const B = await a.mutate({
@@ -15715,7 +15736,7 @@ class kc {
15715
15736
  fetchPolicy: "no-cache"
15716
15737
  }), E = (I = B.data) == null ? void 0 : I.transactionCreateMany;
15717
15738
  if (!E || E.length === 0) {
15718
- const M = ((x = (P = B.errors) == null ? void 0 : P[0]) == null ? void 0 : x.message) || "Unknown error";
15739
+ const M = ((F = (P = B.errors) == null ? void 0 : P[0]) == null ? void 0 : F.message) || "Unknown error";
15719
15740
  throw new ut(`Failed to create transactions: ${M}`);
15720
15741
  }
15721
15742
  return E.map((M, N) => ({
@@ -15731,7 +15752,7 @@ class kc {
15731
15752
  ...d.map(i)
15732
15753
  ])).flat(), u = [...new Set(A.map((S) => S.workflowId))], h = await Zn(u, e), m = new Map(h.map((S) => [S.id, S])), g = k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map(), f = A.map(async (S) => {
15733
15754
  var j;
15734
- const { transaction: B, workflowId: E, readOnly: I, index: P } = S, x = m.get(E), M = t[P];
15755
+ const { transaction: B, workflowId: E, readOnly: I, index: P } = S, F = m.get(E), M = t[P];
15735
15756
  !g.get(B.id) && B.transactionOwnerId && g.set(B.id, B.transactionOwnerId);
15736
15757
  const N = g.get(B.id) || void 0, V = {
15737
15758
  product: B.product,
@@ -15745,7 +15766,7 @@ class kc {
15745
15766
  context: { transactionOwnerId: N, bundleOwnerId: e == null ? void 0 : e.bundleOwnerId }
15746
15767
  }),
15747
15768
  readOnly: I,
15748
- workflow: x,
15769
+ workflow: F,
15749
15770
  isReloadedTransaction: M.type === "transaction"
15750
15771
  };
15751
15772
  if (M.type === "transaction" && B.workflowState) {
@@ -15774,34 +15795,34 @@ class kc {
15774
15795
  const e = k.getMap("partnerCustomerIds") || /* @__PURE__ */ new Map();
15775
15796
  e.set(t.partner.id, t.id), k.setMap("partnerCustomerIds", e);
15776
15797
  }
15777
- async getIntegrationProductById(t) {
15778
- var i, s;
15779
- const n = (i = (await b.getShadowGraphqlClient().query({
15780
- query: gi,
15798
+ async getIntegrationProductById(t, e) {
15799
+ var s, o;
15800
+ const i = (s = (await b.getShadowGraphqlClient().query({
15801
+ query: gi(e),
15781
15802
  variables: {
15782
15803
  ids: [t]
15783
15804
  },
15784
15805
  fetchPolicy: "no-cache",
15785
15806
  errorPolicy: "all"
15786
- })).data) == null ? void 0 : i.integrationProducts;
15787
- if (!n || n.length === 0 || !((s = n[0]) != null && s.id))
15807
+ })).data) == null ? void 0 : s.integrationProducts;
15808
+ if (!i || i.length === 0 || !((o = i[0]) != null && o.id))
15788
15809
  throw new Error("Integration product not found.");
15789
- return new qa(n[0]);
15810
+ return new qa(i[0]);
15790
15811
  }
15791
- async getIntegrationProductFromExternalIds(t, e) {
15792
- var s;
15793
- const i = (s = (await b.getShadowGraphqlClient().query({
15794
- query: fi,
15812
+ async getIntegrationProductFromExternalIds(t, e, a) {
15813
+ var o;
15814
+ const s = (o = (await b.getShadowGraphqlClient().query({
15815
+ query: fi(a),
15795
15816
  variables: {
15796
15817
  externalProductId: e,
15797
15818
  externalIntegrationId: t
15798
15819
  },
15799
15820
  fetchPolicy: "no-cache",
15800
15821
  errorPolicy: "all"
15801
- })).data) == null ? void 0 : s.integrationProductFromExternalIds;
15802
- if (!(i != null && i.id))
15822
+ })).data) == null ? void 0 : o.integrationProductFromExternalIds;
15823
+ if (!(s != null && s.id))
15803
15824
  throw new Error("Integration product not found.");
15804
- return new qa(i);
15825
+ return new qa(s);
15805
15826
  }
15806
15827
  async getIntegrationProduct(t) {
15807
15828
  return t.type === "integration" ? this.getIntegrationProductById(t.integrationProductId) : this.getIntegrationProductFromExternalIds(t.externalIntegrationId, t.externalProductId);
@@ -15824,7 +15845,7 @@ class kc {
15824
15845
  }
15825
15846
  async placeOrder(t) {
15826
15847
  const e = await b.getShadowGraphqlClient().mutate({
15827
- mutation: Fi,
15848
+ mutation: xi,
15828
15849
  variables: {
15829
15850
  orderItems: t
15830
15851
  }
@@ -15875,7 +15896,7 @@ const ml = async (r, t) => (await b.getShadowGraphqlClient().query({
15875
15896
  }, Qc = async (r) => {
15876
15897
  var e, a, n;
15877
15898
  return (n = (a = (e = (await b.getShadowGraphqlClient().query({
15878
- query: xi,
15899
+ query: Fi,
15879
15900
  errorPolicy: "all",
15880
15901
  variables: {
15881
15902
  id: r
@@ -15897,12 +15918,12 @@ function gl(r, t, e, a) {
15897
15918
  const o = r, l = Math.max(t.width / e.width, t.height / e.height);
15898
15919
  o.zoom = Math.max(l, r.zoom);
15899
15920
  const c = e.width * o.zoom, d = e.height * o.zoom;
15900
- return o.x = le(r.x, t.width - c, 0), o.y = le(r.y, t.height - d, 0), o;
15921
+ return o.x = oe(r.x, t.width - c, 0), o.y = oe(r.y, t.height - d, 0), o;
15901
15922
  }
15902
15923
  const s = r;
15903
- return s.x = le(s.x, -n, t.width), s.y = le(s.y, -i, t.height), s;
15924
+ return s.x = oe(s.x, -n, t.width), s.y = oe(s.y, -i, t.height), s;
15904
15925
  }
15905
- function le(r, t, e) {
15926
+ function oe(r, t, e) {
15906
15927
  return Math.min(Math.max(r, t), e);
15907
15928
  }
15908
15929
  class fl {
@@ -15927,7 +15948,7 @@ class fl {
15927
15948
  if (n.currentFrameSources) {
15928
15949
  let i = !1;
15929
15950
  for (let s = 0; s < n.currentFrameSources.length; s++) {
15930
- const o = n.currentFrameSources[s], l = await xe(o), c = this.frameData ? this.frameData[s] : void 0;
15951
+ const o = n.currentFrameSources[s], l = await Fe(o), c = this.frameData ? this.frameData[s] : void 0;
15931
15952
  rn(l, c) || (this.frameData || (this.frameData = new Array(n.currentFrameSources.length)), this.frameData[s] = l, i = !0);
15932
15953
  }
15933
15954
  i && (this.onFrameDataChangeListeners.forEach(
@@ -16735,11 +16756,11 @@ K = { __e: function(r, t, e, a) {
16735
16756
  throw r;
16736
16757
  } }, typeof Promise == "function" && Promise.prototype.then.bind(Promise.resolve());
16737
16758
  var st, qe, Ja, tr = [], Ye = [], Ka = K.__b, _a = K.__r, Xa = K.diffed, Za = K.__c, tn = K.unmount;
16738
- function xl() {
16759
+ function Fl() {
16739
16760
  for (var r; r = tr.shift(); )
16740
16761
  if (r.__P && r.__H)
16741
16762
  try {
16742
- r.__H.__h.forEach(ue), r.__H.__h.forEach(la), r.__H.__h = [];
16763
+ r.__H.__h.forEach(Ae), r.__H.__h.forEach(la), r.__H.__h = [];
16743
16764
  } catch (t) {
16744
16765
  r.__H.__h = [], K.__e(t, r.__v);
16745
16766
  }
@@ -16751,17 +16772,17 @@ K.__b = function(r) {
16751
16772
  var t = (st = r.__c).__H;
16752
16773
  t && (qe === st ? (t.__h = [], st.__h = [], t.__.forEach(function(e) {
16753
16774
  e.__N && (e.__ = e.__N), e.__V = Ye, e.__N = e.i = void 0;
16754
- })) : (t.__h.forEach(ue), t.__h.forEach(la), t.__h = [])), qe = st;
16775
+ })) : (t.__h.forEach(Ae), t.__h.forEach(la), t.__h = [])), qe = st;
16755
16776
  }, K.diffed = function(r) {
16756
16777
  Xa && Xa(r);
16757
16778
  var t = r.__c;
16758
- t && t.__H && (t.__H.__h.length && (tr.push(t) !== 1 && Ja === K.requestAnimationFrame || ((Ja = K.requestAnimationFrame) || Fl)(xl)), t.__H.__.forEach(function(e) {
16779
+ t && t.__H && (t.__H.__h.length && (tr.push(t) !== 1 && Ja === K.requestAnimationFrame || ((Ja = K.requestAnimationFrame) || xl)(Fl)), t.__H.__.forEach(function(e) {
16759
16780
  e.i && (e.__H = e.i), e.__V !== Ye && (e.__ = e.__V), e.i = void 0, e.__V = Ye;
16760
16781
  })), qe = st = null;
16761
16782
  }, K.__c = function(r, t) {
16762
16783
  t.some(function(e) {
16763
16784
  try {
16764
- e.__h.forEach(ue), e.__h = e.__h.filter(function(a) {
16785
+ e.__h.forEach(Ae), e.__h = e.__h.filter(function(a) {
16765
16786
  return !a.__ || la(a);
16766
16787
  });
16767
16788
  } catch (a) {
@@ -16775,20 +16796,20 @@ K.__b = function(r) {
16775
16796
  var t, e = r.__c;
16776
16797
  e && e.__H && (e.__H.__.forEach(function(a) {
16777
16798
  try {
16778
- ue(a);
16799
+ Ae(a);
16779
16800
  } catch (n) {
16780
16801
  t = n;
16781
16802
  }
16782
16803
  }), e.__H = void 0, t && K.__e(t, e.__v));
16783
16804
  };
16784
16805
  var en = typeof requestAnimationFrame == "function";
16785
- function Fl(r) {
16806
+ function xl(r) {
16786
16807
  var t, e = function() {
16787
16808
  clearTimeout(a), en && cancelAnimationFrame(t), setTimeout(r);
16788
16809
  }, a = setTimeout(e, 100);
16789
16810
  en && (t = requestAnimationFrame(e));
16790
16811
  }
16791
- function ue(r) {
16812
+ function Ae(r) {
16792
16813
  var t = st, e = r.__c;
16793
16814
  typeof e == "function" && (r.__c = void 0, e()), st = t;
16794
16815
  }
@@ -16798,16 +16819,16 @@ function la(r) {
16798
16819
  }
16799
16820
  export {
16800
16821
  da as AddonHandle,
16801
- xc as ArrayInput,
16822
+ Fc as ArrayInput,
16802
16823
  et as AspectType,
16803
16824
  yt as AssetNotFoundError,
16804
- he as AssetType,
16825
+ ue as AssetType,
16805
16826
  Bc as BringForwardCommand,
16806
16827
  Ec as BringToBackCommand,
16807
16828
  vc as BringToFrontCommand,
16808
16829
  mr as BundleDesignCreationCartAddMode,
16809
16830
  R as CanvasCommand,
16810
- se as CollectionProduct,
16831
+ ie as CollectionProduct,
16811
16832
  Ha as ColorOptionGlobalPropertyHandle,
16812
16833
  Ki as CommandContext,
16813
16834
  Pl as ConversionDataType,
@@ -16817,7 +16838,7 @@ export {
16817
16838
  vt as DeleteElementCommand,
16818
16839
  Ao as DigitalContentStepHandle,
16819
16840
  Go as FileUploadGlobalPropertyHandle,
16820
- oe as FlowExecutionNodeResult,
16841
+ se as FlowExecutionNodeResult,
16821
16842
  nl as FlowExecutionResult,
16822
16843
  al as FlowService,
16823
16844
  ts as FontAlignmentCommand,
@@ -16839,7 +16860,7 @@ export {
16839
16860
  Y as LayoutNotFoundError,
16840
16861
  Gt as LayoutRenderingPurpose,
16841
16862
  no as MaterialStepHandle,
16842
- fe as MisconfigurationError,
16863
+ ge as MisconfigurationError,
16843
16864
  Rc as MockWorkflowManager,
16844
16865
  ro as ModelStepHandle,
16845
16866
  uo as ModuleStepHandle,
@@ -16847,7 +16868,7 @@ export {
16847
16868
  Xn as ObjectInput,
16848
16869
  rl as ObjectInputType,
16849
16870
  _n as OptionGlobalPropertyHandle,
16850
- ge as OptionNotFoundError,
16871
+ me as OptionNotFoundError,
16851
16872
  Dt as ParseError,
16852
16873
  io as PictureStepHandle,
16853
16874
  pr as ProductCameraRig,
@@ -16865,7 +16886,7 @@ export {
16865
16886
  oo as ShapeStepHandle,
16866
16887
  gr as ShareActionType,
16867
16888
  kc as SpiffCommerceClient,
16868
- me as StakeholderType,
16889
+ he as StakeholderType,
16869
16890
  hr as StepAspectType,
16870
16891
  rt as StepHandle,
16871
16892
  D as StepType,
@@ -16889,7 +16910,7 @@ export {
16889
16910
  uc as currentDirection,
16890
16911
  tc as dataUrlFromExternalUrl,
16891
16912
  je as designService,
16892
- Ae as determineCorrectFontSizeAndLines,
16913
+ de as determineCorrectFontSizeAndLines,
16893
16914
  $n as digitalContentStepService,
16894
16915
  dt as domParser,
16895
16916
  Lc as duplicateBundle,
@@ -16911,7 +16932,7 @@ export {
16911
16932
  Vc as getCustomer,
16912
16933
  zc as getCustomerBundles,
16913
16934
  hc as getElementVertices,
16914
- xe as getFrameData,
16935
+ Fe as getFrameData,
16915
16936
  ml as getIntegration,
16916
16937
  dc as getNEPoint,
16917
16938
  cc as getNWPoint,
@@ -16927,10 +16948,10 @@ export {
16927
16948
  Gc as getTransactionsForBundle,
16928
16949
  oc as getTrueCoordinates,
16929
16950
  Wc as getUnorderedTransactions,
16930
- Fc as getWorkflow,
16951
+ xc as getWorkflow,
16931
16952
  Zn as getWorkflows,
16932
16953
  b as graphQlManager,
16933
- de as illustrationStepService,
16954
+ ce as illustrationStepService,
16934
16955
  sc as isCloseToValue,
16935
16956
  Tt as loadFont,
16936
16957
  ac as matchHexToPms,
@@ -16952,7 +16973,7 @@ export {
16952
16973
  Xl as registerWindowImplementation,
16953
16974
  La as rehydrateSerializedLayout,
16954
16975
  Lr as rgbToPms,
16955
- re as rotateAroundPoint,
16976
+ ne as rotateAroundPoint,
16956
16977
  ma as sanitizeSvgTree,
16957
16978
  kr as setBearerAuthenticationToken,
16958
16979
  mn as setCanvasModule,