@spiffcommerce/core 32.2.4-beta.37bc688d-3d85-536a-ba61-02a441df130e → 32.2.4-beta.4afe3abf-22fb-564b-b8a7-84762f8e91f4

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
@@ -4,26 +4,26 @@ import { onError as hr } from "@apollo/client/link/error";
4
4
  import { renderToStaticMarkup as mr } from "preact-render-to-string";
5
5
  import { removeTypenameFromVariables as gr } from "@apollo/client/link/remove-typename";
6
6
  import { orientation as pr } from "exifr/dist/mini.umd.cjs";
7
- import { parse as on } from "css";
7
+ import { parse as ln } from "css";
8
8
  import fr from "fuse.js";
9
- import { Pith as Aa } from "pith";
9
+ import { Pith as ua } from "pith";
10
10
  import Et from "lodash.clonedeep";
11
- import { toString as ln } from "qrcode";
11
+ import { toString as cn } from "qrcode";
12
12
  import Cr from "svg-path-bbox";
13
- import { parse as ta } from "opentype.js";
13
+ import { parse as ea } from "opentype.js";
14
14
  import { jsx as D, jsxs as ct, Fragment as Gt } from "preact/jsx-runtime";
15
15
  import wr from "handlebars";
16
16
  import { dataUriToBuffer as yr } from "data-uri-to-buffer";
17
- import Fa from "lodash.chunk";
18
- import { CognitoIdentityProviderClient as Sr, InitiateAuthCommand as xa, RespondToAuthChallengeCommand as vr } from "@aws-sdk/client-cognito-identity-provider";
17
+ import xa from "lodash.chunk";
18
+ import { CognitoIdentityProviderClient as Sr, InitiateAuthCommand as ka, RespondToAuthChallengeCommand as vr } from "@aws-sdk/client-cognito-identity-provider";
19
19
  import Er from "dinero.js";
20
- import * as ka from "currency-codes";
21
- import cn from "lodash.isequal";
22
- import { split as ea } from "unicode-default-word-boundary";
20
+ import * as Ma from "currency-codes";
21
+ import ye from "lodash.isequal";
22
+ import { split as aa } from "unicode-default-word-boundary";
23
23
  import dn from "lodash.debounce";
24
24
  import "fs";
25
25
  import "path";
