@chili-publish/studio-sdk 1.29.1 → 1.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/_bundles/main.es.js +613 -574
  2. package/_bundles/main.es.js.map +1 -1
  3. package/_bundles/main.js +2 -2
  4. package/_bundles/main.js.map +1 -1
  5. package/connector-types/src/Connector.Shared.d.ts +1 -0
  6. package/lib/editor-engine.json +1 -1
  7. package/lib/package.json +1 -1
  8. package/lib/src/controllers/BrandKitController.js +8 -2
  9. package/lib/src/controllers/BrandKitController.js.map +1 -1
  10. package/lib/src/controllers/MediaConnectorController.d.ts +1 -1
  11. package/lib/src/controllers/MediaConnectorController.js +13 -2
  12. package/lib/src/controllers/MediaConnectorController.js.map +1 -1
  13. package/lib/src/controllers/UtilsController.d.ts +24 -2
  14. package/lib/src/controllers/UtilsController.js +34 -3
  15. package/lib/src/controllers/UtilsController.js.map +1 -1
  16. package/lib/src/index.d.ts +2 -2
  17. package/lib/src/index.js +1 -1
  18. package/lib/src/index.js.map +1 -1
  19. package/lib/src/next/controllers/VariableController.js.map +1 -1
  20. package/lib/src/next/tests/controllers/VariableController.test.js.map +1 -1
  21. package/lib/src/sdk.js +2 -2
  22. package/lib/src/sdk.js.map +1 -1
  23. package/lib/src/tests/__mocks__/Brandkit.js +3 -0
  24. package/lib/src/tests/__mocks__/Brandkit.js.map +1 -1
  25. package/lib/src/tests/controllers/BrandKitController.test.js +12 -0
  26. package/lib/src/tests/controllers/BrandKitController.test.js.map +1 -1
  27. package/lib/src/tests/controllers/LayoutController.test.js +8 -1
  28. package/lib/src/tests/controllers/LayoutController.test.js.map +1 -1
  29. package/lib/src/tests/controllers/MediaConnectorController.test.js +15 -1
  30. package/lib/src/tests/controllers/MediaConnectorController.test.js.map +1 -1
  31. package/lib/src/tests/controllers/UtilsController.test.js +14 -1
  32. package/lib/src/tests/controllers/UtilsController.test.js.map +1 -1
  33. package/lib/src/types/BrandKitTypes.d.ts +6 -0
  34. package/lib/src/types/LayoutTypes.d.ts +21 -0
  35. package/lib/src/types/LayoutTypes.js +6 -0
  36. package/lib/src/types/LayoutTypes.js.map +1 -1
  37. package/lib/src/utils/BrandKitHelper.d.ts +1 -1
  38. package/lib/src/utils/BrandKitHelper.js +20 -4
  39. package/lib/src/utils/BrandKitHelper.js.map +1 -1
  40. package/lib/src/utils/EditorResponseData.d.ts +1 -0
  41. package/lib/src/utils/EditorResponseData.js +19 -16
  42. package/lib/src/utils/EditorResponseData.js.map +1 -1
  43. package/package.json +1 -1
