@spiffcommerce/core 31.2.3-beta.026ad90d-92e9-500b-a212-bd6dfa71283c → 31.2.3-beta.31c9ba15-a663-564f-ae8f-4ab38e25e1d4

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,32 +4,32 @@ import { onError as ur } from "@apollo/client/link/error";
4
4
  import { renderToStaticMarkup as hr } from "preact-render-to-string";
5
5
  import { removeTypenameFromVariables as mr } from "@apollo/client/link/remove-typename";
6
6
  import { orientation as gr } from "exifr/dist/mini.umd.cjs";
7
- import { parse as on } from "css";
7
+ import { parse as ln } from "css";
8
8
  import pr from "fuse.js";
9
- import { Pith as Aa } from "pith";
10
- import vt from "lodash.clonedeep";
11
- import { toString as ln } from "qrcode";
9
+ import { Pith as ua } from "pith";
10
+ import St from "lodash.clonedeep";
11
+ import { toString as cn } from "qrcode";
12
12
  import fr 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 Cr from "handlebars";
16
16
  import { dataUriToBuffer as wr } from "data-uri-to-buffer";
17
- import Fa from "lodash.chunk";
18
- import { CognitoIdentityProviderClient as yr, InitiateAuthCommand as xa, RespondToAuthChallengeCommand as Sr } from "@aws-sdk/client-cognito-identity-provider";
17
+ import xa from "lodash.chunk";
18
+ import { CognitoIdentityProviderClient as yr, InitiateAuthCommand as ka, RespondToAuthChallengeCommand as Sr } from "@aws-sdk/client-cognito-identity-provider";
19
19
  import vr 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";
23
- import dn from "lodash.debounce";
20
+ import * as Ma from "currency-codes";
21
+ import dn from "lodash.isequal";
22
+ import { split as aa } from "unicode-default-word-boundary";
23
+ import An 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 || {}), L = /* @__PURE__ */ ((r) => (r.FileUpload = "FileUpload", r.Option = "Option", r.ColorOption = "ColorOption", r.Text = "Text", r))(L || {}), 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 || {}), Er = /* @__PURE__ */ ((r) => (r.Color = "Color", r.Colors = "Colors", r.Selection = "Selection", r.Selections = "Selections", r.Text = "Text", r.Upload = "Upload", r))(Er || {}), 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 || {}), Br = /* @__PURE__ */ ((r) => (r.Hyperlink = "Hyperlink", r.Edit = "Edit", r.Approve = "Approve", r))(Br || {}), Ir = /* @__PURE__ */ ((r) => (r.Hub = "Hub", r.Shopify = "Shopify", r))(Ir || {}), ua = /* @__PURE__ */ ((r) => (r.BackgroundRemover = "BackgroundRemover", r.ConversionAccelerator = "Conversion Accelerator", r.ProcessBuilder = "ProcessBuilder", r))(ua || {}), Pr = /* @__PURE__ */ ((r) => (r[r.Orbit = 0] = "Orbit", r[r.Pan = 1] = "Pan", r))(Pr || {}), 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 || {}), Dr = /* @__PURE__ */ ((r) => (r.Pixel = "px", r.Millimeter = "mm", r.Centimeter = "cm", r))(Dr || {});
27
- class An extends Error {
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 || {}), L = /* @__PURE__ */ ((r) => (r.FileUpload = "FileUpload", r.Option = "Option", r.ColorOption = "ColorOption", r.Text = "Text", r))(L || {}), 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 || {}), Er = /* @__PURE__ */ ((r) => (r.Color = "Color", r.Colors = "Colors", r.Selection = "Selection", r.Selections = "Selections", r.Text = "Text", r.Upload = "Upload", r))(Er || {}), 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 || {}), Br = /* @__PURE__ */ ((r) => (r.Hyperlink = "Hyperlink", r.Edit = "Edit", r.Approve = "Approve", r))(Br || {}), Ir = /* @__PURE__ */ ((r) => (r.Hub = "Hub", r.Shopify = "Shopify", r))(Ir || {}), ha = /* @__PURE__ */ ((r) => (r.BackgroundRemover = "BackgroundRemover", r.ConversionAccelerator = "Conversion Accelerator", r.ProcessBuilder = "ProcessBuilder", r))(ha || {}), Pr = /* @__PURE__ */ ((r) => (r[r.Orbit = 0] = "Orbit", r[r.Pan = 1] = "Pan", r))(Pr || {}), 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 || {}), Dr = /* @__PURE__ */ ((r) => (r.Pixel = "px", r.Millimeter = "mm", r.Centimeter = "cm", r))(Dr || {});
27
+ class un extends Error {
28
28
  constructor(t) {
29
29
  super(t), this.name = this.constructor.name;
30
30
  }
31
31
  }