26
- var ye = /* @__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))(ye || {}), U = /* @__PURE__ */ ((r) => (r.FileUpload = "FileUpload", r.Option = "Option", r.ColorOption = "ColorOption", r.Text = "Text", r))(U || {}), v = /* @__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))(v || {}), br = /* @__PURE__ */ ((r) => (r.Color = "Color", r.Colors = "Colors", r.Selection = "Selection", r.Selections = "Selections", r.Text = "Text", r.Upload = "Upload", r))(br || {}), Ht = /* @__PURE__ */ ((r) => (r.ThreeD = "ThreeD", r.FreeDesign = "FreeDesign", r.Print = "Print", r))(Ht || {}), x = /* @__PURE__ */ ((r) => (r.Frame = "frame", r.Group = "group", r.Image = "image", r.Pattern = "pattern", r.Illustration = "illustration", r.Textbox = "textbox", r))(x || {}), Br = /* @__PURE__ */ ((r) => (r.Default = "Default", r.FirstTransaction = "FirstTransaction", r.OneToOne = "OneToOne", r))(Br || {}), An = /* @__PURE__ */ ((r) => (r.Pending = "Pending", r.Failed = "Failed", r.Validated = "Validated", r.Overridden = "Overridden", r))(An || {}), Ir = /* @__PURE__ */ ((r) => (r.Hyperlink = "Hyperlink", r.Edit = "Edit", r.Approve = "Approve", r))(Ir || {}), Pr = /* @__PURE__ */ ((r) => (r.Hub = "Hub", r.Shopify = "Shopify", r))(Pr || {}), ua = /* @__PURE__ */ ((r) => (r.BackgroundRemover = "BackgroundRemover", r.ConversionAccelerator = "Conversion Accelerator", r.ProcessBuilder = "ProcessBuilder", r))(ua || {}), Dr = /* @__PURE__ */ ((r) => (r[r.Orbit = 0] = "Orbit", r[r.Pan = 1] = "Pan", r))(Dr || {}), Se = /* @__PURE__ */ ((r) => (r.Owner = "Owner", r.Approver = "Approver", r.Editor = "Editor", r.Viewer = "Viewer", r))(Se || {}), Mt = /* @__PURE__ */ ((r) => (r.Autosize = "Autosize", r.Traditional = "Traditional", r))(Mt || {}), j = /* @__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))(j || {}), Fr = /* @__PURE__ */ ((r) => (r.Pixel = "px", r.Millimeter = "mm", r.Centimeter = "cm", r))(Fr || {});
26
+ var Se = /* @__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))(Se || {}), U = /* @__PURE__ */ ((r) => (r.FileUpload = "FileUpload", r.Option = "Option", r.ColorOption = "ColorOption", r.Text = "Text", r))(U || {}), v = /* @__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))(v || {}), br = /* @__PURE__ */ ((r) => (r.Color = "Color", r.Colors = "Colors", r.Selection = "Selection", r.Selections = "Selections", r.Text = "Text", r.Upload = "Upload", r))(br || {}), Ht = /* @__PURE__ */ ((r) => (r.ThreeD = "ThreeD", r.FreeDesign = "FreeDesign", r.Print = "Print", r))(Ht || {}), x = /* @__PURE__ */ ((r) => (r.Frame = "frame", r.Group = "group", r.Image = "image", r.Pattern = "pattern", r.Illustration = "illustration", r.Textbox = "textbox", r))(x || {}), Br = /* @__PURE__ */ ((r) => (r.Default = "Default", r.FirstTransaction = "FirstTransaction", r.OneToOne = "OneToOne", r))(Br || {}), An = /* @__PURE__ */ ((r) => (r.Pending = "Pending", r.Failed = "Failed", r.Validated = "Validated", r.Overridden = "Overridden", r))(An || {}), Ir = /* @__PURE__ */ ((r) => (r.Hyperlink = "Hyperlink", r.Edit = "Edit", r.Approve = "Approve", r))(Ir || {}), Pr = /* @__PURE__ */ ((r) => (r.Hub = "Hub", r.Shopify = "Shopify", r))(Pr || {}), ha = /* @__PURE__ */ ((r) => (r.BackgroundRemover = "BackgroundRemover", r.ConversionAccelerator = "Conversion Accelerator", r.ProcessBuilder = "ProcessBuilder", r))(ha || {}), Dr = /* @__PURE__ */ ((r) => (r[r.Orbit = 0] = "Orbit", r[r.Pan = 1] = "Pan", r))(Dr || {}), ve = /* @__PURE__ */ ((r) => (r.Owner = "Owner", r.Approver = "Approver", r.Editor = "Editor", r.Viewer = "Viewer", r))(ve || {}), Mt = /* @__PURE__ */ ((r) => (r.Autosize = "Autosize", r.Traditional = "Traditional", r))(Mt || {}), j = /* @__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))(j || {}), Fr = /* @__PURE__ */ ((r) => (r.Pixel = "px", r.Millimeter = "mm", r.Centimeter = "cm", r))(Fr || {});
27
27
  class un extends Error {
28
28
  constructor(t) {
29
29
  super(t), this.name = this.constructor.name;
@@ -34,7 +34,7 @@ class Xt extends un {
34
34
  super(`ConfigurationError - ${t}`);
35
35
  }
36
36
  }
37
- class ve extends Xt {
37
+ class Ee extends Xt {
38
38
  constructor(t) {
39
39
  super(`Option not Configured: ${t.stepTitle}`), this.optionId = t?.optionId || "N/A";
40
40
  }
@@ -54,32 +54,32 @@ class Yt extends Xt {
54
54
  super(`Resource not found for asset: ${t.name}`), this.asset = t;
55
55
  }
56
56
  }
57
- class Ee extends Xt {
57
+ class be extends Xt {
58
58
  constructor(t, e) {
59
59
  super(`Workflow Misconfiguration: ${t.stepName} - ${e}`), this.step = t;
60
60
  }
61
61
  }
62
- class xe extends un {
62
+ class ke extends un {
63
63
  constructor(t) {
64
64
  super(`ImplementationError - ${t}`);
65
65
  }
66
66
  }
67
- class V extends xe {
67
+ class V extends ke {
68
68
  constructor(t) {
69
69
  super(`Unhandled Behavior Encountered: ${t}`);
70
70
  }
71
71
  }
72
- class Dt extends xe {
72
+ class Dt extends ke {
73
73
  constructor(t) {
74
74
  super(`Parsing Error: ${t}`);
75
75
  }
76
76
  }
77
- class ht extends xe {
77
+ class ht extends ke {
78
78
  constructor(t) {
79
79
  super(`Client Error: ${t}`);
80
80
  }
81
81
  }
82
- class ke extends xe {
82
+ class Me extends ke {
83
83
  constructor(t) {
84
84
  super(`Resource Generation Failed: ${t}`);
85
85
  }
@@ -104,7 +104,7 @@ class xr {
104
104
  this.set(t, a);
105
105
  }
106
106
  }
107
- class Ma {
107
+ class Ta {
108
108
  constructor() {
109
109
  this.storage = /* @__PURE__ */ new Map();
110
110
  }
@@ -129,9 +129,9 @@ class Ma {
129
129
  }
130
130
  const kr = () => {
131
131
  try {
132
- return localStorage ? new xr() : new Ma();
132
+ return localStorage ? new xr() : new Ta();
133
133
  } catch {
134
- return console.warn("Local storage was unavilable due to browser security settings. Using in-memory storage instead."), new Ma();
134
+ return console.warn("Local storage was unavilable due to browser security settings. Using in-memory storage instead."), new Ta();
135
135
  }
136
136
  }, k = kr();
137
137
  class Mr {
@@ -161,41 +161,41 @@ class Mr {
161
161
  }
162
162
  }
163
163
  const gt = new Mr();
164
- let aa, na;
164
+ let na, ra;
165
165
  function Qc(r) {
166
- aa = r;
166
+ na = r;
167
167
  }
168
168
  function Rc(r) {
169
- na = r;
169
+ ra = r;
170
170
  }
171
171
  function Zt() {
172
- return aa ? new aa().window : (console.log(
172
+ return na ? new na().window : (console.log(
173
173
  "DOM constructor is not registered. Assuming browser environment. If not, please register DOM constructor before calling this function."
174
174
  ), window);
175
175
  }
176
176
  function rt(r, t) {
177
- if (!na) {
177
+ if (!ra) {
178
178
  if (typeof window < "u" && window.fetch)
179
179
  return window.fetch(r, t);
180
180
  if (typeof global < "u" && global.fetch)
181
181
  return global.fetch(r, t);
182
182
  throw new Error("Fetch implementation is not registered. Please register it before calling this function.");
183
183
  }
184
- return na(r, t);
184
+ return ra(r, t);
185
185
  }
186
- const hn = /* @__PURE__ */ new Map(), Ta = /* @__PURE__ */ new Map(), Na = /* @__PURE__ */ new Map(), mn = async (r) => {
187
- const t = Ta.get(r);
186
+ const hn = /* @__PURE__ */ new Map(), Na = /* @__PURE__ */ new Map(), Qa = /* @__PURE__ */ new Map(), mn = async (r) => {
187
+ const t = Na.get(r);
188
188
  if (t) return t;
189
189
  const a = (async () => {
190
190
  const n = await rt(r);
191
191
  return hn.set(r, n.headers?.get("content-type") || ""), await n.arrayBuffer();
192
192
  })();
193
- return Ta.set(r, a), a;
193
+ return Na.set(r, a), a;
194
194
  }, Tr = async (r) => {
195
- const t = Na.get(r);
195
+ const t = Qa.get(r);
196
196
  if (t) return t;
197
197
  const a = (async () => await (await rt(r)).text())();
198
- return Na.set(r, a), a;
198
+ return Qa.set(r, a), a;
199
199
  }, Tt = (r) => r.every((t) => t !== "undefined"), se = (r) => Tt([typeof document]) ? document.createElement(r) : Zt().document.createElement(r), Nr = (r, t) => {
200
200
  if (Tt([typeof document]))
201
201
  return document.createElementNS(r, t);
@@ -206,7 +206,7 @@ const hn = /* @__PURE__ */ new Map(), Ta = /* @__PURE__ */ new Map(), Na = /* @_
206
206
  return new DOMParser();
207
207
  const r = Zt();
208
208
  return new r.DOMParser();
209
- }, Qr = () => Tt([typeof DOMParser]) ? DOMParser : Zt().DOMParser, Me = (r, t) => new Promise((e, a) => {
209
+ }, Qr = () => Tt([typeof DOMParser]) ? DOMParser : Zt().DOMParser, Te = (r, t) => new Promise((e, a) => {
210
210
  t ? mn(r).then(e).catch(a) : rt(r).then((n) => {
211
211
  n.arrayBuffer().then(e).catch(a);
212
212
  }).catch((n) => {
@@ -216,21 +216,21 @@ const hn = /* @__PURE__ */ new Map(), Ta = /* @__PURE__ */ new Map(), Na = /* @_
216
216
  t ? Tr(r).then(e).catch(a) : rt(r).then((n) => {
217
217
  n.text().then(e).catch(a);
218
218
  }).catch(a);
219
- }), gn = (r) => mr(r), Ue = /* @__PURE__ */ new Map(), Rr = async (r, t) => {
219
+ }), gn = (r) => mr(r), Le = /* @__PURE__ */ new Map(), Rr = async (r, t) => {
220
220
  if (Tt([typeof FontFace])) {
221
- if (Ue.has(t))
222
- return Ue.get(t);
221
+ if (Le.has(t))
222
+ return Le.get(t);
223
223
  const e = r.names.fullName.en, a = new FontFace(e, `url(${t})`);
224
224
  document.fonts.add(a);
225
225
  const n = a.load();
226
- return Ue.set(t, n), n;
226
+ return Le.set(t, n), n;
227
227
  }
228
228
  }, It = () => {
229
229
  if (Tt([typeof XMLSerializer]))
230
230
  return new XMLSerializer();
231
231
  const r = Zt();
232
232
  return new r.XMLSerializer();
233
- }, Qa = (r) => btoa(r), Te = (r) => {
233
+ }, Ra = (r) => btoa(r), Ne = (r) => {
234
234
  function t() {
235
235
  const a = new Uint8Array(r), n = 4;
236
236
  if (a.length >= n) {
@@ -257,7 +257,7 @@ const hn = /* @__PURE__ */ new Map(), Ta = /* @__PURE__ */ new Map(), Na = /* @_
257
257
  const e = t();
258
258
  return e || "image/svg+xml";
259
259
  }, Oc = async (r) => {
260
- const t = await mn(r), e = hn.get(r) || Te(t);
260
+ const t = await mn(r), e = hn.get(r) || Ne(t);
261
261
  return await Ur(new Blob([t], { type: e }));
262
262
  }, Or = (r) => {
263
263
  let t = "";
@@ -266,9 +266,9 @@ const hn = /* @__PURE__ */ new Map(), Ta = /* @__PURE__ */ new Map(), Na = /* @_
266
266
  t += String.fromCharCode(r[a]);
267
267
  return t;
268
268
  }, $r = async (r) => {
269
- const t = Te(r), e = new Uint8Array(r), a = Or(e), n = btoa(a);
269
+ const t = Ne(r), e = new Uint8Array(r), a = Or(e), n = btoa(a);
270
270
  return `data:${t};base64,${n}`;
271
- }, ha = (r) => `data:image/svg+xml;base64,${btoa(r)}`, pn = (r) => {
271
+ }, ma = (r) => `data:image/svg+xml;base64,${btoa(r)}`, pn = (r) => {
272
272
  const t = r.replace(/\r?\n/g, ""), e = t.indexOf(",");
273
273
  if (e === -1 || e <= 4)
274
274
  throw new TypeError("malformed data: URI");
@@ -287,10 +287,10 @@ const hn = /* @__PURE__ */ new Map(), Ta = /* @__PURE__ */ new Map(), Na = /* @_
287
287
  !i || !i.result ? e() : t(i.result.toString());
288
288
  }, a.readAsDataURL(r);
289
289
  });
290
- let Lr, ma;
290
+ let Lr, ga;
291
291
  const Vr = (r) => {
292
- ma = r;
293
- }, zr = () => ma;
292
+ ga = r;
293
+ }, zr = () => ga;
294
294
  let fn;
295
295
  const Gr = (r) => {
296
296
  fn = r;
@@ -301,7 +301,7 @@ const Gr = (r) => {
301
301
  window.parent !== window && (window.addEventListener("message", e, !1), window.parent.postMessage("ready", t));
302
302
  }), qr = async () => {
303
303
  const r = {
304
- applicationKey: ma,
304
+ applicationKey: ga,
305
305
  customerToken: Lr,
306
306
  bearer: fn
307
307
  };
@@ -364,10 +364,10 @@ class Hr {
364
364
  }
365
365
  }
366
366
  const y = new Hr();
367
- let ra, ia;
367
+ let ia, sa;
368
368
  const pt = (r, t, e) => {
369
- if (ra !== void 0)
370
- return ra(r, t, e);
369
+ if (ia !== void 0)
370
+ return ia(r, t, e);
371
371
  try {
372
372
  const a = wn(!0);
373
373
  return Cn(a), a.createCanvas(r, t, e);
@@ -375,8 +375,8 @@ const pt = (r, t, e) => {
375
375
  throw new Error("Canvas module not set");
376
376
  }
377
377
  }, te = (r, t) => {
378
- if (ia !== void 0)
379
- return ia(r, t);
378
+ if (sa !== void 0)
379
+ return sa(r, t);
380
380
  try {
381
381
  const e = wn(!0);
382
382
  return Cn(e), e.loadImage(r, t);
@@ -385,7 +385,7 @@ const pt = (r, t, e) => {
385
385
  }
386
386
  };
387
387
  function Cn(r) {
388
- ra = r?.createCanvas, ia = r?.loadImage;
388
+ ia = r?.createCanvas, sa = r?.loadImage;
389
389
  }
390
390
  function wn(r) {
391
391
  try {
@@ -406,13 +406,13 @@ function wn(r) {
406
406
  throw t;
407
407
  }
408
408
  }
409
- let Le;
410
- function ga() {
411
- return Le === void 0 && (Le = Qr()), Le;
409
+ let Ve;
410
+ function pa() {
411
+ return Ve === void 0 && (Ve = Qr()), Ve;
412
412
  }
413
413
  let oe = null;
414
414
  const Yr = (r) => new Promise((t) => {
415
- if (Te(r) !== "image/jpeg")
415
+ if (Ne(r) !== "image/jpeg")
416
416
  return t(1);
417
417
  pr(r).then((a) => t(a || 1)).catch(() => t(1));
418
418
  }), Jr = async () => {
@@ -454,9 +454,9 @@ const Yr = (r) => new Promise((t) => {
454
454
  break;
455
455
  }
456
456
  return d.drawImage(e, 0, 0, o, l), c;
457
- }, Ne = async (r) => {
457
+ }, Qe = async (r) => {
458
458
  const t = await _r(r);
459
- return Te(r) === "image/jpeg" ? {
459
+ return Ne(r) === "image/jpeg" ? {
460
460
  dataUrl: t.toDataURL("image/jpeg", 1),
461
461
  height: t.height,
462
462
  width: t.width
@@ -3149,7 +3149,7 @@ const Yr = (r) => new Promise((t) => {
3149
3149
  "3E2B2E",
3150
3150
  "101820",
3151
3151
  "3D3935"
3152
- ], Ve = xt.map((r) => [
3152
+ ], ze = xt.map((r) => [
3153
3153
  parseInt(r.substring(0, 2), 16),
3154
3154
  parseInt(r.substring(2, 4), 16),
3155
3155
  parseInt(r.substring(4, 6), 16)
@@ -3172,7 +3172,7 @@ function Uc(r, t = 64) {
3172
3172
  const i = parseInt(r.substring(0, 2), 16), s = parseInt(r.substring(2, 4), 16), o = parseInt(r.substring(4, 6), 16);
3173
3173
  let l, c, d;
3174
3174
  for (let A = 0; A < xt.length; A++) {
3175
- l = Ve[A][0], c = Ve[A][1], d = Ve[A][2];
3175
+ l = ze[A][0], c = ze[A][1], d = ze[A][2];
3176
3176
  const u = Math.sqrt(Math.pow(i - l, 2) + Math.pow(s - c, 2) + Math.pow(o - d, 2));
3177
3177
  a.push(u);
3178
3178
  }
@@ -3187,16 +3187,16 @@ function Lc(r, t) {
3187
3187
  let Qt = null;
3188
3188
  function ei(r) {
3189
3189
  if (r.startsWith("#"))
3190
- return Ra(r);
3190
+ return Oa(r);
3191
3191
  if (!document)
3192
3192
  throw new Error("browserColorToHex is only supported on browsers");
3193
3193
  if (Qt || (Qt = document.createElement("canvas").getContext("2d")), !Qt)
3194
3194
  throw new Error("Failed to create canvas context required to convert colors");
3195
3195
  Qt.fillStyle = r;
3196
- const t = Ra(Qt.fillStyle);
3196
+ const t = Oa(Qt.fillStyle);
3197
3197
  return t || console.error(`Unknown browser color ${r}`), t;
3198
3198
  }
3199
- function Ra(r) {
3199
+ function Oa(r) {
3200
3200
  const t = r.substring(1).toUpperCase();
3201
3201
  return t.length === 6 ? t : t.length === 3 ? `${t[0]}${t[0]}${t[1]}${t[1]}${t[2]}${t[2]}` : "";
3202
3202
  }
@@ -3211,7 +3211,7 @@ const le = (r) => {
3211
3211
  return `icc-named-color(${t.slice(e + 1).slice(0, -4)}, ${r.namedColor})`;
3212
3212
  }
3213
3213
  return `icc-named-color(${r.profileName}, ${r.namedColor})`;
3214
- }, Oa = (r) => {
3214
+ }, $a = (r) => {
3215
3215
  const t = r.split(/[ ](?=[^)]*?(?:\(|$))/);
3216
3216
  if (t.length === 0)
3217
3217
  return { browserValue: "#000000" };
@@ -3245,7 +3245,7 @@ const le = (r) => {
3245
3245
  } catch {
3246
3246
  return r.classList.contains(t.substring(1));
3247
3247
  }
3248
- }, pa = (r, t = !1) => {
3248
+ }, fa = (r, t = !1) => {
3249
3249
  !t && r.setAttribute("preserveAspectRatio", "none");
3250
3250
  const e = [];
3251
3251
  kt(r, (a) => {
@@ -3255,7 +3255,7 @@ const le = (r) => {
3255
3255
  }
3256
3256
  if (a.tagName === "style") {
3257
3257
  try {
3258
- on(a.innerHTML).stylesheet?.rules.forEach((s) => {
3258
+ ln(a.innerHTML).stylesheet?.rules.forEach((s) => {
3259
3259
  e.push(s);
3260
3260
  }), a.remove();
3261
3261
  } catch (i) {
@@ -3328,12 +3328,12 @@ const le = (r) => {
3328
3328
  }
3329
3329
  });
3330
3330
  });
3331
- }, En = (r) => It().serializeToString(r), fa = (r, t, e, a, n) => {
3331
+ }, En = (r) => It().serializeToString(r), Ca = (r, t, e, a, n) => {
3332
3332
  const i = Sn(r);
3333
3333
  if (!i)
3334
3334
  throw new Error("Failed to read SVG.");
3335
3335
  return si(i, t, e), vn(i, a, n), En(i);
3336
- }, Ca = (r, t, e) => {
3336
+ }, wa = (r, t, e) => {
3337
3337
  const a = Sn(r);
3338
3338
  if (!a)
3339
3339
  throw new Error("Failed to read SVG.");
@@ -3345,18 +3345,18 @@ const le = (r) => {
3345
3345
  const e = oi(r).firstElementChild;
3346
3346
  if (!e)
3347
3347
  throw new Error("Failed to read SVG.");
3348
- pa(e);
3348
+ fa(e);
3349
3349
  const a = {};
3350
3350
  kt(e, (s) => {
3351
3351
  ai.includes(s.tagName) && !s.attributes.getNamedItem("fill") && s.setAttribute("fill", "black");
3352
3352
  const o = s.attributes.getNamedItem("fill");
3353
3353
  if (o && o.value !== "none" && !o.value.startsWith("url(")) {
3354
- const c = Oa(o.value), d = c.browserValue.replace(/\W/g, ""), A = `spiff-fill-${d}`;
3354
+ const c = $a(o.value), d = c.browserValue.replace(/\W/g, ""), A = `spiff-fill-${d}`;
3355
3355
  s.setAttribute("fill", c.browserValue), s.classList.add(A), a[d] = c;
3356
3356
  }
3357
3357
  const l = s.attributes.getNamedItem("stroke");
3358
3358
  if (l && l.value !== "none" && !l.value.startsWith("url(")) {
3359
- const c = Oa(l.value), d = c.browserValue.replace(/\W/g, ""), A = `spiff-stroke-${d}`;
3359
+ const c = $a(l.value), d = c.browserValue.replace(/\W/g, ""), A = `spiff-stroke-${d}`;
3360
3360
  s.classList.add(A), s.setAttribute("stroke", c.browserValue), a[d] = c;
3361
3361
  }
3362
3362
  });
@@ -3422,7 +3422,7 @@ const le = (r) => {
3422
3422
  ...AssetFields
3423
3423
  }
3424
3424
  }
3425
- `, wa = w`
3425
+ `, ya = w`
3426
3426
  fragment MaterialFields on Material {
3427
3427
  id
3428
3428
  name
@@ -3470,7 +3470,7 @@ const le = (r) => {
3470
3470
  }
3471
3471
  }
3472
3472
  `, di = w`
3473
- ${wa}
3473
+ ${ya}
3474
3474
  query GetMaterials($ids: [String]) {
3475
3475
  materials(id: $ids) {
3476
3476
  ...MaterialFields
@@ -3497,7 +3497,7 @@ const le = (r) => {
3497
3497
  ...AssetFields
3498
3498
  }
3499
3499
  }
3500
- `, be = async (r) => (await y.getShadowGraphqlClient().query({
3500
+ `, Be = async (r) => (await y.getShadowGraphqlClient().query({
3501
3501
  query: ci,
3502
3502
  errorPolicy: "all",
3503
3503
  fetchPolicy: "no-cache",
@@ -3525,7 +3525,7 @@ const le = (r) => {
3525
3525
  class gi {
3526
3526
  constructor() {
3527
3527
  this.cache = /* @__PURE__ */ new Map(), this.bgrmProcessCache = /* @__PURE__ */ new Map(), this.materialCache = /* @__PURE__ */ new Map(), this.loadImageAsFileInfo = async (t) => {
3528
- const e = await t.arrayBuffer(), a = await Ne(e), n = (i, s) => {
3528
+ const e = await t.arrayBuffer(), a = await Qe(e), n = (i, s) => {
3529
3529
  const o = atob(i.split(",")[1]), l = [];
3530
3530
  for (let c = 0; c < o.length; c++)
3531
3531
  l.push(o.charCodeAt(c));
@@ -3546,14 +3546,14 @@ class gi {
3546
3546
  if (!n) throw new V("Failed to get asset from cache!");
3547
3547
  return n;
3548
3548
  }
3549
- const a = (async () => (await be([t]))[0])();
3549
+ const a = (async () => (await Be([t]))[0])();
3550
3550
  return this.cache.set(t, a), a;
3551
3551
  }
3552
3552
  /**
3553
3553
  * Retrieves the asset from the server, bypassing cache (but still writing the result to cache)
3554
3554
  */
3555
3555
  async getFromServer(t) {
3556
- const a = (async () => (await be([t]))[0])();
3556
+ const a = (async () => (await Be([t]))[0])();
3557
3557
  return this.cache.set(t, a), a;
3558
3558
  }
3559
3559
  keyFromURL(t) {
@@ -3612,7 +3612,7 @@ class gi {
3612
3612
  }, a, n);
3613
3613
  }
3614
3614
  async uploadFile(t, e) {
3615
- const n = this.isRaster(t) ? ye.Image : ye.Illustration, i = await this.loadImageAsFileInfo(t);
3615
+ const n = this.isRaster(t) ? Se.Image : Se.Illustration, i = await this.loadImageAsFileInfo(t);
3616
3616
  return await this.uploadAssetWithProgress(i, n, e, !0);
3617
3617
  }
3618
3618
  async removeBackgroundFromAsset(t) {
@@ -3748,7 +3748,7 @@ const Rt = "persistentAssets", lt = class lt {
3748
3748
  };
3749
3749
  lt.callbacks = [];
3750
3750
  let At = lt;
3751
- const $a = "bgrmPersistentAssets";
3751
+ const Ua = "bgrmPersistentAssets";
3752
3752
  class J {
3753
3753
  static has(t) {
3754
3754
  return J.getMap().has(t);
@@ -3775,10 +3775,10 @@ class J {
3775
3775
  a && (e.delete(a), J.setMap(e));
3776
3776
  }
3777
3777
  static getMap() {
3778
- return k.getMap($a) || /* @__PURE__ */ new Map();
3778
+ return k.getMap(Ua) || /* @__PURE__ */ new Map();
3779
3779
  }
3780
3780
  static setMap(t) {
3781
- k.setMap($a, t);
3781
+ k.setMap(Ua, t);
3782
3782
  }
3783
3783
  }
3784
3784
  const O = new gi();
@@ -3850,7 +3850,7 @@ const Kt = new pi(), bn = w`
3850
3850
  }
3851
3851
  `, fi = w`
3852
3852
  ${ee(!1)}
3853
- ${wa}
3853
+ ${ya}
3854
3854
  ${bn}
3855
3855
  query GetOptions($ids: [String]!) {
3856
3856
  options(ids: $ids) {
@@ -3939,7 +3939,7 @@ const H = new Si(), Bn = w`
3939
3939
  currencyCode
3940
3940
  }
3941
3941
  }
3942
- `, Qe = w`
3942
+ `, Re = w`
3943
3943
  fragment AdditionalIntegrationProductFields on IntegrationProduct {
3944
3944
  id
3945
3945
  product {
@@ -3958,7 +3958,7 @@ const H = new Si(), Bn = w`
3958
3958
  }
3959
3959
  }
3960
3960
  `, vi = w`
3961
- ${Qe}
3961
+ ${Re}
3962
3962
  mutation CreateTransactions(
3963
3963
  $inputs: [TransactionCreateInput]!
3964
3964
  $marketplaceThemeInstallId: String
@@ -4066,7 +4066,7 @@ const H = new Si(), Bn = w`
4066
4066
  url
4067
4067
  }
4068
4068
  `, Ei = w`
4069
- ${Qe}
4069
+ ${Re}
4070
4070
  ${In}
4071
4071
  ${Pn}
4072
4072
  ${Bn}
@@ -4351,7 +4351,7 @@ const H = new Si(), Bn = w`
4351
4351
  }
4352
4352
  }
4353
4353
  `, Fn = (r) => w`
4354
- ${Qe}
4354
+ ${Re}
4355
4355
  fragment IntegrationProductFields on IntegrationProduct {
4356
4356
  id
4357
4357
  externalProductId
@@ -4588,7 +4588,7 @@ const H = new Si(), Bn = w`
4588
4588
  }
4589
4589
  `, Oi = (r) => w`
4590
4590
  ${ee(r)}
4591
- ${wa}
4591
+ ${ya}
4592
4592
  ${bn}
4593
4593
  ${Ti}
4594
4594
  ${Ni}
@@ -5028,7 +5028,7 @@ const H = new Si(), Bn = w`
5028
5028
  }
5029
5029
  }
5030
5030
  }
5031
- `, Re = w`
5031
+ `, Oe = w`
5032
5032
  fragment MarketplaceThemeInstallConfigurationFields on MarketplaceThemeInstallConfiguration {
5033
5033
  id
5034
5034
  themeInstallId
@@ -5108,7 +5108,7 @@ const H = new Si(), Bn = w`
5108
5108
  }
5109
5109
  }
5110
5110
  `, Li = w`
5111
- ${Re}
5111
+ ${Oe}
5112
5112
  query GetMarketplaceThemeInstallConfiguration($themeConfigurationId: String!, $themeInstallId: String!) {
5113
5113
  marketplaceThemeInstallConfiguration(id: $themeConfigurationId, themeInstallId: $themeInstallId, raw: false) {
5114
5114
  ...MarketplaceThemeInstallConfigurationFields
@@ -5116,7 +5116,7 @@ const H = new Si(), Bn = w`
5116
5116
  }
5117
5117
  `, Vi = w`
5118
5118
  ${Bn}
5119
- ${Re}
5119
+ ${Oe}
5120
5120
  query GetCurrentIntegration($themeConfigurationId: String) {
5121
5121
  currentIntegration {
5122
5122
  id
@@ -5128,7 +5128,7 @@ const H = new Si(), Bn = w`
5128
5128
  }
5129
5129
  }
5130
5130
  `, zi = w`
5131
- ${Re}
5131
+ ${Oe}
5132
5132
  query ReadTransactionForMarketplaceTheme($id: String!) {
5133
5133
  transactions(ids: [$id]) {
5134
5134
  marketplaceThemeInstallConfiguration(raw: false) {
@@ -5137,7 +5137,7 @@ const H = new Si(), Bn = w`
5137
5137
  }
5138
5138
  }
5139
5139
  `, Gi = w`
5140
- ${Re}
5140
+ ${Oe}
5141
5141
  query ReadBundleForMarketplaceTheme($id: String!) {
5142
5142
  bundles(ids: [$id]) {
5143
5143
  marketplaceThemeInstallConfiguration(raw: false) {
@@ -5348,7 +5348,7 @@ const M = () => {
5348
5348
  ...E,
5349
5349
  _renderingConfiguration: a,
5350
5350
  mask: l ? `url(#viewmask-${f})` : void 0
5351
- })), C = Sa(I);
5351
+ })), C = va(I);
5352
5352
  return /* @__PURE__ */ ct(
5353
5353
  "svg",
5354
5354
  {
@@ -5527,7 +5527,7 @@ const M = () => {
5527
5527
  }
5528
5528
  ) });
5529
5529
  }, Tn = (r) => {
5530
- const t = `spiff-group-clip-${r.id}`, e = r.rotation || 0, a = ft(e), n = Math.cos(a), i = -Math.sin(a), s = Sa(r.children);
5530
+ const t = `spiff-group-clip-${r.id}`, e = r.rotation || 0, a = ft(e), n = Math.cos(a), i = -Math.sin(a), s = va(r.children);
5531
5531
  return /* @__PURE__ */ ct(Gt, { children: [
5532
5532
  /* @__PURE__ */ D("defs", { children: /* @__PURE__ */ D("clipPath", { id: t, preserveAspectRatio: "none", children: r.clipPath ? /* @__PURE__ */ D("path", { d: r.clipPath }) : /* @__PURE__ */ D("rect", { x: 0, y: 0, width: r.width, height: r.height }) }) }),
5533
5533
  /* @__PURE__ */ ct(
@@ -5562,8 +5562,8 @@ const M = () => {
5562
5562
  if (!r.pattern)
5563
5563
  return "";
5564
5564
  if (r.pattern.svg) {
5565
- const A = Ca(r.pattern.svg, r.pattern.colors || {}, !1);
5566
- return ha(A);
5565
+ const A = wa(r.pattern.svg, r.pattern.colors || {}, !1);
5566
+ return ma(A);
5567
5567
  }
5568
5568
  return r.pattern.src;
5569
5569
  };
@@ -5698,38 +5698,38 @@ class Xi {
5698
5698
  }), a - n;
5699
5699
  }
5700
5700
  }
5701
- const Zi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", ze = /* @__PURE__ */ new Map(), Nt = async (r) => {
5702
- if (ze.has(r))
5703
- return ze.get(r);
5701
+ const Zi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Ge = /* @__PURE__ */ new Map(), Nt = async (r) => {
5702
+ if (Ge.has(r))
5703
+ return Ge.get(r);
5704
5704
  const e = (async () => {
5705
5705
  try {
5706
5706
  return Ct(r).getFont();
5707
5707
  } catch {
5708
5708
  if (Zi(r)) {
5709
- const a = pn(r), n = ta(a);
5710
- return sa(r, n), n;
5709
+ const a = pn(r), n = ea(a);
5710
+ return oa(r, n), n;
5711
5711
  } else {
5712
- const a = await Me(r, !0), n = ta(a);
5713
- return sa(r, n), await Rr(n, r), n;
5712
+ const a = await Te(r, !0), n = ea(a);
5713
+ return oa(r, n), await Rr(n, r), n;
5714
5714
  }
5715
5715
  }
5716
5716
  })();
5717
- return ze.set(r, e), e;
5717
+ return Ge.set(r, e), e;
5718
5718
  }, ts = (r) => {
5719
- const t = pn(r), e = ta(t);
5720
- return sa(r, e), e;
5719
+ const t = pn(r), e = ea(t);
5720
+ return oa(r, e), e;
5721
5721
  }, Ct = (r) => {
5722
5722
  const t = Nn.get(r);
5723
5723
  if (t)
5724
5724
  return t;
5725
5725
  throw new Error("Font metrics unavailable for font");
5726
- }, sa = (r, t) => {
5726
+ }, oa = (r, t) => {
5727
5727
  const e = new Xi(t);
5728
5728
  return Nn.set(r, e), e;
5729
5729
  }, Zc = async (r) => {
5730
5730
  const t = dt(), e = t.parseFromString(r, "image/svg+xml"), a = e.firstElementChild, n = /* @__PURE__ */ new Map();
5731
5731
  a.querySelectorAll("style").forEach((d) => {
5732
- on(d.innerHTML).stylesheet?.rules.forEach((u) => {
5732
+ ln(d.innerHTML).stylesheet?.rules.forEach((u) => {
5733
5733
  if (u.type === "font-face" && u.declarations) {
5734
5734
  const h = u.declarations.find(
5735
5735
  (p) => p.property === "font-family"
@@ -5760,8 +5760,8 @@ const Zi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", ze = /* @_
5760
5760
  h.appendChild(Q);
5761
5761
  }
5762
5762
  return e.querySelectorAll("text").forEach((d) => d.remove()), It().serializeToString(a);
5763
- }, Be = (r, t, e, a) => Math.max(rs(r.join(`
5764
- `), e, a), t), Ua = (r, t, e, a, n, i) => {
5763
+ }, Ie = (r, t, e, a) => Math.max(rs(r.join(`
5764
+ `), e, a), t), La = (r, t, e, a, n, i) => {
5765
5765
  const s = (i || On) * n.getApproximateHeight(), o = t.split(`
5766
5766
  `);
5767
5767
  try {
@@ -5770,7 +5770,7 @@ const Zi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", ze = /* @_
5770
5770
  lines: c,
5771
5771
  requiredHeight: l.flatMap((d) => d.lines).length * (a * s),
5772
5772
  fontSize: e,
5773
- requiredWidth: Be(c, r.width, a, n)
5773
+ requiredWidth: Ie(c, r.width, a, n)
5774
5774
  };
5775
5775
  } catch {
5776
5776
  const c = t.split("");
@@ -5778,7 +5778,7 @@ const Zi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", ze = /* @_
5778
5778
  lines: c,
5779
5779
  requiredHeight: c.length * (a * s),
5780
5780
  fontSize: e,
5781
- requiredWidth: Be(c, r.width, a, n)
5781
+ requiredWidth: Ie(c, r.width, a, n)
5782
5782
  };
5783
5783
  }
5784
5784
  }, ge = (r, t, e, a) => {
@@ -5818,7 +5818,7 @@ const Zi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", ze = /* @_
5818
5818
  }, as = (r, t, e, a) => {
5819
5819
  const n = Ct(t.fontData.assetUrl), i = n.getFont(), s = t.fontSize / i.unitsPerEm;
5820
5820
  if (!e)
5821
- return Ua(t, r, t.fontSize, s, n, a);
5821
+ return La(t, r, t.fontSize, s, n, a);
5822
5822
  let o;
5823
5823
  if (t.text ? o = t.text.split(`
5824
5824
  `) : o = t.input?.split(`
@@ -5826,22 +5826,22 @@ const Zi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", ze = /* @_
5826
5826
  return {
5827
5827
  lines: o,
5828
5828
  requiredHeight: t.height,
5829
- requiredWidth: Be(o, t.width, s, n),
5829
+ requiredWidth: Ie(o, t.width, s, n),
5830
5830
  fontSize: t.fontSize
5831
5831
  };
5832
5832
  const l = t.width !== e.width != (t.height !== e.height);
5833
5833
  return t.lineHeight === e.lineHeight && !l && e.input === r ? {
5834
5834
  lines: o,
5835
5835
  requiredHeight: t.height,
5836
- requiredWidth: Be(o, t.width, s, n),
5836
+ requiredWidth: Ie(o, t.width, s, n),
5837
5837
  fontSize: es(o, n, i, t.width, t.height, a)
5838
- } : Ua(t, r, t.fontSize, s, n, a);
5838
+ } : La(t, r, t.fontSize, s, n, a);
5839
5839
  }, ns = (r, t, e, a, n) => {
5840
5840
  const s = Ct(t.assetUrl).getFont();
5841
5841
  let o = { ...r };
5842
5842
  const l = { ...r }, c = Qn(a, e / s.unitsPerEm, Ct(t.assetUrl));
5843
5843
  return c && c < o.width && (l.width = c, n === "left" ? (l.left += Math.sin(o.rotation * Math.PI / 360) * (o.width - c), l.top += Math.sin(o.rotation * Math.PI / 180) * (c - o.width) / 2) : n === "right" ? l.left += o.width - c : l.left += (o.width - c) / 2, a && is(a, a).every(([d, A]) => d === A) && (o = l)), o;
5844
- }, Ge = 1, mt = (r, t, e) => {
5844
+ }, We = 1, mt = (r, t, e) => {
5845
5845
  let a = 0;
5846
5846
  const n = e.getGlyphs(r);
5847
5847
  return n.forEach((i, s) => {
@@ -5864,12 +5864,12 @@ const Zi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", ze = /* @_
5864
5864
  return r.forEach((n) => {
5865
5865
  a = Math.max(a, mt(n, t, e));
5866
5866
  }), a;
5867
- }, La = {
5867
+ }, Va = {
5868
5868
  stripControlCharacters: !0,
5869
5869
  vertical: !1,
5870
5870
  uppercase: !1
5871
- }, Ie = (r, t = La) => {
5872
- const e = { ...La, ...t };
5871
+ }, Pe = (r, t = Va) => {
5872
+ const e = { ...Va, ...t };
5873
5873
  let a = r || "";
5874
5874
  return e.stripControlCharacters && (a = a.replace(/^(?![\u000A\u000D])[\u0000-\u001F\u007F-\u009F]/g, "")), e.uppercase && (a = a.toUpperCase()), e.vertical && (a = a.split("").join(`
5875
5875
  `)), a;
@@ -6045,7 +6045,7 @@ const os = (r) => {
6045
6045
  {
6046
6046
  transform: i,
6047
6047
  dangerouslySetInnerHTML: {
6048
- __html: fa(
6048
+ __html: Ca(
6049
6049
  r.svg,
6050
6050
  r.width,
6051
6051
  r.height,
@@ -6121,7 +6121,7 @@ class As {
6121
6121
  layout: t,
6122
6122
  elements: e
6123
6123
  },
6124
- getComponentWithProps: (a) => ya(t, e, a)
6124
+ getComponentWithProps: (a) => Sa(t, e, a)
6125
6125
  };
6126
6126
  }
6127
6127
  initialize(t, e) {
@@ -6146,7 +6146,7 @@ class As {
6146
6146
  return { ...t, transaction: e.apply(a) };
6147
6147
  }
6148
6148
  }
6149
- const Un = (r) => r.type === x.Image ? /* @__PURE__ */ D(Mn, { ...r }, r.id) : r.type === x.Frame ? /* @__PURE__ */ D(_i, { ...r }, r.id) : r.type === x.Illustration ? /* @__PURE__ */ D(ds, { ...r }, r.id) : r.type === x.Textbox ? /* @__PURE__ */ D(os, { ...r }, r.id) : r.type === x.Group ? /* @__PURE__ */ D(Tn, { ...r }, r.id) : null, ya = (r, t, e) => {
6149
+ const Un = (r) => r.type === x.Image ? /* @__PURE__ */ D(Mn, { ...r }, r.id) : r.type === x.Frame ? /* @__PURE__ */ D(_i, { ...r }, r.id) : r.type === x.Illustration ? /* @__PURE__ */ D(ds, { ...r }, r.id) : r.type === x.Textbox ? /* @__PURE__ */ D(os, { ...r }, r.id) : r.type === x.Group ? /* @__PURE__ */ D(Tn, { ...r }, r.id) : null, Sa = (r, t, e) => {
6150
6150
  const a = e.renderingConfiguration, n = a?.removeExcludedElements ? t.filter((i) => !i.excludeFromExport) : t;
6151
6151
  return /* @__PURE__ */ D(
6152
6152
  Ki,
@@ -6177,7 +6177,7 @@ const Un = (r) => r.type === x.Image ? /* @__PURE__ */ D(Mn, { ...r }, r.id) : r
6177
6177
  }
6178
6178
  );
6179
6179
  };
6180
- function Sa(r) {
6180
+ function va(r) {
6181
6181
  return r.sort((t, e) => {
6182
6182
  const a = t.layer || 0, n = e.layer || 0;
6183
6183
  if (a < n) return -1;
@@ -6194,13 +6194,13 @@ const ne = (r) => {
6194
6194
  if (r.defaultVariant !== void 0)
6195
6195
  return t.find((e) => e.id === r.defaultVariant);
6196
6196
  }
6197
- }, ut = /* @__PURE__ */ new Map(), Vt = /* @__PURE__ */ new Map(), We = /* @__PURE__ */ new Map(), Ln = async (r, t) => {
6197
+ }, ut = /* @__PURE__ */ new Map(), Vt = /* @__PURE__ */ new Map(), qe = /* @__PURE__ */ new Map(), Ln = async (r, t) => {
6198
6198
  if (!t) {
6199
6199
  if (!r) throw new Error("No region or src supplied. Cannot construct frame!");
6200
- return oa(r);
6200
+ return la(r);
6201
6201
  }
6202
6202
  return nt(t);
6203
- }, oa = (r) => {
6203
+ }, la = (r) => {
6204
6204
  const t = r.width, e = r.height;
6205
6205
  return `<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 ${t} ${e}'>
6206
6206
  <path id="target-path" d='M0 0 h ${t} v ${e} h ${-t} Z' />
@@ -6215,9 +6215,9 @@ const ne = (r) => {
6215
6215
  if (!e.asset)
6216
6216
  throw new Error(`No asset for variant with ID: ${r.frameVariantId}`);
6217
6217
  return e;
6218
- }, Oe = async (r) => {
6219
- if (We.has(r))
6220
- return We.get(r);
6218
+ }, $e = async (r) => {
6219
+ if (qe.has(r))
6220
+ return qe.get(r);
6221
6221
  const e = (async () => {
6222
6222
  if (Vt.has(r))
6223
6223
  return Vt.get(r);
@@ -6253,8 +6253,8 @@ const ne = (r) => {
6253
6253
  }
6254
6254
  throw new Error("Malformed frame SVG");
6255
6255
  })();
6256
- return We.set(r, e), e;
6257
- }, va = (r, t, e, a) => {
6256
+ return qe.set(r, e), e;
6257
+ }, Ea = (r, t, e, a) => {
6258
6258
  const n = t.width / t.height, i = r.width / r.height;
6259
6259
  let s;
6260
6260
  a ? i > n ? s = t.height / r.height : s = t.width / r.width : i > n ? s = t.width / r.width : s = t.height / r.height, e?.scale !== void 0 && (s *= e?.scale);
@@ -6264,7 +6264,7 @@ const ne = (r) => {
6264
6264
  y: u,
6265
6265
  zoom: s
6266
6266
  };
6267
- }, la = async (r) => {
6267
+ }, ca = async (r) => {
6268
6268
  if (ut.has(r))
6269
6269
  return ut.get(r);
6270
6270
  if (r.startsWith("data:image/svg+xml")) {
@@ -6277,7 +6277,7 @@ const ne = (r) => {
6277
6277
  return ut.set(r, i), i;
6278
6278
  }
6279
6279
  if ((r.split(".").pop()?.toLowerCase() ?? "") === "svg") {
6280
- const e = await Ea(r), a = e.width, n = e.height, i = {
6280
+ const e = await ba(r), a = e.width, n = e.height, i = {
6281
6281
  src: r,
6282
6282
  width: a,
6283
6283
  height: n,
@@ -6285,7 +6285,7 @@ const ne = (r) => {
6285
6285
  };
6286
6286
  return ut.set(r, i), i;
6287
6287
  } else {
6288
- const e = await Me(r, !0), a = await Ne(e), n = {
6288
+ const e = await Te(r, !0), a = await Qe(e), n = {
6289
6289
  src: r,
6290
6290
  width: a.width,
6291
6291
  height: a.height,
@@ -6293,14 +6293,14 @@ const ne = (r) => {
6293
6293
  };
6294
6294
  return ut.set(r, n), n;
6295
6295
  }
6296
- }, Ea = async (r) => {
6296
+ }, ba = async (r) => {
6297
6297
  const t = await nt(r);
6298
6298
  return Vn(t);
6299
- }, Va = (r) => r.endsWith("mm") ? Number(r.replace("mm", "")) * 3.7795275591 : r.endsWith("px") ? Number(r.replace("px", "")) : Number(r), Vn = (r) => {
6299
+ }, za = (r) => r.endsWith("mm") ? Number(r.replace("mm", "")) * 3.7795275591 : r.endsWith("px") ? Number(r.replace("px", "")) : Number(r), Vn = (r) => {
6300
6300
  const a = dt().parseFromString(r, "image/svg+xml").querySelector("svg");
6301
6301
  if (!a)
6302
6302
  throw new Error("No svg tag found, this svg must be malformed!");
6303
- const n = a.getAttribute("viewBox"), i = a.getAttribute("width"), s = a.getAttribute("height"), o = s && i ? [0, 0, Va(i), Va(s)] : n?.split(" ").map((l) => Number(l));
6303
+ const n = a.getAttribute("viewBox"), i = a.getAttribute("width"), s = a.getAttribute("height"), o = s && i ? [0, 0, za(i), za(s)] : n?.split(" ").map((l) => Number(l));
6304
6304
  if (!o)
6305
6305
  throw new Error("No viewbox or width/height values detected on SVG file!");
6306
6306
  return {
@@ -6314,9 +6314,9 @@ const ne = (r) => {
6314
6314
  nt(r).then((e) => {
6315
6315
  t(e);
6316
6316
  }).catch((e) => console.error(e));
6317
- }), qe = /* @__PURE__ */ new Map(), _t = async (r) => {
6318
- if (qe.has(r))
6319
- return qe.get(r);
6317
+ }), je = /* @__PURE__ */ new Map(), _t = async (r) => {
6318
+ if (je.has(r))
6319
+ return je.get(r);
6320
6320
  const t = async (n) => new Promise((i, s) => {
6321
6321
  try {
6322
6322
  if (!(!!URL && !!URL.createObjectURL)) throw new Error("Environment incapable of generating ObjectURL");
@@ -6332,12 +6332,12 @@ const ne = (r) => {
6332
6332
  const s = dt().parseFromString(r, "image/svg+xml").firstElementChild;
6333
6333
  if (!s)
6334
6334
  throw new Error("Failed to read SVG");
6335
- const l = It().serializeToString(s), c = pt(), d = c.getContext("2d"), A = await Aa.from(d, l, {
6335
+ const l = It().serializeToString(s), c = pt(), d = c.getContext("2d"), A = await ua.from(d, l, {
6336
6336
  anonymousCrossOrigin: !0,
6337
6337
  ignoreDimensions: !1,
6338
6338
  createCanvas: pt,
6339
6339
  createImage: te,
6340
- DOMParser: ga(),
6340
+ DOMParser: pa(),
6341
6341
  fetch: rt
6342
6342
  }), u = s.getAttribute("width"), h = s.getAttribute("height"), m = 2048;
6343
6343
  if (h && u) {
@@ -6347,7 +6347,7 @@ const ne = (r) => {
6347
6347
  A.resize(m, m);
6348
6348
  return await A.render(), await t(c);
6349
6349
  })();
6350
- return qe.set(r, a), a;
6350
+ return je.set(r, a), a;
6351
6351
  }, Ut = async (r, t, e, a) => {
6352
6352
  const n = r.layoutState.layout.useEditableArea && r.layoutState.layout.editableArea || {
6353
6353
  width: r.layoutState.layout.width,
@@ -6369,7 +6369,7 @@ const ne = (r) => {
6369
6369
  o.height = o.width / f, o.top += (h - o.height) / 2;
6370
6370
  }
6371
6371
  if (e && t === x.Image) {
6372
- const l = o.height, c = await Me(e), d = await Ne(c), A = d.width / d.height;
6372
+ const l = o.height, c = await Te(e), d = await Qe(c), A = d.width / d.height;
6373
6373
  o.height = o.width / A, o.top += (l - o.height) / 2;
6374
6374
  }
6375
6375
  if (e && t === x.Textbox && a?.text && a?.fontScale) {
@@ -6381,7 +6381,7 @@ const ne = (r) => {
6381
6381
  };
6382
6382
  class td {
6383
6383
  static async getFrame(t, e) {
6384
- const a = await Ln(e.region, e.src), n = await Oe(a), i = e.region || await Ut(t, x.Frame);
6384
+ const a = await Ln(e.region, e.src), n = await $e(a), i = e.region || await Ut(t, x.Frame);
6385
6385
  return {
6386
6386
  id: M(),
6387
6387
  x: i.left,
@@ -6427,7 +6427,7 @@ class td {
6427
6427
  const { configuration: a, fontSrc: n, designInputStep: i } = e, s = await Nt(n), o = {
6428
6428
  assetUrl: n,
6429
6429
  name: s.names.fullName.en
6430
- }, l = i?.text || a.defaultText || "", c = a.replaceableText ? a.replaceableText.replace("{{}}", l) : l, d = Ie(c, {
6430
+ }, l = i?.text || a.defaultText || "", c = a.replaceableText ? a.replaceableText.replace("{{}}", l) : l, d = Pe(c, {
6431
6431
  vertical: a.vertical,
6432
6432
  uppercase: a.uppercase
6433
6433
  }), A = e.region || await Ut(t, x.Textbox, n, {
@@ -6545,13 +6545,13 @@ const $ = (r, t) => _(r, t).elements.find((n) => n.id === r), _ = (r, t) => {
6545
6545
  throw new L();
6546
6546
  return e;
6547
6547
  }, X = (r, t) => {
6548
- const e = [...t.elements.filter((n) => n.id !== r.id), r], a = Sa(e);
6548
+ const e = [...t.elements.filter((n) => n.id !== r.id), r], a = va(e);
6549
6549
  return {
6550
6550
  layout: t.layout,
6551
6551
  elements: a,
6552
6552
  modificationID: M()
6553
6553
  };
6554
- }, za = async (r) => {
6554
+ }, Ga = async (r) => {
6555
6555
  const t = [...Object.keys(r.layouts)], e = [...new Set(t)];
6556
6556
  for (let a = 0; a < e.length; a++) {
6557
6557
  const n = e[a], i = r.layouts[n];
@@ -6561,7 +6561,7 @@ const $ = (r, t) => _(r, t).elements.find((n) => n.id === r), _ = (r, t) => {
6561
6561
  const o = s;
6562
6562
  if (o.src && !o.svg) {
6563
6563
  const l = await nt(o.src), c = await ot(l);
6564
- o.svg = fa(
6564
+ o.svg = Ca(
6565
6565
  c.svg,
6566
6566
  o.width,
6567
6567
  o.height,
@@ -6611,7 +6611,7 @@ class N {
6611
6611
  this.oldState = t;
6612
6612
  }
6613
6613
  }
6614
- class Ga extends N {
6614
+ class Wa extends N {
6615
6615
  constructor(t) {
6616
6616
  super(), this.serializableWorkflow = t;
6617
6617
  }
@@ -6829,7 +6829,7 @@ class hs extends N {
6829
6829
  };
6830
6830
  }
6831
6831
  }
6832
- class je extends N {
6832
+ class He extends N {
6833
6833
  constructor(t, e) {
6834
6834
  super(), this.id = t, this.imageFill = e;
6835
6835
  }
@@ -6873,7 +6873,7 @@ class ms extends N {
6873
6873
  };
6874
6874
  }
6875
6875
  }
6876
- class Wa extends N {
6876
+ class qa extends N {
6877
6877
  constructor(t, e) {
6878
6878
  super(), this.id = t, this.fontData = e;
6879
6879
  }
@@ -7019,7 +7019,7 @@ class Cs extends N {
7019
7019
  };
7020
7020
  }
7021
7021
  }
7022
- class He extends N {
7022
+ class Ye extends N {
7023
7023
  constructor(t, e, a) {
7024
7024
  super(), this.id = t, this.strokeColor = e, this.strokeThickness = a;
7025
7025
  }
@@ -7042,7 +7042,7 @@ class He extends N {
7042
7042
  };
7043
7043
  }
7044
7044
  }
7045
- class ca extends N {
7045
+ class da extends N {
7046
7046
  constructor(t, e, a) {
7047
7047
  super(), this.id = t, this.className = e, this.fill = a;
7048
7048
  }
@@ -7211,7 +7211,7 @@ class ld extends N {
7211
7211
  };
7212
7212
  }
7213
7213
  }
7214
- class qa {
7214
+ class ja {
7215
7215
  constructor(t, e, a) {
7216
7216
  this.processRegion = async (n) => {
7217
7217
  const i = this.layouts.find((l) => l.panelId === n.panelId);
@@ -7221,7 +7221,7 @@ class qa {
7221
7221
  if (this.configuration.type === v.ProductOverlay) {
7222
7222
  let l = "";
7223
7223
  if (this.product?.overlayImageUrl && (l = this.product.overlayImageUrl), s = l, !l)
7224
- throw new Ee(this.configuration, "Couldn't find an asset for product overlay step");
7224
+ throw new be(this.configuration, "Couldn't find an asset for product overlay step");
7225
7225
  }
7226
7226
  const o = this.evaluateAssetType();
7227
7227
  if (o === x.Image) {
@@ -7292,7 +7292,7 @@ class qa {
7292
7292
  }
7293
7293
  async trigger() {
7294
7294
  if (!this.configuration.data.regions)
7295
- throw new Ee(this.configuration, "Missing regions.");
7295
+ throw new be(this.configuration, "Missing regions.");
7296
7296
  if (this.configuration.type === v.SilentIllustration) {
7297
7297
  const t = this.configuration.data.regions.map(this.processRegion);
7298
7298
  return Promise.all(t);
@@ -7320,7 +7320,7 @@ const ys = async (r) => {
7320
7320
  }
7321
7321
  })).json()).shortUrl;
7322
7322
  } catch (e) {
7323
- throw console.error(e), new ke("Failed to shorten URL, see console.");
7323
+ throw console.error(e), new Me("Failed to shorten URL, see console.");
7324
7324
  }
7325
7325
  };
7326
7326
  class Wn {
@@ -7365,7 +7365,7 @@ class Ss {
7365
7365
  }
7366
7366
  async regenerateQRCode(t, e, a, n) {
7367
7367
  const i = async () => {
7368
- const h = (await be([e]))[0], m = h?.versions?.find((g) => g.name === "mpeg4")?.link;
7368
+ const h = (await Be([e]))[0], m = h?.versions?.find((g) => g.name === "mpeg4")?.link;
7369
7369
  return { asset: h, link: m };
7370
7370
  }, s = await new Promise((h, m) => {
7371
7371
  new Wn(
@@ -7391,10 +7391,10 @@ class Ss {
7391
7391
  l.searchParams.append("video", btoa(JSON.stringify([s]))), l.pathname = l.pathname + (l.pathname.slice(-1) === "/" ? "" : "/");
7392
7392
  const c = l.toString();
7393
7393
  if (c.length >= 2e3)
7394
- throw new ke("Cannot create QR code, URL too long.");
7394
+ throw new Me("Cannot create QR code, URL too long.");
7395
7395
  const d = await ys(c);
7396
7396
  if (!n.data || !n.data.regions)
7397
- throw new Ee(n, "Missing regions.");
7397
+ throw new be(n, "Missing regions.");
7398
7398
  const A = await this.regionElements(n), u = await this.command(d, A, a, n.stepName);
7399
7399
  return u && (u.command && a.getCommandDispatcher()(u.command), u.followup && await u.followup()), await a.setSelectionsAndElements(n.stepName, [], A, async () => {
7400
7400
  a.updateStorage(n.stepName, {
@@ -7408,7 +7408,7 @@ class Ss {
7408
7408
  return t.data.regions.map(e);
7409
7409
  }
7410
7410
  async command(t, e, a, n) {
7411
- const i = a.getLayouts(), o = `data:image/svg+xml;base64,${btoa(await ln(t, { type: "svg" }))}`, l = e.map((c) => {
7411
+ const i = a.getLayouts(), o = `data:image/svg+xml;base64,${btoa(await cn(t, { type: "svg" }))}`, l = e.map((c) => {
7412
7412
  const d = c.region, A = i.find((u) => u.panelId === d?.panelId);
7413
7413
  if (!A && d)
7414
7414
  throw new Y(d);
@@ -7437,11 +7437,11 @@ class Ss {
7437
7437
  }
7438
7438
  }
7439
7439
  const qn = new Ss();
7440
- class Pe {
7440
+ class De {
7441
7441
  constructor() {
7442
7442
  this.frameSourceSvg = async (t, e) => {
7443
7443
  if (!t)
7444
- return oa(e);
7444
+ return la(e);
7445
7445
  const a = t.asset;
7446
7446
  if (!a)
7447
7447
  throw new bt(t);
@@ -7490,7 +7490,7 @@ class Pe {
7490
7490
  a.serializableWorkflow.steps
7491
7491
  ), l = Object.values(a.layouts).map((c) => c.elements).flat().filter((c) => c.stepName === t.stepName).map((c) => ({ id: c.id, region: c.stepRegion }));
7492
7492
  if (!t.option || (t.option.variants || []).length === 0) {
7493
- const c = t.data.regions.map((d) => oa(d));
7493
+ const c = t.data.regions.map((d) => la(d));
7494
7494
  e.updateStorage(t.stepName, {
7495
7495
  currentFrameSources: c
7496
7496
  });
@@ -7544,7 +7544,7 @@ class Pe {
7544
7544
  })) ?? [];
7545
7545
  }
7546
7546
  selectImage(t, e, a, n = !0) {
7547
- const i = Pe.patternSource(e), s = a.getStepStorage(t.stepName)?.framePatternSrc;
7547
+ const i = De.patternSource(e), s = a.getStepStorage(t.stepName)?.framePatternSrc;
7548
7548
  if (s && s === i)
7549
7549
  return Promise.resolve();
7550
7550
  a.setEditedStatus(t.stepName, !0);
@@ -7564,7 +7564,7 @@ class Pe {
7564
7564
  });
7565
7565
  },
7566
7566
  () => {
7567
- throw new ke("Failed to resolve transcoded PDF");
7567
+ throw new Me("Failed to resolve transcoded PDF");
7568
7568
  }
7569
7569
  )
7570
7570
  );
@@ -7608,7 +7608,7 @@ class Pe {
7608
7608
  }
7609
7609
  async loadPatternFromString(t, e, a = !0, n = void 0, i) {
7610
7610
  if (t.endsWith("svg")) {
7611
- const s = await Ea(t), o = s.width, l = s.height, c = await nt(t);
7611
+ const s = await ba(t), o = s.width, l = s.height, c = await nt(t);
7612
7612
  if (i) {
7613
7613
  const u = c.match(/<(image|linearGradient|radialGradient)(\s|>|\/>)/gim);
7614
7614
  if (u && u.length > 0)
@@ -7626,7 +7626,7 @@ class Pe {
7626
7626
  };
7627
7627
  ut.set(t, A), e.setPatternData(A, a);
7628
7628
  } else {
7629
- const s = await Me(t, !0), o = await Ne(s), l = {
7629
+ const s = await Te(t, !0), o = await Qe(s), l = {
7630
7630
  src: t,
7631
7631
  width: o.width,
7632
7632
  height: o.height,
@@ -7711,7 +7711,7 @@ class Pe {
7711
7711
  i && i(!0);
7712
7712
  const c = t.data.initialZoomLevel, d = await Promise.all(
7713
7713
  t.data.regions.map(async (h, m) => {
7714
- const g = await Oe(l[m]), p = o.getImageData(), f = a.map((P) => new Bt(P.id)), S = p ? va(
7714
+ const g = await $e(l[m]), p = o.getImageData(), f = a.map((P) => new Bt(P.id)), S = p ? Ea(
7715
7715
  p,
7716
7716
  g,
7717
7717
  c && !t.data.forceImageCover ? { scale: c } : void 0,
@@ -7775,7 +7775,7 @@ class Pe {
7775
7775
  throw new Yt(t);
7776
7776
  }
7777
7777
  async loadPatternFromAsset(t, e, a, n) {
7778
- const i = Pe.patternSource(t), s = a.markUpdatePending(), o = a.getWorkflowExperience().getStepById(e.stepName)?.frameService;
7778
+ const i = De.patternSource(t), s = a.markUpdatePending(), o = a.getWorkflowExperience().getStepById(e.stepName)?.frameService;
7779
7779
  if (!o)
7780
7780
  throw a.markUpdateCompleted(s), new Error("Frame service unavailable, cannot load pattern!");
7781
7781
  try {
@@ -7802,7 +7802,7 @@ class Pe {
7802
7802
  ), this.validateColorCount(e, a);
7803
7803
  }
7804
7804
  }
7805
- const St = new Pe();
7805
+ const St = new De();
7806
7806
  class vs {
7807
7807
  async getIllustrationBody(t) {
7808
7808
  return new Promise((e) => {
@@ -7907,10 +7907,10 @@ class vs {
7907
7907
  spotColor: A.spotColor,
7908
7908
  pmsValue: A.pmsValue
7909
7909
  };
7910
- const o = fa(t, e, a, s), l = await _t(o), c = [];
7910
+ const o = Ca(t, e, a, s), l = await _t(o), c = [];
7911
7911
  for (const d of n) {
7912
7912
  for (const [A, u] of i.entries())
7913
- c.push(new ca(d, A, u));
7913
+ c.push(new da(d, A, u));
7914
7914
  c.push(new ws(d, o, l));
7915
7915
  }
7916
7916
  return new R(c);
@@ -7957,7 +7957,7 @@ class vs {
7957
7957
  }
7958
7958
  async selectVariantCommand(t, e, a, n, i) {
7959
7959
  if (!t.data || !t.data.regions)
7960
- throw new Ee(t, "Missing regions.");
7960
+ throw new be(t, "Missing regions.");
7961
7961
  n(!0);
7962
7962
  const s = a.map((f) => new Bt(f.id));
7963
7963
  t.mandatory && i.setMandatoryFulfilled(t.stepName, !1);
@@ -8040,7 +8040,7 @@ class Es {
8040
8040
  async init(t, e, a) {
8041
8041
  const n = t.option;
8042
8042
  if (!n)
8043
- throw new ve(t);
8043
+ throw new Ee(t);
8044
8044
  if (a)
8045
8045
  await this.reload(t, e, a);
8046
8046
  else {
@@ -8056,7 +8056,7 @@ class Es {
8056
8056
  t.stepName,
8057
8057
  a.serializableWorkflow.steps
8058
8058
  ), o = Object.values(a.layouts).map((c) => c.elements).flat().filter((c) => c.stepName === t.stepName), l = t.option;
8059
- if (!l) throw new ve(t);
8059
+ if (!l) throw new Ee(t);
8060
8060
  if (n?.selectedVariants) {
8061
8061
  const c = n.selectedVariants[0].id;
8062
8062
  if (c) {
@@ -8115,7 +8115,7 @@ const jn = new Es();
8115
8115
  class bs {
8116
8116
  async init(t, e, a) {
8117
8117
  const n = t.option;
8118
- if (!n) throw new ve(t);
8118
+ if (!n) throw new Ee(t);
8119
8119
  if (a)
8120
8120
  await this.reload(t, e, a);
8121
8121
  else {
@@ -8293,7 +8293,7 @@ class Bs {
8293
8293
  }
8294
8294
  if (!/^$|^[a-zA-Z0-9 ]+$/.test(e))
8295
8295
  return n("Unsupported characters."), { input: e, helperData: {}, errorData: { unsupportedCharacters: !0 } };
8296
- const i = ea(e.toLowerCase());
8296
+ const i = aa(e.toLowerCase());
8297
8297
  for (const s of i)
8298
8298
  for (const o in a) {
8299
8299
  const l = a[o].toLowerCase().replace(/\s/g, "");
@@ -8467,14 +8467,14 @@ class Ds {
8467
8467
  const n = a.getLayouts(), s = (a.getRegionElements(e.stepName) || []).map((o) => {
8468
8468
  const l = o.region;
8469
8469
  if (!n.find((d) => d.panelId === l?.panelId)) throw new Y(l);
8470
- return new ca(o.id, this.shapeFillId, t);
8470
+ return new da(o.id, this.shapeFillId, t);
8471
8471
  }).filter((o) => !!o);
8472
8472
  a.getCommandDispatcher()(new R(s)), a.updateStorage(e.stepName, { colour: t });
8473
8473
  }
8474
8474
  async init(t, e, a) {
8475
8475
  const n = t.option;
8476
8476
  if (!n)
8477
- throw new ve(t);
8477
+ throw new Ee(t);
8478
8478
  if (a)
8479
8479
  await this.reload(t, e, a);
8480
8480
  else {
@@ -8533,7 +8533,7 @@ class Ds {
8533
8533
  if (!i.find((m) => m.panelId === A?.panelId))
8534
8534
  throw new Y(A);
8535
8535
  const h = o();
8536
- return new ca(d.id, this.shapeFillId, h);
8536
+ return new da(d.id, this.shapeFillId, h);
8537
8537
  }, c = a.map(l).filter((d) => !!d);
8538
8538
  return {
8539
8539
  command: new R(c),
@@ -8640,7 +8640,7 @@ class Fs {
8640
8640
  );
8641
8641
  }
8642
8642
  }
8643
- const xs = new Fs(), Ye = (r, t, e, a, n) => {
8643
+ const xs = new Fs(), Je = (r, t, e, a, n) => {
8644
8644
  if (t.some((d) => d == null))
8645
8645
  throw new Error(`Failed to autosize lines: ${t.join(", ")}`);
8646
8646
  let i = t.map((d) => d.split(`
@@ -8672,29 +8672,29 @@ const xs = new Fs(), Ye = (r, t, e, a, n) => {
8672
8672
  const o = Ct(t.assetUrl), l = o.getFont();
8673
8673
  if (n.size) {
8674
8674
  const u = r / l.unitsPerEm;
8675
- return [i, s] = Ye(e, a, r, u, o), [n.size, i, s];
8675
+ return [i, s] = Je(e, a, r, u, o), [n.size, i, s];
8676
8676
  }
8677
8677
  const c = 6;
8678
- let d = c - Ge;
8678
+ let d = c - We;
8679
8679
  if (a.length > 0) {
8680
8680
  let u = a, h = 0;
8681
8681
  for (; (!n.maxSize || d <= n.maxSize) && u; )
8682
- d += Ge, h = d / l.unitsPerEm, [u, s] = Ye(e, a, d, h, o);
8682
+ d += We, h = d / l.unitsPerEm, [u, s] = Je(e, a, d, h, o);
8683
8683
  }
8684
- d > c && (d -= Ge), n.minSize && d < n.minSize && (d = n.minSize);
8684
+ d > c && (d -= We), n.minSize && d < n.minSize && (d = n.minSize);
8685
8685
  const A = d / l.unitsPerEm;
8686
- return [i, s] = Ye(e, a, d, A, o), [d, i, s];
8687
- }, Je = 30;
8688
- class De extends Error {
8686
+ return [i, s] = Je(e, a, d, A, o), [d, i, s];
8687
+ }, Ke = 30;
8688
+ class Fe extends Error {
8689
8689
  constructor(t) {
8690
- super(t), Object.setPrototypeOf(this, new.target.prototype), this.name = De.name;
8690
+ super(t), Object.setPrototypeOf(this, new.target.prototype), this.name = Fe.name;
8691
8691
  }
8692
8692
  }
8693
8693
  const ks = ["‘", "’", "“", "”", `
8694
8694
  `];
8695
- class Fe extends Error {
8695
+ class xe extends Error {
8696
8696
  constructor(t) {
8697
- super(t), Object.setPrototypeOf(this, new.target.prototype), this.name = Fe.name;
8697
+ super(t), Object.setPrototypeOf(this, new.target.prototype), this.name = xe.name;
8698
8698
  }
8699
8699
  }
8700
8700
  class Ms {
@@ -8716,7 +8716,7 @@ class Ms {
8716
8716
  }, this.textAlign = (t) => t.vertical ? "center" : t.textAlign || "center", this.getErrorsForText = (t, e, a, n) => {
8717
8717
  let i;
8718
8718
  a.data && a.data.maxLength && e.length > a.data.maxLength && (i || (i = {}), i.hitCharacterLimit = !0);
8719
- const s = n.getProfanities(), o = ea(t.toLowerCase());
8719
+ const s = n.getProfanities(), o = aa(t.toLowerCase());
8720
8720
  for (const c of o)
8721
8721
  for (const d in s) {
8722
8722
  const A = s[d].toLowerCase().replace(/\s/g, "");
@@ -8736,7 +8736,7 @@ class Ms {
8736
8736
  if (a)
8737
8737
  await this.reload(t, e, a);
8738
8738
  else {
8739
- const i = this.getDefaultImageFillVariant(t.data), s = i?.asset?.fileLink, o = s ? await la(s) : void 0, l = o ? {
8739
+ const i = this.getDefaultImageFillVariant(t.data), s = i?.asset?.fileLink, o = s ? await ca(s) : void 0, l = o ? {
8740
8740
  src: o.src,
8741
8741
  height: o.height,
8742
8742
  width: o.width,
@@ -8843,7 +8843,7 @@ class Ms {
8843
8843
  const a = e.variants?.map((n) => n.asset?.fileLink)?.filter((n) => !!n) || [];
8844
8844
  return Promise.all(
8845
8845
  a.map(async (n) => {
8846
- const i = await la(n);
8846
+ const i = await ca(n);
8847
8847
  return {
8848
8848
  src: n,
8849
8849
  width: i.width,
@@ -8863,7 +8863,7 @@ class Ms {
8863
8863
  fillImage: e
8864
8864
  });
8865
8865
  for (const o of a) {
8866
- const l = new je(o.id, e);
8866
+ const l = new He(o.id, e);
8867
8867
  i(l);
8868
8868
  }
8869
8869
  }
@@ -8900,13 +8900,13 @@ class Ms {
8900
8900
  strokeColor: s
8901
8901
  });
8902
8902
  for (const o of a) {
8903
- const l = new He(o.id, s, t.data?.strokeThickness);
8903
+ const l = new Ye(o.id, s, t.data?.strokeThickness);
8904
8904
  i(l);
8905
8905
  }
8906
8906
  }
8907
8907
  getProcessedInput(t, e, a) {
8908
8908
  const n = a ? t : this.injectReplaceableText(t, e);
8909
- return Ie(n, {
8909
+ return Pe(n, {
8910
8910
  vertical: e.vertical,
8911
8911
  uppercase: e.uppercase
8912
8912
  });
@@ -8990,7 +8990,7 @@ class Ms {
8990
8990
  u,
8991
8991
  async () => {
8992
8992
  e.updateMetadata(t.stepName, { color: h, text: m }), e.updateStorage(t.stepName, { text: m, inputText: m });
8993
- const p = o.map((S) => new Wa(S.id, A)), f = new R(p);
8993
+ const p = o.map((S) => new qa(S.id, A)), f = new R(p);
8994
8994
  e.getCommandDispatcher()(f);
8995
8995
  }
8996
8996
  ), o.length === 0 && l) {
@@ -9093,20 +9093,20 @@ class Ms {
9093
9093
  async selectVariantCommand(t, e, a, n, i, s, o, l, c) {
9094
9094
  const d = i.markUpdatePending(), A = await this.fontDataFromVariant(e);
9095
9095
  if (n.length > 0) {
9096
- const u = n.map((g) => new Wa(g.id, A));
9096
+ const u = n.map((g) => new qa(g.id, A));
9097
9097
  if (l) {
9098
- const g = n.map((p) => new je(p.id, l));
9098
+ const g = n.map((p) => new He(p.id, l));
9099
9099
  u.push(...g);
9100
9100
  }
9101
9101
  if (c) {
9102
9102
  const g = n.map(
9103
- (p) => new He(p.id, c, t.data.strokeThickness)
9103
+ (p) => new Ye(p.id, c, t.data.strokeThickness)
9104
9104
  );
9105
9105
  u.push(...g);
9106
9106
  }
9107
9107
  const h = await this.changeInputTextWithRegion(
9108
9108
  t,
9109
- t.data.size || Je,
9109
+ t.data.size || Ke,
9110
9110
  A,
9111
9111
  a.text || "",
9112
9112
  a,
@@ -9131,7 +9131,7 @@ class Ms {
9131
9131
  i
9132
9132
  ), h = await this.changeInputTextWithRegion(
9133
9133
  t,
9134
- t.data.size || Je,
9134
+ t.data.size || Ke,
9135
9135
  A,
9136
9136
  u[0]?.newElement.input || a.text || t.data.defaultText || "",
9137
9137
  a,
@@ -9142,13 +9142,13 @@ class Ms {
9142
9142
  ), m = u.flatMap((p) => p.commands);
9143
9143
  if (l) {
9144
9144
  const p = u.map(
9145
- (f) => new je(f.regionElement.id, l)
9145
+ (f) => new He(f.regionElement.id, l)
9146
9146
  );
9147
9147
  m.push(...p);
9148
9148
  }
9149
9149
  if (c) {
9150
9150
  const p = n.map(
9151
- (f) => new He(f.id, c, t.data.strokeThickness)
9151
+ (f) => new Ye(f.id, c, t.data.strokeThickness)
9152
9152
  );
9153
9153
  m.push(...p);
9154
9154
  }
@@ -9175,7 +9175,7 @@ class Ms {
9175
9175
  const m = s.getLayouts().find((p) => p.panelId === u.panelId), g = M();
9176
9176
  try {
9177
9177
  if (!m)
9178
- throw new Fe("Failed to find layout for region: " + u.panelId);
9178
+ throw new xe("Failed to find layout for region: " + u.panelId);
9179
9179
  const p = a.colorOption;
9180
9180
  let f;
9181
9181
  if (p && p.variants) {
@@ -9189,7 +9189,7 @@ class Ms {
9189
9189
  stepName: t,
9190
9190
  align: this.textAlign(a),
9191
9191
  fill: i.color ? i.color : b,
9192
- fontSize: a.size || Je,
9192
+ fontSize: a.size || Ke,
9193
9193
  fontData: n,
9194
9194
  id: g,
9195
9195
  layer: u.layer,
@@ -9238,10 +9238,10 @@ class Ms {
9238
9238
  fontData: n
9239
9239
  };
9240
9240
  } catch (p) {
9241
- throw console.log(p), new De("Error adding font to region");
9241
+ throw console.log(p), new Fe("Error adding font to region");
9242
9242
  }
9243
9243
  }, A = await Promise.all(a.regions.map(d)).catch((u) => {
9244
- throw u instanceof De ? (xs.setLatestToast("Failed to load font.", $e.Error), u) : u instanceof Fe ? u : new Error(u);
9244
+ throw u instanceof Fe ? (xs.setLatestToast("Failed to load font.", Ue.Error), u) : u instanceof xe ? u : new Error(u);
9245
9245
  });
9246
9246
  return await s.setSelectionsAndElements(
9247
9247
  t,
@@ -9283,7 +9283,7 @@ class Ms {
9283
9283
  const S = (() => {
9284
9284
  if (t.data && t.data.maxLength && h.length > t.data.maxLength)
9285
9285
  return d && d(!0), { info: "0" };
9286
- const C = s.getProfanities(), E = ea(h.toLowerCase());
9286
+ const C = s.getProfanities(), E = aa(h.toLowerCase());
9287
9287
  for (const P of E)
9288
9288
  for (const B in C) {
9289
9289
  const F = C[B].toLowerCase().replace(/\s/g, "");
@@ -9353,7 +9353,7 @@ function Us(r, t, e, a) {
9353
9353
  const n = e / r, i = a / t;
9354
9354
  return n > 1 && i > 1 ? Math.min(n, i) : n > 1 && i < 1 ? i : n < 1 && i > 1 ? n : Math.min(n, i);
9355
9355
  }
9356
- const ja = {
9356
+ const Ha = {
9357
9357
  m: ["x", "y"],
9358
9358
  z: [],
9359
9359
  l: ["x", "y"],
@@ -9383,7 +9383,7 @@ class Ls {
9383
9383
  const n = (i) => {
9384
9384
  const s = [], o = i.relative ? i.type : i.type.toUpperCase();
9385
9385
  let l = e !== o;
9386
- const c = ja[i.type];
9386
+ const c = Ha[i.type];
9387
9387
  l && (s.push(o), e = o);
9388
9388
  for (const d of c) {
9389
9389
  const A = i[d];
@@ -9408,7 +9408,7 @@ class Ls {
9408
9408
  const e = /([mzlhvcsqta])([^mzlhvcsqta]*)/gi, a = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi, n = [];
9409
9409
  let i;
9410
9410
  for (e.lastIndex = 0; i = e.exec(t); ) {
9411
- const s = i[1].toLowerCase(), o = (i[2].match(a) || []).map(parseFloat), l = s === i[1], c = ja[s];
9411
+ const s = i[1].toLowerCase(), o = (i[2].match(a) || []).map(parseFloat), l = s === i[1], c = Ha[s];
9412
9412
  if (o.length < c.length)
9413
9413
  throw new Dt(
9414
9414
  `Path type "${s}" given ${o.length} arguments, expected ${c.length}.`
@@ -9570,7 +9570,7 @@ const re = w`
9570
9570
  bundleId: r
9571
9571
  }
9572
9572
  })).data.globalPropertyState, qs = (r) => w`
9573
- ${Qe}
9573
+ ${Re}
9574
9574
  fragment ProductFields on Product {
9575
9575
  id
9576
9576
  basePrice
@@ -9614,7 +9614,7 @@ const re = w`
9614
9614
  name
9615
9615
  }
9616
9616
  }
9617
- `, ba = (r) => w`
9617
+ `, Ba = (r) => w`
9618
9618
  ${qs(r)}
9619
9619
  fragment ProductCollectionProductFields on ProductCollectionProduct {
9620
9620
  id
@@ -9625,7 +9625,7 @@ const re = w`
9625
9625
  }
9626
9626
  }
9627
9627
  `, ie = (r, t = !1) => w`
9628
- ${r ? ba(t) : ""}
9628
+ ${r ? Ba(t) : ""}
9629
9629
  fragment ProductCollectionFields on ProductCollection {
9630
9630
  id
9631
9631
  name
@@ -9738,7 +9738,7 @@ const re = w`
9738
9738
  quoteId
9739
9739
  }
9740
9740
  }
9741
- `, Ha = w`
9741
+ `, Ya = w`
9742
9742
  query GetBundleStakeholders($id: String!) {
9743
9743
  bundles(ids: [$id]) {
9744
9744
  id
@@ -9813,7 +9813,7 @@ const re = w`
9813
9813
  }
9814
9814
  }
9815
9815
  `, Ys = w`
9816
- ${ba(!1)}
9816
+ ${Ba(!1)}
9817
9817
  query GetProductCollectionProducts($id: String!, $productIds: [String!]) {
9818
9818
  productCollections(ids: [$id], productIds: $productIds) {
9819
9819
  id
@@ -9846,7 +9846,7 @@ const re = w`
9846
9846
  }
9847
9847
  }
9848
9848
  `, Ks = w`
9849
- ${ba(!0)}
9849
+ ${Ba(!0)}
9850
9850
  query GetProductCollectionForProductsFeed(
9851
9851
  $id: String!
9852
9852
  $limit: Int
@@ -10227,9 +10227,9 @@ const re = w`
10227
10227
  }
10228
10228
  }
10229
10229
  `;
10230
- var $e = /* @__PURE__ */ ((r) => (r.Error = "Error", r.Warning = "Warning", r.Info = "Info", r))($e || {});
10230
+ var Ue = /* @__PURE__ */ ((r) => (r.Error = "Error", r.Warning = "Warning", r.Info = "Info", r))(Ue || {});
10231
10231
  const yo = 1e3;
10232
- class Ya extends xn {
10232
+ class Ja extends xn {
10233
10233
  constructor(t) {
10234
10234
  super(), this.createdAt = /* @__PURE__ */ new Date(), this.update = t;
10235
10235
  }
@@ -10661,9 +10661,9 @@ class So {
10661
10661
  ...this.storage,
10662
10662
  [t]: { ...this.storage[t], ...e }
10663
10663
  };
10664
- if (!cn(a, this.storage)) {
10664
+ if (!ye(a, this.storage)) {
10665
10665
  this.storage = a;
10666
- const n = new Ga(this.constructSerializableWorkflow());
10666
+ const n = new Wa(this.constructSerializableWorkflow());
10667
10667
  this.commandContext.apply(n, !0), this.onStepSpecificStorageChange(t), this.onStorageChange();
10668
10668
  }
10669
10669
  }
@@ -10682,7 +10682,7 @@ class So {
10682
10682
  if (this.readOnly) return;
10683
10683
  const t = this.serialize();
10684
10684
  this.workflowStatePromiseQueue.enqueue(
10685
- new Ya(async () => {
10685
+ new Ja(async () => {
10686
10686
  await new Promise((e) => {
10687
10687
  setTimeout(() => {
10688
10688
  e();
@@ -10699,7 +10699,7 @@ class So {
10699
10699
  async updateStateWithServerImmediate() {
10700
10700
  if (this.readOnly) return;
10701
10701
  const t = this.serialize();
10702
- return new Ya(async () => {
10702
+ return new Ja(async () => {
10703
10703
  await this.updateTransaction({
10704
10704
  variables: {
10705
10705
  id: this.transaction.id,
@@ -10761,10 +10761,10 @@ class So {
10761
10761
  return Promise.resolve({ stepElements: {}, commands: [] });
10762
10762
  const n = async (c, d, A) => {
10763
10763
  if (c.type === v.SilentIllustration) {
10764
- const u = await new qa(c, d).trigger();
10764
+ const u = await new ja(c, d).trigger();
10765
10765
  return { step: c, results: u };
10766
10766
  } else if (c.type === v.ProductOverlay) {
10767
- const u = await new qa(
10767
+ const u = await new ja(
10768
10768
  c,
10769
10769
  d,
10770
10770
  A
@@ -10869,7 +10869,7 @@ class So {
10869
10869
  }, this.removeElements(u);
10870
10870
  const g = this.workflow.steps.find((C) => C.stepName === t);
10871
10871
  g?.type === v.Frame && this.getWorkflowExperience().getStepById(g.stepName)?.frameService?.setTargetElements(a.map((E) => E.id));
10872
- const p = u.map((C) => new Bt(C.id)), f = new Ga(this.constructSerializableWorkflow()), S = [...m, ...p, f];
10872
+ const p = u.map((C) => new Bt(C.id)), f = new Wa(this.constructSerializableWorkflow()), S = [...m, ...p, f];
10873
10873
  S.length > 0 && this.commandContext.apply(new R(S), !0), await this.ensureStepsAreLoaded(), this.onElementsChange();
10874
10874
  const b = this.getInvalidModelVariants(), I = this.modelContainer;
10875
10875
  if (I) {
@@ -11412,7 +11412,7 @@ class Do extends Z {
11412
11412
  ...this.manager.getInformationResults(),
11413
11413
  {
11414
11414
  message: "An issue has occurred with text",
11415
- messageType: $e.Error,
11415
+ messageType: Ue.Error,
11416
11416
  stepID: this.step.stepName
11417
11417
  }
11418
11418
  ]);
@@ -11660,7 +11660,7 @@ class ko extends Z {
11660
11660
  ...this.manager.getInformationResults(),
11661
11661
  {
11662
11662
  message: e,
11663
- messageType: $e.Error,
11663
+ messageType: Ue.Error,
11664
11664
  stepID: this.step.stepName
11665
11665
  }
11666
11666
  ];
@@ -11832,7 +11832,7 @@ const No = async (r, t) => {
11832
11832
  headers: e
11833
11833
  }
11834
11834
  })).data?.designCreateMany;
11835
- }, Ja = (r, t, e) => {
11835
+ }, Ka = (r, t, e) => {
11836
11836
  const a = (i) => {
11837
11837
  const s = {};
11838
11838
  if (i.type === "Frame") {
@@ -11928,7 +11928,7 @@ const No = async (r, t) => {
11928
11928
  T.errors && console.log("Server Error:", et.message);
11929
11929
  }), null) : tt ?? null;
11930
11930
  })() || (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"));
11931
- const u = r.getPreviewService(), h = t?.finalizeStepConfig?.lookAtAnimation, m = u && t.showModelOnFinishStep && !!h, g = l && Ja(l, t, !0), p = l && Ja(l, t, !1), f = async (B) => {
11931
+ const u = r.getPreviewService(), h = t?.finalizeStepConfig?.lookAtAnimation, m = u && t.showModelOnFinishStep && !!h, g = l && Ka(l, t, !0), p = l && Ka(l, t, !1), f = async (B) => {
11932
11932
  const F = {};
11933
11933
  let Q = 0;
11934
11934
  if (Object.keys(i).length > 0)
@@ -11967,7 +11967,7 @@ const No = async (r, t) => {
11967
11967
  const B = await (await rt(E)).blob();
11968
11968
  E = (await O.uploadAsset(
11969
11969
  { name: `${n.id}-preview-image.png`, blob: B },
11970
- ye.Image,
11970
+ Se.Image,
11971
11971
  !0,
11972
11972
  !1
11973
11973
  )).fileLink;
@@ -12146,7 +12146,7 @@ class Uo {
12146
12146
  throw new V("Unexpected storage method requested");
12147
12147
  }
12148
12148
  }
12149
- const Ke = new Uo(), Lo = w`
12149
+ const _e = new Uo(), Lo = w`
12150
12150
  mutation AddTransactionStakeholder($id: String!, $type: String!, $details: CustomerDetailsInput!) {
12151
12151
  transactionAddStakeholder(id: $id, details: $details, type: $type) {
12152
12152
  id
@@ -12193,7 +12193,7 @@ var Go = /* @__PURE__ */ ((r) => (r.QuantityChanged = "QuantityChanged", r.Price
12193
12193
  class Wo {
12194
12194
  constructor(t, e) {
12195
12195
  if (this.cachedStepHandles = /* @__PURE__ */ new Map(), this.currentPriceBreak = 1, this.renderableScenes = [], this.renderableSceneCallbacks = [], this.eventCallbacks = /* @__PURE__ */ new Map(), this.debouncedSavedDesignUpdate = dn(async () => {
12196
- await Ke.getSavedDesignByTransaction(
12196
+ await _e.getSavedDesignByTransaction(
12197
12197
  this.getWorkflowManager().getTransaction().id
12198
12198
  ) && this.save();
12199
12199
  }, 2500), this.getCanvasObjectURLAsync = async (n) => new Promise((i, s) => {
@@ -12312,20 +12312,20 @@ class Wo {
12312
12312
  height: d.layoutState.layout.height
12313
12313
  }, u = this.commandContext.getLayoutById(d.layoutState.layout.id), h = s.getContext("2d");
12314
12314
  if (!h)
12315
- throw new ke("Failed to obtain 2D context for preview image creation");
12316
- const m = this.workflowManager.getTemplatingContext(), g = ya(u.layoutState.layout, u.layoutState.elements, {
12315
+ throw new Me("Failed to obtain 2D context for preview image creation");
12316
+ const m = this.workflowManager.getTemplatingContext(), g = Sa(u.layoutState.layout, u.layoutState.elements, {
12317
12317
  renderingConfiguration: {
12318
12318
  purpose: Ht.Print,
12319
12319
  region: { left: A.x, top: A.y, width: A.width, height: A.height },
12320
12320
  templatingContext: m
12321
12321
  }
12322
12322
  }), p = gn(g);
12323
- await (await Aa.from(h, p, {
12323
+ await (await ua.from(h, p, {
12324
12324
  anonymousCrossOrigin: !0,
12325
12325
  ignoreDimensions: !1,
12326
12326
  createCanvas: pt,
12327
12327
  createImage: te,
12328
- DOMParser: ga(),
12328
+ DOMParser: pa(),
12329
12329
  fetch
12330
12330
  })).render();
12331
12331
  const S = await this.getCanvasObjectURLAsync(s);
@@ -12483,7 +12483,7 @@ class Wo {
12483
12483
  const n = {
12484
12484
  title: await (async () => {
12485
12485
  if (t) return t;
12486
- const i = this.getWorkflowManager().getTransaction().id, o = (await Ke.getSavedDesigns()).find((l) => l.transactionId === i)?.title;
12486
+ const i = this.getWorkflowManager().getTransaction().id, o = (await _e.getSavedDesigns()).find((l) => l.transactionId === i)?.title;
12487
12487
  return o || "My design";
12488
12488
  })(),
12489
12489
  thumbnail: await this.createPreviewImage(!1, 256),
@@ -12494,7 +12494,7 @@ class Wo {
12494
12494
  workflowId: this.getWorkflowManager().getWorkflow().id,
12495
12495
  lastEdited: /* @__PURE__ */ new Date()
12496
12496
  };
12497
- return await Ke.addDesign(n), n;
12497
+ return await _e.addDesign(n), n;
12498
12498
  }
12499
12499
  async copy() {
12500
12500
  const t = Et(this.getCommandContext().getState());
@@ -12684,8 +12684,8 @@ const qo = (r) => {
12684
12684
  "tspan"
12685
12685
  ], Yo = async (r, t, e) => {
12686
12686
  const a = t.data, n = e.data.baseUrl, i = a.assetUrl.replace("localhost", "localstack"), s = n.slice(0, 4) === "http" ? "" : "https://", o = new URL(s + n);
12687
- o.searchParams.append("video", Qa(JSON.stringify([{ href: i }]))), o.pathname = o.pathname + (o.pathname.slice(-1) === "/" ? "" : "/");
12688
- const l = o.toString(), d = `data:image/svg+xml;base64,${Qa(await ln(l, { type: "svg" }))}`, A = (h) => {
12687
+ o.searchParams.append("video", Ra(JSON.stringify([{ href: i }]))), o.pathname = o.pathname + (o.pathname.slice(-1) === "/" ? "" : "/");
12688
+ const l = o.toString(), d = `data:image/svg+xml;base64,${Ra(await cn(l, { type: "svg" }))}`, A = (h) => {
12689
12689
  const m = r.find((p) => p.panelId === h.panelId);
12690
12690
  if (!m)
12691
12691
  throw new Y(h);
@@ -12710,15 +12710,15 @@ const qo = (r) => {
12710
12710
  return console.error(h), [];
12711
12711
  }
12712
12712
  }, Jo = async (r, t, e, a) => {
12713
- const n = e.data, i = n.assetUrl, s = await la(i);
12713
+ const n = e.data, i = n.assetUrl, s = await ca(i);
12714
12714
  try {
12715
12715
  const o = us(n, a.option);
12716
12716
  o && (t[a.stepName] = { selectedVariants: [o] });
12717
12717
  const l = async (c) => {
12718
- const d = await Ln(c, o?.asset?.fileLink), A = await Oe(d), u = M(), h = r.find((g) => g.panelId === c.panelId);
12718
+ const d = await Ln(c, o?.asset?.fileLink), A = await $e(d), u = M(), h = r.find((g) => g.panelId === c.panelId);
12719
12719
  if (!h)
12720
12720
  throw new Y(c);
12721
- const m = va(
12721
+ const m = Ea(
12722
12722
  s,
12723
12723
  A,
12724
12724
  {
@@ -12782,7 +12782,7 @@ const qo = (r) => {
12782
12782
  const l = await nt(o, !0), c = /<svg.*?<\/svg>/s, d = l.match(c) || [], A = d?.length > 0 ? d[0] : "", m = dt().parseFromString(A, "image/svg+xml").firstElementChild;
12783
12783
  if (!m)
12784
12784
  return console.error("Failed to read SVG."), [];
12785
- pa(m);
12785
+ fa(m);
12786
12786
  const g = {};
12787
12787
  kt(m, (C) => {
12788
12788
  Ho.includes(C.tagName) && !C.attributes.getNamedItem("fill") && C.setAttribute("fill", "#000000");
@@ -12996,7 +12996,7 @@ const qo = (r) => {
12996
12996
  const u = /<svg.*?<\/svg>/s, h = A.match(u) || [], m = h?.length > 0 ? h[0] : "", f = dt().parseFromString(m, "image/svg+xml").firstElementChild;
12997
12997
  if (!f)
12998
12998
  throw new Dt("Failed to read SVG.");
12999
- return pa(f), It().serializeToString(f);
12999
+ return fa(f), It().serializeToString(f);
13000
13000
  };
13001
13001
  l.forEach((A) => {
13002
13002
  const u = r.find((m) => m.panelId === A.panelId);
@@ -13046,7 +13046,7 @@ const qo = (r) => {
13046
13046
  assetUrl: p,
13047
13047
  name: f.names.fullName.en
13048
13048
  };
13049
- })(), A = (a.data.replaceableText ? a.data.replaceableText.replace("{{}}", i.text) : i.text) || "", u = Ie(A, {
13049
+ })(), A = (a.data.replaceableText ? a.data.replaceableText.replace("{{}}", i.text) : i.text) || "", u = Pe(A, {
13050
13050
  vertical: a.data.vertical,
13051
13051
  uppercase: a.data.uppercase
13052
13052
  }), h = async (p) => {
@@ -13084,7 +13084,7 @@ const qo = (r) => {
13084
13084
  d,
13085
13085
  p,
13086
13086
  [
13087
- Ie(u, {
13087
+ Pe(u, {
13088
13088
  vertical: a.data.vertical,
13089
13089
  uppercase: a.data.uppercase
13090
13090
  })
@@ -13332,12 +13332,12 @@ class ll extends xn {
13332
13332
  l = p.width, c = p.height;
13333
13333
  } else
13334
13334
  l = i.width, c = i.height;
13335
- const d = this.getWorkflowManager?.()?.getTemplatingContext(), A = ya(t.layoutState.layout, e, {
13335
+ const d = this.getWorkflowManager?.()?.getTemplatingContext(), A = Sa(t.layoutState.layout, e, {
13336
13336
  renderingConfiguration: {
13337
13337
  purpose: Ht.ThreeD,
13338
13338
  templatingContext: d
13339
13339
  }
13340
- }), u = gn(A), h = await Aa.from(this.ctx, u, {
13340
+ }), u = gn(A), h = await ua.from(this.ctx, u, {
13341
13341
  anonymousCrossOrigin: !0,
13342
13342
  ignoreDimensions: !this.nonPOTSupport,
13343
13343
  ignoreAnimation: !0,
@@ -13346,7 +13346,7 @@ class ll extends xn {
13346
13346
  enableRedraw: !1,
13347
13347
  createCanvas: pt,
13348
13348
  createImage: te,
13349
- DOMParser: ga(),
13349
+ DOMParser: pa(),
13350
13350
  fetch
13351
13351
  });
13352
13352
  h.resize(l, c), await h.render(), this.onRender();
@@ -13416,14 +13416,14 @@ class cl {
13416
13416
  case U.FileUpload:
13417
13417
  return new dl(this.bundle, t).initialize();
13418
13418
  case U.ColorOption:
13419
- return new Ka(
13419
+ return new _a(
13420
13420
  this.bundle,
13421
13421
  t,
13422
13422
  t.entityId ? await H.getOption(t.entityId) : void 0
13423
13423
  );
13424
13424
  case U.Option: {
13425
13425
  const e = t.entityId ? await H.getOption(t.entityId) : void 0;
13426
- return e?.type === "Color" ? new Ka(this.bundle, t, e) : new er(this.bundle, t, e);
13426
+ return e?.type === "Color" ? new _a(this.bundle, t, e) : new er(this.bundle, t, e);
13427
13427
  }
13428
13428
  case U.Text:
13429
13429
  return new Al(this.bundle, t);
@@ -13432,7 +13432,7 @@ class cl {
13432
13432
  }
13433
13433
  }
13434
13434
  }
13435
- class Ba {
13435
+ class Ia {
13436
13436
  constructor(t, e) {
13437
13437
  this.bundle = t, this.property = e;
13438
13438
  }
@@ -13493,7 +13493,7 @@ class Ba {
13493
13493
  return this.bundle.getGlobalPropertyStateManager().getAspect(this.property.name);
13494
13494
  }
13495
13495
  }
13496
- class dl extends Ba {
13496
+ class dl extends Ia {
13497
13497
  constructor(t, e) {
13498
13498
  super(t, e);
13499
13499
  }
@@ -13504,7 +13504,7 @@ class dl extends Ba {
13504
13504
  const t = await this.getImage();
13505
13505
  if (t?.fileLink)
13506
13506
  if (t?.fileLink.endsWith(".svg")) {
13507
- const e = await nt(t?.fileLink), a = await Ea(t?.fileLink), n = a.width, i = a.height, s = await ot(e);
13507
+ const e = await nt(t?.fileLink), a = await ba(t?.fileLink), n = a.width, i = a.height, s = await ot(e);
13508
13508
  this.bundle.getGlobalPropertyStateManager().getAspectStorage(this.property.name)?.colors?.forEach((c) => {
13509
13509
  s.colors[c.key] = {
13510
13510
  browserValue: c.browserValue,
@@ -13547,7 +13547,7 @@ class dl extends Ba {
13547
13547
  ]);
13548
13548
  }
13549
13549
  async canUseBackgroundRemover() {
13550
- return this.bundle.getClient().canUseAddon(ua.BackgroundRemover);
13550
+ return this.bundle.getClient().canUseAddon(ha.BackgroundRemover);
13551
13551
  }
13552
13552
  /**
13553
13553
  * Removes the background from an image, stores it in the state, and returns the new asset.
@@ -13585,7 +13585,7 @@ class dl extends Ba {
13585
13585
  return O.getLocalOrFromServer(t);
13586
13586
  }
13587
13587
  async getImageWithColors() {
13588
- return await this.loadImageData(), this.imageData?.svg ? ha(Ca(this.imageData.svg, this.imageData.colors ?? {}, !1)) : this.imageData?.src;
13588
+ return await this.loadImageData(), this.imageData?.svg ? ma(wa(this.imageData.svg, this.imageData.colors ?? {}, !1)) : this.imageData?.src;
13589
13589
  }
13590
13590
  /**
13591
13591
  * Retrieves the original, unmodified image selection, if one exists.
@@ -13719,7 +13719,7 @@ class dl extends Ba {
13719
13719
  );
13720
13720
  }
13721
13721
  }
13722
- class Al extends Ba {
13722
+ class Al extends Ia {
13723
13723
  constructor(t, e) {
13724
13724
  super(t, e);
13725
13725
  }
@@ -13758,7 +13758,7 @@ class Al extends Ba {
13758
13758
  await Promise.all(n);
13759
13759
  }
13760
13760
  }
13761
- class er extends Ba {
13761
+ class er extends Ia {
13762
13762
  constructor(t, e, a) {
13763
13763
  super(t, e), this.optionResource = a;
13764
13764
  }
@@ -13820,7 +13820,7 @@ class er extends Ba {
13820
13820
  await Promise.all(n);
13821
13821
  }
13822
13822
  }
13823
- class Ka extends er {
13823
+ class _a extends er {
13824
13824
  constructor(t, e, a) {
13825
13825
  super(t, e, a);
13826
13826
  }
@@ -13978,7 +13978,7 @@ class ml {
13978
13978
  storage: a !== null ? a : void 0,
13979
13979
  channel: n
13980
13980
  });
13981
- await this.updateGlobalPropertyState(), await this.onGlobalPropertyStateChange(s, this.globalPropertyState);
13981
+ ye(s, this.globalPropertyState) || (await this.updateGlobalPropertyState(), await this.onGlobalPropertyStateChange(s, this.globalPropertyState));
13982
13982
  }
13983
13983
  async setAspectStorage(t, e, a) {
13984
13984
  if (!this.globalPropertyState)
@@ -14005,7 +14005,7 @@ class ml {
14005
14005
  storage: e !== null ? e : void 0,
14006
14006
  channel: a
14007
14007
  });
14008
- await this.updateGlobalPropertyState(), await this.onGlobalPropertyStateChange(i, this.globalPropertyState);
14008
+ ye(i, this.globalPropertyState) || (await this.updateGlobalPropertyState(), await this.onGlobalPropertyStateChange(i, this.globalPropertyState));
14009
14009
  }
14010
14010
  async updateGlobalPropertyState() {
14011
14011
  if (!this.globalPropertyState)
@@ -14685,7 +14685,7 @@ const bl = w`
14685
14685
  }
14686
14686
  }
14687
14687
  `;
14688
- class _e {
14688
+ class Xe {
14689
14689
  constructor(t, e, a, n, i, s) {
14690
14690
  this.workflowExperiences = [], this.eventEmitter = new El(), this.updatesLocked = !1, this.client = t, this.id = e.id, this.name = e.name || "", this.dispatchDate = e.dispatchDate, this.template = e.template || !1, this.quoteId = e.quoteId, this.shareActions = e.bundleShareActions, this.workflowViewerLink = e.workflowViewerLink, this.workflowViewerAmendLink = e.workflowViewerAmendLink, this.ownerId = i, this.metadata = new Map(e.metadata?.map((c) => [c.key, c.value]) || []), this.completed = e.completed ?? !1, this.productCollection = e.productCollection, this.bundleStateManager = new gl(e.bundleStateData);
14691
14691
  const o = this.productCollection?.globalPropertyConfiguration;
@@ -14843,7 +14843,7 @@ class _e {
14843
14843
  if (i)
14844
14844
  switch (a.type) {
14845
14845
  case U.FileUpload: {
14846
- const s = i, o = await be([a.value]);
14846
+ const s = i, o = await Be([a.value]);
14847
14847
  o.length > 0 && await s.selectImage(o[0]);
14848
14848
  const l = a.storage?.colors;
14849
14849
  if (l) {
@@ -15100,7 +15100,7 @@ class _e {
15100
15100
  variables: {
15101
15101
  id: this.id,
15102
15102
  details: t,
15103
- type: e || Se.Owner
15103
+ type: e || ve.Owner
15104
15104
  },
15105
15105
  context: {
15106
15106
  bundleOwnerId: this.ownerId
@@ -15139,7 +15139,7 @@ class _e {
15139
15139
  }
15140
15140
  async getAllStakeholders() {
15141
15141
  const t = await y.getShadowGraphqlClient().query({
15142
- query: Ha,
15142
+ query: Ya,
15143
15143
  errorPolicy: "all",
15144
15144
  fetchPolicy: "no-cache",
15145
15145
  variables: {
@@ -15155,7 +15155,7 @@ class _e {
15155
15155
  }
15156
15156
  async getCurrentStakeholder() {
15157
15157
  const t = await y.getShadowGraphqlClient().query({
15158
- query: Ha,
15158
+ query: Ya,
15159
15159
  errorPolicy: "all",
15160
15160
  fetchPolicy: "no-cache",
15161
15161
  variables: {
@@ -15567,7 +15567,7 @@ class ue {
15567
15567
  return this.getArtifacts().get(t);
15568
15568
  }
15569
15569
  }
15570
- class Ia {
15570
+ class Pa {
15571
15571
  constructor(t) {
15572
15572
  this.value = t;
15573
15573
  }
@@ -15580,12 +15580,12 @@ class Ia {
15580
15580
  }
15581
15581
  }
15582
15582
  var xl = /* @__PURE__ */ ((r) => (r.Transaction = "Transaction", r.Bundle = "Bundle", r.Product = "Product", r.Variant = "Variant", r.Option = "Option", r.LineItem = "LineItem", r.Asset = "Asset", r))(xl || {});
15583
- class hd extends Ia {
15583
+ class hd extends Pa {
15584
15584
  constructor(t) {
15585
15585
  super(`"${t}"`);
15586
15586
  }
15587
15587
  }
15588
- class rr extends Ia {
15588
+ class rr extends Pa {
15589
15589
  constructor(t, e) {
15590
15590
  if (e !== "Asset" && !rr.validUUID(t))
15591
15591
  throw new Error("Invalid ID, must be a valid v4 UUID. https://www.uuidgenerator.net/");
@@ -15595,12 +15595,12 @@ class rr extends Ia {
15595
15595
  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);
15596
15596
  }
15597
15597
  }
15598
- class md extends Ia {
15598
+ class md extends Pa {
15599
15599
  constructor(t) {
15600
15600
  super(`[${t.map((e) => e.getRaw()).join(",")}]`);
15601
15601
  }
15602
15602
  }
15603
- class _a {
15603
+ class Xa {
15604
15604
  constructor(t) {
15605
15605
  this.integrationProduct = t;
15606
15606
  }
@@ -15788,7 +15788,7 @@ class Ql {
15788
15788
  }
15789
15789
  async generateCode(t) {
15790
15790
  const e = await this.cognitoClient?.send(
15791
- new xa({
15791
+ new ka({
15792
15792
  AuthFlow: "CUSTOM_AUTH",
15793
15793
  ClientId: this.userPoolClientId,
15794
15794
  AuthParameters: {
@@ -15822,7 +15822,7 @@ class Ql {
15822
15822
  throw new Error("Failed to find existing tokens.");
15823
15823
  const e = JSON.parse(t);
15824
15824
  return await this.cognitoClient?.send(
15825
- new xa({
15825
+ new ka({
15826
15826
  AuthFlow: "REFRESH_TOKEN_AUTH",
15827
15827
  ClientId: this.userPoolClientId,
15828
15828
  AuthParameters: {
@@ -15852,7 +15852,7 @@ class Rl {
15852
15852
  * @param currency The currency to determine precision for.
15853
15853
  */
15854
15854
  getPrecisionForCurrency(t) {
15855
- const e = t, a = ka.code(e);
15855
+ const e = t, a = Ma.code(e);
15856
15856
  return a ? a.digits : 2;
15857
15857
  }
15858
15858
  /**
@@ -15863,11 +15863,11 @@ class Rl {
15863
15863
  */
15864
15864
  getSpecialFormat(t) {
15865
15865
  const e = t;
15866
- if (ka.code(e)?.code === "CLP")
15866
+ if (Ma.code(e)?.code === "CLP")
15867
15867
  return "USD0,0";
15868
15868
  }
15869
15869
  }
15870
- const Xa = new Rl();
15870
+ const Za = new Rl();
15871
15871
  class Ol {
15872
15872
  constructor(t, e, a, n) {
15873
15873
  this.presentmentCurrency = void 0, this.presentmentCurrency = n, this.partnerCurrency = a, this.rateFrom = t, this.rateTo = e;
@@ -15899,13 +15899,13 @@ class Ol {
15899
15899
  * Converts a monetary value from the database to the units of its currency.
15900
15900
  */
15901
15901
  units(t, e) {
15902
- return t / Math.pow(10, Xa.getPrecisionForCurrency(e));
15902
+ return t / Math.pow(10, Za.getPrecisionForCurrency(e));
15903
15903
  }
15904
15904
  /**
15905
15905
  * Converts a monetary value in units to the subunits of its currency.
15906
15906
  */
15907
15907
  subunits(t, e) {
15908
- return t * Math.pow(10, Xa.getPrecisionForCurrency(e));
15908
+ return t * Math.pow(10, Za.getPrecisionForCurrency(e));
15909
15909
  }
15910
15910
  }
15911
15911
  const $l = async (r, t) => {
@@ -15972,7 +15972,7 @@ class pd {
15972
15972
  } catch (a) {
15973
15973
  throw console.error(a), new ht("Critical - Unable to synchronize workflow state with server.");
15974
15974
  }
15975
- }, this.options = t, this.options.applicationKey && Vr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 32.2.4-beta.2a1f0ff0-c7c4-56e0-afbf-fd744926c42c"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
15975
+ }, this.options = t, this.options.applicationKey && Vr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 32.2.4-beta.37bc688d-3d85-536a-ba61-02a441df130e"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
15976
15976
  }
15977
15977
  configure(t) {
15978
15978
  gt.setHubUrl(t.hubUrl), gt.setServerUrl(t.serverUrl), gt.setServicesApiUrl(t.servicesApiUrl), this.marketplaceThemeInstallId = t.marketplaceThemeInstallId, this.marketplaceThemeInstallConfigurationId = t.marketplaceThemeInstallConfigurationId, this.userPoolClientId = t.userPoolClientId, this.userPoolRegion = t.userPoolRegion, this.spiffRegion = t.spiffRegion, t.bearerAuthenticationToken && Gr(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration(), this.spiffRegion && this.userPoolRegion && this.userPoolClientId && Lt.init(this.spiffRegion, this.userPoolRegion, this.userPoolClientId);
@@ -16022,7 +16022,7 @@ class pd {
16022
16022
  */
16023
16023
  async authenticateBundleFromLocalStorage(t) {
16024
16024
  if (k.getMap("bundleOwnerIds")?.has(t))
16025
- return Promise.resolve({ success: !0, stakeholderType: Se.Owner });
16025
+ return Promise.resolve({ success: !0, stakeholderType: ve.Owner });
16026
16026
  const a = k.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
16027
16027
  if (a.has(t)) {
16028
16028
  const n = a.get(t);
@@ -16066,7 +16066,7 @@ class pd {
16066
16066
  if (n.isOrdered)
16067
16067
  return Promise.resolve({ success: !1, transactionReadOnly: !0 });
16068
16068
  if (k.getMap("transactionOwnerIds")?.has(t))
16069
- return Promise.resolve({ success: !0, stakeholderType: Se.Owner });
16069
+ return Promise.resolve({ success: !0, stakeholderType: ve.Owner });
16070
16070
  const o = k.getMap("transactionCustomerIds");
16071
16071
  if (o?.has(t) && o.get(t) && await this.reloadLoggedInCustomer()) {
16072
16072
  const u = this.customer?.bundleStakeholders?.find(
@@ -16272,7 +16272,7 @@ class pd {
16272
16272
  s.set(i.id, i.partner.id), k.setMap("bundlePartnerIds", s);
16273
16273
  const o = k.getMap("bundleOwnerIds") || /* @__PURE__ */ new Map();
16274
16274
  o.set(i.id, i.bundleOwnerId), k.setMap("bundleOwnerIds", o);
16275
- const l = new _e(this, i, void 0, void 0, i.bundleOwnerId, {
16275
+ const l = new Xe(this, i, void 0, void 0, i.bundleOwnerId, {
16276
16276
  eagerFetchProducts: a?.graphql?.productCollection?.eagerFetchProducts
16277
16277
  });
16278
16278
  return await l.getInitializationPromise(), l;
@@ -16312,7 +16312,7 @@ class pd {
16312
16312
  throw new Error(`Unable to find bundle: ${t}`);
16313
16313
  const d = c.data?.bundles[0], A = k.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
16314
16314
  A.set(d.id, d.partner.id), k.setMap("bundlePartnerIds", A);
16315
- const u = new _e(this, d, e, a, s, {
16315
+ const u = new Xe(this, d, e, a, s, {
16316
16316
  additionalHeaders: n?.graphql?.additionalHeaders,
16317
16317
  eagerFetchProducts: n?.graphql?.productCollection?.eagerFetchProducts,
16318
16318
  existingGlobalPropertyState: c.data.globalPropertyState,
@@ -16359,7 +16359,7 @@ class pd {
16359
16359
  d.set(c.id, c.partner.id), k.setMap("bundlePartnerIds", d);
16360
16360
  const A = k.getMap("bundleOwnerIds") || /* @__PURE__ */ new Map();
16361
16361
  return A.set(c.id, c.bundleOwnerId), k.setMap("bundleOwnerIds", A), async () => {
16362
- const u = new _e(this, c, void 0, void 0, c.bundleOwnerId, {
16362
+ const u = new Xe(this, c, void 0, void 0, c.bundleOwnerId, {
16363
16363
  eagerFetchProducts: n?.graphql?.productCollection?.eagerFetchProducts,
16364
16364
  existingGlobalPropertyState: c.globalPropertyState
16365
16365
  });
@@ -16484,7 +16484,7 @@ class pd {
16484
16484
  }));
16485
16485
  }, s = t.map((C, E) => ({ option: C, index: E })), o = s.filter((C) => C.option.type === "transaction"), l = s.filter(
16486
16486
  (C) => C.option.type === "integration" || C.option.type === "external"
16487
- ), c = Fa(o, 10), d = Fa(l, 10), A = (await Promise.all([
16487
+ ), c = xa(o, 10), d = xa(l, 10), A = (await Promise.all([
16488
16488
  ...c.map(n),
16489
16489
  ...d.map(i)
16490
16490
  ])).flat(), u = [...new Set(A.map((C) => C.workflowId))], h = await ir(u, e), m = new Map(h.map((C) => [C.id, C])), g = k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map(), p = A.map(async (C) => {
@@ -16511,10 +16511,10 @@ class pd {
16511
16511
  };
16512
16512
  if (T.type === "transaction" && E.workflowState) {
16513
16513
  const q = JSON.parse(E.workflowState);
16514
- W.layouts = Object.values(q.layouts || {}).map((wt) => wt.layout), await za(q), W.reloadedState = q;
16514
+ W.layouts = Object.values(q.layouts || {}).map((wt) => wt.layout), await Ga(q), W.reloadedState = q;
16515
16515
  } else if (!B && T.workflowState) {
16516
16516
  const q = JSON.parse(T.workflowState);
16517
- W.layouts = Object.values(q.layouts || {}).map((wt) => wt.layout), await za(q), W.reloadedState = q;
16517
+ W.layouts = Object.values(q.layouts || {}).map((wt) => wt.layout), await Ga(q), W.reloadedState = q;
16518
16518
  } else
16519
16519
  W.layouts = Vl(
16520
16520
  W.transaction,
@@ -16546,7 +16546,7 @@ class pd {
16546
16546
  })).data?.integrationProducts;
16547
16547
  if (!i || i.length === 0 || !i[0]?.id)
16548
16548
  throw new Error("Integration product not found.");
16549
- return new _a(i[0]);
16549
+ return new Xa(i[0]);
16550
16550
  }
16551
16551
  async getIntegrationProductFromExternalIds(t, e, a) {
16552
16552
  const s = (await y.getShadowGraphqlClient().query({
@@ -16560,7 +16560,7 @@ class pd {
16560
16560
  })).data?.integrationProductFromExternalIds;
16561
16561
  if (!s?.id)
16562
16562
  throw new Error("Integration product not found.");
16563
- return new _a(s);
16563
+ return new Xa(s);
16564
16564
  }
16565
16565
  async getIntegrationProduct(t) {
16566
16566
  return t.type === "integration" ? this.getIntegrationProductById(t.integrationProductId) : this.getIntegrationProductFromExternalIds(t.externalIntegrationId, t.externalProductId);
@@ -16677,8 +16677,8 @@ class Wl {
16677
16677
  if (n.currentFrameSources) {
16678
16678
  let i = !1;
16679
16679
  for (let s = 0; s < n.currentFrameSources.length; s++) {
16680
- const o = n.currentFrameSources[s], l = await Oe(o), c = this.frameData ? this.frameData[s] : void 0;
16681
- cn(l, c) || (this.frameData || (this.frameData = new Array(n.currentFrameSources.length)), this.frameData[s] = l, i = !0);
16680
+ const o = n.currentFrameSources[s], l = await $e(o), c = this.frameData ? this.frameData[s] : void 0;
16681
+ ye(l, c) || (this.frameData || (this.frameData = new Array(n.currentFrameSources.length)), this.frameData[s] = l, i = !0);
16682
16682
  }
16683
16683
  i && (this.onFrameDataChangeListeners.forEach(
16684
16684
  (s) => s(this.frameData)
@@ -16730,8 +16730,8 @@ class Wl {
16730
16730
  getImageSrc() {
16731
16731
  if (this.imageData) {
16732
16732
  if (this.imageData.svg) {
16733
- const t = Ca(this.imageData.svg, this.imageData.colors || {}, !1);
16734
- return ha(t);
16733
+ const t = wa(this.imageData.svg, this.imageData.colors || {}, !1);
16734
+ return ma(t);
16735
16735
  }
16736
16736
  return this.imageData.src;
16737
16737
  }
@@ -16867,7 +16867,7 @@ class Wl {
16867
16867
  }
16868
16868
  recalculateOffsets(t) {
16869
16869
  this.frameData && ((!this.offsets || this.offsets.length !== this.frameData.length) && (this.offsets = new Array(this.frameData.length)), this.frameData.forEach((e, a) => {
16870
- this.offsets[a] = va(
16870
+ this.offsets[a] = Ea(
16871
16871
  t,
16872
16872
  e,
16873
16873
  this.initialZoom && !this.forceImageCover ? { scale: this.initialZoom } : void 0,
@@ -17086,7 +17086,7 @@ class jl extends Z {
17086
17086
  * Returns `true` if the Background Remover is available for the current session.
17087
17087
  */
17088
17088
  async canUseBackgroundRemover() {
17089
- return this.manager.getClient().canUseAddon(ua.BackgroundRemover);
17089
+ return this.manager.getClient().canUseAddon(ha.BackgroundRemover);
17090
17090
  }
17091
17091
  /**
17092
17092
  * Returns `true` if the Background Remover is available for the current session and if the associated frame has a user-supplied raster image.
@@ -17212,7 +17212,7 @@ const Hl = w`
17212
17212
  id
17213
17213
  }
17214
17214
  }
17215
- `, Pa = w`
17215
+ `, Da = w`
17216
17216
  query GetCustomerTransactions(
17217
17217
  $id: String!
17218
17218
  $limit: Int!
@@ -17379,7 +17379,7 @@ const Hl = w`
17379
17379
  },
17380
17380
  context: t
17381
17381
  }), Fd = async (r, t, e) => (await y.getShadowGraphqlClient().query({
17382
- query: Pa,
17382
+ query: Da,
17383
17383
  errorPolicy: "all",
17384
17384
  fetchPolicy: "no-cache",
17385
17385
  variables: {
@@ -17399,7 +17399,7 @@ const Hl = w`
17399
17399
  limit: t
17400
17400
  }
17401
17401
  }))?.data.customerTransactionsFeed?.items || [], xd = async (r, t, e) => (await y.getShadowGraphqlClient().query({
17402
- query: Pa,
17402
+ query: Da,
17403
17403
  errorPolicy: "all",
17404
17404
  fetchPolicy: "no-cache",
17405
17405
  variables: {
@@ -17419,7 +17419,7 @@ const Hl = w`
17419
17419
  limit: t
17420
17420
  }
17421
17421
  }))?.data.customerTransactionsFeed?.items || [], kd = async (r, t, e) => (await y.getShadowGraphqlClient().query({
17422
- query: Pa,
17422
+ query: Da,
17423
17423
  errorPolicy: "all",
17424
17424
  fetchPolicy: "no-cache",
17425
17425
  variables: {
@@ -17466,44 +17466,44 @@ K = { __e: function(r, t, e, a) {
17466
17466
  }
17467
17467
  throw r;
17468
17468
  } }, typeof Promise == "function" && Promise.prototype.then.bind(Promise.resolve());
17469
- var st, Xe, Za, sr = [], Ze = [], tn = K.__b, en = K.__r, an = K.diffed, nn = K.__c, rn = K.unmount;
17469
+ var st, Ze, tn, sr = [], ta = [], en = K.__b, an = K.__r, nn = K.diffed, rn = K.__c, sn = K.unmount;
17470
17470
  function ac() {
17471
17471
  for (var r; r = sr.shift(); )
17472
17472
  if (r.__P && r.__H)
17473
17473
  try {
17474
- r.__H.__h.forEach(we), r.__H.__h.forEach(da), r.__H.__h = [];
17474
+ r.__H.__h.forEach(we), r.__H.__h.forEach(Aa), r.__H.__h = [];
17475
17475
  } catch (t) {
17476
17476
  r.__H.__h = [], K.__e(t, r.__v);
17477
17477
  }
17478
17478
  }
17479
17479
  K.__b = function(r) {
17480
- st = null, tn && tn(r);
17480
+ st = null, en && en(r);
17481
17481
  }, K.__r = function(r) {
17482
- en && en(r);
17482
+ an && an(r);
17483
17483
  var t = (st = r.__c).__H;
17484
- t && (Xe === st ? (t.__h = [], st.__h = [], t.__.forEach(function(e) {
17485
- e.__N && (e.__ = e.__N), e.__V = Ze, e.__N = e.i = void 0;
17486
- })) : (t.__h.forEach(we), t.__h.forEach(da), t.__h = [])), Xe = st;
17484
+ t && (Ze === st ? (t.__h = [], st.__h = [], t.__.forEach(function(e) {
17485
+ e.__N && (e.__ = e.__N), e.__V = ta, e.__N = e.i = void 0;
17486
+ })) : (t.__h.forEach(we), t.__h.forEach(Aa), t.__h = [])), Ze = st;
17487
17487
  }, K.diffed = function(r) {
17488
- an && an(r);
17488
+ nn && nn(r);
17489
17489
  var t = r.__c;
17490
- t && t.__H && (t.__H.__h.length && (sr.push(t) !== 1 && Za === K.requestAnimationFrame || ((Za = K.requestAnimationFrame) || nc)(ac)), t.__H.__.forEach(function(e) {
17491
- e.i && (e.__H = e.i), e.__V !== Ze && (e.__ = e.__V), e.i = void 0, e.__V = Ze;
17492
- })), Xe = st = null;
17490
+ t && t.__H && (t.__H.__h.length && (sr.push(t) !== 1 && tn === K.requestAnimationFrame || ((tn = K.requestAnimationFrame) || nc)(ac)), t.__H.__.forEach(function(e) {
17491
+ e.i && (e.__H = e.i), e.__V !== ta && (e.__ = e.__V), e.i = void 0, e.__V = ta;
17492
+ })), Ze = st = null;
17493
17493
  }, K.__c = function(r, t) {
17494
17494
  t.some(function(e) {
17495
17495
  try {
17496
17496
  e.__h.forEach(we), e.__h = e.__h.filter(function(a) {
17497
- return !a.__ || da(a);
17497
+ return !a.__ || Aa(a);
17498
17498
  });
17499
17499
  } catch (a) {
17500
17500
  t.some(function(n) {
17501
17501
  n.__h && (n.__h = []);
17502
17502
  }), t = [], K.__e(a, e.__v);
17503
17503
  }
17504
- }), nn && nn(r, t);
17504
+ }), rn && rn(r, t);
17505
17505
  }, K.unmount = function(r) {
17506
- rn && rn(r);
17506
+ sn && sn(r);
17507
17507
  var t, e = r.__c;
17508
17508
  e && e.__H && (e.__H.__.forEach(function(a) {
17509
17509
  try {
@@ -17513,18 +17513,18 @@ K.__b = function(r) {
17513
17513
  }
17514
17514
  }), e.__H = void 0, t && K.__e(t, e.__v));
17515
17515
  };
17516
- var sn = typeof requestAnimationFrame == "function";
17516
+ var on = typeof requestAnimationFrame == "function";
17517
17517
  function nc(r) {
17518
17518
  var t, e = function() {
17519
- clearTimeout(a), sn && cancelAnimationFrame(t), setTimeout(r);
17519
+ clearTimeout(a), on && cancelAnimationFrame(t), setTimeout(r);
17520
17520
  }, a = setTimeout(e, 100);
17521
- sn && (t = requestAnimationFrame(e));
17521
+ on && (t = requestAnimationFrame(e));
17522
17522
  }
17523
17523
  function we(r) {
17524
17524
  var t = st, e = r.__c;
17525
17525
  typeof e == "function" && (r.__c = void 0, e()), st = t;
17526
17526
  }
17527
- function da(r) {
17527
+ function Aa(r) {
17528
17528
  var t = st;
17529
17529
  r.__c = r.__(), st = t;
17530
17530
  }
@@ -17550,7 +17550,7 @@ const or = w`
17550
17550
  }
17551
17551
  missingComponentTypes
17552
17552
  }
17553
- `, Da = w`
17553
+ `, Fa = w`
17554
17554
  ${or}
17555
17555
  fragment AddressValidationJobFields on AddressValidationJob {
17556
17556
  id
@@ -17563,14 +17563,14 @@ const or = w`
17563
17563
  }
17564
17564
  }
17565
17565
  `, rc = w`
17566
- ${Da}
17566
+ ${Fa}
17567
17567
  query GetAddressValidationJobs($ids: [String!]!) {
17568
17568
  addressValidationJobs(ids: $ids) {
17569
17569
  ...AddressValidationJobFields
17570
17570
  }
17571
17571
  }
17572
17572
  `, ic = w`
17573
- ${Da}
17573
+ ${Fa}
17574
17574
  query GetRecipientsWithAddressValidationJobs($ids: [String!]!) {
17575
17575
  recipients(ids: $ids) {
17576
17576
  id
@@ -17587,7 +17587,7 @@ const or = w`
17587
17587
  }
17588
17588
  }
17589
17589
  `, oc = w`
17590
- ${Da}
17590
+ ${Fa}
17591
17591
  mutation BatchValidateRecipientAddress($ids: [String!]!) {
17592
17592
  recipientValidateBatch(ids: $ids) {
17593
17593
  ...AddressValidationJobFields
@@ -17657,21 +17657,21 @@ const Td = async (r) => {
17657
17657
  })).data?.recipientOverrideAddress?.id && (r.getWorkflowManager().getTransaction().addressValidationStatus = An.Overridden);
17658
17658
  };
17659
17659
  export {
17660
- ua as AddonHandle,
17660
+ ha as AddonHandle,
17661
17661
  dc as AddressValidationJobStatus,
17662
17662
  cc as AddressValidationResultConfirmationLevel,
17663
17663
  An as AddressValidationStatus,
17664
17664
  md as ArrayInput,
17665
17665
  U as AspectType,
17666
17666
  bt as AssetNotFoundError,
17667
- ye as AssetType,
17667
+ Se as AssetType,
17668
17668
  od as BringForwardCommand,
17669
17669
  sd as BringToBackCommand,
17670
17670
  id as BringToFrontCommand,
17671
17671
  Br as BundleDesignCreationCartAddMode,
17672
17672
  N as CanvasCommand,
17673
17673
  Ae as CollectionProduct,
17674
- Ka as ColorOptionGlobalPropertyHandle,
17674
+ _a as ColorOptionGlobalPropertyHandle,
17675
17675
  As as CommandContext,
17676
17676
  Ce as ConversionDataType,
17677
17677
  ec as ConversionLocation,
@@ -17688,23 +17688,23 @@ export {
17688
17688
  gs as FontAlignmentCommand,
17689
17689
  hs as FontColorCommand,
17690
17690
  ms as FontSizeCommand,
17691
- Wa as FontSourceCommand,
17691
+ qa as FontSourceCommand,
17692
17692
  Wl as FrameService,
17693
17693
  ql as FrameStep,
17694
17694
  jl as FrameStepHandle,
17695
- Ba as GlobalPropertyHandle,
17695
+ Ia as GlobalPropertyHandle,
17696
17696
  R as GroupCommand,
17697
17697
  vo as IllustrationStepHandle,
17698
- $e as InformationMessageType,
17698
+ Ue as InformationMessageType,
17699
17699
  Fo as InformationStepHandle,
17700
- _a as IntegrationProduct,
17700
+ Xa as IntegrationProduct,
17701
17701
  Pr as IntegrationType,
17702
17702
  td as LayoutElementFactory,
17703
17703
  x as LayoutElementType,
17704
17704
  Y as LayoutNotFoundError,
17705
17705
  Ht as LayoutRenderingPurpose,
17706
17706
  Eo as MaterialStepHandle,
17707
- Ee as MisconfigurationError,
17707
+ be as MisconfigurationError,
17708
17708
  Sd as MockWorkflowManager,
17709
17709
  bo as ModelStepHandle,
17710
17710
  ko as ModuleStepHandle,
@@ -17712,7 +17712,7 @@ export {
17712
17712
  rr as ObjectInput,
17713
17713
  xl as ObjectInputType,
17714
17714
  er as OptionGlobalPropertyHandle,
17715
- ve as OptionNotFoundError,
17715
+ Ee as OptionNotFoundError,
17716
17716
  Dt as ParseError,
17717
17717
  Bo as PictureStepHandle,
17718
17718
  Dr as ProductCameraRig,
@@ -17731,7 +17731,7 @@ export {
17731
17731
  Po as ShapeStepHandle,
17732
17732
  Ir as ShareActionType,
17733
17733
  pd as SpiffCommerceClient,
17734
- Se as StakeholderType,
17734
+ ve as StakeholderType,
17735
17735
  br as StepAspectType,
17736
17736
  Z as StepHandle,
17737
17737
  v as StepType,
@@ -17754,7 +17754,7 @@ export {
17754
17754
  Oo as createDesign,
17755
17755
  Jc as currentDirection,
17756
17756
  Oc as dataUrlFromExternalUrl,
17757
- Ke as designService,
17757
+ _e as designService,
17758
17758
  fe as determineCorrectFontSizeAndLines,
17759
17759
  qn as digitalContentStepService,
17760
17760
  dt as domParser,
@@ -17771,14 +17771,14 @@ export {
17771
17771
  ot as generateSVGWithUnknownColors,
17772
17772
  Ad as generateStateFromDesignInputSteps,
17773
17773
  Nd as getAddressValidationJobs,
17774
- Ne as getAttributesFromArrayBuffer,
17774
+ Qe as getAttributesFromArrayBuffer,
17775
17775
  Vc as getAxisAlignedBoundingBox,
17776
17776
  Gl as getBoundedOffsets,
17777
17777
  wd as getBundleThemeConfiguration,
17778
17778
  Id as getCustomer,
17779
17779
  Pd as getCustomerBundles,
17780
17780
  Kc as getElementVertices,
17781
- Oe as getFrameData,
17781
+ $e as getFrameData,
17782
17782
  cd as getGlobalPropertyStateForBundle,
17783
17783
  zl as getIntegration,
17784
17784
  Hc as getNEPoint,
@@ -17788,7 +17788,7 @@ export {
17788
17788
  qc as getPointOfRotation,
17789
17789
  ud as getProductCollections,
17790
17790
  Yc as getSEPoint,
17791
- ya as getSvgElement,
17791
+ Sa as getSvgElement,
17792
17792
  Md as getTemplateBundles,
17793
17793
  kd as getTemplateTransactions,
17794
17794
  fd as getTransaction,
@@ -17808,7 +17808,7 @@ export {
17808
17808
  Cl as metafieldManager,
17809
17809
  _c as mmPerPixel,
17810
17810
  Hn as modelStepService,
17811
- Ca as modifySVGColors,
17811
+ wa as modifySVGColors,
17812
17812
  Yn as moduleStepService,
17813
17813
  vd as nameBundle,
17814
17814
  Ed as nameTransaction,
@@ -17822,19 +17822,19 @@ export {
17822
17822
  Kn as questionStepService,
17823
17823
  Rc as registerFetchImplementation,
17824
17824
  Qc as registerWindowImplementation,
17825
- za as rehydrateSerializedLayout,
17825
+ Ga as rehydrateSerializedLayout,
17826
17826
  Xr as rgbToPms,
17827
17827
  ce as rotateAroundPoint,
17828
- pa as sanitizeSvgTree,
17828
+ fa as sanitizeSvgTree,
17829
17829
  Gr as setBearerAuthenticationToken,
17830
17830
  Cn as setCanvasModule,
17831
17831
  zt as shapeStepService,
17832
17832
  ys as shortenUrl,
17833
17833
  gt as spiffCoreConfiguration,
17834
17834
  dd as stepAspectValuesToDesignInputSteps,
17835
- Oa as svgColorValueToDefinition,
17835
+ $a as svgColorValueToDefinition,
17836
17836
  Vn as svgStringDimensions,
17837
- ha as svgToDataUrl,
17837
+ ma as svgToDataUrl,
17838
17838
  G as textStepService,
17839
17839
  xs as toast,
17840
17840
  Qd as validateWorkflowExperienceRecipient,