@spiffcommerce/core 26.22.1 → 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.d.ts +3 -0
- package/dist/index.js +45 -43
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +180 -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}
|
|
@@ -4602,6 +4602,7 @@ const X = new li(), vn = y`
|
|
|
4602
4602
|
width
|
|
4603
4603
|
index
|
|
4604
4604
|
name
|
|
4605
|
+
title
|
|
4605
4606
|
useEditableArea
|
|
4606
4607
|
transparentBackground
|
|
4607
4608
|
previewRegion {
|
|
@@ -4633,6 +4634,7 @@ const X = new li(), vn = y`
|
|
|
4633
4634
|
stepTitle
|
|
4634
4635
|
helpText
|
|
4635
4636
|
mandatory
|
|
4637
|
+
relevantPanelName
|
|
4636
4638
|
silent
|
|
4637
4639
|
conditions {
|
|
4638
4640
|
requiredVariantSelections
|
|
@@ -5047,7 +5049,7 @@ const X = new li(), vn = y`
|
|
|
5047
5049
|
}
|
|
5048
5050
|
}
|
|
5049
5051
|
`, Di = y`
|
|
5050
|
-
${
|
|
5052
|
+
${En}
|
|
5051
5053
|
${Pe}
|
|
5052
5054
|
query GetCurrentIntegration($themeConfigurationId: String) {
|
|
5053
5055
|
currentIntegration {
|
|
@@ -5173,12 +5175,12 @@ const X = new li(), vn = y`
|
|
|
5173
5175
|
);
|
|
5174
5176
|
return i;
|
|
5175
5177
|
};
|
|
5176
|
-
class
|
|
5178
|
+
class Pn {
|
|
5177
5179
|
constructor() {
|
|
5178
5180
|
this.timestamp = Date.now();
|
|
5179
5181
|
}
|
|
5180
5182
|
}
|
|
5181
|
-
class
|
|
5183
|
+
class xn {
|
|
5182
5184
|
/**
|
|
5183
5185
|
* Constructs a new promise queue.
|
|
5184
5186
|
* @param queueMaxSize An optional maximum size, when the max size is hit.
|
|
@@ -5311,7 +5313,7 @@ const Q = () => {
|
|
|
5311
5313
|
{
|
|
5312
5314
|
id: "element-group",
|
|
5313
5315
|
clipPath: a.purpose === Gt.FreeDesign ? "url(#viewboxClip)" : void 0,
|
|
5314
|
-
children: S.map((E) =>
|
|
5316
|
+
children: S.map((E) => Nn(E)).filter((E) => !!E)
|
|
5315
5317
|
}
|
|
5316
5318
|
),
|
|
5317
5319
|
l && /* @__PURE__ */ F(
|
|
@@ -5430,7 +5432,7 @@ const Q = () => {
|
|
|
5430
5432
|
x: (r.x - t.x) * n - (r.y - t.y) * a + t.x,
|
|
5431
5433
|
y: (r.x - t.x) * a + (r.y - t.y) * n + t.y
|
|
5432
5434
|
};
|
|
5433
|
-
}, mc = 0.352778, gc = 0.035277,
|
|
5435
|
+
}, mc = 0.352778, gc = 0.035277, Fn = (r) => {
|
|
5434
5436
|
const t = r.rotation || 0, e = gt(t), a = Math.cos(e), n = -Math.sin(e);
|
|
5435
5437
|
return /* @__PURE__ */ F("g", { mask: r.stepName || r.productOverlay ? void 0 : r.mask, children: /* @__PURE__ */ F(
|
|
5436
5438
|
"g",
|
|
@@ -5452,7 +5454,7 @@ const Q = () => {
|
|
|
5452
5454
|
)
|
|
5453
5455
|
}
|
|
5454
5456
|
) });
|
|
5455
|
-
},
|
|
5457
|
+
}, kn = (r) => {
|
|
5456
5458
|
var l;
|
|
5457
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);
|
|
5458
5460
|
return /* @__PURE__ */ lt(Vt, { children: [
|
|
@@ -5479,7 +5481,7 @@ const Q = () => {
|
|
|
5479
5481
|
height: r.height
|
|
5480
5482
|
}
|
|
5481
5483
|
) : void 0,
|
|
5482
|
-
s.map((c) =>
|
|
5484
|
+
s.map((c) => Nn(c)).filter((c) => !!c).map((c) => /* @__PURE__ */ F("g", { clipPath: `url(#${t})`, children: c }))
|
|
5483
5485
|
]
|
|
5484
5486
|
}
|
|
5485
5487
|
)
|
|
@@ -5559,7 +5561,7 @@ const Q = () => {
|
|
|
5559
5561
|
matrix(${r.scaleX}, 0, 0, ${r.scaleY}, 0, 0)
|
|
5560
5562
|
`,
|
|
5561
5563
|
children: /* @__PURE__ */ F(
|
|
5562
|
-
|
|
5564
|
+
kn,
|
|
5563
5565
|
{
|
|
5564
5566
|
id: t,
|
|
5565
5567
|
x: 0,
|
|
@@ -5576,7 +5578,7 @@ const Q = () => {
|
|
|
5576
5578
|
}
|
|
5577
5579
|
)
|
|
5578
5580
|
] });
|
|
5579
|
-
},
|
|
5581
|
+
}, Mn = /* @__PURE__ */ new Map();
|
|
5580
5582
|
class Oi {
|
|
5581
5583
|
constructor(t) {
|
|
5582
5584
|
this.font = t, this.glyphsFromText = /* @__PURE__ */ new Map(), this.kerningValues = /* @__PURE__ */ new Map(), this.height = this.calculateApproximateHeight();
|
|
@@ -5635,7 +5637,7 @@ const Ui = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
|
|
|
5635
5637
|
return St(r).getFont();
|
|
5636
5638
|
} catch {
|
|
5637
5639
|
if (Ui(r)) {
|
|
5638
|
-
const a =
|
|
5640
|
+
const a = un(r), n = Je(a);
|
|
5639
5641
|
return aa(r, n), n;
|
|
5640
5642
|
} else {
|
|
5641
5643
|
const a = await be(r, !0), n = Je(a);
|
|
@@ -5645,21 +5647,21 @@ const Ui = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
|
|
|
5645
5647
|
})();
|
|
5646
5648
|
return Oe.set(r, e), e;
|
|
5647
5649
|
}, Li = (r) => {
|
|
5648
|
-
const t =
|
|
5650
|
+
const t = un(r), e = Je(t);
|
|
5649
5651
|
return aa(r, e), e;
|
|
5650
5652
|
}, St = (r) => {
|
|
5651
|
-
const t =
|
|
5653
|
+
const t = Mn.get(r);
|
|
5652
5654
|
if (t)
|
|
5653
5655
|
return t;
|
|
5654
5656
|
throw new Error("Font metrics unavailable for font");
|
|
5655
5657
|
}, aa = (r, t) => {
|
|
5656
5658
|
const e = new Oi(t);
|
|
5657
|
-
return
|
|
5659
|
+
return Mn.set(r, e), e;
|
|
5658
5660
|
}, fc = async (r) => {
|
|
5659
5661
|
const t = dt(), e = t.parseFromString(r, "image/svg+xml"), a = e.firstElementChild, n = /* @__PURE__ */ new Map();
|
|
5660
5662
|
a.querySelectorAll("style").forEach((d) => {
|
|
5661
5663
|
var u;
|
|
5662
|
-
(u =
|
|
5664
|
+
(u = nn(d.innerHTML).stylesheet) == null || u.rules.forEach((h) => {
|
|
5663
5665
|
var m, g, f;
|
|
5664
5666
|
if (h.type === "font-face" && h.declarations) {
|
|
5665
5667
|
const p = (m = h.declarations.find(
|
|
@@ -5744,7 +5746,7 @@ const Ui = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
|
|
|
5744
5746
|
throw new Error(`No max width calculated for text: ${o}.`);
|
|
5745
5747
|
return { lines: o, width: l };
|
|
5746
5748
|
}, $i = (r, t, e, a, n, i) => {
|
|
5747
|
-
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;
|
|
5748
5750
|
return Math.min(A, d);
|
|
5749
5751
|
}, Vi = (r, t, e, a) => {
|
|
5750
5752
|
var c;
|
|
@@ -5771,7 +5773,7 @@ const Ui = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
|
|
|
5771
5773
|
}, zi = (r, t, e, a, n) => {
|
|
5772
5774
|
const s = St(t.assetUrl).getFont();
|
|
5773
5775
|
let o = { ...r };
|
|
5774
|
-
const l = { ...r }, c =
|
|
5776
|
+
const l = { ...r }, c = Tn(a, e / s.unitsPerEm, St(t.assetUrl));
|
|
5775
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;
|
|
5776
5778
|
}, Ue = 1, ht = (r, t, e) => {
|
|
5777
5779
|
let a = 0;
|
|
@@ -5791,7 +5793,7 @@ const Ui = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
|
|
|
5791
5793
|
a = Math.max(a, o || 0);
|
|
5792
5794
|
}
|
|
5793
5795
|
}), a *= t, a;
|
|
5794
|
-
},
|
|
5796
|
+
}, Tn = (r, t, e) => {
|
|
5795
5797
|
let a = 0;
|
|
5796
5798
|
return r.forEach((n) => {
|
|
5797
5799
|
a = Math.max(a, ht(n, t, e));
|
|
@@ -5805,7 +5807,7 @@ const Ui = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
|
|
|
5805
5807
|
let a = r || "";
|
|
5806
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(`
|
|
5807
5809
|
`)), a;
|
|
5808
|
-
}, 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 ? {
|
|
5809
5811
|
...r,
|
|
5810
5812
|
...(() => {
|
|
5811
5813
|
if (r.algorithm === kt.Traditional) {
|
|
@@ -5831,7 +5833,7 @@ const Ui = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
|
|
|
5831
5833
|
return null;
|
|
5832
5834
|
const u = () => {
|
|
5833
5835
|
var p;
|
|
5834
|
-
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;
|
|
5835
5837
|
};
|
|
5836
5838
|
return /* @__PURE__ */ lt(Vt, { children: [
|
|
5837
5839
|
/* @__PURE__ */ lt("defs", { children: [
|
|
@@ -5918,14 +5920,14 @@ const Ui = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
|
|
|
5918
5920
|
const s = (r.amountLines - 1) / 2;
|
|
5919
5921
|
return (r.thisLineIdx - s) * n + r.fontSize / 4;
|
|
5920
5922
|
};
|
|
5921
|
-
return /* @__PURE__ */ F("tspan", { textAnchor:
|
|
5923
|
+
return /* @__PURE__ */ F("tspan", { textAnchor: Qn(r.align), x: e(), y: `${a()}px`, children: r.text });
|
|
5922
5924
|
}, Yi = (r) => {
|
|
5923
5925
|
const t = `#${r.curvedPathId}`;
|
|
5924
5926
|
return /* @__PURE__ */ F(
|
|
5925
5927
|
"textPath",
|
|
5926
5928
|
{
|
|
5927
5929
|
startOffset: (() => r.align === "left" ? "0%" : r.align === "right" ? "100%" : "50%")(),
|
|
5928
|
-
textAnchor:
|
|
5930
|
+
textAnchor: Qn(r.align),
|
|
5929
5931
|
href: t,
|
|
5930
5932
|
xlinkHref: t,
|
|
5931
5933
|
children: r.text
|
|
@@ -5935,7 +5937,7 @@ const Ui = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
|
|
|
5935
5937
|
var s, o;
|
|
5936
5938
|
if (r.cachedObjectURL && !((s = r._renderingConfiguration) != null && s.omitCachedFields))
|
|
5937
5939
|
return /* @__PURE__ */ F(
|
|
5938
|
-
|
|
5940
|
+
Fn,
|
|
5939
5941
|
{
|
|
5940
5942
|
id: r.id,
|
|
5941
5943
|
src: r.cachedObjectURL,
|
|
@@ -6042,7 +6044,10 @@ class Ki {
|
|
|
6042
6044
|
layout: t,
|
|
6043
6045
|
elements: e
|
|
6044
6046
|
},
|
|
6045
|
-
getComponentWithProps: (a) =>
|
|
6047
|
+
getComponentWithProps: (a) => {
|
|
6048
|
+
const n = wa(t, e, a);
|
|
6049
|
+
return n && console.log(an(n)), n;
|
|
6050
|
+
}
|
|
6046
6051
|
};
|
|
6047
6052
|
}
|
|
6048
6053
|
initialize(t, e) {
|
|
@@ -6057,7 +6062,7 @@ class Ki {
|
|
|
6057
6062
|
layouts: {}
|
|
6058
6063
|
};
|
|
6059
6064
|
t.forEach((n) => {
|
|
6060
|
-
a = new
|
|
6065
|
+
a = new Ln(n).apply(a);
|
|
6061
6066
|
}), this.runStateCallbacks(), this.state = {
|
|
6062
6067
|
transaction: a
|
|
6063
6068
|
};
|
|
@@ -6067,7 +6072,7 @@ class Ki {
|
|
|
6067
6072
|
return { ...t, transaction: e.apply(a) };
|
|
6068
6073
|
}
|
|
6069
6074
|
}
|
|
6070
|
-
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) => {
|
|
6071
6076
|
const a = e.renderingConfiguration, n = a != null && a.removeExcludedElements ? t.filter((i) => !i.excludeFromExport) : t;
|
|
6072
6077
|
return /* @__PURE__ */ F(
|
|
6073
6078
|
Ni,
|
|
@@ -6117,7 +6122,7 @@ const te = (r) => {
|
|
|
6117
6122
|
if (r.defaultVariant !== void 0)
|
|
6118
6123
|
return t.find((e) => e.id === r.defaultVariant);
|
|
6119
6124
|
}
|
|
6120
|
-
}, 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) => {
|
|
6121
6126
|
if (!t) {
|
|
6122
6127
|
if (!r)
|
|
6123
6128
|
throw new Error("No region or src supplied. Cannot construct frame!");
|
|
@@ -6194,7 +6199,7 @@ const te = (r) => {
|
|
|
6194
6199
|
if (At.has(r))
|
|
6195
6200
|
return At.get(r);
|
|
6196
6201
|
if (r.startsWith("data:image/svg+xml")) {
|
|
6197
|
-
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 = {
|
|
6198
6203
|
src: r,
|
|
6199
6204
|
width: i.width,
|
|
6200
6205
|
height: i.height,
|
|
@@ -6225,8 +6230,8 @@ const te = (r) => {
|
|
|
6225
6230
|
}
|
|
6226
6231
|
}, va = async (r) => {
|
|
6227
6232
|
const t = await at(r);
|
|
6228
|
-
return
|
|
6229
|
-
}, 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) => {
|
|
6230
6235
|
const a = dt().parseFromString(r, "image/svg+xml").querySelector("svg");
|
|
6231
6236
|
if (!a)
|
|
6232
6237
|
throw new Error("No svg tag found, this svg must be malformed!");
|
|
@@ -6240,7 +6245,7 @@ const te = (r) => {
|
|
|
6240
6245
|
}, Ot = (r, t) => {
|
|
6241
6246
|
const e = r.layoutState.elements.filter((n) => n.layer === t), a = Math.max(...e.map((n) => n.layerIndex).filter((n) => n !== void 0));
|
|
6242
6247
|
return Math.max(a, 0) + 1;
|
|
6243
|
-
},
|
|
6248
|
+
}, Un = async (r) => new Promise((t) => {
|
|
6244
6249
|
at(r).then((e) => {
|
|
6245
6250
|
t(e);
|
|
6246
6251
|
}).catch((e) => console.error(e));
|
|
@@ -6294,7 +6299,7 @@ const te = (r) => {
|
|
|
6294
6299
|
panelId: r.layoutState.layout.panelId
|
|
6295
6300
|
};
|
|
6296
6301
|
if (e && t === T.Illustration) {
|
|
6297
|
-
const l = await ot(await
|
|
6302
|
+
const l = await ot(await Un(e)), u = dt().parseFromString(l.svg, "image/svg+xml").firstElementChild.getAttribute("viewBox");
|
|
6298
6303
|
if (!u)
|
|
6299
6304
|
throw new Error("SVG missing viewBox.");
|
|
6300
6305
|
const h = o.height, m = u.split(" "), g = parseFloat(m[2]) || 1, f = parseFloat(m[3]) || 1, p = g / f;
|
|
@@ -6313,7 +6318,7 @@ const te = (r) => {
|
|
|
6313
6318
|
};
|
|
6314
6319
|
class pc {
|
|
6315
6320
|
static async getFrame(t, e) {
|
|
6316
|
-
const a = await
|
|
6321
|
+
const a = await Rn(e.region, e.src), n = await xe(a), i = e.region || await Ut(t, T.Frame);
|
|
6317
6322
|
return {
|
|
6318
6323
|
id: Q(),
|
|
6319
6324
|
x: i.left,
|
|
@@ -6447,7 +6452,7 @@ class pc {
|
|
|
6447
6452
|
};
|
|
6448
6453
|
}
|
|
6449
6454
|
static async getIllustration(t, e) {
|
|
6450
|
-
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();
|
|
6451
6456
|
return {
|
|
6452
6457
|
cachedObjectURL: i,
|
|
6453
6458
|
stepRegion: e.region,
|
|
@@ -6641,7 +6646,7 @@ class O extends R {
|
|
|
6641
6646
|
return this.oldState = t, this.commands.reduce((e, a) => a.apply(e), t);
|
|
6642
6647
|
}
|
|
6643
6648
|
}
|
|
6644
|
-
class
|
|
6649
|
+
class Ln extends R {
|
|
6645
6650
|
constructor(t) {
|
|
6646
6651
|
super(), this.layout = t;
|
|
6647
6652
|
}
|
|
@@ -7262,7 +7267,7 @@ const is = async (r) => {
|
|
|
7262
7267
|
throw console.error(e), new Be("Failed to shorten URL, see console.");
|
|
7263
7268
|
}
|
|
7264
7269
|
};
|
|
7265
|
-
class
|
|
7270
|
+
class $n {
|
|
7266
7271
|
async poll() {
|
|
7267
7272
|
try {
|
|
7268
7273
|
if (await this.predicate()) {
|
|
@@ -7309,7 +7314,7 @@ class ss {
|
|
|
7309
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;
|
|
7310
7315
|
return { asset: h, link: m };
|
|
7311
7316
|
}, s = await new Promise((h, m) => {
|
|
7312
|
-
new
|
|
7317
|
+
new $n(
|
|
7313
7318
|
async () => !!(await i()).link,
|
|
7314
7319
|
async () => {
|
|
7315
7320
|
const g = await i();
|
|
@@ -7349,7 +7354,7 @@ class ss {
|
|
|
7349
7354
|
return t.data.regions.map(e);
|
|
7350
7355
|
}
|
|
7351
7356
|
async command(t, e, a, n) {
|
|
7352
|
-
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) => {
|
|
7353
7358
|
const d = c.region, A = i.find((u) => u.panelId === (d == null ? void 0 : d.panelId));
|
|
7354
7359
|
if (!A && d)
|
|
7355
7360
|
throw new Y(d);
|
|
@@ -7377,7 +7382,7 @@ class ss {
|
|
|
7377
7382
|
} };
|
|
7378
7383
|
}
|
|
7379
7384
|
}
|
|
7380
|
-
const
|
|
7385
|
+
const Vn = new ss();
|
|
7381
7386
|
class we {
|
|
7382
7387
|
constructor() {
|
|
7383
7388
|
this.frameSourceSvg = async (t, e) => {
|
|
@@ -7499,7 +7504,7 @@ class we {
|
|
|
7499
7504
|
const o = e.fileLink || "";
|
|
7500
7505
|
return o.endsWith(".pdf") || o.endsWith(".eps") || o.endsWith(".ai") ? new Promise((c) => {
|
|
7501
7506
|
a.addPoller(
|
|
7502
|
-
new
|
|
7507
|
+
new $n(
|
|
7503
7508
|
async () => {
|
|
7504
7509
|
var h;
|
|
7505
7510
|
const A = (h = (await U.getFromServer(e.key || "")).versions) == null ? void 0 : h.find((m) => m.name === "svg");
|
|
@@ -8090,7 +8095,7 @@ class ls {
|
|
|
8090
8095
|
};
|
|
8091
8096
|
}
|
|
8092
8097
|
}
|
|
8093
|
-
const
|
|
8098
|
+
const zn = new ls();
|
|
8094
8099
|
class cs {
|
|
8095
8100
|
async init(t, e, a) {
|
|
8096
8101
|
const n = t.option;
|
|
@@ -8176,7 +8181,7 @@ class cs {
|
|
|
8176
8181
|
};
|
|
8177
8182
|
}
|
|
8178
8183
|
}
|
|
8179
|
-
const
|
|
8184
|
+
const Gn = new cs();
|
|
8180
8185
|
class ds {
|
|
8181
8186
|
async init(t, e, a) {
|
|
8182
8187
|
if (a)
|
|
@@ -8289,7 +8294,7 @@ class ds {
|
|
|
8289
8294
|
return n(""), { input: e, helperData: {} };
|
|
8290
8295
|
}
|
|
8291
8296
|
}
|
|
8292
|
-
const
|
|
8297
|
+
const Wn = new ds();
|
|
8293
8298
|
class As {
|
|
8294
8299
|
async init(t, e, a) {
|
|
8295
8300
|
const n = t.option;
|
|
@@ -8381,7 +8386,7 @@ class As {
|
|
|
8381
8386
|
};
|
|
8382
8387
|
}
|
|
8383
8388
|
}
|
|
8384
|
-
const
|
|
8389
|
+
const jn = new As();
|
|
8385
8390
|
class us {
|
|
8386
8391
|
async init(t, e, a) {
|
|
8387
8392
|
const n = t.option;
|
|
@@ -8440,7 +8445,7 @@ class us {
|
|
|
8440
8445
|
};
|
|
8441
8446
|
}
|
|
8442
8447
|
}
|
|
8443
|
-
const
|
|
8448
|
+
const Hn = new us();
|
|
8444
8449
|
class hs {
|
|
8445
8450
|
constructor() {
|
|
8446
8451
|
this.shapeFillId = "spiff-fill-shape";
|
|
@@ -9454,7 +9459,7 @@ class Is extends Cs {
|
|
|
9454
9459
|
return Es(f, C, e.height, e.width, 0.35, 0.65), vs(u.outerHTML);
|
|
9455
9460
|
}
|
|
9456
9461
|
}
|
|
9457
|
-
async function
|
|
9462
|
+
async function qn(r) {
|
|
9458
9463
|
if (r === "Vegemite")
|
|
9459
9464
|
return new Is();
|
|
9460
9465
|
throw new z(`Failed to resolve Module, Module ${r} not found`);
|
|
@@ -10002,7 +10007,7 @@ const xs = y`
|
|
|
10002
10007
|
`;
|
|
10003
10008
|
var Me = /* @__PURE__ */ ((r) => (r.Error = "Error", r.Warning = "Warning", r.Info = "Info", r))(Me || {});
|
|
10004
10009
|
const to = 1e3;
|
|
10005
|
-
class ja extends
|
|
10010
|
+
class ja extends Pn {
|
|
10006
10011
|
constructor(t) {
|
|
10007
10012
|
super(), this.createdAt = /* @__PURE__ */ new Date(), this.update = t;
|
|
10008
10013
|
}
|
|
@@ -10016,7 +10021,7 @@ class ja extends Dn {
|
|
|
10016
10021
|
}
|
|
10017
10022
|
class eo {
|
|
10018
10023
|
constructor(t, e, a, n, i, s, o, l, c, d, A, u, h = !1, m, g = !1, f = !1, p = !1) {
|
|
10019
|
-
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 = () => {
|
|
10020
10025
|
var v;
|
|
10021
10026
|
if (!this.previewService)
|
|
10022
10027
|
return;
|
|
@@ -10306,7 +10311,7 @@ class eo {
|
|
|
10306
10311
|
...this.storage,
|
|
10307
10312
|
[t]: { ...this.storage[t], ...e }
|
|
10308
10313
|
};
|
|
10309
|
-
if (!
|
|
10314
|
+
if (!sn(a, this.storage)) {
|
|
10310
10315
|
this.storage = a;
|
|
10311
10316
|
const n = new $a(this.constructSerializableWorkflow());
|
|
10312
10317
|
this.commandContext.apply(n, !0), this.onStepSpecificStorageChange(t), this.onStorageChange();
|
|
@@ -10547,7 +10552,7 @@ class eo {
|
|
|
10547
10552
|
switch (this.stepInitialised[l.stepName] = !0, l.type) {
|
|
10548
10553
|
case D.DigitalContent:
|
|
10549
10554
|
a.push(
|
|
10550
|
-
|
|
10555
|
+
Vn.init(
|
|
10551
10556
|
l,
|
|
10552
10557
|
this,
|
|
10553
10558
|
this.reloadedState
|
|
@@ -10566,27 +10571,27 @@ class eo {
|
|
|
10566
10571
|
break;
|
|
10567
10572
|
case D.Material:
|
|
10568
10573
|
a.push(
|
|
10569
|
-
|
|
10574
|
+
zn.init(l, this, this.reloadedState)
|
|
10570
10575
|
);
|
|
10571
10576
|
break;
|
|
10572
10577
|
case D.Model:
|
|
10573
|
-
a.push(
|
|
10578
|
+
a.push(Gn.init(l, this, this.reloadedState));
|
|
10574
10579
|
break;
|
|
10575
10580
|
case D.Module:
|
|
10576
10581
|
this.stepSpecificServices[l.stepName] = {
|
|
10577
|
-
module: await
|
|
10582
|
+
module: await qn(l.data.module)
|
|
10578
10583
|
}, a.push(
|
|
10579
|
-
|
|
10584
|
+
Wn.init(l, this, this.reloadedState)
|
|
10580
10585
|
);
|
|
10581
10586
|
break;
|
|
10582
10587
|
case D.Picture:
|
|
10583
10588
|
a.push(
|
|
10584
|
-
|
|
10589
|
+
jn.init(l, this, this.reloadedState)
|
|
10585
10590
|
);
|
|
10586
10591
|
break;
|
|
10587
10592
|
case D.Question:
|
|
10588
10593
|
a.push(
|
|
10589
|
-
|
|
10594
|
+
Hn.init(l, this, this.reloadedState)
|
|
10590
10595
|
);
|
|
10591
10596
|
break;
|
|
10592
10597
|
case D.Shape:
|
|
@@ -10739,7 +10744,7 @@ class it {
|
|
|
10739
10744
|
return this.variantData.enabled;
|
|
10740
10745
|
}
|
|
10741
10746
|
}
|
|
10742
|
-
const
|
|
10747
|
+
const Yn = class sa {
|
|
10743
10748
|
constructor(t, e, a) {
|
|
10744
10749
|
this.manager = t, this.step = e, this.tags = a;
|
|
10745
10750
|
}
|
|
@@ -10870,8 +10875,8 @@ const qn = class sa {
|
|
|
10870
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.");
|
|
10871
10876
|
}
|
|
10872
10877
|
};
|
|
10873
|
-
|
|
10874
|
-
let rt =
|
|
10878
|
+
Yn.updateState = /* @__PURE__ */ new Map();
|
|
10879
|
+
let rt = Yn;
|
|
10875
10880
|
class ao extends rt {
|
|
10876
10881
|
constructor(t, e, a) {
|
|
10877
10882
|
super(t, e, a);
|
|
@@ -10955,7 +10960,7 @@ class no extends rt {
|
|
|
10955
10960
|
super(t, e, a);
|
|
10956
10961
|
}
|
|
10957
10962
|
selectVariant(t) {
|
|
10958
|
-
return
|
|
10963
|
+
return zn.selectVariant(
|
|
10959
10964
|
this.step,
|
|
10960
10965
|
t.getResource(),
|
|
10961
10966
|
this.manager,
|
|
@@ -10968,7 +10973,7 @@ class ro extends rt {
|
|
|
10968
10973
|
super(t, e, a);
|
|
10969
10974
|
}
|
|
10970
10975
|
selectVariant(t) {
|
|
10971
|
-
return
|
|
10976
|
+
return Gn.selectVariant(
|
|
10972
10977
|
this.step,
|
|
10973
10978
|
t.getResource(),
|
|
10974
10979
|
this.manager,
|
|
@@ -10986,7 +10991,7 @@ class io extends rt {
|
|
|
10986
10991
|
* @returns A promise that can be awaited to ensure the new image asset has been updated on the design.
|
|
10987
10992
|
*/
|
|
10988
10993
|
selectVariant(t) {
|
|
10989
|
-
return
|
|
10994
|
+
return jn.selectVariant(
|
|
10990
10995
|
this.step,
|
|
10991
10996
|
t.getResource(),
|
|
10992
10997
|
this.manager,
|
|
@@ -11001,7 +11006,7 @@ class so extends rt {
|
|
|
11001
11006
|
async selectVariant(t) {
|
|
11002
11007
|
if (!t.getId())
|
|
11003
11008
|
throw new Error("Unable to select variant with a null ID");
|
|
11004
|
-
await
|
|
11009
|
+
await Hn.selectVariant(this.step, t.getId(), this.manager);
|
|
11005
11010
|
}
|
|
11006
11011
|
/**
|
|
11007
11012
|
* The way that this step expects to be rendered.
|
|
@@ -11299,7 +11304,7 @@ class Ao extends rt {
|
|
|
11299
11304
|
* @returns The final URL string for the QR code.
|
|
11300
11305
|
*/
|
|
11301
11306
|
async selectVideo(t) {
|
|
11302
|
-
return
|
|
11307
|
+
return Vn.regenerateQRCode(
|
|
11303
11308
|
this.manager.getRegionElements(this.step.stepName),
|
|
11304
11309
|
t.key,
|
|
11305
11310
|
this.manager,
|
|
@@ -11337,7 +11342,7 @@ class uo extends rt {
|
|
|
11337
11342
|
return ((t = this.manager.getStepStorage(this.step.stepName)) == null ? void 0 : t.text) || "";
|
|
11338
11343
|
}
|
|
11339
11344
|
setText(t) {
|
|
11340
|
-
|
|
11345
|
+
Wn.changeText(this.step, t, this.manager, (e) => {
|
|
11341
11346
|
if (e) {
|
|
11342
11347
|
const a = [
|
|
11343
11348
|
...this.manager.getInformationResults(),
|
|
@@ -11385,7 +11390,7 @@ class ie {
|
|
|
11385
11390
|
}
|
|
11386
11391
|
}
|
|
11387
11392
|
}
|
|
11388
|
-
const
|
|
11393
|
+
const Jn = y`
|
|
11389
11394
|
fragment CreateDesignTransaction on Transaction {
|
|
11390
11395
|
id
|
|
11391
11396
|
designName
|
|
@@ -11411,7 +11416,7 @@ const Yn = y`
|
|
|
11411
11416
|
}
|
|
11412
11417
|
}
|
|
11413
11418
|
`, ho = y`
|
|
11414
|
-
${
|
|
11419
|
+
${Jn}
|
|
11415
11420
|
mutation CreateDesign(
|
|
11416
11421
|
$name: String!
|
|
11417
11422
|
$layouts: [LayoutInput]!
|
|
@@ -11443,7 +11448,7 @@ const Yn = y`
|
|
|
11443
11448
|
}
|
|
11444
11449
|
}
|
|
11445
11450
|
`, mo = y`
|
|
11446
|
-
${
|
|
11451
|
+
${Jn}
|
|
11447
11452
|
mutation CreateDesigns($inputs: [DesignCreateInput]!) {
|
|
11448
11453
|
designCreateMany(inputs: $inputs) {
|
|
11449
11454
|
id
|
|
@@ -11561,7 +11566,7 @@ const go = async (r) => {
|
|
|
11561
11566
|
});
|
|
11562
11567
|
}
|
|
11563
11568
|
return n;
|
|
11564
|
-
},
|
|
11569
|
+
}, Kn = (r, t, e, a, n, i, s, o) => {
|
|
11565
11570
|
var m, g;
|
|
11566
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 = {
|
|
11567
11572
|
additionalExternalProductId: (m = r.integrationProduct) == null ? void 0 : m.additionalExternalProductId,
|
|
@@ -11585,7 +11590,7 @@ const go = async (r) => {
|
|
|
11585
11590
|
workflowViewerReadOnlyLink: r.workflowViewerReadOnlyLink || ""
|
|
11586
11591
|
};
|
|
11587
11592
|
return i && (h.metadata = i), a && (h.selectedVariants = a), n && (h.sku = n), h;
|
|
11588
|
-
},
|
|
11593
|
+
}, _n = async (r, t, e, a, n, i, s, o, l, c) => {
|
|
11589
11594
|
var I;
|
|
11590
11595
|
await (async () => {
|
|
11591
11596
|
var j;
|
|
@@ -11593,7 +11598,7 @@ const go = async (r) => {
|
|
|
11593
11598
|
return c;
|
|
11594
11599
|
await r.outstandingRequestsPromise();
|
|
11595
11600
|
const x = (k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(n.id), N = await b.getShadowGraphqlClient().query({
|
|
11596
|
-
query:
|
|
11601
|
+
query: In,
|
|
11597
11602
|
variables: { ids: [n.id] },
|
|
11598
11603
|
fetchPolicy: "no-cache",
|
|
11599
11604
|
errorPolicy: "all",
|
|
@@ -11682,7 +11687,7 @@ const go = async (r) => {
|
|
|
11682
11687
|
}, Co = async (r, t, e, a, n, i, s, o, l, c, d) => {
|
|
11683
11688
|
var p, C;
|
|
11684
11689
|
l("workflow.steps.finish.finalize.buildingLayouts");
|
|
11685
|
-
const { designDetails: A, cartSelectionsWithPrices: u, cartMetadata: h } = await
|
|
11690
|
+
const { designDetails: A, cartSelectionsWithPrices: u, cartMetadata: h } = await _n(
|
|
11686
11691
|
r,
|
|
11687
11692
|
t,
|
|
11688
11693
|
e,
|
|
@@ -11699,7 +11704,7 @@ const go = async (r) => {
|
|
|
11699
11704
|
throw new Error("Failed to create design");
|
|
11700
11705
|
l("workflow.steps.finish.finalize.updatingTransaction");
|
|
11701
11706
|
const f = m.transaction;
|
|
11702
|
-
return
|
|
11707
|
+
return Kn(
|
|
11703
11708
|
f,
|
|
11704
11709
|
n,
|
|
11705
11710
|
t,
|
|
@@ -11718,7 +11723,7 @@ const go = async (r) => {
|
|
|
11718
11723
|
const n = await (async () => {
|
|
11719
11724
|
var c;
|
|
11720
11725
|
const l = await b.getShadowGraphqlClient().query({
|
|
11721
|
-
query:
|
|
11726
|
+
query: In,
|
|
11722
11727
|
variables: { ids: r.map((d) => d.transaction.id) },
|
|
11723
11728
|
fetchPolicy: "no-cache",
|
|
11724
11729
|
errorPolicy: "all"
|
|
@@ -11727,7 +11732,7 @@ const go = async (r) => {
|
|
|
11727
11732
|
l.errors && console.log("Server Error:", d.message);
|
|
11728
11733
|
}), null) : (c = l.data) != null && c.transactions ? l.data.transactions.map((d) => d.workflowState ?? null) : null;
|
|
11729
11734
|
})(), i = await Promise.all(
|
|
11730
|
-
r.map(async (o, l) => await
|
|
11735
|
+
r.map(async (o, l) => await _n(
|
|
11731
11736
|
o.workflowManager,
|
|
11732
11737
|
o.workflow,
|
|
11733
11738
|
o.layouts,
|
|
@@ -11747,7 +11752,7 @@ const go = async (r) => {
|
|
|
11747
11752
|
return t("workflow.steps.finish.finalize.updatingTransaction"), s.map((o, l) => {
|
|
11748
11753
|
var u;
|
|
11749
11754
|
const c = r[l], d = i[l], A = o.transaction;
|
|
11750
|
-
return
|
|
11755
|
+
return Kn(
|
|
11751
11756
|
A,
|
|
11752
11757
|
c.product,
|
|
11753
11758
|
c.workflow,
|
|
@@ -11879,7 +11884,7 @@ var Bo = /* @__PURE__ */ ((r) => (r.QuantityChanged = "QuantityChanged", r.Price
|
|
|
11879
11884
|
class bo {
|
|
11880
11885
|
constructor(t, e) {
|
|
11881
11886
|
var n;
|
|
11882
|
-
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 () => {
|
|
11883
11888
|
await je.getSavedDesignByTransaction(
|
|
11884
11889
|
this.getWorkflowManager().getTransaction().id
|
|
11885
11890
|
) && this.save();
|
|
@@ -12016,7 +12021,7 @@ class bo {
|
|
|
12016
12021
|
purpose: Gt.Print,
|
|
12017
12022
|
region: { left: A.x, top: A.y, width: A.width, height: A.height }
|
|
12018
12023
|
}
|
|
12019
|
-
}), g =
|
|
12024
|
+
}), g = An(m);
|
|
12020
12025
|
await (await ca.from(h, g, {
|
|
12021
12026
|
anonymousCrossOrigin: !0,
|
|
12022
12027
|
ignoreDimensions: !1,
|
|
@@ -12331,7 +12336,7 @@ const Io = [
|
|
|
12331
12336
|
], Do = async (r, t, e) => {
|
|
12332
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);
|
|
12333
12338
|
o.searchParams.append("video", ka(JSON.stringify([{ href: i }]))), o.pathname = o.pathname + (o.pathname.slice(-1) === "/" ? "" : "/");
|
|
12334
|
-
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) => {
|
|
12335
12340
|
const m = r.find((f) => f.panelId === h.panelId);
|
|
12336
12341
|
if (!m)
|
|
12337
12342
|
throw new Y(h);
|
|
@@ -12362,7 +12367,7 @@ const Io = [
|
|
|
12362
12367
|
o && (t[a.stepName] = { selectedVariants: [o] });
|
|
12363
12368
|
const l = async (c) => {
|
|
12364
12369
|
var g;
|
|
12365
|
-
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);
|
|
12366
12371
|
if (!h)
|
|
12367
12372
|
throw new Y(c);
|
|
12368
12373
|
const m = Sa(
|
|
@@ -12483,7 +12488,7 @@ const Io = [
|
|
|
12483
12488
|
return console.error(E), [];
|
|
12484
12489
|
}
|
|
12485
12490
|
}, Fo = async (r, t, e) => {
|
|
12486
|
-
const a = await
|
|
12491
|
+
const a = await qn(e.data.module), n = t.data, i = (o, l) => {
|
|
12487
12492
|
const c = r.find((A) => A.panelId === l.panelId);
|
|
12488
12493
|
if (!c)
|
|
12489
12494
|
throw new Y(l);
|
|
@@ -12860,7 +12865,7 @@ const Uo = () => new Promise((r, t) => {
|
|
|
12860
12865
|
}), Lo = Uo();
|
|
12861
12866
|
class $o {
|
|
12862
12867
|
constructor(t, e, a, n) {
|
|
12863
|
-
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;
|
|
12864
12869
|
}
|
|
12865
12870
|
getID() {
|
|
12866
12871
|
return this.id;
|
|
@@ -12926,7 +12931,7 @@ class $o {
|
|
|
12926
12931
|
);
|
|
12927
12932
|
}
|
|
12928
12933
|
}
|
|
12929
|
-
class Vo extends
|
|
12934
|
+
class Vo extends Pn {
|
|
12930
12935
|
// TODO: Do we need to pass this whole array in?
|
|
12931
12936
|
constructor(t, e, a, n, i) {
|
|
12932
12937
|
super(), this.layoutId = t, this.ctx = e, this.nonPOTSupport = a, this.onRender = n, this.layouts = i;
|
|
@@ -12979,7 +12984,7 @@ class Vo extends Dn {
|
|
|
12979
12984
|
l = i.width, c = i.height;
|
|
12980
12985
|
const d = wa(t.layoutState.layout, e, {
|
|
12981
12986
|
renderingConfiguration: { purpose: Gt.ThreeD }
|
|
12982
|
-
}), A =
|
|
12987
|
+
}), A = An(d), u = await ca.from(this.ctx, A, {
|
|
12983
12988
|
anonymousCrossOrigin: !0,
|
|
12984
12989
|
ignoreDimensions: !this.nonPOTSupport,
|
|
12985
12990
|
ignoreAnimation: !0,
|
|
@@ -13010,7 +13015,7 @@ const Ic = (r, t) => {
|
|
|
13010
13015
|
serializableWorkflow: { steps: [] },
|
|
13011
13016
|
layouts: {}
|
|
13012
13017
|
};
|
|
13013
|
-
n = new O(e.map((l) => new
|
|
13018
|
+
n = new O(e.map((l) => new Ln(l))).apply(n);
|
|
13014
13019
|
const s = await Ro(r, t, e, a);
|
|
13015
13020
|
return new O(s).apply(n);
|
|
13016
13021
|
};
|
|
@@ -13068,7 +13073,7 @@ class zo {
|
|
|
13068
13073
|
);
|
|
13069
13074
|
case et.Option: {
|
|
13070
13075
|
const e = t.entityId ? await X.getOption(t.entityId) : void 0;
|
|
13071
|
-
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);
|
|
13072
13077
|
}
|
|
13073
13078
|
case et.Text:
|
|
13074
13079
|
return new Wo(this.bundle, t);
|
|
@@ -13402,7 +13407,7 @@ class Wo extends Ba {
|
|
|
13402
13407
|
await Promise.all(n);
|
|
13403
13408
|
}
|
|
13404
13409
|
}
|
|
13405
|
-
class
|
|
13410
|
+
class Xn extends Ba {
|
|
13406
13411
|
constructor(t, e, a) {
|
|
13407
13412
|
super(t, e), this.optionResource = a;
|
|
13408
13413
|
}
|
|
@@ -13477,7 +13482,7 @@ class _n extends Ba {
|
|
|
13477
13482
|
await Promise.all(n);
|
|
13478
13483
|
}
|
|
13479
13484
|
}
|
|
13480
|
-
class Ha extends
|
|
13485
|
+
class Ha extends Xn {
|
|
13481
13486
|
constructor(t, e, a) {
|
|
13482
13487
|
super(t, e, a);
|
|
13483
13488
|
}
|
|
@@ -14989,9 +14994,9 @@ class Pc extends ba {
|
|
|
14989
14994
|
super(`"${t}"`);
|
|
14990
14995
|
}
|
|
14991
14996
|
}
|
|
14992
|
-
class
|
|
14997
|
+
class Zn extends ba {
|
|
14993
14998
|
constructor(t, e) {
|
|
14994
|
-
if (e !== "Asset" && !
|
|
14999
|
+
if (e !== "Asset" && !Zn.validUUID(t))
|
|
14995
15000
|
throw new Error("Invalid ID, must be a valid v4 UUID. https://www.uuidgenerator.net/");
|
|
14996
15001
|
super(`{"isSpiffObject": true, "id": "${t}", "type": "${e}"}`);
|
|
14997
15002
|
}
|
|
@@ -15179,7 +15184,7 @@ const Ya = y`
|
|
|
15179
15184
|
if (!a)
|
|
15180
15185
|
throw new Error(`Workflow not found: ${r}`);
|
|
15181
15186
|
return a;
|
|
15182
|
-
},
|
|
15187
|
+
}, tr = async (r, t) => {
|
|
15183
15188
|
const e = r.map((o) => Ht.get({ id: o, options: t })), a = r.filter((o, l) => e[l] === void 0);
|
|
15184
15189
|
if (a.length === 0)
|
|
15185
15190
|
return Promise.all(e);
|
|
@@ -15187,10 +15192,11 @@ const Ya = y`
|
|
|
15187
15192
|
(o) => Ht.set({ id: o, options: t }, Al(o, n))
|
|
15188
15193
|
), s = e.filter((o) => o !== void 0);
|
|
15189
15194
|
return await Promise.all(s.concat(i));
|
|
15190
|
-
}, 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) => ({
|
|
15191
15196
|
id: Q(),
|
|
15192
15197
|
panelId: t.name,
|
|
15193
15198
|
name: t.name,
|
|
15199
|
+
title: t.title,
|
|
15194
15200
|
index: t.index,
|
|
15195
15201
|
createdAt: /* @__PURE__ */ new Date(),
|
|
15196
15202
|
updatedAt: /* @__PURE__ */ new Date(),
|
|
@@ -15215,7 +15221,7 @@ class kc {
|
|
|
15215
15221
|
} catch (a) {
|
|
15216
15222
|
throw console.error(a), new ut("Critical - Unable to synchronize workflow state with server.");
|
|
15217
15223
|
}
|
|
15218
|
-
}, 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("------------------------");
|
|
15219
15225
|
}
|
|
15220
15226
|
configure(t) {
|
|
15221
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();
|
|
@@ -15719,7 +15725,7 @@ class kc {
|
|
|
15719
15725
|
), c = Da(o, 10), d = Da(l, 10), A = (await Promise.all([
|
|
15720
15726
|
...c.map(n),
|
|
15721
15727
|
...d.map(i)
|
|
15722
|
-
])).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) => {
|
|
15723
15729
|
var j;
|
|
15724
15730
|
const { transaction: B, workflowId: E, readOnly: I, index: P } = S, x = m.get(E), M = t[P];
|
|
15725
15731
|
!g.get(B.id) && B.transactionOwnerId && g.set(B.id, B.transactionOwnerId);
|
|
@@ -15897,7 +15903,7 @@ function le(r, t, e) {
|
|
|
15897
15903
|
}
|
|
15898
15904
|
class fl {
|
|
15899
15905
|
constructor(t, e) {
|
|
15900
|
-
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 = {
|
|
15901
15907
|
useThreshold: !1,
|
|
15902
15908
|
invertThreshold: !1,
|
|
15903
15909
|
threshold: 128,
|
|
@@ -15918,7 +15924,7 @@ class fl {
|
|
|
15918
15924
|
let i = !1;
|
|
15919
15925
|
for (let s = 0; s < n.currentFrameSources.length; s++) {
|
|
15920
15926
|
const o = n.currentFrameSources[s], l = await xe(o), c = this.frameData ? this.frameData[s] : void 0;
|
|
15921
|
-
|
|
15927
|
+
sn(l, c) || (this.frameData || (this.frameData = new Array(n.currentFrameSources.length)), this.frameData[s] = l, i = !0);
|
|
15922
15928
|
}
|
|
15923
15929
|
i && (this.onFrameDataChangeListeners.forEach(
|
|
15924
15930
|
(s) => s(this.frameData)
|
|
@@ -16724,9 +16730,9 @@ K = { __e: function(r, t, e, a) {
|
|
|
16724
16730
|
}
|
|
16725
16731
|
throw r;
|
|
16726
16732
|
} }, typeof Promise == "function" && Promise.prototype.then.bind(Promise.resolve());
|
|
16727
|
-
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;
|
|
16728
16734
|
function xl() {
|
|
16729
|
-
for (var r; r =
|
|
16735
|
+
for (var r; r = er.shift(); )
|
|
16730
16736
|
if (r.__P && r.__H)
|
|
16731
16737
|
try {
|
|
16732
16738
|
r.__H.__h.forEach(ue), r.__H.__h.forEach(la), r.__H.__h = [];
|
|
@@ -16745,7 +16751,7 @@ K.__b = function(r) {
|
|
|
16745
16751
|
}, K.diffed = function(r) {
|
|
16746
16752
|
Xa && Xa(r);
|
|
16747
16753
|
var t = r.__c;
|
|
16748
|
-
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) {
|
|
16749
16755
|
e.i && (e.__H = e.i), e.__V !== Ye && (e.__ = e.__V), e.i = void 0, e.__V = Ye;
|
|
16750
16756
|
})), qe = st = null;
|
|
16751
16757
|
}, K.__c = function(r, t) {
|
|
@@ -16803,7 +16809,7 @@ export {
|
|
|
16803
16809
|
Pl as ConversionDataType,
|
|
16804
16810
|
Dl as ConversionLocation,
|
|
16805
16811
|
W as CreateElementCommand,
|
|
16806
|
-
|
|
16812
|
+
Ln as CreateLayoutCommand,
|
|
16807
16813
|
vt as DeleteElementCommand,
|
|
16808
16814
|
Ao as DigitalContentStepHandle,
|
|
16809
16815
|
Go as FileUploadGlobalPropertyHandle,
|
|
@@ -16834,9 +16840,9 @@ export {
|
|
|
16834
16840
|
ro as ModelStepHandle,
|
|
16835
16841
|
uo as ModuleStepHandle,
|
|
16836
16842
|
Cc as MoveCommand,
|
|
16837
|
-
|
|
16843
|
+
Zn as ObjectInput,
|
|
16838
16844
|
rl as ObjectInputType,
|
|
16839
|
-
|
|
16845
|
+
Xn as OptionGlobalPropertyHandle,
|
|
16840
16846
|
ge as OptionNotFoundError,
|
|
16841
16847
|
Dt as ParseError,
|
|
16842
16848
|
io as PictureStepHandle,
|
|
@@ -16844,9 +16850,9 @@ export {
|
|
|
16844
16850
|
qo as ProductCollection,
|
|
16845
16851
|
zt as ProductWorkflow,
|
|
16846
16852
|
Ht as PromiseCache,
|
|
16847
|
-
|
|
16853
|
+
xn as PromiseQueue,
|
|
16848
16854
|
so as QuestionStepHandle,
|
|
16849
|
-
|
|
16855
|
+
Pn as QueueablePromise,
|
|
16850
16856
|
yc as ResizeCommand,
|
|
16851
16857
|
Wt as ResourceNotFoundError,
|
|
16852
16858
|
wc as RotateCommand,
|
|
@@ -16880,7 +16886,7 @@ export {
|
|
|
16880
16886
|
tc as dataUrlFromExternalUrl,
|
|
16881
16887
|
je as designService,
|
|
16882
16888
|
Ae as determineCorrectFontSizeAndLines,
|
|
16883
|
-
|
|
16889
|
+
Vn as digitalContentStepService,
|
|
16884
16890
|
dt as domParser,
|
|
16885
16891
|
Lc as duplicateBundle,
|
|
16886
16892
|
$c as duplicateTransaction,
|
|
@@ -16918,26 +16924,26 @@ export {
|
|
|
16918
16924
|
oc as getTrueCoordinates,
|
|
16919
16925
|
Wc as getUnorderedTransactions,
|
|
16920
16926
|
Fc as getWorkflow,
|
|
16921
|
-
|
|
16927
|
+
tr as getWorkflows,
|
|
16922
16928
|
b as graphQlManager,
|
|
16923
16929
|
de as illustrationStepService,
|
|
16924
16930
|
sc as isCloseToValue,
|
|
16925
16931
|
Tt as loadFont,
|
|
16926
16932
|
ac as matchHexToPms,
|
|
16927
|
-
|
|
16933
|
+
zn as materialStepService,
|
|
16928
16934
|
mc as mmPerPixel,
|
|
16929
|
-
|
|
16935
|
+
Gn as modelStepService,
|
|
16930
16936
|
fa as modifySVGColors,
|
|
16931
|
-
|
|
16937
|
+
Wn as moduleStepService,
|
|
16932
16938
|
Oc as nameBundle,
|
|
16933
16939
|
Uc as nameTransaction,
|
|
16934
16940
|
X as optionService,
|
|
16935
16941
|
fc as outlineFontsInSvg,
|
|
16936
16942
|
At as patternImageDataCache,
|
|
16937
16943
|
k as persistenceService,
|
|
16938
|
-
|
|
16944
|
+
jn as pictureStepService,
|
|
16939
16945
|
ec as pmsToRgb,
|
|
16940
|
-
|
|
16946
|
+
Hn as questionStepService,
|
|
16941
16947
|
Zl as registerFetchImplementation,
|
|
16942
16948
|
Xl as registerWindowImplementation,
|
|
16943
16949
|
La as rehydrateSerializedLayout,
|
|
@@ -16945,13 +16951,13 @@ export {
|
|
|
16945
16951
|
re as rotateAroundPoint,
|
|
16946
16952
|
ma as sanitizeSvgTree,
|
|
16947
16953
|
kr as setBearerAuthenticationToken,
|
|
16948
|
-
|
|
16954
|
+
gn as setCanvasModule,
|
|
16949
16955
|
$t as shapeStepService,
|
|
16950
16956
|
is as shortenUrl,
|
|
16951
16957
|
wt as spiffCoreConfiguration,
|
|
16952
16958
|
Ic as stepAspectValuesToDesignInputSteps,
|
|
16953
16959
|
Qa as svgColorValueToDefinition,
|
|
16954
|
-
|
|
16960
|
+
On as svgStringDimensions,
|
|
16955
16961
|
Aa as svgToDataUrl,
|
|
16956
16962
|
q as textStepService,
|
|
16957
16963
|
gs as toast,
|