@spiffcommerce/core 26.22.1-beta.856ac04a-ad7f-593a-a3aa-bba7360eefcd → 26.23.0-beta.bb34beac-e663-5dca-b95b-caf892d90f8d
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.js +43 -43
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +178 -174
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { createHttpLink as
|
|
2
|
-
import { setContext as
|
|
3
|
-
import { onError as
|
|
4
|
-
import { renderToStaticMarkup as
|
|
1
|
+
import { createHttpLink as ar, ApolloClient as nr, from as rr, InMemoryCache as ir, gql as y } from "@apollo/client/core";
|
|
2
|
+
import { setContext as sr } from "@apollo/client/link/context";
|
|
3
|
+
import { onError as or } from "@apollo/client/link/error";
|
|
4
|
+
import { renderToStaticMarkup as an } from "preact-render-to-string";
|
|
5
5
|
import { removeTypenameFromVariables as lr } from "@apollo/client/link/remove-typename";
|
|
6
6
|
import { orientation as cr } from "exifr/dist/mini.umd.cjs";
|
|
7
|
-
import { parse as
|
|
7
|
+
import { parse as nn } from "css";
|
|
8
8
|
import dr from "fuse.js";
|
|
9
9
|
import { Pith as ca } from "pith";
|
|
10
10
|
import Pt from "lodash.clonedeep";
|
|
11
|
-
import { toString as
|
|
11
|
+
import { toString as rn } from "qrcode";
|
|
12
12
|
import Ar from "svg-path-bbox";
|
|
13
13
|
import { parse as Je } from "opentype.js";
|
|
14
14
|
import { jsx as F, jsxs as lt, Fragment as Vt } from "preact/jsx-runtime";
|
|
15
15
|
import { dataUriToBuffer as ur } from "data-uri-to-buffer";
|
|
16
16
|
import Da from "lodash.chunk";
|
|
17
|
-
import
|
|
17
|
+
import sn from "lodash.isequal";
|
|
18
18
|
import { split as Ke } from "unicode-default-word-boundary";
|
|
19
|
-
import
|
|
19
|
+
import on from "lodash.debounce";
|
|
20
20
|
import "fs";
|
|
21
21
|
import "path";
|
|
22
22
|
var he = /* @__PURE__ */ ((r) => (r.Data = "Data", r.Font = "Font", r.Frame = "Frame", r.Illustration = "Illustration", r.Image = "Image", r.Model = "Model", r.Material = "Material", r.Color = "Color", r.QuestionnaireCollateral = "QuestionnaireCollateral", r.RequestCollateral = "RequestCollateral", r.SignupCollateral = "SignupCollateral", r.Video = "Video", r.ColorProfile = "ColorProfile", r.Environment = "Environment", r))(he || {}), et = /* @__PURE__ */ ((r) => (r.FileUpload = "FileUpload", r.Option = "Option", r.ColorOption = "ColorOption", r.Text = "Text", r))(et || {}), D = /* @__PURE__ */ ((r) => (r.Information = "Information", r.Bulk = "Bulk", r.DigitalContent = "DigitalContent", r.Finish = "Finish", r.Frame = "Frame", r.Illustration = "Illustration", r.Introduction = "Introduction", r.Material = "Material", r.Model = "Model", r.Module = "Module", r.Picture = "Picture", r.Photo = "Photo", r.ProductOverlay = "ProductOverlay", r.Question = "Question", r.Shape = "Shape", r.SilentIllustration = "SilentIllustration", r.Text = "Text", r))(D || {}), hr = /* @__PURE__ */ ((r) => (r.Color = "Color", r.Colors = "Colors", r.Selection = "Selection", r.Selections = "Selections", r.Text = "Text", r.Upload = "Upload", r))(hr || {}), Gt = /* @__PURE__ */ ((r) => (r.ThreeD = "ThreeD", r.FreeDesign = "FreeDesign", r.Print = "Print", r))(Gt || {}), T = /* @__PURE__ */ ((r) => (r.Frame = "frame", r.Group = "group", r.Image = "image", r.Pattern = "pattern", r.Illustration = "illustration", r.Textbox = "textbox", r))(T || {}), mr = /* @__PURE__ */ ((r) => (r.Default = "Default", r.FirstTransaction = "FirstTransaction", r.OneToOne = "OneToOne", r))(mr || {}), gr = /* @__PURE__ */ ((r) => (r.Hyperlink = "Hyperlink", r.Edit = "Edit", r.Approve = "Approve", r))(gr || {}), fr = /* @__PURE__ */ ((r) => (r.Hub = "Hub", r.Shopify = "Shopify", r))(fr || {}), da = /* @__PURE__ */ ((r) => (r.BackgroundRemover = "BackgroundRemover", r.ConversionAccelerator = "Conversion Accelerator", r.ProcessBuilder = "ProcessBuilder", r))(da || {}), pr = /* @__PURE__ */ ((r) => (r[r.Orbit = 0] = "Orbit", r[r.Pan = 1] = "Pan", r))(pr || {}), me = /* @__PURE__ */ ((r) => (r.Owner = "Owner", r.Approver = "Approver", r.Editor = "Editor", r.Viewer = "Viewer", r))(me || {}), kt = /* @__PURE__ */ ((r) => (r.Autosize = "Autosize", r.Traditional = "Traditional", r))(kt || {}), H = /* @__PURE__ */ ((r) => (r[r.North = 0] = "North", r[r.Northeast = 1] = "Northeast", r[r.East = 2] = "East", r[r.Southeast = 3] = "Southeast", r[r.South = 4] = "South", r[r.Southwest = 5] = "Southwest", r[r.West = 6] = "West", r[r.Northwest = 7] = "Northwest", r))(H || {}), Cr = /* @__PURE__ */ ((r) => (r.Pixel = "px", r.Millimeter = "mm", r.Centimeter = "cm", r))(Cr || {});
|
|
23
|
-
class
|
|
23
|
+
class ln extends Error {
|
|
24
24
|
constructor(t) {
|
|
25
25
|
super(t), this.name = this.constructor.name;
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
class Yt extends
|
|
28
|
+
class Yt extends ln {
|
|
29
29
|
constructor(t) {
|
|
30
30
|
super(`ConfigurationError - ${t}`);
|
|
31
31
|
}
|
|
@@ -55,7 +55,7 @@ class fe extends Yt {
|
|
|
55
55
|
super(`Workflow Misconfiguration: ${t.stepName} - ${e}`), this.step = t;
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
class Ee extends
|
|
58
|
+
class Ee extends ln {
|
|
59
59
|
constructor(t) {
|
|
60
60
|
super(`ImplementationError - ${t}`);
|
|
61
61
|
}
|
|
@@ -179,14 +179,14 @@ function ct(r, t) {
|
|
|
179
179
|
}
|
|
180
180
|
return Xe(r, t);
|
|
181
181
|
}
|
|
182
|
-
const
|
|
182
|
+
const cn = /* @__PURE__ */ new Map(), xa = /* @__PURE__ */ new Map(), Fa = /* @__PURE__ */ new Map(), dn = async (r) => {
|
|
183
183
|
const t = xa.get(r);
|
|
184
184
|
if (t)
|
|
185
185
|
return t;
|
|
186
186
|
const a = (async () => {
|
|
187
187
|
var i;
|
|
188
188
|
const n = await ct(r);
|
|
189
|
-
return
|
|
189
|
+
return cn.set(r, ((i = n.headers) == null ? void 0 : i.get("content-type")) || ""), await n.arrayBuffer();
|
|
190
190
|
})();
|
|
191
191
|
return xa.set(r, a), a;
|
|
192
192
|
}, vr = async (r) => {
|
|
@@ -206,7 +206,7 @@ const ln = /* @__PURE__ */ new Map(), xa = /* @__PURE__ */ new Map(), Fa = /* @_
|
|
|
206
206
|
const r = Jt();
|
|
207
207
|
return new r.DOMParser();
|
|
208
208
|
}, Br = () => Mt([typeof DOMParser]) ? DOMParser : Jt().DOMParser, be = (r, t) => new Promise((e, a) => {
|
|
209
|
-
t ?
|
|
209
|
+
t ? dn(r).then(e).catch(a) : ct(r).then((n) => {
|
|
210
210
|
n.arrayBuffer().then(e).catch(a);
|
|
211
211
|
}).catch((n) => {
|
|
212
212
|
a(n);
|
|
@@ -215,7 +215,7 @@ const ln = /* @__PURE__ */ new Map(), xa = /* @__PURE__ */ new Map(), Fa = /* @_
|
|
|
215
215
|
t ? vr(r).then(e).catch(a) : ct(r).then((n) => {
|
|
216
216
|
n.text().then(e).catch(a);
|
|
217
217
|
}).catch(a);
|
|
218
|
-
}),
|
|
218
|
+
}), An = (r) => an(r), Qe = /* @__PURE__ */ new Map(), br = async (r, t) => {
|
|
219
219
|
if (Mt([typeof FontFace])) {
|
|
220
220
|
if (Qe.has(t))
|
|
221
221
|
return Qe.get(t);
|
|
@@ -257,7 +257,7 @@ const ln = /* @__PURE__ */ new Map(), xa = /* @__PURE__ */ new Map(), Fa = /* @_
|
|
|
257
257
|
const e = t();
|
|
258
258
|
return e || "image/svg+xml";
|
|
259
259
|
}, tc = async (r) => {
|
|
260
|
-
const t = await
|
|
260
|
+
const t = await dn(r), e = cn.get(r) || Kt(t);
|
|
261
261
|
return await Pr(new Blob([t], { type: e }));
|
|
262
262
|
}, Ir = (r) => {
|
|
263
263
|
let t = "";
|
|
@@ -268,7 +268,7 @@ const ln = /* @__PURE__ */ new Map(), xa = /* @__PURE__ */ new Map(), Fa = /* @_
|
|
|
268
268
|
}, Dr = async (r) => {
|
|
269
269
|
const t = Kt(r), e = new Uint8Array(r), a = Ir(e), n = btoa(a);
|
|
270
270
|
return `data:${t};base64,${n}`;
|
|
271
|
-
}, Aa = (r) => `data:image/svg+xml;base64,${btoa(r)}`,
|
|
271
|
+
}, Aa = (r) => `data:image/svg+xml;base64,${btoa(r)}`, un = (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,17 +287,17 @@ const ln = /* @__PURE__ */ new Map(), xa = /* @__PURE__ */ new Map(), Fa = /* @_
|
|
|
287
287
|
!i || !i.result ? e() : t(i.result.toString());
|
|
288
288
|
}, a.readAsDataURL(r);
|
|
289
289
|
});
|
|
290
|
-
let
|
|
290
|
+
let hn;
|
|
291
291
|
const Ma = (r) => {
|
|
292
|
-
|
|
292
|
+
hn = r;
|
|
293
293
|
};
|
|
294
294
|
let ua;
|
|
295
295
|
const xr = (r) => {
|
|
296
296
|
ua = r;
|
|
297
297
|
}, Fr = () => ua;
|
|
298
|
-
let
|
|
298
|
+
let mn;
|
|
299
299
|
const kr = (r) => {
|
|
300
|
-
|
|
300
|
+
mn = r;
|
|
301
301
|
}, Mr = () => new Promise((r) => {
|
|
302
302
|
const t = wt.getHubUrl(), e = (a) => {
|
|
303
303
|
a.origin === t && (window.removeEventListener("message", e), r(a.data));
|
|
@@ -306,8 +306,8 @@ const kr = (r) => {
|
|
|
306
306
|
}), Tr = async () => {
|
|
307
307
|
const r = {
|
|
308
308
|
applicationKey: ua,
|
|
309
|
-
customerToken:
|
|
310
|
-
bearer:
|
|
309
|
+
customerToken: hn,
|
|
310
|
+
bearer: mn
|
|
311
311
|
};
|
|
312
312
|
return typeof window < "u" && (window.location.href.includes("/workflows/product/") || window.location.href.includes("hub=true")) ? { ...await Mr(), ...r } : r;
|
|
313
313
|
};
|
|
@@ -321,10 +321,10 @@ class Qr {
|
|
|
321
321
|
return this.shadowGraphqlClient;
|
|
322
322
|
}
|
|
323
323
|
constructShadowGraphqlClient() {
|
|
324
|
-
const t =
|
|
324
|
+
const t = ar({
|
|
325
325
|
uri: `${wt.getServerUrl()}/graphql`,
|
|
326
326
|
fetch: ct
|
|
327
|
-
}), e =
|
|
327
|
+
}), e = sr(async (i, s) => {
|
|
328
328
|
const { headers: o } = s, l = o || {}, c = await Tr(), d = s.bearer ?? c.bearer, A = s.partnerId ?? c.partnerId, u = s.activeIntegration ?? c.activeIntegration, h = s.transactionOwnerId, m = s.customerToken ?? c.customerToken, g = s.applicationKey ?? c.applicationKey, f = s.bundleOwnerId;
|
|
329
329
|
try {
|
|
330
330
|
if (window && window.__SENTRY__) {
|
|
@@ -341,13 +341,13 @@ class Qr {
|
|
|
341
341
|
return d && (l.Authorization = `Bearer ${d}`), A && (l.partnerId = A), u && (l.activeIntegration = u), h && (l.transactionOwnerId = h), m && (l.customerToken = m), g && (l["X-Application-Key"] = g), f && (l.bundleOwnerId = f), {
|
|
342
342
|
headers: l
|
|
343
343
|
};
|
|
344
|
-
}), a =
|
|
344
|
+
}), a = or(({ operation: i, graphQLErrors: s, networkError: o }) => {
|
|
345
345
|
const l = s || [];
|
|
346
346
|
o && console.log("GraphQL Network error"), l.forEach(() => console.log("GraphQL Error: " + i.operationName));
|
|
347
347
|
}), n = lr();
|
|
348
|
-
return new
|
|
349
|
-
link:
|
|
350
|
-
cache: new
|
|
348
|
+
return new nr({
|
|
349
|
+
link: rr([n, a, e, t]),
|
|
350
|
+
cache: new ir(),
|
|
351
351
|
name: "Core"
|
|
352
352
|
});
|
|
353
353
|
}
|
|
@@ -358,8 +358,8 @@ const mt = (r, t, e) => {
|
|
|
358
358
|
if (Ze !== void 0)
|
|
359
359
|
return Ze(r, t, e);
|
|
360
360
|
try {
|
|
361
|
-
const a =
|
|
362
|
-
return
|
|
361
|
+
const a = fn(!0);
|
|
362
|
+
return gn(a), a.createCanvas(r, t, e);
|
|
363
363
|
} catch {
|
|
364
364
|
throw new Error("Canvas module not set");
|
|
365
365
|
}
|
|
@@ -367,16 +367,16 @@ const mt = (r, t, e) => {
|
|
|
367
367
|
if (ta !== void 0)
|
|
368
368
|
return ta(r, t);
|
|
369
369
|
try {
|
|
370
|
-
const e =
|
|
371
|
-
return
|
|
370
|
+
const e = fn(!0);
|
|
371
|
+
return gn(e), e.loadImage(r, t);
|
|
372
372
|
} catch {
|
|
373
373
|
throw new Error("Canvas module not set");
|
|
374
374
|
}
|
|
375
375
|
};
|
|
376
|
-
function
|
|
376
|
+
function gn(r) {
|
|
377
377
|
Ze = r == null ? void 0 : r.createCanvas, ta = r == null ? void 0 : r.loadImage;
|
|
378
378
|
}
|
|
379
|
-
function
|
|
379
|
+
function fn(r) {
|
|
380
380
|
try {
|
|
381
381
|
if (document.createElement("canvas").getContext("2d"))
|
|
382
382
|
return {
|
|
@@ -3192,9 +3192,9 @@ function Ta(r) {
|
|
|
3192
3192
|
return t.length === 6 ? t : t.length === 3 ? `${t[0]}${t[0]}${t[1]}${t[1]}${t[2]}${t[2]}` : "";
|
|
3193
3193
|
}
|
|
3194
3194
|
const ne = (r) => {
|
|
3195
|
-
const t =
|
|
3195
|
+
const t = pn(r.spotColor);
|
|
3196
3196
|
return t ? `${r.browserValue} ${t}` : r.browserValue;
|
|
3197
|
-
},
|
|
3197
|
+
}, pn = (r) => {
|
|
3198
3198
|
if (!r)
|
|
3199
3199
|
return "";
|
|
3200
3200
|
if (r.profileName.includes("/") && r.profileName.includes(".icc")) {
|
|
@@ -3247,7 +3247,7 @@ const ne = (r) => {
|
|
|
3247
3247
|
}
|
|
3248
3248
|
if (a.tagName === "style") {
|
|
3249
3249
|
try {
|
|
3250
|
-
(i =
|
|
3250
|
+
(i = nn(a.innerHTML).stylesheet) == null || i.rules.forEach((c) => {
|
|
3251
3251
|
e.push(c);
|
|
3252
3252
|
}), a.remove();
|
|
3253
3253
|
} catch (l) {
|
|
@@ -3282,9 +3282,9 @@ const ne = (r) => {
|
|
|
3282
3282
|
if (!e)
|
|
3283
3283
|
throw new Error("viewBox not specified on SVG!");
|
|
3284
3284
|
a && r.setAttribute("width", a.replace(t, "")), n && r.setAttribute("height", n.replace(t, ""));
|
|
3285
|
-
},
|
|
3285
|
+
}, Cn = (r) => dt().parseFromString(r, "image/svg+xml").firstElementChild, qr = (r, t, e) => {
|
|
3286
3286
|
r.setAttribute("height", `${e}px`), r.setAttribute("width", `${t}px`);
|
|
3287
|
-
},
|
|
3287
|
+
}, wn = (r, t, e) => {
|
|
3288
3288
|
Ft(r, (a) => {
|
|
3289
3289
|
const n = a.attributes.getNamedItem("fill");
|
|
3290
3290
|
n && n.value !== "none" && a.classList.forEach((s) => {
|
|
@@ -3323,16 +3323,16 @@ const ne = (r) => {
|
|
|
3323
3323
|
}
|
|
3324
3324
|
});
|
|
3325
3325
|
});
|
|
3326
|
-
},
|
|
3327
|
-
const i =
|
|
3326
|
+
}, yn = (r) => Et().serializeToString(r), ga = (r, t, e, a, n) => {
|
|
3327
|
+
const i = Cn(r);
|
|
3328
3328
|
if (!i)
|
|
3329
3329
|
throw new Error("Failed to read SVG.");
|
|
3330
|
-
return qr(i, t, e),
|
|
3330
|
+
return qr(i, t, e), wn(i, a, n), yn(i);
|
|
3331
3331
|
}, fa = (r, t, e) => {
|
|
3332
|
-
const a =
|
|
3332
|
+
const a = Cn(r);
|
|
3333
3333
|
if (!a)
|
|
3334
3334
|
throw new Error("Failed to read SVG.");
|
|
3335
|
-
return
|
|
3335
|
+
return wn(a, t, e), yn(a);
|
|
3336
3336
|
}, Yr = (r) => {
|
|
3337
3337
|
const t = /<svg.*<\/svg>/s, e = r.match(t) || [], a = (e == null ? void 0 : e.length) > 0 ? e[0] : "";
|
|
3338
3338
|
return dt().parseFromString(a, "image/svg+xml");
|
|
@@ -3699,7 +3699,7 @@ class ai {
|
|
|
3699
3699
|
}
|
|
3700
3700
|
}
|
|
3701
3701
|
}
|
|
3702
|
-
const Nt = "persistentAssets",
|
|
3702
|
+
const Nt = "persistentAssets", Sn = class ft {
|
|
3703
3703
|
/**
|
|
3704
3704
|
* Add a new asset to persistence
|
|
3705
3705
|
* @param asset The asset to add.
|
|
@@ -3750,8 +3750,8 @@ const Nt = "persistentAssets", yn = class ft {
|
|
|
3750
3750
|
ft.callbacks.forEach((t) => t());
|
|
3751
3751
|
}
|
|
3752
3752
|
};
|
|
3753
|
-
|
|
3754
|
-
let Bt =
|
|
3753
|
+
Sn.callbacks = [];
|
|
3754
|
+
let Bt = Sn;
|
|
3755
3755
|
const Na = "bgrmPersistentAssets";
|
|
3756
3756
|
class J {
|
|
3757
3757
|
static has(t) {
|
|
@@ -3817,7 +3817,7 @@ class ni {
|
|
|
3817
3817
|
this.disabled = t;
|
|
3818
3818
|
}
|
|
3819
3819
|
}
|
|
3820
|
-
const Ht = new ni(),
|
|
3820
|
+
const Ht = new ni(), vn = y`
|
|
3821
3821
|
fragment OptionFields on Option {
|
|
3822
3822
|
id
|
|
3823
3823
|
name
|
|
@@ -3857,7 +3857,7 @@ const Ht = new ni(), Sn = y`
|
|
|
3857
3857
|
`, ri = y`
|
|
3858
3858
|
${Xt(!1)}
|
|
3859
3859
|
${pa}
|
|
3860
|
-
${
|
|
3860
|
+
${vn}
|
|
3861
3861
|
query GetOptions($ids: [String]!) {
|
|
3862
3862
|
options(ids: $ids) {
|
|
3863
3863
|
...OptionFields
|
|
@@ -3932,7 +3932,7 @@ class li {
|
|
|
3932
3932
|
}
|
|
3933
3933
|
}
|
|
3934
3934
|
}
|
|
3935
|
-
const X = new li(),
|
|
3935
|
+
const X = new li(), En = y`
|
|
3936
3936
|
fragment ActiveIntegrationFields on Integration {
|
|
3937
3937
|
id
|
|
3938
3938
|
logo
|
|
@@ -4054,7 +4054,7 @@ const X = new li(), vn = y`
|
|
|
4054
4054
|
}
|
|
4055
4055
|
}
|
|
4056
4056
|
}
|
|
4057
|
-
`,
|
|
4057
|
+
`, Bn = y`
|
|
4058
4058
|
fragment StakeholderFields on Stakeholder {
|
|
4059
4059
|
id
|
|
4060
4060
|
type
|
|
@@ -4062,7 +4062,7 @@ const X = new li(), vn = y`
|
|
|
4062
4062
|
authorizationNote
|
|
4063
4063
|
authorizationStatus
|
|
4064
4064
|
}
|
|
4065
|
-
`,
|
|
4065
|
+
`, bn = y`
|
|
4066
4066
|
fragment TransactionShareActionFields on TransactionShareAction {
|
|
4067
4067
|
id
|
|
4068
4068
|
title
|
|
@@ -4073,9 +4073,9 @@ const X = new li(), vn = y`
|
|
|
4073
4073
|
}
|
|
4074
4074
|
`, di = y`
|
|
4075
4075
|
${De}
|
|
4076
|
-
${En}
|
|
4077
4076
|
${Bn}
|
|
4078
|
-
${
|
|
4077
|
+
${bn}
|
|
4078
|
+
${En}
|
|
4079
4079
|
query ReadTransactions($ids: [String]!) {
|
|
4080
4080
|
transactions(ids: $ids) {
|
|
4081
4081
|
customLogoLink
|
|
@@ -4292,7 +4292,7 @@ const X = new li(), vn = y`
|
|
|
4292
4292
|
}
|
|
4293
4293
|
}
|
|
4294
4294
|
`, mi = y`
|
|
4295
|
-
${
|
|
4295
|
+
${bn}
|
|
4296
4296
|
query ReadTransactionForShareActions($id: String!) {
|
|
4297
4297
|
transactions(ids: [$id]) {
|
|
4298
4298
|
id
|
|
@@ -4302,14 +4302,14 @@ const X = new li(), vn = y`
|
|
|
4302
4302
|
}
|
|
4303
4303
|
}
|
|
4304
4304
|
}
|
|
4305
|
-
`,
|
|
4305
|
+
`, In = y`
|
|
4306
4306
|
query ReadWorkflowStates($ids: [String]!) {
|
|
4307
4307
|
transactions(ids: $ids) {
|
|
4308
4308
|
id
|
|
4309
4309
|
workflowState
|
|
4310
4310
|
}
|
|
4311
4311
|
}
|
|
4312
|
-
`,
|
|
4312
|
+
`, Dn = y`
|
|
4313
4313
|
${De}
|
|
4314
4314
|
fragment IntegrationProductFields on IntegrationProduct {
|
|
4315
4315
|
id
|
|
@@ -4373,14 +4373,14 @@ const X = new li(), vn = y`
|
|
|
4373
4373
|
}
|
|
4374
4374
|
}
|
|
4375
4375
|
`, gi = y`
|
|
4376
|
-
${
|
|
4376
|
+
${Dn}
|
|
4377
4377
|
query GetIntegrationProducts($ids: [String!]!) {
|
|
4378
4378
|
integrationProducts(ids: $ids) {
|
|
4379
4379
|
...IntegrationProductFields
|
|
4380
4380
|
}
|
|
4381
4381
|
}
|
|
4382
4382
|
`, fi = y`
|
|
4383
|
-
${
|
|
4383
|
+
${Dn}
|
|
4384
4384
|
query GetIntegrationProductFromExternalIds($externalIntegrationId: String!, $externalProductId: String!) {
|
|
4385
4385
|
integrationProductFromExternalIds(
|
|
4386
4386
|
externalIntegrationId: $externalIntegrationId
|
|
@@ -4390,7 +4390,7 @@ const X = new li(), vn = y`
|
|
|
4390
4390
|
}
|
|
4391
4391
|
}
|
|
4392
4392
|
`, pi = y`
|
|
4393
|
-
${
|
|
4393
|
+
${Bn}
|
|
4394
4394
|
query ReadTransactionForStakeholders($id: String!) {
|
|
4395
4395
|
transactions(ids: [$id]) {
|
|
4396
4396
|
stakeholders {
|
|
@@ -4528,7 +4528,7 @@ const X = new li(), vn = y`
|
|
|
4528
4528
|
`, Ei = (r) => y`
|
|
4529
4529
|
${Xt(r)}
|
|
4530
4530
|
${pa}
|
|
4531
|
-
${
|
|
4531
|
+
${vn}
|
|
4532
4532
|
${wi}
|
|
4533
4533
|
${yi}
|
|
4534
4534
|
${Si}
|
|
@@ -5049,7 +5049,7 @@ const X = new li(), vn = y`
|
|
|
5049
5049
|
}
|
|
5050
5050
|
}
|
|
5051
5051
|
`, Di = y`
|
|
5052
|
-
${
|
|
5052
|
+
${En}
|
|
5053
5053
|
${Pe}
|
|
5054
5054
|
query GetCurrentIntegration($themeConfigurationId: String) {
|
|
5055
5055
|
currentIntegration {
|
|
@@ -5175,12 +5175,12 @@ const X = new li(), vn = y`
|
|
|
5175
5175
|
);
|
|
5176
5176
|
return i;
|
|
5177
5177
|
};
|
|
5178
|
-
class
|
|
5178
|
+
class Pn {
|
|
5179
5179
|
constructor() {
|
|
5180
5180
|
this.timestamp = Date.now();
|
|
5181
5181
|
}
|
|
5182
5182
|
}
|
|
5183
|
-
class
|
|
5183
|
+
class xn {
|
|
5184
5184
|
/**
|
|
5185
5185
|
* Constructs a new promise queue.
|
|
5186
5186
|
* @param queueMaxSize An optional maximum size, when the max size is hit.
|
|
@@ -5313,7 +5313,7 @@ const Q = () => {
|
|
|
5313
5313
|
{
|
|
5314
5314
|
id: "element-group",
|
|
5315
5315
|
clipPath: a.purpose === Gt.FreeDesign ? "url(#viewboxClip)" : void 0,
|
|
5316
|
-
children: S.map((E) =>
|
|
5316
|
+
children: S.map((E) => Nn(E)).filter((E) => !!E)
|
|
5317
5317
|
}
|
|
5318
5318
|
),
|
|
5319
5319
|
l && /* @__PURE__ */ F(
|
|
@@ -5432,7 +5432,7 @@ const Q = () => {
|
|
|
5432
5432
|
x: (r.x - t.x) * n - (r.y - t.y) * a + t.x,
|
|
5433
5433
|
y: (r.x - t.x) * a + (r.y - t.y) * n + t.y
|
|
5434
5434
|
};
|
|
5435
|
-
}, mc = 0.352778, gc = 0.035277,
|
|
5435
|
+
}, mc = 0.352778, gc = 0.035277, Fn = (r) => {
|
|
5436
5436
|
const t = r.rotation || 0, e = gt(t), a = Math.cos(e), n = -Math.sin(e);
|
|
5437
5437
|
return /* @__PURE__ */ F("g", { mask: r.stepName || r.productOverlay ? void 0 : r.mask, children: /* @__PURE__ */ F(
|
|
5438
5438
|
"g",
|
|
@@ -5454,7 +5454,7 @@ const Q = () => {
|
|
|
5454
5454
|
)
|
|
5455
5455
|
}
|
|
5456
5456
|
) });
|
|
5457
|
-
},
|
|
5457
|
+
}, kn = (r) => {
|
|
5458
5458
|
var l;
|
|
5459
5459
|
const t = `spiff-group-clip-${r.id}`, e = r.rotation || 0, a = gt(e), n = Math.cos(a), i = -Math.sin(a), s = ya(r.children);
|
|
5460
5460
|
return /* @__PURE__ */ lt(Vt, { children: [
|
|
@@ -5481,7 +5481,7 @@ const Q = () => {
|
|
|
5481
5481
|
height: r.height
|
|
5482
5482
|
}
|
|
5483
5483
|
) : void 0,
|
|
5484
|
-
s.map((c) =>
|
|
5484
|
+
s.map((c) => Nn(c)).filter((c) => !!c).map((c) => /* @__PURE__ */ F("g", { clipPath: `url(#${t})`, children: c }))
|
|
5485
5485
|
]
|
|
5486
5486
|
}
|
|
5487
5487
|
)
|
|
@@ -5561,7 +5561,7 @@ const Q = () => {
|
|
|
5561
5561
|
matrix(${r.scaleX}, 0, 0, ${r.scaleY}, 0, 0)
|
|
5562
5562
|
`,
|
|
5563
5563
|
children: /* @__PURE__ */ F(
|
|
5564
|
-
|
|
5564
|
+
kn,
|
|
5565
5565
|
{
|
|
5566
5566
|
id: t,
|
|
5567
5567
|
x: 0,
|
|
@@ -5578,7 +5578,7 @@ const Q = () => {
|
|
|
5578
5578
|
}
|
|
5579
5579
|
)
|
|
5580
5580
|
] });
|
|
5581
|
-
},
|
|
5581
|
+
}, Mn = /* @__PURE__ */ new Map();
|
|
5582
5582
|
class Oi {
|
|
5583
5583
|
constructor(t) {
|
|
5584
5584
|
this.font = t, this.glyphsFromText = /* @__PURE__ */ new Map(), this.kerningValues = /* @__PURE__ */ new Map(), this.height = this.calculateApproximateHeight();
|
|
@@ -5637,7 +5637,7 @@ const Ui = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
|
|
|
5637
5637
|
return St(r).getFont();
|
|
5638
5638
|
} catch {
|
|
5639
5639
|
if (Ui(r)) {
|
|
5640
|
-
const a =
|
|
5640
|
+
const a = un(r), n = Je(a);
|
|
5641
5641
|
return aa(r, n), n;
|
|
5642
5642
|
} else {
|
|
5643
5643
|
const a = await be(r, !0), n = Je(a);
|
|
@@ -5647,21 +5647,21 @@ const Ui = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
|
|
|
5647
5647
|
})();
|
|
5648
5648
|
return Oe.set(r, e), e;
|
|
5649
5649
|
}, Li = (r) => {
|
|
5650
|
-
const t =
|
|
5650
|
+
const t = un(r), e = Je(t);
|
|
5651
5651
|
return aa(r, e), e;
|
|
5652
5652
|
}, St = (r) => {
|
|
5653
|
-
const t =
|
|
5653
|
+
const t = Mn.get(r);
|
|
5654
5654
|
if (t)
|
|
5655
5655
|
return t;
|
|
5656
5656
|
throw new Error("Font metrics unavailable for font");
|
|
5657
5657
|
}, aa = (r, t) => {
|
|
5658
5658
|
const e = new Oi(t);
|
|
5659
|
-
return
|
|
5659
|
+
return Mn.set(r, e), e;
|
|
5660
5660
|
}, fc = async (r) => {
|
|
5661
5661
|
const t = dt(), e = t.parseFromString(r, "image/svg+xml"), a = e.firstElementChild, n = /* @__PURE__ */ new Map();
|
|
5662
5662
|
a.querySelectorAll("style").forEach((d) => {
|
|
5663
5663
|
var u;
|
|
5664
|
-
(u =
|
|
5664
|
+
(u = nn(d.innerHTML).stylesheet) == null || u.rules.forEach((h) => {
|
|
5665
5665
|
var m, g, f;
|
|
5666
5666
|
if (h.type === "font-face" && h.declarations) {
|
|
5667
5667
|
const p = (m = h.declarations.find(
|
|
@@ -5746,7 +5746,7 @@ const Ui = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
|
|
|
5746
5746
|
throw new Error(`No max width calculated for text: ${o}.`);
|
|
5747
5747
|
return { lines: o, width: l };
|
|
5748
5748
|
}, $i = (r, t, e, a, n, i) => {
|
|
5749
|
-
const s = (i ?? Ca) * t.getApproximateHeight(), o = 1 / e.unitsPerEm, l =
|
|
5749
|
+
const s = (i ?? Ca) * t.getApproximateHeight(), o = 1 / e.unitsPerEm, l = Tn(r, o, t), c = r.length * s * o, d = a / l, A = n / c;
|
|
5750
5750
|
return Math.min(A, d);
|
|
5751
5751
|
}, Vi = (r, t, e, a) => {
|
|
5752
5752
|
var c;
|
|
@@ -5773,7 +5773,7 @@ const Ui = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
|
|
|
5773
5773
|
}, zi = (r, t, e, a, n) => {
|
|
5774
5774
|
const s = St(t.assetUrl).getFont();
|
|
5775
5775
|
let o = { ...r };
|
|
5776
|
-
const l = { ...r }, c =
|
|
5776
|
+
const l = { ...r }, c = Tn(a, e / s.unitsPerEm, St(t.assetUrl));
|
|
5777
5777
|
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 && Wi(a, a).every(([d, A]) => d === A) && (o = l)), o;
|
|
5778
5778
|
}, Ue = 1, ht = (r, t, e) => {
|
|
5779
5779
|
let a = 0;
|
|
@@ -5793,7 +5793,7 @@ const Ui = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
|
|
|
5793
5793
|
a = Math.max(a, o || 0);
|
|
5794
5794
|
}
|
|
5795
5795
|
}), a *= t, a;
|
|
5796
|
-
},
|
|
5796
|
+
}, Tn = (r, t, e) => {
|
|
5797
5797
|
let a = 0;
|
|
5798
5798
|
return r.forEach((n) => {
|
|
5799
5799
|
a = Math.max(a, ht(n, t, e));
|
|
@@ -5807,7 +5807,7 @@ const Ui = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
|
|
|
5807
5807
|
let a = r || "";
|
|
5808
5808
|
return e.stripControlCharacters && (a = a.replace(/^(?![\u000A\u000D])[\u0000-\u001F\u007F-\u009F]/g, "")), e.uppercase && (a = a.toUpperCase()), e.vertical && (a = a.split("").join(`
|
|
5809
5809
|
`)), a;
|
|
5810
|
-
}, Wi = (r, t) => r.map((e, a) => [e, t[a]]), ji = (r = "center", t = !1) => t ? "center" : r,
|
|
5810
|
+
}, Wi = (r, t) => r.map((e, a) => [e, t[a]]), ji = (r = "center", t = !1) => t ? "center" : r, Qn = (r) => r === "left" ? "start" : r === "right" ? "end" : "middle", Zt = (r, t, e) => r.fontData ? {
|
|
5811
5811
|
...r,
|
|
5812
5812
|
...(() => {
|
|
5813
5813
|
if (r.algorithm === kt.Traditional) {
|
|
@@ -5833,7 +5833,7 @@ const Ui = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
|
|
|
5833
5833
|
return null;
|
|
5834
5834
|
const u = () => {
|
|
5835
5835
|
var p;
|
|
5836
|
-
return r.textFillImage ? `url("#${s}")` : (p = r._renderingConfiguration) != null && p.spotColors && r.fillSpotColorDefinition ? `${r.fill} ${
|
|
5836
|
+
return r.textFillImage ? `url("#${s}")` : (p = r._renderingConfiguration) != null && p.spotColors && r.fillSpotColorDefinition ? `${r.fill} ${pn(r.fillSpotColorDefinition)}` : r.fill;
|
|
5837
5837
|
};
|
|
5838
5838
|
return /* @__PURE__ */ lt(Vt, { children: [
|
|
5839
5839
|
/* @__PURE__ */ lt("defs", { children: [
|
|
@@ -5920,14 +5920,14 @@ const Ui = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
|
|
|
5920
5920
|
const s = (r.amountLines - 1) / 2;
|
|
5921
5921
|
return (r.thisLineIdx - s) * n + r.fontSize / 4;
|
|
5922
5922
|
};
|
|
5923
|
-
return /* @__PURE__ */ F("tspan", { textAnchor:
|
|
5923
|
+
return /* @__PURE__ */ F("tspan", { textAnchor: Qn(r.align), x: e(), y: `${a()}px`, children: r.text });
|
|
5924
5924
|
}, Yi = (r) => {
|
|
5925
5925
|
const t = `#${r.curvedPathId}`;
|
|
5926
5926
|
return /* @__PURE__ */ F(
|
|
5927
5927
|
"textPath",
|
|
5928
5928
|
{
|
|
5929
5929
|
startOffset: (() => r.align === "left" ? "0%" : r.align === "right" ? "100%" : "50%")(),
|
|
5930
|
-
textAnchor:
|
|
5930
|
+
textAnchor: Qn(r.align),
|
|
5931
5931
|
href: t,
|
|
5932
5932
|
xlinkHref: t,
|
|
5933
5933
|
children: r.text
|
|
@@ -5937,7 +5937,7 @@ const Ui = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
|
|
|
5937
5937
|
var s, o;
|
|
5938
5938
|
if (r.cachedObjectURL && !((s = r._renderingConfiguration) != null && s.omitCachedFields))
|
|
5939
5939
|
return /* @__PURE__ */ F(
|
|
5940
|
-
|
|
5940
|
+
Fn,
|
|
5941
5941
|
{
|
|
5942
5942
|
id: r.id,
|
|
5943
5943
|
src: r.cachedObjectURL,
|
|
@@ -6044,7 +6044,10 @@ class Ki {
|
|
|
6044
6044
|
layout: t,
|
|
6045
6045
|
elements: e
|
|
6046
6046
|
},
|
|
6047
|
-
getComponentWithProps: (a) =>
|
|
6047
|
+
getComponentWithProps: (a) => {
|
|
6048
|
+
const n = wa(t, e, a);
|
|
6049
|
+
return n && console.log(an(n)), n;
|
|
6050
|
+
}
|
|
6048
6051
|
};
|
|
6049
6052
|
}
|
|
6050
6053
|
initialize(t, e) {
|
|
@@ -6059,7 +6062,7 @@ class Ki {
|
|
|
6059
6062
|
layouts: {}
|
|
6060
6063
|
};
|
|
6061
6064
|
t.forEach((n) => {
|
|
6062
|
-
a = new
|
|
6065
|
+
a = new Ln(n).apply(a);
|
|
6063
6066
|
}), this.runStateCallbacks(), this.state = {
|
|
6064
6067
|
transaction: a
|
|
6065
6068
|
};
|
|
@@ -6069,7 +6072,7 @@ class Ki {
|
|
|
6069
6072
|
return { ...t, transaction: e.apply(a) };
|
|
6070
6073
|
}
|
|
6071
6074
|
}
|
|
6072
|
-
const
|
|
6075
|
+
const Nn = (r) => r.type === T.Image ? /* @__PURE__ */ F(Fn, { ...r }, r.id) : r.type === T.Frame ? /* @__PURE__ */ F(Ri, { ...r }, r.id) : r.type === T.Illustration ? /* @__PURE__ */ F(Ji, { ...r }, r.id) : r.type === T.Textbox ? /* @__PURE__ */ F(Hi, { ...r }, r.id) : r.type === T.Group ? /* @__PURE__ */ F(kn, { ...r }, r.id) : null, wa = (r, t, e) => {
|
|
6073
6076
|
const a = e.renderingConfiguration, n = a != null && a.removeExcludedElements ? t.filter((i) => !i.excludeFromExport) : t;
|
|
6074
6077
|
return /* @__PURE__ */ F(
|
|
6075
6078
|
Ni,
|
|
@@ -6119,7 +6122,7 @@ const te = (r) => {
|
|
|
6119
6122
|
if (r.defaultVariant !== void 0)
|
|
6120
6123
|
return t.find((e) => e.id === r.defaultVariant);
|
|
6121
6124
|
}
|
|
6122
|
-
}, At = /* @__PURE__ */ new Map(), Lt = /* @__PURE__ */ new Map(), Le = /* @__PURE__ */ new Map(),
|
|
6125
|
+
}, At = /* @__PURE__ */ new Map(), Lt = /* @__PURE__ */ new Map(), Le = /* @__PURE__ */ new Map(), Rn = async (r, t) => {
|
|
6123
6126
|
if (!t) {
|
|
6124
6127
|
if (!r)
|
|
6125
6128
|
throw new Error("No region or src supplied. Cannot construct frame!");
|
|
@@ -6196,7 +6199,7 @@ const te = (r) => {
|
|
|
6196
6199
|
if (At.has(r))
|
|
6197
6200
|
return At.get(r);
|
|
6198
6201
|
if (r.startsWith("data:image/svg+xml")) {
|
|
6199
|
-
const a = ur(r), n = new TextDecoder().decode(a.buffer), i =
|
|
6202
|
+
const a = ur(r), n = new TextDecoder().decode(a.buffer), i = On(n), s = {
|
|
6200
6203
|
src: r,
|
|
6201
6204
|
width: i.width,
|
|
6202
6205
|
height: i.height,
|
|
@@ -6227,8 +6230,8 @@ const te = (r) => {
|
|
|
6227
6230
|
}
|
|
6228
6231
|
}, va = async (r) => {
|
|
6229
6232
|
const t = await at(r);
|
|
6230
|
-
return
|
|
6231
|
-
}, Ua = (r) => r.endsWith("mm") ? Number(r.replace("mm", "")) * 3.7795275591 : r.endsWith("px") ? Number(r.replace("px", "")) : Number(r),
|
|
6233
|
+
return On(t);
|
|
6234
|
+
}, Ua = (r) => r.endsWith("mm") ? Number(r.replace("mm", "")) * 3.7795275591 : r.endsWith("px") ? Number(r.replace("px", "")) : Number(r), On = (r) => {
|
|
6232
6235
|
const a = dt().parseFromString(r, "image/svg+xml").querySelector("svg");
|
|
6233
6236
|
if (!a)
|
|
6234
6237
|
throw new Error("No svg tag found, this svg must be malformed!");
|
|
@@ -6242,7 +6245,7 @@ const te = (r) => {
|
|
|
6242
6245
|
}, Ot = (r, t) => {
|
|
6243
6246
|
const e = r.layoutState.elements.filter((n) => n.layer === t), a = Math.max(...e.map((n) => n.layerIndex).filter((n) => n !== void 0));
|
|
6244
6247
|
return Math.max(a, 0) + 1;
|
|
6245
|
-
},
|
|
6248
|
+
}, Un = async (r) => new Promise((t) => {
|
|
6246
6249
|
at(r).then((e) => {
|
|
6247
6250
|
t(e);
|
|
6248
6251
|
}).catch((e) => console.error(e));
|
|
@@ -6296,7 +6299,7 @@ const te = (r) => {
|
|
|
6296
6299
|
panelId: r.layoutState.layout.panelId
|
|
6297
6300
|
};
|
|
6298
6301
|
if (e && t === T.Illustration) {
|
|
6299
|
-
const l = await ot(await
|
|
6302
|
+
const l = await ot(await Un(e)), u = dt().parseFromString(l.svg, "image/svg+xml").firstElementChild.getAttribute("viewBox");
|
|
6300
6303
|
if (!u)
|
|
6301
6304
|
throw new Error("SVG missing viewBox.");
|
|
6302
6305
|
const h = o.height, m = u.split(" "), g = parseFloat(m[2]) || 1, f = parseFloat(m[3]) || 1, p = g / f;
|
|
@@ -6315,7 +6318,7 @@ const te = (r) => {
|
|
|
6315
6318
|
};
|
|
6316
6319
|
class pc {
|
|
6317
6320
|
static async getFrame(t, e) {
|
|
6318
|
-
const a = await
|
|
6321
|
+
const a = await Rn(e.region, e.src), n = await xe(a), i = e.region || await Ut(t, T.Frame);
|
|
6319
6322
|
return {
|
|
6320
6323
|
id: Q(),
|
|
6321
6324
|
x: i.left,
|
|
@@ -6449,7 +6452,7 @@ class pc {
|
|
|
6449
6452
|
};
|
|
6450
6453
|
}
|
|
6451
6454
|
static async getIllustration(t, e) {
|
|
6452
|
-
const a = e.region || await Ut(t, T.Illustration, e.src), n = await ot(await
|
|
6455
|
+
const a = e.region || await Ut(t, T.Illustration, e.src), n = await ot(await Un(e.src)), i = await qt(n.svg), s = Q();
|
|
6453
6456
|
return {
|
|
6454
6457
|
cachedObjectURL: i,
|
|
6455
6458
|
stepRegion: e.region,
|
|
@@ -6643,7 +6646,7 @@ class O extends R {
|
|
|
6643
6646
|
return this.oldState = t, this.commands.reduce((e, a) => a.apply(e), t);
|
|
6644
6647
|
}
|
|
6645
6648
|
}
|
|
6646
|
-
class
|
|
6649
|
+
class Ln extends R {
|
|
6647
6650
|
constructor(t) {
|
|
6648
6651
|
super(), this.layout = t;
|
|
6649
6652
|
}
|
|
@@ -7264,7 +7267,7 @@ const is = async (r) => {
|
|
|
7264
7267
|
throw console.error(e), new Be("Failed to shorten URL, see console.");
|
|
7265
7268
|
}
|
|
7266
7269
|
};
|
|
7267
|
-
class
|
|
7270
|
+
class $n {
|
|
7268
7271
|
async poll() {
|
|
7269
7272
|
try {
|
|
7270
7273
|
if (await this.predicate()) {
|
|
@@ -7311,7 +7314,7 @@ class ss {
|
|
|
7311
7314
|
const h = (await ea([e]))[0], m = (f = (g = h == null ? void 0 : h.versions) == null ? void 0 : g.find((p) => p.name === "mpeg4")) == null ? void 0 : f.link;
|
|
7312
7315
|
return { asset: h, link: m };
|
|
7313
7316
|
}, s = await new Promise((h, m) => {
|
|
7314
|
-
new
|
|
7317
|
+
new $n(
|
|
7315
7318
|
async () => !!(await i()).link,
|
|
7316
7319
|
async () => {
|
|
7317
7320
|
const g = await i();
|
|
@@ -7351,7 +7354,7 @@ class ss {
|
|
|
7351
7354
|
return t.data.regions.map(e);
|
|
7352
7355
|
}
|
|
7353
7356
|
async command(t, e, a, n) {
|
|
7354
|
-
const i = a.getLayouts(), o = `data:image/svg+xml;base64,${btoa(await
|
|
7357
|
+
const i = a.getLayouts(), o = `data:image/svg+xml;base64,${btoa(await rn(t, { type: "svg" }))}`, l = e.map((c) => {
|
|
7355
7358
|
const d = c.region, A = i.find((u) => u.panelId === (d == null ? void 0 : d.panelId));
|
|
7356
7359
|
if (!A && d)
|
|
7357
7360
|
throw new Y(d);
|
|
@@ -7379,7 +7382,7 @@ class ss {
|
|
|
7379
7382
|
} };
|
|
7380
7383
|
}
|
|
7381
7384
|
}
|
|
7382
|
-
const
|
|
7385
|
+
const Vn = new ss();
|
|
7383
7386
|
class we {
|
|
7384
7387
|
constructor() {
|
|
7385
7388
|
this.frameSourceSvg = async (t, e) => {
|
|
@@ -7501,7 +7504,7 @@ class we {
|
|
|
7501
7504
|
const o = e.fileLink || "";
|
|
7502
7505
|
return o.endsWith(".pdf") || o.endsWith(".eps") || o.endsWith(".ai") ? new Promise((c) => {
|
|
7503
7506
|
a.addPoller(
|
|
7504
|
-
new
|
|
7507
|
+
new $n(
|
|
7505
7508
|
async () => {
|
|
7506
7509
|
var h;
|
|
7507
7510
|
const A = (h = (await U.getFromServer(e.key || "")).versions) == null ? void 0 : h.find((m) => m.name === "svg");
|
|
@@ -8092,7 +8095,7 @@ class ls {
|
|
|
8092
8095
|
};
|
|
8093
8096
|
}
|
|
8094
8097
|
}
|
|
8095
|
-
const
|
|
8098
|
+
const zn = new ls();
|
|
8096
8099
|
class cs {
|
|
8097
8100
|
async init(t, e, a) {
|
|
8098
8101
|
const n = t.option;
|
|
@@ -8178,7 +8181,7 @@ class cs {
|
|
|
8178
8181
|
};
|
|
8179
8182
|
}
|
|
8180
8183
|
}
|
|
8181
|
-
const
|
|
8184
|
+
const Gn = new cs();
|
|
8182
8185
|
class ds {
|
|
8183
8186
|
async init(t, e, a) {
|
|
8184
8187
|
if (a)
|
|
@@ -8291,7 +8294,7 @@ class ds {
|
|
|
8291
8294
|
return n(""), { input: e, helperData: {} };
|
|
8292
8295
|
}
|
|
8293
8296
|
}
|
|
8294
|
-
const
|
|
8297
|
+
const Wn = new ds();
|
|
8295
8298
|
class As {
|
|
8296
8299
|
async init(t, e, a) {
|
|
8297
8300
|
const n = t.option;
|
|
@@ -8383,7 +8386,7 @@ class As {
|
|
|
8383
8386
|
};
|
|
8384
8387
|
}
|
|
8385
8388
|
}
|
|
8386
|
-
const
|
|
8389
|
+
const jn = new As();
|
|
8387
8390
|
class us {
|
|
8388
8391
|
async init(t, e, a) {
|
|
8389
8392
|
const n = t.option;
|
|
@@ -8442,7 +8445,7 @@ class us {
|
|
|
8442
8445
|
};
|
|
8443
8446
|
}
|
|
8444
8447
|
}
|
|
8445
|
-
const
|
|
8448
|
+
const Hn = new us();
|
|
8446
8449
|
class hs {
|
|
8447
8450
|
constructor() {
|
|
8448
8451
|
this.shapeFillId = "spiff-fill-shape";
|
|
@@ -9456,7 +9459,7 @@ class Is extends Cs {
|
|
|
9456
9459
|
return Es(f, C, e.height, e.width, 0.35, 0.65), vs(u.outerHTML);
|
|
9457
9460
|
}
|
|
9458
9461
|
}
|
|
9459
|
-
async function
|
|
9462
|
+
async function qn(r) {
|
|
9460
9463
|
if (r === "Vegemite")
|
|
9461
9464
|
return new Is();
|
|
9462
9465
|
throw new z(`Failed to resolve Module, Module ${r} not found`);
|
|
@@ -10004,7 +10007,7 @@ const xs = y`
|
|
|
10004
10007
|
`;
|
|
10005
10008
|
var Me = /* @__PURE__ */ ((r) => (r.Error = "Error", r.Warning = "Warning", r.Info = "Info", r))(Me || {});
|
|
10006
10009
|
const to = 1e3;
|
|
10007
|
-
class ja extends
|
|
10010
|
+
class ja extends Pn {
|
|
10008
10011
|
constructor(t) {
|
|
10009
10012
|
super(), this.createdAt = /* @__PURE__ */ new Date(), this.update = t;
|
|
10010
10013
|
}
|
|
@@ -10018,7 +10021,7 @@ class ja extends Dn {
|
|
|
10018
10021
|
}
|
|
10019
10022
|
class eo {
|
|
10020
10023
|
constructor(t, e, a, n, i, s, o, l, c, d, A, u, h = !1, m, g = !1, f = !1, p = !1) {
|
|
10021
|
-
this.workflowStatePromiseQueue = new
|
|
10024
|
+
this.workflowStatePromiseQueue = new xn(1), this.initialized = !1, this.readOnly = !1, this.isReloadedTransaction = !1, this.singleVariantsRenderable = !1, this.stepTags = {}, this.renderLayouts = () => {
|
|
10022
10025
|
var v;
|
|
10023
10026
|
if (!this.previewService)
|
|
10024
10027
|
return;
|
|
@@ -10308,7 +10311,7 @@ class eo {
|
|
|
10308
10311
|
...this.storage,
|
|
10309
10312
|
[t]: { ...this.storage[t], ...e }
|
|
10310
10313
|
};
|
|
10311
|
-
if (!
|
|
10314
|
+
if (!sn(a, this.storage)) {
|
|
10312
10315
|
this.storage = a;
|
|
10313
10316
|
const n = new $a(this.constructSerializableWorkflow());
|
|
10314
10317
|
this.commandContext.apply(n, !0), this.onStepSpecificStorageChange(t), this.onStorageChange();
|
|
@@ -10549,7 +10552,7 @@ class eo {
|
|
|
10549
10552
|
switch (this.stepInitialised[l.stepName] = !0, l.type) {
|
|
10550
10553
|
case D.DigitalContent:
|
|
10551
10554
|
a.push(
|
|
10552
|
-
|
|
10555
|
+
Vn.init(
|
|
10553
10556
|
l,
|
|
10554
10557
|
this,
|
|
10555
10558
|
this.reloadedState
|
|
@@ -10568,27 +10571,27 @@ class eo {
|
|
|
10568
10571
|
break;
|
|
10569
10572
|
case D.Material:
|
|
10570
10573
|
a.push(
|
|
10571
|
-
|
|
10574
|
+
zn.init(l, this, this.reloadedState)
|
|
10572
10575
|
);
|
|
10573
10576
|
break;
|
|
10574
10577
|
case D.Model:
|
|
10575
|
-
a.push(
|
|
10578
|
+
a.push(Gn.init(l, this, this.reloadedState));
|
|
10576
10579
|
break;
|
|
10577
10580
|
case D.Module:
|
|
10578
10581
|
this.stepSpecificServices[l.stepName] = {
|
|
10579
|
-
module: await
|
|
10582
|
+
module: await qn(l.data.module)
|
|
10580
10583
|
}, a.push(
|
|
10581
|
-
|
|
10584
|
+
Wn.init(l, this, this.reloadedState)
|
|
10582
10585
|
);
|
|
10583
10586
|
break;
|
|
10584
10587
|
case D.Picture:
|
|
10585
10588
|
a.push(
|
|
10586
|
-
|
|
10589
|
+
jn.init(l, this, this.reloadedState)
|
|
10587
10590
|
);
|
|
10588
10591
|
break;
|
|
10589
10592
|
case D.Question:
|
|
10590
10593
|
a.push(
|
|
10591
|
-
|
|
10594
|
+
Hn.init(l, this, this.reloadedState)
|
|
10592
10595
|
);
|
|
10593
10596
|
break;
|
|
10594
10597
|
case D.Shape:
|
|
@@ -10741,7 +10744,7 @@ class it {
|
|
|
10741
10744
|
return this.variantData.enabled;
|
|
10742
10745
|
}
|
|
10743
10746
|
}
|
|
10744
|
-
const
|
|
10747
|
+
const Yn = class sa {
|
|
10745
10748
|
constructor(t, e, a) {
|
|
10746
10749
|
this.manager = t, this.step = e, this.tags = a;
|
|
10747
10750
|
}
|
|
@@ -10872,8 +10875,8 @@ const qn = class sa {
|
|
|
10872
10875
|
e ? i && e.executeCameraAnimation(i) : console.warn("No preview service available, cannot execute camera animations."), a ? n && a.executeAnimation(n, t) : console.warn("No model container available, cannot execute model animations.");
|
|
10873
10876
|
}
|
|
10874
10877
|
};
|
|
10875
|
-
|
|
10876
|
-
let rt =
|
|
10878
|
+
Yn.updateState = /* @__PURE__ */ new Map();
|
|
10879
|
+
let rt = Yn;
|
|
10877
10880
|
class ao extends rt {
|
|
10878
10881
|
constructor(t, e, a) {
|
|
10879
10882
|
super(t, e, a);
|
|
@@ -10957,7 +10960,7 @@ class no extends rt {
|
|
|
10957
10960
|
super(t, e, a);
|
|
10958
10961
|
}
|
|
10959
10962
|
selectVariant(t) {
|
|
10960
|
-
return
|
|
10963
|
+
return zn.selectVariant(
|
|
10961
10964
|
this.step,
|
|
10962
10965
|
t.getResource(),
|
|
10963
10966
|
this.manager,
|
|
@@ -10970,7 +10973,7 @@ class ro extends rt {
|
|
|
10970
10973
|
super(t, e, a);
|
|
10971
10974
|
}
|
|
10972
10975
|
selectVariant(t) {
|
|
10973
|
-
return
|
|
10976
|
+
return Gn.selectVariant(
|
|
10974
10977
|
this.step,
|
|
10975
10978
|
t.getResource(),
|
|
10976
10979
|
this.manager,
|
|
@@ -10988,7 +10991,7 @@ class io extends rt {
|
|
|
10988
10991
|
* @returns A promise that can be awaited to ensure the new image asset has been updated on the design.
|
|
10989
10992
|
*/
|
|
10990
10993
|
selectVariant(t) {
|
|
10991
|
-
return
|
|
10994
|
+
return jn.selectVariant(
|
|
10992
10995
|
this.step,
|
|
10993
10996
|
t.getResource(),
|
|
10994
10997
|
this.manager,
|
|
@@ -11003,7 +11006,7 @@ class so extends rt {
|
|
|
11003
11006
|
async selectVariant(t) {
|
|
11004
11007
|
if (!t.getId())
|
|
11005
11008
|
throw new Error("Unable to select variant with a null ID");
|
|
11006
|
-
await
|
|
11009
|
+
await Hn.selectVariant(this.step, t.getId(), this.manager);
|
|
11007
11010
|
}
|
|
11008
11011
|
/**
|
|
11009
11012
|
* The way that this step expects to be rendered.
|
|
@@ -11301,7 +11304,7 @@ class Ao extends rt {
|
|
|
11301
11304
|
* @returns The final URL string for the QR code.
|
|
11302
11305
|
*/
|
|
11303
11306
|
async selectVideo(t) {
|
|
11304
|
-
return
|
|
11307
|
+
return Vn.regenerateQRCode(
|
|
11305
11308
|
this.manager.getRegionElements(this.step.stepName),
|
|
11306
11309
|
t.key,
|
|
11307
11310
|
this.manager,
|
|
@@ -11339,7 +11342,7 @@ class uo extends rt {
|
|
|
11339
11342
|
return ((t = this.manager.getStepStorage(this.step.stepName)) == null ? void 0 : t.text) || "";
|
|
11340
11343
|
}
|
|
11341
11344
|
setText(t) {
|
|
11342
|
-
|
|
11345
|
+
Wn.changeText(this.step, t, this.manager, (e) => {
|
|
11343
11346
|
if (e) {
|
|
11344
11347
|
const a = [
|
|
11345
11348
|
...this.manager.getInformationResults(),
|
|
@@ -11387,7 +11390,7 @@ class ie {
|
|
|
11387
11390
|
}
|
|
11388
11391
|
}
|
|
11389
11392
|
}
|
|
11390
|
-
const
|
|
11393
|
+
const Jn = y`
|
|
11391
11394
|
fragment CreateDesignTransaction on Transaction {
|
|
11392
11395
|
id
|
|
11393
11396
|
designName
|
|
@@ -11413,7 +11416,7 @@ const Yn = y`
|
|
|
11413
11416
|
}
|
|
11414
11417
|
}
|
|
11415
11418
|
`, ho = y`
|
|
11416
|
-
${
|
|
11419
|
+
${Jn}
|
|
11417
11420
|
mutation CreateDesign(
|
|
11418
11421
|
$name: String!
|
|
11419
11422
|
$layouts: [LayoutInput]!
|
|
@@ -11445,7 +11448,7 @@ const Yn = y`
|
|
|
11445
11448
|
}
|
|
11446
11449
|
}
|
|
11447
11450
|
`, mo = y`
|
|
11448
|
-
${
|
|
11451
|
+
${Jn}
|
|
11449
11452
|
mutation CreateDesigns($inputs: [DesignCreateInput]!) {
|
|
11450
11453
|
designCreateMany(inputs: $inputs) {
|
|
11451
11454
|
id
|
|
@@ -11563,7 +11566,7 @@ const go = async (r) => {
|
|
|
11563
11566
|
});
|
|
11564
11567
|
}
|
|
11565
11568
|
return n;
|
|
11566
|
-
},
|
|
11569
|
+
}, Kn = (r, t, e, a, n, i, s, o) => {
|
|
11567
11570
|
var m, g;
|
|
11568
11571
|
const l = t.basePrice || 0, c = r.priceModifierTotal || 0, d = po(a, e, void 0, i), u = (k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(r.id), h = {
|
|
11569
11572
|
additionalExternalProductId: (m = r.integrationProduct) == null ? void 0 : m.additionalExternalProductId,
|
|
@@ -11587,7 +11590,7 @@ const go = async (r) => {
|
|
|
11587
11590
|
workflowViewerReadOnlyLink: r.workflowViewerReadOnlyLink || ""
|
|
11588
11591
|
};
|
|
11589
11592
|
return i && (h.metadata = i), a && (h.selectedVariants = a), n && (h.sku = n), h;
|
|
11590
|
-
},
|
|
11593
|
+
}, _n = async (r, t, e, a, n, i, s, o, l, c) => {
|
|
11591
11594
|
var I;
|
|
11592
11595
|
await (async () => {
|
|
11593
11596
|
var j;
|
|
@@ -11595,7 +11598,7 @@ const go = async (r) => {
|
|
|
11595
11598
|
return c;
|
|
11596
11599
|
await r.outstandingRequestsPromise();
|
|
11597
11600
|
const x = (k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(n.id), N = await b.getShadowGraphqlClient().query({
|
|
11598
|
-
query:
|
|
11601
|
+
query: In,
|
|
11599
11602
|
variables: { ids: [n.id] },
|
|
11600
11603
|
fetchPolicy: "no-cache",
|
|
11601
11604
|
errorPolicy: "all",
|
|
@@ -11684,7 +11687,7 @@ const go = async (r) => {
|
|
|
11684
11687
|
}, Co = async (r, t, e, a, n, i, s, o, l, c, d) => {
|
|
11685
11688
|
var p, C;
|
|
11686
11689
|
l("workflow.steps.finish.finalize.buildingLayouts");
|
|
11687
|
-
const { designDetails: A, cartSelectionsWithPrices: u, cartMetadata: h } = await
|
|
11690
|
+
const { designDetails: A, cartSelectionsWithPrices: u, cartMetadata: h } = await _n(
|
|
11688
11691
|
r,
|
|
11689
11692
|
t,
|
|
11690
11693
|
e,
|
|
@@ -11701,7 +11704,7 @@ const go = async (r) => {
|
|
|
11701
11704
|
throw new Error("Failed to create design");
|
|
11702
11705
|
l("workflow.steps.finish.finalize.updatingTransaction");
|
|
11703
11706
|
const f = m.transaction;
|
|
11704
|
-
return
|
|
11707
|
+
return Kn(
|
|
11705
11708
|
f,
|
|
11706
11709
|
n,
|
|
11707
11710
|
t,
|
|
@@ -11720,7 +11723,7 @@ const go = async (r) => {
|
|
|
11720
11723
|
const n = await (async () => {
|
|
11721
11724
|
var c;
|
|
11722
11725
|
const l = await b.getShadowGraphqlClient().query({
|
|
11723
|
-
query:
|
|
11726
|
+
query: In,
|
|
11724
11727
|
variables: { ids: r.map((d) => d.transaction.id) },
|
|
11725
11728
|
fetchPolicy: "no-cache",
|
|
11726
11729
|
errorPolicy: "all"
|
|
@@ -11729,7 +11732,7 @@ const go = async (r) => {
|
|
|
11729
11732
|
l.errors && console.log("Server Error:", d.message);
|
|
11730
11733
|
}), null) : (c = l.data) != null && c.transactions ? l.data.transactions.map((d) => d.workflowState ?? null) : null;
|
|
11731
11734
|
})(), i = await Promise.all(
|
|
11732
|
-
r.map(async (o, l) => await
|
|
11735
|
+
r.map(async (o, l) => await _n(
|
|
11733
11736
|
o.workflowManager,
|
|
11734
11737
|
o.workflow,
|
|
11735
11738
|
o.layouts,
|
|
@@ -11749,7 +11752,7 @@ const go = async (r) => {
|
|
|
11749
11752
|
return t("workflow.steps.finish.finalize.updatingTransaction"), s.map((o, l) => {
|
|
11750
11753
|
var u;
|
|
11751
11754
|
const c = r[l], d = i[l], A = o.transaction;
|
|
11752
|
-
return
|
|
11755
|
+
return Kn(
|
|
11753
11756
|
A,
|
|
11754
11757
|
c.product,
|
|
11755
11758
|
c.workflow,
|
|
@@ -11881,7 +11884,7 @@ var Bo = /* @__PURE__ */ ((r) => (r.QuantityChanged = "QuantityChanged", r.Price
|
|
|
11881
11884
|
class bo {
|
|
11882
11885
|
constructor(t, e) {
|
|
11883
11886
|
var n;
|
|
11884
|
-
if (this.cachedStepHandles = /* @__PURE__ */ new Map(), this.currentPriceBreak = 1, this.renderableScenes = [], this.renderableSceneCallbacks = [], this.eventCallbacks = /* @__PURE__ */ new Map(), this.debouncedSavedDesignUpdate =
|
|
11887
|
+
if (this.cachedStepHandles = /* @__PURE__ */ new Map(), this.currentPriceBreak = 1, this.renderableScenes = [], this.renderableSceneCallbacks = [], this.eventCallbacks = /* @__PURE__ */ new Map(), this.debouncedSavedDesignUpdate = on(async () => {
|
|
11885
11888
|
await je.getSavedDesignByTransaction(
|
|
11886
11889
|
this.getWorkflowManager().getTransaction().id
|
|
11887
11890
|
) && this.save();
|
|
@@ -12018,7 +12021,7 @@ class bo {
|
|
|
12018
12021
|
purpose: Gt.Print,
|
|
12019
12022
|
region: { left: A.x, top: A.y, width: A.width, height: A.height }
|
|
12020
12023
|
}
|
|
12021
|
-
}), g =
|
|
12024
|
+
}), g = An(m);
|
|
12022
12025
|
await (await ca.from(h, g, {
|
|
12023
12026
|
anonymousCrossOrigin: !0,
|
|
12024
12027
|
ignoreDimensions: !1,
|
|
@@ -12333,7 +12336,7 @@ const Io = [
|
|
|
12333
12336
|
], Do = async (r, t, e) => {
|
|
12334
12337
|
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);
|
|
12335
12338
|
o.searchParams.append("video", ka(JSON.stringify([{ href: i }]))), o.pathname = o.pathname + (o.pathname.slice(-1) === "/" ? "" : "/");
|
|
12336
|
-
const l = o.toString(), d = `data:image/svg+xml;base64,${ka(await
|
|
12339
|
+
const l = o.toString(), d = `data:image/svg+xml;base64,${ka(await rn(l, { type: "svg" }))}`, A = (h) => {
|
|
12337
12340
|
const m = r.find((f) => f.panelId === h.panelId);
|
|
12338
12341
|
if (!m)
|
|
12339
12342
|
throw new Y(h);
|
|
@@ -12364,7 +12367,7 @@ const Io = [
|
|
|
12364
12367
|
o && (t[a.stepName] = { selectedVariants: [o] });
|
|
12365
12368
|
const l = async (c) => {
|
|
12366
12369
|
var g;
|
|
12367
|
-
const d = await
|
|
12370
|
+
const d = await Rn(c, (g = o == null ? void 0 : o.asset) == null ? void 0 : g.fileLink), A = await xe(d), u = Q(), h = r.find((f) => f.panelId === c.panelId);
|
|
12368
12371
|
if (!h)
|
|
12369
12372
|
throw new Y(c);
|
|
12370
12373
|
const m = Sa(
|
|
@@ -12485,7 +12488,7 @@ const Io = [
|
|
|
12485
12488
|
return console.error(E), [];
|
|
12486
12489
|
}
|
|
12487
12490
|
}, Fo = async (r, t, e) => {
|
|
12488
|
-
const a = await
|
|
12491
|
+
const a = await qn(e.data.module), n = t.data, i = (o, l) => {
|
|
12489
12492
|
const c = r.find((A) => A.panelId === l.panelId);
|
|
12490
12493
|
if (!c)
|
|
12491
12494
|
throw new Y(l);
|
|
@@ -12862,7 +12865,7 @@ const Uo = () => new Promise((r, t) => {
|
|
|
12862
12865
|
}), Lo = Uo();
|
|
12863
12866
|
class $o {
|
|
12864
12867
|
constructor(t, e, a, n) {
|
|
12865
|
-
this.hasSetStaticContext = !1, this.interactiveDirty = !1, this.staticCtxDirty = !1, this.lastRequestedRenderArguments = void 0, this.lastCompletedStaticRender = void 0, this.renderQueue = new
|
|
12868
|
+
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;
|
|
12866
12869
|
}
|
|
12867
12870
|
getID() {
|
|
12868
12871
|
return this.id;
|
|
@@ -12928,7 +12931,7 @@ class $o {
|
|
|
12928
12931
|
);
|
|
12929
12932
|
}
|
|
12930
12933
|
}
|
|
12931
|
-
class Vo extends
|
|
12934
|
+
class Vo extends Pn {
|
|
12932
12935
|
// TODO: Do we need to pass this whole array in?
|
|
12933
12936
|
constructor(t, e, a, n, i) {
|
|
12934
12937
|
super(), this.layoutId = t, this.ctx = e, this.nonPOTSupport = a, this.onRender = n, this.layouts = i;
|
|
@@ -12981,7 +12984,7 @@ class Vo extends Dn {
|
|
|
12981
12984
|
l = i.width, c = i.height;
|
|
12982
12985
|
const d = wa(t.layoutState.layout, e, {
|
|
12983
12986
|
renderingConfiguration: { purpose: Gt.ThreeD }
|
|
12984
|
-
}), A =
|
|
12987
|
+
}), A = An(d), u = await ca.from(this.ctx, A, {
|
|
12985
12988
|
anonymousCrossOrigin: !0,
|
|
12986
12989
|
ignoreDimensions: !this.nonPOTSupport,
|
|
12987
12990
|
ignoreAnimation: !0,
|
|
@@ -13012,7 +13015,7 @@ const Ic = (r, t) => {
|
|
|
13012
13015
|
serializableWorkflow: { steps: [] },
|
|
13013
13016
|
layouts: {}
|
|
13014
13017
|
};
|
|
13015
|
-
n = new O(e.map((l) => new
|
|
13018
|
+
n = new O(e.map((l) => new Ln(l))).apply(n);
|
|
13016
13019
|
const s = await Ro(r, t, e, a);
|
|
13017
13020
|
return new O(s).apply(n);
|
|
13018
13021
|
};
|
|
@@ -13070,7 +13073,7 @@ class zo {
|
|
|
13070
13073
|
);
|
|
13071
13074
|
case et.Option: {
|
|
13072
13075
|
const e = t.entityId ? await X.getOption(t.entityId) : void 0;
|
|
13073
|
-
return (e == null ? void 0 : e.type) === "Color" ? new Ha(this.bundle, t, e) : new
|
|
13076
|
+
return (e == null ? void 0 : e.type) === "Color" ? new Ha(this.bundle, t, e) : new Xn(this.bundle, t, e);
|
|
13074
13077
|
}
|
|
13075
13078
|
case et.Text:
|
|
13076
13079
|
return new Wo(this.bundle, t);
|
|
@@ -13404,7 +13407,7 @@ class Wo extends Ba {
|
|
|
13404
13407
|
await Promise.all(n);
|
|
13405
13408
|
}
|
|
13406
13409
|
}
|
|
13407
|
-
class
|
|
13410
|
+
class Xn extends Ba {
|
|
13408
13411
|
constructor(t, e, a) {
|
|
13409
13412
|
super(t, e), this.optionResource = a;
|
|
13410
13413
|
}
|
|
@@ -13479,7 +13482,7 @@ class _n extends Ba {
|
|
|
13479
13482
|
await Promise.all(n);
|
|
13480
13483
|
}
|
|
13481
13484
|
}
|
|
13482
|
-
class Ha extends
|
|
13485
|
+
class Ha extends Xn {
|
|
13483
13486
|
constructor(t, e, a) {
|
|
13484
13487
|
super(t, e, a);
|
|
13485
13488
|
}
|
|
@@ -14991,9 +14994,9 @@ class Pc extends ba {
|
|
|
14991
14994
|
super(`"${t}"`);
|
|
14992
14995
|
}
|
|
14993
14996
|
}
|
|
14994
|
-
class
|
|
14997
|
+
class Zn extends ba {
|
|
14995
14998
|
constructor(t, e) {
|
|
14996
|
-
if (e !== "Asset" && !
|
|
14999
|
+
if (e !== "Asset" && !Zn.validUUID(t))
|
|
14997
15000
|
throw new Error("Invalid ID, must be a valid v4 UUID. https://www.uuidgenerator.net/");
|
|
14998
15001
|
super(`{"isSpiffObject": true, "id": "${t}", "type": "${e}"}`);
|
|
14999
15002
|
}
|
|
@@ -15181,7 +15184,7 @@ const Ya = y`
|
|
|
15181
15184
|
if (!a)
|
|
15182
15185
|
throw new Error(`Workflow not found: ${r}`);
|
|
15183
15186
|
return a;
|
|
15184
|
-
},
|
|
15187
|
+
}, tr = async (r, t) => {
|
|
15185
15188
|
const e = r.map((o) => Ht.get({ id: o, options: t })), a = r.filter((o, l) => e[l] === void 0);
|
|
15186
15189
|
if (a.length === 0)
|
|
15187
15190
|
return Promise.all(e);
|
|
@@ -15189,10 +15192,11 @@ const Ya = y`
|
|
|
15189
15192
|
(o) => Ht.set({ id: o, options: t }, Al(o, n))
|
|
15190
15193
|
), s = e.filter((o) => o !== void 0);
|
|
15191
15194
|
return await Promise.all(s.concat(i));
|
|
15192
|
-
}, Fc = async (r, t) => (await
|
|
15195
|
+
}, Fc = async (r, t) => (await tr([r], t))[0], ul = (r) => r.sort((t, e) => t.index - e.index).map((t) => ({
|
|
15193
15196
|
id: Q(),
|
|
15194
15197
|
panelId: t.name,
|
|
15195
15198
|
name: t.name,
|
|
15199
|
+
title: t.title,
|
|
15196
15200
|
index: t.index,
|
|
15197
15201
|
createdAt: /* @__PURE__ */ new Date(),
|
|
15198
15202
|
updatedAt: /* @__PURE__ */ new Date(),
|
|
@@ -15217,7 +15221,7 @@ class kc {
|
|
|
15217
15221
|
} catch (a) {
|
|
15218
15222
|
throw console.error(a), new ut("Critical - Unable to synchronize workflow state with server.");
|
|
15219
15223
|
}
|
|
15220
|
-
}, this.options = t, this.options.applicationKey && xr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 26.
|
|
15224
|
+
}, this.options = t, this.options.applicationKey && xr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 26.23.0"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
|
|
15221
15225
|
}
|
|
15222
15226
|
configure(t) {
|
|
15223
15227
|
wt.setHubUrl(t.hubUrl), wt.setServerUrl(t.serverUrl), wt.setServicesApiUrl(t.servicesApiUrl), this.marketplaceThemeInstallId = t.marketplaceThemeInstallId, this.marketplaceThemeInstallConfigurationId = t.marketplaceThemeInstallConfigurationId, t.bearerAuthenticationToken && kr(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration();
|
|
@@ -15721,7 +15725,7 @@ class kc {
|
|
|
15721
15725
|
), c = Da(o, 10), d = Da(l, 10), A = (await Promise.all([
|
|
15722
15726
|
...c.map(n),
|
|
15723
15727
|
...d.map(i)
|
|
15724
|
-
])).flat(), u = [...new Set(A.map((S) => S.workflowId))], h = await
|
|
15728
|
+
])).flat(), u = [...new Set(A.map((S) => S.workflowId))], h = await tr(u, e), m = new Map(h.map((S) => [S.id, S])), g = k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map(), f = A.map(async (S) => {
|
|
15725
15729
|
var j;
|
|
15726
15730
|
const { transaction: B, workflowId: E, readOnly: I, index: P } = S, x = m.get(E), M = t[P];
|
|
15727
15731
|
!g.get(B.id) && B.transactionOwnerId && g.set(B.id, B.transactionOwnerId);
|
|
@@ -15899,7 +15903,7 @@ function le(r, t, e) {
|
|
|
15899
15903
|
}
|
|
15900
15904
|
class fl {
|
|
15901
15905
|
constructor(t, e) {
|
|
15902
|
-
this.minZoomScale = [0.03], this.maxZoomScale = [20], this._debouncedUpdateFrameOffsets =
|
|
15906
|
+
this.minZoomScale = [0.03], this.maxZoomScale = [20], this._debouncedUpdateFrameOffsets = on(this.updateFrameOffsets, 200), this.targetElements = [], this.onFrameDataChangeListeners = [], this.onZoomChangeListeners = [], this.forceImageCover = t, this.initialZoom = e, this.thresholdSettings = {
|
|
15903
15907
|
useThreshold: !1,
|
|
15904
15908
|
invertThreshold: !1,
|
|
15905
15909
|
threshold: 128,
|
|
@@ -15920,7 +15924,7 @@ class fl {
|
|
|
15920
15924
|
let i = !1;
|
|
15921
15925
|
for (let s = 0; s < n.currentFrameSources.length; s++) {
|
|
15922
15926
|
const o = n.currentFrameSources[s], l = await xe(o), c = this.frameData ? this.frameData[s] : void 0;
|
|
15923
|
-
|
|
15927
|
+
sn(l, c) || (this.frameData || (this.frameData = new Array(n.currentFrameSources.length)), this.frameData[s] = l, i = !0);
|
|
15924
15928
|
}
|
|
15925
15929
|
i && (this.onFrameDataChangeListeners.forEach(
|
|
15926
15930
|
(s) => s(this.frameData)
|
|
@@ -16726,9 +16730,9 @@ K = { __e: function(r, t, e, a) {
|
|
|
16726
16730
|
}
|
|
16727
16731
|
throw r;
|
|
16728
16732
|
} }, typeof Promise == "function" && Promise.prototype.then.bind(Promise.resolve());
|
|
16729
|
-
var st, qe, Ja,
|
|
16733
|
+
var st, qe, Ja, er = [], Ye = [], Ka = K.__b, _a = K.__r, Xa = K.diffed, Za = K.__c, tn = K.unmount;
|
|
16730
16734
|
function xl() {
|
|
16731
|
-
for (var r; r =
|
|
16735
|
+
for (var r; r = er.shift(); )
|
|
16732
16736
|
if (r.__P && r.__H)
|
|
16733
16737
|
try {
|
|
16734
16738
|
r.__H.__h.forEach(ue), r.__H.__h.forEach(la), r.__H.__h = [];
|
|
@@ -16747,7 +16751,7 @@ K.__b = function(r) {
|
|
|
16747
16751
|
}, K.diffed = function(r) {
|
|
16748
16752
|
Xa && Xa(r);
|
|
16749
16753
|
var t = r.__c;
|
|
16750
|
-
t && t.__H && (t.__H.__h.length && (
|
|
16754
|
+
t && t.__H && (t.__H.__h.length && (er.push(t) !== 1 && Ja === K.requestAnimationFrame || ((Ja = K.requestAnimationFrame) || Fl)(xl)), t.__H.__.forEach(function(e) {
|
|
16751
16755
|
e.i && (e.__H = e.i), e.__V !== Ye && (e.__ = e.__V), e.i = void 0, e.__V = Ye;
|
|
16752
16756
|
})), qe = st = null;
|
|
16753
16757
|
}, K.__c = function(r, t) {
|
|
@@ -16805,7 +16809,7 @@ export {
|
|
|
16805
16809
|
Pl as ConversionDataType,
|
|
16806
16810
|
Dl as ConversionLocation,
|
|
16807
16811
|
W as CreateElementCommand,
|
|
16808
|
-
|
|
16812
|
+
Ln as CreateLayoutCommand,
|
|
16809
16813
|
vt as DeleteElementCommand,
|
|
16810
16814
|
Ao as DigitalContentStepHandle,
|
|
16811
16815
|
Go as FileUploadGlobalPropertyHandle,
|
|
@@ -16836,9 +16840,9 @@ export {
|
|
|
16836
16840
|
ro as ModelStepHandle,
|
|
16837
16841
|
uo as ModuleStepHandle,
|
|
16838
16842
|
Cc as MoveCommand,
|
|
16839
|
-
|
|
16843
|
+
Zn as ObjectInput,
|
|
16840
16844
|
rl as ObjectInputType,
|
|
16841
|
-
|
|
16845
|
+
Xn as OptionGlobalPropertyHandle,
|
|
16842
16846
|
ge as OptionNotFoundError,
|
|
16843
16847
|
Dt as ParseError,
|
|
16844
16848
|
io as PictureStepHandle,
|
|
@@ -16846,9 +16850,9 @@ export {
|
|
|
16846
16850
|
qo as ProductCollection,
|
|
16847
16851
|
zt as ProductWorkflow,
|
|
16848
16852
|
Ht as PromiseCache,
|
|
16849
|
-
|
|
16853
|
+
xn as PromiseQueue,
|
|
16850
16854
|
so as QuestionStepHandle,
|
|
16851
|
-
|
|
16855
|
+
Pn as QueueablePromise,
|
|
16852
16856
|
yc as ResizeCommand,
|
|
16853
16857
|
Wt as ResourceNotFoundError,
|
|
16854
16858
|
wc as RotateCommand,
|
|
@@ -16882,7 +16886,7 @@ export {
|
|
|
16882
16886
|
tc as dataUrlFromExternalUrl,
|
|
16883
16887
|
je as designService,
|
|
16884
16888
|
Ae as determineCorrectFontSizeAndLines,
|
|
16885
|
-
|
|
16889
|
+
Vn as digitalContentStepService,
|
|
16886
16890
|
dt as domParser,
|
|
16887
16891
|
Lc as duplicateBundle,
|
|
16888
16892
|
$c as duplicateTransaction,
|
|
@@ -16920,26 +16924,26 @@ export {
|
|
|
16920
16924
|
oc as getTrueCoordinates,
|
|
16921
16925
|
Wc as getUnorderedTransactions,
|
|
16922
16926
|
Fc as getWorkflow,
|
|
16923
|
-
|
|
16927
|
+
tr as getWorkflows,
|
|
16924
16928
|
b as graphQlManager,
|
|
16925
16929
|
de as illustrationStepService,
|
|
16926
16930
|
sc as isCloseToValue,
|
|
16927
16931
|
Tt as loadFont,
|
|
16928
16932
|
ac as matchHexToPms,
|
|
16929
|
-
|
|
16933
|
+
zn as materialStepService,
|
|
16930
16934
|
mc as mmPerPixel,
|
|
16931
|
-
|
|
16935
|
+
Gn as modelStepService,
|
|
16932
16936
|
fa as modifySVGColors,
|
|
16933
|
-
|
|
16937
|
+
Wn as moduleStepService,
|
|
16934
16938
|
Oc as nameBundle,
|
|
16935
16939
|
Uc as nameTransaction,
|
|
16936
16940
|
X as optionService,
|
|
16937
16941
|
fc as outlineFontsInSvg,
|
|
16938
16942
|
At as patternImageDataCache,
|
|
16939
16943
|
k as persistenceService,
|
|
16940
|
-
|
|
16944
|
+
jn as pictureStepService,
|
|
16941
16945
|
ec as pmsToRgb,
|
|
16942
|
-
|
|
16946
|
+
Hn as questionStepService,
|
|
16943
16947
|
Zl as registerFetchImplementation,
|
|
16944
16948
|
Xl as registerWindowImplementation,
|
|
16945
16949
|
La as rehydrateSerializedLayout,
|
|
@@ -16947,13 +16951,13 @@ export {
|
|
|
16947
16951
|
re as rotateAroundPoint,
|
|
16948
16952
|
ma as sanitizeSvgTree,
|
|
16949
16953
|
kr as setBearerAuthenticationToken,
|
|
16950
|
-
|
|
16954
|
+
gn as setCanvasModule,
|
|
16951
16955
|
$t as shapeStepService,
|
|
16952
16956
|
is as shortenUrl,
|
|
16953
16957
|
wt as spiffCoreConfiguration,
|
|
16954
16958
|
Ic as stepAspectValuesToDesignInputSteps,
|
|
16955
16959
|
Qa as svgColorValueToDefinition,
|
|
16956
|
-
|
|
16960
|
+
On as svgStringDimensions,
|
|
16957
16961
|
Aa as svgToDataUrl,
|
|
16958
16962
|
q as textStepService,
|
|
16959
16963
|
gs as toast,
|