@spiffcommerce/core 26.27.1 → 26.29.0
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/CHANGELOG.md +12 -0
- package/dist/index.d.ts +28 -3
- package/dist/index.js +179 -134
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +650 -550
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -158,10 +158,10 @@ class Sr {
|
|
|
158
158
|
}
|
|
159
159
|
const mt = new Sr();
|
|
160
160
|
let _e, Xe;
|
|
161
|
-
function
|
|
161
|
+
function oc(r) {
|
|
162
162
|
_e = r;
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function lc(r) {
|
|
165
165
|
Xe = r;
|
|
166
166
|
}
|
|
167
167
|
function Jt() {
|
|
@@ -215,14 +215,14 @@ const ln = /* @__PURE__ */ new Map(), Fa = /* @__PURE__ */ new Map(), xa = /* @_
|
|
|
215
215
|
t ? vr(r).then(e).catch(a) : rt(r).then((n) => {
|
|
216
216
|
n.text().then(e).catch(a);
|
|
217
217
|
}).catch(a);
|
|
218
|
-
}), dn = (r) => or(r),
|
|
218
|
+
}), dn = (r) => or(r), Ne = /* @__PURE__ */ new Map(), br = async (r, t) => {
|
|
219
219
|
if (Mt([typeof FontFace])) {
|
|
220
|
-
if (
|
|
221
|
-
return
|
|
220
|
+
if (Ne.has(t))
|
|
221
|
+
return Ne.get(t);
|
|
222
222
|
const e = r.names.fullName.en, a = new FontFace(e, `url(${t})`);
|
|
223
223
|
document.fonts.add(a);
|
|
224
224
|
const n = a.load();
|
|
225
|
-
return
|
|
225
|
+
return Ne.set(t, n), n;
|
|
226
226
|
}
|
|
227
227
|
}, Et = () => {
|
|
228
228
|
if (Mt([typeof XMLSerializer]))
|
|
@@ -256,7 +256,7 @@ const ln = /* @__PURE__ */ new Map(), Fa = /* @__PURE__ */ new Map(), xa = /* @_
|
|
|
256
256
|
}
|
|
257
257
|
const e = t();
|
|
258
258
|
return e || "image/svg+xml";
|
|
259
|
-
},
|
|
259
|
+
}, cc = async (r) => {
|
|
260
260
|
const t = await cn(r), e = ln.get(r) || Ie(t);
|
|
261
261
|
return await Pr(new Blob([t], { type: e }));
|
|
262
262
|
}, Ir = (r) => {
|
|
@@ -311,12 +311,12 @@ const kr = (r) => {
|
|
|
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
|
};
|
|
314
|
-
async function
|
|
314
|
+
async function Nr(r, t) {
|
|
315
315
|
const e = mt.getServerUrl(), a = e.includes(".aumelbdev.spiffcommerce.com") ? "https://moonlight.aumelbdev.spiffcommerce.com" : e.includes(".us.spiffcommerce.com") ? "https://moonlight.us.spiffcommerce.com" : "https://moonlight.au.spiffcommerce.com";
|
|
316
316
|
let n = await rt(r, { ...t, redirect: "manual" });
|
|
317
317
|
return n.type === "opaqueredirect" && (typeof r != "string" && "url" in r ? n = await rt({ ...r, url: `${a}/graphql` }, t) : n = await rt(`${a}/graphql`, t)), n;
|
|
318
318
|
}
|
|
319
|
-
class
|
|
319
|
+
class Qr {
|
|
320
320
|
constructor() {
|
|
321
321
|
this.shadowGraphqlClient = this.constructShadowGraphqlClient(), mt.addServerUrlCallback(() => {
|
|
322
322
|
this.shadowGraphqlClient = this.constructShadowGraphqlClient();
|
|
@@ -328,7 +328,7 @@ class Nr {
|
|
|
328
328
|
constructShadowGraphqlClient() {
|
|
329
329
|
const t = er({
|
|
330
330
|
uri: `${mt.getServerUrl()}/graphql`,
|
|
331
|
-
fetch:
|
|
331
|
+
fetch: Nr
|
|
332
332
|
}), e = ir(async (i, s) => {
|
|
333
333
|
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;
|
|
334
334
|
try {
|
|
@@ -357,7 +357,7 @@ class Nr {
|
|
|
357
357
|
});
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
|
-
const b = new
|
|
360
|
+
const b = new Qr();
|
|
361
361
|
let Ze, ta;
|
|
362
362
|
const gt = (r, t, e) => {
|
|
363
363
|
if (Ze !== void 0)
|
|
@@ -401,9 +401,9 @@ function gn(r) {
|
|
|
401
401
|
throw t;
|
|
402
402
|
}
|
|
403
403
|
}
|
|
404
|
-
let
|
|
404
|
+
let Qe;
|
|
405
405
|
function ha() {
|
|
406
|
-
return
|
|
406
|
+
return Qe === void 0 && (Qe = Br()), Qe;
|
|
407
407
|
}
|
|
408
408
|
let ae = null;
|
|
409
409
|
const Rr = (r) => new Promise((t) => {
|
|
@@ -415,12 +415,12 @@ const Rr = (r) => new Promise((t) => {
|
|
|
415
415
|
return !ae;
|
|
416
416
|
const t = await Kt("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAIAAwMBEQACEQEDEQH/xABRAAEAAAAAAAAAAAAAAAAAAAAKEAEBAQADAQEAAAAAAAAAAAAGBQQDCAkCBwEBAAAAAAAAAAAAAAAAAAAAABEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8AG8T9NfSMEVMhQvoP3fFiRZ+MTHDifa/95OFSZU5OzRzxkyejv8ciEfhSceSXGjS8eSdLnZc2HDm4M3BxcXwH/9k=");
|
|
417
417
|
return ae = t.width === 2 && t.height === 3, !ae;
|
|
418
|
-
},
|
|
418
|
+
}, $r = (r) => {
|
|
419
419
|
const e = r.naturalWidth / r.naturalHeight;
|
|
420
420
|
return r.naturalHeight <= 8192 && r.naturalWidth <= 8192 ? [r.naturalWidth, r.naturalHeight] : r.naturalHeight > r.naturalWidth ? [e * 8192, 8192] : [8192, 8192 / e];
|
|
421
|
-
},
|
|
421
|
+
}, Ur = async (r) => {
|
|
422
422
|
var A;
|
|
423
|
-
const t = await Dr(r), e = await Kt(t), [a, n] =
|
|
423
|
+
const t = await Dr(r), e = await Kt(t), [a, n] = $r(e);
|
|
424
424
|
if (!await Or()) {
|
|
425
425
|
const u = gt(a, n);
|
|
426
426
|
return (A = u.getContext("2d")) == null || A.drawImage(e, 0, 0, a, n), u;
|
|
@@ -451,7 +451,7 @@ const Rr = (r) => new Promise((t) => {
|
|
|
451
451
|
}
|
|
452
452
|
return d.drawImage(e, 0, 0, o, l), c;
|
|
453
453
|
}, De = async (r) => {
|
|
454
|
-
const t = await
|
|
454
|
+
const t = await Ur(r);
|
|
455
455
|
return Ie(r) === "image/jpeg" ? {
|
|
456
456
|
dataUrl: t.toDataURL("image/jpeg", 1),
|
|
457
457
|
height: t.height,
|
|
@@ -3150,16 +3150,16 @@ const Rr = (r) => new Promise((t) => {
|
|
|
3150
3150
|
parseInt(r.substring(2, 4), 16),
|
|
3151
3151
|
parseInt(r.substring(4, 6), 16)
|
|
3152
3152
|
]);
|
|
3153
|
-
function
|
|
3153
|
+
function dc(r) {
|
|
3154
3154
|
const t = jt.indexOf(r);
|
|
3155
3155
|
return t >= 0 ? Ft[t] : "";
|
|
3156
3156
|
}
|
|
3157
|
-
function
|
|
3157
|
+
function Lr(r) {
|
|
3158
3158
|
const t = Ft.indexOf(r);
|
|
3159
3159
|
return t >= 0 ? jt[t] : "";
|
|
3160
3160
|
}
|
|
3161
|
-
function
|
|
3162
|
-
const e = [], a = [], n =
|
|
3161
|
+
function Ac(r, t = 64) {
|
|
3162
|
+
const e = [], a = [], n = Lr(r);
|
|
3163
3163
|
n && e.push({
|
|
3164
3164
|
pms: n,
|
|
3165
3165
|
hex: r,
|
|
@@ -3177,19 +3177,19 @@ function oc(r, t = 64) {
|
|
|
3177
3177
|
return e.sort((A, u) => A.distance - u.distance);
|
|
3178
3178
|
}
|
|
3179
3179
|
const Vr = jt.map((r, t) => ({ pms: r, hex: Ft[t] })), zr = new dr(Vr, { keys: ["pms"] });
|
|
3180
|
-
function
|
|
3180
|
+
function uc(r, t) {
|
|
3181
3181
|
return zr.search(r, t ? { limit: t } : void 0);
|
|
3182
3182
|
}
|
|
3183
|
-
let
|
|
3183
|
+
let Nt = null;
|
|
3184
3184
|
function Gr(r) {
|
|
3185
3185
|
if (r.startsWith("#"))
|
|
3186
3186
|
return Ta(r);
|
|
3187
3187
|
if (!document)
|
|
3188
3188
|
throw new Error("browserColorToHex is only supported on browsers");
|
|
3189
|
-
if (
|
|
3189
|
+
if (Nt || (Nt = document.createElement("canvas").getContext("2d")), !Nt)
|
|
3190
3190
|
throw new Error("Failed to create canvas context required to convert colors");
|
|
3191
|
-
|
|
3192
|
-
const t = Ta(
|
|
3191
|
+
Nt.fillStyle = r;
|
|
3192
|
+
const t = Ta(Nt.fillStyle);
|
|
3193
3193
|
return t || console.error(`Unknown browser color ${r}`), t;
|
|
3194
3194
|
}
|
|
3195
3195
|
function Ta(r) {
|
|
@@ -3207,7 +3207,7 @@ const ne = (r) => {
|
|
|
3207
3207
|
return `icc-named-color(${t.slice(e + 1).slice(0, -4)}, ${r.namedColor})`;
|
|
3208
3208
|
}
|
|
3209
3209
|
return `icc-named-color(${r.profileName}, ${r.namedColor})`;
|
|
3210
|
-
},
|
|
3210
|
+
}, Na = (r) => {
|
|
3211
3211
|
const t = r.split(/[ ](?=[^)]*?(?:\(|$))/);
|
|
3212
3212
|
if (t.length === 0)
|
|
3213
3213
|
return { browserValue: "#000000" };
|
|
@@ -3351,12 +3351,12 @@ const ne = (r) => {
|
|
|
3351
3351
|
Wr.includes(s.tagName) && !s.attributes.getNamedItem("fill") && s.setAttribute("fill", "black");
|
|
3352
3352
|
const o = s.attributes.getNamedItem("fill");
|
|
3353
3353
|
if (o && o.value !== "none" && !o.value.startsWith("url(")) {
|
|
3354
|
-
const c =
|
|
3354
|
+
const c = Na(o.value), d = c.browserValue.replace(/\W/g, ""), A = `spiff-fill-${d}`;
|
|
3355
3355
|
s.setAttribute("fill", c.browserValue), s.classList.add(A), a[d] = c;
|
|
3356
3356
|
}
|
|
3357
3357
|
const l = s.attributes.getNamedItem("stroke");
|
|
3358
3358
|
if (l && l.value !== "none" && !l.value.startsWith("url(")) {
|
|
3359
|
-
const c =
|
|
3359
|
+
const c = Na(l.value), d = c.browserValue.replace(/\W/g, ""), A = `spiff-stroke-${d}`;
|
|
3360
3360
|
s.classList.add(A), s.setAttribute("stroke", c.browserValue), a[d] = c;
|
|
3361
3361
|
}
|
|
3362
3362
|
});
|
|
@@ -3704,7 +3704,7 @@ class ni {
|
|
|
3704
3704
|
}
|
|
3705
3705
|
}
|
|
3706
3706
|
}
|
|
3707
|
-
const
|
|
3707
|
+
const Qt = "persistentAssets", yn = class pt {
|
|
3708
3708
|
/**
|
|
3709
3709
|
* Add a new asset to persistence
|
|
3710
3710
|
* @param asset The asset to add.
|
|
@@ -3716,27 +3716,27 @@ const Nt = "persistentAssets", yn = class pt {
|
|
|
3716
3716
|
}
|
|
3717
3717
|
const e = /* @__PURE__ */ new Map();
|
|
3718
3718
|
e.set(t.key || "", t.fileLink);
|
|
3719
|
-
const a = k.getMap(
|
|
3719
|
+
const a = k.getMap(Qt);
|
|
3720
3720
|
a && a.forEach((n, i) => {
|
|
3721
3721
|
e.set(i, n);
|
|
3722
|
-
}), k.setMap(
|
|
3722
|
+
}), k.setMap(Qt, e), pt.executeCallbacks();
|
|
3723
3723
|
}
|
|
3724
3724
|
/**
|
|
3725
3725
|
* Remove an existing asset from persistence. Noop if the asset doesn't exist.
|
|
3726
3726
|
* @param assetKey The key to remove.
|
|
3727
3727
|
*/
|
|
3728
3728
|
static remove(t) {
|
|
3729
|
-
const e = k.getMap(
|
|
3729
|
+
const e = k.getMap(Qt);
|
|
3730
3730
|
if (!e)
|
|
3731
3731
|
return;
|
|
3732
3732
|
const a = Array.from(e.entries()).find((n) => n[0] === t);
|
|
3733
|
-
a && (e.delete(a[0]), k.setMap(
|
|
3733
|
+
a && (e.delete(a[0]), k.setMap(Qt, e), pt.executeCallbacks());
|
|
3734
3734
|
}
|
|
3735
3735
|
/**
|
|
3736
3736
|
* Get a list of all persisted assets.
|
|
3737
3737
|
*/
|
|
3738
3738
|
static list() {
|
|
3739
|
-
const t = k.getMap(
|
|
3739
|
+
const t = k.getMap(Qt);
|
|
3740
3740
|
return t ? Array.from(t.entries()).map((e) => ({ assetKey: e[0], src: e[1] })) : [];
|
|
3741
3741
|
}
|
|
3742
3742
|
/**
|
|
@@ -3757,7 +3757,7 @@ const Nt = "persistentAssets", yn = class pt {
|
|
|
3757
3757
|
};
|
|
3758
3758
|
yn.callbacks = [];
|
|
3759
3759
|
let Bt = yn;
|
|
3760
|
-
const
|
|
3760
|
+
const Qa = "bgrmPersistentAssets";
|
|
3761
3761
|
class J {
|
|
3762
3762
|
static has(t) {
|
|
3763
3763
|
return J.getMap().has(t);
|
|
@@ -3784,13 +3784,13 @@ class J {
|
|
|
3784
3784
|
a && (e.delete(a), J.setMap(e));
|
|
3785
3785
|
}
|
|
3786
3786
|
static getMap() {
|
|
3787
|
-
return k.getMap(
|
|
3787
|
+
return k.getMap(Qa) || /* @__PURE__ */ new Map();
|
|
3788
3788
|
}
|
|
3789
3789
|
static setMap(t) {
|
|
3790
|
-
k.setMap(
|
|
3790
|
+
k.setMap(Qa, t);
|
|
3791
3791
|
}
|
|
3792
3792
|
}
|
|
3793
|
-
const
|
|
3793
|
+
const $ = new ni();
|
|
3794
3794
|
class ri {
|
|
3795
3795
|
constructor() {
|
|
3796
3796
|
this.cache = {}, this.disabled = !1;
|
|
@@ -3878,8 +3878,8 @@ const Ht = new ri(), Sn = y`
|
|
|
3878
3878
|
});
|
|
3879
3879
|
return t.data.options.forEach((e) => {
|
|
3880
3880
|
var a, n;
|
|
3881
|
-
(a = e.defaultVariant) != null && a.asset &&
|
|
3882
|
-
i.asset &&
|
|
3881
|
+
(a = e.defaultVariant) != null && a.asset && $.cacheAsset(e.defaultVariant.asset), e.colorProfile && $.cacheAsset(e.colorProfile), (n = e.variants) == null || n.forEach((i) => {
|
|
3882
|
+
i.asset && $.cacheAsset(i.asset), i.thumbnail && $.cacheAsset(i.thumbnail), i.material && $.cacheMaterial(i.material);
|
|
3883
3883
|
});
|
|
3884
3884
|
}), t.data.options;
|
|
3885
3885
|
}, oi = async (r, t) => (await t).find((a) => a.id === r), li = async (r) => {
|
|
@@ -4122,6 +4122,17 @@ const X = new ci(), vn = y`
|
|
|
4122
4122
|
transactionShareActions {
|
|
4123
4123
|
...TransactionShareActionFields
|
|
4124
4124
|
}
|
|
4125
|
+
recipient {
|
|
4126
|
+
id
|
|
4127
|
+
firstName
|
|
4128
|
+
lastName
|
|
4129
|
+
address
|
|
4130
|
+
suburb
|
|
4131
|
+
state
|
|
4132
|
+
email
|
|
4133
|
+
postalCode
|
|
4134
|
+
country
|
|
4135
|
+
}
|
|
4125
4136
|
product {
|
|
4126
4137
|
id
|
|
4127
4138
|
basePrice
|
|
@@ -5175,7 +5186,7 @@ const X = new ci(), vn = y`
|
|
|
5175
5186
|
);
|
|
5176
5187
|
}
|
|
5177
5188
|
return !1;
|
|
5178
|
-
}),
|
|
5189
|
+
}), Ni = (r, t) => {
|
|
5179
5190
|
const e = {
|
|
5180
5191
|
name: r.name,
|
|
5181
5192
|
title: r.title,
|
|
@@ -5183,7 +5194,7 @@ const X = new ci(), vn = y`
|
|
|
5183
5194
|
silentSteps: r.silentSteps.filter((a) => wt(a, t))
|
|
5184
5195
|
};
|
|
5185
5196
|
return e.silentSteps.length === 0 && e.renderableSteps.length === 0 ? null : e;
|
|
5186
|
-
}, It = (r, t) => r.map((e) =>
|
|
5197
|
+
}, It = (r, t) => r.map((e) => Ni(e, t)).filter((e) => e !== null), Qi = async (r, t, e = !1) => {
|
|
5187
5198
|
var s;
|
|
5188
5199
|
const a = It(r, t), n = [];
|
|
5189
5200
|
for (const o of a)
|
|
@@ -5275,7 +5286,7 @@ class Pn {
|
|
|
5275
5286
|
}
|
|
5276
5287
|
}
|
|
5277
5288
|
}
|
|
5278
|
-
const
|
|
5289
|
+
const N = () => {
|
|
5279
5290
|
const r = () => Math.floor((1 + Math.random()) * 65536).toString(16).substring(1);
|
|
5280
5291
|
return r() + r() + "-" + r() + "-" + r() + "-" + r() + "-" + r() + r() + r();
|
|
5281
5292
|
}, Ri = ({
|
|
@@ -5294,7 +5305,7 @@ const Q = () => {
|
|
|
5294
5305
|
width: u
|
|
5295
5306
|
}) => {
|
|
5296
5307
|
var B;
|
|
5297
|
-
const h = e || 0, m = 2 * ((l == null ? void 0 : l.scale) || 1), g = A || { x: 0, y: 0, width: u, height: i }, f = `${g.x} ${g.y} ${g.width} ${g.height}`, p =
|
|
5308
|
+
const h = e || 0, m = 2 * ((l == null ? void 0 : l.scale) || 1), g = A || { x: 0, y: 0, width: u, height: i }, f = `${g.x} ${g.y} ${g.width} ${g.height}`, p = N(), C = a.purpose === Gt.FreeDesign && /* @__PURE__ */ x("defs", { children: /* @__PURE__ */ x("clipPath", { id: "viewboxClip", children: /* @__PURE__ */ x("rect", { width: g.width, height: g.height, rx: h }) }) }), w = (B = a.colorProfiles) == null ? void 0 : B.map((E, I) => (
|
|
5298
5309
|
/* @ts-ignore */
|
|
5299
5310
|
/* @__PURE__ */ x("color-profile", { name: E.name, xlinkHref: E.key, children: " " }, I)
|
|
5300
5311
|
)), v = n.map((E) => ({
|
|
@@ -5338,7 +5349,7 @@ const Q = () => {
|
|
|
5338
5349
|
{
|
|
5339
5350
|
id: "element-group",
|
|
5340
5351
|
clipPath: a.purpose === Gt.FreeDesign ? "url(#viewboxClip)" : void 0,
|
|
5341
|
-
children: S.map((E) =>
|
|
5352
|
+
children: S.map((E) => Nn(E)).filter((E) => !!E)
|
|
5342
5353
|
}
|
|
5343
5354
|
),
|
|
5344
5355
|
l && /* @__PURE__ */ x(
|
|
@@ -5379,7 +5390,7 @@ const Q = () => {
|
|
|
5379
5390
|
]
|
|
5380
5391
|
}
|
|
5381
5392
|
);
|
|
5382
|
-
},
|
|
5393
|
+
}, hc = (r, t, e, a, n) => {
|
|
5383
5394
|
const i = ft(n), s = e / 2, o = a / 2, l = r + s, c = t + o, d = Math.sin(i), A = Math.cos(i), u = s, h = s, m = -o, g = o, f = u * A - m * d, p = h * A - g * d, C = u * d + m * A, w = h * d + g * A, v = Math.max(Math.abs(f), Math.abs(p)), S = Math.max(Math.abs(C), Math.abs(w));
|
|
5384
5395
|
return {
|
|
5385
5396
|
minX: l - v,
|
|
@@ -5387,25 +5398,25 @@ const Q = () => {
|
|
|
5387
5398
|
minY: c - S,
|
|
5388
5399
|
maxY: c + S
|
|
5389
5400
|
};
|
|
5390
|
-
},
|
|
5401
|
+
}, mc = (r, t, e) => {
|
|
5391
5402
|
const a = Math.sqrt(Math.pow(t.x - r.x, 2) + Math.pow(t.y - r.y, 2)), n = Math.sqrt(Math.pow(t.x - e.x, 2) + Math.pow(t.y - e.y, 2)), i = Math.sqrt(Math.pow(e.x - r.x, 2) + Math.pow(e.y - r.y, 2));
|
|
5392
5403
|
return Math.acos((n * n + a * a - i * i) / (2 * n * a)) * (180 / Math.PI);
|
|
5393
|
-
}, ft = (r) => r * (Math.PI / 180),
|
|
5404
|
+
}, ft = (r) => r * (Math.PI / 180), gc = (r, t, e) => Math.abs(r - t) < e, fc = (r, t, e) => {
|
|
5394
5405
|
const a = Math.sin(ft(e)), n = Math.cos(ft(e));
|
|
5395
5406
|
return {
|
|
5396
5407
|
x: (r.x - t.x) * n - (r.y - t.y) * a + t.x,
|
|
5397
5408
|
y: (r.x - t.x) * a + (r.y - t.y) * n + t.y
|
|
5398
5409
|
};
|
|
5399
|
-
},
|
|
5410
|
+
}, pc = (r, t) => ({
|
|
5400
5411
|
x: (r.x + t.x) / 2,
|
|
5401
5412
|
y: (r.y + t.y) / 2
|
|
5402
|
-
}),
|
|
5413
|
+
}), Cc = (r, t, e, a) => ({
|
|
5403
5414
|
x: r.x + (t == null ? void 0 : t.x) * e,
|
|
5404
5415
|
y: r.y + (t == null ? void 0 : t.y) * a
|
|
5405
|
-
}),
|
|
5416
|
+
}), wc = (r, t, e, a) => ({
|
|
5406
5417
|
x: r.x + ((t == null ? void 0 : t.x) + (t == null ? void 0 : t.width)) * e,
|
|
5407
5418
|
y: r.y + (t == null ? void 0 : t.y) * a
|
|
5408
|
-
}),
|
|
5419
|
+
}), yc = (r, t, e, a) => ({
|
|
5409
5420
|
x: r.x + ((t == null ? void 0 : t.x) + (t == null ? void 0 : t.width)) * e,
|
|
5410
5421
|
y: r.y + ((t == null ? void 0 : t.y) + (t == null ? void 0 : t.height)) * a
|
|
5411
5422
|
}), bt = (r) => {
|
|
@@ -5427,7 +5438,7 @@ const Q = () => {
|
|
|
5427
5438
|
case H.Southwest:
|
|
5428
5439
|
return H.Northwest;
|
|
5429
5440
|
}
|
|
5430
|
-
},
|
|
5441
|
+
}, Sc = (r, t) => t > 45 && t <= 135 ? bt(r) : t > 135 && t <= 225 ? bt(bt(r)) : t > 225 && t <= 315 ? bt(bt(bt(r))) : r, vc = (r, t = { x: 0, y: 0 }, e = { x: 1, y: 1 }) => {
|
|
5431
5442
|
const a = ft(r.rotation), n = {
|
|
5432
5443
|
x: t.x + r.x * e.x,
|
|
5433
5444
|
y: t.x + r.y * e.y
|
|
@@ -5457,7 +5468,7 @@ const Q = () => {
|
|
|
5457
5468
|
x: (r.x - t.x) * n - (r.y - t.y) * a + t.x,
|
|
5458
5469
|
y: (r.x - t.x) * a + (r.y - t.y) * n + t.y
|
|
5459
5470
|
};
|
|
5460
|
-
},
|
|
5471
|
+
}, Ec = 0.352778, Bc = 0.035277, Fn = (r) => {
|
|
5461
5472
|
const t = r.rotation || 0, e = ft(t), a = Math.cos(e), n = -Math.sin(e);
|
|
5462
5473
|
return /* @__PURE__ */ x("g", { mask: r.stepName || r.productOverlay ? void 0 : r.mask, children: /* @__PURE__ */ x(
|
|
5463
5474
|
"g",
|
|
@@ -5506,7 +5517,7 @@ const Q = () => {
|
|
|
5506
5517
|
height: r.height
|
|
5507
5518
|
}
|
|
5508
5519
|
) : void 0,
|
|
5509
|
-
s.map((c) =>
|
|
5520
|
+
s.map((c) => Nn(c)).filter((c) => !!c).map((c) => /* @__PURE__ */ x("g", { clipPath: `url(#${t})`, children: c }))
|
|
5510
5521
|
]
|
|
5511
5522
|
}
|
|
5512
5523
|
)
|
|
@@ -5543,7 +5554,7 @@ const Q = () => {
|
|
|
5543
5554
|
/* @__PURE__ */ x("feFuncB", { type: "discrete", tableValues: n() })
|
|
5544
5555
|
] })
|
|
5545
5556
|
] }) }) }), s = r.rotation || 0, o = ft(s), l = Math.cos(o), c = -Math.sin(o), d = () => {
|
|
5546
|
-
var w, v, S, B, E, I, P, F, M,
|
|
5557
|
+
var w, v, S, B, E, I, P, F, M, Q;
|
|
5547
5558
|
const A = ((w = r.pattern) == null ? void 0 : w.x) || 0, u = ((v = r.pattern) == null ? void 0 : v.y) || 0, h = ((S = r.pattern) == null ? void 0 : S.width) || 0, m = ((B = r.pattern) == null ? void 0 : B.height) || 0, g = ((E = r.pattern) == null ? void 0 : E.scaleX) || 1, f = ((I = r.pattern) == null ? void 0 : I.scaleY) || 1, p = ((P = r.pattern) == null ? void 0 : P.rotation) || 0;
|
|
5548
5559
|
return [(F = r.pattern) != null && F.svg ? {
|
|
5549
5560
|
id: `${t}-contents`,
|
|
@@ -5555,7 +5566,7 @@ const Q = () => {
|
|
|
5555
5566
|
height: m * f,
|
|
5556
5567
|
src: a(),
|
|
5557
5568
|
svg: (M = r.pattern) == null ? void 0 : M.svg,
|
|
5558
|
-
colors: (
|
|
5569
|
+
colors: (Q = r.pattern) == null ? void 0 : Q.colors
|
|
5559
5570
|
} : {
|
|
5560
5571
|
id: `${t}-contents`,
|
|
5561
5572
|
type: T.Image,
|
|
@@ -5604,7 +5615,7 @@ const Q = () => {
|
|
|
5604
5615
|
)
|
|
5605
5616
|
] });
|
|
5606
5617
|
}, kn = /* @__PURE__ */ new Map();
|
|
5607
|
-
class
|
|
5618
|
+
class $i {
|
|
5608
5619
|
constructor(t) {
|
|
5609
5620
|
this.font = t, this.glyphsFromText = /* @__PURE__ */ new Map(), this.kerningValues = /* @__PURE__ */ new Map(), this.height = this.calculateApproximateHeight();
|
|
5610
5621
|
}
|
|
@@ -5654,14 +5665,14 @@ class Ui {
|
|
|
5654
5665
|
}), a - n;
|
|
5655
5666
|
}
|
|
5656
5667
|
}
|
|
5657
|
-
const
|
|
5668
|
+
const Ui = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @__PURE__ */ new Map(), Tt = async (r) => {
|
|
5658
5669
|
if (Oe.has(r))
|
|
5659
5670
|
return Oe.get(r);
|
|
5660
5671
|
const e = (async () => {
|
|
5661
5672
|
try {
|
|
5662
5673
|
return St(r).getFont();
|
|
5663
5674
|
} catch {
|
|
5664
|
-
if (
|
|
5675
|
+
if (Ui(r)) {
|
|
5665
5676
|
const a = An(r), n = Je(a);
|
|
5666
5677
|
return aa(r, n), n;
|
|
5667
5678
|
} else {
|
|
@@ -5671,7 +5682,7 @@ const Li = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
|
|
|
5671
5682
|
}
|
|
5672
5683
|
})();
|
|
5673
5684
|
return Oe.set(r, e), e;
|
|
5674
|
-
},
|
|
5685
|
+
}, Li = (r) => {
|
|
5675
5686
|
const t = An(r), e = Je(t);
|
|
5676
5687
|
return aa(r, e), e;
|
|
5677
5688
|
}, St = (r) => {
|
|
@@ -5680,9 +5691,9 @@ const Li = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
|
|
|
5680
5691
|
return t;
|
|
5681
5692
|
throw new Error("Font metrics unavailable for font");
|
|
5682
5693
|
}, aa = (r, t) => {
|
|
5683
|
-
const e = new
|
|
5694
|
+
const e = new $i(t);
|
|
5684
5695
|
return kn.set(r, e), e;
|
|
5685
|
-
},
|
|
5696
|
+
}, bc = async (r) => {
|
|
5686
5697
|
const t = dt(), e = t.parseFromString(r, "image/svg+xml"), a = e.firstElementChild, n = /* @__PURE__ */ new Map();
|
|
5687
5698
|
a.querySelectorAll("style").forEach((d) => {
|
|
5688
5699
|
var u;
|
|
@@ -5800,7 +5811,7 @@ const Li = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
|
|
|
5800
5811
|
let o = { ...r };
|
|
5801
5812
|
const l = { ...r }, c = Mn(a, e / s.unitsPerEm, St(t.assetUrl));
|
|
5802
5813
|
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 && ji(a, a).every(([d, A]) => d === A) && (o = l)), o;
|
|
5803
|
-
},
|
|
5814
|
+
}, $e = 1, ht = (r, t, e) => {
|
|
5804
5815
|
let a = 0;
|
|
5805
5816
|
const n = e.getGlyphs(r);
|
|
5806
5817
|
return n.forEach((i, s) => {
|
|
@@ -6004,7 +6015,7 @@ const Li = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
|
|
|
6004
6015
|
};
|
|
6005
6016
|
class _i {
|
|
6006
6017
|
constructor() {
|
|
6007
|
-
this.id =
|
|
6018
|
+
this.id = N(), this.stateCallbacks = [], this.prevCommands = [], this.nextCommands = [];
|
|
6008
6019
|
}
|
|
6009
6020
|
registerStateCallback(t) {
|
|
6010
6021
|
this.stateCallbacks.push(t);
|
|
@@ -6084,7 +6095,7 @@ class _i {
|
|
|
6084
6095
|
layouts: {}
|
|
6085
6096
|
};
|
|
6086
6097
|
t.forEach((n) => {
|
|
6087
|
-
a = new
|
|
6098
|
+
a = new $n(n).apply(a);
|
|
6088
6099
|
}), this.runStateCallbacks(), this.state = {
|
|
6089
6100
|
transaction: a
|
|
6090
6101
|
};
|
|
@@ -6094,7 +6105,7 @@ class _i {
|
|
|
6094
6105
|
return { ...t, transaction: e.apply(a) };
|
|
6095
6106
|
}
|
|
6096
6107
|
}
|
|
6097
|
-
const
|
|
6108
|
+
const Nn = (r) => r.type === T.Image ? /* @__PURE__ */ x(Fn, { ...r }, r.id) : r.type === T.Frame ? /* @__PURE__ */ x(Oi, { ...r }, r.id) : r.type === T.Illustration ? /* @__PURE__ */ x(Ki, { ...r }, r.id) : r.type === T.Textbox ? /* @__PURE__ */ x(qi, { ...r }, r.id) : r.type === T.Group ? /* @__PURE__ */ x(xn, { ...r }, r.id) : null, wa = (r, t, e) => {
|
|
6098
6109
|
const a = e.renderingConfiguration, n = a != null && a.removeExcludedElements ? t.filter((i) => !i.excludeFromExport) : t;
|
|
6099
6110
|
return /* @__PURE__ */ x(
|
|
6100
6111
|
Ri,
|
|
@@ -6144,7 +6155,7 @@ const Zt = (r) => {
|
|
|
6144
6155
|
if (r.defaultVariant !== void 0)
|
|
6145
6156
|
return t.find((e) => e.id === r.defaultVariant);
|
|
6146
6157
|
}
|
|
6147
|
-
}, At = /* @__PURE__ */ new Map(),
|
|
6158
|
+
}, At = /* @__PURE__ */ new Map(), Ut = /* @__PURE__ */ new Map(), Ue = /* @__PURE__ */ new Map(), Qn = async (r, t) => {
|
|
6148
6159
|
if (!t) {
|
|
6149
6160
|
if (!r)
|
|
6150
6161
|
throw new Error("No region or src supplied. Cannot construct frame!");
|
|
@@ -6168,11 +6179,11 @@ const Zt = (r) => {
|
|
|
6168
6179
|
throw new Error(`No asset for variant with ID: ${r.frameVariantId}`);
|
|
6169
6180
|
return e;
|
|
6170
6181
|
}, xe = async (r) => {
|
|
6171
|
-
if (
|
|
6172
|
-
return
|
|
6182
|
+
if (Ue.has(r))
|
|
6183
|
+
return Ue.get(r);
|
|
6173
6184
|
const e = (async () => {
|
|
6174
|
-
if (
|
|
6175
|
-
return
|
|
6185
|
+
if (Ut.has(r))
|
|
6186
|
+
return Ut.get(r);
|
|
6176
6187
|
await new Promise((u) => setTimeout(u, 0));
|
|
6177
6188
|
const n = dt().parseFromString(r, "image/svg+xml"), i = n.querySelector("svg");
|
|
6178
6189
|
if (!i)
|
|
@@ -6190,7 +6201,7 @@ const Zt = (r) => {
|
|
|
6190
6201
|
width: c,
|
|
6191
6202
|
height: l
|
|
6192
6203
|
};
|
|
6193
|
-
return
|
|
6204
|
+
return Ut.set(u, h), h;
|
|
6194
6205
|
}
|
|
6195
6206
|
if (A) {
|
|
6196
6207
|
const u = A.getAttribute("d");
|
|
@@ -6201,11 +6212,11 @@ const Zt = (r) => {
|
|
|
6201
6212
|
width: c,
|
|
6202
6213
|
height: l
|
|
6203
6214
|
};
|
|
6204
|
-
return
|
|
6215
|
+
return Ut.set(u, h), h;
|
|
6205
6216
|
}
|
|
6206
6217
|
throw new Error("Malformed frame SVG");
|
|
6207
6218
|
})();
|
|
6208
|
-
return
|
|
6219
|
+
return Ue.set(r, e), e;
|
|
6209
6220
|
}, Sa = (r, t, e, a) => {
|
|
6210
6221
|
const n = t.width / t.height, i = r.width / r.height;
|
|
6211
6222
|
let s;
|
|
@@ -6249,11 +6260,11 @@ const Zt = (r) => {
|
|
|
6249
6260
|
}, va = async (r) => {
|
|
6250
6261
|
const t = await at(r);
|
|
6251
6262
|
return Rn(t);
|
|
6252
|
-
},
|
|
6263
|
+
}, $a = (r) => r.endsWith("mm") ? Number(r.replace("mm", "")) * 3.7795275591 : r.endsWith("px") ? Number(r.replace("px", "")) : Number(r), Rn = (r) => {
|
|
6253
6264
|
const a = dt().parseFromString(r, "image/svg+xml").querySelector("svg");
|
|
6254
6265
|
if (!a)
|
|
6255
6266
|
throw new Error("No svg tag found, this svg must be malformed!");
|
|
6256
|
-
const n = a.getAttribute("viewBox"), i = a.getAttribute("width"), s = a.getAttribute("height"), o = s && i ? [0, 0,
|
|
6267
|
+
const n = a.getAttribute("viewBox"), i = a.getAttribute("width"), s = a.getAttribute("height"), o = s && i ? [0, 0, $a(i), $a(s)] : n == null ? void 0 : n.split(" ").map((l) => Number(l));
|
|
6257
6268
|
if (!o)
|
|
6258
6269
|
throw new Error("No viewbox or width/height values detected on SVG file!");
|
|
6259
6270
|
return {
|
|
@@ -6267,9 +6278,9 @@ const Zt = (r) => {
|
|
|
6267
6278
|
at(r).then((e) => {
|
|
6268
6279
|
t(e);
|
|
6269
6280
|
}).catch((e) => console.error(e));
|
|
6270
|
-
}),
|
|
6271
|
-
if (
|
|
6272
|
-
return
|
|
6281
|
+
}), Le = /* @__PURE__ */ new Map(), qt = async (r) => {
|
|
6282
|
+
if (Le.has(r))
|
|
6283
|
+
return Le.get(r);
|
|
6273
6284
|
const t = async (n) => new Promise((i, s) => {
|
|
6274
6285
|
try {
|
|
6275
6286
|
if (!(!!URL && !!URL.createObjectURL))
|
|
@@ -6301,8 +6312,8 @@ const Zt = (r) => {
|
|
|
6301
6312
|
A.resize(m, m);
|
|
6302
6313
|
return await A.render(), await t(c);
|
|
6303
6314
|
})();
|
|
6304
|
-
return
|
|
6305
|
-
},
|
|
6315
|
+
return Le.set(r, a), a;
|
|
6316
|
+
}, $t = async (r, t, e, a) => {
|
|
6306
6317
|
const n = r.layoutState.layout.useEditableArea && r.layoutState.layout.editableArea || {
|
|
6307
6318
|
width: r.layoutState.layout.width,
|
|
6308
6319
|
height: r.layoutState.layout.height,
|
|
@@ -6334,11 +6345,11 @@ const Zt = (r) => {
|
|
|
6334
6345
|
}
|
|
6335
6346
|
return o;
|
|
6336
6347
|
};
|
|
6337
|
-
class
|
|
6348
|
+
class Ic {
|
|
6338
6349
|
static async getFrame(t, e) {
|
|
6339
|
-
const a = await
|
|
6350
|
+
const a = await Qn(e.region, e.src), n = await xe(a), i = e.region || await $t(t, T.Frame);
|
|
6340
6351
|
return {
|
|
6341
|
-
id:
|
|
6352
|
+
id: N(),
|
|
6342
6353
|
x: i.left,
|
|
6343
6354
|
y: i.top,
|
|
6344
6355
|
width: i.width,
|
|
@@ -6362,9 +6373,9 @@ class vc {
|
|
|
6362
6373
|
};
|
|
6363
6374
|
}
|
|
6364
6375
|
static async getImage(t, e) {
|
|
6365
|
-
const a = e.region || await
|
|
6376
|
+
const a = e.region || await $t(t, T.Image, e.src);
|
|
6366
6377
|
return {
|
|
6367
|
-
id:
|
|
6378
|
+
id: N(),
|
|
6368
6379
|
src: e.src,
|
|
6369
6380
|
type: T.Image,
|
|
6370
6381
|
y: a.top,
|
|
@@ -6386,12 +6397,12 @@ class vc {
|
|
|
6386
6397
|
}, l = (i == null ? void 0 : i.text) || a.defaultText || "", c = a.replaceableText ? a.replaceableText.replace("{{}}", l) : l, d = Ce(c, {
|
|
6387
6398
|
vertical: a.vertical,
|
|
6388
6399
|
uppercase: a.uppercase
|
|
6389
|
-
}), A = e.region || await
|
|
6400
|
+
}), A = e.region || await $t(t, T.Textbox, n, {
|
|
6390
6401
|
text: d,
|
|
6391
6402
|
fontScale: a.size ? a.size / s.unitsPerEm : void 0
|
|
6392
6403
|
}), u = Xt(
|
|
6393
6404
|
{
|
|
6394
|
-
id:
|
|
6405
|
+
id: N(),
|
|
6395
6406
|
type: T.Textbox,
|
|
6396
6407
|
x: A.left,
|
|
6397
6408
|
y: A.top,
|
|
@@ -6452,7 +6463,7 @@ class vc {
|
|
|
6452
6463
|
</svg>
|
|
6453
6464
|
`, n = {};
|
|
6454
6465
|
n["spiff-fill-shape"] = { browserValue: e.color };
|
|
6455
|
-
const i = e.region || await
|
|
6466
|
+
const i = e.region || await $t(t, T.Illustration), s = N();
|
|
6456
6467
|
return {
|
|
6457
6468
|
stepRegion: e.region,
|
|
6458
6469
|
colors: n,
|
|
@@ -6470,7 +6481,7 @@ class vc {
|
|
|
6470
6481
|
};
|
|
6471
6482
|
}
|
|
6472
6483
|
static async getIllustration(t, e) {
|
|
6473
|
-
const a = e.region || await
|
|
6484
|
+
const a = e.region || await $t(t, T.Illustration, e.src), n = await lt(await On(e.src)), i = await qt(n.svg), s = N();
|
|
6474
6485
|
return {
|
|
6475
6486
|
cachedObjectURL: i,
|
|
6476
6487
|
stepRegion: e.region,
|
|
@@ -6490,24 +6501,24 @@ class vc {
|
|
|
6490
6501
|
};
|
|
6491
6502
|
}
|
|
6492
6503
|
}
|
|
6493
|
-
class
|
|
6504
|
+
class L extends Error {
|
|
6494
6505
|
constructor() {
|
|
6495
|
-
super("Element not found!"), Object.setPrototypeOf(this,
|
|
6506
|
+
super("Element not found!"), Object.setPrototypeOf(this, L.prototype);
|
|
6496
6507
|
}
|
|
6497
6508
|
}
|
|
6498
|
-
const
|
|
6509
|
+
const U = (r, t) => _(r, t).elements.find((n) => n.id === r), _ = (r, t) => {
|
|
6499
6510
|
const e = Object.values(t).find((a) => a.elements.some((n) => n.id === r));
|
|
6500
6511
|
if (!e)
|
|
6501
|
-
throw new
|
|
6512
|
+
throw new L();
|
|
6502
6513
|
return e;
|
|
6503
6514
|
}, Z = (r, t) => {
|
|
6504
6515
|
const e = [...t.elements.filter((n) => n.id !== r.id), r], a = ya(e);
|
|
6505
6516
|
return {
|
|
6506
6517
|
layout: t.layout,
|
|
6507
6518
|
elements: a,
|
|
6508
|
-
modificationID:
|
|
6519
|
+
modificationID: N()
|
|
6509
6520
|
};
|
|
6510
|
-
},
|
|
6521
|
+
}, Ua = async (r) => {
|
|
6511
6522
|
var a;
|
|
6512
6523
|
const t = [...Object.keys(r.layouts)], e = [...new Set(t)];
|
|
6513
6524
|
for (let n = 0; n < e.length; n++) {
|
|
@@ -6569,7 +6580,7 @@ class R {
|
|
|
6569
6580
|
this.oldState = t;
|
|
6570
6581
|
}
|
|
6571
6582
|
}
|
|
6572
|
-
class
|
|
6583
|
+
class La extends R {
|
|
6573
6584
|
constructor(t) {
|
|
6574
6585
|
super(), this.serializableWorkflow = t;
|
|
6575
6586
|
}
|
|
@@ -6580,15 +6591,15 @@ class $a extends R {
|
|
|
6580
6591
|
};
|
|
6581
6592
|
}
|
|
6582
6593
|
}
|
|
6583
|
-
class
|
|
6594
|
+
class Dc extends R {
|
|
6584
6595
|
constructor(t, e, a) {
|
|
6585
6596
|
super(), this.id = t, this.x = e, this.y = a;
|
|
6586
6597
|
}
|
|
6587
6598
|
apply(t) {
|
|
6588
6599
|
this.oldState = t;
|
|
6589
|
-
const e =
|
|
6600
|
+
const e = U(this.id, Object.values(t.layouts));
|
|
6590
6601
|
if (!e.id)
|
|
6591
|
-
throw new
|
|
6602
|
+
throw new L();
|
|
6592
6603
|
const a = {
|
|
6593
6604
|
...e,
|
|
6594
6605
|
x: this.x,
|
|
@@ -6603,15 +6614,15 @@ class Ec extends R {
|
|
|
6603
6614
|
};
|
|
6604
6615
|
}
|
|
6605
6616
|
}
|
|
6606
|
-
class
|
|
6617
|
+
class Pc extends R {
|
|
6607
6618
|
constructor(t, e) {
|
|
6608
6619
|
super(), this.id = t, this.angle = e;
|
|
6609
6620
|
}
|
|
6610
6621
|
apply(t) {
|
|
6611
6622
|
this.oldState = t;
|
|
6612
|
-
const e =
|
|
6623
|
+
const e = U(this.id, Object.values(t.layouts));
|
|
6613
6624
|
if (!e.id)
|
|
6614
|
-
throw new
|
|
6625
|
+
throw new L();
|
|
6615
6626
|
const a = {
|
|
6616
6627
|
...e,
|
|
6617
6628
|
rotation: this.angle
|
|
@@ -6625,15 +6636,15 @@ class Bc extends R {
|
|
|
6625
6636
|
};
|
|
6626
6637
|
}
|
|
6627
6638
|
}
|
|
6628
|
-
class
|
|
6639
|
+
class Fc extends R {
|
|
6629
6640
|
constructor(t, e, a) {
|
|
6630
6641
|
super(), this.id = t, this.width = Math.abs(e), this.height = Math.abs(a);
|
|
6631
6642
|
}
|
|
6632
6643
|
apply(t) {
|
|
6633
6644
|
this.oldState = t;
|
|
6634
|
-
const e =
|
|
6645
|
+
const e = U(this.id, Object.values(t.layouts));
|
|
6635
6646
|
if (!e.id)
|
|
6636
|
-
throw new
|
|
6647
|
+
throw new L();
|
|
6637
6648
|
let a = {
|
|
6638
6649
|
...e,
|
|
6639
6650
|
width: this.width,
|
|
@@ -6664,7 +6675,7 @@ class O extends R {
|
|
|
6664
6675
|
return this.oldState = t, this.commands.reduce((e, a) => a.apply(e), t);
|
|
6665
6676
|
}
|
|
6666
6677
|
}
|
|
6667
|
-
class
|
|
6678
|
+
class $n extends R {
|
|
6668
6679
|
constructor(t) {
|
|
6669
6680
|
super(), this.layout = t;
|
|
6670
6681
|
}
|
|
@@ -6676,7 +6687,7 @@ class Un extends R {
|
|
|
6676
6687
|
[this.layout.id]: {
|
|
6677
6688
|
elements: [],
|
|
6678
6689
|
layout: { ...this.layout },
|
|
6679
|
-
modificationID:
|
|
6690
|
+
modificationID: N()
|
|
6680
6691
|
}
|
|
6681
6692
|
}
|
|
6682
6693
|
};
|
|
@@ -6707,7 +6718,7 @@ class W extends R {
|
|
|
6707
6718
|
[this.layout.id]: {
|
|
6708
6719
|
...t.layouts[this.layout.id],
|
|
6709
6720
|
elements: o,
|
|
6710
|
-
modificationID:
|
|
6721
|
+
modificationID: N()
|
|
6711
6722
|
}
|
|
6712
6723
|
}
|
|
6713
6724
|
};
|
|
@@ -6728,7 +6739,7 @@ class W extends R {
|
|
|
6728
6739
|
[this.layout.id]: {
|
|
6729
6740
|
...t.layouts[this.layout.id],
|
|
6730
6741
|
elements: s,
|
|
6731
|
-
modificationID:
|
|
6742
|
+
modificationID: N()
|
|
6732
6743
|
}
|
|
6733
6744
|
}
|
|
6734
6745
|
};
|
|
@@ -6752,7 +6763,7 @@ class vt extends R {
|
|
|
6752
6763
|
const a = Object.values(t.layouts).map((i) => (i.elements.filter((o) => o.id !== this.id).length !== i.elements.length && (e = !0), {
|
|
6753
6764
|
...i,
|
|
6754
6765
|
elements: i.elements.filter((o) => o.id !== this.id),
|
|
6755
|
-
modificationID:
|
|
6766
|
+
modificationID: N()
|
|
6756
6767
|
}));
|
|
6757
6768
|
e || console.log(`Failed to delete element ${this.id}`);
|
|
6758
6769
|
const n = {};
|
|
@@ -6770,9 +6781,9 @@ class Zi extends R {
|
|
|
6770
6781
|
}
|
|
6771
6782
|
apply(t) {
|
|
6772
6783
|
this.oldState = t;
|
|
6773
|
-
const e =
|
|
6784
|
+
const e = U(this.id, Object.values(t.layouts));
|
|
6774
6785
|
if (!e.id)
|
|
6775
|
-
throw new
|
|
6786
|
+
throw new L();
|
|
6776
6787
|
const a = {
|
|
6777
6788
|
...e,
|
|
6778
6789
|
fill: this.color,
|
|
@@ -6794,9 +6805,9 @@ class Ve extends R {
|
|
|
6794
6805
|
}
|
|
6795
6806
|
apply(t) {
|
|
6796
6807
|
this.oldState = t;
|
|
6797
|
-
const e =
|
|
6808
|
+
const e = U(this.id, Object.values(t.layouts));
|
|
6798
6809
|
if (!e.id)
|
|
6799
|
-
throw new
|
|
6810
|
+
throw new L();
|
|
6800
6811
|
const a = {
|
|
6801
6812
|
...e,
|
|
6802
6813
|
textFillImage: this.imageFill
|
|
@@ -6816,9 +6827,9 @@ class ts extends R {
|
|
|
6816
6827
|
}
|
|
6817
6828
|
apply(t) {
|
|
6818
6829
|
this.oldState = t;
|
|
6819
|
-
const e =
|
|
6830
|
+
const e = U(this.id, Object.values(t.layouts));
|
|
6820
6831
|
if (!e.id)
|
|
6821
|
-
throw new
|
|
6832
|
+
throw new L();
|
|
6822
6833
|
const a = {
|
|
6823
6834
|
...e,
|
|
6824
6835
|
fontSize: this.size
|
|
@@ -6838,9 +6849,9 @@ class Va extends R {
|
|
|
6838
6849
|
}
|
|
6839
6850
|
apply(t) {
|
|
6840
6851
|
this.oldState = t;
|
|
6841
|
-
const e =
|
|
6852
|
+
const e = U(this.id, Object.values(t.layouts));
|
|
6842
6853
|
if (!e.id)
|
|
6843
|
-
throw new
|
|
6854
|
+
throw new L();
|
|
6844
6855
|
const a = {
|
|
6845
6856
|
...e,
|
|
6846
6857
|
fontData: this.fontData
|
|
@@ -6860,9 +6871,9 @@ class es extends R {
|
|
|
6860
6871
|
}
|
|
6861
6872
|
apply(t) {
|
|
6862
6873
|
this.oldState = t;
|
|
6863
|
-
const e =
|
|
6874
|
+
const e = U(this.id, Object.values(t.layouts));
|
|
6864
6875
|
if (!e.id)
|
|
6865
|
-
throw new
|
|
6876
|
+
throw new L();
|
|
6866
6877
|
const a = {
|
|
6867
6878
|
...e,
|
|
6868
6879
|
align: this.align
|
|
@@ -6901,7 +6912,7 @@ class as extends R {
|
|
|
6901
6912
|
const s = {
|
|
6902
6913
|
...e,
|
|
6903
6914
|
elements: i,
|
|
6904
|
-
modificationID:
|
|
6915
|
+
modificationID: N()
|
|
6905
6916
|
};
|
|
6906
6917
|
return {
|
|
6907
6918
|
...t,
|
|
@@ -6918,9 +6929,9 @@ class ns extends R {
|
|
|
6918
6929
|
}
|
|
6919
6930
|
apply(t) {
|
|
6920
6931
|
this.oldState = t;
|
|
6921
|
-
const e =
|
|
6932
|
+
const e = U(this.id, Object.values(t.layouts));
|
|
6922
6933
|
if (!e.id)
|
|
6923
|
-
throw new
|
|
6934
|
+
throw new L();
|
|
6924
6935
|
const a = {
|
|
6925
6936
|
...e,
|
|
6926
6937
|
useThreshold: this.useThreshold,
|
|
@@ -6937,15 +6948,15 @@ class ns extends R {
|
|
|
6937
6948
|
};
|
|
6938
6949
|
}
|
|
6939
6950
|
}
|
|
6940
|
-
class
|
|
6951
|
+
class xc extends R {
|
|
6941
6952
|
constructor(t, e) {
|
|
6942
6953
|
super(), this.id = t, this.src = e;
|
|
6943
6954
|
}
|
|
6944
6955
|
apply(t) {
|
|
6945
6956
|
this.oldState = t;
|
|
6946
|
-
const e =
|
|
6957
|
+
const e = U(this.id, Object.values(t.layouts));
|
|
6947
6958
|
if (!e.id)
|
|
6948
|
-
throw new
|
|
6959
|
+
throw new L();
|
|
6949
6960
|
const a = {
|
|
6950
6961
|
...e,
|
|
6951
6962
|
src: this.src
|
|
@@ -6965,9 +6976,9 @@ class rs extends R {
|
|
|
6965
6976
|
}
|
|
6966
6977
|
apply(t) {
|
|
6967
6978
|
this.oldState = t;
|
|
6968
|
-
const e =
|
|
6979
|
+
const e = U(this.id, Object.values(t.layouts));
|
|
6969
6980
|
if (!e.id)
|
|
6970
|
-
throw new
|
|
6981
|
+
throw new L();
|
|
6971
6982
|
const a = _(e.id, Object.values(t.layouts)), n = Z(Xt(e, this.text, e), a);
|
|
6972
6983
|
return {
|
|
6973
6984
|
...t,
|
|
@@ -6984,9 +6995,9 @@ class ze extends R {
|
|
|
6984
6995
|
}
|
|
6985
6996
|
apply(t) {
|
|
6986
6997
|
this.oldState = t;
|
|
6987
|
-
const e =
|
|
6998
|
+
const e = U(this.id, Object.values(t.layouts));
|
|
6988
6999
|
if (!e.id)
|
|
6989
|
-
throw new
|
|
7000
|
+
throw new L();
|
|
6990
7001
|
const a = {
|
|
6991
7002
|
...e,
|
|
6992
7003
|
strokeColor: this.strokeColor,
|
|
@@ -7007,9 +7018,9 @@ class ia extends R {
|
|
|
7007
7018
|
}
|
|
7008
7019
|
apply(t) {
|
|
7009
7020
|
this.oldState = t;
|
|
7010
|
-
const e =
|
|
7021
|
+
const e = U(this.id, Object.values(t.layouts));
|
|
7011
7022
|
if (!e.id)
|
|
7012
|
-
throw new
|
|
7023
|
+
throw new L();
|
|
7013
7024
|
const a = e.colors || {}, n = a[this.className];
|
|
7014
7025
|
typeof this.fill == "string" ? a[this.className] = {
|
|
7015
7026
|
browserValue: this.fill,
|
|
@@ -7039,9 +7050,9 @@ class is extends R {
|
|
|
7039
7050
|
}
|
|
7040
7051
|
apply(t) {
|
|
7041
7052
|
this.oldState = t;
|
|
7042
|
-
const e =
|
|
7053
|
+
const e = U(this.id, Object.values(t.layouts));
|
|
7043
7054
|
if (!e.id)
|
|
7044
|
-
throw new
|
|
7055
|
+
throw new L();
|
|
7045
7056
|
const a = {
|
|
7046
7057
|
...e,
|
|
7047
7058
|
svg: this.svgBody,
|
|
@@ -7056,7 +7067,7 @@ class is extends R {
|
|
|
7056
7067
|
};
|
|
7057
7068
|
}
|
|
7058
7069
|
}
|
|
7059
|
-
class
|
|
7070
|
+
class kc extends R {
|
|
7060
7071
|
/**
|
|
7061
7072
|
* @param id The targeted element to bring to the front.
|
|
7062
7073
|
*/
|
|
@@ -7064,8 +7075,8 @@ class Dc extends R {
|
|
|
7064
7075
|
super(), this.id = t;
|
|
7065
7076
|
}
|
|
7066
7077
|
apply(t) {
|
|
7067
|
-
if (this.oldState = t, !
|
|
7068
|
-
throw new
|
|
7078
|
+
if (this.oldState = t, !U(this.id, Object.values(t.layouts)).id)
|
|
7079
|
+
throw new L();
|
|
7069
7080
|
const a = Object.values(t.layouts).find((s) => s.elements.find((o) => o.id === this.id));
|
|
7070
7081
|
if (!a)
|
|
7071
7082
|
throw new Error("Layout missing from state!");
|
|
@@ -7079,13 +7090,13 @@ class Dc extends R {
|
|
|
7079
7090
|
[a.layout.id]: {
|
|
7080
7091
|
...t.layouts[a.layout.id],
|
|
7081
7092
|
elements: i,
|
|
7082
|
-
modificationID:
|
|
7093
|
+
modificationID: N()
|
|
7083
7094
|
}
|
|
7084
7095
|
}
|
|
7085
7096
|
};
|
|
7086
7097
|
}
|
|
7087
7098
|
}
|
|
7088
|
-
class
|
|
7099
|
+
class Mc extends R {
|
|
7089
7100
|
/**
|
|
7090
7101
|
* @param id The targeted element to bring to the back.
|
|
7091
7102
|
*/
|
|
@@ -7094,9 +7105,9 @@ class Pc extends R {
|
|
|
7094
7105
|
}
|
|
7095
7106
|
apply(t) {
|
|
7096
7107
|
this.oldState = t;
|
|
7097
|
-
const e =
|
|
7108
|
+
const e = U(this.id, Object.values(t.layouts));
|
|
7098
7109
|
if (!e.id)
|
|
7099
|
-
throw new
|
|
7110
|
+
throw new L();
|
|
7100
7111
|
const a = Object.values(t.layouts).find((o) => o.elements.find((l) => l.id === this.id));
|
|
7101
7112
|
if (!a)
|
|
7102
7113
|
throw new Error("Layout missing from state!");
|
|
@@ -7110,13 +7121,13 @@ class Pc extends R {
|
|
|
7110
7121
|
[a.layout.id]: {
|
|
7111
7122
|
...t.layouts[a.layout.id],
|
|
7112
7123
|
elements: i,
|
|
7113
|
-
modificationID:
|
|
7124
|
+
modificationID: N()
|
|
7114
7125
|
}
|
|
7115
7126
|
}
|
|
7116
7127
|
};
|
|
7117
7128
|
}
|
|
7118
7129
|
}
|
|
7119
|
-
class
|
|
7130
|
+
class Tc extends R {
|
|
7120
7131
|
/**
|
|
7121
7132
|
* @param id The targeted element to bring to the front.
|
|
7122
7133
|
*/
|
|
@@ -7124,8 +7135,8 @@ class Fc extends R {
|
|
|
7124
7135
|
super(), this.id = t;
|
|
7125
7136
|
}
|
|
7126
7137
|
apply(t) {
|
|
7127
|
-
if (this.oldState = t, !
|
|
7128
|
-
throw new
|
|
7138
|
+
if (this.oldState = t, !U(this.id, Object.values(t.layouts)).id)
|
|
7139
|
+
throw new L();
|
|
7129
7140
|
const a = Object.values(t.layouts).find((l) => l.elements.find((c) => c.id === this.id));
|
|
7130
7141
|
if (!a)
|
|
7131
7142
|
throw new Error("Layout missing from state!");
|
|
@@ -7137,13 +7148,13 @@ class Fc extends R {
|
|
|
7137
7148
|
[a.layout.id]: {
|
|
7138
7149
|
...t.layouts[a.layout.id],
|
|
7139
7150
|
elements: s,
|
|
7140
|
-
modificationID:
|
|
7151
|
+
modificationID: N()
|
|
7141
7152
|
}
|
|
7142
7153
|
}
|
|
7143
7154
|
};
|
|
7144
7155
|
}
|
|
7145
7156
|
}
|
|
7146
|
-
class
|
|
7157
|
+
class Nc extends R {
|
|
7147
7158
|
/**
|
|
7148
7159
|
* @param id The targeted element to bring to the front.
|
|
7149
7160
|
*/
|
|
@@ -7151,8 +7162,8 @@ class xc extends R {
|
|
|
7151
7162
|
super(), this.id = t;
|
|
7152
7163
|
}
|
|
7153
7164
|
apply(t) {
|
|
7154
|
-
if (this.oldState = t, !
|
|
7155
|
-
throw new
|
|
7165
|
+
if (this.oldState = t, !U(this.id, Object.values(t.layouts)).id)
|
|
7166
|
+
throw new L();
|
|
7156
7167
|
const a = Object.values(t.layouts).find((l) => l.elements.find((c) => c.id === this.id));
|
|
7157
7168
|
if (!a)
|
|
7158
7169
|
throw new Error("Layout missing from state!");
|
|
@@ -7164,7 +7175,7 @@ class xc extends R {
|
|
|
7164
7175
|
[a.layout.id]: {
|
|
7165
7176
|
...t.layouts[a.layout.id],
|
|
7166
7177
|
elements: s,
|
|
7167
|
-
modificationID:
|
|
7178
|
+
modificationID: N()
|
|
7168
7179
|
}
|
|
7169
7180
|
}
|
|
7170
7181
|
};
|
|
@@ -7190,7 +7201,7 @@ class za {
|
|
|
7190
7201
|
throw new Error("Undefined raster silent step source");
|
|
7191
7202
|
const h = {
|
|
7192
7203
|
stepName: this.configuration.stepName,
|
|
7193
|
-
id:
|
|
7204
|
+
id: N(),
|
|
7194
7205
|
src: u,
|
|
7195
7206
|
type: o,
|
|
7196
7207
|
y: n.top,
|
|
@@ -7223,7 +7234,7 @@ class za {
|
|
|
7223
7234
|
}).catch((C) => console.error(C));
|
|
7224
7235
|
}))()), g = {
|
|
7225
7236
|
stepName: this.configuration.stepName,
|
|
7226
|
-
id:
|
|
7237
|
+
id: N(),
|
|
7227
7238
|
cachedObjectURL: await qt(m.svg),
|
|
7228
7239
|
src: u,
|
|
7229
7240
|
svg: m.svg,
|
|
@@ -7285,7 +7296,7 @@ const ss = async (r) => {
|
|
|
7285
7296
|
throw console.error(e), new Be("Failed to shorten URL, see console.");
|
|
7286
7297
|
}
|
|
7287
7298
|
};
|
|
7288
|
-
class
|
|
7299
|
+
class Un {
|
|
7289
7300
|
async poll() {
|
|
7290
7301
|
try {
|
|
7291
7302
|
if (await this.predicate()) {
|
|
@@ -7332,7 +7343,7 @@ class os {
|
|
|
7332
7343
|
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;
|
|
7333
7344
|
return { asset: h, link: m };
|
|
7334
7345
|
}, s = await new Promise((h, m) => {
|
|
7335
|
-
new
|
|
7346
|
+
new Un(
|
|
7336
7347
|
async () => !!(await i()).link,
|
|
7337
7348
|
async () => {
|
|
7338
7349
|
const g = await i();
|
|
@@ -7368,7 +7379,7 @@ class os {
|
|
|
7368
7379
|
}), d;
|
|
7369
7380
|
}
|
|
7370
7381
|
async regionElements(t) {
|
|
7371
|
-
const e = (a) => ({ id:
|
|
7382
|
+
const e = (a) => ({ id: N(), region: a });
|
|
7372
7383
|
return t.data.regions.map(e);
|
|
7373
7384
|
}
|
|
7374
7385
|
async command(t, e, a, n) {
|
|
@@ -7400,7 +7411,7 @@ class os {
|
|
|
7400
7411
|
} };
|
|
7401
7412
|
}
|
|
7402
7413
|
}
|
|
7403
|
-
const
|
|
7414
|
+
const Ln = new os();
|
|
7404
7415
|
class we {
|
|
7405
7416
|
constructor() {
|
|
7406
7417
|
this.frameSourceSvg = async (t, e) => {
|
|
@@ -7426,7 +7437,7 @@ class we {
|
|
|
7426
7437
|
const s = e.getWorkflowExperience().getBundle();
|
|
7427
7438
|
if (s && t.globalPropertyAspectConfigurations) {
|
|
7428
7439
|
const o = s.getGlobalPropertyStateManager(), l = t.globalPropertyAspectConfigurations[0], c = o.getAspectStorage(l.aspectName);
|
|
7429
|
-
c && c.originalAssetKey && (i = (await
|
|
7440
|
+
c && c.originalAssetKey && (i = (await $.getLocalOrFromServer(c.originalAssetKey)).fileLink);
|
|
7430
7441
|
}
|
|
7431
7442
|
if (t.option && t.option.variants && t.option.variants.length > 0) {
|
|
7432
7443
|
const o = t.option, l = X.getDefaultVariant(o);
|
|
@@ -7522,14 +7533,14 @@ class we {
|
|
|
7522
7533
|
const o = e.fileLink || "";
|
|
7523
7534
|
return o.endsWith(".pdf") || o.endsWith(".eps") || o.endsWith(".ai") ? new Promise((c) => {
|
|
7524
7535
|
a.addPoller(
|
|
7525
|
-
new
|
|
7536
|
+
new Un(
|
|
7526
7537
|
async () => {
|
|
7527
7538
|
var h;
|
|
7528
|
-
const A = (h = (await
|
|
7539
|
+
const A = (h = (await $.getFromServer(e.key || "")).versions) == null ? void 0 : h.find((m) => m.name === "svg");
|
|
7529
7540
|
return A ? (await rt(A.link)).status === 200 : !1;
|
|
7530
7541
|
},
|
|
7531
7542
|
() => {
|
|
7532
|
-
|
|
7543
|
+
$.getLocalOrFromServer(e.key || "").then((d) => {
|
|
7533
7544
|
this.loadPatternFromAsset(d, t, a, n).then(
|
|
7534
7545
|
c
|
|
7535
7546
|
);
|
|
@@ -7698,7 +7709,7 @@ class we {
|
|
|
7698
7709
|
c && !t.data.forceImageCover ? { scale: c } : void 0,
|
|
7699
7710
|
t.data.forceImageCover
|
|
7700
7711
|
) : void 0, v = p ? {
|
|
7701
|
-
id:
|
|
7712
|
+
id: N(),
|
|
7702
7713
|
src: p.src,
|
|
7703
7714
|
x: (w == null ? void 0 : w.x) || 0,
|
|
7704
7715
|
y: (w == null ? void 0 : w.y) || 0,
|
|
@@ -7707,7 +7718,7 @@ class we {
|
|
|
7707
7718
|
scaleX: (w == null ? void 0 : w.zoom) || 1,
|
|
7708
7719
|
scaleY: (w == null ? void 0 : w.zoom) || 1,
|
|
7709
7720
|
rotation: 0
|
|
7710
|
-
} : void 0, S =
|
|
7721
|
+
} : void 0, S = N(), E = n.getLayouts().find((I) => I.panelId === m.panelId);
|
|
7711
7722
|
if (!E)
|
|
7712
7723
|
throw new Y(m);
|
|
7713
7724
|
return {
|
|
@@ -7824,7 +7835,7 @@ class ls {
|
|
|
7824
7835
|
if (a.length === 0)
|
|
7825
7836
|
return [];
|
|
7826
7837
|
try {
|
|
7827
|
-
return
|
|
7838
|
+
return U(
|
|
7828
7839
|
a[0].id,
|
|
7829
7840
|
e.getAllLayoutData()
|
|
7830
7841
|
).colors;
|
|
@@ -7909,7 +7920,7 @@ class ls {
|
|
|
7909
7920
|
var h, m;
|
|
7910
7921
|
if (e.length === 0)
|
|
7911
7922
|
return;
|
|
7912
|
-
const s =
|
|
7923
|
+
const s = U(
|
|
7913
7924
|
e[0].id,
|
|
7914
7925
|
n().map((g) => g.layoutState)
|
|
7915
7926
|
), o = { ...s.colors }, l = {};
|
|
@@ -7966,7 +7977,7 @@ class ls {
|
|
|
7966
7977
|
const w = i.getLayouts().find((S) => S.panelId === C.panelId);
|
|
7967
7978
|
if (!w)
|
|
7968
7979
|
throw new Y(C);
|
|
7969
|
-
const v =
|
|
7980
|
+
const v = N();
|
|
7970
7981
|
return {
|
|
7971
7982
|
regionElement: { id: v, region: C },
|
|
7972
7983
|
command: this.getCreateElementCommand(v, C, w, {
|
|
@@ -8235,7 +8246,7 @@ class As {
|
|
|
8235
8246
|
return console.error("Missing configuration."), null;
|
|
8236
8247
|
a.updateStorage(t.stepName, { text: e }), a.updateMetadata(t.stepName, { text: e });
|
|
8237
8248
|
const c = (A, u, h) => {
|
|
8238
|
-
const m = h ||
|
|
8249
|
+
const m = h || N(), f = a.getLayouts().find((C) => C.panelId === u.panelId);
|
|
8239
8250
|
if (!f)
|
|
8240
8251
|
return console.error(`Can not find layout for region: ${u.panelId}`), null;
|
|
8241
8252
|
const p = [];
|
|
@@ -8365,7 +8376,7 @@ class us {
|
|
|
8365
8376
|
const h = a.getLayouts().find((g) => g.panelId === A.panelId);
|
|
8366
8377
|
if (!h)
|
|
8367
8378
|
throw new Y(A);
|
|
8368
|
-
const m =
|
|
8379
|
+
const m = N();
|
|
8369
8380
|
return {
|
|
8370
8381
|
regionElement: { id: m, region: A },
|
|
8371
8382
|
command: new W(
|
|
@@ -8594,7 +8605,7 @@ class ms {
|
|
|
8594
8605
|
</svg>
|
|
8595
8606
|
`, p = {};
|
|
8596
8607
|
p[this.shapeFillId] = { browserValue: g };
|
|
8597
|
-
const C =
|
|
8608
|
+
const C = N();
|
|
8598
8609
|
return {
|
|
8599
8610
|
id: C,
|
|
8600
8611
|
region: h,
|
|
@@ -8636,7 +8647,7 @@ class ms {
|
|
|
8636
8647
|
}
|
|
8637
8648
|
}
|
|
8638
8649
|
}
|
|
8639
|
-
const
|
|
8650
|
+
const Lt = new ms();
|
|
8640
8651
|
class gs {
|
|
8641
8652
|
constructor() {
|
|
8642
8653
|
this.latestToast = null, this.toastType = null, this.toastCallbacks = [];
|
|
@@ -8697,13 +8708,13 @@ const fs = new gs(), Ge = (r, t, e, a, n) => {
|
|
|
8697
8708
|
return [i, s] = Ge(e, a, r, u, o), [n.size, i, s];
|
|
8698
8709
|
}
|
|
8699
8710
|
const c = 6;
|
|
8700
|
-
let d = c -
|
|
8711
|
+
let d = c - $e;
|
|
8701
8712
|
if (a.length > 0) {
|
|
8702
8713
|
let u = a, h = 0;
|
|
8703
8714
|
for (; (!n.maxSize || d <= n.maxSize) && u; )
|
|
8704
|
-
d +=
|
|
8715
|
+
d += $e, h = d / l.unitsPerEm, [u, s] = Ge(e, a, d, h, o);
|
|
8705
8716
|
}
|
|
8706
|
-
d > c && (d -=
|
|
8717
|
+
d > c && (d -= $e), n.minSize && d < n.minSize && (d = n.minSize);
|
|
8707
8718
|
const A = d / l.unitsPerEm;
|
|
8708
8719
|
return [i, s] = Ge(e, a, d, A, o), [d, i, s];
|
|
8709
8720
|
}, We = 30;
|
|
@@ -8799,7 +8810,7 @@ class Cs {
|
|
|
8799
8810
|
return null;
|
|
8800
8811
|
}
|
|
8801
8812
|
findLayoutElements(t, e) {
|
|
8802
|
-
return t.getRegionElements(e.stepName).map((i) =>
|
|
8813
|
+
return t.getRegionElements(e.stepName).map((i) => U(i.id, t.getAllLayoutData()));
|
|
8803
8814
|
}
|
|
8804
8815
|
/**
|
|
8805
8816
|
* Get the colors that can be used for a given text step.
|
|
@@ -9140,18 +9151,18 @@ class Cs {
|
|
|
9140
9151
|
throw new Error("Step data not supplied");
|
|
9141
9152
|
const o = i.text || a.defaultText || "", l = this.getProcessedInput(o, a, !1), c = async (A) => {
|
|
9142
9153
|
var g;
|
|
9143
|
-
const h = s.getLayouts().find((f) => f.panelId === A.panelId), m =
|
|
9154
|
+
const h = s.getLayouts().find((f) => f.panelId === A.panelId), m = N();
|
|
9144
9155
|
try {
|
|
9145
9156
|
if (!h)
|
|
9146
9157
|
throw new Se("Failed to find layout for region: " + A.panelId);
|
|
9147
9158
|
const f = a.colorOption;
|
|
9148
9159
|
let p;
|
|
9149
9160
|
if (f && f.variants) {
|
|
9150
|
-
const
|
|
9161
|
+
const Q = f.variants.find((V) => {
|
|
9151
9162
|
var j;
|
|
9152
9163
|
return V.id === ((j = f.defaultVariant) == null ? void 0 : j.id);
|
|
9153
9164
|
}) || f.variants[0];
|
|
9154
|
-
p = this.createTextFillSpotColor(f,
|
|
9165
|
+
p = this.createTextFillSpotColor(f, Q), s.updateStorage(t, {
|
|
9155
9166
|
colorProfileAssetKey: (g = f.colorProfile) == null ? void 0 : g.key
|
|
9156
9167
|
});
|
|
9157
9168
|
}
|
|
@@ -9446,7 +9457,7 @@ class Ds extends ws {
|
|
|
9446
9457
|
return this.svgElement(t, e);
|
|
9447
9458
|
}
|
|
9448
9459
|
svgElement(t, e) {
|
|
9449
|
-
const a =
|
|
9460
|
+
const a = Li(ys), i = t !== "" ? ((w) => w.charAt(0).toUpperCase() + w.substr(1).toLowerCase())(t) : "", s = a.getPath(i, 0, 72, 72), o = s.toSVG(2), l = s.getBoundingBox(), c = l.x2 - l.x1, d = s.toPathData(3), A = () => {
|
|
9450
9461
|
const w = tt("g");
|
|
9451
9462
|
w.classList.add("module-text-group");
|
|
9452
9463
|
const v = tt("defs");
|
|
@@ -9460,7 +9471,7 @@ class Ds extends ws {
|
|
|
9460
9471
|
const I = tt("g");
|
|
9461
9472
|
I.classList.add("module-layer2"), w.appendChild(I), I.setAttribute("fill", "rgb(255,209,0)"), I.setAttribute("transform", "translate(1,-0.1)"), I.innerHTML = o;
|
|
9462
9473
|
const P = tt("g");
|
|
9463
|
-
return P.classList.add("module-layer3"), w.appendChild(P), P.setAttribute("fill", "white"), P.innerHTML = o, new Is(w).transform(([M,
|
|
9474
|
+
return P.classList.add("module-layer3"), w.appendChild(P), P.setAttribute("fill", "white"), P.innerHTML = o, new Is(w).transform(([M, Q]) => [M, Q + (c / 2 - M) ** 2 / (c * 6)]), w;
|
|
9464
9475
|
}, u = tt("g");
|
|
9465
9476
|
u.classList.add("module-root");
|
|
9466
9477
|
const h = tt("defs");
|
|
@@ -9770,15 +9781,22 @@ const xs = y`
|
|
|
9770
9781
|
}
|
|
9771
9782
|
}
|
|
9772
9783
|
}
|
|
9773
|
-
`,
|
|
9784
|
+
`, Ns = y`
|
|
9774
9785
|
query GetProductCollectionForFilteredProducts(
|
|
9775
9786
|
$id: String!
|
|
9776
9787
|
$filters: ProductCollectionProductFilterInput
|
|
9777
9788
|
$tags: ProductCollectionProductTagFilterInput
|
|
9789
|
+
$sortKey: ProductCollectionProductSortKey
|
|
9790
|
+
$sortDescending: Boolean
|
|
9778
9791
|
) {
|
|
9779
9792
|
productCollections(ids: [$id]) {
|
|
9780
9793
|
id
|
|
9781
|
-
productCollectionProducts(
|
|
9794
|
+
productCollectionProducts(
|
|
9795
|
+
filters: $filters
|
|
9796
|
+
tags: $tags
|
|
9797
|
+
sortKey: $sortKey
|
|
9798
|
+
sortDescending: $sortDescending
|
|
9799
|
+
) {
|
|
9782
9800
|
id
|
|
9783
9801
|
product {
|
|
9784
9802
|
id
|
|
@@ -9786,7 +9804,7 @@ const xs = y`
|
|
|
9786
9804
|
}
|
|
9787
9805
|
}
|
|
9788
9806
|
}
|
|
9789
|
-
`,
|
|
9807
|
+
`, Qs = y`
|
|
9790
9808
|
${Ea}
|
|
9791
9809
|
query GetProductCollectionForProductsFeed(
|
|
9792
9810
|
$id: String!
|
|
@@ -9794,10 +9812,19 @@ const xs = y`
|
|
|
9794
9812
|
$offset: Int
|
|
9795
9813
|
$filters: ProductCollectionProductFilterInput
|
|
9796
9814
|
$tags: ProductCollectionProductTagFilterInput
|
|
9815
|
+
$sortKey: ProductCollectionProductSortKey
|
|
9816
|
+
$sortDescending: Boolean
|
|
9797
9817
|
) {
|
|
9798
9818
|
productCollections(ids: [$id]) {
|
|
9799
9819
|
id
|
|
9800
|
-
productCollectionProductsFeed(
|
|
9820
|
+
productCollectionProductsFeed(
|
|
9821
|
+
filters: $filters
|
|
9822
|
+
tags: $tags
|
|
9823
|
+
limit: $limit
|
|
9824
|
+
offset: $offset
|
|
9825
|
+
sortKey: $sortKey
|
|
9826
|
+
sortDescending: $sortDescending
|
|
9827
|
+
) {
|
|
9801
9828
|
items {
|
|
9802
9829
|
...ProductCollectionProductFields
|
|
9803
9830
|
}
|
|
@@ -9875,19 +9902,19 @@ const xs = y`
|
|
|
9875
9902
|
}
|
|
9876
9903
|
}
|
|
9877
9904
|
}
|
|
9878
|
-
`,
|
|
9905
|
+
`, $s = y`
|
|
9879
9906
|
mutation UpdateBundle($id: String!, $name: String, $metadata: [MetadataInput!], $bundleStateData: String) {
|
|
9880
9907
|
bundleUpdate(id: $id, name: $name, metadata: $metadata, bundleStateData: $bundleStateData) {
|
|
9881
9908
|
id
|
|
9882
9909
|
}
|
|
9883
9910
|
}
|
|
9884
|
-
`,
|
|
9911
|
+
`, Us = y`
|
|
9885
9912
|
mutation BundleAddTransaction($id: String!, $transactionId: String!) {
|
|
9886
9913
|
bundleAddTransaction(id: $id, transactionId: $transactionId) {
|
|
9887
9914
|
id
|
|
9888
9915
|
}
|
|
9889
9916
|
}
|
|
9890
|
-
`,
|
|
9917
|
+
`, Ls = y`
|
|
9891
9918
|
mutation BundleAddTransactions($id: String!, $transactionIds: [String!]!, $transactionOwnerIds: [String!]) {
|
|
9892
9919
|
bundleAddTransactions(id: $id, transactionIds: $transactionIds, transactionOwnerIds: $transactionOwnerIds) {
|
|
9893
9920
|
id
|
|
@@ -10034,9 +10061,27 @@ const xs = y`
|
|
|
10034
10061
|
mutation RejectTransaction($id: String!, $note: String) {
|
|
10035
10062
|
transactionReject(id: $id, note: $note)
|
|
10036
10063
|
}
|
|
10064
|
+
`, eo = y`
|
|
10065
|
+
mutation CreateRecipient($firstName: String, $lastName: String, $address: String, $suburb: String, $state: String, $email: String, $postalCode: String, $country: String) {
|
|
10066
|
+
recipientCreate(firstName: $firstName, lastName: $lastName, address: $address, suburb: $suburb, state: $state, email: $email, postalCode: $postalCode, country: $country) {
|
|
10067
|
+
id
|
|
10068
|
+
}
|
|
10069
|
+
}
|
|
10070
|
+
`, ao = y`
|
|
10071
|
+
mutation UpdateRecipient($id: String!, $firstName: String, $lastName: String, $address: String, $suburb: String, $state: String, $email: String, $postalCode: String, $country: String) {
|
|
10072
|
+
recipientUpdate(id: $id, firstName: $firstName, lastName: $lastName, address: $address, suburb: $suburb, state: $state, email: $email, postalCode: $postalCode, country: $country) {
|
|
10073
|
+
id
|
|
10074
|
+
}
|
|
10075
|
+
}
|
|
10076
|
+
`, no = y`
|
|
10077
|
+
mutation AtttachRecipient($id: String!, $recipientId: String!) {
|
|
10078
|
+
transactionAttachRecipient(id: $id, recipientId: $recipientId) {
|
|
10079
|
+
id
|
|
10080
|
+
}
|
|
10081
|
+
}
|
|
10037
10082
|
`;
|
|
10038
10083
|
var Me = /* @__PURE__ */ ((r) => (r.Error = "Error", r.Warning = "Warning", r.Info = "Info", r))(Me || {});
|
|
10039
|
-
const
|
|
10084
|
+
const ro = 1e3;
|
|
10040
10085
|
class ja extends Dn {
|
|
10041
10086
|
constructor(t) {
|
|
10042
10087
|
super(), this.createdAt = /* @__PURE__ */ new Date(), this.update = t;
|
|
@@ -10045,11 +10090,11 @@ class ja extends Dn {
|
|
|
10045
10090
|
await this.update(), await new Promise((t) => {
|
|
10046
10091
|
window.setTimeout(() => {
|
|
10047
10092
|
t();
|
|
10048
|
-
},
|
|
10093
|
+
}, ro);
|
|
10049
10094
|
});
|
|
10050
10095
|
}
|
|
10051
10096
|
}
|
|
10052
|
-
class
|
|
10097
|
+
class io {
|
|
10053
10098
|
constructor(t, e, a, n, i, s, o, l, c, d, A, u, h = !1, m, g = !1, f = !1, p = !1) {
|
|
10054
10099
|
this.workflowStatePromiseQueue = new Pn(1), this.initialized = !1, this.readOnly = !1, this.isReloadedTransaction = !1, this.singleVariantsRenderable = !1, this.stepTags = {}, this.renderLayouts = () => {
|
|
10055
10100
|
var v;
|
|
@@ -10071,6 +10116,52 @@ class ao {
|
|
|
10071
10116
|
})
|
|
10072
10117
|
);
|
|
10073
10118
|
}
|
|
10119
|
+
async updateRecipient(t, e, a, n, i, s, o, l) {
|
|
10120
|
+
var c, d;
|
|
10121
|
+
if (this.transaction.recipient)
|
|
10122
|
+
await b.getShadowGraphqlClient().mutate({
|
|
10123
|
+
mutation: ao,
|
|
10124
|
+
errorPolicy: "all",
|
|
10125
|
+
fetchPolicy: "no-cache",
|
|
10126
|
+
variables: {
|
|
10127
|
+
id: this.transaction.recipient.id,
|
|
10128
|
+
firstName: t,
|
|
10129
|
+
lastName: e,
|
|
10130
|
+
address: a,
|
|
10131
|
+
suburb: n,
|
|
10132
|
+
state: i,
|
|
10133
|
+
email: s,
|
|
10134
|
+
postalCode: o,
|
|
10135
|
+
country: l
|
|
10136
|
+
}
|
|
10137
|
+
});
|
|
10138
|
+
else {
|
|
10139
|
+
const A = await b.getShadowGraphqlClient().mutate({
|
|
10140
|
+
mutation: eo,
|
|
10141
|
+
errorPolicy: "all",
|
|
10142
|
+
fetchPolicy: "no-cache",
|
|
10143
|
+
variables: {
|
|
10144
|
+
firstName: t,
|
|
10145
|
+
lastName: e,
|
|
10146
|
+
address: a,
|
|
10147
|
+
suburb: n,
|
|
10148
|
+
state: i,
|
|
10149
|
+
email: s,
|
|
10150
|
+
postalCode: o,
|
|
10151
|
+
country: l
|
|
10152
|
+
}
|
|
10153
|
+
});
|
|
10154
|
+
await b.getShadowGraphqlClient().mutate({
|
|
10155
|
+
mutation: no,
|
|
10156
|
+
errorPolicy: "all",
|
|
10157
|
+
fetchPolicy: "no-cache",
|
|
10158
|
+
variables: {
|
|
10159
|
+
id: this.transaction.id,
|
|
10160
|
+
recipientId: (d = (c = A.data) == null ? void 0 : c.recipientCreate) == null ? void 0 : d.id
|
|
10161
|
+
}
|
|
10162
|
+
});
|
|
10163
|
+
}
|
|
10164
|
+
}
|
|
10074
10165
|
async initializeDefaultWorkflowState(t) {
|
|
10075
10166
|
const e = () => {
|
|
10076
10167
|
var d, A;
|
|
@@ -10234,7 +10325,7 @@ class ao {
|
|
|
10234
10325
|
this.pendingUpdates = this.pendingUpdates.filter((e) => e !== t);
|
|
10235
10326
|
}
|
|
10236
10327
|
markUpdatePending() {
|
|
10237
|
-
const t =
|
|
10328
|
+
const t = N();
|
|
10238
10329
|
return this.pendingUpdates = [...this.pendingUpdates, t], t;
|
|
10239
10330
|
}
|
|
10240
10331
|
setEditedStatus(t, e) {
|
|
@@ -10343,7 +10434,7 @@ class ao {
|
|
|
10343
10434
|
};
|
|
10344
10435
|
if (!rn(a, this.storage)) {
|
|
10345
10436
|
this.storage = a;
|
|
10346
|
-
const n = new
|
|
10437
|
+
const n = new La(this.constructSerializableWorkflow());
|
|
10347
10438
|
this.commandContext.apply(n, !0), this.onStepSpecificStorageChange(t), this.onStorageChange();
|
|
10348
10439
|
}
|
|
10349
10440
|
}
|
|
@@ -10558,7 +10649,7 @@ class ao {
|
|
|
10558
10649
|
const B = (S = this.getWorkflowExperience().getStepById(g.stepName)) == null ? void 0 : S.frameService;
|
|
10559
10650
|
B == null || B.setTargetElements(a.map((E) => E.id));
|
|
10560
10651
|
}
|
|
10561
|
-
const f = u.map((B) => new vt(B.id)), p = new
|
|
10652
|
+
const f = u.map((B) => new vt(B.id)), p = new La(this.constructSerializableWorkflow()), C = [...m, ...f, p];
|
|
10562
10653
|
C.length > 0 && this.commandContext.apply(new O(C), !0), await this.ensureStepsAreLoaded(), this.onElementsChange();
|
|
10563
10654
|
const w = this.getInvalidModelVariants(), v = this.modelContainer;
|
|
10564
10655
|
if (v) {
|
|
@@ -10582,7 +10673,7 @@ class ao {
|
|
|
10582
10673
|
switch (this.stepInitialised[l.stepName] = !0, l.type) {
|
|
10583
10674
|
case D.DigitalContent:
|
|
10584
10675
|
a.push(
|
|
10585
|
-
|
|
10676
|
+
Ln.init(
|
|
10586
10677
|
l,
|
|
10587
10678
|
this,
|
|
10588
10679
|
this.reloadedState
|
|
@@ -10625,7 +10716,7 @@ class ao {
|
|
|
10625
10716
|
);
|
|
10626
10717
|
break;
|
|
10627
10718
|
case D.Shape:
|
|
10628
|
-
a.push(
|
|
10719
|
+
a.push(Lt.init(l, this, this.reloadedState));
|
|
10629
10720
|
break;
|
|
10630
10721
|
case D.Text:
|
|
10631
10722
|
a.push(q.init(l, this, this.reloadedState));
|
|
@@ -10688,7 +10779,7 @@ class ao {
|
|
|
10688
10779
|
this.validationCallbacks.forEach((t) => t(this.validationErrors));
|
|
10689
10780
|
}
|
|
10690
10781
|
traversableScenes() {
|
|
10691
|
-
return
|
|
10782
|
+
return Qi(this.allScenes, this.stepSelections, this.singleVariantsRenderable);
|
|
10692
10783
|
}
|
|
10693
10784
|
}
|
|
10694
10785
|
class st {
|
|
@@ -10907,7 +10998,7 @@ const qn = class sa {
|
|
|
10907
10998
|
};
|
|
10908
10999
|
qn.updateState = /* @__PURE__ */ new Map();
|
|
10909
11000
|
let it = qn;
|
|
10910
|
-
class
|
|
11001
|
+
class so extends it {
|
|
10911
11002
|
constructor(t, e, a) {
|
|
10912
11003
|
super(t, e, a);
|
|
10913
11004
|
}
|
|
@@ -10935,7 +11026,7 @@ class no extends it {
|
|
|
10935
11026
|
const t = this.manager.getRegionElements(this.step.stepName) || [];
|
|
10936
11027
|
if (t.length === 0)
|
|
10937
11028
|
return;
|
|
10938
|
-
const a =
|
|
11029
|
+
const a = U(t[0].id, this.manager.getAllLayoutData()).colors, n = (o = this.getCurrentVariant()) == null ? void 0 : o.getAssetResource(), i = n == null ? void 0 : n.assetConfiguration, s = (i == null ? void 0 : i.defaultColorVariants) || [];
|
|
10939
11030
|
if (s.length !== 0) {
|
|
10940
11031
|
const l = {};
|
|
10941
11032
|
return s.forEach((c) => {
|
|
@@ -10985,7 +11076,7 @@ class no extends it {
|
|
|
10985
11076
|
return this.step.data.pmsPickerEnabled ?? !1;
|
|
10986
11077
|
}
|
|
10987
11078
|
}
|
|
10988
|
-
class
|
|
11079
|
+
class oo extends it {
|
|
10989
11080
|
constructor(t, e, a) {
|
|
10990
11081
|
super(t, e, a);
|
|
10991
11082
|
}
|
|
@@ -10998,7 +11089,7 @@ class ro extends it {
|
|
|
10998
11089
|
);
|
|
10999
11090
|
}
|
|
11000
11091
|
}
|
|
11001
|
-
class
|
|
11092
|
+
class lo extends it {
|
|
11002
11093
|
constructor(t, e, a) {
|
|
11003
11094
|
super(t, e, a);
|
|
11004
11095
|
}
|
|
@@ -11011,7 +11102,7 @@ class io extends it {
|
|
|
11011
11102
|
);
|
|
11012
11103
|
}
|
|
11013
11104
|
}
|
|
11014
|
-
class
|
|
11105
|
+
class co extends it {
|
|
11015
11106
|
constructor(t, e, a) {
|
|
11016
11107
|
super(t, e, a);
|
|
11017
11108
|
}
|
|
@@ -11029,7 +11120,7 @@ class so extends it {
|
|
|
11029
11120
|
);
|
|
11030
11121
|
}
|
|
11031
11122
|
}
|
|
11032
|
-
class
|
|
11123
|
+
class Ao extends it {
|
|
11033
11124
|
constructor(t, e, a) {
|
|
11034
11125
|
super(t, e, a);
|
|
11035
11126
|
}
|
|
@@ -11046,13 +11137,13 @@ class oo extends it {
|
|
|
11046
11137
|
return this.step.data.displayType || ((t = this.step.option) == null ? void 0 : t.displayType);
|
|
11047
11138
|
}
|
|
11048
11139
|
}
|
|
11049
|
-
class
|
|
11140
|
+
class uo extends it {
|
|
11050
11141
|
constructor(t, e, a) {
|
|
11051
11142
|
super(t, e, a);
|
|
11052
11143
|
}
|
|
11053
11144
|
selectVariant(t) {
|
|
11054
11145
|
const e = t.getResource();
|
|
11055
|
-
return
|
|
11146
|
+
return Lt.selectVariant(
|
|
11056
11147
|
this.step,
|
|
11057
11148
|
{
|
|
11058
11149
|
fill: e.color,
|
|
@@ -11070,7 +11161,7 @@ class lo extends it {
|
|
|
11070
11161
|
* @deprecated The shape step can now pass through colors returned by getColors via selectVariant. Please swap setColor for selectVariant.
|
|
11071
11162
|
*/
|
|
11072
11163
|
setColor(t) {
|
|
11073
|
-
return
|
|
11164
|
+
return Lt.selectVariant(
|
|
11074
11165
|
this.step,
|
|
11075
11166
|
t,
|
|
11076
11167
|
this.manager.getRegionElements(this.step.stepName) || [],
|
|
@@ -11082,7 +11173,7 @@ class lo extends it {
|
|
|
11082
11173
|
* @returns A list of color definitions that are currently applied to the illustration.
|
|
11083
11174
|
*/
|
|
11084
11175
|
getColors() {
|
|
11085
|
-
return
|
|
11176
|
+
return Lt.availableColours(this.step);
|
|
11086
11177
|
}
|
|
11087
11178
|
/**
|
|
11088
11179
|
* Allows for setting a custom color when the custom variant is selected. Will
|
|
@@ -11090,7 +11181,7 @@ class lo extends it {
|
|
|
11090
11181
|
*/
|
|
11091
11182
|
setCustomColor(t) {
|
|
11092
11183
|
var e, a;
|
|
11093
|
-
return ((e = this.getCurrentVariant()) == null ? void 0 : e.getColor()) !== "#custom" && console.warn(`setting custom color for step ${this.step.stepName} but color is ${(a = this.getCurrentVariant()) == null ? void 0 : a.getColor()}`),
|
|
11184
|
+
return ((e = this.getCurrentVariant()) == null ? void 0 : e.getColor()) !== "#custom" && console.warn(`setting custom color for step ${this.step.stepName} but color is ${(a = this.getCurrentVariant()) == null ? void 0 : a.getColor()}`), Lt.setCustomColor(t, this.step, this.manager);
|
|
11094
11185
|
}
|
|
11095
11186
|
getCustomColor() {
|
|
11096
11187
|
var e, a, n;
|
|
@@ -11101,7 +11192,7 @@ class lo extends it {
|
|
|
11101
11192
|
return t;
|
|
11102
11193
|
}
|
|
11103
11194
|
}
|
|
11104
|
-
class
|
|
11195
|
+
class ho extends it {
|
|
11105
11196
|
constructor(t, e, a) {
|
|
11106
11197
|
super(t, e, a);
|
|
11107
11198
|
}
|
|
@@ -11302,7 +11393,7 @@ class co extends it {
|
|
|
11302
11393
|
await q.changeStrokeColor(this.step, t, e, this.manager);
|
|
11303
11394
|
}
|
|
11304
11395
|
}
|
|
11305
|
-
class
|
|
11396
|
+
class mo extends it {
|
|
11306
11397
|
constructor(t, e, a) {
|
|
11307
11398
|
super(t, e, a);
|
|
11308
11399
|
}
|
|
@@ -11315,7 +11406,7 @@ class Ao extends it {
|
|
|
11315
11406
|
return this.step.data.content;
|
|
11316
11407
|
}
|
|
11317
11408
|
}
|
|
11318
|
-
class
|
|
11409
|
+
class go extends it {
|
|
11319
11410
|
constructor(t, e, a) {
|
|
11320
11411
|
super(t, e, a);
|
|
11321
11412
|
}
|
|
@@ -11334,7 +11425,7 @@ class uo extends it {
|
|
|
11334
11425
|
* @returns The final URL string for the QR code.
|
|
11335
11426
|
*/
|
|
11336
11427
|
async selectVideo(t) {
|
|
11337
|
-
return
|
|
11428
|
+
return Ln.regenerateQRCode(
|
|
11338
11429
|
this.manager.getRegionElements(this.step.stepName),
|
|
11339
11430
|
t.key,
|
|
11340
11431
|
this.manager,
|
|
@@ -11342,7 +11433,7 @@ class uo extends it {
|
|
|
11342
11433
|
);
|
|
11343
11434
|
}
|
|
11344
11435
|
}
|
|
11345
|
-
class
|
|
11436
|
+
class fo extends it {
|
|
11346
11437
|
constructor(t, e, a) {
|
|
11347
11438
|
super(t, e, a);
|
|
11348
11439
|
}
|
|
@@ -11394,27 +11485,27 @@ class ie {
|
|
|
11394
11485
|
static get(t, e) {
|
|
11395
11486
|
switch (e.type) {
|
|
11396
11487
|
case D.DigitalContent:
|
|
11397
|
-
return new
|
|
11488
|
+
return new go(t, e, t.getStepTags(e.stepName));
|
|
11398
11489
|
case D.Information:
|
|
11399
|
-
return new
|
|
11490
|
+
return new mo(t, e, t.getStepTags(e.stepName));
|
|
11400
11491
|
case D.Question:
|
|
11401
|
-
return new
|
|
11492
|
+
return new Ao(t, e, t.getStepTags(e.stepName));
|
|
11402
11493
|
case D.Text:
|
|
11403
|
-
return new
|
|
11494
|
+
return new ho(t, e, t.getStepTags(e.stepName));
|
|
11404
11495
|
case D.Illustration:
|
|
11405
|
-
return new no(t, e, t.getStepTags(e.stepName));
|
|
11406
|
-
case D.Picture:
|
|
11407
11496
|
return new so(t, e, t.getStepTags(e.stepName));
|
|
11497
|
+
case D.Picture:
|
|
11498
|
+
return new co(t, e, t.getStepTags(e.stepName));
|
|
11408
11499
|
case D.Shape:
|
|
11409
|
-
return new
|
|
11500
|
+
return new uo(t, e, t.getStepTags(e.stepName));
|
|
11410
11501
|
case D.Material:
|
|
11411
|
-
return new
|
|
11502
|
+
return new oo(t, e, t.getStepTags(e.stepName));
|
|
11412
11503
|
case D.Model:
|
|
11413
|
-
return new
|
|
11504
|
+
return new lo(t, e, t.getStepTags(e.stepName));
|
|
11414
11505
|
case D.Frame:
|
|
11415
|
-
return new
|
|
11506
|
+
return new Dl(t, e, t.getStepTags(e.stepName));
|
|
11416
11507
|
case D.Module:
|
|
11417
|
-
return new
|
|
11508
|
+
return new fo(t, e, t.getStepTags(e.stepName));
|
|
11418
11509
|
default:
|
|
11419
11510
|
throw new z(`Step type ${e.type} not yet supported in Core SDK`);
|
|
11420
11511
|
}
|
|
@@ -11445,7 +11536,7 @@ const Yn = y`
|
|
|
11445
11536
|
externalProductVariantId
|
|
11446
11537
|
}
|
|
11447
11538
|
}
|
|
11448
|
-
`,
|
|
11539
|
+
`, po = y`
|
|
11449
11540
|
${Yn}
|
|
11450
11541
|
mutation CreateDesign(
|
|
11451
11542
|
$name: String!
|
|
@@ -11477,7 +11568,7 @@ const Yn = y`
|
|
|
11477
11568
|
}
|
|
11478
11569
|
}
|
|
11479
11570
|
}
|
|
11480
|
-
`,
|
|
11571
|
+
`, Co = y`
|
|
11481
11572
|
${Yn}
|
|
11482
11573
|
mutation CreateDesigns($inputs: [DesignCreateInput]!) {
|
|
11483
11574
|
designCreateMany(inputs: $inputs) {
|
|
@@ -11496,11 +11587,11 @@ function ve(r) {
|
|
|
11496
11587
|
const t = JSON.parse(atob(r.split(".")[1])).exp;
|
|
11497
11588
|
return Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3) >= t;
|
|
11498
11589
|
}
|
|
11499
|
-
const
|
|
11590
|
+
const wo = async (r) => {
|
|
11500
11591
|
var s, o;
|
|
11501
11592
|
const e = ((s = Object.entries(localStorage).find(([l, c]) => l.startsWith("CognitoIdentityServiceProvider") && l.endsWith("idToken"))) == null ? void 0 : s[0]) || "", a = localStorage.getItem(e), n = {};
|
|
11502
11593
|
return a && !ve(a) && (n.Authorization = `Bearer ${a}`), (o = (await b.getShadowGraphqlClient().mutate({
|
|
11503
|
-
mutation:
|
|
11594
|
+
mutation: po,
|
|
11504
11595
|
errorPolicy: "all",
|
|
11505
11596
|
fetchPolicy: "no-cache",
|
|
11506
11597
|
variables: {
|
|
@@ -11517,11 +11608,11 @@ const fo = async (r) => {
|
|
|
11517
11608
|
headers: n
|
|
11518
11609
|
}
|
|
11519
11610
|
})).data) == null ? void 0 : o.designCreate;
|
|
11520
|
-
},
|
|
11611
|
+
}, yo = async (r) => {
|
|
11521
11612
|
var s, o;
|
|
11522
11613
|
const e = ((s = Object.entries(localStorage).find(([l, c]) => l.startsWith("CognitoIdentityServiceProvider") && l.endsWith("idToken"))) == null ? void 0 : s[0]) || "", a = localStorage.getItem(e), n = {};
|
|
11523
11614
|
return a && !ve(a) && (n.Authorization = `Bearer ${a}`), (o = (await b.getShadowGraphqlClient().mutate({
|
|
11524
|
-
mutation:
|
|
11615
|
+
mutation: Co,
|
|
11525
11616
|
errorPolicy: "all",
|
|
11526
11617
|
fetchPolicy: "no-cache",
|
|
11527
11618
|
variables: {
|
|
@@ -11576,7 +11667,7 @@ const fo = async (r) => {
|
|
|
11576
11667
|
return t.steps.forEach((i) => {
|
|
11577
11668
|
Object.assign(n, a(i));
|
|
11578
11669
|
}), n;
|
|
11579
|
-
},
|
|
11670
|
+
}, So = (r, t, e, a) => {
|
|
11580
11671
|
const n = {};
|
|
11581
11672
|
let i = {};
|
|
11582
11673
|
e ? i = oa(e, t, !1) : a && (i = a);
|
|
@@ -11598,7 +11689,7 @@ const fo = async (r) => {
|
|
|
11598
11689
|
return n;
|
|
11599
11690
|
}, Jn = (r, t, e, a, n, i, s, o) => {
|
|
11600
11691
|
var m, g;
|
|
11601
|
-
const l = t.basePrice || 0, c = r.priceModifierTotal || 0, d =
|
|
11692
|
+
const l = t.basePrice || 0, c = r.priceModifierTotal || 0, d = So(a, e, void 0, i), u = (k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(r.id), h = {
|
|
11602
11693
|
additionalExternalProductId: (m = r.integrationProduct) == null ? void 0 : m.additionalExternalProductId,
|
|
11603
11694
|
additionalExternalVariantId: (g = r.integrationProduct) == null ? void 0 : g.additionalExternalVariantId,
|
|
11604
11695
|
baseCost: l,
|
|
@@ -11627,7 +11718,7 @@ const fo = async (r) => {
|
|
|
11627
11718
|
if (c !== void 0)
|
|
11628
11719
|
return c;
|
|
11629
11720
|
await r.outstandingRequestsPromise();
|
|
11630
|
-
const F = (k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(n.id),
|
|
11721
|
+
const F = (k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(n.id), Q = await b.getShadowGraphqlClient().query({
|
|
11631
11722
|
query: bn,
|
|
11632
11723
|
variables: { ids: [n.id] },
|
|
11633
11724
|
fetchPolicy: "no-cache",
|
|
@@ -11635,17 +11726,17 @@ const fo = async (r) => {
|
|
|
11635
11726
|
context: {
|
|
11636
11727
|
transactionOwnerId: F
|
|
11637
11728
|
}
|
|
11638
|
-
}), V = (j =
|
|
11639
|
-
return
|
|
11640
|
-
|
|
11729
|
+
}), V = (j = Q.data) == null ? void 0 : j.transactions[0].workflowState;
|
|
11730
|
+
return Q.errors ? (Q.errors.forEach((G) => {
|
|
11731
|
+
Q.errors && console.log("Server Error:", G.message);
|
|
11641
11732
|
}), null) : V ?? null;
|
|
11642
11733
|
})() || (console.warn("State mismatch detected. Uploading known state explicitly"), console.warn("State Object:", JSON.stringify(a())), await r.updateStateWithServerImmediate(a), console.log("Server state is undefined @ Workflow completion"));
|
|
11643
11734
|
const u = r.getPreviewService(), h = (I = t == null ? void 0 : t.finalizeStepConfig) == null ? void 0 : I.lookAtAnimation, m = u && t.showModelOnFinishStep && !!h, g = l && oa(l, t, !0), f = l && oa(l, t, !1), p = async (P) => {
|
|
11644
11735
|
const F = {};
|
|
11645
11736
|
let M = 0;
|
|
11646
11737
|
if (Object.keys(i).length > 0)
|
|
11647
|
-
for (const
|
|
11648
|
-
const V = i[
|
|
11738
|
+
for (const Q of Object.keys(i)) {
|
|
11739
|
+
const V = i[Q], j = t.steps.find((G) => G.stepName === Q);
|
|
11649
11740
|
for (let G = 0; G < V.selections.length; ++G) {
|
|
11650
11741
|
const nt = V.selections[G];
|
|
11651
11742
|
if (j && (!P || j.option && (j.option.variants || []).length > 1 && !j.data.hideSelectionInCart && !j.data.hideSelectionsInCart)) {
|
|
@@ -11677,7 +11768,7 @@ const fo = async (r) => {
|
|
|
11677
11768
|
let B = await o(m, n.id);
|
|
11678
11769
|
if (B) {
|
|
11679
11770
|
const P = await (await rt(B)).blob();
|
|
11680
|
-
B = (await
|
|
11771
|
+
B = (await $.uploadAsset(
|
|
11681
11772
|
{ name: `${n.id}-preview-image.png`, blob: P },
|
|
11682
11773
|
he.Image,
|
|
11683
11774
|
!0,
|
|
@@ -11699,14 +11790,14 @@ const fo = async (r) => {
|
|
|
11699
11790
|
};
|
|
11700
11791
|
if (f) {
|
|
11701
11792
|
const F = [];
|
|
11702
|
-
for (const [M,
|
|
11703
|
-
F.push({ key: M, value:
|
|
11793
|
+
for (const [M, Q] of Object.entries(f))
|
|
11794
|
+
F.push({ key: M, value: Q });
|
|
11704
11795
|
P.metadata = F;
|
|
11705
11796
|
}
|
|
11706
11797
|
if (w) {
|
|
11707
11798
|
const F = [];
|
|
11708
|
-
for (const [M,
|
|
11709
|
-
F.push({ key: M, ids:
|
|
11799
|
+
for (const [M, Q] of Object.entries(S))
|
|
11800
|
+
F.push({ key: M, ids: Q });
|
|
11710
11801
|
P.selectedVariants = F;
|
|
11711
11802
|
}
|
|
11712
11803
|
return P;
|
|
@@ -11714,7 +11805,7 @@ const fo = async (r) => {
|
|
|
11714
11805
|
cartSelectionsWithPrices: C,
|
|
11715
11806
|
cartMetadata: g
|
|
11716
11807
|
};
|
|
11717
|
-
},
|
|
11808
|
+
}, vo = async (r, t, e, a, n, i, s, o, l, c, d) => {
|
|
11718
11809
|
var p, C;
|
|
11719
11810
|
l("workflow.steps.finish.finalize.buildingLayouts");
|
|
11720
11811
|
const { designDetails: A, cartSelectionsWithPrices: u, cartMetadata: h } = await Kn(
|
|
@@ -11729,7 +11820,7 @@ const fo = async (r) => {
|
|
|
11729
11820
|
d
|
|
11730
11821
|
);
|
|
11731
11822
|
l("workflow.steps.finish.finalize.creatingDesign");
|
|
11732
|
-
const m = await
|
|
11823
|
+
const m = await wo(A), g = (p = m == null ? void 0 : m.transaction) == null ? void 0 : p.previewImageLink;
|
|
11733
11824
|
if (!(m != null && m.transaction))
|
|
11734
11825
|
throw new Error("Failed to create design");
|
|
11735
11826
|
l("workflow.steps.finish.finalize.updatingTransaction");
|
|
@@ -11744,7 +11835,7 @@ const fo = async (r) => {
|
|
|
11744
11835
|
g,
|
|
11745
11836
|
(C = m == null ? void 0 : m.processExecution) == null ? void 0 : C.id
|
|
11746
11837
|
);
|
|
11747
|
-
},
|
|
11838
|
+
}, Eo = async (r, t, e) => {
|
|
11748
11839
|
t("workflow.steps.finish.finalize.buildingLayouts"), await Promise.all(
|
|
11749
11840
|
r.map(async (o) => {
|
|
11750
11841
|
await o.workflowManager.outstandingRequestsPromise();
|
|
@@ -11776,7 +11867,7 @@ const fo = async (r) => {
|
|
|
11776
11867
|
))
|
|
11777
11868
|
);
|
|
11778
11869
|
t("workflow.steps.finish.finalize.creatingDesign");
|
|
11779
|
-
const s = await
|
|
11870
|
+
const s = await yo(i.map((o) => o.designDetails));
|
|
11780
11871
|
if (!s)
|
|
11781
11872
|
throw new Error("Failed to create designs");
|
|
11782
11873
|
return t("workflow.steps.finish.finalize.updatingTransaction"), s.map((o, l) => {
|
|
@@ -11794,7 +11885,7 @@ const fo = async (r) => {
|
|
|
11794
11885
|
);
|
|
11795
11886
|
});
|
|
11796
11887
|
};
|
|
11797
|
-
class
|
|
11888
|
+
class Bo {
|
|
11798
11889
|
constructor() {
|
|
11799
11890
|
this.localPersistenceKey = "designTransactions", this.storageMethod = "Local", this.designSavedListeners = [];
|
|
11800
11891
|
}
|
|
@@ -11861,7 +11952,7 @@ class So {
|
|
|
11861
11952
|
throw new z("Unexpected storage method requested");
|
|
11862
11953
|
}
|
|
11863
11954
|
}
|
|
11864
|
-
const je = new
|
|
11955
|
+
const je = new Bo(), bo = y`
|
|
11865
11956
|
mutation AddTransactionStakeholder($id: String!, $type: String!, $details: CustomerDetailsInput!) {
|
|
11866
11957
|
transactionAddStakeholder(id: $id, details: $details, type: $type) {
|
|
11867
11958
|
id
|
|
@@ -11875,7 +11966,7 @@ const je = new So(), vo = y`
|
|
|
11875
11966
|
}
|
|
11876
11967
|
}
|
|
11877
11968
|
}
|
|
11878
|
-
`,
|
|
11969
|
+
`, Io = y`
|
|
11879
11970
|
mutation AddAddressToTransaction(
|
|
11880
11971
|
$transactionId: String!
|
|
11881
11972
|
$streetAddress: String
|
|
@@ -11897,7 +11988,7 @@ const je = new So(), vo = y`
|
|
|
11897
11988
|
id
|
|
11898
11989
|
}
|
|
11899
11990
|
}
|
|
11900
|
-
`,
|
|
11991
|
+
`, Do = y`
|
|
11901
11992
|
mutation AddOrganizationToTransaction(
|
|
11902
11993
|
$transactionId: String!
|
|
11903
11994
|
$organizationName: String!
|
|
@@ -11910,8 +12001,8 @@ const je = new So(), vo = y`
|
|
|
11910
12001
|
}
|
|
11911
12002
|
}
|
|
11912
12003
|
`;
|
|
11913
|
-
var
|
|
11914
|
-
class
|
|
12004
|
+
var Po = /* @__PURE__ */ ((r) => (r.QuantityChanged = "QuantityChanged", r.PriceBreakChanged = "PriceBreakChanged", r))(Po || {});
|
|
12005
|
+
class Fo {
|
|
11915
12006
|
constructor(t, e) {
|
|
11916
12007
|
var n;
|
|
11917
12008
|
if (this.cachedStepHandles = /* @__PURE__ */ new Map(), this.currentPriceBreak = 1, this.renderableScenes = [], this.renderableSceneCallbacks = [], this.eventCallbacks = /* @__PURE__ */ new Map(), this.debouncedSavedDesignUpdate = sn(async () => {
|
|
@@ -11933,7 +12024,7 @@ class Io {
|
|
|
11933
12024
|
throw new Error("No Workflow ID provided.");
|
|
11934
12025
|
this.client = t;
|
|
11935
12026
|
const a = e.layouts;
|
|
11936
|
-
this.commandContext = new _i(), this.commandContext.initialize(a, e.reloadedState), this.isReadOnly = e.transaction.isOrdered || !!e.readOnly, this.workflowManager = new
|
|
12027
|
+
this.commandContext = new _i(), this.commandContext.initialize(a, e.reloadedState), this.isReadOnly = e.transaction.isOrdered || !!e.readOnly, this.workflowManager = new io(
|
|
11937
12028
|
this,
|
|
11938
12029
|
t,
|
|
11939
12030
|
e.workflow,
|
|
@@ -11974,7 +12065,7 @@ class Io {
|
|
|
11974
12065
|
async attachAddress(t, e, a, n, i, s) {
|
|
11975
12066
|
const l = (k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(this.getWorkflowManager().getTransaction().id);
|
|
11976
12067
|
await b.getShadowGraphqlClient().mutate({
|
|
11977
|
-
mutation:
|
|
12068
|
+
mutation: Io,
|
|
11978
12069
|
variables: {
|
|
11979
12070
|
transactionId: this.getWorkflowManager().getTransaction().id,
|
|
11980
12071
|
streetAddress: t || void 0,
|
|
@@ -11992,7 +12083,7 @@ class Io {
|
|
|
11992
12083
|
async attachOrganization(t) {
|
|
11993
12084
|
const a = (k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(this.getWorkflowManager().getTransaction().id);
|
|
11994
12085
|
await b.getShadowGraphqlClient().mutate({
|
|
11995
|
-
mutation:
|
|
12086
|
+
mutation: Do,
|
|
11996
12087
|
variables: {
|
|
11997
12088
|
transactionId: this.getWorkflowManager().getTransaction().id,
|
|
11998
12089
|
organizationName: t
|
|
@@ -12194,7 +12285,7 @@ class Io {
|
|
|
12194
12285
|
async assignCustomerDetails(t) {
|
|
12195
12286
|
var s, o, l;
|
|
12196
12287
|
const a = (k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(this.getWorkflowManager().getTransaction().id), i = (l = (o = (s = (await b.getShadowGraphqlClient().mutate({
|
|
12197
|
-
mutation:
|
|
12288
|
+
mutation: bo,
|
|
12198
12289
|
variables: {
|
|
12199
12290
|
id: this.getWorkflowManager().getTransaction().id,
|
|
12200
12291
|
details: t,
|
|
@@ -12272,7 +12363,7 @@ class Io {
|
|
|
12272
12363
|
transactionId: a.id,
|
|
12273
12364
|
workflowViewerLink: "",
|
|
12274
12365
|
workflowViewerReadOnlyLink: ""
|
|
12275
|
-
}) :
|
|
12366
|
+
}) : vo(
|
|
12276
12367
|
this.workflowManager,
|
|
12277
12368
|
this.workflowManager.getWorkflow(),
|
|
12278
12369
|
this.workflowManager.getLayouts(),
|
|
@@ -12351,7 +12442,7 @@ class Io {
|
|
|
12351
12442
|
(this.eventCallbacks.get(t) || []).forEach((e) => e(this));
|
|
12352
12443
|
}
|
|
12353
12444
|
}
|
|
12354
|
-
const
|
|
12445
|
+
const xo = [
|
|
12355
12446
|
"altGlyph",
|
|
12356
12447
|
"circle",
|
|
12357
12448
|
"ellipse",
|
|
@@ -12363,14 +12454,14 @@ const Do = [
|
|
|
12363
12454
|
"textPath",
|
|
12364
12455
|
"tref",
|
|
12365
12456
|
"tspan"
|
|
12366
|
-
],
|
|
12457
|
+
], ko = async (r, t, e) => {
|
|
12367
12458
|
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);
|
|
12368
12459
|
o.searchParams.append("video", ka(JSON.stringify([{ href: i }]))), o.pathname = o.pathname + (o.pathname.slice(-1) === "/" ? "" : "/");
|
|
12369
12460
|
const l = o.toString(), d = `data:image/svg+xml;base64,${ka(await nn(l, { type: "svg" }))}`, A = (h) => {
|
|
12370
12461
|
const m = r.find((f) => f.panelId === h.panelId);
|
|
12371
12462
|
if (!m)
|
|
12372
12463
|
throw new Y(h);
|
|
12373
|
-
const g =
|
|
12464
|
+
const g = N();
|
|
12374
12465
|
return new W(
|
|
12375
12466
|
{
|
|
12376
12467
|
id: g,
|
|
@@ -12390,14 +12481,14 @@ const Do = [
|
|
|
12390
12481
|
} catch (h) {
|
|
12391
12482
|
return console.error(h), [];
|
|
12392
12483
|
}
|
|
12393
|
-
},
|
|
12484
|
+
}, Mo = async (r, t, e, a) => {
|
|
12394
12485
|
const n = e.data, i = n.assetUrl, s = await ra(i);
|
|
12395
12486
|
try {
|
|
12396
12487
|
const o = Xi(n, a.option);
|
|
12397
12488
|
o && (t[a.stepName] = { selectedVariants: [o] });
|
|
12398
12489
|
const l = async (c) => {
|
|
12399
12490
|
var g;
|
|
12400
|
-
const d = await
|
|
12491
|
+
const d = await Qn(c, (g = o == null ? void 0 : o.asset) == null ? void 0 : g.fileLink), A = await xe(d), u = N(), h = r.find((f) => f.panelId === c.panelId);
|
|
12401
12492
|
if (!h)
|
|
12402
12493
|
throw new Y(c);
|
|
12403
12494
|
const m = Sa(
|
|
@@ -12448,7 +12539,7 @@ const Do = [
|
|
|
12448
12539
|
} catch (o) {
|
|
12449
12540
|
return console.error(o), [];
|
|
12450
12541
|
}
|
|
12451
|
-
},
|
|
12542
|
+
}, To = async (r, t, e, a) => {
|
|
12452
12543
|
var S, B;
|
|
12453
12544
|
const n = e.data, i = a.option;
|
|
12454
12545
|
if (!i)
|
|
@@ -12468,16 +12559,16 @@ const Do = [
|
|
|
12468
12559
|
ma(m);
|
|
12469
12560
|
const g = {};
|
|
12470
12561
|
xt(m, (E) => {
|
|
12471
|
-
|
|
12562
|
+
xo.includes(E.tagName) && !E.attributes.getNamedItem("fill") && E.setAttribute("fill", "#000000");
|
|
12472
12563
|
const I = E.attributes.getNamedItem("fill");
|
|
12473
12564
|
if (I && I.value !== "none") {
|
|
12474
|
-
const F = I.value,
|
|
12475
|
-
E.classList.add(
|
|
12565
|
+
const F = I.value, Q = `spiff-fill-${F.replace(/\W/g, "")}`;
|
|
12566
|
+
E.classList.add(Q), g[Q] = { browserValue: F };
|
|
12476
12567
|
}
|
|
12477
12568
|
const P = E.attributes.getNamedItem("stroke");
|
|
12478
12569
|
if (P && P.value !== "none") {
|
|
12479
|
-
const F = P.value,
|
|
12480
|
-
E.classList.add(
|
|
12570
|
+
const F = P.value, Q = `spiff-stroke-${F.replace(/\W/g, "")}`;
|
|
12571
|
+
E.classList.add(Q), g[Q] = { browserValue: F };
|
|
12481
12572
|
}
|
|
12482
12573
|
});
|
|
12483
12574
|
const p = Et().serializeToString(m), C = n.colors;
|
|
@@ -12493,7 +12584,7 @@ const Do = [
|
|
|
12493
12584
|
const I = r.find((F) => F.panelId === E.panelId);
|
|
12494
12585
|
if (!I)
|
|
12495
12586
|
throw new Y(E);
|
|
12496
|
-
const P =
|
|
12587
|
+
const P = N();
|
|
12497
12588
|
return new W(
|
|
12498
12589
|
{
|
|
12499
12590
|
colors: g,
|
|
@@ -12517,12 +12608,12 @@ const Do = [
|
|
|
12517
12608
|
} catch (E) {
|
|
12518
12609
|
return console.error(E), [];
|
|
12519
12610
|
}
|
|
12520
|
-
},
|
|
12611
|
+
}, No = async (r, t, e) => {
|
|
12521
12612
|
const a = await Hn(e.data.module), n = t.data, i = (o, l) => {
|
|
12522
12613
|
const c = r.find((A) => A.panelId === l.panelId);
|
|
12523
12614
|
if (!c)
|
|
12524
12615
|
throw new Y(l);
|
|
12525
|
-
const d =
|
|
12616
|
+
const d = N();
|
|
12526
12617
|
return new W(
|
|
12527
12618
|
{
|
|
12528
12619
|
colors: {},
|
|
@@ -12547,7 +12638,7 @@ const Do = [
|
|
|
12547
12638
|
} catch (o) {
|
|
12548
12639
|
return console.error(o), [];
|
|
12549
12640
|
}
|
|
12550
|
-
},
|
|
12641
|
+
}, Qo = async (r, t, e, a) => {
|
|
12551
12642
|
var d, A;
|
|
12552
12643
|
const n = e.data, i = a.option;
|
|
12553
12644
|
if (!i)
|
|
@@ -12565,7 +12656,7 @@ const Do = [
|
|
|
12565
12656
|
const h = r.find((g) => g.panelId === u.panelId);
|
|
12566
12657
|
if (!h)
|
|
12567
12658
|
throw new Y(u);
|
|
12568
|
-
const m =
|
|
12659
|
+
const m = N();
|
|
12569
12660
|
return new W(
|
|
12570
12661
|
{
|
|
12571
12662
|
id: m,
|
|
@@ -12589,7 +12680,7 @@ const Do = [
|
|
|
12589
12680
|
} catch (u) {
|
|
12590
12681
|
return console.error(u), [];
|
|
12591
12682
|
}
|
|
12592
|
-
},
|
|
12683
|
+
}, Ro = async (r, t, e, a) => {
|
|
12593
12684
|
var c;
|
|
12594
12685
|
const n = e.data, i = a.option;
|
|
12595
12686
|
if (!i)
|
|
@@ -12622,7 +12713,7 @@ const Do = [
|
|
|
12622
12713
|
fill="${s == null ? void 0 : s.color}"
|
|
12623
12714
|
/>
|
|
12624
12715
|
</svg>
|
|
12625
|
-
`, m = { "spiff-fill-shape": { browserValue: s.color || "#000000" } }, g =
|
|
12716
|
+
`, m = { "spiff-fill-shape": { browserValue: s.color || "#000000" } }, g = N();
|
|
12626
12717
|
return new W(
|
|
12627
12718
|
{
|
|
12628
12719
|
colors: m,
|
|
@@ -12646,7 +12737,7 @@ const Do = [
|
|
|
12646
12737
|
} catch (d) {
|
|
12647
12738
|
return console.error(d), [];
|
|
12648
12739
|
}
|
|
12649
|
-
},
|
|
12740
|
+
}, Oo = async (r, t, e) => {
|
|
12650
12741
|
const a = [], i = (() => {
|
|
12651
12742
|
var c, d;
|
|
12652
12743
|
return t.type === D.ProductOverlay ? e || ((c = t.data.asset) == null ? void 0 : c.fileLink) || "" : ((d = t.data.asset) == null ? void 0 : d.fileLink) || "";
|
|
@@ -12658,7 +12749,7 @@ const Do = [
|
|
|
12658
12749
|
if (!d)
|
|
12659
12750
|
throw new Y(c);
|
|
12660
12751
|
const A = {
|
|
12661
|
-
id:
|
|
12752
|
+
id: N(),
|
|
12662
12753
|
src: i,
|
|
12663
12754
|
type: o,
|
|
12664
12755
|
y: c.top,
|
|
@@ -12691,7 +12782,7 @@ const Do = [
|
|
|
12691
12782
|
if (!u)
|
|
12692
12783
|
throw new Y(A);
|
|
12693
12784
|
const h = {
|
|
12694
|
-
id:
|
|
12785
|
+
id: N(),
|
|
12695
12786
|
src: i,
|
|
12696
12787
|
asset_key: i,
|
|
12697
12788
|
svg: d(c),
|
|
@@ -12713,7 +12804,7 @@ const Do = [
|
|
|
12713
12804
|
});
|
|
12714
12805
|
}
|
|
12715
12806
|
return a;
|
|
12716
|
-
},
|
|
12807
|
+
}, $o = async (r, t, e, a) => {
|
|
12717
12808
|
const n = [], i = e.data, s = 30, o = (f) => f.vertical ? "center" : f.textAlign || "center", l = () => {
|
|
12718
12809
|
var w;
|
|
12719
12810
|
const f = a.option;
|
|
@@ -12751,7 +12842,7 @@ const Do = [
|
|
|
12751
12842
|
continue;
|
|
12752
12843
|
const C = {
|
|
12753
12844
|
stepName: e.name,
|
|
12754
|
-
id:
|
|
12845
|
+
id: N(),
|
|
12755
12846
|
align: o(a.data),
|
|
12756
12847
|
curved: a.data.curved,
|
|
12757
12848
|
fill: i.color || m || "#000000",
|
|
@@ -12802,7 +12893,7 @@ const Do = [
|
|
|
12802
12893
|
n.push(new W(C, p));
|
|
12803
12894
|
}
|
|
12804
12895
|
return n;
|
|
12805
|
-
},
|
|
12896
|
+
}, Uo = (r, t) => r.conditions ? r.conditions.every((e) => {
|
|
12806
12897
|
const a = t[e.targetStepName];
|
|
12807
12898
|
if (a && a.selectedVariants) {
|
|
12808
12899
|
const n = a.selectedVariants;
|
|
@@ -12811,7 +12902,7 @@ const Do = [
|
|
|
12811
12902
|
);
|
|
12812
12903
|
}
|
|
12813
12904
|
return !1;
|
|
12814
|
-
}) : !0,
|
|
12905
|
+
}) : !0, Lo = async (r, t, e, a) => {
|
|
12815
12906
|
const n = [], i = {};
|
|
12816
12907
|
for (const s of r) {
|
|
12817
12908
|
const o = t.steps.find((l) => l.stepName === s.name);
|
|
@@ -12819,18 +12910,18 @@ const Do = [
|
|
|
12819
12910
|
switch (o.type) {
|
|
12820
12911
|
case D.DigitalContent:
|
|
12821
12912
|
n.push(
|
|
12822
|
-
...await
|
|
12913
|
+
...await ko(e, s, o)
|
|
12823
12914
|
);
|
|
12824
12915
|
break;
|
|
12825
12916
|
case D.Frame:
|
|
12826
12917
|
case D.Photo:
|
|
12827
12918
|
n.push(
|
|
12828
|
-
...await
|
|
12919
|
+
...await Mo(e, i, s, o)
|
|
12829
12920
|
);
|
|
12830
12921
|
break;
|
|
12831
12922
|
case D.Illustration:
|
|
12832
12923
|
n.push(
|
|
12833
|
-
...await
|
|
12924
|
+
...await To(
|
|
12834
12925
|
e,
|
|
12835
12926
|
i,
|
|
12836
12927
|
s,
|
|
@@ -12839,39 +12930,39 @@ const Do = [
|
|
|
12839
12930
|
);
|
|
12840
12931
|
break;
|
|
12841
12932
|
case D.Module:
|
|
12842
|
-
n.push(...await
|
|
12933
|
+
n.push(...await No(e, s, o));
|
|
12843
12934
|
break;
|
|
12844
12935
|
case D.Picture:
|
|
12845
12936
|
n.push(
|
|
12846
|
-
...await
|
|
12937
|
+
...await Qo(e, i, s, o)
|
|
12847
12938
|
);
|
|
12848
12939
|
break;
|
|
12849
12940
|
case D.Shape:
|
|
12850
12941
|
n.push(
|
|
12851
|
-
...await
|
|
12942
|
+
...await Ro(e, i, s, o)
|
|
12852
12943
|
);
|
|
12853
12944
|
break;
|
|
12854
12945
|
case D.Text:
|
|
12855
12946
|
n.push(
|
|
12856
|
-
...await
|
|
12947
|
+
...await $o(e, i, s, o)
|
|
12857
12948
|
);
|
|
12858
12949
|
break;
|
|
12859
12950
|
}
|
|
12860
12951
|
}
|
|
12861
12952
|
for (const s of t.steps)
|
|
12862
|
-
s.type !== D.SilentIllustration && s.type !== D.ProductOverlay ||
|
|
12863
|
-
...await
|
|
12953
|
+
s.type !== D.SilentIllustration && s.type !== D.ProductOverlay || Uo(s, i) && n.push(
|
|
12954
|
+
...await Oo(e, s, a)
|
|
12864
12955
|
);
|
|
12865
12956
|
return n;
|
|
12866
12957
|
};
|
|
12867
|
-
class
|
|
12958
|
+
class Vo {
|
|
12868
12959
|
constructor(t) {
|
|
12869
12960
|
this.handleCompleteRender = null;
|
|
12870
12961
|
const e = /* @__PURE__ */ new Map();
|
|
12871
12962
|
t.forEach(
|
|
12872
12963
|
(a) => e.set(
|
|
12873
12964
|
a.id,
|
|
12874
|
-
new
|
|
12965
|
+
new Wo(a.id, a.name, this, { width: a.width, height: a.height })
|
|
12875
12966
|
)
|
|
12876
12967
|
), this.layouts = e;
|
|
12877
12968
|
}
|
|
@@ -12885,15 +12976,15 @@ class Uo {
|
|
|
12885
12976
|
return this.layouts;
|
|
12886
12977
|
}
|
|
12887
12978
|
}
|
|
12888
|
-
const
|
|
12979
|
+
const zo = () => new Promise((r, t) => {
|
|
12889
12980
|
try {
|
|
12890
12981
|
const a = gt().getContext("webgl2");
|
|
12891
12982
|
r(!!a);
|
|
12892
12983
|
} catch {
|
|
12893
12984
|
r(!1);
|
|
12894
12985
|
}
|
|
12895
|
-
}),
|
|
12896
|
-
class
|
|
12986
|
+
}), Go = zo();
|
|
12987
|
+
class Wo {
|
|
12897
12988
|
constructor(t, e, a, n) {
|
|
12898
12989
|
this.hasSetStaticContext = !1, this.interactiveDirty = !1, this.staticCtxDirty = !1, this.lastRequestedRenderArguments = void 0, this.lastCompletedStaticRender = void 0, this.renderQueue = new Pn(2), this.id = t, this.name = e, this.service = a, this.panelSize = n;
|
|
12899
12990
|
}
|
|
@@ -12949,10 +13040,10 @@ class Vo {
|
|
|
12949
13040
|
return;
|
|
12950
13041
|
}
|
|
12951
13042
|
this.renderQueue.enqueue(
|
|
12952
|
-
new
|
|
13043
|
+
new jo(
|
|
12953
13044
|
this.getID(),
|
|
12954
13045
|
a,
|
|
12955
|
-
await
|
|
13046
|
+
await Go,
|
|
12956
13047
|
() => {
|
|
12957
13048
|
this.markLastCompletedStaticRender(), this.setStaticContextDirty(!0);
|
|
12958
13049
|
},
|
|
@@ -12961,7 +13052,7 @@ class Vo {
|
|
|
12961
13052
|
);
|
|
12962
13053
|
}
|
|
12963
13054
|
}
|
|
12964
|
-
class
|
|
13055
|
+
class jo extends Dn {
|
|
12965
13056
|
// TODO: Do we need to pass this whole array in?
|
|
12966
13057
|
constructor(t, e, a, n, i) {
|
|
12967
13058
|
super(), this.layoutId = t, this.ctx = e, this.nonPOTSupport = a, this.onRender = n, this.layouts = i;
|
|
@@ -13029,7 +13120,7 @@ class zo extends Dn {
|
|
|
13029
13120
|
u.resize(l, c), await u.render(), this.onRender();
|
|
13030
13121
|
}
|
|
13031
13122
|
}
|
|
13032
|
-
const
|
|
13123
|
+
const Qc = (r, t) => {
|
|
13033
13124
|
const e = [];
|
|
13034
13125
|
return r.forEach((a) => {
|
|
13035
13126
|
const n = t.steps.find((i) => i.stepName === a.stepName);
|
|
@@ -13040,16 +13131,16 @@ const kc = (r, t) => {
|
|
|
13040
13131
|
}
|
|
13041
13132
|
});
|
|
13042
13133
|
}), e;
|
|
13043
|
-
},
|
|
13134
|
+
}, Rc = async (r, t, e, a) => {
|
|
13044
13135
|
let n = {
|
|
13045
13136
|
serializableWorkflow: { steps: [] },
|
|
13046
13137
|
layouts: {}
|
|
13047
13138
|
};
|
|
13048
|
-
n = new O(e.map((l) => new
|
|
13049
|
-
const s = await
|
|
13139
|
+
n = new O(e.map((l) => new $n(l))).apply(n);
|
|
13140
|
+
const s = await Lo(r, t, e, a);
|
|
13050
13141
|
return new O(s).apply(n);
|
|
13051
13142
|
};
|
|
13052
|
-
class
|
|
13143
|
+
class Ho {
|
|
13053
13144
|
constructor(t) {
|
|
13054
13145
|
this.handleCache = {}, this.bundle = t;
|
|
13055
13146
|
}
|
|
@@ -13094,7 +13185,7 @@ class Go {
|
|
|
13094
13185
|
async createHandle(t) {
|
|
13095
13186
|
switch (t.type) {
|
|
13096
13187
|
case et.FileUpload:
|
|
13097
|
-
return new
|
|
13188
|
+
return new qo(this.bundle, t).initialize();
|
|
13098
13189
|
case et.ColorOption:
|
|
13099
13190
|
return new Ha(
|
|
13100
13191
|
this.bundle,
|
|
@@ -13106,7 +13197,7 @@ class Go {
|
|
|
13106
13197
|
return (e == null ? void 0 : e.type) === "Color" ? new Ha(this.bundle, t, e) : new _n(this.bundle, t, e);
|
|
13107
13198
|
}
|
|
13108
13199
|
case et.Text:
|
|
13109
|
-
return new
|
|
13200
|
+
return new Yo(this.bundle, t);
|
|
13110
13201
|
default:
|
|
13111
13202
|
throw new Error("Unhandled Global Property Aspect Type");
|
|
13112
13203
|
}
|
|
@@ -13167,7 +13258,7 @@ class Ba {
|
|
|
13167
13258
|
return this.bundle.getGlobalPropertyStateManager().getAspect(this.property.name);
|
|
13168
13259
|
}
|
|
13169
13260
|
}
|
|
13170
|
-
class
|
|
13261
|
+
class qo extends Ba {
|
|
13171
13262
|
constructor(t, e) {
|
|
13172
13263
|
super(t, e);
|
|
13173
13264
|
}
|
|
@@ -13233,7 +13324,7 @@ class Wo extends Ba {
|
|
|
13233
13324
|
const e = await this.getOriginalImage();
|
|
13234
13325
|
if (!e)
|
|
13235
13326
|
throw new Error("You must supply an image selection before attempting to remove the background.");
|
|
13236
|
-
const a = this.bundle.getGlobalPropertyStateManager(), n = await
|
|
13327
|
+
const a = this.bundle.getGlobalPropertyStateManager(), n = await $.removeBackgroundFromAsset(e), s = {
|
|
13237
13328
|
...a.getAspectStorage(this.property.name),
|
|
13238
13329
|
backgroundRemovedAssetKey: n.key,
|
|
13239
13330
|
useOriginalAsset: !t
|
|
@@ -13253,7 +13344,7 @@ class Wo extends Ba {
|
|
|
13253
13344
|
async getImage() {
|
|
13254
13345
|
const t = this.getStateValue();
|
|
13255
13346
|
if (t)
|
|
13256
|
-
return
|
|
13347
|
+
return $.getLocalOrFromServer(t);
|
|
13257
13348
|
}
|
|
13258
13349
|
async getImageWithColors() {
|
|
13259
13350
|
var t, e;
|
|
@@ -13266,7 +13357,7 @@ class Wo extends Ba {
|
|
|
13266
13357
|
async getOriginalImage() {
|
|
13267
13358
|
const t = this.bundle.getGlobalPropertyStateManager().getAspectStorage(this.property.name);
|
|
13268
13359
|
if (t != null && t.originalAssetKey)
|
|
13269
|
-
return
|
|
13360
|
+
return $.getLocalOrFromServer(t.originalAssetKey);
|
|
13270
13361
|
}
|
|
13271
13362
|
/**
|
|
13272
13363
|
* Retrieves the version of the image selection that has the background removed, if one exists.
|
|
@@ -13275,7 +13366,7 @@ class Wo extends Ba {
|
|
|
13275
13366
|
async getBackgroundRemovedImage() {
|
|
13276
13367
|
const t = this.bundle.getGlobalPropertyStateManager().getAspectStorage(this.property.name);
|
|
13277
13368
|
if (t != null && t.backgroundRemovedAssetKey)
|
|
13278
|
-
return
|
|
13369
|
+
return $.getLocalOrFromServer(t.backgroundRemovedAssetKey);
|
|
13279
13370
|
}
|
|
13280
13371
|
getUseOriginalImage() {
|
|
13281
13372
|
var t;
|
|
@@ -13311,7 +13402,7 @@ class Wo extends Ba {
|
|
|
13311
13402
|
const e = this.getStateValue();
|
|
13312
13403
|
if (!e)
|
|
13313
13404
|
return;
|
|
13314
|
-
const a = await
|
|
13405
|
+
const a = await $.getLocalOrFromServer(e);
|
|
13315
13406
|
if (!a)
|
|
13316
13407
|
return;
|
|
13317
13408
|
await this.applyImageSelection(a, t, !1, !0);
|
|
@@ -13404,7 +13495,7 @@ class Wo extends Ba {
|
|
|
13404
13495
|
);
|
|
13405
13496
|
}
|
|
13406
13497
|
}
|
|
13407
|
-
class
|
|
13498
|
+
class Yo extends Ba {
|
|
13408
13499
|
constructor(t, e) {
|
|
13409
13500
|
super(t, e);
|
|
13410
13501
|
}
|
|
@@ -13569,8 +13660,8 @@ class Ha extends _n {
|
|
|
13569
13660
|
return ((t = this.bundle.getGlobalPropertyStateManager().getAspectStorage(this.property.name)) == null ? void 0 : t.customColor) || ((e = this.getCurrentVariant()) == null ? void 0 : e.getColor()) || "#ffffff";
|
|
13570
13661
|
}
|
|
13571
13662
|
}
|
|
13572
|
-
const
|
|
13573
|
-
const n =
|
|
13663
|
+
const Jo = (r, t, e, a) => r.flatMap((n) => n.getSteps()).filter((n) => n.getGlobalPropertyAspects(t).includes(e) && n.getType() === a), Ko = (r, t, e) => {
|
|
13664
|
+
const n = Jo(
|
|
13574
13665
|
r,
|
|
13575
13666
|
t,
|
|
13576
13667
|
e,
|
|
@@ -13582,7 +13673,7 @@ const Ho = (r, t, e, a) => r.flatMap((n) => n.getSteps()).filter((n) => n.getGlo
|
|
|
13582
13673
|
});
|
|
13583
13674
|
return Math.max(...n);
|
|
13584
13675
|
};
|
|
13585
|
-
class
|
|
13676
|
+
class _o {
|
|
13586
13677
|
constructor(t, e, a, n, i) {
|
|
13587
13678
|
this.bundleId = t, this.bundleOwnerId = e, this.configuration = a, this.bundleOptions = i;
|
|
13588
13679
|
const s = i == null ? void 0 : i.existingGlobalPropertyState;
|
|
@@ -13758,7 +13849,7 @@ class Yo {
|
|
|
13758
13849
|
throw new Error(`Unable to create global property state for bundle: ${this.bundleId}`);
|
|
13759
13850
|
}
|
|
13760
13851
|
}
|
|
13761
|
-
class
|
|
13852
|
+
class Xo {
|
|
13762
13853
|
constructor(t) {
|
|
13763
13854
|
this.setState(t);
|
|
13764
13855
|
}
|
|
@@ -13846,7 +13937,7 @@ class Jo {
|
|
|
13846
13937
|
};
|
|
13847
13938
|
}
|
|
13848
13939
|
}
|
|
13849
|
-
const
|
|
13940
|
+
const Zo = y`
|
|
13850
13941
|
query GetManyMetafields($entityIds: [String!]!) {
|
|
13851
13942
|
metafieldsMany(entityIds: $entityIds) {
|
|
13852
13943
|
id
|
|
@@ -13858,7 +13949,7 @@ const Ko = y`
|
|
|
13858
13949
|
}
|
|
13859
13950
|
}
|
|
13860
13951
|
`;
|
|
13861
|
-
class
|
|
13952
|
+
class tl {
|
|
13862
13953
|
constructor() {
|
|
13863
13954
|
this.internalMap = /* @__PURE__ */ new Map();
|
|
13864
13955
|
}
|
|
@@ -13880,7 +13971,7 @@ class _o {
|
|
|
13880
13971
|
if (t.every((a) => this.internalMap.has(a)))
|
|
13881
13972
|
return;
|
|
13882
13973
|
const e = await b.getShadowGraphqlClient().query({
|
|
13883
|
-
query:
|
|
13974
|
+
query: Zo,
|
|
13884
13975
|
errorPolicy: "all",
|
|
13885
13976
|
variables: {
|
|
13886
13977
|
entityIds: t.filter((a) => !this.internalMap.has(a))
|
|
@@ -13921,8 +14012,9 @@ class _o {
|
|
|
13921
14012
|
return JSON.parse(n.value);
|
|
13922
14013
|
}
|
|
13923
14014
|
}
|
|
13924
|
-
const
|
|
13925
|
-
|
|
14015
|
+
const el = new tl();
|
|
14016
|
+
var al = /* @__PURE__ */ ((r) => (r.Default = "Default", r.Name = "Name", r.Price = "Price", r))(al || {});
|
|
14017
|
+
class nl {
|
|
13926
14018
|
constructor(t) {
|
|
13927
14019
|
this.fullFetched = !1, this.collection = t;
|
|
13928
14020
|
const e = this.collection.productCollectionProducts;
|
|
@@ -13981,10 +14073,10 @@ class Zo {
|
|
|
13981
14073
|
* @param filters A list of metafield filters to apply.
|
|
13982
14074
|
* @param tags An object of tag filters to apply.
|
|
13983
14075
|
*/
|
|
13984
|
-
async filterProducts(t, e) {
|
|
13985
|
-
var
|
|
13986
|
-
const
|
|
13987
|
-
query:
|
|
14076
|
+
async filterProducts(t, e, a, n) {
|
|
14077
|
+
var l, c;
|
|
14078
|
+
const i = await b.getShadowGraphqlClient().query({
|
|
14079
|
+
query: Ns,
|
|
13988
14080
|
errorPolicy: "all",
|
|
13989
14081
|
variables: {
|
|
13990
14082
|
id: this.getId(),
|
|
@@ -13995,15 +14087,17 @@ class Zo {
|
|
|
13995
14087
|
tags: e ? {
|
|
13996
14088
|
include: e.include ?? [],
|
|
13997
14089
|
exclude: e.exclude ?? []
|
|
13998
|
-
} : void 0
|
|
14090
|
+
} : void 0,
|
|
14091
|
+
sortKey: a,
|
|
14092
|
+
sortDescending: n
|
|
13999
14093
|
}
|
|
14000
14094
|
});
|
|
14001
|
-
if (!((
|
|
14095
|
+
if (!((l = i.data) != null && l.productCollections) || ((c = i.data) == null ? void 0 : c.productCollections.length) === 0)
|
|
14002
14096
|
throw new Error("Failed to filter product collection products.");
|
|
14003
|
-
const
|
|
14004
|
-
(
|
|
14097
|
+
const s = this.getProducts(), o = i.data.productCollections[0].productCollectionProducts.map(
|
|
14098
|
+
(d) => d.product.id
|
|
14005
14099
|
);
|
|
14006
|
-
return
|
|
14100
|
+
return s.filter((d) => o.includes(d.getId()));
|
|
14007
14101
|
}
|
|
14008
14102
|
/**
|
|
14009
14103
|
* Fetches a paginated feed of products.
|
|
@@ -14013,17 +14107,17 @@ class Zo {
|
|
|
14013
14107
|
* @param tags Optional object of tag filters to apply.
|
|
14014
14108
|
* @returns
|
|
14015
14109
|
*/
|
|
14016
|
-
async fetchProductsFeed(t, e, a, n) {
|
|
14017
|
-
var
|
|
14110
|
+
async fetchProductsFeed(t, e, a, n, i, s) {
|
|
14111
|
+
var c, d, A, u, h, m;
|
|
14018
14112
|
if (this.fullFetched) {
|
|
14019
|
-
const
|
|
14113
|
+
const g = await (a ? this.filterProducts(a) : this.fetchProducts());
|
|
14020
14114
|
return {
|
|
14021
|
-
total:
|
|
14022
|
-
items:
|
|
14115
|
+
total: g.length,
|
|
14116
|
+
items: g.slice(t, t + e)
|
|
14023
14117
|
};
|
|
14024
14118
|
}
|
|
14025
|
-
const
|
|
14026
|
-
query:
|
|
14119
|
+
const o = await b.getShadowGraphqlClient().query({
|
|
14120
|
+
query: Qs,
|
|
14027
14121
|
variables: {
|
|
14028
14122
|
id: this.getId(),
|
|
14029
14123
|
limit: e,
|
|
@@ -14035,18 +14129,20 @@ class Zo {
|
|
|
14035
14129
|
tags: n ? {
|
|
14036
14130
|
include: n.include ?? [],
|
|
14037
14131
|
exclude: n.exclude ?? []
|
|
14038
|
-
} : void 0
|
|
14132
|
+
} : void 0,
|
|
14133
|
+
sortKey: i,
|
|
14134
|
+
sortDescending: s
|
|
14039
14135
|
},
|
|
14040
14136
|
errorPolicy: "all"
|
|
14041
14137
|
});
|
|
14042
14138
|
return {
|
|
14043
|
-
items: ((
|
|
14044
|
-
total: ((
|
|
14139
|
+
items: ((A = (d = (c = o == null ? void 0 : o.data) == null ? void 0 : c.productCollections) == null ? void 0 : d[0].productCollectionProductsFeed) == null ? void 0 : A.items.filter((g) => !!g.product).map((g) => new se(g))) || [],
|
|
14140
|
+
total: ((m = (h = (u = o == null ? void 0 : o.data) == null ? void 0 : u.productCollections) == null ? void 0 : h[0].productCollectionProductsFeed) == null ? void 0 : m.total) ?? 0
|
|
14045
14141
|
};
|
|
14046
14142
|
}
|
|
14047
14143
|
getTransformCollection() {
|
|
14048
14144
|
if (this.collection.transformCollection)
|
|
14049
|
-
return new
|
|
14145
|
+
return new rl(this.collection.transformCollection);
|
|
14050
14146
|
}
|
|
14051
14147
|
/**
|
|
14052
14148
|
* The raw collection resource. This is generally not needed and should be avoided.
|
|
@@ -14188,7 +14284,7 @@ class se {
|
|
|
14188
14284
|
* @returns A map of metafield key to value. Any unavailable keys will not be present in the map. use map.has() to check if a key is present.
|
|
14189
14285
|
*/
|
|
14190
14286
|
async requestMetafields(t) {
|
|
14191
|
-
return
|
|
14287
|
+
return el.requestKeysForEntity(this.product.id, t);
|
|
14192
14288
|
}
|
|
14193
14289
|
}
|
|
14194
14290
|
class zt {
|
|
@@ -14215,7 +14311,7 @@ class zt {
|
|
|
14215
14311
|
return this.workflow.imageUrl;
|
|
14216
14312
|
}
|
|
14217
14313
|
}
|
|
14218
|
-
class
|
|
14314
|
+
class rl {
|
|
14219
14315
|
constructor(t) {
|
|
14220
14316
|
this.collection = t;
|
|
14221
14317
|
}
|
|
@@ -14235,10 +14331,10 @@ class tl {
|
|
|
14235
14331
|
* @returns The transforms in this collection.
|
|
14236
14332
|
*/
|
|
14237
14333
|
getTransforms() {
|
|
14238
|
-
return this.collection.transforms.map((t) => new
|
|
14334
|
+
return this.collection.transforms.map((t) => new il(t));
|
|
14239
14335
|
}
|
|
14240
14336
|
}
|
|
14241
|
-
class
|
|
14337
|
+
class il {
|
|
14242
14338
|
constructor(t) {
|
|
14243
14339
|
this.transform = t;
|
|
14244
14340
|
}
|
|
@@ -14265,7 +14361,7 @@ class el {
|
|
|
14265
14361
|
};
|
|
14266
14362
|
}
|
|
14267
14363
|
}
|
|
14268
|
-
class
|
|
14364
|
+
class sl {
|
|
14269
14365
|
constructor() {
|
|
14270
14366
|
this.listeners = {};
|
|
14271
14367
|
}
|
|
@@ -14292,7 +14388,7 @@ class al {
|
|
|
14292
14388
|
delete this.listeners[e];
|
|
14293
14389
|
}
|
|
14294
14390
|
}
|
|
14295
|
-
const
|
|
14391
|
+
const ol = y`
|
|
14296
14392
|
mutation AddAddressToBundle(
|
|
14297
14393
|
$bundleId: String!
|
|
14298
14394
|
$streetAddress: String
|
|
@@ -14314,13 +14410,13 @@ const nl = y`
|
|
|
14314
14410
|
id
|
|
14315
14411
|
}
|
|
14316
14412
|
}
|
|
14317
|
-
`,
|
|
14413
|
+
`, ll = y`
|
|
14318
14414
|
mutation AddOrganizationToBundle($bundleId: String!, $organizationName: String!) {
|
|
14319
14415
|
organizationAttachToBundle(bundleId: $bundleId, organizationName: $organizationName) {
|
|
14320
14416
|
id
|
|
14321
14417
|
}
|
|
14322
14418
|
}
|
|
14323
|
-
`,
|
|
14419
|
+
`, cl = y`
|
|
14324
14420
|
mutation GenerateQuoteId($id: String!) {
|
|
14325
14421
|
bundleGenerateQuoteId(id: $id) {
|
|
14326
14422
|
id
|
|
@@ -14331,15 +14427,15 @@ const nl = y`
|
|
|
14331
14427
|
class He {
|
|
14332
14428
|
constructor(t, e, a, n, i, s) {
|
|
14333
14429
|
var c, d, A;
|
|
14334
|
-
this.workflowExperiences = [], this.eventEmitter = new
|
|
14430
|
+
this.workflowExperiences = [], this.eventEmitter = new sl(), this.client = t, this.id = e.id, this.name = e.name || "", this.quoteId = e.quoteId, this.shareActions = e.bundleShareActions, this.workflowViewerLink = e.workflowViewerLink, this.workflowViewerAmendLink = e.workflowViewerAmendLink, this.ownerId = i, this.metadata = new Map(((c = e.metadata) == null ? void 0 : c.map((u) => [u.key, u.value])) || []), this.completed = e.completed ?? !1, this.productCollection = e.productCollection, this.bundleStateManager = new Xo(e.bundleStateData);
|
|
14335
14431
|
const o = (d = this.productCollection) == null ? void 0 : d.globalPropertyConfiguration;
|
|
14336
|
-
this.globalConfigurationPropertyId = o == null ? void 0 : o.id, this.globalPropertyStateManager = new
|
|
14432
|
+
this.globalConfigurationPropertyId = o == null ? void 0 : o.id, this.globalPropertyStateManager = new _o(
|
|
14337
14433
|
this.id,
|
|
14338
14434
|
this.ownerId,
|
|
14339
14435
|
o,
|
|
14340
14436
|
this.checkConditionalHandlesChanged.bind(this),
|
|
14341
14437
|
s
|
|
14342
|
-
), this.globalPropertyHandleService = new
|
|
14438
|
+
), this.globalPropertyHandleService = new Ho(this), this.setPreviewService(a);
|
|
14343
14439
|
const l = new Promise((u, h) => {
|
|
14344
14440
|
if (s != null && s.readonly) {
|
|
14345
14441
|
u([]);
|
|
@@ -14370,7 +14466,7 @@ class He {
|
|
|
14370
14466
|
async generateQuoteId() {
|
|
14371
14467
|
var a, n;
|
|
14372
14468
|
const e = (n = (a = (await b.getShadowGraphqlClient().mutate({
|
|
14373
|
-
mutation:
|
|
14469
|
+
mutation: cl,
|
|
14374
14470
|
variables: {
|
|
14375
14471
|
id: this.id
|
|
14376
14472
|
},
|
|
@@ -14382,7 +14478,7 @@ class He {
|
|
|
14382
14478
|
}
|
|
14383
14479
|
async attachAddress(t, e, a, n, i, s) {
|
|
14384
14480
|
await b.getShadowGraphqlClient().mutate({
|
|
14385
|
-
mutation:
|
|
14481
|
+
mutation: ol,
|
|
14386
14482
|
variables: {
|
|
14387
14483
|
bundleId: this.id,
|
|
14388
14484
|
streetAddress: t || void 0,
|
|
@@ -14399,7 +14495,7 @@ class He {
|
|
|
14399
14495
|
}
|
|
14400
14496
|
async attachOrganization(t) {
|
|
14401
14497
|
await b.getShadowGraphqlClient().mutate({
|
|
14402
|
-
mutation:
|
|
14498
|
+
mutation: ll,
|
|
14403
14499
|
variables: {
|
|
14404
14500
|
bundleId: this.id,
|
|
14405
14501
|
organizationName: t
|
|
@@ -14472,7 +14568,7 @@ class He {
|
|
|
14472
14568
|
return this.workflowExperiences.map((t) => t.getTotalPriceSubunits()).reduce((t, e) => t + e, 0);
|
|
14473
14569
|
}
|
|
14474
14570
|
getProductCollection() {
|
|
14475
|
-
return this.productCollection ? new
|
|
14571
|
+
return this.productCollection ? new nl(this.productCollection) : void 0;
|
|
14476
14572
|
}
|
|
14477
14573
|
async initializeAdditionalRequiredColorChannels(t) {
|
|
14478
14574
|
var e, a, n, i;
|
|
@@ -14483,7 +14579,7 @@ class He {
|
|
|
14483
14579
|
(d) => d.name === l
|
|
14484
14580
|
);
|
|
14485
14581
|
if (c && c.type === et.ColorOption) {
|
|
14486
|
-
const d = (a = s.getCurrentVariant()) == null ? void 0 : a.getAssetResource(), A = ((n = d == null ? void 0 : d.assetConfiguration) == null ? void 0 : n.channelNumbers) || [], u = ((i = d == null ? void 0 : d.assetConfiguration) == null ? void 0 : i.defaultColorVariants) || [], h =
|
|
14582
|
+
const d = (a = s.getCurrentVariant()) == null ? void 0 : a.getAssetResource(), A = ((n = d == null ? void 0 : d.assetConfiguration) == null ? void 0 : n.channelNumbers) || [], u = ((i = d == null ? void 0 : d.assetConfiguration) == null ? void 0 : i.defaultColorVariants) || [], h = Ko(
|
|
14487
14583
|
this.getWorkflowExperiences(),
|
|
14488
14584
|
this.globalConfigurationPropertyId || "",
|
|
14489
14585
|
l
|
|
@@ -14518,7 +14614,7 @@ class He {
|
|
|
14518
14614
|
);
|
|
14519
14615
|
const n = k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map(), i = e.map((o) => n.get(o));
|
|
14520
14616
|
await b.getShadowGraphqlClient().mutate({
|
|
14521
|
-
mutation:
|
|
14617
|
+
mutation: Ls,
|
|
14522
14618
|
variables: {
|
|
14523
14619
|
id: this.id,
|
|
14524
14620
|
transactionIds: e,
|
|
@@ -14550,7 +14646,7 @@ class He {
|
|
|
14550
14646
|
throw new Error("Unable to add transaction to bundle - Already Exists!");
|
|
14551
14647
|
const s = (k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(a);
|
|
14552
14648
|
await b.getShadowGraphqlClient().mutate({
|
|
14553
|
-
mutation:
|
|
14649
|
+
mutation: Us,
|
|
14554
14650
|
variables: {
|
|
14555
14651
|
id: this.id,
|
|
14556
14652
|
transactionId: a
|
|
@@ -14781,7 +14877,7 @@ class He {
|
|
|
14781
14877
|
items: [],
|
|
14782
14878
|
bundleOwnerId: this.ownerId
|
|
14783
14879
|
};
|
|
14784
|
-
const a = await
|
|
14880
|
+
const a = await Eo(
|
|
14785
14881
|
this.workflowExperiences.map((n) => ({
|
|
14786
14882
|
workflowManager: n.getWorkflowManager(),
|
|
14787
14883
|
workflow: n.getWorkflowManager().getWorkflow(),
|
|
@@ -14905,7 +15001,7 @@ class He {
|
|
|
14905
15001
|
async updateBundle() {
|
|
14906
15002
|
var e;
|
|
14907
15003
|
if (!((e = (await b.getShadowGraphqlClient().mutate({
|
|
14908
|
-
mutation:
|
|
15004
|
+
mutation: $s,
|
|
14909
15005
|
variables: {
|
|
14910
15006
|
id: this.id,
|
|
14911
15007
|
name: this.name,
|
|
@@ -14991,14 +15087,14 @@ class He {
|
|
|
14991
15087
|
};
|
|
14992
15088
|
}
|
|
14993
15089
|
}
|
|
14994
|
-
const
|
|
15090
|
+
const dl = y`
|
|
14995
15091
|
mutation processFlowCreate($processFlowId: String!, $inputs: [String]!) {
|
|
14996
15092
|
processExecutionCreate(processFlowId: $processFlowId, inputs: $inputs) {
|
|
14997
15093
|
id
|
|
14998
15094
|
}
|
|
14999
15095
|
}
|
|
15000
15096
|
`;
|
|
15001
|
-
class
|
|
15097
|
+
class Al {
|
|
15002
15098
|
/**
|
|
15003
15099
|
*
|
|
15004
15100
|
* @param id
|
|
@@ -15009,7 +15105,7 @@ class ol {
|
|
|
15009
15105
|
async execute(t, e, a) {
|
|
15010
15106
|
var A, u, h;
|
|
15011
15107
|
const i = (u = (A = (await b.getShadowGraphqlClient().mutate({
|
|
15012
|
-
mutation:
|
|
15108
|
+
mutation: dl,
|
|
15013
15109
|
variables: {
|
|
15014
15110
|
processFlowId: t,
|
|
15015
15111
|
inputs: [...e.map((m) => m.getValueForTransmission())]
|
|
@@ -15051,7 +15147,7 @@ class ol {
|
|
|
15051
15147
|
"Execution has failed to complete. See Automation > FLows in Flight on partner account on SpiffCommerce Hub."
|
|
15052
15148
|
);
|
|
15053
15149
|
if (m.completedAt) {
|
|
15054
|
-
o = !0, d = new
|
|
15150
|
+
o = !0, d = new ul(m);
|
|
15055
15151
|
break;
|
|
15056
15152
|
}
|
|
15057
15153
|
l += 1;
|
|
@@ -15065,7 +15161,7 @@ class ol {
|
|
|
15065
15161
|
return Promise.resolve(d);
|
|
15066
15162
|
}
|
|
15067
15163
|
}
|
|
15068
|
-
class
|
|
15164
|
+
class ul {
|
|
15069
15165
|
constructor(t) {
|
|
15070
15166
|
this.execution = t;
|
|
15071
15167
|
}
|
|
@@ -15150,8 +15246,8 @@ class ba {
|
|
|
15150
15246
|
return t.startsWith("[") ? JSON.stringify(JSON.parse(t)) : t;
|
|
15151
15247
|
}
|
|
15152
15248
|
}
|
|
15153
|
-
var
|
|
15154
|
-
class
|
|
15249
|
+
var hl = /* @__PURE__ */ ((r) => (r.Transaction = "Transaction", r.Bundle = "Bundle", r.Product = "Product", r.Variant = "Variant", r.Option = "Option", r.LineItem = "LineItem", r.Asset = "Asset", r))(hl || {});
|
|
15250
|
+
class Oc extends ba {
|
|
15155
15251
|
constructor(t) {
|
|
15156
15252
|
super(`"${t}"`);
|
|
15157
15253
|
}
|
|
@@ -15166,7 +15262,7 @@ class Xn extends ba {
|
|
|
15166
15262
|
return t.match(/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i);
|
|
15167
15263
|
}
|
|
15168
15264
|
}
|
|
15169
|
-
class
|
|
15265
|
+
class $c extends ba {
|
|
15170
15266
|
constructor(t) {
|
|
15171
15267
|
super(`[${t.map((e) => e.getRaw()).join(",")}]`);
|
|
15172
15268
|
}
|
|
@@ -15224,7 +15320,7 @@ const Ya = y`
|
|
|
15224
15320
|
}
|
|
15225
15321
|
}
|
|
15226
15322
|
}
|
|
15227
|
-
`,
|
|
15323
|
+
`, ml = y`
|
|
15228
15324
|
mutation CustomerCreate($details: CustomerDetailsInput!) {
|
|
15229
15325
|
customerCreate(details: $details) {
|
|
15230
15326
|
id
|
|
@@ -15234,7 +15330,7 @@ const Ya = y`
|
|
|
15234
15330
|
}
|
|
15235
15331
|
}
|
|
15236
15332
|
}
|
|
15237
|
-
`,
|
|
15333
|
+
`, gl = y`
|
|
15238
15334
|
mutation CustomerAuthenticate($loginToken: String!) {
|
|
15239
15335
|
customerAuthenticate(loginToken: $loginToken) {
|
|
15240
15336
|
id
|
|
@@ -15264,11 +15360,11 @@ const Ya = y`
|
|
|
15264
15360
|
}
|
|
15265
15361
|
}
|
|
15266
15362
|
}
|
|
15267
|
-
`,
|
|
15363
|
+
`, fl = y`
|
|
15268
15364
|
mutation CustomerGenerateVerificationCode($emailAddress: String!) {
|
|
15269
15365
|
customerGenerateVerificationCode(emailAddress: $emailAddress)
|
|
15270
15366
|
}
|
|
15271
|
-
`,
|
|
15367
|
+
`, pl = y`
|
|
15272
15368
|
mutation CustomerVerifyCode($emailAddress: String!, $verificationCode: String!) {
|
|
15273
15369
|
customerVerifyCode(emailAddress: $emailAddress, verificationCode: $verificationCode) {
|
|
15274
15370
|
id
|
|
@@ -15299,7 +15395,7 @@ const Ya = y`
|
|
|
15299
15395
|
}
|
|
15300
15396
|
}
|
|
15301
15397
|
}
|
|
15302
|
-
`,
|
|
15398
|
+
`, Cl = y`
|
|
15303
15399
|
query CustomerMetafields($id: String!) {
|
|
15304
15400
|
metafields(entityId: $id) {
|
|
15305
15401
|
id
|
|
@@ -15317,7 +15413,7 @@ const Ya = y`
|
|
|
15317
15413
|
}
|
|
15318
15414
|
}
|
|
15319
15415
|
}
|
|
15320
|
-
`,
|
|
15416
|
+
`, wl = async (r, t) => {
|
|
15321
15417
|
var n;
|
|
15322
15418
|
const e = await b.getShadowGraphqlClient().query({
|
|
15323
15419
|
query: Bi(((n = t == null ? void 0 : t.assets) == null ? void 0 : n.metadata) || !1),
|
|
@@ -15336,12 +15432,12 @@ const Ya = y`
|
|
|
15336
15432
|
return a.forEach((i) => {
|
|
15337
15433
|
i.steps.forEach((s) => {
|
|
15338
15434
|
var o, l, c;
|
|
15339
|
-
delete s.data.__typename, (o = s.option) != null && o.id && ((l = s.option.defaultVariant) != null && l.asset &&
|
|
15340
|
-
d.asset &&
|
|
15435
|
+
delete s.data.__typename, (o = s.option) != null && o.id && ((l = s.option.defaultVariant) != null && l.asset && $.cacheAsset(s.option.defaultVariant.asset), s.option.colorProfile && $.cacheAsset(s.option.colorProfile), (c = s.option.variants) == null || c.forEach((d) => {
|
|
15436
|
+
d.asset && $.cacheAsset(d.asset), d.thumbnail && $.cacheAsset(d.thumbnail), d.material && $.cacheMaterial(d.material);
|
|
15341
15437
|
}), Ht.set({ id: s.option.id }, Promise.resolve(s.option)));
|
|
15342
15438
|
}), i.finalizeStepConfig || (i.finalizeStepConfig = {}), i.finalizeStepConfig.termsMarkdown = i.finalizeStepConfig.termsMarkdown || i.partner.termsMarkdown;
|
|
15343
15439
|
}), a;
|
|
15344
|
-
},
|
|
15440
|
+
}, yl = async (r, t) => {
|
|
15345
15441
|
const a = (await t).find((n) => n.id === r);
|
|
15346
15442
|
if (!a)
|
|
15347
15443
|
throw new Error(`Workflow not found: ${r}`);
|
|
@@ -15350,12 +15446,12 @@ const Ya = y`
|
|
|
15350
15446
|
const e = r.map((o) => Ht.get({ id: o, options: t })), a = r.filter((o, l) => e[l] === void 0);
|
|
15351
15447
|
if (a.length === 0)
|
|
15352
15448
|
return Promise.all(e);
|
|
15353
|
-
const n =
|
|
15354
|
-
(o) => Ht.set({ id: o, options: t },
|
|
15449
|
+
const n = wl(a, t), i = a.map(
|
|
15450
|
+
(o) => Ht.set({ id: o, options: t }, yl(o, n))
|
|
15355
15451
|
), s = e.filter((o) => o !== void 0);
|
|
15356
15452
|
return await Promise.all(s.concat(i));
|
|
15357
|
-
},
|
|
15358
|
-
id:
|
|
15453
|
+
}, Uc = async (r, t) => (await Zn([r], t))[0], Sl = (r) => r.sort((t, e) => t.index - e.index).map((t) => ({
|
|
15454
|
+
id: N(),
|
|
15359
15455
|
panelId: t.name,
|
|
15360
15456
|
name: t.name,
|
|
15361
15457
|
title: t.title,
|
|
@@ -15368,11 +15464,11 @@ const Ya = y`
|
|
|
15368
15464
|
previewRegion: t.previewRegion,
|
|
15369
15465
|
useEditableArea: t.useEditableArea,
|
|
15370
15466
|
editableArea: t.editableArea
|
|
15371
|
-
})),
|
|
15467
|
+
})), vl = (r, t) => {
|
|
15372
15468
|
const e = r.workflowState, a = e ? JSON.parse(e) : void 0;
|
|
15373
|
-
return a ? Object.values(a.layouts).map((n) => n.layout) :
|
|
15469
|
+
return a ? Object.values(a.layouts).map((n) => n.layout) : Sl(t.panels);
|
|
15374
15470
|
};
|
|
15375
|
-
class
|
|
15471
|
+
class Lc {
|
|
15376
15472
|
constructor(t) {
|
|
15377
15473
|
this.activeIntegration = void 0, this.updateTransactionState = async (e) => {
|
|
15378
15474
|
try {
|
|
@@ -15383,7 +15479,7 @@ class Rc {
|
|
|
15383
15479
|
} catch (a) {
|
|
15384
15480
|
throw console.error(a), new ut("Critical - Unable to synchronize workflow state with server.");
|
|
15385
15481
|
}
|
|
15386
|
-
}, this.options = t, this.options.applicationKey && Fr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 26.
|
|
15482
|
+
}, this.options = t, this.options.applicationKey && Fr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 26.29.0"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
|
|
15387
15483
|
}
|
|
15388
15484
|
configure(t) {
|
|
15389
15485
|
mt.setHubUrl(t.hubUrl), mt.setServerUrl(t.serverUrl), mt.setServicesApiUrl(t.servicesApiUrl), this.marketplaceThemeInstallId = t.marketplaceThemeInstallId, this.marketplaceThemeInstallConfigurationId = t.marketplaceThemeInstallConfigurationId, t.bearerAuthenticationToken && kr(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration();
|
|
@@ -15393,7 +15489,7 @@ class Rc {
|
|
|
15393
15489
|
* and the Spiff Commerce platform.
|
|
15394
15490
|
*/
|
|
15395
15491
|
getAssetManager() {
|
|
15396
|
-
return
|
|
15492
|
+
return $;
|
|
15397
15493
|
}
|
|
15398
15494
|
getCurrencyCode() {
|
|
15399
15495
|
if (this.currencyCode === void 0)
|
|
@@ -15403,14 +15499,14 @@ class Rc {
|
|
|
15403
15499
|
getFlowService() {
|
|
15404
15500
|
if (!xr())
|
|
15405
15501
|
throw new Error("Application key required to use Flow Service.");
|
|
15406
|
-
return new
|
|
15502
|
+
return new Al();
|
|
15407
15503
|
}
|
|
15408
15504
|
async getIntegration() {
|
|
15409
15505
|
if (this.activeIntegration)
|
|
15410
15506
|
return this.activeIntegration;
|
|
15411
15507
|
if (!this.options.applicationKey)
|
|
15412
15508
|
throw new Error("Cannot get current Integration without specifying an Application Key.");
|
|
15413
|
-
return this.activeIntegration =
|
|
15509
|
+
return this.activeIntegration = El(this.options.applicationKey), this.activeIntegration;
|
|
15414
15510
|
}
|
|
15415
15511
|
async canUseAddon(t) {
|
|
15416
15512
|
var e;
|
|
@@ -15559,7 +15655,7 @@ class Rc {
|
|
|
15559
15655
|
})).data.customer;
|
|
15560
15656
|
if (!n.id) {
|
|
15561
15657
|
const l = (s = (await e.mutate({
|
|
15562
|
-
mutation:
|
|
15658
|
+
mutation: ml,
|
|
15563
15659
|
errorPolicy: "all",
|
|
15564
15660
|
fetchPolicy: "no-cache",
|
|
15565
15661
|
variables: {
|
|
@@ -15594,7 +15690,7 @@ class Rc {
|
|
|
15594
15690
|
if (!n)
|
|
15595
15691
|
return !1;
|
|
15596
15692
|
const s = (o = (await e.mutate({
|
|
15597
|
-
mutation:
|
|
15693
|
+
mutation: gl,
|
|
15598
15694
|
errorPolicy: "all",
|
|
15599
15695
|
fetchPolicy: "no-cache",
|
|
15600
15696
|
variables: {
|
|
@@ -15609,7 +15705,7 @@ class Rc {
|
|
|
15609
15705
|
*/
|
|
15610
15706
|
async generateVerificationCode(t) {
|
|
15611
15707
|
await b.getShadowGraphqlClient().mutate({
|
|
15612
|
-
mutation:
|
|
15708
|
+
mutation: fl,
|
|
15613
15709
|
variables: {
|
|
15614
15710
|
emailAddress: t
|
|
15615
15711
|
}
|
|
@@ -15624,7 +15720,7 @@ class Rc {
|
|
|
15624
15720
|
async verifyCode(t, e) {
|
|
15625
15721
|
var i, s;
|
|
15626
15722
|
const n = (i = (await b.getShadowGraphqlClient().mutate({
|
|
15627
|
-
mutation:
|
|
15723
|
+
mutation: pl,
|
|
15628
15724
|
errorPolicy: "all",
|
|
15629
15725
|
fetchPolicy: "no-cache",
|
|
15630
15726
|
variables: {
|
|
@@ -15648,7 +15744,7 @@ class Rc {
|
|
|
15648
15744
|
if (!((e = this.customer) != null && e.id))
|
|
15649
15745
|
throw new Error("Customer must be logged in before calling this function.");
|
|
15650
15746
|
return (await b.getShadowGraphqlClient().query({
|
|
15651
|
-
query:
|
|
15747
|
+
query: Cl,
|
|
15652
15748
|
variables: {
|
|
15653
15749
|
id: this.customer.id
|
|
15654
15750
|
}
|
|
@@ -15691,7 +15787,7 @@ class Rc {
|
|
|
15691
15787
|
*/
|
|
15692
15788
|
async getExistingBundle(t, e, a, n) {
|
|
15693
15789
|
var f, p, C, w, v, S, B, E, I, P, F;
|
|
15694
|
-
const i = k.getMap("bundleOwnerIds"), s = i == null ? void 0 : i.get(t), l = ((f = Object.entries(localStorage).find(([M,
|
|
15790
|
+
const i = k.getMap("bundleOwnerIds"), s = i == null ? void 0 : i.get(t), l = ((f = Object.entries(localStorage).find(([M, Q]) => M.startsWith("CognitoIdentityServiceProvider") && M.endsWith("idToken"))) == null ? void 0 : f[0]) || "", c = localStorage.getItem(l), d = {};
|
|
15695
15791
|
c && !ve(c) && (d.Authorization = `Bearer ${c}`);
|
|
15696
15792
|
const A = {
|
|
15697
15793
|
bundleOwnerId: s,
|
|
@@ -15831,7 +15927,7 @@ class Rc {
|
|
|
15831
15927
|
var P, F, M;
|
|
15832
15928
|
if (S.length === 0)
|
|
15833
15929
|
return [];
|
|
15834
|
-
const B = S.map((
|
|
15930
|
+
const B = S.map((Q) => Q.option.transactionId), E = await a.query({
|
|
15835
15931
|
query: Ai,
|
|
15836
15932
|
variables: {
|
|
15837
15933
|
ids: B
|
|
@@ -15840,15 +15936,15 @@ class Rc {
|
|
|
15840
15936
|
fetchPolicy: "no-cache"
|
|
15841
15937
|
}), I = E.data.transactions;
|
|
15842
15938
|
if (I.length !== S.length) {
|
|
15843
|
-
const
|
|
15844
|
-
throw new ut(`Not all transactions were found: ${
|
|
15939
|
+
const Q = ((F = (P = E.errors) == null ? void 0 : P[0]) == null ? void 0 : F.message) || "Unknown error";
|
|
15940
|
+
throw new ut(`Not all transactions were found: ${Q}`);
|
|
15845
15941
|
}
|
|
15846
|
-
return !this.activeIntegration && ((M = I[0].integrationProduct) != null && M.integration) && (this.activeIntegration = Promise.resolve(I[0].integrationProduct.integration)), I.map((
|
|
15942
|
+
return !this.activeIntegration && ((M = I[0].integrationProduct) != null && M.integration) && (this.activeIntegration = Promise.resolve(I[0].integrationProduct.integration)), I.map((Q, V) => {
|
|
15847
15943
|
var j;
|
|
15848
15944
|
return {
|
|
15849
|
-
transaction:
|
|
15850
|
-
workflowId:
|
|
15851
|
-
readOnly: ((j = S.find((G) => G.option.transactionId ===
|
|
15945
|
+
transaction: Q,
|
|
15946
|
+
workflowId: Q.workflowId,
|
|
15947
|
+
readOnly: ((j = S.find((G) => G.option.transactionId === Q.id)) == null ? void 0 : j.option.readOnly) ?? !1,
|
|
15852
15948
|
index: S[V].index
|
|
15853
15949
|
};
|
|
15854
15950
|
});
|
|
@@ -15877,11 +15973,11 @@ class Rc {
|
|
|
15877
15973
|
const M = ((F = (P = B.errors) == null ? void 0 : P[0]) == null ? void 0 : F.message) || "Unknown error";
|
|
15878
15974
|
throw new ut(`Failed to create transactions: ${M}`);
|
|
15879
15975
|
}
|
|
15880
|
-
return E.map((M,
|
|
15976
|
+
return E.map((M, Q) => ({
|
|
15881
15977
|
transaction: M,
|
|
15882
15978
|
workflowId: M.workflowId,
|
|
15883
15979
|
readOnly: !1,
|
|
15884
|
-
index: S[
|
|
15980
|
+
index: S[Q].index
|
|
15885
15981
|
}));
|
|
15886
15982
|
}, s = t.map((S, B) => ({ option: S, index: B })), o = s.filter((S) => S.option.type === "transaction"), l = s.filter(
|
|
15887
15983
|
(S) => S.option.type === "integration" || S.option.type === "external"
|
|
@@ -15892,7 +15988,7 @@ class Rc {
|
|
|
15892
15988
|
var j;
|
|
15893
15989
|
const { transaction: B, workflowId: E, readOnly: I, index: P } = S, F = m.get(E), M = t[P];
|
|
15894
15990
|
!g.get(B.id) && B.transactionOwnerId && g.set(B.id, B.transactionOwnerId);
|
|
15895
|
-
const
|
|
15991
|
+
const Q = g.get(B.id) || void 0, V = {
|
|
15896
15992
|
product: B.product,
|
|
15897
15993
|
transaction: B,
|
|
15898
15994
|
layouts: [],
|
|
@@ -15901,7 +15997,7 @@ class Rc {
|
|
|
15901
15997
|
throw new z("State mutation is forbidden in read only mode!");
|
|
15902
15998
|
} : async (G) => this.updateTransactionState({
|
|
15903
15999
|
...G,
|
|
15904
|
-
context: { transactionOwnerId:
|
|
16000
|
+
context: { transactionOwnerId: Q, bundleOwnerId: e == null ? void 0 : e.bundleOwnerId }
|
|
15905
16001
|
}),
|
|
15906
16002
|
readOnly: I,
|
|
15907
16003
|
workflow: F,
|
|
@@ -15909,22 +16005,22 @@ class Rc {
|
|
|
15909
16005
|
};
|
|
15910
16006
|
if (M.type === "transaction" && B.workflowState) {
|
|
15911
16007
|
const G = JSON.parse(B.workflowState);
|
|
15912
|
-
V.layouts = Object.values(G.layouts || {}).map((nt) => nt.layout), await
|
|
16008
|
+
V.layouts = Object.values(G.layouts || {}).map((nt) => nt.layout), await Ua(G), V.reloadedState = G;
|
|
15913
16009
|
} else if (!I && M.workflowState) {
|
|
15914
16010
|
const G = JSON.parse(M.workflowState);
|
|
15915
|
-
V.layouts = Object.values(G.layouts || {}).map((nt) => nt.layout), await
|
|
16011
|
+
V.layouts = Object.values(G.layouts || {}).map((nt) => nt.layout), await Ua(G), V.reloadedState = G;
|
|
15916
16012
|
} else
|
|
15917
|
-
V.layouts =
|
|
16013
|
+
V.layouts = vl(
|
|
15918
16014
|
V.transaction,
|
|
15919
16015
|
V.workflow
|
|
15920
16016
|
);
|
|
15921
|
-
return V.renderableContextService = new
|
|
16017
|
+
return V.renderableContextService = new Vo(
|
|
15922
16018
|
V.layouts
|
|
15923
16019
|
), V.delayWorkflowStateSync = !0, { experienceOptions: V, index: P, options: M };
|
|
15924
16020
|
}), p = await Promise.all(f);
|
|
15925
16021
|
k.setMap("transactionOwnerIds", g);
|
|
15926
16022
|
const w = p.sort((S, B) => S.index - B.index).map(async (S) => {
|
|
15927
|
-
const { experienceOptions: B, options: E } = S, I = new
|
|
16023
|
+
const { experienceOptions: B, options: E } = S, I = new Fo(this, B);
|
|
15928
16024
|
return await I.getWorkflowManager().getInitializationPromise(), E.type !== "transaction" && this.customer && await I.attachCustomerDetails({ email: this.customer.emailAddress }), I;
|
|
15929
16025
|
}), v = await Promise.all(w);
|
|
15930
16026
|
return v.forEach((S) => S.getWorkflowManager().setWorkflowStateSyncEnabled(!0)), v;
|
|
@@ -15998,7 +16094,7 @@ class Rc {
|
|
|
15998
16094
|
};
|
|
15999
16095
|
}
|
|
16000
16096
|
}
|
|
16001
|
-
const
|
|
16097
|
+
const El = async (r, t) => (await b.getShadowGraphqlClient().query({
|
|
16002
16098
|
query: Pi,
|
|
16003
16099
|
errorPolicy: "all",
|
|
16004
16100
|
fetchPolicy: "no-cache",
|
|
@@ -16010,7 +16106,7 @@ const wl = async (r, t) => (await b.getShadowGraphqlClient().query({
|
|
|
16010
16106
|
variables: {
|
|
16011
16107
|
themeConfigurationId: t
|
|
16012
16108
|
}
|
|
16013
|
-
})).data.currentIntegration,
|
|
16109
|
+
})).data.currentIntegration, Vc = async (r) => {
|
|
16014
16110
|
const e = await b.getShadowGraphqlClient().query({
|
|
16015
16111
|
query: mi,
|
|
16016
16112
|
errorPolicy: "all",
|
|
@@ -16021,7 +16117,7 @@ const wl = async (r, t) => (await b.getShadowGraphqlClient().query({
|
|
|
16021
16117
|
});
|
|
16022
16118
|
if (e.data.transactions.length !== 0)
|
|
16023
16119
|
return e.data.transactions[0];
|
|
16024
|
-
},
|
|
16120
|
+
}, zc = async (r, t) => {
|
|
16025
16121
|
var a;
|
|
16026
16122
|
return (a = (await b.getShadowGraphqlClient().query({
|
|
16027
16123
|
query: Di,
|
|
@@ -16031,7 +16127,7 @@ const wl = async (r, t) => (await b.getShadowGraphqlClient().query({
|
|
|
16031
16127
|
themeInstallId: t
|
|
16032
16128
|
}
|
|
16033
16129
|
})).data) == null ? void 0 : a.marketplaceThemeInstallConfiguration;
|
|
16034
|
-
},
|
|
16130
|
+
}, Gc = async (r) => {
|
|
16035
16131
|
var e, a, n;
|
|
16036
16132
|
return (n = (a = (e = (await b.getShadowGraphqlClient().query({
|
|
16037
16133
|
query: xi,
|
|
@@ -16040,7 +16136,7 @@ const wl = async (r, t) => (await b.getShadowGraphqlClient().query({
|
|
|
16040
16136
|
id: r
|
|
16041
16137
|
}
|
|
16042
16138
|
})).data) == null ? void 0 : e.bundles) == null ? void 0 : a[0]) == null ? void 0 : n.marketplaceThemeInstallConfiguration;
|
|
16043
|
-
},
|
|
16139
|
+
}, Wc = async (r) => {
|
|
16044
16140
|
var e, a, n;
|
|
16045
16141
|
return (n = (a = (e = (await b.getShadowGraphqlClient().query({
|
|
16046
16142
|
query: Fi,
|
|
@@ -16050,7 +16146,7 @@ const wl = async (r, t) => (await b.getShadowGraphqlClient().query({
|
|
|
16050
16146
|
}
|
|
16051
16147
|
})).data) == null ? void 0 : e.transactions) == null ? void 0 : a[0]) == null ? void 0 : n.marketplaceThemeInstallConfiguration;
|
|
16052
16148
|
};
|
|
16053
|
-
function
|
|
16149
|
+
function Bl(r, t, e, a) {
|
|
16054
16150
|
const n = e.width * r.zoom, i = e.height * r.zoom;
|
|
16055
16151
|
if (a) {
|
|
16056
16152
|
const o = r, l = Math.max(t.width / e.width, t.height / e.height);
|
|
@@ -16064,7 +16160,7 @@ function yl(r, t, e, a) {
|
|
|
16064
16160
|
function le(r, t, e) {
|
|
16065
16161
|
return Math.min(Math.max(r, t), e);
|
|
16066
16162
|
}
|
|
16067
|
-
class
|
|
16163
|
+
class bl {
|
|
16068
16164
|
constructor(t, e) {
|
|
16069
16165
|
this.minZoomScale = [0.03], this.maxZoomScale = [20], this._debouncedUpdateFrameOffsets = sn(this.updateFrameOffsets, 200), this.targetElements = [], this.onFrameDataChangeListeners = [], this.onZoomChangeListeners = [], this.forceImageCover = t, this.initialZoom = e, this.thresholdSettings = {
|
|
16070
16166
|
useThreshold: !1,
|
|
@@ -16121,7 +16217,7 @@ class Sl {
|
|
|
16121
16217
|
return;
|
|
16122
16218
|
}
|
|
16123
16219
|
t.forEach((e, a) => {
|
|
16124
|
-
const n =
|
|
16220
|
+
const n = Ut.get(e);
|
|
16125
16221
|
n && (this.frameData || (this.frameData = new Array(t.length)), this.frameData[a] = n);
|
|
16126
16222
|
});
|
|
16127
16223
|
}
|
|
@@ -16207,7 +16303,7 @@ class Sl {
|
|
|
16207
16303
|
return;
|
|
16208
16304
|
}
|
|
16209
16305
|
(!this.offsets || this.offsets.length !== this.frameData.length) && (this.offsets = new Array(this.frameData.length)), this.frameData.forEach((s, o) => {
|
|
16210
|
-
this.offsets[o] =
|
|
16306
|
+
this.offsets[o] = Bl(t[o], s, this.imageData, this.forceImageCover);
|
|
16211
16307
|
}), this._debouncedUpdateFrameOffsets(
|
|
16212
16308
|
this.offsets,
|
|
16213
16309
|
n,
|
|
@@ -16286,7 +16382,10 @@ class Sl {
|
|
|
16286
16382
|
}), this._debouncedUpdateFrameOffsets(this.offsets, t, this.frameData, this.thresholdSettings));
|
|
16287
16383
|
}
|
|
16288
16384
|
}
|
|
16289
|
-
class
|
|
16385
|
+
class jc {
|
|
16386
|
+
updateRecipient(t, e, a, n, i, s, o, l) {
|
|
16387
|
+
throw new Error("Method not implemented.");
|
|
16388
|
+
}
|
|
16290
16389
|
approveTransaction(t) {
|
|
16291
16390
|
throw new Error("Method not implemented.");
|
|
16292
16391
|
}
|
|
@@ -16445,12 +16544,12 @@ class Vc {
|
|
|
16445
16544
|
return [];
|
|
16446
16545
|
}
|
|
16447
16546
|
}
|
|
16448
|
-
var
|
|
16449
|
-
class
|
|
16547
|
+
var Il = /* @__PURE__ */ ((r) => (r.SelectFrame = "SelectFrame", r.SelectImage = "SelectImage", r.Position = "Position", r))(Il || {});
|
|
16548
|
+
class Dl extends it {
|
|
16450
16549
|
constructor(t, e, a) {
|
|
16451
16550
|
super(t, e, a);
|
|
16452
16551
|
const n = e.data;
|
|
16453
|
-
this.frameService = new
|
|
16552
|
+
this.frameService = new bl(n.forceImageCover, n.initialZoomLevel), this.frameService.connectWorkflowManager(t, e.stepName);
|
|
16454
16553
|
}
|
|
16455
16554
|
selectVariant(t) {
|
|
16456
16555
|
const e = this.manager.getRegionElements(this.step.stepName);
|
|
@@ -16514,7 +16613,7 @@ class El extends it {
|
|
|
16514
16613
|
const e = await this.getOriginalImageSelection();
|
|
16515
16614
|
if (!e)
|
|
16516
16615
|
throw new Error("You must supply an image selection before attempting to remove the background.");
|
|
16517
|
-
const a = await
|
|
16616
|
+
const a = await $.removeBackgroundFromAsset(e);
|
|
16518
16617
|
t && await Ct.selectImage(this.step, a, this.manager, !1);
|
|
16519
16618
|
const n = ((i = this.manager.getStepStorage(this.step.stepName)) == null ? void 0 : i.framePatternData) || {};
|
|
16520
16619
|
return this.manager.updateStorage(this.step.stepName, {
|
|
@@ -16573,13 +16672,13 @@ class El extends it {
|
|
|
16573
16672
|
var e, a;
|
|
16574
16673
|
const t = (a = (e = this.manager.getStepStorage(this.step.stepName)) == null ? void 0 : e.framePatternData) == null ? void 0 : a.originalAssetKey;
|
|
16575
16674
|
if (t)
|
|
16576
|
-
return
|
|
16675
|
+
return $.getLocalOrFromServer(t);
|
|
16577
16676
|
}
|
|
16578
16677
|
async getBackgroundRemovedImageSelection() {
|
|
16579
16678
|
var e, a;
|
|
16580
16679
|
const t = (a = (e = this.manager.getStepStorage(this.step.stepName)) == null ? void 0 : e.framePatternData) == null ? void 0 : a.backgroundRemovedAssetKey;
|
|
16581
16680
|
if (t)
|
|
16582
|
-
return
|
|
16681
|
+
return $.getLocalOrFromServer(t);
|
|
16583
16682
|
}
|
|
16584
16683
|
hasOriginalImageSelection() {
|
|
16585
16684
|
var t, e;
|
|
@@ -16619,7 +16718,7 @@ class El extends it {
|
|
|
16619
16718
|
return this.manager.getStepStorage(this.step.stepName);
|
|
16620
16719
|
}
|
|
16621
16720
|
}
|
|
16622
|
-
const
|
|
16721
|
+
const Pl = y`
|
|
16623
16722
|
query GetLoggedInCustomer($email: String!) {
|
|
16624
16723
|
customer(emailAddress: $email) {
|
|
16625
16724
|
id
|
|
@@ -16662,21 +16761,21 @@ const Bl = y`
|
|
|
16662
16761
|
total
|
|
16663
16762
|
}
|
|
16664
16763
|
}
|
|
16665
|
-
`,
|
|
16764
|
+
`, Fl = y`
|
|
16666
16765
|
mutation SetTransactionDesignName($id: String!, $name: String!) {
|
|
16667
16766
|
transactionUpdate(id: $id, designName: $name) {
|
|
16668
16767
|
id
|
|
16669
16768
|
designName
|
|
16670
16769
|
}
|
|
16671
16770
|
}
|
|
16672
|
-
`,
|
|
16771
|
+
`, xl = y`
|
|
16673
16772
|
mutation DuplicateTransaction($id: String!, $template: Boolean!) {
|
|
16674
16773
|
transactionDuplicate(id: $id, template: $template) {
|
|
16675
16774
|
id
|
|
16676
16775
|
workflowViewerLink
|
|
16677
16776
|
}
|
|
16678
16777
|
}
|
|
16679
|
-
`,
|
|
16778
|
+
`, kl = y`
|
|
16680
16779
|
query GetCustomerBundles($id: String!, $limit: Int!, $offset: Int!) {
|
|
16681
16780
|
customerBundlesFeed(id: $id, limit: $limit, offset: $offset) {
|
|
16682
16781
|
items {
|
|
@@ -16689,7 +16788,7 @@ const Bl = y`
|
|
|
16689
16788
|
total
|
|
16690
16789
|
}
|
|
16691
16790
|
}
|
|
16692
|
-
`,
|
|
16791
|
+
`, Ml = y`
|
|
16693
16792
|
query GetTransactionsForBundle($id: String!) {
|
|
16694
16793
|
bundles(ids: [$id]) {
|
|
16695
16794
|
id
|
|
@@ -16710,21 +16809,21 @@ const Bl = y`
|
|
|
16710
16809
|
}
|
|
16711
16810
|
}
|
|
16712
16811
|
}
|
|
16713
|
-
`,
|
|
16812
|
+
`, Tl = y`
|
|
16714
16813
|
mutation SetBundleName($id: String!, $name: String!) {
|
|
16715
16814
|
bundleUpdate(id: $id, name: $name) {
|
|
16716
16815
|
id
|
|
16717
16816
|
name
|
|
16718
16817
|
}
|
|
16719
16818
|
}
|
|
16720
|
-
`,
|
|
16819
|
+
`, Nl = y`
|
|
16721
16820
|
mutation DuplicateBundle($id: String!, $template: Boolean!) {
|
|
16722
16821
|
bundleDuplicate(id: $id, template: $template) {
|
|
16723
16822
|
id
|
|
16724
16823
|
workflowViewerLink
|
|
16725
16824
|
}
|
|
16726
16825
|
}
|
|
16727
|
-
`,
|
|
16826
|
+
`, Ql = y`
|
|
16728
16827
|
query GetBundleTemplates($id: String!, $limit: Int!, $offset: Int!) {
|
|
16729
16828
|
customerBundlesFeed(id: $id, limit: $limit, offset: $offset, template: true) {
|
|
16730
16829
|
items {
|
|
@@ -16737,43 +16836,43 @@ const Bl = y`
|
|
|
16737
16836
|
total
|
|
16738
16837
|
}
|
|
16739
16838
|
}
|
|
16740
|
-
`,
|
|
16741
|
-
mutation:
|
|
16839
|
+
`, Hc = async (r, t, e) => await b.getShadowGraphqlClient().mutate({
|
|
16840
|
+
mutation: Tl,
|
|
16742
16841
|
errorPolicy: "all",
|
|
16743
16842
|
variables: {
|
|
16744
16843
|
id: r,
|
|
16745
16844
|
name: t
|
|
16746
16845
|
},
|
|
16747
16846
|
context: e
|
|
16748
|
-
}),
|
|
16749
|
-
mutation:
|
|
16847
|
+
}), qc = async (r, t) => await b.getShadowGraphqlClient().mutate({
|
|
16848
|
+
mutation: Fl,
|
|
16750
16849
|
errorPolicy: "all",
|
|
16751
16850
|
variables: {
|
|
16752
16851
|
id: r,
|
|
16753
16852
|
name: t
|
|
16754
16853
|
}
|
|
16755
|
-
}),
|
|
16756
|
-
mutation:
|
|
16854
|
+
}), Yc = async (r, t) => await b.getShadowGraphqlClient().mutate({
|
|
16855
|
+
mutation: Nl,
|
|
16757
16856
|
errorPolicy: "all",
|
|
16758
16857
|
variables: {
|
|
16759
16858
|
id: r,
|
|
16760
16859
|
template: t
|
|
16761
16860
|
}
|
|
16762
|
-
}),
|
|
16763
|
-
mutation:
|
|
16861
|
+
}), Jc = async (r, t) => await b.getShadowGraphqlClient().mutate({
|
|
16862
|
+
mutation: xl,
|
|
16764
16863
|
errorPolicy: "all",
|
|
16765
16864
|
variables: {
|
|
16766
16865
|
id: r,
|
|
16767
16866
|
template: t
|
|
16768
16867
|
}
|
|
16769
|
-
}),
|
|
16770
|
-
query:
|
|
16868
|
+
}), Kc = async (r) => (await b.getShadowGraphqlClient().query({
|
|
16869
|
+
query: Pl,
|
|
16771
16870
|
errorPolicy: "all",
|
|
16772
16871
|
variables: {
|
|
16773
16872
|
email: r
|
|
16774
16873
|
}
|
|
16775
|
-
})).data.customer,
|
|
16776
|
-
query:
|
|
16874
|
+
})).data.customer, _c = async (r, t, e) => await b.getShadowGraphqlClient().query({
|
|
16875
|
+
query: kl,
|
|
16777
16876
|
errorPolicy: "all",
|
|
16778
16877
|
fetchPolicy: "no-cache",
|
|
16779
16878
|
variables: {
|
|
@@ -16781,15 +16880,15 @@ const Bl = y`
|
|
|
16781
16880
|
offset: e,
|
|
16782
16881
|
limit: t
|
|
16783
16882
|
}
|
|
16784
|
-
}),
|
|
16785
|
-
query:
|
|
16883
|
+
}), Xc = async (r, t) => await b.getShadowGraphqlClient().query({
|
|
16884
|
+
query: Ml,
|
|
16786
16885
|
errorPolicy: "all",
|
|
16787
16886
|
fetchPolicy: "no-cache",
|
|
16788
16887
|
variables: {
|
|
16789
16888
|
id: r
|
|
16790
16889
|
},
|
|
16791
16890
|
context: t
|
|
16792
|
-
}),
|
|
16891
|
+
}), Zc = async (r, t, e) => {
|
|
16793
16892
|
var n;
|
|
16794
16893
|
const a = await b.getShadowGraphqlClient().query({
|
|
16795
16894
|
query: Ia,
|
|
@@ -16813,7 +16912,7 @@ const Bl = y`
|
|
|
16813
16912
|
}
|
|
16814
16913
|
});
|
|
16815
16914
|
return ((n = a == null ? void 0 : a.data.customerTransactionsFeed) == null ? void 0 : n.items) || [];
|
|
16816
|
-
},
|
|
16915
|
+
}, td = async (r, t, e) => {
|
|
16817
16916
|
var n;
|
|
16818
16917
|
const a = await b.getShadowGraphqlClient().query({
|
|
16819
16918
|
query: Ia,
|
|
@@ -16837,7 +16936,7 @@ const Bl = y`
|
|
|
16837
16936
|
}
|
|
16838
16937
|
});
|
|
16839
16938
|
return ((n = a == null ? void 0 : a.data.customerTransactionsFeed) == null ? void 0 : n.items) || [];
|
|
16840
|
-
},
|
|
16939
|
+
}, ed = async (r, t, e) => {
|
|
16841
16940
|
var n;
|
|
16842
16941
|
const a = await b.getShadowGraphqlClient().query({
|
|
16843
16942
|
query: Ia,
|
|
@@ -16857,10 +16956,10 @@ const Bl = y`
|
|
|
16857
16956
|
}
|
|
16858
16957
|
});
|
|
16859
16958
|
return ((n = a == null ? void 0 : a.data.customerTransactionsFeed) == null ? void 0 : n.items) || [];
|
|
16860
|
-
},
|
|
16959
|
+
}, ad = async (r, t, e) => {
|
|
16861
16960
|
var n;
|
|
16862
16961
|
const a = await b.getShadowGraphqlClient().query({
|
|
16863
|
-
query:
|
|
16962
|
+
query: Ql,
|
|
16864
16963
|
errorPolicy: "all",
|
|
16865
16964
|
fetchPolicy: "no-cache",
|
|
16866
16965
|
variables: {
|
|
@@ -16881,7 +16980,7 @@ const Bl = y`
|
|
|
16881
16980
|
console.error("vite-plugin-css-injected-by-js", t);
|
|
16882
16981
|
}
|
|
16883
16982
|
})();
|
|
16884
|
-
var
|
|
16983
|
+
var Rl = /* @__PURE__ */ ((r) => (r.Manual = "Manual", r.OnStart = "OnStart", r.OnQuit = "OnQuit", r.OnEnd = "OnEnd", r))(Rl || {}), Ol = /* @__PURE__ */ ((r) => (r.Email = "Email", r.FirstName = "FirstName", r.LastName = "LastName", r.Phone = "Phone", r.Apartment = "Apartment", r.City = "City", r.Country = "Country", r.OrganizationName = "OrganizationName", r.PostCode = "PostCode", r.State = "State", r.StreetAddress = "StreetAddress", r.DesignName = "DesignName", r.PurchaseOrder = "PurchaseOrder", r.DispatchDate = "DispatchDate", r.Stakeholders = "Stakeholders", r))(Ol || {}), K;
|
|
16885
16984
|
K = { __e: function(r, t, e, a) {
|
|
16886
16985
|
for (var n, i, s; t = t.__; )
|
|
16887
16986
|
if ((n = t.__c) && !n.__)
|
|
@@ -16894,7 +16993,7 @@ K = { __e: function(r, t, e, a) {
|
|
|
16894
16993
|
throw r;
|
|
16895
16994
|
} }, typeof Promise == "function" && Promise.prototype.then.bind(Promise.resolve());
|
|
16896
16995
|
var ot, qe, Ja, tr = [], Ye = [], Ka = K.__b, _a = K.__r, Xa = K.diffed, Za = K.__c, tn = K.unmount;
|
|
16897
|
-
function
|
|
16996
|
+
function $l() {
|
|
16898
16997
|
for (var r; r = tr.shift(); )
|
|
16899
16998
|
if (r.__P && r.__H)
|
|
16900
16999
|
try {
|
|
@@ -16914,7 +17013,7 @@ K.__b = function(r) {
|
|
|
16914
17013
|
}, K.diffed = function(r) {
|
|
16915
17014
|
Xa && Xa(r);
|
|
16916
17015
|
var t = r.__c;
|
|
16917
|
-
t && t.__H && (t.__H.__h.length && (tr.push(t) !== 1 && Ja === K.requestAnimationFrame || ((Ja = K.requestAnimationFrame) ||
|
|
17016
|
+
t && t.__H && (t.__H.__h.length && (tr.push(t) !== 1 && Ja === K.requestAnimationFrame || ((Ja = K.requestAnimationFrame) || Ul)($l)), t.__H.__.forEach(function(e) {
|
|
16918
17017
|
e.i && (e.__H = e.i), e.__V !== Ye && (e.__ = e.__V), e.i = void 0, e.__V = Ye;
|
|
16919
17018
|
})), qe = ot = null;
|
|
16920
17019
|
}, K.__c = function(r, t) {
|
|
@@ -16941,7 +17040,7 @@ K.__b = function(r) {
|
|
|
16941
17040
|
}), e.__H = void 0, t && K.__e(t, e.__v));
|
|
16942
17041
|
};
|
|
16943
17042
|
var en = typeof requestAnimationFrame == "function";
|
|
16944
|
-
function
|
|
17043
|
+
function Ul(r) {
|
|
16945
17044
|
var t, e = function() {
|
|
16946
17045
|
clearTimeout(a), en && cancelAnimationFrame(t), setTimeout(r);
|
|
16947
17046
|
}, a = setTimeout(e, 100);
|
|
@@ -16957,170 +17056,171 @@ function la(r) {
|
|
|
16957
17056
|
}
|
|
16958
17057
|
export {
|
|
16959
17058
|
da as AddonHandle,
|
|
16960
|
-
|
|
17059
|
+
$c as ArrayInput,
|
|
16961
17060
|
et as AspectType,
|
|
16962
17061
|
yt as AssetNotFoundError,
|
|
16963
17062
|
he as AssetType,
|
|
16964
|
-
|
|
16965
|
-
|
|
16966
|
-
|
|
17063
|
+
Tc as BringForwardCommand,
|
|
17064
|
+
Mc as BringToBackCommand,
|
|
17065
|
+
kc as BringToFrontCommand,
|
|
16967
17066
|
mr as BundleDesignCreationCartAddMode,
|
|
16968
17067
|
R as CanvasCommand,
|
|
16969
17068
|
se as CollectionProduct,
|
|
16970
17069
|
Ha as ColorOptionGlobalPropertyHandle,
|
|
16971
17070
|
_i as CommandContext,
|
|
16972
|
-
|
|
16973
|
-
|
|
17071
|
+
Ol as ConversionDataType,
|
|
17072
|
+
Rl as ConversionLocation,
|
|
16974
17073
|
W as CreateElementCommand,
|
|
16975
|
-
|
|
17074
|
+
$n as CreateLayoutCommand,
|
|
16976
17075
|
vt as DeleteElementCommand,
|
|
16977
|
-
|
|
16978
|
-
|
|
17076
|
+
go as DigitalContentStepHandle,
|
|
17077
|
+
qo as FileUploadGlobalPropertyHandle,
|
|
16979
17078
|
oe as FlowExecutionNodeResult,
|
|
16980
|
-
|
|
16981
|
-
|
|
17079
|
+
ul as FlowExecutionResult,
|
|
17080
|
+
Al as FlowService,
|
|
16982
17081
|
es as FontAlignmentCommand,
|
|
16983
17082
|
Zi as FontColorCommand,
|
|
16984
17083
|
ts as FontSizeCommand,
|
|
16985
17084
|
Va as FontSourceCommand,
|
|
16986
|
-
|
|
16987
|
-
|
|
16988
|
-
|
|
17085
|
+
bl as FrameService,
|
|
17086
|
+
Il as FrameStep,
|
|
17087
|
+
Dl as FrameStepHandle,
|
|
16989
17088
|
Ba as GlobalPropertyHandle,
|
|
16990
17089
|
O as GroupCommand,
|
|
16991
|
-
|
|
17090
|
+
so as IllustrationStepHandle,
|
|
16992
17091
|
Me as InformationMessageType,
|
|
16993
|
-
|
|
17092
|
+
mo as InformationStepHandle,
|
|
16994
17093
|
qa as IntegrationProduct,
|
|
16995
17094
|
fr as IntegrationType,
|
|
16996
|
-
|
|
17095
|
+
Ic as LayoutElementFactory,
|
|
16997
17096
|
T as LayoutElementType,
|
|
16998
17097
|
Y as LayoutNotFoundError,
|
|
16999
17098
|
Gt as LayoutRenderingPurpose,
|
|
17000
|
-
|
|
17099
|
+
oo as MaterialStepHandle,
|
|
17001
17100
|
fe as MisconfigurationError,
|
|
17002
|
-
|
|
17003
|
-
|
|
17004
|
-
|
|
17005
|
-
|
|
17101
|
+
jc as MockWorkflowManager,
|
|
17102
|
+
lo as ModelStepHandle,
|
|
17103
|
+
fo as ModuleStepHandle,
|
|
17104
|
+
Dc as MoveCommand,
|
|
17006
17105
|
Xn as ObjectInput,
|
|
17007
|
-
|
|
17106
|
+
hl as ObjectInputType,
|
|
17008
17107
|
_n as OptionGlobalPropertyHandle,
|
|
17009
17108
|
ge as OptionNotFoundError,
|
|
17010
17109
|
Dt as ParseError,
|
|
17011
|
-
|
|
17110
|
+
co as PictureStepHandle,
|
|
17012
17111
|
pr as ProductCameraRig,
|
|
17013
|
-
|
|
17112
|
+
nl as ProductCollection,
|
|
17113
|
+
al as ProductCollectionProductSortKey,
|
|
17014
17114
|
zt as ProductWorkflow,
|
|
17015
17115
|
Ht as PromiseCache,
|
|
17016
17116
|
Pn as PromiseQueue,
|
|
17017
|
-
|
|
17117
|
+
Ao as QuestionStepHandle,
|
|
17018
17118
|
Dn as QueueablePromise,
|
|
17019
|
-
|
|
17119
|
+
Fc as ResizeCommand,
|
|
17020
17120
|
Wt as ResourceNotFoundError,
|
|
17021
|
-
|
|
17121
|
+
Pc as RotateCommand,
|
|
17022
17122
|
H as ScaleAxis,
|
|
17023
|
-
|
|
17024
|
-
|
|
17123
|
+
Nc as SendBackwardsCommand,
|
|
17124
|
+
uo as ShapeStepHandle,
|
|
17025
17125
|
gr as ShareActionType,
|
|
17026
|
-
|
|
17126
|
+
Lc as SpiffCommerceClient,
|
|
17027
17127
|
me as StakeholderType,
|
|
17028
17128
|
hr as StepAspectType,
|
|
17029
17129
|
it as StepHandle,
|
|
17030
17130
|
D as StepType,
|
|
17031
17131
|
kt as TextAlgorithm,
|
|
17032
17132
|
rs as TextChangeCommand,
|
|
17033
|
-
|
|
17034
|
-
|
|
17035
|
-
|
|
17036
|
-
|
|
17037
|
-
|
|
17133
|
+
Yo as TextGlobalPropertyHandle,
|
|
17134
|
+
Oc as TextInput,
|
|
17135
|
+
ho as TextStepHandle,
|
|
17136
|
+
il as Transform,
|
|
17137
|
+
rl as TransformCollection,
|
|
17038
17138
|
z as UnhandledBehaviorError,
|
|
17039
17139
|
Cr as UnitOfMeasurement,
|
|
17040
|
-
|
|
17140
|
+
xc as UpdateImageSourceCommand,
|
|
17041
17141
|
st as Variant,
|
|
17042
|
-
|
|
17043
|
-
|
|
17044
|
-
|
|
17142
|
+
Po as WorkflowExperienceEventType,
|
|
17143
|
+
Fo as WorkflowExperienceImpl,
|
|
17144
|
+
$ as assetService,
|
|
17045
17145
|
Gr as browserColorToHex,
|
|
17046
|
-
|
|
17047
|
-
|
|
17048
|
-
|
|
17049
|
-
|
|
17146
|
+
Bc as cmPerPixel,
|
|
17147
|
+
vo as createDesign,
|
|
17148
|
+
Sc as currentDirection,
|
|
17149
|
+
cc as dataUrlFromExternalUrl,
|
|
17050
17150
|
je as designService,
|
|
17051
17151
|
Ae as determineCorrectFontSizeAndLines,
|
|
17052
|
-
|
|
17152
|
+
Ln as digitalContentStepService,
|
|
17053
17153
|
dt as domParser,
|
|
17054
|
-
|
|
17055
|
-
|
|
17154
|
+
Yc as duplicateBundle,
|
|
17155
|
+
Jc as duplicateTransaction,
|
|
17056
17156
|
at as fetchAsString,
|
|
17057
|
-
|
|
17058
|
-
|
|
17059
|
-
|
|
17060
|
-
|
|
17157
|
+
mc as findAngle,
|
|
17158
|
+
U as findElement,
|
|
17159
|
+
uc as findPmsColors,
|
|
17160
|
+
Ut as frameDataCache,
|
|
17061
17161
|
Ct as frameStepService,
|
|
17062
|
-
|
|
17063
|
-
|
|
17162
|
+
N as generate,
|
|
17163
|
+
Lo as generateCommands,
|
|
17064
17164
|
lt as generateSVGWithUnknownColors,
|
|
17065
|
-
|
|
17165
|
+
Rc as generateStateFromDesignInputSteps,
|
|
17066
17166
|
De as getAttributesFromArrayBuffer,
|
|
17067
|
-
|
|
17068
|
-
|
|
17069
|
-
|
|
17070
|
-
|
|
17071
|
-
|
|
17072
|
-
|
|
17167
|
+
hc as getAxisAlignedBoundingBox,
|
|
17168
|
+
Bl as getBoundedOffsets,
|
|
17169
|
+
Gc as getBundleThemeConfiguration,
|
|
17170
|
+
Kc as getCustomer,
|
|
17171
|
+
_c as getCustomerBundles,
|
|
17172
|
+
vc as getElementVertices,
|
|
17073
17173
|
xe as getFrameData,
|
|
17074
|
-
|
|
17075
|
-
|
|
17076
|
-
|
|
17077
|
-
|
|
17078
|
-
|
|
17079
|
-
|
|
17080
|
-
|
|
17174
|
+
El as getIntegration,
|
|
17175
|
+
wc as getNEPoint,
|
|
17176
|
+
Cc as getNWPoint,
|
|
17177
|
+
td as getOrderedTransactions,
|
|
17178
|
+
zc as getOverrideThemeConfiguration,
|
|
17179
|
+
pc as getPointOfRotation,
|
|
17180
|
+
yc as getSEPoint,
|
|
17081
17181
|
wa as getSvgElement,
|
|
17082
|
-
|
|
17083
|
-
|
|
17084
|
-
|
|
17085
|
-
|
|
17086
|
-
|
|
17087
|
-
|
|
17088
|
-
|
|
17089
|
-
|
|
17182
|
+
ad as getTemplateBundles,
|
|
17183
|
+
ed as getTemplateTransactions,
|
|
17184
|
+
Vc as getTransaction,
|
|
17185
|
+
Wc as getTransactionThemeConfiguration,
|
|
17186
|
+
Xc as getTransactionsForBundle,
|
|
17187
|
+
fc as getTrueCoordinates,
|
|
17188
|
+
Zc as getUnorderedTransactions,
|
|
17189
|
+
Uc as getWorkflow,
|
|
17090
17190
|
Zn as getWorkflows,
|
|
17091
17191
|
b as graphQlManager,
|
|
17092
17192
|
de as illustrationStepService,
|
|
17093
|
-
|
|
17193
|
+
gc as isCloseToValue,
|
|
17094
17194
|
Tt as loadFont,
|
|
17095
|
-
|
|
17195
|
+
Ac as matchHexToPms,
|
|
17096
17196
|
Vn as materialStepService,
|
|
17097
|
-
|
|
17098
|
-
|
|
17197
|
+
el as metafieldManager,
|
|
17198
|
+
Ec as mmPerPixel,
|
|
17099
17199
|
zn as modelStepService,
|
|
17100
17200
|
fa as modifySVGColors,
|
|
17101
17201
|
Gn as moduleStepService,
|
|
17102
|
-
|
|
17103
|
-
|
|
17202
|
+
Hc as nameBundle,
|
|
17203
|
+
qc as nameTransaction,
|
|
17104
17204
|
X as optionService,
|
|
17105
|
-
|
|
17205
|
+
bc as outlineFontsInSvg,
|
|
17106
17206
|
At as patternImageDataCache,
|
|
17107
17207
|
k as persistenceService,
|
|
17108
17208
|
Wn as pictureStepService,
|
|
17109
|
-
|
|
17209
|
+
dc as pmsToRgb,
|
|
17110
17210
|
jn as questionStepService,
|
|
17111
|
-
|
|
17112
|
-
|
|
17113
|
-
|
|
17114
|
-
|
|
17211
|
+
lc as registerFetchImplementation,
|
|
17212
|
+
oc as registerWindowImplementation,
|
|
17213
|
+
Ua as rehydrateSerializedLayout,
|
|
17214
|
+
Lr as rgbToPms,
|
|
17115
17215
|
re as rotateAroundPoint,
|
|
17116
17216
|
ma as sanitizeSvgTree,
|
|
17117
17217
|
kr as setBearerAuthenticationToken,
|
|
17118
17218
|
mn as setCanvasModule,
|
|
17119
|
-
|
|
17219
|
+
Lt as shapeStepService,
|
|
17120
17220
|
ss as shortenUrl,
|
|
17121
17221
|
mt as spiffCoreConfiguration,
|
|
17122
|
-
|
|
17123
|
-
|
|
17222
|
+
Qc as stepAspectValuesToDesignInputSteps,
|
|
17223
|
+
Na as svgColorValueToDefinition,
|
|
17124
17224
|
Rn as svgStringDimensions,
|
|
17125
17225
|
Aa as svgToDataUrl,
|
|
17126
17226
|
q as textStepService,
|