@spiffcommerce/core 34.1.0-beta.c7476893-837d-5f04-b3f2-6c57dd03ef63 → 34.1.0-beta.d7908a2f-dda9-5f22-82e7-0ac589a46578
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 +134 -123
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +554 -541
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -4,63 +4,63 @@ import { onError as Ti } from "@apollo/client/link/error";
|
|
|
4
4
|
import { renderToStaticMarkup as Ni } from "preact-render-to-string";
|
|
5
5
|
import { removeTypenameFromVariables as Qi } from "@apollo/client/link/remove-typename";
|
|
6
6
|
import { orientation as Ri } from "exifr/dist/mini.umd.cjs";
|
|
7
|
-
import { parse as
|
|
7
|
+
import { parse as En } from "css";
|
|
8
8
|
import Oi from "fuse.js";
|
|
9
9
|
import { Pith as Ba } from "pith";
|
|
10
10
|
import Et from "lodash.clonedeep";
|
|
11
|
-
import
|
|
12
|
-
import { jsx as P, jsxs as ct, Fragment as
|
|
11
|
+
import Jt from "lodash.isequal";
|
|
12
|
+
import { jsx as P, jsxs as ct, Fragment as Wt } from "preact/jsx-runtime";
|
|
13
13
|
import { parse as ca } from "opentype.js";
|
|
14
14
|
import $i from "handlebars";
|
|
15
15
|
import { dataUriToBuffer as Ui } from "data-uri-to-buffer";
|
|
16
|
-
import { toString as
|
|
16
|
+
import { toString as bn } from "qrcode";
|
|
17
17
|
import { split as da } from "unicode-default-word-boundary";
|
|
18
18
|
import Li from "svg-path-bbox";
|
|
19
19
|
import ua from "lodash.chunk";
|
|
20
|
-
import { CognitoIdentityProviderClient as Vi, InitiateAuthCommand as
|
|
20
|
+
import { CognitoIdentityProviderClient as Vi, InitiateAuthCommand as qa, RespondToAuthChallengeCommand as zi } from "@aws-sdk/client-cognito-identity-provider";
|
|
21
21
|
import Gi from "dinero.js";
|
|
22
|
-
import * as
|
|
23
|
-
import
|
|
22
|
+
import * as ja from "currency-codes";
|
|
23
|
+
import In from "lodash.debounce";
|
|
24
24
|
import "fs";
|
|
25
25
|
import "path";
|
|
26
26
|
import Wi from "lodash.omit";
|
|
27
|
-
var be = /* @__PURE__ */ ((n) => (n.Data = "Data", n.Font = "Font", n.Frame = "Frame", n.Illustration = "Illustration", n.Image = "Image", n.Model = "Model", n.Material = "Material", n.Color = "Color", n.QuestionnaireCollateral = "QuestionnaireCollateral", n.RequestCollateral = "RequestCollateral", n.SignupCollateral = "SignupCollateral", n.Video = "Video", n.ColorProfile = "ColorProfile", n.Environment = "Environment", n))(be || {}),
|
|
28
|
-
class
|
|
27
|
+
var be = /* @__PURE__ */ ((n) => (n.Data = "Data", n.Font = "Font", n.Frame = "Frame", n.Illustration = "Illustration", n.Image = "Image", n.Model = "Model", n.Material = "Material", n.Color = "Color", n.QuestionnaireCollateral = "QuestionnaireCollateral", n.RequestCollateral = "RequestCollateral", n.SignupCollateral = "SignupCollateral", n.Video = "Video", n.ColorProfile = "ColorProfile", n.Environment = "Environment", n))(be || {}), Bn = /* @__PURE__ */ ((n) => (n.AND = "AND", n.OR = "OR", n))(Bn || {}), L = /* @__PURE__ */ ((n) => (n.FileUpload = "FileUpload", n.Option = "Option", n.ColorOption = "ColorOption", n.Text = "Text", n))(L || {}), b = /* @__PURE__ */ ((n) => (n.Information = "Information", n.Bulk = "Bulk", n.DigitalContent = "DigitalContent", n.Finish = "Finish", n.Frame = "Frame", n.Illustration = "Illustration", n.Introduction = "Introduction", n.Material = "Material", n.Model = "Model", n.Module = "Module", n.Picture = "Picture", n.Photo = "Photo", n.ProductOverlay = "ProductOverlay", n.Question = "Question", n.Shape = "Shape", n.SilentIllustration = "SilentIllustration", n.Text = "Text", n))(b || {}), qi = /* @__PURE__ */ ((n) => (n.Color = "Color", n.Colors = "Colors", n.Selection = "Selection", n.Selections = "Selections", n.Text = "Text", n.Upload = "Upload", n))(qi || {}), Yt = /* @__PURE__ */ ((n) => (n.ThreeD = "ThreeD", n.FreeDesign = "FreeDesign", n.Print = "Print", n))(Yt || {}), F = /* @__PURE__ */ ((n) => (n.Frame = "frame", n.Group = "group", n.Image = "image", n.Pattern = "pattern", n.Illustration = "illustration", n.Textbox = "textbox", n))(F || {}), ji = /* @__PURE__ */ ((n) => (n.Default = "Default", n.FirstTransaction = "FirstTransaction", n.OneToOne = "OneToOne", n))(ji || {}), Pn = /* @__PURE__ */ ((n) => (n.Pending = "Pending", n.Failed = "Failed", n.Validated = "Validated", n.Overridden = "Overridden", n))(Pn || {}), Hi = /* @__PURE__ */ ((n) => (n.Hyperlink = "Hyperlink", n.Edit = "Edit", n.Approve = "Approve", n))(Hi || {}), Ji = /* @__PURE__ */ ((n) => (n.Hub = "Hub", n.Shopify = "Shopify", n))(Ji || {}), Pa = /* @__PURE__ */ ((n) => (n.BackgroundRemover = "BackgroundRemover", n.ConversionAccelerator = "Conversion Accelerator", n.ProcessBuilder = "ProcessBuilder", n))(Pa || {}), Yi = /* @__PURE__ */ ((n) => (n[n.Orbit = 0] = "Orbit", n[n.Pan = 1] = "Pan", n))(Yi || {}), Ie = /* @__PURE__ */ ((n) => (n.Owner = "Owner", n.Approver = "Approver", n.Editor = "Editor", n.Viewer = "Viewer", n))(Ie || {}), kt = /* @__PURE__ */ ((n) => (n.Autosize = "Autosize", n.Traditional = "Traditional", n))(kt || {}), q = /* @__PURE__ */ ((n) => (n[n.North = 0] = "North", n[n.Northeast = 1] = "Northeast", n[n.East = 2] = "East", n[n.Southeast = 3] = "Southeast", n[n.South = 4] = "South", n[n.Southwest = 5] = "Southwest", n[n.West = 6] = "West", n[n.Northwest = 7] = "Northwest", n))(q || {}), Ki = /* @__PURE__ */ ((n) => (n.Pixel = "px", n.Millimeter = "mm", n.Centimeter = "cm", n))(Ki || {}), Vt = /* @__PURE__ */ ((n) => (n.Created = "Created", n.Processing = "Processing", n.Completed = "Completed", n.Failed = "Failed", n))(Vt || {});
|
|
28
|
+
class xn extends Error {
|
|
29
29
|
constructor(t) {
|
|
30
30
|
super(t), this.name = this.constructor.name;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
class
|
|
33
|
+
class te extends xn {
|
|
34
34
|
constructor(t) {
|
|
35
35
|
super(`ConfigurationError - ${t}`);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
class Be extends
|
|
38
|
+
class Be extends te {
|
|
39
39
|
constructor(t) {
|
|
40
40
|
super(`Option not Configured: ${t.stepTitle}`), this.optionId = t?.optionId || "N/A";
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
class H extends
|
|
43
|
+
class H extends te {
|
|
44
44
|
constructor(t) {
|
|
45
45
|
super(`Panel not Found: ${t.panelId}`), this.panelId = t?.panelId || "N/A";
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
class bt extends
|
|
48
|
+
class bt extends te {
|
|
49
49
|
constructor(t) {
|
|
50
50
|
super(`Asset not found for variant: ${t.name}`), this.variant = t;
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
class
|
|
53
|
+
class Kt extends te {
|
|
54
54
|
constructor(t) {
|
|
55
55
|
super(`Resource not found for asset: ${t.name}`), this.asset = t;
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
class Pe extends
|
|
58
|
+
class Pe extends te {
|
|
59
59
|
constructor(t, e) {
|
|
60
60
|
super(`Workflow Misconfiguration: ${t.stepName} - ${e}`), this.step = t;
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
class Qe extends
|
|
63
|
+
class Qe extends xn {
|
|
64
64
|
constructor(t) {
|
|
65
65
|
super(`ImplementationError - ${t}`);
|
|
66
66
|
}
|
|
@@ -105,7 +105,7 @@ class _i {
|
|
|
105
105
|
this.set(t, a);
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
class
|
|
108
|
+
class Ha {
|
|
109
109
|
constructor() {
|
|
110
110
|
this.storage = /* @__PURE__ */ new Map();
|
|
111
111
|
}
|
|
@@ -130,9 +130,9 @@ class ja {
|
|
|
130
130
|
}
|
|
131
131
|
const Xi = () => {
|
|
132
132
|
try {
|
|
133
|
-
return localStorage ? new _i() : new
|
|
133
|
+
return localStorage ? new _i() : new Ha();
|
|
134
134
|
} catch {
|
|
135
|
-
return console.warn("Local storage was unavilable due to browser security settings. Using in-memory storage instead."), new
|
|
135
|
+
return console.warn("Local storage was unavilable due to browser security settings. Using in-memory storage instead."), new Ha();
|
|
136
136
|
}
|
|
137
137
|
}, D = Xi();
|
|
138
138
|
class Zi {
|
|
@@ -169,7 +169,7 @@ function cd(n) {
|
|
|
169
169
|
function dd(n) {
|
|
170
170
|
ha = n;
|
|
171
171
|
}
|
|
172
|
-
function
|
|
172
|
+
function ee() {
|
|
173
173
|
return Aa ? new Aa().window : (console.log(
|
|
174
174
|
"DOM constructor is not registered. Assuming browser environment. If not, please register DOM constructor before calling this function."
|
|
175
175
|
), window);
|
|
@@ -184,31 +184,31 @@ function nt(n, t) {
|
|
|
184
184
|
}
|
|
185
185
|
return ha(n, t);
|
|
186
186
|
}
|
|
187
|
-
const
|
|
188
|
-
const t =
|
|
187
|
+
const Fn = /* @__PURE__ */ new Map(), Ja = /* @__PURE__ */ new Map(), Ya = /* @__PURE__ */ new Map(), Dn = async (n) => {
|
|
188
|
+
const t = Ja.get(n);
|
|
189
189
|
if (t) return t;
|
|
190
190
|
const a = (async () => {
|
|
191
191
|
const i = await nt(n);
|
|
192
|
-
return
|
|
192
|
+
return Fn.set(n, i.headers?.get("content-type") || ""), await i.arrayBuffer();
|
|
193
193
|
})();
|
|
194
|
-
return
|
|
194
|
+
return Ja.set(n, a), a;
|
|
195
195
|
}, tr = async (n) => {
|
|
196
196
|
const t = Ya.get(n);
|
|
197
197
|
if (t) return t;
|
|
198
198
|
const a = (async () => await (await nt(n)).text())();
|
|
199
199
|
return Ya.set(n, a), a;
|
|
200
|
-
}, Mt = (n) => n.every((t) => t !== "undefined"),
|
|
200
|
+
}, Mt = (n) => n.every((t) => t !== "undefined"), ce = (n) => Mt([typeof document]) ? document.createElement(n) : ee().document.createElement(n), er = (n, t) => {
|
|
201
201
|
if (Mt([typeof document]))
|
|
202
202
|
return document.createElementNS(n, t);
|
|
203
|
-
const a =
|
|
203
|
+
const a = ee().document.createElement(t);
|
|
204
204
|
return a.setAttribute("xmlns", n), a;
|
|
205
205
|
}, dt = () => {
|
|
206
206
|
if (Mt([typeof DOMParser]))
|
|
207
207
|
return new DOMParser();
|
|
208
|
-
const n =
|
|
208
|
+
const n = ee();
|
|
209
209
|
return new n.DOMParser();
|
|
210
|
-
}, ar = () => Mt([typeof DOMParser]) ? DOMParser :
|
|
211
|
-
t ?
|
|
210
|
+
}, ar = () => Mt([typeof DOMParser]) ? DOMParser : ee().DOMParser, Oe = (n, t) => new Promise((e, a) => {
|
|
211
|
+
t ? Dn(n).then(e).catch(a) : nt(n).then((i) => {
|
|
212
212
|
i.arrayBuffer().then(e).catch(a);
|
|
213
213
|
}).catch((i) => {
|
|
214
214
|
a(i);
|
|
@@ -217,21 +217,21 @@ const xn = /* @__PURE__ */ new Map(), Ha = /* @__PURE__ */ new Map(), Ya = /* @_
|
|
|
217
217
|
t ? tr(n).then(e).catch(a) : nt(n).then((i) => {
|
|
218
218
|
i.text().then(e).catch(a);
|
|
219
219
|
}).catch(a);
|
|
220
|
-
}),
|
|
220
|
+
}), kn = (n) => Ni(n), Je = /* @__PURE__ */ new Map(), nr = async (n, t) => {
|
|
221
221
|
if (Mt([typeof FontFace])) {
|
|
222
|
-
if (
|
|
223
|
-
return
|
|
222
|
+
if (Je.has(t))
|
|
223
|
+
return Je.get(t);
|
|
224
224
|
const e = n.names.fullName.en, a = new FontFace(e, `url(${t})`);
|
|
225
225
|
document.fonts.add(a);
|
|
226
226
|
const i = a.load();
|
|
227
|
-
return
|
|
227
|
+
return Je.set(t, i), i;
|
|
228
228
|
}
|
|
229
229
|
}, It = () => {
|
|
230
230
|
if (Mt([typeof XMLSerializer]))
|
|
231
231
|
return new XMLSerializer();
|
|
232
|
-
const n =
|
|
232
|
+
const n = ee();
|
|
233
233
|
return new n.XMLSerializer();
|
|
234
|
-
},
|
|
234
|
+
}, Ka = (n) => btoa(n), $e = (n) => {
|
|
235
235
|
function t() {
|
|
236
236
|
const a = new Uint8Array(n), i = 4;
|
|
237
237
|
if (a.length >= i) {
|
|
@@ -258,7 +258,7 @@ const xn = /* @__PURE__ */ new Map(), Ha = /* @__PURE__ */ new Map(), Ya = /* @_
|
|
|
258
258
|
const e = t();
|
|
259
259
|
return e || "image/svg+xml";
|
|
260
260
|
}, ud = async (n) => {
|
|
261
|
-
const t = await
|
|
261
|
+
const t = await Dn(n), e = Fn.get(n) || $e(t);
|
|
262
262
|
return await or(new Blob([t], { type: e }));
|
|
263
263
|
}, ir = (n) => {
|
|
264
264
|
let t = "";
|
|
@@ -269,7 +269,7 @@ const xn = /* @__PURE__ */ new Map(), Ha = /* @__PURE__ */ new Map(), Ya = /* @_
|
|
|
269
269
|
}, rr = async (n) => {
|
|
270
270
|
const t = $e(n), e = new Uint8Array(n), a = ir(e), i = btoa(a);
|
|
271
271
|
return `data:${t};base64,${i}`;
|
|
272
|
-
}, xa = (n) => `data:image/svg+xml;base64,${btoa(n)}`,
|
|
272
|
+
}, xa = (n) => `data:image/svg+xml;base64,${btoa(n)}`, Mn = (n) => {
|
|
273
273
|
const t = n.replace(/\r?\n/g, ""), e = t.indexOf(",");
|
|
274
274
|
if (e === -1 || e <= 4)
|
|
275
275
|
throw new TypeError("malformed data: URI");
|
|
@@ -292,9 +292,9 @@ let sr, Fa;
|
|
|
292
292
|
const lr = (n) => {
|
|
293
293
|
Fa = n;
|
|
294
294
|
}, cr = () => Fa;
|
|
295
|
-
let
|
|
295
|
+
let Tn;
|
|
296
296
|
const dr = (n) => {
|
|
297
|
-
|
|
297
|
+
Tn = n;
|
|
298
298
|
}, ur = () => new Promise((n) => {
|
|
299
299
|
const t = pt.getHubUrl(), e = (a) => {
|
|
300
300
|
a.origin === t && (window.removeEventListener("message", e), n(a.data));
|
|
@@ -304,7 +304,7 @@ const dr = (n) => {
|
|
|
304
304
|
const n = {
|
|
305
305
|
applicationKey: Fa,
|
|
306
306
|
customerToken: sr,
|
|
307
|
-
bearer:
|
|
307
|
+
bearer: Tn
|
|
308
308
|
};
|
|
309
309
|
return typeof window < "u" && (window.location.href.includes("/workflows/product/") || window.location.href.includes("hub=true")) ? { ...await ur(), ...n } : n;
|
|
310
310
|
};
|
|
@@ -370,25 +370,25 @@ const ft = (n, t, e) => {
|
|
|
370
370
|
if (ga !== void 0)
|
|
371
371
|
return ga(n, t, e);
|
|
372
372
|
try {
|
|
373
|
-
const a =
|
|
374
|
-
return
|
|
373
|
+
const a = Qn(!0);
|
|
374
|
+
return Nn(a), a.createCanvas(n, t, e);
|
|
375
375
|
} catch {
|
|
376
376
|
throw new Error("Canvas module not set");
|
|
377
377
|
}
|
|
378
|
-
},
|
|
378
|
+
}, ae = (n, t) => {
|
|
379
379
|
if (ma !== void 0)
|
|
380
380
|
return ma(n, t);
|
|
381
381
|
try {
|
|
382
|
-
const e =
|
|
383
|
-
return
|
|
382
|
+
const e = Qn(!0);
|
|
383
|
+
return Nn(e), e.loadImage(n, t);
|
|
384
384
|
} catch {
|
|
385
385
|
throw new Error("Canvas module not set");
|
|
386
386
|
}
|
|
387
387
|
};
|
|
388
|
-
function
|
|
388
|
+
function Nn(n) {
|
|
389
389
|
ga = n?.createCanvas, ma = n?.loadImage;
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function Qn(n) {
|
|
392
392
|
try {
|
|
393
393
|
if (document.createElement("canvas").getContext("2d"))
|
|
394
394
|
return {
|
|
@@ -407,25 +407,25 @@ function Nn(n) {
|
|
|
407
407
|
throw t;
|
|
408
408
|
}
|
|
409
409
|
}
|
|
410
|
-
let
|
|
410
|
+
let Ye;
|
|
411
411
|
function Da() {
|
|
412
|
-
return
|
|
412
|
+
return Ye === void 0 && (Ye = ar()), Ye;
|
|
413
413
|
}
|
|
414
|
-
let
|
|
414
|
+
let de = null;
|
|
415
415
|
const mr = (n) => new Promise((t) => {
|
|
416
416
|
if ($e(n) !== "image/jpeg")
|
|
417
417
|
return t(1);
|
|
418
418
|
Ri(n).then((a) => t(a || 1)).catch(() => t(1));
|
|
419
419
|
}), pr = async () => {
|
|
420
|
-
if (
|
|
421
|
-
return !
|
|
422
|
-
const t = await
|
|
423
|
-
return
|
|
420
|
+
if (de !== null)
|
|
421
|
+
return !de;
|
|
422
|
+
const t = await ae("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAIAAwMBEQACEQEDEQH/xABRAAEAAAAAAAAAAAAAAAAAAAAKEAEBAQADAQEAAAAAAAAAAAAGBQQDCAkCBwEBAAAAAAAAAAAAAAAAAAAAABEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8AG8T9NfSMEVMhQvoP3fFiRZ+MTHDifa/95OFSZU5OzRzxkyejv8ciEfhSceSXGjS8eSdLnZc2HDm4M3BxcXwH/9k=");
|
|
423
|
+
return de = t.width === 2 && t.height === 3, !de;
|
|
424
424
|
}, fr = (n) => {
|
|
425
425
|
const e = n.naturalWidth / n.naturalHeight;
|
|
426
426
|
return n.naturalHeight <= 8192 && n.naturalWidth <= 8192 ? [n.naturalWidth, n.naturalHeight] : n.naturalHeight > n.naturalWidth ? [e * 8192, 8192] : [8192, 8192 / e];
|
|
427
427
|
}, Cr = async (n) => {
|
|
428
|
-
const t = await rr(n), e = await
|
|
428
|
+
const t = await rr(n), e = await ae(t), [a, i] = fr(e);
|
|
429
429
|
if (!await pr()) {
|
|
430
430
|
const u = ft(a, i);
|
|
431
431
|
return u.getContext("2d")?.drawImage(e, 0, 0, a, i), u;
|
|
@@ -466,7 +466,7 @@ const mr = (n) => new Promise((t) => {
|
|
|
466
466
|
height: t.height,
|
|
467
467
|
width: t.width
|
|
468
468
|
};
|
|
469
|
-
},
|
|
469
|
+
}, _t = [
|
|
470
470
|
"Yellow C",
|
|
471
471
|
"Yellow 012 C",
|
|
472
472
|
"Orange 021 C",
|
|
@@ -3156,12 +3156,12 @@ const mr = (n) => new Promise((t) => {
|
|
|
3156
3156
|
parseInt(n.substring(4, 6), 16)
|
|
3157
3157
|
]);
|
|
3158
3158
|
function Ad(n) {
|
|
3159
|
-
const t =
|
|
3159
|
+
const t = _t.indexOf(n);
|
|
3160
3160
|
return t >= 0 ? Ft[t] : "";
|
|
3161
3161
|
}
|
|
3162
3162
|
function wr(n) {
|
|
3163
3163
|
const t = Ft.indexOf(n);
|
|
3164
|
-
return t >= 0 ?
|
|
3164
|
+
return t >= 0 ? _t[t] : "";
|
|
3165
3165
|
}
|
|
3166
3166
|
function hd(n, t = 64) {
|
|
3167
3167
|
const e = [], a = [], i = wr(n);
|
|
@@ -3178,33 +3178,33 @@ function hd(n, t = 64) {
|
|
|
3178
3178
|
a.push(A);
|
|
3179
3179
|
}
|
|
3180
3180
|
for (let u = 0; u < a.length; u++)
|
|
3181
|
-
a[u] <= t && !e.some((A) => A.pms ===
|
|
3181
|
+
a[u] <= t && !e.some((A) => A.pms === _t[u]) && e.push({ pms: _t[u], hex: Ft[u], distance: a[u] });
|
|
3182
3182
|
return e.sort((u, A) => u.distance - A.distance);
|
|
3183
3183
|
}
|
|
3184
|
-
const yr =
|
|
3184
|
+
const yr = _t.map((n, t) => ({ pms: n, hex: Ft[t] })), Sr = new Oi(yr, { keys: ["pms"] });
|
|
3185
3185
|
function gd(n, t) {
|
|
3186
3186
|
return Sr.search(n, t ? { limit: t } : void 0);
|
|
3187
3187
|
}
|
|
3188
3188
|
let Qt = null;
|
|
3189
3189
|
function vr(n) {
|
|
3190
3190
|
if (n.startsWith("#"))
|
|
3191
|
-
return
|
|
3191
|
+
return _a(n);
|
|
3192
3192
|
if (!document)
|
|
3193
3193
|
throw new Error("browserColorToHex is only supported on browsers");
|
|
3194
3194
|
if (Qt || (Qt = document.createElement("canvas").getContext("2d")), !Qt)
|
|
3195
3195
|
throw new Error("Failed to create canvas context required to convert colors");
|
|
3196
3196
|
Qt.fillStyle = n;
|
|
3197
|
-
const t =
|
|
3197
|
+
const t = _a(Qt.fillStyle);
|
|
3198
3198
|
return t || console.error(`Unknown browser color ${n}`), t;
|
|
3199
3199
|
}
|
|
3200
|
-
function
|
|
3200
|
+
function _a(n) {
|
|
3201
3201
|
const t = n.substring(1).toUpperCase();
|
|
3202
3202
|
return t.length === 6 ? t : t.length === 3 ? `${t[0]}${t[0]}${t[1]}${t[1]}${t[2]}${t[2]}` : "";
|
|
3203
3203
|
}
|
|
3204
|
-
const
|
|
3205
|
-
const t =
|
|
3204
|
+
const ue = (n) => {
|
|
3205
|
+
const t = Rn(n.spotColor);
|
|
3206
3206
|
return t ? `${n.browserValue} ${t}` : n.browserValue;
|
|
3207
|
-
},
|
|
3207
|
+
}, Rn = (n) => {
|
|
3208
3208
|
if (!n)
|
|
3209
3209
|
return "";
|
|
3210
3210
|
if (n.profileName.includes("/") && n.profileName.includes(".icc")) {
|
|
@@ -3212,7 +3212,7 @@ const de = (n) => {
|
|
|
3212
3212
|
return `icc-named-color(${t.slice(e + 1).slice(0, -4)}, ${n.namedColor})`;
|
|
3213
3213
|
}
|
|
3214
3214
|
return `icc-named-color(${n.profileName}, ${n.namedColor})`;
|
|
3215
|
-
},
|
|
3215
|
+
}, Xa = (n) => {
|
|
3216
3216
|
const t = n.split(/[ ](?=[^)]*?(?:\(|$))/);
|
|
3217
3217
|
if (t.length === 0)
|
|
3218
3218
|
return { browserValue: "#000000" };
|
|
@@ -3240,13 +3240,13 @@ const de = (n) => {
|
|
|
3240
3240
|
"tspan"
|
|
3241
3241
|
], br = ["fill", "stroke"], Dt = (n, t) => {
|
|
3242
3242
|
t(n), n.children.length > 0 && Array.from(n.children).forEach((e) => Dt(e, t));
|
|
3243
|
-
},
|
|
3243
|
+
}, On = (n, t) => {
|
|
3244
3244
|
const e = t(n);
|
|
3245
3245
|
if (e)
|
|
3246
3246
|
return e;
|
|
3247
3247
|
const a = n.parentElement;
|
|
3248
3248
|
if (a)
|
|
3249
|
-
return
|
|
3249
|
+
return On(a, t);
|
|
3250
3250
|
}, Ir = (n, t) => {
|
|
3251
3251
|
try {
|
|
3252
3252
|
return n.matches(t);
|
|
@@ -3263,7 +3263,7 @@ const de = (n) => {
|
|
|
3263
3263
|
}
|
|
3264
3264
|
if (a.tagName === "style") {
|
|
3265
3265
|
try {
|
|
3266
|
-
|
|
3266
|
+
En(a.innerHTML).stylesheet?.rules.forEach((o) => {
|
|
3267
3267
|
e.push(o);
|
|
3268
3268
|
}), a.remove();
|
|
3269
3269
|
} catch (r) {
|
|
@@ -3295,9 +3295,9 @@ const de = (n) => {
|
|
|
3295
3295
|
const t = /pt|pc|mm|cm|in/gm, e = n.getAttribute("viewBox"), a = n.getAttribute("width"), i = n.getAttribute("height");
|
|
3296
3296
|
if (!e) throw new Error("viewBox not specified on SVG!");
|
|
3297
3297
|
a && n.setAttribute("width", a.replace(t, "")), i && n.setAttribute("height", i.replace(t, ""));
|
|
3298
|
-
},
|
|
3298
|
+
}, $n = (n) => dt().parseFromString(n, "image/svg+xml").firstElementChild, Pr = (n, t, e) => {
|
|
3299
3299
|
n.setAttribute("height", `${e}px`), n.setAttribute("width", `${t}px`);
|
|
3300
|
-
},
|
|
3300
|
+
}, Un = (n, t, e) => {
|
|
3301
3301
|
Dt(n, (a) => {
|
|
3302
3302
|
const i = a.attributes.getNamedItem("fill");
|
|
3303
3303
|
i && i.value !== "none" && a.classList.forEach((o) => {
|
|
@@ -3306,13 +3306,13 @@ const de = (n) => {
|
|
|
3306
3306
|
if (s)
|
|
3307
3307
|
a.setAttribute(
|
|
3308
3308
|
"fill",
|
|
3309
|
-
e ?
|
|
3309
|
+
e ? ue(s) : s.browserValue
|
|
3310
3310
|
);
|
|
3311
3311
|
else {
|
|
3312
3312
|
const l = t[o];
|
|
3313
3313
|
l && a.setAttribute(
|
|
3314
3314
|
"fill",
|
|
3315
|
-
e ?
|
|
3315
|
+
e ? ue(l) : l.browserValue
|
|
3316
3316
|
);
|
|
3317
3317
|
}
|
|
3318
3318
|
}
|
|
@@ -3324,28 +3324,28 @@ const de = (n) => {
|
|
|
3324
3324
|
if (s)
|
|
3325
3325
|
a.setAttribute(
|
|
3326
3326
|
"stroke",
|
|
3327
|
-
e ?
|
|
3327
|
+
e ? ue(s) : s.browserValue
|
|
3328
3328
|
);
|
|
3329
3329
|
else {
|
|
3330
3330
|
const l = t[o];
|
|
3331
3331
|
l && a.setAttribute(
|
|
3332
3332
|
"fill",
|
|
3333
|
-
e ?
|
|
3333
|
+
e ? ue(l) : l.browserValue
|
|
3334
3334
|
);
|
|
3335
3335
|
}
|
|
3336
3336
|
}
|
|
3337
3337
|
});
|
|
3338
3338
|
});
|
|
3339
|
-
},
|
|
3340
|
-
const r =
|
|
3339
|
+
}, Ln = (n) => It().serializeToString(n), Ma = (n, t, e, a, i) => {
|
|
3340
|
+
const r = $n(n);
|
|
3341
3341
|
if (!r)
|
|
3342
3342
|
throw new Error("Failed to read SVG.");
|
|
3343
|
-
return Pr(r, t, e),
|
|
3343
|
+
return Pr(r, t, e), Un(r, a, i), Ln(r);
|
|
3344
3344
|
}, Ta = (n, t, e) => {
|
|
3345
|
-
const a =
|
|
3345
|
+
const a = $n(n);
|
|
3346
3346
|
if (!a)
|
|
3347
3347
|
throw new Error("Failed to read SVG.");
|
|
3348
|
-
return
|
|
3348
|
+
return Un(a, t, e), Ln(a);
|
|
3349
3349
|
}, xr = (n) => {
|
|
3350
3350
|
const t = /<svg.*<\/svg>/s, e = n.match(t) || [], a = e?.length > 0 ? e[0] : "";
|
|
3351
3351
|
return dt().parseFromString(a, "image/svg+xml");
|
|
@@ -3360,7 +3360,7 @@ const de = (n) => {
|
|
|
3360
3360
|
let c = "black";
|
|
3361
3361
|
const d = o.parentElement;
|
|
3362
3362
|
if (d) {
|
|
3363
|
-
const u =
|
|
3363
|
+
const u = On(d, (A) => {
|
|
3364
3364
|
const g = A.style.fill;
|
|
3365
3365
|
if (g)
|
|
3366
3366
|
return g;
|
|
@@ -3374,12 +3374,12 @@ const de = (n) => {
|
|
|
3374
3374
|
}
|
|
3375
3375
|
const s = o.attributes.getNamedItem("fill");
|
|
3376
3376
|
if (s && s.value !== "none" && !s.value.startsWith("url(")) {
|
|
3377
|
-
const c =
|
|
3377
|
+
const c = Xa(s.value), d = c.browserValue.replace(/\W/g, ""), u = `spiff-fill-${d}`;
|
|
3378
3378
|
o.setAttribute("fill", c.browserValue), o.classList.add(u), a[d] = c;
|
|
3379
3379
|
}
|
|
3380
3380
|
const l = o.attributes.getNamedItem("stroke");
|
|
3381
3381
|
if (l && l.value !== "none" && !l.value.startsWith("url(")) {
|
|
3382
|
-
const c =
|
|
3382
|
+
const c = Xa(l.value), d = c.browserValue.replace(/\W/g, ""), u = `spiff-stroke-${d}`;
|
|
3383
3383
|
o.classList.add(u), o.setAttribute("stroke", c.browserValue), a[d] = c;
|
|
3384
3384
|
}
|
|
3385
3385
|
});
|
|
@@ -3395,7 +3395,7 @@ const de = (n) => {
|
|
|
3395
3395
|
value
|
|
3396
3396
|
}
|
|
3397
3397
|
}
|
|
3398
|
-
`,
|
|
3398
|
+
`, ne = (n) => C`
|
|
3399
3399
|
${n && Fr || ""}
|
|
3400
3400
|
fragment AssetFields on Asset {
|
|
3401
3401
|
name
|
|
@@ -3439,7 +3439,7 @@ const de = (n) => {
|
|
|
3439
3439
|
${n && "...AssetMetadataFields" || ""}
|
|
3440
3440
|
}
|
|
3441
3441
|
`, Dr = C`
|
|
3442
|
-
${
|
|
3442
|
+
${ne(!1)}
|
|
3443
3443
|
query GetAssets($keys: [String]!) {
|
|
3444
3444
|
assets(keys: $keys) {
|
|
3445
3445
|
...AssetFields
|
|
@@ -3514,7 +3514,7 @@ const de = (n) => {
|
|
|
3514
3514
|
}
|
|
3515
3515
|
}
|
|
3516
3516
|
`, Tr = C`
|
|
3517
|
-
${
|
|
3517
|
+
${ne(!1)}
|
|
3518
3518
|
mutation RemoveBackgroundFromAsset($key: String!) {
|
|
3519
3519
|
assetRemoveBackground(key: $key) {
|
|
3520
3520
|
...AssetFields
|
|
@@ -3642,8 +3642,8 @@ class Rr {
|
|
|
3642
3642
|
const e = t.key;
|
|
3643
3643
|
if (this.bgrmProcessCache.has(e))
|
|
3644
3644
|
return this.bgrmProcessCache.get(e);
|
|
3645
|
-
if (
|
|
3646
|
-
const r = this.getLocalOrFromServer(
|
|
3645
|
+
if (Y.has(e)) {
|
|
3646
|
+
const r = this.getLocalOrFromServer(Y.get(e));
|
|
3647
3647
|
return this.bgrmProcessCache.set(e, r), r;
|
|
3648
3648
|
}
|
|
3649
3649
|
const i = (async () => {
|
|
@@ -3657,7 +3657,7 @@ class Rr {
|
|
|
3657
3657
|
});
|
|
3658
3658
|
if (this.bgrmProcessCache.delete(e), !r.data?.assetRemoveBackground?.key)
|
|
3659
3659
|
throw new Error("Failed to remove background from image");
|
|
3660
|
-
return At.add(r.data.assetRemoveBackground),
|
|
3660
|
+
return At.add(r.data.assetRemoveBackground), Y.add(e, r.data.assetRemoveBackground.key), this.cache.set(
|
|
3661
3661
|
r.data.assetRemoveBackground.key,
|
|
3662
3662
|
Promise.resolve(r.data.assetRemoveBackground)
|
|
3663
3663
|
), r.data.assetRemoveBackground;
|
|
@@ -3665,7 +3665,7 @@ class Rr {
|
|
|
3665
3665
|
return this.bgrmProcessCache.set(e, i), i;
|
|
3666
3666
|
}
|
|
3667
3667
|
removePersistedAsset(t) {
|
|
3668
|
-
At.remove(t),
|
|
3668
|
+
At.remove(t), Y.delete(t), Y.deleteForBgRemovedKey(t);
|
|
3669
3669
|
}
|
|
3670
3670
|
getPersistedAssets() {
|
|
3671
3671
|
return At.list();
|
|
@@ -3771,37 +3771,37 @@ const Rt = "persistentAssets", lt = class lt {
|
|
|
3771
3771
|
};
|
|
3772
3772
|
lt.callbacks = [];
|
|
3773
3773
|
let At = lt;
|
|
3774
|
-
const
|
|
3775
|
-
class
|
|
3774
|
+
const Za = "bgrmPersistentAssets";
|
|
3775
|
+
class Y {
|
|
3776
3776
|
static has(t) {
|
|
3777
|
-
return
|
|
3777
|
+
return Y.getMap().has(t);
|
|
3778
3778
|
}
|
|
3779
3779
|
static get(t) {
|
|
3780
|
-
return
|
|
3780
|
+
return Y.getMap().get(t);
|
|
3781
3781
|
}
|
|
3782
3782
|
static keys() {
|
|
3783
|
-
return
|
|
3783
|
+
return Y.getMap().keys();
|
|
3784
3784
|
}
|
|
3785
3785
|
static values() {
|
|
3786
|
-
return
|
|
3786
|
+
return Y.getMap().values();
|
|
3787
3787
|
}
|
|
3788
3788
|
static add(t, e) {
|
|
3789
|
-
const a =
|
|
3790
|
-
a.set(t, e),
|
|
3789
|
+
const a = Y.getMap();
|
|
3790
|
+
a.set(t, e), Y.setMap(a);
|
|
3791
3791
|
}
|
|
3792
3792
|
static delete(t) {
|
|
3793
|
-
const e =
|
|
3794
|
-
e.delete(t),
|
|
3793
|
+
const e = Y.getMap();
|
|
3794
|
+
e.delete(t), Y.setMap(e);
|
|
3795
3795
|
}
|
|
3796
3796
|
static deleteForBgRemovedKey(t) {
|
|
3797
|
-
const e =
|
|
3798
|
-
a && (e.delete(a),
|
|
3797
|
+
const e = Y.getMap(), a = Array.from(e.keys()).find((i) => e.get(i) === t);
|
|
3798
|
+
a && (e.delete(a), Y.setMap(e));
|
|
3799
3799
|
}
|
|
3800
3800
|
static getMap() {
|
|
3801
|
-
return D.getMap(
|
|
3801
|
+
return D.getMap(Za) || /* @__PURE__ */ new Map();
|
|
3802
3802
|
}
|
|
3803
3803
|
static setMap(t) {
|
|
3804
|
-
D.setMap(
|
|
3804
|
+
D.setMap(Za, t);
|
|
3805
3805
|
}
|
|
3806
3806
|
}
|
|
3807
3807
|
const $ = new Rr();
|
|
@@ -3834,7 +3834,7 @@ class Or {
|
|
|
3834
3834
|
this.disabled = t;
|
|
3835
3835
|
}
|
|
3836
3836
|
}
|
|
3837
|
-
const
|
|
3837
|
+
const Xt = new Or(), Vn = C`
|
|
3838
3838
|
fragment OptionFields on Option {
|
|
3839
3839
|
id
|
|
3840
3840
|
name
|
|
@@ -3876,9 +3876,9 @@ const _t = new Or(), Ln = C`
|
|
|
3876
3876
|
}
|
|
3877
3877
|
}
|
|
3878
3878
|
`, $r = C`
|
|
3879
|
-
${
|
|
3879
|
+
${ne(!1)}
|
|
3880
3880
|
${Na}
|
|
3881
|
-
${
|
|
3881
|
+
${Vn}
|
|
3882
3882
|
query GetOptions($ids: [String]!) {
|
|
3883
3883
|
options(ids: $ids) {
|
|
3884
3884
|
...OptionFields
|
|
@@ -3898,11 +3898,11 @@ const _t = new Or(), Ln = C`
|
|
|
3898
3898
|
});
|
|
3899
3899
|
}), t.data.options;
|
|
3900
3900
|
}, Lr = async (n, t) => (await t).find((a) => a.id === n), Vr = async (n) => {
|
|
3901
|
-
const t = n.map((o) =>
|
|
3901
|
+
const t = n.map((o) => Xt.get({ id: o })), e = n.filter((o, s) => t[s] === void 0);
|
|
3902
3902
|
if (e.length === 0)
|
|
3903
3903
|
return Promise.all(t);
|
|
3904
3904
|
const a = Ur(e), i = e.map(
|
|
3905
|
-
(o) =>
|
|
3905
|
+
(o) => Xt.set({ id: o }, Lr(o, a))
|
|
3906
3906
|
), r = t.filter((o) => o !== void 0);
|
|
3907
3907
|
return await Promise.all(r.concat(i));
|
|
3908
3908
|
};
|
|
@@ -3947,7 +3947,7 @@ class zr {
|
|
|
3947
3947
|
}
|
|
3948
3948
|
}
|
|
3949
3949
|
}
|
|
3950
|
-
const j = new zr(),
|
|
3950
|
+
const j = new zr(), zn = C`
|
|
3951
3951
|
fragment ActiveIntegrationFields on Integration {
|
|
3952
3952
|
id
|
|
3953
3953
|
logo
|
|
@@ -3985,7 +3985,7 @@ const j = new zr(), Vn = C`
|
|
|
3985
3985
|
preloadImageUrl
|
|
3986
3986
|
}
|
|
3987
3987
|
}
|
|
3988
|
-
`,
|
|
3988
|
+
`, Gn = C`
|
|
3989
3989
|
fragment RecipientFields on Recipient {
|
|
3990
3990
|
id
|
|
3991
3991
|
firstName
|
|
@@ -4006,7 +4006,7 @@ const j = new zr(), Vn = C`
|
|
|
4006
4006
|
customField5
|
|
4007
4007
|
conversionConfigurationId
|
|
4008
4008
|
}
|
|
4009
|
-
`,
|
|
4009
|
+
`, ie = C`
|
|
4010
4010
|
fragment ConversionConfigurationFields on ConversionConfiguration {
|
|
4011
4011
|
id
|
|
4012
4012
|
partnerId
|
|
@@ -4036,7 +4036,7 @@ const j = new zr(), Vn = C`
|
|
|
4036
4036
|
}
|
|
4037
4037
|
}
|
|
4038
4038
|
`, Gr = C`
|
|
4039
|
-
${
|
|
4039
|
+
${Gn}
|
|
4040
4040
|
mutation CreateTransactions(
|
|
4041
4041
|
$inputs: [TransactionCreateInput]!
|
|
4042
4042
|
$marketplaceThemeInstallId: String
|
|
@@ -4064,7 +4064,7 @@ const j = new zr(), Vn = C`
|
|
|
4064
4064
|
integrationProductId
|
|
4065
4065
|
}
|
|
4066
4066
|
}
|
|
4067
|
-
`,
|
|
4067
|
+
`, Wn = C`
|
|
4068
4068
|
fragment StakeholderFields on Stakeholder {
|
|
4069
4069
|
id
|
|
4070
4070
|
type
|
|
@@ -4072,7 +4072,7 @@ const j = new zr(), Vn = C`
|
|
|
4072
4072
|
authorizationNote
|
|
4073
4073
|
authorizationStatus
|
|
4074
4074
|
}
|
|
4075
|
-
`,
|
|
4075
|
+
`, qn = C`
|
|
4076
4076
|
fragment TransactionShareActionFields on TransactionShareAction {
|
|
4077
4077
|
id
|
|
4078
4078
|
title
|
|
@@ -4083,8 +4083,8 @@ const j = new zr(), Vn = C`
|
|
|
4083
4083
|
}
|
|
4084
4084
|
`, Wr = C`
|
|
4085
4085
|
${Le}
|
|
4086
|
-
${
|
|
4087
|
-
${
|
|
4086
|
+
${ie}
|
|
4087
|
+
${zn}
|
|
4088
4088
|
query ReadIntegrationProducts($ids: [String!]!) {
|
|
4089
4089
|
integrationProducts(ids: $ids) {
|
|
4090
4090
|
id
|
|
@@ -4174,9 +4174,9 @@ const j = new zr(), Vn = C`
|
|
|
4174
4174
|
}
|
|
4175
4175
|
}
|
|
4176
4176
|
`, qr = C`
|
|
4177
|
-
${Gn}
|
|
4178
4177
|
${Wn}
|
|
4179
|
-
${
|
|
4178
|
+
${qn}
|
|
4179
|
+
${Gn}
|
|
4180
4180
|
query ReadTransactions($ids: [String]!) {
|
|
4181
4181
|
transactions(ids: $ids) {
|
|
4182
4182
|
customLogoLink
|
|
@@ -4237,21 +4237,21 @@ const j = new zr(), Vn = C`
|
|
|
4237
4237
|
id
|
|
4238
4238
|
}
|
|
4239
4239
|
}
|
|
4240
|
-
`,
|
|
4240
|
+
`, Jr = C`
|
|
4241
4241
|
mutation UpdateTransactionWorkflow($id: String!, $workflowId: String!) {
|
|
4242
4242
|
transactionUpdate(id: $id, workflowId: $workflowId) {
|
|
4243
4243
|
id
|
|
4244
4244
|
}
|
|
4245
4245
|
}
|
|
4246
|
-
`,
|
|
4247
|
-
${
|
|
4246
|
+
`, Yr = C`
|
|
4247
|
+
${ie}
|
|
4248
4248
|
query ReadConversionConfigurationQuery($id: String!) {
|
|
4249
4249
|
conversionConfiguration(id: $id) {
|
|
4250
4250
|
...ConversionConfigurationFields
|
|
4251
4251
|
}
|
|
4252
4252
|
}
|
|
4253
4253
|
`, Kr = C`
|
|
4254
|
-
${
|
|
4254
|
+
${ie}
|
|
4255
4255
|
query ReadTransactionForDesignCreation($id: String!) {
|
|
4256
4256
|
transactions(ids: [$id]) {
|
|
4257
4257
|
id
|
|
@@ -4310,7 +4310,7 @@ const j = new zr(), Vn = C`
|
|
|
4310
4310
|
}
|
|
4311
4311
|
}
|
|
4312
4312
|
`, _r = C`
|
|
4313
|
-
${
|
|
4313
|
+
${qn}
|
|
4314
4314
|
query ReadTransactionForShareActions($id: String!) {
|
|
4315
4315
|
transactions(ids: [$id]) {
|
|
4316
4316
|
id
|
|
@@ -4324,7 +4324,7 @@ const j = new zr(), Vn = C`
|
|
|
4324
4324
|
query ConfirmWorkflowStates($transactions: [TransactionConfirmInput!]!) {
|
|
4325
4325
|
transactionConfirmWorkflowStates(transactions: $transactions)
|
|
4326
4326
|
}
|
|
4327
|
-
`,
|
|
4327
|
+
`, jn = (n) => C`
|
|
4328
4328
|
${Le}
|
|
4329
4329
|
fragment IntegrationProductFields on IntegrationProduct {
|
|
4330
4330
|
id
|
|
@@ -4408,14 +4408,14 @@ const j = new zr(), Vn = C`
|
|
|
4408
4408
|
}
|
|
4409
4409
|
}
|
|
4410
4410
|
`, Zr = (n) => C`
|
|
4411
|
-
${
|
|
4411
|
+
${jn(n)}
|
|
4412
4412
|
query GetIntegrationProducts($ids: [String!]!) {
|
|
4413
4413
|
integrationProducts(ids: $ids) {
|
|
4414
4414
|
...IntegrationProductFields
|
|
4415
4415
|
}
|
|
4416
4416
|
}
|
|
4417
4417
|
`, to = (n) => C`
|
|
4418
|
-
${
|
|
4418
|
+
${jn(n)}
|
|
4419
4419
|
query GetIntegrationProductFromExternalIds($externalIntegrationId: String!, $externalProductId: String!) {
|
|
4420
4420
|
integrationProductFromExternalIds(
|
|
4421
4421
|
externalIntegrationId: $externalIntegrationId
|
|
@@ -4425,7 +4425,7 @@ const j = new zr(), Vn = C`
|
|
|
4425
4425
|
}
|
|
4426
4426
|
}
|
|
4427
4427
|
`, eo = C`
|
|
4428
|
-
${
|
|
4428
|
+
${Wn}
|
|
4429
4429
|
query ReadTransactionForStakeholders($id: String!) {
|
|
4430
4430
|
transactions(ids: [$id]) {
|
|
4431
4431
|
stakeholders {
|
|
@@ -4561,9 +4561,9 @@ const j = new zr(), Vn = C`
|
|
|
4561
4561
|
name
|
|
4562
4562
|
}
|
|
4563
4563
|
`, so = (n) => C`
|
|
4564
|
-
${
|
|
4564
|
+
${ne(n)}
|
|
4565
4565
|
${Na}
|
|
4566
|
-
${
|
|
4566
|
+
${Vn}
|
|
4567
4567
|
${no}
|
|
4568
4568
|
${io}
|
|
4569
4569
|
${ro}
|
|
@@ -4985,7 +4985,7 @@ const j = new zr(), Vn = C`
|
|
|
4985
4985
|
}
|
|
4986
4986
|
}
|
|
4987
4987
|
`, co = C`
|
|
4988
|
-
${
|
|
4988
|
+
${ne(!1)}
|
|
4989
4989
|
query GetWorkflowForTheme($id: String!) {
|
|
4990
4990
|
workflow(id: $id) {
|
|
4991
4991
|
id
|
|
@@ -5007,7 +5007,7 @@ const j = new zr(), Vn = C`
|
|
|
5007
5007
|
}
|
|
5008
5008
|
}
|
|
5009
5009
|
`, Ve = C`
|
|
5010
|
-
${
|
|
5010
|
+
${ie}
|
|
5011
5011
|
fragment MarketplaceThemeInstallConfigurationFields on MarketplaceThemeInstallConfiguration {
|
|
5012
5012
|
id
|
|
5013
5013
|
themeInstallId
|
|
@@ -5082,7 +5082,7 @@ const j = new zr(), Vn = C`
|
|
|
5082
5082
|
}
|
|
5083
5083
|
}
|
|
5084
5084
|
`, Ao = C`
|
|
5085
|
-
${
|
|
5085
|
+
${zn}
|
|
5086
5086
|
${Ve}
|
|
5087
5087
|
query GetCurrentIntegration($themeConfigurationId: String) {
|
|
5088
5088
|
currentIntegration {
|
|
@@ -5215,12 +5215,12 @@ const j = new zr(), Vn = C`
|
|
|
5215
5215
|
);
|
|
5216
5216
|
return r;
|
|
5217
5217
|
};
|
|
5218
|
-
class
|
|
5218
|
+
class Hn {
|
|
5219
5219
|
constructor() {
|
|
5220
5220
|
this.timestamp = Date.now();
|
|
5221
5221
|
}
|
|
5222
5222
|
}
|
|
5223
|
-
class
|
|
5223
|
+
class Jn {
|
|
5224
5224
|
/**
|
|
5225
5225
|
* Constructs a new promise queue.
|
|
5226
5226
|
* @param queueMaxSize An optional maximum size, when the max size is hit.
|
|
@@ -5352,7 +5352,7 @@ const k = () => {
|
|
|
5352
5352
|
{
|
|
5353
5353
|
id: "element-group",
|
|
5354
5354
|
clipPath: a.purpose === Yt.FreeDesign ? "url(#viewboxClip)" : void 0,
|
|
5355
|
-
children: y.map((v) =>
|
|
5355
|
+
children: y.map((v) => ai(v)).filter((v) => !!v)
|
|
5356
5356
|
}
|
|
5357
5357
|
),
|
|
5358
5358
|
l && /* @__PURE__ */ P(
|
|
@@ -5459,13 +5459,13 @@ const k = () => {
|
|
|
5459
5459
|
y: s.y - n.height * e.y / 2
|
|
5460
5460
|
};
|
|
5461
5461
|
return {
|
|
5462
|
-
a:
|
|
5463
|
-
b:
|
|
5464
|
-
c:
|
|
5465
|
-
d:
|
|
5462
|
+
a: Ae(i, l, a),
|
|
5463
|
+
b: Ae(r, l, a),
|
|
5464
|
+
c: Ae(o, l, a),
|
|
5465
|
+
d: Ae(s, l, a),
|
|
5466
5466
|
center: l
|
|
5467
5467
|
};
|
|
5468
|
-
},
|
|
5468
|
+
}, Ae = (n, t, e) => {
|
|
5469
5469
|
const a = Math.sin(e), i = Math.cos(e);
|
|
5470
5470
|
return {
|
|
5471
5471
|
x: (n.x - t.x) * i - (n.y - t.y) * a + t.x,
|
|
@@ -5493,9 +5493,9 @@ const k = () => {
|
|
|
5493
5493
|
)
|
|
5494
5494
|
}
|
|
5495
5495
|
) });
|
|
5496
|
-
},
|
|
5496
|
+
}, Kn = (n) => {
|
|
5497
5497
|
const t = `spiff-group-clip-${n.id}`, e = n.rotation || 0, a = Ct(e), i = Math.cos(a), r = -Math.sin(a), o = Ra(n.children);
|
|
5498
|
-
return /* @__PURE__ */ ct(
|
|
5498
|
+
return /* @__PURE__ */ ct(Wt, { children: [
|
|
5499
5499
|
/* @__PURE__ */ P("defs", { children: /* @__PURE__ */ P("clipPath", { id: t, preserveAspectRatio: "none", children: n.clipPath ? /* @__PURE__ */ P("path", { d: n.clipPath }) : /* @__PURE__ */ P("rect", { x: 0, y: 0, width: n.width, height: n.height }) }) }),
|
|
5500
5500
|
/* @__PURE__ */ ct(
|
|
5501
5501
|
"g",
|
|
@@ -5519,7 +5519,7 @@ const k = () => {
|
|
|
5519
5519
|
height: n.height
|
|
5520
5520
|
}
|
|
5521
5521
|
) : void 0,
|
|
5522
|
-
o.map((l) =>
|
|
5522
|
+
o.map((l) => ai(l)).filter((l) => !!l).map((l) => /* @__PURE__ */ P("g", { clipPath: `url(#${t})`, children: l }))
|
|
5523
5523
|
]
|
|
5524
5524
|
}
|
|
5525
5525
|
)
|
|
@@ -5535,8 +5535,8 @@ const k = () => {
|
|
|
5535
5535
|
return n.pattern.src;
|
|
5536
5536
|
};
|
|
5537
5537
|
if (!a())
|
|
5538
|
-
return /* @__PURE__ */ P(
|
|
5539
|
-
const i = () => n.threshold ? n.invertThreshold ? "1 ".repeat(n.threshold) + "0 ".repeat(256 - n.threshold) : "0 ".repeat(n.threshold) + "1 ".repeat(256 - n.threshold) : "", r = () => /* @__PURE__ */ P(
|
|
5538
|
+
return /* @__PURE__ */ P(Wt, {});
|
|
5539
|
+
const i = () => n.threshold ? n.invertThreshold ? "1 ".repeat(n.threshold) + "0 ".repeat(256 - n.threshold) : "0 ".repeat(n.threshold) + "1 ".repeat(256 - n.threshold) : "", r = () => /* @__PURE__ */ P(Wt, { children: n.useThreshold && /* @__PURE__ */ P("defs", { children: /* @__PURE__ */ ct("filter", { id: e, "color-interpolation-filters": "sRGB", children: [
|
|
5540
5540
|
/* @__PURE__ */ P(
|
|
5541
5541
|
"feColorMatrix",
|
|
5542
5542
|
{
|
|
@@ -5579,7 +5579,7 @@ const k = () => {
|
|
|
5579
5579
|
src: a()
|
|
5580
5580
|
}];
|
|
5581
5581
|
};
|
|
5582
|
-
return /* @__PURE__ */ ct(
|
|
5582
|
+
return /* @__PURE__ */ ct(Wt, { children: [
|
|
5583
5583
|
r(),
|
|
5584
5584
|
/* @__PURE__ */ P(
|
|
5585
5585
|
"g",
|
|
@@ -5598,7 +5598,7 @@ const k = () => {
|
|
|
5598
5598
|
matrix(${n.scaleX}, 0, 0, ${n.scaleY}, 0, 0)
|
|
5599
5599
|
`,
|
|
5600
5600
|
children: /* @__PURE__ */ P(
|
|
5601
|
-
|
|
5601
|
+
Kn,
|
|
5602
5602
|
{
|
|
5603
5603
|
id: t,
|
|
5604
5604
|
x: 0,
|
|
@@ -5615,7 +5615,7 @@ const k = () => {
|
|
|
5615
5615
|
}
|
|
5616
5616
|
)
|
|
5617
5617
|
] });
|
|
5618
|
-
},
|
|
5618
|
+
}, _n = /* @__PURE__ */ new Map();
|
|
5619
5619
|
class Eo {
|
|
5620
5620
|
constructor(t) {
|
|
5621
5621
|
this.font = t, this.glyphsFromText = /* @__PURE__ */ new Map(), this.kerningValues = /* @__PURE__ */ new Map(), this.height = this.calculateApproximateHeight();
|
|
@@ -5673,7 +5673,7 @@ const bo = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", _e = /* @_
|
|
|
5673
5673
|
return wt(n).getFont();
|
|
5674
5674
|
} catch {
|
|
5675
5675
|
if (bo(n)) {
|
|
5676
|
-
const a =
|
|
5676
|
+
const a = Mn(n), i = ca(a);
|
|
5677
5677
|
return pa(n, i), i;
|
|
5678
5678
|
} else {
|
|
5679
5679
|
const a = await Oe(n, !0), i = ca(a);
|
|
@@ -5683,20 +5683,20 @@ const bo = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", _e = /* @_
|
|
|
5683
5683
|
})();
|
|
5684
5684
|
return _e.set(n, e), e;
|
|
5685
5685
|
}, Io = (n) => {
|
|
5686
|
-
const t =
|
|
5686
|
+
const t = Mn(n), e = ca(t);
|
|
5687
5687
|
return pa(n, e), e;
|
|
5688
5688
|
}, wt = (n) => {
|
|
5689
|
-
const t =
|
|
5689
|
+
const t = _n.get(n);
|
|
5690
5690
|
if (t)
|
|
5691
5691
|
return t;
|
|
5692
5692
|
throw new Error("Font metrics unavailable for font");
|
|
5693
5693
|
}, pa = (n, t) => {
|
|
5694
5694
|
const e = new Eo(t);
|
|
5695
|
-
return
|
|
5695
|
+
return _n.set(n, e), e;
|
|
5696
5696
|
}, Pd = async (n) => {
|
|
5697
5697
|
const t = dt(), e = t.parseFromString(n, "image/svg+xml"), a = e.firstElementChild, i = /* @__PURE__ */ new Map();
|
|
5698
5698
|
a.querySelectorAll("style").forEach((d) => {
|
|
5699
|
-
|
|
5699
|
+
En(d.innerHTML).stylesheet?.rules.forEach((A) => {
|
|
5700
5700
|
if (A.type === "font-face" && A.declarations) {
|
|
5701
5701
|
const h = A.declarations.find(
|
|
5702
5702
|
(p) => p.property === "font-family"
|
|
@@ -5728,8 +5728,8 @@ const bo = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", _e = /* @_
|
|
|
5728
5728
|
}
|
|
5729
5729
|
return e.querySelectorAll("text").forEach((d) => d.remove()), It().serializeToString(a);
|
|
5730
5730
|
}, Fe = (n, t, e, a) => Math.max(Fo(n.join(`
|
|
5731
|
-
`), e, a), t),
|
|
5732
|
-
const o = (r ||
|
|
5731
|
+
`), e, a), t), tn = (n, t, e, a, i, r) => {
|
|
5732
|
+
const o = (r || ti) * i.getApproximateHeight(), s = t.split(`
|
|
5733
5733
|
`);
|
|
5734
5734
|
try {
|
|
5735
5735
|
const l = s.flatMap((d) => we(d, n.width, a, i)), c = l.flatMap((d) => d.lines);
|
|
@@ -5780,12 +5780,12 @@ const bo = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", _e = /* @_
|
|
|
5780
5780
|
throw new Error(`No max width calculated for text: ${s}.`);
|
|
5781
5781
|
return { lines: s, width: l };
|
|
5782
5782
|
}, Bo = (n, t, e, a, i, r) => {
|
|
5783
|
-
const o = (r ??
|
|
5783
|
+
const o = (r ?? ti) * t.getApproximateHeight(), s = 1 / e.unitsPerEm, l = Xn(n, s, t), c = n.length * o * s, d = a / l, u = i / c;
|
|
5784
5784
|
return Math.min(u, d);
|
|
5785
5785
|
}, Po = (n, t, e, a) => {
|
|
5786
5786
|
const i = wt(t.fontData.assetUrl), r = i.getFont(), o = t.fontSize / r.unitsPerEm;
|
|
5787
5787
|
if (!e)
|
|
5788
|
-
return
|
|
5788
|
+
return tn(t, n, t.fontSize, o, i, a);
|
|
5789
5789
|
let s;
|
|
5790
5790
|
if (t.text ? s = t.text.split(`
|
|
5791
5791
|
`) : s = t.input?.split(`
|
|
@@ -5802,11 +5802,11 @@ const bo = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", _e = /* @_
|
|
|
5802
5802
|
requiredHeight: t.height,
|
|
5803
5803
|
requiredWidth: Fe(s, t.width, o, i),
|
|
5804
5804
|
fontSize: Bo(s, i, r, t.width, t.height, a)
|
|
5805
|
-
} :
|
|
5805
|
+
} : tn(t, n, t.fontSize, o, i, a);
|
|
5806
5806
|
}, xo = (n, t, e, a, i) => {
|
|
5807
5807
|
const o = wt(t.assetUrl).getFont();
|
|
5808
5808
|
let s = { ...n };
|
|
5809
|
-
const l = { ...n }, c =
|
|
5809
|
+
const l = { ...n }, c = Xn(a, e / o.unitsPerEm, wt(t.assetUrl));
|
|
5810
5810
|
return c && c < s.width && (l.width = c, i === "left" ? (l.left += Math.sin(s.rotation * Math.PI / 360) * (s.width - c), l.top += Math.sin(s.rotation * Math.PI / 180) * (c - s.width) / 2) : i === "right" ? l.left += s.width - c : l.left += (s.width - c) / 2, a && Do(a, a).every(([d, u]) => d === u) && (s = l)), s;
|
|
5811
5811
|
}, Xe = 1, mt = (n, t, e) => {
|
|
5812
5812
|
let a = 0;
|
|
@@ -5826,21 +5826,21 @@ const bo = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", _e = /* @_
|
|
|
5826
5826
|
a = Math.max(a, s || 0);
|
|
5827
5827
|
}
|
|
5828
5828
|
}), a *= t, a;
|
|
5829
|
-
},
|
|
5829
|
+
}, Xn = (n, t, e) => {
|
|
5830
5830
|
let a = 0;
|
|
5831
5831
|
return n.forEach((i) => {
|
|
5832
5832
|
a = Math.max(a, mt(i, t, e));
|
|
5833
5833
|
}), a;
|
|
5834
|
-
},
|
|
5834
|
+
}, en = {
|
|
5835
5835
|
stripControlCharacters: !0,
|
|
5836
5836
|
vertical: !1,
|
|
5837
5837
|
uppercase: !1
|
|
5838
|
-
}, De = (n, t =
|
|
5839
|
-
const e = { ...
|
|
5838
|
+
}, De = (n, t = en) => {
|
|
5839
|
+
const e = { ...en, ...t };
|
|
5840
5840
|
let a = n || "";
|
|
5841
5841
|
return e.stripControlCharacters && (a = a.replace(/^(?![\u000A\u000D])[\u0000-\u001F\u007F-\u009F]/g, "")), e.uppercase && (a = a.toUpperCase()), e.vertical && (a = a.split("").join(`
|
|
5842
5842
|
`)), a;
|
|
5843
|
-
}, Do = (n, t) => n.map((e, a) => [e, t[a]]), ko = (n = "center", t = !1) => t ? "center" : n,
|
|
5843
|
+
}, Do = (n, t) => n.map((e, a) => [e, t[a]]), ko = (n = "center", t = !1) => t ? "center" : n, Zn = (n) => n === "left" ? "start" : n === "right" ? "end" : "middle", re = (n, t, e) => n.fontData ? {
|
|
5844
5844
|
...n,
|
|
5845
5845
|
...(() => {
|
|
5846
5846
|
if (n.algorithm === kt.Traditional) {
|
|
@@ -5858,11 +5858,11 @@ const bo = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", _e = /* @_
|
|
|
5858
5858
|
text: t
|
|
5859
5859
|
};
|
|
5860
5860
|
})()
|
|
5861
|
-
} : n,
|
|
5861
|
+
} : n, ti = 1.1;
|
|
5862
5862
|
function xt(n, t) {
|
|
5863
|
-
return
|
|
5863
|
+
return ei(n, t.getTemplatingContext());
|
|
5864
5864
|
}
|
|
5865
|
-
function
|
|
5865
|
+
function ei(n, t) {
|
|
5866
5866
|
try {
|
|
5867
5867
|
n = $i.compile(n)(t);
|
|
5868
5868
|
} catch (e) {
|
|
@@ -5871,12 +5871,12 @@ function ti(n, t) {
|
|
|
5871
5871
|
return n;
|
|
5872
5872
|
}
|
|
5873
5873
|
const Mo = (n) => {
|
|
5874
|
-
const e = (n.rotation || 0) * Math.PI / 180, a = Math.cos(e), i = -Math.sin(e), r = `text-path-${n.id}`, o = `text-fill-${n.id}`, s = n.x + (n.curved ? 0 : n.width / 2), l = n.y + (n.curved ? 0 : n.height / 2), c =
|
|
5874
|
+
const e = (n.rotation || 0) * Math.PI / 180, a = Math.cos(e), i = -Math.sin(e), r = `text-path-${n.id}`, o = `text-fill-${n.id}`, s = n.x + (n.curved ? 0 : n.width / 2), l = n.y + (n.curved ? 0 : n.height / 2), c = ei(n.text || "", n._renderingConfiguration?.templatingContext), d = c.split(`
|
|
5875
5875
|
`), u = n.strokeColor?.browserValue && n.strokeThickness ? n.strokeColor?.browserValue : void 0, A = n.strokeColor?.browserValue && n.strokeThickness ? n.strokeThickness : void 0;
|
|
5876
5876
|
if (n.curved && !n.paths || !n.fontData)
|
|
5877
5877
|
return null;
|
|
5878
|
-
const h = () => n.textFillImage ? `url("#${o}")` : n._renderingConfiguration?.spotColors && n.fillSpotColorDefinition ? `${n.fill} ${
|
|
5879
|
-
return /* @__PURE__ */ ct(
|
|
5878
|
+
const h = () => n.textFillImage ? `url("#${o}")` : n._renderingConfiguration?.spotColors && n.fillSpotColorDefinition ? `${n.fill} ${Rn(n.fillSpotColorDefinition)}` : n.fill;
|
|
5879
|
+
return /* @__PURE__ */ ct(Wt, { children: [
|
|
5880
5880
|
/* @__PURE__ */ ct("defs", { children: [
|
|
5881
5881
|
n.textFillImage && /* @__PURE__ */ P(
|
|
5882
5882
|
"pattern",
|
|
@@ -5967,14 +5967,14 @@ const Mo = (n) => {
|
|
|
5967
5967
|
const o = (n.amountLines - 1) / 2;
|
|
5968
5968
|
return (n.thisLineIdx - o) * i + n.fontSize / 4;
|
|
5969
5969
|
};
|
|
5970
|
-
return /* @__PURE__ */ P("tspan", { textAnchor:
|
|
5970
|
+
return /* @__PURE__ */ P("tspan", { textAnchor: Zn(n.align), x: e(), y: `${a()}px`, children: n.text });
|
|
5971
5971
|
}, No = (n) => {
|
|
5972
5972
|
const t = `#${n.curvedPathId}`;
|
|
5973
5973
|
return /* @__PURE__ */ P(
|
|
5974
5974
|
"textPath",
|
|
5975
5975
|
{
|
|
5976
5976
|
startOffset: n.align === "left" ? "0%" : n.align === "right" ? "100%" : "50%",
|
|
5977
|
-
textAnchor:
|
|
5977
|
+
textAnchor: Zn(n.align),
|
|
5978
5978
|
href: t,
|
|
5979
5979
|
xlinkHref: t,
|
|
5980
5980
|
children: n.text
|
|
@@ -6103,7 +6103,7 @@ class Ro {
|
|
|
6103
6103
|
layouts: {}
|
|
6104
6104
|
};
|
|
6105
6105
|
t.forEach((i) => {
|
|
6106
|
-
a = new
|
|
6106
|
+
a = new oi(i).apply(a);
|
|
6107
6107
|
}), this.runStateCallbacks(), this.state = {
|
|
6108
6108
|
transaction: a
|
|
6109
6109
|
};
|
|
@@ -6113,7 +6113,7 @@ class Ro {
|
|
|
6113
6113
|
return { ...t, transaction: e.apply(a) };
|
|
6114
6114
|
}
|
|
6115
6115
|
}
|
|
6116
|
-
const
|
|
6116
|
+
const ai = (n) => n.type === F.Image ? /* @__PURE__ */ P(Yn, { ...n }, n.id) : n.type === F.Frame ? /* @__PURE__ */ P(vo, { ...n }, n.id) : n.type === F.Illustration ? /* @__PURE__ */ P(Qo, { ...n }, n.id) : n.type === F.Textbox ? /* @__PURE__ */ P(Mo, { ...n }, n.id) : n.type === F.Group ? /* @__PURE__ */ P(Kn, { ...n }, n.id) : null, Qa = (n, t, e) => {
|
|
6117
6117
|
const a = e.renderingConfiguration, i = a?.removeExcludedElements ? t.filter((r) => !r.excludeFromExport) : t;
|
|
6118
6118
|
return /* @__PURE__ */ P(
|
|
6119
6119
|
So,
|
|
@@ -6153,7 +6153,7 @@ function Ra(n) {
|
|
|
6153
6153
|
return r < o ? -1 : r > o ? 1 : 0;
|
|
6154
6154
|
});
|
|
6155
6155
|
}
|
|
6156
|
-
const
|
|
6156
|
+
const oe = (n) => {
|
|
6157
6157
|
const t = n.variants;
|
|
6158
6158
|
if (t) {
|
|
6159
6159
|
if (t.length === 1)
|
|
@@ -6161,7 +6161,7 @@ const re = (n) => {
|
|
|
6161
6161
|
if (n.defaultVariant !== void 0)
|
|
6162
6162
|
return t.find((e) => e.id === n.defaultVariant);
|
|
6163
6163
|
}
|
|
6164
|
-
}, ht = /* @__PURE__ */ new Map(),
|
|
6164
|
+
}, ht = /* @__PURE__ */ new Map(), zt = /* @__PURE__ */ new Map(), Ze = /* @__PURE__ */ new Map(), ni = async (n, t) => {
|
|
6165
6165
|
if (!t) {
|
|
6166
6166
|
if (!n) throw new Error("No region or src supplied. Cannot construct frame!");
|
|
6167
6167
|
return fa(n);
|
|
@@ -6176,7 +6176,7 @@ const re = (n) => {
|
|
|
6176
6176
|
}, Oo = (n, t) => {
|
|
6177
6177
|
if (!t)
|
|
6178
6178
|
return;
|
|
6179
|
-
const e = t.variants?.find((a) => a.id === n.frameVariantId) ||
|
|
6179
|
+
const e = t.variants?.find((a) => a.id === n.frameVariantId) || oe(t);
|
|
6180
6180
|
if (!e)
|
|
6181
6181
|
throw new Error(`No variant with ID: ${n.frameVariantId}`);
|
|
6182
6182
|
if (!e.asset)
|
|
@@ -6186,8 +6186,8 @@ const re = (n) => {
|
|
|
6186
6186
|
if (Ze.has(n))
|
|
6187
6187
|
return Ze.get(n);
|
|
6188
6188
|
const e = (async () => {
|
|
6189
|
-
if (
|
|
6190
|
-
return
|
|
6189
|
+
if (zt.has(n))
|
|
6190
|
+
return zt.get(n);
|
|
6191
6191
|
await new Promise((A) => setTimeout(A, 0));
|
|
6192
6192
|
const i = dt().parseFromString(n, "image/svg+xml"), r = i.querySelector("svg");
|
|
6193
6193
|
if (!r)
|
|
@@ -6205,7 +6205,7 @@ const re = (n) => {
|
|
|
6205
6205
|
width: c,
|
|
6206
6206
|
height: l
|
|
6207
6207
|
};
|
|
6208
|
-
return
|
|
6208
|
+
return zt.set(A, h), h;
|
|
6209
6209
|
}
|
|
6210
6210
|
if (u) {
|
|
6211
6211
|
const A = u.getAttribute("d");
|
|
@@ -6216,7 +6216,7 @@ const re = (n) => {
|
|
|
6216
6216
|
width: c,
|
|
6217
6217
|
height: l
|
|
6218
6218
|
};
|
|
6219
|
-
return
|
|
6219
|
+
return zt.set(A, h), h;
|
|
6220
6220
|
}
|
|
6221
6221
|
throw new Error("Malformed frame SVG");
|
|
6222
6222
|
})();
|
|
@@ -6235,7 +6235,7 @@ const re = (n) => {
|
|
|
6235
6235
|
if (ht.has(n))
|
|
6236
6236
|
return ht.get(n);
|
|
6237
6237
|
if (n.startsWith("data:image/svg+xml")) {
|
|
6238
|
-
const e = Ui(n), a = new TextDecoder().decode(e.buffer), i =
|
|
6238
|
+
const e = Ui(n), a = new TextDecoder().decode(e.buffer), i = ii(a), r = {
|
|
6239
6239
|
src: n,
|
|
6240
6240
|
width: i.width,
|
|
6241
6241
|
height: i.height,
|
|
@@ -6262,12 +6262,12 @@ const re = (n) => {
|
|
|
6262
6262
|
}
|
|
6263
6263
|
}, $a = async (n) => {
|
|
6264
6264
|
const t = await at(n);
|
|
6265
|
-
return
|
|
6266
|
-
},
|
|
6265
|
+
return ii(t);
|
|
6266
|
+
}, an = (n) => n.endsWith("mm") ? Number(n.replace("mm", "")) * 3.7795275591 : n.endsWith("px") ? Number(n.replace("px", "")) : Number(n), ii = (n) => {
|
|
6267
6267
|
const a = dt().parseFromString(n, "image/svg+xml").querySelector("svg");
|
|
6268
6268
|
if (!a)
|
|
6269
6269
|
throw new Error("No svg tag found, this svg must be malformed!");
|
|
6270
|
-
const i = a.getAttribute("viewBox"), r = a.getAttribute("width"), o = a.getAttribute("height"), s = o && r ? [0, 0,
|
|
6270
|
+
const i = a.getAttribute("viewBox"), r = a.getAttribute("width"), o = a.getAttribute("height"), s = o && r ? [0, 0, an(r), an(o)] : i?.split(" ").map((l) => Number(l));
|
|
6271
6271
|
if (!s)
|
|
6272
6272
|
throw new Error("No viewbox or width/height values detected on SVG file!");
|
|
6273
6273
|
return {
|
|
@@ -6277,11 +6277,11 @@ const re = (n) => {
|
|
|
6277
6277
|
}, $t = (n, t) => {
|
|
6278
6278
|
const e = n.layoutState.elements.filter((i) => i.layer === t), a = Math.max(...e.map((i) => i.layerIndex).filter((i) => i !== void 0));
|
|
6279
6279
|
return Math.max(a, 0) + 1;
|
|
6280
|
-
},
|
|
6280
|
+
}, ri = async (n) => new Promise((t) => {
|
|
6281
6281
|
at(n).then((e) => {
|
|
6282
6282
|
t(e);
|
|
6283
6283
|
}).catch((e) => console.error(e));
|
|
6284
|
-
}), ta = /* @__PURE__ */ new Map(),
|
|
6284
|
+
}), ta = /* @__PURE__ */ new Map(), Zt = async (n) => {
|
|
6285
6285
|
if (ta.has(n))
|
|
6286
6286
|
return ta.get(n);
|
|
6287
6287
|
const t = async (i) => new Promise((r, o) => {
|
|
@@ -6303,7 +6303,7 @@ const re = (n) => {
|
|
|
6303
6303
|
anonymousCrossOrigin: !0,
|
|
6304
6304
|
ignoreDimensions: !1,
|
|
6305
6305
|
createCanvas: ft,
|
|
6306
|
-
createImage:
|
|
6306
|
+
createImage: ae,
|
|
6307
6307
|
DOMParser: Da(),
|
|
6308
6308
|
fetch: nt
|
|
6309
6309
|
}), A = o.getAttribute("width"), h = o.getAttribute("height"), g = 2048;
|
|
@@ -6330,7 +6330,7 @@ const re = (n) => {
|
|
|
6330
6330
|
panelId: n.layoutState.layout.panelId
|
|
6331
6331
|
};
|
|
6332
6332
|
if (e && t === F.Illustration) {
|
|
6333
|
-
const l = await st(await
|
|
6333
|
+
const l = await st(await ri(e)), A = dt().parseFromString(l.svg, "image/svg+xml").firstElementChild.getAttribute("viewBox");
|
|
6334
6334
|
if (!A) throw new Error("SVG missing viewBox.");
|
|
6335
6335
|
const h = s.height, g = A.split(" "), m = parseFloat(g[2]) || 1, p = parseFloat(g[3]) || 1, f = m / p;
|
|
6336
6336
|
s.height = s.width / f, s.top += (h - s.height) / 2;
|
|
@@ -6348,7 +6348,7 @@ const re = (n) => {
|
|
|
6348
6348
|
};
|
|
6349
6349
|
class xd {
|
|
6350
6350
|
static async getFrame(t, e) {
|
|
6351
|
-
const a = await
|
|
6351
|
+
const a = await ni(e.region, e.src), i = await ze(a), r = e.region || await Ut(t, F.Frame);
|
|
6352
6352
|
return {
|
|
6353
6353
|
id: k(),
|
|
6354
6354
|
x: r.left,
|
|
@@ -6400,7 +6400,7 @@ class xd {
|
|
|
6400
6400
|
}), u = e.region || await Ut(t, F.Textbox, i, {
|
|
6401
6401
|
text: d,
|
|
6402
6402
|
fontScale: a.size ? a.size / o.unitsPerEm : void 0
|
|
6403
|
-
}), A =
|
|
6403
|
+
}), A = re(
|
|
6404
6404
|
{
|
|
6405
6405
|
id: k(),
|
|
6406
6406
|
type: F.Textbox,
|
|
@@ -6482,7 +6482,7 @@ class xd {
|
|
|
6482
6482
|
};
|
|
6483
6483
|
}
|
|
6484
6484
|
static async getIllustration(t, e) {
|
|
6485
|
-
const a = e.region?.item || await Ut(t, F.Illustration, e.src), i = await st(await
|
|
6485
|
+
const a = e.region?.item || await Ut(t, F.Illustration, e.src), i = await st(await ri(e.src)), r = await Zt(i.svg), o = k();
|
|
6486
6486
|
return {
|
|
6487
6487
|
cachedObjectURL: r,
|
|
6488
6488
|
stepRegion: e.region?.item,
|
|
@@ -6520,7 +6520,7 @@ const U = (n, t) => _(n, t).elements.find((i) => i.id === n), _ = (n, t) => {
|
|
|
6520
6520
|
elements: a,
|
|
6521
6521
|
modificationID: k()
|
|
6522
6522
|
};
|
|
6523
|
-
},
|
|
6523
|
+
}, nn = async (n) => {
|
|
6524
6524
|
const t = [...Object.keys(n.layouts)], e = [...new Set(t)];
|
|
6525
6525
|
for (let a = 0; a < e.length; a++) {
|
|
6526
6526
|
const i = e[a], r = n.layouts[i];
|
|
@@ -6556,7 +6556,7 @@ const U = (n, t) => _(n, t).elements.find((i) => i.id === n), _ = (n, t) => {
|
|
|
6556
6556
|
const s = i[o];
|
|
6557
6557
|
if (s.src && s.svg)
|
|
6558
6558
|
try {
|
|
6559
|
-
s.cachedObjectURL = await
|
|
6559
|
+
s.cachedObjectURL = await Zt(s.svg);
|
|
6560
6560
|
} catch (l) {
|
|
6561
6561
|
console.log(l);
|
|
6562
6562
|
}
|
|
@@ -6580,7 +6580,7 @@ class R {
|
|
|
6580
6580
|
this.oldState = t;
|
|
6581
6581
|
}
|
|
6582
6582
|
}
|
|
6583
|
-
class
|
|
6583
|
+
class rn extends R {
|
|
6584
6584
|
constructor(t) {
|
|
6585
6585
|
super(), this.serializableWorkflow = t;
|
|
6586
6586
|
}
|
|
@@ -6655,7 +6655,7 @@ class kd extends R {
|
|
|
6655
6655
|
o.scaleX = o.scaleX * this.width / e.width, o.scaleY = o.scaleY * this.height / e.height;
|
|
6656
6656
|
} else if (e.type === "textbox") {
|
|
6657
6657
|
const o = a, s = (!o.algorithm || o.algorithm === kt.Autosize ? o.text : o.input) ?? "";
|
|
6658
|
-
a =
|
|
6658
|
+
a = re(o, s, e);
|
|
6659
6659
|
}
|
|
6660
6660
|
const i = _(e.id, Object.values(t.layouts)), r = Z(a, i);
|
|
6661
6661
|
return {
|
|
@@ -6675,7 +6675,7 @@ class O extends R {
|
|
|
6675
6675
|
return this.oldState = t, this.commands.reduce((e, a) => a.apply(e), t);
|
|
6676
6676
|
}
|
|
6677
6677
|
}
|
|
6678
|
-
class
|
|
6678
|
+
class oi extends R {
|
|
6679
6679
|
constructor(t) {
|
|
6680
6680
|
super(), this.layout = t;
|
|
6681
6681
|
}
|
|
@@ -6832,7 +6832,7 @@ class Uo extends R {
|
|
|
6832
6832
|
const a = {
|
|
6833
6833
|
...e,
|
|
6834
6834
|
fontSize: this.size
|
|
6835
|
-
}, i = _(e.id, Object.values(t.layouts)), r = (!e.algorithm || e.algorithm === kt.Autosize ? e.text : e.input) ?? "", o = Z(
|
|
6835
|
+
}, i = _(e.id, Object.values(t.layouts)), r = (!e.algorithm || e.algorithm === kt.Autosize ? e.text : e.input) ?? "", o = Z(re(a, r), i);
|
|
6836
6836
|
return {
|
|
6837
6837
|
...t,
|
|
6838
6838
|
layouts: {
|
|
@@ -6842,7 +6842,7 @@ class Uo extends R {
|
|
|
6842
6842
|
};
|
|
6843
6843
|
}
|
|
6844
6844
|
}
|
|
6845
|
-
class
|
|
6845
|
+
class on extends R {
|
|
6846
6846
|
constructor(t, e) {
|
|
6847
6847
|
super(), this.id = t, this.fontData = e;
|
|
6848
6848
|
}
|
|
@@ -6854,7 +6854,7 @@ class rn extends R {
|
|
|
6854
6854
|
const a = {
|
|
6855
6855
|
...e,
|
|
6856
6856
|
fontData: this.fontData
|
|
6857
|
-
}, i = _(e.id, Object.values(t.layouts)), r = (!e.algorithm || e.algorithm === kt.Autosize ? e.text : e.input) ?? "", o = Z(
|
|
6857
|
+
}, i = _(e.id, Object.values(t.layouts)), r = (!e.algorithm || e.algorithm === kt.Autosize ? e.text : e.input) ?? "", o = Z(re(a, r), i);
|
|
6858
6858
|
return {
|
|
6859
6859
|
...t,
|
|
6860
6860
|
layouts: {
|
|
@@ -6978,7 +6978,7 @@ class Go extends R {
|
|
|
6978
6978
|
const e = U(this.id, Object.values(t.layouts));
|
|
6979
6979
|
if (!e.id)
|
|
6980
6980
|
throw new V();
|
|
6981
|
-
const a = _(e.id, Object.values(t.layouts)), i = Z(
|
|
6981
|
+
const a = _(e.id, Object.values(t.layouts)), i = Z(re(e, this.text, e), a);
|
|
6982
6982
|
return {
|
|
6983
6983
|
...t,
|
|
6984
6984
|
layouts: {
|
|
@@ -7180,7 +7180,7 @@ class Rd extends R {
|
|
|
7180
7180
|
};
|
|
7181
7181
|
}
|
|
7182
7182
|
}
|
|
7183
|
-
class
|
|
7183
|
+
class sn {
|
|
7184
7184
|
constructor(t, e, a) {
|
|
7185
7185
|
this.processRegion = async (i) => {
|
|
7186
7186
|
const r = this.layouts.find((l) => l.panelId === i.panelId);
|
|
@@ -7233,7 +7233,7 @@ class on {
|
|
|
7233
7233
|
}))()), u = {
|
|
7234
7234
|
stepName: this.configuration.stepName,
|
|
7235
7235
|
id: k(),
|
|
7236
|
-
cachedObjectURL: await
|
|
7236
|
+
cachedObjectURL: await Zt(d.svg),
|
|
7237
7237
|
src: l,
|
|
7238
7238
|
svg: d.svg,
|
|
7239
7239
|
colors: d.colors,
|
|
@@ -7292,7 +7292,7 @@ const qo = async (n) => {
|
|
|
7292
7292
|
throw console.error(e), new Re("Failed to shorten URL, see console.");
|
|
7293
7293
|
}
|
|
7294
7294
|
};
|
|
7295
|
-
class
|
|
7295
|
+
class si {
|
|
7296
7296
|
async poll() {
|
|
7297
7297
|
try {
|
|
7298
7298
|
if (await this.predicate()) {
|
|
@@ -7341,12 +7341,12 @@ class jo {
|
|
|
7341
7341
|
const h = (await xe([e]))[0], g = h?.versions?.find((m) => m.name === "mpeg4")?.link;
|
|
7342
7342
|
return { asset: h, link: g };
|
|
7343
7343
|
}, o = await new Promise((h, g) => {
|
|
7344
|
-
new
|
|
7344
|
+
new si(
|
|
7345
7345
|
async () => !!(await r()).link,
|
|
7346
7346
|
async () => {
|
|
7347
7347
|
const m = await r();
|
|
7348
7348
|
if (!m.link || !m.link)
|
|
7349
|
-
throw new
|
|
7349
|
+
throw new Kt(m.asset);
|
|
7350
7350
|
h({
|
|
7351
7351
|
rel: "mpeg4",
|
|
7352
7352
|
href: m.link
|
|
@@ -7381,7 +7381,7 @@ class jo {
|
|
|
7381
7381
|
return t.data.regions.map(e);
|
|
7382
7382
|
}
|
|
7383
7383
|
async command(t, e, a, i) {
|
|
7384
|
-
const r = a.getLayouts(), s = `data:image/svg+xml;base64,${btoa(await
|
|
7384
|
+
const r = a.getLayouts(), s = `data:image/svg+xml;base64,${btoa(await bn(t, { type: "svg" }))}`, l = e.map((c) => {
|
|
7385
7385
|
const d = c.region, u = r.find((A) => A.panelId === d?.panelId);
|
|
7386
7386
|
if (!u && d)
|
|
7387
7387
|
throw new H(d);
|
|
@@ -7410,7 +7410,7 @@ class jo {
|
|
|
7410
7410
|
} };
|
|
7411
7411
|
}
|
|
7412
7412
|
}
|
|
7413
|
-
const
|
|
7413
|
+
const li = new jo();
|
|
7414
7414
|
class ke {
|
|
7415
7415
|
constructor() {
|
|
7416
7416
|
this.frameSourceSvg = async (t, e) => {
|
|
@@ -7422,7 +7422,7 @@ class ke {
|
|
|
7422
7422
|
const i = a.fileLink;
|
|
7423
7423
|
if (i)
|
|
7424
7424
|
return at(i, !0);
|
|
7425
|
-
throw new
|
|
7425
|
+
throw new Kt(a);
|
|
7426
7426
|
};
|
|
7427
7427
|
}
|
|
7428
7428
|
async init(t, e, a) {
|
|
@@ -7529,7 +7529,7 @@ class ke {
|
|
|
7529
7529
|
const s = e.fileLink || "";
|
|
7530
7530
|
return s.endsWith(".pdf") || s.endsWith(".eps") || s.endsWith(".ai") ? new Promise((l) => {
|
|
7531
7531
|
a.addPoller(
|
|
7532
|
-
new
|
|
7532
|
+
new si(
|
|
7533
7533
|
async () => {
|
|
7534
7534
|
const d = (await $.getFromServer(e.key || "")).versions?.find((A) => A.name === "svg");
|
|
7535
7535
|
return d ? (await nt(d.link)).status === 200 : !1;
|
|
@@ -7752,7 +7752,7 @@ class ke {
|
|
|
7752
7752
|
const a = t.fileLink;
|
|
7753
7753
|
if (a)
|
|
7754
7754
|
return a;
|
|
7755
|
-
throw new
|
|
7755
|
+
throw new Kt(t);
|
|
7756
7756
|
}
|
|
7757
7757
|
async loadPatternFromAsset(t, e, a, i) {
|
|
7758
7758
|
const r = ke.patternSource(t), o = a.markUpdatePending(), s = a.getWorkflowExperience().getStepById(e.stepName)?.frameService;
|
|
@@ -7892,7 +7892,7 @@ class Ho {
|
|
|
7892
7892
|
spotColor: u.spotColor,
|
|
7893
7893
|
pmsValue: u.pmsValue
|
|
7894
7894
|
};
|
|
7895
|
-
const s = Ma(t, e, a, o), l = await
|
|
7895
|
+
const s = Ma(t, e, a, o), l = await Zt(s), c = [];
|
|
7896
7896
|
for (const d of i) {
|
|
7897
7897
|
for (const [u, A] of r.entries())
|
|
7898
7898
|
c.push(new wa(d, u, A));
|
|
@@ -7951,8 +7951,8 @@ class Ho {
|
|
|
7951
7951
|
throw new bt(e);
|
|
7952
7952
|
const l = s.fileLink;
|
|
7953
7953
|
if (!l)
|
|
7954
|
-
throw new
|
|
7955
|
-
const c = await st(await this.getIllustrationBody(l)), d = await
|
|
7954
|
+
throw new Kt(s);
|
|
7955
|
+
const c = await st(await this.getIllustrationBody(l)), d = await Zt(c.svg), u = (f, E) => {
|
|
7956
7956
|
const w = r.getLayouts().find((y) => y.panelId === f.panelId);
|
|
7957
7957
|
if (!w)
|
|
7958
7958
|
throw new H(f);
|
|
@@ -8021,7 +8021,7 @@ class Ho {
|
|
|
8021
8021
|
}
|
|
8022
8022
|
}
|
|
8023
8023
|
const ye = new Ho();
|
|
8024
|
-
class
|
|
8024
|
+
class Jo {
|
|
8025
8025
|
async init(t, e, a) {
|
|
8026
8026
|
const i = t.option;
|
|
8027
8027
|
if (!i)
|
|
@@ -8100,8 +8100,8 @@ class Yo {
|
|
|
8100
8100
|
};
|
|
8101
8101
|
}
|
|
8102
8102
|
}
|
|
8103
|
-
const
|
|
8104
|
-
class
|
|
8103
|
+
const ci = new Jo();
|
|
8104
|
+
class Yo {
|
|
8105
8105
|
async init(t, e, a) {
|
|
8106
8106
|
const i = t.option;
|
|
8107
8107
|
if (!i) throw new Be(t);
|
|
@@ -8185,7 +8185,7 @@ class Jo {
|
|
|
8185
8185
|
};
|
|
8186
8186
|
}
|
|
8187
8187
|
}
|
|
8188
|
-
const
|
|
8188
|
+
const di = new Yo();
|
|
8189
8189
|
class Ko {
|
|
8190
8190
|
async init(t, e, a) {
|
|
8191
8191
|
if (a)
|
|
@@ -8306,7 +8306,7 @@ class Ko {
|
|
|
8306
8306
|
return i(""), { input: e, helperData: {} };
|
|
8307
8307
|
}
|
|
8308
8308
|
}
|
|
8309
|
-
const
|
|
8309
|
+
const ui = new Ko();
|
|
8310
8310
|
class _o {
|
|
8311
8311
|
async init(t, e, a) {
|
|
8312
8312
|
const i = t.option;
|
|
@@ -8402,7 +8402,7 @@ class _o {
|
|
|
8402
8402
|
};
|
|
8403
8403
|
}
|
|
8404
8404
|
}
|
|
8405
|
-
const
|
|
8405
|
+
const Ai = new _o();
|
|
8406
8406
|
class Xo {
|
|
8407
8407
|
async init(t, e, a) {
|
|
8408
8408
|
const i = t.option;
|
|
@@ -8457,7 +8457,7 @@ class Xo {
|
|
|
8457
8457
|
};
|
|
8458
8458
|
}
|
|
8459
8459
|
}
|
|
8460
|
-
const
|
|
8460
|
+
const hi = new Xo();
|
|
8461
8461
|
class Zo {
|
|
8462
8462
|
constructor() {
|
|
8463
8463
|
this.shapeFillId = "spiff-fill-shape";
|
|
@@ -8627,7 +8627,7 @@ class Zo {
|
|
|
8627
8627
|
}
|
|
8628
8628
|
}
|
|
8629
8629
|
}
|
|
8630
|
-
const
|
|
8630
|
+
const Gt = new Zo();
|
|
8631
8631
|
class ts {
|
|
8632
8632
|
constructor() {
|
|
8633
8633
|
this.latestToast = null, this.toastType = null, this.toastCallbacks = [];
|
|
@@ -9007,7 +9007,7 @@ class ns {
|
|
|
9007
9007
|
A,
|
|
9008
9008
|
async () => {
|
|
9009
9009
|
e.updateMetadata(t.stepName, { color: h, text: g }), e.updateStorage(t.stepName, { text: g, inputText: g });
|
|
9010
|
-
const p = s.map((E) => new
|
|
9010
|
+
const p = s.map((E) => new on(E.id, u)), f = new O(p);
|
|
9011
9011
|
e.getCommandDispatcher()(f);
|
|
9012
9012
|
}
|
|
9013
9013
|
), s.length === 0 && l) {
|
|
@@ -9100,7 +9100,7 @@ class ns {
|
|
|
9100
9100
|
throw new bt(t);
|
|
9101
9101
|
const a = e.fileLink;
|
|
9102
9102
|
if (!a)
|
|
9103
|
-
throw new
|
|
9103
|
+
throw new Kt(e);
|
|
9104
9104
|
const i = await Tt(a);
|
|
9105
9105
|
return {
|
|
9106
9106
|
assetUrl: a,
|
|
@@ -9110,7 +9110,7 @@ class ns {
|
|
|
9110
9110
|
async selectVariantCommand(t, e, a, i, r, o, s, l, c) {
|
|
9111
9111
|
const d = r.markUpdatePending(), u = await this.fontDataFromVariant(e);
|
|
9112
9112
|
if (i.length > 0) {
|
|
9113
|
-
const A = i.map((m) => new
|
|
9113
|
+
const A = i.map((m) => new on(m.id, u));
|
|
9114
9114
|
if (l) {
|
|
9115
9115
|
const m = i.map((p) => new ea(p.id, l));
|
|
9116
9116
|
A.push(...m);
|
|
@@ -9248,10 +9248,10 @@ class ns {
|
|
|
9248
9248
|
v.push(
|
|
9249
9249
|
this.generateTextChangeCommandsForRegion(G, a, y.id, N)
|
|
9250
9250
|
);
|
|
9251
|
-
const
|
|
9251
|
+
const J = new z(y, m);
|
|
9252
9252
|
return {
|
|
9253
9253
|
regionElement: { id: p, region: A, regionIndex: h },
|
|
9254
|
-
commands: [
|
|
9254
|
+
commands: [J, ...v],
|
|
9255
9255
|
newElement: y,
|
|
9256
9256
|
fontData: i
|
|
9257
9257
|
};
|
|
@@ -9343,13 +9343,13 @@ const rs = "data:application/octet-stream;base64,AAEAAAAPAIAAAwBwRkZUTYdHeHoAAEl
|
|
|
9343
9343
|
const e = et("rect");
|
|
9344
9344
|
return e.setAttribute("height", `${n}`), e.setAttribute("width", `${t}`), e;
|
|
9345
9345
|
}, ss = (n, t, e, a) => {
|
|
9346
|
-
const i =
|
|
9346
|
+
const i = ce("filter");
|
|
9347
9347
|
i.setAttribute("id", a), i.setAttribute("height", "200%"), i.setAttribute("width", "200%"), i.setAttribute("x", "-50%"), i.setAttribute("y", "-50%");
|
|
9348
|
-
const r =
|
|
9348
|
+
const r = ce("feOffset");
|
|
9349
9349
|
i.appendChild(r), r.setAttribute("result", "offOut"), r.setAttribute("in", "SourceAlpha"), r.setAttribute("dx", `${n}`), r.setAttribute("dy", `${t}`);
|
|
9350
|
-
const o =
|
|
9350
|
+
const o = ce("feGaussianBlur");
|
|
9351
9351
|
i.appendChild(o), o.setAttribute("result", "blurOut"), o.setAttribute("in", "offOut"), o.setAttribute("stdDeviation", `${e}`);
|
|
9352
|
-
const s =
|
|
9352
|
+
const s = ce("feBlend");
|
|
9353
9353
|
return i.appendChild(s), s.setAttribute("in", "SourceGraphic"), s.setAttribute("in2", "blurOut"), s.setAttribute("mode", "normal"), i;
|
|
9354
9354
|
}, ls = (n) => {
|
|
9355
9355
|
let t = n;
|
|
@@ -9371,7 +9371,7 @@ function ds(n, t, e, a) {
|
|
|
9371
9371
|
const i = e / n, r = a / t;
|
|
9372
9372
|
return i > 1 && r > 1 ? Math.min(i, r) : i > 1 && r < 1 ? r : i < 1 && r > 1 ? i : Math.min(i, r);
|
|
9373
9373
|
}
|
|
9374
|
-
const
|
|
9374
|
+
const ln = {
|
|
9375
9375
|
m: ["x", "y"],
|
|
9376
9376
|
z: [],
|
|
9377
9377
|
l: ["x", "y"],
|
|
@@ -9401,7 +9401,7 @@ class us {
|
|
|
9401
9401
|
const i = (r) => {
|
|
9402
9402
|
const o = [], s = r.relative ? r.type : r.type.toUpperCase();
|
|
9403
9403
|
let l = e !== s;
|
|
9404
|
-
const c =
|
|
9404
|
+
const c = ln[r.type];
|
|
9405
9405
|
l && (o.push(s), e = s);
|
|
9406
9406
|
for (const d of c) {
|
|
9407
9407
|
const u = r[d];
|
|
@@ -9426,7 +9426,7 @@ class us {
|
|
|
9426
9426
|
const e = /([mzlhvcsqta])([^mzlhvcsqta]*)/gi, a = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi, i = [];
|
|
9427
9427
|
let r;
|
|
9428
9428
|
for (e.lastIndex = 0; r = e.exec(t); ) {
|
|
9429
|
-
const o = r[1].toLowerCase(), s = (r[2].match(a) || []).map(parseFloat), l = o === r[1], c =
|
|
9429
|
+
const o = r[1].toLowerCase(), s = (r[2].match(a) || []).map(parseFloat), l = o === r[1], c = ln[o];
|
|
9430
9430
|
if (s.length < c.length)
|
|
9431
9431
|
throw new Pt(
|
|
9432
9432
|
`Path type "${o}" given ${s.length} arguments, expected ${c.length}.`
|
|
@@ -9506,7 +9506,7 @@ class As extends is {
|
|
|
9506
9506
|
const T = et("g");
|
|
9507
9507
|
T.classList.add("module-layer2"), w.appendChild(T), T.setAttribute("fill", "rgb(255,209,0)"), T.setAttribute("transform", "translate(1,-0.1)"), T.innerHTML = s;
|
|
9508
9508
|
const G = et("g");
|
|
9509
|
-
return G.classList.add("module-layer3"), w.appendChild(G), G.setAttribute("fill", "white"), G.innerHTML = s, new us(w).transform(([N,
|
|
9509
|
+
return G.classList.add("module-layer3"), w.appendChild(G), G.setAttribute("fill", "white"), G.innerHTML = s, new us(w).transform(([N, J]) => [N, J + (c / 2 - N) ** 2 / (c * 6)]), w;
|
|
9510
9510
|
}, A = et("g");
|
|
9511
9511
|
A.classList.add("module-root");
|
|
9512
9512
|
const h = et("defs");
|
|
@@ -9523,7 +9523,7 @@ class As extends is {
|
|
|
9523
9523
|
return cs(p, E, e.height, e.width, 0.35, 0.65), ls(A.outerHTML);
|
|
9524
9524
|
}
|
|
9525
9525
|
}
|
|
9526
|
-
async function
|
|
9526
|
+
async function gi(n) {
|
|
9527
9527
|
if (n === "Vegemite")
|
|
9528
9528
|
return new As();
|
|
9529
9529
|
throw new Q(`Failed to resolve Module, Module ${n} not found`);
|
|
@@ -9542,8 +9542,8 @@ const hs = [
|
|
|
9542
9542
|
"tspan"
|
|
9543
9543
|
], gs = async (n, t, e) => {
|
|
9544
9544
|
const a = t.data, i = e.data.baseUrl, r = a.assetUrl.replace("localhost", "localstack"), o = i.slice(0, 4) === "http" ? "" : "https://", s = new URL(o + i);
|
|
9545
|
-
s.searchParams.append("video",
|
|
9546
|
-
const l = s.toString(), d = `data:image/svg+xml;base64,${
|
|
9545
|
+
s.searchParams.append("video", Ka(JSON.stringify([{ href: r }]))), s.pathname = s.pathname + (s.pathname.slice(-1) === "/" ? "" : "/");
|
|
9546
|
+
const l = s.toString(), d = `data:image/svg+xml;base64,${Ka(await bn(l, { type: "svg" }))}`, u = (h) => {
|
|
9547
9547
|
const g = n.find((p) => p.panelId === h.panelId);
|
|
9548
9548
|
if (!g)
|
|
9549
9549
|
throw new H(h);
|
|
@@ -9573,7 +9573,7 @@ const hs = [
|
|
|
9573
9573
|
const s = Oo(i, a.option);
|
|
9574
9574
|
s && (t[a.stepName] = { selectedVariants: [s] });
|
|
9575
9575
|
const l = async (c) => {
|
|
9576
|
-
const d = await
|
|
9576
|
+
const d = await ni(c, s?.asset?.fileLink), u = await ze(d), A = k(), h = n.find((m) => m.panelId === c.panelId);
|
|
9577
9577
|
if (!h)
|
|
9578
9578
|
throw new H(c);
|
|
9579
9579
|
const g = Oa(
|
|
@@ -9628,7 +9628,7 @@ const hs = [
|
|
|
9628
9628
|
const i = e.data, r = a.option;
|
|
9629
9629
|
if (!r)
|
|
9630
9630
|
return console.error(`No option for step ${a.stepName}.`), [];
|
|
9631
|
-
const o = r.variants?.find((y) => y.id === i.illustrationVariantId) ||
|
|
9631
|
+
const o = r.variants?.find((y) => y.id === i.illustrationVariantId) || oe(r);
|
|
9632
9632
|
if (!o)
|
|
9633
9633
|
return console.error(`No variant with ID: ${i.illustrationVariantId}`), [];
|
|
9634
9634
|
if (!o.asset)
|
|
@@ -9693,7 +9693,7 @@ const hs = [
|
|
|
9693
9693
|
return console.error(y), [];
|
|
9694
9694
|
}
|
|
9695
9695
|
}, fs = async (n, t, e) => {
|
|
9696
|
-
const a = await
|
|
9696
|
+
const a = await gi(e.data.module), i = t.data, r = (s, l) => {
|
|
9697
9697
|
const c = n.find((u) => u.panelId === l.panelId);
|
|
9698
9698
|
if (!c)
|
|
9699
9699
|
throw new H(l);
|
|
@@ -9726,7 +9726,7 @@ const hs = [
|
|
|
9726
9726
|
const i = e.data, r = a.option;
|
|
9727
9727
|
if (!r)
|
|
9728
9728
|
return console.error(`No option for step ${a.stepName}.`), [];
|
|
9729
|
-
const o = r.variants?.find((d) => d.id === i.pictureVariantId) ||
|
|
9729
|
+
const o = r.variants?.find((d) => d.id === i.pictureVariantId) || oe(r);
|
|
9730
9730
|
if (!o)
|
|
9731
9731
|
return console.error(`No variant with ID: ${i.pictureVariantId}`), [];
|
|
9732
9732
|
if (!o.asset)
|
|
@@ -9767,7 +9767,7 @@ const hs = [
|
|
|
9767
9767
|
const i = e.data, r = a.option;
|
|
9768
9768
|
if (!r)
|
|
9769
9769
|
return console.error(`No option for step ${a.stepName}.`), [];
|
|
9770
|
-
const o = r.variants?.find((c) => c.id === i.colorVariantId) ||
|
|
9770
|
+
const o = r.variants?.find((c) => c.id === i.colorVariantId) || oe(r);
|
|
9771
9771
|
if (!o)
|
|
9772
9772
|
return console.error(`No variant with ID: ${i.colorVariantId}`), [];
|
|
9773
9773
|
t[a.stepName] = { selectedVariants: [o] };
|
|
@@ -9888,7 +9888,7 @@ const hs = [
|
|
|
9888
9888
|
const p = a.option;
|
|
9889
9889
|
if (!p)
|
|
9890
9890
|
return;
|
|
9891
|
-
const f = p.variants?.find((w) => w.id === r.fontVariantId) ||
|
|
9891
|
+
const f = p.variants?.find((w) => w.id === r.fontVariantId) || oe(p);
|
|
9892
9892
|
if (!f || !f.asset)
|
|
9893
9893
|
return;
|
|
9894
9894
|
t[a.stepName] = { selectedVariants: [f] };
|
|
@@ -10073,7 +10073,7 @@ const Is = () => new Promise((n, t) => {
|
|
|
10073
10073
|
}), Bs = Is();
|
|
10074
10074
|
class Ps {
|
|
10075
10075
|
constructor(t, e, a, i, r) {
|
|
10076
|
-
this.hasSetStaticContext = !1, this.interactiveDirty = !1, this.staticCtxDirty = !1, this.lastRequestedRenderArguments = void 0, this.lastCompletedStaticRender = void 0, this.renderQueue = new
|
|
10076
|
+
this.hasSetStaticContext = !1, this.interactiveDirty = !1, this.staticCtxDirty = !1, this.lastRequestedRenderArguments = void 0, this.lastCompletedStaticRender = void 0, this.renderQueue = new Jn(2), this.id = t, this.name = e, this.service = a, this.panelSize = i, this.getWorkflowManager = r;
|
|
10077
10077
|
}
|
|
10078
10078
|
getID() {
|
|
10079
10079
|
return this.id;
|
|
@@ -10140,7 +10140,7 @@ class Ps {
|
|
|
10140
10140
|
);
|
|
10141
10141
|
}
|
|
10142
10142
|
}
|
|
10143
|
-
class xs extends
|
|
10143
|
+
class xs extends Hn {
|
|
10144
10144
|
constructor(t, e, a, i, r, o) {
|
|
10145
10145
|
super(), this.layoutId = t, this.ctx = e, this.nonPOTSupport = a, this.onRender = i, this.layouts = r, this.getWorkflowManager = o;
|
|
10146
10146
|
}
|
|
@@ -10195,7 +10195,7 @@ class xs extends jn {
|
|
|
10195
10195
|
purpose: Yt.ThreeD,
|
|
10196
10196
|
templatingContext: d
|
|
10197
10197
|
}
|
|
10198
|
-
}), A =
|
|
10198
|
+
}), A = kn(u), h = await Ba.from(this.ctx, A, {
|
|
10199
10199
|
anonymousCrossOrigin: !0,
|
|
10200
10200
|
ignoreDimensions: !this.nonPOTSupport,
|
|
10201
10201
|
ignoreAnimation: !0,
|
|
@@ -10203,7 +10203,7 @@ class xs extends jn {
|
|
|
10203
10203
|
ignoreMouse: !0,
|
|
10204
10204
|
enableRedraw: !1,
|
|
10205
10205
|
createCanvas: ft,
|
|
10206
|
-
createImage:
|
|
10206
|
+
createImage: ae,
|
|
10207
10207
|
DOMParser: Da(),
|
|
10208
10208
|
fetch
|
|
10209
10209
|
});
|
|
@@ -10226,7 +10226,7 @@ const Od = (n, t) => {
|
|
|
10226
10226
|
serializableWorkflow: { steps: [] },
|
|
10227
10227
|
layouts: {}
|
|
10228
10228
|
};
|
|
10229
|
-
i = new O(e.map((l) => new
|
|
10229
|
+
i = new O(e.map((l) => new oi(l))).apply(i);
|
|
10230
10230
|
const o = await Es(n, t, e, a);
|
|
10231
10231
|
return new O(o).apply(i);
|
|
10232
10232
|
}, Ge = C`
|
|
@@ -10288,7 +10288,7 @@ const Od = (n, t) => {
|
|
|
10288
10288
|
variables: {
|
|
10289
10289
|
bundleId: n
|
|
10290
10290
|
}
|
|
10291
|
-
})).data.globalPropertyState,
|
|
10291
|
+
})).data.globalPropertyState, mi = C`
|
|
10292
10292
|
fragment CreateDesignTransaction on Transaction {
|
|
10293
10293
|
id
|
|
10294
10294
|
designName
|
|
@@ -10314,7 +10314,7 @@ const Od = (n, t) => {
|
|
|
10314
10314
|
}
|
|
10315
10315
|
}
|
|
10316
10316
|
`, Ms = C`
|
|
10317
|
-
${
|
|
10317
|
+
${mi}
|
|
10318
10318
|
mutation CreateDesigns($inputs: [DesignCreateInput]!) {
|
|
10319
10319
|
designCreateMany(inputs: $inputs) {
|
|
10320
10320
|
id
|
|
@@ -10420,7 +10420,7 @@ const Ts = async (n, t) => {
|
|
|
10420
10420
|
});
|
|
10421
10421
|
}
|
|
10422
10422
|
return i;
|
|
10423
|
-
},
|
|
10423
|
+
}, pi = (n, t, e, a, i, r, o, s) => {
|
|
10424
10424
|
const l = t.basePrice || 0, c = n.priceModifierTotal || 0, d = Ns(a, e, void 0, r), A = (D.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(n.id), h = {
|
|
10425
10425
|
additionalExternalProductId: n.integrationProduct?.additionalExternalProductId,
|
|
10426
10426
|
additionalExternalVariantId: n.integrationProduct?.additionalExternalVariantId,
|
|
@@ -10519,7 +10519,7 @@ const Ts = async (n, t) => {
|
|
|
10519
10519
|
cartSelectionsWithPrices: m,
|
|
10520
10520
|
cartMetadata: h
|
|
10521
10521
|
};
|
|
10522
|
-
},
|
|
10522
|
+
}, fi = async (n, t) => {
|
|
10523
10523
|
await Promise.all(
|
|
10524
10524
|
n.map(async (s) => {
|
|
10525
10525
|
await s.workflowManager.outstandingRequestsPromise();
|
|
@@ -10567,7 +10567,7 @@ const Ts = async (n, t) => {
|
|
|
10567
10567
|
throw new Error("Failed to create designs");
|
|
10568
10568
|
return o.map((s, l) => {
|
|
10569
10569
|
const c = n[l], d = i[l], u = s.transaction;
|
|
10570
|
-
return
|
|
10570
|
+
return pi(
|
|
10571
10571
|
u,
|
|
10572
10572
|
c.product,
|
|
10573
10573
|
c.workflow,
|
|
@@ -10646,7 +10646,8 @@ class Rs {
|
|
|
10646
10646
|
throw new Q("Unexpected storage method requested");
|
|
10647
10647
|
}
|
|
10648
10648
|
}
|
|
10649
|
-
const ra = new Rs(),
|
|
10649
|
+
const ra = new Rs(), Ua = (n) => C`
|
|
10650
|
+
${n ? mi : ""}
|
|
10650
10651
|
fragment JobFields on Job {
|
|
10651
10652
|
id
|
|
10652
10653
|
createdAt
|
|
@@ -10659,6 +10660,20 @@ const ra = new Rs(), fi = C`
|
|
|
10659
10660
|
updatedAt
|
|
10660
10661
|
type
|
|
10661
10662
|
status
|
|
10663
|
+
data {
|
|
10664
|
+
... on BulkTransactionDesignCreateJobData {
|
|
10665
|
+
transactionCount
|
|
10666
|
+
${n ? `
|
|
10667
|
+
transactions {
|
|
10668
|
+
...CreateDesignTransaction
|
|
10669
|
+
design {
|
|
10670
|
+
id
|
|
10671
|
+
sku
|
|
10672
|
+
}
|
|
10673
|
+
}
|
|
10674
|
+
` : ""}
|
|
10675
|
+
}
|
|
10676
|
+
}
|
|
10662
10677
|
}
|
|
10663
10678
|
data {
|
|
10664
10679
|
... on BundleDesignCreateJobData {
|
|
@@ -10669,13 +10684,20 @@ const ra = new Rs(), fi = C`
|
|
|
10669
10684
|
}
|
|
10670
10685
|
}
|
|
10671
10686
|
`, Os = C`
|
|
10672
|
-
${
|
|
10687
|
+
${Ua(!1)}
|
|
10673
10688
|
query GetJobs($ids: [String!]!) {
|
|
10674
10689
|
jobs(ids: $ids) {
|
|
10675
10690
|
...JobFields
|
|
10676
10691
|
}
|
|
10677
10692
|
}
|
|
10678
|
-
`, $s =
|
|
10693
|
+
`, $s = C`
|
|
10694
|
+
${Ua(!0)}
|
|
10695
|
+
query GetJobsWithFullData($ids: [String!]!) {
|
|
10696
|
+
jobs(ids: $ids) {
|
|
10697
|
+
...JobFields
|
|
10698
|
+
}
|
|
10699
|
+
}
|
|
10700
|
+
`, Us = (n) => C`
|
|
10679
10701
|
${Le}
|
|
10680
10702
|
fragment ProductFields on Product {
|
|
10681
10703
|
id
|
|
@@ -10720,8 +10742,8 @@ const ra = new Rs(), fi = C`
|
|
|
10720
10742
|
name
|
|
10721
10743
|
}
|
|
10722
10744
|
}
|
|
10723
|
-
`,
|
|
10724
|
-
${
|
|
10745
|
+
`, La = (n) => C`
|
|
10746
|
+
${Us(n)}
|
|
10725
10747
|
fragment ProductCollectionProductFields on ProductCollectionProduct {
|
|
10726
10748
|
id
|
|
10727
10749
|
productId
|
|
@@ -10731,7 +10753,7 @@ const ra = new Rs(), fi = C`
|
|
|
10731
10753
|
}
|
|
10732
10754
|
}
|
|
10733
10755
|
`, We = (n, t = !1) => C`
|
|
10734
|
-
${n ?
|
|
10756
|
+
${n ? La(t) : ""}
|
|
10735
10757
|
fragment ProductCollectionFields on ProductCollection {
|
|
10736
10758
|
id
|
|
10737
10759
|
name
|
|
@@ -10822,7 +10844,7 @@ const ra = new Rs(), fi = C`
|
|
|
10822
10844
|
workflowViewerLink
|
|
10823
10845
|
workflowViewerAmendLink
|
|
10824
10846
|
}
|
|
10825
|
-
`,
|
|
10847
|
+
`, Ls = (n) => C`
|
|
10826
10848
|
${Ge}
|
|
10827
10849
|
${We(n)}
|
|
10828
10850
|
${Ci}
|
|
@@ -10857,7 +10879,7 @@ const ra = new Rs(), fi = C`
|
|
|
10857
10879
|
}
|
|
10858
10880
|
}
|
|
10859
10881
|
}
|
|
10860
|
-
`,
|
|
10882
|
+
`, cn = C`
|
|
10861
10883
|
query GetBundleStakeholders($id: String!) {
|
|
10862
10884
|
bundles(ids: [$id]) {
|
|
10863
10885
|
id
|
|
@@ -10902,7 +10924,7 @@ const ra = new Rs(), fi = C`
|
|
|
10902
10924
|
}
|
|
10903
10925
|
}
|
|
10904
10926
|
}
|
|
10905
|
-
`,
|
|
10927
|
+
`, Vs = C`
|
|
10906
10928
|
query GetBundlesForCustomer($id: String!) {
|
|
10907
10929
|
customers(ids: [$id]) {
|
|
10908
10930
|
bundleStakeholders {
|
|
@@ -10931,8 +10953,8 @@ const ra = new Rs(), fi = C`
|
|
|
10931
10953
|
}
|
|
10932
10954
|
}
|
|
10933
10955
|
}
|
|
10934
|
-
`,
|
|
10935
|
-
${
|
|
10956
|
+
`, zs = C`
|
|
10957
|
+
${La(!1)}
|
|
10936
10958
|
query GetProductCollectionProducts($id: String!, $productIds: [String!]) {
|
|
10937
10959
|
productCollections(ids: [$id], productIds: $productIds) {
|
|
10938
10960
|
id
|
|
@@ -10941,7 +10963,7 @@ const ra = new Rs(), fi = C`
|
|
|
10941
10963
|
}
|
|
10942
10964
|
}
|
|
10943
10965
|
}
|
|
10944
|
-
`,
|
|
10966
|
+
`, Gs = C`
|
|
10945
10967
|
query GetProductCollectionForFilteredProducts(
|
|
10946
10968
|
$id: String!
|
|
10947
10969
|
$filters: ProductCollectionProductFilterInput
|
|
@@ -10964,8 +10986,8 @@ const ra = new Rs(), fi = C`
|
|
|
10964
10986
|
}
|
|
10965
10987
|
}
|
|
10966
10988
|
}
|
|
10967
|
-
`,
|
|
10968
|
-
${
|
|
10989
|
+
`, Ws = C`
|
|
10990
|
+
${La(!0)}
|
|
10969
10991
|
query GetProductCollectionForProductsFeed(
|
|
10970
10992
|
$id: String!
|
|
10971
10993
|
$limit: Int
|
|
@@ -10996,7 +11018,7 @@ const ra = new Rs(), fi = C`
|
|
|
10996
11018
|
}
|
|
10997
11019
|
}
|
|
10998
11020
|
}
|
|
10999
|
-
`,
|
|
11021
|
+
`, qs = (n) => C`
|
|
11000
11022
|
${We(n)}
|
|
11001
11023
|
mutation CreateBundle(
|
|
11002
11024
|
$collectionId: String
|
|
@@ -11025,7 +11047,7 @@ const ra = new Rs(), fi = C`
|
|
|
11025
11047
|
}
|
|
11026
11048
|
}
|
|
11027
11049
|
}
|
|
11028
|
-
`,
|
|
11050
|
+
`, js = () => C`
|
|
11029
11051
|
mutation DuplicateBundle(
|
|
11030
11052
|
$id: String!
|
|
11031
11053
|
$template: Boolean
|
|
@@ -11067,13 +11089,13 @@ const ra = new Rs(), fi = C`
|
|
|
11067
11089
|
id
|
|
11068
11090
|
}
|
|
11069
11091
|
}
|
|
11070
|
-
`,
|
|
11092
|
+
`, Hs = C`
|
|
11071
11093
|
mutation BundleAddTransaction($id: String!, $transactionId: String!) {
|
|
11072
11094
|
bundleAddTransaction(id: $id, transactionId: $transactionId) {
|
|
11073
11095
|
id
|
|
11074
11096
|
}
|
|
11075
11097
|
}
|
|
11076
|
-
`,
|
|
11098
|
+
`, Js = C`
|
|
11077
11099
|
mutation BundleAddTransactions($id: String!, $transactionIds: [String!]!, $transactionOwnerIds: [String!]) {
|
|
11078
11100
|
bundleAddTransactions(id: $id, transactionIds: $transactionIds, transactionOwnerIds: $transactionOwnerIds) {
|
|
11079
11101
|
id
|
|
@@ -11094,7 +11116,7 @@ const ra = new Rs(), fi = C`
|
|
|
11094
11116
|
id
|
|
11095
11117
|
}
|
|
11096
11118
|
}
|
|
11097
|
-
`,
|
|
11119
|
+
`, Ks = C`
|
|
11098
11120
|
mutation BundleRemoveTransactions(
|
|
11099
11121
|
$id: String!
|
|
11100
11122
|
$transactionIds: [String!]!
|
|
@@ -11109,7 +11131,7 @@ const ra = new Rs(), fi = C`
|
|
|
11109
11131
|
id
|
|
11110
11132
|
}
|
|
11111
11133
|
}
|
|
11112
|
-
`,
|
|
11134
|
+
`, _s = C`
|
|
11113
11135
|
mutation BundleAddStakeholder($id: String!, $details: CustomerDetailsInput!, $type: String!) {
|
|
11114
11136
|
bundleAddStakeholder(id: $id, details: $details, type: $type) {
|
|
11115
11137
|
id
|
|
@@ -11129,13 +11151,13 @@ const ra = new Rs(), fi = C`
|
|
|
11129
11151
|
}
|
|
11130
11152
|
}
|
|
11131
11153
|
}
|
|
11132
|
-
`,
|
|
11154
|
+
`, Xs = C`
|
|
11133
11155
|
mutation BundleAddStakeholder($id: String!, $emailAddress: String!) {
|
|
11134
11156
|
bundleRemoveStakeholder(id: $id, emailAddress: $emailAddress) {
|
|
11135
11157
|
id
|
|
11136
11158
|
}
|
|
11137
11159
|
}
|
|
11138
|
-
`,
|
|
11160
|
+
`, Zs = C`
|
|
11139
11161
|
mutation BundleUpdateStakeholders($id: String!, $input: [BundleStakeholderInput!]!) {
|
|
11140
11162
|
bundleUpdateStakeholders(id: $id, input: $input) {
|
|
11141
11163
|
id
|
|
@@ -11155,13 +11177,13 @@ const ra = new Rs(), fi = C`
|
|
|
11155
11177
|
}
|
|
11156
11178
|
}
|
|
11157
11179
|
}
|
|
11158
|
-
`,
|
|
11180
|
+
`, tl = C`
|
|
11159
11181
|
mutation BundleUpdateTransactionOrder($id: String!, $transactionIds: [String!]!) {
|
|
11160
11182
|
bundleUpdateTransactionOrder(id: $id, transactionIds: $transactionIds) {
|
|
11161
11183
|
id
|
|
11162
11184
|
}
|
|
11163
11185
|
}
|
|
11164
|
-
`,
|
|
11186
|
+
`, el = (n) => C`
|
|
11165
11187
|
${We(n)}
|
|
11166
11188
|
mutation BundleAssignProductCollection($id: String!, $productCollectionId: String!) {
|
|
11167
11189
|
bundleAssignProductCollection(id: $id, collectionId: $productCollectionId) {
|
|
@@ -11171,13 +11193,13 @@ const ra = new Rs(), fi = C`
|
|
|
11171
11193
|
}
|
|
11172
11194
|
}
|
|
11173
11195
|
}
|
|
11174
|
-
`,
|
|
11196
|
+
`, al = C`
|
|
11175
11197
|
mutation AssignGlobalPropertyConfiguration($bundleId: String!, $globalPropertyConfigurationId: String!) {
|
|
11176
11198
|
bundleUpdate(id: $bundleId, globalPropertyConfigurationId: $globalPropertyConfigurationId) {
|
|
11177
11199
|
id
|
|
11178
11200
|
}
|
|
11179
11201
|
}
|
|
11180
|
-
`,
|
|
11202
|
+
`, nl = (n) => C`
|
|
11181
11203
|
${Ci}
|
|
11182
11204
|
query CustomerBundlesFeed($id: String!, $limit: Int!, $offset: Int!, $template: Boolean, $templateStatus: BundleTemplateStatus, $ordered: Boolean) {
|
|
11183
11205
|
customerBundlesFeed(id: $id, limit: $limit, offset: $offset, template: $template, templateStatus: $templateStatus, ordered: $ordered) {
|
|
@@ -11203,27 +11225,27 @@ const ra = new Rs(), fi = C`
|
|
|
11203
11225
|
total
|
|
11204
11226
|
}
|
|
11205
11227
|
}
|
|
11206
|
-
`,
|
|
11228
|
+
`, il = C`
|
|
11207
11229
|
mutation FinalizeUpdateBundle($bundleId: String!) {
|
|
11208
11230
|
bundleFinalizeUpdate(bundleId: $bundleId)
|
|
11209
11231
|
}
|
|
11210
|
-
`,
|
|
11232
|
+
`, rl = C`
|
|
11211
11233
|
mutation ApproveBundle($id: String!, $note: String, $stakeholderId: String) {
|
|
11212
11234
|
bundleApprove(id: $id, note: $note, stakeholderId: $stakeholderId)
|
|
11213
11235
|
}
|
|
11214
|
-
`,
|
|
11236
|
+
`, ol = C`
|
|
11215
11237
|
mutation RejectBundle($id: String!, $note: String, $stakeholderId: String) {
|
|
11216
11238
|
bundleReject(id: $id, note: $note, stakeholderId: $stakeholderId)
|
|
11217
11239
|
}
|
|
11218
|
-
`,
|
|
11240
|
+
`, sl = C`
|
|
11219
11241
|
mutation ApproveTransaction($id: String!, $note: String) {
|
|
11220
11242
|
transactionApprove(id: $id, note: $note)
|
|
11221
11243
|
}
|
|
11222
|
-
`,
|
|
11244
|
+
`, ll = C`
|
|
11223
11245
|
mutation RejectTransaction($id: String!, $note: String) {
|
|
11224
11246
|
transactionReject(id: $id, note: $note)
|
|
11225
11247
|
}
|
|
11226
|
-
`,
|
|
11248
|
+
`, cl = C`
|
|
11227
11249
|
mutation CreateRecipient(
|
|
11228
11250
|
$firstName: String
|
|
11229
11251
|
$lastName: String
|
|
@@ -11265,7 +11287,7 @@ const ra = new Rs(), fi = C`
|
|
|
11265
11287
|
id
|
|
11266
11288
|
}
|
|
11267
11289
|
}
|
|
11268
|
-
`,
|
|
11290
|
+
`, dl = C`
|
|
11269
11291
|
mutation UpdateRecipient(
|
|
11270
11292
|
$id: String!
|
|
11271
11293
|
$firstName: String
|
|
@@ -11311,38 +11333,27 @@ const ra = new Rs(), fi = C`
|
|
|
11311
11333
|
id
|
|
11312
11334
|
}
|
|
11313
11335
|
}
|
|
11314
|
-
`,
|
|
11336
|
+
`, ul = C`
|
|
11315
11337
|
mutation AtttachRecipient($id: String!, $recipientId: String!) {
|
|
11316
11338
|
transactionAttachRecipient(id: $id, recipientId: $recipientId) {
|
|
11317
11339
|
id
|
|
11318
11340
|
}
|
|
11319
11341
|
}
|
|
11320
|
-
`,
|
|
11342
|
+
`, Al = C`
|
|
11321
11343
|
mutation DeleteBundle($id: String!) {
|
|
11322
11344
|
bundleDelete(id: $id)
|
|
11323
11345
|
}
|
|
11324
|
-
`,
|
|
11325
|
-
${
|
|
11346
|
+
`, hl = C`
|
|
11347
|
+
${Ua(!1)}
|
|
11326
11348
|
mutation BundleDesignCreate($id: String!, $previewImage: String) {
|
|
11327
11349
|
designCreateBundle(id: $id, previewImage: $previewImage) {
|
|
11328
11350
|
...JobFields
|
|
11329
11351
|
}
|
|
11330
11352
|
}
|
|
11331
|
-
`, hl = C`
|
|
11332
|
-
${gi}
|
|
11333
|
-
mutation GetTransactionsForDesignData($ids: [String!]!) {
|
|
11334
|
-
transactions(ids: $ids) {
|
|
11335
|
-
...CreateDesignTransaction
|
|
11336
|
-
design {
|
|
11337
|
-
id
|
|
11338
|
-
sku
|
|
11339
|
-
}
|
|
11340
|
-
}
|
|
11341
|
-
}
|
|
11342
11353
|
`;
|
|
11343
11354
|
var qe = /* @__PURE__ */ ((n) => (n.Error = "Error", n.Warning = "Warning", n.Info = "Info", n))(qe || {});
|
|
11344
11355
|
const gl = 1e3;
|
|
11345
|
-
class
|
|
11356
|
+
class dn extends Hn {
|
|
11346
11357
|
constructor(t) {
|
|
11347
11358
|
super(), this.createdAt = /* @__PURE__ */ new Date(), this.update = t;
|
|
11348
11359
|
}
|
|
@@ -11371,9 +11382,9 @@ const ml = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11371
11382
|
})), pl = (n, t) => {
|
|
11372
11383
|
const e = n.workflowState, a = e ? JSON.parse(e) : void 0;
|
|
11373
11384
|
return a ? Object.values(a.layouts).map((i) => i.layout) : ml(t.panels);
|
|
11374
|
-
},
|
|
11385
|
+
}, jt = class jt {
|
|
11375
11386
|
constructor(t, e, a, i, r, o = !1, s, l = !1, c = !1, d = !1) {
|
|
11376
|
-
this.workflowStatePromiseQueue = new
|
|
11387
|
+
this.workflowStatePromiseQueue = new Jn(1), this.initialized = !1, this.readOnly = !1, this.isReloadedTransaction = !1, this.singleVariantsRenderable = !1, this.stepTags = {}, this.setWorkflow = async (A) => {
|
|
11377
11388
|
this.confirmedDesign = !1, this.editedSteps = {}, this.informationResults = [], this.mandatorySteps = {}, this.pendingUpdates = [], this.selectionCost = 0, this.stepSpecificServices = {}, this.pollers = [], this.allScenes = [], this.stepElements = {}, this.stepInitialised = {}, this.stepMetadata = {}, this.stepSelections = {}, this.storage = {}, this.validationErrors = { steps: /* @__PURE__ */ new Map() }, this.currentAdjustingStepId = "", this.reloadedState ? this.layouts = Object.values(this.reloadedState.layouts || {}).map((g) => g.layout) : A ? this.layouts = pl(this.experience.getTransaction(), A) : this.layouts = [], this.commandContext.initialize(this.layouts, this.reloadedState), this.renderableContextService = new bs(this.layouts), this.renderableContextService.setWorkflowManager(this), A.steps.forEach((g) => {
|
|
11378
11389
|
this.stepTags[g.stepName] = g.tags ?? [];
|
|
11379
11390
|
});
|
|
@@ -11427,7 +11438,7 @@ const ml = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11427
11438
|
customField5: p ?? w.recipient.customField5,
|
|
11428
11439
|
conversionConfigurationId: f || w.recipient.conversionConfigurationId
|
|
11429
11440
|
}, this.experience.callEvent(Ea.RecipientChanged), await this.graphQlClient().mutate({
|
|
11430
|
-
mutation:
|
|
11441
|
+
mutation: dl,
|
|
11431
11442
|
errorPolicy: "all",
|
|
11432
11443
|
fetchPolicy: "no-cache",
|
|
11433
11444
|
variables: {
|
|
@@ -11454,7 +11465,7 @@ const ml = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11454
11465
|
});
|
|
11455
11466
|
else {
|
|
11456
11467
|
const x = await this.graphQlClient().mutate({
|
|
11457
|
-
mutation:
|
|
11468
|
+
mutation: cl,
|
|
11458
11469
|
errorPolicy: "all",
|
|
11459
11470
|
fetchPolicy: "no-cache",
|
|
11460
11471
|
variables: {
|
|
@@ -11497,7 +11508,7 @@ const ml = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11497
11508
|
customField5: p,
|
|
11498
11509
|
conversionConfigurationId: f
|
|
11499
11510
|
}, this.experience.callEvent(Ea.RecipientChanged), await this.graphQlClient().mutate({
|
|
11500
|
-
mutation:
|
|
11511
|
+
mutation: ul,
|
|
11501
11512
|
errorPolicy: "all",
|
|
11502
11513
|
fetchPolicy: "no-cache",
|
|
11503
11514
|
variables: {
|
|
@@ -11514,21 +11525,21 @@ const ml = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11514
11525
|
async fetchConversionConfiguration() {
|
|
11515
11526
|
const t = this.experience.getTransaction().recipient;
|
|
11516
11527
|
if (t?.conversionConfigurationId && !this.recipientConversionConfiguration) {
|
|
11517
|
-
const e =
|
|
11528
|
+
const e = jt.configurationPromiseMap.get(
|
|
11518
11529
|
t.conversionConfigurationId
|
|
11519
11530
|
);
|
|
11520
11531
|
if (e)
|
|
11521
11532
|
this.recipientConversionConfiguration = await e;
|
|
11522
11533
|
else {
|
|
11523
11534
|
const i = (async () => (await this.graphQlClient().query({
|
|
11524
|
-
query:
|
|
11535
|
+
query: Yr,
|
|
11525
11536
|
errorPolicy: "all",
|
|
11526
11537
|
fetchPolicy: "no-cache",
|
|
11527
11538
|
variables: {
|
|
11528
11539
|
id: t.conversionConfigurationId
|
|
11529
11540
|
}
|
|
11530
11541
|
})).data.conversionConfiguration)();
|
|
11531
|
-
|
|
11542
|
+
jt.configurationPromiseMap.set(t.conversionConfigurationId, i), this.recipientConversionConfiguration = await i;
|
|
11532
11543
|
}
|
|
11533
11544
|
}
|
|
11534
11545
|
}
|
|
@@ -11788,9 +11799,9 @@ const ml = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11788
11799
|
...this.storage,
|
|
11789
11800
|
[t]: { ...this.storage[t], ...e }
|
|
11790
11801
|
};
|
|
11791
|
-
if (!
|
|
11802
|
+
if (!Jt(a, this.storage)) {
|
|
11792
11803
|
this.storage = a;
|
|
11793
|
-
const i = new
|
|
11804
|
+
const i = new rn(this.constructSerializableWorkflow());
|
|
11794
11805
|
this.commandContext.apply(i, !0), this.onStepSpecificStorageChange(t), this.onStorageChange();
|
|
11795
11806
|
}
|
|
11796
11807
|
}
|
|
@@ -11809,7 +11820,7 @@ const ml = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11809
11820
|
if (this.readOnly) return;
|
|
11810
11821
|
const t = this.serialize();
|
|
11811
11822
|
this.workflowStatePromiseQueue.enqueue(
|
|
11812
|
-
new
|
|
11823
|
+
new dn(async () => {
|
|
11813
11824
|
await new Promise((e) => {
|
|
11814
11825
|
setTimeout(() => {
|
|
11815
11826
|
e();
|
|
@@ -11826,7 +11837,7 @@ const ml = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11826
11837
|
async updateStateWithServerImmediate() {
|
|
11827
11838
|
if (this.readOnly) return;
|
|
11828
11839
|
const t = this.serialize();
|
|
11829
|
-
return new
|
|
11840
|
+
return new dn(async () => {
|
|
11830
11841
|
await this.updateTransaction({
|
|
11831
11842
|
variables: {
|
|
11832
11843
|
id: this.experience.getTransaction().id,
|
|
@@ -11900,10 +11911,10 @@ const ml = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11900
11911
|
return Promise.resolve({ stepElements: {}, commands: [] });
|
|
11901
11912
|
const i = async (c, d, u) => {
|
|
11902
11913
|
if (c.type === b.SilentIllustration) {
|
|
11903
|
-
const A = await new
|
|
11914
|
+
const A = await new sn(c, d).trigger();
|
|
11904
11915
|
return { step: c, results: A };
|
|
11905
11916
|
} else if (c.type === b.ProductOverlay) {
|
|
11906
|
-
const A = await new
|
|
11917
|
+
const A = await new sn(
|
|
11907
11918
|
c,
|
|
11908
11919
|
d,
|
|
11909
11920
|
u
|
|
@@ -11959,7 +11970,7 @@ const ml = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11959
11970
|
}
|
|
11960
11971
|
async approveTransaction(t) {
|
|
11961
11972
|
await S.getShadowGraphqlClient().mutate({
|
|
11962
|
-
mutation:
|
|
11973
|
+
mutation: sl,
|
|
11963
11974
|
errorPolicy: "all",
|
|
11964
11975
|
fetchPolicy: "no-cache",
|
|
11965
11976
|
variables: {
|
|
@@ -11970,7 +11981,7 @@ const ml = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11970
11981
|
}
|
|
11971
11982
|
async rejectTransaction(t) {
|
|
11972
11983
|
await S.getShadowGraphqlClient().mutate({
|
|
11973
|
-
mutation:
|
|
11984
|
+
mutation: ll,
|
|
11974
11985
|
errorPolicy: "all",
|
|
11975
11986
|
fetchPolicy: "no-cache",
|
|
11976
11987
|
variables: {
|
|
@@ -12006,7 +12017,7 @@ const ml = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
12006
12017
|
}, this.removeElements(h);
|
|
12007
12018
|
const p = r.steps.find((v) => v.stepName === t);
|
|
12008
12019
|
p?.type === b.Frame && this.getWorkflowExperience().getStepById(p.stepName)?.frameService?.setTargetElements(a.map((B) => B.id));
|
|
12009
|
-
const f = h.map((v) => new Nt(v.id)), E = new
|
|
12020
|
+
const f = h.map((v) => new Nt(v.id)), E = new rn(this.constructSerializableWorkflow()), w = [...m, ...f, E];
|
|
12010
12021
|
w.length > 0 && this.commandContext.apply(new O(w), !0), await this.ensureStepsAreLoaded(), this.onElementsChange();
|
|
12011
12022
|
const x = this.getInvalidModelVariants(), y = this.modelContainer;
|
|
12012
12023
|
if (y) {
|
|
@@ -12030,7 +12041,7 @@ const ml = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
12030
12041
|
switch (this.stepInitialised[l.stepName] = !0, l.type) {
|
|
12031
12042
|
case b.DigitalContent:
|
|
12032
12043
|
a.push(
|
|
12033
|
-
|
|
12044
|
+
li.init(
|
|
12034
12045
|
l,
|
|
12035
12046
|
this,
|
|
12036
12047
|
this.reloadedState
|
|
@@ -12047,31 +12058,31 @@ const ml = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
12047
12058
|
break;
|
|
12048
12059
|
case b.Material:
|
|
12049
12060
|
a.push(
|
|
12050
|
-
|
|
12061
|
+
ci.init(l, this, this.reloadedState)
|
|
12051
12062
|
);
|
|
12052
12063
|
break;
|
|
12053
12064
|
case b.Model:
|
|
12054
|
-
a.push(
|
|
12065
|
+
a.push(di.init(l, this, this.reloadedState));
|
|
12055
12066
|
break;
|
|
12056
12067
|
case b.Module:
|
|
12057
12068
|
this.stepSpecificServices[l.stepName] = {
|
|
12058
|
-
module: await
|
|
12069
|
+
module: await gi(l.data.module)
|
|
12059
12070
|
}, a.push(
|
|
12060
|
-
|
|
12071
|
+
ui.init(l, this, this.reloadedState)
|
|
12061
12072
|
);
|
|
12062
12073
|
break;
|
|
12063
12074
|
case b.Picture:
|
|
12064
12075
|
a.push(
|
|
12065
|
-
|
|
12076
|
+
Ai.init(l, this, this.reloadedState)
|
|
12066
12077
|
);
|
|
12067
12078
|
break;
|
|
12068
12079
|
case b.Question:
|
|
12069
12080
|
a.push(
|
|
12070
|
-
|
|
12081
|
+
hi.init(l, this, this.reloadedState)
|
|
12071
12082
|
);
|
|
12072
12083
|
break;
|
|
12073
12084
|
case b.Shape:
|
|
12074
|
-
a.push(
|
|
12085
|
+
a.push(Gt.init(l, this, this.reloadedState));
|
|
12075
12086
|
break;
|
|
12076
12087
|
case b.Text:
|
|
12077
12088
|
a.push(W.init(l, this, this.reloadedState));
|
|
@@ -12136,8 +12147,8 @@ const ml = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
12136
12147
|
return yo(this.allScenes, this.stepSelections, this.singleVariantsRenderable);
|
|
12137
12148
|
}
|
|
12138
12149
|
};
|
|
12139
|
-
|
|
12140
|
-
let va =
|
|
12150
|
+
jt.configurationPromiseMap = /* @__PURE__ */ new Map();
|
|
12151
|
+
let va = jt;
|
|
12141
12152
|
class rt {
|
|
12142
12153
|
constructor(t) {
|
|
12143
12154
|
this.variantData = t;
|
|
@@ -12218,7 +12229,7 @@ class rt {
|
|
|
12218
12229
|
return this.variantData.enabled;
|
|
12219
12230
|
}
|
|
12220
12231
|
}
|
|
12221
|
-
const
|
|
12232
|
+
const Ht = class Ht {
|
|
12222
12233
|
constructor(t, e, a) {
|
|
12223
12234
|
this.manager = t, this.step = e, this.tags = a;
|
|
12224
12235
|
}
|
|
@@ -12228,7 +12239,7 @@ const jt = class jt {
|
|
|
12228
12239
|
* @param value The new value
|
|
12229
12240
|
*/
|
|
12230
12241
|
setUpdateState(t) {
|
|
12231
|
-
|
|
12242
|
+
Ht.updateState.set(
|
|
12232
12243
|
`${this.step.stepName}-${this.manager.getWorkflowExperience().getTransaction().id}`,
|
|
12233
12244
|
t
|
|
12234
12245
|
);
|
|
@@ -12237,7 +12248,7 @@ const jt = class jt {
|
|
|
12237
12248
|
* @returns Gets the current update state of this step. All step handles for this step will see this value.
|
|
12238
12249
|
*/
|
|
12239
12250
|
getUpdateState() {
|
|
12240
|
-
return !!
|
|
12251
|
+
return !!Ht.updateState.get(
|
|
12241
12252
|
`${this.step.stepName}-${this.manager.getWorkflowExperience().getTransaction().id}`
|
|
12242
12253
|
);
|
|
12243
12254
|
}
|
|
@@ -12349,8 +12360,8 @@ const jt = class jt {
|
|
|
12349
12360
|
e ? r && e.executeCameraAnimation(r) : console.warn("No preview service available, cannot execute camera animations."), a ? i && a.executeAnimation(i, t) : console.warn("No model container available, cannot execute model animations.");
|
|
12350
12361
|
}
|
|
12351
12362
|
};
|
|
12352
|
-
|
|
12353
|
-
let tt =
|
|
12363
|
+
Ht.updateState = /* @__PURE__ */ new Map();
|
|
12364
|
+
let tt = Ht;
|
|
12354
12365
|
class fl extends tt {
|
|
12355
12366
|
constructor(t, e, a) {
|
|
12356
12367
|
super(t, e, a);
|
|
@@ -12430,7 +12441,7 @@ class Cl extends tt {
|
|
|
12430
12441
|
super(t, e, a);
|
|
12431
12442
|
}
|
|
12432
12443
|
selectVariant(t) {
|
|
12433
|
-
return
|
|
12444
|
+
return ci.selectVariant(
|
|
12434
12445
|
this.step,
|
|
12435
12446
|
t.getResource(),
|
|
12436
12447
|
this.manager,
|
|
@@ -12443,7 +12454,7 @@ class wl extends tt {
|
|
|
12443
12454
|
super(t, e, a);
|
|
12444
12455
|
}
|
|
12445
12456
|
selectVariant(t) {
|
|
12446
|
-
return
|
|
12457
|
+
return di.selectVariant(
|
|
12447
12458
|
this.step,
|
|
12448
12459
|
t.getResource(),
|
|
12449
12460
|
this.manager,
|
|
@@ -12461,7 +12472,7 @@ class yl extends tt {
|
|
|
12461
12472
|
* @returns A promise that can be awaited to ensure the new image asset has been updated on the design.
|
|
12462
12473
|
*/
|
|
12463
12474
|
selectVariant(t) {
|
|
12464
|
-
return
|
|
12475
|
+
return Ai.selectVariant(
|
|
12465
12476
|
this.step,
|
|
12466
12477
|
t.getResource(),
|
|
12467
12478
|
this.manager,
|
|
@@ -12476,7 +12487,7 @@ class Sl extends tt {
|
|
|
12476
12487
|
async selectVariant(t) {
|
|
12477
12488
|
if (!t.getId())
|
|
12478
12489
|
throw new Error("Unable to select variant with a null ID");
|
|
12479
|
-
await
|
|
12490
|
+
await hi.selectVariant(this.step, t.getId(), this.manager);
|
|
12480
12491
|
}
|
|
12481
12492
|
/**
|
|
12482
12493
|
* The way that this step expects to be rendered.
|
|
@@ -12491,7 +12502,7 @@ class vl extends tt {
|
|
|
12491
12502
|
}
|
|
12492
12503
|
selectVariant(t) {
|
|
12493
12504
|
const e = t.getResource();
|
|
12494
|
-
return
|
|
12505
|
+
return Gt.selectVariant(
|
|
12495
12506
|
this.step,
|
|
12496
12507
|
{
|
|
12497
12508
|
fill: e.color,
|
|
@@ -12509,7 +12520,7 @@ class vl extends tt {
|
|
|
12509
12520
|
* @deprecated The shape step can now pass through colors returned by getColors via selectVariant. Please swap setColor for selectVariant.
|
|
12510
12521
|
*/
|
|
12511
12522
|
setColor(t) {
|
|
12512
|
-
return
|
|
12523
|
+
return Gt.selectVariant(
|
|
12513
12524
|
this.step,
|
|
12514
12525
|
t,
|
|
12515
12526
|
this.manager.getRegionElements(this.step.stepName) || [],
|
|
@@ -12521,7 +12532,7 @@ class vl extends tt {
|
|
|
12521
12532
|
* @returns A list of color definitions that are currently applied to the illustration.
|
|
12522
12533
|
*/
|
|
12523
12534
|
getColors() {
|
|
12524
|
-
return
|
|
12535
|
+
return Gt.availableColours(this.step);
|
|
12525
12536
|
}
|
|
12526
12537
|
/**
|
|
12527
12538
|
* Allows for setting a custom color when the custom variant is selected. Will
|
|
@@ -12530,7 +12541,7 @@ class vl extends tt {
|
|
|
12530
12541
|
setCustomColor(t) {
|
|
12531
12542
|
return this.getCurrentVariant()?.getColor() !== "#custom" && console.warn(
|
|
12532
12543
|
`setting custom color for step ${this.step.stepName} but color is ${this.getCurrentVariant()?.getColor()}`
|
|
12533
|
-
),
|
|
12544
|
+
), Gt.setCustomColor(t, this.step, this.manager);
|
|
12534
12545
|
}
|
|
12535
12546
|
getCustomColor() {
|
|
12536
12547
|
this.getCurrentVariant()?.getColor() !== "#custom" && console.warn(
|
|
@@ -12768,7 +12779,7 @@ class Il extends tt {
|
|
|
12768
12779
|
* @returns The final URL string for the QR code.
|
|
12769
12780
|
*/
|
|
12770
12781
|
async selectVideo(t) {
|
|
12771
|
-
return
|
|
12782
|
+
return li.regenerateQRCode(
|
|
12772
12783
|
this.manager.getRegionElements(this.step.stepName),
|
|
12773
12784
|
t.key,
|
|
12774
12785
|
this.manager,
|
|
@@ -12805,7 +12816,7 @@ class Bl extends tt {
|
|
|
12805
12816
|
return this.manager.getStepStorage(this.step.stepName)?.text || "";
|
|
12806
12817
|
}
|
|
12807
12818
|
setText(t) {
|
|
12808
|
-
|
|
12819
|
+
ui.changeText(this.step, t, this.manager, (e) => {
|
|
12809
12820
|
if (e) {
|
|
12810
12821
|
const a = [
|
|
12811
12822
|
...this.manager.getInformationResults(),
|
|
@@ -12823,7 +12834,7 @@ class Bl extends tt {
|
|
|
12823
12834
|
});
|
|
12824
12835
|
}
|
|
12825
12836
|
}
|
|
12826
|
-
class
|
|
12837
|
+
class he {
|
|
12827
12838
|
static get(t, e) {
|
|
12828
12839
|
switch (e.type) {
|
|
12829
12840
|
case b.DigitalContent:
|
|
@@ -12895,9 +12906,9 @@ const Pl = C`
|
|
|
12895
12906
|
id
|
|
12896
12907
|
}
|
|
12897
12908
|
}
|
|
12898
|
-
`,
|
|
12909
|
+
`, un = C`
|
|
12899
12910
|
${Le}
|
|
12900
|
-
${
|
|
12911
|
+
${ie}
|
|
12901
12912
|
mutation TransactionUpdateIntegrationProduct($id: String!, $integrationProductId: String) {
|
|
12902
12913
|
transactionUpdateIntegrationProduct(id: $id, integrationProductId: $integrationProductId) {
|
|
12903
12914
|
id
|
|
@@ -12987,7 +12998,7 @@ const Pl = C`
|
|
|
12987
12998
|
var Ea = /* @__PURE__ */ ((n) => (n.PriceBreakChanged = "PriceBreakChanged", n.ProductChanged = "ProductChanged", n.QuantityChanged = "QuantityChanged", n.RecipientChanged = "RecipientChanged", n.SelectionChanged = "SelectionChanged", n))(Ea || {});
|
|
12988
12999
|
class Dl {
|
|
12989
13000
|
constructor(t, e) {
|
|
12990
|
-
this.cachedStepHandles = /* @__PURE__ */ new Map(), this.profanityList = [], this.currentPriceBreak = 1, this.renderableScenes = [], this.renderableSceneCallbacks = [], this.eventCallbacks = /* @__PURE__ */ new Map(), this.debouncedSavedDesignUpdate =
|
|
13001
|
+
this.cachedStepHandles = /* @__PURE__ */ new Map(), this.profanityList = [], this.currentPriceBreak = 1, this.renderableScenes = [], this.renderableSceneCallbacks = [], this.eventCallbacks = /* @__PURE__ */ new Map(), this.debouncedSavedDesignUpdate = In(async () => {
|
|
12991
13002
|
await ra.getSavedDesignByTransaction(this.getTransaction().id) && this.save();
|
|
12992
13003
|
}, 2500), this.getCanvasObjectURLAsync = async (a) => new Promise((i, r) => {
|
|
12993
13004
|
try {
|
|
@@ -13046,7 +13057,7 @@ class Dl {
|
|
|
13046
13057
|
async setProduct(t) {
|
|
13047
13058
|
this.workflow = void 0;
|
|
13048
13059
|
const e = await this.graphQlClient().mutate({
|
|
13049
|
-
mutation:
|
|
13060
|
+
mutation: un,
|
|
13050
13061
|
variables: {
|
|
13051
13062
|
id: this.getTransaction().id,
|
|
13052
13063
|
integrationProductId: t
|
|
@@ -13086,7 +13097,7 @@ class Dl {
|
|
|
13086
13097
|
"ProductChanged"
|
|
13087
13098
|
/* ProductChanged */
|
|
13088
13099
|
), await this.graphQlClient().mutate({
|
|
13089
|
-
mutation:
|
|
13100
|
+
mutation: un,
|
|
13090
13101
|
variables: {
|
|
13091
13102
|
id: this.getTransaction().id
|
|
13092
13103
|
}
|
|
@@ -13097,7 +13108,7 @@ class Dl {
|
|
|
13097
13108
|
}
|
|
13098
13109
|
async setWorkflow(t) {
|
|
13099
13110
|
return this.workflow = t, await this.graphQlClient().mutate({
|
|
13100
|
-
mutation:
|
|
13111
|
+
mutation: Jr,
|
|
13101
13112
|
variables: {
|
|
13102
13113
|
id: this.getTransaction().id,
|
|
13103
13114
|
workflowId: t.id
|
|
@@ -13175,12 +13186,12 @@ class Dl {
|
|
|
13175
13186
|
region: { left: u.x, top: u.y, width: u.width, height: u.height },
|
|
13176
13187
|
templatingContext: g
|
|
13177
13188
|
}
|
|
13178
|
-
}), p =
|
|
13189
|
+
}), p = kn(m);
|
|
13179
13190
|
await (await Ba.from(h, p, {
|
|
13180
13191
|
anonymousCrossOrigin: !0,
|
|
13181
13192
|
ignoreDimensions: !1,
|
|
13182
13193
|
createCanvas: ft,
|
|
13183
|
-
createImage:
|
|
13194
|
+
createImage: ae,
|
|
13184
13195
|
DOMParser: Da(),
|
|
13185
13196
|
fetch
|
|
13186
13197
|
})).render();
|
|
@@ -13193,7 +13204,7 @@ class Dl {
|
|
|
13193
13204
|
const a = this.cachedStepHandles.get(e.stepName);
|
|
13194
13205
|
if (a)
|
|
13195
13206
|
return a;
|
|
13196
|
-
const i =
|
|
13207
|
+
const i = he.get(this.getWorkflowManager(), e);
|
|
13197
13208
|
return this.cachedStepHandles.set(e.stepName, i), i;
|
|
13198
13209
|
}
|
|
13199
13210
|
getSteps() {
|
|
@@ -13290,17 +13301,17 @@ class Dl {
|
|
|
13290
13301
|
getStepByName(t) {
|
|
13291
13302
|
const e = this.getWorkflow()?.steps.find((a) => a.stepTitle === t);
|
|
13292
13303
|
if (!(!e || !this.stepHasHandle(e)))
|
|
13293
|
-
return
|
|
13304
|
+
return he.get(this.getWorkflowManager(), e);
|
|
13294
13305
|
}
|
|
13295
13306
|
getStepsByType(t) {
|
|
13296
|
-
return this.getWorkflow()?.steps.filter((e) => e.type === t).map((e) =>
|
|
13307
|
+
return this.getWorkflow()?.steps.filter((e) => e.type === t).map((e) => he.get(this.getWorkflowManager(), e)) || [];
|
|
13297
13308
|
}
|
|
13298
13309
|
getStepsByScene(t) {
|
|
13299
13310
|
if (!this.getWorkflow()?.stepGroups.find((a) => a.name === t.name))
|
|
13300
13311
|
throw new Error(
|
|
13301
13312
|
"Given scene is not present on workflow! Be careful when persisting scenes that you only use them with the relevant workflow."
|
|
13302
13313
|
);
|
|
13303
|
-
return t.stepIds.map((a) => this.getWorkflow()?.steps.find((i) => i.stepName === a)).filter((a) => this.stepHasHandle(a)).map((a) =>
|
|
13314
|
+
return t.stepIds.map((a) => this.getWorkflow()?.steps.find((i) => i.stepName === a)).filter((a) => this.stepHasHandle(a)).map((a) => he.get(this.getWorkflowManager(), a));
|
|
13304
13315
|
}
|
|
13305
13316
|
async attachCustomerDetails(t) {
|
|
13306
13317
|
return this.assignCustomerDetails({ emailAddress: t.email });
|
|
@@ -13382,7 +13393,7 @@ class Dl {
|
|
|
13382
13393
|
transactionId: e.id,
|
|
13383
13394
|
workflowViewerLink: "",
|
|
13384
13395
|
workflowViewerReadOnlyLink: ""
|
|
13385
|
-
}) : (await
|
|
13396
|
+
}) : (await fi(
|
|
13386
13397
|
[
|
|
13387
13398
|
{
|
|
13388
13399
|
workflowManager: this.workflowManager,
|
|
@@ -13566,7 +13577,7 @@ class Tl {
|
|
|
13566
13577
|
return e ? t.filter((a) => this.aspectConditionsSatisfied(a.getRawProperty(), e)) : t;
|
|
13567
13578
|
}
|
|
13568
13579
|
aspectConditionsSatisfied(t, e) {
|
|
13569
|
-
return !t.conditions || t.conditions.length === 0 ? !0 : (t.conditionMode ===
|
|
13580
|
+
return !t.conditions || t.conditions.length === 0 ? !0 : (t.conditionMode === Bn.AND ? Array.prototype.every.bind(t.conditions) : Array.prototype.some.bind(t.conditions))((i) => {
|
|
13570
13581
|
const r = e.aspects.find((o) => o.name === i.targetAspectName);
|
|
13571
13582
|
return r ? i.requiredVariantSelections.some((o) => o === r.value) : !1;
|
|
13572
13583
|
});
|
|
@@ -13576,14 +13587,14 @@ class Tl {
|
|
|
13576
13587
|
case L.FileUpload:
|
|
13577
13588
|
return new Nl(this.bundle, t).initialize();
|
|
13578
13589
|
case L.ColorOption:
|
|
13579
|
-
return new
|
|
13590
|
+
return new An(
|
|
13580
13591
|
this.bundle,
|
|
13581
13592
|
t,
|
|
13582
13593
|
t.entityId ? await j.getOption(t.entityId) : void 0
|
|
13583
13594
|
);
|
|
13584
13595
|
case L.Option: {
|
|
13585
13596
|
const e = t.entityId ? await j.getOption(t.entityId) : void 0;
|
|
13586
|
-
return e?.type === "Color" ? new
|
|
13597
|
+
return e?.type === "Color" ? new An(this.bundle, t, e) : new wi(this.bundle, t, e);
|
|
13587
13598
|
}
|
|
13588
13599
|
case L.Text:
|
|
13589
13600
|
return new Ql(this.bundle, t);
|
|
@@ -13592,7 +13603,7 @@ class Tl {
|
|
|
13592
13603
|
}
|
|
13593
13604
|
}
|
|
13594
13605
|
}
|
|
13595
|
-
class
|
|
13606
|
+
class Va {
|
|
13596
13607
|
constructor(t, e) {
|
|
13597
13608
|
this.bundle = t, this.property = e;
|
|
13598
13609
|
}
|
|
@@ -13653,7 +13664,7 @@ class La {
|
|
|
13653
13664
|
return this.bundle.getGlobalPropertyStateManager().getAspect(this.property.name);
|
|
13654
13665
|
}
|
|
13655
13666
|
}
|
|
13656
|
-
class Nl extends
|
|
13667
|
+
class Nl extends Va {
|
|
13657
13668
|
constructor(t, e) {
|
|
13658
13669
|
super(t, e);
|
|
13659
13670
|
}
|
|
@@ -13879,7 +13890,7 @@ class Nl extends La {
|
|
|
13879
13890
|
);
|
|
13880
13891
|
}
|
|
13881
13892
|
}
|
|
13882
|
-
class Ql extends
|
|
13893
|
+
class Ql extends Va {
|
|
13883
13894
|
constructor(t, e) {
|
|
13884
13895
|
super(t, e);
|
|
13885
13896
|
}
|
|
@@ -13918,7 +13929,7 @@ class Ql extends La {
|
|
|
13918
13929
|
await Promise.all(i);
|
|
13919
13930
|
}
|
|
13920
13931
|
}
|
|
13921
|
-
class wi extends
|
|
13932
|
+
class wi extends Va {
|
|
13922
13933
|
constructor(t, e, a) {
|
|
13923
13934
|
super(t, e), this.optionResource = a;
|
|
13924
13935
|
}
|
|
@@ -13980,7 +13991,7 @@ class wi extends La {
|
|
|
13980
13991
|
await Promise.all(i);
|
|
13981
13992
|
}
|
|
13982
13993
|
}
|
|
13983
|
-
class
|
|
13994
|
+
class An extends wi {
|
|
13984
13995
|
constructor(t, e, a) {
|
|
13985
13996
|
super(t, e, a);
|
|
13986
13997
|
}
|
|
@@ -14067,7 +14078,7 @@ function yi(n) {
|
|
|
14067
14078
|
e.value !== "" && t.set(e.name, !0);
|
|
14068
14079
|
}), t;
|
|
14069
14080
|
}
|
|
14070
|
-
function
|
|
14081
|
+
function ge(n) {
|
|
14071
14082
|
return ba(n, ["__typename"]);
|
|
14072
14083
|
}
|
|
14073
14084
|
class Ll {
|
|
@@ -14075,9 +14086,9 @@ class Ll {
|
|
|
14075
14086
|
this.mandatoryFulfilledAspects = /* @__PURE__ */ new Map(), this.bundleId = t, this.bundleOwnerId = e, this.configuration = a, this.bundleOptions = r;
|
|
14076
14087
|
const o = r?.existingGlobalPropertyState;
|
|
14077
14088
|
this.initPromise = o ? Promise.resolve(o).then(() => {
|
|
14078
|
-
console.log("Setting global property state to existing state."), this.globalPropertyState =
|
|
14089
|
+
console.log("Setting global property state to existing state."), this.globalPropertyState = ge(o), this.recalculateMandatoryStates();
|
|
14079
14090
|
}) : this.createGlobalPropertyState().then((s) => {
|
|
14080
|
-
console.log("Setting global property state to new state."), this.globalPropertyState =
|
|
14091
|
+
console.log("Setting global property state to new state."), this.globalPropertyState = ge(s), this.recalculateMandatoryStates();
|
|
14081
14092
|
}), this.onGlobalPropertyStateChange = i;
|
|
14082
14093
|
}
|
|
14083
14094
|
async clearAspects(t) {
|
|
@@ -14107,7 +14118,7 @@ class Ll {
|
|
|
14107
14118
|
async setGlobalPropertyState(t) {
|
|
14108
14119
|
this.globalPropertyState || await this.initPromise;
|
|
14109
14120
|
const e = Et(this.globalPropertyState);
|
|
14110
|
-
this.globalPropertyState = { ...
|
|
14121
|
+
this.globalPropertyState = { ...ge(t), id: e.id }, this.recalculateMandatoryStates(), await this.updateGlobalPropertyState(), await this.onGlobalPropertyStateChange(e, this.globalPropertyState);
|
|
14111
14122
|
}
|
|
14112
14123
|
getAspectMandatoryFulfilled(t) {
|
|
14113
14124
|
return this.mandatoryFulfilledAspects.get(t);
|
|
@@ -14166,7 +14177,7 @@ class Ll {
|
|
|
14166
14177
|
storage: a !== null ? a : void 0,
|
|
14167
14178
|
channel: i
|
|
14168
14179
|
});
|
|
14169
|
-
|
|
14180
|
+
Jt(o, this.globalPropertyState) || (await this.updateGlobalPropertyState(), await this.onGlobalPropertyStateChange(o, this.globalPropertyState));
|
|
14170
14181
|
}
|
|
14171
14182
|
async setAspectStorage(t, e, a) {
|
|
14172
14183
|
if (!this.globalPropertyState)
|
|
@@ -14193,7 +14204,7 @@ class Ll {
|
|
|
14193
14204
|
storage: e !== null ? e : void 0,
|
|
14194
14205
|
channel: a
|
|
14195
14206
|
});
|
|
14196
|
-
|
|
14207
|
+
Jt(r, this.globalPropertyState) || (await this.updateGlobalPropertyState(), await this.onGlobalPropertyStateChange(r, this.globalPropertyState));
|
|
14197
14208
|
}
|
|
14198
14209
|
async updateGlobalPropertyState() {
|
|
14199
14210
|
if (!this.globalPropertyState)
|
|
@@ -14236,7 +14247,7 @@ class Ll {
|
|
|
14236
14247
|
}
|
|
14237
14248
|
});
|
|
14238
14249
|
if (t.data?.globalPropertyStateUpdate)
|
|
14239
|
-
this.globalPropertyState =
|
|
14250
|
+
this.globalPropertyState = ge(t.data.globalPropertyStateUpdate);
|
|
14240
14251
|
else
|
|
14241
14252
|
throw new Error("Unable to update global property state");
|
|
14242
14253
|
}
|
|
@@ -14475,23 +14486,23 @@ class Si {
|
|
|
14475
14486
|
getProducts() {
|
|
14476
14487
|
if (!this.collection.productCollectionProducts)
|
|
14477
14488
|
throw new Error("Failed to find products on collection. Ensure you fetch them first!");
|
|
14478
|
-
return this.collection.productCollectionProducts.filter((t) => !!t.product).map((t) => new
|
|
14489
|
+
return this.collection.productCollectionProducts.filter((t) => !!t.product).map((t) => new me(t));
|
|
14479
14490
|
}
|
|
14480
14491
|
/**
|
|
14481
14492
|
* A list of products in this collections with useful helpers for interacting with them.
|
|
14482
14493
|
*/
|
|
14483
14494
|
async fetchProducts(t) {
|
|
14484
14495
|
if (this.fullFetched)
|
|
14485
|
-
return this.collection.productCollectionProducts.filter((a) => !!a.product).map((a) => new
|
|
14496
|
+
return this.collection.productCollectionProducts.filter((a) => !!a.product).map((a) => new me(a));
|
|
14486
14497
|
const e = await S.getShadowGraphqlClient().query({
|
|
14487
|
-
query:
|
|
14498
|
+
query: zs,
|
|
14488
14499
|
variables: {
|
|
14489
14500
|
id: this.getId(),
|
|
14490
14501
|
productIds: t
|
|
14491
14502
|
},
|
|
14492
14503
|
errorPolicy: "all"
|
|
14493
14504
|
});
|
|
14494
|
-
return t || (this.fullFetched = !0), this.collection.productCollectionProducts = e.data.productCollections[0].productCollectionProducts || [], this.collection.productCollectionProducts.filter((a) => !!a.product).map((a) => new
|
|
14505
|
+
return t || (this.fullFetched = !0), this.collection.productCollectionProducts = e.data.productCollections[0].productCollectionProducts || [], this.collection.productCollectionProducts.filter((a) => !!a.product).map((a) => new me(a));
|
|
14495
14506
|
}
|
|
14496
14507
|
/**
|
|
14497
14508
|
* Returns a list of collections products matching the associated metafield/tag filters.
|
|
@@ -14500,7 +14511,7 @@ class Si {
|
|
|
14500
14511
|
*/
|
|
14501
14512
|
async filterProducts(t, e, a, i) {
|
|
14502
14513
|
const r = await S.getShadowGraphqlClient().query({
|
|
14503
|
-
query:
|
|
14514
|
+
query: Gs,
|
|
14504
14515
|
errorPolicy: "all",
|
|
14505
14516
|
variables: {
|
|
14506
14517
|
id: this.getId(),
|
|
@@ -14544,7 +14555,7 @@ class Si {
|
|
|
14544
14555
|
};
|
|
14545
14556
|
}
|
|
14546
14557
|
const c = new AbortController(), { signal: d } = c, u = S.getShadowGraphqlClient().watchQuery({
|
|
14547
|
-
query:
|
|
14558
|
+
query: Ws,
|
|
14548
14559
|
variables: {
|
|
14549
14560
|
id: this.getId(),
|
|
14550
14561
|
limit: e,
|
|
@@ -14581,7 +14592,7 @@ class Si {
|
|
|
14581
14592
|
if (h || m.partial && (!m.data.productCollections || m.data.productCollections.length === 0 || !m.data.productCollections[0].productCollectionProductsFeed?.items || m.data.productCollections[0].productCollectionProductsFeed?.items.length === 0))
|
|
14582
14593
|
return;
|
|
14583
14594
|
c.abort(), h = !0, g.unsubscribe();
|
|
14584
|
-
const p = m.data.productCollections?.[0].productCollectionProductsFeed?.items.filter((f) => !!f.product).map((f) => new
|
|
14595
|
+
const p = m.data.productCollections?.[0].productCollectionProductsFeed?.items.filter((f) => !!f.product).map((f) => new me(Et(f))) || [];
|
|
14585
14596
|
A({
|
|
14586
14597
|
items: p,
|
|
14587
14598
|
// Clone items because it could be cached data (immutable)
|
|
@@ -14605,7 +14616,7 @@ class Si {
|
|
|
14605
14616
|
return this.collection;
|
|
14606
14617
|
}
|
|
14607
14618
|
}
|
|
14608
|
-
class
|
|
14619
|
+
class me {
|
|
14609
14620
|
constructor(t) {
|
|
14610
14621
|
this.product = t.product, this.productResource = t;
|
|
14611
14622
|
}
|
|
@@ -14663,10 +14674,10 @@ class ge {
|
|
|
14663
14674
|
const e = this.productResource.workflowId;
|
|
14664
14675
|
if (e) {
|
|
14665
14676
|
const a = t.find((i) => i.workflowName === e);
|
|
14666
|
-
if (a) return new
|
|
14677
|
+
if (a) return new qt(a);
|
|
14667
14678
|
}
|
|
14668
14679
|
if (t.length === 1)
|
|
14669
|
-
return new
|
|
14680
|
+
return new qt(t[0]);
|
|
14670
14681
|
throw new gt(
|
|
14671
14682
|
"Called getDefaultWorkflow() but no default workflow is configured for the requested product. Multiple workflows exist so we can't assume!"
|
|
14672
14683
|
);
|
|
@@ -14679,7 +14690,7 @@ class ge {
|
|
|
14679
14690
|
throw new gt(
|
|
14680
14691
|
"No workflows on configured product. Ensure at least 1 workflow is assigned to this product."
|
|
14681
14692
|
);
|
|
14682
|
-
return this.product.workflows.sort((e, a) => (e.index ?? 0) - (a.index ?? 0)).map((e) => new
|
|
14693
|
+
return this.product.workflows.sort((e, a) => (e.index ?? 0) - (a.index ?? 0)).map((e) => new qt(e));
|
|
14683
14694
|
}
|
|
14684
14695
|
/**
|
|
14685
14696
|
* A list of all integrations this product is connected to.
|
|
@@ -14723,7 +14734,7 @@ class ge {
|
|
|
14723
14734
|
return Wl.requestKeysForEntity(this.product.id, t);
|
|
14724
14735
|
}
|
|
14725
14736
|
}
|
|
14726
|
-
class
|
|
14737
|
+
class qt {
|
|
14727
14738
|
constructor(t) {
|
|
14728
14739
|
this.workflow = t;
|
|
14729
14740
|
}
|
|
@@ -14797,7 +14808,7 @@ class Hl {
|
|
|
14797
14808
|
};
|
|
14798
14809
|
}
|
|
14799
14810
|
}
|
|
14800
|
-
const
|
|
14811
|
+
const Jl = C`
|
|
14801
14812
|
${We(!1)}
|
|
14802
14813
|
query GetProductCollections($ids: [String!]!) {
|
|
14803
14814
|
productCollections(ids: $ids) {
|
|
@@ -14805,13 +14816,13 @@ const Yl = C`
|
|
|
14805
14816
|
}
|
|
14806
14817
|
}
|
|
14807
14818
|
`, Ld = async (n) => (await S.getShadowGraphqlClient().query({
|
|
14808
|
-
query:
|
|
14819
|
+
query: Jl,
|
|
14809
14820
|
errorPolicy: "all",
|
|
14810
14821
|
variables: {
|
|
14811
14822
|
ids: n
|
|
14812
14823
|
}
|
|
14813
14824
|
})).data?.productCollections?.map((e) => new Si(e));
|
|
14814
|
-
class
|
|
14825
|
+
class Yl {
|
|
14815
14826
|
constructor() {
|
|
14816
14827
|
this.listeners = {};
|
|
14817
14828
|
}
|
|
@@ -14874,9 +14885,9 @@ const Kl = C`
|
|
|
14874
14885
|
}
|
|
14875
14886
|
}
|
|
14876
14887
|
`;
|
|
14877
|
-
class
|
|
14888
|
+
class hn {
|
|
14878
14889
|
constructor(t, e, a, i, r, o, s) {
|
|
14879
|
-
this.workflowExperiences = [], this.eventEmitter = new
|
|
14890
|
+
this.workflowExperiences = [], this.eventEmitter = new Yl(), this.updatesLocked = !1, this.client = t, this.id = e.id, this.name = e.name || "", this.dispatchDate = e.dispatchDate, this.template = e.template || !1, this.quoteId = e.quoteId, this.shareActions = e.bundleShareActions, this.workflowViewerLink = e.workflowViewerLink, this.workflowViewerAmendLink = e.workflowViewerAmendLink, this.ownerId = r, this.metadata = new Map(e.metadata?.map((d) => [d.key, d.value]) || []), this.completed = e.completed ?? !1, this.productCollection = e.productCollection, this.bundleStateManager = new Vl(e.bundleStateData);
|
|
14880
14891
|
const l = this.productCollection?.globalPropertyConfiguration;
|
|
14881
14892
|
this.globalConfigurationPropertyId = l?.id, this.globalPropertyStateManager = new Ll(
|
|
14882
14893
|
this.id,
|
|
@@ -15177,7 +15188,7 @@ class An {
|
|
|
15177
15188
|
);
|
|
15178
15189
|
const i = D.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map(), r = e.map((s) => i.get(s));
|
|
15179
15190
|
await S.getShadowGraphqlClient().mutate({
|
|
15180
|
-
mutation:
|
|
15191
|
+
mutation: Js,
|
|
15181
15192
|
variables: {
|
|
15182
15193
|
id: this.id,
|
|
15183
15194
|
transactionIds: e,
|
|
@@ -15206,7 +15217,7 @@ class An {
|
|
|
15206
15217
|
if (this.workflowExperiences.find((s) => s.getTransaction().id === a)) throw new Error("Unable to add transaction to bundle - Already Exists!");
|
|
15207
15218
|
const o = (D.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(a);
|
|
15208
15219
|
await S.getShadowGraphqlClient().mutate({
|
|
15209
|
-
mutation:
|
|
15220
|
+
mutation: Hs,
|
|
15210
15221
|
variables: {
|
|
15211
15222
|
id: this.id,
|
|
15212
15223
|
transactionId: a
|
|
@@ -15274,7 +15285,7 @@ class An {
|
|
|
15274
15285
|
a.forEach((i) => i.setBundle(void 0)), [...this.workflowExperiences, ...a].forEach(
|
|
15275
15286
|
(i) => i.checkForPriceBreakChanges()
|
|
15276
15287
|
), this.previewService && a.forEach((i) => i.getWorkflowManager().ejectFromPreviewService()), t.forEach((i) => this.bundleStateManager.removeStateForTransaction(i.id)), await S.getShadowGraphqlClient().mutate({
|
|
15277
|
-
mutation:
|
|
15288
|
+
mutation: Ks,
|
|
15278
15289
|
variables: {
|
|
15279
15290
|
id: this.id,
|
|
15280
15291
|
transactionIds: t.map((i) => i.id),
|
|
@@ -15335,7 +15346,7 @@ class An {
|
|
|
15335
15346
|
}
|
|
15336
15347
|
async addStakeholder(t, e) {
|
|
15337
15348
|
const a = await S.getShadowGraphqlClient().mutate({
|
|
15338
|
-
mutation:
|
|
15349
|
+
mutation: _s,
|
|
15339
15350
|
variables: {
|
|
15340
15351
|
id: this.id,
|
|
15341
15352
|
details: t,
|
|
@@ -15351,7 +15362,7 @@ class An {
|
|
|
15351
15362
|
}
|
|
15352
15363
|
async removeStakeholder(t) {
|
|
15353
15364
|
if (!(await S.getShadowGraphqlClient().mutate({
|
|
15354
|
-
mutation:
|
|
15365
|
+
mutation: Xs,
|
|
15355
15366
|
variables: {
|
|
15356
15367
|
id: this.id,
|
|
15357
15368
|
emailAddress: t
|
|
@@ -15363,7 +15374,7 @@ class An {
|
|
|
15363
15374
|
}
|
|
15364
15375
|
async updateStakeholders(t) {
|
|
15365
15376
|
const e = await S.getShadowGraphqlClient().mutate({
|
|
15366
|
-
mutation:
|
|
15377
|
+
mutation: Zs,
|
|
15367
15378
|
variables: {
|
|
15368
15379
|
id: this.id,
|
|
15369
15380
|
input: t
|
|
@@ -15378,7 +15389,7 @@ class An {
|
|
|
15378
15389
|
}
|
|
15379
15390
|
async getAllStakeholders() {
|
|
15380
15391
|
const t = await S.getShadowGraphqlClient().query({
|
|
15381
|
-
query:
|
|
15392
|
+
query: cn,
|
|
15382
15393
|
errorPolicy: "all",
|
|
15383
15394
|
fetchPolicy: "no-cache",
|
|
15384
15395
|
variables: {
|
|
@@ -15394,7 +15405,7 @@ class An {
|
|
|
15394
15405
|
}
|
|
15395
15406
|
async getCurrentStakeholder() {
|
|
15396
15407
|
const t = await S.getShadowGraphqlClient().query({
|
|
15397
|
-
query:
|
|
15408
|
+
query: cn,
|
|
15398
15409
|
errorPolicy: "all",
|
|
15399
15410
|
fetchPolicy: "no-cache",
|
|
15400
15411
|
variables: {
|
|
@@ -15414,7 +15425,7 @@ class An {
|
|
|
15414
15425
|
}
|
|
15415
15426
|
async finish(t, e, a) {
|
|
15416
15427
|
this.completed && await S.getShadowGraphqlClient().mutate({
|
|
15417
|
-
mutation:
|
|
15428
|
+
mutation: il,
|
|
15418
15429
|
variables: {
|
|
15419
15430
|
bundleId: this.id
|
|
15420
15431
|
}
|
|
@@ -15422,7 +15433,7 @@ class An {
|
|
|
15422
15433
|
let i = !1;
|
|
15423
15434
|
if (this.workflowExperiences.length > 100 && (await this.client.getIntegration()).partner.beta && (i = !0), i) {
|
|
15424
15435
|
const o = await S.getShadowGraphqlClient().mutate({
|
|
15425
|
-
mutation:
|
|
15436
|
+
mutation: hl,
|
|
15426
15437
|
variables: {
|
|
15427
15438
|
id: this.id
|
|
15428
15439
|
// TODO: preview image
|
|
@@ -15434,9 +15445,9 @@ class An {
|
|
|
15434
15445
|
const c = await (async () => {
|
|
15435
15446
|
let d = 0;
|
|
15436
15447
|
for (; d < 121; ) {
|
|
15437
|
-
if (d += 1, s.status ===
|
|
15448
|
+
if (d += 1, s.status === Vt.Failed || s.children.some((A) => A.status === Vt.Failed))
|
|
15438
15449
|
return;
|
|
15439
|
-
if (s.status ===
|
|
15450
|
+
if (s.status === Vt.Completed)
|
|
15440
15451
|
return s;
|
|
15441
15452
|
await new Promise((A) => setTimeout(A, 300));
|
|
15442
15453
|
const u = await S.getShadowGraphqlClient().mutate({
|
|
@@ -15450,38 +15461,40 @@ class An {
|
|
|
15450
15461
|
console.error("failed to refetch jobs", u.errors);
|
|
15451
15462
|
return;
|
|
15452
15463
|
}
|
|
15453
|
-
s = u.data.jobs[0], a
|
|
15454
|
-
|
|
15455
|
-
|
|
15456
|
-
|
|
15464
|
+
if (s = u.data.jobs[0], a) {
|
|
15465
|
+
let A = 0, h = 0;
|
|
15466
|
+
for (const g of s.children)
|
|
15467
|
+
g.status === Vt.Completed && (A += g.data.transactionCount), h += g.data.transactionCount;
|
|
15468
|
+
a(A, h);
|
|
15469
|
+
}
|
|
15457
15470
|
}
|
|
15458
15471
|
})();
|
|
15459
15472
|
if (c) {
|
|
15460
15473
|
const d = await S.getShadowGraphqlClient().mutate({
|
|
15461
|
-
mutation:
|
|
15474
|
+
mutation: $s,
|
|
15462
15475
|
variables: {
|
|
15463
|
-
ids:
|
|
15476
|
+
ids: [c.id]
|
|
15464
15477
|
},
|
|
15465
15478
|
errorPolicy: "all"
|
|
15466
15479
|
});
|
|
15467
|
-
if (d.data?.
|
|
15468
|
-
const u = d.data.transactions.map((
|
|
15469
|
-
const
|
|
15470
|
-
return
|
|
15471
|
-
|
|
15472
|
-
|
|
15473
|
-
|
|
15480
|
+
if (d.data?.jobs && d.data.jobs.length === 1 && d.data.jobs[0].children && d.data.jobs[0].children.length > 0) {
|
|
15481
|
+
const u = d.data.jobs[0].children.flatMap((A) => A.data.transactions.map((h) => {
|
|
15482
|
+
const g = this.workflowExperiences.find((p) => p.getTransaction().id === h.id), m = g.getWorkflowManager().getWorkflowMetadata();
|
|
15483
|
+
return pi(
|
|
15484
|
+
h,
|
|
15485
|
+
g.getProduct(),
|
|
15486
|
+
g.getWorkflow(),
|
|
15474
15487
|
Sa(
|
|
15475
15488
|
!0,
|
|
15476
|
-
|
|
15477
|
-
|
|
15489
|
+
g.getWorkflow(),
|
|
15490
|
+
g.getWorkflowManager().getWorkflowSelections()
|
|
15478
15491
|
)[0],
|
|
15479
|
-
|
|
15480
|
-
|
|
15492
|
+
h.design?.sku,
|
|
15493
|
+
m && ya(m, g.getWorkflow(), !0),
|
|
15481
15494
|
// TODO: we should probably have a way to send all of these across, probably in the bundle data
|
|
15482
15495
|
c.data?.processExecutions?.[0]?.id
|
|
15483
15496
|
);
|
|
15484
|
-
});
|
|
15497
|
+
}));
|
|
15485
15498
|
return {
|
|
15486
15499
|
bundleId: this.id,
|
|
15487
15500
|
name: this.getName(),
|
|
@@ -15499,7 +15512,7 @@ class An {
|
|
|
15499
15512
|
} else
|
|
15500
15513
|
console.error("designCreateBundle failed", o.errors);
|
|
15501
15514
|
}
|
|
15502
|
-
const r = await
|
|
15515
|
+
const r = await fi(
|
|
15503
15516
|
this.workflowExperiences.map((o) => {
|
|
15504
15517
|
const s = o.getWorkflow();
|
|
15505
15518
|
if (!s) throw new Error("Unable to create designs - Workflow not found!");
|
|
@@ -15561,7 +15574,7 @@ class An {
|
|
|
15561
15574
|
}
|
|
15562
15575
|
async assignGlobalPropertyConfiguration(t) {
|
|
15563
15576
|
await S.getShadowGraphqlClient().mutate({
|
|
15564
|
-
mutation:
|
|
15577
|
+
mutation: al,
|
|
15565
15578
|
variables: {
|
|
15566
15579
|
bundleId: this.id,
|
|
15567
15580
|
globalPropertyConfigurationId: t
|
|
@@ -15573,7 +15586,7 @@ class An {
|
|
|
15573
15586
|
}
|
|
15574
15587
|
async assignProductCollection(t) {
|
|
15575
15588
|
const e = await S.getShadowGraphqlClient().mutate({
|
|
15576
|
-
mutation:
|
|
15589
|
+
mutation: el(
|
|
15577
15590
|
this.globalPropertyStateManager.getBundleOptions()?.eagerFetchProducts ?? !1
|
|
15578
15591
|
),
|
|
15579
15592
|
variables: {
|
|
@@ -15645,7 +15658,7 @@ class An {
|
|
|
15645
15658
|
}
|
|
15646
15659
|
async updateTransactionOrder() {
|
|
15647
15660
|
await S.getShadowGraphqlClient().mutate({
|
|
15648
|
-
mutation:
|
|
15661
|
+
mutation: tl,
|
|
15649
15662
|
variables: {
|
|
15650
15663
|
id: this.id,
|
|
15651
15664
|
transactionIds: this.workflowExperiences.map((t) => t.getTransaction().id)
|
|
@@ -15674,7 +15687,7 @@ class An {
|
|
|
15674
15687
|
});
|
|
15675
15688
|
await Promise.all(l), await Promise.all(r.map((u) => u.applyGlobalState()));
|
|
15676
15689
|
const c = this.globalPropertyStateManager.getGlobalPropertyState(), d = this.globalPropertyHandleService.applyConditionsFromState(a, c);
|
|
15677
|
-
|
|
15690
|
+
Jt(r.sort(), d.sort()) || (this.checkConditionalHandlesChanged(r, d), this.checkMandatoryHandlesChanged(c, d), await this.onGlobalPropertiesChanged(e, c));
|
|
15678
15691
|
}
|
|
15679
15692
|
checkConditionalHandlesChanged(t, e) {
|
|
15680
15693
|
(() => {
|
|
@@ -15715,7 +15728,7 @@ class An {
|
|
|
15715
15728
|
}
|
|
15716
15729
|
async approve(t, e) {
|
|
15717
15730
|
await S.getShadowGraphqlClient().mutate({
|
|
15718
|
-
mutation:
|
|
15731
|
+
mutation: rl,
|
|
15719
15732
|
errorPolicy: "all",
|
|
15720
15733
|
fetchPolicy: "no-cache",
|
|
15721
15734
|
variables: {
|
|
@@ -15727,7 +15740,7 @@ class An {
|
|
|
15727
15740
|
}
|
|
15728
15741
|
async reject(t, e) {
|
|
15729
15742
|
await S.getShadowGraphqlClient().mutate({
|
|
15730
|
-
mutation:
|
|
15743
|
+
mutation: ol,
|
|
15731
15744
|
errorPolicy: "all",
|
|
15732
15745
|
fetchPolicy: "no-cache",
|
|
15733
15746
|
variables: {
|
|
@@ -15828,14 +15841,14 @@ class ec {
|
|
|
15828
15841
|
* @returns The nodes contained within the execution.
|
|
15829
15842
|
*/
|
|
15830
15843
|
getNodes() {
|
|
15831
|
-
return this.execution.nodes.map((t) => new
|
|
15844
|
+
return this.execution.nodes.map((t) => new pe(t));
|
|
15832
15845
|
}
|
|
15833
15846
|
/**
|
|
15834
15847
|
* @param type The type of node to return.
|
|
15835
15848
|
* @returns A list of nodes matching the requested type.
|
|
15836
15849
|
*/
|
|
15837
15850
|
getNodesByType(t) {
|
|
15838
|
-
return this.execution.nodes.filter((e) => e.type === t).map((e) => new
|
|
15851
|
+
return this.execution.nodes.filter((e) => e.type === t).map((e) => new pe(e));
|
|
15839
15852
|
}
|
|
15840
15853
|
/**
|
|
15841
15854
|
* @returns A list of input nodes that exist in this execution.
|
|
@@ -15844,7 +15857,7 @@ class ec {
|
|
|
15844
15857
|
return this.execution.nodes.filter(
|
|
15845
15858
|
(t) => t.type === "StartTerminal"
|
|
15846
15859
|
/* StartTerminal */
|
|
15847
|
-
).map((t) => new
|
|
15860
|
+
).map((t) => new pe(t));
|
|
15848
15861
|
}
|
|
15849
15862
|
/**
|
|
15850
15863
|
* @returns A list of out put nodes that exist in this execution.
|
|
@@ -15853,7 +15866,7 @@ class ec {
|
|
|
15853
15866
|
return this.execution.nodes.filter(
|
|
15854
15867
|
(t) => t.type === "EndTerminal"
|
|
15855
15868
|
/* EndTerminal */
|
|
15856
|
-
).map((t) => new
|
|
15869
|
+
).map((t) => new pe(t));
|
|
15857
15870
|
}
|
|
15858
15871
|
/**
|
|
15859
15872
|
* @returns A date object representing the point in time this execution completed.
|
|
@@ -15870,7 +15883,7 @@ class ec {
|
|
|
15870
15883
|
return new Date(this.execution.failedAt);
|
|
15871
15884
|
}
|
|
15872
15885
|
}
|
|
15873
|
-
class
|
|
15886
|
+
class pe {
|
|
15874
15887
|
constructor(t) {
|
|
15875
15888
|
this.node = t;
|
|
15876
15889
|
}
|
|
@@ -15887,7 +15900,7 @@ class me {
|
|
|
15887
15900
|
return this.getArtifacts().get(t);
|
|
15888
15901
|
}
|
|
15889
15902
|
}
|
|
15890
|
-
class
|
|
15903
|
+
class za {
|
|
15891
15904
|
constructor(t) {
|
|
15892
15905
|
this.value = t;
|
|
15893
15906
|
}
|
|
@@ -15900,12 +15913,12 @@ class Va {
|
|
|
15900
15913
|
}
|
|
15901
15914
|
}
|
|
15902
15915
|
var ac = /* @__PURE__ */ ((n) => (n.Transaction = "Transaction", n.Bundle = "Bundle", n.Product = "Product", n.Variant = "Variant", n.Option = "Option", n.LineItem = "LineItem", n.Asset = "Asset", n))(ac || {});
|
|
15903
|
-
class Vd extends
|
|
15916
|
+
class Vd extends za {
|
|
15904
15917
|
constructor(t) {
|
|
15905
15918
|
super(`"${t}"`);
|
|
15906
15919
|
}
|
|
15907
15920
|
}
|
|
15908
|
-
class vi extends
|
|
15921
|
+
class vi extends za {
|
|
15909
15922
|
constructor(t, e) {
|
|
15910
15923
|
if (e !== "Asset" && !vi.validUUID(t))
|
|
15911
15924
|
throw new Error("Invalid ID, must be a valid v4 UUID. https://www.uuidgenerator.net/");
|
|
@@ -15915,12 +15928,12 @@ class vi extends Va {
|
|
|
15915
15928
|
return t.match(/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i);
|
|
15916
15929
|
}
|
|
15917
15930
|
}
|
|
15918
|
-
class zd extends
|
|
15931
|
+
class zd extends za {
|
|
15919
15932
|
constructor(t) {
|
|
15920
15933
|
super(`[${t.map((e) => e.getRaw()).join(",")}]`);
|
|
15921
15934
|
}
|
|
15922
15935
|
}
|
|
15923
|
-
class
|
|
15936
|
+
class gn {
|
|
15924
15937
|
constructor(t) {
|
|
15925
15938
|
this.integrationProduct = t;
|
|
15926
15939
|
}
|
|
@@ -15947,7 +15960,7 @@ class hn {
|
|
|
15947
15960
|
throw new Error(
|
|
15948
15961
|
"No workflows found on product. This is generally due to a configuration error. Please confirm at least one workflow is configured for this product."
|
|
15949
15962
|
);
|
|
15950
|
-
return new
|
|
15963
|
+
return new qt(t[0]);
|
|
15951
15964
|
}
|
|
15952
15965
|
getAllWorkflows() {
|
|
15953
15966
|
if (!this.integrationProduct.product)
|
|
@@ -15957,10 +15970,10 @@ class hn {
|
|
|
15957
15970
|
throw new Error(
|
|
15958
15971
|
"No workflows found on product. This is generally due to a configuration error. Please confirm at least one workflow is configured for this product."
|
|
15959
15972
|
);
|
|
15960
|
-
return t.sort((e, a) => (e.index ?? 0) - (a.index ?? 0)).map((e) => new
|
|
15973
|
+
return t.sort((e, a) => (e.index ?? 0) - (a.index ?? 0)).map((e) => new qt(e));
|
|
15961
15974
|
}
|
|
15962
15975
|
}
|
|
15963
|
-
const
|
|
15976
|
+
const fe = C`
|
|
15964
15977
|
query GetCustomer($emailAddress: String!) {
|
|
15965
15978
|
customer(emailAddress: $emailAddress) {
|
|
15966
15979
|
id
|
|
@@ -16108,7 +16121,7 @@ class sc {
|
|
|
16108
16121
|
}
|
|
16109
16122
|
async generateCode(t) {
|
|
16110
16123
|
const e = await this.cognitoClient?.send(
|
|
16111
|
-
new
|
|
16124
|
+
new qa({
|
|
16112
16125
|
AuthFlow: "CUSTOM_AUTH",
|
|
16113
16126
|
ClientId: this.userPoolClientId,
|
|
16114
16127
|
AuthParameters: {
|
|
@@ -16142,7 +16155,7 @@ class sc {
|
|
|
16142
16155
|
throw new Error("Failed to find existing tokens.");
|
|
16143
16156
|
const e = JSON.parse(t);
|
|
16144
16157
|
return await this.cognitoClient?.send(
|
|
16145
|
-
new
|
|
16158
|
+
new qa({
|
|
16146
16159
|
AuthFlow: "REFRESH_TOKEN_AUTH",
|
|
16147
16160
|
ClientId: this.userPoolClientId,
|
|
16148
16161
|
AuthParameters: {
|
|
@@ -16172,7 +16185,7 @@ class lc {
|
|
|
16172
16185
|
* @param currency The currency to determine precision for.
|
|
16173
16186
|
*/
|
|
16174
16187
|
getPrecisionForCurrency(t) {
|
|
16175
|
-
const e = t, a =
|
|
16188
|
+
const e = t, a = ja.code(e);
|
|
16176
16189
|
return a ? a.digits : 2;
|
|
16177
16190
|
}
|
|
16178
16191
|
/**
|
|
@@ -16183,11 +16196,11 @@ class lc {
|
|
|
16183
16196
|
*/
|
|
16184
16197
|
getSpecialFormat(t) {
|
|
16185
16198
|
const e = t;
|
|
16186
|
-
if (
|
|
16199
|
+
if (ja.code(e)?.code === "CLP")
|
|
16187
16200
|
return "USD0,0";
|
|
16188
16201
|
}
|
|
16189
16202
|
}
|
|
16190
|
-
const
|
|
16203
|
+
const mn = new lc();
|
|
16191
16204
|
class cc {
|
|
16192
16205
|
constructor(t, e, a, i) {
|
|
16193
16206
|
this.presentmentCurrency = void 0, this.presentmentCurrency = i, this.partnerCurrency = a, this.rateFrom = t, this.rateTo = e;
|
|
@@ -16219,13 +16232,13 @@ class cc {
|
|
|
16219
16232
|
* Converts a monetary value from the database to the units of its currency.
|
|
16220
16233
|
*/
|
|
16221
16234
|
units(t, e) {
|
|
16222
|
-
return t / Math.pow(10,
|
|
16235
|
+
return t / Math.pow(10, mn.getPrecisionForCurrency(e));
|
|
16223
16236
|
}
|
|
16224
16237
|
/**
|
|
16225
16238
|
* Converts a monetary value in units to the subunits of its currency.
|
|
16226
16239
|
*/
|
|
16227
16240
|
subunits(t, e) {
|
|
16228
|
-
return t * Math.pow(10,
|
|
16241
|
+
return t * Math.pow(10, mn.getPrecisionForCurrency(e));
|
|
16229
16242
|
}
|
|
16230
16243
|
}
|
|
16231
16244
|
const dc = async (n, t) => {
|
|
@@ -16247,7 +16260,7 @@ const dc = async (n, t) => {
|
|
|
16247
16260
|
i.steps.forEach((r) => {
|
|
16248
16261
|
delete r.data.__typename, r.option?.id && (r.option.defaultVariant?.asset && $.cacheAsset(r.option.defaultVariant.asset), r.option.colorProfile && $.cacheAsset(r.option.colorProfile), r.option.variants?.forEach((o) => {
|
|
16249
16262
|
o.asset && $.cacheAsset(o.asset), o.thumbnail && $.cacheAsset(o.thumbnail), o.material && $.cacheMaterial(o.material);
|
|
16250
|
-
}),
|
|
16263
|
+
}), Xt.set({ id: r.option.id }, Promise.resolve(r.option)));
|
|
16251
16264
|
}), i.finalizeStepConfig || (i.finalizeStepConfig = {}), i.finalizeStepConfig.termsMarkdown = i.finalizeStepConfig.termsMarkdown || i.partner.termsMarkdown;
|
|
16252
16265
|
}), a;
|
|
16253
16266
|
}, uc = async (n, t) => {
|
|
@@ -16256,11 +16269,11 @@ const dc = async (n, t) => {
|
|
|
16256
16269
|
throw new Error(`Workflow not found: ${n}`);
|
|
16257
16270
|
return a;
|
|
16258
16271
|
}, Ei = async (n, t) => {
|
|
16259
|
-
const e = n.map((s) =>
|
|
16272
|
+
const e = n.map((s) => Xt.get({ id: s, options: t })), a = n.filter((s, l) => e[l] === void 0);
|
|
16260
16273
|
if (a.length === 0)
|
|
16261
16274
|
return Promise.all(e);
|
|
16262
16275
|
const i = dc(a, t), r = a.map(
|
|
16263
|
-
(s) =>
|
|
16276
|
+
(s) => Xt.set({ id: s, options: t }, uc(s, i))
|
|
16264
16277
|
), o = e.filter((s) => s !== void 0);
|
|
16265
16278
|
return await Promise.all(o.concat(r));
|
|
16266
16279
|
}, Ac = async (n, t) => (await Ei([n], t))[0], hc = async (n) => {
|
|
@@ -16285,7 +16298,7 @@ class Gd {
|
|
|
16285
16298
|
} catch (a) {
|
|
16286
16299
|
throw console.error(a), new gt("Critical - Unable to synchronize workflow state with server.");
|
|
16287
16300
|
}
|
|
16288
|
-
}, this.options = t, this.options.applicationKey && lr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 34.1.0-beta.
|
|
16301
|
+
}, this.options = t, this.options.applicationKey && lr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 34.1.0-beta.379d1129-a372-5b12-8736-fb4c91e636cc"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
|
|
16289
16302
|
}
|
|
16290
16303
|
configure(t) {
|
|
16291
16304
|
pt.setHubUrl(t.hubUrl), pt.setServerUrl(t.serverUrl), pt.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 && dr(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration(), this.spiffRegion && this.userPoolRegion && this.userPoolClientId && Lt.init(this.spiffRegion, this.userPoolRegion, this.userPoolClientId);
|
|
@@ -16417,7 +16430,7 @@ class Gd {
|
|
|
16417
16430
|
}
|
|
16418
16431
|
async customerHasBundleTemplates(t) {
|
|
16419
16432
|
const i = (await S.getShadowGraphqlClient().query({
|
|
16420
|
-
query:
|
|
16433
|
+
query: fe,
|
|
16421
16434
|
errorPolicy: "all",
|
|
16422
16435
|
fetchPolicy: "no-cache",
|
|
16423
16436
|
variables: {
|
|
@@ -16436,7 +16449,7 @@ class Gd {
|
|
|
16436
16449
|
async getOrCreateCustomer(t) {
|
|
16437
16450
|
this.customer = void 0;
|
|
16438
16451
|
const e = S.getShadowGraphqlClient(), i = (await e.query({
|
|
16439
|
-
query:
|
|
16452
|
+
query: fe,
|
|
16440
16453
|
errorPolicy: "all",
|
|
16441
16454
|
fetchPolicy: "no-cache",
|
|
16442
16455
|
variables: {
|
|
@@ -16489,7 +16502,7 @@ class Gd {
|
|
|
16489
16502
|
return this.logOut(), console.error("Failed to refresh tokens."), !1;
|
|
16490
16503
|
}
|
|
16491
16504
|
const s = (await S.getShadowGraphqlClient().query({
|
|
16492
|
-
query:
|
|
16505
|
+
query: fe,
|
|
16493
16506
|
errorPolicy: "all",
|
|
16494
16507
|
fetchPolicy: "no-cache",
|
|
16495
16508
|
variables: {
|
|
@@ -16518,7 +16531,7 @@ class Gd {
|
|
|
16518
16531
|
if (i?.AuthenticationResult) {
|
|
16519
16532
|
localStorage.setItem("last-refreshed-cognito-tokens", `${(/* @__PURE__ */ new Date()).getTime() / 1e3}`), localStorage.setItem("cognito-tokens", JSON.stringify(i.AuthenticationResult)), localStorage.setItem("cognito-email", t);
|
|
16520
16533
|
const o = (await S.getShadowGraphqlClient().query({
|
|
16521
|
-
query:
|
|
16534
|
+
query: fe,
|
|
16522
16535
|
errorPolicy: "all",
|
|
16523
16536
|
fetchPolicy: "no-cache",
|
|
16524
16537
|
variables: {
|
|
@@ -16570,7 +16583,7 @@ class Gd {
|
|
|
16570
16583
|
*/
|
|
16571
16584
|
async getNewBundle(t, e, a) {
|
|
16572
16585
|
const r = (await S.getShadowGraphqlClient().mutate({
|
|
16573
|
-
mutation:
|
|
16586
|
+
mutation: qs(a?.graphql?.productCollection?.eagerFetchProducts || !1),
|
|
16574
16587
|
variables: {
|
|
16575
16588
|
collectionId: t,
|
|
16576
16589
|
initialMetadata: e ? Object.entries(e).map((c, d) => ({ key: c[0], value: c[1] })) : void 0,
|
|
@@ -16585,7 +16598,7 @@ class Gd {
|
|
|
16585
16598
|
o.set(r.id, r.partner.id), D.setMap("bundlePartnerIds", o);
|
|
16586
16599
|
const s = D.getMap("bundleOwnerIds") || /* @__PURE__ */ new Map();
|
|
16587
16600
|
s.set(r.id, r.bundleOwnerId), D.setMap("bundleOwnerIds", s);
|
|
16588
|
-
const l = new
|
|
16601
|
+
const l = new hn(this, r, void 0, void 0, r.bundleOwnerId, {
|
|
16589
16602
|
eagerFetchProducts: a?.graphql?.productCollection?.eagerFetchProducts
|
|
16590
16603
|
});
|
|
16591
16604
|
return await l.getInitializationPromise(), l;
|
|
@@ -16612,7 +16625,7 @@ class Gd {
|
|
|
16612
16625
|
...l,
|
|
16613
16626
|
...i?.graphql?.additionalHeaders
|
|
16614
16627
|
}, d = await S.getShadowGraphqlClient().query({
|
|
16615
|
-
query:
|
|
16628
|
+
query: Ls(i?.graphql?.productCollection?.eagerFetchProducts || !1),
|
|
16616
16629
|
variables: {
|
|
16617
16630
|
id: t
|
|
16618
16631
|
},
|
|
@@ -16625,7 +16638,7 @@ class Gd {
|
|
|
16625
16638
|
throw new Error(`Unable to find bundle: ${t}`);
|
|
16626
16639
|
const u = d.data?.bundles[0], A = D.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
|
|
16627
16640
|
A.set(u.id, u.partner.id), D.setMap("bundlePartnerIds", A);
|
|
16628
|
-
const h = new
|
|
16641
|
+
const h = new hn(
|
|
16629
16642
|
this,
|
|
16630
16643
|
u,
|
|
16631
16644
|
e,
|
|
@@ -16652,7 +16665,7 @@ class Gd {
|
|
|
16652
16665
|
...await bi(t),
|
|
16653
16666
|
...i?.graphql?.additionalHeaders
|
|
16654
16667
|
}, l = (await S.getShadowGraphqlClient().mutate({
|
|
16655
|
-
mutation:
|
|
16668
|
+
mutation: js(),
|
|
16656
16669
|
variables: {
|
|
16657
16670
|
id: t,
|
|
16658
16671
|
template: e,
|
|
@@ -16692,7 +16705,7 @@ class Gd {
|
|
|
16692
16705
|
throw new Error("Customer not authenticated.");
|
|
16693
16706
|
const { includeMetadata: e, ...a } = t;
|
|
16694
16707
|
return (await S.getShadowGraphqlClient().query({
|
|
16695
|
-
query:
|
|
16708
|
+
query: nl(e ?? !1),
|
|
16696
16709
|
variables: {
|
|
16697
16710
|
...a,
|
|
16698
16711
|
id: this.customer.id
|
|
@@ -16708,7 +16721,7 @@ class Gd {
|
|
|
16708
16721
|
if (!this.customer)
|
|
16709
16722
|
throw new Error("Customer not authenticated.");
|
|
16710
16723
|
const t = await S.getShadowGraphqlClient().query({
|
|
16711
|
-
query:
|
|
16724
|
+
query: Vs,
|
|
16712
16725
|
variables: {
|
|
16713
16726
|
id: this.customer.id
|
|
16714
16727
|
},
|
|
@@ -16750,16 +16763,16 @@ class Gd {
|
|
|
16750
16763
|
const A = S.getShadowGraphqlClient(), h = async (I) => {
|
|
16751
16764
|
if (I.length === 0)
|
|
16752
16765
|
return [];
|
|
16753
|
-
const N = I.map((X) => X.option.transactionId),
|
|
16766
|
+
const N = I.map((X) => X.option.transactionId), J = await A.query({
|
|
16754
16767
|
query: qr,
|
|
16755
16768
|
variables: {
|
|
16756
16769
|
ids: N
|
|
16757
16770
|
},
|
|
16758
16771
|
errorPolicy: "all",
|
|
16759
16772
|
fetchPolicy: "no-cache"
|
|
16760
|
-
}), M =
|
|
16773
|
+
}), M = J.data.transactions;
|
|
16761
16774
|
if (u = u + M.length, i && i(u, o.length), M.length !== I.length) {
|
|
16762
|
-
const X =
|
|
16775
|
+
const X = J.errors?.[0]?.message || "Unknown error";
|
|
16763
16776
|
throw new gt(`Not all transactions were found: ${X}`);
|
|
16764
16777
|
}
|
|
16765
16778
|
return !this.activeIntegration && M[0].integrationProduct?.integration && (this.activeIntegration = Promise.resolve(M[0].integrationProduct.integration)), M.map((X, je) => ({
|
|
@@ -16789,12 +16802,12 @@ class Gd {
|
|
|
16789
16802
|
},
|
|
16790
16803
|
errorPolicy: "all",
|
|
16791
16804
|
fetchPolicy: "no-cache"
|
|
16792
|
-
}),
|
|
16793
|
-
if (!
|
|
16805
|
+
}), J = N.data?.transactionCreateMany;
|
|
16806
|
+
if (!J || J.length === 0) {
|
|
16794
16807
|
const M = N.errors?.[0]?.message || "Unknown error";
|
|
16795
16808
|
throw new gt(`Failed to create transactions: ${M}`);
|
|
16796
16809
|
}
|
|
16797
|
-
return u = u +
|
|
16810
|
+
return u = u + J.length, i && i(u, o.length), J.map((M, X) => ({
|
|
16798
16811
|
transaction: M,
|
|
16799
16812
|
workflowId: M.workflowId,
|
|
16800
16813
|
readOnly: !1,
|
|
@@ -16811,17 +16824,17 @@ class Gd {
|
|
|
16811
16824
|
(async () => p.length > 0 ? await hc(p) : [])(),
|
|
16812
16825
|
(async () => f.length > 0 ? await Ei(f, e) : [])()
|
|
16813
16826
|
]), x = new Map(E.map((I) => [I.id, I])), y = new Map(w.map((I) => [I.id, I])), v = m.map(async (I) => {
|
|
16814
|
-
const { transaction: N, workflowId:
|
|
16827
|
+
const { transaction: N, workflowId: J, readOnly: M, index: X } = I, je = J ? y.get(J) : void 0, ut = t[X];
|
|
16815
16828
|
if (N.integrationProductId) {
|
|
16816
16829
|
const it = x.get(N.integrationProductId);
|
|
16817
16830
|
N.integrationProduct = it, N.product = it?.product, N.integrationProduct || console.error("failed to find transaction's product");
|
|
16818
16831
|
}
|
|
16819
|
-
const
|
|
16820
|
-
!
|
|
16821
|
-
const He =
|
|
16832
|
+
const se = D.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map();
|
|
16833
|
+
!se.get(N.id) && N.transactionOwnerId && (se.set(N.id, N.transactionOwnerId), D.setMap("transactionOwnerIds", se));
|
|
16834
|
+
const He = se.get(N.id) || void 0, Pi = new oc({
|
|
16822
16835
|
onMutate: () => ({ context: { transactionOwnerId: He, bundleOwnerId: e?.bundleOwnerId } }),
|
|
16823
16836
|
onQuery: () => ({ context: { transactionOwnerId: He, bundleOwnerId: e?.bundleOwnerId } })
|
|
16824
|
-
}),
|
|
16837
|
+
}), le = {
|
|
16825
16838
|
workflow: je,
|
|
16826
16839
|
transaction: N,
|
|
16827
16840
|
singleVariantsRenderable: ut?.workflowConfiguration?.singleVariantsRenderable,
|
|
@@ -16837,17 +16850,17 @@ class Gd {
|
|
|
16837
16850
|
};
|
|
16838
16851
|
if (ut.type === "transaction" && N.workflowState) {
|
|
16839
16852
|
const it = JSON.parse(N.workflowState);
|
|
16840
|
-
await
|
|
16853
|
+
await nn(it), le.reloadedState = it;
|
|
16841
16854
|
} else if (!M && ut.workflowState) {
|
|
16842
16855
|
const it = JSON.parse(ut.workflowState);
|
|
16843
|
-
await
|
|
16856
|
+
await nn(it), le.reloadedState = it;
|
|
16844
16857
|
}
|
|
16845
|
-
return
|
|
16858
|
+
return le.delayWorkflowStateSync = !0, { experienceOptions: le, index: X, options: ut };
|
|
16846
16859
|
}), T = (await Promise.all(v)).sort((I, N) => I.index - N.index);
|
|
16847
16860
|
let G = [];
|
|
16848
16861
|
for (const I of T) {
|
|
16849
|
-
const { experienceOptions: N, options:
|
|
16850
|
-
await M.getWorkflowManager().getInitializationPromise(), a && a(),
|
|
16862
|
+
const { experienceOptions: N, options: J } = I, M = new Dl(this, N);
|
|
16863
|
+
await M.getWorkflowManager().getInitializationPromise(), a && a(), J.type !== "transaction" && this.customer && await M.attachCustomerDetails({ email: this.customer.emailAddress }), G = [...G, M], M.getWorkflowManager().setWorkflowStateSyncEnabled(!0);
|
|
16851
16864
|
}
|
|
16852
16865
|
return G;
|
|
16853
16866
|
}
|
|
@@ -16866,7 +16879,7 @@ class Gd {
|
|
|
16866
16879
|
})).data?.integrationProducts;
|
|
16867
16880
|
if (!r || r.length === 0 || !r[0]?.id)
|
|
16868
16881
|
throw new Error("Integration product not found.");
|
|
16869
|
-
return new
|
|
16882
|
+
return new gn(r[0]);
|
|
16870
16883
|
}
|
|
16871
16884
|
async getIntegrationProductFromExternalIds(t, e, a) {
|
|
16872
16885
|
const o = (await S.getShadowGraphqlClient().query({
|
|
@@ -16880,7 +16893,7 @@ class Gd {
|
|
|
16880
16893
|
})).data?.integrationProductFromExternalIds;
|
|
16881
16894
|
if (!o?.id)
|
|
16882
16895
|
throw new Error("Integration product not found.");
|
|
16883
|
-
return new
|
|
16896
|
+
return new gn(o);
|
|
16884
16897
|
}
|
|
16885
16898
|
async getIntegrationProduct(t) {
|
|
16886
16899
|
return t.type === "integration" ? this.getIntegrationProductById(t.integrationProductId) : this.getIntegrationProductFromExternalIds(t.externalIntegrationId, t.externalProductId);
|
|
@@ -16975,9 +16988,9 @@ async function bi(n) {
|
|
|
16975
16988
|
...a
|
|
16976
16989
|
};
|
|
16977
16990
|
}
|
|
16978
|
-
const
|
|
16991
|
+
const Jd = async (n) => {
|
|
16979
16992
|
const t = await bi(n), e = await S.getShadowGraphqlClient().mutate({
|
|
16980
|
-
mutation:
|
|
16993
|
+
mutation: Al,
|
|
16981
16994
|
errorPolicy: "all",
|
|
16982
16995
|
fetchPolicy: "no-cache",
|
|
16983
16996
|
variables: {
|
|
@@ -16996,17 +17009,17 @@ function mc(n, t, e, a) {
|
|
|
16996
17009
|
const s = n, l = Math.max(t.width / e.width, t.height / e.height);
|
|
16997
17010
|
s.zoom = Math.max(l, n.zoom);
|
|
16998
17011
|
const c = e.width * s.zoom, d = e.height * s.zoom;
|
|
16999
|
-
return s.x =
|
|
17012
|
+
return s.x = Ce(n.x, t.width - c, 0), s.y = Ce(n.y, t.height - d, 0), s;
|
|
17000
17013
|
}
|
|
17001
17014
|
const o = n;
|
|
17002
|
-
return o.x =
|
|
17015
|
+
return o.x = Ce(o.x, -i, t.width), o.y = Ce(o.y, -r, t.height), o;
|
|
17003
17016
|
}
|
|
17004
|
-
function
|
|
17017
|
+
function Ce(n, t, e) {
|
|
17005
17018
|
return Math.min(Math.max(n, t), e);
|
|
17006
17019
|
}
|
|
17007
17020
|
class pc {
|
|
17008
17021
|
constructor(t, e) {
|
|
17009
|
-
this.minZoomScale = [0.03], this.maxZoomScale = [20], this._debouncedUpdateFrameOffsets =
|
|
17022
|
+
this.minZoomScale = [0.03], this.maxZoomScale = [20], this._debouncedUpdateFrameOffsets = In(this.updateFrameOffsets, 200), this.targetElements = [], this.onFrameDataChangeListeners = [], this.onZoomChangeListeners = [], this.forceImageCover = t, this.initialZoom = e, this.thresholdSettings = {
|
|
17010
17023
|
useThreshold: !1,
|
|
17011
17024
|
invertThreshold: !1,
|
|
17012
17025
|
threshold: 128,
|
|
@@ -17027,7 +17040,7 @@ class pc {
|
|
|
17027
17040
|
let r = !1;
|
|
17028
17041
|
for (let o = 0; o < i.currentFrameSources.length; o++) {
|
|
17029
17042
|
const s = i.currentFrameSources[o], l = await ze(s), c = this.frameData ? this.frameData[o] : void 0;
|
|
17030
|
-
|
|
17043
|
+
Jt(l, c) || (this.frameData || (this.frameData = new Array(i.currentFrameSources.length)), this.frameData[o] = l, r = !0);
|
|
17031
17044
|
}
|
|
17032
17045
|
r && (this.onFrameDataChangeListeners.forEach(
|
|
17033
17046
|
(o) => o(this.frameData)
|
|
@@ -17061,7 +17074,7 @@ class pc {
|
|
|
17061
17074
|
return;
|
|
17062
17075
|
}
|
|
17063
17076
|
t.forEach((e, a) => {
|
|
17064
|
-
const i =
|
|
17077
|
+
const i = zt.get(e);
|
|
17065
17078
|
i && (this.frameData || (this.frameData = new Array(t.length)), this.frameData[a] = i);
|
|
17066
17079
|
});
|
|
17067
17080
|
}
|
|
@@ -17226,7 +17239,7 @@ class pc {
|
|
|
17226
17239
|
}), this._debouncedUpdateFrameOffsets(this.offsets, t, this.frameData, this.thresholdSettings));
|
|
17227
17240
|
}
|
|
17228
17241
|
}
|
|
17229
|
-
class
|
|
17242
|
+
class Yd {
|
|
17230
17243
|
traversableScenes() {
|
|
17231
17244
|
throw new Error("Method not implemented.");
|
|
17232
17245
|
}
|
|
@@ -17559,7 +17572,7 @@ const wc = C`
|
|
|
17559
17572
|
id
|
|
17560
17573
|
}
|
|
17561
17574
|
}
|
|
17562
|
-
`,
|
|
17575
|
+
`, Ga = C`
|
|
17563
17576
|
query GetCustomerTransactions(
|
|
17564
17577
|
$id: String!
|
|
17565
17578
|
$limit: Int!
|
|
@@ -17726,7 +17739,7 @@ const wc = C`
|
|
|
17726
17739
|
},
|
|
17727
17740
|
context: t
|
|
17728
17741
|
}), nu = async (n, t, e) => (await S.getShadowGraphqlClient().query({
|
|
17729
|
-
query:
|
|
17742
|
+
query: Ga,
|
|
17730
17743
|
errorPolicy: "all",
|
|
17731
17744
|
fetchPolicy: "no-cache",
|
|
17732
17745
|
variables: {
|
|
@@ -17746,7 +17759,7 @@ const wc = C`
|
|
|
17746
17759
|
limit: t
|
|
17747
17760
|
}
|
|
17748
17761
|
}))?.data.customerTransactionsFeed?.items || [], iu = async (n, t, e) => (await S.getShadowGraphqlClient().query({
|
|
17749
|
-
query:
|
|
17762
|
+
query: Ga,
|
|
17750
17763
|
errorPolicy: "all",
|
|
17751
17764
|
fetchPolicy: "no-cache",
|
|
17752
17765
|
variables: {
|
|
@@ -17766,7 +17779,7 @@ const wc = C`
|
|
|
17766
17779
|
limit: t
|
|
17767
17780
|
}
|
|
17768
17781
|
}))?.data.customerTransactionsFeed?.items || [], ru = async (n, t, e) => (await S.getShadowGraphqlClient().query({
|
|
17769
|
-
query:
|
|
17782
|
+
query: Ga,
|
|
17770
17783
|
errorPolicy: "all",
|
|
17771
17784
|
fetchPolicy: "no-cache",
|
|
17772
17785
|
variables: {
|
|
@@ -17813,7 +17826,7 @@ K = { __e: function(n, t, e, a) {
|
|
|
17813
17826
|
}
|
|
17814
17827
|
throw n;
|
|
17815
17828
|
} }, typeof Promise == "function" && Promise.prototype.then.bind(Promise.resolve());
|
|
17816
|
-
var ot, sa,
|
|
17829
|
+
var ot, sa, pn, Ii = [], la = [], fn = K.__b, Cn = K.__r, wn = K.diffed, yn = K.__c, Sn = K.unmount;
|
|
17817
17830
|
function xc() {
|
|
17818
17831
|
for (var n; n = Ii.shift(); )
|
|
17819
17832
|
if (n.__P && n.__H)
|
|
@@ -17824,17 +17837,17 @@ function xc() {
|
|
|
17824
17837
|
}
|
|
17825
17838
|
}
|
|
17826
17839
|
K.__b = function(n) {
|
|
17827
|
-
ot = null,
|
|
17840
|
+
ot = null, fn && fn(n);
|
|
17828
17841
|
}, K.__r = function(n) {
|
|
17829
|
-
|
|
17842
|
+
Cn && Cn(n);
|
|
17830
17843
|
var t = (ot = n.__c).__H;
|
|
17831
17844
|
t && (sa === ot ? (t.__h = [], ot.__h = [], t.__.forEach(function(e) {
|
|
17832
17845
|
e.__N && (e.__ = e.__N), e.__V = la, e.__N = e.i = void 0;
|
|
17833
17846
|
})) : (t.__h.forEach(Ee), t.__h.forEach(Ia), t.__h = [])), sa = ot;
|
|
17834
17847
|
}, K.diffed = function(n) {
|
|
17835
|
-
|
|
17848
|
+
wn && wn(n);
|
|
17836
17849
|
var t = n.__c;
|
|
17837
|
-
t && t.__H && (t.__H.__h.length && (Ii.push(t) !== 1 &&
|
|
17850
|
+
t && t.__H && (t.__H.__h.length && (Ii.push(t) !== 1 && pn === K.requestAnimationFrame || ((pn = K.requestAnimationFrame) || Fc)(xc)), t.__H.__.forEach(function(e) {
|
|
17838
17851
|
e.i && (e.__H = e.i), e.__V !== la && (e.__ = e.__V), e.i = void 0, e.__V = la;
|
|
17839
17852
|
})), sa = ot = null;
|
|
17840
17853
|
}, K.__c = function(n, t) {
|
|
@@ -17848,9 +17861,9 @@ K.__b = function(n) {
|
|
|
17848
17861
|
i.__h && (i.__h = []);
|
|
17849
17862
|
}), t = [], K.__e(a, e.__v);
|
|
17850
17863
|
}
|
|
17851
|
-
}),
|
|
17864
|
+
}), yn && yn(n, t);
|
|
17852
17865
|
}, K.unmount = function(n) {
|
|
17853
|
-
|
|
17866
|
+
Sn && Sn(n);
|
|
17854
17867
|
var t, e = n.__c;
|
|
17855
17868
|
e && e.__H && (e.__H.__.forEach(function(a) {
|
|
17856
17869
|
try {
|
|
@@ -17860,12 +17873,12 @@ K.__b = function(n) {
|
|
|
17860
17873
|
}
|
|
17861
17874
|
}), e.__H = void 0, t && K.__e(t, e.__v));
|
|
17862
17875
|
};
|
|
17863
|
-
var
|
|
17876
|
+
var vn = typeof requestAnimationFrame == "function";
|
|
17864
17877
|
function Fc(n) {
|
|
17865
17878
|
var t, e = function() {
|
|
17866
|
-
clearTimeout(a),
|
|
17879
|
+
clearTimeout(a), vn && cancelAnimationFrame(t), setTimeout(n);
|
|
17867
17880
|
}, a = setTimeout(e, 100);
|
|
17868
|
-
|
|
17881
|
+
vn && (t = requestAnimationFrame(e));
|
|
17869
17882
|
}
|
|
17870
17883
|
function Ee(n) {
|
|
17871
17884
|
var t = ot, e = n.__c;
|
|
@@ -17897,7 +17910,7 @@ const Bi = C`
|
|
|
17897
17910
|
}
|
|
17898
17911
|
missingComponentTypes
|
|
17899
17912
|
}
|
|
17900
|
-
`,
|
|
17913
|
+
`, Wa = C`
|
|
17901
17914
|
${Bi}
|
|
17902
17915
|
fragment AddressValidationJobFields on AddressValidationJob {
|
|
17903
17916
|
id
|
|
@@ -17910,14 +17923,14 @@ const Bi = C`
|
|
|
17910
17923
|
}
|
|
17911
17924
|
}
|
|
17912
17925
|
`, Dc = C`
|
|
17913
|
-
${
|
|
17926
|
+
${Wa}
|
|
17914
17927
|
query GetAddressValidationJobs($ids: [String!]!) {
|
|
17915
17928
|
addressValidationJobs(ids: $ids) {
|
|
17916
17929
|
...AddressValidationJobFields
|
|
17917
17930
|
}
|
|
17918
17931
|
}
|
|
17919
17932
|
`, kc = C`
|
|
17920
|
-
${
|
|
17933
|
+
${Wa}
|
|
17921
17934
|
query GetRecipientsWithAddressValidationJobs($ids: [String!]!) {
|
|
17922
17935
|
recipients(ids: $ids) {
|
|
17923
17936
|
id
|
|
@@ -17934,7 +17947,7 @@ const Bi = C`
|
|
|
17934
17947
|
}
|
|
17935
17948
|
}
|
|
17936
17949
|
`, Tc = C`
|
|
17937
|
-
${
|
|
17950
|
+
${Wa}
|
|
17938
17951
|
mutation BatchValidateRecipientAddress($ids: [String!]!) {
|
|
17939
17952
|
recipientValidateBatch(ids: $ids) {
|
|
17940
17953
|
...AddressValidationJobFields
|
|
@@ -18001,7 +18014,7 @@ const su = async (n) => {
|
|
|
18001
18014
|
variables: {
|
|
18002
18015
|
id: t
|
|
18003
18016
|
}
|
|
18004
|
-
})).data?.recipientOverrideAddress?.id && (n.getTransaction().addressValidationStatus =
|
|
18017
|
+
})).data?.recipientOverrideAddress?.id && (n.getTransaction().addressValidationStatus = Pn.Overridden);
|
|
18005
18018
|
}, Oc = C`
|
|
18006
18019
|
query GetIntegrationProductsForIds($ids: [String!]!) {
|
|
18007
18020
|
integrationProducts(ids: $ids) {
|
|
@@ -18022,7 +18035,7 @@ export {
|
|
|
18022
18035
|
Pa as AddonHandle,
|
|
18023
18036
|
Rc as AddressValidationJobStatus,
|
|
18024
18037
|
Qc as AddressValidationResultConfirmationLevel,
|
|
18025
|
-
|
|
18038
|
+
Pn as AddressValidationStatus,
|
|
18026
18039
|
zd as ArrayInput,
|
|
18027
18040
|
L as AspectType,
|
|
18028
18041
|
bt as AssetNotFoundError,
|
|
@@ -18032,42 +18045,42 @@ export {
|
|
|
18032
18045
|
Td as BringToFrontCommand,
|
|
18033
18046
|
ji as BundleDesignCreationCartAddMode,
|
|
18034
18047
|
R as CanvasCommand,
|
|
18035
|
-
|
|
18036
|
-
|
|
18048
|
+
me as CollectionProduct,
|
|
18049
|
+
An as ColorOptionGlobalPropertyHandle,
|
|
18037
18050
|
Ro as CommandContext,
|
|
18038
18051
|
ve as ConversionDataType,
|
|
18039
18052
|
Pc as ConversionLocation,
|
|
18040
18053
|
z as CreateElementCommand,
|
|
18041
|
-
|
|
18054
|
+
oi as CreateLayoutCommand,
|
|
18042
18055
|
cc as CurrencyContext,
|
|
18043
18056
|
lc as CurrencyService,
|
|
18044
18057
|
Nt as DeleteElementCommand,
|
|
18045
18058
|
Il as DigitalContentStepHandle,
|
|
18046
18059
|
Nl as FileUploadGlobalPropertyHandle,
|
|
18047
|
-
|
|
18060
|
+
pe as FlowExecutionNodeResult,
|
|
18048
18061
|
ec as FlowExecutionResult,
|
|
18049
18062
|
tc as FlowService,
|
|
18050
18063
|
Lo as FontAlignmentCommand,
|
|
18051
18064
|
$o as FontColorCommand,
|
|
18052
18065
|
Uo as FontSizeCommand,
|
|
18053
|
-
|
|
18066
|
+
on as FontSourceCommand,
|
|
18054
18067
|
pc as FrameService,
|
|
18055
18068
|
fc as FrameStep,
|
|
18056
18069
|
Cc as FrameStepHandle,
|
|
18057
|
-
|
|
18070
|
+
Va as GlobalPropertyHandle,
|
|
18058
18071
|
O as GroupCommand,
|
|
18059
18072
|
fl as IllustrationStepHandle,
|
|
18060
18073
|
qe as InformationMessageType,
|
|
18061
18074
|
bl as InformationStepHandle,
|
|
18062
|
-
|
|
18063
|
-
|
|
18075
|
+
gn as IntegrationProduct,
|
|
18076
|
+
Ji as IntegrationType,
|
|
18064
18077
|
xd as LayoutElementFactory,
|
|
18065
18078
|
F as LayoutElementType,
|
|
18066
18079
|
H as LayoutNotFoundError,
|
|
18067
18080
|
Yt as LayoutRenderingPurpose,
|
|
18068
18081
|
Cl as MaterialStepHandle,
|
|
18069
18082
|
Pe as MisconfigurationError,
|
|
18070
|
-
|
|
18083
|
+
Yd as MockWorkflowManager,
|
|
18071
18084
|
wl as ModelStepHandle,
|
|
18072
18085
|
Bl as ModuleStepHandle,
|
|
18073
18086
|
Fd as MoveCommand,
|
|
@@ -18077,16 +18090,16 @@ export {
|
|
|
18077
18090
|
Be as OptionNotFoundError,
|
|
18078
18091
|
Pt as ParseError,
|
|
18079
18092
|
yl as PictureStepHandle,
|
|
18080
|
-
|
|
18093
|
+
Yi as ProductCameraRig,
|
|
18081
18094
|
Si as ProductCollection,
|
|
18082
18095
|
ql as ProductCollectionProductSortKey,
|
|
18083
|
-
|
|
18084
|
-
|
|
18085
|
-
|
|
18096
|
+
qt as ProductWorkflow,
|
|
18097
|
+
Xt as PromiseCache,
|
|
18098
|
+
Jn as PromiseQueue,
|
|
18086
18099
|
Sl as QuestionStepHandle,
|
|
18087
|
-
|
|
18100
|
+
Hn as QueueablePromise,
|
|
18088
18101
|
kd as ResizeCommand,
|
|
18089
|
-
|
|
18102
|
+
Kt as ResourceNotFoundError,
|
|
18090
18103
|
Dd as RotateCommand,
|
|
18091
18104
|
q as ScaleAxis,
|
|
18092
18105
|
Rd as SendBackwardsCommand,
|
|
@@ -18115,10 +18128,10 @@ export {
|
|
|
18115
18128
|
Bd as cmPerPixel,
|
|
18116
18129
|
Ed as currentDirection,
|
|
18117
18130
|
ud as dataUrlFromExternalUrl,
|
|
18118
|
-
|
|
18131
|
+
Jd as deleteBundle,
|
|
18119
18132
|
ra as designService,
|
|
18120
18133
|
Se as determineCorrectFontSizeAndLines,
|
|
18121
|
-
|
|
18134
|
+
li as digitalContentStepService,
|
|
18122
18135
|
dt as domParser,
|
|
18123
18136
|
Xd as duplicateBundle,
|
|
18124
18137
|
Zd as duplicateTransaction,
|
|
@@ -18126,7 +18139,7 @@ export {
|
|
|
18126
18139
|
pd as findAngle,
|
|
18127
18140
|
U as findElement,
|
|
18128
18141
|
gd as findPmsColors,
|
|
18129
|
-
|
|
18142
|
+
zt as frameDataCache,
|
|
18130
18143
|
St as frameStepService,
|
|
18131
18144
|
k as generate,
|
|
18132
18145
|
Es as generateCommands,
|
|
@@ -18167,12 +18180,12 @@ export {
|
|
|
18167
18180
|
fd as isCloseToValue,
|
|
18168
18181
|
Tt as loadFont,
|
|
18169
18182
|
hd as matchHexToPms,
|
|
18170
|
-
|
|
18183
|
+
ci as materialStepService,
|
|
18171
18184
|
Wl as metafieldManager,
|
|
18172
18185
|
Id as mmPerPixel,
|
|
18173
|
-
|
|
18186
|
+
di as modelStepService,
|
|
18174
18187
|
Ta as modifySVGColors,
|
|
18175
|
-
|
|
18188
|
+
ui as moduleStepService,
|
|
18176
18189
|
Kd as nameBundle,
|
|
18177
18190
|
_d as nameTransaction,
|
|
18178
18191
|
j as optionService,
|
|
@@ -18180,23 +18193,23 @@ export {
|
|
|
18180
18193
|
uu as overrideWorkflowExperienceRecipientAddress,
|
|
18181
18194
|
ht as patternImageDataCache,
|
|
18182
18195
|
D as persistenceService,
|
|
18183
|
-
|
|
18196
|
+
Ai as pictureStepService,
|
|
18184
18197
|
Ad as pmsToRgb,
|
|
18185
|
-
|
|
18198
|
+
hi as questionStepService,
|
|
18186
18199
|
dd as registerFetchImplementation,
|
|
18187
18200
|
cd as registerWindowImplementation,
|
|
18188
|
-
|
|
18201
|
+
nn as rehydrateSerializedLayout,
|
|
18189
18202
|
wr as rgbToPms,
|
|
18190
|
-
|
|
18203
|
+
Ae as rotateAroundPoint,
|
|
18191
18204
|
ka as sanitizeSvgTree,
|
|
18192
18205
|
dr as setBearerAuthenticationToken,
|
|
18193
|
-
|
|
18194
|
-
|
|
18206
|
+
Nn as setCanvasModule,
|
|
18207
|
+
Gt as shapeStepService,
|
|
18195
18208
|
qo as shortenUrl,
|
|
18196
18209
|
pt as spiffCoreConfiguration,
|
|
18197
18210
|
Od as stepAspectValuesToDesignInputSteps,
|
|
18198
|
-
|
|
18199
|
-
|
|
18211
|
+
Xa as svgColorValueToDefinition,
|
|
18212
|
+
ii as svgStringDimensions,
|
|
18200
18213
|
xa as svgToDataUrl,
|
|
18201
18214
|
W as textStepService,
|
|
18202
18215
|
es as toast,
|