@spiffcommerce/core 27.1.0-beta.ecf18ce0-f226-5b0f-b26d-638fe8798343 → 27.1.0-beta.f047d6eb-0ca0-55fa-9fe6-548ba64f6f9a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +123 -123
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +704 -669
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createHttpLink as rr, ApolloClient as ir, from as sr, InMemoryCache as or, gql as
|
|
1
|
+
import { createHttpLink as rr, ApolloClient as ir, from as sr, InMemoryCache as or, gql as v } from "@apollo/client/core";
|
|
2
2
|
import { setContext as lr } from "@apollo/client/link/context";
|
|
3
3
|
import { onError as cr } from "@apollo/client/link/error";
|
|
4
4
|
import { renderToStaticMarkup as dr } from "preact-render-to-string";
|
|
@@ -9,10 +9,10 @@ import hr from "fuse.js";
|
|
|
9
9
|
import { Pith as Aa } from "pith";
|
|
10
10
|
import St from "lodash.clonedeep";
|
|
11
11
|
import { toString as sn } from "qrcode";
|
|
12
|
-
import
|
|
12
|
+
import mr from "svg-path-bbox";
|
|
13
13
|
import { parse as _e } from "opentype.js";
|
|
14
14
|
import { jsx as F, jsxs as ct, Fragment as Gt } from "preact/jsx-runtime";
|
|
15
|
-
import
|
|
15
|
+
import gr from "handlebars";
|
|
16
16
|
import { dataUriToBuffer as pr } from "data-uri-to-buffer";
|
|
17
17
|
import Fa from "lodash.chunk";
|
|
18
18
|
import { CognitoIdentityProviderClient as fr, InitiateAuthCommand as ka, RespondToAuthChallengeCommand as Cr } from "@aws-sdk/client-cognito-identity-provider";
|
|
@@ -37,7 +37,7 @@ class ye extends _t {
|
|
|
37
37
|
super(`Option not Configured: ${t.stepTitle}`), this.optionId = (t == null ? void 0 : t.optionId) || "N/A";
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
class
|
|
40
|
+
class Y extends _t {
|
|
41
41
|
constructor(t) {
|
|
42
42
|
super(`Panel not Found: ${t.panelId}`), this.panelId = (t == null ? void 0 : t.panelId) || "N/A";
|
|
43
43
|
}
|
|
@@ -158,7 +158,7 @@ class Pr {
|
|
|
158
158
|
this.serverUrlCallbacks.push(t);
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
|
-
const
|
|
161
|
+
const mt = new Pr();
|
|
162
162
|
let Ze, ta;
|
|
163
163
|
function Ec(r) {
|
|
164
164
|
Ze = r;
|
|
@@ -289,34 +289,34 @@ const dn = /* @__PURE__ */ new Map(), Ta = /* @__PURE__ */ new Map(), Na = /* @_
|
|
|
289
289
|
!i || !i.result ? e() : t(i.result.toString());
|
|
290
290
|
}, a.readAsDataURL(r);
|
|
291
291
|
});
|
|
292
|
-
let Qr,
|
|
292
|
+
let Qr, ma;
|
|
293
293
|
const Rr = (r) => {
|
|
294
|
-
|
|
295
|
-
}, Or = () =>
|
|
296
|
-
let
|
|
294
|
+
ma = r;
|
|
295
|
+
}, Or = () => ma;
|
|
296
|
+
let mn;
|
|
297
297
|
const $r = (r) => {
|
|
298
|
-
|
|
298
|
+
mn = r;
|
|
299
299
|
}, Ur = () => new Promise((r) => {
|
|
300
|
-
const t =
|
|
300
|
+
const t = mt.getHubUrl(), e = (a) => {
|
|
301
301
|
a.origin === t && (window.removeEventListener("message", e), r(a.data));
|
|
302
302
|
};
|
|
303
303
|
window.parent !== window && (window.addEventListener("message", e, !1), window.parent.postMessage("ready", t));
|
|
304
304
|
}), Lr = async () => {
|
|
305
305
|
const r = {
|
|
306
|
-
applicationKey:
|
|
306
|
+
applicationKey: ma,
|
|
307
307
|
customerToken: Qr,
|
|
308
|
-
bearer:
|
|
308
|
+
bearer: mn
|
|
309
309
|
};
|
|
310
310
|
return typeof window < "u" && (window.location.href.includes("/workflows/product/") || window.location.href.includes("hub=true")) ? { ...await Ur(), ...r } : r;
|
|
311
311
|
};
|
|
312
312
|
async function Vr(r, t) {
|
|
313
|
-
const e =
|
|
313
|
+
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";
|
|
314
314
|
let n = await rt(r, { ...t, redirect: "manual" });
|
|
315
315
|
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;
|
|
316
316
|
}
|
|
317
317
|
class zr {
|
|
318
318
|
constructor() {
|
|
319
|
-
this.shadowGraphqlClient = this.constructShadowGraphqlClient(),
|
|
319
|
+
this.shadowGraphqlClient = this.constructShadowGraphqlClient(), mt.addServerUrlCallback(() => {
|
|
320
320
|
this.shadowGraphqlClient = this.constructShadowGraphqlClient();
|
|
321
321
|
});
|
|
322
322
|
}
|
|
@@ -328,7 +328,7 @@ class zr {
|
|
|
328
328
|
}
|
|
329
329
|
constructShadowGraphqlClient() {
|
|
330
330
|
const t = rr({
|
|
331
|
-
uri: `${
|
|
331
|
+
uri: `${mt.getServerUrl()}/graphql`,
|
|
332
332
|
fetch: Vr
|
|
333
333
|
}), e = lr(async (i, s) => {
|
|
334
334
|
const { headers: o } = s, l = o || {}, c = await Lr();
|
|
@@ -338,20 +338,20 @@ class zr {
|
|
|
338
338
|
d = await this.spiffClient.loggedInBearerToken();
|
|
339
339
|
} catch {
|
|
340
340
|
}
|
|
341
|
-
const A = s.partnerId ?? c.partnerId, u = s.activeIntegration ?? c.activeIntegration, h = s.transactionOwnerId,
|
|
341
|
+
const A = s.partnerId ?? c.partnerId, u = s.activeIntegration ?? c.activeIntegration, h = s.transactionOwnerId, m = s.customerToken ?? c.customerToken, g = s.applicationKey ?? c.applicationKey, p = s.bundleOwnerId;
|
|
342
342
|
try {
|
|
343
343
|
if (window && window.__SENTRY__) {
|
|
344
344
|
const f = window.__SENTRY__.hub;
|
|
345
345
|
if (f) {
|
|
346
346
|
const C = f.traceHeaders();
|
|
347
|
-
Object.entries(C).forEach(([w,
|
|
348
|
-
l[w] =
|
|
347
|
+
Object.entries(C).forEach(([w, S]) => {
|
|
348
|
+
l[w] = S;
|
|
349
349
|
});
|
|
350
350
|
}
|
|
351
351
|
}
|
|
352
352
|
} catch {
|
|
353
353
|
}
|
|
354
|
-
return d && (l.Authorization = `Bearer ${d}`), A && (l.partnerId = A), u && (l.activeIntegration = u), h && (l.transactionOwnerId = h),
|
|
354
|
+
return d && (l.Authorization = `Bearer ${d}`), A && (l.partnerId = A), u && (l.activeIntegration = u), h && (l.transactionOwnerId = h), m && (l.customerToken = m), g && (l["X-Application-Key"] = g), p && (l.bundleOwnerId = p), l["Allow-Moonlight-Redirect"] = "true", {
|
|
355
355
|
headers: l
|
|
356
356
|
};
|
|
357
357
|
}), a = cr(({ operation: i, graphQLErrors: s, networkError: o }) => {
|
|
@@ -368,12 +368,12 @@ class zr {
|
|
|
368
368
|
}
|
|
369
369
|
const B = new zr();
|
|
370
370
|
let ea, aa;
|
|
371
|
-
const
|
|
371
|
+
const gt = (r, t, e) => {
|
|
372
372
|
if (ea !== void 0)
|
|
373
373
|
return ea(r, t, e);
|
|
374
374
|
try {
|
|
375
375
|
const a = pn(!0);
|
|
376
|
-
return
|
|
376
|
+
return gn(a), a.createCanvas(r, t, e);
|
|
377
377
|
} catch {
|
|
378
378
|
throw new Error("Canvas module not set");
|
|
379
379
|
}
|
|
@@ -382,12 +382,12 @@ const mt = (r, t, e) => {
|
|
|
382
382
|
return aa(r, t);
|
|
383
383
|
try {
|
|
384
384
|
const e = pn(!0);
|
|
385
|
-
return
|
|
385
|
+
return gn(e), e.loadImage(r, t);
|
|
386
386
|
} catch {
|
|
387
387
|
throw new Error("Canvas module not set");
|
|
388
388
|
}
|
|
389
389
|
};
|
|
390
|
-
function
|
|
390
|
+
function gn(r) {
|
|
391
391
|
ea = r == null ? void 0 : r.createCanvas, aa = r == null ? void 0 : r.loadImage;
|
|
392
392
|
}
|
|
393
393
|
function pn(r) {
|
|
@@ -411,7 +411,7 @@ function pn(r) {
|
|
|
411
411
|
}
|
|
412
412
|
}
|
|
413
413
|
let Oe;
|
|
414
|
-
function
|
|
414
|
+
function ga() {
|
|
415
415
|
return Oe === void 0 && (Oe = Fr()), Oe;
|
|
416
416
|
}
|
|
417
417
|
let se = null;
|
|
@@ -431,10 +431,10 @@ const Gr = (r) => new Promise((t) => {
|
|
|
431
431
|
var A;
|
|
432
432
|
const t = await Tr(r), e = await Zt(t), [a, n] = jr(e);
|
|
433
433
|
if (!await Wr()) {
|
|
434
|
-
const u =
|
|
434
|
+
const u = gt(a, n);
|
|
435
435
|
return (A = u.getContext("2d")) == null || A.drawImage(e, 0, 0, a, n), u;
|
|
436
436
|
}
|
|
437
|
-
const s = await Gr(r), [o, l] = s > 4 ? [n, a] : [a, n], c =
|
|
437
|
+
const s = await Gr(r), [o, l] = s > 4 ? [n, a] : [a, n], c = gt(o, l), d = c.getContext("2d");
|
|
438
438
|
switch (s) {
|
|
439
439
|
case 2:
|
|
440
440
|
d.translate(o, 0), d.scale(-1, 1);
|
|
@@ -3275,8 +3275,8 @@ const oe = (r) => {
|
|
|
3275
3275
|
n.split(";").forEach((d) => {
|
|
3276
3276
|
const A = d.trim();
|
|
3277
3277
|
if (A) {
|
|
3278
|
-
const [u, h] = A.split(":"),
|
|
3279
|
-
Xr.indexOf(
|
|
3278
|
+
const [u, h] = A.split(":"), m = u.toLowerCase();
|
|
3279
|
+
Xr.indexOf(m) > -1 ? a.setAttribute(m, h.trim()) : l.push(A);
|
|
3280
3280
|
}
|
|
3281
3281
|
}), l.length > 0 ? a.setAttribute("style", l.join(";")) : a.removeAttribute("style");
|
|
3282
3282
|
}
|
|
@@ -3374,14 +3374,14 @@ const oe = (r) => {
|
|
|
3374
3374
|
colors: a,
|
|
3375
3375
|
svg: i
|
|
3376
3376
|
};
|
|
3377
|
-
}, ni =
|
|
3377
|
+
}, ni = v`
|
|
3378
3378
|
fragment AssetMetadataFields on Asset {
|
|
3379
3379
|
metadata {
|
|
3380
3380
|
key
|
|
3381
3381
|
value
|
|
3382
3382
|
}
|
|
3383
3383
|
}
|
|
3384
|
-
`, te = (r) =>
|
|
3384
|
+
`, te = (r) => v`
|
|
3385
3385
|
${r && ni || ""}
|
|
3386
3386
|
fragment AssetFields on Asset {
|
|
3387
3387
|
name
|
|
@@ -3424,14 +3424,14 @@ const oe = (r) => {
|
|
|
3424
3424
|
}
|
|
3425
3425
|
${r && "...AssetMetadataFields" || ""}
|
|
3426
3426
|
}
|
|
3427
|
-
`, ri =
|
|
3427
|
+
`, ri = v`
|
|
3428
3428
|
${te(!1)}
|
|
3429
3429
|
query GetAssets($keys: [String]!) {
|
|
3430
3430
|
assets(keys: $keys) {
|
|
3431
3431
|
...AssetFields
|
|
3432
3432
|
}
|
|
3433
3433
|
}
|
|
3434
|
-
`, wa =
|
|
3434
|
+
`, wa = v`
|
|
3435
3435
|
fragment MaterialFields on Material {
|
|
3436
3436
|
id
|
|
3437
3437
|
name
|
|
@@ -3478,14 +3478,14 @@ const oe = (r) => {
|
|
|
3478
3478
|
fileLink
|
|
3479
3479
|
}
|
|
3480
3480
|
}
|
|
3481
|
-
`, ii =
|
|
3481
|
+
`, ii = v`
|
|
3482
3482
|
${wa}
|
|
3483
3483
|
query GetMaterials($ids: [String]) {
|
|
3484
3484
|
materials(id: $ids) {
|
|
3485
3485
|
...MaterialFields
|
|
3486
3486
|
}
|
|
3487
3487
|
}
|
|
3488
|
-
`, si =
|
|
3488
|
+
`, si = v`
|
|
3489
3489
|
mutation CreateAsset($name: String!, $type: String!, $mimeType: String!, $anonymous: Boolean, $temporary: Boolean) {
|
|
3490
3490
|
assetCreate(name: $name, type: $type, mimeType: $mimeType, anonymous: $anonymous, temporary: $temporary) {
|
|
3491
3491
|
uploadUrl
|
|
@@ -3499,7 +3499,7 @@ const oe = (r) => {
|
|
|
3499
3499
|
}
|
|
3500
3500
|
}
|
|
3501
3501
|
}
|
|
3502
|
-
`, oi =
|
|
3502
|
+
`, oi = v`
|
|
3503
3503
|
${te(!1)}
|
|
3504
3504
|
mutation RemoveBackgroundFromAsset($key: String!) {
|
|
3505
3505
|
assetRemoveBackground(key: $key) {
|
|
@@ -3634,8 +3634,8 @@ class di {
|
|
|
3634
3634
|
const e = t.key;
|
|
3635
3635
|
if (this.bgrmProcessCache.has(e))
|
|
3636
3636
|
return this.bgrmProcessCache.get(e);
|
|
3637
|
-
if (
|
|
3638
|
-
const i = this.getLocalOrFromServer(
|
|
3637
|
+
if (J.has(e)) {
|
|
3638
|
+
const i = this.getLocalOrFromServer(J.get(e));
|
|
3639
3639
|
return this.bgrmProcessCache.set(e, i), i;
|
|
3640
3640
|
}
|
|
3641
3641
|
const n = (async () => {
|
|
@@ -3650,7 +3650,7 @@ class di {
|
|
|
3650
3650
|
});
|
|
3651
3651
|
if (this.bgrmProcessCache.delete(e), !((o = (s = i.data) == null ? void 0 : s.assetRemoveBackground) != null && o.key))
|
|
3652
3652
|
throw new Error("Failed to remove background from image");
|
|
3653
|
-
return It.add(i.data.assetRemoveBackground),
|
|
3653
|
+
return It.add(i.data.assetRemoveBackground), J.add(e, i.data.assetRemoveBackground.key), this.cache.set(
|
|
3654
3654
|
i.data.assetRemoveBackground.key,
|
|
3655
3655
|
Promise.resolve(i.data.assetRemoveBackground)
|
|
3656
3656
|
), i.data.assetRemoveBackground;
|
|
@@ -3658,7 +3658,7 @@ class di {
|
|
|
3658
3658
|
return this.bgrmProcessCache.set(e, n), n;
|
|
3659
3659
|
}
|
|
3660
3660
|
removePersistedAsset(t) {
|
|
3661
|
-
It.remove(t),
|
|
3661
|
+
It.remove(t), J.delete(t), J.deleteForBgRemovedKey(t);
|
|
3662
3662
|
}
|
|
3663
3663
|
getPersistedAssets() {
|
|
3664
3664
|
return It.list();
|
|
@@ -3767,30 +3767,30 @@ const Rt = "persistentAssets", Sn = class Ct {
|
|
|
3767
3767
|
Sn.callbacks = [];
|
|
3768
3768
|
let It = Sn;
|
|
3769
3769
|
const $a = "bgrmPersistentAssets";
|
|
3770
|
-
class
|
|
3770
|
+
class J {
|
|
3771
3771
|
static has(t) {
|
|
3772
|
-
return
|
|
3772
|
+
return J.getMap().has(t);
|
|
3773
3773
|
}
|
|
3774
3774
|
static get(t) {
|
|
3775
|
-
return
|
|
3775
|
+
return J.getMap().get(t);
|
|
3776
3776
|
}
|
|
3777
3777
|
static keys() {
|
|
3778
|
-
return
|
|
3778
|
+
return J.getMap().keys();
|
|
3779
3779
|
}
|
|
3780
3780
|
static values() {
|
|
3781
|
-
return
|
|
3781
|
+
return J.getMap().values();
|
|
3782
3782
|
}
|
|
3783
3783
|
static add(t, e) {
|
|
3784
|
-
const a =
|
|
3785
|
-
a.set(t, e),
|
|
3784
|
+
const a = J.getMap();
|
|
3785
|
+
a.set(t, e), J.setMap(a);
|
|
3786
3786
|
}
|
|
3787
3787
|
static delete(t) {
|
|
3788
|
-
const e =
|
|
3789
|
-
e.delete(t),
|
|
3788
|
+
const e = J.getMap();
|
|
3789
|
+
e.delete(t), J.setMap(e);
|
|
3790
3790
|
}
|
|
3791
3791
|
static deleteForBgRemovedKey(t) {
|
|
3792
|
-
const e =
|
|
3793
|
-
a && (e.delete(a),
|
|
3792
|
+
const e = J.getMap(), a = Array.from(e.keys()).find((n) => e.get(n) === t);
|
|
3793
|
+
a && (e.delete(a), J.setMap(e));
|
|
3794
3794
|
}
|
|
3795
3795
|
static getMap() {
|
|
3796
3796
|
return N.getMap($a) || /* @__PURE__ */ new Map();
|
|
@@ -3831,7 +3831,7 @@ class Ai {
|
|
|
3831
3831
|
this.disabled = t;
|
|
3832
3832
|
}
|
|
3833
3833
|
}
|
|
3834
|
-
const Jt = new Ai(), vn =
|
|
3834
|
+
const Jt = new Ai(), vn = v`
|
|
3835
3835
|
fragment OptionFields on Option {
|
|
3836
3836
|
id
|
|
3837
3837
|
name
|
|
@@ -3868,7 +3868,7 @@ const Jt = new Ai(), vn = S`
|
|
|
3868
3868
|
...AssetFields
|
|
3869
3869
|
}
|
|
3870
3870
|
}
|
|
3871
|
-
`, ui =
|
|
3871
|
+
`, ui = v`
|
|
3872
3872
|
${te(!1)}
|
|
3873
3873
|
${wa}
|
|
3874
3874
|
${vn}
|
|
@@ -3891,12 +3891,12 @@ const Jt = new Ai(), vn = S`
|
|
|
3891
3891
|
i.asset && U.cacheAsset(i.asset), i.thumbnail && U.cacheAsset(i.thumbnail), i.material && U.cacheMaterial(i.material);
|
|
3892
3892
|
});
|
|
3893
3893
|
}), t.data.options;
|
|
3894
|
-
},
|
|
3894
|
+
}, mi = async (r, t) => (await t).find((a) => a.id === r), gi = async (r) => {
|
|
3895
3895
|
const t = r.map((s) => Jt.get({ id: s })), e = r.filter((s, o) => t[o] === void 0);
|
|
3896
3896
|
if (e.length === 0)
|
|
3897
3897
|
return Promise.all(t);
|
|
3898
3898
|
const a = hi(e), n = e.map(
|
|
3899
|
-
(s) => Jt.set({ id: s },
|
|
3899
|
+
(s) => Jt.set({ id: s }, mi(s, a))
|
|
3900
3900
|
), i = t.filter((s) => s !== void 0);
|
|
3901
3901
|
return await Promise.all(i.concat(n));
|
|
3902
3902
|
};
|
|
@@ -3914,7 +3914,7 @@ class pi {
|
|
|
3914
3914
|
*/
|
|
3915
3915
|
async getOption(t) {
|
|
3916
3916
|
return (async () => {
|
|
3917
|
-
const n = (await
|
|
3917
|
+
const n = (await gi([t]))[0];
|
|
3918
3918
|
if (n)
|
|
3919
3919
|
return n;
|
|
3920
3920
|
})();
|
|
@@ -3946,7 +3946,7 @@ class pi {
|
|
|
3946
3946
|
}
|
|
3947
3947
|
}
|
|
3948
3948
|
}
|
|
3949
|
-
const
|
|
3949
|
+
const q = new pi(), En = v`
|
|
3950
3950
|
fragment ActiveIntegrationFields on Integration {
|
|
3951
3951
|
id
|
|
3952
3952
|
logo
|
|
@@ -3964,7 +3964,7 @@ const _ = new pi(), En = S`
|
|
|
3964
3964
|
activeAddons
|
|
3965
3965
|
}
|
|
3966
3966
|
}
|
|
3967
|
-
`, Me =
|
|
3967
|
+
`, Me = v`
|
|
3968
3968
|
fragment AdditionalIntegrationProductFields on IntegrationProduct {
|
|
3969
3969
|
id
|
|
3970
3970
|
product {
|
|
@@ -3982,7 +3982,7 @@ const _ = new pi(), En = S`
|
|
|
3982
3982
|
preloadImageUrl
|
|
3983
3983
|
}
|
|
3984
3984
|
}
|
|
3985
|
-
`, fi =
|
|
3985
|
+
`, fi = v`
|
|
3986
3986
|
${Me}
|
|
3987
3987
|
mutation CreateTransactions(
|
|
3988
3988
|
$inputs: [TransactionCreateInput]!
|
|
@@ -4069,7 +4069,7 @@ const _ = new pi(), En = S`
|
|
|
4069
4069
|
}
|
|
4070
4070
|
}
|
|
4071
4071
|
}
|
|
4072
|
-
`, bn =
|
|
4072
|
+
`, bn = v`
|
|
4073
4073
|
fragment StakeholderFields on Stakeholder {
|
|
4074
4074
|
id
|
|
4075
4075
|
type
|
|
@@ -4077,7 +4077,7 @@ const _ = new pi(), En = S`
|
|
|
4077
4077
|
authorizationNote
|
|
4078
4078
|
authorizationStatus
|
|
4079
4079
|
}
|
|
4080
|
-
`, Bn =
|
|
4080
|
+
`, Bn = v`
|
|
4081
4081
|
fragment TransactionShareActionFields on TransactionShareAction {
|
|
4082
4082
|
id
|
|
4083
4083
|
title
|
|
@@ -4086,7 +4086,7 @@ const _ = new pi(), En = S`
|
|
|
4086
4086
|
precedence
|
|
4087
4087
|
url
|
|
4088
4088
|
}
|
|
4089
|
-
`, Ci =
|
|
4089
|
+
`, Ci = v`
|
|
4090
4090
|
${Me}
|
|
4091
4091
|
${bn}
|
|
4092
4092
|
${Bn}
|
|
@@ -4241,19 +4241,19 @@ const _ = new pi(), En = S`
|
|
|
4241
4241
|
}
|
|
4242
4242
|
}
|
|
4243
4243
|
}
|
|
4244
|
-
`, wi =
|
|
4244
|
+
`, wi = v`
|
|
4245
4245
|
mutation UpdateTransactionWorkflowState($id: String!, $workflowState: String!) {
|
|
4246
4246
|
transactionUpdate(id: $id, workflowState: $workflowState) {
|
|
4247
4247
|
id
|
|
4248
4248
|
}
|
|
4249
4249
|
}
|
|
4250
|
-
`, yi =
|
|
4250
|
+
`, yi = v`
|
|
4251
4251
|
mutation UpdateTransactionQuantity($id: String!, $quantity: Int) {
|
|
4252
4252
|
transactionUpdate(id: $id, quantity: $quantity) {
|
|
4253
4253
|
id
|
|
4254
4254
|
}
|
|
4255
4255
|
}
|
|
4256
|
-
`, Si =
|
|
4256
|
+
`, Si = v`
|
|
4257
4257
|
query ReadTransactionForDesignCreation($id: String!) {
|
|
4258
4258
|
transactions(ids: [$id]) {
|
|
4259
4259
|
id
|
|
@@ -4319,7 +4319,7 @@ const _ = new pi(), En = S`
|
|
|
4319
4319
|
workflowViewerReadOnlyLink
|
|
4320
4320
|
}
|
|
4321
4321
|
}
|
|
4322
|
-
`, vi =
|
|
4322
|
+
`, vi = v`
|
|
4323
4323
|
${Bn}
|
|
4324
4324
|
query ReadTransactionForShareActions($id: String!) {
|
|
4325
4325
|
transactions(ids: [$id]) {
|
|
@@ -4330,14 +4330,14 @@ const _ = new pi(), En = S`
|
|
|
4330
4330
|
}
|
|
4331
4331
|
}
|
|
4332
4332
|
}
|
|
4333
|
-
`, In =
|
|
4333
|
+
`, In = v`
|
|
4334
4334
|
query ReadWorkflowStates($ids: [String]!) {
|
|
4335
4335
|
transactions(ids: $ids) {
|
|
4336
4336
|
id
|
|
4337
4337
|
workflowState
|
|
4338
4338
|
}
|
|
4339
4339
|
}
|
|
4340
|
-
`, Pn = (r) =>
|
|
4340
|
+
`, Pn = (r) => v`
|
|
4341
4341
|
${Me}
|
|
4342
4342
|
fragment IntegrationProductFields on IntegrationProduct {
|
|
4343
4343
|
id
|
|
@@ -4420,14 +4420,14 @@ const _ = new pi(), En = S`
|
|
|
4420
4420
|
` : ""}
|
|
4421
4421
|
}
|
|
4422
4422
|
}
|
|
4423
|
-
`, Ei = (r) =>
|
|
4423
|
+
`, Ei = (r) => v`
|
|
4424
4424
|
${Pn(r)}
|
|
4425
4425
|
query GetIntegrationProducts($ids: [String!]!) {
|
|
4426
4426
|
integrationProducts(ids: $ids) {
|
|
4427
4427
|
...IntegrationProductFields
|
|
4428
4428
|
}
|
|
4429
4429
|
}
|
|
4430
|
-
`, bi = (r) =>
|
|
4430
|
+
`, bi = (r) => v`
|
|
4431
4431
|
${Pn(r)}
|
|
4432
4432
|
query GetIntegrationProductFromExternalIds($externalIntegrationId: String!, $externalProductId: String!) {
|
|
4433
4433
|
integrationProductFromExternalIds(
|
|
@@ -4437,7 +4437,7 @@ const _ = new pi(), En = S`
|
|
|
4437
4437
|
...IntegrationProductFields
|
|
4438
4438
|
}
|
|
4439
4439
|
}
|
|
4440
|
-
`, Bi =
|
|
4440
|
+
`, Bi = v`
|
|
4441
4441
|
${bn}
|
|
4442
4442
|
query ReadTransactionForStakeholders($id: String!) {
|
|
4443
4443
|
transactions(ids: [$id]) {
|
|
@@ -4449,11 +4449,11 @@ const _ = new pi(), En = S`
|
|
|
4449
4449
|
}
|
|
4450
4450
|
}
|
|
4451
4451
|
}
|
|
4452
|
-
`, Ii =
|
|
4452
|
+
`, Ii = v`
|
|
4453
4453
|
mutation FinalizeUpdateTransaction($transactionId: String!) {
|
|
4454
4454
|
transactionFinalizeUpdate(transactionId: $transactionId)
|
|
4455
4455
|
}
|
|
4456
|
-
`, Pi =
|
|
4456
|
+
`, Pi = v`
|
|
4457
4457
|
fragment RegionFields on Region {
|
|
4458
4458
|
width
|
|
4459
4459
|
top
|
|
@@ -4471,7 +4471,7 @@ const _ = new pi(), En = S`
|
|
|
4471
4471
|
height
|
|
4472
4472
|
}
|
|
4473
4473
|
}
|
|
4474
|
-
`, Di =
|
|
4474
|
+
`, Di = v`
|
|
4475
4475
|
fragment LookAtAnimationFields on LookAtAnimation {
|
|
4476
4476
|
latDeg
|
|
4477
4477
|
lonDeg
|
|
@@ -4482,7 +4482,7 @@ const _ = new pi(), En = S`
|
|
|
4482
4482
|
z
|
|
4483
4483
|
}
|
|
4484
4484
|
}
|
|
4485
|
-
`, xi =
|
|
4485
|
+
`, xi = v`
|
|
4486
4486
|
fragment RenderingPipelineConfigurationFields on RenderingPipelineConfiguration {
|
|
4487
4487
|
antiAliasing {
|
|
4488
4488
|
samples
|
|
@@ -4566,14 +4566,14 @@ const _ = new pi(), En = S`
|
|
|
4566
4566
|
weight
|
|
4567
4567
|
}
|
|
4568
4568
|
}
|
|
4569
|
-
`, Fi =
|
|
4569
|
+
`, Fi = v`
|
|
4570
4570
|
fragment ModelAnimationFields on ModelAnimation {
|
|
4571
4571
|
from
|
|
4572
4572
|
to
|
|
4573
4573
|
loop
|
|
4574
4574
|
name
|
|
4575
4575
|
}
|
|
4576
|
-
`, ki = (r) =>
|
|
4576
|
+
`, ki = (r) => v`
|
|
4577
4577
|
${te(r)}
|
|
4578
4578
|
${wa}
|
|
4579
4579
|
${vn}
|
|
@@ -4975,7 +4975,7 @@ const _ = new pi(), En = S`
|
|
|
4975
4975
|
}
|
|
4976
4976
|
}
|
|
4977
4977
|
}
|
|
4978
|
-
`, Mi =
|
|
4978
|
+
`, Mi = v`
|
|
4979
4979
|
query GetTransactionForPartner($id: String!) {
|
|
4980
4980
|
transactions(ids: [$id]) {
|
|
4981
4981
|
id
|
|
@@ -4993,7 +4993,7 @@ const _ = new pi(), En = S`
|
|
|
4993
4993
|
}
|
|
4994
4994
|
}
|
|
4995
4995
|
}
|
|
4996
|
-
`, Ti =
|
|
4996
|
+
`, Ti = v`
|
|
4997
4997
|
${te(!1)}
|
|
4998
4998
|
query GetWorkflowForTheme($id: String!) {
|
|
4999
4999
|
workflow(id: $id) {
|
|
@@ -5015,7 +5015,7 @@ const _ = new pi(), En = S`
|
|
|
5015
5015
|
}
|
|
5016
5016
|
}
|
|
5017
5017
|
}
|
|
5018
|
-
`, Te =
|
|
5018
|
+
`, Te = v`
|
|
5019
5019
|
fragment MarketplaceThemeInstallConfigurationFields on MarketplaceThemeInstallConfiguration {
|
|
5020
5020
|
id
|
|
5021
5021
|
themeInstallId
|
|
@@ -5089,14 +5089,14 @@ const _ = new pi(), En = S`
|
|
|
5089
5089
|
}
|
|
5090
5090
|
}
|
|
5091
5091
|
}
|
|
5092
|
-
`, Ni =
|
|
5092
|
+
`, Ni = v`
|
|
5093
5093
|
${Te}
|
|
5094
5094
|
query GetMarketplaceThemeInstallConfiguration($themeConfigurationId: String!, $themeInstallId: String!) {
|
|
5095
5095
|
marketplaceThemeInstallConfiguration(id: $themeConfigurationId, themeInstallId: $themeInstallId, raw: false) {
|
|
5096
5096
|
...MarketplaceThemeInstallConfigurationFields
|
|
5097
5097
|
}
|
|
5098
5098
|
}
|
|
5099
|
-
`, Qi =
|
|
5099
|
+
`, Qi = v`
|
|
5100
5100
|
${En}
|
|
5101
5101
|
${Te}
|
|
5102
5102
|
query GetCurrentIntegration($themeConfigurationId: String) {
|
|
@@ -5109,7 +5109,7 @@ const _ = new pi(), En = S`
|
|
|
5109
5109
|
...ActiveIntegrationFields
|
|
5110
5110
|
}
|
|
5111
5111
|
}
|
|
5112
|
-
`, Ri =
|
|
5112
|
+
`, Ri = v`
|
|
5113
5113
|
${Te}
|
|
5114
5114
|
query ReadTransactionForMarketplaceTheme($id: String!) {
|
|
5115
5115
|
transactions(ids: [$id]) {
|
|
@@ -5118,7 +5118,7 @@ const _ = new pi(), En = S`
|
|
|
5118
5118
|
}
|
|
5119
5119
|
}
|
|
5120
5120
|
}
|
|
5121
|
-
`, Oi =
|
|
5121
|
+
`, Oi = v`
|
|
5122
5122
|
${Te}
|
|
5123
5123
|
query ReadBundleForMarketplaceTheme($id: String!) {
|
|
5124
5124
|
bundles(ids: [$id]) {
|
|
@@ -5127,7 +5127,7 @@ const _ = new pi(), En = S`
|
|
|
5127
5127
|
}
|
|
5128
5128
|
}
|
|
5129
5129
|
}
|
|
5130
|
-
`, $i =
|
|
5130
|
+
`, $i = v`
|
|
5131
5131
|
mutation CreateOrder($orderItems: [OrderItemInput]!) {
|
|
5132
5132
|
orderCreate(orderItems: $orderItems, paid: false, generateInternalId: true) {
|
|
5133
5133
|
id
|
|
@@ -5317,14 +5317,14 @@ const Q = () => {
|
|
|
5317
5317
|
width: u
|
|
5318
5318
|
}) => {
|
|
5319
5319
|
var E;
|
|
5320
|
-
const h = e || 0,
|
|
5320
|
+
const h = e || 0, m = 2 * ((l == null ? void 0 : l.scale) || 1), g = A || { x: 0, y: 0, width: u, height: i }, p = `${g.x} ${g.y} ${g.width} ${g.height}`, f = Q(), C = a.purpose === Ht.FreeDesign && /* @__PURE__ */ F("defs", { children: /* @__PURE__ */ F("clipPath", { id: "viewboxClip", children: /* @__PURE__ */ F("rect", { width: g.width, height: g.height, rx: h }) }) }), w = (E = a.colorProfiles) == null ? void 0 : E.map((b, I) => (
|
|
5321
5321
|
/* @ts-ignore */
|
|
5322
5322
|
/* @__PURE__ */ F("color-profile", { name: b.name, xlinkHref: b.key, children: " " }, I)
|
|
5323
|
-
)),
|
|
5323
|
+
)), S = n.map((b) => ({
|
|
5324
5324
|
...b,
|
|
5325
5325
|
_renderingConfiguration: a,
|
|
5326
5326
|
mask: l ? `url(#viewmask-${f})` : void 0
|
|
5327
|
-
})),
|
|
5327
|
+
})), y = va(S);
|
|
5328
5328
|
return /* @__PURE__ */ ct(
|
|
5329
5329
|
"svg",
|
|
5330
5330
|
{
|
|
@@ -5350,8 +5350,8 @@ const Q = () => {
|
|
|
5350
5350
|
"rect",
|
|
5351
5351
|
{
|
|
5352
5352
|
id: "layout-background",
|
|
5353
|
-
width:
|
|
5354
|
-
height:
|
|
5353
|
+
width: g.width,
|
|
5354
|
+
height: g.height,
|
|
5355
5355
|
fill: r,
|
|
5356
5356
|
rx: h
|
|
5357
5357
|
}
|
|
@@ -5361,7 +5361,7 @@ const Q = () => {
|
|
|
5361
5361
|
{
|
|
5362
5362
|
id: "element-group",
|
|
5363
5363
|
clipPath: a.purpose === Ht.FreeDesign ? "url(#viewboxClip)" : void 0,
|
|
5364
|
-
children:
|
|
5364
|
+
children: y.map((b) => Qn(b)).filter((b) => !!b)
|
|
5365
5365
|
}
|
|
5366
5366
|
),
|
|
5367
5367
|
l && /* @__PURE__ */ F(
|
|
@@ -5373,18 +5373,18 @@ const Q = () => {
|
|
|
5373
5373
|
height: l.height,
|
|
5374
5374
|
fill: "none",
|
|
5375
5375
|
stroke: l.hidden ? "none" : t || "#aaaaaa",
|
|
5376
|
-
strokeWidth:
|
|
5377
|
-
strokeDasharray: `${
|
|
5376
|
+
strokeWidth: m / 2,
|
|
5377
|
+
strokeDasharray: `${m * 2} ${m}`
|
|
5378
5378
|
}
|
|
5379
5379
|
),
|
|
5380
5380
|
l && /* @__PURE__ */ ct("mask", { id: `viewmask-${f}`, children: [
|
|
5381
5381
|
/* @__PURE__ */ F(
|
|
5382
5382
|
"rect",
|
|
5383
5383
|
{
|
|
5384
|
-
x:
|
|
5385
|
-
y:
|
|
5386
|
-
width:
|
|
5387
|
-
height:
|
|
5384
|
+
x: g.x,
|
|
5385
|
+
y: g.y,
|
|
5386
|
+
width: g.width,
|
|
5387
|
+
height: g.height,
|
|
5388
5388
|
fill: "black"
|
|
5389
5389
|
}
|
|
5390
5390
|
),
|
|
@@ -5403,12 +5403,12 @@ const Q = () => {
|
|
|
5403
5403
|
}
|
|
5404
5404
|
);
|
|
5405
5405
|
}, xc = (r, t, e, a, n) => {
|
|
5406
|
-
const i = pt(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,
|
|
5406
|
+
const i = pt(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, p = u * A - m * d, f = h * A - g * d, C = u * d + m * A, w = h * d + g * A, S = Math.max(Math.abs(p), Math.abs(f)), y = Math.max(Math.abs(C), Math.abs(w));
|
|
5407
5407
|
return {
|
|
5408
|
-
minX: l -
|
|
5409
|
-
maxX: l +
|
|
5410
|
-
minY: c -
|
|
5411
|
-
maxY: c +
|
|
5408
|
+
minX: l - S,
|
|
5409
|
+
maxX: l + S,
|
|
5410
|
+
minY: c - y,
|
|
5411
|
+
maxY: c + y
|
|
5412
5412
|
};
|
|
5413
5413
|
}, Fc = (r, t, e) => {
|
|
5414
5414
|
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));
|
|
@@ -5566,16 +5566,16 @@ const Q = () => {
|
|
|
5566
5566
|
/* @__PURE__ */ F("feFuncB", { type: "discrete", tableValues: n() })
|
|
5567
5567
|
] })
|
|
5568
5568
|
] }) }) }), s = r.rotation || 0, o = pt(s), l = Math.cos(o), c = -Math.sin(o), d = () => {
|
|
5569
|
-
var w,
|
|
5570
|
-
const A = ((w = r.pattern) == null ? void 0 : w.x) || 0, u = ((
|
|
5569
|
+
var w, S, y, E, b, I, D, x, k, T;
|
|
5570
|
+
const A = ((w = r.pattern) == null ? void 0 : w.x) || 0, u = ((S = r.pattern) == null ? void 0 : S.y) || 0, h = ((y = r.pattern) == null ? void 0 : y.width) || 0, m = ((E = r.pattern) == null ? void 0 : E.height) || 0, g = ((b = r.pattern) == null ? void 0 : b.scaleX) || 1, p = ((I = r.pattern) == null ? void 0 : I.scaleY) || 1, f = ((D = r.pattern) == null ? void 0 : D.rotation) || 0;
|
|
5571
5571
|
return [(x = r.pattern) != null && x.svg ? {
|
|
5572
5572
|
id: `${t}-contents`,
|
|
5573
5573
|
type: M.Illustration,
|
|
5574
5574
|
x: A,
|
|
5575
5575
|
y: u,
|
|
5576
5576
|
rotation: f,
|
|
5577
|
-
width: h *
|
|
5578
|
-
height:
|
|
5577
|
+
width: h * g,
|
|
5578
|
+
height: m * p,
|
|
5579
5579
|
src: a(),
|
|
5580
5580
|
svg: (k = r.pattern) == null ? void 0 : k.svg,
|
|
5581
5581
|
colors: (T = r.pattern) == null ? void 0 : T.colors
|
|
@@ -5585,8 +5585,8 @@ const Q = () => {
|
|
|
5585
5585
|
x: A,
|
|
5586
5586
|
y: u,
|
|
5587
5587
|
rotation: f,
|
|
5588
|
-
width: h *
|
|
5589
|
-
height:
|
|
5588
|
+
width: h * g,
|
|
5589
|
+
height: m * p,
|
|
5590
5590
|
src: a()
|
|
5591
5591
|
}];
|
|
5592
5592
|
};
|
|
@@ -5710,29 +5710,29 @@ const Hi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Ue = /* @_
|
|
|
5710
5710
|
a.querySelectorAll("style").forEach((d) => {
|
|
5711
5711
|
var u;
|
|
5712
5712
|
(u = rn(d.innerHTML).stylesheet) == null || u.rules.forEach((h) => {
|
|
5713
|
-
var
|
|
5713
|
+
var m, g, p;
|
|
5714
5714
|
if (h.type === "font-face" && h.declarations) {
|
|
5715
|
-
const f = (
|
|
5716
|
-
(
|
|
5717
|
-
)) == null ? void 0 :
|
|
5715
|
+
const f = (m = h.declarations.find(
|
|
5716
|
+
(S) => S.property === "font-family"
|
|
5717
|
+
)) == null ? void 0 : m.value, C = (g = h.declarations.find((S) => S.property === "src")) == null ? void 0 : g.value, w = (p = C == null ? void 0 : C.match(/'(https.*?)'/)) == null ? void 0 : p[1];
|
|
5718
5718
|
f && w && n.set(f, w);
|
|
5719
5719
|
}
|
|
5720
5720
|
});
|
|
5721
5721
|
});
|
|
5722
5722
|
const s = e.querySelectorAll("tspan");
|
|
5723
5723
|
for (let d = 0; d < s.length; d++) {
|
|
5724
|
-
const A = s.item(d), u = A.closest("text"), h = A.closest("g"),
|
|
5724
|
+
const A = s.item(d), u = A.closest("text"), h = A.closest("g"), m = u.getAttribute("font-family"), g = await Nt(n.get(m)), p = u.getAttribute("fill"), f = u.getAttribute("stroke"), C = u.getAttribute("stroke-width"), w = g.getPath(
|
|
5725
5725
|
A.innerHTML,
|
|
5726
5726
|
0,
|
|
5727
5727
|
0,
|
|
5728
5728
|
parseInt(u.getAttribute("font-size") ?? "72")
|
|
5729
|
-
),
|
|
5730
|
-
let
|
|
5729
|
+
), S = w.getBoundingBox().x2 - w.getBoundingBox().x1;
|
|
5730
|
+
let y = 0;
|
|
5731
5731
|
const E = A.getAttribute("text-anchor");
|
|
5732
|
-
E === "middle" ?
|
|
5733
|
-
const b =
|
|
5732
|
+
E === "middle" ? y = S / 2 : E === "end" && (y = S);
|
|
5733
|
+
const b = g.getPath(
|
|
5734
5734
|
A.innerHTML,
|
|
5735
|
-
parseFloat(A.getAttribute("x") ?? "0") -
|
|
5735
|
+
parseFloat(A.getAttribute("x") ?? "0") - y,
|
|
5736
5736
|
parseFloat(A.getAttribute("y") ?? "0"),
|
|
5737
5737
|
parseInt(u.getAttribute("font-size") ?? "72")
|
|
5738
5738
|
);
|
|
@@ -5746,7 +5746,7 @@ const Hi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Ue = /* @_
|
|
|
5746
5746
|
const s = (i || ya) * n.getApproximateHeight(), o = t.split(`
|
|
5747
5747
|
`);
|
|
5748
5748
|
try {
|
|
5749
|
-
const l = o.flatMap((d) =>
|
|
5749
|
+
const l = o.flatMap((d) => me(d, r.width, a, n)), c = l.flatMap((d) => d.lines);
|
|
5750
5750
|
return {
|
|
5751
5751
|
lines: c,
|
|
5752
5752
|
requiredHeight: l.flatMap((d) => d.lines).length * (a * s),
|
|
@@ -5762,14 +5762,14 @@ const Hi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Ue = /* @_
|
|
|
5762
5762
|
requiredWidth: ve(c, r.width, a, n)
|
|
5763
5763
|
};
|
|
5764
5764
|
}
|
|
5765
|
-
},
|
|
5765
|
+
}, me = (r, t, e, a) => {
|
|
5766
5766
|
const n = ht(r, e, a);
|
|
5767
5767
|
if (n <= t)
|
|
5768
5768
|
return { lines: [r], width: n };
|
|
5769
5769
|
if (!(r.indexOf(" ") > -1)) {
|
|
5770
5770
|
if (r.length <= 1)
|
|
5771
5771
|
throw new Error(`Character ${r} is wider than region`);
|
|
5772
|
-
const d = Math.floor(r.length / 2), A =
|
|
5772
|
+
const d = Math.floor(r.length / 2), A = me(r.slice(0, d), t, e, a), u = me(r.slice(d), t, e, a);
|
|
5773
5773
|
return { lines: [...A.lines, ...u.lines], width: Math.max(A.width, u.width) };
|
|
5774
5774
|
}
|
|
5775
5775
|
const s = r.split(" "), o = [];
|
|
@@ -5777,15 +5777,15 @@ const Hi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Ue = /* @_
|
|
|
5777
5777
|
for (; c < s.length; ) {
|
|
5778
5778
|
const d = s[c];
|
|
5779
5779
|
if (ht(d, e, a) > t) {
|
|
5780
|
-
const A =
|
|
5780
|
+
const A = me(d, t, e, a);
|
|
5781
5781
|
o.push(...A.lines), l = Math.max(l, A.width), c++;
|
|
5782
5782
|
} else {
|
|
5783
5783
|
const A = [d];
|
|
5784
5784
|
l = Math.max(l, ht(d, e, a));
|
|
5785
5785
|
let u = c + 1, h = !0;
|
|
5786
5786
|
for (; u < s.length && h; ) {
|
|
5787
|
-
const
|
|
5788
|
-
|
|
5787
|
+
const m = s[u], g = ht(`${A.join(" ")} ${m}`, e, a);
|
|
5788
|
+
g <= t ? (A.push(m), l = Math.max(l, g), u++) : h = !1;
|
|
5789
5789
|
}
|
|
5790
5790
|
o.push(A.join(" ")), c = u;
|
|
5791
5791
|
}
|
|
@@ -5874,16 +5874,16 @@ const Hi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Ue = /* @_
|
|
|
5874
5874
|
};
|
|
5875
5875
|
})()
|
|
5876
5876
|
} : r, ya = 1.1, ts = (r) => {
|
|
5877
|
-
var
|
|
5877
|
+
var m, g, p, f, C;
|
|
5878
5878
|
const e = (r.rotation || 0) * Math.PI / 180, a = Math.cos(e), n = -Math.sin(e), i = `text-path-${r.id}`, s = `text-fill-${r.id}`, o = r.x + (r.curved ? 0 : r.width / 2), l = r.y + (r.curved ? 0 : r.height / 2);
|
|
5879
5879
|
let c = "";
|
|
5880
5880
|
try {
|
|
5881
|
-
c =
|
|
5881
|
+
c = gr.compile(r.text || "")((m = r._renderingConfiguration) == null ? void 0 : m.templatingContext);
|
|
5882
5882
|
} catch {
|
|
5883
5883
|
c = r.text ?? "";
|
|
5884
5884
|
}
|
|
5885
5885
|
const d = c.split(`
|
|
5886
|
-
`), A = (
|
|
5886
|
+
`), A = (g = r.strokeColor) != null && g.browserValue && r.strokeThickness ? (p = r.strokeColor) == null ? void 0 : p.browserValue : void 0, u = (f = r.strokeColor) != null && f.browserValue && r.strokeThickness ? r.strokeThickness : void 0;
|
|
5887
5887
|
if (r.curved && !r.paths || !r.fontData)
|
|
5888
5888
|
return null;
|
|
5889
5889
|
const h = () => {
|
|
@@ -5944,12 +5944,12 @@ const Hi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Ue = /* @_
|
|
|
5944
5944
|
},
|
|
5945
5945
|
stroke: A,
|
|
5946
5946
|
strokeWidth: u,
|
|
5947
|
-
children: r.curved ? /* @__PURE__ */ F(as, { text: c, curvedPathId: i, align: r.align }) : d.map((w,
|
|
5947
|
+
children: r.curved ? /* @__PURE__ */ F(as, { text: c, curvedPathId: i, align: r.align }) : d.map((w, S) => /* @__PURE__ */ F(
|
|
5948
5948
|
es,
|
|
5949
5949
|
{
|
|
5950
5950
|
align: r.vertical ? "center" : r.align,
|
|
5951
5951
|
fontSize: r.fontSize,
|
|
5952
|
-
thisLineIdx:
|
|
5952
|
+
thisLineIdx: S,
|
|
5953
5953
|
amountLines: d.length,
|
|
5954
5954
|
text: w,
|
|
5955
5955
|
textboxHeight: r.height,
|
|
@@ -5958,7 +5958,7 @@ const Hi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Ue = /* @_
|
|
|
5958
5958
|
vertical: r.vertical,
|
|
5959
5959
|
verticalAlign: r.verticalAlign
|
|
5960
5960
|
},
|
|
5961
|
-
|
|
5961
|
+
S
|
|
5962
5962
|
))
|
|
5963
5963
|
}
|
|
5964
5964
|
) }) })
|
|
@@ -6316,19 +6316,19 @@ const ae = (r) => {
|
|
|
6316
6316
|
const s = dt().parseFromString(r, "image/svg+xml").firstElementChild;
|
|
6317
6317
|
if (!s)
|
|
6318
6318
|
throw new Error("Failed to read SVG");
|
|
6319
|
-
const l = Bt().serializeToString(s), c =
|
|
6319
|
+
const l = Bt().serializeToString(s), c = gt(), d = c.getContext("2d"), A = await Aa.from(d, l, {
|
|
6320
6320
|
anonymousCrossOrigin: !0,
|
|
6321
6321
|
ignoreDimensions: !1,
|
|
6322
|
-
createCanvas:
|
|
6322
|
+
createCanvas: gt,
|
|
6323
6323
|
createImage: Zt,
|
|
6324
|
-
DOMParser:
|
|
6324
|
+
DOMParser: ga(),
|
|
6325
6325
|
fetch: rt
|
|
6326
|
-
}), u = s.getAttribute("width"), h = s.getAttribute("height"),
|
|
6326
|
+
}), u = s.getAttribute("width"), h = s.getAttribute("height"), m = 2048;
|
|
6327
6327
|
if (h && u) {
|
|
6328
|
-
const
|
|
6329
|
-
f > 1 ? A.resize(
|
|
6328
|
+
const g = parseFloat(h), f = parseFloat(u) / g;
|
|
6329
|
+
f > 1 ? A.resize(m, m / f) : A.resize(m * f, m);
|
|
6330
6330
|
} else
|
|
6331
|
-
A.resize(
|
|
6331
|
+
A.resize(m, m);
|
|
6332
6332
|
return await A.render(), await t(c);
|
|
6333
6333
|
})();
|
|
6334
6334
|
return ze.set(r, a), a;
|
|
@@ -6350,7 +6350,7 @@ const ae = (r) => {
|
|
|
6350
6350
|
const l = await lt(await $n(e)), u = dt().parseFromString(l.svg, "image/svg+xml").firstElementChild.getAttribute("viewBox");
|
|
6351
6351
|
if (!u)
|
|
6352
6352
|
throw new Error("SVG missing viewBox.");
|
|
6353
|
-
const h = o.height,
|
|
6353
|
+
const h = o.height, m = u.split(" "), g = parseFloat(m[2]) || 1, p = parseFloat(m[3]) || 1, f = g / p;
|
|
6354
6354
|
o.height = o.width / f, o.top += (h - o.height) / 2;
|
|
6355
6355
|
}
|
|
6356
6356
|
if (e && t === M.Image) {
|
|
@@ -6409,7 +6409,7 @@ class zc {
|
|
|
6409
6409
|
};
|
|
6410
6410
|
}
|
|
6411
6411
|
static async getTextbox(t, e) {
|
|
6412
|
-
var
|
|
6412
|
+
var m;
|
|
6413
6413
|
const { configuration: a, fontSrc: n, designInputStep: i } = e, s = await Nt(n), o = {
|
|
6414
6414
|
assetUrl: n,
|
|
6415
6415
|
name: s.names.fullName.en
|
|
@@ -6447,7 +6447,7 @@ class zc {
|
|
|
6447
6447
|
{ ...A, height: u.height },
|
|
6448
6448
|
o,
|
|
6449
6449
|
u.fontSize,
|
|
6450
|
-
((
|
|
6450
|
+
((m = u == null ? void 0 : u.text) == null ? void 0 : m.split(`
|
|
6451
6451
|
`)) || [],
|
|
6452
6452
|
u.align
|
|
6453
6453
|
);
|
|
@@ -6525,7 +6525,7 @@ class V extends Error {
|
|
|
6525
6525
|
super("Element not found!"), Object.setPrototypeOf(this, V.prototype);
|
|
6526
6526
|
}
|
|
6527
6527
|
}
|
|
6528
|
-
const L = (r, t) =>
|
|
6528
|
+
const L = (r, t) => _(r, t).elements.find((n) => n.id === r), _ = (r, t) => {
|
|
6529
6529
|
const e = Object.values(t).find((a) => a.elements.some((n) => n.id === r));
|
|
6530
6530
|
if (!e)
|
|
6531
6531
|
throw new V();
|
|
@@ -6623,7 +6623,7 @@ class Gc extends O {
|
|
|
6623
6623
|
...e,
|
|
6624
6624
|
x: this.x,
|
|
6625
6625
|
y: this.y
|
|
6626
|
-
}, n =
|
|
6626
|
+
}, n = _(e.id, Object.values(t.layouts)), i = Z(a, n);
|
|
6627
6627
|
return {
|
|
6628
6628
|
...t,
|
|
6629
6629
|
layouts: {
|
|
@@ -6645,7 +6645,7 @@ class Wc extends O {
|
|
|
6645
6645
|
const a = {
|
|
6646
6646
|
...e,
|
|
6647
6647
|
rotation: this.angle
|
|
6648
|
-
}, n =
|
|
6648
|
+
}, n = _(e.id, Object.values(t.layouts)), i = Z(a, n);
|
|
6649
6649
|
return {
|
|
6650
6650
|
...t,
|
|
6651
6651
|
layouts: {
|
|
@@ -6676,7 +6676,7 @@ class jc extends O {
|
|
|
6676
6676
|
const s = a, o = (!s.algorithm || s.algorithm === Mt.Autosize ? s.text : s.input) ?? "";
|
|
6677
6677
|
a = ee(s, o, e);
|
|
6678
6678
|
}
|
|
6679
|
-
const n =
|
|
6679
|
+
const n = _(e.id, Object.values(t.layouts)), i = Z(a, n);
|
|
6680
6680
|
return {
|
|
6681
6681
|
...t,
|
|
6682
6682
|
layouts: {
|
|
@@ -6808,7 +6808,7 @@ class ss extends O {
|
|
|
6808
6808
|
fill: this.color,
|
|
6809
6809
|
fillSpotColorDefinition: this.textFillSpotColor,
|
|
6810
6810
|
textFillImage: void 0
|
|
6811
|
-
}, n =
|
|
6811
|
+
}, n = _(e.id, Object.values(t.layouts)), i = Z(a, n);
|
|
6812
6812
|
return {
|
|
6813
6813
|
...t,
|
|
6814
6814
|
layouts: {
|
|
@@ -6830,7 +6830,7 @@ class Ge extends O {
|
|
|
6830
6830
|
const a = {
|
|
6831
6831
|
...e,
|
|
6832
6832
|
textFillImage: this.imageFill
|
|
6833
|
-
}, n =
|
|
6833
|
+
}, n = _(e.id, Object.values(t.layouts)), i = Z(a, n);
|
|
6834
6834
|
return {
|
|
6835
6835
|
...t,
|
|
6836
6836
|
layouts: {
|
|
@@ -6852,7 +6852,7 @@ class os extends O {
|
|
|
6852
6852
|
const a = {
|
|
6853
6853
|
...e,
|
|
6854
6854
|
fontSize: this.size
|
|
6855
|
-
}, n =
|
|
6855
|
+
}, n = _(e.id, Object.values(t.layouts)), i = (!e.algorithm || e.algorithm === Mt.Autosize ? e.text : e.input) ?? "", s = Z(ee(a, i), n);
|
|
6856
6856
|
return {
|
|
6857
6857
|
...t,
|
|
6858
6858
|
layouts: {
|
|
@@ -6874,7 +6874,7 @@ class Wa extends O {
|
|
|
6874
6874
|
const a = {
|
|
6875
6875
|
...e,
|
|
6876
6876
|
fontData: this.fontData
|
|
6877
|
-
}, n =
|
|
6877
|
+
}, n = _(e.id, Object.values(t.layouts)), i = (!e.algorithm || e.algorithm === Mt.Autosize ? e.text : e.input) ?? "", s = Z(ee(a, i), n);
|
|
6878
6878
|
return {
|
|
6879
6879
|
...t,
|
|
6880
6880
|
layouts: {
|
|
@@ -6896,7 +6896,7 @@ class ls extends O {
|
|
|
6896
6896
|
const a = {
|
|
6897
6897
|
...e,
|
|
6898
6898
|
align: this.align
|
|
6899
|
-
}, n =
|
|
6899
|
+
}, n = _(e.id, Object.values(t.layouts)), i = Z(a, n);
|
|
6900
6900
|
return {
|
|
6901
6901
|
...t,
|
|
6902
6902
|
layouts: {
|
|
@@ -6912,7 +6912,7 @@ class cs extends O {
|
|
|
6912
6912
|
}
|
|
6913
6913
|
apply(t) {
|
|
6914
6914
|
this.oldState = t;
|
|
6915
|
-
const e =
|
|
6915
|
+
const e = _(this.id, Object.values(t.layouts)), a = e.elements.findIndex((o) => o.id === this.id), n = e.elements[a].pattern, i = [...e.elements];
|
|
6916
6916
|
i.splice(a, 1, {
|
|
6917
6917
|
...e.elements[a],
|
|
6918
6918
|
pattern: {
|
|
@@ -6957,7 +6957,7 @@ class ds extends O {
|
|
|
6957
6957
|
invertThreshold: this.invertThreshold,
|
|
6958
6958
|
threshold: this.threshold,
|
|
6959
6959
|
thresholdSaturation: this.thresholdSaturation
|
|
6960
|
-
}, n =
|
|
6960
|
+
}, n = _(e.id, Object.values(t.layouts)), i = Z(a, n);
|
|
6961
6961
|
return {
|
|
6962
6962
|
...t,
|
|
6963
6963
|
layouts: {
|
|
@@ -6979,7 +6979,7 @@ class Hc extends O {
|
|
|
6979
6979
|
const a = {
|
|
6980
6980
|
...e,
|
|
6981
6981
|
src: this.src
|
|
6982
|
-
}, n =
|
|
6982
|
+
}, n = _(e.id, Object.values(t.layouts)), i = Z(a, n);
|
|
6983
6983
|
return {
|
|
6984
6984
|
...t,
|
|
6985
6985
|
layouts: {
|
|
@@ -6998,7 +6998,7 @@ class As extends O {
|
|
|
6998
6998
|
const e = L(this.id, Object.values(t.layouts));
|
|
6999
6999
|
if (!e.id)
|
|
7000
7000
|
throw new V();
|
|
7001
|
-
const a =
|
|
7001
|
+
const a = _(e.id, Object.values(t.layouts)), n = Z(ee(e, this.text, e), a);
|
|
7002
7002
|
return {
|
|
7003
7003
|
...t,
|
|
7004
7004
|
layouts: {
|
|
@@ -7021,7 +7021,7 @@ class We extends O {
|
|
|
7021
7021
|
...e,
|
|
7022
7022
|
strokeColor: this.strokeColor,
|
|
7023
7023
|
strokeThickness: this.strokeThickness
|
|
7024
|
-
}, n =
|
|
7024
|
+
}, n = _(e.id, Object.values(t.layouts)), i = Z(a, n);
|
|
7025
7025
|
return {
|
|
7026
7026
|
...t,
|
|
7027
7027
|
layouts: {
|
|
@@ -7053,7 +7053,7 @@ class oa extends O {
|
|
|
7053
7053
|
const i = {
|
|
7054
7054
|
...e,
|
|
7055
7055
|
colors: a
|
|
7056
|
-
}, s =
|
|
7056
|
+
}, s = _(e.id, Object.values(t.layouts)), o = Z(i, s);
|
|
7057
7057
|
return {
|
|
7058
7058
|
...t,
|
|
7059
7059
|
layouts: {
|
|
@@ -7076,7 +7076,7 @@ class us extends O {
|
|
|
7076
7076
|
...e,
|
|
7077
7077
|
svg: this.svgBody,
|
|
7078
7078
|
cachedObjectURL: this.objectURL
|
|
7079
|
-
}, n =
|
|
7079
|
+
}, n = _(e.id, Object.values(t.layouts)), i = Z(a, n);
|
|
7080
7080
|
return {
|
|
7081
7081
|
...t,
|
|
7082
7082
|
layouts: {
|
|
@@ -7206,7 +7206,7 @@ class ja {
|
|
|
7206
7206
|
var l, c, d, A;
|
|
7207
7207
|
const i = this.layouts.find((u) => u.panelId === n.panelId);
|
|
7208
7208
|
if (!i)
|
|
7209
|
-
throw new
|
|
7209
|
+
throw new Y(n);
|
|
7210
7210
|
let s = "";
|
|
7211
7211
|
if (this.configuration.type === P.ProductOverlay) {
|
|
7212
7212
|
let u = "";
|
|
@@ -7243,7 +7243,7 @@ class ja {
|
|
|
7243
7243
|
command: new G(h, i)
|
|
7244
7244
|
};
|
|
7245
7245
|
} else {
|
|
7246
|
-
const u = this.configuration.type === P.SilentIllustration ? (A = this.configuration.data.asset) == null ? void 0 : A.fileLink : s,
|
|
7246
|
+
const u = this.configuration.type === P.SilentIllustration ? (A = this.configuration.data.asset) == null ? void 0 : A.fileLink : s, m = await lt(await (async () => new Promise((p, f) => {
|
|
7247
7247
|
if (!u) {
|
|
7248
7248
|
f("Undefined vector silent step source");
|
|
7249
7249
|
return;
|
|
@@ -7251,13 +7251,13 @@ class ja {
|
|
|
7251
7251
|
at(u, !0).then((C) => {
|
|
7252
7252
|
p(C);
|
|
7253
7253
|
}).catch((C) => console.error(C));
|
|
7254
|
-
}))()),
|
|
7254
|
+
}))()), g = {
|
|
7255
7255
|
stepName: this.configuration.stepName,
|
|
7256
7256
|
id: Q(),
|
|
7257
|
-
cachedObjectURL: await Kt(
|
|
7257
|
+
cachedObjectURL: await Kt(m.svg),
|
|
7258
7258
|
src: u,
|
|
7259
|
-
svg:
|
|
7260
|
-
colors:
|
|
7259
|
+
svg: m.svg,
|
|
7260
|
+
colors: m.colors,
|
|
7261
7261
|
type: o,
|
|
7262
7262
|
y: n.top,
|
|
7263
7263
|
x: n.left,
|
|
@@ -7272,10 +7272,10 @@ class ja {
|
|
|
7272
7272
|
};
|
|
7273
7273
|
return {
|
|
7274
7274
|
regionElement: {
|
|
7275
|
-
id:
|
|
7275
|
+
id: g.id,
|
|
7276
7276
|
region: n
|
|
7277
7277
|
},
|
|
7278
|
-
command: new G(
|
|
7278
|
+
command: new G(g, i)
|
|
7279
7279
|
};
|
|
7280
7280
|
}
|
|
7281
7281
|
}, this.configuration = t, this.layouts = e, this.product = a || void 0;
|
|
@@ -7290,7 +7290,7 @@ class ja {
|
|
|
7290
7290
|
return this.configuration.type === P.ProductOverlay ? Promise.all(
|
|
7291
7291
|
this.configuration.data.regions.map((t) => {
|
|
7292
7292
|
if (!this.layouts.find((a) => t.panelId === a.panelId))
|
|
7293
|
-
throw new
|
|
7293
|
+
throw new Y(t);
|
|
7294
7294
|
return this.processRegion(t);
|
|
7295
7295
|
})
|
|
7296
7296
|
) : Promise.reject("Unknown silent step. This is a bug");
|
|
@@ -7302,7 +7302,7 @@ class ja {
|
|
|
7302
7302
|
}
|
|
7303
7303
|
}
|
|
7304
7304
|
const hs = async (r) => {
|
|
7305
|
-
const t = `${
|
|
7305
|
+
const t = `${mt.getServicesApiUrl()}/shortener`;
|
|
7306
7306
|
try {
|
|
7307
7307
|
return (await (await rt(t, {
|
|
7308
7308
|
method: "POST",
|
|
@@ -7338,7 +7338,7 @@ class Ln {
|
|
|
7338
7338
|
this.onSuccess = e, this.onFailure = a, this.predicate = t, this.attempts = 0, this.pollingId = -1, this.interval = n, this.maxAttempts = i, this.poll();
|
|
7339
7339
|
}
|
|
7340
7340
|
}
|
|
7341
|
-
class
|
|
7341
|
+
class ms {
|
|
7342
7342
|
async init(t, e, a) {
|
|
7343
7343
|
return a && await this.reload(t, e, a), null;
|
|
7344
7344
|
}
|
|
@@ -7358,23 +7358,23 @@ class gs {
|
|
|
7358
7358
|
}
|
|
7359
7359
|
async regenerateQRCode(t, e, a, n) {
|
|
7360
7360
|
const i = async () => {
|
|
7361
|
-
var
|
|
7362
|
-
const h = (await na([e]))[0],
|
|
7363
|
-
return { asset: h, link:
|
|
7364
|
-
}, s = await new Promise((h,
|
|
7361
|
+
var g, p;
|
|
7362
|
+
const h = (await na([e]))[0], m = (p = (g = h == null ? void 0 : h.versions) == null ? void 0 : g.find((f) => f.name === "mpeg4")) == null ? void 0 : p.link;
|
|
7363
|
+
return { asset: h, link: m };
|
|
7364
|
+
}, s = await new Promise((h, m) => {
|
|
7365
7365
|
new Ln(
|
|
7366
7366
|
async () => !!(await i()).link,
|
|
7367
7367
|
async () => {
|
|
7368
|
-
const
|
|
7369
|
-
if (!
|
|
7370
|
-
throw new qt(
|
|
7368
|
+
const g = await i();
|
|
7369
|
+
if (!g.link || !g.link)
|
|
7370
|
+
throw new qt(g.asset);
|
|
7371
7371
|
h({
|
|
7372
7372
|
rel: "mpeg4",
|
|
7373
|
-
href:
|
|
7373
|
+
href: g.link
|
|
7374
7374
|
});
|
|
7375
7375
|
},
|
|
7376
7376
|
() => {
|
|
7377
|
-
|
|
7377
|
+
m("Poller timed out with 40 attempts @ 3 second interval");
|
|
7378
7378
|
},
|
|
7379
7379
|
3e3,
|
|
7380
7380
|
40
|
|
@@ -7405,7 +7405,7 @@ class gs {
|
|
|
7405
7405
|
const i = a.getLayouts(), o = `data:image/svg+xml;base64,${btoa(await sn(t, { type: "svg" }))}`, l = e.map((c) => {
|
|
7406
7406
|
const d = c.region, A = i.find((u) => u.panelId === (d == null ? void 0 : d.panelId));
|
|
7407
7407
|
if (!A && d)
|
|
7408
|
-
throw new
|
|
7408
|
+
throw new Y(d);
|
|
7409
7409
|
if (A && !d)
|
|
7410
7410
|
throw new Error("Region not found");
|
|
7411
7411
|
if (!A || !d)
|
|
@@ -7430,7 +7430,7 @@ class gs {
|
|
|
7430
7430
|
} };
|
|
7431
7431
|
}
|
|
7432
7432
|
}
|
|
7433
|
-
const Vn = new
|
|
7433
|
+
const Vn = new ms();
|
|
7434
7434
|
class be {
|
|
7435
7435
|
constructor() {
|
|
7436
7436
|
this.frameSourceSvg = async (t, e) => {
|
|
@@ -7459,7 +7459,7 @@ class be {
|
|
|
7459
7459
|
c && c.originalAssetKey && (i = (await U.getLocalOrFromServer(c.originalAssetKey)).fileLink);
|
|
7460
7460
|
}
|
|
7461
7461
|
if (t.option && t.option.variants && t.option.variants.length > 0) {
|
|
7462
|
-
const o = t.option, l =
|
|
7462
|
+
const o = t.option, l = q.getDefaultVariant(o);
|
|
7463
7463
|
return l ? this.selectVariantCommand(
|
|
7464
7464
|
t,
|
|
7465
7465
|
l,
|
|
@@ -7492,8 +7492,8 @@ class be {
|
|
|
7492
7492
|
}
|
|
7493
7493
|
if (n) {
|
|
7494
7494
|
const d = async () => {
|
|
7495
|
-
var
|
|
7496
|
-
const A = (
|
|
7495
|
+
var m, g, p, f, C;
|
|
7496
|
+
const A = (m = n.storage) == null ? void 0 : m.colors, u = (g = n.storage) == null ? void 0 : g.framePatternSrc, h = (p = n.storage) == null ? void 0 : p.frameOffsetsList;
|
|
7497
7497
|
if (e.updateMetadata(t.stepName, {
|
|
7498
7498
|
frameOffsetsList: h,
|
|
7499
7499
|
framePatternSrc: u
|
|
@@ -7523,7 +7523,7 @@ class be {
|
|
|
7523
7523
|
l,
|
|
7524
7524
|
async () => {
|
|
7525
7525
|
const h = await Promise.all(
|
|
7526
|
-
t.data.regions.map((
|
|
7526
|
+
t.data.regions.map((m) => this.frameSourceSvg(u, m))
|
|
7527
7527
|
);
|
|
7528
7528
|
e.updateStorage(t.stepName, { currentFrameSources: h }), await d();
|
|
7529
7529
|
}
|
|
@@ -7555,7 +7555,7 @@ class be {
|
|
|
7555
7555
|
new Ln(
|
|
7556
7556
|
async () => {
|
|
7557
7557
|
var h;
|
|
7558
|
-
const A = (h = (await U.getFromServer(e.key || "")).versions) == null ? void 0 : h.find((
|
|
7558
|
+
const A = (h = (await U.getFromServer(e.key || "")).versions) == null ? void 0 : h.find((m) => m.name === "svg");
|
|
7559
7559
|
return A ? (await rt(A.link)).status === 200 : !1;
|
|
7560
7560
|
},
|
|
7561
7561
|
() => {
|
|
@@ -7717,17 +7717,17 @@ class be {
|
|
|
7717
7717
|
if (!o)
|
|
7718
7718
|
throw new Error("Frame service unavailable, cannot load pattern!");
|
|
7719
7719
|
const l = await Promise.all(
|
|
7720
|
-
t.data.regions.map((
|
|
7720
|
+
t.data.regions.map((m) => this.frameSourceSvg(e, m))
|
|
7721
7721
|
);
|
|
7722
7722
|
i && i(!0);
|
|
7723
7723
|
const c = t.data.initialZoomLevel, d = await Promise.all(
|
|
7724
|
-
t.data.regions.map(async (
|
|
7725
|
-
const p = await Ne(l[
|
|
7724
|
+
t.data.regions.map(async (m, g) => {
|
|
7725
|
+
const p = await Ne(l[g]), f = o.getImageData(), C = a.map((I) => new bt(I.id)), w = f ? Ea(
|
|
7726
7726
|
f,
|
|
7727
7727
|
p,
|
|
7728
7728
|
c && !t.data.forceImageCover ? { scale: c } : void 0,
|
|
7729
7729
|
t.data.forceImageCover
|
|
7730
|
-
) : void 0,
|
|
7730
|
+
) : void 0, S = f ? {
|
|
7731
7731
|
id: Q(),
|
|
7732
7732
|
src: f.src,
|
|
7733
7733
|
x: (w == null ? void 0 : w.x) || 0,
|
|
@@ -7737,38 +7737,38 @@ class be {
|
|
|
7737
7737
|
scaleX: (w == null ? void 0 : w.zoom) || 1,
|
|
7738
7738
|
scaleY: (w == null ? void 0 : w.zoom) || 1,
|
|
7739
7739
|
rotation: 0
|
|
7740
|
-
} : void 0,
|
|
7740
|
+
} : void 0, y = Q(), b = n.getLayouts().find((I) => I.panelId === m.panelId);
|
|
7741
7741
|
if (!b)
|
|
7742
|
-
throw new
|
|
7742
|
+
throw new Y(m);
|
|
7743
7743
|
return {
|
|
7744
|
-
command: this.getCreateElementCommand(
|
|
7744
|
+
command: this.getCreateElementCommand(y, m, b, {
|
|
7745
7745
|
frameData: p,
|
|
7746
|
-
pattern:
|
|
7746
|
+
pattern: S,
|
|
7747
7747
|
disablePlaceholder: t.data.disablePlaceholder,
|
|
7748
7748
|
stepName: t.stepName
|
|
7749
7749
|
}),
|
|
7750
7750
|
regionEl: {
|
|
7751
|
-
id:
|
|
7752
|
-
region:
|
|
7751
|
+
id: y,
|
|
7752
|
+
region: m
|
|
7753
7753
|
},
|
|
7754
7754
|
removeExistingCommands: C
|
|
7755
7755
|
};
|
|
7756
7756
|
})
|
|
7757
|
-
), A = d.map((
|
|
7757
|
+
), A = d.map((m) => m.command), u = d.map((m) => m.removeExistingCommands).flat();
|
|
7758
7758
|
return {
|
|
7759
7759
|
command: new $([...A, ...u]),
|
|
7760
7760
|
followup: async () => {
|
|
7761
7761
|
i && i(!1), await n.setSelectionsAndElements(
|
|
7762
7762
|
t.stepName,
|
|
7763
7763
|
e ? [e] : [],
|
|
7764
|
-
[...d.map((
|
|
7764
|
+
[...d.map((m) => m.regionEl)],
|
|
7765
7765
|
async () => {
|
|
7766
|
-
var
|
|
7766
|
+
var m;
|
|
7767
7767
|
if (n.updateStorage(t.stepName, { currentFrameSources: l }), s) {
|
|
7768
|
-
const
|
|
7769
|
-
if (!
|
|
7768
|
+
const g = (m = n.getWorkflowExperience().getStepById(t.stepName)) == null ? void 0 : m.frameService;
|
|
7769
|
+
if (!g)
|
|
7770
7770
|
throw new Error("Frame service unavailable, cannot load pattern!");
|
|
7771
|
-
await this.loadPatternFromString(s,
|
|
7771
|
+
await this.loadPatternFromString(s, g, !0);
|
|
7772
7772
|
}
|
|
7773
7773
|
}
|
|
7774
7774
|
);
|
|
@@ -7818,7 +7818,7 @@ class be {
|
|
|
7818
7818
|
}
|
|
7819
7819
|
}
|
|
7820
7820
|
const wt = new be();
|
|
7821
|
-
class
|
|
7821
|
+
class gs {
|
|
7822
7822
|
async getIllustrationBody(t) {
|
|
7823
7823
|
return new Promise((e) => {
|
|
7824
7824
|
at(t, !0).then((a) => {
|
|
@@ -7869,7 +7869,7 @@ class ms {
|
|
|
7869
7869
|
if (a)
|
|
7870
7870
|
return this.reload(t, e, a);
|
|
7871
7871
|
{
|
|
7872
|
-
const i =
|
|
7872
|
+
const i = q.getDefaultVariant(n);
|
|
7873
7873
|
if (i)
|
|
7874
7874
|
return await this.selectVariantCommand(t, i, [], () => {
|
|
7875
7875
|
}, e);
|
|
@@ -7936,39 +7936,39 @@ class ms {
|
|
|
7936
7936
|
return new $(c);
|
|
7937
7937
|
}
|
|
7938
7938
|
async changeColors(t, e, a, n, i) {
|
|
7939
|
-
var h,
|
|
7939
|
+
var h, m;
|
|
7940
7940
|
if (e.length === 0)
|
|
7941
7941
|
return;
|
|
7942
7942
|
const s = L(
|
|
7943
7943
|
e[0].id,
|
|
7944
|
-
n().map((
|
|
7944
|
+
n().map((g) => g.layoutState)
|
|
7945
7945
|
), o = { ...s.colors }, l = {};
|
|
7946
|
-
Object.entries(o).forEach(([
|
|
7946
|
+
Object.entries(o).forEach(([g, p]) => {
|
|
7947
7947
|
const f = { browserValue: p.browserValue, pmsValue: p.pmsValue }, C = p.spotColor;
|
|
7948
|
-
C && (f.spotColor = { profileName: C.profileName, namedColor: C.namedColor }), l[
|
|
7948
|
+
C && (f.spotColor = { profileName: C.profileName, namedColor: C.namedColor }), l[g] = f;
|
|
7949
7949
|
});
|
|
7950
|
-
for (const [
|
|
7950
|
+
for (const [g, p] of i.entries()) {
|
|
7951
7951
|
const f = typeof p == "string" ? p : p.browserValue, C = typeof p == "string" ? void 0 : p.pmsValue;
|
|
7952
|
-
o[
|
|
7952
|
+
o[g] = { browserValue: f, spotColor: (h = o[g]) == null ? void 0 : h.spotColor, pmsValue: C }, l[g] = { browserValue: f };
|
|
7953
7953
|
}
|
|
7954
|
-
let c = Array.from(Object.values(o)).map((
|
|
7954
|
+
let c = Array.from(Object.values(o)).map((g) => g.browserValue);
|
|
7955
7955
|
const d = t.data.colorOption;
|
|
7956
|
-
d && ((
|
|
7956
|
+
d && ((m = d.variants) == null || m.forEach((g) => {
|
|
7957
7957
|
c = c.map((p) => {
|
|
7958
7958
|
var f;
|
|
7959
|
-
return p.toLowerCase() === ((f =
|
|
7959
|
+
return p.toLowerCase() === ((f = g.color) == null ? void 0 : f.toLowerCase()) ? g.name : p;
|
|
7960
7960
|
});
|
|
7961
7961
|
})), a.updateMetadata(t.stepName, { colors: c });
|
|
7962
7962
|
const A = /* @__PURE__ */ new Map();
|
|
7963
|
-
if (Object.entries(o).forEach(([
|
|
7964
|
-
A.set(
|
|
7963
|
+
if (Object.entries(o).forEach(([g, p]) => {
|
|
7964
|
+
A.set(g, p);
|
|
7965
7965
|
}), !s.svg)
|
|
7966
7966
|
throw new Error("Colors changed before SVG loaded. This should never happen!");
|
|
7967
7967
|
const u = await this.changeColorsCommand(
|
|
7968
7968
|
s.svg,
|
|
7969
7969
|
s.width,
|
|
7970
7970
|
s.height,
|
|
7971
|
-
e.map((
|
|
7971
|
+
e.map((g) => g.id),
|
|
7972
7972
|
A
|
|
7973
7973
|
);
|
|
7974
7974
|
a.updateStorage(t.stepName, {
|
|
@@ -7993,58 +7993,58 @@ class ms {
|
|
|
7993
7993
|
if (!l)
|
|
7994
7994
|
throw new qt(o);
|
|
7995
7995
|
const c = await lt(await this.getIllustrationBody(l)), d = await Kt(c.svg), A = (C) => {
|
|
7996
|
-
const w = i.getLayouts().find((
|
|
7996
|
+
const w = i.getLayouts().find((y) => y.panelId === C.panelId);
|
|
7997
7997
|
if (!w)
|
|
7998
|
-
throw new
|
|
7999
|
-
const
|
|
7998
|
+
throw new Y(C);
|
|
7999
|
+
const S = Q();
|
|
8000
8000
|
return {
|
|
8001
|
-
regionElement: { id:
|
|
8002
|
-
command: this.getCreateElementCommand(
|
|
8001
|
+
regionElement: { id: S, region: C },
|
|
8002
|
+
command: this.getCreateElementCommand(S, C, w, {
|
|
8003
8003
|
stepName: t.stepName,
|
|
8004
8004
|
src: l,
|
|
8005
8005
|
objectURL: d,
|
|
8006
8006
|
svg: c
|
|
8007
8007
|
})
|
|
8008
8008
|
};
|
|
8009
|
-
}, u = t.data.regions.map(A),
|
|
8010
|
-
let
|
|
8009
|
+
}, u = t.data.regions.map(A), m = [...u.map((C) => C.command), ...s];
|
|
8010
|
+
let g = Array.from(Object.values(c.colors)).map((C) => C.browserValue);
|
|
8011
8011
|
const p = t.data.colorOption;
|
|
8012
8012
|
return p && ((f = p.variants) == null || f.forEach((C) => {
|
|
8013
|
-
|
|
8014
|
-
var
|
|
8015
|
-
return w.toLowerCase() === ((
|
|
8013
|
+
g = g.map((w) => {
|
|
8014
|
+
var S;
|
|
8015
|
+
return w.toLowerCase() === ((S = C.color) == null ? void 0 : S.toLowerCase()) ? C.name : w;
|
|
8016
8016
|
});
|
|
8017
|
-
})), i.updateMetadata(t.stepName, { colors:
|
|
8018
|
-
command: new $(
|
|
8017
|
+
})), i.updateMetadata(t.stepName, { colors: g }), {
|
|
8018
|
+
command: new $(m),
|
|
8019
8019
|
followup: async () => {
|
|
8020
|
-
var w,
|
|
8020
|
+
var w, S;
|
|
8021
8021
|
await i.setSelectionsAndElements(
|
|
8022
8022
|
t.stepName,
|
|
8023
8023
|
[e],
|
|
8024
|
-
u.map((
|
|
8024
|
+
u.map((y) => y.regionElement),
|
|
8025
8025
|
async () => {
|
|
8026
8026
|
i.setMandatoryFulfilled(t.stepName, !0), n(!1);
|
|
8027
8027
|
}
|
|
8028
8028
|
);
|
|
8029
8029
|
const C = ((w = o.assetConfiguration) == null ? void 0 : w.defaultColorVariants) || [];
|
|
8030
8030
|
if (C.length !== 0) {
|
|
8031
|
-
const
|
|
8032
|
-
(((
|
|
8031
|
+
const y = {};
|
|
8032
|
+
(((S = o.assetConfiguration) == null ? void 0 : S.channelNumbers) || []).forEach((b) => {
|
|
8033
8033
|
var D;
|
|
8034
8034
|
const I = C.find((x) => x.channelNumber === b.number);
|
|
8035
|
-
I && (
|
|
8035
|
+
I && (y[`${b.id.replace(/\W/g, "")}`] = { browserValue: ((D = I == null ? void 0 : I.variant) == null ? void 0 : D.color) || "" });
|
|
8036
8036
|
}), await this.changeColors(
|
|
8037
8037
|
t,
|
|
8038
8038
|
u.map((b) => b.regionElement),
|
|
8039
8039
|
i,
|
|
8040
8040
|
() => i.getCommandContext().getAllLayouts(),
|
|
8041
|
-
new Map(Object.entries(
|
|
8041
|
+
new Map(Object.entries(y))
|
|
8042
8042
|
);
|
|
8043
8043
|
}
|
|
8044
8044
|
if (t.data.colorPickerEnabled) {
|
|
8045
|
-
const
|
|
8045
|
+
const y = await this.availableColors(t, i) || [], E = Object.keys(c.colors), b = y.length === 1 && E.length === 1;
|
|
8046
8046
|
if (b) {
|
|
8047
|
-
const I =
|
|
8047
|
+
const I = y[0], D = E[0];
|
|
8048
8048
|
await this.changeColors(
|
|
8049
8049
|
t,
|
|
8050
8050
|
u.map((x) => x.regionElement),
|
|
@@ -8065,7 +8065,7 @@ class ms {
|
|
|
8065
8065
|
};
|
|
8066
8066
|
}
|
|
8067
8067
|
}
|
|
8068
|
-
const
|
|
8068
|
+
const ge = new gs();
|
|
8069
8069
|
class ps {
|
|
8070
8070
|
async init(t, e, a) {
|
|
8071
8071
|
const n = t.option;
|
|
@@ -8074,7 +8074,7 @@ class ps {
|
|
|
8074
8074
|
if (a)
|
|
8075
8075
|
await this.reload(t, e, a);
|
|
8076
8076
|
else {
|
|
8077
|
-
const i =
|
|
8077
|
+
const i = q.getDefaultVariant(n);
|
|
8078
8078
|
if (i)
|
|
8079
8079
|
return await this.selectVariantLambda(t, i, e, () => {
|
|
8080
8080
|
});
|
|
@@ -8094,20 +8094,20 @@ class ps {
|
|
|
8094
8094
|
if (d) {
|
|
8095
8095
|
const A = (c = l.variants) == null ? void 0 : c.find((u) => u.id === d);
|
|
8096
8096
|
if (A) {
|
|
8097
|
-
const u = A.material, h = o.map((
|
|
8097
|
+
const u = A.material, h = o.map((m) => ({ id: m.id, region: m.stepRegion }));
|
|
8098
8098
|
await e.setSelectionsAndElements(
|
|
8099
8099
|
t.stepName,
|
|
8100
8100
|
[A],
|
|
8101
8101
|
h,
|
|
8102
8102
|
async () => {
|
|
8103
|
-
const
|
|
8104
|
-
if (
|
|
8105
|
-
const
|
|
8103
|
+
const m = e.getModelContainer();
|
|
8104
|
+
if (m) {
|
|
8105
|
+
const g = t.data.targetMaterials.map((p) => m.applyMaterialVariant(
|
|
8106
8106
|
p,
|
|
8107
8107
|
l.id || "",
|
|
8108
8108
|
u || {}
|
|
8109
8109
|
));
|
|
8110
|
-
Promise.all(
|
|
8110
|
+
Promise.all(g).then(
|
|
8111
8111
|
() => e.setMandatoryFulfilled(t.stepName, !0)
|
|
8112
8112
|
);
|
|
8113
8113
|
}
|
|
@@ -8152,7 +8152,7 @@ class fs {
|
|
|
8152
8152
|
if (a)
|
|
8153
8153
|
await this.reload(t, e, a);
|
|
8154
8154
|
else {
|
|
8155
|
-
const i =
|
|
8155
|
+
const i = q.getDefaultVariant(n);
|
|
8156
8156
|
if (i)
|
|
8157
8157
|
return await this.selectVariantLambda(t, i, e, () => {
|
|
8158
8158
|
});
|
|
@@ -8176,16 +8176,16 @@ class fs {
|
|
|
8176
8176
|
[A],
|
|
8177
8177
|
u,
|
|
8178
8178
|
async () => {
|
|
8179
|
-
var
|
|
8179
|
+
var m;
|
|
8180
8180
|
const h = e.getModelContainer();
|
|
8181
8181
|
if (h && t.option) {
|
|
8182
|
-
const
|
|
8183
|
-
if (!
|
|
8182
|
+
const g = (m = A.asset) == null ? void 0 : m.fileLink;
|
|
8183
|
+
if (!g)
|
|
8184
8184
|
throw new vt(A);
|
|
8185
8185
|
await h.applyModelVariant(
|
|
8186
8186
|
t.stepName || "",
|
|
8187
8187
|
{
|
|
8188
|
-
model:
|
|
8188
|
+
model: g,
|
|
8189
8189
|
contextService: e.getLayoutPreviewService()
|
|
8190
8190
|
},
|
|
8191
8191
|
t.data.replaceProductModel || !1
|
|
@@ -8265,17 +8265,17 @@ class Cs {
|
|
|
8265
8265
|
return console.error("Missing configuration."), null;
|
|
8266
8266
|
a.updateStorage(t.stepName, { text: e }), a.updateMetadata(t.stepName, { text: e });
|
|
8267
8267
|
const c = (A, u, h) => {
|
|
8268
|
-
const
|
|
8268
|
+
const m = h || Q(), p = a.getLayouts().find((C) => C.panelId === u.panelId);
|
|
8269
8269
|
if (!p)
|
|
8270
8270
|
return console.error(`Can not find layout for region: ${u.panelId}`), null;
|
|
8271
8271
|
const f = [];
|
|
8272
|
-
return h && f.push(new bt(
|
|
8272
|
+
return h && f.push(new bt(m)), f.push(
|
|
8273
8273
|
new G(
|
|
8274
8274
|
{
|
|
8275
8275
|
stepRegion: u,
|
|
8276
8276
|
stepName: t.stepName,
|
|
8277
8277
|
colors: {},
|
|
8278
|
-
id:
|
|
8278
|
+
id: m,
|
|
8279
8279
|
svg: A,
|
|
8280
8280
|
type: M.Illustration,
|
|
8281
8281
|
y: u.top,
|
|
@@ -8290,7 +8290,7 @@ class Cs {
|
|
|
8290
8290
|
p
|
|
8291
8291
|
)
|
|
8292
8292
|
), {
|
|
8293
|
-
id:
|
|
8293
|
+
id: m,
|
|
8294
8294
|
region: u,
|
|
8295
8295
|
command: new $(f)
|
|
8296
8296
|
};
|
|
@@ -8299,8 +8299,8 @@ class Cs {
|
|
|
8299
8299
|
const u = i.map((h) => {
|
|
8300
8300
|
if (!h.region)
|
|
8301
8301
|
return null;
|
|
8302
|
-
const
|
|
8303
|
-
return c(
|
|
8302
|
+
const m = s.svgPrint(e, h.region);
|
|
8303
|
+
return c(m, h.region, h.id);
|
|
8304
8304
|
}).filter((h) => !!h).filter((h) => !!h).map((h) => h && h.command);
|
|
8305
8305
|
return {
|
|
8306
8306
|
command: new $(u),
|
|
@@ -8314,7 +8314,7 @@ class Cs {
|
|
|
8314
8314
|
return {
|
|
8315
8315
|
command: new $(u),
|
|
8316
8316
|
followup: async () => {
|
|
8317
|
-
const h = A.filter((
|
|
8317
|
+
const h = A.filter((m) => m).map((m) => m && { id: m.id, region: m.region });
|
|
8318
8318
|
await a.setSelectionsAndElements(
|
|
8319
8319
|
t.stepName,
|
|
8320
8320
|
[],
|
|
@@ -8392,17 +8392,17 @@ class ws {
|
|
|
8392
8392
|
return console.error("No URL for picture!"), null;
|
|
8393
8393
|
n(!0), t.mandatory && a.setMandatoryFulfilled(t.stepName, !1);
|
|
8394
8394
|
const l = a.getRegionElements(t.stepName).map((A) => new bt(A.id)), c = (A) => {
|
|
8395
|
-
const h = a.getLayouts().find((
|
|
8395
|
+
const h = a.getLayouts().find((g) => g.panelId === A.panelId);
|
|
8396
8396
|
if (!h)
|
|
8397
|
-
throw new
|
|
8398
|
-
const
|
|
8397
|
+
throw new Y(A);
|
|
8398
|
+
const m = Q();
|
|
8399
8399
|
return {
|
|
8400
|
-
regionElement: { id:
|
|
8400
|
+
regionElement: { id: m, region: A },
|
|
8401
8401
|
command: new G(
|
|
8402
8402
|
{
|
|
8403
8403
|
stepName: t.stepName,
|
|
8404
8404
|
stepRegion: A,
|
|
8405
|
-
id:
|
|
8405
|
+
id: m,
|
|
8406
8406
|
src: s,
|
|
8407
8407
|
type: M.Image,
|
|
8408
8408
|
y: A.top,
|
|
@@ -8444,7 +8444,7 @@ class ys {
|
|
|
8444
8444
|
await this.reload(t, e, a);
|
|
8445
8445
|
else {
|
|
8446
8446
|
const i = n.variants;
|
|
8447
|
-
if (
|
|
8447
|
+
if (q.getDefaultVariant(n)) {
|
|
8448
8448
|
const o = i == null ? void 0 : i.find((l) => {
|
|
8449
8449
|
var c;
|
|
8450
8450
|
return l.id === ((c = n.defaultVariant) == null ? void 0 : c.id);
|
|
@@ -8512,7 +8512,7 @@ class Ss {
|
|
|
8512
8512
|
const n = a.getLayouts(), s = (a.getRegionElements(e.stepName) || []).map((o) => {
|
|
8513
8513
|
const l = o.region;
|
|
8514
8514
|
if (!n.find((d) => d.panelId === (l == null ? void 0 : l.panelId)))
|
|
8515
|
-
throw new
|
|
8515
|
+
throw new Y(l);
|
|
8516
8516
|
return new oa(o.id, this.shapeFillId, t);
|
|
8517
8517
|
}).filter((o) => !!o);
|
|
8518
8518
|
a.getCommandDispatcher()(new $(s)), a.updateStorage(e.stepName, { colour: t });
|
|
@@ -8524,7 +8524,7 @@ class Ss {
|
|
|
8524
8524
|
if (a)
|
|
8525
8525
|
await this.reload(t, e, a);
|
|
8526
8526
|
else {
|
|
8527
|
-
const i =
|
|
8527
|
+
const i = q.getDefaultVariant(n);
|
|
8528
8528
|
return i ? this.selectVariantCommand(
|
|
8529
8529
|
t,
|
|
8530
8530
|
{
|
|
@@ -8582,10 +8582,10 @@ class Ss {
|
|
|
8582
8582
|
if (a.length > 0) {
|
|
8583
8583
|
const c = (A) => {
|
|
8584
8584
|
const u = A.region;
|
|
8585
|
-
if (!i.find((
|
|
8586
|
-
throw new
|
|
8587
|
-
const
|
|
8588
|
-
return new oa(A.id, this.shapeFillId,
|
|
8585
|
+
if (!i.find((g) => g.panelId === (u == null ? void 0 : u.panelId)))
|
|
8586
|
+
throw new Y(u);
|
|
8587
|
+
const m = o();
|
|
8588
|
+
return new oa(A.id, this.shapeFillId, m);
|
|
8589
8589
|
}, d = a.map(c).filter((A) => !!A);
|
|
8590
8590
|
return {
|
|
8591
8591
|
command: new $(d),
|
|
@@ -8599,10 +8599,10 @@ class Ss {
|
|
|
8599
8599
|
};
|
|
8600
8600
|
} else {
|
|
8601
8601
|
const c = (h) => {
|
|
8602
|
-
const
|
|
8603
|
-
if (!
|
|
8604
|
-
throw new
|
|
8605
|
-
const
|
|
8602
|
+
const m = i.find((w) => w.panelId === h.panelId);
|
|
8603
|
+
if (!m)
|
|
8604
|
+
throw new Y(h);
|
|
8605
|
+
const g = o(), p = `
|
|
8606
8606
|
<svg
|
|
8607
8607
|
xmlns="http://www.w3.org/2000/svg"
|
|
8608
8608
|
xmlnsXlink="http://www.w3.org/1999/xlink"
|
|
@@ -8619,11 +8619,11 @@ class Ss {
|
|
|
8619
8619
|
width="1"
|
|
8620
8620
|
height="1"
|
|
8621
8621
|
class="${this.shapeFillId}"
|
|
8622
|
-
fill="${
|
|
8622
|
+
fill="${g}"
|
|
8623
8623
|
/>
|
|
8624
8624
|
</svg>
|
|
8625
8625
|
`, f = {};
|
|
8626
|
-
f[this.shapeFillId] = { browserValue:
|
|
8626
|
+
f[this.shapeFillId] = { browserValue: g };
|
|
8627
8627
|
const C = Q();
|
|
8628
8628
|
return {
|
|
8629
8629
|
id: C,
|
|
@@ -8646,7 +8646,7 @@ class Ss {
|
|
|
8646
8646
|
immutable: h.immutable,
|
|
8647
8647
|
excludeFromExport: t.data.excludeFromPrint
|
|
8648
8648
|
},
|
|
8649
|
-
|
|
8649
|
+
m
|
|
8650
8650
|
)
|
|
8651
8651
|
};
|
|
8652
8652
|
}, d = t.data.regions.map(c), A = d.filter((h) => !!h).map((h) => h == null ? void 0 : h.command), u = d.filter((h) => !!h).map((h) => ({ id: h.id, region: h.region }));
|
|
@@ -8706,17 +8706,17 @@ const Es = new vs(), je = (r, t, e, a, n) => {
|
|
|
8706
8706
|
if (A <= r.width)
|
|
8707
8707
|
return [i, A];
|
|
8708
8708
|
const u = o.reduce((p, f, C, w) => f > w[p] ? C : p, 0), h = i[u];
|
|
8709
|
-
let
|
|
8710
|
-
for (; !
|
|
8711
|
-
|
|
8712
|
-
const p = [h.slice(0,
|
|
8709
|
+
let m = !1, g = h.length;
|
|
8710
|
+
for (; !m && g > -1; ) {
|
|
8711
|
+
g = h.lastIndexOf(" ", g - 1);
|
|
8712
|
+
const p = [h.slice(0, g), h.slice(g + 1)], f = p.map((w) => ht(w, a, n));
|
|
8713
8713
|
f[0] <= r.width && (i = [...i.slice(0, u), ...p, ...i.slice(u + 1)], o = [
|
|
8714
8714
|
...o.slice(0, u),
|
|
8715
8715
|
...f,
|
|
8716
8716
|
...o.slice(u + 1)
|
|
8717
|
-
], s += 1,
|
|
8717
|
+
], s += 1, m = !0);
|
|
8718
8718
|
}
|
|
8719
|
-
|
|
8719
|
+
m || (c = !1);
|
|
8720
8720
|
}
|
|
8721
8721
|
return [null, null];
|
|
8722
8722
|
}, pe = (r, t, e, a, n) => {
|
|
@@ -8795,37 +8795,37 @@ class Bs {
|
|
|
8795
8795
|
height: A.height,
|
|
8796
8796
|
width: A.width,
|
|
8797
8797
|
scale: t.data.imageFillScale || 1
|
|
8798
|
-
} : void 0, h = this.getDefaultStrokeColorVariant(t.data),
|
|
8798
|
+
} : void 0, h = this.getDefaultStrokeColorVariant(t.data), m = t.data.strokeEnabled && (h != null && h.color) ? {
|
|
8799
8799
|
browserValue: h.color,
|
|
8800
8800
|
pmsValue: h.name
|
|
8801
8801
|
} : void 0;
|
|
8802
|
-
let
|
|
8802
|
+
let g = t.data.defaultText || "";
|
|
8803
8803
|
const p = e.getWorkflowExperience().getBundle();
|
|
8804
8804
|
if (p && t.globalPropertyAspectConfigurations) {
|
|
8805
8805
|
console.log("bundle a");
|
|
8806
|
-
const C = (s = p.getGlobalPropertyConfiguration()) == null ? void 0 : s.aspects, w = C == null ? void 0 : C.find((
|
|
8807
|
-
var
|
|
8808
|
-
return
|
|
8806
|
+
const C = (s = p.getGlobalPropertyConfiguration()) == null ? void 0 : s.aspects, w = C == null ? void 0 : C.find((S) => {
|
|
8807
|
+
var y;
|
|
8808
|
+
return S.type === X.Text && ((y = t.globalPropertyAspectConfigurations) == null ? void 0 : y.map((E) => E.aspectName).includes(S.name));
|
|
8809
8809
|
});
|
|
8810
8810
|
if (w) {
|
|
8811
8811
|
console.log("bundle b");
|
|
8812
|
-
const
|
|
8813
|
-
|
|
8812
|
+
const y = p.getGlobalPropertyStateManager().getAspect(w.name);
|
|
8813
|
+
y && (console.log("bundle c"), g = y);
|
|
8814
8814
|
}
|
|
8815
8815
|
}
|
|
8816
8816
|
e.updateStorage(t.stepName, {
|
|
8817
|
-
text:
|
|
8817
|
+
text: g,
|
|
8818
8818
|
inputText: t.data.defaultText || "",
|
|
8819
8819
|
color: ((o = this.getDefaultColorVariant(t.data)) == null ? void 0 : o.color) || this.getDefaultColor(t.data),
|
|
8820
8820
|
fillImage: u,
|
|
8821
|
-
strokeColor:
|
|
8821
|
+
strokeColor: m
|
|
8822
8822
|
}), e.updateMetadata(t.stepName, {
|
|
8823
|
-
text:
|
|
8823
|
+
text: g,
|
|
8824
8824
|
color: ((l = this.getDefaultColorVariant(t.data)) == null ? void 0 : l.name) || this.getDefaultColor(t.data),
|
|
8825
8825
|
fillImage: c == null ? void 0 : c.name,
|
|
8826
8826
|
strokeColor: t.data.strokeEnabled ? h == null ? void 0 : h.color : void 0
|
|
8827
8827
|
});
|
|
8828
|
-
const f =
|
|
8828
|
+
const f = q.getDefaultVariant(n);
|
|
8829
8829
|
if (f)
|
|
8830
8830
|
return console.log("default variant"), this.selectVariantCommand(
|
|
8831
8831
|
t,
|
|
@@ -8838,7 +8838,7 @@ class Bs {
|
|
|
8838
8838
|
() => {
|
|
8839
8839
|
},
|
|
8840
8840
|
u,
|
|
8841
|
-
|
|
8841
|
+
m
|
|
8842
8842
|
);
|
|
8843
8843
|
}
|
|
8844
8844
|
return console.log("nothing"), null;
|
|
@@ -9001,9 +9001,9 @@ class Bs {
|
|
|
9001
9001
|
{ size: a.data.size, minSize: a.data.minSize, maxSize: a.data.maxSize }
|
|
9002
9002
|
);
|
|
9003
9003
|
c.set(A.id, u), d.set(A.id, h);
|
|
9004
|
-
const
|
|
9004
|
+
const m = a.data.curved ? s : (h || []).join(`
|
|
9005
9005
|
`);
|
|
9006
|
-
l.push(this.generateTextChangeCommandsForRegion(u, a.data, A.id,
|
|
9006
|
+
l.push(this.generateTextChangeCommandsForRegion(u, a.data, A.id, m));
|
|
9007
9007
|
}
|
|
9008
9008
|
return !a.data.curved && e.length > 0 && !Array.from(d.values()).every((u) => u) ? (o.errorData || (o.errorData = {}), o.errorData.doesNotFit = !0, o) : (n.updateStorage(a.stepName, { text: t }), n.updateMetadata(a.stepName, {
|
|
9009
9009
|
text: s
|
|
@@ -9038,71 +9038,106 @@ class Bs {
|
|
|
9038
9038
|
const n = e.getSerializedStep(
|
|
9039
9039
|
t.stepName,
|
|
9040
9040
|
a.serializableWorkflow.steps
|
|
9041
|
-
), o = Object.values(a.layouts).map((
|
|
9041
|
+
), o = Object.values(a.layouts).map((m) => m.elements).flat().filter((m) => m.stepName === t.stepName), l = t.option;
|
|
9042
9042
|
if (n != null && n.selectedVariants) {
|
|
9043
9043
|
console.log("b3 a");
|
|
9044
|
-
const
|
|
9045
|
-
if (l &&
|
|
9044
|
+
const m = n.selectedVariants[0].id;
|
|
9045
|
+
if (l && m) {
|
|
9046
9046
|
console.log("b3 b");
|
|
9047
|
-
const
|
|
9048
|
-
if (
|
|
9047
|
+
const g = (c = l.variants) == null ? void 0 : c.find((p) => p.id === m);
|
|
9048
|
+
if (g) {
|
|
9049
9049
|
console.log("b3 c");
|
|
9050
|
-
const p = await this.fontDataFromVariant(
|
|
9050
|
+
const p = await this.fontDataFromVariant(g), f = o.map((y) => ({ id: y.id, region: y.stepRegion })), C = (d = n.storage) == null ? void 0 : d.color;
|
|
9051
9051
|
let w = (A = n.storage) == null ? void 0 : A.text;
|
|
9052
|
-
const
|
|
9053
|
-
if (
|
|
9052
|
+
const S = e.getWorkflowExperience().getBundle();
|
|
9053
|
+
if (S && t.globalPropertyAspectConfigurations) {
|
|
9054
9054
|
console.log("b3 d");
|
|
9055
|
-
const
|
|
9056
|
-
var
|
|
9057
|
-
return
|
|
9055
|
+
const y = (u = S.getGlobalPropertyConfiguration()) == null ? void 0 : u.aspects, E = y == null ? void 0 : y.find((b) => {
|
|
9056
|
+
var I;
|
|
9057
|
+
return b.type === X.Text && ((I = t.globalPropertyAspectConfigurations) == null ? void 0 : I.map((D) => D.aspectName).includes(b.name));
|
|
9058
9058
|
});
|
|
9059
|
-
if (
|
|
9059
|
+
if (E) {
|
|
9060
9060
|
console.log("b3 e");
|
|
9061
|
-
const
|
|
9062
|
-
|
|
9061
|
+
const I = S.getGlobalPropertyStateManager().getAspect(E.name);
|
|
9062
|
+
I && (console.log("b3 f"), w = I);
|
|
9063
9063
|
}
|
|
9064
9064
|
}
|
|
9065
|
-
await e.setSelectionsAndElements(
|
|
9065
|
+
if (await e.setSelectionsAndElements(
|
|
9066
9066
|
t.stepName,
|
|
9067
|
-
[
|
|
9067
|
+
[g],
|
|
9068
9068
|
f,
|
|
9069
9069
|
async () => {
|
|
9070
9070
|
e.updateMetadata(t.stepName, { color: C, text: w }), e.updateStorage(t.stepName, { text: w, inputText: w });
|
|
9071
|
-
const
|
|
9072
|
-
e.getCommandDispatcher()(
|
|
9071
|
+
const y = o.map((b) => new Wa(b.id, p)), E = new $(y);
|
|
9072
|
+
e.getCommandDispatcher()(E);
|
|
9073
9073
|
}
|
|
9074
|
-
)
|
|
9075
|
-
|
|
9076
|
-
|
|
9077
|
-
|
|
9078
|
-
|
|
9079
|
-
|
|
9080
|
-
|
|
9081
|
-
|
|
9074
|
+
), o.length === 0 && l) {
|
|
9075
|
+
const y = q.getDefaultVariant(l);
|
|
9076
|
+
if (y) {
|
|
9077
|
+
console.log("default variant");
|
|
9078
|
+
const E = await this.selectVariantCommand(
|
|
9079
|
+
t,
|
|
9080
|
+
y,
|
|
9081
|
+
{ text: w },
|
|
9082
|
+
[],
|
|
9083
|
+
e,
|
|
9084
|
+
() => {
|
|
9085
|
+
},
|
|
9086
|
+
() => {
|
|
9087
|
+
}
|
|
9088
|
+
);
|
|
9089
|
+
e.getCommandDispatcher()(E.command);
|
|
9090
|
+
}
|
|
9091
|
+
} else {
|
|
9092
|
+
const { command: y } = W.updateInputText(
|
|
9093
|
+
w || "",
|
|
9094
|
+
o,
|
|
9095
|
+
t,
|
|
9096
|
+
e
|
|
9097
|
+
);
|
|
9098
|
+
y && e.getCommandDispatcher()(y);
|
|
9099
|
+
}
|
|
9082
9100
|
}
|
|
9083
9101
|
}
|
|
9084
9102
|
} else {
|
|
9085
9103
|
console.log("else");
|
|
9086
|
-
const
|
|
9087
|
-
if (
|
|
9104
|
+
const m = e.getWorkflowExperience().getBundle();
|
|
9105
|
+
if (m && t.globalPropertyAspectConfigurations) {
|
|
9088
9106
|
console.log("b2 a");
|
|
9089
|
-
const
|
|
9107
|
+
const g = (h = m.getGlobalPropertyConfiguration()) == null ? void 0 : h.aspects, p = g == null ? void 0 : g.find((f) => {
|
|
9090
9108
|
var C;
|
|
9091
9109
|
return f.type === X.Text && ((C = t.globalPropertyAspectConfigurations) == null ? void 0 : C.map((w) => w.aspectName).includes(f.name));
|
|
9092
9110
|
});
|
|
9093
9111
|
if (p) {
|
|
9094
9112
|
console.log("b2 b");
|
|
9095
|
-
const C =
|
|
9096
|
-
if (C)
|
|
9097
|
-
console.log("b2 c")
|
|
9098
|
-
|
|
9099
|
-
|
|
9100
|
-
|
|
9101
|
-
|
|
9102
|
-
|
|
9103
|
-
|
|
9104
|
-
|
|
9105
|
-
|
|
9113
|
+
const C = m.getGlobalPropertyStateManager().getAspect(p.name);
|
|
9114
|
+
if (C)
|
|
9115
|
+
if (console.log("b2 c"), o.length === 0 && l) {
|
|
9116
|
+
const w = q.getDefaultVariant(l);
|
|
9117
|
+
if (w) {
|
|
9118
|
+
console.log("default variant");
|
|
9119
|
+
const S = await this.selectVariantCommand(
|
|
9120
|
+
t,
|
|
9121
|
+
w,
|
|
9122
|
+
{ text: C },
|
|
9123
|
+
[],
|
|
9124
|
+
e,
|
|
9125
|
+
() => {
|
|
9126
|
+
},
|
|
9127
|
+
() => {
|
|
9128
|
+
}
|
|
9129
|
+
);
|
|
9130
|
+
e.getCommandDispatcher()(S.command);
|
|
9131
|
+
}
|
|
9132
|
+
} else {
|
|
9133
|
+
const { command: w } = W.updateInputText(
|
|
9134
|
+
C,
|
|
9135
|
+
o,
|
|
9136
|
+
t,
|
|
9137
|
+
e
|
|
9138
|
+
);
|
|
9139
|
+
w && e.getCommandDispatcher()(w);
|
|
9140
|
+
}
|
|
9106
9141
|
}
|
|
9107
9142
|
}
|
|
9108
9143
|
}
|
|
@@ -9110,24 +9145,24 @@ class Bs {
|
|
|
9110
9145
|
getDefaultColorVariant(t) {
|
|
9111
9146
|
const e = t.colorOption;
|
|
9112
9147
|
if (e)
|
|
9113
|
-
return
|
|
9148
|
+
return q.getDefaultVariant(e);
|
|
9114
9149
|
}
|
|
9115
9150
|
getDefaultColor(t) {
|
|
9116
9151
|
const e = t.colorOption;
|
|
9117
9152
|
if (!e)
|
|
9118
9153
|
return;
|
|
9119
|
-
const a =
|
|
9154
|
+
const a = q.getDefaultVariant(e);
|
|
9120
9155
|
return a == null ? void 0 : a.color;
|
|
9121
9156
|
}
|
|
9122
9157
|
getDefaultImageFillVariant(t) {
|
|
9123
9158
|
const e = t.imageFillOption;
|
|
9124
9159
|
if (e)
|
|
9125
|
-
return
|
|
9160
|
+
return q.getDefaultVariant(e);
|
|
9126
9161
|
}
|
|
9127
9162
|
getDefaultStrokeColorVariant(t) {
|
|
9128
9163
|
const e = t.strokeOption;
|
|
9129
9164
|
if (e)
|
|
9130
|
-
return
|
|
9165
|
+
return q.getDefaultVariant(e);
|
|
9131
9166
|
}
|
|
9132
9167
|
async fontDataFromVariant(t) {
|
|
9133
9168
|
const e = t.asset;
|
|
@@ -9157,7 +9192,7 @@ class Bs {
|
|
|
9157
9192
|
);
|
|
9158
9193
|
h.push(...p);
|
|
9159
9194
|
}
|
|
9160
|
-
const
|
|
9195
|
+
const m = await this.changeInputTextWithRegion(
|
|
9161
9196
|
t,
|
|
9162
9197
|
t.data.size || He,
|
|
9163
9198
|
A,
|
|
@@ -9168,7 +9203,7 @@ class Bs {
|
|
|
9168
9203
|
s,
|
|
9169
9204
|
o
|
|
9170
9205
|
);
|
|
9171
|
-
return
|
|
9206
|
+
return m && h.push(m), {
|
|
9172
9207
|
command: new $(h),
|
|
9173
9208
|
followup: async () => {
|
|
9174
9209
|
i.markUpdateCompleted(d), await i.setSelectionsAndElements(t.stepName, [e], n);
|
|
@@ -9182,7 +9217,7 @@ class Bs {
|
|
|
9182
9217
|
A,
|
|
9183
9218
|
a,
|
|
9184
9219
|
i
|
|
9185
|
-
),
|
|
9220
|
+
), m = await this.changeInputTextWithRegion(
|
|
9186
9221
|
t,
|
|
9187
9222
|
t.data.size || He,
|
|
9188
9223
|
A,
|
|
@@ -9192,21 +9227,21 @@ class Bs {
|
|
|
9192
9227
|
(a == null ? void 0 : a.customiseAllText) ?? !1,
|
|
9193
9228
|
s,
|
|
9194
9229
|
o
|
|
9195
|
-
),
|
|
9230
|
+
), g = h.flatMap((f) => f.commands);
|
|
9196
9231
|
if (l) {
|
|
9197
9232
|
const f = h.map(
|
|
9198
9233
|
(C) => new Ge(C.regionElement.id, l)
|
|
9199
9234
|
);
|
|
9200
|
-
|
|
9235
|
+
g.push(...f);
|
|
9201
9236
|
}
|
|
9202
9237
|
if (c) {
|
|
9203
9238
|
const f = n.map(
|
|
9204
9239
|
(C) => new We(C.id, c, t.data.strokeThickness)
|
|
9205
9240
|
);
|
|
9206
|
-
|
|
9241
|
+
g.push(...f);
|
|
9207
9242
|
}
|
|
9208
|
-
return
|
|
9209
|
-
command: new $(
|
|
9243
|
+
return m && g.push(m), {
|
|
9244
|
+
command: new $(g),
|
|
9210
9245
|
followup: async () => {
|
|
9211
9246
|
i.markUpdateCompleted(d);
|
|
9212
9247
|
}
|
|
@@ -9225,8 +9260,8 @@ class Bs {
|
|
|
9225
9260
|
if (!a || !a.regions)
|
|
9226
9261
|
throw new Error("Step data not supplied");
|
|
9227
9262
|
const o = i.text || a.defaultText || "", l = this.getProcessedInput(o, a, !1), c = async (A) => {
|
|
9228
|
-
var
|
|
9229
|
-
const h = s.getLayouts().find((p) => p.panelId === A.panelId),
|
|
9263
|
+
var g;
|
|
9264
|
+
const h = s.getLayouts().find((p) => p.panelId === A.panelId), m = Q();
|
|
9230
9265
|
try {
|
|
9231
9266
|
if (!h)
|
|
9232
9267
|
throw new Ie("Failed to find layout for region: " + A.panelId);
|
|
@@ -9238,17 +9273,17 @@ class Bs {
|
|
|
9238
9273
|
return nt.id === ((R = p.defaultVariant) == null ? void 0 : R.id);
|
|
9239
9274
|
}) || p.variants[0];
|
|
9240
9275
|
f = this.createTextFillSpotColor(p, T), s.updateStorage(t, {
|
|
9241
|
-
colorProfileAssetKey: (
|
|
9276
|
+
colorProfileAssetKey: (g = p.colorProfile) == null ? void 0 : g.key
|
|
9242
9277
|
});
|
|
9243
9278
|
}
|
|
9244
|
-
const C = await this.getDefaultColor(a), w = C || "#000000",
|
|
9279
|
+
const C = await this.getDefaultColor(a), w = C || "#000000", S = {
|
|
9245
9280
|
stepRegion: A,
|
|
9246
9281
|
stepName: t,
|
|
9247
9282
|
align: this.textAlign(a),
|
|
9248
9283
|
fill: i.color ? i.color : w,
|
|
9249
9284
|
fontSize: a.size || He,
|
|
9250
9285
|
fontData: n,
|
|
9251
|
-
id:
|
|
9286
|
+
id: m,
|
|
9252
9287
|
layer: A.layer,
|
|
9253
9288
|
layerIndex: A.layerIndex,
|
|
9254
9289
|
rotation: A.rotation,
|
|
@@ -9265,34 +9300,34 @@ class Bs {
|
|
|
9265
9300
|
curved: a.curved,
|
|
9266
9301
|
paths: a.paths,
|
|
9267
9302
|
fillSpotColorDefinition: f
|
|
9268
|
-
},
|
|
9269
|
-
if (!
|
|
9303
|
+
}, y = [], E = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map();
|
|
9304
|
+
if (!S.fontData)
|
|
9270
9305
|
throw new z("Failed to resolve font data for text.");
|
|
9271
9306
|
const [I, D] = pe(
|
|
9272
|
-
|
|
9273
|
-
|
|
9307
|
+
S.fontSize,
|
|
9308
|
+
S.fontData,
|
|
9274
9309
|
{
|
|
9275
|
-
left:
|
|
9276
|
-
top:
|
|
9277
|
-
width:
|
|
9278
|
-
height:
|
|
9279
|
-
rotation:
|
|
9310
|
+
left: S.x,
|
|
9311
|
+
top: S.y,
|
|
9312
|
+
width: S.width,
|
|
9313
|
+
height: S.height,
|
|
9314
|
+
rotation: S.rotation,
|
|
9280
9315
|
panelId: ""
|
|
9281
9316
|
},
|
|
9282
9317
|
[l],
|
|
9283
9318
|
{ size: a.size, minSize: a.minSize, maxSize: a.maxSize }
|
|
9284
9319
|
);
|
|
9285
|
-
E.set(
|
|
9320
|
+
E.set(S.id, I), b.set(S.id, D);
|
|
9286
9321
|
const x = a.curved || a.vertical ? l : (D || []).join(`
|
|
9287
9322
|
`);
|
|
9288
|
-
|
|
9289
|
-
this.generateTextChangeCommandsForRegion(I, a,
|
|
9323
|
+
y.push(
|
|
9324
|
+
this.generateTextChangeCommandsForRegion(I, a, S.id, x)
|
|
9290
9325
|
);
|
|
9291
|
-
const k = new G(
|
|
9326
|
+
const k = new G(S, h);
|
|
9292
9327
|
return {
|
|
9293
|
-
regionElement: { id:
|
|
9294
|
-
commands: [k, ...
|
|
9295
|
-
newElement:
|
|
9328
|
+
regionElement: { id: m, region: A },
|
|
9329
|
+
commands: [k, ...y],
|
|
9330
|
+
newElement: S,
|
|
9296
9331
|
fontData: n
|
|
9297
9332
|
};
|
|
9298
9333
|
} catch (p) {
|
|
@@ -9326,30 +9361,30 @@ class Bs {
|
|
|
9326
9361
|
* @deprecated
|
|
9327
9362
|
*/
|
|
9328
9363
|
async changeInputTextWithRegion(t, e, a, n, i, s, o, l, c, d) {
|
|
9329
|
-
const A = (n || "").replace(/^(?![\u000A\u000D])[\u0000-\u001F\u007F-\u009F]/g, ""), u = this.getProcessedInput(A, t.data, o), h = s.getRegionElements(t.stepName),
|
|
9330
|
-
for (const
|
|
9331
|
-
if (
|
|
9332
|
-
const [
|
|
9364
|
+
const A = (n || "").replace(/^(?![\u000A\u000D])[\u0000-\u001F\u007F-\u009F]/g, ""), u = this.getProcessedInput(A, t.data, o), h = s.getRegionElements(t.stepName), m = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map();
|
|
9365
|
+
for (const S of h)
|
|
9366
|
+
if (S.region) {
|
|
9367
|
+
const [y, E] = pe(
|
|
9333
9368
|
e,
|
|
9334
9369
|
a,
|
|
9335
|
-
|
|
9370
|
+
S.region,
|
|
9336
9371
|
[u],
|
|
9337
9372
|
{ size: t.data.size, minSize: t.data.minSize, maxSize: t.data.maxSize }
|
|
9338
9373
|
);
|
|
9339
|
-
|
|
9374
|
+
m.set(S.id, y), g.set(S.id, E);
|
|
9340
9375
|
}
|
|
9341
9376
|
const f = (() => {
|
|
9342
9377
|
if (t.data && t.data.maxLength && u.length > t.data.maxLength)
|
|
9343
9378
|
return d && d(!0), { info: "0" };
|
|
9344
|
-
const
|
|
9345
|
-
for (const E of
|
|
9346
|
-
for (const b in
|
|
9347
|
-
const I =
|
|
9379
|
+
const S = s.getProfanities(), y = Xe(u.toLowerCase());
|
|
9380
|
+
for (const E of y)
|
|
9381
|
+
for (const b in S) {
|
|
9382
|
+
const I = S[b].toLowerCase().replace(/\s/g, "");
|
|
9348
9383
|
if (E === I)
|
|
9349
9384
|
return l(!0), { error: "Blocked profanity." };
|
|
9350
9385
|
}
|
|
9351
9386
|
return !t.data.vertical && !t.data.allowNewlines && (u.includes(`
|
|
9352
|
-
`) || u.includes("\r")) ? (l(!0), { error: "Cannot span multiple lines." }) : !t.data.curved && !Array.from(
|
|
9387
|
+
`) || u.includes("\r")) ? (l(!0), { error: "Cannot span multiple lines." }) : !t.data.curved && !Array.from(g.values()).every((b) => b) ? (l(!0), { error: "Does not fit." }) : (l(!1), { info: (t.data.maxLength - u.length).toString() });
|
|
9353
9388
|
})();
|
|
9354
9389
|
if (f.error) {
|
|
9355
9390
|
c(f.error);
|
|
@@ -9361,15 +9396,15 @@ class Bs {
|
|
|
9361
9396
|
text: this.injectReplaceableText(A, t.data)
|
|
9362
9397
|
}), (i.defaultCleared || !t.data.deleteDefaultOnFocus) && A.trim() !== "" && s.setMandatoryFulfilled(t.stepName, !0);
|
|
9363
9398
|
const C = [];
|
|
9364
|
-
for (const
|
|
9365
|
-
const
|
|
9399
|
+
for (const S of h) {
|
|
9400
|
+
const y = t.data.curved ? u : (g.get(S.id) || []).join(`
|
|
9366
9401
|
`);
|
|
9367
9402
|
C.push(
|
|
9368
9403
|
this.generateTextChangeCommandsForRegion(
|
|
9369
|
-
|
|
9404
|
+
m.get(S.id) || 1,
|
|
9370
9405
|
t.data,
|
|
9371
|
-
|
|
9372
|
-
|
|
9406
|
+
S.id,
|
|
9407
|
+
y
|
|
9373
9408
|
)
|
|
9374
9409
|
);
|
|
9375
9410
|
}
|
|
@@ -9535,12 +9570,12 @@ class Ns extends Is {
|
|
|
9535
9570
|
const a = qi(Ps), 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 = () => {
|
|
9536
9571
|
const w = et("g");
|
|
9537
9572
|
w.classList.add("module-text-group");
|
|
9538
|
-
const
|
|
9539
|
-
w.appendChild(
|
|
9540
|
-
const
|
|
9541
|
-
|
|
9573
|
+
const S = et("defs");
|
|
9574
|
+
w.appendChild(S), S.appendChild(xs(0, 2, 2, "shadow"));
|
|
9575
|
+
const y = et("path");
|
|
9576
|
+
y.setAttribute("d", d), y.setAttribute("stroke", "black"), y.setAttribute("stroke-width", "3"), S.appendChild(y);
|
|
9542
9577
|
const E = et("g");
|
|
9543
|
-
E.classList.add("module-layer0"), w.appendChild(E), E.setAttribute("filter", "url(#shadow)"), E.innerHTML =
|
|
9578
|
+
E.classList.add("module-layer0"), w.appendChild(E), E.setAttribute("filter", "url(#shadow)"), E.innerHTML = y.outerHTML;
|
|
9544
9579
|
const b = et("g");
|
|
9545
9580
|
b.classList.add("module-layer1"), w.appendChild(b), b.setAttribute("stroke-width", "3"), b.setAttribute("stroke", "rgb(45,41,38)"), b.setAttribute("fill", "rgb(45,41,38)"), b.setAttribute("transform", "translate(0.5,0)"), b.innerHTML = o;
|
|
9546
9581
|
const I = et("g");
|
|
@@ -9551,15 +9586,15 @@ class Ns extends Is {
|
|
|
9551
9586
|
u.classList.add("module-root");
|
|
9552
9587
|
const h = et("defs");
|
|
9553
9588
|
u.appendChild(h);
|
|
9554
|
-
const
|
|
9555
|
-
|
|
9556
|
-
const
|
|
9557
|
-
|
|
9589
|
+
const m = et("g");
|
|
9590
|
+
m.classList.add("module-bounds"), u.appendChild(m);
|
|
9591
|
+
const g = Ds(e.height, e.width);
|
|
9592
|
+
g.setAttribute("opacity", "0"), m.appendChild(g);
|
|
9558
9593
|
const p = et("g");
|
|
9559
9594
|
p.classList.add("module-text-enclosure"), u.appendChild(p);
|
|
9560
9595
|
const f = A();
|
|
9561
9596
|
p.appendChild(f);
|
|
9562
|
-
const C =
|
|
9597
|
+
const C = mr(d);
|
|
9563
9598
|
return ks(p, C, e.height, e.width, 0.35, 0.65), Fs(u.outerHTML);
|
|
9564
9599
|
}
|
|
9565
9600
|
}
|
|
@@ -9568,7 +9603,7 @@ async function qn(r) {
|
|
|
9568
9603
|
return new Ns();
|
|
9569
9604
|
throw new z(`Failed to resolve Module, Module ${r} not found`);
|
|
9570
9605
|
}
|
|
9571
|
-
const ne =
|
|
9606
|
+
const ne = v`
|
|
9572
9607
|
fragment GlobalPropertyStateAspectFields on GlobalPropertyStateAspect {
|
|
9573
9608
|
name
|
|
9574
9609
|
value
|
|
@@ -9590,7 +9625,7 @@ const ne = S`
|
|
|
9590
9625
|
}
|
|
9591
9626
|
}
|
|
9592
9627
|
}
|
|
9593
|
-
`, Qs =
|
|
9628
|
+
`, Qs = v`
|
|
9594
9629
|
${ne}
|
|
9595
9630
|
mutation CreateGlobalPropertyState($bundleId: String!) {
|
|
9596
9631
|
globalPropertyStateCreate(bundleId: $bundleId) {
|
|
@@ -9600,7 +9635,7 @@ const ne = S`
|
|
|
9600
9635
|
}
|
|
9601
9636
|
}
|
|
9602
9637
|
}
|
|
9603
|
-
`, Rs =
|
|
9638
|
+
`, Rs = v`
|
|
9604
9639
|
${ne}
|
|
9605
9640
|
mutation UpdateGlobalPropertyState($id: String!, $aspects: [GlobalPropertyStateAspectInput]!) {
|
|
9606
9641
|
globalPropertyStateUpdate(id: $id, aspects: $aspects) {
|
|
@@ -9610,7 +9645,7 @@ const ne = S`
|
|
|
9610
9645
|
}
|
|
9611
9646
|
}
|
|
9612
9647
|
}
|
|
9613
|
-
`, Os =
|
|
9648
|
+
`, Os = v`
|
|
9614
9649
|
${ne}
|
|
9615
9650
|
query GetGlobalPropertyState($bundleId: String!) {
|
|
9616
9651
|
globalPropertyState(bundleId: $bundleId) {
|
|
@@ -9627,7 +9662,7 @@ const ne = S`
|
|
|
9627
9662
|
variables: {
|
|
9628
9663
|
bundleId: r
|
|
9629
9664
|
}
|
|
9630
|
-
})).data.globalPropertyState, $s =
|
|
9665
|
+
})).data.globalPropertyState, $s = v`
|
|
9631
9666
|
${Me}
|
|
9632
9667
|
fragment ProductFields on Product {
|
|
9633
9668
|
id
|
|
@@ -9672,7 +9707,7 @@ const ne = S`
|
|
|
9672
9707
|
name
|
|
9673
9708
|
}
|
|
9674
9709
|
}
|
|
9675
|
-
`, Ba =
|
|
9710
|
+
`, Ba = v`
|
|
9676
9711
|
${$s}
|
|
9677
9712
|
fragment ProductCollectionProductFields on ProductCollectionProduct {
|
|
9678
9713
|
id
|
|
@@ -9682,7 +9717,7 @@ const ne = S`
|
|
|
9682
9717
|
...ProductFields
|
|
9683
9718
|
}
|
|
9684
9719
|
}
|
|
9685
|
-
`, re = (r) =>
|
|
9720
|
+
`, re = (r) => v`
|
|
9686
9721
|
${r ? Ba : ""}
|
|
9687
9722
|
fragment ProductCollectionFields on ProductCollection {
|
|
9688
9723
|
id
|
|
@@ -9740,7 +9775,7 @@ const ne = S`
|
|
|
9740
9775
|
}
|
|
9741
9776
|
}
|
|
9742
9777
|
}
|
|
9743
|
-
`, Us = (r) =>
|
|
9778
|
+
`, Us = (r) => v`
|
|
9744
9779
|
${ne}
|
|
9745
9780
|
${re(r)}
|
|
9746
9781
|
query GetBundle($id: String!) {
|
|
@@ -9784,7 +9819,7 @@ const ne = S`
|
|
|
9784
9819
|
quoteId
|
|
9785
9820
|
}
|
|
9786
9821
|
}
|
|
9787
|
-
`, qa =
|
|
9822
|
+
`, qa = v`
|
|
9788
9823
|
query GetBundleStakeholders($id: String!) {
|
|
9789
9824
|
bundles(ids: [$id]) {
|
|
9790
9825
|
id
|
|
@@ -9829,7 +9864,7 @@ const ne = S`
|
|
|
9829
9864
|
}
|
|
9830
9865
|
}
|
|
9831
9866
|
}
|
|
9832
|
-
`, Ls =
|
|
9867
|
+
`, Ls = v`
|
|
9833
9868
|
query GetBundlesForCustomer($id: String!) {
|
|
9834
9869
|
customers(ids: [$id]) {
|
|
9835
9870
|
bundleStakeholders {
|
|
@@ -9858,7 +9893,7 @@ const ne = S`
|
|
|
9858
9893
|
}
|
|
9859
9894
|
}
|
|
9860
9895
|
}
|
|
9861
|
-
`, Vs =
|
|
9896
|
+
`, Vs = v`
|
|
9862
9897
|
${Ba}
|
|
9863
9898
|
query GetProductCollectionProducts($id: String!, $productIds: [String!]) {
|
|
9864
9899
|
productCollections(ids: [$id], productIds: $productIds) {
|
|
@@ -9868,7 +9903,7 @@ const ne = S`
|
|
|
9868
9903
|
}
|
|
9869
9904
|
}
|
|
9870
9905
|
}
|
|
9871
|
-
`, zs =
|
|
9906
|
+
`, zs = v`
|
|
9872
9907
|
query GetProductCollectionForFilteredProducts(
|
|
9873
9908
|
$id: String!
|
|
9874
9909
|
$filters: ProductCollectionProductFilterInput
|
|
@@ -9891,7 +9926,7 @@ const ne = S`
|
|
|
9891
9926
|
}
|
|
9892
9927
|
}
|
|
9893
9928
|
}
|
|
9894
|
-
`, Gs =
|
|
9929
|
+
`, Gs = v`
|
|
9895
9930
|
${Ba}
|
|
9896
9931
|
query GetProductCollectionForProductsFeed(
|
|
9897
9932
|
$id: String!
|
|
@@ -9919,7 +9954,7 @@ const ne = S`
|
|
|
9919
9954
|
}
|
|
9920
9955
|
}
|
|
9921
9956
|
}
|
|
9922
|
-
`, Ws = (r) =>
|
|
9957
|
+
`, Ws = (r) => v`
|
|
9923
9958
|
${re(r)}
|
|
9924
9959
|
mutation CreateBundle(
|
|
9925
9960
|
$collectionId: String
|
|
@@ -9948,7 +9983,7 @@ const ne = S`
|
|
|
9948
9983
|
}
|
|
9949
9984
|
}
|
|
9950
9985
|
}
|
|
9951
|
-
`, js = (r) =>
|
|
9986
|
+
`, js = (r) => v`
|
|
9952
9987
|
${ne}
|
|
9953
9988
|
${re(r)}
|
|
9954
9989
|
mutation DuplicateBundle(
|
|
@@ -9990,7 +10025,7 @@ const ne = S`
|
|
|
9990
10025
|
}
|
|
9991
10026
|
}
|
|
9992
10027
|
}
|
|
9993
|
-
`, Hs =
|
|
10028
|
+
`, Hs = v`
|
|
9994
10029
|
mutation UpdateBundle(
|
|
9995
10030
|
$id: String!
|
|
9996
10031
|
$name: String
|
|
@@ -10010,19 +10045,19 @@ const ne = S`
|
|
|
10010
10045
|
id
|
|
10011
10046
|
}
|
|
10012
10047
|
}
|
|
10013
|
-
`, qs =
|
|
10048
|
+
`, qs = v`
|
|
10014
10049
|
mutation BundleAddTransaction($id: String!, $transactionId: String!) {
|
|
10015
10050
|
bundleAddTransaction(id: $id, transactionId: $transactionId) {
|
|
10016
10051
|
id
|
|
10017
10052
|
}
|
|
10018
10053
|
}
|
|
10019
|
-
`, Ys =
|
|
10054
|
+
`, Ys = v`
|
|
10020
10055
|
mutation BundleAddTransactions($id: String!, $transactionIds: [String!]!, $transactionOwnerIds: [String!]) {
|
|
10021
10056
|
bundleAddTransactions(id: $id, transactionIds: $transactionIds, transactionOwnerIds: $transactionOwnerIds) {
|
|
10022
10057
|
id
|
|
10023
10058
|
}
|
|
10024
10059
|
}
|
|
10025
|
-
`, Js =
|
|
10060
|
+
`, Js = v`
|
|
10026
10061
|
mutation BundleRemoveTransaction(
|
|
10027
10062
|
$id: String!
|
|
10028
10063
|
$transactionId: String!
|
|
@@ -10037,7 +10072,7 @@ const ne = S`
|
|
|
10037
10072
|
id
|
|
10038
10073
|
}
|
|
10039
10074
|
}
|
|
10040
|
-
`, Ks =
|
|
10075
|
+
`, Ks = v`
|
|
10041
10076
|
mutation BundleRemoveTransactions(
|
|
10042
10077
|
$id: String!
|
|
10043
10078
|
$transactionIds: [String!]!
|
|
@@ -10052,7 +10087,7 @@ const ne = S`
|
|
|
10052
10087
|
id
|
|
10053
10088
|
}
|
|
10054
10089
|
}
|
|
10055
|
-
`, _s =
|
|
10090
|
+
`, _s = v`
|
|
10056
10091
|
mutation BundleAddStakeholder($id: String!, $details: CustomerDetailsInput!, $type: String!) {
|
|
10057
10092
|
bundleAddStakeholder(id: $id, details: $details, type: $type) {
|
|
10058
10093
|
id
|
|
@@ -10072,13 +10107,13 @@ const ne = S`
|
|
|
10072
10107
|
}
|
|
10073
10108
|
}
|
|
10074
10109
|
}
|
|
10075
|
-
`, Xs =
|
|
10110
|
+
`, Xs = v`
|
|
10076
10111
|
mutation BundleAddStakeholder($id: String!, $emailAddress: String!) {
|
|
10077
10112
|
bundleRemoveStakeholder(id: $id, emailAddress: $emailAddress) {
|
|
10078
10113
|
id
|
|
10079
10114
|
}
|
|
10080
10115
|
}
|
|
10081
|
-
`, Zs =
|
|
10116
|
+
`, Zs = v`
|
|
10082
10117
|
mutation BundleUpdateStakeholders($id: String!, $input: [BundleStakeholderInput!]!) {
|
|
10083
10118
|
bundleUpdateStakeholders(id: $id, input: $input) {
|
|
10084
10119
|
id
|
|
@@ -10098,13 +10133,13 @@ const ne = S`
|
|
|
10098
10133
|
}
|
|
10099
10134
|
}
|
|
10100
10135
|
}
|
|
10101
|
-
`, to =
|
|
10136
|
+
`, to = v`
|
|
10102
10137
|
mutation BundleUpdateTransactionOrder($id: String!, $transactionIds: [String!]!) {
|
|
10103
10138
|
bundleUpdateTransactionOrder(id: $id, transactionIds: $transactionIds) {
|
|
10104
10139
|
id
|
|
10105
10140
|
}
|
|
10106
10141
|
}
|
|
10107
|
-
`, eo = (r) =>
|
|
10142
|
+
`, eo = (r) => v`
|
|
10108
10143
|
${re(r)}
|
|
10109
10144
|
mutation BundleAssignProductCollection($id: String!, $productCollectionId: String!) {
|
|
10110
10145
|
bundleAssignProductCollection(id: $id, collectionId: $productCollectionId) {
|
|
@@ -10114,13 +10149,13 @@ const ne = S`
|
|
|
10114
10149
|
}
|
|
10115
10150
|
}
|
|
10116
10151
|
}
|
|
10117
|
-
`, ao =
|
|
10152
|
+
`, ao = v`
|
|
10118
10153
|
mutation AssignGlobalPropertyConfiguration($bundleId: String!, $globalPropertyConfigurationId: String!) {
|
|
10119
10154
|
bundleUpdate(id: $bundleId, globalPropertyConfigurationId: $globalPropertyConfigurationId) {
|
|
10120
10155
|
id
|
|
10121
10156
|
}
|
|
10122
10157
|
}
|
|
10123
|
-
`, no = (r) =>
|
|
10158
|
+
`, no = (r) => v`
|
|
10124
10159
|
query CustomerBundlesFeed($id: String!, $limit: Int!, $offset: Int!, $template: Boolean, $templateStatus: BundleTemplateStatus, $ordered: Boolean) {
|
|
10125
10160
|
customerBundlesFeed(id: $id, limit: $limit, offset: $offset, template: $template, templateStatus: $templateStatus, ordered: $ordered) {
|
|
10126
10161
|
items {
|
|
@@ -10154,27 +10189,27 @@ const ne = S`
|
|
|
10154
10189
|
total
|
|
10155
10190
|
}
|
|
10156
10191
|
}
|
|
10157
|
-
`, ro =
|
|
10192
|
+
`, ro = v`
|
|
10158
10193
|
mutation FinalizeUpdateBundle($bundleId: String!) {
|
|
10159
10194
|
bundleFinalizeUpdate(bundleId: $bundleId)
|
|
10160
10195
|
}
|
|
10161
|
-
`, io =
|
|
10196
|
+
`, io = v`
|
|
10162
10197
|
mutation ApproveBundle($id: String!, $note: String, $stakeholderId: String) {
|
|
10163
10198
|
bundleApprove(id: $id, note: $note, stakeholderId: $stakeholderId)
|
|
10164
10199
|
}
|
|
10165
|
-
`, so =
|
|
10200
|
+
`, so = v`
|
|
10166
10201
|
mutation RejectBundle($id: String!, $note: String, $stakeholderId: String) {
|
|
10167
10202
|
bundleReject(id: $id, note: $note, stakeholderId: $stakeholderId)
|
|
10168
10203
|
}
|
|
10169
|
-
`, oo =
|
|
10204
|
+
`, oo = v`
|
|
10170
10205
|
mutation ApproveTransaction($id: String!, $note: String) {
|
|
10171
10206
|
transactionApprove(id: $id, note: $note)
|
|
10172
10207
|
}
|
|
10173
|
-
`, lo =
|
|
10208
|
+
`, lo = v`
|
|
10174
10209
|
mutation RejectTransaction($id: String!, $note: String) {
|
|
10175
10210
|
transactionReject(id: $id, note: $note)
|
|
10176
10211
|
}
|
|
10177
|
-
`, co =
|
|
10212
|
+
`, co = v`
|
|
10178
10213
|
mutation CreateRecipient(
|
|
10179
10214
|
$firstName: String
|
|
10180
10215
|
$lastName: String
|
|
@@ -10202,7 +10237,7 @@ const ne = S`
|
|
|
10202
10237
|
id
|
|
10203
10238
|
}
|
|
10204
10239
|
}
|
|
10205
|
-
`, Ao =
|
|
10240
|
+
`, Ao = v`
|
|
10206
10241
|
mutation UpdateRecipient(
|
|
10207
10242
|
$id: String!
|
|
10208
10243
|
$firstName: String
|
|
@@ -10232,7 +10267,7 @@ const ne = S`
|
|
|
10232
10267
|
id
|
|
10233
10268
|
}
|
|
10234
10269
|
}
|
|
10235
|
-
`, uo =
|
|
10270
|
+
`, uo = v`
|
|
10236
10271
|
mutation AtttachRecipient($id: String!, $recipientId: String!) {
|
|
10237
10272
|
transactionAttachRecipient(id: $id, recipientId: $recipientId) {
|
|
10238
10273
|
id
|
|
@@ -10253,23 +10288,23 @@ class Ya extends Dn {
|
|
|
10253
10288
|
});
|
|
10254
10289
|
}
|
|
10255
10290
|
}
|
|
10256
|
-
class
|
|
10257
|
-
constructor(t, e, a, n, i, s, o, l, c, d, A, u, h,
|
|
10291
|
+
class mo {
|
|
10292
|
+
constructor(t, e, a, n, i, s, o, l, c, d, A, u, h, m = !1, g, p = !1, f = !1, C = !1) {
|
|
10258
10293
|
var w;
|
|
10259
10294
|
this.workflowStatePromiseQueue = new xn(1), this.initialized = !1, this.readOnly = !1, this.isReloadedTransaction = !1, this.singleVariantsRenderable = !1, this.stepTags = {}, this.renderLayouts = () => {
|
|
10260
10295
|
var E;
|
|
10261
10296
|
if (!this.previewService)
|
|
10262
10297
|
return;
|
|
10263
|
-
const
|
|
10264
|
-
if (
|
|
10265
|
-
for (const [, b] of
|
|
10266
|
-
b.render(
|
|
10267
|
-
}, this.experience = t, this.client = e, this.updateTransaction = o, this.graphQlClient = l, this.commandContext = s, this.reloadedState = h, this.transaction = c, this.readOnly =
|
|
10268
|
-
this.stepTags[
|
|
10298
|
+
const S = this.getCommandContext().getAllLayouts(), y = (E = this.getLayoutPreviewService()) == null ? void 0 : E.getAll();
|
|
10299
|
+
if (y)
|
|
10300
|
+
for (const [, b] of y)
|
|
10301
|
+
b.render(S);
|
|
10302
|
+
}, this.experience = t, this.client = e, this.updateTransaction = o, this.graphQlClient = l, this.commandContext = s, this.reloadedState = h, this.transaction = c, this.readOnly = m, this.singleVariantsRenderable = f, this.confirmedDesign = !1, this.editedSteps = {}, this.informationResults = [], this.mandatorySteps = {}, this.pendingUpdates = [], this.selectionCost = 0, this.workflow = a, this.stepSpecificServices = {}, this.profanityFilter = n, this.pollers = [], this.allScenes = [], this.layouts = i, this.product = d, this.previewService = A, this.modelContainer = g, this.stepElements = {}, this.stepInitialised = {}, this.stepMetadata = {}, this.stepSelections = {}, this.storage = {}, this.validationErrors = { steps: /* @__PURE__ */ new Map() }, this.confirmCallbacks = [], this.editedCallbacks = [], this.elementsCallbacks = [], this.informationResultCallbacks = [], this.initCallbacks = [], this.mandatoryCallbacks = [], this.makingAdjustmentsCallback = [], this.metadataCallbacks = [], this.selectionCallbacks = [], this.stepSpecificStorageCallbacks = {}, this.storageCallbacks = [], this.validationCallbacks = [], this.recipientCallbacks = [], this.currentAdjustingStepId = "", this.renderableContextService = u, (w = this.renderableContextService) == null || w.setWorkflowManager(this), this.isReloadedTransaction = p, this.workflow.steps.forEach((S) => {
|
|
10303
|
+
this.stepTags[S.stepName] = S.tags ?? [];
|
|
10269
10304
|
}), C && (this.workflowStatePromiseQueue.enabled = !1), this.initializationPromise = this.initializeDefaultWorkflowState(a), this.initializationPromise.then(() => {
|
|
10270
10305
|
this.initialized = !0;
|
|
10271
|
-
}), this.initializationPromise.catch((
|
|
10272
|
-
throw console.error(
|
|
10306
|
+
}), this.initializationPromise.catch((S) => {
|
|
10307
|
+
throw console.error(S), this.initialized = !1, new Error("Workflow initialization failed due to an error. See console.");
|
|
10273
10308
|
}), this.initializationPromise.finally(
|
|
10274
10309
|
() => this.getCommandContext().registerStateCallback(() => {
|
|
10275
10310
|
this.updateStateWithServer(), this.renderLayouts();
|
|
@@ -10280,7 +10315,7 @@ class go {
|
|
|
10280
10315
|
return { recipient: this.transaction.recipient };
|
|
10281
10316
|
}
|
|
10282
10317
|
async updateRecipient(t, e, a, n, i, s, o, l, c, d) {
|
|
10283
|
-
var A, u, h,
|
|
10318
|
+
var A, u, h, m, g;
|
|
10284
10319
|
if ((A = this.transaction.recipient) != null && A.id)
|
|
10285
10320
|
this.transaction.recipient = {
|
|
10286
10321
|
id: this.transaction.recipient.id,
|
|
@@ -10348,7 +10383,7 @@ class go {
|
|
|
10348
10383
|
fetchPolicy: "no-cache",
|
|
10349
10384
|
variables: {
|
|
10350
10385
|
id: this.transaction.id,
|
|
10351
|
-
recipientId: (
|
|
10386
|
+
recipientId: (g = (m = p.data) == null ? void 0 : m.recipientCreate) == null ? void 0 : g.id
|
|
10352
10387
|
},
|
|
10353
10388
|
context: {
|
|
10354
10389
|
transactionOwnerId: this.transaction.transactionOwnerId
|
|
@@ -10610,12 +10645,12 @@ class go {
|
|
|
10610
10645
|
console.error(`Failed to read material from variant: ${l.id} for step: ${s.stepName}`);
|
|
10611
10646
|
return;
|
|
10612
10647
|
}
|
|
10613
|
-
s.data.targetMaterials.forEach((
|
|
10648
|
+
s.data.targetMaterials.forEach((m) => {
|
|
10614
10649
|
if (!this.modelContainer)
|
|
10615
10650
|
throw new z(
|
|
10616
10651
|
"We should always have a model container when injecting a preview!"
|
|
10617
10652
|
);
|
|
10618
|
-
this.modelContainer.applyMaterialVariant(
|
|
10653
|
+
this.modelContainer.applyMaterialVariant(m, s.option.id, u);
|
|
10619
10654
|
});
|
|
10620
10655
|
}
|
|
10621
10656
|
}), await a.getInitializationPromise(), this.renderLayouts();
|
|
@@ -10825,7 +10860,7 @@ class go {
|
|
|
10825
10860
|
), this.stepElements = {}, this.stepInitialised = {}, this.stepMetadata = {}, this.stepSelections = {}, this.storage = {}, await this.ensureStepsAreLoaded();
|
|
10826
10861
|
}
|
|
10827
10862
|
async setSelectionsAndElements(t, e, a, n) {
|
|
10828
|
-
var
|
|
10863
|
+
var y;
|
|
10829
10864
|
console.log(`setting elements for step ${t}`), console.trace();
|
|
10830
10865
|
const i = this.stepSelections;
|
|
10831
10866
|
this.stepSelections = {
|
|
@@ -10840,23 +10875,23 @@ class go {
|
|
|
10840
10875
|
c.forEach((E) => {
|
|
10841
10876
|
yt(E, this.stepSelections) || (this.stepInitialised[E.stepName] = !1);
|
|
10842
10877
|
});
|
|
10843
|
-
const u = this.getInvalidCanvasRegions(), { stepElements: h, commands:
|
|
10878
|
+
const u = this.getInvalidCanvasRegions(), { stepElements: h, commands: m } = await this.stepElementsForIntroducedSilentSteps(A, !1);
|
|
10844
10879
|
this.stepElements = {
|
|
10845
10880
|
...this.stepElements,
|
|
10846
10881
|
...h,
|
|
10847
10882
|
[t]: a
|
|
10848
10883
|
}, this.removeElements(u);
|
|
10849
|
-
const
|
|
10850
|
-
if ((
|
|
10851
|
-
const E = (
|
|
10884
|
+
const g = this.workflow.steps.find((E) => E.stepName === t);
|
|
10885
|
+
if ((g == null ? void 0 : g.type) === P.Frame) {
|
|
10886
|
+
const E = (y = this.getWorkflowExperience().getStepById(g.stepName)) == null ? void 0 : y.frameService;
|
|
10852
10887
|
E == null || E.setTargetElements(a.map((b) => b.id));
|
|
10853
10888
|
}
|
|
10854
|
-
const p = u.map((E) => new bt(E.id)), f = new Ga(this.constructSerializableWorkflow()), C = [...
|
|
10889
|
+
const p = u.map((E) => new bt(E.id)), f = new Ga(this.constructSerializableWorkflow()), C = [...m, ...p, f];
|
|
10855
10890
|
C.length > 0 && this.commandContext.apply(new $(C), !0), await this.ensureStepsAreLoaded(), this.onElementsChange();
|
|
10856
|
-
const w = this.getInvalidModelVariants(),
|
|
10857
|
-
if (
|
|
10891
|
+
const w = this.getInvalidModelVariants(), S = this.modelContainer;
|
|
10892
|
+
if (S) {
|
|
10858
10893
|
const E = w.map(
|
|
10859
|
-
(b) =>
|
|
10894
|
+
(b) => S.applyModelVariant(
|
|
10860
10895
|
b,
|
|
10861
10896
|
{
|
|
10862
10897
|
contextService: this.getLayoutPreviewService()
|
|
@@ -10888,7 +10923,7 @@ class go {
|
|
|
10888
10923
|
break;
|
|
10889
10924
|
case P.Illustration:
|
|
10890
10925
|
a.push(
|
|
10891
|
-
|
|
10926
|
+
ge.init(l, this, this.reloadedState)
|
|
10892
10927
|
);
|
|
10893
10928
|
break;
|
|
10894
10929
|
case P.Material:
|
|
@@ -11199,7 +11234,7 @@ const Yn = class la {
|
|
|
11199
11234
|
};
|
|
11200
11235
|
Yn.updateState = /* @__PURE__ */ new Map();
|
|
11201
11236
|
let it = Yn;
|
|
11202
|
-
class
|
|
11237
|
+
class go extends it {
|
|
11203
11238
|
constructor(t, e, a) {
|
|
11204
11239
|
super(t, e, a);
|
|
11205
11240
|
}
|
|
@@ -11210,7 +11245,7 @@ class mo extends it {
|
|
|
11210
11245
|
*/
|
|
11211
11246
|
async selectVariant(t) {
|
|
11212
11247
|
if (!this.getUpdateState() && this.getCurrentVariant() !== t)
|
|
11213
|
-
return
|
|
11248
|
+
return ge.selectVariant(
|
|
11214
11249
|
this.step,
|
|
11215
11250
|
t.getResource(),
|
|
11216
11251
|
this.manager.getRegionElements(this.step.stepName) || [],
|
|
@@ -11256,7 +11291,7 @@ class mo extends it {
|
|
|
11256
11291
|
const d = c.id.replace(/\W/g, "");
|
|
11257
11292
|
a ? n.set(d, { browserValue: e, pmsValue: a }) : n.set(d, e);
|
|
11258
11293
|
}
|
|
11259
|
-
}) : a ? n.set(t, { browserValue: e, pmsValue: a }) : n.set(t, e),
|
|
11294
|
+
}) : a ? n.set(t, { browserValue: e, pmsValue: a }) : n.set(t, e), ge.changeColors(
|
|
11260
11295
|
this.step,
|
|
11261
11296
|
this.manager.getRegionElements(this.step.stepName),
|
|
11262
11297
|
this.manager,
|
|
@@ -11268,7 +11303,7 @@ class mo extends it {
|
|
|
11268
11303
|
return this.step.data.colorOption;
|
|
11269
11304
|
}
|
|
11270
11305
|
getAvailableColors() {
|
|
11271
|
-
return this.step.data.colorPickerEnabled ?
|
|
11306
|
+
return this.step.data.colorPickerEnabled ? ge.availableColors(this.step, this.manager) : Promise.resolve([]);
|
|
11272
11307
|
}
|
|
11273
11308
|
isColorPickerEnabled() {
|
|
11274
11309
|
return this.step.data.colorPickerEnabled ?? !1;
|
|
@@ -11694,7 +11729,7 @@ class ce {
|
|
|
11694
11729
|
case P.Text:
|
|
11695
11730
|
return new So(t, e, t.getStepTags(e.stepName));
|
|
11696
11731
|
case P.Illustration:
|
|
11697
|
-
return new
|
|
11732
|
+
return new go(t, e, t.getStepTags(e.stepName));
|
|
11698
11733
|
case P.Picture:
|
|
11699
11734
|
return new Co(t, e, t.getStepTags(e.stepName));
|
|
11700
11735
|
case P.Shape:
|
|
@@ -11712,7 +11747,7 @@ class ce {
|
|
|
11712
11747
|
}
|
|
11713
11748
|
}
|
|
11714
11749
|
}
|
|
11715
|
-
const Jn =
|
|
11750
|
+
const Jn = v`
|
|
11716
11751
|
fragment CreateDesignTransaction on Transaction {
|
|
11717
11752
|
id
|
|
11718
11753
|
designName
|
|
@@ -11737,7 +11772,7 @@ const Jn = S`
|
|
|
11737
11772
|
externalProductVariantId
|
|
11738
11773
|
}
|
|
11739
11774
|
}
|
|
11740
|
-
`, Bo =
|
|
11775
|
+
`, Bo = v`
|
|
11741
11776
|
${Jn}
|
|
11742
11777
|
mutation CreateDesign(
|
|
11743
11778
|
$name: String!
|
|
@@ -11769,7 +11804,7 @@ const Jn = S`
|
|
|
11769
11804
|
}
|
|
11770
11805
|
}
|
|
11771
11806
|
}
|
|
11772
|
-
`, Io =
|
|
11807
|
+
`, Io = v`
|
|
11773
11808
|
${Jn}
|
|
11774
11809
|
mutation CreateDesigns($inputs: [DesignCreateInput]!) {
|
|
11775
11810
|
designCreateMany(inputs: $inputs) {
|
|
@@ -11909,10 +11944,10 @@ const Po = async (r, t) => {
|
|
|
11909
11944
|
}
|
|
11910
11945
|
return n;
|
|
11911
11946
|
}, Kn = (r, t, e, a, n, i, s, o) => {
|
|
11912
|
-
var
|
|
11947
|
+
var m, g;
|
|
11913
11948
|
const l = t.basePrice || 0, c = r.priceModifierTotal || 0, d = xo(a, e, void 0, i), u = (N.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(r.id), h = {
|
|
11914
|
-
additionalExternalProductId: (
|
|
11915
|
-
additionalExternalVariantId: (
|
|
11949
|
+
additionalExternalProductId: (m = r.integrationProduct) == null ? void 0 : m.additionalExternalProductId,
|
|
11950
|
+
additionalExternalVariantId: (g = r.integrationProduct) == null ? void 0 : g.additionalExternalVariantId,
|
|
11916
11951
|
baseCost: l,
|
|
11917
11952
|
designExternalVariants: r.designExternalVariants,
|
|
11918
11953
|
designProductId: r.externalDesignProductId,
|
|
@@ -11952,7 +11987,7 @@ const Po = async (r, t) => {
|
|
|
11952
11987
|
T.errors && console.log("Server Error:", tt.message);
|
|
11953
11988
|
}), null) : nt ?? null;
|
|
11954
11989
|
})() || (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"));
|
|
11955
|
-
const u = r.getPreviewService(), h = (I = t == null ? void 0 : t.finalizeStepConfig) == null ? void 0 : I.lookAtAnimation,
|
|
11990
|
+
const u = r.getPreviewService(), h = (I = t == null ? void 0 : t.finalizeStepConfig) == null ? void 0 : I.lookAtAnimation, m = u && t.showModelOnFinishStep && !!h, g = l && ca(l, t, !0), p = l && ca(l, t, !1), f = async (D) => {
|
|
11956
11991
|
const x = {};
|
|
11957
11992
|
let k = 0;
|
|
11958
11993
|
if (Object.keys(i).length > 0)
|
|
@@ -11980,13 +12015,13 @@ const Po = async (r, t) => {
|
|
|
11980
12015
|
return [x, k];
|
|
11981
12016
|
}, [C] = await f(!0), w = Object.fromEntries(
|
|
11982
12017
|
Object.keys(C).map((D) => [D, C[D].map((x) => x.id)])
|
|
11983
|
-
), [
|
|
11984
|
-
Object.keys(
|
|
12018
|
+
), [S] = await f(!1), y = Object.fromEntries(
|
|
12019
|
+
Object.keys(S).map((D) => [
|
|
11985
12020
|
D,
|
|
11986
|
-
|
|
12021
|
+
S[D].map((x) => x.id)
|
|
11987
12022
|
])
|
|
11988
12023
|
);
|
|
11989
|
-
let E = await o(
|
|
12024
|
+
let E = await o(m, n.id);
|
|
11990
12025
|
if (E) {
|
|
11991
12026
|
const D = await (await rt(E)).blob();
|
|
11992
12027
|
E = (await U.uploadAsset(
|
|
@@ -12006,7 +12041,7 @@ const Po = async (r, t) => {
|
|
|
12006
12041
|
})),
|
|
12007
12042
|
workflowId: t.id,
|
|
12008
12043
|
transactionId: n.id,
|
|
12009
|
-
useThreeDimPreview: !!
|
|
12044
|
+
useThreeDimPreview: !!m,
|
|
12010
12045
|
previewImage: E
|
|
12011
12046
|
};
|
|
12012
12047
|
if (p) {
|
|
@@ -12017,14 +12052,14 @@ const Po = async (r, t) => {
|
|
|
12017
12052
|
}
|
|
12018
12053
|
if (w) {
|
|
12019
12054
|
const x = [];
|
|
12020
|
-
for (const [k, T] of Object.entries(
|
|
12055
|
+
for (const [k, T] of Object.entries(y))
|
|
12021
12056
|
x.push({ key: k, ids: T });
|
|
12022
12057
|
D.selectedVariants = x;
|
|
12023
12058
|
}
|
|
12024
12059
|
return D;
|
|
12025
12060
|
})(),
|
|
12026
12061
|
cartSelectionsWithPrices: C,
|
|
12027
|
-
cartMetadata:
|
|
12062
|
+
cartMetadata: g
|
|
12028
12063
|
};
|
|
12029
12064
|
}, Fo = async (r, t, e, a, n, i, s, o, l, c, d) => {
|
|
12030
12065
|
var f, C;
|
|
@@ -12041,20 +12076,20 @@ const Po = async (r, t) => {
|
|
|
12041
12076
|
d
|
|
12042
12077
|
);
|
|
12043
12078
|
l("workflow.steps.finish.finalize.creatingDesign");
|
|
12044
|
-
const
|
|
12045
|
-
if (!(
|
|
12079
|
+
const m = await Po(A), g = (f = m == null ? void 0 : m.transaction) == null ? void 0 : f.previewImageLink;
|
|
12080
|
+
if (!(m != null && m.transaction))
|
|
12046
12081
|
throw new Error("Failed to create design");
|
|
12047
12082
|
l("workflow.steps.finish.finalize.updatingTransaction");
|
|
12048
|
-
const p =
|
|
12083
|
+
const p = m.transaction;
|
|
12049
12084
|
return Kn(
|
|
12050
12085
|
p,
|
|
12051
12086
|
n,
|
|
12052
12087
|
t,
|
|
12053
12088
|
u,
|
|
12054
|
-
|
|
12089
|
+
m == null ? void 0 : m.sku,
|
|
12055
12090
|
h,
|
|
12056
|
-
|
|
12057
|
-
(C =
|
|
12091
|
+
g,
|
|
12092
|
+
(C = m == null ? void 0 : m.processExecution) == null ? void 0 : C.id
|
|
12058
12093
|
);
|
|
12059
12094
|
}, ko = async (r, t, e) => {
|
|
12060
12095
|
t("workflow.steps.finish.finalize.buildingLayouts"), await Promise.all(
|
|
@@ -12173,7 +12208,7 @@ class Mo {
|
|
|
12173
12208
|
throw new z("Unexpected storage method requested");
|
|
12174
12209
|
}
|
|
12175
12210
|
}
|
|
12176
|
-
const qe = new Mo(), To =
|
|
12211
|
+
const qe = new Mo(), To = v`
|
|
12177
12212
|
mutation AddTransactionStakeholder($id: String!, $type: String!, $details: CustomerDetailsInput!) {
|
|
12178
12213
|
transactionAddStakeholder(id: $id, details: $details, type: $type) {
|
|
12179
12214
|
id
|
|
@@ -12187,7 +12222,7 @@ const qe = new Mo(), To = S`
|
|
|
12187
12222
|
}
|
|
12188
12223
|
}
|
|
12189
12224
|
}
|
|
12190
|
-
`, No =
|
|
12225
|
+
`, No = v`
|
|
12191
12226
|
mutation AddAddressToTransaction(
|
|
12192
12227
|
$transactionId: String!
|
|
12193
12228
|
$streetAddress: String
|
|
@@ -12209,7 +12244,7 @@ const qe = new Mo(), To = S`
|
|
|
12209
12244
|
id
|
|
12210
12245
|
}
|
|
12211
12246
|
}
|
|
12212
|
-
`, Qo =
|
|
12247
|
+
`, Qo = v`
|
|
12213
12248
|
mutation AddOrganizationToTransaction($transactionId: String!, $organizationName: String!) {
|
|
12214
12249
|
organizationAttachToTransaction(transactionId: $transactionId, organizationName: $organizationName) {
|
|
12215
12250
|
id
|
|
@@ -12239,7 +12274,7 @@ class Oo {
|
|
|
12239
12274
|
throw new Error("No Workflow ID provided.");
|
|
12240
12275
|
this.client = t;
|
|
12241
12276
|
const a = e.layouts;
|
|
12242
|
-
this.commandContext = new rs(), this.commandContext.initialize(a, e.reloadedState), this.isReadOnly = e.transaction.isOrdered || !!e.readOnly, this.graphQlClient = e.graphQlClient, this.workflowManager = new
|
|
12277
|
+
this.commandContext = new rs(), this.commandContext.initialize(a, e.reloadedState), this.isReadOnly = e.transaction.isOrdered || !!e.readOnly, this.graphQlClient = e.graphQlClient, this.workflowManager = new mo(
|
|
12243
12278
|
this,
|
|
12244
12279
|
t,
|
|
12245
12280
|
e.workflow,
|
|
@@ -12329,9 +12364,9 @@ class Oo {
|
|
|
12329
12364
|
}
|
|
12330
12365
|
let i = 2048;
|
|
12331
12366
|
e && e <= 2048 && (i = e);
|
|
12332
|
-
const s =
|
|
12333
|
-
var
|
|
12334
|
-
return ((
|
|
12367
|
+
const s = gt(i, i), o = this.commandContext.getAllLayouts(), l = a.defaultPreviewPanelIndex || 0, c = a.panels[l], d = o.find((S) => {
|
|
12368
|
+
var y;
|
|
12369
|
+
return ((y = S.layoutState) == null ? void 0 : y.layout.panelId) === (c == null ? void 0 : c.name);
|
|
12335
12370
|
}) || o[0], A = d.layoutState.layout.previewRegion ? {
|
|
12336
12371
|
x: d.layoutState.layout.previewRegion.left,
|
|
12337
12372
|
y: d.layoutState.layout.previewRegion.top,
|
|
@@ -12345,19 +12380,19 @@ class Oo {
|
|
|
12345
12380
|
}, u = this.commandContext.getLayoutById(d.layoutState.layout.id), h = s.getContext("2d");
|
|
12346
12381
|
if (!h)
|
|
12347
12382
|
throw new De("Failed to obtain 2D context for preview image creation");
|
|
12348
|
-
const
|
|
12383
|
+
const m = Sa(u.layoutState.layout, u.layoutState.elements, {
|
|
12349
12384
|
renderingConfiguration: {
|
|
12350
12385
|
purpose: Ht.Print,
|
|
12351
12386
|
region: { left: A.x, top: A.y, width: A.width, height: A.height },
|
|
12352
12387
|
templatingContext: this.workflowManager.getTemplatingContext()
|
|
12353
12388
|
}
|
|
12354
|
-
}),
|
|
12355
|
-
await (await Aa.from(h,
|
|
12389
|
+
}), g = un(m);
|
|
12390
|
+
await (await Aa.from(h, g, {
|
|
12356
12391
|
anonymousCrossOrigin: !0,
|
|
12357
12392
|
ignoreDimensions: !1,
|
|
12358
|
-
createCanvas:
|
|
12393
|
+
createCanvas: gt,
|
|
12359
12394
|
createImage: Zt,
|
|
12360
|
-
DOMParser:
|
|
12395
|
+
DOMParser: ga(),
|
|
12361
12396
|
fetch
|
|
12362
12397
|
})).render();
|
|
12363
12398
|
const f = await this.getCanvasObjectURLAsync(s);
|
|
@@ -12456,16 +12491,16 @@ class Oo {
|
|
|
12456
12491
|
const d = /* @__PURE__ */ new Set(), A = c.getRaw().globalPropertyAspectConfigurations;
|
|
12457
12492
|
A !== void 0 && (A.forEach((u) => d.add(JSON.stringify(u))), o.forEach((u) => {
|
|
12458
12493
|
const h = u.getRaw().globalPropertyAspectConfigurations;
|
|
12459
|
-
h !== void 0 && h.forEach((
|
|
12460
|
-
const
|
|
12461
|
-
if (p && (
|
|
12494
|
+
h !== void 0 && h.forEach((m) => {
|
|
12495
|
+
const g = l(m), p = d.has(JSON.stringify(m));
|
|
12496
|
+
if (p && (g == null ? void 0 : g.getType()) === "Option") {
|
|
12462
12497
|
const f = u.getCurrentVariant();
|
|
12463
12498
|
if (!f)
|
|
12464
12499
|
return;
|
|
12465
|
-
c.selectVariant(f), d.delete(JSON.stringify(
|
|
12466
|
-
} else if (p && (
|
|
12500
|
+
c.selectVariant(f), d.delete(JSON.stringify(m));
|
|
12501
|
+
} else if (p && (g == null ? void 0 : g.getType()) === "Text") {
|
|
12467
12502
|
const f = u.getText();
|
|
12468
|
-
c.setText(f), d.delete(JSON.stringify(
|
|
12503
|
+
c.setText(f), d.delete(JSON.stringify(m));
|
|
12469
12504
|
}
|
|
12470
12505
|
});
|
|
12471
12506
|
}));
|
|
@@ -12661,13 +12696,13 @@ const $o = [
|
|
|
12661
12696
|
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);
|
|
12662
12697
|
o.searchParams.append("video", Qa(JSON.stringify([{ href: i }]))), o.pathname = o.pathname + (o.pathname.slice(-1) === "/" ? "" : "/");
|
|
12663
12698
|
const l = o.toString(), d = `data:image/svg+xml;base64,${Qa(await sn(l, { type: "svg" }))}`, A = (h) => {
|
|
12664
|
-
const
|
|
12665
|
-
if (!
|
|
12666
|
-
throw new
|
|
12667
|
-
const
|
|
12699
|
+
const m = r.find((p) => p.panelId === h.panelId);
|
|
12700
|
+
if (!m)
|
|
12701
|
+
throw new Y(h);
|
|
12702
|
+
const g = Q();
|
|
12668
12703
|
return new G(
|
|
12669
12704
|
{
|
|
12670
|
-
id:
|
|
12705
|
+
id: g,
|
|
12671
12706
|
src: d,
|
|
12672
12707
|
type: M.Image,
|
|
12673
12708
|
y: h.top,
|
|
@@ -12676,7 +12711,7 @@ const $o = [
|
|
|
12676
12711
|
height: h.height,
|
|
12677
12712
|
rotation: 0
|
|
12678
12713
|
},
|
|
12679
|
-
|
|
12714
|
+
m
|
|
12680
12715
|
);
|
|
12681
12716
|
}, u = e.data.regions;
|
|
12682
12717
|
try {
|
|
@@ -12690,11 +12725,11 @@ const $o = [
|
|
|
12690
12725
|
const o = is(n, a.option);
|
|
12691
12726
|
o && (t[a.stepName] = { selectedVariants: [o] });
|
|
12692
12727
|
const l = async (c) => {
|
|
12693
|
-
var
|
|
12694
|
-
const d = await Rn(c, (
|
|
12728
|
+
var g;
|
|
12729
|
+
const d = await Rn(c, (g = o == null ? void 0 : o.asset) == null ? void 0 : g.fileLink), A = await Ne(d), u = Q(), h = r.find((p) => p.panelId === c.panelId);
|
|
12695
12730
|
if (!h)
|
|
12696
|
-
throw new
|
|
12697
|
-
const
|
|
12731
|
+
throw new Y(c);
|
|
12732
|
+
const m = Ea(
|
|
12698
12733
|
s,
|
|
12699
12734
|
A,
|
|
12700
12735
|
{
|
|
@@ -12723,13 +12758,13 @@ const $o = [
|
|
|
12723
12758
|
pattern: {
|
|
12724
12759
|
id: `${u}-pattern`,
|
|
12725
12760
|
src: s.src,
|
|
12726
|
-
x:
|
|
12727
|
-
y:
|
|
12761
|
+
x: m.x,
|
|
12762
|
+
y: m.y,
|
|
12728
12763
|
width: s.width,
|
|
12729
12764
|
height: s.height,
|
|
12730
12765
|
rotation: 0,
|
|
12731
|
-
scaleX:
|
|
12732
|
-
scaleY:
|
|
12766
|
+
scaleX: m.zoom,
|
|
12767
|
+
scaleY: m.zoom,
|
|
12733
12768
|
svg: s.svg,
|
|
12734
12769
|
colors: s.colors
|
|
12735
12770
|
}
|
|
@@ -12743,11 +12778,11 @@ const $o = [
|
|
|
12743
12778
|
return console.error(o), [];
|
|
12744
12779
|
}
|
|
12745
12780
|
}, Vo = async (r, t, e, a) => {
|
|
12746
|
-
var
|
|
12781
|
+
var y, E;
|
|
12747
12782
|
const n = e.data, i = a.option;
|
|
12748
12783
|
if (!i)
|
|
12749
12784
|
return console.error(`No option for step ${a.stepName}.`), [];
|
|
12750
|
-
const s = ((
|
|
12785
|
+
const s = ((y = i.variants) == null ? void 0 : y.find((b) => b.id === n.illustrationVariantId)) || ae(i);
|
|
12751
12786
|
if (!s)
|
|
12752
12787
|
return console.error(`No variant with ID: ${n.illustrationVariantId}`), [];
|
|
12753
12788
|
if (!s.asset)
|
|
@@ -12756,41 +12791,41 @@ const $o = [
|
|
|
12756
12791
|
const o = (E = s.asset) == null ? void 0 : E.fileLink;
|
|
12757
12792
|
if (!o)
|
|
12758
12793
|
return console.error(`No asset link for variant with ID: ${n.illustrationVariantId}`), [];
|
|
12759
|
-
const l = await at(o, !0), c = /<svg.*?<\/svg>/s, d = l.match(c) || [], A = (d == null ? void 0 : d.length) > 0 ? d[0] : "",
|
|
12760
|
-
if (!
|
|
12794
|
+
const l = await at(o, !0), c = /<svg.*?<\/svg>/s, d = l.match(c) || [], A = (d == null ? void 0 : d.length) > 0 ? d[0] : "", m = dt().parseFromString(A, "image/svg+xml").firstElementChild;
|
|
12795
|
+
if (!m)
|
|
12761
12796
|
return console.error("Failed to read SVG."), [];
|
|
12762
|
-
pa(
|
|
12763
|
-
const
|
|
12764
|
-
kt(
|
|
12797
|
+
pa(m);
|
|
12798
|
+
const g = {};
|
|
12799
|
+
kt(m, (b) => {
|
|
12765
12800
|
$o.includes(b.tagName) && !b.attributes.getNamedItem("fill") && b.setAttribute("fill", "#000000");
|
|
12766
12801
|
const I = b.attributes.getNamedItem("fill");
|
|
12767
12802
|
if (I && I.value !== "none") {
|
|
12768
12803
|
const x = I.value, T = `spiff-fill-${x.replace(/\W/g, "")}`;
|
|
12769
|
-
b.classList.add(T),
|
|
12804
|
+
b.classList.add(T), g[T] = { browserValue: x };
|
|
12770
12805
|
}
|
|
12771
12806
|
const D = b.attributes.getNamedItem("stroke");
|
|
12772
12807
|
if (D && D.value !== "none") {
|
|
12773
12808
|
const x = D.value, T = `spiff-stroke-${x.replace(/\W/g, "")}`;
|
|
12774
|
-
b.classList.add(T),
|
|
12809
|
+
b.classList.add(T), g[T] = { browserValue: x };
|
|
12775
12810
|
}
|
|
12776
12811
|
});
|
|
12777
|
-
const f = Bt().serializeToString(
|
|
12812
|
+
const f = Bt().serializeToString(m), C = n.colors;
|
|
12778
12813
|
if (C) {
|
|
12779
|
-
for (const [b, I] of Object.entries(
|
|
12814
|
+
for (const [b, I] of Object.entries(g))
|
|
12780
12815
|
for (const D of Object.keys(C))
|
|
12781
12816
|
if (I.browserValue === D) {
|
|
12782
|
-
|
|
12817
|
+
g[b] = { browserValue: C[D] };
|
|
12783
12818
|
break;
|
|
12784
12819
|
}
|
|
12785
12820
|
}
|
|
12786
12821
|
const w = (b) => {
|
|
12787
12822
|
const I = r.find((x) => x.panelId === b.panelId);
|
|
12788
12823
|
if (!I)
|
|
12789
|
-
throw new
|
|
12824
|
+
throw new Y(b);
|
|
12790
12825
|
const D = Q();
|
|
12791
12826
|
return new G(
|
|
12792
12827
|
{
|
|
12793
|
-
colors:
|
|
12828
|
+
colors: g,
|
|
12794
12829
|
id: D,
|
|
12795
12830
|
svg: f,
|
|
12796
12831
|
type: M.Illustration,
|
|
@@ -12805,9 +12840,9 @@ const $o = [
|
|
|
12805
12840
|
},
|
|
12806
12841
|
I
|
|
12807
12842
|
);
|
|
12808
|
-
},
|
|
12843
|
+
}, S = a.data.regions;
|
|
12809
12844
|
try {
|
|
12810
|
-
return
|
|
12845
|
+
return S.map(w);
|
|
12811
12846
|
} catch (b) {
|
|
12812
12847
|
return console.error(b), [];
|
|
12813
12848
|
}
|
|
@@ -12815,7 +12850,7 @@ const $o = [
|
|
|
12815
12850
|
const a = await qn(e.data.module), n = t.data, i = (o, l) => {
|
|
12816
12851
|
const c = r.find((A) => A.panelId === l.panelId);
|
|
12817
12852
|
if (!c)
|
|
12818
|
-
throw new
|
|
12853
|
+
throw new Y(l);
|
|
12819
12854
|
const d = Q();
|
|
12820
12855
|
return new G(
|
|
12821
12856
|
{
|
|
@@ -12856,13 +12891,13 @@ const $o = [
|
|
|
12856
12891
|
if (!o)
|
|
12857
12892
|
return console.error(`No asset link for variant with ID: ${n.pictureVariantId}`), [];
|
|
12858
12893
|
const l = (u) => {
|
|
12859
|
-
const h = r.find((
|
|
12894
|
+
const h = r.find((g) => g.panelId === u.panelId);
|
|
12860
12895
|
if (!h)
|
|
12861
|
-
throw new
|
|
12862
|
-
const
|
|
12896
|
+
throw new Y(u);
|
|
12897
|
+
const m = Q();
|
|
12863
12898
|
return new G(
|
|
12864
12899
|
{
|
|
12865
|
-
id:
|
|
12900
|
+
id: m,
|
|
12866
12901
|
src: o,
|
|
12867
12902
|
type: M.Image,
|
|
12868
12903
|
y: u.top,
|
|
@@ -12895,7 +12930,7 @@ const $o = [
|
|
|
12895
12930
|
const o = (d) => {
|
|
12896
12931
|
const A = r.find((p) => p.panelId === d.panelId);
|
|
12897
12932
|
if (!A)
|
|
12898
|
-
throw new
|
|
12933
|
+
throw new Y(d);
|
|
12899
12934
|
const u = `
|
|
12900
12935
|
<svg
|
|
12901
12936
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -12916,11 +12951,11 @@ const $o = [
|
|
|
12916
12951
|
fill="${s == null ? void 0 : s.color}"
|
|
12917
12952
|
/>
|
|
12918
12953
|
</svg>
|
|
12919
|
-
`,
|
|
12954
|
+
`, m = { "spiff-fill-shape": { browserValue: s.color || "#000000" } }, g = Q();
|
|
12920
12955
|
return new G(
|
|
12921
12956
|
{
|
|
12922
|
-
colors:
|
|
12923
|
-
id:
|
|
12957
|
+
colors: m,
|
|
12958
|
+
id: g,
|
|
12924
12959
|
svg: u,
|
|
12925
12960
|
type: M.Illustration,
|
|
12926
12961
|
y: d.top,
|
|
@@ -12950,7 +12985,7 @@ const $o = [
|
|
|
12950
12985
|
l.forEach((c) => {
|
|
12951
12986
|
const d = r.find((u) => u.panelId === c.panelId);
|
|
12952
12987
|
if (!d)
|
|
12953
|
-
throw new
|
|
12988
|
+
throw new Y(c);
|
|
12954
12989
|
const A = {
|
|
12955
12990
|
id: Q(),
|
|
12956
12991
|
src: i,
|
|
@@ -12975,15 +13010,15 @@ const $o = [
|
|
|
12975
13010
|
}
|
|
12976
13011
|
else {
|
|
12977
13012
|
const c = await at(i, !0), d = (A) => {
|
|
12978
|
-
const u = /<svg.*?<\/svg>/s, h = A.match(u) || [],
|
|
13013
|
+
const u = /<svg.*?<\/svg>/s, h = A.match(u) || [], m = (h == null ? void 0 : h.length) > 0 ? h[0] : "", f = dt().parseFromString(m, "image/svg+xml").firstElementChild;
|
|
12979
13014
|
if (!f)
|
|
12980
13015
|
throw new xt("Failed to read SVG.");
|
|
12981
13016
|
return pa(f), Bt().serializeToString(f);
|
|
12982
13017
|
};
|
|
12983
13018
|
l.forEach((A) => {
|
|
12984
|
-
const u = r.find((
|
|
13019
|
+
const u = r.find((m) => m.panelId === A.panelId);
|
|
12985
13020
|
if (!u)
|
|
12986
|
-
throw new
|
|
13021
|
+
throw new Y(A);
|
|
12987
13022
|
const h = {
|
|
12988
13023
|
id: Q(),
|
|
12989
13024
|
src: i,
|
|
@@ -13013,7 +13048,7 @@ const $o = [
|
|
|
13013
13048
|
const p = a.option;
|
|
13014
13049
|
if (!p)
|
|
13015
13050
|
return;
|
|
13016
|
-
const f = ((w = p.variants) == null ? void 0 : w.find((
|
|
13051
|
+
const f = ((w = p.variants) == null ? void 0 : w.find((S) => S.id === i.fontVariantId)) || ae(p);
|
|
13017
13052
|
if (!f || !f.asset)
|
|
13018
13053
|
return;
|
|
13019
13054
|
t[a.stepName] = { selectedVariants: [f] };
|
|
@@ -13036,10 +13071,10 @@ const $o = [
|
|
|
13036
13071
|
const f = p.colorOption;
|
|
13037
13072
|
if (!f)
|
|
13038
13073
|
return;
|
|
13039
|
-
const C =
|
|
13074
|
+
const C = q.getDefaultVariant(f);
|
|
13040
13075
|
return C == null ? void 0 : C.color;
|
|
13041
|
-
},
|
|
13042
|
-
for (const p of
|
|
13076
|
+
}, m = i.color || await h(a.data), g = a.data.regions;
|
|
13077
|
+
for (const p of g) {
|
|
13043
13078
|
const f = r.find((w) => w.panelId === p.panelId);
|
|
13044
13079
|
if (!f)
|
|
13045
13080
|
continue;
|
|
@@ -13048,7 +13083,7 @@ const $o = [
|
|
|
13048
13083
|
id: Q(),
|
|
13049
13084
|
align: o(a.data),
|
|
13050
13085
|
curved: a.data.curved,
|
|
13051
|
-
fill: i.color ||
|
|
13086
|
+
fill: i.color || m || "#000000",
|
|
13052
13087
|
fontData: d,
|
|
13053
13088
|
fontSize: a.data.size || s,
|
|
13054
13089
|
height: p.height,
|
|
@@ -13065,7 +13100,7 @@ const $o = [
|
|
|
13065
13100
|
y: p.top
|
|
13066
13101
|
};
|
|
13067
13102
|
if (d) {
|
|
13068
|
-
const [w,
|
|
13103
|
+
const [w, S] = pe(
|
|
13069
13104
|
a.data.size || s,
|
|
13070
13105
|
d,
|
|
13071
13106
|
p,
|
|
@@ -13086,7 +13121,7 @@ const $o = [
|
|
|
13086
13121
|
{
|
|
13087
13122
|
...C,
|
|
13088
13123
|
fontSize: w,
|
|
13089
|
-
text: C.curved ? C.text : (
|
|
13124
|
+
text: C.curved ? C.text : (S || []).join(`
|
|
13090
13125
|
`)
|
|
13091
13126
|
},
|
|
13092
13127
|
f
|
|
@@ -13193,7 +13228,7 @@ class Jo {
|
|
|
13193
13228
|
}
|
|
13194
13229
|
const Ko = () => new Promise((r, t) => {
|
|
13195
13230
|
try {
|
|
13196
|
-
const a =
|
|
13231
|
+
const a = gt().getContext("webgl2");
|
|
13197
13232
|
r(!!a);
|
|
13198
13233
|
} catch {
|
|
13199
13234
|
r(!1);
|
|
@@ -13306,15 +13341,15 @@ class Zo extends Dn {
|
|
|
13306
13341
|
* a loose target but should be kept in mind when making changes.
|
|
13307
13342
|
*/
|
|
13308
13343
|
async execute() {
|
|
13309
|
-
var h,
|
|
13310
|
-
const t = this.layouts.find((
|
|
13344
|
+
var h, m;
|
|
13345
|
+
const t = this.layouts.find((g) => g.layoutState.layout.id === this.layoutId);
|
|
13311
13346
|
if (!t)
|
|
13312
13347
|
return;
|
|
13313
13348
|
const e = t.layoutState.elements || [], a = t.layoutState.layout.width, n = t.layoutState.layout.height, i = a === 1 || n === 1 ? { width: 1, height: 1 } : this.getDynamicTextureResolution(), s = i.width, o = i.height;
|
|
13314
13349
|
let l, c;
|
|
13315
13350
|
if (this.nonPOTSupport) {
|
|
13316
|
-
const
|
|
13317
|
-
a / n <
|
|
13351
|
+
const g = s / o;
|
|
13352
|
+
a / n < g ? (l = s, c = n * (s / a)) : (l = a * (o / n), c = o);
|
|
13318
13353
|
const f = this.resizeFit({ width: l, height: c });
|
|
13319
13354
|
l = f.width, c = f.height;
|
|
13320
13355
|
} else
|
|
@@ -13322,7 +13357,7 @@ class Zo extends Dn {
|
|
|
13322
13357
|
const d = Sa(t.layoutState.layout, e, {
|
|
13323
13358
|
renderingConfiguration: {
|
|
13324
13359
|
purpose: Ht.ThreeD,
|
|
13325
|
-
templatingContext: (
|
|
13360
|
+
templatingContext: (m = (h = this.getWorkflowManager) == null ? void 0 : h.call(this)) == null ? void 0 : m.getTemplatingContext()
|
|
13326
13361
|
}
|
|
13327
13362
|
}), A = un(d), u = await Aa.from(this.ctx, A, {
|
|
13328
13363
|
anonymousCrossOrigin: !0,
|
|
@@ -13331,9 +13366,9 @@ class Zo extends Dn {
|
|
|
13331
13366
|
ignoreClear: !0,
|
|
13332
13367
|
ignoreMouse: !0,
|
|
13333
13368
|
enableRedraw: !1,
|
|
13334
|
-
createCanvas:
|
|
13369
|
+
createCanvas: gt,
|
|
13335
13370
|
createImage: Zt,
|
|
13336
|
-
DOMParser:
|
|
13371
|
+
DOMParser: ga(),
|
|
13337
13372
|
fetch
|
|
13338
13373
|
});
|
|
13339
13374
|
u.resize(l, c), await u.render(), this.onRender();
|
|
@@ -13409,10 +13444,10 @@ class tl {
|
|
|
13409
13444
|
return new Ja(
|
|
13410
13445
|
this.bundle,
|
|
13411
13446
|
t,
|
|
13412
|
-
t.entityId ? await
|
|
13447
|
+
t.entityId ? await q.getOption(t.entityId) : void 0
|
|
13413
13448
|
);
|
|
13414
13449
|
case X.Option: {
|
|
13415
|
-
const e = t.entityId ? await
|
|
13450
|
+
const e = t.entityId ? await q.getOption(t.entityId) : void 0;
|
|
13416
13451
|
return (e == null ? void 0 : e.type) === "Color" ? new Ja(this.bundle, t, e) : new Xn(this.bundle, t, e);
|
|
13417
13452
|
}
|
|
13418
13453
|
case X.Text:
|
|
@@ -13483,7 +13518,7 @@ class el extends Ia {
|
|
|
13483
13518
|
}
|
|
13484
13519
|
async initialize() {
|
|
13485
13520
|
var t, e, a, n;
|
|
13486
|
-
return (e = (t = this.property.data) == null ? void 0 : t.fileUpload) != null && e.colorOptionId && (this.colorOption = await
|
|
13521
|
+
return (e = (t = this.property.data) == null ? void 0 : t.fileUpload) != null && e.colorOptionId && (this.colorOption = await q.getOption((n = (a = this.property.data) == null ? void 0 : a.fileUpload) == null ? void 0 : n.colorOptionId)), await this.loadImageData(), this;
|
|
13487
13522
|
}
|
|
13488
13523
|
async loadImageData() {
|
|
13489
13524
|
var e;
|
|
@@ -14158,7 +14193,7 @@ class sl {
|
|
|
14158
14193
|
};
|
|
14159
14194
|
}
|
|
14160
14195
|
}
|
|
14161
|
-
const ol =
|
|
14196
|
+
const ol = v`
|
|
14162
14197
|
query GetManyMetafields($entityIds: [String!]!) {
|
|
14163
14198
|
metafieldsMany(entityIds: $entityIds) {
|
|
14164
14199
|
id
|
|
@@ -14366,15 +14401,15 @@ class Zn {
|
|
|
14366
14401
|
let A = !1;
|
|
14367
14402
|
const u = c.subscribe({
|
|
14368
14403
|
next(h) {
|
|
14369
|
-
var
|
|
14370
|
-
if (A || h.partial && (!h.data.productCollections || h.data.productCollections.length === 0 || !((
|
|
14404
|
+
var g, p, f, C, w, S;
|
|
14405
|
+
if (A || h.partial && (!h.data.productCollections || h.data.productCollections.length === 0 || !((g = h.data.productCollections[0].productCollectionProductsFeed) != null && g.items) || ((p = h.data.productCollections[0].productCollectionProductsFeed) == null ? void 0 : p.items.length) === 0))
|
|
14371
14406
|
return;
|
|
14372
14407
|
o.abort(), A = !0, u.unsubscribe();
|
|
14373
|
-
const
|
|
14408
|
+
const m = ((C = (f = h.data.productCollections) == null ? void 0 : f[0].productCollectionProductsFeed) == null ? void 0 : C.items.filter((y) => !!y.product).map((y) => new de(St(y)))) || [];
|
|
14374
14409
|
d({
|
|
14375
|
-
items:
|
|
14410
|
+
items: m,
|
|
14376
14411
|
// Clone items because it could be cached data (immutable)
|
|
14377
|
-
total: ((
|
|
14412
|
+
total: ((S = (w = h.data.productCollections) == null ? void 0 : w[0].productCollectionProductsFeed) == null ? void 0 : S.total) ?? 0
|
|
14378
14413
|
});
|
|
14379
14414
|
},
|
|
14380
14415
|
error() {
|
|
@@ -14604,7 +14639,7 @@ class ul {
|
|
|
14604
14639
|
};
|
|
14605
14640
|
}
|
|
14606
14641
|
}
|
|
14607
|
-
const hl =
|
|
14642
|
+
const hl = v`
|
|
14608
14643
|
${re(!1)}
|
|
14609
14644
|
query GetProductCollections($ids: [String!]!) {
|
|
14610
14645
|
productCollections(ids: $ids) {
|
|
@@ -14621,7 +14656,7 @@ const hl = S`
|
|
|
14621
14656
|
}
|
|
14622
14657
|
})).data) == null ? void 0 : e.productCollections) == null ? void 0 : a.map((n) => new Zn(n));
|
|
14623
14658
|
};
|
|
14624
|
-
class
|
|
14659
|
+
class ml {
|
|
14625
14660
|
constructor() {
|
|
14626
14661
|
this.listeners = {};
|
|
14627
14662
|
}
|
|
@@ -14648,7 +14683,7 @@ class gl {
|
|
|
14648
14683
|
delete this.listeners[e];
|
|
14649
14684
|
}
|
|
14650
14685
|
}
|
|
14651
|
-
const
|
|
14686
|
+
const gl = v`
|
|
14652
14687
|
mutation AddAddressToBundle(
|
|
14653
14688
|
$bundleId: String!
|
|
14654
14689
|
$streetAddress: String
|
|
@@ -14670,13 +14705,13 @@ const ml = S`
|
|
|
14670
14705
|
id
|
|
14671
14706
|
}
|
|
14672
14707
|
}
|
|
14673
|
-
`, pl =
|
|
14708
|
+
`, pl = v`
|
|
14674
14709
|
mutation AddOrganizationToBundle($bundleId: String!, $organizationName: String!) {
|
|
14675
14710
|
organizationAttachToBundle(bundleId: $bundleId, organizationName: $organizationName) {
|
|
14676
14711
|
id
|
|
14677
14712
|
}
|
|
14678
14713
|
}
|
|
14679
|
-
`, fl =
|
|
14714
|
+
`, fl = v`
|
|
14680
14715
|
mutation GenerateQuoteId($id: String!) {
|
|
14681
14716
|
bundleGenerateQuoteId(id: $id) {
|
|
14682
14717
|
id
|
|
@@ -14687,7 +14722,7 @@ const ml = S`
|
|
|
14687
14722
|
class Ye {
|
|
14688
14723
|
constructor(t, e, a, n, i, s) {
|
|
14689
14724
|
var c, d, A;
|
|
14690
|
-
this.workflowExperiences = [], this.eventEmitter = new
|
|
14725
|
+
this.workflowExperiences = [], this.eventEmitter = new ml(), this.client = t, this.id = e.id, this.name = e.name || "", this.template = e.template || !1, this.quoteId = e.quoteId, this.shareActions = e.bundleShareActions, this.workflowViewerLink = e.workflowViewerLink, this.workflowViewerAmendLink = e.workflowViewerAmendLink, this.ownerId = i, this.metadata = new Map(((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 sl(e.bundleStateData);
|
|
14691
14726
|
const o = (d = this.productCollection) == null ? void 0 : d.globalPropertyConfiguration;
|
|
14692
14727
|
this.globalConfigurationPropertyId = o == null ? void 0 : o.id, this.globalPropertyStateManager = new il(
|
|
14693
14728
|
this.id,
|
|
@@ -14701,8 +14736,8 @@ class Ye {
|
|
|
14701
14736
|
u([]);
|
|
14702
14737
|
return;
|
|
14703
14738
|
}
|
|
14704
|
-
console.log("Setting default global variants."), this.globalPropertyHandleService.getHandles().then((
|
|
14705
|
-
const
|
|
14739
|
+
console.log("Setting default global variants."), this.globalPropertyHandleService.getHandles().then((m) => {
|
|
14740
|
+
const g = m.map((p) => {
|
|
14706
14741
|
if (p.getType() === X.ColorOption || p.getType() === X.Option) {
|
|
14707
14742
|
const f = p;
|
|
14708
14743
|
if (this.globalPropertyStateManager.getGlobalPropertyState())
|
|
@@ -14710,7 +14745,7 @@ class Ye {
|
|
|
14710
14745
|
console.log("Attempted to set global default variant before state was initialized.");
|
|
14711
14746
|
}
|
|
14712
14747
|
});
|
|
14713
|
-
Promise.all(
|
|
14748
|
+
Promise.all(g).then(u).catch(h);
|
|
14714
14749
|
});
|
|
14715
14750
|
});
|
|
14716
14751
|
this.initializationPromise = Promise.all([
|
|
@@ -14741,7 +14776,7 @@ class Ye {
|
|
|
14741
14776
|
}
|
|
14742
14777
|
async attachAddress(t, e, a, n, i, s) {
|
|
14743
14778
|
await B.getShadowGraphqlClient().mutate({
|
|
14744
|
-
mutation:
|
|
14779
|
+
mutation: gl,
|
|
14745
14780
|
variables: {
|
|
14746
14781
|
bundleId: this.id,
|
|
14747
14782
|
streetAddress: t || void 0,
|
|
@@ -14858,9 +14893,9 @@ class Ye {
|
|
|
14858
14893
|
this.getWorkflowExperiences(),
|
|
14859
14894
|
this.globalConfigurationPropertyId || "",
|
|
14860
14895
|
l
|
|
14861
|
-
),
|
|
14862
|
-
if (
|
|
14863
|
-
for (const p of
|
|
14896
|
+
), m = [...new Set(A.map((p) => p.number))];
|
|
14897
|
+
if (m.length > h)
|
|
14898
|
+
for (const p of m) {
|
|
14864
14899
|
const f = this.getGlobalPropertyStateManager(), C = u.find((w) => w.channelNumber === p);
|
|
14865
14900
|
C && await f.setAspect(l, C.variant.id || "", void 0, C.channelNumber);
|
|
14866
14901
|
}
|
|
@@ -15364,7 +15399,7 @@ class Ye {
|
|
|
15364
15399
|
};
|
|
15365
15400
|
}
|
|
15366
15401
|
}
|
|
15367
|
-
const Cl =
|
|
15402
|
+
const Cl = v`
|
|
15368
15403
|
mutation processFlowCreate($processFlowId: String!, $inputs: [String]!) {
|
|
15369
15404
|
processExecutionCreate(processFlowId: $processFlowId, inputs: $inputs) {
|
|
15370
15405
|
id
|
|
@@ -15385,20 +15420,20 @@ class wl {
|
|
|
15385
15420
|
mutation: Cl,
|
|
15386
15421
|
variables: {
|
|
15387
15422
|
processFlowId: t,
|
|
15388
|
-
inputs: [...e.map((
|
|
15423
|
+
inputs: [...e.map((m) => m.getValueForTransmission())]
|
|
15389
15424
|
}
|
|
15390
15425
|
})).data) == null ? void 0 : A.processExecutionCreate) == null ? void 0 : u.id;
|
|
15391
15426
|
if (!i)
|
|
15392
15427
|
throw new Error("Failed to create process execution.");
|
|
15393
|
-
function s(
|
|
15394
|
-
return new Promise((
|
|
15395
|
-
setTimeout(
|
|
15428
|
+
function s(m) {
|
|
15429
|
+
return new Promise((g) => {
|
|
15430
|
+
setTimeout(g, m);
|
|
15396
15431
|
});
|
|
15397
15432
|
}
|
|
15398
15433
|
let o = !1, l = 0, c, d;
|
|
15399
15434
|
for (; !o; ) {
|
|
15400
15435
|
c = await B.getShadowGraphqlClient().query({
|
|
15401
|
-
query:
|
|
15436
|
+
query: v`
|
|
15402
15437
|
query getProcessFlowExecution($ids: [String]!) {
|
|
15403
15438
|
processExecutions(ids: $ids) {
|
|
15404
15439
|
id
|
|
@@ -15416,20 +15451,20 @@ class wl {
|
|
|
15416
15451
|
ids: [i]
|
|
15417
15452
|
}
|
|
15418
15453
|
});
|
|
15419
|
-
const
|
|
15420
|
-
if (!c || !
|
|
15454
|
+
const m = (h = c.data) == null ? void 0 : h.processExecutions[0];
|
|
15455
|
+
if (!c || !m)
|
|
15421
15456
|
throw new Error("Failed to retrieve server response for execution.");
|
|
15422
|
-
if (
|
|
15457
|
+
if (m.failedAt)
|
|
15423
15458
|
throw new Error(
|
|
15424
15459
|
"Execution has failed to complete. See Automation > FLows in Flight on partner account on SpiffCommerce Hub."
|
|
15425
15460
|
);
|
|
15426
|
-
if (
|
|
15427
|
-
o = !0, d = new yl(
|
|
15461
|
+
if (m.completedAt) {
|
|
15462
|
+
o = !0, d = new yl(m);
|
|
15428
15463
|
break;
|
|
15429
15464
|
}
|
|
15430
15465
|
l += 1;
|
|
15431
|
-
const
|
|
15432
|
-
if (l >=
|
|
15466
|
+
const g = a != null && a.repeats ? a == null ? void 0 : a.repeats : 5;
|
|
15467
|
+
if (l >= g)
|
|
15433
15468
|
throw new Error("Maximum wait time exceeded for execution result.");
|
|
15434
15469
|
await s(a != null && a.sleepTime ? Math.max(a.sleepTime, 500) : 2e3);
|
|
15435
15470
|
}
|
|
@@ -15586,7 +15621,7 @@ class Ka {
|
|
|
15586
15621
|
return t.sort((e, a) => (e.index ?? 0) - (a.index ?? 0)).map((e) => new jt(e));
|
|
15587
15622
|
}
|
|
15588
15623
|
}
|
|
15589
|
-
const ue =
|
|
15624
|
+
const ue = v`
|
|
15590
15625
|
query GetCustomer($emailAddress: String!) {
|
|
15591
15626
|
customer(emailAddress: $emailAddress) {
|
|
15592
15627
|
id
|
|
@@ -15597,7 +15632,7 @@ const ue = S`
|
|
|
15597
15632
|
}
|
|
15598
15633
|
}
|
|
15599
15634
|
}
|
|
15600
|
-
`, vl =
|
|
15635
|
+
`, vl = v`
|
|
15601
15636
|
mutation CustomerCreate($details: CustomerDetailsInput!) {
|
|
15602
15637
|
customerCreate(details: $details) {
|
|
15603
15638
|
id
|
|
@@ -15608,7 +15643,7 @@ const ue = S`
|
|
|
15608
15643
|
}
|
|
15609
15644
|
}
|
|
15610
15645
|
`;
|
|
15611
|
-
|
|
15646
|
+
v`
|
|
15612
15647
|
mutation CustomerAuthenticate($loginToken: String!) {
|
|
15613
15648
|
customerAuthenticate(loginToken: $loginToken) {
|
|
15614
15649
|
id
|
|
@@ -15639,12 +15674,12 @@ S`
|
|
|
15639
15674
|
}
|
|
15640
15675
|
}
|
|
15641
15676
|
`;
|
|
15642
|
-
const El =
|
|
15677
|
+
const El = v`
|
|
15643
15678
|
mutation CustomerGenerateVerificationCode($emailAddress: String!) {
|
|
15644
15679
|
customerGenerateVerificationCode(emailAddress: $emailAddress)
|
|
15645
15680
|
}
|
|
15646
15681
|
`;
|
|
15647
|
-
|
|
15682
|
+
v`
|
|
15648
15683
|
mutation CustomerVerifyCode($emailAddress: String!, $verificationCode: String!) {
|
|
15649
15684
|
customerVerifyCode(emailAddress: $emailAddress, verificationCode: $verificationCode) {
|
|
15650
15685
|
id
|
|
@@ -15676,7 +15711,7 @@ S`
|
|
|
15676
15711
|
}
|
|
15677
15712
|
}
|
|
15678
15713
|
`;
|
|
15679
|
-
const bl =
|
|
15714
|
+
const bl = v`
|
|
15680
15715
|
query CustomerMetafields($id: String!) {
|
|
15681
15716
|
metafields(entityId: $id) {
|
|
15682
15717
|
id
|
|
@@ -15842,10 +15877,10 @@ class rd {
|
|
|
15842
15877
|
} catch (a) {
|
|
15843
15878
|
throw console.error(a), new ut("Critical - Unable to synchronize workflow state with server.");
|
|
15844
15879
|
}
|
|
15845
|
-
}, this.options = t, this.options.applicationKey && Rr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 27.1.0-beta.
|
|
15880
|
+
}, this.options = t, this.options.applicationKey && Rr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 27.1.0-beta.ecf18ce0-f226-5b0f-b26d-638fe8798343"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
|
|
15846
15881
|
}
|
|
15847
15882
|
configure(t) {
|
|
15848
|
-
|
|
15883
|
+
mt.setHubUrl(t.hubUrl), mt.setServerUrl(t.serverUrl), mt.setServicesApiUrl(t.servicesApiUrl), this.marketplaceThemeInstallId = t.marketplaceThemeInstallId, this.marketplaceThemeInstallConfigurationId = t.marketplaceThemeInstallConfigurationId, this.userPoolClientId = t.userPoolClientId, this.userPoolRegion = t.userPoolRegion, this.spiffRegion = t.spiffRegion, t.bearerAuthenticationToken && $r(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration(), this.spiffRegion && this.userPoolRegion && this.userPoolClientId && Lt.init(this.spiffRegion, this.userPoolRegion, this.userPoolClientId);
|
|
15849
15884
|
}
|
|
15850
15885
|
/**
|
|
15851
15886
|
* @returns The asset manager allows for common operations related to assets
|
|
@@ -15920,7 +15955,7 @@ class rd {
|
|
|
15920
15955
|
* @throws An error if the transaction is not found.
|
|
15921
15956
|
*/
|
|
15922
15957
|
async authenticateTransactionFromLocalStorage(t) {
|
|
15923
|
-
var d, A, u, h,
|
|
15958
|
+
var d, A, u, h, m, g;
|
|
15924
15959
|
const e = B.getShadowGraphqlClient(), a = await e.query({
|
|
15925
15960
|
query: Mi,
|
|
15926
15961
|
errorPolicy: "all",
|
|
@@ -15943,13 +15978,13 @@ class rd {
|
|
|
15943
15978
|
if (o != null && o.has(t) && o.get(t) && await this.reloadLoggedInCustomer()) {
|
|
15944
15979
|
const C = ((h = (u = this.customer) == null ? void 0 : u.bundleStakeholders) == null ? void 0 : h.find(
|
|
15945
15980
|
(w) => {
|
|
15946
|
-
var
|
|
15947
|
-
return (
|
|
15981
|
+
var S, y;
|
|
15982
|
+
return (y = (S = w.bundle) == null ? void 0 : S.transactions) == null ? void 0 : y.some((E) => E.id === t);
|
|
15948
15983
|
}
|
|
15949
|
-
)) || ((
|
|
15984
|
+
)) || ((g = (m = this.customer) == null ? void 0 : m.stakeholders) == null ? void 0 : g.find(
|
|
15950
15985
|
(w) => {
|
|
15951
|
-
var
|
|
15952
|
-
return ((
|
|
15986
|
+
var S;
|
|
15987
|
+
return ((S = w.transaction) == null ? void 0 : S.id) === t;
|
|
15953
15988
|
}
|
|
15954
15989
|
));
|
|
15955
15990
|
if (C)
|
|
@@ -16145,7 +16180,7 @@ class rd {
|
|
|
16145
16180
|
mutation: Ws(((d = (c = a == null ? void 0 : a.graphql) == null ? void 0 : c.productCollection) == null ? void 0 : d.eagerFetchProducts) || !1),
|
|
16146
16181
|
variables: {
|
|
16147
16182
|
collectionId: t,
|
|
16148
|
-
initialMetadata: e ? Object.entries(e).map((
|
|
16183
|
+
initialMetadata: e ? Object.entries(e).map((m, g) => ({ key: m[0], value: m[1] })) : void 0,
|
|
16149
16184
|
marketplaceThemeInstallId: this.marketplaceThemeInstallId,
|
|
16150
16185
|
marketplaceThemeInstallConfigurationId: this.marketplaceThemeInstallConfigurationId
|
|
16151
16186
|
},
|
|
@@ -16171,7 +16206,7 @@ class rd {
|
|
|
16171
16206
|
* @returns A bundle to be used for grouping and operating on large amounts of workflow experiences.
|
|
16172
16207
|
*/
|
|
16173
16208
|
async getExistingBundle(t, e, a, n) {
|
|
16174
|
-
var h,
|
|
16209
|
+
var h, m, g, p, f, C, w, S, y, E, b;
|
|
16175
16210
|
const i = N.getMap("bundleOwnerIds"), s = i == null ? void 0 : i.get(t), o = {};
|
|
16176
16211
|
try {
|
|
16177
16212
|
const I = await this.loggedInBearerToken();
|
|
@@ -16183,9 +16218,9 @@ class rd {
|
|
|
16183
16218
|
const l = {
|
|
16184
16219
|
bundleOwnerId: s,
|
|
16185
16220
|
...o,
|
|
16186
|
-
...(
|
|
16221
|
+
...(m = n == null ? void 0 : n.graphql) == null ? void 0 : m.additionalHeaders
|
|
16187
16222
|
}, c = await B.getShadowGraphqlClient().query({
|
|
16188
|
-
query: Us(((p = (
|
|
16223
|
+
query: Us(((p = (g = n == null ? void 0 : n.graphql) == null ? void 0 : g.productCollection) == null ? void 0 : p.eagerFetchProducts) || !1),
|
|
16189
16224
|
variables: {
|
|
16190
16225
|
id: t
|
|
16191
16226
|
},
|
|
@@ -16196,10 +16231,10 @@ class rd {
|
|
|
16196
16231
|
});
|
|
16197
16232
|
if (!((f = c.data) != null && f.bundles) || ((C = c.data) == null ? void 0 : C.bundles.length) === 0 || !((w = c.data) != null && w.bundles[0]))
|
|
16198
16233
|
throw new Error(`Unable to find bundle: ${t}`);
|
|
16199
|
-
const d = (
|
|
16234
|
+
const d = (S = c.data) == null ? void 0 : S.bundles[0], A = N.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
|
|
16200
16235
|
A.set(d.id, d.partner.id), N.setMap("bundlePartnerIds", A);
|
|
16201
16236
|
const u = new Ye(this, d, e, a, s, {
|
|
16202
|
-
additionalHeaders: (
|
|
16237
|
+
additionalHeaders: (y = n == null ? void 0 : n.graphql) == null ? void 0 : y.additionalHeaders,
|
|
16203
16238
|
eagerFetchProducts: (b = (E = n == null ? void 0 : n.graphql) == null ? void 0 : E.productCollection) == null ? void 0 : b.eagerFetchProducts,
|
|
16204
16239
|
existingGlobalPropertyState: c.data.globalPropertyState,
|
|
16205
16240
|
readonly: n == null ? void 0 : n.readonly
|
|
@@ -16213,19 +16248,19 @@ class rd {
|
|
|
16213
16248
|
* @returns A bundle to be used for grouping and operating on large amounts of workflow experiences.
|
|
16214
16249
|
*/
|
|
16215
16250
|
async duplicateBundle(t, e, a, n) {
|
|
16216
|
-
var h,
|
|
16251
|
+
var h, m, g, p, f, C, w, S;
|
|
16217
16252
|
const i = (h = N.getMap("bundleOwnerIds")) == null ? void 0 : h.get(t), s = {};
|
|
16218
16253
|
try {
|
|
16219
|
-
const
|
|
16220
|
-
s.Authorization = `Bearer ${
|
|
16254
|
+
const y = await this.loggedInBearerToken();
|
|
16255
|
+
s.Authorization = `Bearer ${y}`;
|
|
16221
16256
|
} catch {
|
|
16222
|
-
const b = ((
|
|
16257
|
+
const b = ((m = Object.entries(localStorage).find(([D, x]) => D.startsWith("CognitoIdentityServiceProvider") && D.endsWith("idToken"))) == null ? void 0 : m[0]) || "", I = localStorage.getItem(b);
|
|
16223
16258
|
I && !Wt(I) && (s.Authorization = `Bearer ${I}`);
|
|
16224
16259
|
}
|
|
16225
16260
|
const o = {
|
|
16226
16261
|
bundleOwnerId: i,
|
|
16227
16262
|
...s,
|
|
16228
|
-
...(
|
|
16263
|
+
...(g = n == null ? void 0 : n.graphql) == null ? void 0 : g.additionalHeaders
|
|
16229
16264
|
}, c = (C = (await B.getShadowGraphqlClient().mutate({
|
|
16230
16265
|
mutation: js(((f = (p = n == null ? void 0 : n.graphql) == null ? void 0 : p.productCollection) == null ? void 0 : f.eagerFetchProducts) || !1),
|
|
16231
16266
|
variables: {
|
|
@@ -16247,7 +16282,7 @@ class rd {
|
|
|
16247
16282
|
const A = N.getMap("bundleOwnerIds") || /* @__PURE__ */ new Map();
|
|
16248
16283
|
A.set(c.id, c.bundleOwnerId), N.setMap("bundleOwnerIds", A);
|
|
16249
16284
|
const u = new Ye(this, c, void 0, void 0, c.bundleOwnerId, {
|
|
16250
|
-
eagerFetchProducts: (
|
|
16285
|
+
eagerFetchProducts: (S = (w = n == null ? void 0 : n.graphql) == null ? void 0 : w.productCollection) == null ? void 0 : S.eagerFetchProducts,
|
|
16251
16286
|
existingGlobalPropertyState: c.globalPropertyState
|
|
16252
16287
|
});
|
|
16253
16288
|
return await u.getInitializationPromise(), u;
|
|
@@ -16320,11 +16355,11 @@ class rd {
|
|
|
16320
16355
|
async getWorkflowExperiences(t, e) {
|
|
16321
16356
|
if (t.length === 0)
|
|
16322
16357
|
throw new ut("No options provided!");
|
|
16323
|
-
const a = B.getShadowGraphqlClient(), n = async (
|
|
16358
|
+
const a = B.getShadowGraphqlClient(), n = async (y) => {
|
|
16324
16359
|
var D, x, k;
|
|
16325
|
-
if (
|
|
16360
|
+
if (y.length === 0)
|
|
16326
16361
|
return [];
|
|
16327
|
-
const E =
|
|
16362
|
+
const E = y.map((T) => T.option.transactionId), b = await a.query({
|
|
16328
16363
|
query: Ci,
|
|
16329
16364
|
variables: {
|
|
16330
16365
|
ids: E
|
|
@@ -16332,7 +16367,7 @@ class rd {
|
|
|
16332
16367
|
errorPolicy: "all",
|
|
16333
16368
|
fetchPolicy: "no-cache"
|
|
16334
16369
|
}), I = b.data.transactions;
|
|
16335
|
-
if (I.length !==
|
|
16370
|
+
if (I.length !== y.length) {
|
|
16336
16371
|
const T = ((x = (D = b.errors) == null ? void 0 : D[0]) == null ? void 0 : x.message) || "Unknown error";
|
|
16337
16372
|
throw new ut(`Not all transactions were found: ${T}`);
|
|
16338
16373
|
}
|
|
@@ -16341,18 +16376,18 @@ class rd {
|
|
|
16341
16376
|
return {
|
|
16342
16377
|
transaction: T,
|
|
16343
16378
|
workflowId: T.workflowId,
|
|
16344
|
-
readOnly: ((R =
|
|
16345
|
-
index:
|
|
16379
|
+
readOnly: ((R = y.find((tt) => tt.option.transactionId === T.id)) == null ? void 0 : R.option.readOnly) ?? !1,
|
|
16380
|
+
index: y[nt].index
|
|
16346
16381
|
};
|
|
16347
16382
|
});
|
|
16348
|
-
}, i = async (
|
|
16383
|
+
}, i = async (y) => {
|
|
16349
16384
|
var I, D, x;
|
|
16350
|
-
if (
|
|
16385
|
+
if (y.length === 0)
|
|
16351
16386
|
return [];
|
|
16352
16387
|
const E = await a.mutate({
|
|
16353
16388
|
mutation: fi,
|
|
16354
16389
|
variables: {
|
|
16355
|
-
inputs:
|
|
16390
|
+
inputs: y.map((k) => ({
|
|
16356
16391
|
integrationProductId: k.option.type === "integration" ? k.option.integrationProductId : void 0,
|
|
16357
16392
|
externalIntegrationId: k.option.type === "external" ? k.option.externalIntegrationId : void 0,
|
|
16358
16393
|
externalProductId: k.option.type === "external" ? k.option.externalProductId : void 0,
|
|
@@ -16374,18 +16409,18 @@ class rd {
|
|
|
16374
16409
|
transaction: k,
|
|
16375
16410
|
workflowId: k.workflowId,
|
|
16376
16411
|
readOnly: !1,
|
|
16377
|
-
index:
|
|
16412
|
+
index: y[T].index
|
|
16378
16413
|
}));
|
|
16379
|
-
}, s = t.map((
|
|
16380
|
-
(
|
|
16414
|
+
}, s = t.map((y, E) => ({ option: y, index: E })), o = s.filter((y) => y.option.type === "transaction"), l = s.filter(
|
|
16415
|
+
(y) => y.option.type === "integration" || y.option.type === "external"
|
|
16381
16416
|
), c = Fa(o, 10), d = Fa(l, 10), A = (await Promise.all([
|
|
16382
16417
|
...c.map(n),
|
|
16383
16418
|
...d.map(i)
|
|
16384
|
-
])).flat(), u = [...new Set(A.map((
|
|
16419
|
+
])).flat(), u = [...new Set(A.map((y) => y.workflowId))], h = await er(u, e), m = new Map(h.map((y) => [y.id, y])), g = N.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map(), p = A.map(async (y) => {
|
|
16385
16420
|
var tt;
|
|
16386
|
-
const { transaction: E, workflowId: b, readOnly: I, index: D } =
|
|
16387
|
-
!
|
|
16388
|
-
const T =
|
|
16421
|
+
const { transaction: E, workflowId: b, readOnly: I, index: D } = y, x = m.get(b), k = t[D];
|
|
16422
|
+
!g.get(E.id) && E.transactionOwnerId && g.set(E.id, E.transactionOwnerId);
|
|
16423
|
+
const T = g.get(E.id) || void 0, nt = new Bl({
|
|
16389
16424
|
onMutate: () => ({ context: { transactionOwnerId: T, bundleOwnerId: e == null ? void 0 : e.bundleOwnerId } }),
|
|
16390
16425
|
onQuery: () => ({ context: { transactionOwnerId: T, bundleOwnerId: e == null ? void 0 : e.bundleOwnerId } })
|
|
16391
16426
|
}), R = {
|
|
@@ -16419,12 +16454,12 @@ class rd {
|
|
|
16419
16454
|
R.layouts
|
|
16420
16455
|
), R.delayWorkflowStateSync = !0, { experienceOptions: R, index: D, options: k };
|
|
16421
16456
|
}), f = await Promise.all(p);
|
|
16422
|
-
N.setMap("transactionOwnerIds",
|
|
16423
|
-
const w = f.sort((
|
|
16424
|
-
const { experienceOptions: E, options: b } =
|
|
16457
|
+
N.setMap("transactionOwnerIds", g);
|
|
16458
|
+
const w = f.sort((y, E) => y.index - E.index).map(async (y) => {
|
|
16459
|
+
const { experienceOptions: E, options: b } = y, I = new Oo(this, E);
|
|
16425
16460
|
return await I.getWorkflowManager().getInitializationPromise(), b.type !== "transaction" && this.customer && await I.attachCustomerDetails({ email: this.customer.emailAddress }), I;
|
|
16426
|
-
}),
|
|
16427
|
-
return
|
|
16461
|
+
}), S = await Promise.all(w);
|
|
16462
|
+
return S.forEach((y) => y.getWorkflowManager().setWorkflowStateSyncEnabled(!0)), S;
|
|
16428
16463
|
}
|
|
16429
16464
|
storeCustomer(t) {
|
|
16430
16465
|
const e = N.getMap("partnerCustomerIds") || /* @__PURE__ */ new Map();
|
|
@@ -17119,13 +17154,13 @@ class Ql extends it {
|
|
|
17119
17154
|
return this.manager.getStepStorage(this.step.stepName);
|
|
17120
17155
|
}
|
|
17121
17156
|
}
|
|
17122
|
-
const Rl =
|
|
17157
|
+
const Rl = v`
|
|
17123
17158
|
query GetLoggedInCustomer($email: String!) {
|
|
17124
17159
|
customer(emailAddress: $email) {
|
|
17125
17160
|
id
|
|
17126
17161
|
}
|
|
17127
17162
|
}
|
|
17128
|
-
`, Da =
|
|
17163
|
+
`, Da = v`
|
|
17129
17164
|
query GetCustomerTransactions(
|
|
17130
17165
|
$id: String!
|
|
17131
17166
|
$limit: Int!
|
|
@@ -17162,21 +17197,21 @@ const Rl = S`
|
|
|
17162
17197
|
total
|
|
17163
17198
|
}
|
|
17164
17199
|
}
|
|
17165
|
-
`, Ol =
|
|
17200
|
+
`, Ol = v`
|
|
17166
17201
|
mutation SetTransactionDesignName($id: String!, $name: String!) {
|
|
17167
17202
|
transactionUpdate(id: $id, designName: $name) {
|
|
17168
17203
|
id
|
|
17169
17204
|
designName
|
|
17170
17205
|
}
|
|
17171
17206
|
}
|
|
17172
|
-
`, $l =
|
|
17207
|
+
`, $l = v`
|
|
17173
17208
|
mutation DuplicateTransaction($id: String!, $template: Boolean!) {
|
|
17174
17209
|
transactionDuplicate(id: $id, template: $template) {
|
|
17175
17210
|
id
|
|
17176
17211
|
workflowViewerLink
|
|
17177
17212
|
}
|
|
17178
17213
|
}
|
|
17179
|
-
`, Ul =
|
|
17214
|
+
`, Ul = v`
|
|
17180
17215
|
query GetCustomerBundles($id: String!, $limit: Int!, $offset: Int!) {
|
|
17181
17216
|
customerBundlesFeed(id: $id, limit: $limit, offset: $offset) {
|
|
17182
17217
|
items {
|
|
@@ -17191,7 +17226,7 @@ const Rl = S`
|
|
|
17191
17226
|
total
|
|
17192
17227
|
}
|
|
17193
17228
|
}
|
|
17194
|
-
`, Ll =
|
|
17229
|
+
`, Ll = v`
|
|
17195
17230
|
query GetTransactionsForBundle($id: String!) {
|
|
17196
17231
|
bundles(ids: [$id]) {
|
|
17197
17232
|
id
|
|
@@ -17212,21 +17247,21 @@ const Rl = S`
|
|
|
17212
17247
|
}
|
|
17213
17248
|
}
|
|
17214
17249
|
}
|
|
17215
|
-
`, Vl =
|
|
17250
|
+
`, Vl = v`
|
|
17216
17251
|
mutation SetBundleName($id: String!, $name: String!) {
|
|
17217
17252
|
bundleUpdate(id: $id, name: $name) {
|
|
17218
17253
|
id
|
|
17219
17254
|
name
|
|
17220
17255
|
}
|
|
17221
17256
|
}
|
|
17222
|
-
`, zl =
|
|
17257
|
+
`, zl = v`
|
|
17223
17258
|
mutation DuplicateBundle($id: String!, $template: Boolean!) {
|
|
17224
17259
|
bundleDuplicate(id: $id, template: $template) {
|
|
17225
17260
|
id
|
|
17226
17261
|
workflowViewerLink
|
|
17227
17262
|
}
|
|
17228
17263
|
}
|
|
17229
|
-
`, Gl =
|
|
17264
|
+
`, Gl = v`
|
|
17230
17265
|
query GetBundleTemplates($id: String!, $limit: Int!, $offset: Int!) {
|
|
17231
17266
|
customerBundlesFeed(id: $id, limit: $limit, offset: $offset, template: true) {
|
|
17232
17267
|
items {
|
|
@@ -17268,13 +17303,13 @@ const Rl = S`
|
|
|
17268
17303
|
id: r,
|
|
17269
17304
|
template: t
|
|
17270
17305
|
}
|
|
17271
|
-
}),
|
|
17306
|
+
}), md = async (r) => (await B.getShadowGraphqlClient().query({
|
|
17272
17307
|
query: Rl,
|
|
17273
17308
|
errorPolicy: "all",
|
|
17274
17309
|
variables: {
|
|
17275
17310
|
email: r
|
|
17276
17311
|
}
|
|
17277
|
-
})).data.customer,
|
|
17312
|
+
})).data.customer, gd = async (r, t, e) => await B.getShadowGraphqlClient().query({
|
|
17278
17313
|
query: Ul,
|
|
17279
17314
|
errorPolicy: "all",
|
|
17280
17315
|
fetchPolicy: "no-cache",
|
|
@@ -17383,8 +17418,8 @@ const Rl = S`
|
|
|
17383
17418
|
console.error("vite-plugin-css-injected-by-js", t);
|
|
17384
17419
|
}
|
|
17385
17420
|
})();
|
|
17386
|
-
var Wl = /* @__PURE__ */ ((r) => (r.Manual = "Manual", r.OnStart = "OnStart", r.OnQuit = "OnQuit", r.OnEnd = "OnEnd", r))(Wl || {}), jl = /* @__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))(jl || {}),
|
|
17387
|
-
|
|
17421
|
+
var Wl = /* @__PURE__ */ ((r) => (r.Manual = "Manual", r.OnStart = "OnStart", r.OnQuit = "OnQuit", r.OnEnd = "OnEnd", r))(Wl || {}), jl = /* @__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))(jl || {}), K;
|
|
17422
|
+
K = { __e: function(r, t, e, a) {
|
|
17388
17423
|
for (var n, i, s; t = t.__; )
|
|
17389
17424
|
if ((n = t.__c) && !n.__)
|
|
17390
17425
|
try {
|
|
@@ -17395,31 +17430,31 @@ J = { __e: function(r, t, e, a) {
|
|
|
17395
17430
|
}
|
|
17396
17431
|
throw r;
|
|
17397
17432
|
} }, typeof Promise == "function" && Promise.prototype.then.bind(Promise.resolve());
|
|
17398
|
-
var ot, Je, _a, ar = [], Ke = [], Xa =
|
|
17433
|
+
var ot, Je, _a, ar = [], Ke = [], Xa = K.__b, Za = K.__r, tn = K.diffed, en = K.__c, an = K.unmount;
|
|
17399
17434
|
function Hl() {
|
|
17400
17435
|
for (var r; r = ar.shift(); )
|
|
17401
17436
|
if (r.__P && r.__H)
|
|
17402
17437
|
try {
|
|
17403
17438
|
r.__H.__h.forEach(fe), r.__H.__h.forEach(da), r.__H.__h = [];
|
|
17404
17439
|
} catch (t) {
|
|
17405
|
-
r.__H.__h = [],
|
|
17440
|
+
r.__H.__h = [], K.__e(t, r.__v);
|
|
17406
17441
|
}
|
|
17407
17442
|
}
|
|
17408
|
-
|
|
17443
|
+
K.__b = function(r) {
|
|
17409
17444
|
ot = null, Xa && Xa(r);
|
|
17410
|
-
},
|
|
17445
|
+
}, K.__r = function(r) {
|
|
17411
17446
|
Za && Za(r);
|
|
17412
17447
|
var t = (ot = r.__c).__H;
|
|
17413
17448
|
t && (Je === ot ? (t.__h = [], ot.__h = [], t.__.forEach(function(e) {
|
|
17414
17449
|
e.__N && (e.__ = e.__N), e.__V = Ke, e.__N = e.i = void 0;
|
|
17415
17450
|
})) : (t.__h.forEach(fe), t.__h.forEach(da), t.__h = [])), Je = ot;
|
|
17416
|
-
},
|
|
17451
|
+
}, K.diffed = function(r) {
|
|
17417
17452
|
tn && tn(r);
|
|
17418
17453
|
var t = r.__c;
|
|
17419
|
-
t && t.__H && (t.__H.__h.length && (ar.push(t) !== 1 && _a ===
|
|
17454
|
+
t && t.__H && (t.__H.__h.length && (ar.push(t) !== 1 && _a === K.requestAnimationFrame || ((_a = K.requestAnimationFrame) || ql)(Hl)), t.__H.__.forEach(function(e) {
|
|
17420
17455
|
e.i && (e.__H = e.i), e.__V !== Ke && (e.__ = e.__V), e.i = void 0, e.__V = Ke;
|
|
17421
17456
|
})), Je = ot = null;
|
|
17422
|
-
},
|
|
17457
|
+
}, K.__c = function(r, t) {
|
|
17423
17458
|
t.some(function(e) {
|
|
17424
17459
|
try {
|
|
17425
17460
|
e.__h.forEach(fe), e.__h = e.__h.filter(function(a) {
|
|
@@ -17428,10 +17463,10 @@ J.__b = function(r) {
|
|
|
17428
17463
|
} catch (a) {
|
|
17429
17464
|
t.some(function(n) {
|
|
17430
17465
|
n.__h && (n.__h = []);
|
|
17431
|
-
}), t = [],
|
|
17466
|
+
}), t = [], K.__e(a, e.__v);
|
|
17432
17467
|
}
|
|
17433
17468
|
}), en && en(r, t);
|
|
17434
|
-
},
|
|
17469
|
+
}, K.unmount = function(r) {
|
|
17435
17470
|
an && an(r);
|
|
17436
17471
|
var t, e = r.__c;
|
|
17437
17472
|
e && e.__H && (e.__H.__.forEach(function(a) {
|
|
@@ -17440,7 +17475,7 @@ J.__b = function(r) {
|
|
|
17440
17475
|
} catch (n) {
|
|
17441
17476
|
t = n;
|
|
17442
17477
|
}
|
|
17443
|
-
}), e.__H = void 0, t &&
|
|
17478
|
+
}), e.__H = void 0, t && K.__e(t, e.__v));
|
|
17444
17479
|
};
|
|
17445
17480
|
var nn = typeof requestAnimationFrame == "function";
|
|
17446
17481
|
function ql(r) {
|
|
@@ -17457,7 +17492,7 @@ function da(r) {
|
|
|
17457
17492
|
var t = ot;
|
|
17458
17493
|
r.__c = r.__(), ot = t;
|
|
17459
17494
|
}
|
|
17460
|
-
const nr =
|
|
17495
|
+
const nr = v`
|
|
17461
17496
|
fragment AddressValidationResultFields on AddressValidationResult {
|
|
17462
17497
|
addressComplete
|
|
17463
17498
|
address {
|
|
@@ -17479,7 +17514,7 @@ const nr = S`
|
|
|
17479
17514
|
}
|
|
17480
17515
|
missingComponentTypes
|
|
17481
17516
|
}
|
|
17482
|
-
`, xa =
|
|
17517
|
+
`, xa = v`
|
|
17483
17518
|
${nr}
|
|
17484
17519
|
fragment AddressValidationJobFields on AddressValidationJob {
|
|
17485
17520
|
id
|
|
@@ -17491,14 +17526,14 @@ const nr = S`
|
|
|
17491
17526
|
...AddressValidationResultFields
|
|
17492
17527
|
}
|
|
17493
17528
|
}
|
|
17494
|
-
`, Yl =
|
|
17529
|
+
`, Yl = v`
|
|
17495
17530
|
${xa}
|
|
17496
17531
|
query GetAddressValidationJobs($ids: [String!]!) {
|
|
17497
17532
|
addressValidationJobs(ids: $ids) {
|
|
17498
17533
|
...AddressValidationJobFields
|
|
17499
17534
|
}
|
|
17500
17535
|
}
|
|
17501
|
-
`, Jl =
|
|
17536
|
+
`, Jl = v`
|
|
17502
17537
|
${xa}
|
|
17503
17538
|
query GetRecipientsWithAddressValidationJobs($ids: [String!]!) {
|
|
17504
17539
|
recipients(ids: $ids) {
|
|
@@ -17508,14 +17543,14 @@ const nr = S`
|
|
|
17508
17543
|
}
|
|
17509
17544
|
}
|
|
17510
17545
|
}
|
|
17511
|
-
`, Kl =
|
|
17546
|
+
`, Kl = v`
|
|
17512
17547
|
${nr}
|
|
17513
17548
|
mutation ValidateRecipientAddress($id: String!) {
|
|
17514
17549
|
recipientValidate(id: $id) {
|
|
17515
17550
|
...AddressValidationResultFields
|
|
17516
17551
|
}
|
|
17517
17552
|
}
|
|
17518
|
-
`, _l =
|
|
17553
|
+
`, _l = v`
|
|
17519
17554
|
${xa}
|
|
17520
17555
|
mutation BatchValidateRecipientAddress($ids: [String!]!) {
|
|
17521
17556
|
recipientValidateBatch(ids: $ids) {
|
|
@@ -17616,14 +17651,14 @@ export {
|
|
|
17616
17651
|
Ql as FrameStepHandle,
|
|
17617
17652
|
Ia as GlobalPropertyHandle,
|
|
17618
17653
|
$ as GroupCommand,
|
|
17619
|
-
|
|
17654
|
+
go as IllustrationStepHandle,
|
|
17620
17655
|
Qe as InformationMessageType,
|
|
17621
17656
|
vo as InformationStepHandle,
|
|
17622
17657
|
Ka as IntegrationProduct,
|
|
17623
17658
|
vr as IntegrationType,
|
|
17624
17659
|
zc as LayoutElementFactory,
|
|
17625
17660
|
M as LayoutElementType,
|
|
17626
|
-
|
|
17661
|
+
Y as LayoutNotFoundError,
|
|
17627
17662
|
Ht as LayoutRenderingPurpose,
|
|
17628
17663
|
po as MaterialStepHandle,
|
|
17629
17664
|
Se as MisconfigurationError,
|
|
@@ -17697,8 +17732,8 @@ export {
|
|
|
17697
17732
|
xc as getAxisAlignedBoundingBox,
|
|
17698
17733
|
Ml as getBoundedOffsets,
|
|
17699
17734
|
od as getBundleThemeConfiguration,
|
|
17700
|
-
|
|
17701
|
-
|
|
17735
|
+
md as getCustomer,
|
|
17736
|
+
gd as getCustomerBundles,
|
|
17702
17737
|
$c as getElementVertices,
|
|
17703
17738
|
Ne as getFrameData,
|
|
17704
17739
|
_c as getGlobalPropertyStateForBundle,
|
|
@@ -17722,7 +17757,7 @@ export {
|
|
|
17722
17757
|
nd as getWorkflow,
|
|
17723
17758
|
er as getWorkflows,
|
|
17724
17759
|
B as graphQlManager,
|
|
17725
|
-
|
|
17760
|
+
ge as illustrationStepService,
|
|
17726
17761
|
kc as isCloseToValue,
|
|
17727
17762
|
Nt as loadFont,
|
|
17728
17763
|
Pc as matchHexToPms,
|
|
@@ -17734,7 +17769,7 @@ export {
|
|
|
17734
17769
|
Wn as moduleStepService,
|
|
17735
17770
|
dd as nameBundle,
|
|
17736
17771
|
Ad as nameTransaction,
|
|
17737
|
-
|
|
17772
|
+
q as optionService,
|
|
17738
17773
|
Vc as outlineFontsInSvg,
|
|
17739
17774
|
At as patternImageDataCache,
|
|
17740
17775
|
N as persistenceService,
|
|
@@ -17748,10 +17783,10 @@ export {
|
|
|
17748
17783
|
le as rotateAroundPoint,
|
|
17749
17784
|
pa as sanitizeSvgTree,
|
|
17750
17785
|
$r as setBearerAuthenticationToken,
|
|
17751
|
-
|
|
17786
|
+
gn as setCanvasModule,
|
|
17752
17787
|
zt as shapeStepService,
|
|
17753
17788
|
hs as shortenUrl,
|
|
17754
|
-
|
|
17789
|
+
mt as spiffCoreConfiguration,
|
|
17755
17790
|
Xc as stepAspectValuesToDesignInputSteps,
|
|
17756
17791
|
Oa as svgColorValueToDefinition,
|
|
17757
17792
|
On as svgStringDimensions,
|