@@ -1,12 +1,12 @@
1
- var Ie = (s) => {
1
+ var Pe = (s) => {
2
2
  throw TypeError(s);
3
3
  };
4
- var ve = (s, i, t) => i.has(s) || Ie("Cannot " + t);
5
- var a = (s, i, t) => (ve(s, i, "read from private field"), t ? t.call(s) : i.get(s)), u = (s, i, t) => i.has(s) ? Ie("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(s) : i.set(s, t), g = (s, i, t, e) => (ve(s, i, "write to private field"), e ? e.call(s, t) : i.set(s, t), t);
6
- const bs = "2.12.latest", cs = {
7
- current: bs
8
- }, Is = "1.29.1", hs = {
9
- version: Is
4
+ var Fe = (s, i, t) => i.has(s) || Pe("Cannot " + t);
5
+ var a = (s, i, t) => (Fe(s, i, "read from private field"), t ? t.call(s) : i.get(s)), u = (s, i, t) => i.has(s) ? Pe("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(s) : i.set(s, t), g = (s, i, t, e) => (Fe(s, i, "write to private field"), e ? e.call(s, t) : i.set(s, t), t);
6
+ const vs = "2.13.latest", ls = {
7
+ current: vs
8
+ }, As = "1.30.0", ds = {
9
+ version: As
10
10
  };
11
11
  var _;
12
12
  (function(s) {
@@ -16,19 +16,19 @@ var ht;
16
16
  (function(s) {
17
17
  s.Fulfilled = "fulfilled", s.Rejected = "rejected";
18
18
  })(ht || (ht = {}));
19
- var xt;
19
+ var Mt;
20
20
  (function(s) {
21
21
  s.ConnectionDestroyed = "ConnectionDestroyed", s.ConnectionTimeout = "ConnectionTimeout", s.NoIframeSrc = "NoIframeSrc";
22
- })(xt || (xt = {}));
23
- var Yt;
22
+ })(Mt || (Mt = {}));
23
+ var Qt;
24
24
  (function(s) {
25
25
  s.DataCloneError = "DataCloneError";
26
- })(Yt || (Yt = {}));
26
+ })(Qt || (Qt = {}));
27
27
  var ct;
28
28
  (function(s) {
29
29
  s.Message = "message";
30
30
  })(ct || (ct = {}));
31
- const vs = (s, i) => {
31
+ const Ps = (s, i) => {
32
32
  const t = [];
33
33
  let e = !1;
34
34
  return {
@@ -41,135 +41,135 @@ const vs = (s, i) => {
41
41
  e ? r() : t.push(r);
42
42
  }
43
43
  };
44
- }, Ps = (s) => (...i) => {
44
+ }, Fs = (s) => (...i) => {
45
45
  s && console.log("[Penpal]", ...i);
46
- }, As = {
46
+ }, Es = {
47
47
  "http:": "80",
48
48
  "https:": "443"
49
- }, Fs = /^(https?:)?\/\/([^/:]+)?(:(\d+))?/, Es = ["file:", "data:"], Ds = (s) => {
50
- if (s && Es.find((h) => s.startsWith(h)))
49
+ }, Ds = /^(https?:)?\/\/([^/:]+)?(:(\d+))?/, Ls = ["file:", "data:"], Os = (s) => {
50
+ if (s && Ls.find((l) => s.startsWith(l)))
51
51
  return "null";
52
- const i = document.location, t = Fs.exec(s);
52
+ const i = document.location, t = Ds.exec(s);
53
53
  let e, r, n;
54
54
  t ? (e = t[1] ? t[1] : i.protocol, r = t[2], n = t[4]) : (e = i.protocol, r = i.hostname, n = i.port);
55
- const c = n && n !== As[e] ? `:${n}` : "";
55
+ const c = n && n !== Es[e] ? `:${n}` : "";
56
56
  return `${e}//${r}${c}`;
57
- }, Pe = ({ name: s, message: i, stack: t }) => ({
57
+ }, Ee = ({ name: s, message: i, stack: t }) => ({
58
58
  name: s,
59
59
  message: i,
60
60
  stack: t
61
- }), Ls = (s) => {
61
+ }), Ns = (s) => {
62
62
  const i = new Error();
63
63
  return Object.keys(s).forEach((t) => i[t] = s[t]), i;
64
- }, Os = (s, i, t) => {
65
- const { localName: e, local: r, remote: n, originForSending: c, originForReceiving: h } = s;
66
- let l = !1;
64
+ }, xs = (s, i, t) => {
65
+ const { localName: e, local: r, remote: n, originForSending: c, originForReceiving: l } = s;
66
+ let h = !1;
67
67
  const y = (p) => {
68
68
  if (p.source !== n || p.data.penpal !== _.Call)
69
69
  return;
70
- if (p.origin !== h) {
71
- t(`${e} received message from origin ${p.origin} which did not match expected origin ${h}`);
70
+ if (p.origin !== l) {
71
+ t(`${e} received message from origin ${p.origin} which did not match expected origin ${l}`);
72
72
  return;
73
73
  }
74
- const f = p.data, { methodName: I, args: S, id: b } = f;
75
- t(`${e}: Received ${I}() call`);
76
- const L = (P) => (N) => {
77
- if (t(`${e}: Sending ${I}() reply`), l) {
78
- t(`${e}: Unable to send ${I}() reply due to destroyed connection`);
74
+ const I = p.data, { methodName: S, args: f, id: b } = I;
75
+ t(`${e}: Received ${S}() call`);
76
+ const A = (v) => (N) => {
77
+ if (t(`${e}: Sending ${S}() reply`), h) {
78
+ t(`${e}: Unable to send ${S}() reply due to destroyed connection`);
79
79
  return;
80
80
  }
81
- const M = {
81
+ const x = {
82
82
  penpal: _.Reply,
83
83
  id: b,
84
- resolution: P,
84
+ resolution: v,
85
85
  returnValue: N
86
86
  };
87
- P === ht.Rejected && N instanceof Error && (M.returnValue = Pe(N), M.returnValueIsError = !0);
87
+ v === ht.Rejected && N instanceof Error && (x.returnValue = Ee(N), x.returnValueIsError = !0);
88
88
  try {
89
- n.postMessage(M, c);
90
- } catch (v) {
91
- if (v.name === Yt.DataCloneError) {
89
+ n.postMessage(x, c);
90
+ } catch (P) {
91
+ if (P.name === Qt.DataCloneError) {
92
92
  const $ = {
93
93
  penpal: _.Reply,
94
94
  id: b,
95
95
  resolution: ht.Rejected,
96
- returnValue: Pe(v),
96
+ returnValue: Ee(P),
97
97
  returnValueIsError: !0
98
98
  };
99
99
  n.postMessage($, c);
100
100
  }
101
- throw v;
101
+ throw P;
102
102
  }
103
103
  };
104
- new Promise((P) => P(i[I].apply(i, S))).then(L(ht.Fulfilled), L(ht.Rejected));
104
+ new Promise((v) => v(i[S].apply(i, f))).then(A(ht.Fulfilled), A(ht.Rejected));
105
105
  };
106
106
  return r.addEventListener(ct.Message, y), () => {
107
- l = !0, r.removeEventListener(ct.Message, y);
107
+ h = !0, r.removeEventListener(ct.Message, y);
108
108
  };
109
109
  };
110
- let Ns = 0;
111
- const Ms = () => ++Ns, ls = ".", ds = (s) => s ? s.split(ls) : [], xs = (s) => s.join(ls), Rs = (s, i) => {
112
- const t = ds(i || "");
113
- return t.push(s), xs(t);
114
- }, Vs = (s, i, t) => {
115
- const e = ds(i);
110
+ let Ms = 0;
111
+ const Rs = () => ++Ms, us = ".", gs = (s) => s ? s.split(us) : [], Vs = (s) => s.join(us), Bs = (s, i) => {
112
+ const t = gs(i || "");
113
+ return t.push(s), Vs(t);
114
+ }, ks = (s, i, t) => {
115
+ const e = gs(i);
116
116
  return e.reduce((r, n, c) => (typeof r[n] > "u" && (r[n] = {}), c === e.length - 1 && (r[n] = t), r[n]), s), s;
117
- }, us = (s, i) => {
117
+ }, ys = (s, i) => {
118
118
  const t = {};
119
119
  return Object.keys(s).forEach((e) => {
120
- const r = s[e], n = Rs(e, i);
121
- typeof r == "object" && Object.assign(t, us(r, n)), typeof r == "function" && (t[n] = r);
120
+ const r = s[e], n = Bs(e, i);
121
+ typeof r == "object" && Object.assign(t, ys(r, n)), typeof r == "function" && (t[n] = r);
122
122
  }), t;
123
- }, Bs = (s) => {
123
+ }, Js = (s) => {
124
124
  const i = {};
125
125
  for (const t in s)
126
- Vs(i, t, s[t]);
126
+ ks(i, t, s[t]);
127
127
  return i;
128
- }, Js = (s, i, t, e, r) => {
129
- const { localName: n, local: c, remote: h, originForSending: l, originForReceiving: y } = i;
128
+ }, Us = (s, i, t, e, r) => {
129
+ const { localName: n, local: c, remote: l, originForSending: h, originForReceiving: y } = i;
130
130
  let p = !1;
131
131
  r(`${n}: Connecting call sender`);
132
- const f = (S) => (...b) => {
133
- r(`${n}: Sending ${S}() call`);
134
- let L;
132
+ const I = (f) => (...b) => {
133
+ r(`${n}: Sending ${f}() call`);
134
+ let A;
135
135
  try {
136
- h.closed && (L = !0);
136
+ l.closed && (A = !0);
137
137
  } catch {
138
- L = !0;
138
+ A = !0;
139
139
  }
140
- if (L && e(), p) {
141
- const P = new Error(`Unable to send ${S}() call due to destroyed connection`);
142
- throw P.code = xt.ConnectionDestroyed, P;
140
+ if (A && e(), p) {
141
+ const v = new Error(`Unable to send ${f}() call due to destroyed connection`);
142
+ throw v.code = Mt.ConnectionDestroyed, v;
143
143
  }
144
- return new Promise((P, N) => {
145
- const M = Ms(), v = (K) => {
146
- if (K.source !== h || K.data.penpal !== _.Reply || K.data.id !== M)
144
+ return new Promise((v, N) => {
145
+ const x = Rs(), P = (K) => {
146
+ if (K.source !== l || K.data.penpal !== _.Reply || K.data.id !== x)
147
147
  return;
148
148
  if (K.origin !== y) {
149
149
  r(`${n} received message from origin ${K.origin} which did not match expected origin ${y}`);
150
150
  return;
151
151
  }
152
152
  const mt = K.data;
153
- r(`${n}: Received ${S}() reply`), c.removeEventListener(ct.Message, v);
153
+ r(`${n}: Received ${f}() reply`), c.removeEventListener(ct.Message, P);
154
154
  let wt = mt.returnValue;
155
- mt.returnValueIsError && (wt = Ls(wt)), (mt.resolution === ht.Fulfilled ? P : N)(wt);
155
+ mt.returnValueIsError && (wt = Ns(wt)), (mt.resolution === ht.Fulfilled ? v : N)(wt);
156
156
  };
157
- c.addEventListener(ct.Message, v);
157
+ c.addEventListener(ct.Message, P);
158
158
  const $ = {
159
159
  penpal: _.Call,
160
- id: M,
161
- methodName: S,
160
+ id: x,
161
+ methodName: f,
162
162
  args: b
163
163
  };
164
- h.postMessage($, l);
164
+ l.postMessage($, h);
165
165
  });
166
- }, I = t.reduce((S, b) => (S[b] = f(b), S), {});
167
- return Object.assign(s, Bs(I)), () => {
166
+ }, S = t.reduce((f, b) => (f[b] = I(b), f), {});
167
+ return Object.assign(s, Js(S)), () => {
168
168
  p = !0;
169
169
  };
170
- }, Us = (s, i, t, e, r) => {
170
+ }, Gs = (s, i, t, e, r) => {
171
171
  const { destroy: n, onDestroy: c } = e;
172
- let h, l;
172
+ let l, h;
173
173
  const y = {};
174
174
  return (p) => {
175
175
  if (p.origin !== i) {
@@ -177,20 +177,20 @@ const Ms = () => ++Ns, ls = ".", ds = (s) => s ? s.split(ls) : [], xs = (s) => s
177
177
  return;
178
178
  }
179
179
  r("Parent: Handshake - Received ACK");
180
- const f = {
180
+ const I = {
181
181
  localName: "Parent",
182
182
  local: window,
183
183
  remote: p.source,
184
184
  originForSending: t,
185
185
  originForReceiving: i
186
186
  };
187
- h && h(), h = Os(f, s, r), c(h), l && l.forEach((S) => {
188
- delete y[S];
189
- }), l = p.data.methodNames;
190
- const I = Js(y, f, l, n, r);
191
- return c(I), y;
187
+ l && l(), l = xs(I, s, r), c(l), h && h.forEach((f) => {
188
+ delete y[f];
189
+ }), h = p.data.methodNames;
190
+ const S = Us(y, I, h, n, r);
191
+ return c(S), y;
192
192
  };
193
- }, ks = (s, i, t, e) => (r) => {
193
+ }, Ts = (s, i, t, e) => (r) => {
194
194
  if (r.origin !== t) {
195
195
  s(`Parent: Handshake - Received SYN message from origin ${r.origin} which did not match expected origin ${t}`);
196
196
  return;
@@ -201,60 +201,60 @@ const Ms = () => ++Ns, ls = ".", ds = (s) => s ? s.split(ls) : [], xs = (s) => s
201
201
  methodNames: Object.keys(i)
202
202
  };
203
203
  r.source.postMessage(n, e);
204
- }, Ts = 6e4, Gs = (s, i) => {
204
+ }, Hs = 6e4, _s = (s, i) => {
205
205
  const { destroy: t, onDestroy: e } = i, r = setInterval(() => {
206
206
  s.isConnected || (clearInterval(r), t());
207
- }, Ts);
207
+ }, Hs);
208
208
  e(() => {
209
209
  clearInterval(r);
210
210
  });
211
- }, Hs = (s, i) => {
211
+ }, $s = (s, i) => {
212
212
  let t;
213
213
  return s !== void 0 && (t = window.setTimeout(() => {
214
214
  const e = new Error(`Connection timed out after ${s}ms`);
215
- e.code = xt.ConnectionTimeout, i(e);
215
+ e.code = Mt.ConnectionTimeout, i(e);
216
216
  }, s)), () => {
217
217
  clearTimeout(t);
218
218
  };
219
- }, _s = (s) => {
219
+ }, Ks = (s) => {
220
220
  if (!s.src && !s.srcdoc) {
221
221
  const i = new Error("Iframe must have src or srcdoc property defined.");
222
- throw i.code = xt.NoIframeSrc, i;
222
+ throw i.code = Mt.NoIframeSrc, i;
223
223
  }
224
- }, $s = (s) => {
224
+ }, zs = (s) => {
225
225
  let { iframe: i, methods: t = {}, childOrigin: e, timeout: r, debug: n = !1 } = s;
226
- const c = Ps(n), h = vs("Parent", c), { onDestroy: l, destroy: y } = h;
227
- e || (_s(i), e = Ds(i.src));
228
- const p = e === "null" ? "*" : e, f = us(t), I = ks(c, f, e, p), S = Us(f, e, p, h, c);
226
+ const c = Fs(n), l = Ps("Parent", c), { onDestroy: h, destroy: y } = l;
227
+ e || (Ks(i), e = Os(i.src));
228
+ const p = e === "null" ? "*" : e, I = ys(t), S = Ts(c, I, e, p), f = Gs(I, e, p, l, c);
229
229
  return {
230
- promise: new Promise((L, P) => {
231
- const N = Hs(r, y), M = (v) => {
232
- if (!(v.source !== i.contentWindow || !v.data)) {
233
- if (v.data.penpal === _.Syn) {
234
- I(v);
230
+ promise: new Promise((A, v) => {
231
+ const N = $s(r, y), x = (P) => {
232
+ if (!(P.source !== i.contentWindow || !P.data)) {
233
+ if (P.data.penpal === _.Syn) {
234
+ S(P);
235
235
  return;
236
236
  }
237
- if (v.data.penpal === _.Ack) {
238
- const $ = S(v);
239
- $ && (N(), L($));
237
+ if (P.data.penpal === _.Ack) {
238
+ const $ = f(P);
239
+ $ && (N(), A($));
240
240
  return;
241
241
  }
242
242
  }
243
243
  };
244
- window.addEventListener(ct.Message, M), c("Parent: Awaiting handshake"), Gs(i, h), l((v) => {
245
- window.removeEventListener(ct.Message, M), v && P(v);
244
+ window.addEventListener(ct.Message, x), c("Parent: Awaiting handshake"), _s(i, l), h((P) => {
245
+ window.removeEventListener(ct.Message, x), P && v(P);
246
246
  });
247
247
  }),
248
248
  destroy() {
249
249
  y();
250
250
  }
251
251
  };
252
- }, Ks = (s) => {
252
+ }, Ws = (s) => {
253
253
  const i = new RegExp(/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w.-]+)+[\w]+\/$/);
254
254
  let t = "";
255
255
  return i.test(s) ? t = s : s.indexOf("/index.html") > -1 ? t = s.replace("/index.html", "/") : s.charAt(-1) !== "/" && (t = `${s}/`), t;
256
- }, zs = (s, i, t) => {
257
- const e = Ks(i), n = `<html>
256
+ }, js = (s, i, t) => {
257
+ const e = Ws(i), n = `<html>
258
258
  <head>
259
259
  <base href="/" />
260
260
  <meta charset="UTF-8"/>
@@ -275,17 +275,17 @@ const Ms = () => ++Ns, ls = ".", ds = (s) => s ? s.split(ls) : [], xs = (s) => s
275
275
  </html>
276
276
  `;
277
277
  s.srcdoc = n;
278
- }, Ws = (s, i, t, e = "chili-editor", r) => {
278
+ }, qs = (s, i, t, e = "chili-editor", r) => {
279
279
  const n = `#${e}`, c = document.createElement("iframe");
280
280
  c.setAttribute("srcdoc", " "), c.setAttribute("title", "Chili-Editor"), c.setAttribute("style", "width: 100%; height: 100%;"), c.setAttribute("frameBorder", "0"), c.setAttribute("referrerpolicy", "origin");
281
- const h = () => {
282
- const l = document.querySelector(n);
283
- l && (l == null || l.appendChild(c), zs(c, s, r));
281
+ const l = () => {
282
+ const h = document.querySelector(n);
283
+ h && (h == null || h.appendChild(c), js(c, s, r));
284
284
  };
285
- document.readyState === "complete" || document.readyState === "interactive" ? h() : document.addEventListener("DOMContentLoaded", () => {
286
- h();
285
+ document.readyState === "complete" || document.readyState === "interactive" ? l() : document.addEventListener("DOMContentLoaded", () => {
286
+ l();
287
287
  }), t(
288
- $s({
288
+ zs({
289
289
  // The iframe to which a connection should be made
290
290
  iframe: c,
291
291
  // All the methods that we want to expose to the child should be inside the methods object
@@ -337,7 +337,7 @@ const Ms = () => ++Ns, ls = ".", ds = (s) => s ? s.split(ls) : [], xs = (s) => s
337
337
  );
338
338
  };
339
339
  var Z = /* @__PURE__ */ ((s) => (s.GraFxStudioEnvironmentApiUrl = "ENVIRONMENT_API", s.GraFxStudioSdkVersion = "SDK_VERSION", s.GraFxStudioDocumentType = "DOCUMENT_TYPE", s.GraFxStudioTemplateId = "TEMPLATE_ID", s.GraFxStudioAuthToken = "GRAFX_AUTH_TOKEN", s.QueryCallCacheEnabled = "ENABLE_QUERY_CALL_CACHE", s))(Z || {});
340
- const qs = {
340
+ const Ys = {
341
341
  shortcutOptions: {
342
342
  debugPanel: { enabled: !1 },
343
343
  ellipse: { enabled: !1 },
@@ -352,23 +352,24 @@ const qs = {
352
352
  viewMode: { enabled: !1 }
353
353
  }
354
354
  };
355
- var js = /* @__PURE__ */ ((s) => (s.overflow = "overflow", s.fontLoading = "fontLoading", s.actionRegister = "actionRegister", s.actionExecution = "actionExecution", s.actionCircular = "actionCircular", s))(js || {}), gs = /* @__PURE__ */ ((s) => (s.project = "project", s.template = "template", s))(gs || {});
356
- const Ys = 404075;
355
+ var Zs = /* @__PURE__ */ ((s) => (s.overflow = "overflow", s.fontLoading = "fontLoading", s.actionRegister = "actionRegister", s.actionExecution = "actionExecution", s.actionCircular = "actionCircular", s))(Zs || {}), ps = /* @__PURE__ */ ((s) => (s.project = "project", s.template = "template", s))(ps || {});
356
+ const Qs = 404075;
357
+ function Cs(s) {
358
+ const i = s.error ?? "Yikes, something went wrong", t = {
359
+ cause: {
360
+ name: String(s.status),
361
+ message: s.error ?? "Yikes, something went wrong"
362
+ }
363
+ };
364
+ if (s.status === Qs) {
365
+ const r = JSON.parse(s.data).statusCode;
366
+ throw new Xs(r, i, t);
367
+ } else
368
+ throw new Error(i, t);
369
+ }
357
370
  function o(s, i = !0) {
358
371
  try {
359
- if (!s.success) {
360
- const e = s.error ?? "Yikes, something went wrong", r = {
361
- cause: {
362
- name: String(s.status),
363
- message: s.error ?? "Yikes, something went wrong"
364
- }
365
- };
366
- if (s.status === Ys) {
367
- const c = JSON.parse(s.data).statusCode;
368
- throw new Zs(c, e, r);
369
- } else
370
- throw new Error(e, r);
371
- }
372
+ s.success || Cs(s);
372
373
  const t = s.data && i;
373
374
  return {
374
375
  ...s,
@@ -378,13 +379,13 @@ function o(s, i = !0) {
378
379
  throw console.error(t), t;
379
380
  }
380
381
  }
381
- class Zs extends Error {
382
+ class Xs extends Error {
382
383
  constructor(i, t, e) {
383
384
  super(t, e), this.statusCode = i;
384
385
  }
385
386
  }
386
387
  var O;
387
- class Ae {
388
+ class De {
388
389
  /**
389
390
  * @ignore
390
391
  */
@@ -397,8 +398,8 @@ class Ae {
397
398
  }
398
399
  }
399
400
  O = new WeakMap();
400
- var E;
401
- class Fe {
401
+ var D;
402
+ class Le {
402
403
  /**
403
404
  * @ignore
404
405
  */
@@ -406,15 +407,15 @@ class Fe {
406
407
  /**
407
408
  * @ignore
408
409
  */
409
- u(this, E);
410
- this.getAllOnSelectedLayout = async () => (await a(this, E)).getAnimationsOnSelectedLayout().then((e) => o(e)), this.getByFrameId = async (t, e) => (await a(this, E)).getAnimationByFrameId(t, e).then((n) => o(n)), this.getByLayoutId = async (t) => (await a(this, E)).getAnimationsByLayoutId(t).then((r) => o(r)), this.setFrameAnimation = async (t) => (await a(this, E)).setFrameAnimation(JSON.stringify(t)).then(
410
+ u(this, D);
411
+ this.getAllOnSelectedLayout = async () => (await a(this, D)).getAnimationsOnSelectedLayout().then((e) => o(e)), this.getByFrameId = async (t, e) => (await a(this, D)).getAnimationByFrameId(t, e).then((n) => o(n)), this.getByLayoutId = async (t) => (await a(this, D)).getAnimationsByLayoutId(t).then((r) => o(r)), this.setFrameAnimation = async (t) => (await a(this, D)).setFrameAnimation(JSON.stringify(t)).then(
411
412
  (r) => o({ ...r, data: JSON.stringify(t) })
412
- ), this.play = async () => (await a(this, E)).playAnimation().then((e) => o(e)), this.pause = async () => (await a(this, E)).pauseAnimation().then((e) => o(e)), this.setScrubberPosition = async (t) => (await a(this, E)).setScrubberPosition(t).then((r) => o(r)), this.setDuration = async (t) => (await a(this, E)).setAnimationDuration(t).then((r) => o(r)), this.resetFrameAnimation = async (t) => (await a(this, E)).resetFrameAnimation(t).then((r) => o(r)), this.reset = async () => (await a(this, E)).resetAnimation().then((e) => o(e)), g(this, E, i);
413
+ ), this.play = async () => (await a(this, D)).playAnimation().then((e) => o(e)), this.pause = async () => (await a(this, D)).pauseAnimation().then((e) => o(e)), this.setScrubberPosition = async (t) => (await a(this, D)).setScrubberPosition(t).then((r) => o(r)), this.setDuration = async (t) => (await a(this, D)).setAnimationDuration(t).then((r) => o(r)), this.resetFrameAnimation = async (t) => (await a(this, D)).resetFrameAnimation(t).then((r) => o(r)), this.reset = async () => (await a(this, D)).resetAnimation().then((e) => o(e)), g(this, D, i);
413
414
  }
414
415
  }
415
- E = new WeakMap();
416
- var G = /* @__PURE__ */ ((s) => (s.code39 = "code39", s.code93 = "code93", s.code128 = "code128", s.dataMatrix = "dataMatrix", s.ean13 = "ean13", s.ean8 = "ean8", s.qr = "qr", s.upca = "upca", s.upce = "upce", s.gs1128 = "gs1128", s))(G || {}), Ot = /* @__PURE__ */ ((s) => (s.low = "low", s.medium = "medium", s.quartile = "quartile", s.high = "high", s))(Ot || {}), ft = /* @__PURE__ */ ((s) => (s.utf8 = "utf8", s.iso8859_1 = "iso8859_1", s.code128a = "code128a", s.code128b = "code128b", s.code128c = "code128c", s))(ft || {}), Qs = /* @__PURE__ */ ((s) => (s.success = "success", s.empty = "empty", s.invalidLength = "invalidLength", s.invalidCharacters = "invalidCharacters", s.invalidChecksum = "invalidChecksum", s.invalidUPCE = "invalidUPCE", s.otherError = "otherError", s))(Qs || {}), Y = /* @__PURE__ */ ((s) => (s.top = "top", s.right = "right", s.bottom = "bottom", s.left = "left", s))(Y || {}), Xs = /* @__PURE__ */ ((s) => (s.top = "top", s.child = "child", s))(Xs || {}), tr = /* @__PURE__ */ ((s) => (s.px = "px", s.mm = "mm", s.cm = "cm", s.inch = "inch", s.pt = "pt", s))(tr || {}), er = /* @__PURE__ */ ((s) => (s.print = "print", s.digitalStatic = "digitalStatic", s.digitalAnimated = "digitalAnimated", s))(er || {}), k;
417
- class Ee {
416
+ D = new WeakMap();
417
+ var T = /* @__PURE__ */ ((s) => (s.code39 = "code39", s.code93 = "code93", s.code128 = "code128", s.dataMatrix = "dataMatrix", s.ean13 = "ean13", s.ean8 = "ean8", s.qr = "qr", s.upca = "upca", s.upce = "upce", s.gs1128 = "gs1128", s))(T || {}), Ot = /* @__PURE__ */ ((s) => (s.low = "low", s.medium = "medium", s.quartile = "quartile", s.high = "high", s))(Ot || {}), ft = /* @__PURE__ */ ((s) => (s.utf8 = "utf8", s.iso8859_1 = "iso8859_1", s.code128a = "code128a", s.code128b = "code128b", s.code128c = "code128c", s))(ft || {}), tr = /* @__PURE__ */ ((s) => (s.success = "success", s.empty = "empty", s.invalidLength = "invalidLength", s.invalidCharacters = "invalidCharacters", s.invalidChecksum = "invalidChecksum", s.invalidUPCE = "invalidUPCE", s.otherError = "otherError", s))(tr || {}), Y = /* @__PURE__ */ ((s) => (s.top = "top", s.right = "right", s.bottom = "bottom", s.left = "left", s))(Y || {}), er = /* @__PURE__ */ ((s) => (s.top = "top", s.child = "child", s))(er || {}), sr = /* @__PURE__ */ ((s) => (s.px = "px", s.mm = "mm", s.cm = "cm", s.inch = "inch", s.pt = "pt", s))(sr || {}), rr = /* @__PURE__ */ ((s) => (s.print = "print", s.digitalStatic = "digitalStatic", s.digitalAnimated = "digitalAnimated", s))(rr || {}), nr = /* @__PURE__ */ ((s) => (s.locked = "locked", s.range = "range", s.none = "none", s))(nr || {}), U;
418
+ class Oe {
418
419
  /**
419
420
  * @ignore
420
421
  */
@@ -422,8 +423,8 @@ class Ee {
422
423
  /**
423
424
  * @ignore
424
425
  */
425
- u(this, k);
426
- this.setBarcodeProperties = async (t, e) => (await a(this, k)).setBarcodeProperties(t, JSON.stringify(e)).then((n) => o(n)), this.setEnableBackground = async (t, e) => {
426
+ u(this, U);
427
+ this.setBarcodeProperties = async (t, e) => (await a(this, U)).setBarcodeProperties(t, JSON.stringify(e)).then((n) => o(n)), this.setEnableBackground = async (t, e) => {
427
428
  const r = { enableBackground: e };
428
429
  return this.setBarcodeProperties(t, r);
429
430
  }, this.setBackgroundColor = async (t, e) => {
@@ -435,7 +436,7 @@ class Ee {
435
436
  }, this.setBarColor = async (t, e) => {
436
437
  const r = { barColor: e };
437
438
  return this.setBarcodeProperties(t, r);
438
- }, this.setBarcodeSource = async (t, e) => (await a(this, k)).setBarcodeSource(t, JSON.stringify(e)).then((n) => o(n)), this.removeBarcodeSource = async (t) => (await a(this, k)).setBarcodeSource(t, null).then((r) => o(r)), this.setEnableText = async (t, e) => {
439
+ }, this.setBarcodeSource = async (t, e) => (await a(this, U)).setBarcodeSource(t, JSON.stringify(e)).then((n) => o(n)), this.removeBarcodeSource = async (t) => (await a(this, U)).setBarcodeSource(t, null).then((r) => o(r)), this.setEnableText = async (t, e) => {
439
440
  const r = { enableText: e };
440
441
  return this.setBarcodeProperties(t, r);
441
442
  }, this.setBarHeight = async (t, e) => {
@@ -451,47 +452,47 @@ class Ee {
451
452
  right: r === Y.right ? e : void 0,
452
453
  bottom: r === Y.bottom ? e : void 0
453
454
  } : { left: e, top: e, right: e, bottom: e };
454
- return (await a(this, k)).setBarcodeProperties(t, JSON.stringify({ quietZone: n })).then((h) => o(h));
455
+ return (await a(this, U)).setBarcodeProperties(t, JSON.stringify({ quietZone: n })).then((l) => o(l));
455
456
  }, this.setAreQuietZoneValuesCombined = async (t, e) => {
456
457
  const r = { areQuietZoneValuesCombined: e };
457
- return (await a(this, k)).setBarcodeProperties(t, JSON.stringify({ quietZone: r })).then((c) => o(c));
458
- }, this.setErrorCorrectionLevel = async (t, e) => (await a(this, k)).setBarcodeProperties(t, JSON.stringify({ errorCorrectionLevel: e })).then((n) => o(n)), this.setCharacterSet = async (t, e) => (await a(this, k)).setBarcodeProperties(t, JSON.stringify({ characterSet: e })).then((n) => o(n)), this.setDrawLightMarginIndicator = async (t, e) => {
458
+ return (await a(this, U)).setBarcodeProperties(t, JSON.stringify({ quietZone: r })).then((c) => o(c));
459
+ }, this.setErrorCorrectionLevel = async (t, e) => (await a(this, U)).setBarcodeProperties(t, JSON.stringify({ errorCorrectionLevel: e })).then((n) => o(n)), this.setCharacterSet = async (t, e) => (await a(this, U)).setBarcodeProperties(t, JSON.stringify({ characterSet: e })).then((n) => o(n)), this.setDrawLightMarginIndicator = async (t, e) => {
459
460
  const r = { drawStartStopChars: e };
460
461
  return this.setBarcodeProperties(t, r);
461
462
  }, this.setDrawStartStopChars = async (t, e) => {
462
463
  const r = { drawStartStopChars: e };
463
464
  return this.setBarcodeProperties(t, r);
464
465
  }, this.getBarcodeConfigationOptions = (t) => {
465
- let e = !0, r = !0, n = !0, c, h, l = !1, y = !1, p = !1;
466
+ let e = !0, r = !0, n = !0, c, l, h = !1, y = !1, p = !1;
466
467
  switch (t) {
467
- case G.qr:
468
- c = [ft.iso8859_1, ft.utf8], h = [
468
+ case T.qr:
469
+ c = [ft.iso8859_1, ft.utf8], l = [
469
470
  Ot.low,
470
471
  Ot.medium,
471
472
  Ot.quartile,
472
473
  Ot.high
473
474
  ];
474
- case G.dataMatrix:
475
- e = !1, r = !1, n = !1, l = !0;
475
+ case T.dataMatrix:
476
+ e = !1, r = !1, n = !1, h = !0;
476
477
  break;
477
- case G.ean13:
478
+ case T.ean13:
478
479
  e = !1, y = !0;
479
480
  break;
480
- case G.ean8:
481
+ case T.ean8:
481
482
  y = !0;
482
- case G.upca:
483
- case G.upce:
483
+ case T.upca:
484
+ case T.upce:
484
485
  e = !1;
485
486
  break;
486
- case G.code128:
487
- case G.gs1128:
487
+ case T.code128:
488
+ case T.gs1128:
488
489
  c = [
489
490
  ft.code128a,
490
491
  ft.code128b,
491
492
  ft.code128c
492
493
  ];
493
494
  break;
494
- case G.code39:
495
+ case T.code39:
495
496
  p = !0;
496
497
  break;
497
498
  }
@@ -500,72 +501,96 @@ class Ee {
500
501
  allowBarHeight: r,
501
502
  allowQuietZone: !0,
502
503
  allowedCharacterSets: c,
503
- allowedErrorCorrectionLevels: h,
504
+ allowedErrorCorrectionLevels: l,
504
505
  allowToggleText: e,
505
- quietZoneAlwaysCombined: l,
506
+ quietZoneAlwaysCombined: h,
506
507
  allowToggleLightMarginIndicator: y,
507
508
  allowToggleDrawStartAndEndChar: p
508
509
  };
509
- }, g(this, k, i);
510
+ }, g(this, U, i);
510
511
  }
511
512
  }
512
- k = new WeakMap();
513
- var T = /* @__PURE__ */ ((s) => (s.rgb = "rgb", s.hex = "hex", s.cmyk = "cmyk", s.spotCmyk = "spotCmyk", s.spotRgb = "spotRgb", s.spotHex = "spotHex", s))(T || {}), z = /* @__PURE__ */ ((s) => (s.rgb = "rgb", s.hex = "hex", s.cmyk = "cmyk", s.gray = "gray", s.hsl = "hsl", s.spot = "spot", s.spotCMYK = "spotCMYK", s.spotRGB = "spotRGB", s.spotHEX = "spotHEX", s))(z || {}), ys = /* @__PURE__ */ ((s) => (s.local = "local", s.brandKit = "brandKit", s.stylekit = "brandKit", s))(ys || {});
514
- const De = (s) => s.type === T.hex, Zt = (s) => s.type === T.spotHex, sr = (s) => s.type === T.spotRgb, rr = (s) => s.type === T.spotCmyk, nr = (s) => sr(s) || rr(s) || Zt(s), ar = (s) => {
515
- const i = ir(s.type);
516
- return nr(s) ? {
517
- ...Zt(s) && { value: s.displayValue },
518
- ...!Zt(s) && { ...s.displayValue },
513
+ U = new WeakMap();
514
+ var G = /* @__PURE__ */ ((s) => (s.rgb = "rgb", s.hex = "hex", s.cmyk = "cmyk", s.spotCmyk = "spotCmyk", s.spotRgb = "spotRgb", s.spotHex = "spotHex", s))(G || {}), z = /* @__PURE__ */ ((s) => (s.rgb = "rgb", s.hex = "hex", s.cmyk = "cmyk", s.gray = "gray", s.hsl = "hsl", s.spot = "spot", s.spotCMYK = "spotCMYK", s.spotRGB = "spotRGB", s.spotHEX = "spotHEX", s))(z || {}), Xt = /* @__PURE__ */ ((s) => (s.local = "local", s.brandKit = "brandKit", s.stylekit = "brandKit", s))(Xt || {});
515
+ const Ne = (s) => s.type === G.hex, te = (s) => s.type === G.spotHex, ar = (s) => s.type === G.spotRgb, ir = (s) => s.type === G.spotCmyk, or = (s) => ar(s) || ir(s) || te(s), cr = (s) => {
516
+ const i = hr(s.type);
517
+ return or(s) ? {
518
+ ...te(s) && { value: s.displayValue },
519
+ ...!te(s) && { ...s.displayValue },
519
520
  spotName: s.value,
520
521
  type: i
521
522
  } : {
522
- ...De(s) && { value: s.value },
523
- ...!De(s) && { ...s.value },
523
+ ...Ne(s) && { value: s.value },
524
+ ...!Ne(s) && { ...s.value },
524
525
  type: i
525
526
  };
526
- }, Le = (s, i, t) => {
527
- const { brandKitColorGuid: e, brandKitFontFamilyGuid: r, fontStyleId: n, ...c } = s;
527
+ }, xe = (s, i, t, e) => {
528
+ const {
529
+ brandKitColorGuid: r,
530
+ brandKitFontFamilyGuid: n,
531
+ fontStyleId: c,
532
+ textStrokeColorGuid: l,
533
+ textStrokeColorApplied: h,
534
+ textStrokeWidth: y,
535
+ ...p
536
+ } = s;
528
537
  return {
529
- ...Object.keys(c).reduce((l, y) => ({ ...l, [y]: { value: s[y] } }), {}),
538
+ ...Object.keys(p).reduce((S, f) => ({ ...S, [f]: { value: s[f] } }), {}),
530
539
  ...i && {
531
540
  color: {
532
541
  value: {
533
542
  id: i.id,
534
543
  color: i.color,
535
- type: ys.brandKit,
536
- isApplied: c.fillColorApplied
544
+ type: Xt.brandKit,
545
+ isApplied: p.fillColorApplied
537
546
  }
538
547
  }
539
548
  },
549
+ ...t && {
550
+ strokeColor: {
551
+ value: {
552
+ id: t.id,
553
+ color: t.color,
554
+ type: Xt.brandKit,
555
+ isApplied: h || !1
556
+ }
557
+ },
558
+ strokeColorApplied: {
559
+ value: h || !1
560
+ },
561
+ strokeWidth: {
562
+ value: y != null ? y.toString() : y
563
+ }
564
+ },
540
565
  fontKey: {
541
- value: t ?? null
566
+ value: e ?? null
542
567
  }
543
568
  };
544
- }, ir = (s) => {
569
+ }, hr = (s) => {
545
570
  switch (s) {
546
- case T.rgb:
571
+ case G.rgb:
547
572
  return z.rgb;
548
- case T.cmyk:
573
+ case G.cmyk:
549
574
  return z.cmyk;
550
- case T.hex:
575
+ case G.hex:
551
576
  return z.hex;
552
- case T.spotRgb:
577
+ case G.spotRgb:
553
578
  return z.spotRGB;
554
- case T.spotCmyk:
579
+ case G.spotCmyk:
555
580
  return z.spotCMYK;
556
- case T.spotHex:
581
+ case G.spotHex:
557
582
  return z.spotHEX;
558
583
  }
559
- }, Oe = (s, i) => {
584
+ }, Wt = (s, i) => {
560
585
  if (!(s === null || i === void 0))
561
586
  return (s || []).find((t) => t.id === i);
562
- }, Ne = (s, i, t) => {
587
+ }, Me = (s, i, t) => {
563
588
  var e, r;
564
589
  if (!(s === null || i === void 0 || t === void 0))
565
590
  return (r = (e = (s || []).find((n) => n.id === i)) == null ? void 0 : e.fontStyles.find((n) => n.fontStyleId === t)) == null ? void 0 : r.id;
566
591
  };
567
- var D;
568
- class Me {
592
+ var L;
593
+ class Re {
569
594
  /**
570
595
  * @ignore
571
596
  */
@@ -573,45 +598,45 @@ class Me {
573
598
  /**
574
599
  * @ignore
575
600
  */
576
- u(this, D);
577
- this.getId = async () => (await a(this, D)).getBrandKitId().then((r) => o(r)), this.getVersion = async () => (await a(this, D)).getBrandKitVersion().then((r) => o(r)), this.getName = async () => (await a(this, D)).getBrandKitName().then((r) => o(r)), this.rename = async (e) => (await a(this, D)).renameBrandKit(e).then((n) => o(n)), this.updateIdAndVersion = async (e, r) => (await a(this, D)).updateBrandKitIdAndVersion(e, r).then((c) => o(c)), this.get = async () => {
578
- const e = await this.getId(), r = await this.getVersion(), n = await this.getName(), c = this.colorStyleController.getAll(), h = this.fontController.getFontFamilies(), l = this.characterStyleController.getAll(), y = this.paragraphStyleController.getAll(), p = this.getAllMedia(), [f, I, S, b, L] = await Promise.all([
601
+ u(this, L);
602
+ this.getId = async () => (await a(this, L)).getBrandKitId().then((r) => o(r)), this.getVersion = async () => (await a(this, L)).getBrandKitVersion().then((r) => o(r)), this.getName = async () => (await a(this, L)).getBrandKitName().then((r) => o(r)), this.rename = async (e) => (await a(this, L)).renameBrandKit(e).then((n) => o(n)), this.updateIdAndVersion = async (e, r) => (await a(this, L)).updateBrandKitIdAndVersion(e, r).then((c) => o(c)), this.get = async () => {
603
+ const e = await this.getId(), r = await this.getVersion(), n = await this.getName(), c = this.colorStyleController.getAll(), l = this.fontController.getFontFamilies(), h = this.characterStyleController.getAll(), y = this.paragraphStyleController.getAll(), p = this.getAllMedia(), [I, S, f, b, A] = await Promise.all([
579
604
  c,
580
- h,
581
- y,
582
605
  l,
606
+ y,
607
+ h,
583
608
  p
584
- ]), P = {
609
+ ]), v = {
585
610
  id: e.parsedData,
586
611
  brandKit: {
587
612
  id: e.parsedData,
588
613
  name: n.parsedData,
589
614
  lastModifiedDate: r.parsedData,
590
- colors: f.parsedData,
591
- fonts: I.parsedData,
592
- paragraphStyles: S.parsedData,
615
+ colors: I.parsedData,
616
+ fonts: S.parsedData,
617
+ paragraphStyles: f.parsedData,
593
618
  characterStyles: b.parsedData,
594
- media: L.parsedData
619
+ media: A.parsedData
595
620
  }
596
621
  }, N = {
597
622
  success: !0,
598
- data: JSON.stringify(P),
599
- parsedData: P,
623
+ data: JSON.stringify(v),
624
+ parsedData: v,
600
625
  status: 200
601
626
  };
602
627
  return o(N);
603
- }, this.getAllMedia = async () => (await a(this, D)).getAllBrandKitMedia().then((r) => o(r)), this.addMedia = async (e, r, n) => (await a(this, D)).addBrandKitMedia(e, r, n).then((h) => o(h)), this.updateMedia = async (e, r, n) => (await a(this, D)).updateBrandKitMedia(e, r, n).then((h) => o(h)), this.renameMedia = async (e, r) => (await a(this, D)).renameBrandKitMedia(e, r).then((c) => o(c)), this.removeMedia = async (e) => (await a(this, D)).removeBrandKitMedia(e).then((n) => o(n)), this.remove = async () => {
604
- const r = (await this.colorStyleController.getAll()).parsedData || [], c = (await this.paragraphStyleController.getAll()).parsedData || [], l = (await this.characterStyleController.getAll()).parsedData || [], p = (await this.fontController.getFontFamilies()).parsedData || [], I = (await this.getAllMedia()).parsedData || [];
605
- await this.undoManagerController.record("brandKit.remove", async (S) => {
628
+ }, this.getAllMedia = async () => (await a(this, L)).getAllBrandKitMedia().then((r) => o(r)), this.addMedia = async (e, r, n) => (await a(this, L)).addBrandKitMedia(e, r, n).then((l) => o(l)), this.updateMedia = async (e, r, n) => (await a(this, L)).updateBrandKitMedia(e, r, n).then((l) => o(l)), this.renameMedia = async (e, r) => (await a(this, L)).renameBrandKitMedia(e, r).then((c) => o(c)), this.removeMedia = async (e) => (await a(this, L)).removeBrandKitMedia(e).then((n) => o(n)), this.remove = async () => {
629
+ const r = (await this.colorStyleController.getAll()).parsedData || [], c = (await this.paragraphStyleController.getAll()).parsedData || [], h = (await this.characterStyleController.getAll()).parsedData || [], p = (await this.fontController.getFontFamilies()).parsedData || [], S = (await this.getAllMedia()).parsedData || [];
630
+ await this.undoManagerController.record("brandKit.remove", async (f) => {
606
631
  for (const b of r)
607
- await S.colorStyle.remove(b.id);
632
+ await f.colorStyle.remove(b.id);
608
633
  for (const b of c)
609
- await S.paragraphStyle.remove(b.id);
610
- for (const b of l)
611
- await S.characterStyle.remove(b.id);
634
+ await f.paragraphStyle.remove(b.id);
635
+ for (const b of h)
636
+ await f.characterStyle.remove(b.id);
612
637
  for (const b of p)
613
- await S.font.removeFontFamily(b.id);
614
- for (const b of I)
638
+ await f.font.removeFontFamily(b.id);
639
+ for (const b of S)
615
640
  await this.removeMedia(b.name);
616
641
  });
617
642
  }, this.set = async (e) => {
@@ -630,19 +655,19 @@ class Me {
630
655
  }
631
656
  };
632
657
  return await this.undoManagerController.record("brandKit.set", async (n) => {
633
- const c = await this.setColors(e, n), h = await this.setFonts(e, n), { parsedData: l = [] } = await n.colorStyle.getAll(), { parsedData: y } = await n.font.getFontFamilies();
658
+ const c = await this.setColors(e, n), l = await this.setFonts(e, n), { parsedData: h = [] } = await n.colorStyle.getAll(), { parsedData: y } = await n.font.getFontFamilies();
634
659
  await this.setParagraphStyles(e, n, {
635
- localColors: l,
660
+ localColors: h,
636
661
  localFonts: y,
637
662
  localColorGuidMap: c,
638
- localFontGuidMap: h
663
+ localFontGuidMap: l
639
664
  }), await this.setCharacterStyles(e, n, {
640
- localColors: l,
665
+ localColors: h,
641
666
  localFonts: y,
642
667
  localColorGuidMap: c,
643
- localFontGuidMap: h
668
+ localFontGuidMap: l
644
669
  }), await this.setMedia(e);
645
- const { parsedData: p } = await n.paragraphStyle.getAll(), { parsedData: f } = await n.characterStyle.getAll(), { parsedData: I } = await this.getAllMedia();
670
+ const { parsedData: p } = await n.paragraphStyle.getAll(), { parsedData: I } = await n.characterStyle.getAll(), { parsedData: S } = await this.getAllMedia();
646
671
  await n.brandKit.updateIdAndVersion(e.id, e.brandKit.lastModifiedDate), await n.brandKit.rename(e.brandKit.name), r = {
647
672
  success: !0,
648
673
  status: 200,
@@ -650,15 +675,15 @@ class Me {
650
675
  id: e.id,
651
676
  version: e.brandKit.lastModifiedDate,
652
677
  name: e.brandKit.name,
653
- colors: l || [],
678
+ colors: h || [],
654
679
  fonts: y || [],
655
680
  paragraphStyles: p || [],
656
- characterStyles: f || [],
657
- media: I || []
681
+ characterStyles: I || [],
682
+ media: S || []
658
683
  }
659
684
  };
660
685
  }), r;
661
- }, g(this, D, i), this.colorStyleController = t.colorStyle, this.fontController = t.font, this.mediaController = t.mediaConnector, this.paragraphStyleController = t.paragraphStyle, this.characterStyleController = t.characterStyle, this.undoManagerController = t.undoManager;
686
+ }, g(this, L, i), this.colorStyleController = t.colorStyle, this.fontController = t.font, this.mediaController = t.mediaConnector, this.paragraphStyleController = t.paragraphStyle, this.characterStyleController = t.characterStyle, this.undoManagerController = t.undoManager;
662
687
  }
663
688
  async setColors(i, t) {
664
689
  const e = /* @__PURE__ */ new Map();
@@ -666,7 +691,7 @@ class Me {
666
691
  const { parsedData: n } = await t.colorStyle.create();
667
692
  if (!n) continue;
668
693
  e.set(r.guid, n);
669
- const c = ar(r);
694
+ const c = cr(r);
670
695
  await t.colorStyle.rename(n, r.name), await t.colorStyle.update(n, c);
671
696
  }
672
697
  return e;
@@ -676,39 +701,41 @@ class Me {
676
701
  for (const n of i.brandKit.fonts || []) {
677
702
  const { parsedData: c = [] } = await t.fontConnector.detail(e, n.fontFamilyId);
678
703
  if (!(c != null && c[0])) throw new Error(`No font styles for family ID: ${n.fontFamilyId}`);
679
- const { parsedData: h } = await t.font.addFontFamily(e, {
704
+ const { parsedData: l } = await t.font.addFontFamily(e, {
680
705
  name: c[0].familyName,
681
706
  fontFamilyId: n.fontFamilyId
682
707
  });
683
- h && r.set(n.fontFamilyBrandKitGuid, h);
708
+ l && r.set(n.fontFamilyBrandKitGuid, l);
684
709
  }
685
710
  return r;
686
711
  }
687
712
  async setParagraphStyles(i, t, e) {
688
- const { localColors: r, localFonts: n, localColorGuidMap: c, localFontGuidMap: h } = e;
689
- for (const l of i.brandKit.paragraphStyles || []) {
690
- const y = c.get(l.brandKitColorGuid), p = h.get(l.brandKitFontFamilyGuid), f = Ne(n, p, l.fontStyleId);
691
- if (!p || !f)
692
- throw new Error(`Paragraph style could not be created with an empty font family: ${l.name}`);
693
- const I = Oe(r, y);
694
- if (!I) throw new Error(`Paragraph style could not be created with an empty color: ${l.name}`);
695
- const { parsedData: S } = await t.paragraphStyle.create(), b = Le(
696
- l,
697
- I,
698
- `${f}`
713
+ const { localColors: r, localFonts: n, localColorGuidMap: c, localFontGuidMap: l } = e;
714
+ for (const h of i.brandKit.paragraphStyles || []) {
715
+ const y = c.get(h.brandKitColorGuid), p = c.get(h.textStrokeColorGuid), I = l.get(h.brandKitFontFamilyGuid), S = Me(n, I, h.fontStyleId);
716
+ if (!I || !S)
717
+ throw new Error(`Paragraph style could not be created with an empty font family: ${h.name}`);
718
+ const f = Wt(r, y), b = Wt(r, p);
719
+ if (!f) throw new Error(`Paragraph style could not be created with an empty color: ${h.name}`);
720
+ const { parsedData: A } = await t.paragraphStyle.create(), v = xe(
721
+ h,
722
+ f,
723
+ b,
724
+ `${S}`
699
725
  );
700
- await t.paragraphStyle.rename(S, l.name), await t.paragraphStyle.update(S, b);
726
+ await t.paragraphStyle.rename(A, h.name), await t.paragraphStyle.update(A, v);
701
727
  }
702
728
  }
703
729
  async setCharacterStyles(i, t, e) {
704
- const { localColors: r, localFonts: n, localColorGuidMap: c, localFontGuidMap: h } = e;
705
- for (const l of i.brandKit.characterStyles || []) {
706
- const y = l.brandKitColorGuid ? c.get(l.brandKitColorGuid) : void 0, p = l.brandKitFontFamilyGuid ? h.get(l.brandKitFontFamilyGuid) : void 0, f = Oe(r, y), I = Ne(n, p, l.fontStyleId), { parsedData: S } = await t.characterStyle.create(), b = Le(
707
- l,
730
+ const { localColors: r, localFonts: n, localColorGuidMap: c, localFontGuidMap: l } = e;
731
+ for (const h of i.brandKit.characterStyles || []) {
732
+ const y = h.brandKitColorGuid ? c.get(h.brandKitColorGuid) : void 0, p = h.textStrokeColorGuid ? c.get(h.textStrokeColorGuid) : void 0, I = h.brandKitFontFamilyGuid ? l.get(h.brandKitFontFamilyGuid) : void 0, S = Wt(r, y), f = Wt(r, p), b = Me(n, I, h.fontStyleId), { parsedData: A } = await t.characterStyle.create(), v = xe(
733
+ h,
734
+ S,
708
735
  f,
709
- I
736
+ b
710
737
  );
711
- await t.characterStyle.rename(S, l.name), await t.characterStyle.update(S, b);
738
+ await t.characterStyle.rename(A, h.name), await t.characterStyle.update(A, v);
712
739
  }
713
740
  }
714
741
  async setMedia(i) {
@@ -716,9 +743,9 @@ class Me {
716
743
  await this.addMedia(t.name, t.mediaConnectorId, t.mediaId);
717
744
  }
718
745
  }
719
- D = new WeakMap();
746
+ L = new WeakMap();
720
747
  var X;
721
- class Qt {
748
+ class ee {
722
749
  /**
723
750
  * @ignore
724
751
  */
@@ -727,12 +754,12 @@ class Qt {
727
754
  * @ignore
728
755
  */
729
756
  u(this, X);
730
- this.zoomToPage = async (t, e, r, n, c) => (t !== void 0 && console.warn("id has no effect and will be deprecated in the future"), (await a(this, X)).zoomToPage(e, r, n, c).then((l) => o(l))), this.getZoomPercentage = async () => (await a(this, X)).getZoomPercentage().then((e) => o(e)), this.setZoomPercentage = async (t) => (await a(this, X)).setZoomPercentage(t).then((r) => o(r)), this.setViewMode = async (t) => (await a(this, X)).setViewMode(t).then((r) => o(r)), g(this, X, i);
757
+ this.zoomToPage = async (t, e, r, n, c) => (t !== void 0 && console.warn("id has no effect and will be deprecated in the future"), (await a(this, X)).zoomToPage(e, r, n, c).then((h) => o(h))), this.getZoomPercentage = async () => (await a(this, X)).getZoomPercentage().then((e) => o(e)), this.setZoomPercentage = async (t) => (await a(this, X)).setZoomPercentage(t).then((r) => o(r)), this.setViewMode = async (t) => (await a(this, X)).setViewMode(t).then((r) => o(r)), g(this, X, i);
731
758
  }
732
759
  }
733
760
  X = new WeakMap();
734
761
  var R;
735
- class xe {
762
+ class Ve {
736
763
  /**
737
764
  * @ignore
738
765
  */
@@ -746,7 +773,7 @@ class xe {
746
773
  }
747
774
  R = new WeakMap();
748
775
  var tt;
749
- class Re {
776
+ class Be {
750
777
  /**
751
778
  * @ignore
752
779
  */
@@ -771,8 +798,8 @@ class Re {
771
798
  }
772
799
  }
773
800
  tt = new WeakMap();
774
- var Jt;
775
- class Ve {
801
+ var kt;
802
+ class ke {
776
803
  /**
777
804
  * @ignore
778
805
  */
@@ -780,13 +807,13 @@ class Ve {
780
807
  /**
781
808
  * @ignore
782
809
  */
783
- u(this, Jt);
784
- this.convertToRgb = async (t) => (await a(this, Jt)).colorToRgb(JSON.stringify(t)).then((r) => o(r)), g(this, Jt, i);
810
+ u(this, kt);
811
+ this.convertToRgb = async (t) => (await a(this, kt)).colorToRgb(JSON.stringify(t)).then((r) => o(r)), g(this, kt, i);
785
812
  }
786
813
  }
787
- Jt = new WeakMap();
814
+ kt = new WeakMap();
788
815
  var V;
789
- class Be {
816
+ class Je {
790
817
  /**
791
818
  * @ignore
792
819
  */
@@ -802,35 +829,35 @@ class Be {
802
829
  }
803
830
  }
804
831
  V = new WeakMap();
805
- var Rt = /* @__PURE__ */ ((s) => (s[s.file = 0] = "file", s[s.collection = 1] = "collection", s))(Rt || {}), Xt = /* @__PURE__ */ ((s) => (s.LowResolutionWeb = "lowresWeb", s.HighResolutionWeb = "highresWeb", s))(Xt || {}), Vt = /* @__PURE__ */ ((s) => (s.file = "file", s.collection = "collection", s))(Vt || {}), or = /* @__PURE__ */ ((s) => (s.media = "media", s.fonts = "fonts", s.data = "data", s))(or || {}), cr = /* @__PURE__ */ ((s) => (s.name = "name", s.path = "relativePath", s.id = "id", s))(cr || {}), hr = /* @__PURE__ */ ((s) => (s.ascending = "asc", s.descending = "desc", s))(hr || {}), lr = /* @__PURE__ */ ((s) => (s.text = "text", s.boolean = "boolean", s))(lr || {}), dr = /* @__PURE__ */ ((s) => (s.query = "query", s.upload = "upload", s))(dr || {}), Nt = /* @__PURE__ */ ((s) => (s.url = "url", s.grafx = "grafx", s.local = "local", s))(Nt || {});
806
- class bn {
832
+ var Rt = /* @__PURE__ */ ((s) => (s[s.file = 0] = "file", s[s.collection = 1] = "collection", s))(Rt || {}), se = /* @__PURE__ */ ((s) => (s.LowResolutionWeb = "lowresWeb", s.HighResolutionWeb = "highresWeb", s))(se || {}), Vt = /* @__PURE__ */ ((s) => (s.file = "file", s.collection = "collection", s))(Vt || {}), lr = /* @__PURE__ */ ((s) => (s.media = "media", s.fonts = "fonts", s.data = "data", s))(lr || {}), dr = /* @__PURE__ */ ((s) => (s.name = "name", s.path = "relativePath", s.id = "id", s))(dr || {}), ur = /* @__PURE__ */ ((s) => (s.ascending = "asc", s.descending = "desc", s))(ur || {}), gr = /* @__PURE__ */ ((s) => (s.text = "text", s.boolean = "boolean", s))(gr || {}), yr = /* @__PURE__ */ ((s) => (s.query = "query", s.upload = "upload", s))(yr || {}), Nt = /* @__PURE__ */ ((s) => (s.url = "url", s.grafx = "grafx", s.local = "local", s))(Nt || {});
833
+ class An {
807
834
  constructor(i, t, e, r = "engineToConnector") {
808
835
  this.direction = "engineToConnector", this.name = i, this.direction = r, t === "var" ? this.value = `${t}.${e}` : this.value = e;
809
836
  }
810
837
  }
811
- var ur = /* @__PURE__ */ ((s) => (s.variable = "var", s.value = "value", s))(ur || {}), gr = /* @__PURE__ */ ((s) => (s.engineToConnector = "engineToConnector", s.connectorToEngine = "connectorToEngine", s))(gr || {}), te = /* @__PURE__ */ ((s) => (s.loading = "loading", s.loaded = "loaded", s.running = "running", s.ready = "ready", s.error = "error", s))(te || {}), yr = /* @__PURE__ */ ((s) => (s.stateChanged = "stateChanged", s.authChanged = "authChanged", s.reloadRequired = "reloadRequired", s.unloaded = "unloaded", s))(yr || {});
812
- const In = {
838
+ var pr = /* @__PURE__ */ ((s) => (s.variable = "var", s.value = "value", s))(pr || {}), Cr = /* @__PURE__ */ ((s) => (s.engineToConnector = "engineToConnector", s.connectorToEngine = "connectorToEngine", s))(Cr || {}), re = /* @__PURE__ */ ((s) => (s.loading = "loading", s.loaded = "loaded", s.running = "running", s.ready = "ready", s.error = "error", s))(re || {}), mr = /* @__PURE__ */ ((s) => (s.stateChanged = "stateChanged", s.authChanged = "authChanged", s.reloadRequired = "reloadRequired", s.unloaded = "unloaded", s))(mr || {});
839
+ const Pn = {
813
840
  url: "grafx-media.json",
814
841
  source: "local"
815
842
  /* local */
816
843
  };
817
- class vn {
844
+ class Fn {
818
845
  constructor(i) {
819
846
  this.type = "grafxToken", this.token = i;
820
847
  }
821
848
  }
822
- class Pn {
849
+ class En {
823
850
  constructor() {
824
851
  this.type = "refreshed";
825
852
  }
826
853
  }
827
- var pr = /* @__PURE__ */ ((s) => (s.grafxToken = "grafxToken", s.refreshed = "refreshed", s))(pr || {}), Cr = /* @__PURE__ */ ((s) => (s.grafxToken = "grafxToken", s.any = "any", s))(Cr || {}), ps = /* @__PURE__ */ ((s) => (s.minDimension = "minDimension", s))(ps || {});
828
- class mr extends Error {
854
+ var wr = /* @__PURE__ */ ((s) => (s.grafxToken = "grafxToken", s.refreshed = "refreshed", s))(wr || {}), fr = /* @__PURE__ */ ((s) => (s.grafxToken = "grafxToken", s.any = "any", s))(fr || {}), ms = /* @__PURE__ */ ((s) => (s.minDimension = "minDimension", s))(ms || {});
855
+ class Sr extends Error {
829
856
  constructor(i, t) {
830
857
  super(i), this.type = t;
831
858
  }
832
859
  }
833
- class ne {
860
+ class oe {
834
861
  constructor() {
835
862
  this.makeConnectorSourceForwardsCompatible = (i) => {
836
863
  if (i.source != Nt.grafx || this.isSourceMigrated(i))
@@ -856,8 +883,8 @@ class ne {
856
883
  }, this.isSourceMigrated = (i) => "id" in i;
857
884
  }
858
885
  }
859
- var B, St, lt, as;
860
- let Je = (as = class {
886
+ var B, St, lt, os;
887
+ let Ue = (os = class {
861
888
  /**
862
889
  * @ignore
863
890
  */
@@ -885,28 +912,28 @@ let Je = (as = class {
885
912
  return r.registerConnector(JSON.stringify(n)).then((c) => o(c));
886
913
  }, this.unregister = async (e) => (await a(this, B)).unregisterConnector(e).then((n) => o(n)), this.configure = async (e, r) => {
887
914
  const n = await a(this, B);
888
- return await this.waitToBeReady(e), await r(new wr(e, n)), n.updateConnectorConfiguration(e).then((c) => o(c));
915
+ return await this.waitToBeReady(e), await r(new br(e, n)), n.updateConnectorConfiguration(e).then((c) => o(c));
889
916
  }, this.getState = async (e) => (await a(this, B)).getConnectorState(e).then((n) => o(n)), this.getOptions = async (e) => (await a(this, B)).getConnectorOptions(e).then((n) => o(n)), this.waitToBeReady = async (e, r = 2e3) => {
890
917
  let n = Math.max(r, 500);
891
918
  n = Math.min(n, 5e3);
892
919
  const c = 100;
893
- let h = 0;
920
+ let l = 0;
894
921
  try {
895
- for (; h * c < n; ) {
896
- const l = await this.getState(e);
897
- if (l.success && l.parsedData && (l.parsedData.type === te.running || l.parsedData.type === te.ready))
922
+ for (; l * c < n; ) {
923
+ const h = await this.getState(e);
924
+ if (h.success && h.parsedData && (h.parsedData.type === re.running || h.parsedData.type === re.ready))
898
925
  return o(
899
926
  { data: null, success: !0, error: void 0, status: 0, parsedData: void 0 },
900
927
  !1
901
928
  );
902
- await new Promise((y) => setTimeout(y, c)), h++;
929
+ await new Promise((y) => setTimeout(y, c)), l++;
903
930
  }
904
- } catch (l) {
931
+ } catch (h) {
905
932
  return o(
906
933
  {
907
934
  data: null,
908
935
  success: !1,
909
- error: `Error while getting connector state ${l}`,
936
+ error: `Error while getting connector state ${h}`,
910
937
  status: 5e4,
911
938
  parsedData: void 0
912
939
  },
@@ -924,13 +951,13 @@ let Je = (as = class {
924
951
  !1
925
952
  );
926
953
  }, this.updateMappings = async (e, r) => await this.configure(e, async (n) => {
927
- const { parsedData: c } = await this.getMappings(e), h = (c == null ? void 0 : c.filter(
954
+ const { parsedData: c } = await this.getMappings(e), l = (c == null ? void 0 : c.filter(
928
955
  (p) => !r.some(
929
- (f) => f.name === p.name && f.direction === p.direction
956
+ (I) => I.name === p.name && I.direction === p.direction
930
957
  )
931
- )) ?? [], l = r.filter((p) => p.name !== "" && p.value !== ""), y = [...h, ...l];
958
+ )) ?? [], h = r.filter((p) => p.name !== "" && p.value !== ""), y = [...l, ...h];
932
959
  await n.setMappings(y);
933
- }), g(this, B, i), g(this, St, t), g(this, lt, new ne());
960
+ }), g(this, B, i), g(this, St, t), g(this, lt, new oe());
934
961
  }
935
962
  async getMappings(i, t) {
936
963
  return (await a(this, B)).getConnectorMappings(i).then((r) => o(r)).then(
@@ -943,9 +970,9 @@ let Je = (as = class {
943
970
  }
944
971
  );
945
972
  }
946
- }, B = new WeakMap(), St = new WeakMap(), lt = new WeakMap(), as);
973
+ }, B = new WeakMap(), St = new WeakMap(), lt = new WeakMap(), os);
947
974
  var dt, ut;
948
- class wr {
975
+ class br {
949
976
  /**
950
977
  * @ignore
951
978
  */
@@ -967,8 +994,8 @@ class wr {
967
994
  }
968
995
  }
969
996
  dt = new WeakMap(), ut = new WeakMap();
970
- var et, Ut;
971
- class Ue {
997
+ var et, Jt;
998
+ class Ge {
972
999
  /**
973
1000
  * @ignore
974
1001
  */
@@ -977,21 +1004,21 @@ class Ue {
977
1004
  * @ignore
978
1005
  */
979
1006
  u(this, et);
980
- u(this, Ut);
981
- this.getPage = async (e, r, n = {}) => (await a(this, et)).dataConnectorGetPage(e, JSON.stringify(r), JSON.stringify(n)).then((h) => o(h)).then((h) => {
982
- const l = { ...h, parsedData: null };
983
- return h.parsedData && (l.parsedData = {
984
- data: h.parsedData.data.map(
985
- (y) => a(this, Ut).mapEngineToDataItem(y)
1007
+ u(this, Jt);
1008
+ this.getPage = async (e, r, n = {}) => (await a(this, et)).dataConnectorGetPage(e, JSON.stringify(r), JSON.stringify(n)).then((l) => o(l)).then((l) => {
1009
+ const h = { ...l, parsedData: null };
1010
+ return l.parsedData && (h.parsedData = {
1011
+ data: l.parsedData.data.map(
1012
+ (y) => a(this, Jt).mapEngineToDataItem(y)
986
1013
  ),
987
- continuationToken: h.parsedData.continuationToken
988
- }), l;
989
- }), this.getModel = async (e, r = {}) => (await a(this, et)).dataConnectorGetModel(e, JSON.stringify(r)).then((c) => o(c)), this.getConfigurationOptions = async (e) => (await a(this, et)).dataConnectorGetConfigurationOptions(e).then((n) => o(n)), this.getCapabilities = async (e) => (await a(this, et)).dataConnectorGetCapabilities(e).then((n) => o(n)), g(this, et, i), g(this, Ut, t);
1014
+ continuationToken: l.parsedData.continuationToken
1015
+ }), h;
1016
+ }), this.getModel = async (e, r = {}) => (await a(this, et)).dataConnectorGetModel(e, JSON.stringify(r)).then((c) => o(c)), this.getConfigurationOptions = async (e) => (await a(this, et)).dataConnectorGetConfigurationOptions(e).then((n) => o(n)), this.getCapabilities = async (e) => (await a(this, et)).dataConnectorGetCapabilities(e).then((n) => o(n)), g(this, et, i), g(this, Jt, t);
990
1017
  }
991
1018
  }
992
- et = new WeakMap(), Ut = new WeakMap();
993
- var st, kt;
994
- class ke {
1019
+ et = new WeakMap(), Jt = new WeakMap();
1020
+ var st, Ut;
1021
+ class Te {
995
1022
  /**
996
1023
  * @ignore
997
1024
  */
@@ -1000,16 +1027,16 @@ class ke {
1000
1027
  * @ignore
1001
1028
  */
1002
1029
  u(this, st);
1003
- u(this, kt);
1030
+ u(this, Ut);
1004
1031
  this.setDataSource = async (e) => (await a(this, st)).setDataSource(e).then((n) => o(n)), this.getDataSource = async () => (await a(this, st)).getDataSource().then((r) => o(r)), this.removeDataSource = async () => (await a(this, st)).removeDataSource().then((r) => o(r)), this.setDataRow = async (e) => {
1005
- const r = await a(this, st), n = a(this, kt).mapDataItemToEngine(e);
1032
+ const r = await a(this, st), n = a(this, Ut).mapDataItemToEngine(e);
1006
1033
  return r.setDataRow(JSON.stringify(n)).then((c) => o(c));
1007
- }, g(this, st, i), g(this, kt, t);
1034
+ }, g(this, st, i), g(this, Ut, t);
1008
1035
  }
1009
1036
  }
1010
- st = new WeakMap(), kt = new WeakMap();
1037
+ st = new WeakMap(), Ut = new WeakMap();
1011
1038
  var rt;
1012
- class Te {
1039
+ class He {
1013
1040
  /**
1014
1041
  * @ignore
1015
1042
  */
@@ -1023,7 +1050,7 @@ class Te {
1023
1050
  }
1024
1051
  rt = new WeakMap();
1025
1052
  var gt;
1026
- class Ge {
1053
+ class _e {
1027
1054
  /**
1028
1055
  * @ignore
1029
1056
  */
@@ -1042,19 +1069,19 @@ class Ge {
1042
1069
  }
1043
1070
  }
1044
1071
  gt = new WeakMap();
1045
- var fr = /* @__PURE__ */ ((s) => (s.top = "top", s.bottom = "bottom", s.left = "left", s.right = "right", s))(fr || {}), zt = /* @__PURE__ */ ((s) => (s.url = "url", s.variable = "variable", s.connector = "connector", s.brandKitMedia = "brandKitMedia", s))(zt || {}), Sr = /* @__PURE__ */ ((s) => (s.text = "text", s.image = "image", s.shape = "shape", s.barcode = "barcode", s))(Sr || {}), br = /* @__PURE__ */ ((s) => (s.variable = "variable", s.text = "text", s))(br || {}), Ir = /* @__PURE__ */ ((s) => (s.leftToRight = "leftToRight", s.rightToLeft = "rightToLeft", s.weak = "weak", s))(Ir || {}), vr = /* @__PURE__ */ ((s) => (s.horizontal = "horizontal", s.vertical = "vertical", s.onPath = "onPath", s))(vr || {}), Pr = /* @__PURE__ */ ((s) => (s.top = "top", s.bottom = "bottom", s.middle = "middle", s.justify = "justify", s))(Pr || {}), Ar = /* @__PURE__ */ ((s) => (s.normal = "normal", s.screen = "screen", s.overlay = "overlay", s.darken = "darken", s.lighten = "lighten", s.colorDodge = "colorDodge", s.colorBurn = "colorBurn", s.hardLight = "hardLight", s.softLight = "softLight", s.difference = "difference", s.exclusion = "exclusion", s.multiply = "multiply", s.hue = "hue", s.saturation = "saturation", s.color = "color", s.luminosity = "luminosity", s))(Ar || {}), Fr = /* @__PURE__ */ ((s) => (s.fill = "fill", s.fit = "fit", s.smartCrop = "smartCrop", s.manualCrop = "manualCrop", s))(Fr || {}), Er = /* @__PURE__ */ ((s) => (s.topLeft = "topLeft", s.topCenter = "topCenter", s.topRight = "topRight", s.centerLeft = "centerLeft", s.center = "center", s.centerRight = "centerRight", s.bottomLeft = "bottomLeft", s.bottomCenter = "bottomCenter", s.bottomRight = "bottomRight", s))(Er || {}), Dr = /* @__PURE__ */ ((s) => (s.bringToFront = "bringToFront", s.sendToBack = "sendToBack", s.bringForward = "bringForward", s.sendBackward = "sendBackward", s))(Dr || {}), Lr = /* @__PURE__ */ ((s) => (s.relative = "relative", s.start = "start", s.end = "end", s.startAndEnd = "startAndEnd", s.center = "center", s))(Lr || {}), Or = /* @__PURE__ */ ((s) => (s.page = "page", s.frame = "frame", s))(Or || {}), Nr = /* @__PURE__ */ ((s) => (s.start = "start", s.end = "end", s.center = "center", s))(Nr || {});
1046
- class Fn {
1072
+ var Ir = /* @__PURE__ */ ((s) => (s.top = "top", s.bottom = "bottom", s.left = "left", s.right = "right", s))(Ir || {}), jt = /* @__PURE__ */ ((s) => (s.url = "url", s.variable = "variable", s.connector = "connector", s.brandKitMedia = "brandKitMedia", s))(jt || {}), vr = /* @__PURE__ */ ((s) => (s.text = "text", s.image = "image", s.shape = "shape", s.barcode = "barcode", s))(vr || {}), Ar = /* @__PURE__ */ ((s) => (s.variable = "variable", s.text = "text", s))(Ar || {}), Pr = /* @__PURE__ */ ((s) => (s.leftToRight = "leftToRight", s.rightToLeft = "rightToLeft", s.weak = "weak", s))(Pr || {}), Fr = /* @__PURE__ */ ((s) => (s.horizontal = "horizontal", s.vertical = "vertical", s.onPath = "onPath", s))(Fr || {}), Er = /* @__PURE__ */ ((s) => (s.top = "top", s.bottom = "bottom", s.middle = "middle", s.justify = "justify", s))(Er || {}), Dr = /* @__PURE__ */ ((s) => (s.normal = "normal", s.screen = "screen", s.overlay = "overlay", s.darken = "darken", s.lighten = "lighten", s.colorDodge = "colorDodge", s.colorBurn = "colorBurn", s.hardLight = "hardLight", s.softLight = "softLight", s.difference = "difference", s.exclusion = "exclusion", s.multiply = "multiply", s.hue = "hue", s.saturation = "saturation", s.color = "color", s.luminosity = "luminosity", s))(Dr || {}), Lr = /* @__PURE__ */ ((s) => (s.fill = "fill", s.fit = "fit", s.smartCrop = "smartCrop", s.manualCrop = "manualCrop", s))(Lr || {}), Or = /* @__PURE__ */ ((s) => (s.topLeft = "topLeft", s.topCenter = "topCenter", s.topRight = "topRight", s.centerLeft = "centerLeft", s.center = "center", s.centerRight = "centerRight", s.bottomLeft = "bottomLeft", s.bottomCenter = "bottomCenter", s.bottomRight = "bottomRight", s))(Or || {}), Nr = /* @__PURE__ */ ((s) => (s.bringToFront = "bringToFront", s.sendToBack = "sendToBack", s.bringForward = "bringForward", s.sendBackward = "sendBackward", s))(Nr || {}), xr = /* @__PURE__ */ ((s) => (s.relative = "relative", s.start = "start", s.end = "end", s.startAndEnd = "startAndEnd", s.center = "center", s))(xr || {}), Mr = /* @__PURE__ */ ((s) => (s.page = "page", s.frame = "frame", s))(Mr || {}), Rr = /* @__PURE__ */ ((s) => (s.start = "start", s.end = "end", s.center = "center", s))(Rr || {});
1073
+ class Ln {
1047
1074
  constructor() {
1048
1075
  this.type = "page";
1049
1076
  }
1050
1077
  }
1051
- class En {
1078
+ class On {
1052
1079
  constructor(i, t) {
1053
1080
  this.type = "frame", this.frameId = i, this.edge = t;
1054
1081
  }
1055
1082
  }
1056
- var Cs = /* @__PURE__ */ ((s) => (s.frameCrop = "frameCrop", s.assetCrop = "assetCrop", s))(Cs || {}), J;
1057
- class He {
1083
+ var ws = /* @__PURE__ */ ((s) => (s.frameCrop = "frameCrop", s.assetCrop = "assetCrop", s))(ws || {}), k;
1084
+ class $e {
1058
1085
  /**
1059
1086
  * @ignore
1060
1087
  */
@@ -1062,16 +1089,16 @@ class He {
1062
1089
  /**
1063
1090
  * @ignore
1064
1091
  */
1065
- u(this, J);
1092
+ u(this, k);
1066
1093
  this.insertImageVariableToFrame = async (t, e) => {
1067
- const r = await a(this, J), n = { id: e, type: zt.variable };
1094
+ const r = await a(this, k), n = { id: e, type: jt.variable };
1068
1095
  return r.setImageSource(t, JSON.stringify(n)).then((c) => o(c));
1069
- }, this.insertTextVariable = async (t) => (await a(this, J)).insertTextVariable(t).then((r) => o(r)), this.enterTextEditMode = async (t) => (await a(this, J)).enterTextEditMode(t).then((r) => o(r)), this.exitTextEditMode = async () => (await a(this, J)).exitTextEditMode().then((e) => o(e)), this.getText = async (t, e) => (await a(this, J)).getTextByFrameId(t, e).then((n) => o(n)), this.setText = async (t, e) => (await a(this, J)).setTextByFrameId(t, e).then((n) => o(n)), this.selectText = async (t, e, r) => (await a(this, J)).selectTextById(t, e, r).then((c) => o(c)), this.addCustomUndoData = async (t, e, r) => (await a(this, J)).setCustomUndoData(t, e, r ?? !1).then((c) => o(c)), g(this, J, i);
1096
+ }, this.insertTextVariable = async (t) => (await a(this, k)).insertTextVariable(t).then((r) => o(r)), this.enterTextEditMode = async (t) => (await a(this, k)).enterTextEditMode(t).then((r) => o(r)), this.exitTextEditMode = async () => (await a(this, k)).exitTextEditMode().then((e) => o(e)), this.getText = async (t, e) => (await a(this, k)).getTextByFrameId(t, e).then((n) => o(n)), this.setText = async (t, e) => (await a(this, k)).setTextByFrameId(t, e).then((n) => o(n)), this.selectText = async (t, e, r) => (await a(this, k)).selectTextById(t, e, r).then((c) => o(c)), this.addCustomUndoData = async (t, e, r) => (await a(this, k)).setCustomUndoData(t, e, r ?? !1).then((c) => o(c)), g(this, k, i);
1070
1097
  }
1071
1098
  }
1072
- J = new WeakMap();
1099
+ k = new WeakMap();
1073
1100
  var nt, bt;
1074
- class _e {
1101
+ class Ke {
1075
1102
  /**
1076
1103
  * @ignore
1077
1104
  */
@@ -1081,15 +1108,15 @@ class _e {
1081
1108
  */
1082
1109
  u(this, nt);
1083
1110
  u(this, bt);
1084
- this.query = async (t, e, r = {}) => (await a(this, nt)).fontConnectorQuery(t, JSON.stringify(e), JSON.stringify(r)).then((c) => o(c)), this.detail = async (t, e, r = {}) => (await a(this, nt)).fontConnectorDetail(t, e, JSON.stringify(r)).then((c) => o(c)), this.download = async (t, e, r = {}) => (await a(this, bt)).fontConnectorDownload(t, e, JSON.stringify(r)).then((c) => c ?? c), this.preview = async (t, e, r, n = {}) => (await a(this, bt)).fontConnectorPreview(t, e, r, JSON.stringify(n)).then((h) => h ?? h), this.getConfigurationOptions = async (t) => (await a(this, nt)).fontConnectorGetConfigurationOptions(t).then((r) => o(r)), this.getCapabilities = async (t) => (await a(this, nt)).fontConnectorGetCapabilities(t).then((r) => o(r)), this.parseDeprecatedFontType = (t) => {
1111
+ this.query = async (t, e, r = {}) => (await a(this, nt)).fontConnectorQuery(t, JSON.stringify(e), JSON.stringify(r)).then((c) => o(c)), this.detail = async (t, e, r = {}) => (await a(this, nt)).fontConnectorDetail(t, e, JSON.stringify(r)).then((c) => o(c)), this.download = async (t, e, r = {}) => (await a(this, bt)).fontConnectorDownload(t, e, JSON.stringify(r)).then((c) => c ?? c), this.preview = async (t, e, r, n = {}) => (await a(this, bt)).fontConnectorPreview(t, e, r, JSON.stringify(n)).then((l) => l ?? l), this.getConfigurationOptions = async (t) => (await a(this, nt)).fontConnectorGetConfigurationOptions(t).then((r) => o(r)), this.getCapabilities = async (t) => (await a(this, nt)).fontConnectorGetCapabilities(t).then((r) => o(r)), this.parseDeprecatedFontType = (t) => {
1085
1112
  if (t === Rt.file) return Vt.file;
1086
1113
  if (t === Rt.collection) return Vt.collection;
1087
1114
  }, g(this, nt, i), g(this, bt, i);
1088
1115
  }
1089
1116
  }
1090
1117
  nt = new WeakMap(), bt = new WeakMap();
1091
- var A;
1092
- class $e {
1118
+ var F;
1119
+ class ze {
1093
1120
  /**
1094
1121
  * @ignore
1095
1122
  */
@@ -1097,13 +1124,13 @@ class $e {
1097
1124
  /**
1098
1125
  * @ignore
1099
1126
  */
1100
- u(this, A);
1101
- this.addFontFamily = async (t, e) => (await a(this, A)).addFontFamily(t, JSON.stringify(e)).then((n) => o(n)), this.removeFontFamily = async (t) => (await a(this, A)).removeFontFamily(t).then((r) => o(r)), this.addFontStyle = async (t, e) => (await a(this, A)).addFontStyle(t, JSON.stringify(e)).then((n) => o(n)), this.removeFontStyle = async (t) => (await a(this, A)).removeFontStyle(t).then((r) => o(r)), this.getFontFamilies = async () => (await a(this, A)).getFontFamilies().then((e) => o(e)), this.getFontStyles = async (t) => (await a(this, A)).getFontStyles(t).then((r) => o(r)), this.getFontFamilyById = async (t) => (await a(this, A)).getFontFamilyById(t).then((r) => o(r)), this.getFontStyleById = async (t) => (await a(this, A)).getFontStyleById(t).then((r) => o(r)), this.getDefaultFontStyle = async () => (await a(this, A)).getDefaultFontStyle().then((e) => o(e)), this.getDefaultFontFamily = async () => (await a(this, A)).getDefaultFontFamily().then((e) => o(e)), this.isFontFamilyUsed = async (t) => (await a(this, A)).isFontFamilyUsed(t).then((r) => o(r)), this.isFontStyleUsed = async (t) => (await a(this, A)).isFontStyleUsed(t).then((r) => o(r)), this.moveFontFamilies = async (t, e) => (await a(this, A)).moveFontFamilies(t, e).then((n) => o(n)), g(this, A, i);
1127
+ u(this, F);
1128
+ this.addFontFamily = async (t, e) => (await a(this, F)).addFontFamily(t, JSON.stringify(e)).then((n) => o(n)), this.removeFontFamily = async (t) => (await a(this, F)).removeFontFamily(t).then((r) => o(r)), this.addFontStyle = async (t, e) => (await a(this, F)).addFontStyle(t, JSON.stringify(e)).then((n) => o(n)), this.removeFontStyle = async (t) => (await a(this, F)).removeFontStyle(t).then((r) => o(r)), this.getFontFamilies = async () => (await a(this, F)).getFontFamilies().then((e) => o(e)), this.getFontStyles = async (t) => (await a(this, F)).getFontStyles(t).then((r) => o(r)), this.getFontFamilyById = async (t) => (await a(this, F)).getFontFamilyById(t).then((r) => o(r)), this.getFontStyleById = async (t) => (await a(this, F)).getFontStyleById(t).then((r) => o(r)), this.getDefaultFontStyle = async () => (await a(this, F)).getDefaultFontStyle().then((e) => o(e)), this.getDefaultFontFamily = async () => (await a(this, F)).getDefaultFontFamily().then((e) => o(e)), this.isFontFamilyUsed = async (t) => (await a(this, F)).isFontFamilyUsed(t).then((r) => o(r)), this.isFontStyleUsed = async (t) => (await a(this, F)).isFontStyleUsed(t).then((r) => o(r)), this.moveFontFamilies = async (t, e) => (await a(this, F)).moveFontFamilies(t, e).then((n) => o(n)), g(this, F, i);
1102
1129
  }
1103
1130
  }
1104
- A = new WeakMap();
1131
+ F = new WeakMap();
1105
1132
  var It;
1106
- class ee {
1133
+ class ne {
1107
1134
  /**
1108
1135
  * @ignore
1109
1136
  */
@@ -1150,7 +1177,7 @@ class ee {
1150
1177
  }
1151
1178
  It = new WeakMap();
1152
1179
  var d;
1153
- class Ke {
1180
+ class We {
1154
1181
  /**
1155
1182
  * @ignore
1156
1183
  */
@@ -1159,25 +1186,25 @@ class Ke {
1159
1186
  * @ignore
1160
1187
  */
1161
1188
  u(this, d);
1162
- this.getAll = async () => (await a(this, d)).getFrames().then((e) => o(e)), this.getSelected = async () => (await a(this, d)).getSelectedFrames().then((e) => o(e)), this.getAllByPageId = async (t) => (await a(this, d)).getFramesByPageId(t).then((r) => o(r)), this.getByName = async (t) => (await a(this, d)).getFrameByName(t).then((r) => o(r)), this.getById = async (t) => (await a(this, d)).getFrameById(t).then((r) => o(r)), this.getPropertiesOnSelectedLayout = async () => (await a(this, d)).getFramePropertiesOnSelectedLayout().then((e) => o(e)), this.getLayoutProperties = async (t, e) => (await a(this, d)).getFramePropertiesByFrameId(t, e).then((n) => o(n)), this.getAllLayoutProperties = async (t) => (await a(this, d)).getFramesProperties(t).then((r) => o(r)), this.resetTransformation = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.resetSize = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.select = async (t) => (await a(this, d)).selectFrames([t]).then((r) => o(r)), this.selectMultiple = async (t) => (await a(this, d)).selectFrames(t).then((r) => o(r)), this.deselectAll = async () => (await a(this, d)).deselectFrames().then((e) => o(e)), this.reorderFrames = async (t, e) => (await a(this, d)).reorderFrames(t, e).then((n) => o(n)), this.setZIndex = async (t, e) => (await a(this, d)).setFrameZIndex(t, e).then((n) => o(n)), this.setHeight = async (t, e) => (await a(this, d)).setFrameHeight(t, e).then((n) => o(n)), this.setRotation = async (t, e) => (await a(this, d)).setFrameRotation(t, e).then((n) => o(n)), this.setWidth = async (t, e) => (await a(this, d)).setFrameWidth(t, e).then((n) => o(n)), this.setX = async (t, e) => (await a(this, d)).setFrameX(t, e).then((n) => o(n)), this.setY = async (t, e) => (await a(this, d)).setFrameY(t, e).then((n) => o(n)), this.rename = async (t, e) => (await a(this, d)).renameFrame(t, e).then((n) => o(n)), this.reset = async (t) => (await a(this, d)).resetFrame(t).then((r) => o(r)), this.resetX = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.resetY = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.resetRotation = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.resetWidth = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.resetHeight = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.resetImageFrameFitMode = async (t) => (await a(this, d)).resetImageFrameFitMode(t).then((r) => o(r)), this.setVisibility = async (t, e) => (await a(this, d)).setFrameIsVisible(t, e).then((n) => o(n)), this.setIsVisible = async (t, e) => (await a(this, d)).setFrameIsVisible(t, e).then((n) => o(n)), this.remove = async (t) => (await a(this, d)).removeFrames([t]).then((r) => o(r)), this.removeFrames = async (t) => (await a(this, d)).removeFrames(t).then((r) => o(r)), this.create = async (t, e, r, n, c) => (await a(this, d)).addFrame(t, e, r, n, c).then((l) => o(l)), this.createShapeFrame = async (t, e, r, n, c) => (await a(this, d)).addFrame(t, e, r, n, c).then((l) => o(l)), this.createBarcodeFrame = async (t, e) => (await a(this, d)).addBarcodeFrame(t, e == null ? void 0 : e.x, e == null ? void 0 : e.y).then((n) => o(n)), this.duplicateFrames = async (t) => (await a(this, d)).duplicateFrames(t).then((r) => o(r)), this.updateImageSource = async (t, e) => {
1189
+ this.getAll = async () => (await a(this, d)).getFrames().then((e) => o(e)), this.getSelected = async () => (await a(this, d)).getSelectedFrames().then((e) => o(e)), this.getAllByPageId = async (t) => (await a(this, d)).getFramesByPageId(t).then((r) => o(r)), this.getByName = async (t) => (await a(this, d)).getFrameByName(t).then((r) => o(r)), this.getById = async (t) => (await a(this, d)).getFrameById(t).then((r) => o(r)), this.getPropertiesOnSelectedLayout = async () => (await a(this, d)).getFramePropertiesOnSelectedLayout().then((e) => o(e)), this.getLayoutProperties = async (t, e) => (await a(this, d)).getFramePropertiesByFrameId(t, e).then((n) => o(n)), this.getAllLayoutProperties = async (t) => (await a(this, d)).getFramesProperties(t).then((r) => o(r)), this.resetTransformation = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.resetSize = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.select = async (t) => (await a(this, d)).selectFrames([t]).then((r) => o(r)), this.selectMultiple = async (t) => (await a(this, d)).selectFrames(t).then((r) => o(r)), this.deselectAll = async () => (await a(this, d)).deselectFrames().then((e) => o(e)), this.reorderFrames = async (t, e) => (await a(this, d)).reorderFrames(t, e).then((n) => o(n)), this.setZIndex = async (t, e) => (await a(this, d)).setFrameZIndex(t, e).then((n) => o(n)), this.setHeight = async (t, e) => (await a(this, d)).setFrameHeight(t, e).then((n) => o(n)), this.setRotation = async (t, e) => (await a(this, d)).setFrameRotation(t, e).then((n) => o(n)), this.setWidth = async (t, e) => (await a(this, d)).setFrameWidth(t, e).then((n) => o(n)), this.setX = async (t, e) => (await a(this, d)).setFrameX(t, e).then((n) => o(n)), this.setY = async (t, e) => (await a(this, d)).setFrameY(t, e).then((n) => o(n)), this.rename = async (t, e) => (await a(this, d)).renameFrame(t, e).then((n) => o(n)), this.reset = async (t) => (await a(this, d)).resetFrame(t).then((r) => o(r)), this.resetX = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.resetY = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.resetRotation = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.resetWidth = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.resetHeight = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.resetImageFrameFitMode = async (t) => (await a(this, d)).resetImageFrameFitMode(t).then((r) => o(r)), this.setVisibility = async (t, e) => (await a(this, d)).setFrameIsVisible(t, e).then((n) => o(n)), this.setIsVisible = async (t, e) => (await a(this, d)).setFrameIsVisible(t, e).then((n) => o(n)), this.remove = async (t) => (await a(this, d)).removeFrames([t]).then((r) => o(r)), this.removeFrames = async (t) => (await a(this, d)).removeFrames(t).then((r) => o(r)), this.create = async (t, e, r, n, c) => (await a(this, d)).addFrame(t, e, r, n, c).then((h) => o(h)), this.createShapeFrame = async (t, e, r, n, c) => (await a(this, d)).addFrame(t, e, r, n, c).then((h) => o(h)), this.createBarcodeFrame = async (t, e) => (await a(this, d)).addBarcodeFrame(t, e == null ? void 0 : e.x, e == null ? void 0 : e.y).then((n) => o(n)), this.duplicateFrames = async (t) => (await a(this, d)).duplicateFrames(t).then((r) => o(r)), this.updateImageSource = async (t, e) => {
1163
1190
  const r = await a(this, d), n = e !== null ? JSON.stringify(e) : null;
1164
1191
  return r.setImageSource(t, n).then((c) => o(c));
1165
1192
  }, this.removeImageSource = async (t) => this.updateImageSource(t, null), this.setImageFromConnector = async (t, e, r) => {
1166
1193
  const n = {
1167
1194
  id: e,
1168
1195
  assetId: r,
1169
- type: zt.connector
1196
+ type: jt.connector
1170
1197
  };
1171
1198
  return this.updateImageSource(t, n);
1172
1199
  }, this.setImageFromUrl = async (t, e) => {
1173
- const r = { url: e, type: zt.url };
1200
+ const r = { url: e, type: jt.url };
1174
1201
  return this.updateImageSource(t, r);
1175
1202
  }, this.setImageFrameFitMode = async (t, e) => (await a(this, d)).setImageFrameFitMode(t, e).then((n) => o(n)), this.setImageFrameFitModePosition = async (t, e) => (await a(this, d)).setImageFrameFitModePosition(t, e).then((n) => o(n)), this.setFrameConstrainProportions = async (t, e) => (console.error("setFrameConstrainProportions is not supported anymore"), o({
1176
1203
  success: !1,
1177
1204
  status: 0,
1178
1205
  error: "setFrameConstrainProportions is not supported anymore",
1179
1206
  parsedData: null
1180
- })), this.setVerticalAlign = async (t, e) => (await a(this, d)).setVerticalAlignment(t, e).then((n) => o(n)), this.setMinCopyfitting = async (t, e) => (await a(this, d)).setMinCopyfitting(t, e).then((n) => o(n)), this.setMaxCopyfitting = async (t, e) => (await a(this, d)).setMaxCopyfitting(t, e).then((n) => o(n)), this.setEnableCopyfitting = async (t, e) => (await a(this, d)).setEnableCopyfitting(t, e).then((n) => o(n)), this.resetMinCopyfitting = async (t) => (await a(this, d)).resetMinCopyfitting(t).then((r) => o(r)), this.resetMaxCopyfitting = async (t) => (await a(this, d)).resetMaxCopyfitting(t).then((r) => o(r)), this.resetEnableCopyfitting = async (t) => (await a(this, d)).resetEnableCopyfitting(t).then((r) => o(r)), this.setShapeFrameEnableFill = async (t, e) => this.shapeController.setEnableFill(t, e), this.setShapeFrameFillColor = async (t, e) => this.shapeController.setFillColor(t, e), this.setShapeFrameEnableStroke = async (t, e) => this.shapeController.setEnableStroke(t, e), this.setShapeFrameStrokeColor = async (t, e) => this.shapeController.setStrokeColor(t, e), this.setShapeFrameStrokeWeight = async (t, e) => this.shapeController.setStrokeWeight(t, e), this.setBlendMode = async (t, e) => (await a(this, d)).setFrameBlendMode(t, e).then((n) => o(n)), this.enterCropMode = async (t, e = Cs.frameCrop) => (await a(this, d)).enterCropMode(t, e).then((n) => o(n)), this.applyCropMode = async () => (await a(this, d)).applyCropMode().then((e) => o(e)), this.exitCropMode = async () => (await a(this, d)).cancelCropMode().then((e) => o(e)), this.enterSubjectMode = async (t) => (await a(this, d)).enterSubjectMode(t).then((r) => o(r)), this.applySubjectMode = async () => (await a(this, d)).applySubjectMode().then((e) => o(e)), this.exitSubjectMode = async () => (await a(this, d)).cancelSubjectMode().then((e) => o(e)), this.resetCropMode = async (t) => (console.error("resetCropMode is not supported anymore"), o({
1207
+ })), this.setVerticalAlign = async (t, e) => (await a(this, d)).setVerticalAlignment(t, e).then((n) => o(n)), this.setMinCopyfitting = async (t, e) => (await a(this, d)).setMinCopyfitting(t, e).then((n) => o(n)), this.setMaxCopyfitting = async (t, e) => (await a(this, d)).setMaxCopyfitting(t, e).then((n) => o(n)), this.setEnableCopyfitting = async (t, e) => (await a(this, d)).setEnableCopyfitting(t, e).then((n) => o(n)), this.resetMinCopyfitting = async (t) => (await a(this, d)).resetMinCopyfitting(t).then((r) => o(r)), this.resetMaxCopyfitting = async (t) => (await a(this, d)).resetMaxCopyfitting(t).then((r) => o(r)), this.resetEnableCopyfitting = async (t) => (await a(this, d)).resetEnableCopyfitting(t).then((r) => o(r)), this.setShapeFrameEnableFill = async (t, e) => this.shapeController.setEnableFill(t, e), this.setShapeFrameFillColor = async (t, e) => this.shapeController.setFillColor(t, e), this.setShapeFrameEnableStroke = async (t, e) => this.shapeController.setEnableStroke(t, e), this.setShapeFrameStrokeColor = async (t, e) => this.shapeController.setStrokeColor(t, e), this.setShapeFrameStrokeWeight = async (t, e) => this.shapeController.setStrokeWeight(t, e), this.setBlendMode = async (t, e) => (await a(this, d)).setFrameBlendMode(t, e).then((n) => o(n)), this.enterCropMode = async (t, e = ws.frameCrop) => (await a(this, d)).enterCropMode(t, e).then((n) => o(n)), this.applyCropMode = async () => (await a(this, d)).applyCropMode().then((e) => o(e)), this.exitCropMode = async () => (await a(this, d)).cancelCropMode().then((e) => o(e)), this.enterSubjectMode = async (t) => (await a(this, d)).enterSubjectMode(t).then((r) => o(r)), this.applySubjectMode = async () => (await a(this, d)).applySubjectMode().then((e) => o(e)), this.exitSubjectMode = async () => (await a(this, d)).cancelSubjectMode().then((e) => o(e)), this.resetCropMode = async (t) => (console.error("resetCropMode is not supported anymore"), o({
1181
1208
  success: !1,
1182
1209
  status: 0,
1183
1210
  error: "resetCropMode is not supported anymore",
@@ -1236,24 +1263,24 @@ class Ke {
1236
1263
  error: "resetAutoGrow is not supported anymore",
1237
1264
  parsedData: null
1238
1265
  })), this.setAnchor = async (t, e, r, n, c) => {
1239
- const h = {
1266
+ const l = {
1240
1267
  horizontal: e,
1241
1268
  type: r,
1242
1269
  target: n,
1243
1270
  endTarget: c
1244
1271
  };
1245
- return (await a(this, d)).setAnchorProperties(t, JSON.stringify(h)).then((y) => o(y));
1246
- }, this.setVerticalAnchor = async (t, e, r, n) => this.setAnchor(t, !1, e, r, n), this.setHorizontalAnchor = async (t, e, r, n) => this.setAnchor(t, !0, e, r, n), this.resetAnchoring = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.resetVisibility = async (t) => (await a(this, d)).setFrameIsVisible(t, null).then((r) => o(r)), this.getConfiguration = async (t) => (await a(this, d)).getFrameConfiguration(t).then((r) => o(r)), this.resetAssetCropOverride = async (t) => (await a(this, d)).resetAssetCropOverride(t).then((r) => o(r)), this.resetAllAssetCropOverrides = async (t) => (await a(this, d)).resetAllAssetCropOverrides(t).then((r) => o(r)), g(this, d, i), this.shapeController = new ee(a(this, d));
1272
+ return (await a(this, d)).setAnchorProperties(t, JSON.stringify(l)).then((y) => o(y));
1273
+ }, this.setVerticalAnchor = async (t, e, r, n) => this.setAnchor(t, !1, e, r, n), this.setHorizontalAnchor = async (t, e, r, n) => this.setAnchor(t, !0, e, r, n), this.resetAnchoring = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.resetVisibility = async (t) => (await a(this, d)).setFrameIsVisible(t, null).then((r) => o(r)), this.getConfiguration = async (t) => (await a(this, d)).getFrameConfiguration(t).then((r) => o(r)), this.resetAssetCropOverride = async (t) => (await a(this, d)).resetAssetCropOverride(t).then((r) => o(r)), this.resetAllAssetCropOverrides = async (t) => (await a(this, d)).resetAllAssetCropOverrides(t).then((r) => o(r)), g(this, d, i), this.shapeController = new ne(a(this, d));
1247
1274
  }
1248
1275
  }
1249
1276
  d = new WeakMap();
1250
- class ze {
1277
+ class je {
1251
1278
  constructor() {
1252
- this.currentEngineVersion = cs.current, this.currentSDKVersion = hs.version;
1279
+ this.currentEngineVersion = ls.current, this.currentSDKVersion = ds.version;
1253
1280
  }
1254
1281
  }
1255
- var w, Tt;
1256
- class We {
1282
+ var w, Gt;
1283
+ class qe {
1257
1284
  /**
1258
1285
  * @ignore
1259
1286
  */
@@ -1262,27 +1289,27 @@ class We {
1262
1289
  * @ignore
1263
1290
  */
1264
1291
  u(this, w);
1265
- u(this, Tt);
1292
+ u(this, Gt);
1266
1293
  this.getAll = async () => (await a(this, w)).getLayouts().then((e) => o(e)), this.getById = async (t) => (await a(this, w)).getLayoutById(t).then((r) => o(r)), this.getByName = async (t) => (await a(this, w)).getLayoutByName(t).then((r) => o(r)), this.getSelected = async () => (await a(this, w)).getSelectedLayout().then((e) => o(e)), this.remove = async (t) => (await a(this, w)).removeLayout(t).then((r) => o(r)), this.create = async (t, e) => {
1267
1294
  const r = await a(this, w);
1268
1295
  return e != null && e.length ? r.addLayouts(t, JSON.stringify(e)).then((n) => o(n)) : r.addLayout(t).then((n) => o(n));
1269
- }, this.rename = async (t, e) => (await a(this, w)).renameLayout(t, e).then((n) => o(n)), this.select = async (t) => (await a(this, w)).selectLayout(t).then((r) => o(r)), this.duplicate = async (t) => (await a(this, w)).duplicateLayout(t).then((r) => o(r)), this.reset = async (t) => (await a(this, w)).resetLayout(t).then((r) => o(r)), this.setHeight = async (t, e) => (await a(this, w)).setLayoutHeight(t, e).then((n) => o(n)), this.setWidth = async (t, e) => (await a(this, w)).setLayoutWidth(t, e).then((n) => o(n)), this.setUnit = async (t, e) => (await a(this, w)).setLayoutUnit(t, e).then((n) => o(n)), this.resetHeight = async (t) => (await a(this, w)).resetLayoutHeight(t).then((r) => o(r)), this.resetWidth = async (t) => (await a(this, w)).resetLayoutWidth(t).then((r) => o(r)), this.resetUnit = async (t) => (await a(this, w)).resetLayoutUnit(t).then((r) => o(r)), this.getSelectedSnapshot = async () => (await a(this, Tt)).getPageSnapshot().then((e) => e ?? e), this.setIntent = async (t, e) => (await a(this, w)).setLayoutIntent(t, e).then((n) => o(n)), this.resetIntent = async (t) => (await a(this, w)).resetLayoutIntent(t).then((r) => o(r)), this.setFillColor = async (t, e) => (await a(this, w)).setLayoutFillColor(t, JSON.stringify(e)).then((n) => o(n)), this.setFillColorEnabled = async (t, e) => (await a(this, w)).setLayoutFillColorEnabled(t, e).then((n) => o(n)), this.resetFillColor = async (t) => (await a(this, w)).resetLayoutFillColor(t).then((r) => o(r)), this.setBleedValue = async (t, e, r) => {
1296
+ }, this.rename = async (t, e) => (await a(this, w)).renameLayout(t, e).then((n) => o(n)), this.select = async (t) => (await a(this, w)).selectLayout(t).then((r) => o(r)), this.duplicate = async (t) => (await a(this, w)).duplicateLayout(t).then((r) => o(r)), this.reset = async (t) => (await a(this, w)).resetLayout(t).then((r) => o(r)), this.setHeight = async (t, e) => (await a(this, w)).setLayoutHeight(t, e).then((n) => o(n)), this.setWidth = async (t, e) => (await a(this, w)).setLayoutWidth(t, e).then((n) => o(n)), this.setUnit = async (t, e) => (await a(this, w)).setLayoutUnit(t, e).then((n) => o(n)), this.resetHeight = async (t) => (await a(this, w)).resetLayoutHeight(t).then((r) => o(r)), this.resetWidth = async (t) => (await a(this, w)).resetLayoutWidth(t).then((r) => o(r)), this.resetUnit = async (t) => (await a(this, w)).resetLayoutUnit(t).then((r) => o(r)), this.getSelectedSnapshot = async () => (await a(this, Gt)).getPageSnapshot().then((e) => e ?? e), this.setIntent = async (t, e) => (await a(this, w)).setLayoutIntent(t, e).then((n) => o(n)), this.resetIntent = async (t) => (await a(this, w)).resetLayoutIntent(t).then((r) => o(r)), this.setFillColor = async (t, e) => (await a(this, w)).setLayoutFillColor(t, JSON.stringify(e)).then((n) => o(n)), this.setFillColorEnabled = async (t, e) => (await a(this, w)).setLayoutFillColorEnabled(t, e).then((n) => o(n)), this.resetFillColor = async (t) => (await a(this, w)).resetLayoutFillColor(t).then((r) => o(r)), this.setBleedValue = async (t, e, r) => {
1270
1297
  const n = r ? {
1271
1298
  left: r === Y.left ? e : void 0,
1272
1299
  top: r === Y.top ? e : void 0,
1273
1300
  right: r === Y.right ? e : void 0,
1274
1301
  bottom: r === Y.bottom ? e : void 0
1275
1302
  } : { left: e, top: e, right: e, bottom: e };
1276
- return (await a(this, w)).updateLayoutBleed(t, JSON.stringify(n)).then((h) => o(h));
1303
+ return (await a(this, w)).updateLayoutBleed(t, JSON.stringify(n)).then((l) => o(l));
1277
1304
  }, this.setAreBleedValuesCombined = async (t, e) => {
1278
1305
  const r = { areBleedValuesCombined: e };
1279
1306
  return (await a(this, w)).updateLayoutBleed(t, JSON.stringify(r)).then((c) => o(c));
1280
- }, this.resetBleedValues = async (t) => (await a(this, w)).updateLayoutBleed(t, null).then((r) => o(r)), this.setPrivateData = async (t, e) => (await a(this, w)).setLayoutPrivateData(t, JSON.stringify(e)).then((n) => o(n)), this.getPrivateData = async (t) => (await a(this, w)).getLayoutPrivateData(t).then((r) => o(r)), this.setDisplayName = async (t, e) => (await a(this, w)).setLayoutDisplayName(t, e).then((n) => o(n)), this.getDisplayName = async (t) => (await a(this, w)).getLayoutDisplayName(t).then((r) => o(r)), this.resetDisplayName = async (t) => (await a(this, w)).setLayoutDisplayName(t, null).then((r) => o(r)), this.setAvailableForUser = async (t, e) => (await a(this, w)).setLayoutAvailableForUser(t, e).then((n) => o(n)), this.setSelectedByUser = async (t, e) => (await a(this, w)).setLayoutSelectedByUser(t, e).then((n) => o(n)), this.setResizableByUser = async (t, e) => (await a(this, w)).setLayoutResizableByUser(t, JSON.stringify(e)).then((n) => o(n)), g(this, w, i), g(this, Tt, i);
1307
+ }, this.resetBleedValues = async (t) => (await a(this, w)).updateLayoutBleed(t, null).then((r) => o(r)), this.setPrivateData = async (t, e) => (await a(this, w)).setLayoutPrivateData(t, JSON.stringify(e)).then((n) => o(n)), this.getPrivateData = async (t) => (await a(this, w)).getLayoutPrivateData(t).then((r) => o(r)), this.setDisplayName = async (t, e) => (await a(this, w)).setLayoutDisplayName(t, e).then((n) => o(n)), this.getDisplayName = async (t) => (await a(this, w)).getLayoutDisplayName(t).then((r) => o(r)), this.resetDisplayName = async (t) => (await a(this, w)).setLayoutDisplayName(t, null).then((r) => o(r)), this.setAvailableForUser = async (t, e) => (await a(this, w)).setLayoutAvailableForUser(t, e).then((n) => o(n)), this.setSelectedByUser = async (t, e) => (await a(this, w)).setLayoutSelectedByUser(t, e).then((n) => o(n)), this.setResizableByUser = async (t, e) => (await a(this, w)).setLayoutResizableByUser(t, JSON.stringify(e)).then((n) => o(n)), g(this, w, i), g(this, Gt, i);
1281
1308
  }
1282
1309
  }
1283
- w = new WeakMap(), Tt = new WeakMap();
1284
- var se = /* @__PURE__ */ ((s) => (s.thumbnail = "thumbnail", s.mediumres = "mediumres", s.highres = "highres", s.original = "original", s))(se || {}), ms = /* @__PURE__ */ ((s) => (s.web = "web", s.print = "print", s.animation = "animation", s))(ms || {}), W, Gt;
1285
- class qe {
1310
+ w = new WeakMap(), Gt = new WeakMap();
1311
+ var ae = /* @__PURE__ */ ((s) => (s.thumbnail = "thumbnail", s.mediumres = "mediumres", s.highres = "highres", s.original = "original", s))(ae || {}), fs = /* @__PURE__ */ ((s) => (s.web = "web", s.print = "print", s.animation = "animation", s))(fs || {}), W, Tt;
1312
+ class Ye {
1286
1313
  /**
1287
1314
  * @ignore
1288
1315
  */
@@ -1291,22 +1318,26 @@ class qe {
1291
1318
  * @ignore
1292
1319
  */
1293
1320
  u(this, W);
1294
- u(this, Gt);
1321
+ u(this, Tt);
1295
1322
  this.query = async (t, e, r = {}) => (await a(this, W)).mediaConnectorQuery(t, JSON.stringify(e), JSON.stringify(r)).then((c) => o(c)), this.detail = async (t, e, r = {}) => (await a(this, W)).mediaConnectorDetail(t, e, JSON.stringify(r)).then((c) => o(c)), this.download = async (t, e, r, n = {}) => {
1296
1323
  const c = this.parseDeprecatedMediaDownloadType(
1297
1324
  r
1298
1325
  );
1299
- return (await a(this, Gt)).mediaConnectorDownload(
1326
+ return (await a(this, Tt)).mediaConnectorDownload(
1300
1327
  t,
1301
1328
  e,
1302
1329
  c,
1303
- ms.web,
1330
+ fs.web,
1304
1331
  JSON.stringify(n)
1305
- ).then((l) => l ?? l);
1332
+ ).then((h) => {
1333
+ if (h instanceof Uint8Array)
1334
+ return h;
1335
+ throw typeof h == "object" && h !== null && "success" in h && !h.success && Cs(h), new Error(`Unexpected response type: ${typeof h}.`);
1336
+ });
1306
1337
  }, this.getConfigurationOptions = async (t) => (await a(this, W)).mediaConnectorGetConfigurationOptions(t).then((r) => o(r)), this.getCapabilities = async (t) => (await a(this, W)).mediaConnectorGetCapabilities(t).then((r) => o(r)), this.parseDeprecatedMediaType = (t) => {
1307
1338
  if (t === Rt.file) return Vt.file;
1308
1339
  if (t === Rt.collection) return Vt.collection;
1309
- }, this.upload = async (t, e, r = {}) => (await a(this, W)).mediaConnectorUpload(t, JSON.stringify(e), JSON.stringify(r)).then((c) => o(c)), g(this, W, i), g(this, Gt, i);
1340
+ }, this.upload = async (t, e, r = {}) => (await a(this, W)).mediaConnectorUpload(t, JSON.stringify(e), JSON.stringify(r)).then((c) => o(c)), g(this, W, i), g(this, Tt, i);
1310
1341
  }
1311
1342
  /**
1312
1343
  * This method will parse the deprecatedMediaDownloadType to the new media download type.
@@ -1316,18 +1347,18 @@ class qe {
1316
1347
  */
1317
1348
  parseDeprecatedMediaDownloadType(i) {
1318
1349
  switch (i) {
1319
- case Xt.HighResolutionWeb:
1320
- return se.highres;
1321
- case Xt.LowResolutionWeb:
1322
- return se.thumbnail;
1350
+ case se.HighResolutionWeb:
1351
+ return ae.highres;
1352
+ case se.LowResolutionWeb:
1353
+ return ae.thumbnail;
1323
1354
  default:
1324
1355
  return i;
1325
1356
  }
1326
1357
  }
1327
1358
  }
1328
- W = new WeakMap(), Gt = new WeakMap();
1329
- var F, Ht, is;
1330
- let je = (is = class {
1359
+ W = new WeakMap(), Tt = new WeakMap();
1360
+ var E, Ht, cs;
1361
+ let Ze = (cs = class {
1331
1362
  /**
1332
1363
  * @ignore
1333
1364
  */
@@ -1335,16 +1366,16 @@ let je = (is = class {
1335
1366
  /**
1336
1367
  * @ignore
1337
1368
  */
1338
- u(this, F);
1369
+ u(this, E);
1339
1370
  /**
1340
1371
  * @ignore
1341
1372
  */
1342
1373
  u(this, Ht);
1343
- this.add = async () => (await a(this, F)).addPage().then((e) => o(e)), this.remove = async (t) => (await a(this, F)).removePage(t).then((r) => o(r)), this.select = async (t) => (await a(this, F)).selectPage(t).then((r) => o(r)), this.setVisibility = async (t, e) => (await a(this, F)).setPageIsVisible(t, e).then((n) => o(n)), this.duplicate = async (t) => (await a(this, F)).duplicatePage(t).then((r) => o(r)), this.getAll = async () => (await a(this, F)).getPages().then((e) => o(e)), this.getById = async (t) => (await a(this, F)).getPageById(t).then((r) => o(r)), this.getSnapshot = async (t, e) => (await a(this, Ht)).getPageSnapshotWithSettings(t, e == null ? null : JSON.stringify(e)).then((n) => n ?? n), this.setWidth = async (t, e) => (t !== void 0 && console.warn("pageId has no effect since all pages are being updated simultaneously."), (await a(this, F)).setPageWidth(e).then((n) => o(n))), this.setHeight = async (t, e) => (t !== void 0 && console.warn("pageId has no effect since all pages are being updated simultaneously."), (await a(this, F)).setPageHeight(e).then((n) => o(n))), this.setSize = async (t, e) => (await a(this, F)).setPageSize(t, e).then((n) => o(n)), this.move = async (t, e) => (await a(this, F)).reorderPages(t, e).then((n) => o(n)), g(this, F, i), g(this, Ht, i);
1374
+ this.add = async () => (await a(this, E)).addPage().then((e) => o(e)), this.remove = async (t) => (await a(this, E)).removePage(t).then((r) => o(r)), this.select = async (t) => (await a(this, E)).selectPage(t).then((r) => o(r)), this.setVisibility = async (t, e) => (await a(this, E)).setPageIsVisible(t, e).then((n) => o(n)), this.duplicate = async (t) => (await a(this, E)).duplicatePage(t).then((r) => o(r)), this.getAll = async () => (await a(this, E)).getPages().then((e) => o(e)), this.getById = async (t) => (await a(this, E)).getPageById(t).then((r) => o(r)), this.getSnapshot = async (t, e) => (await a(this, Ht)).getPageSnapshotWithSettings(t, e == null ? null : JSON.stringify(e)).then((n) => n ?? n), this.setWidth = async (t, e) => (t !== void 0 && console.warn("pageId has no effect since all pages are being updated simultaneously."), (await a(this, E)).setPageWidth(e).then((n) => o(n))), this.setHeight = async (t, e) => (t !== void 0 && console.warn("pageId has no effect since all pages are being updated simultaneously."), (await a(this, E)).setPageHeight(e).then((n) => o(n))), this.setSize = async (t, e) => (await a(this, E)).setPageSize(t, e).then((n) => o(n)), this.move = async (t, e) => (await a(this, E)).reorderPages(t, e).then((n) => o(n)), g(this, E, i), g(this, Ht, i);
1344
1375
  }
1345
- }, F = new WeakMap(), Ht = new WeakMap(), is);
1346
- var U;
1347
- class Ye {
1376
+ }, E = new WeakMap(), Ht = new WeakMap(), cs);
1377
+ var J;
1378
+ class Qe {
1348
1379
  /**
1349
1380
  * @ignore
1350
1381
  */
@@ -1352,24 +1383,24 @@ class Ye {
1352
1383
  /**
1353
1384
  * @ignore
1354
1385
  */
1355
- u(this, U);
1356
- this.getAll = async () => (await a(this, U)).getParagraphStyles().then((e) => o(e)), this.getById = async (t) => (await a(this, U)).getParagraphStyleById(t).then((r) => o(r)), this.create = async () => (await a(this, U)).createParagraphStyle().then((e) => o(e)), this.duplicate = async (t) => (await a(this, U)).duplicateParagraphStyle(t).then((r) => o(r)), this.update = async (t, e) => (await a(this, U)).updateParagraphStyle(t, JSON.stringify(e)).then((n) => o(n)), this.rename = async (t, e) => (await a(this, U)).renameParagraphStyle(t, e).then((n) => o(n)), this.remove = async (t) => (await a(this, U)).removeParagraphStyle(t).then((r) => o(r)), this.move = async (t, e) => (await a(this, U)).moveParagraphStyles(t, e).then((n) => o(n)), g(this, U, i);
1386
+ u(this, J);
1387
+ this.getAll = async () => (await a(this, J)).getParagraphStyles().then((e) => o(e)), this.getById = async (t) => (await a(this, J)).getParagraphStyleById(t).then((r) => o(r)), this.create = async () => (await a(this, J)).createParagraphStyle().then((e) => o(e)), this.duplicate = async (t) => (await a(this, J)).duplicateParagraphStyle(t).then((r) => o(r)), this.update = async (t, e) => (await a(this, J)).updateParagraphStyle(t, JSON.stringify(e)).then((n) => o(n)), this.rename = async (t, e) => (await a(this, J)).renameParagraphStyle(t, e).then((n) => o(n)), this.remove = async (t) => (await a(this, J)).removeParagraphStyle(t).then((r) => o(r)), this.move = async (t, e) => (await a(this, J)).moveParagraphStyles(t, e).then((n) => o(n)), g(this, J, i);
1357
1388
  }
1358
1389
  }
1359
- U = new WeakMap();
1360
- var x = /* @__PURE__ */ ((s) => (s.info = "info", s.warn = "warn", s.error = "error", s))(x || {}), ws = /* @__PURE__ */ ((s) => (s.general = "general", s.connector = "connector", s.event = "event", s.engine = "engine", s))(ws || {}), Bt = /* @__PURE__ */ ((s) => (s.throw = "throw", s.log = "log", s))(Bt || {});
1361
- class Mr {
1390
+ J = new WeakMap();
1391
+ var M = /* @__PURE__ */ ((s) => (s.info = "info", s.warn = "warn", s.error = "error", s))(M || {}), Ss = /* @__PURE__ */ ((s) => (s.general = "general", s.connector = "connector", s.event = "event", s.engine = "engine", s))(Ss || {}), Bt = /* @__PURE__ */ ((s) => (s.throw = "throw", s.log = "log", s))(Bt || {});
1392
+ class Vr {
1362
1393
  constructor(i, t, e, r) {
1363
1394
  this.type = "action", this.message = i, this.id = t, this.event = e, this.eventChain = r;
1364
1395
  }
1365
1396
  }
1366
- class xr {
1397
+ class Br {
1367
1398
  constructor(i, t, e) {
1368
1399
  this.type = "dataRow", this.count = i, this.message = t, this.exceptions = e;
1369
1400
  }
1370
1401
  }
1371
- var ae = /* @__PURE__ */ ((s) => (s.shortText = "shortText", s.longText = "longText", s.image = "image", s.list = "list", s.boolean = "boolean", s.group = "group", s.number = "number", s.date = "date", s))(ae || {}), Rr = /* @__PURE__ */ ((s) => (s.Monday = "monday", s.Tuesday = "tuesday", s.Wednesday = "wednesday", s.Thursday = "thursday", s.Friday = "friday", s.Saturday = "saturday", s.Sunday = "sunday", s))(Rr || {}), Vr = /* @__PURE__ */ ((s) => (s.en_US = "en_US", s.cs = "cs", s.da = "da", s.nl = "nl", s.fi = "fi", s.fr = "fr", s.de = "de", s.it = "it", s.no = "no", s.pl = "pl", s.pt_PT = "pt_PT", s.es_ES = "es_ES", s.sv = "sv", s))(Vr || {}), Mt = /* @__PURE__ */ ((s) => (s.visible = "visible", s.invisible = "invisible", s.conditional = "conditional", s))(Mt || {}), Br = /* @__PURE__ */ ((s) => (s.boolean = "boolean", s.text = "text", s.number = "number", s))(Br || {}), Jr = /* @__PURE__ */ ((s) => (s.equals = "=", s.notEquals = "!=", s.greaterThan = ">", s.greaterThanOrEquals = ">=", s.lessThan = "<", s.lessThanOrEquals = "<=", s))(Jr || {});
1372
- let Ur = class {
1402
+ var ce = /* @__PURE__ */ ((s) => (s.shortText = "shortText", s.longText = "longText", s.image = "image", s.list = "list", s.boolean = "boolean", s.group = "group", s.number = "number", s.date = "date", s))(ce || {}), kr = /* @__PURE__ */ ((s) => (s.Monday = "monday", s.Tuesday = "tuesday", s.Wednesday = "wednesday", s.Thursday = "thursday", s.Friday = "friday", s.Saturday = "saturday", s.Sunday = "sunday", s))(kr || {}), Jr = /* @__PURE__ */ ((s) => (s.en_US = "en_US", s.cs = "cs", s.da = "da", s.nl = "nl", s.fi = "fi", s.fr = "fr", s.de = "de", s.it = "it", s.no = "no", s.pl = "pl", s.pt_PT = "pt_PT", s.es_ES = "es_ES", s.sv = "sv", s))(Jr || {}), xt = /* @__PURE__ */ ((s) => (s.visible = "visible", s.invisible = "invisible", s.conditional = "conditional", s))(xt || {}), Ur = /* @__PURE__ */ ((s) => (s.boolean = "boolean", s.text = "text", s.number = "number", s))(Ur || {}), Gr = /* @__PURE__ */ ((s) => (s.equals = "=", s.notEquals = "!=", s.greaterThan = ">", s.greaterThanOrEquals = ">=", s.lessThan = "<", s.lessThanOrEquals = "<=", s))(Gr || {});
1403
+ let Tr = class {
1373
1404
  /**
1374
1405
  * @ignore
1375
1406
  */
@@ -1412,13 +1443,13 @@ let Ur = class {
1412
1443
  }, this.onVariableListChanged = (e) => {
1413
1444
  const n = JSON.parse(e).map(
1414
1445
  (c) => {
1415
- var h;
1416
- return c.type === ae.list ? {
1446
+ var l;
1447
+ return c.type === ce.list ? {
1417
1448
  ...c,
1418
1449
  items: c.items.map(
1419
- (l) => l.value
1450
+ (h) => h.value
1420
1451
  ),
1421
- selected: (h = c.selected) == null ? void 0 : h.value
1452
+ selected: (l = c.selected) == null ? void 0 : l.value
1422
1453
  } : c;
1423
1454
  }
1424
1455
  );
@@ -1450,7 +1481,7 @@ let Ur = class {
1450
1481
  }, this.onConnectorEvent = (e) => {
1451
1482
  this.config.events.onConnectorEvent.trigger(JSON.parse(e));
1452
1483
  }, this.onConnectorsChanged = (e) => {
1453
- const n = new ne().makeMultipleConnectorsBackwardsCompatible(
1484
+ const n = new oe().makeMultipleConnectorsBackwardsCompatible(
1454
1485
  JSON.parse(e),
1455
1486
  this.localConfig.get(Z.GraFxStudioEnvironmentApiUrl)
1456
1487
  );
@@ -1470,14 +1501,14 @@ let Ur = class {
1470
1501
  }, this.onAsyncError = (e) => {
1471
1502
  const r = JSON.parse(e);
1472
1503
  if ((r == null ? void 0 : r.type) === "dataRow") {
1473
- const n = new xr(
1504
+ const n = new Br(
1474
1505
  r.count,
1475
1506
  r.message,
1476
1507
  r.exceptions
1477
1508
  );
1478
1509
  this.config.events.onAsyncError.trigger(n);
1479
1510
  } else if ((r == null ? void 0 : r.type) === "action") {
1480
- const n = new Mr(
1511
+ const n = new Vr(
1481
1512
  r.message,
1482
1513
  r.id,
1483
1514
  r.event,
@@ -1502,7 +1533,7 @@ let Ur = class {
1502
1533
  }
1503
1534
  };
1504
1535
  var yt;
1505
- class Ze {
1536
+ class Xe {
1506
1537
  /**
1507
1538
  * @ignore
1508
1539
  */
@@ -1515,8 +1546,8 @@ class Ze {
1515
1546
  }
1516
1547
  }
1517
1548
  yt = new WeakMap();
1518
- var kr = /* @__PURE__ */ ((s) => (s.FRAME_X = "frameX", s.FRAME_Y = "frameY", s.WIDTH = "width", s.HEIGHT = "height", s.FRAME_ROTATION = "frameRotation", s))(kr || {}), Tr = /* @__PURE__ */ ((s) => (s.LAYOUT_HEIGHT = "layoutHeight", s.LAYOUT_WIDTH = "layoutWidth", s.BLEED_TOP = "bleedTop", s.BLEED_BOTTOM = "bleedBottom", s.BLEED_LEFT = "bleedLeft", s.BLEED_RIGHT = "bleedRight", s.BLEED_VALUES_COMBINED = "areBleedValuesCombined", s))(Tr || {}), H = /* @__PURE__ */ ((s) => (s.SELECT = "select", s.ZOOM = "zoom", s.HAND = "hand", s.IMAGE_FRAME = "imageFrame", s.TEXT_FRAME = "textFrame", s.SHAPE_RECT = "rect", s.SHAPE_ELLIPSE = "ellipse", s.SHAPE_POLYGON = "polygon", s))(H || {}), Gr = /* @__PURE__ */ ((s) => (s.MP4 = "mp4", s.GIF = "gif", s.PNG = "png", s.JPG = "jpg", s.PDF = "pdf", s))(Gr || {}), re = /* @__PURE__ */ ((s) => (s.SANDBOX = "sandbox", s.PRODUCTION = "online", s))(re || {}), vt;
1519
- class Qe {
1549
+ var Hr = /* @__PURE__ */ ((s) => (s.FRAME_X = "frameX", s.FRAME_Y = "frameY", s.WIDTH = "width", s.HEIGHT = "height", s.FRAME_ROTATION = "frameRotation", s))(Hr || {}), _r = /* @__PURE__ */ ((s) => (s.LAYOUT_HEIGHT = "layoutHeight", s.LAYOUT_WIDTH = "layoutWidth", s.BLEED_TOP = "bleedTop", s.BLEED_BOTTOM = "bleedBottom", s.BLEED_LEFT = "bleedLeft", s.BLEED_RIGHT = "bleedRight", s.BLEED_VALUES_COMBINED = "areBleedValuesCombined", s))(_r || {}), H = /* @__PURE__ */ ((s) => (s.SELECT = "select", s.ZOOM = "zoom", s.HAND = "hand", s.IMAGE_FRAME = "imageFrame", s.TEXT_FRAME = "textFrame", s.SHAPE_RECT = "rect", s.SHAPE_ELLIPSE = "ellipse", s.SHAPE_POLYGON = "polygon", s))(H || {}), $r = /* @__PURE__ */ ((s) => (s.MP4 = "mp4", s.GIF = "gif", s.PNG = "png", s.JPG = "jpg", s.PDF = "pdf", s))($r || {}), ie = /* @__PURE__ */ ((s) => (s.SANDBOX = "sandbox", s.PRODUCTION = "online", s))(ie || {}), vt;
1550
+ class ts {
1520
1551
  /**
1521
1552
  * @ignore
1522
1553
  */
@@ -1529,8 +1560,8 @@ class Qe {
1529
1560
  }
1530
1561
  }
1531
1562
  vt = new WeakMap();
1532
- var q, pt, _t;
1533
- class Xe {
1563
+ var j, pt, _t;
1564
+ class es {
1534
1565
  /**
1535
1566
  * @ignore
1536
1567
  */
@@ -1538,21 +1569,21 @@ class Xe {
1538
1569
  /**
1539
1570
  * @ignore
1540
1571
  */
1541
- u(this, q);
1572
+ u(this, j);
1542
1573
  u(this, pt);
1543
1574
  u(this, _t);
1544
- this.undo = async () => (await a(this, q)).undo().then((r) => o(r)), this.redo = async () => (await a(this, q)).redo().then((r) => o(r)), this.addCustomData = async (e, r) => (await a(this, q)).setCustomUndoData(e, r, !1).then((c) => o(c)), this.record = async (e, r) => {
1575
+ this.undo = async () => (await a(this, j)).undo().then((r) => o(r)), this.redo = async () => (await a(this, j)).redo().then((r) => o(r)), this.addCustomData = async (e, r) => (await a(this, j)).setCustomUndoData(e, r, !1).then((c) => o(c)), this.record = async (e, r) => {
1545
1576
  try {
1546
1577
  await a(this, pt).beginIfNoneActive(e), await r(a(this, _t)), await a(this, pt).end();
1547
1578
  } catch (n) {
1548
1579
  throw await a(this, pt).abort(), n;
1549
1580
  }
1550
- }, this.pause = async () => (await a(this, q)).pause().then((r) => o(r)), this.resume = async () => (await a(this, q)).resume().then((r) => o(r)), g(this, q, i), g(this, _t, t), g(this, pt, new Hr(i));
1581
+ }, this.pause = async () => (await a(this, j)).pause().then((r) => o(r)), this.resume = async () => (await a(this, j)).resume().then((r) => o(r)), g(this, j, i), g(this, _t, t), g(this, pt, new Kr(i));
1551
1582
  }
1552
1583
  }
1553
- q = new WeakMap(), pt = new WeakMap(), _t = new WeakMap();
1584
+ j = new WeakMap(), pt = new WeakMap(), _t = new WeakMap();
1554
1585
  var at;
1555
- class Hr {
1586
+ class Kr {
1556
1587
  /**
1557
1588
  * @ignore
1558
1589
  */
@@ -1565,65 +1596,72 @@ class Hr {
1565
1596
  }
1566
1597
  }
1567
1598
  at = new WeakMap();
1568
- const _r = (s, i = 2) => {
1599
+ const zr = (s, i = 2) => {
1569
1600
  const t = Math.pow(10, i);
1570
1601
  return Math.round(s * t) / t;
1571
1602
  };
1572
- var Pt;
1573
- class ts {
1574
- constructor(i) {
1575
- u(this, Pt);
1576
- this.round = (t, e) => o({
1577
- data: String(_r(t, e)),
1603
+ var $t, At;
1604
+ class ss {
1605
+ /**
1606
+ * @ignore
1607
+ */
1608
+ constructor(i, t) {
1609
+ /**
1610
+ * @ignore
1611
+ */
1612
+ u(this, $t);
1613
+ u(this, At);
1614
+ this.round = (e, r) => o({
1615
+ data: String(zr(e, r)),
1578
1616
  success: !0,
1579
1617
  status: 200,
1580
1618
  parsedData: null
1581
- }), this.createEnvironmentBaseURL = (t) => {
1582
- const { type: e = re.SANDBOX, environment: r = "ft-nostress", version: n = "1" } = t, c = e == re.SANDBOX ? "chili-publish-sandbox" : "chili-publish";
1583
- return `https://${r}.${c}.online/grafx/api/v${n}/environment/${r}`;
1584
- }, this.stageFiles = async (t, e, r) => {
1585
- const n = a(this, Pt).get(Z.GraFxStudioEnvironmentApiUrl);
1586
- if (!n)
1619
+ }), this.createEnvironmentBaseURL = (e) => {
1620
+ const { type: r = ie.SANDBOX, environment: n = "ft-nostress", version: c = "1" } = e, l = r == ie.SANDBOX ? "chili-publish-sandbox" : "chili-publish";
1621
+ return `https://${n}.${l}.online/grafx/api/v${c}/environment/${n}`;
1622
+ }, this.stageFiles = async (e, r, n) => {
1623
+ const c = a(this, At).get(Z.GraFxStudioEnvironmentApiUrl);
1624
+ if (!c)
1587
1625
  throw new Error("GraFx Studio Environment API URL is not set");
1588
- const c = `${n}connectors/${e}/stage`, h = a(this, Pt).get(Z.GraFxStudioAuthToken);
1626
+ const l = `${c}connectors/${r}/stage`, h = a(this, At).get(Z.GraFxStudioAuthToken);
1589
1627
  if (!h)
1590
1628
  throw new Error("GraFx Studio Auth Token is not set");
1591
- const l = new FormData();
1592
- t.forEach((f, I) => {
1593
- const S = f instanceof File ? f.name : `blob-${I}`;
1594
- l.append("files", f, S);
1595
- }), r && l.append(
1629
+ const y = new FormData();
1630
+ e.forEach((S, f) => {
1631
+ const b = S instanceof File ? S.name : `blob-${f}`;
1632
+ y.append("files", S, b);
1633
+ }), n && y.append(
1596
1634
  "validationJson",
1597
1635
  JSON.stringify({
1598
- allowedMimeTypes: r.mimeTypes,
1636
+ allowedMimeTypes: n.mimeTypes,
1599
1637
  minDimensions: {
1600
- width: r.minWidthPixels,
1601
- height: r.minHeightPixels
1638
+ width: n.minWidthPixels,
1639
+ height: n.minHeightPixels
1602
1640
  }
1603
1641
  })
1604
1642
  );
1605
- const y = await fetch(c, {
1643
+ const p = await fetch(l, {
1606
1644
  method: "POST",
1607
- body: l,
1645
+ body: y,
1608
1646
  headers: {
1609
1647
  Authorization: `Bearer ${h}`
1610
1648
  }
1611
1649
  });
1612
- if (y.status === 422) {
1613
- const f = await y.json();
1614
- throw new mr(f.message, ps.minDimension);
1650
+ if (p.status === 422) {
1651
+ const S = await p.json();
1652
+ throw new Sr(S.message, ms.minDimension);
1615
1653
  }
1616
- if (!y.ok)
1654
+ if (!p.ok)
1617
1655
  throw new Error("Failed to stage files");
1618
- return await y.json();
1619
- }, g(this, Pt, i);
1656
+ return await p.json();
1657
+ }, this.unitEvaluate = async (e, r) => (await a(this, $t)).unitEvaluate(e, r).then((c) => o(c)), g(this, $t, i), g(this, At, t);
1620
1658
  }
1621
1659
  }
1622
- Pt = new WeakMap();
1623
- var $t;
1624
- class $r {
1660
+ $t = new WeakMap(), At = new WeakMap();
1661
+ var Kt;
1662
+ class Wr {
1625
1663
  constructor(i) {
1626
- u(this, $t);
1664
+ u(this, Kt);
1627
1665
  this.setMinimum = async (t, e) => {
1628
1666
  const r = { minValue: { value: e } };
1629
1667
  return this.applyPropertiesUpdate(t, r);
@@ -1648,18 +1686,18 @@ class $r {
1648
1686
  }, this.setNumberOfDecimals = async (t, e) => {
1649
1687
  const r = { numberOfDecimals: { value: e } };
1650
1688
  return this.applyPropertiesUpdate(t, r);
1651
- }, g(this, $t, i);
1689
+ }, g(this, Kt, i);
1652
1690
  }
1653
1691
  async applyPropertiesUpdate(i, t) {
1654
- const r = await (await a(this, $t)).updateNumberVariableProperties(i, JSON.stringify(t));
1692
+ const r = await (await a(this, Kt)).updateNumberVariableProperties(i, JSON.stringify(t));
1655
1693
  return o(r);
1656
1694
  }
1657
1695
  }
1658
- $t = new WeakMap();
1659
- var Kt;
1660
- class Kr {
1696
+ Kt = new WeakMap();
1697
+ var zt;
1698
+ class jr {
1661
1699
  constructor(i) {
1662
- u(this, Kt);
1700
+ u(this, zt);
1663
1701
  this.setDisplayFormat = async (t, e) => {
1664
1702
  const r = { displayFormat: { value: e } };
1665
1703
  return this.applyPropertiesUpdate(t, r);
@@ -1675,16 +1713,16 @@ class Kr {
1675
1713
  }, this.setExcludedDays = async (t, e) => {
1676
1714
  const r = { excludedDays: { value: e } };
1677
1715
  return this.applyPropertiesUpdate(t, r);
1678
- }, g(this, Kt, i);
1716
+ }, g(this, zt, i);
1679
1717
  }
1680
1718
  async applyPropertiesUpdate(i, t) {
1681
- const r = await (await a(this, Kt)).updateDateVariableProperties(i, JSON.stringify(t));
1719
+ const r = await (await a(this, zt)).updateDateVariableProperties(i, JSON.stringify(t));
1682
1720
  return o(r);
1683
1721
  }
1684
1722
  }
1685
- Kt = new WeakMap();
1686
- var m, At, Ft, os;
1687
- let es = (os = class {
1723
+ zt = new WeakMap();
1724
+ var m, Pt, Ft, hs;
1725
+ let rs = (hs = class {
1688
1726
  /**
1689
1727
  * @ignore
1690
1728
  */
@@ -1693,7 +1731,7 @@ let es = (os = class {
1693
1731
  * @ignore
1694
1732
  */
1695
1733
  u(this, m);
1696
- u(this, At);
1734
+ u(this, Pt);
1697
1735
  u(this, Ft);
1698
1736
  this.getAll = async () => (await a(this, m)).getVariables().then((e) => o(e)).then((e) => {
1699
1737
  const r = e;
@@ -1704,18 +1742,18 @@ let es = (os = class {
1704
1742
  }), this.getByName = async (t) => (await a(this, m)).getVariableByName(t).then((r) => o(r)).then((r) => {
1705
1743
  const n = r;
1706
1744
  return n.parsedData && (n.parsedData = this.makeVariableBackwardsCompatible(n.parsedData)), n;
1707
- }), this.create = async (t, e) => (await a(this, m)).addVariable(t, e).then((n) => o(n)), this.remove = async (t) => (await a(this, m)).removeVariables(t).then((r) => o(r)), this.rename = async (t, e) => (await a(this, m)).setVariableName(t, e).then((n) => o(n)), this.setLabel = async (t, e) => (await a(this, m)).setVariableLabel(t, e).then((n) => o(n)), g(this, At, async (t, e) => (await a(this, m)).setVariablePlaceholder(t, e).then((n) => o(n))), this.setPlaceholder = async (t, e) => a(this, At).call(this, t, e), this.resetPlaceholder = async (t) => a(this, At).call(this, t, null), g(this, Ft, async (t, e) => (await a(this, m)).setVariableHelpText(t, e).then((n) => o(n))), this.setHelpText = async (t, e) => a(this, Ft).call(this, t, e), this.resetHelpText = async (t) => a(this, Ft).call(this, t, null), this.setType = async (t, e) => (await a(this, m)).setVariableType(t, e).then((n) => o(n)), this.setListVariable = async (t, e) => (await a(this, m)).setListVariableItems(
1745
+ }), this.create = async (t, e) => (await a(this, m)).addVariable(t, e).then((n) => o(n)), this.remove = async (t) => (await a(this, m)).removeVariables(t).then((r) => o(r)), this.rename = async (t, e) => (await a(this, m)).setVariableName(t, e).then((n) => o(n)), this.setLabel = async (t, e) => (await a(this, m)).setVariableLabel(t, e).then((n) => o(n)), g(this, Pt, async (t, e) => (await a(this, m)).setVariablePlaceholder(t, e).then((n) => o(n))), this.setPlaceholder = async (t, e) => a(this, Pt).call(this, t, e), this.resetPlaceholder = async (t) => a(this, Pt).call(this, t, null), g(this, Ft, async (t, e) => (await a(this, m)).setVariableHelpText(t, e).then((n) => o(n))), this.setHelpText = async (t, e) => a(this, Ft).call(this, t, e), this.resetHelpText = async (t) => a(this, Ft).call(this, t, null), this.setType = async (t, e) => (await a(this, m)).setVariableType(t, e).then((n) => o(n)), this.setListVariable = async (t, e) => (await a(this, m)).setListVariableItems(
1708
1746
  t,
1709
1747
  e.map((n) => JSON.stringify({ value: n }))
1710
1748
  ).then((n) => o(n)), this.setValue = async (t, e) => (await a(this, m)).setVariableValue(t, e).then((n) => o(n)), this.duplicate = async (t) => (await a(this, m)).duplicateVariable(t).then((r) => o(r)), this.groupVariables = async (t, e) => (await a(this, m)).groupVariables(t, e).then((n) => o(n)), this.ungroupVariables = async (t) => (await a(this, m)).ungroupVariable(t).then((r) => o(r)), this.move = async (t, e, r) => (await a(this, m)).moveVariable(e, r, t).then((c) => o(c)), this.moveVariables = async (t, e, r) => (await a(this, m)).moveVariables(e, r, t).then((c) => o(c)), this.setIsVisible = async (t, e) => {
1711
- const r = e ? { type: Mt.visible } : { type: Mt.invisible };
1749
+ const r = e ? { type: xt.visible } : { type: xt.invisible };
1712
1750
  return this.setVariableVisibility(t, r);
1713
1751
  }, this.setIsHidden = async (t, e) => {
1714
- const r = e ? { type: Mt.invisible } : { type: Mt.visible };
1752
+ const r = e ? { type: xt.invisible } : { type: xt.visible };
1715
1753
  return this.setVariableVisibility(t, r);
1716
1754
  }, this.setVariableVisibility = async (t, e) => (await a(this, m)).setVariableVisibility(t, JSON.stringify(e)).then((n) => o(n)), this.setLayoutsForVariableVisibility = async (t) => (await a(this, m)).setLayoutsForVariableVisibility(t ? JSON.stringify(t) : null).then((r) => o(r)), this.setIsRequired = async (t, e) => (await a(this, m)).setVariableIsRequired(t, e).then((n) => o(n)), this.setRemoveParagraphIfEmpty = async (t, e) => (await a(this, m)).setVariableRemoveParagraphIfEmpty(t, e).then((n) => o(n)), this.setIsReadonly = async (t, e) => (await a(this, m)).setVariableIsReadonly(t, e).then((n) => o(n)), this.getImageVariableConnectorId = async (t) => (await a(this, m)).getImageVariableConnectorId(t).then((r) => o(r)), this.setImageVariableConnector = async (t, e) => {
1717
- const r = await a(this, m), c = new ne().makeConnectorSourceForwardsCompatible(e);
1718
- return r.setImageVariableConnector(t, JSON.stringify(c)).then((h) => o(h));
1755
+ const r = await a(this, m), c = new oe().makeConnectorSourceForwardsCompatible(e);
1756
+ return r.setImageVariableConnector(t, JSON.stringify(c)).then((l) => o(l));
1719
1757
  }, this.setImageVariableValueWithContext = async (t, e, r) => (await a(this, m)).setImageVariableValueWithContext(t, e, JSON.stringify(r)).then((c) => o(c)), this.removeSource = async (t) => this.setValue(t, null), this.setPrefix = async (t, e) => {
1720
1758
  const r = { prefix: { value: e } };
1721
1759
  return this.applyPrefixSuffixDeltaUpdate(t, r);
@@ -1728,13 +1766,13 @@ let es = (os = class {
1728
1766
  }, this.setSuffixCharacterStyle = async (t, e) => {
1729
1767
  const r = { suffixCharacterStyleId: { value: e } };
1730
1768
  return this.applyPrefixSuffixDeltaUpdate(t, r);
1731
- }, this.setPrivateData = async (t, e) => (await a(this, m)).setVariablePrivateData(t, JSON.stringify(e)).then((n) => o(n)), this.getPrivateData = async (t) => (await a(this, m)).getVariablePrivateData(t).then((r) => o(r)), this.setAllowImageQuery = async (t, e) => (await a(this, m)).setImageVariableAllowQuery(t, e).then((n) => o(n)), this.setAllowImageUpload = async (t, e) => (await a(this, m)).setImageVariableAllowUpload(t, e).then((n) => o(n)), this.setMinImageUploadSize = async (t, e, r) => (await a(this, m)).setImageVariableUploadMinSize(t, e, r).then((c) => o(c)), g(this, m, i), this.number = new $r(a(this, m)), this.date = new Kr(a(this, m));
1769
+ }, this.setPrivateData = async (t, e) => (await a(this, m)).setVariablePrivateData(t, JSON.stringify(e)).then((n) => o(n)), this.getPrivateData = async (t) => (await a(this, m)).getVariablePrivateData(t).then((r) => o(r)), this.setAllowImageQuery = async (t, e) => (await a(this, m)).setImageVariableAllowQuery(t, e).then((n) => o(n)), this.setAllowImageUpload = async (t, e) => (await a(this, m)).setImageVariableAllowUpload(t, e).then((n) => o(n)), this.setMinImageUploadSize = async (t, e, r) => (await a(this, m)).setImageVariableUploadMinSize(t, e, r).then((c) => o(c)), g(this, m, i), this.number = new Wr(a(this, m)), this.date = new jr(a(this, m));
1732
1770
  }
1733
1771
  makeVariablesBackwardsCompatible(i) {
1734
1772
  return i.map((t) => this.makeVariableBackwardsCompatible(t));
1735
1773
  }
1736
1774
  makeVariableBackwardsCompatible(i) {
1737
- return i.type !== ae.list ? i : this.makeListVariableBackwardsCompatible(i);
1775
+ return i.type !== ce.list ? i : this.makeListVariableBackwardsCompatible(i);
1738
1776
  }
1739
1777
  makeListVariableBackwardsCompatible(i) {
1740
1778
  const t = i, e = i.items, r = i.selected, n = e.map((c) => c.value);
@@ -1744,8 +1782,8 @@ let es = (os = class {
1744
1782
  const r = await (await a(this, m)).updateVariablePrefixSuffixProperties(i, JSON.stringify(t));
1745
1783
  return o(r);
1746
1784
  }
1747
- }, m = new WeakMap(), At = new WeakMap(), Ft = new WeakMap(), os);
1748
- class zr {
1785
+ }, m = new WeakMap(), Pt = new WeakMap(), Ft = new WeakMap(), hs);
1786
+ class qr {
1749
1787
  /**
1750
1788
  * @ignore
1751
1789
  */
@@ -1762,7 +1800,7 @@ class zr {
1762
1800
  }
1763
1801
  }
1764
1802
  var it;
1765
- class Wr {
1803
+ class Yr {
1766
1804
  /**
1767
1805
  * @ignore
1768
1806
  */
@@ -1774,20 +1812,20 @@ class Wr {
1774
1812
  this.getAll = async () => (await a(this, it)).getVariables().then((e) => o(e)), this.getById = async (t) => (await a(this, it)).getVariableById(t).then((r) => o(r)), this.getByName = async (t) => (await a(this, it)).getVariableByName(t).then((r) => o(r)), this.setListVariable = async (t, e) => (await a(this, it)).setListVariableItems(
1775
1813
  t,
1776
1814
  e.map((n) => JSON.stringify(n))
1777
- ).then((n) => o(n)), g(this, it, i), this.image = new qr(i);
1815
+ ).then((n) => o(n)), g(this, it, i), this.image = new Zr(i);
1778
1816
  }
1779
1817
  }
1780
1818
  it = new WeakMap();
1781
- var j;
1782
- class qr {
1819
+ var q;
1820
+ class Zr {
1783
1821
  constructor(i) {
1784
- u(this, j);
1785
- this.setAllowQuery = async (t, e) => (await a(this, j)).setImageVariableAllowQuery(t, e).then((n) => o(n)), this.setAllowUpload = async (t, e) => (await a(this, j)).setImageVariableAllowUpload(t, e).then((n) => o(n)), this.setMinUploadSize = async (t, e, r) => (await a(this, j)).setImageVariableUploadMinSize(t, e, r).then((c) => o(c)), this.setConnector = async (t, e) => (await a(this, j)).setImageVariableConnector(t, JSON.stringify(e)).then((n) => o(n)), this.setConnectorContext = async (t, e) => (await a(this, j)).setImageVariableConnectorContext(t, JSON.stringify(e)).then((n) => o(n)), g(this, j, i);
1822
+ u(this, q);
1823
+ this.setAllowQuery = async (t, e) => (await a(this, q)).setImageVariableAllowQuery(t, e).then((n) => o(n)), this.setAllowUpload = async (t, e) => (await a(this, q)).setImageVariableAllowUpload(t, e).then((n) => o(n)), this.setMinUploadSize = async (t, e, r) => (await a(this, q)).setImageVariableUploadMinSize(t, e, r).then((c) => o(c)), this.setConnector = async (t, e) => (await a(this, q)).setImageVariableConnector(t, JSON.stringify(e)).then((n) => o(n)), this.setConnectorContext = async (t, e) => (await a(this, q)).setImageVariableConnectorContext(t, JSON.stringify(e)).then((n) => o(n)), g(this, q, i);
1786
1824
  }
1787
1825
  }
1788
- j = new WeakMap();
1826
+ q = new WeakMap();
1789
1827
  var Ct;
1790
- class jr {
1828
+ class Qr {
1791
1829
  /**
1792
1830
  * @ignore
1793
1831
  */
@@ -1800,8 +1838,8 @@ class jr {
1800
1838
  }
1801
1839
  }
1802
1840
  Ct = new WeakMap();
1803
- var Et, Wt;
1804
- class Yr {
1841
+ var Et, qt;
1842
+ class Xr {
1805
1843
  /**
1806
1844
  * @ignore
1807
1845
  */
@@ -1813,22 +1851,22 @@ class Yr {
1813
1851
  /**
1814
1852
  * @ignore
1815
1853
  */
1816
- u(this, Wt);
1817
- this.setWidth = async (t) => (await a(this, Et)).setPageWidth(t).then((r) => o(r)), this.setHeight = async (t) => (await a(this, Et)).setPageHeight(t).then((r) => o(r)), g(this, Et, i), g(this, Wt, i);
1854
+ u(this, qt);
1855
+ this.setWidth = async (t) => (await a(this, Et)).setPageWidth(t).then((r) => o(r)), this.setHeight = async (t) => (await a(this, Et)).setPageHeight(t).then((r) => o(r)), g(this, Et, i), g(this, qt, i);
1818
1856
  }
1819
1857
  }
1820
- Et = new WeakMap(), Wt = new WeakMap();
1821
- class ss {
1858
+ Et = new WeakMap(), qt = new WeakMap();
1859
+ class ns {
1822
1860
  /**
1823
1861
  * The next initiator is a split off on SDK level to tag next features
1824
1862
  * The SDK should be configured clientside and it exposes all controllers to work with in other applications
1825
1863
  * @param config The configuration object where the SDK and editor can get configured
1826
1864
  */
1827
1865
  constructor(i, t, e) {
1828
- this.config = i, this.connection = t, this.editorAPI = e, this.subscriber = new zr(i), this.variable = new Wr(this.editorAPI), this.connector = new jr(this.editorAPI), this.page = new Yr(this.editorAPI), this.canvas = new Qt(this.editorAPI);
1866
+ this.config = i, this.connection = t, this.editorAPI = e, this.subscriber = new qr(i), this.variable = new Yr(this.editorAPI), this.connector = new Qr(this.editorAPI), this.page = new Xr(this.editorAPI), this.canvas = new ee(this.editorAPI);
1829
1867
  }
1830
1868
  }
1831
- class fs {
1869
+ class bs {
1832
1870
  constructor(i) {
1833
1871
  this.logger = i;
1834
1872
  }
@@ -1845,12 +1883,12 @@ class fs {
1845
1883
  handleError(i, t, e) {
1846
1884
  var r;
1847
1885
  if (t === Bt.log)
1848
- (r = this.logger) == null || r.call(this, x.error, ws.event, `Error in callback ${e}: ${i}`);
1886
+ (r = this.logger) == null || r.call(this, M.error, Ss.event, `Error in callback ${e}: ${i}`);
1849
1887
  else
1850
1888
  throw i;
1851
1889
  }
1852
1890
  }
1853
- class rs extends fs {
1891
+ class as extends bs {
1854
1892
  constructor(i, t) {
1855
1893
  super(t), this.handler = i;
1856
1894
  }
@@ -1866,7 +1904,7 @@ class rs extends fs {
1866
1904
  return this.createEventHandlerFn(t, Bt.throw)(...i);
1867
1905
  }
1868
1906
  }
1869
- class C extends fs {
1907
+ class C extends bs {
1870
1908
  constructor(i, t) {
1871
1909
  super(t), this.legacyHandler = i, this.subscriptions = /* @__PURE__ */ new Set();
1872
1910
  }
@@ -1899,7 +1937,7 @@ class C extends fs {
1899
1937
  };
1900
1938
  }
1901
1939
  }
1902
- class ie {
1940
+ class he {
1903
1941
  /**
1904
1942
  * Creates a runtime configuration object from the provided configuration object.
1905
1943
  *
@@ -1907,38 +1945,38 @@ class ie {
1907
1945
  * @returns The runtime configuration object.
1908
1946
  */
1909
1947
  static createRuntimeConfig(i) {
1910
- var e, r, n, c, h, l, y, p, f, I, S, b, L, P, N, M, v, $, K, mt, wt, oe, ce, he, le, de, ue, ge, ye, pe, Ce, me, we, fe, Se;
1948
+ var e, r, n, c, l, h, y, p, I, S, f, b, A, v, N, x, P, $, K, mt, wt, le, de, ue, ge, ye, pe, Ce, me, we, fe, Se, be, Ie, ve;
1911
1949
  const t = { ...i };
1912
1950
  return t.logging = {
1913
- logLevel: ((e = i.logging) == null ? void 0 : e.logLevel) || x.error,
1914
- logger: ((r = i.logging) == null ? void 0 : r.logger) || ((Lt, qt, jt) => {
1915
- var be;
1916
- if (ie.isLoggingEnabled(Lt, ((be = t.logging) == null ? void 0 : be.logLevel) ?? x.error))
1951
+ logLevel: ((e = i.logging) == null ? void 0 : e.logLevel) || M.error,
1952
+ logger: ((r = i.logging) == null ? void 0 : r.logger) || ((Lt, Yt, Zt) => {
1953
+ var Ae;
1954
+ if (he.isLoggingEnabled(Lt, ((Ae = t.logging) == null ? void 0 : Ae.logLevel) ?? M.error))
1917
1955
  switch (Lt) {
1918
- case x.error:
1919
- console.error(`[${qt}] [${Lt}] ${jt}`);
1956
+ case M.error:
1957
+ console.error(`[${Yt}] [${Lt}] ${Zt}`);
1920
1958
  break;
1921
- case x.warn:
1922
- console.warn(`[${qt}] [${Lt}] ${jt}`);
1959
+ case M.warn:
1960
+ console.warn(`[${Yt}] [${Lt}] ${Zt}`);
1923
1961
  break;
1924
1962
  default:
1925
- console.log(`[${qt}] [${Lt}] ${jt}`);
1963
+ console.log(`[${Yt}] [${Lt}] ${Zt}`);
1926
1964
  }
1927
1965
  })
1928
1966
  }, t.handlers = {
1929
- onAuthExpired: new rs(() => t.onAuthExpired, (n = t.logging) == null ? void 0 : n.logger),
1930
- onViewportRequested: new rs(
1967
+ onAuthExpired: new as(() => t.onAuthExpired, (n = t.logging) == null ? void 0 : n.logger),
1968
+ onViewportRequested: new as(
1931
1969
  () => t.onViewportRequested,
1932
1970
  (c = t.logging) == null ? void 0 : c.logger
1933
1971
  )
1934
1972
  }, t.events = {
1935
1973
  onActionsChanged: new C(
1936
1974
  () => t.onActionsChanged,
1937
- (h = t.logging) == null ? void 0 : h.logger
1975
+ (l = t.logging) == null ? void 0 : l.logger
1938
1976
  ),
1939
1977
  onStateChanged: new C(
1940
1978
  () => t.onStateChanged,
1941
- (l = t.logging) == null ? void 0 : l.logger
1979
+ (h = t.logging) == null ? void 0 : h.logger
1942
1980
  ),
1943
1981
  onDocumentLoaded: new C(
1944
1982
  () => t.onDocumentLoaded,
@@ -1950,15 +1988,15 @@ class ie {
1950
1988
  ),
1951
1989
  onFramesLayoutChanged: new C(
1952
1990
  () => t.onFramesLayoutChanged,
1953
- (f = t.logging) == null ? void 0 : f.logger
1991
+ (I = t.logging) == null ? void 0 : I.logger
1954
1992
  ),
1955
1993
  onSelectedFramesContentChanged: new C(
1956
1994
  () => t.onSelectedFramesContentChanged,
1957
- (I = t.logging) == null ? void 0 : I.logger
1995
+ (S = t.logging) == null ? void 0 : S.logger
1958
1996
  ),
1959
1997
  onPageSelectionChanged: new C(
1960
1998
  () => t.onPageSelectionChanged,
1961
- (S = t.logging) == null ? void 0 : S.logger
1999
+ (f = t.logging) == null ? void 0 : f.logger
1962
2000
  ),
1963
2001
  onSelectedLayoutPropertiesChanged: new C(
1964
2002
  () => t.onSelectedLayoutPropertiesChanged,
@@ -1966,11 +2004,11 @@ class ie {
1966
2004
  ),
1967
2005
  onSelectedLayoutUnitChanged: new C(
1968
2006
  () => t.onSelectedLayoutUnitChanged,
1969
- (L = t.logging) == null ? void 0 : L.logger
2007
+ (A = t.logging) == null ? void 0 : A.logger
1970
2008
  ),
1971
2009
  onScrubberPositionChanged: new C(
1972
2010
  () => t.onScrubberPositionChanged,
1973
- (P = t.logging) == null ? void 0 : P.logger
2011
+ (v = t.logging) == null ? void 0 : v.logger
1974
2012
  ),
1975
2013
  onFrameAnimationsChanged: new C(
1976
2014
  () => t.onFrameAnimationsChanged,
@@ -1978,11 +2016,11 @@ class ie {
1978
2016
  ),
1979
2017
  onVariableListChanged: new C(
1980
2018
  () => t.onVariableListChanged,
1981
- (M = t.logging) == null ? void 0 : M.logger
2019
+ (x = t.logging) == null ? void 0 : x.logger
1982
2020
  ),
1983
2021
  onSelectedToolChanged: new C(
1984
2022
  () => t.onSelectedToolChanged,
1985
- (v = t.logging) == null ? void 0 : v.logger
2023
+ (P = t.logging) == null ? void 0 : P.logger
1986
2024
  ),
1987
2025
  onUndoStackStateChanged: new C(
1988
2026
  () => t.onUndoStackStateChanged,
@@ -2002,35 +2040,35 @@ class ie {
2002
2040
  ),
2003
2041
  onParagraphStylesChanged: new C(
2004
2042
  () => t.onParagraphStylesChanged,
2005
- (oe = t.logging) == null ? void 0 : oe.logger
2043
+ (le = t.logging) == null ? void 0 : le.logger
2006
2044
  ),
2007
2045
  onCharacterStylesChanged: new C(
2008
2046
  () => t.onCharacterStylesChanged,
2009
- (ce = t.logging) == null ? void 0 : ce.logger
2047
+ (de = t.logging) == null ? void 0 : de.logger
2010
2048
  ),
2011
2049
  onFontFamiliesChanged: new C(
2012
2050
  () => t.onFontFamiliesChanged,
2013
- (he = t.logging) == null ? void 0 : he.logger
2051
+ (ue = t.logging) == null ? void 0 : ue.logger
2014
2052
  ),
2015
2053
  onSelectedLayoutIdChanged: new C(
2016
2054
  () => t.onSelectedLayoutIdChanged,
2017
- (le = t.logging) == null ? void 0 : le.logger
2055
+ (ge = t.logging) == null ? void 0 : ge.logger
2018
2056
  ),
2019
2057
  onLayoutsChanged: new C(
2020
2058
  () => t.onLayoutsChanged,
2021
- (de = t.logging) == null ? void 0 : de.logger
2059
+ (ye = t.logging) == null ? void 0 : ye.logger
2022
2060
  ),
2023
2061
  onConnectorEvent: new C(
2024
2062
  () => t.onConnectorEvent,
2025
- (ue = t.logging) == null ? void 0 : ue.logger
2063
+ (pe = t.logging) == null ? void 0 : pe.logger
2026
2064
  ),
2027
2065
  onConnectorsChanged: new C(
2028
2066
  () => t.onConnectorsChanged,
2029
- (ge = t.logging) == null ? void 0 : ge.logger
2067
+ (Ce = t.logging) == null ? void 0 : Ce.logger
2030
2068
  ),
2031
2069
  onZoomChanged: new C(
2032
2070
  () => t.onZoomChanged,
2033
- (ye = t.logging) == null ? void 0 : ye.logger
2071
+ (me = t.logging) == null ? void 0 : me.logger
2034
2072
  ),
2035
2073
  onSelectedPageIdChanged: new C(
2036
2074
  () => t.onSelectedPageIdChanged,
@@ -2046,25 +2084,25 @@ class ie {
2046
2084
  ),
2047
2085
  onPageSizeChanged: new C(
2048
2086
  () => t.onPageSizeChanged,
2049
- (pe = t.logging) == null ? void 0 : pe.logger
2087
+ (we = t.logging) == null ? void 0 : we.logger
2050
2088
  ),
2051
2089
  onShapeCornerRadiusChanged: new C(
2052
2090
  () => t.onShapeCornerRadiusChanged,
2053
- (Ce = t.logging) == null ? void 0 : Ce.logger
2091
+ (fe = t.logging) == null ? void 0 : fe.logger
2054
2092
  ),
2055
2093
  onCropActiveFrameIdChanged: new C(
2056
2094
  () => t.onCropActiveFrameIdChanged,
2057
- (me = t.logging) == null ? void 0 : me.logger
2095
+ (Se = t.logging) == null ? void 0 : Se.logger
2058
2096
  ),
2059
2097
  onAsyncError: new C(
2060
2098
  () => t.onAsyncError,
2061
- (we = t.logging) == null ? void 0 : we.logger
2099
+ (be = t.logging) == null ? void 0 : be.logger
2062
2100
  ),
2063
2101
  onViewModeChanged: new C(
2064
2102
  () => t.onViewModeChanged,
2065
- (fe = t.logging) == null ? void 0 : fe.logger
2103
+ (Ie = t.logging) == null ? void 0 : Ie.logger
2066
2104
  ),
2067
- onBarcodeValidationChanged: new C(() => t.onBarcodeValidationChanged, (Se = t.logging) == null ? void 0 : Se.logger),
2105
+ onBarcodeValidationChanged: new C(() => t.onBarcodeValidationChanged, (ve = t.logging) == null ? void 0 : ve.logger),
2068
2106
  onDataSourceIdChanged: new C(
2069
2107
  () => t.onDataSourceIdChanged,
2070
2108
  t.logging.logger
@@ -2088,10 +2126,10 @@ class ie {
2088
2126
  }, t;
2089
2127
  }
2090
2128
  static isLoggingEnabled(i, t) {
2091
- return t == x.info || t == x.warn && (i == x.warn || i == x.error) ? !0 : t == x.error && i == x.error;
2129
+ return t == M.info || t == M.warn && (i == M.warn || i == M.error) ? !0 : t == M.error && i == M.error;
2092
2130
  }
2093
2131
  }
2094
- class Zr {
2132
+ class tn {
2095
2133
  /**
2096
2134
  * Checks if the given value is a `DatePropertyWrapper`.
2097
2135
  *
@@ -2142,7 +2180,7 @@ class Zr {
2142
2180
  }
2143
2181
  }
2144
2182
  var ot;
2145
- class Qr {
2183
+ class en {
2146
2184
  /**
2147
2185
  * @ignore
2148
2186
  */
@@ -2186,7 +2224,7 @@ class Qr {
2186
2224
  }
2187
2225
  ot = new WeakMap();
2188
2226
  var Dt;
2189
- class ns extends Qr {
2227
+ class is extends en {
2190
2228
  /**
2191
2229
  * @ignore
2192
2230
  */
@@ -2227,18 +2265,18 @@ class ns extends Qr {
2227
2265
  }
2228
2266
  }
2229
2267
  Dt = new WeakMap();
2230
- const Xr = "studio-cdn.chiligrafx.com", tn = `https://${Xr}/editor/${cs.current}/web`;
2268
+ const sn = "studio-cdn.chiligrafx.com", rn = `https://${sn}/editor/${ls.current}/web`;
2231
2269
  let Q;
2232
- class Nn {
2270
+ class Rn {
2233
2271
  /**
2234
2272
  * The SDK should be configured clientside and it exposes all controllers to work with in other applications
2235
2273
  * @param config The configuration object where the SDK and editor can get configured
2236
2274
  */
2237
2275
  constructor(i) {
2238
- this.localConfig = /* @__PURE__ */ new Map(), this.dataItemMappingTools = new Zr(), this.loadEditor = () => {
2276
+ this.localConfig = /* @__PURE__ */ new Map(), this.dataItemMappingTools = new tn(), this.loadEditor = () => {
2239
2277
  var t;
2240
- Ws(
2241
- this.config.editorLink || tn,
2278
+ qs(
2279
+ this.config.editorLink || rn,
2242
2280
  {
2243
2281
  onActionsChanged: this.subscriber.onActionsChanged,
2244
2282
  onStateChanged: this.subscriber.onStateChanged,
@@ -2294,110 +2332,111 @@ class Nn {
2294
2332
  this.setConnection,
2295
2333
  this.config.editorId,
2296
2334
  this.config.studioStyling
2297
- ), this.editorAPI = Q == null ? void 0 : Q.promise.then((e) => e), this.action = new Ae(this.editorAPI), this.layout = new We(this.editorAPI), this.frame = new Ke(this.editorAPI), this.barcode = new Ee(this.editorAPI), this.animation = new Fe(this.editorAPI), this.document = new Ge(this.editorAPI), this.configuration = new ns(this.editorAPI, this.localConfig), this.utils = new ts(this.localConfig), this.tool = new Qe(this.editorAPI), this.page = new je(this.editorAPI), this.debug = new Te(this.editorAPI), this.undoManager = new Xe(this.editorAPI, this), this.textSelection = new Ze(this.editorAPI), this.colorStyle = new Be(this.editorAPI), this.paragraphStyle = new Ye(this.editorAPI), this.characterStyle = new xe(this.editorAPI), this.mediaConnector = new qe(this.editorAPI), this.fontConnector = new _e(this.editorAPI), this.dataConnector = new Ue(this.editorAPI, this.dataItemMappingTools), this.dataSource = new ke(this.editorAPI, this.dataItemMappingTools), this.connector = new Je(this.editorAPI, this.localConfig), this.variable = new es(this.editorAPI), this.font = new $e(this.editorAPI), this.experiment = new He(this.editorAPI), this.canvas = new Qt(this.editorAPI), this.shape = new ee(this.editorAPI), this.colorConversion = new Ve(this.editorAPI), this.info = new ze(), this.clipboard = new Re(this.editorAPI), this.brandKit = new Me(this.editorAPI, this), this.next = new ss(this.config, this.connection, this.editorAPI), this.configuration.setValue(Z.GraFxStudioSdkVersion, hs.version), this.configuration.setValue(
2335
+ ), this.editorAPI = Q == null ? void 0 : Q.promise.then((e) => e), this.action = new De(this.editorAPI), this.layout = new qe(this.editorAPI), this.frame = new We(this.editorAPI), this.barcode = new Oe(this.editorAPI), this.animation = new Le(this.editorAPI), this.document = new _e(this.editorAPI), this.configuration = new is(this.editorAPI, this.localConfig), this.utils = new ss(this.editorAPI, this.localConfig), this.tool = new ts(this.editorAPI), this.page = new Ze(this.editorAPI), this.debug = new He(this.editorAPI), this.undoManager = new es(this.editorAPI, this), this.textSelection = new Xe(this.editorAPI), this.colorStyle = new Je(this.editorAPI), this.paragraphStyle = new Qe(this.editorAPI), this.characterStyle = new Ve(this.editorAPI), this.mediaConnector = new Ye(this.editorAPI), this.fontConnector = new Ke(this.editorAPI), this.dataConnector = new Ge(this.editorAPI, this.dataItemMappingTools), this.dataSource = new Te(this.editorAPI, this.dataItemMappingTools), this.connector = new Ue(this.editorAPI, this.localConfig), this.variable = new rs(this.editorAPI), this.font = new ze(this.editorAPI), this.experiment = new $e(this.editorAPI), this.canvas = new ee(this.editorAPI), this.shape = new ne(this.editorAPI), this.colorConversion = new ke(this.editorAPI), this.info = new je(), this.clipboard = new Be(this.editorAPI), this.brandKit = new Re(this.editorAPI, this), this.next = new ns(this.config, this.connection, this.editorAPI), this.configuration.setValue(Z.GraFxStudioSdkVersion, ds.version), this.configuration.setValue(
2298
2336
  Z.GraFxStudioDocumentType,
2299
- this.config.documentType || gs.template
2300
- ), this.configuration.updateStudioOptions(this.config.studioOptions || qs), this.configuration.setValue(
2337
+ this.config.documentType || ps.template
2338
+ ), this.configuration.updateStudioOptions(this.config.studioOptions || Ys), this.configuration.setValue(
2301
2339
  Z.QueryCallCacheEnabled,
2302
2340
  ((t = this.config.enableQueryCallCache) == null ? void 0 : t.toString()) || "false"
2303
2341
  );
2304
2342
  }, this.setConnection = (t) => {
2305
2343
  Q = t;
2306
- }, this.config = ie.createRuntimeConfig(i), this.connection = Q, this.editorAPI = Q == null ? void 0 : Q.promise.then((t) => t), this.action = new Ae(this.editorAPI), this.layout = new We(this.editorAPI), this.frame = new Ke(this.editorAPI), this.shape = new ee(this.editorAPI), this.barcode = new Ee(this.editorAPI), this.undoManager = new Xe(this.editorAPI, this), this.connector = new Je(this.editorAPI, this.localConfig), this.mediaConnector = new qe(this.editorAPI), this.fontConnector = new _e(this.editorAPI), this.dataConnector = new Ue(this.editorAPI, this.dataItemMappingTools), this.dataSource = new ke(this.editorAPI, this.dataItemMappingTools), this.animation = new Fe(this.editorAPI), this.document = new Ge(this.editorAPI), this.configuration = new ns(this.editorAPI, this.localConfig), this.variable = new es(this.editorAPI), this.utils = new ts(this.localConfig), this.subscriber = new Ur(this.config, this.localConfig), this.tool = new Qe(this.editorAPI), this.page = new je(this.editorAPI), this.debug = new Te(this.editorAPI), this.textSelection = new Ze(this.editorAPI), this.colorStyle = new Be(this.editorAPI), this.paragraphStyle = new Ye(this.editorAPI), this.characterStyle = new xe(this.editorAPI), this.font = new $e(this.editorAPI), this.experiment = new He(this.editorAPI), this.canvas = new Qt(this.editorAPI), this.colorConversion = new Ve(this.editorAPI), this.info = new ze(), this.clipboard = new Re(this.editorAPI), this.next = new ss(this.config, this.connection, this.editorAPI), this.enabledNextSubscribers = this.config.enableNextSubscribers, this.brandKit = new Me(this.editorAPI, this);
2344
+ }, this.config = he.createRuntimeConfig(i), this.connection = Q, this.editorAPI = Q == null ? void 0 : Q.promise.then((t) => t), this.action = new De(this.editorAPI), this.layout = new qe(this.editorAPI), this.frame = new We(this.editorAPI), this.shape = new ne(this.editorAPI), this.barcode = new Oe(this.editorAPI), this.undoManager = new es(this.editorAPI, this), this.connector = new Ue(this.editorAPI, this.localConfig), this.mediaConnector = new Ye(this.editorAPI), this.fontConnector = new Ke(this.editorAPI), this.dataConnector = new Ge(this.editorAPI, this.dataItemMappingTools), this.dataSource = new Te(this.editorAPI, this.dataItemMappingTools), this.animation = new Le(this.editorAPI), this.document = new _e(this.editorAPI), this.configuration = new is(this.editorAPI, this.localConfig), this.variable = new rs(this.editorAPI), this.utils = new ss(this.editorAPI, this.localConfig), this.subscriber = new Tr(this.config, this.localConfig), this.tool = new ts(this.editorAPI), this.page = new Ze(this.editorAPI), this.debug = new He(this.editorAPI), this.textSelection = new Xe(this.editorAPI), this.colorStyle = new Je(this.editorAPI), this.paragraphStyle = new Qe(this.editorAPI), this.characterStyle = new Ve(this.editorAPI), this.font = new ze(this.editorAPI), this.experiment = new $e(this.editorAPI), this.canvas = new ee(this.editorAPI), this.colorConversion = new ke(this.editorAPI), this.info = new je(), this.clipboard = new Be(this.editorAPI), this.next = new ns(this.config, this.connection, this.editorAPI), this.enabledNextSubscribers = this.config.enableNextSubscribers, this.brandKit = new Re(this.editorAPI, this);
2307
2345
  }
2308
2346
  }
2309
- var en = /* @__PURE__ */ ((s) => (s.top = "top", s.left = "left", s.right = "right", s.bottom = "bottom", s.topLeft = "topLeft", s.topRight = "topRight", s.bottomLeft = "bottomLeft", s.bottomRight = "bottomRight", s))(en || {}), sn = /* @__PURE__ */ ((s) => (s.horizontal = "horizontal", s.vertical = "vertical", s))(sn || {}), rn = /* @__PURE__ */ ((s) => (s.easeIn = "easeIn", s.easeOut = "easeOut", s.easeInOut = "easeInOut", s))(rn || {}), nn = /* @__PURE__ */ ((s) => (s.quadratic = "Quadratic", s.cubic = "Cubic", s.quartic = "Quartic", s.quintic = "Quintic", s.sine = "Sine", s.exponential = "Exponential", s.circular = "Circular", s.elastic = "Elastic", s.bounce = "Bounce", s.back = "Back", s))(nn || {}), an = /* @__PURE__ */ ((s) => (s.bounce = "bounce", s.flash = "flash", s.headshake = "headShake", s.heartbeat = "heartbeat", s.pulse = "pulse", s.rubberBand = "rubberBand", s.vertical = "vertical", s.horizontal = "horizontal", s.swing = "swing", s.tada = "tada", s))(an || {}), on = /* @__PURE__ */ ((s) => (s.preview = "preview", s.normal = "normal", s))(on || {}), cn = /* @__PURE__ */ ((s) => (s.Square = "square", s.Line = "line", s))(cn || {}), hn = /* @__PURE__ */ ((s) => (s.BOLD = "Bold", s.ITALIC = "Italic", s.REGULAR = "Regular", s))(hn || {}), ln = /* @__PURE__ */ ((s) => (s.LEFT = "left", s.CENTER = "center", s.RIGHT = "right", s.JUSTIFY = "justify", s))(ln || {}), dn = /* @__PURE__ */ ((s) => (s.TOP = "top", s.CENTER = "center", s.BOTTOM = "bottom", s))(dn || {}), un = /* @__PURE__ */ ((s) => (s.TO_LOWER_CASE = "lowercase", s.TO_UPPER_CASE = "uppercase", s.NORMAL = "normal", s))(un || {}), gn = /* @__PURE__ */ ((s) => (s.SUPERSCRIPT = "superscript", s.SUBSCRIPT = "subscript", s.NORMAL = "normal", s))(gn || {}), yn = /* @__PURE__ */ ((s) => (s.STYLE = "textStyle", s.PROPERTIES = "textProperties", s.APPEARANCE = "appearance", s))(yn || {}), pn = /* @__PURE__ */ ((s) => (s.PARAGRAPH = "paragraphStyleId", s.CHARACTER = "characterStyleId", s.FONT_FAMILY = "fontKey", s.FONT_STYLE = "fontStyle", s.FONT_SIZE = "fontSize", s.LETTER_SPACING = "letterSpacing", s.LINE_HEIGHT = "lineHeight", s.TEXT_ALIGN = "textAlign", s.VERTICAL_ALIGN = "verticalAlign", s.TYPOGRAPHIC_CASE = "typographicCase", s.SUB_SUPER_SCRIPT = "subSuperScript", s.UNDERLINE = "underline", s.LINE_THROUGH = "lineThrough", s.FILL_COLOR = "fillColor", s.COLOR = "color", s.FILL_COLOR_APPLIED = "fillColorApplied", s.STROKE_COLOR = "strokeColor", s.STROKE_COLOR_APPLIED = "strokeColorApplied", s.DROP_SHADOW_COLOR = "dropShadowColor", s.BLEND_MODE = "blendMode", s.OPACITY = "opacity", s.TRACKING_RIGHT = "trackingRight", s.BASELINE_SHIFT = "baselineShiftValue", s.STROKE_WIDTH = "strokeWidth", s))(pn || {}), Cn = /* @__PURE__ */ ((s) => (s.selectedLayoutChanged = "selectedLayoutChanged", s.frameMoved = "frameMoved", s.pageSizeChanged = "pageSizeChanged", s.documentLoaded = "documentLoaded", s.variableValueChanged = "variableValueChanged", s))(Cn || {}), mn = /* @__PURE__ */ ((s) => (s.ellipse = "ellipse", s.rectangle = "rectangle", s.polygon = "polygon", s))(mn || {}), wn = /* @__PURE__ */ ((s) => (s.all = "all", s.only = "only", s.none = "none", s))(wn || {}), fn = /* @__PURE__ */ ((s) => (s.normal = "normal", s.textEdit = "textEdit", s.customCrop = "customCrop", s.frameSubjectArea = "frameSubjectArea", s.perAssetCrop = "perAssetCrop", s))(fn || {}), Ss = /* @__PURE__ */ ((s) => (s.url = "url", s.grafx = "grafx", s.local = "local", s))(Ss || {});
2310
- const Mn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2347
+ var nn = /* @__PURE__ */ ((s) => (s.top = "top", s.left = "left", s.right = "right", s.bottom = "bottom", s.topLeft = "topLeft", s.topRight = "topRight", s.bottomLeft = "bottomLeft", s.bottomRight = "bottomRight", s))(nn || {}), an = /* @__PURE__ */ ((s) => (s.horizontal = "horizontal", s.vertical = "vertical", s))(an || {}), on = /* @__PURE__ */ ((s) => (s.easeIn = "easeIn", s.easeOut = "easeOut", s.easeInOut = "easeInOut", s))(on || {}), cn = /* @__PURE__ */ ((s) => (s.quadratic = "Quadratic", s.cubic = "Cubic", s.quartic = "Quartic", s.quintic = "Quintic", s.sine = "Sine", s.exponential = "Exponential", s.circular = "Circular", s.elastic = "Elastic", s.bounce = "Bounce", s.back = "Back", s))(cn || {}), hn = /* @__PURE__ */ ((s) => (s.bounce = "bounce", s.flash = "flash", s.headshake = "headShake", s.heartbeat = "heartbeat", s.pulse = "pulse", s.rubberBand = "rubberBand", s.vertical = "vertical", s.horizontal = "horizontal", s.swing = "swing", s.tada = "tada", s))(hn || {}), ln = /* @__PURE__ */ ((s) => (s.preview = "preview", s.normal = "normal", s))(ln || {}), dn = /* @__PURE__ */ ((s) => (s.Square = "square", s.Line = "line", s))(dn || {}), un = /* @__PURE__ */ ((s) => (s.BOLD = "Bold", s.ITALIC = "Italic", s.REGULAR = "Regular", s))(un || {}), gn = /* @__PURE__ */ ((s) => (s.LEFT = "left", s.CENTER = "center", s.RIGHT = "right", s.JUSTIFY = "justify", s))(gn || {}), yn = /* @__PURE__ */ ((s) => (s.TOP = "top", s.CENTER = "center", s.BOTTOM = "bottom", s))(yn || {}), pn = /* @__PURE__ */ ((s) => (s.TO_LOWER_CASE = "lowercase", s.TO_UPPER_CASE = "uppercase", s.NORMAL = "normal", s))(pn || {}), Cn = /* @__PURE__ */ ((s) => (s.SUPERSCRIPT = "superscript", s.SUBSCRIPT = "subscript", s.NORMAL = "normal", s))(Cn || {}), mn = /* @__PURE__ */ ((s) => (s.STYLE = "textStyle", s.PROPERTIES = "textProperties", s.APPEARANCE = "appearance", s))(mn || {}), wn = /* @__PURE__ */ ((s) => (s.PARAGRAPH = "paragraphStyleId", s.CHARACTER = "characterStyleId", s.FONT_FAMILY = "fontKey", s.FONT_STYLE = "fontStyle", s.FONT_SIZE = "fontSize", s.LETTER_SPACING = "letterSpacing", s.LINE_HEIGHT = "lineHeight", s.TEXT_ALIGN = "textAlign", s.VERTICAL_ALIGN = "verticalAlign", s.TYPOGRAPHIC_CASE = "typographicCase", s.SUB_SUPER_SCRIPT = "subSuperScript", s.UNDERLINE = "underline", s.LINE_THROUGH = "lineThrough", s.FILL_COLOR = "fillColor", s.COLOR = "color", s.FILL_COLOR_APPLIED = "fillColorApplied", s.STROKE_COLOR = "strokeColor", s.STROKE_COLOR_APPLIED = "strokeColorApplied", s.DROP_SHADOW_COLOR = "dropShadowColor", s.BLEND_MODE = "blendMode", s.OPACITY = "opacity", s.TRACKING_RIGHT = "trackingRight", s.BASELINE_SHIFT = "baselineShiftValue", s.STROKE_WIDTH = "strokeWidth", s))(wn || {}), fn = /* @__PURE__ */ ((s) => (s.selectedLayoutChanged = "selectedLayoutChanged", s.frameMoved = "frameMoved", s.pageSizeChanged = "pageSizeChanged", s.documentLoaded = "documentLoaded", s.variableValueChanged = "variableValueChanged", s))(fn || {}), Sn = /* @__PURE__ */ ((s) => (s.ellipse = "ellipse", s.rectangle = "rectangle", s.polygon = "polygon", s))(Sn || {}), bn = /* @__PURE__ */ ((s) => (s.all = "all", s.only = "only", s.none = "none", s))(bn || {}), In = /* @__PURE__ */ ((s) => (s.normal = "normal", s.textEdit = "textEdit", s.customCrop = "customCrop", s.frameSubjectArea = "frameSubjectArea", s.perAssetCrop = "perAssetCrop", s))(In || {}), Is = /* @__PURE__ */ ((s) => (s.url = "url", s.grafx = "grafx", s.local = "local", s))(Is || {});
2348
+ const Vn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2311
2349
  __proto__: null,
2312
- ConnectorRegistrationSource: Ss
2350
+ ConnectorRegistrationSource: Is
2313
2351
  }, Symbol.toStringTag, { value: "Module" }));
2314
2352
  export {
2315
- Mr as ActionAsyncError,
2316
- Cn as ActionEditorEvent,
2317
- ln as Alignment,
2318
- Nr as AnchorTargetEdgeType,
2319
- Or as AnchorTargetType,
2320
- pr as AuthCredentialsTypeEnum,
2321
- Cr as AuthRefreshTypeEnum,
2322
- fr as AutoGrowDirection,
2353
+ Vr as ActionAsyncError,
2354
+ fn as ActionEditorEvent,
2355
+ gn as Alignment,
2356
+ Rr as AnchorTargetEdgeType,
2357
+ Mr as AnchorTargetType,
2358
+ wr as AuthCredentialsTypeEnum,
2359
+ fr as AuthRefreshTypeEnum,
2360
+ Ir as AutoGrowDirection,
2323
2361
  ft as BarcodeCharacterSet,
2324
2362
  Ot as BarcodeErrorCorrectionLevel,
2325
- br as BarcodeSourceTypeEnum,
2326
- G as BarcodeType,
2327
- Qs as BarcodeValidationResult,
2328
- an as BasicAnimationsEmphasisStyles,
2329
- Ar as BlendMode,
2330
- un as Case,
2363
+ Ar as BarcodeSourceTypeEnum,
2364
+ T as BarcodeType,
2365
+ tr as BarcodeValidationResult,
2366
+ hn as BasicAnimationsEmphasisStyles,
2367
+ Dr as BlendMode,
2368
+ pn as Case,
2331
2369
  z as ColorType,
2332
- ys as ColorUsageType,
2333
- dr as ConnectorConfigContextType,
2334
- lr as ConnectorConfigValueType,
2335
- yr as ConnectorEventType,
2336
- Zs as ConnectorHttpError,
2337
- bn as ConnectorMapping,
2338
- gr as ConnectorMappingDirection,
2339
- ur as ConnectorMappingSource,
2370
+ Xt as ColorUsageType,
2371
+ yr as ConnectorConfigContextType,
2372
+ gr as ConnectorConfigValueType,
2373
+ mr as ConnectorEventType,
2374
+ Xs as ConnectorHttpError,
2375
+ An as ConnectorMapping,
2376
+ Cr as ConnectorMappingDirection,
2377
+ pr as ConnectorMappingSource,
2340
2378
  Nt as ConnectorRegistrationSource,
2341
- te as ConnectorStateType,
2342
- or as ConnectorType,
2343
- wn as CornerRadiusType,
2344
- Cs as CropType,
2345
- xr as DataRowAsyncError,
2346
- Rr as Day,
2347
- Xt as DeprecatedMediaConnectorDownloadType,
2379
+ re as ConnectorStateType,
2380
+ lr as ConnectorType,
2381
+ nr as ConstraintMode,
2382
+ bn as CornerRadiusType,
2383
+ ws as CropType,
2384
+ Br as DataRowAsyncError,
2385
+ kr as Day,
2386
+ se as DeprecatedMediaConnectorDownloadType,
2348
2387
  Rt as DeprecatedMediaType,
2349
- js as DocumentIssueTypeEnum,
2350
- gs as DocumentType,
2351
- Gr as DownloadFormats,
2352
- rn as EaseTypes,
2353
- fn as EngineEditModeType,
2354
- re as EnvironmentType,
2355
- Fr as FitMode,
2356
- Er as FitModePosition,
2357
- vr as FlowDirection,
2358
- cn as FontPreviewFormat,
2359
- hn as FontWeights,
2360
- En as FrameAnchorTarget,
2361
- Lr as FrameAnchorType,
2362
- kr as FramePropertyNames,
2363
- Sr as FrameTypeEnum,
2364
- vn as GrafxTokenAuthCredentials,
2365
- zt as ImageSourceTypeEnum,
2366
- er as LayoutIntent,
2367
- Tr as LayoutPropertyNames,
2368
- Xs as LayoutType,
2369
- Vr as Locale,
2370
- tr as MeasurementUnit,
2371
- ms as MediaDownloadIntent,
2372
- se as MediaDownloadType,
2388
+ Zs as DocumentIssueTypeEnum,
2389
+ ps as DocumentType,
2390
+ $r as DownloadFormats,
2391
+ on as EaseTypes,
2392
+ In as EngineEditModeType,
2393
+ ie as EnvironmentType,
2394
+ Lr as FitMode,
2395
+ Or as FitModePosition,
2396
+ Fr as FlowDirection,
2397
+ dn as FontPreviewFormat,
2398
+ un as FontWeights,
2399
+ On as FrameAnchorTarget,
2400
+ xr as FrameAnchorType,
2401
+ Hr as FramePropertyNames,
2402
+ vr as FrameTypeEnum,
2403
+ Fn as GrafxTokenAuthCredentials,
2404
+ jt as ImageSourceTypeEnum,
2405
+ rr as LayoutIntent,
2406
+ _r as LayoutPropertyNames,
2407
+ er as LayoutType,
2408
+ Jr as Locale,
2409
+ sr as MeasurementUnit,
2410
+ fs as MediaDownloadIntent,
2411
+ ae as MediaDownloadType,
2373
2412
  Vt as MediaType,
2374
- Mn as Next,
2375
- Fn as PageAnchorTarget,
2413
+ Vn as Next,
2414
+ Ln as PageAnchorTarget,
2376
2415
  Y as PositionEnum,
2377
- Pn as RefreshedAuthCredendentials,
2378
- gn as Scripting,
2379
- yn as SelectedTextStyleSections,
2380
- pn as SelectedTextStyles,
2381
- sn as ShakeDirections,
2382
- mn as ShapeType,
2383
- en as SlideDirections,
2384
- cr as SortBy,
2385
- hr as SortOrder,
2386
- Ir as TextDirection,
2387
- dn as TextPosition,
2416
+ En as RefreshedAuthCredendentials,
2417
+ Cn as Scripting,
2418
+ mn as SelectedTextStyleSections,
2419
+ wn as SelectedTextStyles,
2420
+ an as ShakeDirections,
2421
+ Sn as ShapeType,
2422
+ nn as SlideDirections,
2423
+ dr as SortBy,
2424
+ ur as SortOrder,
2425
+ Pr as TextDirection,
2426
+ yn as TextPosition,
2388
2427
  H as ToolType,
2389
- nn as TweenTypes,
2390
- Dr as UpdateZIndexMethod,
2391
- mr as UploadAssetValidationError,
2392
- ps as UploadAssetValidationErrorType,
2393
- ae as VariableType,
2394
- Jr as VariableVisibilityOperator,
2395
- Br as VariableVisibilityTargetType,
2396
- Mt as VariableVisibilityType,
2397
- Pr as VerticalAlign,
2398
- on as ViewMode,
2428
+ cn as TweenTypes,
2429
+ Nr as UpdateZIndexMethod,
2430
+ Sr as UploadAssetValidationError,
2431
+ ms as UploadAssetValidationErrorType,
2432
+ ce as VariableType,
2433
+ Gr as VariableVisibilityOperator,
2434
+ Ur as VariableVisibilityTargetType,
2435
+ xt as VariableVisibilityType,
2436
+ Er as VerticalAlign,
2437
+ ln as ViewMode,
2399
2438
  Z as WellKnownConfigurationKeys,
2400
- Nn as default,
2401
- In as grafxMediaConnectorRegistration
2439
+ Rn as default,
2440
+ Pn as grafxMediaConnectorRegistration
2402
2441
  };
2403
2442
  //# sourceMappingURL=main.es.js.map