32
- class Xt extends An {
32
+ class Xt extends un {
33
33
  constructor(t) {
34
34
  super(`ConfigurationError - ${t}`);
35
35
  }
@@ -44,7 +44,7 @@ class Y extends Xt {
44
44
  super(`Panel not Found: ${t.panelId}`), this.panelId = t?.panelId || "N/A";
45
45
  }
46
46
  }
47
- class Et extends Xt {
47
+ class vt extends Xt {
48
48
  constructor(t) {
49
49
  super(`Asset not found for variant: ${t.name}`), this.variant = t;
50
50
  }
@@ -59,27 +59,27 @@ class Ee extends Xt {
59
59
  super(`Workflow Misconfiguration: ${t.stepName} - ${e}`), this.step = t;
60
60
  }
61
61
  }
62
- class xe extends An {
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 Fr {
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 xr = () => {
131
131
  try {
132
- return localStorage ? new Fr() : new Ma();
132
+ return localStorage ? new Fr() : 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 = xr();
137
137
  class kr {
@@ -161,41 +161,41 @@ class kr {
161
161
  }
162
162
  }
163
163
  const gt = new kr();
164
- let aa, na;
164
+ let na, ra;
165
165
  function Tc(r) {
166
- aa = r;
166
+ na = r;
167
167
  }
168
168
  function Nc(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 un = /* @__PURE__ */ new Map(), Ta = /* @__PURE__ */ new Map(), Na = /* @__PURE__ */ new Map(), hn = 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
- return un.set(r, n.headers?.get("content-type") || ""), await n.arrayBuffer();
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
  }, Mr = 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), Tr = (r, t) => {
200
200
  if (Tt([typeof document]))
201
201
  return document.createElementNS(r, t);
@@ -206,8 +206,8 @@ const un = /* @__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
- }, Nr = () => Tt([typeof DOMParser]) ? DOMParser : Zt().DOMParser, Me = (r, t) => new Promise((e, a) => {
210
- t ? hn(r).then(e).catch(a) : rt(r).then((n) => {
209
+ }, Nr = () => Tt([typeof DOMParser]) ? DOMParser : Zt().DOMParser, Te = (r, t) => new Promise((e, a) => {
210
+ t ? mn(r).then(e).catch(a) : rt(r).then((n) => {
211
211
  n.arrayBuffer().then(e).catch(a);
212
212
  }).catch((n) => {
213
213
  a(n);
@@ -216,21 +216,21 @@ const un = /* @__PURE__ */ new Map(), Ta = /* @__PURE__ */ new Map(), Na = /* @_
216
216
  t ? Mr(r).then(e).catch(a) : rt(r).then((n) => {
217
217
  n.text().then(e).catch(a);
218
218
  }).catch(a);
219
- }), mn = (r) => hr(r), Ue = /* @__PURE__ */ new Map(), Qr = async (r, t) => {
219
+ }), gn = (r) => hr(r), Le = /* @__PURE__ */ new Map(), Qr = 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
  }, Bt = () => {
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 un = /* @__PURE__ */ new Map(), Ta = /* @__PURE__ */ new Map(), Na = /* @_
257
257
  const e = t();
258
258
  return e || "image/svg+xml";
259
259
  }, Qc = async (r) => {
260
- const t = await hn(r), e = un.get(r) || Te(t);
260
+ const t = await mn(r), e = hn.get(r) || Ne(t);
261
261
  return await $r(new Blob([t], { type: e }));
262
262
  }, Rr = (r) => {
263
263
  let t = "";
@@ -266,9 +266,9 @@ const un = /* @__PURE__ */ new Map(), Ta = /* @__PURE__ */ new Map(), Na = /* @_
266
266
  t += String.fromCharCode(r[a]);
267
267
  return t;
268
268
  }, Or = async (r) => {
269
- const t = Te(r), e = new Uint8Array(r), a = Rr(e), n = btoa(a);
269
+ const t = Ne(r), e = new Uint8Array(r), a = Rr(e), n = btoa(a);
270
270
  return `data:${t};base64,${n}`;
271
- }, ha = (r) => `data:image/svg+xml;base64,${btoa(r)}`, gn = (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,13 +287,13 @@ const un = /* @__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 Ur, ma;
290
+ let Ur, ga;
291
291
  const Lr = (r) => {
292
- ma = r;
293
- }, Vr = () => ma;
294
- let pn;
292
+ ga = r;
293
+ }, Vr = () => ga;
294
+ let fn;
295
295
  const zr = (r) => {
296
- pn = r;
296
+ fn = r;
297
297
  }, Gr = () => new Promise((r) => {
298
298
  const t = gt.getHubUrl(), e = (a) => {
299
299
  a.origin === t && (window.removeEventListener("message", e), r(a.data));
@@ -301,9 +301,9 @@ const zr = (r) => {
301
301
  window.parent !== window && (window.addEventListener("message", e, !1), window.parent.postMessage("ready", t));
302
302
  }), Wr = async () => {
303
303
  const r = {
304
- applicationKey: ma,
304
+ applicationKey: ga,
305
305
  customerToken: Ur,
306
- bearer: pn
306
+ bearer: fn
307
307
  };
308
308
  return typeof window < "u" && (window.location.href.includes("/workflows/product/") || window.location.href.includes("hub=true")) ? { ...await Gr(), ...r } : r;
309
309
  };
@@ -364,30 +364,30 @@ class jr {
364
364
  }
365
365
  }
366
366
  const y = new jr();
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
- const a = Cn(!0);
373
- return fn(a), a.createCanvas(r, t, e);
372
+ const a = wn(!0);
373
+ return Cn(a), a.createCanvas(r, t, e);
374
374
  } catch {
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
- const e = Cn(!0);
382
- return fn(e), e.loadImage(r, t);
381
+ const e = wn(!0);
382
+ return Cn(e), e.loadImage(r, t);
383
383
  } catch {
384
384
  throw new Error("Canvas module not set");
385
385
  }
386
386
  };
387
- function fn(r) {
388
- ra = r?.createCanvas, ia = r?.loadImage;
389
- }
390
387
  function Cn(r) {
388
+ ia = r?.createCanvas, sa = r?.loadImage;
389
+ }
390
+ function wn(r) {
391
391
  try {
392
392
  if (document.createElement("canvas").getContext("2d"))
393
393
  return {
@@ -406,13 +406,13 @@ function Cn(r) {
406
406
  throw t;
407
407
  }
408
408
  }
409
- let Le;
410
- function ga() {
411
- return Le === void 0 && (Le = Nr()), Le;
409
+ let Ve;
410
+ function pa() {
411
+ return Ve === void 0 && (Ve = Nr()), Ve;
412
412
  }
413
413
  let oe = null;
414
414
  const Hr = (r) => new Promise((t) => {
415
- if (Te(r) !== "image/jpeg")
415
+ if (Ne(r) !== "image/jpeg")
416
416
  return t(1);
417
417
  gr(r).then((a) => t(a || 1)).catch(() => t(1));
418
418
  }), Yr = async () => {
@@ -454,9 +454,9 @@ const Hr = (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 Kr(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 Hr = (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 Oc(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,23 +3187,23 @@ function $c(r, t) {
3187
3187
  let Qt = null;
3188
3188
  function ti(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
  }
3203
3203
  const le = (r) => {
3204
- const t = wn(r.spotColor);
3204
+ const t = yn(r.spotColor);
3205
3205
  return t ? `${r.browserValue} ${t}` : r.browserValue;
3206
- }, wn = (r) => {
3206
+ }, yn = (r) => {
3207
3207
  if (!r)
3208
3208
  return "";
3209
3209
  if (r.profileName.includes("/") && r.profileName.includes(".icc")) {
@@ -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) {
@@ -3287,9 +3287,9 @@ const le = (r) => {
3287
3287
  const t = /pt|pc|mm|cm|in/gm, e = r.getAttribute("viewBox"), a = r.getAttribute("width"), n = r.getAttribute("height");
3288
3288
  if (!e) throw new Error("viewBox not specified on SVG!");
3289
3289
  a && r.setAttribute("width", a.replace(t, "")), n && r.setAttribute("height", n.replace(t, ""));
3290
- }, yn = (r) => dt().parseFromString(r, "image/svg+xml").firstElementChild, ii = (r, t, e) => {
3290
+ }, Sn = (r) => dt().parseFromString(r, "image/svg+xml").firstElementChild, ii = (r, t, e) => {
3291
3291
  r.setAttribute("height", `${e}px`), r.setAttribute("width", `${t}px`);
3292
- }, Sn = (r, t, e) => {
3292
+ }, vn = (r, t, e) => {
3293
3293
  kt(r, (a) => {
3294
3294
  const n = a.attributes.getNamedItem("fill");
3295
3295
  n && n.value !== "none" && a.classList.forEach((s) => {
@@ -3328,16 +3328,16 @@ const le = (r) => {
3328
3328
  }
3329
3329
  });
3330
3330
  });
3331
- }, vn = (r) => Bt().serializeToString(r), fa = (r, t, e, a, n) => {
3332
- const i = yn(r);
3331
+ }, En = (r) => Bt().serializeToString(r), Ca = (r, t, e, a, n) => {
3332
+ const i = Sn(r);
3333
3333
  if (!i)
3334
3334
  throw new Error("Failed to read SVG.");
3335
- return ii(i, t, e), Sn(i, a, n), vn(i);
3336
- }, Ca = (r, t, e) => {
3337
- const a = yn(r);
3335
+ return ii(i, t, e), vn(i, a, n), En(i);
3336
+ }, wa = (r, t, e) => {
3337
+ const a = Sn(r);
3338
3338
  if (!a)
3339
3339
  throw new Error("Failed to read SVG.");
3340
- return Sn(a, t, e), vn(a);
3340
+ return vn(a, t, e), En(a);
3341
3341
  }, si = (r) => {
3342
3342
  const t = /<svg.*<\/svg>/s, e = r.match(t) || [], a = e?.length > 0 ? e[0] : "";
3343
3343
  return dt().parseFromString(a, "image/svg+xml");
@@ -3345,18 +3345,18 @@ const le = (r) => {
3345
3345
  const e = si(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
  ei.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
  `, ci = w`
3473
- ${wa}
3473
+ ${ya}
3474
3474
  query GetMaterials($ids: [String]) {
3475
3475
  materials(id: $ids) {
3476
3476
  ...MaterialFields
@@ -3525,7 +3525,7 @@ const le = (r) => {
3525
3525
  class mi {
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));
@@ -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 mi();
@@ -3811,7 +3811,7 @@ class gi {
3811
3811
  this.disabled = t;
3812
3812
  }
3813
3813
  }
3814
- const Kt = new gi(), En = w`
3814
+ const Kt = new gi(), bn = w`
3815
3815
  fragment OptionFields on Option {
3816
3816
  id
3817
3817
  name
@@ -3850,8 +3850,8 @@ const Kt = new gi(), En = w`
3850
3850
  }
3851
3851
  `, pi = w`
3852
3852
  ${ee(!1)}
3853
- ${wa}
3854
- ${En}
3853
+ ${ya}
3854
+ ${bn}
3855
3855
  query GetOptions($ids: [String]!) {
3856
3856
  options(ids: $ids) {
3857
3857
  ...OptionFields
@@ -3920,7 +3920,7 @@ class yi {
3920
3920
  }
3921
3921
  }
3922
3922
  }
3923
- const H = new yi(), bn = w`
3923
+ const H = new yi(), Bn = w`
3924
3924
  fragment ActiveIntegrationFields on Integration {
3925
3925
  id
3926
3926
  logo
@@ -3939,7 +3939,7 @@ const H = new yi(), 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 yi(), bn = w`
3958
3958
  }
3959
3959
  }
3960
3960
  `, Si = w`
3961
- ${Qe}
3961
+ ${Re}
3962
3962
  mutation CreateTransactions(
3963
3963
  $inputs: [TransactionCreateInput]!
3964
3964
  $marketplaceThemeInstallId: String
@@ -4048,7 +4048,7 @@ const H = new yi(), bn = w`
4048
4048
  }
4049
4049
  }
4050
4050
  }
4051
- `, Bn = w`
4051
+ `, In = w`
4052
4052
  fragment StakeholderFields on Stakeholder {
4053
4053
  id
4054
4054
  type
@@ -4056,7 +4056,7 @@ const H = new yi(), bn = w`
4056
4056
  authorizationNote
4057
4057
  authorizationStatus
4058
4058
  }
4059
- `, In = w`
4059
+ `, Pn = w`
4060
4060
  fragment TransactionShareActionFields on TransactionShareAction {
4061
4061
  id
4062
4062
  title
@@ -4066,10 +4066,10 @@ const H = new yi(), bn = w`
4066
4066
  url
4067
4067
  }
4068
4068
  `, vi = w`
4069
- ${Qe}
4070
- ${Bn}
4069
+ ${Re}
4071
4070
  ${In}
4072
- ${bn}
4071
+ ${Pn}
4072
+ ${Bn}
4073
4073
  query ReadTransactions($ids: [String]!) {
4074
4074
  transactions(ids: $ids) {
4075
4075
  customLogoLink
@@ -4332,7 +4332,7 @@ const H = new yi(), bn = w`
4332
4332
  }
4333
4333
  }
4334
4334
  `, Pi = w`
4335
- ${In}
4335
+ ${Pn}
4336
4336
  query ReadTransactionForShareActions($id: String!) {
4337
4337
  transactions(ids: [$id]) {
4338
4338
  id
@@ -4342,15 +4342,15 @@ const H = new yi(), bn = w`
4342
4342
  }
4343
4343
  }
4344
4344
  }
4345
- `, Pn = w`
4345
+ `, Dn = w`
4346
4346
  query ReadWorkflowStates($ids: [String]!) {
4347
4347
  transactions(ids: $ids) {
4348
4348
  id
4349
4349
  workflowState
4350
4350
  }
4351
4351
  }
4352
- `, Dn = (r) => w`
4353
- ${Qe}
4352
+ `, Fn = (r) => w`
4353
+ ${Re}
4354
4354
  fragment IntegrationProductFields on IntegrationProduct {
4355
4355
  id
4356
4356
  externalProductId
@@ -4433,14 +4433,14 @@ const H = new yi(), bn = w`
4433
4433
  }
4434
4434
  }
4435
4435
  `, Di = (r) => w`
4436
- ${Dn(r)}
4436
+ ${Fn(r)}
4437
4437
  query GetIntegrationProducts($ids: [String!]!) {
4438
4438
  integrationProducts(ids: $ids) {
4439
4439
  ...IntegrationProductFields
4440
4440
  }
4441
4441
  }
4442
4442
  `, Fi = (r) => w`
4443
- ${Dn(r)}
4443
+ ${Fn(r)}
4444
4444
  query GetIntegrationProductFromExternalIds($externalIntegrationId: String!, $externalProductId: String!) {
4445
4445
  integrationProductFromExternalIds(
4446
4446
  externalIntegrationId: $externalIntegrationId
@@ -4450,7 +4450,7 @@ const H = new yi(), bn = w`
4450
4450
  }
4451
4451
  }
4452
4452
  `, xi = w`
4453
- ${Bn}
4453
+ ${In}
4454
4454
  query ReadTransactionForStakeholders($id: String!) {
4455
4455
  transactions(ids: [$id]) {
4456
4456
  stakeholders {
@@ -4587,8 +4587,8 @@ const H = new yi(), bn = w`
4587
4587
  }
4588
4588
  `, Ri = (r) => w`
4589
4589
  ${ee(r)}
4590
- ${wa}
4591
- ${En}
4590
+ ${ya}
4591
+ ${bn}
4592
4592
  ${Mi}
4593
4593
  ${Ti}
4594
4594
  ${Ni}
@@ -5027,7 +5027,7 @@ const H = new yi(), bn = w`
5027
5027
  }
5028
5028
  }
5029
5029
  }
5030
- `, Re = w`
5030
+ `, Oe = w`
5031
5031
  fragment MarketplaceThemeInstallConfigurationFields on MarketplaceThemeInstallConfiguration {
5032
5032
  id
5033
5033
  themeInstallId
@@ -5106,15 +5106,15 @@ const H = new yi(), bn = w`
5106
5106
  }
5107
5107
  }
5108
5108
  `, Ui = w`
5109
- ${Re}
5109
+ ${Oe}
5110
5110
  query GetMarketplaceThemeInstallConfiguration($themeConfigurationId: String!, $themeInstallId: String!) {
5111
5111
  marketplaceThemeInstallConfiguration(id: $themeConfigurationId, themeInstallId: $themeInstallId, raw: false) {
5112
5112
  ...MarketplaceThemeInstallConfigurationFields
5113
5113
  }
5114
5114
  }
5115
5115
  `, Li = w`
5116
- ${bn}
5117
- ${Re}
5116
+ ${Bn}
5117
+ ${Oe}
5118
5118
  query GetCurrentIntegration($themeConfigurationId: String) {
5119
5119
  currentIntegration {
5120
5120
  id
@@ -5126,7 +5126,7 @@ const H = new yi(), bn = w`
5126
5126
  }
5127
5127
  }
5128
5128
  `, Vi = w`
5129
- ${Re}
5129
+ ${Oe}
5130
5130
  query ReadTransactionForMarketplaceTheme($id: String!) {
5131
5131
  transactions(ids: [$id]) {
5132
5132
  marketplaceThemeInstallConfiguration(raw: false) {
@@ -5135,7 +5135,7 @@ const H = new yi(), bn = w`
5135
5135
  }
5136
5136
  }
5137
5137
  `, zi = w`
5138
- ${Re}
5138
+ ${Oe}
5139
5139
  query ReadBundleForMarketplaceTheme($id: String!) {
5140
5140
  bundles(ids: [$id]) {
5141
5141
  marketplaceThemeInstallConfiguration(raw: false) {
@@ -5213,7 +5213,7 @@ const H = new yi(), bn = w`
5213
5213
  ],
5214
5214
  silentSteps: []
5215
5215
  }), t;
5216
- }, ji = (r, t) => t.find((e) => e.stepNames.includes(r)), St = (r, t) => (r.conditions || []).every((e) => {
5216
+ }, ji = (r, t) => t.find((e) => e.stepNames.includes(r)), yt = (r, t) => (r.conditions || []).every((e) => {
5217
5217
  const a = t[e.targetStepName];
5218
5218
  if (a && a.selectedVariants) {
5219
5219
  const n = a.selectedVariants;
@@ -5226,8 +5226,8 @@ const H = new yi(), bn = w`
5226
5226
  const e = {
5227
5227
  name: r.name,
5228
5228
  title: r.title,
5229
- renderableSteps: r.renderableSteps.filter((a) => St(a, t)),
5230
- silentSteps: r.silentSteps.filter((a) => St(a, t))
5229
+ renderableSteps: r.renderableSteps.filter((a) => yt(a, t)),
5230
+ silentSteps: r.silentSteps.filter((a) => yt(a, t))
5231
5231
  };
5232
5232
  return e.silentSteps.length === 0 && e.renderableSteps.length === 0 ? null : e;
5233
5233
  }, Pt = (r, t) => r.map((e) => Hi(e, t)).filter((e) => e !== null), Yi = async (r, t, e = !1) => {
@@ -5246,12 +5246,12 @@ const H = new yi(), bn = w`
5246
5246
  );
5247
5247
  return i;
5248
5248
  };
5249
- class Fn {
5249
+ class xn {
5250
5250
  constructor() {
5251
5251
  this.timestamp = Date.now();
5252
5252
  }
5253
5253
  }
5254
- class xn {
5254
+ class kn {
5255
5255
  /**
5256
5256
  * Constructs a new promise queue.
5257
5257
  * @param queueMaxSize An optional maximum size, when the max size is hit.
@@ -5346,7 +5346,7 @@ const M = () => {
5346
5346
  ...E,
5347
5347
  _renderingConfiguration: a,
5348
5348
  mask: l ? `url(#viewmask-${C})` : void 0
5349
- })), f = Sa(I);
5349
+ })), f = va(I);
5350
5350
  return /* @__PURE__ */ ct(
5351
5351
  "svg",
5352
5352
  {
@@ -5502,7 +5502,7 @@ const M = () => {
5502
5502
  x: (r.x - t.x) * n - (r.y - t.y) * a + t.x,
5503
5503
  y: (r.x - t.x) * a + (r.y - t.y) * n + t.y
5504
5504
  };
5505
- }, Jc = 0.352778, Kc = 0.035277, kn = (r) => {
5505
+ }, Jc = 0.352778, Kc = 0.035277, Mn = (r) => {
5506
5506
  const t = r.rotation || 0, e = ft(t), a = Math.cos(e), n = -Math.sin(e);
5507
5507
  return /* @__PURE__ */ D("g", { mask: r.stepName || r.productOverlay ? void 0 : r.mask, children: /* @__PURE__ */ D(
5508
5508
  "g",
@@ -5524,8 +5524,8 @@ const M = () => {
5524
5524
  )
5525
5525
  }
5526
5526
  ) });
5527
- }, Mn = (r) => {
5528
- 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);
5527
+ }, Tn = (r) => {
5528
+ 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);
5529
5529
  return /* @__PURE__ */ ct(Gt, { children: [
5530
5530
  /* @__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 }) }) }),
5531
5531
  /* @__PURE__ */ ct(
@@ -5560,8 +5560,8 @@ const M = () => {
5560
5560
  if (!r.pattern)
5561
5561
  return "";
5562
5562
  if (r.pattern.svg) {
5563
- const A = Ca(r.pattern.svg, r.pattern.colors || {}, !1);
5564
- return ha(A);
5563
+ const A = wa(r.pattern.svg, r.pattern.colors || {}, !1);
5564
+ return ma(A);
5565
5565
  }
5566
5566
  return r.pattern.src;
5567
5567
  };
@@ -5629,7 +5629,7 @@ const M = () => {
5629
5629
  matrix(${r.scaleX}, 0, 0, ${r.scaleY}, 0, 0)
5630
5630
  `,
5631
5631
  children: /* @__PURE__ */ D(
5632
- Mn,
5632
+ Tn,
5633
5633
  {
5634
5634
  id: t,
5635
5635
  x: 0,
@@ -5646,7 +5646,7 @@ const M = () => {
5646
5646
  }
5647
5647
  )
5648
5648
  ] });
5649
- }, Tn = /* @__PURE__ */ new Map();
5649
+ }, Nn = /* @__PURE__ */ new Map();
5650
5650
  class _i {
5651
5651
  constructor(t) {
5652
5652
  this.font = t, this.glyphsFromText = /* @__PURE__ */ new Map(), this.kerningValues = /* @__PURE__ */ new Map(), this.height = this.calculateApproximateHeight();
@@ -5696,38 +5696,38 @@ class _i {
5696
5696
  }), a - n;
5697
5697
  }
5698
5698
  }
5699
- const Xi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", ze = /* @__PURE__ */ new Map(), Nt = async (r) => {
5700
- if (ze.has(r))
5701
- return ze.get(r);
5699
+ const Xi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Ge = /* @__PURE__ */ new Map(), Nt = async (r) => {
5700
+ if (Ge.has(r))
5701
+ return Ge.get(r);
5702
5702
  const e = (async () => {
5703
5703
  try {
5704
- return Ct(r).getFont();
5704
+ return Et(r).getFont();
5705
5705
  } catch {
5706
5706
  if (Xi(r)) {
5707
- const a = gn(r), n = ta(a);
5708
- return sa(r, n), n;
5707
+ const a = pn(r), n = ea(a);
5708
+ return oa(r, n), n;
5709
5709
  } else {
5710
- const a = await Me(r, !0), n = ta(a);
5711
- return sa(r, n), await Qr(n, r), n;
5710
+ const a = await Te(r, !0), n = ea(a);
5711
+ return oa(r, n), await Qr(n, r), n;
5712
5712
  }
5713
5713
  }
5714
5714
  })();
5715
- return ze.set(r, e), e;
5715
+ return Ge.set(r, e), e;
5716
5716
  }, Zi = (r) => {
5717
- const t = gn(r), e = ta(t);
5718
- return sa(r, e), e;
5719
- }, Ct = (r) => {
5720
- const t = Tn.get(r);
5717
+ const t = pn(r), e = ea(t);
5718
+ return oa(r, e), e;
5719
+ }, Et = (r) => {
5720
+ const t = Nn.get(r);
5721
5721
  if (t)
5722
5722
  return t;
5723
5723
  throw new Error("Font metrics unavailable for font");
5724
- }, sa = (r, t) => {
5724
+ }, oa = (r, t) => {
5725
5725
  const e = new _i(t);
5726
- return Tn.set(r, e), e;
5726
+ return Nn.set(r, e), e;
5727
5727
  }, _c = async (r) => {
5728
5728
  const t = dt(), e = t.parseFromString(r, "image/svg+xml"), a = e.firstElementChild, n = /* @__PURE__ */ new Map();
5729
5729
  a.querySelectorAll("style").forEach((d) => {
5730
- on(d.innerHTML).stylesheet?.rules.forEach((u) => {
5730
+ ln(d.innerHTML).stylesheet?.rules.forEach((u) => {
5731
5731
  if (u.type === "font-face" && u.declarations) {
5732
5732
  const h = u.declarations.find(
5733
5733
  (g) => g.property === "font-family"
@@ -5759,9 +5759,9 @@ const Xi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", ze = /* @_
5759
5759
  }
5760
5760
  return e.querySelectorAll("text").forEach((d) => d.remove()), Bt().serializeToString(a);
5761
5761
  }, Be = (r, t, e, a) => Math.max(ns(r.join(`
5762
- `), e, a), t), Ua = (r, t, e, a, n, i) => {
5762
+ `), e, a), t), La = (r, t, e, a, n, i) => {
5763
5763
  console.log("LOG: getLines");
5764
- const s = (i || Rn) * n.getApproximateHeight(), o = t.split(`
5764
+ const s = (i || Pe) * n.getApproximateHeight(), o = t.split(`
5765
5765
  `);
5766
5766
  try {
5767
5767
  const l = o.flatMap((d) => ge(d, r.width, a, n)), c = l.flatMap((d) => d.lines);
@@ -5814,13 +5814,13 @@ const Xi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", ze = /* @_
5814
5814
  return { lines: o, width: l };
5815
5815
  }, ts = (r, t, e, a, n, i) => {
5816
5816
  console.log("LOG: calcFontSize");
5817
- const s = (i ?? Rn) * t.getApproximateHeight(), o = 1 / e.unitsPerEm, l = Nn(r, o, t), c = r.length * s * o, d = a / l, A = n / c;
5817
+ const s = (i ?? Pe) * t.getApproximateHeight(), o = 1 / e.unitsPerEm, l = Qn(r, o, t), c = r.length * s * o, d = a / l, A = n / c;
5818
5818
  return Math.min(A, d);
5819
5819
  }, es = (r, t, e, a) => {
5820
5820
  console.log("LOG: refit");
5821
- const n = Ct(t.fontData.assetUrl), i = n.getFont(), s = t.fontSize / i.unitsPerEm;
5821
+ const n = Et(t.fontData.assetUrl), i = n.getFont(), s = t.fontSize / i.unitsPerEm;
5822
5822
  if (!e)
5823
- return Ua(t, r, t.fontSize, s, n, a);
5823
+ return La(t, r, t.fontSize, s, n, a);
5824
5824
  let o;
5825
5825
  if (t.text ? o = t.text.split(`
5826
5826
  `) : o = t.input?.split(`
@@ -5837,14 +5837,14 @@ const Xi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", ze = /* @_
5837
5837
  requiredHeight: t.height,
5838
5838
  requiredWidth: Be(o, t.width, s, n),
5839
5839
  fontSize: ts(o, n, i, t.width, t.height, a)
5840
- } : Ua(t, r, t.fontSize, s, n, a);
5840
+ } : La(t, r, t.fontSize, s, n, a);
5841
5841
  }, as = (r, t, e, a, n) => {
5842
5842
  console.log("LOG: recalc");
5843
- const s = Ct(t.assetUrl).getFont();
5843
+ const s = Et(t.assetUrl).getFont();
5844
5844
  let o = { ...r };
5845
- const l = { ...r }, c = Nn(a, e / s.unitsPerEm, Ct(t.assetUrl));
5845
+ const l = { ...r }, c = Qn(a, e / s.unitsPerEm, Et(t.assetUrl));
5846
5846
  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 && rs(a, a).every(([d, A]) => d === A) && (o = l)), o;
5847
- }, Ge = 1, mt = (r, t, e) => {
5847
+ }, We = 1, mt = (r, t, e) => {
5848
5848
  let a = 0;
5849
5849
  const n = e.getGlyphs(r);
5850
5850
  return n.forEach((i, s) => {
@@ -5862,21 +5862,21 @@ const Xi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", ze = /* @_
5862
5862
  a = Math.max(a, o || 0);
5863
5863
  }
5864
5864
  }), a *= t, a;
5865
- }, Nn = (r, t, e) => {
5865
+ }, Qn = (r, t, e) => {
5866
5866
  let a = 0;
5867
5867
  return r.forEach((n) => {
5868
5868
  a = Math.max(a, mt(n, t, e));
5869
5869
  }), a;
5870
- }, La = {
5870
+ }, Va = {
5871
5871
  stripControlCharacters: !0,
5872
5872
  vertical: !1,
5873
5873
  uppercase: !1
5874
- }, Ie = (r, t = La) => {
5875
- const e = { ...La, ...t };
5874
+ }, Ie = (r, t = Va) => {
5875
+ const e = { ...Va, ...t };
5876
5876
  let a = r || "";
5877
5877
  return e.stripControlCharacters && (a = a.replace(/^(?![\u000A\u000D])[\u0000-\u001F\u007F-\u009F]/g, "")), e.uppercase && (a = a.toUpperCase()), e.vertical && (a = a.split("").join(`
5878
5878
  `)), a;
5879
- }, rs = (r, t) => r.map((e, a) => [e, t[a]]), is = (r = "center", t = !1) => t ? "center" : r, Qn = (r) => r === "left" ? "start" : r === "right" ? "end" : "middle", ae = (r, t, e) => r.fontData ? {
5879
+ }, rs = (r, t) => r.map((e, a) => [e, t[a]]), is = (r = "center", t = !1) => t ? "center" : r, Rn = (r) => r === "left" ? "start" : r === "right" ? "end" : "middle", ae = (r, t, e) => r.fontData ? {
5880
5880
  ...r,
5881
5881
  ...(() => {
5882
5882
  if (r.algorithm === Mt.Traditional) {
@@ -5894,7 +5894,7 @@ const Xi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", ze = /* @_
5894
5894
  text: t
5895
5895
  };
5896
5896
  })()
5897
- } : r, Rn = 1.1;
5897
+ } : r, Pe = 1.1;
5898
5898
  function Ft(r, t) {
5899
5899
  return On(r, t.getTemplatingContext());
5900
5900
  }
@@ -5911,7 +5911,7 @@ const ss = (r) => {
5911
5911
  `), A = r.strokeColor?.browserValue && r.strokeThickness ? r.strokeColor?.browserValue : void 0, u = r.strokeColor?.browserValue && r.strokeThickness ? r.strokeThickness : void 0;
5912
5912
  if (r.curved && !r.paths || !r.fontData)
5913
5913
  return null;
5914
- const h = () => r.textFillImage ? `url("#${s}")` : r._renderingConfiguration?.spotColors && r.fillSpotColorDefinition ? `${r.fill} ${wn(r.fillSpotColorDefinition)}` : r.fill;
5914
+ const h = () => r.textFillImage ? `url("#${s}")` : r._renderingConfiguration?.spotColors && r.fillSpotColorDefinition ? `${r.fill} ${yn(r.fillSpotColorDefinition)}` : r.fill;
5915
5915
  return /* @__PURE__ */ ct(Gt, { children: [
5916
5916
  /* @__PURE__ */ ct("defs", { children: [
5917
5917
  r.textFillImage && /* @__PURE__ */ D(
@@ -5978,8 +5978,7 @@ const ss = (r) => {
5978
5978
  textboxWidth: r.width,
5979
5979
  lineHeight: r.lineHeight,
5980
5980
  vertical: r.vertical,
5981
- verticalAlign: r.verticalAlign,
5982
- fontData: r.fontData
5981
+ verticalAlign: r.verticalAlign
5983
5982
  },
5984
5983
  p
5985
5984
  ))
@@ -5987,15 +5986,9 @@ const ss = (r) => {
5987
5986
  ) }) })
5988
5987
  ] });
5989
5988
  }, os = (r) => {
5990
- const t = () => {
5991
- if (r.lineHeight !== void 0)
5992
- return r.lineHeight;
5993
- const n = Ct(r.fontData.assetUrl), i = n.getFont(), s = r.fontSize / i.unitsPerEm;
5994
- return n.getApproximateHeight() * s;
5995
- }, e = () => r.align === "left" ? -r.textboxWidth / 2 : r.align === "right" ? r.textboxWidth / 2 : 0, a = () => {
5996
- const n = r.fontSize * t();
5997
- console.log(`LOG: text span. line height: ${n}`);
5998
- const i = r.textboxHeight / 2;
5989
+ console.log(`LOG: text span. prop height: ${r.lineHeight}, fallback: ${Pe}`);
5990
+ const t = () => r.lineHeight !== void 0 ? r.lineHeight : Pe, e = () => r.align === "left" ? -r.textboxWidth / 2 : r.align === "right" ? r.textboxWidth / 2 : 0, a = () => {
5991
+ const n = r.fontSize * t(), i = r.textboxHeight / 2;
5999
5992
  if (r.verticalAlign === "top")
6000
5993
  return -i + r.fontSize * 3 / 4 + r.thisLineIdx * n;
6001
5994
  if (r.verticalAlign === "bottom") {
@@ -6005,14 +5998,14 @@ const ss = (r) => {
6005
5998
  const s = (r.amountLines - 1) / 2;
6006
5999
  return (r.thisLineIdx - s) * n + r.fontSize / 4;
6007
6000
  };
6008
- return /* @__PURE__ */ D("tspan", { textAnchor: Qn(r.align), x: e(), y: `${a()}px`, children: r.text });
6001
+ return /* @__PURE__ */ D("tspan", { textAnchor: Rn(r.align), x: e(), y: `${a()}px`, children: r.text });
6009
6002
  }, ls = (r) => {
6010
6003
  const t = `#${r.curvedPathId}`;
6011
6004
  return /* @__PURE__ */ D(
6012
6005
  "textPath",
6013
6006
  {
6014
6007
  startOffset: r.align === "left" ? "0%" : r.align === "right" ? "100%" : "50%",
6015
- textAnchor: Qn(r.align),
6008
+ textAnchor: Rn(r.align),
6016
6009
  href: t,
6017
6010
  xlinkHref: t,
6018
6011
  children: r.text
@@ -6021,7 +6014,7 @@ const ss = (r) => {
6021
6014
  }, cs = (r) => {
6022
6015
  if (r.cachedObjectURL && !r._renderingConfiguration?.omitCachedFields)
6023
6016
  return /* @__PURE__ */ D(
6024
- kn,
6017
+ Mn,
6025
6018
  {
6026
6019
  id: r.id,
6027
6020
  src: r.cachedObjectURL,
@@ -6050,7 +6043,7 @@ const ss = (r) => {
6050
6043
  {
6051
6044
  transform: i,
6052
6045
  dangerouslySetInnerHTML: {
6053
- __html: fa(
6046
+ __html: Ca(
6054
6047
  r.svg,
6055
6048
  r.width,
6056
6049
  r.height,
@@ -6126,7 +6119,7 @@ class ds {
6126
6119
  layout: t,
6127
6120
  elements: e
6128
6121
  },
6129
- getComponentWithProps: (a) => ya(t, e, a)
6122
+ getComponentWithProps: (a) => Sa(t, e, a)
6130
6123
  };
6131
6124
  }
6132
6125
  initialize(t, e) {
@@ -6151,7 +6144,7 @@ class ds {
6151
6144
  return { ...t, transaction: e.apply(a) };
6152
6145
  }
6153
6146
  }
6154
- const $n = (r) => r.type === x.Image ? /* @__PURE__ */ D(kn, { ...r }, r.id) : r.type === x.Frame ? /* @__PURE__ */ D(Ki, { ...r }, r.id) : r.type === x.Illustration ? /* @__PURE__ */ D(cs, { ...r }, r.id) : r.type === x.Textbox ? /* @__PURE__ */ D(ss, { ...r }, r.id) : r.type === x.Group ? /* @__PURE__ */ D(Mn, { ...r }, r.id) : null, ya = (r, t, e) => {
6147
+ const $n = (r) => r.type === x.Image ? /* @__PURE__ */ D(Mn, { ...r }, r.id) : r.type === x.Frame ? /* @__PURE__ */ D(Ki, { ...r }, r.id) : r.type === x.Illustration ? /* @__PURE__ */ D(cs, { ...r }, r.id) : r.type === x.Textbox ? /* @__PURE__ */ D(ss, { ...r }, r.id) : r.type === x.Group ? /* @__PURE__ */ D(Tn, { ...r }, r.id) : null, Sa = (r, t, e) => {
6155
6148
  const a = e.renderingConfiguration, n = a?.removeExcludedElements ? t.filter((i) => !i.excludeFromExport) : t;
6156
6149
  return /* @__PURE__ */ D(
6157
6150
  Ji,
@@ -6182,7 +6175,7 @@ const $n = (r) => r.type === x.Image ? /* @__PURE__ */ D(kn, { ...r }, r.id) : r
6182
6175
  }
6183
6176
  );
6184
6177
  };
6185
- function Sa(r) {
6178
+ function va(r) {
6186
6179
  return r.sort((t, e) => {
6187
6180
  const a = t.layer || 0, n = e.layer || 0;
6188
6181
  if (a < n) return -1;
@@ -6199,13 +6192,13 @@ const ne = (r) => {
6199
6192
  if (r.defaultVariant !== void 0)
6200
6193
  return t.find((e) => e.id === r.defaultVariant);
6201
6194
  }
6202
- }, ut = /* @__PURE__ */ new Map(), Vt = /* @__PURE__ */ new Map(), We = /* @__PURE__ */ new Map(), Un = async (r, t) => {
6195
+ }, ut = /* @__PURE__ */ new Map(), Vt = /* @__PURE__ */ new Map(), qe = /* @__PURE__ */ new Map(), Un = async (r, t) => {
6203
6196
  if (!t) {
6204
6197
  if (!r) throw new Error("No region or src supplied. Cannot construct frame!");
6205
- return oa(r);
6198
+ return la(r);
6206
6199
  }
6207
6200
  return nt(t);
6208
- }, oa = (r) => {
6201
+ }, la = (r) => {
6209
6202
  const t = r.width, e = r.height;
6210
6203
  return `<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 ${t} ${e}'>
6211
6204
  <path id="target-path" d='M0 0 h ${t} v ${e} h ${-t} Z' />
@@ -6220,9 +6213,9 @@ const ne = (r) => {
6220
6213
  if (!e.asset)
6221
6214
  throw new Error(`No asset for variant with ID: ${r.frameVariantId}`);
6222
6215
  return e;
6223
- }, Oe = async (r) => {
6224
- if (We.has(r))
6225
- return We.get(r);
6216
+ }, $e = async (r) => {
6217
+ if (qe.has(r))
6218
+ return qe.get(r);
6226
6219
  const e = (async () => {
6227
6220
  if (Vt.has(r))
6228
6221
  return Vt.get(r);
@@ -6258,8 +6251,8 @@ const ne = (r) => {
6258
6251
  }
6259
6252
  throw new Error("Malformed frame SVG");
6260
6253
  })();
6261
- return We.set(r, e), e;
6262
- }, va = (r, t, e, a) => {
6254
+ return qe.set(r, e), e;
6255
+ }, Ea = (r, t, e, a) => {
6263
6256
  const n = t.width / t.height, i = r.width / r.height;
6264
6257
  let s;
6265
6258
  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);
@@ -6269,7 +6262,7 @@ const ne = (r) => {
6269
6262
  y: u,
6270
6263
  zoom: s
6271
6264
  };
6272
- }, la = async (r) => {
6265
+ }, ca = async (r) => {
6273
6266
  if (ut.has(r))
6274
6267
  return ut.get(r);
6275
6268
  if (r.startsWith("data:image/svg+xml")) {
@@ -6282,7 +6275,7 @@ const ne = (r) => {
6282
6275
  return ut.set(r, i), i;
6283
6276
  }
6284
6277
  if ((r.split(".").pop()?.toLowerCase() ?? "") === "svg") {
6285
- const e = await Ea(r), a = e.width, n = e.height, i = {
6278
+ const e = await ba(r), a = e.width, n = e.height, i = {
6286
6279
  src: r,
6287
6280
  width: a,
6288
6281
  height: n,
@@ -6290,7 +6283,7 @@ const ne = (r) => {
6290
6283
  };
6291
6284
  return ut.set(r, i), i;
6292
6285
  } else {
6293
- const e = await Me(r, !0), a = await Ne(e), n = {
6286
+ const e = await Te(r, !0), a = await Qe(e), n = {
6294
6287
  src: r,
6295
6288
  width: a.width,
6296
6289
  height: a.height,
@@ -6298,14 +6291,14 @@ const ne = (r) => {
6298
6291
  };
6299
6292
  return ut.set(r, n), n;
6300
6293
  }
6301
- }, Ea = async (r) => {
6294
+ }, ba = async (r) => {
6302
6295
  const t = await nt(r);
6303
6296
  return Ln(t);
6304
- }, Va = (r) => r.endsWith("mm") ? Number(r.replace("mm", "")) * 3.7795275591 : r.endsWith("px") ? Number(r.replace("px", "")) : Number(r), Ln = (r) => {
6297
+ }, za = (r) => r.endsWith("mm") ? Number(r.replace("mm", "")) * 3.7795275591 : r.endsWith("px") ? Number(r.replace("px", "")) : Number(r), Ln = (r) => {
6305
6298
  const a = dt().parseFromString(r, "image/svg+xml").querySelector("svg");
6306
6299
  if (!a)
6307
6300
  throw new Error("No svg tag found, this svg must be malformed!");
6308
- 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));
6301
+ 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));
6309
6302
  if (!o)
6310
6303
  throw new Error("No viewbox or width/height values detected on SVG file!");
6311
6304
  return {
@@ -6319,9 +6312,9 @@ const ne = (r) => {
6319
6312
  nt(r).then((e) => {
6320
6313
  t(e);
6321
6314
  }).catch((e) => console.error(e));
6322
- }), qe = /* @__PURE__ */ new Map(), _t = async (r) => {
6323
- if (qe.has(r))
6324
- return qe.get(r);
6315
+ }), je = /* @__PURE__ */ new Map(), _t = async (r) => {
6316
+ if (je.has(r))
6317
+ return je.get(r);
6325
6318
  const t = async (n) => new Promise((i, s) => {
6326
6319
  try {
6327
6320
  if (!(!!URL && !!URL.createObjectURL)) throw new Error("Environment incapable of generating ObjectURL");
@@ -6337,12 +6330,12 @@ const ne = (r) => {
6337
6330
  const s = dt().parseFromString(r, "image/svg+xml").firstElementChild;
6338
6331
  if (!s)
6339
6332
  throw new Error("Failed to read SVG");
6340
- const l = Bt().serializeToString(s), c = pt(), d = c.getContext("2d"), A = await Aa.from(d, l, {
6333
+ const l = Bt().serializeToString(s), c = pt(), d = c.getContext("2d"), A = await ua.from(d, l, {
6341
6334
  anonymousCrossOrigin: !0,
6342
6335
  ignoreDimensions: !1,
6343
6336
  createCanvas: pt,
6344
6337
  createImage: te,
6345
- DOMParser: ga(),
6338
+ DOMParser: pa(),
6346
6339
  fetch: rt
6347
6340
  }), u = s.getAttribute("width"), h = s.getAttribute("height"), m = 2048;
6348
6341
  if (h && u) {
@@ -6352,7 +6345,7 @@ const ne = (r) => {
6352
6345
  A.resize(m, m);
6353
6346
  return await A.render(), await t(c);
6354
6347
  })();
6355
- return qe.set(r, a), a;
6348
+ return je.set(r, a), a;
6356
6349
  }, Ut = async (r, t, e, a) => {
6357
6350
  const n = r.layoutState.layout.useEditableArea && r.layoutState.layout.editableArea || {
6358
6351
  width: r.layoutState.layout.width,
@@ -6374,19 +6367,19 @@ const ne = (r) => {
6374
6367
  o.height = o.width / C, o.top += (h - o.height) / 2;
6375
6368
  }
6376
6369
  if (e && t === x.Image) {
6377
- const l = o.height, c = await Me(e), d = await Ne(c), A = d.width / d.height;
6370
+ const l = o.height, c = await Te(e), d = await Qe(c), A = d.width / d.height;
6378
6371
  o.height = o.width / A, o.top += (l - o.height) / 2;
6379
6372
  }
6380
6373
  if (e && t === x.Textbox && a?.text && a?.fontScale) {
6381
6374
  await Nt(e);
6382
- const l = Ct(e), c = mt(a.text, a?.fontScale, l);
6375
+ const l = Et(e), c = mt(a.text, a?.fontScale, l);
6383
6376
  o.width = Math.min(c, n.width * 0.85), o.left = n.x + n.width / 2 - o.width / 2;
6384
6377
  }
6385
6378
  return o;
6386
6379
  };
6387
6380
  class Xc {
6388
6381
  static async getFrame(t, e) {
6389
- const a = await Un(e.region, e.src), n = await Oe(a), i = e.region || await Ut(t, x.Frame);
6382
+ const a = await Un(e.region, e.src), n = await $e(a), i = e.region || await Ut(t, x.Frame);
6390
6383
  return {
6391
6384
  id: M(),
6392
6385
  x: i.left,
@@ -6550,13 +6543,13 @@ const $ = (r, t) => _(r, t).elements.find((n) => n.id === r), _ = (r, t) => {
6550
6543
  throw new U();
6551
6544
  return e;
6552
6545
  }, X = (r, t) => {
6553
- const e = [...t.elements.filter((n) => n.id !== r.id), r], a = Sa(e);
6546
+ const e = [...t.elements.filter((n) => n.id !== r.id), r], a = va(e);
6554
6547
  return {
6555
6548
  layout: t.layout,
6556
6549
  elements: a,
6557
6550
  modificationID: M()
6558
6551
  };
6559
- }, za = async (r) => {
6552
+ }, Ga = async (r) => {
6560
6553
  const t = [...Object.keys(r.layouts)], e = [...new Set(t)];
6561
6554
  for (let a = 0; a < e.length; a++) {
6562
6555
  const n = e[a], i = r.layouts[n];
@@ -6566,7 +6559,7 @@ const $ = (r, t) => _(r, t).elements.find((n) => n.id === r), _ = (r, t) => {
6566
6559
  const o = s;
6567
6560
  if (o.src && !o.svg) {
6568
6561
  const l = await nt(o.src), c = await ot(l);
6569
- o.svg = fa(
6562
+ o.svg = Ca(
6570
6563
  c.svg,
6571
6564
  o.width,
6572
6565
  o.height,
@@ -6616,7 +6609,7 @@ class N {
6616
6609
  this.oldState = t;
6617
6610
  }
6618
6611
  }
6619
- class Ga extends N {
6612
+ class Wa extends N {
6620
6613
  constructor(t) {
6621
6614
  super(), this.serializableWorkflow = t;
6622
6615
  }
@@ -6834,7 +6827,7 @@ class us extends N {
6834
6827
  };
6835
6828
  }
6836
6829
  }
6837
- class je extends N {
6830
+ class He extends N {
6838
6831
  constructor(t, e) {
6839
6832
  super(), this.id = t, this.imageFill = e;
6840
6833
  }
@@ -6878,7 +6871,7 @@ class hs extends N {
6878
6871
  };
6879
6872
  }
6880
6873
  }
6881
- class Wa extends N {
6874
+ class qa extends N {
6882
6875
  constructor(t, e) {
6883
6876
  super(), this.id = t, this.fontData = e;
6884
6877
  }
@@ -7024,7 +7017,7 @@ class fs extends N {
7024
7017
  };
7025
7018
  }
7026
7019
  }
7027
- class He extends N {
7020
+ class Ye extends N {
7028
7021
  constructor(t, e, a) {
7029
7022
  super(), this.id = t, this.strokeColor = e, this.strokeThickness = a;
7030
7023
  }
@@ -7047,7 +7040,7 @@ class He extends N {
7047
7040
  };
7048
7041
  }
7049
7042
  }
7050
- class ca extends N {
7043
+ class da extends N {
7051
7044
  constructor(t, e, a) {
7052
7045
  super(), this.id = t, this.className = e, this.fill = a;
7053
7046
  }
@@ -7216,7 +7209,7 @@ class sd extends N {
7216
7209
  };
7217
7210
  }
7218
7211
  }
7219
- class qa {
7212
+ class ja {
7220
7213
  constructor(t, e, a) {
7221
7214
  this.processRegion = async (n) => {
7222
7215
  const i = this.layouts.find((l) => l.panelId === n.panelId);
@@ -7325,7 +7318,7 @@ const ws = async (r) => {
7325
7318
  }
7326
7319
  })).json()).shortUrl;
7327
7320
  } catch (e) {
7328
- throw console.error(e), new ke("Failed to shorten URL, see console.");
7321
+ throw console.error(e), new Me("Failed to shorten URL, see console.");
7329
7322
  }
7330
7323
  };
7331
7324
  class Gn {
@@ -7396,7 +7389,7 @@ class ys {
7396
7389
  l.searchParams.append("video", btoa(JSON.stringify([s]))), l.pathname = l.pathname + (l.pathname.slice(-1) === "/" ? "" : "/");
7397
7390
  const c = l.toString();
7398
7391
  if (c.length >= 2e3)
7399
- throw new ke("Cannot create QR code, URL too long.");
7392
+ throw new Me("Cannot create QR code, URL too long.");
7400
7393
  const d = await ws(c);
7401
7394
  if (!n.data || !n.data.regions)
7402
7395
  throw new Ee(n, "Missing regions.");
@@ -7413,7 +7406,7 @@ class ys {
7413
7406
  return t.data.regions.map(e);
7414
7407
  }
7415
7408
  async command(t, e, a, n) {
7416
- const i = a.getLayouts(), o = `data:image/svg+xml;base64,${btoa(await ln(t, { type: "svg" }))}`, l = e.map((c) => {
7409
+ const i = a.getLayouts(), o = `data:image/svg+xml;base64,${btoa(await cn(t, { type: "svg" }))}`, l = e.map((c) => {
7417
7410
  const d = c.region, A = i.find((u) => u.panelId === d?.panelId);
7418
7411
  if (!A && d)
7419
7412
  throw new Y(d);
@@ -7442,14 +7435,14 @@ class ys {
7442
7435
  }
7443
7436
  }
7444
7437
  const Wn = new ys();
7445
- class Pe {
7438
+ class De {
7446
7439
  constructor() {
7447
7440
  this.frameSourceSvg = async (t, e) => {
7448
7441
  if (!t)
7449
- return oa(e);
7442
+ return la(e);
7450
7443
  const a = t.asset;
7451
7444
  if (!a)
7452
- throw new Et(t);
7445
+ throw new vt(t);
7453
7446
  const n = a.fileLink;
7454
7447
  if (n)
7455
7448
  return nt(n, !0);
@@ -7495,7 +7488,7 @@ class Pe {
7495
7488
  a.serializableWorkflow.steps
7496
7489
  ), l = Object.values(a.layouts).map((c) => c.elements).flat().filter((c) => c.stepName === t.stepName).map((c) => ({ id: c.id, region: c.stepRegion }));
7497
7490
  if (!t.option || (t.option.variants || []).length === 0) {
7498
- const c = t.data.regions.map((d) => oa(d));
7491
+ const c = t.data.regions.map((d) => la(d));
7499
7492
  e.updateStorage(t.stepName, {
7500
7493
  currentFrameSources: c
7501
7494
  });
@@ -7549,7 +7542,7 @@ class Pe {
7549
7542
  })) ?? [];
7550
7543
  }
7551
7544
  selectImage(t, e, a, n = !0) {
7552
- const i = Pe.patternSource(e), s = a.getStepStorage(t.stepName)?.framePatternSrc;
7545
+ const i = De.patternSource(e), s = a.getStepStorage(t.stepName)?.framePatternSrc;
7553
7546
  if (s && s === i)
7554
7547
  return Promise.resolve();
7555
7548
  a.setEditedStatus(t.stepName, !0);
@@ -7569,7 +7562,7 @@ class Pe {
7569
7562
  });
7570
7563
  },
7571
7564
  () => {
7572
- throw new ke("Failed to resolve transcoded PDF");
7565
+ throw new Me("Failed to resolve transcoded PDF");
7573
7566
  }
7574
7567
  )
7575
7568
  );
@@ -7613,7 +7606,7 @@ class Pe {
7613
7606
  }
7614
7607
  async loadPatternFromString(t, e, a = !0, n = void 0, i) {
7615
7608
  if (t.endsWith("svg")) {
7616
- const s = await Ea(t), o = s.width, l = s.height, c = await nt(t);
7609
+ const s = await ba(t), o = s.width, l = s.height, c = await nt(t);
7617
7610
  if (i) {
7618
7611
  const u = c.match(/<(image|linearGradient|radialGradient)(\s|>|\/>)/gim);
7619
7612
  if (u && u.length > 0)
@@ -7631,7 +7624,7 @@ class Pe {
7631
7624
  };
7632
7625
  ut.set(t, A), e.setPatternData(A, a);
7633
7626
  } else {
7634
- const s = await Me(t, !0), o = await Ne(s), l = {
7627
+ const s = await Te(t, !0), o = await Qe(s), l = {
7635
7628
  src: t,
7636
7629
  width: o.width,
7637
7630
  height: o.height,
@@ -7716,7 +7709,7 @@ class Pe {
7716
7709
  i && i(!0);
7717
7710
  const c = t.data.initialZoomLevel, d = await Promise.all(
7718
7711
  t.data.regions.map(async (h, m) => {
7719
- const p = await Oe(l[m]), g = o.getImageData(), C = a.map((P) => new bt(P.id)), S = g ? va(
7712
+ const p = await $e(l[m]), g = o.getImageData(), C = a.map((P) => new bt(P.id)), S = g ? Ea(
7720
7713
  g,
7721
7714
  p,
7722
7715
  c && !t.data.forceImageCover ? { scale: c } : void 0,
@@ -7780,7 +7773,7 @@ class Pe {
7780
7773
  throw new Yt(t);
7781
7774
  }
7782
7775
  async loadPatternFromAsset(t, e, a, n) {
7783
- const i = Pe.patternSource(t), s = a.markUpdatePending(), o = a.getWorkflowExperience().getStepById(e.stepName)?.frameService;
7776
+ const i = De.patternSource(t), s = a.markUpdatePending(), o = a.getWorkflowExperience().getStepById(e.stepName)?.frameService;
7784
7777
  if (!o)
7785
7778
  throw a.markUpdateCompleted(s), new Error("Frame service unavailable, cannot load pattern!");
7786
7779
  try {
@@ -7807,7 +7800,7 @@ class Pe {
7807
7800
  ), this.validateColorCount(e, a);
7808
7801
  }
7809
7802
  }
7810
- const yt = new Pe();
7803
+ const wt = new De();
7811
7804
  class Ss {
7812
7805
  async getIllustrationBody(t) {
7813
7806
  return new Promise((e) => {
@@ -7912,10 +7905,10 @@ class Ss {
7912
7905
  spotColor: A.spotColor,
7913
7906
  pmsValue: A.pmsValue
7914
7907
  };
7915
- const o = fa(t, e, a, s), l = await _t(o), c = [];
7908
+ const o = Ca(t, e, a, s), l = await _t(o), c = [];
7916
7909
  for (const d of n) {
7917
7910
  for (const [A, u] of i.entries())
7918
- c.push(new ca(d, A, u));
7911
+ c.push(new da(d, A, u));
7919
7912
  c.push(new Cs(d, o, l));
7920
7913
  }
7921
7914
  return new R(c);
@@ -7968,7 +7961,7 @@ class Ss {
7968
7961
  t.mandatory && i.setMandatoryFulfilled(t.stepName, !1);
7969
7962
  const o = e.asset;
7970
7963
  if (!o)
7971
- throw new Et(e);
7964
+ throw new vt(e);
7972
7965
  const l = o.fileLink;
7973
7966
  if (!l)
7974
7967
  throw new Yt(o);
@@ -8099,7 +8092,7 @@ class vs {
8099
8092
  n(!0);
8100
8093
  const s = e.material;
8101
8094
  if (!s)
8102
- throw n(!1), new Et(e);
8095
+ throw n(!1), new vt(e);
8103
8096
  return {
8104
8097
  command: void 0,
8105
8098
  followup: async () => {
@@ -8150,7 +8143,7 @@ class Es {
8150
8143
  const u = e.getModelContainer();
8151
8144
  if (u && t.option) {
8152
8145
  const h = d.asset?.fileLink;
8153
- if (!h) throw new Et(d);
8146
+ if (!h) throw new vt(d);
8154
8147
  await u.applyModelVariant(
8155
8148
  t.stepName || "",
8156
8149
  {
@@ -8174,7 +8167,7 @@ class Es {
8174
8167
  n(!0);
8175
8168
  const i = e.asset?.fileLink;
8176
8169
  if (!i)
8177
- throw new Et(e);
8170
+ throw new vt(e);
8178
8171
  return {
8179
8172
  command: void 0,
8180
8173
  followup: async () => {
@@ -8298,7 +8291,7 @@ class bs {
8298
8291
  }
8299
8292
  if (!/^$|^[a-zA-Z0-9 ]+$/.test(e))
8300
8293
  return n("Unsupported characters."), { input: e, helperData: {}, errorData: { unsupportedCharacters: !0 } };
8301
- const i = ea(e.toLowerCase());
8294
+ const i = aa(e.toLowerCase());
8302
8295
  for (const s of i)
8303
8296
  for (const o in a) {
8304
8297
  const l = a[o].toLowerCase().replace(/\s/g, "");
@@ -8351,7 +8344,7 @@ class Bs {
8351
8344
  async selectVariantCommand(t, e, a, n) {
8352
8345
  const i = e.asset;
8353
8346
  if (!i)
8354
- throw new Et(e);
8347
+ throw new vt(e);
8355
8348
  const s = i?.fileLink;
8356
8349
  if (!s)
8357
8350
  return console.error("No URL for picture!"), null;
@@ -8472,7 +8465,7 @@ class Ps {
8472
8465
  const n = a.getLayouts(), s = (a.getRegionElements(e.stepName) || []).map((o) => {
8473
8466
  const l = o.region;
8474
8467
  if (!n.find((d) => d.panelId === l?.panelId)) throw new Y(l);
8475
- return new ca(o.id, this.shapeFillId, t);
8468
+ return new da(o.id, this.shapeFillId, t);
8476
8469
  }).filter((o) => !!o);
8477
8470
  a.getCommandDispatcher()(new R(s)), a.updateStorage(e.stepName, { colour: t });
8478
8471
  }
@@ -8538,7 +8531,7 @@ class Ps {
8538
8531
  if (!i.find((m) => m.panelId === A?.panelId))
8539
8532
  throw new Y(A);
8540
8533
  const h = o();
8541
- return new ca(d.id, this.shapeFillId, h);
8534
+ return new da(d.id, this.shapeFillId, h);
8542
8535
  }, c = a.map(l).filter((d) => !!d);
8543
8536
  return {
8544
8537
  command: new R(c),
@@ -8645,7 +8638,7 @@ class Ds {
8645
8638
  );
8646
8639
  }
8647
8640
  }
8648
- const Fs = new Ds(), Ye = (r, t, e, a, n) => {
8641
+ const Fs = new Ds(), Je = (r, t, e, a, n) => {
8649
8642
  if (t.some((d) => d == null))
8650
8643
  throw new Error(`Failed to autosize lines: ${t.join(", ")}`);
8651
8644
  let i = t.map((d) => d.split(`
@@ -8677,32 +8670,32 @@ const Fs = new Ds(), Ye = (r, t, e, a, n) => {
8677
8670
  }, fe = (r, t, e, a, n) => {
8678
8671
  console.log(`LOG: determineCorrectFontSize, region height ${e.height}`);
8679
8672
  let i, s;
8680
- const o = Ct(t.assetUrl), l = o.getFont();
8673
+ const o = Et(t.assetUrl), l = o.getFont();
8681
8674
  if (n.size) {
8682
8675
  const u = r / l.unitsPerEm;
8683
- return [i, s] = Ye(e, a, r, u, o), console.log(`LOG: fixed mode returning ${n.size, s}`), [n.size, i, s];
8676
+ return [i, s] = Je(e, a, r, u, o), console.log(`LOG: fixed mode returning ${n.size, s}`), [n.size, i, s];
8684
8677
  }
8685
8678
  const c = 6;
8686
- let d = c - Ge;
8679
+ let d = c - We;
8687
8680
  if (a.length > 0) {
8688
8681
  let u = a, h = 0;
8689
8682
  for (; (!n.maxSize || d <= n.maxSize) && u; )
8690
- d += Ge, h = d / l.unitsPerEm, [u, s] = Ye(e, a, d, h, o), console.log(`LOG: intermediate result ${[u, s]}`);
8683
+ d += We, h = d / l.unitsPerEm, [u, s] = Je(e, a, d, h, o), console.log(`LOG: intermediate result ${[u, s]}`);
8691
8684
  }
8692
- d > c && (d -= Ge), n.minSize && d < n.minSize && (d = n.minSize);
8685
+ d > c && (d -= We), n.minSize && d < n.minSize && (d = n.minSize);
8693
8686
  const A = d / l.unitsPerEm;
8694
- return [i, s] = Ye(e, a, d, A, o), console.log(`LOG: var mode returning ${[d, i, s]}`), [d, i, s];
8695
- }, Je = 30;
8696
- class De extends Error {
8687
+ return [i, s] = Je(e, a, d, A, o), console.log(`LOG: var mode returning ${[d, i, s]}`), [d, i, s];
8688
+ }, Ke = 30;
8689
+ class Fe extends Error {
8697
8690
  constructor(t) {
8698
- super(t), Object.setPrototypeOf(this, new.target.prototype), this.name = De.name;
8691
+ super(t), Object.setPrototypeOf(this, new.target.prototype), this.name = Fe.name;
8699
8692
  }
8700
8693
  }
8701
8694
  const xs = ["‘", "’", "“", "”", `
8702
8695
  `];
8703
- class Fe extends Error {
8696
+ class xe extends Error {
8704
8697
  constructor(t) {
8705
- super(t), Object.setPrototypeOf(this, new.target.prototype), this.name = Fe.name;
8698
+ super(t), Object.setPrototypeOf(this, new.target.prototype), this.name = xe.name;
8706
8699
  }
8707
8700
  }
8708
8701
  class ks {
@@ -8712,7 +8705,7 @@ class ks {
8712
8705
  /(\r\n|\r|(\u2665|\u00a9|\u00ae|[\u2000-\u2017]|[\u201E-\u3300]]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff]))/gm,
8713
8706
  ""
8714
8707
  );
8715
- const n = [], i = e ? Ct(e.assetUrl) : void 0;
8708
+ const n = [], i = e ? Et(e.assetUrl) : void 0;
8716
8709
  if (i) {
8717
8710
  const s = a.split("").filter((l) => !xs.includes(l)).join(""), o = s.split("").map((l) => i.getFont().charToGlyph(l));
8718
8711
  for (let l = 0; l < o.length; l++)
@@ -8724,7 +8717,7 @@ class ks {
8724
8717
  }, this.textAlign = (t) => t.vertical ? "center" : t.textAlign || "center", this.getErrorsForText = (t, e, a, n) => {
8725
8718
  let i;
8726
8719
  a.data && a.data.maxLength && e.length > a.data.maxLength && (i || (i = {}), i.hitCharacterLimit = !0);
8727
- const s = n.getProfanities(), o = ea(t.toLowerCase());
8720
+ const s = n.getProfanities(), o = aa(t.toLowerCase());
8728
8721
  for (const c of o)
8729
8722
  for (const d in s) {
8730
8723
  const A = s[d].toLowerCase().replace(/\s/g, "");
@@ -8744,7 +8737,7 @@ class ks {
8744
8737
  if (a)
8745
8738
  await this.reload(t, e, a);
8746
8739
  else {
8747
- const i = this.getDefaultImageFillVariant(t.data), s = i?.asset?.fileLink, o = s ? await la(s) : void 0, l = o ? {
8740
+ const i = this.getDefaultImageFillVariant(t.data), s = i?.asset?.fileLink, o = s ? await ca(s) : void 0, l = o ? {
8748
8741
  src: o.src,
8749
8742
  height: o.height,
8750
8743
  width: o.width,
@@ -8851,7 +8844,7 @@ class ks {
8851
8844
  const a = e.variants?.map((n) => n.asset?.fileLink)?.filter((n) => !!n) || [];
8852
8845
  return Promise.all(
8853
8846
  a.map(async (n) => {
8854
- const i = await la(n);
8847
+ const i = await ca(n);
8855
8848
  return {
8856
8849
  src: n,
8857
8850
  width: i.width,
@@ -8871,7 +8864,7 @@ class ks {
8871
8864
  fillImage: e
8872
8865
  });
8873
8866
  for (const o of a) {
8874
- const l = new je(o.id, e);
8867
+ const l = new He(o.id, e);
8875
8868
  i(l);
8876
8869
  }
8877
8870
  }
@@ -8908,7 +8901,7 @@ class ks {
8908
8901
  strokeColor: s
8909
8902
  });
8910
8903
  for (const o of a) {
8911
- const l = new He(o.id, s, t.data?.strokeThickness);
8904
+ const l = new Ye(o.id, s, t.data?.strokeThickness);
8912
8905
  i(l);
8913
8906
  }
8914
8907
  }
@@ -8998,7 +8991,7 @@ class ks {
8998
8991
  u,
8999
8992
  async () => {
9000
8993
  e.updateMetadata(t.stepName, { color: h, text: m }), e.updateStorage(t.stepName, { text: m, inputText: m });
9001
- const g = o.map((S) => new Wa(S.id, A)), C = new R(g);
8994
+ const g = o.map((S) => new qa(S.id, A)), C = new R(g);
9002
8995
  e.getCommandDispatcher()(C);
9003
8996
  }
9004
8997
  ), o.length === 0 && l) {
@@ -9088,7 +9081,7 @@ class ks {
9088
9081
  async fontDataFromVariant(t) {
9089
9082
  const e = t.asset;
9090
9083
  if (!e)
9091
- throw new Et(t);
9084
+ throw new vt(t);
9092
9085
  const a = e.fileLink;
9093
9086
  if (!a)
9094
9087
  throw new Yt(e);
@@ -9101,20 +9094,20 @@ class ks {
9101
9094
  async selectVariantCommand(t, e, a, n, i, s, o, l, c) {
9102
9095
  const d = i.markUpdatePending(), A = await this.fontDataFromVariant(e);
9103
9096
  if (n.length > 0) {
9104
- const u = n.map((p) => new Wa(p.id, A));
9097
+ const u = n.map((p) => new qa(p.id, A));
9105
9098
  if (l) {
9106
- const p = n.map((g) => new je(g.id, l));
9099
+ const p = n.map((g) => new He(g.id, l));
9107
9100
  u.push(...p);
9108
9101
  }
9109
9102
  if (c) {
9110
9103
  const p = n.map(
9111
- (g) => new He(g.id, c, t.data.strokeThickness)
9104
+ (g) => new Ye(g.id, c, t.data.strokeThickness)
9112
9105
  );
9113
9106
  u.push(...p);
9114
9107
  }
9115
9108
  const h = await this.changeInputTextWithRegion(
9116
9109
  t,
9117
- t.data.size || Je,
9110
+ t.data.size || Ke,
9118
9111
  A,
9119
9112
  a.text || "",
9120
9113
  a,
@@ -9139,7 +9132,7 @@ class ks {
9139
9132
  i
9140
9133
  ), h = await this.changeInputTextWithRegion(
9141
9134
  t,
9142
- t.data.size || Je,
9135
+ t.data.size || Ke,
9143
9136
  A,
9144
9137
  u[0]?.newElement.input || a.text || t.data.defaultText || "",
9145
9138
  a,
@@ -9150,13 +9143,13 @@ class ks {
9150
9143
  ), m = u.flatMap((g) => g.commands);
9151
9144
  if (l) {
9152
9145
  const g = u.map(
9153
- (C) => new je(C.regionElement.id, l)
9146
+ (C) => new He(C.regionElement.id, l)
9154
9147
  );
9155
9148
  m.push(...g);
9156
9149
  }
9157
9150
  if (c) {
9158
9151
  const g = n.map(
9159
- (C) => new He(C.id, c, t.data.strokeThickness)
9152
+ (C) => new Ye(C.id, c, t.data.strokeThickness)
9160
9153
  );
9161
9154
  m.push(...g);
9162
9155
  }
@@ -9183,7 +9176,7 @@ class ks {
9183
9176
  const m = s.getLayouts().find((g) => g.panelId === u.panelId), p = M();
9184
9177
  try {
9185
9178
  if (!m)
9186
- throw new Fe("Failed to find layout for region: " + u.panelId);
9179
+ throw new xe("Failed to find layout for region: " + u.panelId);
9187
9180
  const g = a.colorOption;
9188
9181
  let C;
9189
9182
  if (g && g.variants) {
@@ -9197,7 +9190,7 @@ class ks {
9197
9190
  stepName: t,
9198
9191
  align: this.textAlign(a),
9199
9192
  fill: i.color ? i.color : b,
9200
- fontSize: a.size || Je,
9193
+ fontSize: a.size || Ke,
9201
9194
  fontData: n,
9202
9195
  id: p,
9203
9196
  layer: u.layer,
@@ -9246,10 +9239,10 @@ class ks {
9246
9239
  fontData: n
9247
9240
  };
9248
9241
  } catch (g) {
9249
- throw console.log(g), new De("Error adding font to region");
9242
+ throw console.log(g), new Fe("Error adding font to region");
9250
9243
  }
9251
9244
  }, A = await Promise.all(a.regions.map(d)).catch((u) => {
9252
- throw u instanceof De ? (Fs.setLatestToast("Failed to load font.", $e.Error), u) : u instanceof Fe ? u : new Error(u);
9245
+ throw u instanceof Fe ? (Fs.setLatestToast("Failed to load font.", Ue.Error), u) : u instanceof xe ? u : new Error(u);
9253
9246
  });
9254
9247
  return await s.setSelectionsAndElements(
9255
9248
  t,
@@ -9291,7 +9284,7 @@ class ks {
9291
9284
  const S = (() => {
9292
9285
  if (t.data && t.data.maxLength && h.length > t.data.maxLength)
9293
9286
  return d && d(!0), { info: "0" };
9294
- const f = s.getProfanities(), E = ea(u.toLowerCase());
9287
+ const f = s.getProfanities(), E = aa(u.toLowerCase());
9295
9288
  for (const P of E)
9296
9289
  for (const B in f) {
9297
9290
  const F = f[B].toLowerCase().replace(/\s/g, "");
@@ -9361,7 +9354,7 @@ function $s(r, t, e, a) {
9361
9354
  const n = e / r, i = a / t;
9362
9355
  return n > 1 && i > 1 ? Math.min(n, i) : n > 1 && i < 1 ? i : n < 1 && i > 1 ? n : Math.min(n, i);
9363
9356
  }
9364
- const ja = {
9357
+ const Ha = {
9365
9358
  m: ["x", "y"],
9366
9359
  z: [],
9367
9360
  l: ["x", "y"],
@@ -9391,7 +9384,7 @@ class Us {
9391
9384
  const n = (i) => {
9392
9385
  const s = [], o = i.relative ? i.type : i.type.toUpperCase();
9393
9386
  let l = e !== o;
9394
- const c = ja[i.type];
9387
+ const c = Ha[i.type];
9395
9388
  l && (s.push(o), e = o);
9396
9389
  for (const d of c) {
9397
9390
  const A = i[d];
@@ -9416,7 +9409,7 @@ class Us {
9416
9409
  const e = /([mzlhvcsqta])([^mzlhvcsqta]*)/gi, a = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi, n = [];
9417
9410
  let i;
9418
9411
  for (e.lastIndex = 0; i = e.exec(t); ) {
9419
- const s = i[1].toLowerCase(), o = (i[2].match(a) || []).map(parseFloat), l = s === i[1], c = ja[s];
9412
+ const s = i[1].toLowerCase(), o = (i[2].match(a) || []).map(parseFloat), l = s === i[1], c = Ha[s];
9420
9413
  if (o.length < c.length)
9421
9414
  throw new Dt(
9422
9415
  `Path type "${s}" given ${o.length} arguments, expected ${c.length}.`
@@ -9578,7 +9571,7 @@ const re = w`
9578
9571
  bundleId: r
9579
9572
  }
9580
9573
  })).data.globalPropertyState, Ws = w`
9581
- ${Qe}
9574
+ ${Re}
9582
9575
  fragment ProductFields on Product {
9583
9576
  id
9584
9577
  basePrice
@@ -9622,7 +9615,7 @@ const re = w`
9622
9615
  name
9623
9616
  }
9624
9617
  }
9625
- `, ba = w`
9618
+ `, Ba = w`
9626
9619
  ${Ws}
9627
9620
  fragment ProductCollectionProductFields on ProductCollectionProduct {
9628
9621
  id
@@ -9633,7 +9626,7 @@ const re = w`
9633
9626
  }
9634
9627
  }
9635
9628
  `, ie = (r) => w`
9636
- ${r ? ba : ""}
9629
+ ${r ? Ba : ""}
9637
9630
  fragment ProductCollectionFields on ProductCollection {
9638
9631
  id
9639
9632
  name
@@ -9746,7 +9739,7 @@ const re = w`
9746
9739
  quoteId
9747
9740
  }
9748
9741
  }
9749
- `, Ha = w`
9742
+ `, Ya = w`
9750
9743
  query GetBundleStakeholders($id: String!) {
9751
9744
  bundles(ids: [$id]) {
9752
9745
  id
@@ -9821,7 +9814,7 @@ const re = w`
9821
9814
  }
9822
9815
  }
9823
9816
  `, Hs = w`
9824
- ${ba}
9817
+ ${Ba}
9825
9818
  query GetProductCollectionProducts($id: String!, $productIds: [String!]) {
9826
9819
  productCollections(ids: [$id], productIds: $productIds) {
9827
9820
  id
@@ -9854,7 +9847,7 @@ const re = w`
9854
9847
  }
9855
9848
  }
9856
9849
  `, Js = w`
9857
- ${ba}
9850
+ ${Ba}
9858
9851
  query GetProductCollectionForProductsFeed(
9859
9852
  $id: String!
9860
9853
  $limit: Int
@@ -10233,9 +10226,9 @@ const re = w`
10233
10226
  }
10234
10227
  }
10235
10228
  `;
10236
- var $e = /* @__PURE__ */ ((r) => (r.Error = "Error", r.Warning = "Warning", r.Info = "Info", r))($e || {});
10229
+ var Ue = /* @__PURE__ */ ((r) => (r.Error = "Error", r.Warning = "Warning", r.Info = "Info", r))(Ue || {});
10237
10230
  const wo = 1e3;
10238
- class Ya extends Fn {
10231
+ class Ja extends xn {
10239
10232
  constructor(t) {
10240
10233
  super(), this.createdAt = /* @__PURE__ */ new Date(), this.update = t;
10241
10234
  }
@@ -10249,7 +10242,7 @@ class Ya extends Fn {
10249
10242
  }
10250
10243
  class yo {
10251
10244
  constructor(t, e, a, n, i, s, o, l, c, d, A, u, h, m = !1, p, g = !1, C = !1, S = !1) {
10252
- this.workflowStatePromiseQueue = new xn(1), this.initialized = !1, this.readOnly = !1, this.isReloadedTransaction = !1, this.singleVariantsRenderable = !1, this.stepTags = {}, this.renderLayouts = () => {
10245
+ this.workflowStatePromiseQueue = new kn(1), this.initialized = !1, this.readOnly = !1, this.isReloadedTransaction = !1, this.singleVariantsRenderable = !1, this.stepTags = {}, this.renderLayouts = () => {
10253
10246
  if (!this.previewService) return;
10254
10247
  const b = this.getCommandContext().getAllLayouts(), I = this.getLayoutPreviewService()?.getAll();
10255
10248
  if (I)
@@ -10664,9 +10657,9 @@ class yo {
10664
10657
  ...this.storage,
10665
10658
  [t]: { ...this.storage[t], ...e }
10666
10659
  };
10667
- if (!cn(a, this.storage)) {
10660
+ if (!dn(a, this.storage)) {
10668
10661
  this.storage = a;
10669
- const n = new Ga(this.constructSerializableWorkflow());
10662
+ const n = new Wa(this.constructSerializableWorkflow());
10670
10663
  this.commandContext.apply(n, !0), this.onStepSpecificStorageChange(t), this.onStorageChange();
10671
10664
  }
10672
10665
  }
@@ -10685,7 +10678,7 @@ class yo {
10685
10678
  if (this.readOnly) return;
10686
10679
  const t = this.serialize();
10687
10680
  this.workflowStatePromiseQueue.enqueue(
10688
- new Ya(async () => {
10681
+ new Ja(async () => {
10689
10682
  await new Promise((e) => {
10690
10683
  setTimeout(() => {
10691
10684
  e();
@@ -10702,7 +10695,7 @@ class yo {
10702
10695
  async updateStateWithServerImmediate() {
10703
10696
  if (this.readOnly) return;
10704
10697
  const t = this.serialize();
10705
- return new Ya(async () => {
10698
+ return new Ja(async () => {
10706
10699
  await this.updateTransaction({
10707
10700
  variables: {
10708
10701
  id: this.transaction.id,
@@ -10715,7 +10708,7 @@ class yo {
10715
10708
  const t = this.getCommandContext().getState();
10716
10709
  if (!t)
10717
10710
  throw new V("Attempted to serialize state before it was initialized.");
10718
- const e = vt(t.transaction), a = this.dehydrateState(e);
10711
+ const e = St(t.transaction), a = this.dehydrateState(e);
10719
10712
  return JSON.stringify(a);
10720
10713
  }
10721
10714
  /**
@@ -10751,12 +10744,12 @@ class yo {
10751
10744
  this.stepElements = e(this.stepElements, t);
10752
10745
  }
10753
10746
  getInvalidCanvasRegions() {
10754
- return this.workflow.steps.reduce((t, e) => (St(e, this.stepSelections) || this.stepElements[e.stepName] && this.stepElements[e.stepName].forEach(
10747
+ return this.workflow.steps.reduce((t, e) => (yt(e, this.stepSelections) || this.stepElements[e.stepName] && this.stepElements[e.stepName].forEach(
10755
10748
  (a) => t.push(a)
10756
10749
  ), t), []);
10757
10750
  }
10758
10751
  getInvalidModelVariants() {
10759
- return this.workflow.steps.reduce((t, e) => (e.type === v.Model && !St(e, this.stepSelections) && t.push(e.stepName), t), []);
10752
+ return this.workflow.steps.reduce((t, e) => (e.type === v.Model && !yt(e, this.stepSelections) && t.push(e.stepName), t), []);
10760
10753
  }
10761
10754
  async stepElementsForIntroducedSilentSteps(t, e) {
10762
10755
  const a = this.product;
@@ -10764,10 +10757,10 @@ class yo {
10764
10757
  return Promise.resolve({ stepElements: {}, commands: [] });
10765
10758
  const n = async (c, d, A) => {
10766
10759
  if (c.type === v.SilentIllustration) {
10767
- const u = await new qa(c, d).trigger();
10760
+ const u = await new ja(c, d).trigger();
10768
10761
  return { step: c, results: u };
10769
10762
  } else if (c.type === v.ProductOverlay) {
10770
- const u = await new qa(
10763
+ const u = await new ja(
10771
10764
  c,
10772
10765
  d,
10773
10766
  A
@@ -10856,13 +10849,13 @@ class yo {
10856
10849
  ...this.stepSelections,
10857
10850
  [t]: { selectedVariants: e }
10858
10851
  }, this.selectionCost = Object.values(this.stepSelections).reduce((f, E) => f + E.selectedVariants.map((P) => P.priceModifier || 0).reduce((P, B) => P + B, 0), 0), this.workflow.steps.forEach((f) => {
10859
- St(f, this.stepSelections) || (this.stepInitialised[f.stepName] = !1, delete this.stepMetadata[f.stepName], delete this.stepSelections[f.stepName], delete this.storage[f.stepName]);
10852
+ yt(f, this.stepSelections) || (this.stepInitialised[f.stepName] = !1, delete this.stepMetadata[f.stepName], delete this.stepSelections[f.stepName], delete this.storage[f.stepName]);
10860
10853
  });
10861
10854
  const s = this.allScenes, o = Pt(s, i), l = Pt(s, this.stepSelections), c = o.map((f) => f.silentSteps).flat(), A = l.map((f) => f.silentSteps).flat().filter(
10862
10855
  (f) => !c.some((E) => E.stepName === f.stepName)
10863
10856
  );
10864
10857
  c.forEach((f) => {
10865
- St(f, this.stepSelections) || (this.stepInitialised[f.stepName] = !1);
10858
+ yt(f, this.stepSelections) || (this.stepInitialised[f.stepName] = !1);
10866
10859
  });
10867
10860
  const u = this.getInvalidCanvasRegions(), { stepElements: h, commands: m } = await this.stepElementsForIntroducedSilentSteps(A, !1);
10868
10861
  this.stepElements = {
@@ -10872,7 +10865,7 @@ class yo {
10872
10865
  }, this.removeElements(u);
10873
10866
  const p = this.workflow.steps.find((f) => f.stepName === t);
10874
10867
  p?.type === v.Frame && this.getWorkflowExperience().getStepById(p.stepName)?.frameService?.setTargetElements(a.map((E) => E.id));
10875
- const g = u.map((f) => new bt(f.id)), C = new Ga(this.constructSerializableWorkflow()), S = [...m, ...g, C];
10868
+ const g = u.map((f) => new bt(f.id)), C = new Wa(this.constructSerializableWorkflow()), S = [...m, ...g, C];
10876
10869
  S.length > 0 && this.commandContext.apply(new R(S), !0), await this.ensureStepsAreLoaded(), this.onElementsChange();
10877
10870
  const b = this.getInvalidModelVariants(), I = this.modelContainer;
10878
10871
  if (I) {
@@ -10904,7 +10897,7 @@ class yo {
10904
10897
  );
10905
10898
  break;
10906
10899
  case v.Frame:
10907
- a.push(yt.init(l, this, this.reloadedState));
10900
+ a.push(wt.init(l, this, this.reloadedState));
10908
10901
  break;
10909
10902
  case v.Illustration:
10910
10903
  a.push(
@@ -11415,7 +11408,7 @@ class Po extends Z {
11415
11408
  ...this.manager.getInformationResults(),
11416
11409
  {
11417
11410
  message: "An issue has occurred with text",
11418
- messageType: $e.Error,
11411
+ messageType: Ue.Error,
11419
11412
  stepID: this.step.stepName
11420
11413
  }
11421
11414
  ]);
@@ -11663,7 +11656,7 @@ class xo extends Z {
11663
11656
  ...this.manager.getInformationResults(),
11664
11657
  {
11665
11658
  message: e,
11666
- messageType: $e.Error,
11659
+ messageType: Ue.Error,
11667
11660
  stepID: this.step.stepName
11668
11661
  }
11669
11662
  ];
@@ -11835,7 +11828,7 @@ const To = async (r, t) => {
11835
11828
  headers: e
11836
11829
  }
11837
11830
  })).data?.designCreateMany;
11838
- }, Ja = (r, t, e) => {
11831
+ }, Ka = (r, t, e) => {
11839
11832
  const a = (i) => {
11840
11833
  const s = {};
11841
11834
  if (i.type === "Frame") {
@@ -11919,7 +11912,7 @@ const To = async (r, t) => {
11919
11912
  if (c !== void 0) return c;
11920
11913
  await r.outstandingRequestsPromise();
11921
11914
  const F = (k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(n.id), T = await y.getShadowGraphqlClient().query({
11922
- query: Pn,
11915
+ query: Dn,
11923
11916
  variables: { ids: [n.id] },
11924
11917
  fetchPolicy: "no-cache",
11925
11918
  errorPolicy: "all",
@@ -11931,7 +11924,7 @@ const To = async (r, t) => {
11931
11924
  T.errors && console.log("Server Error:", et.message);
11932
11925
  }), null) : tt ?? null;
11933
11926
  })() || (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"));
11934
- const u = r.getPreviewService(), h = t?.finalizeStepConfig?.lookAtAnimation, m = u && t.showModelOnFinishStep && !!h, p = l && Ja(l, t, !0), g = l && Ja(l, t, !1), C = async (B) => {
11927
+ const u = r.getPreviewService(), h = t?.finalizeStepConfig?.lookAtAnimation, m = u && t.showModelOnFinishStep && !!h, p = l && Ka(l, t, !0), g = l && Ka(l, t, !1), C = async (B) => {
11935
11928
  const F = {};
11936
11929
  let Q = 0;
11937
11930
  if (Object.keys(i).length > 0)
@@ -11940,12 +11933,12 @@ const To = async (r, t) => {
11940
11933
  for (let W = 0; W < tt.selections.length; ++W) {
11941
11934
  const q = tt.selections[W];
11942
11935
  if (et && (!B || et.option && (et.option.variants || []).length > 1 && !et.data.hideSelectionInCart && !et.data.hideSelectionsInCart)) {
11943
- const wt = et.stepTitle;
11944
- F[wt] ? F[wt].push({
11936
+ const Ct = et.stepTitle;
11937
+ F[Ct] ? F[Ct].push({
11945
11938
  id: q.id || "",
11946
11939
  name: q.name,
11947
11940
  priceModifier: q.priceModifier
11948
- }) : F[wt] = [
11941
+ }) : F[Ct] = [
11949
11942
  {
11950
11943
  id: q.id || "",
11951
11944
  name: q.name,
@@ -12042,7 +12035,7 @@ const To = async (r, t) => {
12042
12035
  );
12043
12036
  const n = await (async () => {
12044
12037
  const l = await y.getShadowGraphqlClient().query({
12045
- query: Pn,
12038
+ query: Dn,
12046
12039
  variables: { ids: r.map((c) => c.transaction.id) },
12047
12040
  fetchPolicy: "no-cache",
12048
12041
  errorPolicy: "all"
@@ -12149,7 +12142,7 @@ class $o {
12149
12142
  throw new V("Unexpected storage method requested");
12150
12143
  }
12151
12144
  }
12152
- const Ke = new $o(), Uo = w`
12145
+ const _e = new $o(), Uo = w`
12153
12146
  mutation AddTransactionStakeholder($id: String!, $type: String!, $details: CustomerDetailsInput!) {
12154
12147
  transactionAddStakeholder(id: $id, details: $details, type: $type) {
12155
12148
  id
@@ -12195,8 +12188,8 @@ const Ke = new $o(), Uo = w`
12195
12188
  var zo = /* @__PURE__ */ ((r) => (r.QuantityChanged = "QuantityChanged", r.PriceBreakChanged = "PriceBreakChanged", r))(zo || {});
12196
12189
  class Go {
12197
12190
  constructor(t, e) {
12198
- if (this.cachedStepHandles = /* @__PURE__ */ new Map(), this.currentPriceBreak = 1, this.renderableScenes = [], this.renderableSceneCallbacks = [], this.eventCallbacks = /* @__PURE__ */ new Map(), this.debouncedSavedDesignUpdate = dn(async () => {
12199
- await Ke.getSavedDesignByTransaction(
12191
+ if (this.cachedStepHandles = /* @__PURE__ */ new Map(), this.currentPriceBreak = 1, this.renderableScenes = [], this.renderableSceneCallbacks = [], this.eventCallbacks = /* @__PURE__ */ new Map(), this.debouncedSavedDesignUpdate = An(async () => {
12192
+ await _e.getSavedDesignByTransaction(
12200
12193
  this.getWorkflowManager().getTransaction().id
12201
12194
  ) && this.save();
12202
12195
  }, 2500), this.getCanvasObjectURLAsync = async (n) => new Promise((i, s) => {
@@ -12315,20 +12308,20 @@ class Go {
12315
12308
  height: d.layoutState.layout.height
12316
12309
  }, u = this.commandContext.getLayoutById(d.layoutState.layout.id), h = s.getContext("2d");
12317
12310
  if (!h)
12318
- throw new ke("Failed to obtain 2D context for preview image creation");
12319
- const m = this.workflowManager.getTemplatingContext(), p = ya(u.layoutState.layout, u.layoutState.elements, {
12311
+ throw new Me("Failed to obtain 2D context for preview image creation");
12312
+ const m = this.workflowManager.getTemplatingContext(), p = Sa(u.layoutState.layout, u.layoutState.elements, {
12320
12313
  renderingConfiguration: {
12321
12314
  purpose: Ht.Print,
12322
12315
  region: { left: A.x, top: A.y, width: A.width, height: A.height },
12323
12316
  templatingContext: m
12324
12317
  }
12325
- }), g = mn(p);
12326
- await (await Aa.from(h, g, {
12318
+ }), g = gn(p);
12319
+ await (await ua.from(h, g, {
12327
12320
  anonymousCrossOrigin: !0,
12328
12321
  ignoreDimensions: !1,
12329
12322
  createCanvas: pt,
12330
12323
  createImage: te,
12331
- DOMParser: ga(),
12324
+ DOMParser: pa(),
12332
12325
  fetch
12333
12326
  })).render();
12334
12327
  const S = await this.getCanvasObjectURLAsync(s);
@@ -12349,7 +12342,7 @@ class Go {
12349
12342
  getStepsConditionallyActive() {
12350
12343
  return this.getScenes().flatMap(
12351
12344
  (t) => this.getStepsByScene(t).filter(
12352
- (e) => St(e.getRaw(), this.getWorkflowManager().getStepSelections())
12345
+ (e) => yt(e.getRaw(), this.getWorkflowManager().getStepSelections())
12353
12346
  )
12354
12347
  );
12355
12348
  }
@@ -12486,7 +12479,7 @@ class Go {
12486
12479
  const n = {
12487
12480
  title: await (async () => {
12488
12481
  if (t) return t;
12489
- const i = this.getWorkflowManager().getTransaction().id, o = (await Ke.getSavedDesigns()).find((l) => l.transactionId === i)?.title;
12482
+ const i = this.getWorkflowManager().getTransaction().id, o = (await _e.getSavedDesigns()).find((l) => l.transactionId === i)?.title;
12490
12483
  return o || "My design";
12491
12484
  })(),
12492
12485
  thumbnail: await this.createPreviewImage(!1, 256),
@@ -12497,10 +12490,10 @@ class Go {
12497
12490
  workflowId: this.getWorkflowManager().getWorkflow().id,
12498
12491
  lastEdited: /* @__PURE__ */ new Date()
12499
12492
  };
12500
- return await Ke.addDesign(n), n;
12493
+ return await _e.addDesign(n), n;
12501
12494
  }
12502
12495
  async copy() {
12503
- const t = vt(this.getCommandContext().getState());
12496
+ const t = St(this.getCommandContext().getState());
12504
12497
  if (!t) throw new V("Internal state is undefined! Cannot copy experience!");
12505
12498
  const e = JSON.stringify(t.transaction), a = this.getWorkflowManager().getWorkflow(), n = this.getWorkflowManager().getTransaction().integrationProduct?.id;
12506
12499
  if (!n) throw new V("Integration product id is undefined!");
@@ -12687,8 +12680,8 @@ const Wo = (r) => {
12687
12680
  "tspan"
12688
12681
  ], Ho = async (r, t, e) => {
12689
12682
  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);
12690
- o.searchParams.append("video", Qa(JSON.stringify([{ href: i }]))), o.pathname = o.pathname + (o.pathname.slice(-1) === "/" ? "" : "/");
12691
- const l = o.toString(), d = `data:image/svg+xml;base64,${Qa(await ln(l, { type: "svg" }))}`, A = (h) => {
12683
+ o.searchParams.append("video", Ra(JSON.stringify([{ href: i }]))), o.pathname = o.pathname + (o.pathname.slice(-1) === "/" ? "" : "/");
12684
+ const l = o.toString(), d = `data:image/svg+xml;base64,${Ra(await cn(l, { type: "svg" }))}`, A = (h) => {
12692
12685
  const m = r.find((g) => g.panelId === h.panelId);
12693
12686
  if (!m)
12694
12687
  throw new Y(h);
@@ -12713,15 +12706,15 @@ const Wo = (r) => {
12713
12706
  return console.error(h), [];
12714
12707
  }
12715
12708
  }, Yo = async (r, t, e, a) => {
12716
- const n = e.data, i = n.assetUrl, s = await la(i);
12709
+ const n = e.data, i = n.assetUrl, s = await ca(i);
12717
12710
  try {
12718
12711
  const o = As(n, a.option);
12719
12712
  o && (t[a.stepName] = { selectedVariants: [o] });
12720
12713
  const l = async (c) => {
12721
- const d = await Un(c, o?.asset?.fileLink), A = await Oe(d), u = M(), h = r.find((p) => p.panelId === c.panelId);
12714
+ const d = await Un(c, o?.asset?.fileLink), A = await $e(d), u = M(), h = r.find((p) => p.panelId === c.panelId);
12722
12715
  if (!h)
12723
12716
  throw new Y(c);
12724
- const m = va(
12717
+ const m = Ea(
12725
12718
  s,
12726
12719
  A,
12727
12720
  {
@@ -12785,7 +12778,7 @@ const Wo = (r) => {
12785
12778
  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;
12786
12779
  if (!m)
12787
12780
  return console.error("Failed to read SVG."), [];
12788
- pa(m);
12781
+ fa(m);
12789
12782
  const p = {};
12790
12783
  kt(m, (f) => {
12791
12784
  jo.includes(f.tagName) && !f.attributes.getNamedItem("fill") && f.setAttribute("fill", "#000000");
@@ -12999,7 +12992,7 @@ const Wo = (r) => {
12999
12992
  const u = /<svg.*?<\/svg>/s, h = A.match(u) || [], m = h?.length > 0 ? h[0] : "", C = dt().parseFromString(m, "image/svg+xml").firstElementChild;
13000
12993
  if (!C)
13001
12994
  throw new Dt("Failed to read SVG.");
13002
- return pa(C), Bt().serializeToString(C);
12995
+ return fa(C), Bt().serializeToString(C);
13003
12996
  };
13004
12997
  l.forEach((A) => {
13005
12998
  const u = r.find((m) => m.panelId === A.panelId);
@@ -13218,7 +13211,7 @@ const rl = () => new Promise((r, t) => {
13218
13211
  }), il = rl();
13219
13212
  class sl {
13220
13213
  constructor(t, e, a, n, i) {
13221
- this.hasSetStaticContext = !1, this.interactiveDirty = !1, this.staticCtxDirty = !1, this.lastRequestedRenderArguments = void 0, this.lastCompletedStaticRender = void 0, this.renderQueue = new xn(2), this.id = t, this.name = e, this.service = a, this.panelSize = n, this.getWorkflowManager = i;
13214
+ this.hasSetStaticContext = !1, this.interactiveDirty = !1, this.staticCtxDirty = !1, this.lastRequestedRenderArguments = void 0, this.lastCompletedStaticRender = void 0, this.renderQueue = new kn(2), this.id = t, this.name = e, this.service = a, this.panelSize = n, this.getWorkflowManager = i;
13222
13215
  }
13223
13216
  getID() {
13224
13217
  return this.id;
@@ -13264,7 +13257,7 @@ class sl {
13264
13257
  * Actions to perform when a static render event is fired for this canvas.
13265
13258
  */
13266
13259
  async render(t) {
13267
- const e = vt(t);
13260
+ const e = St(t);
13268
13261
  this.lastRequestedRenderArguments = e;
13269
13262
  const a = this.getStaticContext();
13270
13263
  if (!a) {
@@ -13285,7 +13278,7 @@ class sl {
13285
13278
  );
13286
13279
  }
13287
13280
  }
13288
- class ol extends Fn {
13281
+ class ol extends xn {
13289
13282
  constructor(t, e, a, n, i, s) {
13290
13283
  super(), this.layoutId = t, this.ctx = e, this.nonPOTSupport = a, this.onRender = n, this.layouts = i, this.getWorkflowManager = s;
13291
13284
  }
@@ -13335,12 +13328,12 @@ class ol extends Fn {
13335
13328
  l = g.width, c = g.height;
13336
13329
  } else
13337
13330
  l = i.width, c = i.height;
13338
- const d = this.getWorkflowManager?.()?.getTemplatingContext(), A = ya(t.layoutState.layout, e, {
13331
+ const d = this.getWorkflowManager?.()?.getTemplatingContext(), A = Sa(t.layoutState.layout, e, {
13339
13332
  renderingConfiguration: {
13340
13333
  purpose: Ht.ThreeD,
13341
13334
  templatingContext: d
13342
13335
  }
13343
- }), u = mn(A), h = await Aa.from(this.ctx, u, {
13336
+ }), u = gn(A), h = await ua.from(this.ctx, u, {
13344
13337
  anonymousCrossOrigin: !0,
13345
13338
  ignoreDimensions: !this.nonPOTSupport,
13346
13339
  ignoreAnimation: !0,
@@ -13349,7 +13342,7 @@ class ol extends Fn {
13349
13342
  enableRedraw: !1,
13350
13343
  createCanvas: pt,
13351
13344
  createImage: te,
13352
- DOMParser: ga(),
13345
+ DOMParser: pa(),
13353
13346
  fetch
13354
13347
  });
13355
13348
  h.resize(l, c), await h.render(), this.onRender();
@@ -13419,14 +13412,14 @@ class ll {
13419
13412
  case L.FileUpload:
13420
13413
  return new cl(this.bundle, t).initialize();
13421
13414
  case L.ColorOption:
13422
- return new Ka(
13415
+ return new _a(
13423
13416
  this.bundle,
13424
13417
  t,
13425
13418
  t.entityId ? await H.getOption(t.entityId) : void 0
13426
13419
  );
13427
13420
  case L.Option: {
13428
13421
  const e = t.entityId ? await H.getOption(t.entityId) : void 0;
13429
- return e?.type === "Color" ? new Ka(this.bundle, t, e) : new tr(this.bundle, t, e);
13422
+ return e?.type === "Color" ? new _a(this.bundle, t, e) : new tr(this.bundle, t, e);
13430
13423
  }
13431
13424
  case L.Text:
13432
13425
  return new dl(this.bundle, t);
@@ -13435,7 +13428,7 @@ class ll {
13435
13428
  }
13436
13429
  }
13437
13430
  }
13438
- class Ba {
13431
+ class Ia {
13439
13432
  constructor(t, e) {
13440
13433
  this.bundle = t, this.property = e;
13441
13434
  }
@@ -13496,7 +13489,7 @@ class Ba {
13496
13489
  return this.bundle.getGlobalPropertyStateManager().getAspect(this.property.name);
13497
13490
  }
13498
13491
  }
13499
- class cl extends Ba {
13492
+ class cl extends Ia {
13500
13493
  constructor(t, e) {
13501
13494
  super(t, e);
13502
13495
  }
@@ -13507,7 +13500,7 @@ class cl extends Ba {
13507
13500
  const t = await this.getImage();
13508
13501
  if (t?.fileLink)
13509
13502
  if (t?.fileLink.endsWith(".svg")) {
13510
- const e = await nt(t?.fileLink), a = await Ea(t?.fileLink), n = a.width, i = a.height, s = await ot(e);
13503
+ const e = await nt(t?.fileLink), a = await ba(t?.fileLink), n = a.width, i = a.height, s = await ot(e);
13511
13504
  this.bundle.getGlobalPropertyStateManager().getAspectStorage(this.property.name)?.colors?.forEach((c) => {
13512
13505
  s.colors[c.key] = {
13513
13506
  browserValue: c.browserValue,
@@ -13550,7 +13543,7 @@ class cl extends Ba {
13550
13543
  ]);
13551
13544
  }
13552
13545
  async canUseBackgroundRemover() {
13553
- return this.bundle.getClient().canUseAddon(ua.BackgroundRemover);
13546
+ return this.bundle.getClient().canUseAddon(ha.BackgroundRemover);
13554
13547
  }
13555
13548
  /**
13556
13549
  * Removes the background from an image, stores it in the state, and returns the new asset.
@@ -13588,7 +13581,7 @@ class cl extends Ba {
13588
13581
  return O.getLocalOrFromServer(t);
13589
13582
  }
13590
13583
  async getImageWithColors() {
13591
- return await this.loadImageData(), this.imageData?.svg ? ha(Ca(this.imageData.svg, this.imageData.colors ?? {}, !1)) : this.imageData?.src;
13584
+ return await this.loadImageData(), this.imageData?.svg ? ma(wa(this.imageData.svg, this.imageData.colors ?? {}, !1)) : this.imageData?.src;
13592
13585
  }
13593
13586
  /**
13594
13587
  * Retrieves the original, unmodified image selection, if one exists.
@@ -13722,7 +13715,7 @@ class cl extends Ba {
13722
13715
  );
13723
13716
  }
13724
13717
  }
13725
- class dl extends Ba {
13718
+ class dl extends Ia {
13726
13719
  constructor(t, e) {
13727
13720
  super(t, e);
13728
13721
  }
@@ -13761,7 +13754,7 @@ class dl extends Ba {
13761
13754
  await Promise.all(n);
13762
13755
  }
13763
13756
  }
13764
- class tr extends Ba {
13757
+ class tr extends Ia {
13765
13758
  constructor(t, e, a) {
13766
13759
  super(t, e), this.optionResource = a;
13767
13760
  }
@@ -13823,7 +13816,7 @@ class tr extends Ba {
13823
13816
  await Promise.all(n);
13824
13817
  }
13825
13818
  }
13826
- class Ka extends tr {
13819
+ class _a extends tr {
13827
13820
  constructor(t, e, a) {
13828
13821
  super(t, e, a);
13829
13822
  }
@@ -13924,7 +13917,7 @@ class hl {
13924
13917
  }
13925
13918
  async setGlobalPropertyState(t) {
13926
13919
  this.globalPropertyState || await this.initPromise;
13927
- const e = vt(this.globalPropertyState);
13920
+ const e = St(this.globalPropertyState);
13928
13921
  this.globalPropertyState = { ...t, id: e.id }, this.recalculateMandatoryStates(), await this.updateGlobalPropertyState(), await this.onGlobalPropertyStateChange(e, this.globalPropertyState);
13929
13922
  }
13930
13923
  getAspectMandatoryFulfilled(t) {
@@ -13951,7 +13944,7 @@ class hl {
13951
13944
  if (!i)
13952
13945
  throw new Error(`Failed to find configuration aspect with name: ${t}`);
13953
13946
  this.mandatoryFulfilledAspects.set(t, e !== "");
13954
- const s = vt(this.globalPropertyState), o = this.globalPropertyState.aspects.filter((l) => l.name === t);
13947
+ const s = St(this.globalPropertyState), o = this.globalPropertyState.aspects.filter((l) => l.name === t);
13955
13948
  if (o.length > 0)
13956
13949
  if (n) {
13957
13950
  const l = o.find((c) => c.channel === n);
@@ -13994,7 +13987,7 @@ class hl {
13994
13987
  const n = this.configuration.aspects.find((o) => o.name === t);
13995
13988
  if (!n)
13996
13989
  throw new Error(`Failed to find configuration aspect with name: ${t}`);
13997
- const i = vt(this.globalPropertyState), s = this.globalPropertyState.aspects.filter((o) => o.name === t);
13990
+ const i = St(this.globalPropertyState), s = this.globalPropertyState.aspects.filter((o) => o.name === t);
13998
13991
  if (s.length > 0)
13999
13992
  if (a) {
14000
13993
  const o = s.find((l) => l.channel === a);
@@ -14391,7 +14384,7 @@ class ar {
14391
14384
  if (u || m.partial && (!m.data.productCollections || m.data.productCollections.length === 0 || !m.data.productCollections[0].productCollectionProductsFeed?.items || m.data.productCollections[0].productCollectionProductsFeed?.items.length === 0))
14392
14385
  return;
14393
14386
  l.abort(), u = !0, h.unsubscribe();
14394
- const p = m.data.productCollections?.[0].productCollectionProductsFeed?.items.filter((g) => !!g.product).map((g) => new Ae(vt(g))) || [];
14387
+ const p = m.data.productCollections?.[0].productCollectionProductsFeed?.items.filter((g) => !!g.product).map((g) => new Ae(St(g))) || [];
14395
14388
  A({
14396
14389
  items: p,
14397
14390
  // Clone items because it could be cached data (immutable)
@@ -14686,7 +14679,7 @@ const El = w`
14686
14679
  }
14687
14680
  }
14688
14681
  `;
14689
- class _e {
14682
+ class Xe {
14690
14683
  constructor(t, e, a, n, i, s) {
14691
14684
  this.workflowExperiences = [], this.eventEmitter = new vl(), 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 ml(e.bundleStateData);
14692
14685
  const o = this.productCollection?.globalPropertyConfiguration;
@@ -15140,7 +15133,7 @@ class _e {
15140
15133
  }
15141
15134
  async getAllStakeholders() {
15142
15135
  const t = await y.getShadowGraphqlClient().query({
15143
- query: Ha,
15136
+ query: Ya,
15144
15137
  errorPolicy: "all",
15145
15138
  fetchPolicy: "no-cache",
15146
15139
  variables: {
@@ -15156,7 +15149,7 @@ class _e {
15156
15149
  }
15157
15150
  async getCurrentStakeholder() {
15158
15151
  const t = await y.getShadowGraphqlClient().query({
15159
- query: Ha,
15152
+ query: Ya,
15160
15153
  errorPolicy: "all",
15161
15154
  fetchPolicy: "no-cache",
15162
15155
  variables: {
@@ -15560,7 +15553,7 @@ class ue {
15560
15553
  return this.getArtifacts().get(t);
15561
15554
  }
15562
15555
  }
15563
- class Ia {
15556
+ class Pa {
15564
15557
  constructor(t) {
15565
15558
  this.value = t;
15566
15559
  }
@@ -15573,12 +15566,12 @@ class Ia {
15573
15566
  }
15574
15567
  }
15575
15568
  var Fl = /* @__PURE__ */ ((r) => (r.Transaction = "Transaction", r.Bundle = "Bundle", r.Product = "Product", r.Variant = "Variant", r.Option = "Option", r.LineItem = "LineItem", r.Asset = "Asset", r))(Fl || {});
15576
- class Ad extends Ia {
15569
+ class Ad extends Pa {
15577
15570
  constructor(t) {
15578
15571
  super(`"${t}"`);
15579
15572
  }
15580
15573
  }
15581
- class nr extends Ia {
15574
+ class nr extends Pa {
15582
15575
  constructor(t, e) {
15583
15576
  if (e !== "Asset" && !nr.validUUID(t))
15584
15577
  throw new Error("Invalid ID, must be a valid v4 UUID. https://www.uuidgenerator.net/");
@@ -15588,12 +15581,12 @@ class nr extends Ia {
15588
15581
  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);
15589
15582
  }
15590
15583
  }
15591
- class ud extends Ia {
15584
+ class ud extends Pa {
15592
15585
  constructor(t) {
15593
15586
  super(`[${t.map((e) => e.getRaw()).join(",")}]`);
15594
15587
  }
15595
15588
  }
15596
- class _a {
15589
+ class Xa {
15597
15590
  constructor(t) {
15598
15591
  this.integrationProduct = t;
15599
15592
  }
@@ -15781,7 +15774,7 @@ class Nl {
15781
15774
  }
15782
15775
  async generateCode(t) {
15783
15776
  const e = await this.cognitoClient?.send(
15784
- new xa({
15777
+ new ka({
15785
15778
  AuthFlow: "CUSTOM_AUTH",
15786
15779
  ClientId: this.userPoolClientId,
15787
15780
  AuthParameters: {
@@ -15815,7 +15808,7 @@ class Nl {
15815
15808
  throw new Error("Failed to find existing tokens.");
15816
15809
  const e = JSON.parse(t);
15817
15810
  return await this.cognitoClient?.send(
15818
- new xa({
15811
+ new ka({
15819
15812
  AuthFlow: "REFRESH_TOKEN_AUTH",
15820
15813
  ClientId: this.userPoolClientId,
15821
15814
  AuthParameters: {
@@ -15845,7 +15838,7 @@ class Ql {
15845
15838
  * @param currency The currency to determine precision for.
15846
15839
  */
15847
15840
  getPrecisionForCurrency(t) {
15848
- const e = t, a = ka.code(e);
15841
+ const e = t, a = Ma.code(e);
15849
15842
  return a ? a.digits : 2;
15850
15843
  }
15851
15844
  /**
@@ -15856,11 +15849,11 @@ class Ql {
15856
15849
  */
15857
15850
  getSpecialFormat(t) {
15858
15851
  const e = t;
15859
- if (ka.code(e)?.code === "CLP")
15852
+ if (Ma.code(e)?.code === "CLP")
15860
15853
  return "USD0,0";
15861
15854
  }
15862
15855
  }
15863
- const Xa = new Ql();
15856
+ const Za = new Ql();
15864
15857
  class Rl {
15865
15858
  constructor(t, e, a, n) {
15866
15859
  this.presentmentCurrency = void 0, this.presentmentCurrency = n, this.partnerCurrency = a, this.rateFrom = t, this.rateTo = e;
@@ -15892,13 +15885,13 @@ class Rl {
15892
15885
  * Converts a monetary value from the database to the units of its currency.
15893
15886
  */
15894
15887
  units(t, e) {
15895
- return t / Math.pow(10, Xa.getPrecisionForCurrency(e));
15888
+ return t / Math.pow(10, Za.getPrecisionForCurrency(e));
15896
15889
  }
15897
15890
  /**
15898
15891
  * Converts a monetary value in units to the subunits of its currency.
15899
15892
  */
15900
15893
  subunits(t, e) {
15901
- return t * Math.pow(10, Xa.getPrecisionForCurrency(e));
15894
+ return t * Math.pow(10, Za.getPrecisionForCurrency(e));
15902
15895
  }
15903
15896
  }
15904
15897
  const Ol = async (r, t) => {
@@ -15965,7 +15958,7 @@ class md {
15965
15958
  } catch (a) {
15966
15959
  throw console.error(a), new ht("Critical - Unable to synchronize workflow state with server.");
15967
15960
  }
15968
- }, this.options = t, this.options.applicationKey && Lr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 31.2.3-beta.3eaa5ef7-903f-53ab-8b16-a79ca8ddc239"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
15961
+ }, this.options = t, this.options.applicationKey && Lr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 31.2.3-beta.6656bf1f-f28c-546b-a655-f036c595b6cc"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
15969
15962
  }
15970
15963
  configure(t) {
15971
15964
  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 && zr(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration(), this.spiffRegion && this.userPoolRegion && this.userPoolClientId && Lt.init(this.spiffRegion, this.userPoolRegion, this.userPoolClientId);
@@ -16265,7 +16258,7 @@ class md {
16265
16258
  s.set(i.id, i.partner.id), k.setMap("bundlePartnerIds", s);
16266
16259
  const o = k.getMap("bundleOwnerIds") || /* @__PURE__ */ new Map();
16267
16260
  o.set(i.id, i.bundleOwnerId), k.setMap("bundleOwnerIds", o);
16268
- const l = new _e(this, i, void 0, void 0, i.bundleOwnerId, {
16261
+ const l = new Xe(this, i, void 0, void 0, i.bundleOwnerId, {
16269
16262
  eagerFetchProducts: a?.graphql?.productCollection?.eagerFetchProducts
16270
16263
  });
16271
16264
  return await l.getInitializationPromise(), l;
@@ -16305,7 +16298,7 @@ class md {
16305
16298
  throw new Error(`Unable to find bundle: ${t}`);
16306
16299
  const d = c.data?.bundles[0], A = k.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
16307
16300
  A.set(d.id, d.partner.id), k.setMap("bundlePartnerIds", A);
16308
- const u = new _e(this, d, e, a, s, {
16301
+ const u = new Xe(this, d, e, a, s, {
16309
16302
  additionalHeaders: n?.graphql?.additionalHeaders,
16310
16303
  eagerFetchProducts: n?.graphql?.productCollection?.eagerFetchProducts,
16311
16304
  existingGlobalPropertyState: c.data.globalPropertyState,
@@ -16352,7 +16345,7 @@ class md {
16352
16345
  d.set(c.id, c.partner.id), k.setMap("bundlePartnerIds", d);
16353
16346
  const A = k.getMap("bundleOwnerIds") || /* @__PURE__ */ new Map();
16354
16347
  return A.set(c.id, c.bundleOwnerId), k.setMap("bundleOwnerIds", A), async () => {
16355
- const u = new _e(this, c, void 0, void 0, c.bundleOwnerId, {
16348
+ const u = new Xe(this, c, void 0, void 0, c.bundleOwnerId, {
16356
16349
  eagerFetchProducts: n?.graphql?.productCollection?.eagerFetchProducts,
16357
16350
  existingGlobalPropertyState: c.globalPropertyState
16358
16351
  });
@@ -16477,7 +16470,7 @@ class md {
16477
16470
  }));
16478
16471
  }, s = t.map((f, E) => ({ option: f, index: E })), o = s.filter((f) => f.option.type === "transaction"), l = s.filter(
16479
16472
  (f) => f.option.type === "integration" || f.option.type === "external"
16480
- ), c = Fa(o, 10), d = Fa(l, 10), A = (await Promise.all([
16473
+ ), c = xa(o, 10), d = xa(l, 10), A = (await Promise.all([
16481
16474
  ...c.map(n),
16482
16475
  ...d.map(i)
16483
16476
  ])).flat(), u = [...new Set(A.map((f) => f.workflowId))], h = await rr(u, e), m = new Map(h.map((f) => [f.id, f])), p = k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map(), g = A.map(async (f) => {
@@ -16504,10 +16497,10 @@ class md {
16504
16497
  };
16505
16498
  if (T.type === "transaction" && E.workflowState) {
16506
16499
  const q = JSON.parse(E.workflowState);
16507
- W.layouts = Object.values(q.layouts || {}).map((wt) => wt.layout), await za(q), W.reloadedState = q;
16500
+ W.layouts = Object.values(q.layouts || {}).map((Ct) => Ct.layout), await Ga(q), W.reloadedState = q;
16508
16501
  } else if (!B && T.workflowState) {
16509
16502
  const q = JSON.parse(T.workflowState);
16510
- W.layouts = Object.values(q.layouts || {}).map((wt) => wt.layout), await za(q), W.reloadedState = q;
16503
+ W.layouts = Object.values(q.layouts || {}).map((Ct) => Ct.layout), await Ga(q), W.reloadedState = q;
16511
16504
  } else
16512
16505
  W.layouts = Ll(
16513
16506
  W.transaction,
@@ -16539,7 +16532,7 @@ class md {
16539
16532
  })).data?.integrationProducts;
16540
16533
  if (!i || i.length === 0 || !i[0]?.id)
16541
16534
  throw new Error("Integration product not found.");
16542
- return new _a(i[0]);
16535
+ return new Xa(i[0]);
16543
16536
  }
16544
16537
  async getIntegrationProductFromExternalIds(t, e, a) {
16545
16538
  const s = (await y.getShadowGraphqlClient().query({
@@ -16553,7 +16546,7 @@ class md {
16553
16546
  })).data?.integrationProductFromExternalIds;
16554
16547
  if (!s?.id)
16555
16548
  throw new Error("Integration product not found.");
16556
- return new _a(s);
16549
+ return new Xa(s);
16557
16550
  }
16558
16551
  async getIntegrationProduct(t) {
16559
16552
  return t.type === "integration" ? this.getIntegrationProductById(t.integrationProductId) : this.getIntegrationProductFromExternalIds(t.externalIntegrationId, t.externalProductId);
@@ -16650,7 +16643,7 @@ function me(r, t, e) {
16650
16643
  }
16651
16644
  class Gl {
16652
16645
  constructor(t, e) {
16653
- this.minZoomScale = [0.03], this.maxZoomScale = [20], this._debouncedUpdateFrameOffsets = dn(this.updateFrameOffsets, 200), this.targetElements = [], this.onFrameDataChangeListeners = [], this.onZoomChangeListeners = [], this.forceImageCover = t, this.initialZoom = e, this.thresholdSettings = {
16646
+ this.minZoomScale = [0.03], this.maxZoomScale = [20], this._debouncedUpdateFrameOffsets = An(this.updateFrameOffsets, 200), this.targetElements = [], this.onFrameDataChangeListeners = [], this.onZoomChangeListeners = [], this.forceImageCover = t, this.initialZoom = e, this.thresholdSettings = {
16654
16647
  useThreshold: !1,
16655
16648
  invertThreshold: !1,
16656
16649
  threshold: 128,
@@ -16670,8 +16663,8 @@ class Gl {
16670
16663
  if (n.currentFrameSources) {
16671
16664
  let i = !1;
16672
16665
  for (let s = 0; s < n.currentFrameSources.length; s++) {
16673
- const o = n.currentFrameSources[s], l = await Oe(o), c = this.frameData ? this.frameData[s] : void 0;
16674
- cn(l, c) || (this.frameData || (this.frameData = new Array(n.currentFrameSources.length)), this.frameData[s] = l, i = !0);
16666
+ const o = n.currentFrameSources[s], l = await $e(o), c = this.frameData ? this.frameData[s] : void 0;
16667
+ dn(l, c) || (this.frameData || (this.frameData = new Array(n.currentFrameSources.length)), this.frameData[s] = l, i = !0);
16675
16668
  }
16676
16669
  i && (this.onFrameDataChangeListeners.forEach(
16677
16670
  (s) => s(this.frameData)
@@ -16723,8 +16716,8 @@ class Gl {
16723
16716
  getImageSrc() {
16724
16717
  if (this.imageData) {
16725
16718
  if (this.imageData.svg) {
16726
- const t = Ca(this.imageData.svg, this.imageData.colors || {}, !1);
16727
- return ha(t);
16719
+ const t = wa(this.imageData.svg, this.imageData.colors || {}, !1);
16720
+ return ma(t);
16728
16721
  }
16729
16722
  return this.imageData.src;
16730
16723
  }
@@ -16860,7 +16853,7 @@ class Gl {
16860
16853
  }
16861
16854
  recalculateOffsets(t) {
16862
16855
  this.frameData && ((!this.offsets || this.offsets.length !== this.frameData.length) && (this.offsets = new Array(this.frameData.length)), this.frameData.forEach((e, a) => {
16863
- this.offsets[a] = va(
16856
+ this.offsets[a] = Ea(
16864
16857
  t,
16865
16858
  e,
16866
16859
  this.initialZoom && !this.forceImageCover ? { scale: this.initialZoom } : void 0,
@@ -17040,7 +17033,7 @@ class ql extends Z {
17040
17033
  }
17041
17034
  selectVariant(t) {
17042
17035
  const e = this.manager.getRegionElements(this.step.stepName);
17043
- return yt.selectVariant(
17036
+ return wt.selectVariant(
17044
17037
  this.step,
17045
17038
  t.getResource(),
17046
17039
  e,
@@ -17060,7 +17053,7 @@ class ql extends Z {
17060
17053
  * @param [recalculateOffsets=true] Optional: Recalculates the offsets of the image inside the frame. Default: `true`.
17061
17054
  */
17062
17055
  async selectImage(t, e = !0, a = !0) {
17063
- if (await yt.selectImage(this.step, t, this.manager, a), e) {
17056
+ if (await wt.selectImage(this.step, t, this.manager, a), e) {
17064
17057
  const n = this.manager.getStepStorage(this.step.stepName)?.framePatternData || {};
17065
17058
  this.manager.updateStorage(this.step.stepName, {
17066
17059
  framePatternData: {
@@ -17076,7 +17069,7 @@ class ql extends Z {
17076
17069
  * Returns `true` if the Background Remover is available for the current session.
17077
17070
  */
17078
17071
  async canUseBackgroundRemover() {
17079
- return this.manager.getClient().canUseAddon(ua.BackgroundRemover);
17072
+ return this.manager.getClient().canUseAddon(ha.BackgroundRemover);
17080
17073
  }
17081
17074
  /**
17082
17075
  * Returns `true` if the Background Remover is available for the current session and if the associated frame has a user-supplied raster image.
@@ -17098,7 +17091,7 @@ class ql extends Z {
17098
17091
  if (!e)
17099
17092
  throw new Error("You must supply an image selection before attempting to remove the background.");
17100
17093
  const a = await O.removeBackgroundFromAsset(e);
17101
- t && await yt.selectImage(this.step, a, this.manager, !1);
17094
+ t && await wt.selectImage(this.step, a, this.manager, !1);
17102
17095
  const n = this.manager.getStepStorage(this.step.stepName)?.framePatternData || {};
17103
17096
  return this.manager.updateStorage(this.step.stepName, {
17104
17097
  framePatternData: {
@@ -17109,7 +17102,7 @@ class ql extends Z {
17109
17102
  }), a;
17110
17103
  }
17111
17104
  changeColors(t) {
17112
- yt.changeColors(this.step, this.manager, t);
17105
+ wt.changeColors(this.step, this.manager, t);
17113
17106
  }
17114
17107
  getImageData() {
17115
17108
  if (this.frameService)
@@ -17119,7 +17112,7 @@ class ql extends Z {
17119
17112
  return this.step.data.colorOption;
17120
17113
  }
17121
17114
  getAvailableColors() {
17122
- return this.step.data.colorPickerEnabled ? yt.availableColors(this.step, this.manager) : Promise.resolve([]);
17115
+ return this.step.data.colorPickerEnabled ? wt.availableColors(this.step, this.manager) : Promise.resolve([]);
17123
17116
  }
17124
17117
  isColorPickerEnabled() {
17125
17118
  return this.step.data.colorPickerEnabled ?? !1;
@@ -17132,7 +17125,7 @@ class ql extends Z {
17132
17125
  return this.step.data.maxColors;
17133
17126
  }
17134
17127
  getUniqueColorCount() {
17135
- return yt.getUniqueColorCount(this.step, this.manager);
17128
+ return wt.getUniqueColorCount(this.step, this.manager);
17136
17129
  }
17137
17130
  getCurrentFrameStep(t, e, a, n) {
17138
17131
  return n && n.length > 1 && t === void 0 ? "SelectFrame" : e || a || this.getImageData() ? "Position" : "SelectImage";
@@ -17202,7 +17195,7 @@ const jl = w`
17202
17195
  id
17203
17196
  }
17204
17197
  }
17205
- `, Pa = w`
17198
+ `, Da = w`
17206
17199
  query GetCustomerTransactions(
17207
17200
  $id: String!
17208
17201
  $limit: Int!
@@ -17369,7 +17362,7 @@ const jl = w`
17369
17362
  },
17370
17363
  context: t
17371
17364
  }), Pd = async (r, t, e) => (await y.getShadowGraphqlClient().query({
17372
- query: Pa,
17365
+ query: Da,
17373
17366
  errorPolicy: "all",
17374
17367
  fetchPolicy: "no-cache",
17375
17368
  variables: {
@@ -17389,7 +17382,7 @@ const jl = w`
17389
17382
  limit: t
17390
17383
  }
17391
17384
  }))?.data.customerTransactionsFeed?.items || [], Dd = async (r, t, e) => (await y.getShadowGraphqlClient().query({
17392
- query: Pa,
17385
+ query: Da,
17393
17386
  errorPolicy: "all",
17394
17387
  fetchPolicy: "no-cache",
17395
17388
  variables: {
@@ -17409,7 +17402,7 @@ const jl = w`
17409
17402
  limit: t
17410
17403
  }
17411
17404
  }))?.data.customerTransactionsFeed?.items || [], Fd = async (r, t, e) => (await y.getShadowGraphqlClient().query({
17412
- query: Pa,
17405
+ query: Da,
17413
17406
  errorPolicy: "all",
17414
17407
  fetchPolicy: "no-cache",
17415
17408
  variables: {
@@ -17456,44 +17449,44 @@ K = { __e: function(r, t, e, a) {
17456
17449
  }
17457
17450
  throw r;
17458
17451
  } }, typeof Promise == "function" && Promise.prototype.then.bind(Promise.resolve());
17459
- var st, Xe, Za, ir = [], Ze = [], tn = K.__b, en = K.__r, an = K.diffed, nn = K.__c, rn = K.unmount;
17452
+ var st, Ze, tn, ir = [], ta = [], en = K.__b, an = K.__r, nn = K.diffed, rn = K.__c, sn = K.unmount;
17460
17453
  function ec() {
17461
17454
  for (var r; r = ir.shift(); )
17462
17455
  if (r.__P && r.__H)
17463
17456
  try {
17464
- r.__H.__h.forEach(we), r.__H.__h.forEach(da), r.__H.__h = [];
17457
+ r.__H.__h.forEach(we), r.__H.__h.forEach(Aa), r.__H.__h = [];
17465
17458
  } catch (t) {
17466
17459
  r.__H.__h = [], K.__e(t, r.__v);
17467
17460
  }
17468
17461
  }
17469
17462
  K.__b = function(r) {
17470
- st = null, tn && tn(r);
17463
+ st = null, en && en(r);
17471
17464
  }, K.__r = function(r) {
17472
- en && en(r);
17465
+ an && an(r);
17473
17466
  var t = (st = r.__c).__H;
17474
- t && (Xe === st ? (t.__h = [], st.__h = [], t.__.forEach(function(e) {
17475
- e.__N && (e.__ = e.__N), e.__V = Ze, e.__N = e.i = void 0;
17476
- })) : (t.__h.forEach(we), t.__h.forEach(da), t.__h = [])), Xe = st;
17467
+ t && (Ze === st ? (t.__h = [], st.__h = [], t.__.forEach(function(e) {
17468
+ e.__N && (e.__ = e.__N), e.__V = ta, e.__N = e.i = void 0;
17469
+ })) : (t.__h.forEach(we), t.__h.forEach(Aa), t.__h = [])), Ze = st;
17477
17470
  }, K.diffed = function(r) {
17478
- an && an(r);
17471
+ nn && nn(r);
17479
17472
  var t = r.__c;
17480
- t && t.__H && (t.__H.__h.length && (ir.push(t) !== 1 && Za === K.requestAnimationFrame || ((Za = K.requestAnimationFrame) || ac)(ec)), t.__H.__.forEach(function(e) {
17481
- e.i && (e.__H = e.i), e.__V !== Ze && (e.__ = e.__V), e.i = void 0, e.__V = Ze;
17482
- })), Xe = st = null;
17473
+ t && t.__H && (t.__H.__h.length && (ir.push(t) !== 1 && tn === K.requestAnimationFrame || ((tn = K.requestAnimationFrame) || ac)(ec)), t.__H.__.forEach(function(e) {
17474
+ e.i && (e.__H = e.i), e.__V !== ta && (e.__ = e.__V), e.i = void 0, e.__V = ta;
17475
+ })), Ze = st = null;
17483
17476
  }, K.__c = function(r, t) {
17484
17477
  t.some(function(e) {
17485
17478
  try {
17486
17479
  e.__h.forEach(we), e.__h = e.__h.filter(function(a) {
17487
- return !a.__ || da(a);
17480
+ return !a.__ || Aa(a);
17488
17481
  });
17489
17482
  } catch (a) {
17490
17483
  t.some(function(n) {
17491
17484
  n.__h && (n.__h = []);
17492
17485
  }), t = [], K.__e(a, e.__v);
17493
17486
  }
17494
- }), nn && nn(r, t);
17487
+ }), rn && rn(r, t);
17495
17488
  }, K.unmount = function(r) {
17496
- rn && rn(r);
17489
+ sn && sn(r);
17497
17490
  var t, e = r.__c;
17498
17491
  e && e.__H && (e.__H.__.forEach(function(a) {
17499
17492
  try {
@@ -17503,18 +17496,18 @@ K.__b = function(r) {
17503
17496
  }
17504
17497
  }), e.__H = void 0, t && K.__e(t, e.__v));
17505
17498
  };
17506
- var sn = typeof requestAnimationFrame == "function";
17499
+ var on = typeof requestAnimationFrame == "function";
17507
17500
  function ac(r) {
17508
17501
  var t, e = function() {
17509
- clearTimeout(a), sn && cancelAnimationFrame(t), setTimeout(r);
17502
+ clearTimeout(a), on && cancelAnimationFrame(t), setTimeout(r);
17510
17503
  }, a = setTimeout(e, 100);
17511
- sn && (t = requestAnimationFrame(e));
17504
+ on && (t = requestAnimationFrame(e));
17512
17505
  }
17513
17506
  function we(r) {
17514
17507
  var t = st, e = r.__c;
17515
17508
  typeof e == "function" && (r.__c = void 0, e()), st = t;
17516
17509
  }
17517
- function da(r) {
17510
+ function Aa(r) {
17518
17511
  var t = st;
17519
17512
  r.__c = r.__(), st = t;
17520
17513
  }
@@ -17540,7 +17533,7 @@ const sr = w`
17540
17533
  }
17541
17534
  missingComponentTypes
17542
17535
  }
17543
- `, Da = w`
17536
+ `, Fa = w`
17544
17537
  ${sr}
17545
17538
  fragment AddressValidationJobFields on AddressValidationJob {
17546
17539
  id
@@ -17553,14 +17546,14 @@ const sr = w`
17553
17546
  }
17554
17547
  }
17555
17548
  `, nc = w`
17556
- ${Da}
17549
+ ${Fa}
17557
17550
  query GetAddressValidationJobs($ids: [String!]!) {
17558
17551
  addressValidationJobs(ids: $ids) {
17559
17552
  ...AddressValidationJobFields
17560
17553
  }
17561
17554
  }
17562
17555
  `, rc = w`
17563
- ${Da}
17556
+ ${Fa}
17564
17557
  query GetRecipientsWithAddressValidationJobs($ids: [String!]!) {
17565
17558
  recipients(ids: $ids) {
17566
17559
  id
@@ -17577,7 +17570,7 @@ const sr = w`
17577
17570
  }
17578
17571
  }
17579
17572
  `, sc = w`
17580
- ${Da}
17573
+ ${Fa}
17581
17574
  mutation BatchValidateRecipientAddress($ids: [String!]!) {
17582
17575
  recipientValidateBatch(ids: $ids) {
17583
17576
  ...AddressValidationJobFields
@@ -17629,12 +17622,12 @@ const kd = async (r) => {
17629
17622
  });
17630
17623
  };
17631
17624
  export {
17632
- ua as AddonHandle,
17625
+ ha as AddonHandle,
17633
17626
  lc as AddressValidationJobStatus,
17634
17627
  oc as AddressValidationResultConfirmationLevel,
17635
17628
  ud as ArrayInput,
17636
17629
  L as AspectType,
17637
- Et as AssetNotFoundError,
17630
+ vt as AssetNotFoundError,
17638
17631
  ye as AssetType,
17639
17632
  id as BringForwardCommand,
17640
17633
  rd as BringToBackCommand,
@@ -17642,7 +17635,7 @@ export {
17642
17635
  br as BundleDesignCreationCartAddMode,
17643
17636
  N as CanvasCommand,
17644
17637
  Ae as CollectionProduct,
17645
- Ka as ColorOptionGlobalPropertyHandle,
17638
+ _a as ColorOptionGlobalPropertyHandle,
17646
17639
  ds as CommandContext,
17647
17640
  Ce as ConversionDataType,
17648
17641
  tc as ConversionLocation,
@@ -17659,16 +17652,16 @@ export {
17659
17652
  ms as FontAlignmentCommand,
17660
17653
  us as FontColorCommand,
17661
17654
  hs as FontSizeCommand,
17662
- Wa as FontSourceCommand,
17655
+ qa as FontSourceCommand,
17663
17656
  Gl as FrameService,
17664
17657
  Wl as FrameStep,
17665
17658
  ql as FrameStepHandle,
17666
- Ba as GlobalPropertyHandle,
17659
+ Ia as GlobalPropertyHandle,
17667
17660
  R as GroupCommand,
17668
17661
  So as IllustrationStepHandle,
17669
- $e as InformationMessageType,
17662
+ Ue as InformationMessageType,
17670
17663
  Do as InformationStepHandle,
17671
- _a as IntegrationProduct,
17664
+ Xa as IntegrationProduct,
17672
17665
  Ir as IntegrationType,
17673
17666
  Xc as LayoutElementFactory,
17674
17667
  x as LayoutElementType,
@@ -17691,9 +17684,9 @@ export {
17691
17684
  Cl as ProductCollectionProductSortKey,
17692
17685
  qt as ProductWorkflow,
17693
17686
  Kt as PromiseCache,
17694
- xn as PromiseQueue,
17687
+ kn as PromiseQueue,
17695
17688
  Bo as QuestionStepHandle,
17696
- Fn as QueueablePromise,
17689
+ xn as QueueablePromise,
17697
17690
  ed as ResizeCommand,
17698
17691
  Yt as ResourceNotFoundError,
17699
17692
  td as RotateCommand,
@@ -17725,7 +17718,7 @@ export {
17725
17718
  Ro as createDesign,
17726
17719
  Hc as currentDirection,
17727
17720
  Qc as dataUrlFromExternalUrl,
17728
- Ke as designService,
17721
+ _e as designService,
17729
17722
  fe as determineCorrectFontSizeAndLines,
17730
17723
  Wn as digitalContentStepService,
17731
17724
  dt as domParser,
@@ -17736,20 +17729,20 @@ export {
17736
17729
  $ as findElement,
17737
17730
  $c as findPmsColors,
17738
17731
  Vt as frameDataCache,
17739
- yt as frameStepService,
17732
+ wt as frameStepService,
17740
17733
  M as generate,
17741
17734
  al as generateCommands,
17742
17735
  ot as generateSVGWithUnknownColors,
17743
17736
  cd as generateStateFromDesignInputSteps,
17744
17737
  Md as getAddressValidationJobs,
17745
- Ne as getAttributesFromArrayBuffer,
17738
+ Qe as getAttributesFromArrayBuffer,
17746
17739
  Uc as getAxisAlignedBoundingBox,
17747
17740
  zl as getBoundedOffsets,
17748
17741
  fd as getBundleThemeConfiguration,
17749
17742
  bd as getCustomer,
17750
17743
  Bd as getCustomerBundles,
17751
17744
  Yc as getElementVertices,
17752
- Oe as getFrameData,
17745
+ $e as getFrameData,
17753
17746
  od as getGlobalPropertyStateForBundle,
17754
17747
  Vl as getIntegration,
17755
17748
  qc as getNEPoint,
@@ -17759,7 +17752,7 @@ export {
17759
17752
  Gc as getPointOfRotation,
17760
17753
  dd as getProductCollections,
17761
17754
  jc as getSEPoint,
17762
- ya as getSvgElement,
17755
+ Sa as getSvgElement,
17763
17756
  xd as getTemplateBundles,
17764
17757
  Fd as getTemplateTransactions,
17765
17758
  gd as getTransaction,
@@ -17779,7 +17772,7 @@ export {
17779
17772
  fl as metafieldManager,
17780
17773
  Jc as mmPerPixel,
17781
17774
  jn as modelStepService,
17782
- Ca as modifySVGColors,
17775
+ wa as modifySVGColors,
17783
17776
  Hn as moduleStepService,
17784
17777
  yd as nameBundle,
17785
17778
  Sd as nameTransaction,
@@ -17792,19 +17785,19 @@ export {
17792
17785
  Jn as questionStepService,
17793
17786
  Nc as registerFetchImplementation,
17794
17787
  Tc as registerWindowImplementation,
17795
- za as rehydrateSerializedLayout,
17788
+ Ga as rehydrateSerializedLayout,
17796
17789
  _r as rgbToPms,
17797
17790
  ce as rotateAroundPoint,
17798
- pa as sanitizeSvgTree,
17791
+ fa as sanitizeSvgTree,
17799
17792
  zr as setBearerAuthenticationToken,
17800
- fn as setCanvasModule,
17793
+ Cn as setCanvasModule,
17801
17794
  zt as shapeStepService,
17802
17795
  ws as shortenUrl,
17803
17796
  gt as spiffCoreConfiguration,
17804
17797
  ld as stepAspectValuesToDesignInputSteps,
17805
- Oa as svgColorValueToDefinition,
17798
+ $a as svgColorValueToDefinition,
17806
17799
  Ln as svgStringDimensions,
17807
- ha as svgToDataUrl,
17800
+ ma as svgToDataUrl,
17808
17801
  G as textStepService,
17809
17802
  Fs as toast,
17810
17803
  Td as validateWorkflowExperienceRecipient,